{"version":3,"file":"vue3-click-away-CNXyJcE_.js","sources":["../../node_modules/vue3-click-away/dist/module.js"],"sourcesContent":["const clickEventType = document.ontouchstart !== null ? \"click\" : \"touchstart\";\nconst UNIQUE_ID = \"__vue_click_away__\";\n\nconst onMounted = function (el, binding, vnode) {\n onUnmounted(el);\n let vm = vnode.context;\n let callback = binding.value;\n let nextTick = false;\n setTimeout(function () {\n nextTick = true;\n }, 0);\n\n el[UNIQUE_ID] = function (event) {\n if ((!el || !el.contains(event.target)) && callback && nextTick && typeof callback === \"function\") {\n return callback.call(vm, event);\n }\n };\n\n document.addEventListener(clickEventType, el[UNIQUE_ID], false);\n};\n\nconst onUnmounted = function (el) {\n document.removeEventListener(clickEventType, el[UNIQUE_ID], false);\n delete el[UNIQUE_ID];\n};\n\nconst onUpdated = function (el, binding, vnode) {\n if (binding.value === binding.oldValue) {\n return;\n }\n\n onMounted(el, binding, vnode);\n};\n\nconst plugin = {\n install: function (app) {\n app.directive('click-away', directive);\n }\n};\nconst directive = {\n mounted: onMounted,\n updated: onUpdated,\n unmounted: onUnmounted\n};\nconst mixin = {\n directives: {\n ClickAway: directive\n }\n};\n\nexport default plugin;\nexport { directive, mixin };\n//# sourceMappingURL=module.js.map\n"],"names":["n","clickEventType","UNIQUE_ID","onMounted","el","binding","vnode","onUnmounted","vm","callback","nextTick","event","onUpdated","directive","mixin"],"mappings":"CAAA,UAAA,CAAA,GAAA,CAAA,IAAA,EAAA,OAAA,OAAA,IAAA,OAAA,OAAA,OAAA,IAAA,OAAA,OAAA,KAAA,IAAA,KAAA,CAAA,EAAAA,EAAA,IAAA,QAAA,MAAAA,IAAA,EAAA,gBAAA,EAAA,iBAAA,CAAA,EAAA,EAAA,gBAAAA,CAAA,EAAA,uCAAA,EAAA,yBAAA,mDAAA,MAAA,CAAA,CAAA,GAAA,EAAA,MAAMC,EAAiB,SAAS,eAAiB,KAAO,QAAU,aAC5DC,EAAY,qBAEZC,EAAY,SAAUC,EAAIC,EAASC,EAAO,CAC9CC,EAAYH,CAAE,EACd,IAAII,EAAKF,EAAM,QACXG,EAAWJ,EAAQ,MACnBK,EAAW,GACf,WAAW,UAAY,CACrBA,EAAW,EACZ,EAAE,CAAC,EAEJN,EAAGF,CAAS,EAAI,SAAUS,EAAO,CAC/B,IAAK,CAACP,GAAM,CAACA,EAAG,SAASO,EAAM,MAAM,IAAMF,GAAYC,GAAY,OAAOD,GAAa,WACrF,OAAOA,EAAS,KAAKD,EAAIG,CAAK,CAEpC,EAEE,SAAS,iBAAiBV,EAAgBG,EAAGF,CAAS,EAAG,EAAK,CAChE,EAEMK,EAAc,SAAUH,EAAI,CAChC,SAAS,oBAAoBH,EAAgBG,EAAGF,CAAS,EAAG,EAAK,EACjE,OAAOE,EAAGF,CAAS,CACrB,EAEMU,EAAY,SAAUR,EAAIC,EAASC,EAAO,CAC1CD,EAAQ,QAAUA,EAAQ,UAI9BF,EAAUC,EAAIC,EAASC,CAAK,CAC9B,EAOMO,EAAY,CAChB,QAASV,EACT,QAASS,EACT,UAAWL,CACb,EACMO,EAAQ,CACZ,WAAY,CACV,UAAWD,CACZ,CACH","x_google_ignoreList":[0]}