import{r as p}from"./vue.js";var t=p;t="default"in t?t.default:t;var d="2.2.2",m=/^2\./.test(t.version);m||t.util.warn("VueClickaway "+d+" only supports Vue 2.x, and does not support Vue "+t.version);var r="_vue_clickaway_handler";function c(n,e,l){s(n);var f=l.context,o=e.value;if(typeof o=="function"){var u=!1;setTimeout(function(){u=!0},0),n[r]=function(a){var i=a.path||(a.composedPath?a.composedPath():void 0);if(u&&(i?i.indexOf(n)<0:!n.contains(a.target)))return o.call(f,a)},document.documentElement.addEventListener("click",n[r],!1)}}function s(n){document.documentElement.removeEventListener("click",n[r],!1),delete n[r]}var v={bind:c,update:function(n,e){e.value!==e.oldValue&&c(n,e)},unbind:s},_={directives:{onClickaway:v}},x=_;export{x as m};
