directix 1.4.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * directix v1.4.0
2
+ * directix v1.5.0
3
3
  * A comprehensive, easy-to-use, and high-performance Vue custom directives library supporting both Vue 2 and Vue 3
4
4
  * (c) 2021-present saqqdy <https://github.com/saqqdy>
5
5
  * Released under the MIT License.
6
6
  */
7
- var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__pow=Math.pow,__defNormalProp=(e,t,n)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,__spreadValues=(e,t)=>{for(var n in t||(t={}))__hasOwnProp.call(t,n)&&__defNormalProp(e,n,t[n]);if(__getOwnPropSymbols)for(var n of __getOwnPropSymbols(t))__propIsEnum.call(t,n)&&__defNormalProp(e,n,t[n]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t)),__objRest=(e,t)=>{var n={};for(var o in e)__hasOwnProp.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&__getOwnPropSymbols)for(var o of __getOwnPropSymbols(e))t.indexOf(o)<0&&__propIsEnum.call(e,o)&&(n[o]=e[o]);return n},__async=(e,t,n)=>new Promise((o,r)=>{var l=e=>{try{s(n.next(e))}catch(e){r(e)}},i=e=>{try{s(n.throw(e))}catch(e){r(e)}},s=e=>e.done?o(e.value):Promise.resolve(e.value).then(l,i);s((n=n.apply(e,t)).next())});!function(e,t){"use strict";function n(e){return{bind(e,t,n){const o={value:t.value,vnode:n,cleanup:[]};e.__directix_state__=o},inserted(t,n,r){e.mounted&&e.mounted(t,o(n),r)},update(t,n,r,l){const i=t.__directix_state__;e.updated&&e.updated(t,o(n),r,o(__spreadProps(__spreadValues({},n),{value:n.oldValue})),l),i&&(i.value=n.value,i.vnode=r)},componentUpdated(e,t,n,o){},unbind(t,n,r){e.unmounted&&e.unmounted(t,o(n),r);const l=t.__directix_state__;(null==l?void 0:l.cleanup)&&l.cleanup.forEach(e=>e()),delete t.__directix_state__}}}function o(e){var t;return{value:e.value,oldValue:null!=(t=e.oldValue)?t:null,arg:e.arg,modifiers:e.modifiers||{},instance:e.instance||null}}function r(e){return{created(e,t,n){const o={value:t.value,vnode:n,cleanup:[]};e.__directix_state__=o},beforeMount(e,t,n){},mounted(t,n,o){e.mounted&&e.mounted(t,l(n),o)},beforeUpdate(e,t,n,o){},updated(t,n,o,r){const i=t.__directix_state__;e.updated&&e.updated(t,l(n),o,l(__spreadProps(__spreadValues({},n),{value:n.oldValue})),r),i&&(i.value=n.value,i.vnode=o)},beforeUnmount(e,t,n){},unmounted(t,n,o){e.unmounted&&e.unmounted(t,l(n),o);const r=t.__directix_state__;(null==r?void 0:r.cleanup)&&r.cleanup.forEach(e=>e()),delete t.__directix_state__}}}function l(e){var t;return{value:e.value,oldValue:null!=(t=e.oldValue)?t:null,arg:e.arg,modifiers:e.modifiers||{},instance:e.instance}}let i=null,s=null,a=null,u=null;function c(e){return e.startsWith("2.7")?2.7:e.startsWith("2")?2:e.startsWith("3")?3:null}function d(){var e,t;if(null!==i)return i;if("undefined"!=typeof process){const e=process.env.DIRECTIX_VUE_VERSION;if("2.7"===e)return i=2.7,i;if("2"===e)return i=2,i;if("3"===e)return i=3,i}try{const e=require("vue"),t=c(null==e?void 0:e.version);if(null!==t)return i=t,i}catch(e){}if("undefined"!=typeof window){const n=window,o=n.Vue;if(null==o?void 0:o.version){const e=c(o.version);if(null!==e)return i=e,i}if("function"==typeof(null==o?void 0:o.observable))return i=2,i;if("function"==typeof(null==o?void 0:o.createApp)&&"function"!=typeof(null==o?void 0:o.observable))return i=3,i;const r=n.__VUE_DEVTOOLS_GLOBAL_HOOK__;if(null==(e=null==r?void 0:r.Vue)?void 0:e.version){const e=c(r.Vue.version);if(null!==e)return i=e,i}if(null==(t=null==r?void 0:r.apps)?void 0:t.length)return i=3,i}return null===i&&("undefined"!=typeof window&&console.warn("[Directix] Unable to detect Vue version, defaulting to Vue 3. Set DIRECTIX_VUE_VERSION=2 or call setVueVersion(2) if using Vue 2."),i=3),i}function p(e){i=e,s=2===e||2.7===e,a=2.7===e,u=3===e}const v=()=>"undefined"!=typeof window&&"undefined"!=typeof document,f=()=>!v(),m=()=>{if(!v())return!1;let e=!1;try{const t={get passive(){return e=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){e=!1}return e},h=()=>v()&&"IntersectionObserver"in window,g=()=>v()&&"ResizeObserver"in window,b=()=>v()&&"clipboard"in navigator,y=()=>v()&&"MutationObserver"in window;function w(e){var t;const o=e,{name:l,version:i,ssr:s,defaults:a}=o,u=__objRest(o,["name","version","ssr","defaults"]);if(f()&&!s)return"undefined"!=typeof process&&"test"!==(null==(t=process.env)?void 0:t.NODE_ENV)&&console.warn(`[Directix] Directive "${l}" is not compatible with SSR. It will be a no-op on the server side.`),{mounted:()=>{},updated:()=>{},unmounted:()=>{}};return function(e){let t=null;function o(){return t||(t=2===d()?n(e):r(e)),t}function l(e){return function(t,n,r,l){var i,s;null==(s=(i=o())[e])||s.call(i,t,n,r,l)}}return{bind:l("bind"),inserted:l("inserted"),update:l("update"),componentUpdated:l("componentUpdated"),unbind:l("unbind"),created:l("created"),beforeMount:l("beforeMount"),mounted:l("mounted"),beforeUpdate:l("beforeUpdate"),updated:l("updated"),beforeUnmount:l("beforeUnmount"),unmounted:l("unmounted")}}({mounted:u.mounted?(e,t,n)=>{u.mounted(e,_(t,a),n)}:void 0,updated:u.updated?(e,t,n,o,r)=>{u.updated(e,_(t,a),n,o,r)}:void 0,unmounted:u.unmounted})}function _(e,t){if(!t)return e;const n="object"==typeof e.value&&null!==e.value?__spreadValues(__spreadValues({},t),e.value):e.value;return __spreadProps(__spreadValues({},e),{value:n})}function x(e,t,n){if(!t.onInput)return()=>{};const o=()=>{const t=e.selectionStart,o=e.selectionEnd,r=e.value,l=n(r);r!==l&&(e.value=l,null!==t&&null!==o&&e.setSelectionRange(t,o),e.dispatchEvent(new Event("input",{bubbles:!0})))};return e.addEventListener("input",o),e.value=n(e.value),()=>{e.removeEventListener("input",o)}}function E(e,t){const n=e.textContent||"";e.textContent=t(n)}function T(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}const L=["a","an","the","and","but","or","for","nor","on","at","to","from","by","in","of","with","as"];function k(e,t){if(!e)return e;const{every:n=!0,keepLower:o=L}=t;if(n){return e.toLowerCase().split(/\s+/).map((e,t)=>0===t?C(e):o.includes(e.toLowerCase())?e.toLowerCase():C(e)).join(" ")}return C(e)}function C(e){return e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():e}function S(e){var t,n,o;return void 0===e||!0===e?{every:!0,onInput:!0}:!1===e?{every:!1,onInput:!1}:{every:null==(t=e.every)||t,keepLower:null!=(n=e.keepLower)?n:L,onInput:null==(o=e.onInput)||o}}const D=w({name:"capitalcase",ssr:!0,mounted(e,t){const n=S(t.value);if(T(e)){const t=x(e,n,e=>k(e,n));e.__capitalcaseCleanup=t}else E(e,e=>k(e,n))},updated(e,t){const n=S(t.value);T(e)?n.onInput&&(e.value=k(e.value,n)):E(e,e=>k(e,n))},unmounted(e){const t=e.__capitalcaseCleanup;null==t||t(),delete e.__capitalcaseCleanup}}),I="__directix_";function M(e,t,n){e[I+t]=n}function P(e,t){return e[I+t]}function O(e,t){delete e[I+t]}function z(e){return e?"string"==typeof e?v()?document.querySelector(e):null:e instanceof Element?e:null:null}function H(e){if(!v())return window;let t=e.parentElement;for(;t;){const{overflow:e,overflowX:n,overflowY:o}=getComputedStyle(t);if(/(auto|scroll)/.test(e+n+o))return t;t=t.parentElement}return window}function Y(e,t,n,o=!1){if(!v())return;const r=A(o);e.addEventListener(t,n,r)}function $(e,t,n,o=!1){if(!v())return;const r=A(o);e.removeEventListener(t,n,r)}function A(e){if("boolean"==typeof e)return e;const{capture:t=!1,passive:n=!1,once:o=!1}=e;return m()?{capture:t,passive:n,once:o}:t}function X(e){let t=0,n=0;return"touches"in e&&e.touches.length>0?(t=e.touches[0].clientX,n=e.touches[0].clientY):"clientX"in e&&(t=e.clientX,n=e.clientY),{x:t,y:n,clientX:t,clientY:n}}function R(e){const{capture:t=!1,passive:n=!1,once:o=!1}=e;return m()?{capture:t,passive:n,once:o}:t}const N=["click","input","change","submit","scroll","resize","mouseenter","mouseleave","mousemove","mousedown","mouseup","keydown","keyup","focus","blur","touchstart","touchmove","touchend"];function V(e){for(const t of N)if(e[t])return t;return null}function U(e){const t=e.tagName.toLowerCase();return"input"===t||"textarea"===t?"input":"click"}function B(e){return"string"==typeof e}function F(e){return"function"==typeof e}function j(e){return"object"==typeof e&&null!==e}function W(e){return Array.isArray(e)}function q(e,t=300,n={}){let o=null,r=null,l=null;const{leading:i=!1,trailing:s=!0}=n,a=()=>{r&&(e.apply(l,r),r=null,l=null)},u=function(...e){r=e,l=this,o&&clearTimeout(o),i&&!o&&a(),o=setTimeout(()=>{s&&a(),o=null},t)};return u.cancel=()=>{o&&(clearTimeout(o),o=null),r=null,l=null},u.flush=()=>{o&&(clearTimeout(o),a(),o=null)},u}function Z(e,t=300,n={}){let o=null,r=null,l=null,i=0;const{leading:s=!0,trailing:a=!0}=n,u=()=>{r&&(e.apply(l,r),r=null,l=null)},c=function(...e){const n=Date.now();i||s||(i=n);const c=t-(n-i);r=e,l=this,c<=0||c>t?(o&&(clearTimeout(o),o=null),i=n,u()):!o&&a&&(o=setTimeout(()=>{i=s?Date.now():0,o=null,u()},c))};return c.cancel=()=>{o&&(clearTimeout(o),o=null),i=0,r=null,l=null},c}function K(e){if(!e)return null;if(e.endsWith("ms"))return parseInt(e,10);if(e.endsWith("s"))return 1e3*parseFloat(e);const t=parseInt(e,10);return isNaN(t)?null:t}const G="clickDelay";function J(e,t){t.feedback&&t.pendingClass&&e.classList.remove(t.pendingClass)}function Q(e,t){return n=>{const o=P(e,G);if(!o||o.isPending)return n.preventDefault(),void n.stopPropagation();o.isPending=!0,t.feedback&&t.pendingClass&&e.classList.add(t.pendingClass),t.handler(n),o.timeoutId=setTimeout(()=>{o.isPending=!1,o.timeoutId=null,J(e,t)},t.delay)}}function ee(e,t){var n,o,r,l;const i=K(t.arg)||300;if("function"==typeof e)return{handler:e,delay:i,disabled:!1,pendingClass:"v-click-delay--pending",feedback:!0};if(!e)throw new Error("[Directix] v-click-delay: handler is required");return{handler:e.handler,delay:null!=(n=e.delay)?n:i,disabled:null!=(o=e.disabled)&&o,pendingClass:null!=(r=e.pendingClass)?r:"v-click-delay--pending",feedback:null==(l=e.feedback)||l}}const te=w({name:"click-delay",ssr:!0,defaults:{delay:300,disabled:!1,pendingClass:"v-click-delay--pending",feedback:!0},mounted(e,t){const n=ee(t.value,t);if(n.disabled)return;const o={options:n,handler:Q(e,n),isPending:!1,timeoutId:null};M(e,G,o),e.addEventListener("click",o.handler),e.addEventListener("touchend",o.handler)},updated(e,t){const n=P(e,G);if(!n){const n=ee(t.value,t);if(!n.disabled){const t={options:n,handler:Q(e,n),isPending:!1,timeoutId:null};M(e,G,t),e.addEventListener("click",t.handler),e.addEventListener("touchend",t.handler)}return}const o=ee(t.value,t);o.disabled&&!n.options.disabled?(e.removeEventListener("click",n.handler),e.removeEventListener("touchend",n.handler),n.timeoutId&&clearTimeout(n.timeoutId),J(e,n.options),O(e,G)):!o.disabled&&n.options.disabled&&(n.handler=Q(e,o),n.isPending=!1,n.timeoutId=null,e.addEventListener("click",n.handler),e.addEventListener("touchend",n.handler)),n.options=o},unmounted(e){const t=P(e,G);t&&(e.removeEventListener("click",t.handler),e.removeEventListener("touchend",t.handler),t.timeoutId&&clearTimeout(t.timeoutId),J(e,t.options),O(e,G))}}),ne=w({name:"click-outside",ssr:!1,defaults:{capture:!0,events:["click"],disabled:!1,stop:!1,prevent:!1},mounted(e,t){const n=oe(t.value);if(n.disabled)return;const o={options:n,handlers:new Map};e.__clickOutside=o;n.events.forEach(t=>{const r=t=>{re(e,t,n)&&(n.stop&&t.stopPropagation(),n.prevent&&t.preventDefault(),n.handler(t))};o.handlers.set(t,r);const l={capture:n.capture,passive:!n.prevent};Y(document,t,r,l)})},updated(e,t){const n=e.__clickOutside;if(!n)return;const o=n.options,r=oe(t.value);if(o.disabled!==r.disabled)if(r.disabled)n.handlers.forEach((e,t)=>{$(document,t,e,{capture:o.capture})}),n.handlers.clear();else{const t=t=>t=>{re(e,t,r)&&(r.stop&&t.stopPropagation(),r.prevent&&t.preventDefault(),r.handler(t))};r.events.forEach(e=>{const o=t();n.handlers.set(e,o),Y(document,e,o,{capture:r.capture,passive:!r.prevent})})}n.options=r},unmounted(e){const t=e.__clickOutside;t&&(t.handlers.forEach((e,n)=>{$(document,n,e,{capture:t.options.capture})}),delete e.__clickOutside)}});function oe(e){var t,n,o,r,l;if("function"==typeof e)return{handler:e,capture:!0,events:["click"],disabled:!1,stop:!1,prevent:!1};if(!e)throw new Error("[Directix] v-click-outside: handler is required");return __spreadValues({capture:null==(t=e.capture)||t,events:null!=(n=e.events)?n:["click"],disabled:null!=(o=e.disabled)&&o,stop:null!=(r=e.stop)&&r,prevent:null!=(l=e.prevent)&&l},e)}function re(e,t,n){var o;const r=t.target;if(e.contains(r))return!1;if(null==(o=n.exclude)?void 0:o.length)for(const e of n.exclude){const t="function"==typeof e?e():z(e);if(t&&(t===r||t.contains(r)))return!1}return!0}function le(e){return __async(this,null,function*(){if(b())try{return yield navigator.clipboard.writeText(e),!0}catch(e){console.warn("[Directix] Clipboard API failed, falling back to execCommand")}return function(e){const t=document.createElement("textarea");t.value=e,t.style.cssText="\n position: fixed;\n top: -9999px;\n left: -9999px;\n opacity: 0;\n pointer-events: none;\n ",document.body.appendChild(t);try{return t.select(),t.setSelectionRange(0,t.value.length),document.execCommand("copy")}catch(e){return!1}finally{document.body.removeChild(t)}}(e)})}const ie=w({name:"copy",ssr:!1,mounted(e,t){const n=se(t.value);if(n.disabled)return;n.title&&e.setAttribute("title",n.title);const o={handler:null,options:n};o.handler=()=>__async(null,null,function*(){var t,n,r,l;const i=o.options.value;if(i)try{if(!(yield le(i)))throw new Error("Copy failed");null==(n=(t=o.options).onSuccess)||n.call(t,i),e.dispatchEvent(new CustomEvent("copy:success",{detail:{text:i}}))}catch(t){const n=t;null==(l=(r=o.options).onError)||l.call(r,n),e.dispatchEvent(new CustomEvent("copy:error",{detail:{error:n}}))}else console.warn("[Directix] v-copy: No text to copy")}),e.addEventListener("click",o.handler),e.__copy=o},updated(e,t){const n=e.__copy;n&&(n.options=se(t.value),n.options.title&&e.setAttribute("title",n.options.title))},unmounted(e){const t=e.__copy;t&&(e.removeEventListener("click",t.handler),delete e.__copy)}});function se(e){return"string"==typeof e?{value:e}:e}function ae(e){return e instanceof Date?e.getTime():"number"==typeof e?e:new Date(e).getTime()}function ue(e){const t=Math.max(0,e);return{days:Math.floor(t/864e5),hours:Math.floor(t%864e5/36e5),minutes:Math.floor(t%36e5/6e4),seconds:Math.floor(t%6e4/1e3),milliseconds:t%1e3,total:t}}function ce(e){var t,n,o,r;return"object"==typeof e&&null!==e&&"target"in e?{target:e.target,format:null!=(t=e.format)?t:"hh:mm:ss",onComplete:e.onComplete,onTick:e.onTick,interval:null!=(n=e.interval)?n:1e3,showMilliseconds:null!=(o=e.showMilliseconds)&&o,autoStart:null==(r=e.autoStart)||r,labels:e.labels}:{target:e,format:"hh:mm:ss",interval:1e3,showMilliseconds:!1,autoStart:!0}}const de=w({name:"countdown",ssr:!0,mounted(e,t){const n=ce(t.value),o={options:n,targetTime:ae(n.target),intervalId:null,paused:!1,remaining:0};e.__countdown=o,!1!==n.autoStart?pe(e,o):ve(e,o)},updated(e,t){const n=e.__countdown,o=ce(t.value),r=ae(o.target);r!==n.targetTime?(n.targetTime=r,n.options=o,n.intervalId&&(clearInterval(n.intervalId),n.intervalId=null),n.paused||pe(e,n)):n.options=o},unmounted(e){const t=e.__countdown;(null==t?void 0:t.intervalId)&&clearInterval(t.intervalId),delete e.__countdown}});function pe(e,t){const n=()=>{const n=Date.now();if(t.remaining=t.targetTime-n,t.remaining<=0)return t.remaining=0,ve(e,t),function(e){e.intervalId&&(clearInterval(e.intervalId),e.intervalId=null)}(t),t.options.onComplete&&t.options.onComplete(),void e.dispatchEvent(new CustomEvent("countdown:complete"));if(ve(e,t),t.options.onTick){const e=ue(t.remaining);t.options.onTick(e)}};n(),t.intervalId=setInterval(n,t.options.interval||1e3)}function ve(e,t){const n=function(e,t){if("function"==typeof t)return t(e);const n=(e,t=2)=>String(e).padStart(t,"0");return t.replace(/dd/gi,n(e.days)).replace(/hh/gi,n(e.hours)).replace(/mm/gi,n(e.minutes)).replace(/ss/gi,n(e.seconds)).replace(/S{3}/gi,n(e.milliseconds,3)).replace(/SS/gi,n(Math.floor(e.milliseconds/10))).replace(/S/gi,String(Math.floor(e.milliseconds/100)))}(ue(t.remaining),t.options.format||"hh:mm:ss");e.textContent=n}function fe(e,t){const n=K(t.arg)||300;return"function"==typeof e?{handler:e,wait:n}:__spreadProps(__spreadValues({},e),{wait:e.wait||n})}const me=w({name:"debounce",ssr:!0,defaults:{wait:300,leading:!1,trailing:!0},mounted(e,t){const n=fe(t.value,t),o=V(t.modifiers)||U(e),r=q(n.handler,n.wait,{leading:n.leading,trailing:n.trailing});e.addEventListener(o,r),e.__debounce={debouncedFn:r,eventType:o,options:n}},updated(e,t){const n=e.__debounce;if(!n)return;const o=fe(t.value,t);if(o.wait!==n.options.wait||o.leading!==n.options.leading||o.trailing!==n.options.trailing){n.debouncedFn.cancel();const t=q(o.handler,o.wait,{leading:o.leading,trailing:o.trailing});e.removeEventListener(n.eventType,n.debouncedFn),e.addEventListener(n.eventType,t),e.__debounce={debouncedFn:t,eventType:n.eventType,options:o}}else o.handler!==n.options.handler&&(n.options.handler=o.handler)},unmounted(e){const t=e.__debounce;t&&(t.debouncedFn.cancel(),e.removeEventListener(t.eventType,t.debouncedFn),delete e.__debounce)}});function he(e){if(e.type.startsWith("touch")){const t=e.touches[0];return{clientX:t.clientX,clientY:t.clientY}}const t=e;return{clientX:t.clientX,clientY:t.clientY}}function ge(e){const t=e.match(/translate\(([-\d.]+)px,\s*([-\d.]+)px\)/);return t?{x:parseFloat(t[1]),y:parseFloat(t[2])}:{x:0,y:0}}function be(e){var t,n,o;return void 0===e||!0===e?{axis:"both",constrain:!1,disabled:!1}:!1===e?{axis:"both",constrain:!1,disabled:!0}:{axis:null!=(t=e.axis)?t:"both",constrain:null!=(n=e.constrain)&&n,boundary:e.boundary,handle:e.handle,disabled:null!=(o=e.disabled)&&o,grid:e.grid,onStart:e.onStart,onDrag:e.onDrag,onEnd:e.onEnd}}const ye=w({name:"draggable",ssr:!1,mounted(e,t){const n=be(t.value);if(n.disabled)return;"static"===getComputedStyle(e).position&&(e.style.position="absolute");const o={options:n,isDragging:!1,startX:0,startY:0,offsetX:0,offsetY:0,initialLeft:0,initialTop:0,boundaryWidth:0,boundaryHeight:0,elWidth:0,elHeight:0,handleEl:n.handle?e.querySelector(n.handle):null,moveHandler:null,endHandler:null};e.__draggable=o;const r=o.handleEl||e;function l(t){var n,r,l;if(o.options.disabled)return;"touchstart"===t.type&&t.preventDefault();const{clientX:i,clientY:s}=he(t);o.isDragging=!0,o.startX=i,o.startY=s;const{x:a,y:u}=ge(e.style.transform);if(o.offsetX=a,o.offsetY=u,o.options.constrain||o.options.boundary){const t=o.options.boundary?function(e,t){var n,o;if(!t)return null;if("function"==typeof t){const e=t();return null!=(n=null==e?void 0:e.getBoundingClientRect())?n:null}if("string"==typeof t){const e=document.querySelector(t);return null!=(o=null==e?void 0:e.getBoundingClientRect())?o:null}return t.getBoundingClientRect()}(0,o.options.boundary):null==(n=e.parentElement)?void 0:n.getBoundingClientRect();if(t){const n=e.getBoundingClientRect();o.initialLeft=n.left-t.left,o.initialTop=n.top-t.top,o.boundaryWidth=t.width,o.boundaryHeight=t.height,o.elWidth=n.width,o.elHeight=n.height}}e.classList.add("v-draggable--dragging"),o.moveHandler=t=>{var n,r;if(!o.isDragging)return;const{clientX:l,clientY:i}=he(t);let s=l-o.startX,a=i-o.startY;"x"===o.options.axis?a=0:"y"===o.options.axis&&(s=0),o.options.grid&&(s=Math.round(s/o.options.grid[0])*o.options.grid[0],a=Math.round(a/o.options.grid[1])*o.options.grid[1]);let u=o.offsetX+s,c=o.offsetY+a;if(o.options.constrain||o.options.boundary){const e=o.initialLeft+s,t=o.initialTop+a,n=o.boundaryWidth-o.elWidth,r=o.boundaryHeight-o.elHeight,l=Math.max(0,Math.min(e,n)),i=Math.max(0,Math.min(t,r));u=o.offsetX+(l-o.initialLeft),c=o.offsetY+(i-o.initialTop)}e.style.transform=`translate(${u}px, ${c}px)`,null==(r=(n=o.options).onDrag)||r.call(n,{x:u,y:c},t)},o.endHandler=()=>{var t,n;if(!o.isDragging)return;o.isDragging=!1,e.classList.remove("v-draggable--dragging"),o.moveHandler&&(document.removeEventListener("mousemove",o.moveHandler),document.removeEventListener("touchmove",o.moveHandler)),o.endHandler&&(document.removeEventListener("mouseup",o.endHandler),document.removeEventListener("touchend",o.endHandler));const{x:r,y:l}=ge(e.style.transform);null==(n=(t=o.options).onEnd)||n.call(t,{x:r,y:l},new MouseEvent("mouseup"))},document.addEventListener("mousemove",o.moveHandler),document.addEventListener("touchmove",o.moveHandler,{passive:!1}),document.addEventListener("mouseup",o.endHandler),document.addEventListener("touchend",o.endHandler),null==(l=(r=o.options).onStart)||l.call(r,{x:o.offsetX,y:o.offsetY},t)}r.addEventListener("mousedown",l),r.addEventListener("touchstart",l,{passive:!1})},updated(e,t){const n=e.__draggable;n&&(n.options=be(t.value),n.options.handle&&(n.handleEl=e.querySelector(n.options.handle)))},unmounted(e){const t=e.__draggable;t&&(t.moveHandler&&(document.removeEventListener("mousemove",t.moveHandler),document.removeEventListener("touchmove",t.moveHandler)),t.endHandler&&(document.removeEventListener("mouseup",t.endHandler),document.removeEventListener("touchend",t.endHandler)),delete e.__draggable)}}),we=w({name:"ellipsis",ssr:!0,defaults:{lines:1,ellipsis:"...",expandable:!1,titleBehavior:"auto"},mounted(e,t){const n=Ee(t.value);_e(e,n);const o={options:n,originalText:e.textContent||"",clickHandler:null,expanded:!1};if(n.expandable){const t=()=>{o.expanded?(_e(e,n),o.expanded=!1):(e.textContent=o.originalText,e.style.webkitLineClamp="",e.style.display="",e.style.overflow="",e.style.cursor="",o.expanded=!0)};e.addEventListener("click",t),e.style.cursor="pointer",o.clickHandler=t}("always"===n.titleBehavior||"auto"===n.titleBehavior&&xe(e))&&(e.title=o.originalText),e.__ellipsis=o},updated(e,t){const n=e.__ellipsis;if(!n){const n=Ee(t.value);return void _e(e,n)}const o=Ee(t.value);if(e.textContent!==n.originalText&&(n.originalText=e.textContent||"",n.expanded=!1),n.options.expandable!==o.expandable)if(n.clickHandler&&(e.removeEventListener("click",n.clickHandler),n.clickHandler=null),o.expandable){const t=()=>{n.expanded?(_e(e,o),n.expanded=!1):(e.textContent=n.originalText,e.style.webkitLineClamp="",e.style.display="",e.style.overflow="",n.expanded=!0)};e.addEventListener("click",t),e.style.cursor="pointer",n.clickHandler=t}else e.style.cursor="";n.options=o,n.expanded||_e(e,o),"always"===o.titleBehavior?e.title=n.originalText:"auto"===o.titleBehavior?e.title=xe(e)?n.originalText:"":e.removeAttribute("title")},unmounted(e){const t=e.__ellipsis;t&&(t.clickHandler&&e.removeEventListener("click",t.clickHandler),e.style.removeProperty("-webkit-line-clamp"),e.style.removeProperty("-webkit-box-orient"),e.style.removeProperty("display"),e.style.removeProperty("overflow"),e.style.removeProperty("text-overflow"),e.style.removeProperty("white-space"),e.style.removeProperty("cursor"),delete e.__ellipsis)}});function _e(e,t){const n=t.lines||1;1===n?(e.style.overflow="hidden",e.style.textOverflow="ellipsis",e.style.whiteSpace="nowrap"):(e.style.display="-webkit-box",e.style.overflow="hidden",e.style.webkitBoxOrient="vertical",e.style.webkitLineClamp=String(n))}function xe(e){return e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight}function Ee(e){var t,n,o,r;return"number"==typeof e?{lines:e,ellipsis:"...",expandable:!1,titleBehavior:"auto"}:{lines:null!=(t=null==e?void 0:e.lines)?t:1,ellipsis:null!=(n=null==e?void 0:e.ellipsis)?n:"...",expandable:null!=(o=null==e?void 0:e.expandable)&&o,titleBehavior:null!=(r=null==e?void 0:e.titleBehavior)?r:"auto"}}const Te=new Set(["input","textarea","select","button"]);const Le=w({name:"focus",ssr:!0,defaults:{focus:!0,refocus:!1},mounted(e,t){if(!v())return;const n=ke(t.value);if(!n.focus||!function(e){if(!v())return!1;const t=e.tagName.toLowerCase();if(Te.has(t))return!e.disabled;if(e.isContentEditable)return!0;const n=e.getAttribute("tabindex");if(null!=n)return"-1"!==n;if("a"===t||"area"===t)return e.hasAttribute("href");return!1}(e))return void(n.focus&&console.warn("[Directix] v-focus: Element is not focusable"));const o=()=>{var t;return null==(t=n.onFocus)?void 0:t.call(n,e)},r=()=>{var t;return null==(t=n.onBlur)?void 0:t.call(n,e)};e.addEventListener("focus",o),e.addEventListener("blur",r),e.__focus={options:n,handleFocus:o,handleBlur:r,lastValue:t.value},e.focus()},updated(e,t){const n=e.__focus;if(!n)return;const o=ke(t.value);o.onFocus!==n.options.onFocus&&(e.removeEventListener("focus",n.handleFocus),n.handleFocus=()=>{var t;return null==(t=o.onFocus)?void 0:t.call(o,e)},e.addEventListener("focus",n.handleFocus)),o.onBlur!==n.options.onBlur&&(e.removeEventListener("blur",n.handleBlur),n.handleBlur=()=>{var t;return null==(t=o.onBlur)?void 0:t.call(o,e)},e.addEventListener("blur",n.handleBlur));const r=!function(e,t){if(e===t)return!0;if("object"!=typeof e||"object"!=typeof t||null===e||null===t)return!1;const n=e,o=t,r=Object.keys(n),l=Object.keys(o);return r.length===l.length&&r.every(e=>n[e]===o[e])}(t.value,n.lastValue);o.refocus&&o.focus&&r&&e.focus(),n.options=o,n.lastValue=t.value},unmounted(e){const t=e.__focus;t&&(e.removeEventListener("focus",t.handleFocus),e.removeEventListener("blur",t.handleBlur),delete e.__focus)}});function ke(e){return"boolean"==typeof e?{focus:e,refocus:!1}:__spreadValues({focus:!0,refocus:!1},e)}const Ce={esc:"escape",space:" ",up:"arrowup",down:"arrowdown",left:"arrowleft",right:"arrowright",enter:"enter",tab:"tab",delete:"delete",backspace:"backspace",insert:"insert",home:"home",end:"end",pagedown:"pagedown",pageup:"pageup",f1:"f1",f2:"f2",f3:"f3",f4:"f4",f5:"f5",f6:"f6",f7:"f7",f8:"f8",f9:"f9",f10:"f10",f11:"f11",f12:"f12"},Se=new Set(["ctrl","alt","shift","meta"]);function De(e){const t=e.toLowerCase();return Ce[t]||t}function Ie(e){const t=e.toLowerCase().split(/[+.]/),n=[];let o="";for(const e of t)Se.has(e)?n.push(e):o=De(e);return{key:o,modifiers:n}}function Me(e,t){if(De(e.key)!==t.key)return!1;const n=new Set;if(e.ctrlKey&&n.add("ctrl"),e.altKey&&n.add("alt"),e.shiftKey&&n.add("shift"),e.metaKey&&n.add("meta"),n.size!==t.modifiers.size)return!1;for(const e of t.modifiers)if(!n.has(e))return!1;return!0}function Pe(e,t,n,o={}){var r,l,i;return{key:De(e),modifiers:new Set(t),handler:n,prevent:null==(r=o.prevent)||r,stop:null==(l=o.stop)||l,disabled:null!=(i=o.disabled)&&i}}function Oe(e,t,n){if(t){const o=t.toLowerCase();let r;const l=[];if(Se.has(o)){l.push(o);for(const e of Object.keys(n)){const t=e.toLowerCase();Se.has(t)?l.push(t):r=De(e)}}else{const e=Ie(t);r=e.key,l.push(...e.modifiers);for(const e of Object.keys(n)){const t=e.toLowerCase();Se.has(t)&&l.push(t)}}return[Pe(r,l,"function"==typeof e?e:e.handler)]}if("function"==typeof e)return console.warn('[Directix] v-hotkey: hotkey definition required (use v-hotkey:ctrl.s="handler")'),[];if(Array.isArray(e))return e.map(e=>Pe(e.key,e.modifiers||[],e.handler,{prevent:e.prevent,stop:e.stop,disabled:e.disabled}));if("object"==typeof e&&null!==e){if("handler"in e&&"function"==typeof e.handler){const t=e;return[Pe(t.key,t.modifiers||[],t.handler,t)]}const t=[];for(const[n,o]of Object.entries(e)){const{key:e,modifiers:r}=Ie(n),l="function"==typeof o?o:o.handler,i="object"==typeof o?o:{};t.push(Pe(e,r,l,i))}return t}return[]}function ze(e,t){if(0===t.length)return null;const n={entries:t,handler:null};return n.handler=function(e){return t=>{for(const n of e.entries)if(!n.disabled&&Me(t,n))return n.prevent&&t.preventDefault(),n.stop&&t.stopPropagation(),void n.handler(t)}}(n),e.tabIndex=e.tabIndex||-1,e.addEventListener("keydown",n.handler),e.__hotkey=n,n}const He=w({name:"hotkey",ssr:!0,mounted(e,t){ze(e,Oe(t.value,t.arg,t.modifiers))},updated(e,t){const n=e.__hotkey,o=Oe(t.value,t.arg,t.modifiers);n?n.entries=o:ze(e,o)},unmounted(e){const t=e.__hotkey;t&&(e.removeEventListener("keydown",t.handler),delete e.__hotkey)}});const Ye="hover";function $e(e){return"function"==typeof e?{handler:e,class:"v-hover"}:__spreadValues({class:"v-hover",disabled:!1,enterDelay:0,leaveDelay:0},e)}function Ae(e,t,n){var o,r;const{options:l}=t;l.class&&e.classList.add(l.class),e.dispatchEvent(new CustomEvent("hover:enter",{detail:{event:n}})),null==(o=l.onEnter)||o.call(l,n),null==(r=l.handler)||r.call(l,!0,n)}function Xe(e,t,n){var o,r;const{options:l}=t;l.class&&e.classList.remove(l.class),e.dispatchEvent(new CustomEvent("hover:leave",{detail:{event:n}})),null==(o=l.onLeave)||o.call(l,n),null==(r=l.handler)||r.call(l,!1,n)}const Re=w({name:"hover",ssr:!1,defaults:{class:"v-hover",disabled:!1,enterDelay:0,leaveDelay:0},mounted(e,t){const n=$e(t.value);if(n.disabled||!v())return;const o=function(){const e=new Set,t=new Set;return{setTimeout(t,n){const o=setTimeout(()=>{e.delete(o),t()},n);return e.add(o),o},clearTimeout(t){clearTimeout(t),e.delete(t)},setInterval(e,n){const o=setInterval(e,n);return t.add(o),o},clearInterval(e){clearInterval(e),t.delete(e)},clearAll(){e.forEach(e=>clearTimeout(e)),t.forEach(e=>clearInterval(e)),e.clear(),t.clear()},hasActive:()=>e.size>0||t.size>0}}();let r=!1;const l={options:n,isHovering:!1,timer:o,cleanup:null};l.cleanup=function(e,t,n=!1){return Object.entries(t).forEach(([t,o])=>{e.addEventListener(t,o,"boolean"==typeof n?n:R(n))}),()=>{Object.entries(t).forEach(([t,o])=>{e.removeEventListener(t,o,"boolean"==typeof n?n:R(n))})}}(e,{mouseenter:t=>{const i=t;o.clearAll(),r||(n.enterDelay&&n.enterDelay>0?o.setTimeout(()=>{r=!0,l.isHovering=!0,Ae(e,l,i)},n.enterDelay):(r=!0,l.isHovering=!0,Ae(e,l,i)))},mouseleave:t=>{const i=t;o.clearAll(),r&&(n.leaveDelay&&n.leaveDelay>0?o.setTimeout(()=>{r=!1,l.isHovering=!1,Xe(e,l,i)},n.leaveDelay):(r=!1,l.isHovering=!1,Xe(e,l,i)))}}),M(e,Ye,l)},updated(e,t){const n=P(e,Ye);if(!n)return;const o=$e(t.value);o.disabled&&!n.options.disabled?e.classList.remove(n.options.class||"v-hover"):!o.disabled&&n.options.disabled,n.options=o},unmounted(e){var t;const n=P(e,Ye);n&&(n.timer.clearAll(),null==(t=n.cleanup)||t.call(n),e.classList.remove(n.options.class||"v-hover"),O(e,Ye))}}),Ne={minScale:.5,maxScale:5,doubleTapZoom:2.5,tapTimeout:300,animationDuration:300,hintDuration:3e3,zoomIndicatorDuration:1500};let Ve=9999;function Ue(e,t,n,o){return Math.sqrt(__pow(n-e,2)+__pow(o-t,2))}function Be(e,t,n){return Math.max(t,Math.min(n,e))}function Fe(e,t){var n,o,r,l,i,s,a,u,c,d;const p="IMG"===t.tagName?t.src:void 0,v=t.getAttribute("data-preview")||void 0,f="IMG"===t.tagName?t.alt:t.getAttribute("alt")||void 0;return"string"==typeof e?{src:e,previewSrc:v,alt:f,enablePinchZoom:!0,enableDoubleTap:!0,enableSwipeClose:!0,showZoomIndicator:!0,showCloseButton:!0,closeOnClickOutside:!0,closeOnEsc:!0,minScale:Ne.minScale,maxScale:Ne.maxScale}:{src:(null==e?void 0:e.src)||p,previewSrc:(null==e?void 0:e.previewSrc)||v,alt:(null==e?void 0:e.alt)||f,disabled:null!=(n=null==e?void 0:e.disabled)&&n,closeOnClickOutside:null==(o=null==e?void 0:e.closeOnClickOutside)||o,closeOnEsc:null==(r=null==e?void 0:e.closeOnEsc)||r,showCloseButton:null==(l=null==e?void 0:e.showCloseButton)||l,zIndex:null==e?void 0:e.zIndex,class:null==e?void 0:e.class,enablePinchZoom:null==(i=null==e?void 0:e.enablePinchZoom)||i,enableDoubleTap:null==(s=null==e?void 0:e.enableDoubleTap)||s,enableSwipeClose:null==(a=null==e?void 0:e.enableSwipeClose)||a,showZoomIndicator:null==(u=null==e?void 0:e.showZoomIndicator)||u,minScale:null!=(c=null==e?void 0:e.minScale)?c:Ne.minScale,maxScale:null!=(d=null==e?void 0:e.maxScale)?d:Ne.maxScale,onOpen:null==e?void 0:e.onOpen,onClose:null==e?void 0:e.onClose}}const je=w({name:"image-preview",ssr:!1,mounted(e,t){const n=Fe(t.value,e),o={options:n,overlay:null,imageContainer:null,image:null,isOpen:!1,transform:{scale:1,translateX:0,translateY:0},gesture:{isDragging:!1,startX:0,startY:0,startDistance:0,startScale:1,lastTapTime:0,swipeStartY:0},handlers:{click:()=>{},esc:null,touchStart:null,touchMove:null,touchEnd:null,mouseDown:null,mouseMove:null,mouseUp:null,wheel:null}};if(e.__imagePreview=o,n.disabled)return;e.style.cursor="zoom-in";const r=function(e){const t=(t=!1)=>{var n;if(!e.imageContainer)return;const{scale:o,translateX:r,translateY:l}=e.transform;e.imageContainer.style.transition=t?"transform 0.2s ease-out":"none",e.imageContainer.style.transform=`translate(${r}px, ${l}px) scale(${o})`;const i=null==(n=e.overlay)?void 0:n.querySelector(".v-image-preview-zoom");i&&(i.textContent=`${Math.round(100*o)}%`,i.style.opacity="1",clearTimeout(i._hideTimer),i._hideTimer=setTimeout(()=>{i.style.opacity="0"},Ne.zoomIndicatorDuration))};return{updateTransform:t,resetTransform:()=>{e.transform={scale:1,translateX:0,translateY:0},t(!0)},constrainScale:t=>{const{minScale:n=Ne.minScale,maxScale:o=Ne.maxScale}=e.options;return Be(t,n,o)},constrainTranslate:(t,n)=>{const{scale:o}=e.transform;if(!e.image||o<=1)return{x:0,y:0};const r=e.image.getBoundingClientRect(),l=r.width*(o-1)/2,i=r.height*(o-1)/2;return{x:Be(t,-l,l),y:Be(n,-i,i)}}}}(o),l=()=>{o.isOpen&&o.overlay&&(o.overlay.style.opacity="0",setTimeout(()=>{var e,t;if(!o.overlay)return;o.overlay.remove(),o.overlay=null,o.imageContainer=null,o.image=null,o.isOpen=!1,o.transform={scale:1,translateX:0,translateY:0},document.body.style.overflow="";const{handlers:n}=o;n.esc&&document.removeEventListener("keydown",n.esc),n.touchStart&&document.removeEventListener("touchstart",n.touchStart),n.touchMove&&document.removeEventListener("touchmove",n.touchMove),n.touchEnd&&document.removeEventListener("touchend",n.touchEnd),n.mouseDown&&document.removeEventListener("mousedown",n.mouseDown),n.mouseMove&&document.removeEventListener("mousemove",n.mouseMove),n.mouseUp&&document.removeEventListener("mouseup",n.mouseUp),n.wheel&&document.removeEventListener("wheel",n.wheel),null==(t=(e=o.options).onClose)||t.call(e)},Ne.animationDuration))},i=function(e,t,n){const{updateTransform:o,resetTransform:r,constrainScale:l,constrainTranslate:i}=t;return{handleTouchStart:t=>{if(!e.imageContainer)return;const n=Date.now(),{gesture:r,transform:i,options:s}=e;if(1===t.touches.length){if(!1!==s.enableDoubleTap&&n-r.lastTapTime<Ne.tapTimeout)return t.preventDefault(),i.scale=i.scale>1?1:l(Ne.doubleTapZoom),r.lastTapTime=0,void o(!0);r.lastTapTime=n,r.isDragging=!0,r.startX=t.touches[0].clientX-i.translateX,r.startY=t.touches[0].clientY-i.translateY,r.swipeStartY=t.touches[0].clientY}else 2===t.touches.length&&!1!==s.enablePinchZoom&&(r.isDragging=!1,r.startDistance=Ue(t.touches[0].clientX,t.touches[0].clientY,t.touches[1].clientX,t.touches[1].clientY),r.startScale=i.scale)},handleTouchMove:t=>{if(!e.imageContainer)return;t.preventDefault();const{gesture:n,transform:r,options:s}=e;if(1===t.touches.length&&n.isDragging){const e=t.touches[0].clientX-n.startX,l=t.touches[0].clientY-n.startY,s=i(e,l);r.translateX=s.x,r.translateY=s.y,o(!1)}else if(2===t.touches.length&&!1!==s.enablePinchZoom){const e=Ue(t.touches[0].clientX,t.touches[0].clientY,t.touches[1].clientX,t.touches[1].clientY);r.scale=l(n.startScale*(e/n.startDistance)),o(!1)}},handleTouchEnd:t=>{const{gesture:o,transform:l,options:i}=e;o.isDragging=!1,!1!==i.enableSwipeClose&&1===t.changedTouches.length&&l.scale<=1&&t.changedTouches[0].clientY-o.swipeStartY<-100?n():l.scale<1&&r()},handleMouseDown:t=>{e.imageContainer&&(e.gesture.isDragging=!0,e.gesture.startX=t.clientX-e.transform.translateX,e.gesture.startY=t.clientY-e.transform.translateY,e.imageContainer.style.cursor="grabbing")},handleMouseMove:t=>{if(!e.gesture.isDragging||!e.imageContainer)return;const n=t.clientX-e.gesture.startX,r=t.clientY-e.gesture.startY,l=i(n,r);e.transform.translateX=l.x,e.transform.translateY=l.y,o(!1)},handleMouseUp:()=>{e.gesture.isDragging=!1,e.imageContainer&&(e.imageContainer.style.cursor="grab")},handleWheel:t=>{if(!e.imageContainer||!1===e.options.enablePinchZoom)return;t.preventDefault();const n=t.deltaY>0?.9:1.1;e.transform.scale=l(e.transform.scale*n),o(!1),e.transform.scale<.8&&setTimeout(r,100)}}}(o,r,l),s=()=>{var e,t,n;if(o.isOpen||o.options.disabled)return;const{overlay:s,imageContainer:a,image:u}=function(e){var t;const n=null!=(t=e.zIndex)?t:++Ve,o=document.createElement("div");o.className="v-image-preview-overlay",e.class&&o.classList.add(e.class),Object.assign(o.style,{position:"fixed",inset:"0",background:"rgba(0, 0, 0, 0.95)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:String(n),cursor:"zoom-out",opacity:"0",transition:"opacity 0.3s",touchAction:"none",overflow:"hidden"});const r=document.createElement("div");Object.assign(r.style,{position:"relative",transformOrigin:"center center",transition:"transform 0.1s ease-out",willChange:"transform"});const l=document.createElement("img");if(l.src=e.previewSrc||e.src||"",l.alt=e.alt||"",Object.assign(l.style,{maxWidth:"95vw",maxHeight:"90vh",objectFit:"contain",cursor:"grab",userSelect:"none",WebkitUserDrag:"none"}),l.addEventListener("dragstart",e=>e.preventDefault()),r.appendChild(l),!1!==e.showCloseButton){const e=document.createElement("button");e.className="v-image-preview-close",e.innerHTML="×",e.setAttribute("aria-label","Close preview"),Object.assign(e.style,{position:"fixed",top:"16px",right:"16px",width:"44px",height:"44px",border:"none",background:"rgba(255, 255, 255, 0.15)",color:"white",fontSize:"28px",cursor:"pointer",borderRadius:"50%",transition:"background 0.2s, transform 0.2s",zIndex:String(n+1),display:"flex",alignItems:"center",justifyContent:"center",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)"});const t=(t,n)=>{e.style.background=t,e.style.transform=n};e.addEventListener("mouseenter",()=>t("rgba(255, 255, 255, 0.25)","scale(1.1)")),e.addEventListener("mouseleave",()=>t("rgba(255, 255, 255, 0.15)","scale(1)")),e.addEventListener("touchstart",()=>t("rgba(255, 255, 255, 0.35)","scale(1.15)"),{passive:!0}),e.addEventListener("touchend",()=>t("rgba(255, 255, 255, 0.15)","scale(1)"),{passive:!0}),o.appendChild(e)}if(!1!==e.showZoomIndicator){const e=document.createElement("div");e.className="v-image-preview-zoom",e.textContent="100%",Object.assign(e.style,{position:"fixed",bottom:"24px",left:"50%",transform:"translateX(-50%)",background:"rgba(0, 0, 0, 0.6)",color:"white",padding:"8px 16px",borderRadius:"20px",fontSize:"14px",fontWeight:"500",opacity:"0",transition:"opacity 0.3s",zIndex:String(n+1),backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)"}),o.appendChild(e)}const i=document.createElement("div");return i.className="v-image-preview-hint",i.textContent="Pinch to zoom • Double tap • Swipe up to close",Object.assign(i.style,{position:"fixed",bottom:"60px",left:"50%",transform:"translateX(-50%)",color:"rgba(255, 255, 255, 0.6)",fontSize:"12px",opacity:"1",transition:"opacity 0.5s",zIndex:String(n+1),pointerEvents:"none"}),o.appendChild(i),setTimeout(()=>i.style.opacity="0",Ne.hintDuration),o.appendChild(r),{overlay:o,imageContainer:r,image:l}}(o.options);o.overlay=s,o.imageContainer=a,o.image=u,o.isOpen=!0,document.body.appendChild(s),document.body.style.overflow="hidden",requestAnimationFrame(()=>s.style.opacity="1"),o.handlers.touchStart=i.handleTouchStart,o.handlers.touchMove=i.handleTouchMove,o.handlers.touchEnd=i.handleTouchEnd,o.handlers.mouseDown=i.handleMouseDown,o.handlers.mouseMove=i.handleMouseMove,o.handlers.mouseUp=i.handleMouseUp,o.handlers.wheel=i.handleWheel,s.addEventListener("touchstart",i.handleTouchStart,{passive:!1}),s.addEventListener("touchmove",i.handleTouchMove,{passive:!1}),s.addEventListener("touchend",i.handleTouchEnd,{passive:!0}),u.addEventListener("mousedown",i.handleMouseDown),document.addEventListener("mousemove",i.handleMouseMove),document.addEventListener("mouseup",i.handleMouseUp),s.addEventListener("wheel",i.handleWheel,{passive:!1}),null==(e=s.querySelector(".v-image-preview-close"))||e.addEventListener("click",e=>{e.stopPropagation(),l()}),!1!==o.options.closeOnClickOutside&&s.addEventListener("click",()=>{o.transform.scale<=1?l():r.resetTransform()}),!1!==o.options.closeOnEsc&&(o.handlers.esc=e=>{"Escape"===e.key&&(o.transform.scale>1?r.resetTransform():l())},document.addEventListener("keydown",o.handlers.esc)),null==(n=(t=o.options).onOpen)||n.call(t)};o.handlers.click=s,e.addEventListener("click",s)},updated(e,t){const n=e.__imagePreview;n&&(n.options=Fe(t.value,e),e.style.cursor=n.options.disabled?"":"zoom-in")},unmounted(e){const t=e.__imagePreview;t&&(e.removeEventListener("click",t.handlers.click),t.isOpen&&t.overlay&&(t.overlay.remove(),document.body.style.overflow=""),t.handlers.esc&&document.removeEventListener("keydown",t.handlers.esc),t.handlers.touchStart&&document.removeEventListener("touchstart",t.handlers.touchStart),t.handlers.touchMove&&document.removeEventListener("touchmove",t.handlers.touchMove),t.handlers.touchEnd&&document.removeEventListener("touchend",t.handlers.touchEnd),t.handlers.mouseDown&&document.removeEventListener("mousedown",t.handlers.mouseDown),t.handlers.mouseMove&&document.removeEventListener("mousemove",t.handlers.mouseMove),t.handlers.mouseUp&&document.removeEventListener("mouseup",t.handlers.mouseUp),t.handlers.wheel&&document.removeEventListener("wheel",t.handlers.wheel),delete e.__imagePreview)}});function We(e){if("function"==typeof e)return{handler:e,distance:0,throttle:200,useIntersection:!0};if(!e)throw new Error("[Directix] v-infinite-scroll: handler is required");return __spreadValues({distance:0,disabled:!1,loading:!1,useIntersection:!0,throttle:200},e)}const qe=w({name:"infinite-scroll",ssr:!1,defaults:{distance:0,disabled:!1,loading:!1,useIntersection:!0,throttle:200},mounted(e,t){const n=We(t.value);if(n.disabled||!v())return;let o;if(n.container)if("string"==typeof n.container){const t=document.querySelector(n.container);o=t||H(e)}else o=n.container;else o=H(e);const r={options:n,container:o,sentinel:null,observer:null,throttleTimer:null,isLoading:!1,scrollHandler:t=>__async(null,null,function*(){if(r.isLoading||r.options.disabled||r.options.loading)return;if(r.throttleTimer)return;r.throttleTimer=setTimeout(()=>{r.throttleTimer=null},n.throttle);const t=function(e,t,n){if(e===window){const e=window.scrollY||document.documentElement.scrollTop,t=document.documentElement.scrollHeight;return e+window.innerHeight>=t-n}const o=e,r=o.scrollTop,l=o.scrollHeight,i=o.clientHeight;return r+i>=l-n}(o,0,n.distance||0);t&&(yield Ze(r,e))})};e.__infiniteScroll=r,n.useIntersection&&h()?function(e,t){const n=document.createElement("div");n.className="v-infinite-scroll__sentinel",n.style.cssText="\n height: 1px;\n width: 100%;\n clear: both;\n ",e.appendChild(n),t.sentinel=n,t.observer=new IntersectionObserver(n=>__async(null,null,function*(){for(const o of n)o.isIntersecting&&(t.isLoading||t.options.disabled||t.options.loading||(yield Ze(t,e)))}),{root:t.container===window?null:t.container,rootMargin:`${t.options.distance||0}px`,threshold:0}),t.observer.observe(n)}(e,r):Y(o,"scroll",r.scrollHandler,{passive:!0})},updated(e,t){const n=e.__infiniteScroll;n&&(n.options=We(t.value))},unmounted(e){const t=e.__infiniteScroll;t&&(t.throttleTimer&&clearTimeout(t.throttleTimer),t.observer&&t.observer.disconnect(),t.sentinel&&t.sentinel.parentNode&&t.sentinel.parentNode.removeChild(t.sentinel),$(t.container,"scroll",t.scrollHandler),delete e.__infiniteScroll)}});function Ze(e,t){return __async(this,null,function*(){var n,o,r,l,i,s;e.isLoading=!0,null==(o=(n=e.options).onLoadStart)||o.call(n),t.classList.add("v-infinite-scroll--loading");try{yield e.options.handler()}catch(t){null==(l=(r=e.options).onError)||l.call(r,t)}finally{e.isLoading=!1,null==(s=(i=e.options).onLoadEnd)||s.call(i),t.classList.remove("v-infinite-scroll--loading")}})}const Ke="__intersect";function Ge(e){const t="function"==typeof e?{handler:e}:__spreadValues({},e);return null!==t.root&&"object"==typeof t.root&&"value"in t.root&&(t.root=t.root.value),t}function Je(e,t,n){return new IntersectionObserver(function(e,t,n){return o=>{var r,l,i,s;for(const a of o){if(n.once&&t.hasTriggeredOnce)continue;const{isIntersecting:o}=a;null==(r=n.handler)||r.call(n,a,t.observer),null==(l=n.onChange)||l.call(n,o,a),o?(null==(i=n.onEnter)||i.call(n,a,t.observer),n.once&&(t.hasTriggeredOnce=!0)):null==(s=n.onLeave)||s.call(n,a,t.observer),e.dispatchEvent(new CustomEvent("intersect",{detail:{isIntersecting:o,entry:a}}))}}}(e,t,n),{root:n.root,rootMargin:n.rootMargin,threshold:n.threshold})}const Qe=w({name:"intersect",ssr:!1,defaults:{disabled:!1,once:!1,rootMargin:"0px",threshold:0},mounted(e,t){const n=Ge(t.value);if(n.disabled||!v()||!h())return void(h()||console.warn("[Directix] v-intersect: IntersectionObserver not supported"));const o={options:n,observer:null,hasTriggeredOnce:!1};o.observer=Je(e,o,n),e[Ke]=o,o.observer.observe(e)},updated(e,t){var n,o,r;const l=e[Ke];if(!l)return;const i=Ge(t.value),s=i.root!==l.options.root||i.rootMargin!==l.options.rootMargin||i.threshold!==l.options.threshold;i.disabled!==l.options.disabled&&(i.disabled?null==(n=l.observer)||n.disconnect():null==(o=l.observer)||o.observe(e)),s&&(null==(r=l.observer)||r.disconnect(),l.observer=Je(e,l,i),l.observer.observe(e)),l.options=i},unmounted(e){var t;const n=e[Ke];n&&(null==(t=n.observer)||t.disconnect(),delete e[Ke])}});let et=null;function tt(e,t){"IMG"===e.tagName?e.src=t:e.style.backgroundImage=`url("${t}")`}function nt(e,t){e.dataset.lazyState=t}function ot(e){const t=e.__lazy;if(!t||!t.options.src)return;if(t.options.filter&&!t.options.filter(t.options.src))return;nt(e,"loading"),t.attempt++,e.classList.add("v-lazy--loading");const n=new Image;n.onload=()=>{var n,o;tt(e,t.options.src),nt(e,"loaded"),e.classList.remove("v-lazy--loading"),e.classList.add("v-lazy--loaded"),null==(o=(n=t.options).onLoad)||o.call(n,e)},n.onerror=()=>{var n,o;e.classList.remove("v-lazy--loading"),t.attempt<(t.options.attempt||1)?setTimeout(()=>ot(e),1e3*t.attempt):(t.options.error&&tt(e,t.options.error),nt(e,"error"),e.classList.add("v-lazy--error"),null==(o=(n=t.options).onError)||o.call(n,e,new Error("Failed to load image")))},n.src=t.options.src}function rt(e){const t=e.__lazy;var n;if(t)if(h())if(t.options.observer)t.observer=t.options.observer,t.observer.observe(e);else{const o=(n=t.options.preload||0,et||(et=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&(ot(e.target),null==et||et.unobserve(e.target))})},{rootMargin:`${n}px`}),et));t.observer=o,o.observe(e)}else ot(e)}function lt(e){const t=e.__lazy;t&&(t.observer?t.observer.unobserve(e):et&&et.unobserve(e))}function it(e){return"string"==typeof e?{src:e}:e||{}}const st=w({name:"lazy",ssr:!1,defaults:{preload:0,attempt:1,disabled:!1},mounted(e,t){const n=it(t.value);if(n.disabled)return;if(!n.src)return void console.warn("[Directix] v-lazy: No source provided");nt(e,"pending"),n.placeholder&&tt(e,n.placeholder),e.classList.add("v-lazy");const o={options:n,attempt:0};e.__lazy=o,rt(e)},updated(e,t){const n=e.__lazy;if(!n)return;const o=it(t.value);o.disabled?lt(e):o.src!==n.options.src&&(n.options=o,n.attempt=0,"pending"!==function(e){return e.dataset.lazyState||"pending"}(e)&&(nt(e,"pending"),e.classList.remove("v-lazy--loaded","v-lazy--error"),o.placeholder&&tt(e,o.placeholder),rt(e)))},unmounted(e){lt(e),delete e.__lazy}});function at(e){return"boolean"==typeof e?{value:e}:__spreadValues({value:!0,loadingClass:"v-loading",spinnerClass:"v-loading__spinner",textClass:"v-loading__text",background:"rgba(255, 255, 255, 0.9)",lock:!1,disabled:!1},e)}const ut=w({name:"loading",ssr:!0,defaults:{value:!0,loadingClass:"v-loading",spinnerClass:"v-loading__spinner",textClass:"v-loading__text",background:"rgba(255, 255, 255, 0.9)",lock:!1,disabled:!1},mounted(e,t){if(!v())return;const n=at(t.value);if(n.disabled)return;const o=getComputedStyle(e),r={options:n,loadingOverlay:null,originalPosition:e.style.position,originalOverflow:e.style.overflow};e.__loading=r,"static"===o.position&&(e.style.position="relative"),n.value&&ct(e,r)},updated(e,t){const n=e.__loading;if(!n)return;const o=at(t.value);if(o.disabled)dt(e,n);else{if(o.value&&!n.options.value?ct(e,n):!o.value&&n.options.value&&dt(e,n),n.loadingOverlay&&o.text!==n.options.text){const e=n.loadingOverlay.querySelector(`.${n.options.textClass}`);e&&(e.textContent=o.text||"")}n.options=o}},unmounted(e){const t=e.__loading;t&&(dt(e,t),e.style.position=t.originalPosition,e.style.overflow=t.originalOverflow,delete e.__loading)}});function ct(e,t){t.loadingOverlay||(t.loadingOverlay=function(e){const t=document.createElement("div");t.className=e.loadingClass||"v-loading",t.style.cssText=`\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 1000;\n background: ${e.background||"rgba(255, 255, 255, 0.9)"};\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n `;const n=e.spinner||'\n<svg class="v-loading__circular" viewBox="25 25 50 50">\n <circle class="v-loading__path" cx="50" cy="50" r="20" fill="none" stroke-width="2" stroke-miterlimit="10"/>\n</svg>\n',o=document.createElement("div");if(o.className=e.spinnerClass||"v-loading__spinner",o.innerHTML=n,t.appendChild(o),e.text){const n=document.createElement("div");n.className=e.textClass||"v-loading__text",n.textContent=e.text,t.appendChild(n)}return t}(t.options),e.appendChild(t.loadingOverlay),t.options.lock&&(e.style.overflow="hidden"),e.classList.add("v-loading--active"))}function dt(e,t){t.loadingOverlay&&(t.loadingOverlay.remove(),t.loadingOverlay=null,t.options.lock&&(e.style.overflow=t.originalOverflow),e.classList.remove("v-loading--active"))}function pt(e){if("function"==typeof e)return{handler:e,duration:500,distance:10};if(!e)throw new Error("[Directix] v-long-press: handler is required");return __spreadValues({duration:500,distance:10,disabled:!1,prevent:!0,stop:!1,tickInterval:100},e)}const vt=w({name:"long-press",ssr:!1,defaults:{duration:500,distance:10,disabled:!1,prevent:!0,stop:!1,tickInterval:100},mounted(e,t){const n=pt(t.value);if(n.disabled||!v())return;const o={options:n,timerId:null,tickTimerId:null,startTime:0,startPos:{x:0,y:0},startHandler:()=>{},endHandler:()=>{},moveHandler:()=>{}};o.startHandler=e=>{var t;const r=e;n.prevent&&r.preventDefault(),n.stop&&r.stopPropagation(),o.timerId&&(clearTimeout(o.timerId),o.timerId=null),o.tickTimerId&&(clearInterval(o.tickTimerId),o.tickTimerId=null);const l=X(r);if(o.startPos={x:l.x,y:l.y},o.startTime=Date.now(),null==(t=n.onStart)||t.call(n,r),n.onTick){let e=n.duration;o.tickTimerId=setInterval(()=>{var t;e-=n.tickInterval,null==(t=n.onTick)||t.call(n,Math.max(0,e))},n.tickInterval)}o.timerId=setTimeout(()=>{o.tickTimerId&&(clearInterval(o.tickTimerId),o.tickTimerId=null),n.handler(r)},n.duration)},o.endHandler=e=>{var t;const r=e;o.timerId&&(clearTimeout(o.timerId),o.timerId=null),o.tickTimerId&&(clearInterval(o.tickTimerId),o.tickTimerId=null),o.startTime>0&&(null==(t=n.onCancel)||t.call(n,r)),o.startTime=0},o.moveHandler=e=>{var t;if(!o.timerId)return;const r=e,l=X(r);var i,s;(i=o.startPos,s={x:l.x,y:l.y},Math.sqrt(__pow(s.x-i.x,2)+__pow(s.y-i.y,2)))>(n.distance||10)&&(o.timerId&&(clearTimeout(o.timerId),o.timerId=null),o.tickTimerId&&(clearInterval(o.tickTimerId),o.tickTimerId=null),null==(t=n.onCancel)||t.call(n,r),o.startTime=0)},e.__longPress=o,Y(e,"mousedown",o.startHandler),Y(e,"mouseup",o.endHandler),Y(e,"mouseleave",o.endHandler),Y(e,"mousemove",o.moveHandler),Y(e,"touchstart",o.startHandler,{passive:!n.prevent}),Y(e,"touchend",o.endHandler),Y(e,"touchcancel",o.endHandler),Y(e,"touchmove",o.moveHandler,{passive:!0})},updated(e,t){const n=e.__longPress;if(!n){return void(pt(t.value).disabled||(e.__longPress=null))}n.options=pt(t.value)},unmounted(e){const t=e.__longPress;t&&(t.timerId&&clearTimeout(t.timerId),t.tickTimerId&&clearInterval(t.tickTimerId),$(e,"mousedown",t.startHandler),$(e,"mouseup",t.endHandler),$(e,"mouseleave",t.endHandler),$(e,"mousemove",t.moveHandler),$(e,"touchstart",t.startHandler),$(e,"touchend",t.endHandler),$(e,"touchcancel",t.endHandler),$(e,"touchmove",t.moveHandler),delete e.__longPress)}});function ft(e,t){return e?t.first?e.charAt(0).toLowerCase()+e.slice(1):e.toLowerCase():e}function mt(e){var t,n;return void 0===e||!0===e?{first:!1,onInput:!0}:!1===e?{first:!1,onInput:!1}:{first:null!=(t=e.first)&&t,onInput:null==(n=e.onInput)||n}}const ht=w({name:"lowercase",ssr:!0,mounted(e,t){const n=mt(t.value);if(T(e)){const t=x(e,n,e=>ft(e,n));e.__lowercaseCleanup=t}else E(e,e=>ft(e,n))},updated(e,t){const n=mt(t.value);T(e)?n.onInput&&(e.value=ft(e.value,n)):E(e,e=>ft(e,n))},unmounted(e){const t=e.__lowercaseCleanup;null==t||t(),delete e.__lowercaseCleanup}}),gt="__mask",bt={"#":/\d/,A:/[A-Za-z]/,N:/[A-Za-z0-9]/,X:/./};function yt(e,t){return[...e].map(e=>{const n=bt[e];return n?{pattern:n,placeholder:t,isLiteral:!1}:{pattern:new RegExp(`\\${e}`),placeholder:e,isLiteral:!0}})}function wt(e){if("string"==typeof e)return{mask:e,placeholder:"_",showPlaceholder:!0};if(!(null==e?void 0:e.mask))throw new Error("[Directix] v-mask: mask is required");return __spreadValues({placeholder:"_",showPlaceholder:!0,showMaskOnBlur:!1,clearIncomplete:!1,disabled:!1},e)}function _t(e,t,n,o){let r="",l=0;for(const i of t){if(l>=e.length){r+=i.isLiteral?i.placeholder:o?n:"";continue}const t=e[l];i.isLiteral?(t===i.placeholder&&l++,r+=i.placeholder):i.pattern.test(t)?(r+=t,l++):t===n?(r+=o?n:"",l++):l++}return r}function xt(e,t,n){for(let o=0;o<t.length;o++)if(!t[o].isLiteral&&(o>=e.length||e[o]===n))return!1;return!0}function Et(e,t){let n=t;for(;n<e.length&&e[n].isLiteral;)n++;return Math.min(n,e.length)}const Tt=w({name:"mask",ssr:!1,defaults:{placeholder:"_",showPlaceholder:!0,showMaskOnBlur:!1,clearIncomplete:!1,disabled:!1},mounted(e,t){var n;if(!function(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}(e))return void console.warn("[Directix] v-mask: directive must be used on input or textarea elements");const o=wt(t.value);if(o.disabled||!v())return;const r=o.placeholder||"_",l=yt(o.mask,r),i=e=>{var t,n,i;const s=e.target,a=s.value,u=s.selectionStart||0,c=_t(a,l,r,null==(t=o.showPlaceholder)||t);if(c!==a)return s.value=c,s.setSelectionRange(Et(l,u),Et(l,u)),void s.dispatchEvent(new Event("input",{bubbles:!0}));null==(n=o.onChange)||n.call(o,c,function(e,t,n){let o="";for(let r=0;r<e.length&&r<t.length;r++)t[r].isLiteral||e[r]===n||(o+=e[r]);return o}(c,l,r)),xt(c,l,r)&&(null==(i=o.onComplete)||i.call(o,c))},s=()=>{!e.value&&o.showPlaceholder&&(e.value=_t("",l,r,!0))},a=()=>{o.showMaskOnBlur||xt(e.value,l,r)||!o.clearIncomplete||(e.value="")};Y(e,"input",i),Y(e,"focus",s),Y(e,"blur",a),e[gt]={options:o,tokens:l,placeholder:r,inputHandler:i,focusHandler:s,blurHandler:a},e.value&&(e.value=_t(e.value,l,r,null==(n=o.showPlaceholder)||n))},updated(e,t){const n=e[gt];n&&(n.options=wt(t.value),n.tokens=yt(n.options.mask,n.placeholder))},unmounted(e){const t=e[gt];t&&($(e,"input",t.inputHandler),$(e,"focus",t.focusHandler),$(e,"blur",t.blurHandler),delete e[gt])}});function Lt(e,t){const{precision:n=0,separator:o=",",decimal:r=".",prefix:l="",suffix:i=""}=t,s=e.toFixed(n),[a,u]=s.split(".");let c=a.replace(/\B(?=(\d{3})+(?!\d))/g,o);return n>0&&u&&(c+=r+u),l+c+i}function kt(e,t){const n=e.replace(/[^\d.-]/g,"").replace(t,"."),o=Number.parseFloat(n);return isNaN(o)?null:o}function Ct(e,t){var n;let o=e;return!(null==(n=t.allowNegative)||n)&&o<0&&(o=Math.abs(o)),void 0!==t.min&&(o=Math.max(t.min,o)),void 0!==t.max&&(o=Math.min(t.max,o)),o}function St(e,t,n){const{decimal:o=".",prefix:r=""}=t;let l=!1;const i=()=>{if(l)return;const i=e.value,s=e.selectionStart||0;if(!i||"-"===i)return;const a=kt(i,o);if(null===a)return l=!0,e.value="",e.dispatchEvent(new Event("input",{bubbles:!0})),void(l=!1);const u=Ct(a,t),c=n(u,t);if(c!==i){l=!0;const t=function(e,t,n,o=0){let r=0,l=0;for(let t=0;t<n&&t<e.length;t++)/\d/.test(e[t])&&r++;for(let e=o;e<t.length;e++)if(/\d/.test(t[e])&&l++,l>=r)return e+1;return t.length}(i,c,s,r.length);e.value=c,e.setSelectionRange(t,t),e.dispatchEvent(new Event("input",{bubbles:!0})),l=!1}},s=()=>{if(!e.value||"-"===e.value)return;const r=kt(e.value,o);if(null!==r){const o=Ct(r,t),i=n(o,t);l=!0,e.value=i,e.dispatchEvent(new Event("input",{bubbles:!0})),l=!1}};if(e.addEventListener("input",i),e.addEventListener("blur",s),e.value){const r=kt(e.value,o);if(null!==r){const o=n(Ct(r,t),t);l=!0,e.value=o,e.dispatchEvent(new Event("input",{bubbles:!0})),l=!1}}return()=>{e.removeEventListener("input",i),e.removeEventListener("blur",s)}}function Dt(e,t){const{precision:n=2,separator:o=",",decimal:r=".",symbol:l="$",symbolPosition:i="before"}=t,s=e.toFixed(n),[a,u]=s.split(".");let c=a.replace(/\B(?=(\d{3})+(?!\d))/g,o);return n>0&&u&&(c+=r+u),"before"===i?l+c:c+l}const It=w({name:"money",ssr:!0,mounted(e,t){var n,o,r;const l="string"==typeof t.value?{symbol:t.value}:null!=(n=t.value)?n:{};if(l.precision=null!=(o=l.precision)?o:2,"INPUT"===e.tagName||"TEXTAREA"===e.tagName){const{symbol:t="$",symbolPosition:n="before"}=l,o="before"===n?t:"",r=St(e,__spreadProps(__spreadValues({},l),{prefix:o}),Dt);e.__money={options:l,cleanup:r},requestAnimationFrame(()=>{const t=e;if(t.value){const e=kt(t.value,l.decimal||".");if(null!==e){const n=Dt(Ct(e,l),l);n!==t.value&&(t.value=n,t.dispatchEvent(new Event("input",{bubbles:!0})))}}})}else{let n=null;if(t.value&&"object"==typeof t.value&&"value"in t.value)n=t.value.value;else{const t=null==(r=e.textContent)?void 0:r.trim();t&&(n=kt(t,l.decimal||"."))}null!==n&&(e.textContent=Dt(Ct(n,l),l))}},updated(e,t){var n,o;const r="string"==typeof t.value?{symbol:t.value}:null!=(n=t.value)?n:{};r.precision=null!=(o=r.precision)?o:2;const l=e.__money;if(l)l.options=r;else if("INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName){let n=null;t.value&&"object"==typeof t.value&&"value"in t.value&&(n=t.value.value),null!==n&&(e.textContent=Dt(Ct(n,r),r))}},unmounted(e){const t=e.__money;null==t||t.cleanup(),delete e.__money}});function Mt(e){if("function"==typeof e)return{handler:e,childList:!0};if(!e||!e.handler)throw new Error("[Directix] v-mutation: handler is required");return __spreadValues({attributes:!1,childList:!0,subtree:!1,characterData:!1,attributeOldValue:!1,characterDataOldValue:!1,disabled:!1},e)}const Pt=w({name:"mutation",ssr:!1,defaults:{attributes:!1,childList:!0,subtree:!1,characterData:!1,attributeOldValue:!1,characterDataOldValue:!1,disabled:!1},mounted(e,t){const n=Mt(t.value);if(n.disabled||!v())return;if(!y())return void console.warn("[Directix] v-mutation: MutationObserver not supported");const o={options:n,observer:null};o.observer=new MutationObserver((e,t)=>{n.handler(e,t)}),o.observer.observe(e,{attributes:n.attributes,attributeFilter:n.attributeFilter,childList:n.childList,subtree:n.subtree,characterData:n.characterData,attributeOldValue:n.attributeOldValue,characterDataOldValue:n.characterDataOldValue}),e.__mutation=o},updated(e,t){const n=e.__mutation;if(!n)return;const o=Mt(t.value);o.disabled&&!n.options.disabled?n.observer&&n.observer.disconnect():!o.disabled&&n.options.disabled?n.observer&&n.observer.observe(e,{attributes:o.attributes,attributeFilter:o.attributeFilter,childList:o.childList,subtree:o.subtree,characterData:o.characterData,attributeOldValue:o.attributeOldValue,characterDataOldValue:o.characterDataOldValue}):o.disabled||o.attributes===n.options.attributes&&o.childList===n.options.childList&&o.subtree===n.options.subtree&&o.characterData===n.options.characterData||n.observer&&(n.observer.disconnect(),n.observer.observe(e,{attributes:o.attributes,attributeFilter:o.attributeFilter,childList:o.childList,subtree:o.subtree,characterData:o.characterData,attributeOldValue:o.attributeOldValue,characterDataOldValue:o.characterDataOldValue})),n.options=o},unmounted(e){const t=e.__mutation;t&&(t.observer&&t.observer.disconnect(),delete e.__mutation)}}),Ot=w({name:"number",ssr:!0,mounted(e,t){var n,o;const r="number"==typeof t.value?{precision:t.value}:null!=(n=t.value)?n:{};if("INPUT"===e.tagName||"TEXTAREA"===e.tagName){const t=St(e,r,Lt);e.__number={options:r,cleanup:t},requestAnimationFrame(()=>{const t=e;if(t.value){const e=kt(t.value,r.decimal||".");if(null!==e){const n=Lt(Ct(e,r),r);n!==t.value&&(t.value=n,t.dispatchEvent(new Event("input",{bubbles:!0})))}}})}else{let n=null;if("number"==typeof t.value)n=t.value;else if(t.value&&"object"==typeof t.value&&"value"in t.value)n=t.value.value;else{const t=null==(o=e.textContent)?void 0:o.trim();t&&(n=kt(t,r.decimal||"."))}null!==n&&(e.textContent=Lt(Ct(n,r),r))}},updated(e,t){var n;const o="number"==typeof t.value?{precision:t.value}:null!=(n=t.value)?n:{},r=e.__number;if(r)r.options=o;else if("INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName){let n=null;"number"==typeof t.value?n=t.value:t.value&&"object"==typeof t.value&&"value"in t.value&&(n=t.value.value),null!==n&&(e.textContent=Lt(Ct(n,o),o))}},unmounted(e){const t=e.__number;null==t||t.cleanup(),delete e.__number}}),zt="__permission";function Ht(e,t){var n,o;const r=function(e){return e[zt]||(e[zt]={options:{value:""},originalDisplay:"",originalDisabled:!1,parentNode:null,placeholder:null}),e[zt]}(e);r.options=function(e){if(!e)throw new Error("[Directix] v-permission: permission value is required");return"string"==typeof e||Array.isArray(e)?{value:e}:e}(t.value);const l=(i=r.options).check?i.check(i.value,i.mode||"some"):(console.warn("[Directix] v-permission: No permission config provided"),!0);var i;null==(o=(n=r.options).onChange)||o.call(n,l);const s=r.options.action||"remove";l?function(e,t,n){switch(t){case"remove":n.placeholder&&n.parentNode&&(n.parentNode.insertBefore(e,n.placeholder),n.parentNode.removeChild(n.placeholder),n.placeholder=null);break;case"disable":!1===n.originalDisabled?e.removeAttribute("disabled"):n.originalDisabled&&e.setAttribute("disabled",n.originalDisabled),e.classList.remove("v-permission--disabled");break;case"hide":e.style.display=n.originalDisplay||"",e.classList.remove("v-permission--hidden")}}(e,s,r):function(e,t,n){var o,r;switch(t){case"remove":n.parentNode=e.parentNode,n.placeholder=document.createComment("v-permission"),null==(o=e.parentNode)||o.insertBefore(n.placeholder,e),null==(r=e.parentNode)||r.removeChild(e);break;case"disable":n.originalDisabled=e.getAttribute("disabled")||!1,e.setAttribute("disabled","true"),e.classList.add("v-permission--disabled");break;case"hide":n.originalDisplay=e.style.display,e.style.display="none",e.classList.add("v-permission--hidden")}}(e,s,r)}const Yt=w({name:"permission",ssr:!0,mounted(e,t){Ht(e,t)},updated(e,t){Ht(e,t)},unmounted(e){!function(e){const t=e[zt];(null==t?void 0:t.placeholder)&&t.parentNode&&t.parentNode.removeChild(t.placeholder),delete e[zt]}(e)}}),$t=w({name:"print",ssr:!0,mounted(e,t){const n=At(t.value),o={options:n,clickHandler:null};if(e.__print=o,n.immediate)return void setTimeout(()=>Xt(e,n),100);const r=()=>{Xt(e,o.options)};e.addEventListener("click",r),o.clickHandler=r,e.style.cursor="pointer"},updated(e,t){const n=e.__print;if(!n)return;const o=At(t.value);n.options=o},unmounted(e){const t=e.__print;t&&(t.clickHandler&&e.removeEventListener("click",t.clickHandler),e.style.cursor="",delete e.__print)}});function At(e){return!0===e?{immediate:!0}:!1===e?{}:e||{}}function Xt(e,t){return __async(this,null,function*(){if(t.onBeforePrint){if(!1===t.onBeforePrint())return}const n=t.target?document.querySelector(t.target):e;n?(t.newWindow?yield function(e,t){return __async(this,null,function*(){const n=window.open("","_blank");if(!n)return void console.warn("[Directix] v-print: Could not open print window");const o=Rt(e,t);n.document.open(),n.document.write(o),n.document.close(),yield Nt(n.document),n.focus(),n.print(),setTimeout(()=>{n.close()},1e3)})}(n,t):yield function(e,t){return __async(this,null,function*(){var n,o,r;const l=document.createElement("iframe");l.style.cssText="position: absolute; top: -10000px; left: -10000px; width: 0; height: 0; border: none;",document.body.appendChild(l);const i=l.contentDocument||(null==(n=l.contentWindow)?void 0:n.document);if(!i)return console.warn("[Directix] v-print: Could not access iframe document"),void document.body.removeChild(l);const s=Rt(e,t);i.open(),i.write(s),i.close(),yield Nt(i);try{null==(o=l.contentWindow)||o.focus(),null==(r=l.contentWindow)||r.print()}catch(e){console.error("[Directix] v-print: Print failed",e)}setTimeout(()=>{document.body.removeChild(l)},1e3)})}(n,t),t.onAfterPrint&&t.onAfterPrint()):console.warn("[Directix] v-print: Target element not found")})}function Rt(e,t){let n="";if(document.querySelectorAll('style, link[rel="stylesheet"]').forEach(e=>{if("STYLE"===e.tagName)n+=`<style>${e.textContent}</style>`;else if("LINK"===e.tagName){const t=e.href;n+=`<link rel="stylesheet" href="${t}">`}}),t.cssUrls&&t.cssUrls.forEach(e=>{n+=`<link rel="stylesheet" href="${e}">`}),t.styles){const e=Array.isArray(t.styles)?t.styles.join("\n"):t.styles;n+=`<style>${e}</style>`}n+=`\n\t\t<style>\n\t\t\t@media print {\n\t\t\t\tbody { margin: 0; padding: 20px; }\n\t\t\t\t${t.printClass?`.${t.printClass} { page-break-inside: avoid; }`:""}\n\t\t\t}\n\t\t</style>\n\t`;const o=t.title||document.title||"Print",r=e.outerHTML;return`<!DOCTYPE html>\n<html>\n<head>\n\t<meta charset="utf-8">\n\t<title>${o}</title>\n\t${n}\n</head>\n<body>\n\t${r}\n</body>\n</html>`}function Nt(e){const t=e.querySelectorAll("img"),n=[];return t.forEach(e=>{e.complete||n.push(new Promise(t=>{e.onload=()=>t(),e.onerror=()=>t()}))}),Promise.all(n)}const Vt={idle:"↓",pulling:"↓ Pull",ready:"↓ Release",loading:"⟳ Loading...",success:"✓ Done",error:"✗ Failed"};function Ut(e){var t,n,o,r,l;return"function"==typeof e?{handler:e}:{handler:e.handler,distance:null!=(t=e.distance)?t:60,maxDistance:null!=(n=e.maxDistance)?n:100,disabled:null!=(o=e.disabled)&&o,indicator:e.indicator,successDuration:null!=(r=e.successDuration)?r:500,errorDuration:null!=(l=e.errorDuration)?l:1e3,onStateChange:e.onStateChange}}function Bt(e,t,n){var o;const r=null==(o=n.indicator)?void 0:o[t];e.textContent=r||Vt[t]}function Ft(e,t){var n,o;e.state!==t&&(e.state=t,Bt(e.indicatorEl,t,e.options),null==(o=(n=e.options).onStateChange)||o.call(n,t))}function jt(e,t,n){e.contentEl.style.transform=`translateY(${t}px)`,e.indicatorEl.style.opacity="1",e.indicatorEl.style.transform=`translateY(${t}px)`}function Wt(e){e.contentEl.style.transform="",e.indicatorEl.style.opacity="0",Ft(e,"idle")}function qt(e){return new Promise(t=>setTimeout(t,e))}function Zt(e){const{contentEl:t,options:n}=e;return{touchStart:o=>{n.disabled||"loading"===e.state||t.scrollTop>0||(e.pulling=!0,e.startY=o.touches[0].clientY,e.currentY=e.startY,Ft(e,"idle"))},touchMove:o=>{if(!e.pulling||n.disabled||"loading"===e.state)return;e.currentY=o.touches[0].clientY;const r=e.currentY-e.startY;if(r<=0)return void(t.style.transform&&(t.style.transition="",Wt(e)));o.preventDefault();const l=Math.min(.5*r,n.maxDistance),i=l/n.distance;t.style.transition="none",jt(e,l),Ft(e,i>=1?"ready":"pulling")},touchEnd:()=>{if(!e.pulling||n.disabled)return;e.pulling=!1;const o=e.currentY-e.startY,r=Math.min(.5*o,n.maxDistance);t.style.transition="","ready"===e.state&&r>=n.distance?function(e){__async(this,null,function*(){Ft(e,"loading");const t=e.options.distance;jt(e,t);try{yield e.options.handler(),Ft(e,"success"),yield qt(e.options.successDuration)}catch(t){Ft(e,"error"),yield qt(e.options.errorDuration)}finally{Wt(e)}})}(e):Wt(e)}}}function Kt(e,t){e.addEventListener("touchstart",t.touchStart,{passive:!1}),e.addEventListener("touchmove",t.touchMove,{passive:!1}),e.addEventListener("touchend",t.touchEnd,{passive:!0})}function Gt(e,t){e.removeEventListener("touchstart",t.touchStart),e.removeEventListener("touchmove",t.touchMove),e.removeEventListener("touchend",t.touchEnd)}const Jt=w({name:"pull-refresh",ssr:!1,mounted(e,t){const n=Ut(t.value);e.style.position="relative",e.style.overflow="hidden",e.classList.add("v-pull-refresh");const o=document.createElement("div");for(o.className="v-pull-refresh__content",o.style.cssText="position: relative; height: 100%; overflow-y: auto;";e.firstChild;)o.appendChild(e.firstChild);e.appendChild(o);const r=function(){const e=document.createElement("div");return e.className="v-pull-refresh__indicator",e.style.cssText="\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tright: 0;\n\t\theight: 60px;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\tbackground: #f5f5f5;\n\t\tfont-size: 14px;\n\t\tcolor: #666;\n\t\tz-index: 10;\n\t\tpointer-events: none;\n\t\topacity: 0;\n\t\ttransition: opacity 0.2s ease;\n\t",e}();e.insertBefore(r,o);const l={options:n,state:"idle",startY:0,currentY:0,pulling:!1,indicatorEl:r,contentEl:o,handlers:null};l.handlers=Zt(l),e.__pullRefresh=l,n.disabled||Kt(e,l.handlers),Bt(r,"idle",n)},updated(e,t){const n=e.__pullRefresh;if(!n)return;const o=n.options.disabled;n.options=Ut(t.value),Bt(n.indicatorEl,n.state,n.options),n.options.disabled&&!o?Gt(e,n.handlers):!n.options.disabled&&o&&Kt(e,n.handlers)},unmounted(e){const t=e.__pullRefresh;t&&(Gt(e,t.handlers),delete e.__pullRefresh)}});function Qt(e){if("function"==typeof e)return{handler:e};if(!e)throw new Error("[Directix] v-resize: handler is required");return __spreadValues({disabled:!1,box:"content-box",debounce:0},e)}const en=w({name:"resize",ssr:!1,defaults:{disabled:!1,box:"content-box",debounce:0},mounted(e,t){const n=Qt(t.value);if(n.disabled||!v())return;"static"===getComputedStyle(e).position&&(e.style.position="relative");const o={options:n,observer:null,debounceTimer:null,pendingEntry:null,fallbackIframe:null,handler:e=>{n.debounce&&n.debounce>0?(o.pendingEntry=e,o.debounceTimer||(o.debounceTimer=setTimeout(()=>{o.pendingEntry&&n.handler(o.pendingEntry),o.debounceTimer=null,o.pendingEntry=null},n.debounce))):n.handler(e)}};if(e.__resize=o,g())o.observer=new ResizeObserver(e=>{for(const t of e)o.handler(t)}),o.observer.observe(e,{box:n.box});else{console.warn("[Directix] v-resize: ResizeObserver not supported, using fallback");const{iframe:t,cleanup:r}=function(e,t){const n=document.createElement("iframe");n.style.cssText="\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border: none;\n pointer-events: none;\n opacity: 0;\n ",e.appendChild(n);const o=n.contentWindow;return o&&o.addEventListener("resize",t),{iframe:n,cleanup:()=>{o&&o.removeEventListener("resize",t),n.remove()}}}(e,()=>{const t=e.getBoundingClientRect(),r={target:e,contentRect:t,borderBoxSize:[],contentBoxSize:[],devicePixelContentBoxSize:[]};o.handler(r),n.onFallback&&n.onFallback(function(e){return{width:e.contentRect.width,height:e.contentRect.height,contentRect:e.contentRect,borderBoxSize:e.borderBoxSize,contentBoxSize:e.contentBoxSize,devicePixelContentBoxSize:e.devicePixelContentBoxSize}}(r))});o.fallbackIframe=t,e.__resizeCleanup=r}},updated(e,t){const n=e.__resize;n&&(n.options=Qt(t.value))},unmounted(e){const t=e.__resize;if(!t)return;t.debounceTimer&&clearTimeout(t.debounceTimer),t.observer&&t.observer.disconnect();const n=e.__resizeCleanup;n&&n(),delete e.__resize,delete e.__resizeCleanup}});function tn(e){if(!1===e)return{disabled:!0,color:"currentColor",duration:600};if("string"==typeof e)return{color:e,duration:600};const t={color:"currentColor",duration:600,disabled:!1,initialScale:0,finalScale:2};return e&&"object"==typeof e?__spreadValues(__spreadValues({},t),e):t}const nn=w({name:"ripple",ssr:!1,defaults:{color:"currentColor",duration:600,disabled:!1,initialScale:0,finalScale:2},mounted(e,t){const n=tn(t.value);if(n.disabled||!v())return;const o=getComputedStyle(e);"static"===o.position&&(e.style.position="relative"),"visible"===o.overflow&&(e.style.overflow="hidden"),e.classList.add("v-ripple");const r={options:n,clickHandler:t=>{if(r.options.disabled)return;const n=function(e,t,n){const o=t.getBoundingClientRect(),r=e.clientX-o.left,l=e.clientY-o.top,i=2*Math.max(o.width,o.height),s=document.createElement("span");return s.className="v-ripple__wave",s.style.cssText=`\n position: absolute;\n border-radius: 50%;\n pointer-events: none;\n background-color: ${n.color};\n width: ${i}px;\n height: ${i}px;\n left: ${r-i/2}px;\n top: ${l-i/2}px;\n transform: scale(${n.initialScale});\n opacity: 0.3;\n z-index: 0;\n `,s}(t,e,r.options);n&&(e.appendChild(n),function(e,t){const n=t.duration||600,o=t.initialScale||0,r=t.finalScale||2;"function"==typeof e.animate?e.animate([{transform:`scale(${o})`,opacity:.3},{transform:`scale(${r})`,opacity:0}],{duration:n,easing:"ease-out",fill:"forwards"}).onfinish=()=>{e.remove()}:(e.style.transition=`transform ${n}ms ease-out, opacity ${n}ms ease-out`,String(e.offsetHeight),e.style.transform=`scale(${r})`,e.style.opacity="0",setTimeout(()=>{e.remove()},n))}(n,r.options))}};e.__ripple=r,Y(e,"click",r.clickHandler)},updated(e,t){const n=e.__ripple;n&&(n.options=tn(t.value))},unmounted(e){const t=e.__ripple;t&&($(e,"click",t.clickHandler),e.classList.remove("v-ripple"),delete e.__ripple)}}),on=["b","i","u","strong","em","br","p","span","div"],rn=["title","alt","href","src"],ln=["script","iframe","object","embed","form","input","style","link","meta","base"],sn=["onclick","onerror","onload","onmouseover","onfocus","onblur","onchange","onsubmit"];function an(e){return!1===e?{disabled:!0}:!0===e?{allowedTags:on,allowedAttributes:rn}:__spreadValues({allowedTags:on,allowedAttributes:rn,allowDataUrls:!1,allowStyles:!1,allowClass:!1,allowId:!1,disabled:!1,sanitizeOnUpdate:!0},e)}function un(e,t){var n;if(t.handler)return t.handler(e);const o=document.createElement("div");o.innerHTML=e;for(const e of ln){const t=o.getElementsByTagName(e);for(;t.length>0;)null==(n=t[0].parentNode)||n.removeChild(t[0])}const r=e=>{var n;const o=e.tagName.toLowerCase();if(t.allowedTags&&!t.allowedTags.includes(o)){const t=document.createTextNode(e.textContent||"");return void(null==(n=e.parentNode)||n.replaceChild(t,e))}for(const t of sn)e.removeAttribute(t);const l=e.getAttribute("href");if(l&&l.toLowerCase().startsWith("javascript:")&&e.removeAttribute("href"),!t.allowDataUrls){const t=e.getAttribute("src");t&&t.toLowerCase().startsWith("data:")&&e.removeAttribute("src")}if(t.allowedAttributes){const n=Array.from(e.attributes);for(const o of n){const n=t.allowedAttributes.includes(o.name.toLowerCase()),r="class"===o.name&&t.allowClass,l="id"===o.name&&t.allowId,i="style"===o.name&&t.allowStyles;n||r||l||i||e.removeAttribute(o.name)}}for(const t of Array.from(e.children))r(t)};for(const e of Array.from(o.children))r(e);return o.innerHTML}const cn=w({name:"sanitize",ssr:!0,defaults:{allowedTags:on,allowedAttributes:rn,allowDataUrls:!1,allowStyles:!1,allowClass:!1,allowId:!1,disabled:!1,sanitizeOnUpdate:!0},mounted(e,t){if(!v())return;const n=an(t.value);if(n.disabled)return;e.__sanitize={options:n};const o=e.innerHTML;o&&(e.innerHTML=un(o,n))},updated(e,t){const n=e.__sanitize;if(!n)return;if(n.options=an(t.value),n.options.disabled||!n.options.sanitizeOnUpdate)return;const o=e.innerHTML;o&&(e.innerHTML=un(o,n.options))},unmounted(e){delete e.__sanitize}});function dn(e,t,n){let o=0,r=0,l=0,i=0;if(e===window)o=window.scrollX||document.documentElement.scrollLeft,r=window.scrollY||document.documentElement.scrollTop,l=document.documentElement.scrollWidth-window.innerWidth,i=document.documentElement.scrollHeight-window.innerHeight;else{const t=e;o=t.scrollLeft,r=t.scrollTop,l=t.scrollWidth-t.clientWidth,i=t.scrollHeight-t.clientHeight}return{scrollLeft:o,scrollTop:r,scrollLeftMax:l,scrollTopMax:i,progressX:l>0?o/l:0,progressY:i>0?r/i:0,directionX:o!==t?o>t?1:-1:0,directionY:r!==n?r>n?1:-1:0,container:e}}function pn(e){if("function"==typeof e)return{handler:e,passive:!0};if(!e)throw new Error("[Directix] v-scroll: handler is required");return __spreadValues({passive:!0,throttle:0,disabled:!1},e)}const vn=w({name:"scroll",ssr:!1,defaults:{passive:!0,throttle:0,disabled:!1},mounted(e,t){const n=pn(t.value);if(n.disabled||!v())return;let o;if(n.container)if(n.container===window)o=window;else if("string"==typeof n.container){const t=document.querySelector(n.container);o=t||H(e)}else o=n.container;else{const{overflow:t,overflowX:n,overflowY:r}=getComputedStyle(e),l=/(auto|scroll)/.test(t+n+r);o=l?e:H(e)}const r={options:n,container:o,lastScrollLeft:0,lastScrollTop:0,throttleTimer:null,pendingEvent:null,scrollHandler:e=>{if(n.throttle&&n.throttle>0)r.pendingEvent=e,r.throttleTimer||(r.throttleTimer=setTimeout(()=>{if(r.pendingEvent){const e=dn(o,r.lastScrollLeft,r.lastScrollTop);r.lastScrollLeft=e.scrollLeft,r.lastScrollTop=e.scrollTop,n.handler(r.pendingEvent,e)}r.throttleTimer=null,r.pendingEvent=null},n.throttle));else{const t=dn(o,r.lastScrollLeft,r.lastScrollTop);r.lastScrollLeft=t.scrollLeft,r.lastScrollTop=t.scrollTop,n.handler(e,t)}}},l=dn(o,0,0);r.lastScrollLeft=l.scrollLeft,r.lastScrollTop=l.scrollTop,e.__scroll=r,Y(o,"scroll",r.scrollHandler,{passive:n.passive})},updated(e,t){const n=e.__scroll;n&&(n.options=pn(t.value))},unmounted(e){const t=e.__scroll;t&&(t.throttleTimer&&clearTimeout(t.throttleTimer),$(t.container,"scroll",t.scrollHandler),delete e.__scroll)}}),fn="__sticky";function mn(e){return!1===e?{disabled:!0,top:0,zIndex:100}:"number"==typeof e?{top:e,zIndex:100}:__spreadValues({top:0,zIndex:100,stickyClass:"v-sticky--fixed",disabled:!1},e&&"object"==typeof e?e:{})}function hn(e){return void 0===e?"0":"number"==typeof e?`${e}px`:e}function gn(e,t){if(t.options.disabled)return void bn(e,t);const n=parseFloat(hn(t.options.top)),o=t.container===window?{top:0}:t.container.getBoundingClientRect(),r=(t.placeholder||e).getBoundingClientRect().top-o.top<=n;r&&!t.isSticky?function(e,t,n,o){var r,l,i;t.isSticky=!0;const s=document.createElement("div");s.style.cssText=`width:${e.offsetWidth}px;height:${e.offsetHeight}px`,null==(r=e.parentNode)||r.insertBefore(s,e),t.placeholder=s;const a=t.container===window?n:o+n;e.style.position="fixed",e.style.top=`${a}px`,e.style.zIndex=String(t.options.zIndex||100),e.style.width=`${e.offsetWidth}px`,void 0!==t.options.bottom&&(e.style.bottom=hn(t.options.bottom));t.options.stickyClass&&e.classList.add(t.options.stickyClass),e.dispatchEvent(new CustomEvent("sticky:change",{detail:{isSticky:!0}})),null==(i=(l=t.options).onChange)||i.call(l,!0)}(e,t,n,o.top):!r&&t.isSticky&&bn(e,t)}function bn(e,t){var n,o,r,l;t.isSticky&&(t.isSticky=!1,null==(o=null==(n=t.placeholder)?void 0:n.parentNode)||o.removeChild(t.placeholder),t.placeholder=null,Object.assign(e.style,t.originalStyles),t.options.stickyClass&&e.classList.remove(t.options.stickyClass),e.dispatchEvent(new CustomEvent("sticky:change",{detail:{isSticky:!1}})),null==(l=(r=t.options).onChange)||l.call(r,!1))}const yn=w({name:"sticky",ssr:!1,defaults:{top:0,zIndex:100,stickyClass:"v-sticky--fixed",disabled:!1},mounted(e,t){const n=mn(t.value);if(n.disabled||!v())return;const o=function(e,t){if(t)return"string"==typeof t?document.querySelector(t)||H(e):t;const n=e.parentElement;if(n){const{overflow:e,overflowX:t,overflowY:o}=getComputedStyle(n);if(/(auto|scroll)/.test(e+t+o))return n}return H(e)}(e,n.container),r={options:n,placeholder:null,originalStyles:{position:e.style.position,top:e.style.top,bottom:e.style.bottom,zIndex:e.style.zIndex,width:e.style.width},isSticky:!1,container:o,scrollHandler:()=>gn(e,r),resizeHandler:()=>gn(e,r)};e.classList.add("v-sticky"),e[fn]=r,Y(o,"scroll",r.scrollHandler,{passive:!0}),Y(window,"resize",r.resizeHandler,{passive:!0}),gn(e,r)},updated(e,t){const n=e[fn];n&&(n.options=mn(t.value),gn(e,n))},unmounted(e){var t,n;const o=e[fn];o&&(null==(n=null==(t=o.placeholder)?void 0:t.parentNode)||n.removeChild(o.placeholder),Object.assign(e.style,o.originalStyles),e.classList.remove("v-sticky",o.options.stickyClass||"v-sticky--fixed"),$(o.container,"scroll",o.scrollHandler),$(window,"resize",o.resizeHandler),delete e[fn])}}),wn=["left","right","up","down"];function _n(e){var t,n,o,r,l,i;return"function"==typeof e?{handler:e}:{handler:e.handler,threshold:null!=(t=e.threshold)?t:30,maxTime:null!=(n=e.maxTime)?n:500,directions:null!=(o=e.directions)?o:[...wn],preventScrollOnSwipe:null==(r=e.preventScrollOnSwipe)||r,disabled:null!=(l=e.disabled)&&l,mouse:null==(i=e.mouse)||i,onLeft:e.onLeft,onRight:e.onRight,onUp:e.onUp,onDown:e.onDown}}function xn(e,t,n,o,r,l){var i,s,a,u,c;const{options:d}=e;if(o>(null!=(i=d.maxTime)?i:500))return;if(Math.max(Math.abs(t),Math.abs(n))<(null!=(s=d.threshold)?s:30))return;const p=function(e,t,n){if(Math.abs(e)>Math.abs(t)){const t=e>0?"right":"left";return n.includes(t)?t:null}{const e=t>0?"down":"up";return n.includes(e)?e:null}}(t,n,null!=(a=d.directions)?a:wn);if(!p)return;d.preventScrollOnSwipe&&r.cancelable&&r.preventDefault(),null==(u=d.handler)||u.call(d,p,r);const v={left:d.onLeft,right:d.onRight,up:d.onUp,down:d.onDown};null==(c=v[p])||c.call(v),l.dispatchEvent(new CustomEvent("swipe",{detail:{direction:p,deltaX:t,deltaY:n,deltaTime:o}}))}function En(e,t){if(t.disabled)return null;e.style.touchAction="none",e.style.userSelect="none";const n={options:t,startX:0,startY:0,startTime:0,isActive:!1,handlers:null},o=function(e,t){return(n,o,r)=>{const l=n-t.startX,i=o-t.startY,s=Date.now()-t.startTime;xn(t,l,i,s,r,e)}}(e,n);return n.handlers={touchStart:e=>{n.options.disabled||(n.startX=e.touches[0].clientX,n.startY=e.touches[0].clientY,n.startTime=Date.now(),n.isActive=!0)},touchMove:e=>{n.isActive&&!n.options.disabled&&n.options.preventScrollOnSwipe&&e.preventDefault()},touchEnd:e=>{if(!n.isActive||n.options.disabled)return;n.isActive=!1;const t=e.changedTouches[0];o(t.clientX,t.clientY,e)},mouseDown:e=>{n.options.disabled||(n.startX=e.clientX,n.startY=e.clientY,n.startTime=Date.now(),n.isActive=!0)},mouseUp:e=>{n.isActive&&!n.options.disabled&&(n.isActive=!1,o(e.clientX,e.clientY,e))}},n}function Tn(e,t){var n;const{handlers:o}=t,r=null==(n=t.options.mouse)||n;e.addEventListener("touchstart",o.touchStart,{passive:!0}),e.addEventListener("touchmove",o.touchMove,{passive:!1}),e.addEventListener("touchend",o.touchEnd),e.addEventListener("touchcancel",o.touchEnd),r&&(e.addEventListener("mousedown",o.mouseDown),e.addEventListener("mouseup",o.mouseUp),e.addEventListener("mouseleave",o.mouseUp))}function Ln(e,t){var n;const{handlers:o}=t,r=null==(n=t.options.mouse)||n;e.removeEventListener("touchstart",o.touchStart),e.removeEventListener("touchmove",o.touchMove),e.removeEventListener("touchend",o.touchEnd),e.removeEventListener("touchcancel",o.touchEnd),r&&(e.removeEventListener("mousedown",o.mouseDown),e.removeEventListener("mouseup",o.mouseUp),e.removeEventListener("mouseleave",o.mouseUp))}const kn=w({name:"swipe",ssr:!1,mounted(e,t){const n=En(e,_n(t.value));n&&(e.__swipe=n,Tn(e,n))},updated(e,t){var n,o;const r=e.__swipe,l=_n(t.value);if(!r){const t=En(e,l);return void(t&&(e.__swipe=t,Tn(e,t)))}const i=r.options.disabled,s=null==(n=r.options.mouse)||n,a=null==(o=l.mouse)||o;r.options=l,l.disabled&&!i?Ln(e,r):!l.disabled&&i?Tn(e,r):s!==a&&(s&&(e.removeEventListener("mousedown",r.handlers.mouseDown),e.removeEventListener("mouseup",r.handlers.mouseUp),e.removeEventListener("mouseleave",r.handlers.mouseUp)),a&&(e.addEventListener("mousedown",r.handlers.mouseDown),e.addEventListener("mouseup",r.handlers.mouseUp),e.addEventListener("mouseleave",r.handlers.mouseUp)))},unmounted(e){const t=e.__swipe;t&&(Ln(e,t),delete e.__swipe)}});function Cn(e,t){const n=K(t.arg)||300;return"function"==typeof e?{handler:e,wait:n}:__spreadProps(__spreadValues({},e),{wait:e.wait||n})}const Sn=w({name:"throttle",ssr:!0,defaults:{wait:300,leading:!0,trailing:!0},mounted(e,t){const n=Cn(t.value,t),o=V(t.modifiers)||U(e),r=Z(n.handler,n.wait,{leading:n.leading,trailing:n.trailing});e.addEventListener(o,r),e.__throttle={throttledFn:r,eventType:o,options:n}},updated(e,t){const n=e.__throttle;if(!n)return;const o=Cn(t.value,t);if(o.wait!==n.options.wait||o.leading!==n.options.leading||o.trailing!==n.options.trailing){n.throttledFn.cancel();const t=Z(o.handler,o.wait,{leading:o.leading,trailing:o.trailing});e.removeEventListener(n.eventType,n.throttledFn),e.addEventListener(n.eventType,t),e.__throttle={throttledFn:t,eventType:n.eventType,options:o}}else o.handler!==n.options.handler&&(n.options.handler=o.handler)},unmounted(e){const t=e.__throttle;t&&(t.throttledFn.cancel(),e.removeEventListener(t.eventType,t.throttledFn),delete e.__throttle)}}),Dn="8px 12px",In="#333",Mn="#fff",Pn="6px",On="14px",zn="1.5",Hn="96px",Yn="320px",$n="0 4px 12px rgba(0, 0, 0, 0.15)";let An=null;function Xn(e,t){if(t.isVisible||t.options.disabled)return;t.hideTimeout&&(clearTimeout(t.hideTimeout),t.hideTimeout=null);const n=()=>{var n,o;const r=function(e){const t=document.createElement("div");t.className=`v-tooltip v-tooltip--${e.placement||"top"}`,e.class&&t.classList.add(e.class);const n=e.maxWidth?"number"==typeof e.maxWidth?`${e.maxWidth}px`:e.maxWidth:Yn;if(t.style.cssText=["position: absolute",`padding: ${Dn}`,`background: ${In}`,`color: ${Mn}`,`border-radius: ${Pn}`,`font-size: ${On}`,`line-height: ${zn}`,`min-width: ${Hn}`,`max-width: ${n}`,"word-wrap: break-word",`box-shadow: ${$n}`,"pointer-events: none","opacity: 0","transition: opacity 0.2s ease",`z-index: ${e.zIndex||9999}`].join(";"),!1!==e.arrow){const e=document.createElement("div");e.className="v-tooltip__arrow",e.style.cssText="position: absolute; width: 8px; height: 8px; background: #333; transform: rotate(45deg);",t.appendChild(e)}const o=document.createElement("div");return o.className="v-tooltip__content",o.textContent=e.content,t.appendChild(o),t}(t.options);t.tooltip=r,(An||"undefined"==typeof document||(An=document.createElement("div"),An.id="directix-tooltip-container",An.style.cssText="position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999;",document.body.appendChild(An)),An).appendChild(r),requestAnimationFrame(()=>{!function(e,t,n,o){const r=t.getBoundingClientRect(),l=e.getBoundingClientRect();let i=0,s=0;switch(n){case"top":i=r.top-l.height-o,s=r.left+(r.width-l.width)/2;break;case"bottom":i=r.bottom+o,s=r.left+(r.width-l.width)/2;break;case"left":i=r.top+(r.height-l.height)/2,s=r.left-l.width-o;break;case"right":i=r.top+(r.height-l.height)/2,s=r.right+o}const a=window.innerWidth,u=window.innerHeight;s<0&&(s=8),s+l.width>a&&(s=a-l.width-8),i<0&&(i=8),i+l.height>u&&(i=u-l.height-8),e.style.top=`${i}px`,e.style.left=`${s}px`;const c=e.querySelector(".v-tooltip__arrow");if(c){const e=4;switch(n){case"top":Object.assign(c.style,{bottom:`-${e}px`,left:"50%",transform:"translateX(-50%) rotate(45deg)"});break;case"bottom":Object.assign(c.style,{top:`-${e}px`,left:"50%",transform:"translateX(-50%) rotate(45deg)"});break;case"left":Object.assign(c.style,{right:`-${e}px`,top:"50%",transform:"translateY(-50%) rotate(45deg)"});break;case"right":Object.assign(c.style,{left:`-${e}px`,top:"50%",transform:"translateY(-50%) rotate(45deg)"})}}}(r,e,t.options.placement||"top",t.options.offset||8),requestAnimationFrame(()=>{r.style.opacity="1"})}),t.isVisible=!0,null==(o=(n=t.options).onShow)||o.call(n)};t.options.delay&&t.options.delay>0?t.showTimeout=setTimeout(n,t.options.delay):n()}function Rn(e){if(!e.isVisible)return;e.showTimeout&&(clearTimeout(e.showTimeout),e.showTimeout=null);const t=()=>{var t,n;e.tooltip&&(e.tooltip.style.opacity="0",setTimeout(()=>{var t;null==(t=e.tooltip)||t.remove(),e.tooltip=null},200)),e.isVisible=!1,null==(n=(t=e.options).onHide)||n.call(t)};e.options.hideDelay&&e.options.hideDelay>0?e.hideTimeout=setTimeout(t,e.options.hideDelay):t()}function Nn(e,t){const{trigger:n="hover"}=t.options,o=()=>Xn(e,t),r=()=>Rn(t),l=()=>t.isVisible?r():o();switch(t.handlers={show:o,hide:r,toggle:l},n){case"hover":e.addEventListener("mouseenter",o),e.addEventListener("mouseleave",r);break;case"click":e.addEventListener("click",l),document.addEventListener("click",t.handlers.docHide=n=>{t.isVisible&&!e.contains(n.target)&&r()});break;case"focus":e.addEventListener("focus",o),e.addEventListener("blur",r)}}function Vn(e){var t,n,o,r,l,i,s,a;return"string"==typeof e?{content:e,placement:"top",trigger:"hover"}:e?{content:e.content,placement:null!=(t=e.placement)?t:"top",trigger:null!=(n=e.trigger)?n:"hover",delay:null!=(o=e.delay)?o:0,hideDelay:null!=(r=e.hideDelay)?r:0,offset:null!=(l=e.offset)?l:8,class:e.class,arrow:null==(i=e.arrow)||i,disabled:null!=(s=e.disabled)&&s,maxWidth:e.maxWidth,zIndex:null!=(a=e.zIndex)?a:9999,onShow:e.onShow,onHide:e.onHide}:{content:"",placement:"top",trigger:"hover"}}function Un(e){return{options:e,tooltip:null,showTimeout:null,hideTimeout:null,isVisible:!1,handlers:{}}}const Bn=w({name:"tooltip",ssr:!1,mounted(e,t){const n=Vn(t.value);if(n.disabled||!n.content)return;const o=Un(n);e.__tooltip=o,Nn(e,o),e.setAttribute("aria-describedby","v-tooltip")},updated(e,t){const n=e.__tooltip,o=Vn(t.value);if(n){if("manual"===o.trigger){const t=n.options.disabled;return n.options=o,void(o.disabled&&!t?Rn(n):!o.disabled&&t&&Xn(e,n))}if(n.tooltip&&n.isVisible){const e=n.tooltip.querySelector(".v-tooltip__content");e&&(e.textContent=o.content)}n.options=o}else if(!o.disabled&&o.content){const t=Un(o);e.__tooltip=t,Nn(e,t),"manual"===o.trigger&&Xn(e,t)}},unmounted(e){var t;const n=e.__tooltip;n&&(n.showTimeout&&clearTimeout(n.showTimeout),n.hideTimeout&&clearTimeout(n.hideTimeout),null==(t=n.tooltip)||t.remove(),function(e,t){const{show:n,hide:o,toggle:r,docHide:l}=t.handlers;n&&(e.removeEventListener("mouseenter",n),e.removeEventListener("focus",n)),o&&(e.removeEventListener("mouseleave",o),e.removeEventListener("blur",o)),r&&e.removeEventListener("click",r),l&&document.removeEventListener("click",l)}(e,n),delete e.__tooltip)}}),Fn=(e,t,n,o)=>Math.sqrt(__pow(n-e,2)+__pow(o-t,2)),jn=(e,t,n,o)=>180*Math.atan2(o-t,n-e)/Math.PI,Wn=w({name:"touch",ssr:!1,mounted(e,t){const n=qn(t.value),o={options:n,startX:0,startY:0,startTime:0,startDistance:0,startAngle:0,lastScale:1,lastAngle:0,longPressTimer:null,isLongPress:!1,isMouseDown:!1,lastTouchEndTime:0,handlers:{touchStart:()=>{},touchMove:()=>{},touchEnd:()=>{}}};e.__touch=o;const r=()=>{o.longPressTimer&&(clearTimeout(o.longPressTimer),o.longPressTimer=null)},l=e=>{r(),o.options.enableLongPress&&o.options.onLongPress&&(o.longPressTimer=setTimeout(()=>{o.isLongPress=!0,o.options.onLongPress(e)},o.options.longPressTimeout||500))},i=(e,t)=>{const n=o.options.tapThreshold||10;return Math.abs(e-o.startX)>n||Math.abs(t-o.startY)>n},s=(e,t,n)=>{var r,l,i,s,a,u,c,d,p,v,f,m;if(o.isLongPress)return;const h=Date.now()-o.startTime,g=e-o.startX,b=t-o.startY,y=Math.sqrt(__pow(g,2)+__pow(b,2));if(o.options.enableSwipe&&y>=(o.options.swipeThreshold||30)&&h<=(o.options.swipeTimeout||500)){const e=Math.abs(g)>Math.abs(b)?g>0?"right":"left":b>0?"down":"up";null==(l=(r=o.options).onSwipe)||l.call(r,e,n),"left"===e?null==(s=(i=o.options).onSwipeLeft)||s.call(i,n):"right"===e?null==(u=(a=o.options).onSwipeRight)||u.call(a,n):"up"===e?null==(d=(c=o.options).onSwipeUp)||d.call(c,n):null==(v=(p=o.options).onSwipeDown)||v.call(p,n)}else o.options.enableTap&&y<(o.options.tapThreshold||10)&&h<(o.options.tapTimeout||250)&&(null==(m=(f=o.options).onTap)||m.call(f,n))},a=e=>{var t,n;if(e.touches.length>1&&e.preventDefault(),o.startTime=Date.now(),o.isLongPress=!1,1===e.touches.length)o.startX=e.touches[0].clientX,o.startY=e.touches[0].clientY,l(e);else if(2===e.touches.length){r();const[t,n]=e.touches;o.startDistance=Fn(t.clientX,t.clientY,n.clientX,n.clientY),o.startAngle=jn(t.clientX,t.clientY,n.clientX,n.clientY),o.lastScale=1,o.lastAngle=0}null==(n=(t=o.options).onTouchStart)||n.call(t,e)},u=e=>{var t,n;if(e.touches.length>=1&&e.preventDefault(),o.longPressTimer&&1===e.touches.length&&i(e.touches[0].clientX,e.touches[0].clientY)&&r(),2===e.touches.length){const[t,n]=e.touches,r=Fn(t.clientX,t.clientY,n.clientX,n.clientY),l=jn(t.clientX,t.clientY,n.clientX,n.clientY);if(o.options.enablePinch&&o.options.onPinch){const t=r/o.startDistance;Math.abs(t-o.lastScale)>=(o.options.pinchThreshold||.1)&&(o.options.onPinch(t,e),o.lastScale=t)}if(o.options.enableRotate&&o.options.onRotate){const t=l-o.startAngle;Math.abs(t-o.lastAngle)>5&&(o.options.onRotate(t,e),o.lastAngle=t)}}null==(n=(t=o.options).onTouchMove)||n.call(t,e)},c=e=>{var t,n;if(r(),0===e.touches.length){o.lastTouchEndTime=Date.now();const t=e.changedTouches[0];s(t.clientX,t.clientY,e)}null==(n=(t=o.options).onTouchEnd)||n.call(t,e)},d=e=>{var t,n;o.options.enableMouse&&(Date.now()-o.lastTouchEndTime<400||(e.preventDefault(),o.isMouseDown=!0,o.startTime=Date.now(),o.startX=e.clientX,o.startY=e.clientY,o.isLongPress=!1,l(e),null==(n=(t=o.options).onTouchStart)||n.call(t,e)))},p=e=>{var t,n;o.isMouseDown&&o.options.enableMouse&&(o.longPressTimer&&i(e.clientX,e.clientY)&&r(),null==(n=(t=o.options).onTouchMove)||n.call(t,e))},v=e=>{var t,n;o.isMouseDown&&o.options.enableMouse&&(o.isMouseDown=!1,r(),o.isLongPress||s(e.clientX,e.clientY,e),null==(n=(t=o.options).onTouchEnd)||n.call(t,e))};o.handlers={touchStart:a,touchMove:u,touchEnd:c,mouseDown:d,mouseMove:p,mouseUp:v},e.addEventListener("touchstart",a,{passive:!1}),e.addEventListener("touchmove",u,{passive:!1}),e.addEventListener("touchend",c),e.addEventListener("touchcancel",c),n.enableMouse&&(e.addEventListener("mousedown",d),document.addEventListener("mousemove",p),document.addEventListener("mouseup",v))},updated(e,t){const n=e.__touch;n&&(n.options=qn(t.value))},unmounted(e){const t=e.__touch;(null==t?void 0:t.longPressTimer)&&clearTimeout(t.longPressTimer),(null==t?void 0:t.handlers)&&(e.removeEventListener("touchstart",t.handlers.touchStart),e.removeEventListener("touchmove",t.handlers.touchMove),e.removeEventListener("touchend",t.handlers.touchEnd),e.removeEventListener("touchcancel",t.handlers.touchEnd),t.handlers.mouseDown&&e.removeEventListener("mousedown",t.handlers.mouseDown),t.handlers.mouseMove&&document.removeEventListener("mousemove",t.handlers.mouseMove),t.handlers.mouseUp&&document.removeEventListener("mouseup",t.handlers.mouseUp)),delete e.__touch}});function qn(e){var t,n,o,r,l,i,s,a,u,c,d,p;return{swipeThreshold:null!=(t=null==e?void 0:e.swipeThreshold)?t:30,swipeTimeout:null!=(n=null==e?void 0:e.swipeTimeout)?n:500,pinchThreshold:null!=(o=null==e?void 0:e.pinchThreshold)?o:.1,enableSwipe:null==(r=null==e?void 0:e.enableSwipe)||r,enablePinch:null==(l=null==e?void 0:e.enablePinch)||l,enableRotate:null==(i=null==e?void 0:e.enableRotate)||i,enableTap:null==(s=null==e?void 0:e.enableTap)||s,tapTimeout:null!=(a=null==e?void 0:e.tapTimeout)?a:250,tapThreshold:null!=(u=null==e?void 0:e.tapThreshold)?u:10,enableLongPress:null==(c=null==e?void 0:e.enableLongPress)||c,longPressTimeout:null!=(d=null==e?void 0:e.longPressTimeout)?d:500,enableMouse:null==(p=null==e?void 0:e.enableMouse)||p,onSwipe:null==e?void 0:e.onSwipe,onSwipeLeft:null==e?void 0:e.onSwipeLeft,onSwipeRight:null==e?void 0:e.onSwipeRight,onSwipeUp:null==e?void 0:e.onSwipeUp,onSwipeDown:null==e?void 0:e.onSwipeDown,onPinch:null==e?void 0:e.onPinch,onRotate:null==e?void 0:e.onRotate,onTap:null==e?void 0:e.onTap,onLongPress:null==e?void 0:e.onLongPress,onTouchStart:null==e?void 0:e.onTouchStart,onTouchMove:null==e?void 0:e.onTouchMove,onTouchEnd:null==e?void 0:e.onTouchEnd}}function Zn(e,t){const{position:n="both",chars:o}=t,r=o?`[\\s${l=o,l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}]`:"\\s";var l;switch(n){case"start":return e.replace(new RegExp(`^${r}+`,"g"),"");case"end":return e.replace(new RegExp(`${r}+$`,"g"),"");default:return e.replace(new RegExp(`^${r}+|${r}+$`,"g"),"")}}const Kn=w({name:"trim",ssr:!0,mounted(e,t){const n=Gn(t.value);if("INPUT"===e.tagName||"TEXTAREA"===e.tagName)!function(e,t){const n={options:t};e.__trim=n;const o=()=>{const n=e.value,o=Zn(n,t);n!==o&&(e.value=o,e.dispatchEvent(new Event("input",{bubbles:!0})))};if(t.onInput){const t=()=>{const t=e.value,n=e.selectionStart,o=t.replace(/\s+$/g,"");if(t!==o&&(e.value=o,null!==n)){const t=Math.min(n,o.length);e.setSelectionRange(t,t)}};e.addEventListener("input",t),n.inputHandler=t}if(t.onBlur){const t=()=>o();e.addEventListener("blur",t),n.blurHandler=t}e.value&&o()}(e,n);else{const t=e.textContent||"";e.textContent=Zn(t,n)}},updated(e,t){const n=Gn(t.value),o=e.__trim;if("INPUT"===e.tagName||"TEXTAREA"===e.tagName)o&&(o.options=n);else{const t=e.textContent||"";e.textContent=Zn(t,n)}},unmounted(e){const t=e.__trim;(null==t?void 0:t.inputHandler)&&e.removeEventListener("input",t.inputHandler),(null==t?void 0:t.blurHandler)&&e.removeEventListener("blur",t.blurHandler),delete e.__trim}});function Gn(e){var t,n,o;return void 0===e||!0===e?{position:"both",onInput:!0,onBlur:!0}:!1===e?{position:"both",onInput:!1,onBlur:!1}:"string"==typeof e?{position:e,onInput:!0,onBlur:!0}:{position:null!=(t=e.position)?t:"both",onInput:null==(n=e.onInput)||n,onBlur:null==(o=e.onBlur)||o,chars:e.chars}}const Jn=w({name:"truncate",ssr:!0,mounted(e,t){const n=eo(t.value),o=e.textContent||"",r={originalText:o,options:n};e.__truncate=r,Qn(e,o,n)},updated(e,t){const n=e.__truncate,o=eo(t.value);if(n){const t=n.originalText;JSON.stringify(o)!==JSON.stringify(n.options)&&(n.options=o,Qn(e,t,o))}else{const t=e.textContent||"";e.__truncate={originalText:t,options:o},Qn(e,t,o)}},unmounted(e){delete e.__truncate}});function Qn(e,t,n){const{useCss:o,showTitle:r=!0}=n;if(o)e.style.overflow="hidden",e.style.textOverflow="ellipsis",e.style.whiteSpace="nowrap",r&&t&&e.setAttribute("title",t);else{const o=function(e,t){const{length:n=100,position:o="end",ellipsis:r="..."}=t;if(e.length<=n)return e;switch(o){case"start":return r+e.slice(-(n-r.length));case"middle":{const t=Math.ceil((n-r.length)/2),o=Math.floor((n-r.length)/2);return e.slice(0,t)+r+e.slice(-o)}default:return e.slice(0,n-r.length)+r}}(t,n);e.textContent=o,r&&t&&t!==o&&e.setAttribute("title",t)}}function eo(e){var t,n,o,r,l;return"number"==typeof e?{length:e,position:"end",ellipsis:"...",useCss:!1,showTitle:!0}:{length:null!=(t=null==e?void 0:e.length)?t:100,position:null!=(n=null==e?void 0:e.position)?n:"end",ellipsis:null!=(o=null==e?void 0:e.ellipsis)?o:"...",useCss:null!=(r=null==e?void 0:e.useCss)&&r,showTitle:null==(l=null==e?void 0:e.showTitle)||l}}function to(e,t){return e?t.first?e.charAt(0).toUpperCase()+e.slice(1):e.toUpperCase():e}function no(e){var t,n;return void 0===e||!0===e?{first:!1,onInput:!0}:!1===e?{first:!1,onInput:!1}:{first:null!=(t=e.first)&&t,onInput:null==(n=e.onInput)||n}}const oo=w({name:"uppercase",ssr:!0,mounted(e,t){const n=no(t.value);if(T(e)){const t=x(e,n,e=>to(e,n));e.__uppercaseCleanup=t}else E(e,e=>to(e,n))},updated(e,t){const n=no(t.value);T(e)?n.onInput&&(e.value=to(e.value,n)):E(e,e=>to(e,n))},unmounted(e){const t=e.__uppercaseCleanup;null==t||t(),delete e.__uppercaseCleanup}});function ro(e){if("function"==typeof e.itemSize){let t=0;for(let n=0;n<e.items.length;n++)t+=e.itemSize(n);return t}return(e.itemSize||50)*e.items.length}function lo(e,t,n){const o=n.items,r=n.itemSize||50,l=n.overscan||3;let i=0,s=0,a=0;if("function"==typeof r){let n=0;for(let t=0;t<o.length;t++){const o=r(t);if(n+o>e){i=t,a=n;break}n+=o}for(s=i,n=a;s<o.length&&n<e+t;)n+=r(s),s++;i=Math.max(0,i-l),s=Math.min(o.length,s+l),n=0;for(let e=0;e<i;e++)n+=r(e);return a=n,{startIndex:i,endIndex:s,offsetY:a}}return i=Math.max(0,Math.floor(e/r)-l),s=Math.min(o.length,Math.ceil((e+t)/r)+l),a=i*r,{startIndex:i,endIndex:s,offsetY:a}}function io(e){var t,n,o,r;return Array.isArray(e)?{items:e,itemSize:50,height:400,overscan:3,keyField:"id"}:{items:e.items,itemSize:null!=(t=e.itemSize)?t:50,height:null!=(n=e.height)?n:400,overscan:null!=(o=e.overscan)?o:3,render:e.render,keyField:null!=(r=e.keyField)?r:"id",onScroll:e.onScroll,onVisibleChange:e.onVisibleChange}}function so(e,t,n){const o=document.createElement("div");o.className="v-virtual-list__item",o.dataset.index=String(t);const r=n.keyField||"id";"object"==typeof e&&null!==e&&r in e&&(o.dataset.key=String(e[r]));const l=function(e,t){return"function"==typeof e.itemSize?e.itemSize(t):e.itemSize||50}(n,t);return o.style.height=`${l}px`,o.style.boxSizing="border-box",n.render?o.innerHTML=n.render(e,t):o.textContent="object"==typeof e?JSON.stringify(e):String(e),o}const ao=w({name:"virtual-list",ssr:!1,mounted(e,t){const n=io(t.value);e.classList.add("v-virtual-list"),e.style.height="number"==typeof n.height?`${n.height}px`:n.height,e.style.overflow="auto",e.style.position="relative";const o=document.createElement("div");o.className="v-virtual-list__content",o.style.position="relative",o.style.height=`${ro(n)}px`,e.appendChild(o);const r=document.createElement("div");r.className="v-virtual-list__visible",r.style.position="absolute",r.style.top="0",r.style.left="0",r.style.right="0",o.appendChild(r);const l={options:n,containerEl:e,contentEl:o,scrollHandler:null,resizeObserver:null,startIndex:0,endIndex:0,visibleItems:[]};e.__virtualList=l;const i=t=>{const n=e.scrollTop,o=e.clientHeight,{startIndex:i,endIndex:s,offsetY:a}=lo(n,o,l.options);i===l.startIndex&&s===l.endIndex||(l.startIndex=i,l.endIndex=s,uo(r,l,a),l.options.onVisibleChange&&l.options.onVisibleChange(i,s)),l.options.onScroll&&l.options.onScroll(n)};l.scrollHandler=i,e.addEventListener("scroll",i,{passive:!0});const{startIndex:s,endIndex:a,offsetY:u}=lo(0,e.clientHeight,n);if(l.startIndex=s,l.endIndex=a,uo(r,l,u),"undefined"!=typeof ResizeObserver){const t=new ResizeObserver(()=>{i(new Event("scroll"))});t.observe(e),l.resizeObserver=t}},updated(e,t){var n;const o=e.__virtualList;if(!o)return;const r=io(t.value);o.options=r,o.contentEl&&(o.contentEl.style.height=`${ro(r)}px`);const l=e.scrollTop,i=e.clientHeight,{startIndex:s,endIndex:a,offsetY:u}=lo(l,i,r);o.startIndex=s,o.endIndex=a;const c=null==(n=o.contentEl)?void 0:n.querySelector(".v-virtual-list__visible");c&&uo(c,o,u)},unmounted(e){const t=e.__virtualList;t&&(t.scrollHandler&&e.removeEventListener("scroll",t.scrollHandler),t.resizeObserver&&t.resizeObserver.disconnect(),delete e.__virtualList)}});function uo(e,t,n){const{options:o,startIndex:r,endIndex:l}=t;e.style.transform=`translateY(${n}px)`,e.innerHTML="";for(let t=r;t<l;t++){const n=o.items[t];if(void 0!==n){const r=so(n,t,o);e.appendChild(r)}}}function co(e){return"boolean"==typeof e?{initial:e}:__spreadValues({initial:!0,disabled:!1,useHidden:!1},e)}const po=w({name:"visible",ssr:!0,defaults:{initial:!0,disabled:!1,useHidden:!1},mounted(e,t){var n,o;if(!v())return;const r=co(t.value),l=e.style.display,i=e.style.visibility,s={options:r,isVisible:null==(n=r.initial)||n,originalDisplay:l,originalVisibility:i,transitionEndHandler:t=>{"opacity"!==t.propertyName&&"visibility"!==t.propertyName||e.dispatchEvent(new CustomEvent("visible:transition-end",{detail:{isVisible:s.isVisible}}))}};e.__visible=s,Y(e,"transitionend",s.transitionEndHandler),vo(e,s,null==(o=r.initial)||o)},updated(e,t){var n;const o=e.__visible;if(!o)return;const r=co(t.value);let l;l="boolean"==typeof t.value?t.value:null==(n=r.initial)||n,o.isVisible!==l&&vo(e,o,l),o.options=r},unmounted(e){const t=e.__visible;t&&($(e,"transitionend",t.transitionEndHandler),e.style.display=t.originalDisplay,e.style.visibility=t.originalVisibility,delete e.__visible)}});function vo(e,t,n){const o=t.isVisible;if(t.isVisible=n,n?(e.classList.remove("v-hidden"),e.classList.add("v-visible")):(e.classList.remove("v-visible"),e.classList.add("v-hidden")),t.options.useHidden)if(n)e.style.visibility=t.originalVisibility||"visible";else{if("0s"!==getComputedStyle(e).transitionDuration){const n=o=>{o.target!==e||"opacity"!==o.propertyName&&"transform"!==o.propertyName||(t.isVisible||(e.style.visibility="hidden"),e.removeEventListener("transitionend",n))};e.addEventListener("transitionend",n)}else e.style.visibility="hidden"}else e.style.display=n?t.originalDisplay:"none";e.dispatchEvent(new CustomEvent("visible:change",{detail:{isVisible:n,previousVisibility:o}})),t.options.handler&&o!==n&&t.options.handler(n)}function fo(e){var t;const n=document.createElement("canvas"),o=n.getContext("2d");if(!o)throw new Error("[Directix] v-watermark: Could not get canvas context");const r=e.width||300,l=e.height||200,i=e.fontSize||16,s=e.fontFamily||"sans-serif",a=e.fontWeight||"normal",u=e.color||"rgba(128, 128, 128, 0.15)",c=null!=(t=e.rotate)?t:-22;n.width=r,n.height=l,o.font=`${a} ${i}px ${s}`,o.fillStyle=u,o.textAlign="center",o.textBaseline="middle",o.translate(r/2,l/2),o.rotate(c*Math.PI/180);const d=Array.isArray(e.content)?e.content:[e.content],p=1.5*i,v=-(d.length-1)*p/2;return d.forEach((e,t)=>{o.fillText(e,0,v+t*p)}),n}function mo(e,t){var n;const o=Array.isArray(t.gap)?t.gap:[t.gap||100,t.gap||100],r=null!=(n=t.zIndex)?n:9999,l=document.createElement("div");return l.className="v-watermark",l.style.cssText=`\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tpointer-events: none;\n\t\tz-index: ${r};\n\t\tbackground-image: url("${e.toDataURL()}");\n\t\tbackground-repeat: repeat;\n\t\tbackground-position: ${o[0]/2}px ${o[1]/2}px;\n\t\tbackground-size: ${e.width+o[0]}px ${e.height+o[1]}px;\n\t`,l}function ho(e){var t,n,o,r,l,i,s,a,u,c,d;return"string"==typeof e?{content:e}:{content:e.content,width:null!=(t=e.width)?t:300,height:null!=(n=e.height)?n:200,rotate:null!=(o=e.rotate)?o:-22,fontSize:null!=(r=e.fontSize)?r:16,fontFamily:null!=(l=e.fontFamily)?l:"sans-serif",fontWeight:null!=(i=e.fontWeight)?i:"normal",color:null!=(s=e.color)?s:"rgba(128, 128, 128, 0.15)",gap:null!=(a=e.gap)?a:[100,100],zIndex:null!=(u=e.zIndex)?u:9999,disabled:null!=(c=e.disabled)&&c,protect:null==(d=e.protect)||d}}const go=w({name:"watermark",ssr:!0,mounted(e,t){const n=ho(t.value);"static"===getComputedStyle(e).position&&(e.style.position="relative");const o={options:n,watermarkEl:null,observer:null,canvas:null};e.__watermark=o,n.disabled||bo(e,o)},updated(e,t){const n=e.__watermark;if(!n)return;const o=ho(t.value);o.disabled&&!n.options.disabled?yo(n):!o.disabled&&n.options.disabled?(n.options=o,bo(e,n)):o.disabled||(n.options=o,yo(n),bo(e,n)),n.options=o},unmounted(e){const t=e.__watermark;t&&(yo(t),delete e.__watermark)}});function bo(e,t){const n=t.options;t.canvas=fo(n),t.watermarkEl=mo(t.canvas,n),e.appendChild(t.watermarkEl),n.protect&&function(e,t){if("undefined"==typeof MutationObserver)return;t.observer=new MutationObserver(n=>{t.watermarkEl&&e.contains(t.watermarkEl)||t.options.disabled||(t.canvas=fo(t.options),t.watermarkEl=mo(t.canvas,t.options),e.appendChild(t.watermarkEl));for(const e of n)if("attributes"===e.type&&e.target===t.watermarkEl){const e=Array.isArray(t.options.gap)?t.options.gap:[t.options.gap||100,t.options.gap||100];t.watermarkEl.style.display="block",t.watermarkEl.style.visibility="visible",t.watermarkEl.style.opacity="1",t.canvas&&(t.watermarkEl.style.backgroundImage=`url("${t.canvas.toDataURL()}")`),t.watermarkEl.style.backgroundSize=`${t.canvas.width+e[0]}px ${t.canvas.height+e[1]}px`}}),t.observer.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style","class","hidden"]})}(e,t)}function yo(e){e.observer&&(e.observer.disconnect(),e.observer=null),e.watermarkEl&&e.watermarkEl.parentNode&&e.watermarkEl.parentNode.removeChild(e.watermarkEl),e.watermarkEl=null,e.canvas=null}const wo=["a","an","the","and","but","or","for","nor","on","at","to","from","by","in","of","with","as"];function _o(e){return e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():e}function xo(e,t={}){if(!e)return e;const{every:n=!0,keepLower:o=wo}=t;if(n){return e.toLowerCase().split(/\s+/).map((e,t)=>0===t?_o(e):o.includes(e.toLowerCase())?e.toLowerCase():_o(e)).join(" ")}return _o(e)}function Eo(e){return __async(this,null,function*(){if(b())try{return yield navigator.clipboard.writeText(e),!0}catch(e){console.warn("[Directix] Clipboard API failed, falling back to execCommand")}return function(e){if(!v())return!1;const t=document.createElement("textarea");t.value=e,t.style.cssText="\n position: fixed;\n top: -9999px;\n left: -9999px;\n opacity: 0;\n pointer-events: none;\n ",document.body.appendChild(t);try{return t.select(),t.setSelectionRange(0,t.value.length),document.execCommand("copy")}catch(e){return!1}finally{document.body.removeChild(t)}}(e)})}function To(e){return e instanceof Date?e.getTime():"number"==typeof e?e:new Date(e).getTime()}function Lo(e){const t=Math.max(0,e);return{days:Math.floor(t/864e5),hours:Math.floor(t%864e5/36e5),minutes:Math.floor(t%36e5/6e4),seconds:Math.floor(t%6e4/1e3),milliseconds:t%1e3,total:t}}function ko(e,t){if("function"==typeof t)return t(e);const n=(e,t=2)=>String(e).padStart(t,"0");return t.replace(/dd/gi,n(e.days)).replace(/hh/gi,n(e.hours)).replace(/mm/gi,n(e.minutes)).replace(/ss/gi,n(e.seconds)).replace(/S{3}/gi,n(e.milliseconds,3)).replace(/SS/gi,n(Math.floor(e.milliseconds/10))).replace(/S/gi,String(Math.floor(e.milliseconds/100)))}function Co(e){if(e.type.startsWith("touch")){const t=e.touches[0]||e.changedTouches[0];return{clientX:t.clientX,clientY:t.clientY}}const t=e;return{clientX:t.clientX,clientY:t.clientY}}function So(e,t=14,n="sans-serif"){if("undefined"==typeof document)return 8*e.length;const o=document.createElement("canvas").getContext("2d");return o?(o.font=`${t}px ${n}`,o.measureText(e).width):8*e.length}function Do(e,t,n="...",o=14,r="sans-serif"){if(t<=0)return e;if(So(e,o,r)<=t)return e;const l=t-So(n,o,r);if(l<=0)return n;let i=0,s=e.length;for(;i<s;){const t=Math.floor((i+s+1)/2);So(e.slice(0,t),o,r)<=l?i=t:s=t-1}return e.slice(0,i)+n}const Io=new Set(["input","textarea","select","button"]);const Mo={esc:"Escape",space:" ",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",enter:"Enter",tab:"Tab",backspace:"Backspace",delete:"Delete",insert:"Insert",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown",plus:"+",minus:"-"},Po=new Set(["ctrl","alt","shift","meta"]);function Oo(e){const t=e.toLowerCase().split("+").map(e=>e.trim()),n=new Set;let o="";for(const e of t)Po.has(e)?n.add(e):o=Mo[e]||e;return{key:o,modifiers:n}}function zo(e,t){if(t.modifiers.has("ctrl")!==(e.ctrlKey||e.metaKey))return!1;if(t.modifiers.has("alt")!==e.altKey)return!1;if(t.modifiers.has("shift")!==e.shiftKey)return!1;if(t.modifiers.has("meta")!==e.metaKey)return!1;const n=e.key,o=t.key;return n.toLowerCase()===o.toLowerCase()}function Ho(e){return"touches"in e&&e.touches.length>0?{x:e.touches[0].clientX,y:e.touches[0].clientY}:"clientX"in e?{x:e.clientX,y:e.clientY}:{x:0,y:0}}function Yo(e,t=!1){return e?t?e.charAt(0).toLowerCase()+e.slice(1):e.toLowerCase():e}function $o(e,t={}){const{precision:n=2,separator:o=",",decimal:r=".",symbol:l="$",symbolPosition:i="before"}=t,s=e.toFixed(n),[a,u]=s.split(".");let c=a.replace(/\B(?=(\d{3})+(?!\d))/g,o);return n>0&&u&&(c+=r+u),"before"===i?l+c:c+l}function Ao(e,t={}){const{decimal:n=".",symbol:o="$"}=t;let r=e.replace(new RegExp(`[${o}\\s]`,"g"),"");return"."!==n?(r=r.replace(/,/g,""),r=r.replace(new RegExp(`\\${n}`,"g"),".")):r=r.replace(/,/g,""),parseFloat(r)||0}function Xo(e,t={}){const{precision:n=0,separator:o=",",decimal:r=".",prefix:l="",suffix:i=""}=t,s=e.toFixed(n),[a,u]=s.split(".");let c=a.replace(/\B(?=(\d{3})+(?!\d))/g,o);return n>0&&u&&(c+=r+u),l+c+i}function Ro(e,t={}){const{decimal:n=".",prefix:o="",suffix:r=""}=t;let l=e.replace(new RegExp(`^${No(o)}`),"").replace(new RegExp(`${No(r)}$`),"").replace(/\s/g,"");return"."!==n?(l=l.replace(/,/g,""),l=l.replace(new RegExp(`\\${n}`,"g"),".")):l=l.replace(/,/g,""),parseFloat(l)||0}function No(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Vo(e,t){return t.includes("*")||t.includes(e)}function Uo(e){const t=e.querySelectorAll("img"),n=[];return t.forEach(e=>{e.complete||n.push(new Promise(t=>{e.onload=()=>t(),e.onerror=()=>t()}))}),Promise.all(n)}function Bo(e,t){let n="";"undefined"!=typeof document&&document.querySelectorAll('style, link[rel="stylesheet"]').forEach(e=>{if("STYLE"===e.tagName)n+=`<style>${e.textContent}</style>`;else if("LINK"===e.tagName){const t=e.href;n+=`<link rel="stylesheet" href="${t}">`}}),t.cssUrls.forEach(e=>{n+=`<link rel="stylesheet" href="${e}">`}),t.styles&&(n+=`<style>${t.styles}</style>`),n+=`\n\t\t<style>\n\t\t\t@media print {\n\t\t\t\tbody { margin: 0; padding: 20px; }\n\t\t\t\t${t.printClass?`.${t.printClass} { page-break-inside: avoid; }`:""}\n\t\t\t}\n\t\t</style>\n\t`;const o=t.title||("undefined"!=typeof document?document.title:"Print"),r=e.outerHTML;return`<!DOCTYPE html>\n<html>\n<head>\n\t<meta charset="utf-8">\n\t<title>${o}</title>\n\t${n}\n</head>\n<body>\n\t${r}\n</body>\n</html>`}function Fo(e={}){const{title:n,styles:o,cssUrls:r=[],onBeforePrint:l,onAfterPrint:i,newWindow:s=!1,printClass:a}=e,u=t.ref(!1);function c(e){return __async(this,null,function*(){if(l){if(!1===l())return}u.value=!0;try{let l=null;if(l="string"==typeof e?document.querySelector(e):e instanceof HTMLElement?e:document.body,!l)return void console.warn("[Directix] usePrint: Target element not found");const u={title:t.unref(n)||"",styles:Array.isArray(t.unref(o))?t.unref(o).join("\n"):t.unref(o)||"",cssUrls:t.unref(r)||[],printClass:t.unref(a)};t.unref(s)?yield function(e,t){return __async(this,null,function*(){const n=window.open("","_blank");if(!n)return void console.warn("[Directix] usePrint: Could not open print window");const o=Bo(e,t);n.document.open(),n.document.write(o),n.document.close(),yield Uo(n.document),n.focus(),n.print(),setTimeout(()=>{n.close()},1e3)})}(l,u):yield function(e,t){return __async(this,null,function*(){var n,o,r;const l=document.createElement("iframe");l.style.cssText="position: absolute; top: -10000px; left: -10000px; width: 0; height: 0; border: none;",document.body.appendChild(l);const i=l.contentDocument||(null==(n=l.contentWindow)?void 0:n.document);if(!i)return console.warn("[Directix] usePrint: Could not access iframe document"),void document.body.removeChild(l);const s=Bo(e,t);i.open(),i.write(s),i.close(),yield Uo(i);try{null==(o=l.contentWindow)||o.focus(),null==(r=l.contentWindow)||r.print()}catch(e){console.error("[Directix] usePrint: Print failed",e)}setTimeout(()=>{document.body.removeChild(l)},1e3)})}(l,u),i&&i()}finally{u.value=!1}})}return t.onUnmounted(()=>{}),{isPrinting:u,print:c,printPage:function(){return __async(this,null,function*(){yield c()})}}}function jo(e){return new Promise(t=>setTimeout(t,e))}function Wo(e,t,n){let o=0,r=0,l=0,i=0;if(e===window)o=window.scrollX||document.documentElement.scrollLeft,r=window.scrollY||document.documentElement.scrollTop,l=document.documentElement.scrollWidth-window.innerWidth,i=document.documentElement.scrollHeight-window.innerHeight;else{const t=e;o=t.scrollLeft,r=t.scrollTop,l=t.scrollWidth-t.clientWidth,i=t.scrollHeight-t.clientHeight}return{scrollLeft:o,scrollTop:r,scrollLeftMax:l,scrollTopMax:i,progressX:l>0?o/l:0,progressY:i>0?r/i:0,directionX:o!==t?o>t?1:-1:0,directionY:r!==n?r>n?1:-1:0}}const qo=["left","right","up","down"];function Zo(e,t="both",n){const o=n?`[\\s${r=n,r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}]`:"\\s";var r;switch(t){case"start":return e.replace(new RegExp(`^${o}+`,"g"),"");case"end":return e.replace(new RegExp(`${o}+$`,"g"),"");default:return e.replace(new RegExp(`^${o}+|${o}+$`,"g"),"")}}function Ko(e,t=!1){return e?t?e.charAt(0).toUpperCase()+e.slice(1):e.toUpperCase():e}function Go(e){const t=document.createElement("canvas"),n=t.getContext("2d");if(!n)throw new Error("[Directix] useWatermark: Could not get canvas context");const{content:o,width:r,height:l,fontSize:i,fontFamily:s,fontWeight:a,color:u,rotate:c}=e;t.width=r,t.height=l,n.font=`${a} ${i}px ${s}`,n.fillStyle=u,n.textAlign="center",n.textBaseline="middle",n.translate(r/2,l/2),n.rotate(c*Math.PI/180);const d=Array.isArray(o)?o:[o],p=1.5*i,v=-(d.length-1)*p/2;return d.forEach((e,t)=>{n.fillText(e,0,v+t*p)}),t}const Jo={"click-outside":ne,"click-delay":te,copy:ie,debounce:me,throttle:Sn,focus:Le,hotkey:He,lazy:st,intersect:Qe,visible:po,loading:ut,scroll:vn,"infinite-scroll":qe,sticky:yn,"long-press":vt,hover:Re,ripple:nn,mask:Tt,permission:Yt,sanitize:cn,resize:en,mutation:Pt,truncate:Jn,ellipsis:we,uppercase:oo,lowercase:ht,capitalcase:D,number:Ot,money:It,trim:Kn,tooltip:Bn,draggable:ye,touch:Wn,swipe:kn,"image-preview":je,countdown:de,watermark:go,print:$t,"virtual-list":ao,"pull-refresh":Jt},Qo={install:(e,t={})=>{var n,o,r,l,i,s,a;let u=null;if("function"==typeof e&&(null==(n=e.version)?void 0:n.startsWith("2")))u=2;else if((null==e?void 0:e.config)&&(null==(o=null==e?void 0:e.version)?void 0:o.startsWith("3")))u=3;else if("function"==typeof(null==e?void 0:e.directive)&&"function"==typeof(null==e?void 0:e.mixin)&&(null==(r=e.version)?void 0:r.startsWith("2")))u=2;else if("undefined"!=typeof window){const e=window;(null==(i=null==(l=e.Vue)?void 0:l.version)?void 0:i.startsWith("2"))?u=2:(null==(a=null==(s=e.Vue)?void 0:s.version)?void 0:a.startsWith("3"))&&(u=3)}u&&p(u);const{directives:c,all:d=!1}=t;d||!c?Object.entries(Jo).forEach(([t,n])=>{e.directive(t,n)}):c.forEach(t=>{const n=Jo[t];n?e.directive(t,n):console.warn(`[Directix] Unknown directive: ${t}`)})}};e.Directix=Qo,e.addCleanupVue2=function(e,t){const n=e.__directix_state__;n&&n.cleanup.push(t)},e.addCleanupVue3=function(e,t){const n=e.__directix_state__;n&&n.cleanup.push(t)},e.calculateTime=Lo,e.capitalizeText=xo,e.capitalizeWord=_o,e.createCapitalizer=function(e={}){return t=>xo(t,e)},e.createDelayedClick=function(e,t=300){let n=!1;return o=>{if(n)return o.preventDefault(),void o.stopPropagation();n=!0,e(o),setTimeout(()=>{n=!1},t)}},e.createLowercaser=function(e=!1){return t=>Yo(t,e)},e.createMoneyFormatter=function(e={}){return t=>$o(t,e)},e.createNumberFormatter=function(e={}){return t=>Xo(t,e)},e.createPermissionChecker=function(e){const{getPermissions:t,getRoles:n,roleMap:o={}}=e;return(e,r="some")=>{const l=t(),i=(null==n?void 0:n())||[],s=Array.isArray(e)?e:[e];function a(e){if(e in o)return i.includes(e);if(Vo(e,l))return!0;for(const t of i){if(Vo(e,o[t]||[]))return!0}return!1}return"every"===r?s.every(a):s.some(a)}},e.createTrimmer=function(e="both",t){return n=>Zo(n,e,t)},e.createUppercaser=function(e=!1){return t=>Ko(t,e)},e.createVue2Directive=n,e.createVue3Directive=r,e.createWatermarkUrl=function(e,t={}){var n,o,r,l,i;return Go({content:e,width:null!=(n=t.width)?n:300,height:null!=(o=t.height)?o:200,fontSize:null!=(r=t.fontSize)?r:16,fontFamily:"sans-serif",fontWeight:"normal",color:null!=(l=t.color)?l:"rgba(128, 128, 128, 0.15)",rotate:null!=(i=t.rotate)?i:-22}).toDataURL()},e.debounceFn=function(e,t=300,n){return q(e,t,n)},e.deepClone=function e(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(t=>e(t));const n={};for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=e(t[o]));return n},e.deepMerge=function e(t,...n){if(!n.length)return t;const o=n.shift();if(j(t)&&j(o))for(const n in o)j(o[n])?(t[n]||Object.assign(t,{[n]:{}}),e(t[n],o[n])):Object.assign(t,{[n]:o[n]});return e(t,...n)},e.defineDirective=w,e.defineDirectiveGroup=function(e,t){return{name:e,directives:t,install(n,o){Object.entries(t).forEach(([t,o])=>{const r=`${e}-${t}`;n.directive(r,o)})}}},e.formatMoney=$o,e.formatNumber=Xo,e.formatTime=ko,e.generateId=function(e=""){return`${e}${Date.now().toString(36)}${Math.random().toString(36).slice(2,9)}`},e.get=function(e,t,n){const o=t.split(".");let r=e;for(const e of o){if(null==r)return n;r=r[e]}return void 0===r?n:r},e.getVueVersion=d,e.isArray=W,e.isBoolean=function(e){return"boolean"==typeof e},e.isBrowser=v,e.isEmpty=function(e){return null==e||(B(e)||W(e)?0===e.length:!!j(e)&&0===Object.keys(e).length)},e.isFunction=F,e.isNumber=function(e){return"number"==typeof e&&!isNaN(e)},e.isObject=j,e.isPromise=function(e){return j(e)&&F(e.then)},e.isSSR=f,e.isString=B,e.isVue2=function(){if(null===s){const e=d();s=2===e||2.7===e}return s},e.isVue27=function(){return null===a&&(a=2.7===d()),a},e.isVue3=function(){return null===u&&(u=3===d()),u},e.lowercaseText=Yo,e.parseMoney=Ao,e.parseNumber=Ro,e.parseTargetTime=To,e.parseTime=K,e.quickPrint=function(e){return __async(this,arguments,function*(e,t={}){const{print:n}=Fo(t);yield n(e)})},e.resetVueVersion=function(){i=null,s=null,a=null,u=null},e.set=function(e,t,n){const o=t.split("."),r=o.pop();let l=e;for(const e of o)void 0===l[e]&&(l[e]={}),l=l[e];l[r]=n},e.setVueVersion=p,e.supportsClipboard=b,e.supportsIntersectionObserver=h,e.supportsMutationObserver=y,e.supportsPassive=m,e.supportsResizeObserver=g,e.throttleFn=function(e,t=300,n){return Z(e,t,n)},e.trimText=Zo,e.truncateText=function(e,t,n="..."){return!e||e.length<=t?e:e.slice(0,t-n.length)+n},e.uppercaseText=Ko,e.useCapitalcase=function(e){const{text:n,every:o=!0,keepLower:r=wo}=e,l=t.ref(t.unref(n)),i=t.ref("");return t.watch(()=>[t.unref(n),t.unref(o),t.unref(r)],()=>function(){const e=t.unref(n),s=t.unref(o),a=t.unref(r);l.value=e,i.value=xo(e,{every:s,keepLower:a})}(),{immediate:!0}),{capitalized:i,original:l}},e.useClickDelay=function(e){const{handler:n,delay:o=300,disabled:r=!1}=e,l=t.ref(!1);let i=null;function s(){i&&(clearTimeout(i),i=null)}return t.onUnmounted(()=>{s()}),{isPending:l,click:function(e){if(t.unref(r)||l.value)return e.preventDefault(),void e.stopPropagation();l.value=!0,n(e),i=setTimeout(()=>{l.value=!1,i=null},t.unref(o))},reset:function(){i&&(clearTimeout(i),i=null),l.value=!1},cancel:s}},e.useClickOutside=function(e){const{handler:n,exclude:o=[],capture:r=!0,events:l=["click"],stop:i=!1,prevent:s=!1}=e;let a=null;const u=new Map;function c(e){return e=>{a&&function(e,n,o){const r=n.target;if(e.contains(r))return!1;if(null==o?void 0:o.length)for(const e of o){const n="function"==typeof e?e():t.unref(e),o="string"==typeof n?z(n):n;if(o&&(o===r||o.contains(r)))return!1}return!0}(a,e,o)&&(i&&e.stopPropagation(),s&&e.preventDefault(),n(e))}}function d(){u.forEach((e,t)=>{document.removeEventListener(t,e,{capture:r})}),u.clear(),a=null}return t.onUnmounted(()=>{d()}),{bind:function(e){return v()?(d(),a=e,l.forEach(e=>{const t=c();u.set(e,t),document.addEventListener(e,t,{capture:r,passive:!s})}),d):()=>{}}}},e.useCopy=function(e={}){const{source:n,onSuccess:o,onError:r,copiedTimeout:l=1500}=e,i=t.ref(!1),s=t.ref(null),a=b()||v();let u=null;return{copy:function(e){return __async(this,null,function*(){const a=null!=e?e:t.unref(n);if(!a)return console.warn("[Directix] useCopy: No text to copy"),!1;u&&(clearTimeout(u),u=null),s.value=null;try{if(yield Eo(a))return i.value=!0,null==o||o(a),u=setTimeout(()=>{i.value=!1,u=null},l),!0;throw new Error("Copy failed")}catch(e){const t=e;return s.value=t,i.value=!1,null==r||r(t),!1}})},copied:t.readonly(i),error:t.readonly(s),isSupported:a}},e.useCountdown=function(e){const{target:n,format:o="hh:mm:ss",onComplete:r,onTick:l,interval:i=1e3,autoStart:s=!0}=e,a=t.ref(Lo(0)),u=t.ref(""),c=t.ref(!1),d=t.ref(!1),p=t.ref(!1);let v=null,f=0,m=0;const h=()=>t.unref(i),g=()=>t.unref(o);function b(){const e=Date.now(),t=f-e;if(t<=0)return a.value=Lo(0),u.value=ko(a.value,g()),p.value=!0,c.value=!1,w(),void(r&&r());a.value=Lo(t),u.value=ko(a.value,g()),l&&l(a.value)}function y(){c.value||(f=To(t.unref(n)),c.value=!0,d.value=!1,p.value=!1,b(),v=setInterval(b,h()))}function w(){v&&(clearInterval(v),v=null),c.value=!1}return t.watch(()=>t.unref(n),e=>{c.value&&(f=To(e))}),t.unref(s)&&y(),t.onUnmounted(()=>{w()}),{time:a,formatted:u,running:c,paused:d,completed:p,start:y,pause:function(){c.value&&(m=f-Date.now(),w(),d.value=!0)},resume:function(){!c.value&&d.value&&(f=Date.now()+m,c.value=!0,d.value=!1,b(),v=setInterval(b,h()))},reset:function(){w(),d.value=!1,p.value=!1,m=0,a.value=Lo(0),u.value=ko(a.value,g())}}},e.useDebounce=function(e){const{handler:n,wait:o=300,leading:r=!1,trailing:l=!0}=e;let i=null,s=null,a=null;const u=()=>{s&&(n.apply(a,s),s=null,a=null)};function c(){i&&(clearTimeout(i),i=null),s=null,a=null}return t.onUnmounted(()=>{c()}),{run:function(...e){s=e,a=this,i&&clearTimeout(i),t.unref(r)&&!i&&u(),i=setTimeout(()=>{t.unref(l)&&u(),i=null},t.unref(o))},cancel:c,flush:function(){i&&(clearTimeout(i),u(),i=null)},pending:function(){return null!==i}}},e.useDraggable=function(e={}){const{axis:n="both",constrain:o=!1,boundary:r,handle:l,grid:i,disabled:s=!1,onStart:a,onDrag:u,onEnd:c}=e,d=t.ref({x:0,y:0}),p=t.ref(!1);let f=null,m=null,h=0,g=0,b=0,y=0,w=0,_=0,x=0,E=0,T=0,L=0;function k(e){var n;if(t.unref(s))return;e.preventDefault();const{clientX:l,clientY:i}=Co(e);p.value=!0,h=l,g=i;const{x:u,y:c}=function(e){const t=e.match(/translate\(([-\d.]+)px,\s*([-\d.]+)px\)/);return t?{x:parseFloat(t[1]),y:parseFloat(t[2])}:{x:0,y:0}}(f.style.transform);if(b=u,y=c,t.unref(o)||r){const e=r?function(e){var t,n;if(!e)return null;if("function"==typeof e){const n=e();return null!=(t=null==n?void 0:n.getBoundingClientRect())?t:null}if("string"==typeof e){const t=document.querySelector(e);return null!=(n=null==t?void 0:t.getBoundingClientRect())?n:null}return e.getBoundingClientRect()}(r):null==(n=f.parentElement)?void 0:n.getBoundingClientRect();if(e){const t=f.getBoundingClientRect();w=t.left-e.left,_=t.top-e.top,x=e.width,E=e.height,T=t.width,L=t.height}}f.classList.add("v-draggable--dragging"),document.addEventListener("mousemove",C),document.addEventListener("mouseup",S),document.addEventListener("touchmove",C,{passive:!1}),document.addEventListener("touchend",S),null==a||a({x:b,y:y},e)}function C(e){if(!p.value||t.unref(s))return;e.preventDefault();const{clientX:l,clientY:a}=Co(e);let c=l-h,v=a-g,m=b+c,k=y+v;const C=t.unref(n);"x"===C?v=0:"y"===C&&(c=0);const S=t.unref(i);if(S&&(c=Math.round(c/S[0])*S[0],v=Math.round(v/S[1])*S[1]),t.unref(o)||r){const e=w+c,t=_+v,n=x-T,o=E-L,r=Math.max(0,Math.min(e,n)),l=Math.max(0,Math.min(t,o));m=b+(r-w),k=y+(l-_)}f.style.transform=`translate(${m}px, ${k}px)`,d.value={x:m,y:k},null==u||u({x:m,y:k},e)}function S(e){p.value&&(p.value=!1,null==f||f.classList.remove("v-draggable--dragging"),document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",S),document.removeEventListener("touchmove",C),document.removeEventListener("touchend",S),null==c||c(__spreadValues({},d.value),e))}function D(){if(f){const e=m||f;e.removeEventListener("mousedown",k),e.removeEventListener("touchstart",k)}f=null,m=null}return t.onUnmounted(()=>{D()}),{position:t.readonly(d),isDragging:t.readonly(p),reset:function(){f&&(f.style.transform="translate(0px, 0px)",d.value={x:0,y:0})},bind:function(e){if(!v())return()=>{};D(),f=e,"static"===getComputedStyle(e).position&&(e.style.position="absolute"),m=l?e.querySelector(l):null;const t=m||e;return t.addEventListener("mousedown",k),t.addEventListener("touchstart",k,{passive:!1}),D}}},e.useEllipsis=function(e){const{text:n,lines:o=1,ellipsis:r="...",maxWidth:l=0}=e,i=t.ref(t.unref(n)),s=t.ref(""),a=t.ref(!1);return t.watch(()=>[t.unref(n),t.unref(o),t.unref(r),t.unref(l)],()=>function(){const e=t.unref(n),u=t.unref(o),c=t.unref(r),d=t.unref(l);if(i.value=e,!e)return s.value="",void(a.value=!1);if(d>0){const t=Do(e,d,c);s.value=t,a.value=t!==e}else if(u>1){const t=function(e,t,n="..."){if(t<=0)return"";const o=80*t;return e.length<=o?e:e.slice(0,o-n.length)+n}(e,u,c);s.value=t,a.value=t!==e}else s.value=e,a.value=!1}(),{immediate:!0}),t.onUnmounted(()=>{}),{truncated:s,isTruncated:a,original:i,calculateForWidth:function(e){const o=t.unref(n),l=t.unref(r);return!o||e<=0?o||"":Do(o,e,l)},wouldTruncate:function(e){const o=t.unref(n);return!(!o||e<=0)&&So(o)>e}}},e.useFocus=function(e={}){const{onFocus:n,onBlur:o}=e,r=t.ref(!1);let l=null,i=null,s=null;function a(){l&&(i&&l.removeEventListener("focus",i),s&&l.removeEventListener("blur",s)),l=null,i=null,s=null,r.value=!1}return t.onUnmounted(()=>{a()}),{isFocused:t.readonly(r),focus:function(){l&&function(e){if(!v())return!1;const t=e.tagName.toLowerCase();if(Io.has(t))return!e.disabled;if(e.isContentEditable)return!0;const n=e.getAttribute("tabindex");return null!=n?"-1"!==n:("a"===t||"area"===t)&&e.hasAttribute("href")}(l)&&l.focus()},blur:function(){l&&l.blur()},bind:function(e){return v()?(a(),l=e,i=e=>{r.value=!0,null==n||n(e)},s=e=>{r.value=!1,null==o||o(e)},e.addEventListener("focus",i),e.addEventListener("blur",s),r.value=document.activeElement===e,a):()=>{}}}},e.useHotkey=function(e={}){const{hotkey:n,hotkeys:o=[],target:r,enabled:l=!0}=e,i=t.ref(t.unref(l)),s=new Map;let a=null,u=null,c=null;function d(e){const t=Oo(e.key).key.toLowerCase();s.has(t)||s.set(t,[]),s.get(t).push(e)}function p(e,n){if(!i.value)return;const o=e.key.toLowerCase(),r=s.get(o);if(r)for(const o of r){if(t.unref(o.disabled))continue;if(!!o.keyup!==n)continue;if(zo(e,Oo(o.key))){!1!==o.prevent&&e.preventDefault(),o.stop&&e.stopPropagation(),o.handler(e);break}}}function f(){v()&&(m(),a=r?t.unref(r):document,u=e=>p(e,!1),c=e=>p(e,!0),null==a||a.addEventListener("keydown",u),null==a||a.addEventListener("keyup",c))}function m(){a&&(u&&a.removeEventListener("keydown",u),c&&a.removeEventListener("keyup",c)),a=null,u=null,c=null}return n&&d(n),o.forEach(d),t.watch(i,e=>{e?f():m()}),r&&"object"==typeof r&&"value"in r&&t.watch(r,()=>{i.value&&f()}),i.value&&f(),t.onUnmounted(()=>{m()}),{enabled:i,enable:function(){i.value=!0},disable:function(){i.value=!1},toggle:function(){i.value=!i.value},add:d,remove:function(e){s.delete(e.toLowerCase())},clear:function(){s.clear()}}},e.useHover=function(e={}){const{onEnter:n,onLeave:o,class:r,enterDelay:l=0,leaveDelay:i=0}=e,s=t.ref(!1);let a=null,u=null,c=null;function d(){a&&(clearTimeout(a),a=null),u&&(clearTimeout(u),u=null)}function p(e){if(u&&(clearTimeout(u),u=null),s.value)return;const o=t.unref(l);o&&o>0?a=setTimeout(()=>{s.value=!0,m(),null==n||n(e),a=null},o):(s.value=!0,m(),null==n||n(e))}function f(e){if(a&&(clearTimeout(a),a=null),!s.value)return;const n=t.unref(i);n&&n>0?u=setTimeout(()=>{s.value=!1,h(),null==o||o(e),u=null},n):(s.value=!1,h(),null==o||o(e))}function m(){c&&r&&c.classList.add(r)}function h(){c&&r&&c.classList.remove(r)}return t.onUnmounted(()=>{d(),h()}),{isHovering:s,bind:function(e){return v()?(c=e,e.addEventListener("mouseenter",p),e.addEventListener("mouseleave",f),()=>{e.removeEventListener("mouseenter",p),e.removeEventListener("mouseleave",f),d(),h(),c=null}):()=>{}}}},e.useImagePreview=function(e={}){const{src:n,closeOnClickOutside:o=!0,closeOnEsc:r=!0,showCloseButton:l=!0,onOpen:i,onClose:s}=e,a=t.ref(!1),u=t.ref("");let c=null,d=null,p=null,f=null;function m(e){if(!v())return;const t=e||(n&&"object"==typeof n?n.value:n);if(!t&&!c)return;const s=t||c.src;u.value=s,d=function(){const e=document.createElement("div");return e.className="v-image-preview",e.style.cssText="\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 9999;\n background: rgba(0, 0, 0, 0.9);\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: zoom-out;\n ",e}();const m=document.createElement("img");if(m.src=s,m.style.cssText="\n max-width: 90%;\n max-height: 90%;\n object-fit: contain;\n cursor: default;\n ",l){const e=document.createElement("button");e.className="v-image-preview__close",e.innerHTML="&times;",e.style.cssText="\n position: absolute;\n top: 20px;\n right: 20px;\n width: 40px;\n height: 40px;\n border: none;\n background: rgba(255, 255, 255, 0.2);\n color: white;\n font-size: 24px;\n cursor: pointer;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n ",e.addEventListener("click",e=>{e.stopPropagation(),h()}),d.appendChild(e)}d.appendChild(m),document.body.appendChild(d),o&&(p=h,d.addEventListener("click",p)),r&&(f=e=>{"Escape"===e.key&&h()},document.addEventListener("keydown",f)),a.value=!0,null==i||i()}function h(){d&&(d.remove(),d=null),p&&(document.removeEventListener("click",p),p=null),f&&(document.removeEventListener("keydown",f),f=null),a.value=!1,u.value="",null==s||s()}function g(){c&&m(c.src)}function b(){c&&(c.style.cursor="",c.removeEventListener("click",g)),c=null}return t.onUnmounted(()=>{b(),h()}),{isOpen:t.readonly(a),currentSrc:t.readonly(u),open:m,close:h,bind:function(e){return v()?(b(),c=e,e.style.cursor="zoom-in",e.addEventListener("click",g),b):()=>{}}}},e.useIntersect=function(e={}){const{handler:n,onEnter:o,onLeave:r,onChange:l,root:i=null,rootMargin:s="0px",threshold:a=0,once:u=!1}=e,c=t.ref(!1),d=t.ref(0);let p=null,f=!1;function m(){p&&(p.disconnect(),p=null),c.value=!1,d.value=0}return t.onUnmounted(()=>{m()}),{isIntersecting:t.readonly(c),ratio:t.readonly(d),bind:function(e){return v()?(m(),p=v()&&h()?new IntersectionObserver(e=>{for(const t of e){if(u&&f)continue;const e=t.isIntersecting;c.value=e,d.value=t.intersectionRatio,null==n||n(t,p),null==l||l(e,t),e?(null==o||o(t,p),u&&(f=!0)):null==r||r(t,p)}},{root:t.unref(i),rootMargin:s,threshold:a}):(console.warn("[Directix] useIntersect: IntersectionObserver not supported"),null),p&&p.observe(e),m):()=>{}},stop:m}},e.useLongPress=function(e={}){const{duration:n=500,distance:o=10,onStart:r,onTrigger:l,onCancel:i,onTick:s,tickInterval:a=100,prevent:u=!0}=e,c=t.ref(!1);let d=null,p=null,f={x:0,y:0},m=!1;function h(e){if(v()){if(u&&e.preventDefault(),y(),f=Ho(e),m=!0,c.value=!0,null==r||r(e),s){let e=t.unref(n);p=setInterval(()=>{e-=a,null==s||s(Math.max(0,e))},a)}d=setTimeout(()=>{y(),c.value=!1,null==l||l(e)},t.unref(n))}}function g(e){c.value&&(y(),m=!1,c.value=!1,null==i||i(e))}function b(e){if(!c.value||!m)return;const n=Ho(e);var r,l;(r=f,l=n,Math.sqrt(__pow(l.x-r.x,2)+__pow(l.y-r.y,2)))>t.unref(o)&&g(e)}function y(){d&&(clearTimeout(d),d=null),p&&(clearInterval(p),p=null)}return t.onUnmounted(()=>{y()}),{isPressing:c,start:h,stop:g,bind:function(e){return e.addEventListener("mousedown",h),e.addEventListener("mouseup",g),e.addEventListener("mouseleave",g),e.addEventListener("mousemove",b),e.addEventListener("touchstart",h,{passive:!u}),e.addEventListener("touchend",g),e.addEventListener("touchcancel",g),e.addEventListener("touchmove",b,{passive:!0}),()=>{e.removeEventListener("mousedown",h),e.removeEventListener("mouseup",g),e.removeEventListener("mouseleave",g),e.removeEventListener("mousemove",b),e.removeEventListener("touchstart",h),e.removeEventListener("touchend",g),e.removeEventListener("touchcancel",g),e.removeEventListener("touchmove",b),y()}}}},e.useLowercase=function(e){const{text:n,first:o=!1}=e,r=t.ref(t.unref(n)),l=t.ref("");return t.watch(()=>[t.unref(n),t.unref(o)],()=>function(){const e=t.unref(n),i=t.unref(o);r.value=e,l.value=Yo(e,i)}(),{immediate:!0}),{transformed:l,original:r}},e.useMoney=function(e){const{value:n,symbol:o="$",symbolPosition:r="before",precision:l=2,separator:i=",",decimal:s="."}=e,a=t.ref(t.unref(n)),u=t.computed(()=>$o(a.value,{precision:t.unref(l),separator:t.unref(i),decimal:t.unref(s),symbol:t.unref(o),symbolPosition:t.unref(r)}));return t.watch(()=>t.unref(n),e=>{a.value=e}),{value:a,formatted:u,parse:function(e){return Ao(e,{decimal:t.unref(s),symbol:t.unref(o)})}}},e.useNumber=function(e){const{value:n,precision:o=0,separator:r=",",decimal:l=".",prefix:i="",suffix:s=""}=e,a=t.ref(t.unref(n)),u=t.computed(()=>Xo(a.value,{precision:t.unref(o),separator:t.unref(r),decimal:t.unref(l),prefix:t.unref(i),suffix:t.unref(s)}));return t.watch(()=>t.unref(n),e=>{a.value=e}),{value:a,formatted:u,parse:function(e){return Ro(e,{decimal:t.unref(l),prefix:t.unref(i),suffix:t.unref(s)})}}},e.usePermission=function(e){const{value:n,mode:o="some",check:r,getPermissions:l,getRoles:i,roleMap:s={}}=e,a=t.ref(!1);function u(){a.value=function(){if(r)return r(t.unref(n),t.unref(o));if(!l)return console.warn("[Directix] usePermission: getPermissions function is required"),!0;const e=l(),a=(null==i?void 0:i())||[],u=Array.isArray(t.unref(n))?t.unref(n):[t.unref(n)];function c(t){if(t in s)return a.includes(t);if(Vo(t,e))return!0;for(const e of a)if(Vo(t,s[e]||[]))return!0;return!1}return"every"===t.unref(o)?u.every(c):u.some(c)}()}return t.watch(()=>t.unref(n),()=>u(),{immediate:!0}),"object"==typeof o&&"value"in o&&t.watch(o,()=>u()),{granted:t.readonly(a),recheck:u}},e.usePrint=Fo,e.usePullRefresh=function(e){const{handler:n,distance:o=60,maxDistance:r=100,disabled:l=!1,successDuration:i=500,errorDuration:s=1e3}=e,a=t.ref("idle"),u=t.ref(0),c=t.ref(!1),d=t.ref(null);let p=0,v=0;const f=()=>t.unref(o),m=()=>t.unref(l);function h(){a.value="idle",u.value=0,c.value=!1}function g(){return __async(this,null,function*(){a.value="loading";try{yield n(),a.value="success",yield jo(t.unref(i))}catch(e){a.value="error",yield jo(t.unref(s))}finally{h()}})}return t.onUnmounted(()=>{h()}),{state:a,distance:u,isPulling:c,events:{touchstart:function(e){if(m()||"loading"===a.value)return;const t=d.value;t&&t.scrollTop>0||(c.value=!0,p=e.touches[0].clientY,v=p,a.value="idle")},touchmove:function(e){if(!c.value||m()||"loading"===a.value)return;v=e.touches[0].clientY;const n=v-p;if(n<=0)return u.value=0,void(a.value="idle");e.preventDefault();const o=Math.min(.5*n,t.unref(r));u.value=o;const l=o/f();a.value=l>=1?"ready":"pulling"},touchend:function(){c.value&&!m()&&(c.value=!1,"ready"===a.value&&u.value>=f()?g():(u.value=0,h()))}},containerRef:d,refresh:g}},e.useResize=function(e={}){const{debounce:n=0,box:o="content-box",onResize:r}=e,l=t.ref(0),i=t.ref(0);let s=null,a=null,u=null;function c(e){const o=t.unref(n);function s(){l.value=e.contentRect.width,i.value=e.contentRect.height,null==r||r({width:e.contentRect.width,height:e.contentRect.height,contentRect:e.contentRect})}o&&o>0?(a&&clearTimeout(a),a=setTimeout(s,o)):s()}function d(){s&&(s.disconnect(),s=null),u&&(u.remove(),u=null),a&&(clearTimeout(a),a=null)}return t.onUnmounted(()=>{d()}),{width:t.readonly(l),height:t.readonly(i),bind:function(e){if(!v())return()=>{};d();const t=e.getBoundingClientRect();if(l.value=t.width,i.value=t.height,g())v()&&g()&&(s=new ResizeObserver(e=>{for(const t of e)c(t)})),null==s||s.observe(e,{box:o});else{u=document.createElement("iframe"),u.style.cssText="\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border: none;\n pointer-events: none;\n opacity: 0;\n ";"static"===getComputedStyle(e).position&&(e.style.position="relative"),e.appendChild(u);const t=u.contentWindow;t&&t.addEventListener("resize",()=>{c({contentRect:e.getBoundingClientRect()})})}return d},stop:d}},e.useScroll=function(e={}){const{throttle:n=0,passive:o=!0}=e,r=t.ref(0),l=t.ref(0),i=t.ref(0),s=t.ref(0),a=t.ref(0),u=t.ref(0),c=t.ref(!1);let d=null,p=0,f=0,m=null,h=null,g=null;const b=t.computed(()=>({scrollLeft:r.value,scrollTop:l.value,scrollLeftMax:0,scrollTopMax:0,progressX:i.value,progressY:s.value,directionX:a.value,directionY:u.value}));function y(e){if(!d)return;const o=t.unref(n);function v(){const e=Wo(d,p,f);r.value=e.scrollLeft,l.value=e.scrollTop,i.value=e.progressX,s.value=e.progressY,a.value=e.directionX,u.value=e.directionY,p=e.scrollLeft,f=e.scrollTop,c.value=!0,g&&clearTimeout(g),g=setTimeout(()=>{c.value=!1},150)}o&&o>0?h||(h=setTimeout(()=>{v(),h=null},o)):v()}function w(){d&&m&&d.removeEventListener("scroll",m),h&&(clearTimeout(h),h=null),g&&(clearTimeout(g),g=null),d=null,m=null}return t.onUnmounted(()=>{w()}),{scrollLeft:t.readonly(r),scrollTop:t.readonly(l),progressX:t.readonly(i),progressY:t.readonly(s),directionX:t.readonly(a),directionY:t.readonly(u),isScrolling:t.readonly(c),info:t.readonly(b),bind:function(e){if(!v())return()=>{};w(),d=e||window;const t=Wo(d,0,0);return r.value=t.scrollLeft,l.value=t.scrollTop,i.value=t.progressX,s.value=t.progressY,p=t.scrollLeft,f=t.scrollTop,m=y,d.addEventListener("scroll",m,{passive:o}),w},stop:w,scrollTo:function(e){if(!d)return;const{top:t,left:n,behavior:o="smooth"}=e;if(d===window)window.scrollTo({top:t,left:n,behavior:o});else{const e=d;void 0!==t&&(e.scrollTop=t),void 0!==n&&(e.scrollLeft=n)}}}},e.useSwipe=function(e={}){const{handler:n,threshold:o=30,maxTime:r=500,directions:l=qo,preventScrollOnSwipe:i=!0,mouse:s=!0,onLeft:a,onRight:u,onUp:c,onDown:d}=e,p=t.ref(null),f=t.ref(0),m=t.ref(0),h=t.ref(!1);let g=null,b=0,y=0,w=0;function _(e,s,v,h){var b;const y=t.unref(o);if(v>t.unref(r))return;if(Math.max(Math.abs(e),Math.abs(s))<y)return;const w=function(e,t,n){if(Math.abs(e)>Math.abs(t)){const t=e>0?"right":"left";return n.includes(t)?t:null}{const e=t>0?"down":"up";return n.includes(e)?e:null}}(e,s,l);if(!w)return;p.value=w,f.value=e,m.value=s,i&&h.cancelable&&h.preventDefault(),null==n||n(w,h);const _={left:a,right:u,up:c,down:d};null==(b=_[w])||b.call(_),null==g||g.dispatchEvent(new CustomEvent("swipe",{detail:{direction:w,deltaX:e,deltaY:s,deltaTime:v}}))}function x(e,t){b=e,y=t,w=Date.now(),h.value=!0,p.value=null,f.value=0,m.value=0}function E(e,t,n){if(!h.value)return;h.value=!1;_(e-b,t-y,Date.now()-w,n)}function T(e){x(e.touches[0].clientX,e.touches[0].clientY)}function L(e){h.value&&i&&e.preventDefault()}function k(e){const t=e.changedTouches[0];E(t.clientX,t.clientY,e)}function C(e){x(e.clientX,e.clientY)}function S(e){E(e.clientX,e.clientY,e)}function D(e){h.value&&E(e.clientX,e.clientY,e)}function I(){g&&(g.removeEventListener("touchstart",T),g.removeEventListener("touchmove",L),g.removeEventListener("touchend",k),g.removeEventListener("touchcancel",k),t.unref(s)&&(g.removeEventListener("mousedown",C),g.removeEventListener("mouseup",S),g.removeEventListener("mouseleave",D)),g=null)}return t.onUnmounted(()=>{I()}),{direction:t.readonly(p),lengthX:t.readonly(f),lengthY:t.readonly(m),isSwiping:t.readonly(h),bind:function(e){return v()?(I(),g=e,e.style.touchAction="none",e.style.userSelect="none",e.addEventListener("touchstart",T,{passive:!0}),e.addEventListener("touchmove",L,{passive:!1}),e.addEventListener("touchend",k),e.addEventListener("touchcancel",k),t.unref(s)&&(e.addEventListener("mousedown",C),e.addEventListener("mouseup",S),e.addEventListener("mouseleave",D)),I):()=>{}}}},e.useThrottle=function(e){const{handler:n,wait:o=300,leading:r=!0,trailing:l=!0}=e;let i=null,s=null,a=null,u=0;const c=()=>t.unref(r),d=()=>{s&&(n.apply(a,s),s=null,a=null)};function p(){i&&(clearTimeout(i),i=null),u=0,s=null,a=null}return t.onUnmounted(()=>{p()}),{run:function(...e){const n=Date.now(),r=t.unref(o);u||c()||(u=n);const p=r-(n-u);s=e,a=this,p<=0||p>r?(i&&(clearTimeout(i),i=null),u=n,d()):!i&&t.unref(l)&&(i=setTimeout(()=>{u=c()?Date.now():0,i=null,d()},p))},cancel:p}},e.useTouch=function(e={}){const{onSwipe:n,onSwipeLeft:o,onSwipeRight:r,onSwipeUp:l,onSwipeDown:i,onPinch:s,onRotate:a,onTap:u,onLongPress:c,swipeThreshold:d=30,longPressDuration:p=500,tapDuration:f=250,disabled:m=!1}=e,h=t.ref(null);let g=null,b=0,y=0,w=0,_=null,x=0,E=0;function T(e){let t=0,n=0;for(let o=0;o<e.length;o++)t+=e[o].clientX,n+=e[o].clientY;return{x:t/e.length,y:n/e.length}}function L(e,t){const n=e.clientX-t.clientX,o=e.clientY-t.clientY;return Math.sqrt(n*n+o*o)}function k(e,t){return Math.atan2(t.clientY-e.clientY,t.clientX-e.clientX)*(180/Math.PI)}function C(e){t.unref(m)||(w=Date.now(),h.value=null,1===e.touches.length?(b=e.touches[0].clientX,y=e.touches[0].clientY,c&&(_=setTimeout(()=>{h.value="longPress",c({type:"longPress",center:{x:b,y:y},event:e})},p))):2===e.touches.length&&(x=L(e.touches[0],e.touches[1]),E=k(e.touches[0],e.touches[1])))}function S(e){if(!t.unref(m)&&(_&&(clearTimeout(_),_=null),2===e.touches.length&&(s||a))){const t=L(e.touches[0],e.touches[1]),n=k(e.touches[0],e.touches[1]);if(s&&x>0){const n=t/x;h.value="pinch",s({type:"pinch",scale:n,center:T(e.touches),event:e})}if(a){const t=n-E;h.value="rotate",a({type:"rotate",rotation:t,center:T(e.touches),event:e})}}}function D(e){if(t.unref(m))return;_&&(clearTimeout(_),_=null);const s=Date.now()-w;if(1===e.changedTouches.length){const t=e.changedTouches[0].clientX,a=e.changedTouches[0].clientY,c=t-b,p=a-y,v=Math.sqrt(c*c+p*p);if(v>=d){let s;h.value="swipe",s=Math.abs(c)>Math.abs(p)?c>0?"right":"left":p>0?"down":"up";const u={type:"swipe",direction:s,distance:v,angle:Math.atan2(p,c)*(180/Math.PI),center:{x:t,y:a},event:e};switch(null==n||n(u),s){case"left":null==o||o(u);break;case"right":null==r||r(u);break;case"up":null==l||l(u);break;case"down":null==i||i(u)}}else v<10&&s<f&&u&&(h.value="tap",u({type:"tap",center:{x:t,y:a},event:e}))}h.value=null}function I(){g&&(g.removeEventListener("touchstart",C),g.removeEventListener("touchmove",S),g.removeEventListener("touchend",D),g.removeEventListener("touchcancel",D)),_&&(clearTimeout(_),_=null),g=null,h.value=null}return t.onUnmounted(()=>{I()}),{gesture:t.readonly(h),bind:function(e){return v()?(I(),g=e,e.addEventListener("touchstart",C,{passive:!0}),e.addEventListener("touchmove",S,{passive:!0}),e.addEventListener("touchend",D),e.addEventListener("touchcancel",D),I):()=>{}}}},e.useTrim=function(e){const{text:n,position:o="both",chars:r}=e,l=t.ref(t.unref(n)),i=t.ref(""),s=t.ref(!1);return t.watch(()=>[t.unref(n),t.unref(o),t.unref(r)],()=>function(){const e=t.unref(n),a=t.unref(o),u=t.unref(r);l.value=e,i.value=Zo(e,a,u),s.value=i.value!==e}(),{immediate:!0}),{trimmed:i,original:l,wasTrimmed:s}},e.useUppercase=function(e){const{text:n,first:o=!1}=e,r=t.ref(t.unref(n)),l=t.ref("");return t.watch(()=>[t.unref(n),t.unref(o)],()=>function(){const e=t.unref(n),i=t.unref(o);r.value=e,l.value=Ko(e,i)}(),{immediate:!0}),{transformed:l,original:r}},e.useVirtualList=function(e){const{items:n,itemSize:o=50,height:r=400,overscan:l=3,keyField:i="id"}=e,s=t.ref(null),a=t.ref(0),u=t.ref(0),c=t.ref(0),d=()=>t.unref(n),p=()=>t.unref(o),v=()=>t.unref(r),f=t.computed(()=>{const e=d(),t=p();if("function"==typeof t){let n=0;for(let o=0;o<e.length;o++)n+=t(o);return n}return t*e.length});function m(){const e=d(),n=p(),o=v(),r=t.unref(l),i=a.value;let s=0,u=0,c=0;if("function"==typeof n){let t=0;for(let o=0;o<e.length;o++){const e=n(o);if(t+e>i){s=o,c=t;break}t+=e}for(u=s,t=c;u<e.length&&t<i+o;)t+=n(u),u++;s=Math.max(0,s-r),u=Math.min(e.length,u+r),t=0;for(let e=0;e<s;e++)t+=n(e);c=t}else s=Math.max(0,Math.floor(i/n)-r),u=Math.min(e.length,Math.ceil((i+o)/n)+r),c=s*n;return{start:s,end:u,offsetY:c}}const h=t.computed(()=>{const e=d(),t=p(),{start:n,end:o,offsetY:r}=m();u.value=n,c.value=o;const l=[];let i=r;for(let r=n;r<o;r++){const n=e[r];if(void 0!==n){const e="function"==typeof t?t(r):t;l.push({item:n,index:r,style:{position:"absolute",top:`${i}px`,height:`${e}px`,width:"100%"}}),i+=e}}return l}),g=t.computed(()=>({height:`${v()}px`,overflow:"auto",position:"relative"}));function b(e){const t=e.target;a.value=t.scrollTop}return t.onMounted(()=>{s.value&&s.value.addEventListener("scroll",b,{passive:!0})}),t.onUnmounted(()=>{s.value&&s.value.removeEventListener("scroll",b)}),{visibleItems:h,totalHeight:f,scrollTop:a,startIndex:u,endIndex:c,scrollToIndex:function(e){if(!s.value)return;const t=p(),n=d();if("function"==typeof t){let o=0;for(let r=0;r<Math.min(e,n.length);r++)o+=t(r);s.value.scrollTop=o}else s.value.scrollTop=e*t},scrollTo:function(e){s.value&&(s.value.scrollTop=e)},containerRef:s,listStyle:g}},e.useVisible=function(e={}){const{initial:n=!0,useHidden:o=!1,onChange:r}=e,l=t.ref(t.unref(n));let i=null,s="",a="";function u(e){i&&(e?(i.classList.remove("v-hidden"),i.classList.add("v-visible"),o?i.style.visibility=a||"visible":i.style.display=s):(i.classList.remove("v-visible"),i.classList.add("v-hidden"),o?i.style.visibility="hidden":i.style.display="none"))}function c(){i&&(i.style.display=s,i.style.visibility=a,i.classList.remove("v-hidden","v-visible")),i=null}return t.watch(l,(e,t)=>{e!==t&&(u(e),null==r||r(e))}),"object"==typeof n&&"value"in n&&t.watch(n,e=>{l.value=e}),t.onUnmounted(()=>{c()}),{visible:l,show:function(){l.value=!0},hide:function(){l.value=!1},toggle:function(){l.value=!l.value},bind:function(e){return v()?(c(),i=e,s=e.style.display,a=e.style.visibility,u(l.value),c):()=>{}}}},e.useWatermark=function(e){const{content:n,width:o=300,height:r=200,rotate:l=-22,fontSize:i=16,fontFamily:s="sans-serif",fontWeight:a="normal",color:u="rgba(128, 128, 128, 0.15)",gap:c=[100,100],zIndex:d=9999,disabled:p=!1,protect:v=!0}=e,f=t.ref(null),m=t.ref(""),h=t.ref(t.unref(p));function g(){const e=t.unref(n),c=t.unref(o),d=t.unref(r),p=t.unref(l),v=t.unref(i),h=t.unref(s),g=t.unref(a),b=t.unref(u);f.value=Go({content:e,width:c,height:d,fontSize:v,fontFamily:h,fontWeight:g,color:b,rotate:p}),m.value=f.value.toDataURL()}const b=t.ref({position:"absolute",top:"0",left:"0",width:"100%",height:"100%",pointerEvents:"none",zIndex:t.unref(d),backgroundImage:"",backgroundRepeat:"repeat",backgroundPosition:"0 0",backgroundSize:""});function y(){const e=t.unref(c),n=t.unref(d),l=Array.isArray(e)?e:[e,e],i=t.unref(o),s=t.unref(r);b.value=__spreadProps(__spreadValues({},b.value),{zIndex:n,backgroundImage:`url("${m.value}")`,backgroundPosition:`${l[0]/2}px ${l[1]/2}px`,backgroundSize:`${i+l[0]}px ${s+l[1]}px`})}return t.watch(()=>[t.unref(n),t.unref(o),t.unref(r),t.unref(l),t.unref(i),t.unref(s),t.unref(a),t.unref(u),t.unref(c),t.unref(d)],()=>{g(),y()},{immediate:!0}),t.watch(h,e=>{b.value.display=e?"none":"block"}),t.unref(p)&&(b.value.display="none"),t.onUnmounted(()=>{}),{canvas:f,dataUrl:m,style:b,disabled:h,update:function(t){Object.assign(e,t),g(),y()},enable:function(){h.value=!1},disable:function(){h.value=!0}}},e.vCapitalcase=D,e.vClickDelay=te,e.vClickOutside=ne,e.vCopy=ie,e.vCountdown=de,e.vDebounce=me,e.vDraggable=ye,e.vEllipsis=we,e.vFocus=Le,e.vHotkey=He,e.vHover=Re,e.vImagePreview=je,e.vInfiniteScroll=qe,e.vIntersect=Qe,e.vLazy=st,e.vLoading=ut,e.vLongPress=vt,e.vLowercase=ht,e.vMask=Tt,e.vMoney=It,e.vMutation=Pt,e.vNumber=Ot,e.vPermission=Yt,e.vPrint=$t,e.vPullRefresh=Jt,e.vResize=en,e.vRipple=nn,e.vSanitize=cn,e.vScroll=vn,e.vSticky=yn,e.vSwipe=kn,e.vThrottle=Sn,e.vTooltip=Bn,e.vTouch=Wn,e.vTrim=Kn,e.vTruncate=Jn,e.vUppercase=oo,e.vVirtualList=ao,e.vVisible=po,e.vWatermark=go,e.wouldTextTruncate=function(e,t,n=14){return So(e,n)>t},Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}(this.Directix=this.Directix||{},Vue);
7
+ var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__pow=Math.pow,__defNormalProp=(e,t,n)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,__spreadValues=(e,t)=>{for(var n in t||(t={}))__hasOwnProp.call(t,n)&&__defNormalProp(e,n,t[n]);if(__getOwnPropSymbols)for(var n of __getOwnPropSymbols(t))__propIsEnum.call(t,n)&&__defNormalProp(e,n,t[n]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t)),__objRest=(e,t)=>{var n={};for(var o in e)__hasOwnProp.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&__getOwnPropSymbols)for(var o of __getOwnPropSymbols(e))t.indexOf(o)<0&&__propIsEnum.call(e,o)&&(n[o]=e[o]);return n},__async=(e,t,n)=>new Promise((o,i)=>{var l=e=>{try{s(n.next(e))}catch(e){i(e)}},r=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?o(e.value):Promise.resolve(e.value).then(l,r);s((n=n.apply(e,t)).next())});!function(e,t){"use strict";function n(e){return{bind(e,t,n){const o={value:t.value,vnode:n,cleanup:[]};e.__directix_state__=o},inserted(t,n,i){e.mounted&&e.mounted(t,o(n),i)},update(t,n,i,l){const r=t.__directix_state__;e.updated&&e.updated(t,o(n),i,o(__spreadProps(__spreadValues({},n),{value:n.oldValue})),l),r&&(r.value=n.value,r.vnode=i)},componentUpdated(e,t,n,o){},unbind(t,n,i){e.unmounted&&e.unmounted(t,o(n),i);const l=t.__directix_state__;(null==l?void 0:l.cleanup)&&l.cleanup.forEach(e=>e()),delete t.__directix_state__}}}function o(e){var t;return{value:e.value,oldValue:null!=(t=e.oldValue)?t:null,arg:e.arg,modifiers:e.modifiers||{},instance:e.instance||null}}function i(e){return{created(e,t,n){const o={value:t.value,vnode:n,cleanup:[]};e.__directix_state__=o},beforeMount(e,t,n){},mounted(t,n,o){e.mounted&&e.mounted(t,l(n),o)},beforeUpdate(e,t,n,o){},updated(t,n,o,i){const r=t.__directix_state__;e.updated&&e.updated(t,l(n),o,l(__spreadProps(__spreadValues({},n),{value:n.oldValue})),i),r&&(r.value=n.value,r.vnode=o)},beforeUnmount(e,t,n){},unmounted(t,n,o){e.unmounted&&e.unmounted(t,l(n),o);const i=t.__directix_state__;(null==i?void 0:i.cleanup)&&i.cleanup.forEach(e=>e()),delete t.__directix_state__}}}function l(e){var t;return{value:e.value,oldValue:null!=(t=e.oldValue)?t:null,arg:e.arg,modifiers:e.modifiers||{},instance:e.instance}}let r=null,s=null,a=null,u=null;function c(e){return e.startsWith("2.7")?2.7:e.startsWith("2")?2:e.startsWith("3")?3:null}function d(){var e,t;if(null!==r)return r;if("undefined"!=typeof process){const e=process.env.DIRECTIX_VUE_VERSION;if("2.7"===e)return r=2.7,r;if("2"===e)return r=2,r;if("3"===e)return r=3,r}try{const e=require("vue"),t=c(null==e?void 0:e.version);if(null!==t)return r=t,r}catch(e){}if("undefined"!=typeof window){const n=window,o=n.Vue;if(null==o?void 0:o.version){const e=c(o.version);if(null!==e)return r=e,r}if("function"==typeof(null==o?void 0:o.observable))return r=2,r;if("function"==typeof(null==o?void 0:o.createApp)&&"function"!=typeof(null==o?void 0:o.observable))return r=3,r;const i=n.__VUE_DEVTOOLS_GLOBAL_HOOK__;if(null==(e=null==i?void 0:i.Vue)?void 0:e.version){const e=c(i.Vue.version);if(null!==e)return r=e,r}if(null==(t=null==i?void 0:i.apps)?void 0:t.length)return r=3,r}return null===r&&("undefined"!=typeof window&&console.warn("[Directix] Unable to detect Vue version, defaulting to Vue 3. Set DIRECTIX_VUE_VERSION=2 or call setVueVersion(2) if using Vue 2."),r=3),r}function p(e){r=e,s=2===e||2.7===e,a=2.7===e,u=3===e}const f=()=>"undefined"!=typeof window&&"undefined"!=typeof document,v=()=>!f(),m=()=>{if(!f())return!1;let e=!1;try{const t={get passive(){return e=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){e=!1}return e},h=()=>f()&&"IntersectionObserver"in window,g=()=>f()&&"ResizeObserver"in window,y=()=>f()&&"clipboard"in navigator,b=()=>f()&&"MutationObserver"in window;function w(e){var t;const o=e,{name:l,version:r,ssr:s,defaults:a}=o,u=__objRest(o,["name","version","ssr","defaults"]);if(v()&&!s)return"undefined"!=typeof process&&"test"!==(null==(t=process.env)?void 0:t.NODE_ENV)&&console.warn(`[Directix] Directive "${l}" is not compatible with SSR. It will be a no-op on the server side.`),{mounted:()=>{},updated:()=>{},unmounted:()=>{}};return function(e){let t=null;function o(){return t||(t=2===d()?n(e):i(e)),t}function l(e){return function(t,n,i,l){var r,s;null==(s=(r=o())[e])||s.call(r,t,n,i,l)}}return{bind:l("bind"),inserted:l("inserted"),update:l("update"),componentUpdated:l("componentUpdated"),unbind:l("unbind"),created:l("created"),beforeMount:l("beforeMount"),mounted:l("mounted"),beforeUpdate:l("beforeUpdate"),updated:l("updated"),beforeUnmount:l("beforeUnmount"),unmounted:l("unmounted")}}({mounted:u.mounted?(e,t,n)=>{u.mounted(e,x(t,a),n)}:void 0,updated:u.updated?(e,t,n,o,i)=>{u.updated(e,x(t,a),n,o,i)}:void 0,unmounted:u.unmounted})}function x(e,t){if(!t)return e;const n="object"==typeof e.value&&null!==e.value?__spreadValues(__spreadValues({},t),e.value):e.value;return __spreadProps(__spreadValues({},e),{value:n})}function _(e){return"boolean"==typeof e?{visible:e,radius:5,duration:300,overlayColor:"transparent",zIndex:999,lockScroll:!1}:"number"==typeof e?{visible:!0,radius:e,duration:300,overlayColor:"transparent",zIndex:999,lockScroll:!1}:__spreadValues({radius:5,visible:!0,duration:300,overlayColor:"transparent",zIndex:999,lockScroll:!1},e)}const E=w({name:"blur",ssr:!1,mounted(e,t){if(!f())return;const n=_(t.value),o={options:n,blurContainer:null,originalOverflow:""};e.__blur=o,n.visible&&L(e,o),e.classList.add("v-blur")},updated(e,t){const n=e.__blur;if(!n)return;const o=_(t.value),i=n.options.visible;n.options=o,o.visible&&!i?L(e,n):!o.visible&&i?k(e,n):o.visible&&i&&n.blurContainer&&(n.blurContainer.style.backdropFilter=`blur(${o.radius}px)`,n.blurContainer.style.webkitBackdropFilter=`blur(${o.radius}px)`,n.blurContainer.style.background=o.overlayColor||"rgba(0, 0, 0, 0.5)")},unmounted(e){const t=e.__blur;t&&(k(e,t),e.classList.remove("v-blur"),delete e.__blur)}});function L(e,t){var n;const o=t.options;"static"===window.getComputedStyle(e).position&&(e.style.position="relative"),t.blurContainer=function(e){const t=document.createElement("div");return t.className=`v-blur-overlay ${e.class||""}`,t.style.cssText=`\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n backdrop-filter: blur(${e.radius}px);\n -webkit-backdrop-filter: blur(${e.radius}px);\n background: ${e.overlayColor||"transparent"};\n z-index: ${e.zIndex};\n opacity: 0;\n transition: opacity ${e.duration}ms ease;\n pointer-events: auto;\n border-radius: inherit;\n `,t}(o),e.appendChild(t.blurContainer),String(t.blurContainer.offsetHeight),t.blurContainer.style.opacity="1",o.lockScroll&&(t.originalOverflow=document.body.style.overflow,document.body.style.overflow="hidden"),null==(n=o.onShow)||n.call(o)}function k(e,t){var n;if(!t.blurContainer)return;const o=t.options;t.blurContainer.style.opacity="0",o.lockScroll&&(document.body.style.overflow=t.originalOverflow),setTimeout(()=>{t.blurContainer&&t.blurContainer.parentNode&&t.blurContainer.parentNode.removeChild(t.blurContainer),t.blurContainer=null},o.duration),null==(n=o.onHide)||n.call(o)}const T="__directix_";function C(e,t,n){e[T+t]=n}function S(e,t){return e[T+t]}function D(e,t){delete e[T+t]}function $(e){return e?"string"==typeof e?f()?document.querySelector(e):null:e instanceof Element?e:null:null}function M(e){if(!f())return window;let t=e.parentElement;for(;t;){const{overflow:e,overflowX:n,overflowY:o}=getComputedStyle(t);if(/(auto|scroll)/.test(e+n+o))return t;t=t.parentElement}return window}function H(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}function I(e,t="relative"){f()&&"static"===getComputedStyle(e).position&&(e.style.position=t)}function P(e,t,n,o=!1){if(!f())return;const i=z(o);e.addEventListener(t,n,i)}function O(e,t,n,o=!1){if(!f())return;const i=z(o);e.removeEventListener(t,n,i)}function z(e){if("boolean"==typeof e)return e;const{capture:t=!1,passive:n=!1,once:o=!1}=e;return m()?{capture:t,passive:n,once:o}:t}function A(e){let t=0,n=0;return"touches"in e&&e.touches.length>0?(t=e.touches[0].clientX,n=e.touches[0].clientY):"clientX"in e&&(t=e.clientX,n=e.clientY),{x:t,y:n,clientX:t,clientY:n}}function F(e){const{capture:t=!1,passive:n=!1,once:o=!1}=e;return m()?{capture:t,passive:n,once:o}:t}const Y=["click","input","change","submit","scroll","resize","mouseenter","mouseleave","mousemove","mousedown","mouseup","keydown","keyup","focus","blur","touchstart","touchmove","touchend"];function R(e){for(const t of Y)if(e[t])return t;return null}function N(e){const t=e.tagName.toLowerCase();return"input"===t||"textarea"===t?"input":"click"}function X(e){return"string"==typeof e}function V(e){return"function"==typeof e}function B(e){return"object"==typeof e&&null!==e}function U(e){return Array.isArray(e)}function j(e,t=300,n={}){let o=null,i=null,l=null;const{leading:r=!1,trailing:s=!0}=n,a=()=>{i&&(e.apply(l,i),i=null,l=null)},u=function(...e){i=e,l=this,o&&clearTimeout(o),r&&!o&&a(),o=setTimeout(()=>{s&&a(),o=null},t)};return u.cancel=()=>{o&&(clearTimeout(o),o=null),i=null,l=null},u.flush=()=>{o&&(clearTimeout(o),a(),o=null)},u}function W(e,t=300,n={}){let o=null,i=null,l=null,r=0;const{leading:s=!0,trailing:a=!0}=n,u=()=>{i&&(e.apply(l,i),i=null,l=null)},c=function(...e){const n=Date.now();r||s||(r=n);const c=t-(n-r);i=e,l=this,c<=0||c>t?(o&&(clearTimeout(o),o=null),r=n,u()):!o&&a&&(o=setTimeout(()=>{r=s?Date.now():0,o=null,u()},c))};return c.cancel=()=>{o&&(clearTimeout(o),o=null),r=0,i=null,l=null},c}function q(e){if(!e)return null;if(e.endsWith("ms"))return parseInt(e,10);if(e.endsWith("s"))return 1e3*parseFloat(e);const t=parseInt(e,10);return isNaN(t)?null:t}function G(e,t,n){if(!t.onInput)return()=>{};const o=()=>{const t=e.selectionStart,o=e.selectionEnd,i=e.value,l=n(i);i!==l&&(e.value=l,null!==t&&null!==o&&e.setSelectionRange(t,o),e.dispatchEvent(new Event("input",{bubbles:!0})))};return e.addEventListener("input",o),e.value=n(e.value),()=>{e.removeEventListener("input",o)}}function K(e,t){const n=e.textContent||"";e.textContent=t(n)}const Z=["a","an","the","and","but","or","for","nor","on","at","to","from","by","in","of","with","as"];function J(e,t){if(!e)return e;const{every:n=!0,keepLower:o=Z}=t;if(n){return e.toLowerCase().split(/\s+/).map((e,t)=>0===t?Q(e):o.includes(e.toLowerCase())?e.toLowerCase():Q(e)).join(" ")}return Q(e)}function Q(e){return e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():e}function ee(e){var t,n,o;return void 0===e||!0===e?{every:!0,onInput:!0}:!1===e?{every:!1,onInput:!1}:{every:null==(t=e.every)||t,keepLower:null!=(n=e.keepLower)?n:Z,onInput:null==(o=e.onInput)||o}}const te=w({name:"capitalcase",ssr:!0,mounted(e,t){const n=ee(t.value);if(H(e)){const t=G(e,n,e=>J(e,n));e.__capitalcaseCleanup=t}else K(e,e=>J(e,n))},updated(e,t){const n=ee(t.value);H(e)?n.onInput&&(e.value=J(e.value,n)):K(e,e=>J(e,n))},unmounted(e){const t=e.__capitalcaseCleanup;null==t||t(),delete e.__capitalcaseCleanup}}),ne="clickDelay";function oe(e,t){t.feedback&&t.pendingClass&&e.classList.remove(t.pendingClass)}function ie(e,t){return n=>{const o=S(e,ne);if(!o||o.isPending)return n.preventDefault(),void n.stopPropagation();o.isPending=!0,t.feedback&&t.pendingClass&&e.classList.add(t.pendingClass),t.handler(n),o.timeoutId=setTimeout(()=>{o.isPending=!1,o.timeoutId=null,oe(e,t)},t.delay)}}function le(e,t){var n,o,i,l;const r=q(t.arg)||300;if("function"==typeof e)return{handler:e,delay:r,disabled:!1,pendingClass:"v-click-delay--pending",feedback:!0};if(!e)throw new Error("[Directix] v-click-delay: handler is required");return{handler:e.handler,delay:null!=(n=e.delay)?n:r,disabled:null!=(o=e.disabled)&&o,pendingClass:null!=(i=e.pendingClass)?i:"v-click-delay--pending",feedback:null==(l=e.feedback)||l}}const re=w({name:"click-delay",ssr:!0,defaults:{delay:300,disabled:!1,pendingClass:"v-click-delay--pending",feedback:!0},mounted(e,t){const n=le(t.value,t);if(n.disabled)return;const o={options:n,handler:ie(e,n),isPending:!1,timeoutId:null};C(e,ne,o),e.addEventListener("click",o.handler),e.addEventListener("touchend",o.handler)},updated(e,t){const n=S(e,ne);if(!n){const n=le(t.value,t);if(!n.disabled){const t={options:n,handler:ie(e,n),isPending:!1,timeoutId:null};C(e,ne,t),e.addEventListener("click",t.handler),e.addEventListener("touchend",t.handler)}return}const o=le(t.value,t);o.disabled&&!n.options.disabled?(e.removeEventListener("click",n.handler),e.removeEventListener("touchend",n.handler),n.timeoutId&&clearTimeout(n.timeoutId),oe(e,n.options),D(e,ne)):!o.disabled&&n.options.disabled&&(n.handler=ie(e,o),n.isPending=!1,n.timeoutId=null,e.addEventListener("click",n.handler),e.addEventListener("touchend",n.handler)),n.options=o},unmounted(e){const t=S(e,ne);t&&(e.removeEventListener("click",t.handler),e.removeEventListener("touchend",t.handler),t.timeoutId&&clearTimeout(t.timeoutId),oe(e,t.options),D(e,ne))}}),se=w({name:"click-outside",ssr:!1,defaults:{capture:!0,events:["click"],disabled:!1,stop:!1,prevent:!1},mounted(e,t){const n=ae(t.value);if(n.disabled)return;const o={options:n,handlers:new Map};e.__clickOutside=o;n.events.forEach(t=>{const i=t=>{ue(e,t,n)&&(n.stop&&t.stopPropagation(),n.prevent&&t.preventDefault(),n.handler(t))};o.handlers.set(t,i);const l={capture:n.capture,passive:!n.prevent};P(document,t,i,l)})},updated(e,t){const n=e.__clickOutside;if(!n)return;const o=n.options,i=ae(t.value);if(o.disabled!==i.disabled)if(i.disabled)n.handlers.forEach((e,t)=>{O(document,t,e,{capture:o.capture})}),n.handlers.clear();else{const t=t=>t=>{ue(e,t,i)&&(i.stop&&t.stopPropagation(),i.prevent&&t.preventDefault(),i.handler(t))};i.events.forEach(e=>{const o=t();n.handlers.set(e,o),P(document,e,o,{capture:i.capture,passive:!i.prevent})})}n.options=i},unmounted(e){const t=e.__clickOutside;t&&(t.handlers.forEach((e,n)=>{O(document,n,e,{capture:t.options.capture})}),delete e.__clickOutside)}});function ae(e){var t,n,o,i,l;if("function"==typeof e)return{handler:e,capture:!0,events:["click"],disabled:!1,stop:!1,prevent:!1};if(!e)throw new Error("[Directix] v-click-outside: handler is required");return __spreadValues({capture:null==(t=e.capture)||t,events:null!=(n=e.events)?n:["click"],disabled:null!=(o=e.disabled)&&o,stop:null!=(i=e.stop)&&i,prevent:null!=(l=e.prevent)&&l},e)}function ue(e,t,n){var o;const i=t.target;if(e.contains(i))return!1;if(null==(o=n.exclude)?void 0:o.length)for(const e of n.exclude){const t="function"==typeof e?e():$(e);if(t&&(t===i||t.contains(i)))return!1}return!0}function ce(e){if(!1===e)return{disabled:!0,color:"currentColor",duration:500,sizeRatio:1.5};if("string"==typeof e)return{color:e,duration:500,sizeRatio:1.5};const t={color:"currentColor",duration:500,disabled:!1,sizeRatio:1.5};return e&&"object"==typeof e?__spreadValues(__spreadValues({},t),e):t}const de=w({name:"click-wave",ssr:!1,defaults:{color:"currentColor",duration:500,disabled:!1,sizeRatio:1.5},mounted(e,t){const n=ce(t.value);if(n.disabled||!f())return;const o=getComputedStyle(e);"static"===o.position&&(e.style.position="relative"),"visible"===o.overflow&&(e.style.overflow="hidden"),e.classList.add("v-click-wave");const i={options:n,clickHandler:t=>{if(i.options.disabled)return;const n=function(e,t,n){const o=t.getBoundingClientRect(),i=e.clientX-o.left,l=e.clientY-o.top,r=Math.min(o.width,o.height)*(n.sizeRatio||1.5),s=document.createElement("span");return s.className="v-click-wave__effect",s.style.cssText=`\n position: absolute;\n border-radius: 50%;\n pointer-events: none;\n background-color: ${n.color};\n width: ${r}px;\n height: ${r}px;\n left: ${i-r/2}px;\n top: ${l-r/2}px;\n transform: scale(0);\n opacity: 0.5;\n z-index: 0;\n `,s}(t,e,i.options);n&&(e.appendChild(n),function(e,t){const n=t.duration||500;"function"==typeof e.animate?e.animate([{transform:"scale(0)",opacity:.5},{transform:"scale(1)",opacity:0}],{duration:n,easing:"ease-out",fill:"forwards"}).onfinish=()=>{e.remove()}:(e.style.transition=`transform ${n}ms ease-out, opacity ${n}ms ease-out`,String(e.offsetHeight),e.style.transform="scale(1)",e.style.opacity="0",setTimeout(()=>{e.remove()},n))}(n,i.options))}};e.__clickWave=i,e.addEventListener("click",i.clickHandler)},updated(e,t){const n=e.__clickWave;n&&(n.options=ce(t.value))},unmounted(e){const t=e.__clickWave;t&&(e.removeEventListener("click",t.clickHandler),e.classList.remove("v-click-wave"),delete e.__clickWave)}});function pe(e){return Array.isArray(e)?{items:e}:e}function fe(e){e&&e.parentNode&&e.parentNode.removeChild(e)}const ve=w({name:"context-menu",ssr:!1,mounted(e,t){const n=pe(t.value);if(n.disabled||!f())return;const o={options:n,contextMenuHandler:e=>{var t,i;e.preventDefault(),o.menuElement&&fe(o.menuElement),!1!==(null==(t=n.onBeforeShow)?void 0:t.call(n,e))&&(o.menuElement=function(e,t,n){const o=document.createElement("div");o.className=`v-context-menu ${e.class||""}`;const i=e.width?"number"==typeof e.width?`${e.width}px`:e.width:"150px";return o.style.cssText=`\n position: fixed;\n left: ${t}px;\n top: ${n}px;\n min-width: ${i};\n background: #fff;\n border-radius: 4px;\n box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);\n padding: 4px 0;\n z-index: 9999;\n font-size: 14px;\n `,e.items.forEach((t,n)=>{if(t.divider){const e=document.createElement("div");e.className="v-context-menu__divider",e.style.cssText="\n height: 1px;\n background: #e8e8e8;\n margin: 4px 0;\n ",o.appendChild(e)}if(e.renderItem){const i=e.renderItem(t,n);o.appendChild(i)}else{const e=document.createElement("div");if(e.className=`v-context-menu__item ${t.class||""}`,t.disabled&&e.classList.add("v-context-menu__item--disabled"),e.style.cssText=`\n padding: 8px 16px;\n cursor: ${t.disabled?"not-allowed":"pointer"};\n color: ${t.disabled?"#b0b0b0":"#333"};\n display: flex;\n align-items: center;\n gap: 8px;\n `,t.icon){const n=document.createElement("span");n.className="v-context-menu__icon",n.innerHTML=t.icon,e.appendChild(n)}const n=document.createElement("span");n.textContent=t.label,e.appendChild(n),!t.disabled&&t.handler&&(e.addEventListener("click",()=>{t.handler(),fe(o)}),e.addEventListener("mouseenter",()=>{e.style.background="#f5f5f5"}),e.addEventListener("mouseleave",()=>{e.style.background="transparent"})),o.appendChild(e)}}),o}(o.options,e.clientX,e.clientY),document.body.appendChild(o.menuElement),function(e,t,n){const o=e.getBoundingClientRect(),i=window.innerWidth,l=window.innerHeight;t+o.width>i&&(e.style.left=i-o.width-8+"px"),n+o.height>l&&(e.style.top=l-o.height-8+"px")}(o.menuElement,e.clientX,e.clientY),setTimeout(()=>{document.addEventListener("click",o.clickOutsideHandler)},0),null==(i=n.onAfterShow)||i.call(n))},menuElement:null,clickOutsideHandler:e=>{var t;const i=e.target;o.menuElement&&o.menuElement.contains(i)||(fe(o.menuElement),o.menuElement=null,document.removeEventListener("click",o.clickOutsideHandler),null==(t=n.onHide)||t.call(n))}};e.__contextMenu=o,P(e,"contextmenu",o.contextMenuHandler)},updated(e,t){const n=e.__contextMenu;n&&(n.options=pe(t.value))},unmounted(e){const t=e.__contextMenu;t&&(O(e,"contextmenu",t.contextMenuHandler),t.menuElement&&(fe(t.menuElement),document.removeEventListener("click",t.clickOutsideHandler)),delete e.__contextMenu)}});function me(e){return __async(this,null,function*(){if(y())try{return yield navigator.clipboard.writeText(e),!0}catch(e){console.warn("[Directix] Clipboard API failed, falling back to execCommand")}return function(e){const t=document.createElement("textarea");t.value=e,t.style.cssText="\n position: fixed;\n top: -9999px;\n left: -9999px;\n opacity: 0;\n pointer-events: none;\n ",document.body.appendChild(t);try{return t.select(),t.setSelectionRange(0,t.value.length),document.execCommand("copy")}catch(e){return!1}finally{document.body.removeChild(t)}}(e)})}const he=w({name:"copy",ssr:!1,mounted(e,t){const n=ge(t.value);if(n.disabled)return;n.title&&e.setAttribute("title",n.title);const o={handler:null,options:n};o.handler=()=>__async(null,null,function*(){var t,n,i,l;const r=o.options.value;if(r)try{if(!(yield me(r)))throw new Error("Copy failed");null==(n=(t=o.options).onSuccess)||n.call(t,r),e.dispatchEvent(new CustomEvent("copy:success",{detail:{text:r}}))}catch(t){const n=t;null==(l=(i=o.options).onError)||l.call(i,n),e.dispatchEvent(new CustomEvent("copy:error",{detail:{error:n}}))}else console.warn("[Directix] v-copy: No text to copy")}),e.addEventListener("click",o.handler),e.__copy=o},updated(e,t){const n=e.__copy;n&&(n.options=ge(t.value),n.options.title&&e.setAttribute("title",n.options.title))},unmounted(e){const t=e.__copy;t&&(e.removeEventListener("click",t.handler),delete e.__copy)}});function ge(e){return"string"==typeof e?{value:e}:e}function ye(e){return e instanceof Date?e.getTime():"number"==typeof e?e:new Date(e).getTime()}function be(e){const t=Math.max(0,e);return{days:Math.floor(t/864e5),hours:Math.floor(t%864e5/36e5),minutes:Math.floor(t%36e5/6e4),seconds:Math.floor(t%6e4/1e3),milliseconds:t%1e3,total:t}}function we(e){var t,n,o,i;return"object"==typeof e&&null!==e&&"target"in e?{target:e.target,format:null!=(t=e.format)?t:"hh:mm:ss",onComplete:e.onComplete,onTick:e.onTick,interval:null!=(n=e.interval)?n:1e3,showMilliseconds:null!=(o=e.showMilliseconds)&&o,autoStart:null==(i=e.autoStart)||i,labels:e.labels}:{target:e,format:"hh:mm:ss",interval:1e3,showMilliseconds:!1,autoStart:!0}}const xe=w({name:"countdown",ssr:!0,mounted(e,t){const n=we(t.value),o={options:n,targetTime:ye(n.target),intervalId:null,paused:!1,remaining:0};e.__countdown=o,!1!==n.autoStart?_e(e,o):Ee(e,o)},updated(e,t){const n=e.__countdown,o=we(t.value),i=ye(o.target);i!==n.targetTime?(n.targetTime=i,n.options=o,n.intervalId&&(clearInterval(n.intervalId),n.intervalId=null),n.paused||_e(e,n)):n.options=o},unmounted(e){const t=e.__countdown;(null==t?void 0:t.intervalId)&&clearInterval(t.intervalId),delete e.__countdown}});function _e(e,t){const n=()=>{const n=Date.now();if(t.remaining=t.targetTime-n,t.remaining<=0)return t.remaining=0,Ee(e,t),function(e){e.intervalId&&(clearInterval(e.intervalId),e.intervalId=null)}(t),t.options.onComplete&&t.options.onComplete(),void e.dispatchEvent(new CustomEvent("countdown:complete"));if(Ee(e,t),t.options.onTick){const e=be(t.remaining);t.options.onTick(e)}};n(),t.intervalId=setInterval(n,t.options.interval||1e3)}function Ee(e,t){const n=function(e,t){if("function"==typeof t)return t(e);const n=(e,t=2)=>String(e).padStart(t,"0");return t.replace(/dd/gi,n(e.days)).replace(/hh/gi,n(e.hours)).replace(/mm/gi,n(e.minutes)).replace(/ss/gi,n(e.seconds)).replace(/S{3}/gi,n(e.milliseconds,3)).replace(/SS/gi,n(Math.floor(e.milliseconds/10))).replace(/S/gi,String(Math.floor(e.milliseconds/100)))}(be(t.remaining),t.options.format||"hh:mm:ss");e.textContent=n}function Le(e){return"number"==typeof e?{value:e}:__spreadValues({value:0,startValue:0,duration:2e3,decimals:0,useGrouping:!1,locale:"en-US",easing:"easeOutQuart",delay:0},e||{})}const ke={linear:e=>e,easeOut:e=>1-__pow(1-e,3),easeInOut:e=>e<.5?4*e*e*e:1-__pow(-2*e+2,3)/2,easeOutQuart:e=>1-__pow(1-e,4),easeOutExpo:e=>1===e?1:1-__pow(2,-10*e)};function Te(e,t){return t.formatter?t.formatter(e):new Intl.NumberFormat(t.locale,{minimumFractionDigits:t.decimals,maximumFractionDigits:t.decimals,useGrouping:t.useGrouping}).format(e)}const Ce=w({name:"counter",ssr:!0,mounted(e,t){const n=Le(t.value),o={options:n,animationFrame:null,startTime:null,startValue:n.startValue||0,currentValue:n.startValue||0};e.__counter=o,e.textContent=Te(o.startValue,n),e.classList.add("v-counter"),f()&&n.value!==o.startValue&&setTimeout(()=>{Se(e,o)},n.delay||0)},updated(e,t){const n=e.__counter;if(!n)return;const o=Le(t.value),i=n.options.value,l=o.value;n.animationFrame&&(cancelAnimationFrame(n.animationFrame),n.animationFrame=null),n.startValue=n.currentValue,n.startTime=null,n.options=o,l!==i&&Se(e,n)},unmounted(e){const t=e.__counter;t&&(t.animationFrame&&cancelAnimationFrame(t.animationFrame),e.classList.remove("v-counter"),delete e.__counter)}});function Se(e,t){var n;const{options:o,startValue:i}=t,l=o.value,r=o.duration||2e3;t.startTime=null,null==(n=o.onStart)||n.call(o),t.animationFrame=requestAnimationFrame(function n(s){var a,u;t.startTime||(t.startTime=s);const c=s-t.startTime,d=Math.min(c/r,1),p=(o.customEasing||ke[o.easing||"easeOutQuart"])(d);t.currentValue=i+(l-i)*p;const f=Te(t.currentValue,o);e.textContent=f,null==(a=o.onUpdate)||a.call(o,t.currentValue,f),d<1?t.animationFrame=requestAnimationFrame(n):(t.currentValue=l,e.textContent=Te(l,o),t.animationFrame=null,null==(u=o.onComplete)||u.call(o,l))})}function De(e,t){const n=q(t.arg)||300;return"function"==typeof e?{handler:e,wait:n}:__spreadProps(__spreadValues({},e),{wait:e.wait||n})}const $e=w({name:"debounce",ssr:!0,defaults:{wait:300,leading:!1,trailing:!0},mounted(e,t){const n=De(t.value,t),o=R(t.modifiers)||N(e),i=j(n.handler,n.wait,{leading:n.leading,trailing:n.trailing});e.addEventListener(o,i),e.__debounce={debouncedFn:i,eventType:o,options:n}},updated(e,t){const n=e.__debounce;if(!n)return;const o=De(t.value,t);if(o.wait!==n.options.wait||o.leading!==n.options.leading||o.trailing!==n.options.trailing){n.debouncedFn.cancel();const t=j(o.handler,o.wait,{leading:o.leading,trailing:o.trailing});e.removeEventListener(n.eventType,n.debouncedFn),e.addEventListener(n.eventType,t),e.__debounce={debouncedFn:t,eventType:n.eventType,options:o}}else o.handler!==n.options.handler&&(n.options.handler=o.handler)},unmounted(e){const t=e.__debounce;t&&(t.debouncedFn.cancel(),e.removeEventListener(t.eventType,t.debouncedFn),delete e.__debounce)}});function Me(e){if(e.type.startsWith("touch")){const t=e.touches[0];return{clientX:t.clientX,clientY:t.clientY}}const t=e;return{clientX:t.clientX,clientY:t.clientY}}function He(e){const t=e.match(/translate\(([-\d.]+)px,\s*([-\d.]+)px\)/);return t?{x:parseFloat(t[1]),y:parseFloat(t[2])}:{x:0,y:0}}function Ie(e){var t,n,o;return void 0===e||!0===e?{axis:"both",constrain:!1,disabled:!1}:!1===e?{axis:"both",constrain:!1,disabled:!0}:{axis:null!=(t=e.axis)?t:"both",constrain:null!=(n=e.constrain)&&n,boundary:e.boundary,handle:e.handle,disabled:null!=(o=e.disabled)&&o,grid:e.grid,onStart:e.onStart,onDrag:e.onDrag,onEnd:e.onEnd}}const Pe=w({name:"draggable",ssr:!1,mounted(e,t){const n=Ie(t.value);if(n.disabled)return;"static"===getComputedStyle(e).position&&(e.style.position="absolute");const o={options:n,isDragging:!1,startX:0,startY:0,offsetX:0,offsetY:0,initialLeft:0,initialTop:0,boundaryWidth:0,boundaryHeight:0,elWidth:0,elHeight:0,handleEl:n.handle?e.querySelector(n.handle):null,moveHandler:null,endHandler:null};e.__draggable=o;const i=o.handleEl||e;function l(t){var n,i,l;if(o.options.disabled)return;"touchstart"===t.type&&t.preventDefault();const{clientX:r,clientY:s}=Me(t);o.isDragging=!0,o.startX=r,o.startY=s;const{x:a,y:u}=He(e.style.transform);if(o.offsetX=a,o.offsetY=u,o.options.constrain||o.options.boundary){const t=o.options.boundary?function(e,t){var n,o;if(!t)return null;if("function"==typeof t){const e=t();return null!=(n=null==e?void 0:e.getBoundingClientRect())?n:null}if("string"==typeof t){const e=document.querySelector(t);return null!=(o=null==e?void 0:e.getBoundingClientRect())?o:null}return t.getBoundingClientRect()}(0,o.options.boundary):null==(n=e.parentElement)?void 0:n.getBoundingClientRect();if(t){const n=e.getBoundingClientRect();o.initialLeft=n.left-t.left,o.initialTop=n.top-t.top,o.boundaryWidth=t.width,o.boundaryHeight=t.height,o.elWidth=n.width,o.elHeight=n.height}}e.classList.add("v-draggable--dragging"),o.moveHandler=t=>{var n,i;if(!o.isDragging)return;const{clientX:l,clientY:r}=Me(t);let s=l-o.startX,a=r-o.startY;"x"===o.options.axis?a=0:"y"===o.options.axis&&(s=0),o.options.grid&&(s=Math.round(s/o.options.grid[0])*o.options.grid[0],a=Math.round(a/o.options.grid[1])*o.options.grid[1]);let u=o.offsetX+s,c=o.offsetY+a;if(o.options.constrain||o.options.boundary){const e=o.initialLeft+s,t=o.initialTop+a,n=o.boundaryWidth-o.elWidth,i=o.boundaryHeight-o.elHeight,l=Math.max(0,Math.min(e,n)),r=Math.max(0,Math.min(t,i));u=o.offsetX+(l-o.initialLeft),c=o.offsetY+(r-o.initialTop)}e.style.transform=`translate(${u}px, ${c}px)`,null==(i=(n=o.options).onDrag)||i.call(n,{x:u,y:c},t)},o.endHandler=()=>{var t,n;if(!o.isDragging)return;o.isDragging=!1,e.classList.remove("v-draggable--dragging"),o.moveHandler&&(document.removeEventListener("mousemove",o.moveHandler),document.removeEventListener("touchmove",o.moveHandler)),o.endHandler&&(document.removeEventListener("mouseup",o.endHandler),document.removeEventListener("touchend",o.endHandler));const{x:i,y:l}=He(e.style.transform);null==(n=(t=o.options).onEnd)||n.call(t,{x:i,y:l},new MouseEvent("mouseup"))},document.addEventListener("mousemove",o.moveHandler),document.addEventListener("touchmove",o.moveHandler,{passive:!1}),document.addEventListener("mouseup",o.endHandler),document.addEventListener("touchend",o.endHandler),null==(l=(i=o.options).onStart)||l.call(i,{x:o.offsetX,y:o.offsetY},t)}i.addEventListener("mousedown",l),i.addEventListener("touchstart",l,{passive:!1})},updated(e,t){const n=e.__draggable;n&&(n.options=Ie(t.value),n.options.handle&&(n.handleEl=e.querySelector(n.options.handle)))},unmounted(e){const t=e.__draggable;t&&(t.moveHandler&&(document.removeEventListener("mousemove",t.moveHandler),document.removeEventListener("touchmove",t.moveHandler)),t.endHandler&&(document.removeEventListener("mouseup",t.endHandler),document.removeEventListener("touchend",t.endHandler)),delete e.__draggable)}}),Oe=w({name:"ellipsis",ssr:!0,defaults:{lines:1,ellipsis:"...",expandable:!1,titleBehavior:"auto"},mounted(e,t){const n=Fe(t.value);ze(e,n);const o={options:n,originalText:e.textContent||"",clickHandler:null,expanded:!1};if(n.expandable){const t=()=>{o.expanded?(ze(e,n),o.expanded=!1):(e.textContent=o.originalText,e.style.webkitLineClamp="",e.style.display="",e.style.overflow="",e.style.cursor="",o.expanded=!0)};e.addEventListener("click",t),e.style.cursor="pointer",o.clickHandler=t}("always"===n.titleBehavior||"auto"===n.titleBehavior&&Ae(e))&&(e.title=o.originalText),e.__ellipsis=o},updated(e,t){const n=e.__ellipsis;if(!n){const n=Fe(t.value);return void ze(e,n)}const o=Fe(t.value);if(e.textContent!==n.originalText&&(n.originalText=e.textContent||"",n.expanded=!1),n.options.expandable!==o.expandable)if(n.clickHandler&&(e.removeEventListener("click",n.clickHandler),n.clickHandler=null),o.expandable){const t=()=>{n.expanded?(ze(e,o),n.expanded=!1):(e.textContent=n.originalText,e.style.webkitLineClamp="",e.style.display="",e.style.overflow="",n.expanded=!0)};e.addEventListener("click",t),e.style.cursor="pointer",n.clickHandler=t}else e.style.cursor="";n.options=o,n.expanded||ze(e,o),"always"===o.titleBehavior?e.title=n.originalText:"auto"===o.titleBehavior?e.title=Ae(e)?n.originalText:"":e.removeAttribute("title")},unmounted(e){const t=e.__ellipsis;t&&(t.clickHandler&&e.removeEventListener("click",t.clickHandler),e.style.removeProperty("-webkit-line-clamp"),e.style.removeProperty("-webkit-box-orient"),e.style.removeProperty("display"),e.style.removeProperty("overflow"),e.style.removeProperty("text-overflow"),e.style.removeProperty("white-space"),e.style.removeProperty("cursor"),delete e.__ellipsis)}});function ze(e,t){const n=t.lines||1;1===n?(e.style.overflow="hidden",e.style.textOverflow="ellipsis",e.style.whiteSpace="nowrap"):(e.style.display="-webkit-box",e.style.overflow="hidden",e.style.webkitBoxOrient="vertical",e.style.webkitLineClamp=String(n))}function Ae(e){return e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight}function Fe(e){var t,n,o,i;return"number"==typeof e?{lines:e,ellipsis:"...",expandable:!1,titleBehavior:"auto"}:{lines:null!=(t=null==e?void 0:e.lines)?t:1,ellipsis:null!=(n=null==e?void 0:e.ellipsis)?n:"...",expandable:null!=(o=null==e?void 0:e.expandable)&&o,titleBehavior:null!=(i=null==e?void 0:e.titleBehavior)?i:"auto"}}const Ye=/[\p{Emoji_Presentation}\p{Extended_Pictographic}]/gu;function Re(e){return!1===e?{strip:!1}:!0===e||void 0===e?{strip:!0}:__spreadValues({strip:!0,replacement:""},e)}function Ne(e,t){var n;const o=function(e){if(e.pattern)return new RegExp(e.pattern,"gu");if(e.blockList&&e.blockList.length>0){const t=e.blockList.map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|");return new RegExp(t,"gu")}return e.allowList&&e.allowList.length,Ye}(t),i=t.replacement||"";let l=e;if(t.allowList&&t.allowList.length>0)l=e.replace(o,n=>{var o,l,r;return l=n,(r=t.allowList)&&0!==r.length&&r.includes(l)?n:(null==(o=t.onEmoji)||o.call(t,n,e.indexOf(n)),i)});else{const n=e.match(o);n&&n.forEach(n=>{var o;null==(o=t.onEmoji)||o.call(t,n,e.indexOf(n))}),l=e.replace(o,i)}return l!==e&&(null==(n=t.onStrip)||n.call(t,e,l)),l}const Xe=w({name:"emoji",ssr:!1,mounted(e,t){var n;if(!f())return;const o=Re(t.value);if(!o.strip&&!(null==(n=o.blockList)?void 0:n.length))return;const i={options:o,inputHandler:e=>{const t=e.target,n=t.value,o=Ne(n,i.options);if(o!==n){const e=t.selectionStart||0,i=t.selectionEnd||0;t.value=o;const l=n.length-o.length;t.setSelectionRange(Math.max(0,e-l),Math.max(0,i-l)),t.dispatchEvent(new Event("input",{bubbles:!0}))}},pasteHandler:e=>{var t;if(!i.options.strip)return;const n=null==(t=e.clipboardData)?void 0:t.getData("text");if(n&&Ye.test(n)){e.preventDefault();const t=Ne(n,i.options),o=e.target,l=o.selectionStart||0,r=o.selectionEnd||0,s=o.value;o.value=s.substring(0,l)+t+s.substring(r),o.setSelectionRange(l+t.length,l+t.length),o.dispatchEvent(new Event("input",{bubbles:!0}))}}};if(e.__emoji=i,P(e,"input",i.inputHandler),P(e,"paste",i.pasteHandler),e.value){const t=Ne(e.value,i.options);t!==e.value&&(e.value=t)}e.classList.add("v-emoji")},updated(e,t){const n=e.__emoji;n&&(n.options=Re(t.value))},unmounted(e){const t=e.__emoji;t&&(O(e,"input",t.inputHandler),O(e,"paste",t.pasteHandler),e.classList.remove("v-emoji"),delete e.__emoji)}});function Ve(e){var t;if(!e||"string"==typeof e||Array.isArray(e))return{data:e,format:"csv",filename:"export"};const n=e;return __spreadProps(__spreadValues({format:"csv",filename:"export",includeHeaders:!0,delimiter:","},n),{data:null!=(t=n.data)?t:[]})}function Be(e){const{data:t,format:n="csv",filename:o="export"}=e;let i;switch(n){case"json":i=function(e){return JSON.stringify(e,null,2)}(t);break;case"html":i=function(e,t){var n;if(!Array.isArray(e)||0===e.length)return"";const o=t.columns||Object.keys(e[0]),i=t.headers||{};let l='<table border="1">\n';if(t.includeHeaders){l+=" <thead>\n <tr>\n";for(const e of o)l+=` <th>${i[e]||e}</th>\n`;l+=" </tr>\n </thead>\n"}l+=" <tbody>\n";for(const t of e){l+=" <tr>\n";for(const e of o)l+=` <td>${null!=(n=t[e])?n:""}</td>\n`;l+=" </tr>\n"}return l+=" </tbody>\n</table>",l}(Array.isArray(t)?t:[t],e);break;case"txt":i="string"==typeof t?t:JSON.stringify(t,null,2);break;default:i=function(e,t){if(!Array.isArray(e)||0===e.length)return"";const n=t.delimiter||",",o=t.columns||Object.keys(e[0]),i=t.headers||{};return(t.includeHeaders?`${o.map(e=>i[e]||e).join(n)}\n`:"")+e.map(e=>o.map(t=>{const o=e[t];return"string"==typeof o&&(o.includes(n)||o.includes("\n")||o.includes('"'))?`"${o.replace(/"/g,'""')}"`:null!=o?o:""}).join(n)).join("\n")}(Array.isArray(t)?t:[t],e)}!function(e,t,n){const o=new Blob([e],{type:{csv:"text/csv;charset=utf-8;",json:"application/json;charset=utf-8;",txt:"text/plain;charset=utf-8;",html:"text/html;charset=utf-8;"}[n]}),i=URL.createObjectURL(o),l=document.createElement("a");l.href=i,l.download=`${t}.${n}`,document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(i)}(i,o,n)}const Ue=w({name:"export",ssr:!1,mounted(e,t){const n=Ve(t.value);if(!f())return;const o={options:n,clickHandler:()=>{var e,t,n,i,l,r;if(!1!==(null==(t=(e=o.options).onBeforeExport)?void 0:t.call(e)))try{Be(o.options),null==(i=(n=o.options).onAfterExport)||i.call(n)}catch(e){null==(r=(l=o.options).onError)||r.call(l,e)}}};e.__export=o,P(e,"click",o.clickHandler),e.classList.add("v-export")},updated(e,t){const n=e.__export;n&&(n.options=Ve(t.value))},unmounted(e){const t=e.__export;t&&(O(e,"click",t.clickHandler),e.classList.remove("v-export"),delete e.__export)}}),je={direction:"toggle",visible:!0,duration:300,delay:0,easing:"ease",minOpacity:0,maxOpacity:1};function We(e){return"boolean"==typeof e?__spreadProps(__spreadValues({},je),{visible:e}):"string"==typeof e?__spreadProps(__spreadValues({},je),{direction:e}):__spreadValues(__spreadValues({},je),e)}function qe(e){return{ease:"ease","ease-in":"ease-in","ease-out":"ease-out","ease-in-out":"ease-in-out",linear:"linear"}[e]||e}const Ge=w({name:"fade",ssr:!0,mounted(e,t){const n=We(t.value),o={options:n,currentOpacity:n.visible?n.maxOpacity||1:n.minOpacity||0,animationFrame:null,isAnimating:!1};e.__fade=o,e.style.transition=`opacity ${n.duration}ms ${qe(n.easing||"ease")} ${n.delay}ms`,"in"===n.direction?(e.style.opacity=String(n.minOpacity||0),e.style.display="",String(e.offsetHeight),requestAnimationFrame(()=>{e.style.opacity=String(n.maxOpacity||1),o.currentOpacity=n.maxOpacity||1})):"out"===n.direction?(e.style.opacity=String(n.maxOpacity||1),e.style.display="",requestAnimationFrame(()=>{e.style.opacity=String(n.minOpacity||0),setTimeout(()=>{e.style.display="none"},(n.duration||300)+(n.delay||0))})):(e.style.opacity=String(o.currentOpacity),n.visible||(e.style.display="none")),e.classList.add("v-fade")},updated(e,t){const n=e.__fade;if(!n)return;const o=We(t.value),i=!1!==o.visible,l=n.options.visible;n.options=o,e.style.transition=`opacity ${o.duration}ms ${qe(o.easing||"ease")} ${o.delay}ms`,l!==o.visible&&function(e,t,n){var o;if(t.isAnimating)return;const i=t.options;t.isAnimating=!0,null==(o=i.onStart)||o.call(i,n),"in"===n?(e.style.display="",e.style.opacity=String(i.minOpacity||0),String(e.offsetHeight),requestAnimationFrame(()=>{e.style.opacity=String(i.maxOpacity||1),setTimeout(()=>{var e;t.isAnimating=!1,t.currentOpacity=i.maxOpacity||1,null==(e=i.onComplete)||e.call(i,n)},(i.duration||300)+(i.delay||0))})):(e.style.opacity=String(i.minOpacity||0),setTimeout(()=>{var o;t.isAnimating=!1,t.currentOpacity=i.minOpacity||0,e.style.display="none",null==(o=i.onComplete)||o.call(i,n)},(i.duration||300)+(i.delay||0)))}(e,n,i?"in":"out")},unmounted(e){const t=e.__fade;t&&(t.animationFrame&&cancelAnimationFrame(t.animationFrame),e.classList.remove("v-fade"),delete e.__fade)}});const Ke=new Set(["input","textarea","select","button"]);const Ze=w({name:"focus",ssr:!0,defaults:{focus:!0,refocus:!1},mounted(e,t){if(!f())return;const n=Je(t.value);if(!n.focus||!function(e){if(!f())return!1;const t=e.tagName.toLowerCase();if(Ke.has(t))return!e.disabled;if(e.isContentEditable)return!0;const n=e.getAttribute("tabindex");if(null!=n)return"-1"!==n;if("a"===t||"area"===t)return e.hasAttribute("href");return!1}(e))return void(n.focus&&console.warn("[Directix] v-focus: Element is not focusable"));const o=()=>{var t;return null==(t=n.onFocus)?void 0:t.call(n,e)},i=()=>{var t;return null==(t=n.onBlur)?void 0:t.call(n,e)};e.addEventListener("focus",o),e.addEventListener("blur",i),e.__focus={options:n,handleFocus:o,handleBlur:i,lastValue:t.value},e.focus()},updated(e,t){const n=e.__focus;if(!n)return;const o=Je(t.value);o.onFocus!==n.options.onFocus&&(e.removeEventListener("focus",n.handleFocus),n.handleFocus=()=>{var t;return null==(t=o.onFocus)?void 0:t.call(o,e)},e.addEventListener("focus",n.handleFocus)),o.onBlur!==n.options.onBlur&&(e.removeEventListener("blur",n.handleBlur),n.handleBlur=()=>{var t;return null==(t=o.onBlur)?void 0:t.call(o,e)},e.addEventListener("blur",n.handleBlur));const i=!function(e,t){if(e===t)return!0;if("object"!=typeof e||"object"!=typeof t||null===e||null===t)return!1;const n=e,o=t,i=Object.keys(n),l=Object.keys(o);return i.length===l.length&&i.every(e=>n[e]===o[e])}(t.value,n.lastValue);o.refocus&&o.focus&&i&&e.focus(),n.options=o,n.lastValue=t.value},unmounted(e){const t=e.__focus;t&&(e.removeEventListener("focus",t.handleFocus),e.removeEventListener("blur",t.handleBlur),delete e.__focus)}});function Je(e){return"boolean"==typeof e?{focus:e,refocus:!1}:__spreadValues({focus:!0,refocus:!1},e)}function Qe(e){return __async(this,null,function*(){e.requestFullscreen?yield e.requestFullscreen():e.webkitRequestFullscreen?yield e.webkitRequestFullscreen():e.mozRequestFullScreen?yield e.mozRequestFullScreen():e.msRequestFullscreen&&(yield e.msRequestFullscreen())})}function et(){return __async(this,null,function*(){document.exitFullscreen?yield document.exitFullscreen():document.webkitExitFullscreen?yield document.webkitExitFullscreen():document.mozCancelFullScreen?yield document.mozCancelFullScreen():document.msExitFullscreen&&(yield document.msExitFullscreen())})}function tt(e){return"boolean"==typeof e?{initialState:e}:__spreadValues({initialState:!1,toggleKey:"Escape"},e)}const nt=w({name:"fullscreen",ssr:!1,mounted(e,t){const n=tt(t.value);if(!f()||!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled))return;const o={options:n,clickHandler:()=>function(e,t){return __async(this,null,function*(){t.isFullscreen?yield et():yield Qe(e)})}(e,o),keydownHandler:e=>{!1!==o.options.toggleKey&&e.key===o.options.toggleKey&&o.isFullscreen&&et()},changeHandler:()=>{var t,n,i,l,r,s;const a=o.isFullscreen;o.isFullscreen=(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||null)===e,a!==o.isFullscreen&&(o.isFullscreen?(e.classList.add(o.options.fullscreenClass||"v-fullscreen--active"),null==(n=(t=o.options).onEnter)||n.call(t)):(e.classList.remove(o.options.fullscreenClass||"v-fullscreen--active"),null==(l=(i=o.options).onExit)||l.call(i)),null==(s=(r=o.options).onChange)||s.call(r,o.isFullscreen))},isFullscreen:!1};e.__fullscreen=o,document.addEventListener("fullscreenchange",o.changeHandler),document.addEventListener("webkitfullscreenchange",o.changeHandler),document.addEventListener("mozfullscreenchange",o.changeHandler),document.addEventListener("MSFullscreenChange",o.changeHandler),!1!==n.toggleKey&&document.addEventListener("keydown",o.keydownHandler),e.toggleFullscreen=o.clickHandler,n.initialState&&Qe(e),e.classList.add("v-fullscreen")},updated(e,t){const n=e.__fullscreen;n&&(n.options=tt(t.value))},unmounted(e){const t=e.__fullscreen;t&&(t.isFullscreen&&et(),document.removeEventListener("fullscreenchange",t.changeHandler),document.removeEventListener("webkitfullscreenchange",t.changeHandler),document.removeEventListener("mozfullscreenchange",t.changeHandler),document.removeEventListener("MSFullscreenChange",t.changeHandler),!1!==t.options.toggleKey&&document.removeEventListener("keydown",t.keydownHandler),e.classList.remove("v-fullscreen"),e.classList.remove(t.options.fullscreenClass||"v-fullscreen--active"),delete e.__fullscreen,delete e.toggleFullscreen)}});function ot(e){return"string"==typeof e||Array.isArray(e)?{keywords:e}:__spreadValues({className:"v-highlight",caseSensitive:!1,wholeWord:!1,tag:"mark"},e)}function it(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function lt(e,t){const n=Array.isArray(t.keywords)?t.keywords:[t.keywords];if(0===n.length||!e)return e;const o=t.caseSensitive||!1,i=t.wholeWord||!1,l=t.tag||"mark",r=t.className||"v-highlight",s=t.style?` style="${t.style}"`:"";n.sort((e,t)=>t.length-e.length);let a=e;for(const e of n){if(!e)continue;const t=it(e),n=i?"\\b":"",u=new RegExp(`${n}${t}${n}`,o?"g":"gi");a=a.replace(u,`<${l} class="${r}"${s}>$&</${l}>`)}return a}const rt=w({name:"highlight",ssr:!0,mounted(e,t){if(!f())return;const n=ot(t.value);if(!n.keywords||Array.isArray(n.keywords)&&0===n.keywords.length)return;const o={options:n,originalContent:e.innerHTML};e.__highlight=o,st(e,o)},updated(e,t){const n=e.__highlight;if(!n){const n=ot(t.value);if(n.keywords){const t={options:n,originalContent:e.innerHTML};e.__highlight=t,st(e,t)}return}const o=ot(t.value);(Array.isArray(n.options.keywords)?n.options.keywords.join(","):n.options.keywords)===(Array.isArray(o.keywords)?o.keywords.join(","):o.keywords)&&JSON.stringify(n.options)===JSON.stringify(o)||(e.innerHTML=n.originalContent,n.options=o,n.originalContent=e.innerHTML,st(e,n))},unmounted(e){const t=e.__highlight;t&&(e.innerHTML=t.originalContent,delete e.__highlight)}});function st(e,t){var n,o;if(function(e){for(const t of e.childNodes)if(t.nodeType===Node.ELEMENT_NODE)return!1;return!0}(e)){const i=lt(t.originalContent,t.options);e.innerHTML=i;const l=e.querySelectorAll(t.options.tag||"mark").length;null==(o=(n=t.options).onHighlight)||o.call(n,l)}else!function(e,t){var n,o,i,l;const r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null),s=[];let a=r.nextNode(),u=0;for(;a;)(null==(o=null==(n=a.parentNode)?void 0:n.tagName)?void 0:o.toLowerCase())!==(t.options.tag||"mark").toLowerCase()?(s.push(a),a=r.nextNode()):a=r.nextNode();for(const n of s){const o=n.textContent||"",i=lt(o,t.options);if(i!==o){const o=document.createElement("span");o.innerHTML=i;const l=n.parentNode;if(l){for(l.insertBefore(o,n),l.removeChild(n);o.firstChild;)l.insertBefore(o.firstChild,o);l.removeChild(o)}u+=e.querySelectorAll(t.options.tag||"mark").length}}null==(l=(i=t.options).onHighlight)||l.call(i,u)}(e,t)}const at={esc:"escape",space:" ",up:"arrowup",down:"arrowdown",left:"arrowleft",right:"arrowright",enter:"enter",tab:"tab",delete:"delete",backspace:"backspace",insert:"insert",home:"home",end:"end",pagedown:"pagedown",pageup:"pageup",f1:"f1",f2:"f2",f3:"f3",f4:"f4",f5:"f5",f6:"f6",f7:"f7",f8:"f8",f9:"f9",f10:"f10",f11:"f11",f12:"f12"},ut=new Set(["ctrl","alt","shift","meta"]);function ct(e){const t=e.toLowerCase();return at[t]||t}function dt(e){const t=e.toLowerCase().split(/[+.]/),n=[];let o="";for(const e of t)ut.has(e)?n.push(e):o=ct(e);return{key:o,modifiers:n}}function pt(e,t){if(ct(e.key)!==t.key)return!1;const n=new Set;if(e.ctrlKey&&n.add("ctrl"),e.altKey&&n.add("alt"),e.shiftKey&&n.add("shift"),e.metaKey&&n.add("meta"),n.size!==t.modifiers.size)return!1;for(const e of t.modifiers)if(!n.has(e))return!1;return!0}function ft(e,t,n,o={}){var i,l,r;return{key:ct(e),modifiers:new Set(t),handler:n,prevent:null==(i=o.prevent)||i,stop:null==(l=o.stop)||l,disabled:null!=(r=o.disabled)&&r}}function vt(e,t,n){if(t){const o=t.toLowerCase();let i;const l=[];if(ut.has(o)){l.push(o);for(const e of Object.keys(n)){const t=e.toLowerCase();ut.has(t)?l.push(t):i=ct(e)}}else{const e=dt(t);i=e.key,l.push(...e.modifiers);for(const e of Object.keys(n)){const t=e.toLowerCase();ut.has(t)&&l.push(t)}}return[ft(i,l,"function"==typeof e?e:e.handler)]}if("function"==typeof e)return console.warn('[Directix] v-hotkey: hotkey definition required (use v-hotkey:ctrl.s="handler")'),[];if(Array.isArray(e))return e.map(e=>ft(e.key,e.modifiers||[],e.handler,{prevent:e.prevent,stop:e.stop,disabled:e.disabled}));if("object"==typeof e&&null!==e){if("handler"in e&&"function"==typeof e.handler){const t=e;return[ft(t.key,t.modifiers||[],t.handler,t)]}const t=[];for(const[n,o]of Object.entries(e)){const{key:e,modifiers:i}=dt(n),l="function"==typeof o?o:o.handler,r="object"==typeof o?o:{};t.push(ft(e,i,l,r))}return t}return[]}function mt(e,t){if(0===t.length)return null;const n={entries:t,handler:null};return n.handler=function(e){return t=>{for(const n of e.entries)if(!n.disabled&&pt(t,n))return n.prevent&&t.preventDefault(),n.stop&&t.stopPropagation(),void n.handler(t)}}(n),e.tabIndex=e.tabIndex||-1,e.addEventListener("keydown",n.handler),e.__hotkey=n,n}const ht=w({name:"hotkey",ssr:!0,mounted(e,t){mt(e,vt(t.value,t.arg,t.modifiers))},updated(e,t){const n=e.__hotkey,o=vt(t.value,t.arg,t.modifiers);n?n.entries=o:mt(e,o)},unmounted(e){const t=e.__hotkey;t&&(e.removeEventListener("keydown",t.handler),delete e.__hotkey)}});const gt="hover";function yt(e){return"function"==typeof e?{handler:e,class:"v-hover"}:__spreadValues({class:"v-hover",disabled:!1,enterDelay:0,leaveDelay:0},e)}function bt(e,t,n){var o,i;const{options:l}=t;l.class&&e.classList.add(l.class),e.dispatchEvent(new CustomEvent("hover:enter",{detail:{event:n}})),null==(o=l.onEnter)||o.call(l,n),null==(i=l.handler)||i.call(l,!0,n)}function wt(e,t,n){var o,i;const{options:l}=t;l.class&&e.classList.remove(l.class),e.dispatchEvent(new CustomEvent("hover:leave",{detail:{event:n}})),null==(o=l.onLeave)||o.call(l,n),null==(i=l.handler)||i.call(l,!1,n)}const xt=w({name:"hover",ssr:!1,defaults:{class:"v-hover",disabled:!1,enterDelay:0,leaveDelay:0},mounted(e,t){const n=yt(t.value);if(n.disabled||!f())return;const o=function(){const e=new Set,t=new Set;return{setTimeout(t,n){const o=setTimeout(()=>{e.delete(o),t()},n);return e.add(o),o},clearTimeout(t){clearTimeout(t),e.delete(t)},setInterval(e,n){const o=setInterval(e,n);return t.add(o),o},clearInterval(e){clearInterval(e),t.delete(e)},clearAll(){e.forEach(e=>clearTimeout(e)),t.forEach(e=>clearInterval(e)),e.clear(),t.clear()},hasActive:()=>e.size>0||t.size>0}}();let i=!1;const l={options:n,isHovering:!1,timer:o,cleanup:null};l.cleanup=function(e,t,n=!1){return Object.entries(t).forEach(([t,o])=>{e.addEventListener(t,o,"boolean"==typeof n?n:F(n))}),()=>{Object.entries(t).forEach(([t,o])=>{e.removeEventListener(t,o,"boolean"==typeof n?n:F(n))})}}(e,{mouseenter:t=>{const r=t;o.clearAll(),i||(n.enterDelay&&n.enterDelay>0?o.setTimeout(()=>{i=!0,l.isHovering=!0,bt(e,l,r)},n.enterDelay):(i=!0,l.isHovering=!0,bt(e,l,r)))},mouseleave:t=>{const r=t;o.clearAll(),i&&(n.leaveDelay&&n.leaveDelay>0?o.setTimeout(()=>{i=!1,l.isHovering=!1,wt(e,l,r)},n.leaveDelay):(i=!1,l.isHovering=!1,wt(e,l,r)))}}),C(e,gt,l)},updated(e,t){const n=S(e,gt);if(!n)return;const o=yt(t.value);o.disabled&&!n.options.disabled?e.classList.remove(n.options.class||"v-hover"):!o.disabled&&n.options.disabled,n.options=o},unmounted(e){var t;const n=S(e,gt);n&&(n.timer.clearAll(),null==(t=n.cleanup)||t.call(n),e.classList.remove(n.options.class||"v-hover"),D(e,gt))}}),_t={minScale:.5,maxScale:5,doubleTapZoom:2.5,tapTimeout:300,animationDuration:300,hintDuration:3e3,zoomIndicatorDuration:1500};let Et=9999;function Lt(e,t,n,o){return Math.sqrt(__pow(n-e,2)+__pow(o-t,2))}function kt(e,t,n){return Math.max(t,Math.min(n,e))}function Tt(e,t){var n,o,i,l,r,s,a,u,c,d;const p="IMG"===t.tagName?t.src:void 0,f=t.getAttribute("data-preview")||void 0,v="IMG"===t.tagName?t.alt:t.getAttribute("alt")||void 0;return"string"==typeof e?{src:e,previewSrc:f,alt:v,enablePinchZoom:!0,enableDoubleTap:!0,enableSwipeClose:!0,showZoomIndicator:!0,showCloseButton:!0,closeOnClickOutside:!0,closeOnEsc:!0,minScale:_t.minScale,maxScale:_t.maxScale}:{src:(null==e?void 0:e.src)||p,previewSrc:(null==e?void 0:e.previewSrc)||f,alt:(null==e?void 0:e.alt)||v,disabled:null!=(n=null==e?void 0:e.disabled)&&n,closeOnClickOutside:null==(o=null==e?void 0:e.closeOnClickOutside)||o,closeOnEsc:null==(i=null==e?void 0:e.closeOnEsc)||i,showCloseButton:null==(l=null==e?void 0:e.showCloseButton)||l,zIndex:null==e?void 0:e.zIndex,class:null==e?void 0:e.class,enablePinchZoom:null==(r=null==e?void 0:e.enablePinchZoom)||r,enableDoubleTap:null==(s=null==e?void 0:e.enableDoubleTap)||s,enableSwipeClose:null==(a=null==e?void 0:e.enableSwipeClose)||a,showZoomIndicator:null==(u=null==e?void 0:e.showZoomIndicator)||u,minScale:null!=(c=null==e?void 0:e.minScale)?c:_t.minScale,maxScale:null!=(d=null==e?void 0:e.maxScale)?d:_t.maxScale,onOpen:null==e?void 0:e.onOpen,onClose:null==e?void 0:e.onClose}}const Ct=w({name:"image-preview",ssr:!1,mounted(e,t){const n=Tt(t.value,e),o={options:n,overlay:null,imageContainer:null,image:null,isOpen:!1,transform:{scale:1,translateX:0,translateY:0},gesture:{isDragging:!1,startX:0,startY:0,startDistance:0,startScale:1,lastTapTime:0,swipeStartY:0},handlers:{click:()=>{},esc:null,touchStart:null,touchMove:null,touchEnd:null,mouseDown:null,mouseMove:null,mouseUp:null,wheel:null}};if(e.__imagePreview=o,n.disabled)return;e.style.cursor="zoom-in";const i=function(e){const t=(t=!1)=>{var n;if(!e.imageContainer)return;const{scale:o,translateX:i,translateY:l}=e.transform;e.imageContainer.style.transition=t?"transform 0.2s ease-out":"none",e.imageContainer.style.transform=`translate(${i}px, ${l}px) scale(${o})`;const r=null==(n=e.overlay)?void 0:n.querySelector(".v-image-preview-zoom");r&&(r.textContent=`${Math.round(100*o)}%`,r.style.opacity="1",clearTimeout(r._hideTimer),r._hideTimer=setTimeout(()=>{r.style.opacity="0"},_t.zoomIndicatorDuration))};return{updateTransform:t,resetTransform:()=>{e.transform={scale:1,translateX:0,translateY:0},t(!0)},constrainScale:t=>{const{minScale:n=_t.minScale,maxScale:o=_t.maxScale}=e.options;return kt(t,n,o)},constrainTranslate:(t,n)=>{const{scale:o}=e.transform;if(!e.image||o<=1)return{x:0,y:0};const i=e.image.getBoundingClientRect(),l=i.width*(o-1)/2,r=i.height*(o-1)/2;return{x:kt(t,-l,l),y:kt(n,-r,r)}}}}(o),l=()=>{o.isOpen&&o.overlay&&(o.overlay.style.opacity="0",setTimeout(()=>{var e,t;if(!o.overlay)return;o.overlay.remove(),o.overlay=null,o.imageContainer=null,o.image=null,o.isOpen=!1,o.transform={scale:1,translateX:0,translateY:0},document.body.style.overflow="";const{handlers:n}=o;n.esc&&document.removeEventListener("keydown",n.esc),n.touchStart&&document.removeEventListener("touchstart",n.touchStart),n.touchMove&&document.removeEventListener("touchmove",n.touchMove),n.touchEnd&&document.removeEventListener("touchend",n.touchEnd),n.mouseDown&&document.removeEventListener("mousedown",n.mouseDown),n.mouseMove&&document.removeEventListener("mousemove",n.mouseMove),n.mouseUp&&document.removeEventListener("mouseup",n.mouseUp),n.wheel&&document.removeEventListener("wheel",n.wheel),null==(t=(e=o.options).onClose)||t.call(e)},_t.animationDuration))},r=function(e,t,n){const{updateTransform:o,resetTransform:i,constrainScale:l,constrainTranslate:r}=t;return{handleTouchStart:t=>{if(!e.imageContainer)return;const n=Date.now(),{gesture:i,transform:r,options:s}=e;if(1===t.touches.length){if(!1!==s.enableDoubleTap&&n-i.lastTapTime<_t.tapTimeout)return t.preventDefault(),r.scale=r.scale>1?1:l(_t.doubleTapZoom),i.lastTapTime=0,void o(!0);i.lastTapTime=n,i.isDragging=!0,i.startX=t.touches[0].clientX-r.translateX,i.startY=t.touches[0].clientY-r.translateY,i.swipeStartY=t.touches[0].clientY}else 2===t.touches.length&&!1!==s.enablePinchZoom&&(i.isDragging=!1,i.startDistance=Lt(t.touches[0].clientX,t.touches[0].clientY,t.touches[1].clientX,t.touches[1].clientY),i.startScale=r.scale)},handleTouchMove:t=>{if(!e.imageContainer)return;t.preventDefault();const{gesture:n,transform:i,options:s}=e;if(1===t.touches.length&&n.isDragging){const e=t.touches[0].clientX-n.startX,l=t.touches[0].clientY-n.startY,s=r(e,l);i.translateX=s.x,i.translateY=s.y,o(!1)}else if(2===t.touches.length&&!1!==s.enablePinchZoom){const e=Lt(t.touches[0].clientX,t.touches[0].clientY,t.touches[1].clientX,t.touches[1].clientY);i.scale=l(n.startScale*(e/n.startDistance)),o(!1)}},handleTouchEnd:t=>{const{gesture:o,transform:l,options:r}=e;o.isDragging=!1,!1!==r.enableSwipeClose&&1===t.changedTouches.length&&l.scale<=1&&t.changedTouches[0].clientY-o.swipeStartY<-100?n():l.scale<1&&i()},handleMouseDown:t=>{e.imageContainer&&(e.gesture.isDragging=!0,e.gesture.startX=t.clientX-e.transform.translateX,e.gesture.startY=t.clientY-e.transform.translateY,e.imageContainer.style.cursor="grabbing")},handleMouseMove:t=>{if(!e.gesture.isDragging||!e.imageContainer)return;const n=t.clientX-e.gesture.startX,i=t.clientY-e.gesture.startY,l=r(n,i);e.transform.translateX=l.x,e.transform.translateY=l.y,o(!1)},handleMouseUp:()=>{e.gesture.isDragging=!1,e.imageContainer&&(e.imageContainer.style.cursor="grab")},handleWheel:t=>{if(!e.imageContainer||!1===e.options.enablePinchZoom)return;t.preventDefault();const n=t.deltaY>0?.9:1.1;e.transform.scale=l(e.transform.scale*n),o(!1),e.transform.scale<.8&&setTimeout(i,100)}}}(o,i,l),s=()=>{var e,t,n;if(o.isOpen||o.options.disabled)return;const{overlay:s,imageContainer:a,image:u}=function(e){var t;const n=null!=(t=e.zIndex)?t:++Et,o=document.createElement("div");o.className="v-image-preview-overlay",e.class&&o.classList.add(e.class),Object.assign(o.style,{position:"fixed",inset:"0",background:"rgba(0, 0, 0, 0.95)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:String(n),cursor:"zoom-out",opacity:"0",transition:"opacity 0.3s",touchAction:"none",overflow:"hidden"});const i=document.createElement("div");Object.assign(i.style,{position:"relative",transformOrigin:"center center",transition:"transform 0.1s ease-out",willChange:"transform"});const l=document.createElement("img");if(l.src=e.previewSrc||e.src||"",l.alt=e.alt||"",Object.assign(l.style,{maxWidth:"95vw",maxHeight:"90vh",objectFit:"contain",cursor:"grab",userSelect:"none",WebkitUserDrag:"none"}),l.addEventListener("dragstart",e=>e.preventDefault()),i.appendChild(l),!1!==e.showCloseButton){const e=document.createElement("button");e.className="v-image-preview-close",e.innerHTML="×",e.setAttribute("aria-label","Close preview"),Object.assign(e.style,{position:"fixed",top:"16px",right:"16px",width:"44px",height:"44px",border:"none",background:"rgba(255, 255, 255, 0.15)",color:"white",fontSize:"28px",cursor:"pointer",borderRadius:"50%",transition:"background 0.2s, transform 0.2s",zIndex:String(n+1),display:"flex",alignItems:"center",justifyContent:"center",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)"});const t=(t,n)=>{e.style.background=t,e.style.transform=n};e.addEventListener("mouseenter",()=>t("rgba(255, 255, 255, 0.25)","scale(1.1)")),e.addEventListener("mouseleave",()=>t("rgba(255, 255, 255, 0.15)","scale(1)")),e.addEventListener("touchstart",()=>t("rgba(255, 255, 255, 0.35)","scale(1.15)"),{passive:!0}),e.addEventListener("touchend",()=>t("rgba(255, 255, 255, 0.15)","scale(1)"),{passive:!0}),o.appendChild(e)}if(!1!==e.showZoomIndicator){const e=document.createElement("div");e.className="v-image-preview-zoom",e.textContent="100%",Object.assign(e.style,{position:"fixed",bottom:"24px",left:"50%",transform:"translateX(-50%)",background:"rgba(0, 0, 0, 0.6)",color:"white",padding:"8px 16px",borderRadius:"20px",fontSize:"14px",fontWeight:"500",opacity:"0",transition:"opacity 0.3s",zIndex:String(n+1),backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)"}),o.appendChild(e)}const r=document.createElement("div");return r.className="v-image-preview-hint",r.textContent="Pinch to zoom • Double tap • Swipe up to close",Object.assign(r.style,{position:"fixed",bottom:"60px",left:"50%",transform:"translateX(-50%)",color:"rgba(255, 255, 255, 0.6)",fontSize:"12px",opacity:"1",transition:"opacity 0.5s",zIndex:String(n+1),pointerEvents:"none"}),o.appendChild(r),setTimeout(()=>r.style.opacity="0",_t.hintDuration),o.appendChild(i),{overlay:o,imageContainer:i,image:l}}(o.options);o.overlay=s,o.imageContainer=a,o.image=u,o.isOpen=!0,document.body.appendChild(s),document.body.style.overflow="hidden",requestAnimationFrame(()=>s.style.opacity="1"),o.handlers.touchStart=r.handleTouchStart,o.handlers.touchMove=r.handleTouchMove,o.handlers.touchEnd=r.handleTouchEnd,o.handlers.mouseDown=r.handleMouseDown,o.handlers.mouseMove=r.handleMouseMove,o.handlers.mouseUp=r.handleMouseUp,o.handlers.wheel=r.handleWheel,s.addEventListener("touchstart",r.handleTouchStart,{passive:!1}),s.addEventListener("touchmove",r.handleTouchMove,{passive:!1}),s.addEventListener("touchend",r.handleTouchEnd,{passive:!0}),u.addEventListener("mousedown",r.handleMouseDown),document.addEventListener("mousemove",r.handleMouseMove),document.addEventListener("mouseup",r.handleMouseUp),s.addEventListener("wheel",r.handleWheel,{passive:!1}),null==(e=s.querySelector(".v-image-preview-close"))||e.addEventListener("click",e=>{e.stopPropagation(),l()}),!1!==o.options.closeOnClickOutside&&s.addEventListener("click",()=>{o.transform.scale<=1?l():i.resetTransform()}),!1!==o.options.closeOnEsc&&(o.handlers.esc=e=>{"Escape"===e.key&&(o.transform.scale>1?i.resetTransform():l())},document.addEventListener("keydown",o.handlers.esc)),null==(n=(t=o.options).onOpen)||n.call(t)};o.handlers.click=s,e.addEventListener("click",s)},updated(e,t){const n=e.__imagePreview;n&&(n.options=Tt(t.value,e),e.style.cursor=n.options.disabled?"":"zoom-in")},unmounted(e){const t=e.__imagePreview;t&&(e.removeEventListener("click",t.handlers.click),t.isOpen&&t.overlay&&(t.overlay.remove(),document.body.style.overflow=""),t.handlers.esc&&document.removeEventListener("keydown",t.handlers.esc),t.handlers.touchStart&&document.removeEventListener("touchstart",t.handlers.touchStart),t.handlers.touchMove&&document.removeEventListener("touchmove",t.handlers.touchMove),t.handlers.touchEnd&&document.removeEventListener("touchend",t.handlers.touchEnd),t.handlers.mouseDown&&document.removeEventListener("mousedown",t.handlers.mouseDown),t.handlers.mouseMove&&document.removeEventListener("mousemove",t.handlers.mouseMove),t.handlers.mouseUp&&document.removeEventListener("mouseup",t.handlers.mouseUp),t.handlers.wheel&&document.removeEventListener("wheel",t.handlers.wheel),delete e.__imagePreview)}});function St(e){if("function"==typeof e)return{handler:e,distance:0,throttle:200,useIntersection:!0};if(!e)throw new Error("[Directix] v-infinite-scroll: handler is required");return __spreadValues({distance:0,disabled:!1,loading:!1,useIntersection:!0,throttle:200},e)}const Dt=w({name:"infinite-scroll",ssr:!1,defaults:{distance:0,disabled:!1,loading:!1,useIntersection:!0,throttle:200},mounted(e,t){const n=St(t.value);if(n.disabled||!f())return;let o;if(n.container)if("string"==typeof n.container){const t=document.querySelector(n.container);o=t||M(e)}else o=n.container;else o=M(e);const i={options:n,container:o,sentinel:null,observer:null,throttleTimer:null,isLoading:!1,scrollHandler:t=>__async(null,null,function*(){if(i.isLoading||i.options.disabled||i.options.loading)return;if(i.throttleTimer)return;i.throttleTimer=setTimeout(()=>{i.throttleTimer=null},n.throttle);const t=function(e,t,n){if(e===window){const e=window.scrollY||document.documentElement.scrollTop,t=document.documentElement.scrollHeight;return e+window.innerHeight>=t-n}const o=e,i=o.scrollTop,l=o.scrollHeight,r=o.clientHeight;return i+r>=l-n}(o,0,n.distance||0);t&&(yield $t(i,e))})};e.__infiniteScroll=i,n.useIntersection&&h()?function(e,t){const n=document.createElement("div");n.className="v-infinite-scroll__sentinel",n.style.cssText="\n height: 1px;\n width: 100%;\n clear: both;\n ",e.appendChild(n),t.sentinel=n,t.observer=new IntersectionObserver(n=>__async(null,null,function*(){for(const o of n)o.isIntersecting&&(t.isLoading||t.options.disabled||t.options.loading||(yield $t(t,e)))}),{root:t.container===window?null:t.container,rootMargin:`${t.options.distance||0}px`,threshold:0}),t.observer.observe(n)}(e,i):P(o,"scroll",i.scrollHandler,{passive:!0})},updated(e,t){const n=e.__infiniteScroll;n&&(n.options=St(t.value))},unmounted(e){const t=e.__infiniteScroll;t&&(t.throttleTimer&&clearTimeout(t.throttleTimer),t.observer&&t.observer.disconnect(),t.sentinel&&t.sentinel.parentNode&&t.sentinel.parentNode.removeChild(t.sentinel),O(t.container,"scroll",t.scrollHandler),delete e.__infiniteScroll)}});function $t(e,t){return __async(this,null,function*(){var n,o,i,l,r,s;e.isLoading=!0,null==(o=(n=e.options).onLoadStart)||o.call(n),t.classList.add("v-infinite-scroll--loading");try{yield e.options.handler()}catch(t){null==(l=(i=e.options).onError)||l.call(i,t)}finally{e.isLoading=!1,null==(s=(r=e.options).onLoadEnd)||s.call(r),t.classList.remove("v-infinite-scroll--loading")}})}const Mt="__intersect";function Ht(e){const t="function"==typeof e?{handler:e}:__spreadValues({},e);return null!==t.root&&"object"==typeof t.root&&"value"in t.root&&(t.root=t.root.value),t}function It(e,t,n){return new IntersectionObserver(function(e,t,n){return o=>{var i,l,r,s;for(const a of o){if(n.once&&t.hasTriggeredOnce)continue;const{isIntersecting:o}=a;null==(i=n.handler)||i.call(n,a,t.observer),null==(l=n.onChange)||l.call(n,o,a),o?(null==(r=n.onEnter)||r.call(n,a,t.observer),n.once&&(t.hasTriggeredOnce=!0)):null==(s=n.onLeave)||s.call(n,a,t.observer),e.dispatchEvent(new CustomEvent("intersect",{detail:{isIntersecting:o,entry:a}}))}}}(e,t,n),{root:n.root,rootMargin:n.rootMargin,threshold:n.threshold})}const Pt=w({name:"intersect",ssr:!1,defaults:{disabled:!1,once:!1,rootMargin:"0px",threshold:0},mounted(e,t){const n=Ht(t.value);if(n.disabled||!f()||!h())return void(h()||console.warn("[Directix] v-intersect: IntersectionObserver not supported"));const o={options:n,observer:null,hasTriggeredOnce:!1};o.observer=It(e,o,n),e[Mt]=o,o.observer.observe(e)},updated(e,t){var n,o,i;const l=e[Mt];if(!l)return;const r=Ht(t.value),s=r.root!==l.options.root||r.rootMargin!==l.options.rootMargin||r.threshold!==l.options.threshold;r.disabled!==l.options.disabled&&(r.disabled?null==(n=l.observer)||n.disconnect():null==(o=l.observer)||o.observe(e)),s&&(null==(i=l.observer)||i.disconnect(),l.observer=It(e,l,r),l.observer.observe(e)),l.options=r},unmounted(e){var t;const n=e[Mt];n&&(null==(t=n.observer)||t.disconnect(),delete e[Mt])}});let Ot=null;function zt(e,t){"IMG"===e.tagName?e.src=t:e.style.backgroundImage=`url("${t}")`}function At(e,t){e.dataset.lazyState=t}function Ft(e){const t=e.__lazy;if(!t||!t.options.src)return;if(t.options.filter&&!t.options.filter(t.options.src))return;At(e,"loading"),t.attempt++,e.classList.add("v-lazy--loading");const n=new Image;n.onload=()=>{var n,o;zt(e,t.options.src),At(e,"loaded"),e.classList.remove("v-lazy--loading"),e.classList.add("v-lazy--loaded"),null==(o=(n=t.options).onLoad)||o.call(n,e)},n.onerror=()=>{var n,o;e.classList.remove("v-lazy--loading"),t.attempt<(t.options.attempt||1)?setTimeout(()=>Ft(e),1e3*t.attempt):(t.options.error&&zt(e,t.options.error),At(e,"error"),e.classList.add("v-lazy--error"),null==(o=(n=t.options).onError)||o.call(n,e,new Error("Failed to load image")))},n.src=t.options.src}function Yt(e){const t=e.__lazy;var n;if(t)if(h())if(t.options.observer)t.observer=t.options.observer,t.observer.observe(e);else{const o=(n=t.options.preload||0,Ot||(Ot=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&(Ft(e.target),null==Ot||Ot.unobserve(e.target))})},{rootMargin:`${n}px`}),Ot));t.observer=o,o.observe(e)}else Ft(e)}function Rt(e){const t=e.__lazy;t&&(t.observer?t.observer.unobserve(e):Ot&&Ot.unobserve(e))}function Nt(e){return"string"==typeof e?{src:e}:e||{}}const Xt=w({name:"lazy",ssr:!1,defaults:{preload:0,attempt:1,disabled:!1},mounted(e,t){const n=Nt(t.value);if(n.disabled)return;if(!n.src)return void console.warn("[Directix] v-lazy: No source provided");At(e,"pending"),n.placeholder&&zt(e,n.placeholder),e.classList.add("v-lazy");const o={options:n,attempt:0};e.__lazy=o,Yt(e)},updated(e,t){const n=e.__lazy;if(!n)return;const o=Nt(t.value);o.disabled?Rt(e):o.src!==n.options.src&&(n.options=o,n.attempt=0,"pending"!==function(e){return e.dataset.lazyState||"pending"}(e)&&(At(e,"pending"),e.classList.remove("v-lazy--loaded","v-lazy--error"),o.placeholder&&zt(e,o.placeholder),Yt(e)))},unmounted(e){Rt(e),delete e.__lazy}});function Vt(e){return"boolean"==typeof e?{value:e}:__spreadValues({value:!0,loadingClass:"v-loading",spinnerClass:"v-loading__spinner",textClass:"v-loading__text",background:"rgba(255, 255, 255, 0.9)",lock:!1,disabled:!1},e)}const Bt=w({name:"loading",ssr:!0,defaults:{value:!0,loadingClass:"v-loading",spinnerClass:"v-loading__spinner",textClass:"v-loading__text",background:"rgba(255, 255, 255, 0.9)",lock:!1,disabled:!1},mounted(e,t){if(!f())return;const n=Vt(t.value);if(n.disabled)return;const o={options:n,loadingOverlay:null,originalPosition:e.style.position,originalOverflow:e.style.overflow};e.__loading=o,I(e),n.value&&Ut(e,o)},updated(e,t){const n=e.__loading;if(!n)return;const o=Vt(t.value);if(o.disabled)jt(e,n);else{if(o.value&&!n.options.value?Ut(e,n):!o.value&&n.options.value&&jt(e,n),n.loadingOverlay&&o.text!==n.options.text){const e=n.loadingOverlay.querySelector(`.${n.options.textClass}`);e&&(e.textContent=o.text||"")}n.options=o}},unmounted(e){const t=e.__loading;t&&(jt(e,t),e.style.position=t.originalPosition,e.style.overflow=t.originalOverflow,delete e.__loading)}});function Ut(e,t){t.loadingOverlay||(t.loadingOverlay=function(e){const t=document.createElement("div");t.className=e.loadingClass||"v-loading",t.style.cssText=`\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 1000;\n background: ${e.background||"rgba(255, 255, 255, 0.9)"};\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n `;const n=e.spinner||'\n<svg class="v-loading__circular" viewBox="25 25 50 50">\n <circle class="v-loading__path" cx="50" cy="50" r="20" fill="none" stroke-width="2" stroke-miterlimit="10"/>\n</svg>\n',o=document.createElement("div");if(o.className=e.spinnerClass||"v-loading__spinner",o.innerHTML=n,t.appendChild(o),e.text){const n=document.createElement("div");n.className=e.textClass||"v-loading__text",n.textContent=e.text,t.appendChild(n)}return t}(t.options),e.appendChild(t.loadingOverlay),t.options.lock&&(e.style.overflow="hidden"),e.classList.add("v-loading--active"))}function jt(e,t){t.loadingOverlay&&(t.loadingOverlay.remove(),t.loadingOverlay=null,t.options.lock&&(e.style.overflow=t.originalOverflow),e.classList.remove("v-loading--active"))}function Wt(e){if("function"==typeof e)return{handler:e,duration:500,distance:10};if(!e)throw new Error("[Directix] v-long-press: handler is required");return __spreadValues({duration:500,distance:10,disabled:!1,prevent:!0,stop:!1,tickInterval:100},e)}const qt=w({name:"long-press",ssr:!1,defaults:{duration:500,distance:10,disabled:!1,prevent:!0,stop:!1,tickInterval:100},mounted(e,t){const n=Wt(t.value);if(n.disabled||!f())return;const o={options:n,timerId:null,tickTimerId:null,startTime:0,startPos:{x:0,y:0},startHandler:()=>{},endHandler:()=>{},moveHandler:()=>{}};o.startHandler=e=>{var t;const i=e;n.prevent&&i.preventDefault(),n.stop&&i.stopPropagation(),o.timerId&&(clearTimeout(o.timerId),o.timerId=null),o.tickTimerId&&(clearInterval(o.tickTimerId),o.tickTimerId=null);const l=A(i);if(o.startPos={x:l.x,y:l.y},o.startTime=Date.now(),null==(t=n.onStart)||t.call(n,i),n.onTick){let e=n.duration;o.tickTimerId=setInterval(()=>{var t;e-=n.tickInterval,null==(t=n.onTick)||t.call(n,Math.max(0,e))},n.tickInterval)}o.timerId=setTimeout(()=>{o.tickTimerId&&(clearInterval(o.tickTimerId),o.tickTimerId=null),n.handler(i)},n.duration)},o.endHandler=e=>{var t;const i=e;o.timerId&&(clearTimeout(o.timerId),o.timerId=null),o.tickTimerId&&(clearInterval(o.tickTimerId),o.tickTimerId=null),o.startTime>0&&(null==(t=n.onCancel)||t.call(n,i)),o.startTime=0},o.moveHandler=e=>{var t;if(!o.timerId)return;const i=e,l=A(i);var r,s;(r=o.startPos,s={x:l.x,y:l.y},Math.sqrt(__pow(s.x-r.x,2)+__pow(s.y-r.y,2)))>(n.distance||10)&&(o.timerId&&(clearTimeout(o.timerId),o.timerId=null),o.tickTimerId&&(clearInterval(o.tickTimerId),o.tickTimerId=null),null==(t=n.onCancel)||t.call(n,i),o.startTime=0)},e.__longPress=o,P(e,"mousedown",o.startHandler),P(e,"mouseup",o.endHandler),P(e,"mouseleave",o.endHandler),P(e,"mousemove",o.moveHandler),P(e,"touchstart",o.startHandler,{passive:!n.prevent}),P(e,"touchend",o.endHandler),P(e,"touchcancel",o.endHandler),P(e,"touchmove",o.moveHandler,{passive:!0})},updated(e,t){const n=e.__longPress;if(!n){return void(Wt(t.value).disabled||(e.__longPress=null))}n.options=Wt(t.value)},unmounted(e){const t=e.__longPress;t&&(t.timerId&&clearTimeout(t.timerId),t.tickTimerId&&clearInterval(t.tickTimerId),O(e,"mousedown",t.startHandler),O(e,"mouseup",t.endHandler),O(e,"mouseleave",t.endHandler),O(e,"mousemove",t.moveHandler),O(e,"touchstart",t.startHandler),O(e,"touchend",t.endHandler),O(e,"touchcancel",t.endHandler),O(e,"touchmove",t.moveHandler),delete e.__longPress)}});function Gt(e){return"string"==typeof e||e&&"object"==typeof e&&!("animationData"in e)?{animationData:e}:__spreadValues({autoplay:!0,loop:!0,speed:1,direction:1,renderer:"svg",preserveAspectRatio:!0},e)}const Kt=w({name:"lottie",ssr:!1,mounted(e,t){if(!f())return;const n=Gt(t.value),o=document.createElement("div");o.className=`v-lottie ${n.class||""}`,o.style.cssText=`\n width: 100%;\n height: 100%;\n ${!1!==n.preserveAspectRatio?"display: flex; align-items: center; justify-content: center;":""}\n `,e.appendChild(o);const i={options:n,animation:null,container:o};e.__lottie=i,Zt(i),e.classList.add("v-lottie-container")},updated(e,t){const n=e.__lottie;if(!n)return;const o=Gt(t.value),i=n.options.animationData,l=o.animationData;JSON.stringify(i)!==JSON.stringify(l)?(n.animation&&n.animation.destroy(),n.options=o,Zt(n)):(n.options=o,n.animation&&(void 0!==o.speed&&n.animation.setSpeed(o.speed),void 0!==o.direction&&n.animation.setDirection(o.direction),void 0!==o.loop&&(n.animation.loop=o.loop)))},unmounted(e){const t=e.__lottie;t&&(t.animation&&t.animation.destroy(),e.removeChild(t.container),e.classList.remove("v-lottie-container"),delete e.__lottie)}});function Zt(e){return __async(this,null,function*(){const t=yield function(){return __async(this,null,function*(){if(window.lottie)return window.lottie;try{const e=yield import("lottie-web");return window.lottie=e.default||e,e.default||e}catch(e){return console.warn("[Directix] v-lottie: lottie-web not found. Please install it: npm install lottie-web"),null}})}();if(!t)return;const n=e.options,o={container:e.container,renderer:n.renderer||"svg",loop:!1!==n.loop,autoplay:!1!==n.autoplay};"string"==typeof n.animationData&&n.animationData.startsWith("http")?o.path=n.animationData:o.animationData=n.animationData,e.animation=t.loadAnimation(o),void 0!==n.speed&&e.animation.setSpeed(n.speed),void 0!==n.direction&&e.animation.setDirection(n.direction),n.segments&&e.animation.playSegments(n.segments,!0),n.onReady&&e.animation.addEventListener("DOMLoaded",()=>{n.onReady(e.animation)}),n.onComplete&&e.animation.addEventListener("complete",n.onComplete),n.onLoopComplete&&e.animation.addEventListener("loopComplete",n.onLoopComplete),n.onEnterFrame&&e.animation.addEventListener("enterFrame",e=>{n.onEnterFrame(e.currentTime)});const i=e.container.parentElement;i&&(i.lottiePlay=()=>{var t;return null==(t=e.animation)?void 0:t.play()},i.lottiePause=()=>{var t;return null==(t=e.animation)?void 0:t.pause()},i.lottieStop=()=>{var t;return null==(t=e.animation)?void 0:t.stop()},i.lottieSetSpeed=t=>{var n;return null==(n=e.animation)?void 0:n.setSpeed(t)},i.lottieSetDirection=t=>{var n;return null==(n=e.animation)?void 0:n.setDirection(t)},i.lottieGoToAndPlay=(t,n=!0)=>{var o;return null==(o=e.animation)?void 0:o.goToAndPlay(t,n)},i.lottieGoToAndStop=(t,n=!0)=>{var o;return null==(o=e.animation)?void 0:o.goToAndStop(t,n)})})}function Jt(e,t){return e?t.first?e.charAt(0).toLowerCase()+e.slice(1):e.toLowerCase():e}function Qt(e){var t,n;return void 0===e||!0===e?{first:!1,onInput:!0}:!1===e?{first:!1,onInput:!1}:{first:null!=(t=e.first)&&t,onInput:null==(n=e.onInput)||n}}const en=w({name:"lowercase",ssr:!0,mounted(e,t){const n=Qt(t.value);if(H(e)){const t=G(e,n,e=>Jt(e,n));e.__lowercaseCleanup=t}else K(e,e=>Jt(e,n))},updated(e,t){const n=Qt(t.value);H(e)?n.onInput&&(e.value=Jt(e.value,n)):K(e,e=>Jt(e,n))},unmounted(e){const t=e.__lowercaseCleanup;null==t||t(),delete e.__lowercaseCleanup}}),tn="__mask",nn={"#":/\d/,A:/[A-Za-z]/,N:/[A-Za-z0-9]/,X:/./};function on(e,t){return[...e].map(e=>{const n=nn[e];return n?{pattern:n,placeholder:t,isLiteral:!1}:{pattern:new RegExp(`\\${e}`),placeholder:e,isLiteral:!0}})}function ln(e){if("string"==typeof e)return{mask:e,placeholder:"_",showPlaceholder:!0};if(!(null==e?void 0:e.mask))throw new Error("[Directix] v-mask: mask is required");return __spreadValues({placeholder:"_",showPlaceholder:!0,showMaskOnBlur:!1,clearIncomplete:!1,disabled:!1},e)}function rn(e,t,n,o){let i="",l=0;for(const r of t){if(l>=e.length){i+=r.isLiteral?r.placeholder:o?n:"";continue}const t=e[l];r.isLiteral?(t===r.placeholder&&l++,i+=r.placeholder):r.pattern.test(t)?(i+=t,l++):t===n?(i+=o?n:"",l++):l++}return i}function sn(e,t,n){for(let o=0;o<t.length;o++)if(!t[o].isLiteral&&(o>=e.length||e[o]===n))return!1;return!0}function an(e,t){let n=t;for(;n<e.length&&e[n].isLiteral;)n++;return Math.min(n,e.length)}const un=w({name:"mask",ssr:!1,defaults:{placeholder:"_",showPlaceholder:!0,showMaskOnBlur:!1,clearIncomplete:!1,disabled:!1},mounted(e,t){var n;if(!H(e))return void console.warn("[Directix] v-mask: directive must be used on input or textarea elements");const o=ln(t.value);if(o.disabled||!f())return;const i=o.placeholder||"_",l=on(o.mask,i),r=e=>{var t,n,r;const s=e.target,a=s.value,u=s.selectionStart||0,c=rn(a,l,i,null==(t=o.showPlaceholder)||t);if(c!==a)return s.value=c,s.setSelectionRange(an(l,u),an(l,u)),void s.dispatchEvent(new Event("input",{bubbles:!0}));null==(n=o.onChange)||n.call(o,c,function(e,t,n){let o="";for(let i=0;i<e.length&&i<t.length;i++)t[i].isLiteral||e[i]===n||(o+=e[i]);return o}(c,l,i)),sn(c,l,i)&&(null==(r=o.onComplete)||r.call(o,c))},s=()=>{!e.value&&o.showPlaceholder&&(e.value=rn("",l,i,!0))},a=()=>{o.showMaskOnBlur||sn(e.value,l,i)||!o.clearIncomplete||(e.value="")};P(e,"input",r),P(e,"focus",s),P(e,"blur",a),e[tn]={options:o,tokens:l,placeholder:i,inputHandler:r,focusHandler:s,blurHandler:a},e.value&&(e.value=rn(e.value,l,i,null==(n=o.showPlaceholder)||n))},updated(e,t){const n=e[tn];n&&(n.options=ln(t.value),n.tokens=on(n.options.mask,n.placeholder))},unmounted(e){const t=e[tn];t&&(O(e,"input",t.inputHandler),O(e,"focus",t.focusHandler),O(e,"blur",t.blurHandler),delete e[tn])}});function cn(e,t){const{precision:n=0,separator:o=",",decimal:i=".",prefix:l="",suffix:r=""}=t,s=e.toFixed(n),[a,u]=s.split(".");let c=a.replace(/\B(?=(\d{3})+(?!\d))/g,o);return n>0&&u&&(c+=i+u),l+c+r}function dn(e,t){const n=e.replace(/[^\d.-]/g,"").replace(t,"."),o=Number.parseFloat(n);return isNaN(o)?null:o}function pn(e,t){var n;let o=e;return!(null==(n=t.allowNegative)||n)&&o<0&&(o=Math.abs(o)),function(e,t,n){let o=e;return void 0!==t&&(o=Math.max(t,o)),void 0!==n&&(o=Math.min(n,o)),o}(o,t.min,t.max)}function fn(e,t,n){const{decimal:o=".",prefix:i=""}=t;let l=!1;const r=()=>{if(l)return;const r=e.value,s=e.selectionStart||0;if(!r||"-"===r)return;const a=dn(r,o);if(null===a)return l=!0,e.value="",e.dispatchEvent(new Event("input",{bubbles:!0})),void(l=!1);const u=pn(a,t),c=n(u,t);if(c!==r){l=!0;const t=function(e,t,n,o=0){let i=0,l=0;for(let t=0;t<n&&t<e.length;t++)/\d/.test(e[t])&&i++;for(let e=o;e<t.length;e++)if(/\d/.test(t[e])&&l++,l>=i)return e+1;return t.length}(r,c,s,i.length);e.value=c,e.setSelectionRange(t,t),e.dispatchEvent(new Event("input",{bubbles:!0})),l=!1}},s=()=>{if(!e.value||"-"===e.value)return;const i=dn(e.value,o);if(null!==i){const o=pn(i,t),r=n(o,t);l=!0,e.value=r,e.dispatchEvent(new Event("input",{bubbles:!0})),l=!1}};if(e.addEventListener("input",r),e.addEventListener("blur",s),e.value){const i=dn(e.value,o);if(null!==i){const o=n(pn(i,t),t);l=!0,e.value=o,e.dispatchEvent(new Event("input",{bubbles:!0})),l=!1}}return()=>{e.removeEventListener("input",r),e.removeEventListener("blur",s)}}function vn(e,t){const{precision:n=2,separator:o=",",decimal:i=".",symbol:l="$",symbolPosition:r="before"}=t,s=e.toFixed(n),[a,u]=s.split(".");let c=a.replace(/\B(?=(\d{3})+(?!\d))/g,o);return n>0&&u&&(c+=i+u),"before"===r?l+c:c+l}const mn=w({name:"money",ssr:!0,mounted(e,t){var n,o,i;const l="string"==typeof t.value?{symbol:t.value}:null!=(n=t.value)?n:{};if(l.precision=null!=(o=l.precision)?o:2,H(e)){const{symbol:t="$",symbolPosition:n="before"}=l,o="before"===n?t:"",i=fn(e,__spreadProps(__spreadValues({},l),{prefix:o}),vn);e.__money={options:l,cleanup:i},requestAnimationFrame(()=>{const t=e;if(t.value){const e=dn(t.value,l.decimal||".");if(null!==e){const n=vn(pn(e,l),l);n!==t.value&&(t.value=n,t.dispatchEvent(new Event("input",{bubbles:!0})))}}})}else{let n=null;if(t.value&&"object"==typeof t.value&&"value"in t.value)n=t.value.value;else{const t=null==(i=e.textContent)?void 0:i.trim();t&&(n=dn(t,l.decimal||"."))}null!==n&&(e.textContent=vn(pn(n,l),l))}},updated(e,t){var n,o;const i="string"==typeof t.value?{symbol:t.value}:null!=(n=t.value)?n:{};i.precision=null!=(o=i.precision)?o:2;const l=e.__money;if(l)l.options=i;else if(!H(e)){let n=null;t.value&&"object"==typeof t.value&&"value"in t.value&&(n=t.value.value),null!==n&&(e.textContent=vn(pn(n,i),i))}},unmounted(e){const t=e.__money;null==t||t.cleanup(),delete e.__money}});function hn(e){if("function"==typeof e)return{handler:e,childList:!0};if(!e||!e.handler)throw new Error("[Directix] v-mutation: handler is required");return __spreadValues({attributes:!1,childList:!0,subtree:!1,characterData:!1,attributeOldValue:!1,characterDataOldValue:!1,disabled:!1},e)}const gn=w({name:"mutation",ssr:!1,defaults:{attributes:!1,childList:!0,subtree:!1,characterData:!1,attributeOldValue:!1,characterDataOldValue:!1,disabled:!1},mounted(e,t){const n=hn(t.value);if(n.disabled||!f())return;if(!b())return void console.warn("[Directix] v-mutation: MutationObserver not supported");const o={options:n,observer:null};o.observer=new MutationObserver((e,t)=>{n.handler(e,t)}),o.observer.observe(e,{attributes:n.attributes,attributeFilter:n.attributeFilter,childList:n.childList,subtree:n.subtree,characterData:n.characterData,attributeOldValue:n.attributeOldValue,characterDataOldValue:n.characterDataOldValue}),e.__mutation=o},updated(e,t){const n=e.__mutation;if(!n)return;const o=hn(t.value);o.disabled&&!n.options.disabled?n.observer&&n.observer.disconnect():!o.disabled&&n.options.disabled?n.observer&&n.observer.observe(e,{attributes:o.attributes,attributeFilter:o.attributeFilter,childList:o.childList,subtree:o.subtree,characterData:o.characterData,attributeOldValue:o.attributeOldValue,characterDataOldValue:o.characterDataOldValue}):o.disabled||o.attributes===n.options.attributes&&o.childList===n.options.childList&&o.subtree===n.options.subtree&&o.characterData===n.options.characterData||n.observer&&(n.observer.disconnect(),n.observer.observe(e,{attributes:o.attributes,attributeFilter:o.attributeFilter,childList:o.childList,subtree:o.subtree,characterData:o.characterData,attributeOldValue:o.attributeOldValue,characterDataOldValue:o.characterDataOldValue})),n.options=o},unmounted(e){const t=e.__mutation;t&&(t.observer&&t.observer.disconnect(),delete e.__mutation)}}),yn=w({name:"number",ssr:!0,mounted(e,t){var n,o;const i="number"==typeof t.value?{precision:t.value}:null!=(n=t.value)?n:{};if(H(e)){const t=fn(e,i,cn);e.__number={options:i,cleanup:t},requestAnimationFrame(()=>{const t=e;if(t.value){const e=dn(t.value,i.decimal||".");if(null!==e){const n=cn(pn(e,i),i);n!==t.value&&(t.value=n,t.dispatchEvent(new Event("input",{bubbles:!0})))}}})}else{let n=null;if("number"==typeof t.value)n=t.value;else if(t.value&&"object"==typeof t.value&&"value"in t.value)n=t.value.value;else{const t=null==(o=e.textContent)?void 0:o.trim();t&&(n=dn(t,i.decimal||"."))}null!==n&&(e.textContent=cn(pn(n,i),i))}},updated(e,t){var n;const o="number"==typeof t.value?{precision:t.value}:null!=(n=t.value)?n:{},i=e.__number;if(i)i.options=o;else if(!H(e)){let n=null;"number"==typeof t.value?n=t.value:t.value&&"object"==typeof t.value&&"value"in t.value&&(n=t.value.value),null!==n&&(e.textContent=cn(pn(n,o),o))}},unmounted(e){const t=e.__number;null==t||t.cleanup(),delete e.__number}});function bn(e){return"function"==typeof e?{onPan:e}:__spreadValues({threshold:10,direction:"all",preventDefault:!0,stopPropagation:!1,pointers:["touch","mouse"]},e)}function wn(e,t){return Math.abs(e)>Math.abs(t)?e>0?"right":"left":t>0?"down":"up"}function xn(e,t,n=!1,o=!1){const i=t.currentX-t.startX,l=t.currentY-t.startY,r=Math.sqrt(i*i+l*l),s=Date.now()-t.startTime;return{originalEvent:e,direction:wn(i,l),deltaX:i,deltaY:l,distance:r,x:t.currentX,y:t.currentY,startX:t.startX,startY:t.startY,isPanning:t.isPanning,isFirst:n,isFinal:o,velocity:r/(s||1)}}function _n(e){return"touches"in e&&e.touches.length>0?{x:e.touches[0].clientX,y:e.touches[0].clientY}:{x:e.clientX,y:e.clientY}}const En=w({name:"pan",ssr:!1,mounted(e,t){var n,o;if(!f())return;const i=bn(t.value),l={options:i,startX:0,startY:0,currentX:0,currentY:0,isPanning:!1,startTime:0,touchstartHandler:e=>Ln(e,l),touchmoveHandler:e=>kn(e,l),touchendHandler:e=>Tn(e,l),mousedownHandler:e=>Ln(e,l),mousemoveHandler:e=>kn(e,l),mouseupHandler:e=>Tn(e,l)};e.__pan=l,(null==(n=i.pointers)?void 0:n.includes("touch"))&&(P(e,"touchstart",l.touchstartHandler,{passive:!1}),P(e,"touchmove",l.touchmoveHandler,{passive:!1}),P(e,"touchend",l.touchendHandler),P(e,"touchcancel",l.touchendHandler)),(null==(o=i.pointers)?void 0:o.includes("mouse"))&&P(e,"mousedown",l.mousedownHandler),e.classList.add("v-pan")},updated(e,t){const n=e.__pan;n&&(n.options=bn(t.value))},unmounted(e){const t=e.__pan;t&&(O(e,"touchstart",t.touchstartHandler),O(e,"touchmove",t.touchmoveHandler),O(e,"touchend",t.touchendHandler),O(e,"touchcancel",t.touchendHandler),O(e,"mousedown",t.mousedownHandler),e.classList.remove("v-pan"),delete e.__pan)}});function Ln(e,t,n){const o=_n(e);t.startX=o.x,t.startY=o.y,t.currentX=o.x,t.currentY=o.y,t.isPanning=!1,t.startTime=Date.now(),t.options.preventDefault&&e.preventDefault(),t.options.stopPropagation&&e.stopPropagation(),"mousedown"===e.type&&(document.addEventListener("mousemove",t.mousemoveHandler),document.addEventListener("mouseup",t.mouseupHandler))}function kn(e,t,n){var o,i,l,r;const s=_n(e);t.currentX=s.x,t.currentY=s.y;const a=t.currentX-t.startX,u=t.currentY-t.startY,c=Math.sqrt(a*a+u*u),d=t.options.threshold||10;if(!t.isPanning&&c<d)return;if(!function(e,t){return!t||"all"===t||("horizontal"===t?"left"===e||"right"===e:"up"===e||"down"===e)}(wn(a,u),t.options.direction))return;t.options.preventDefault&&e.preventDefault();const p=t.isPanning;t.isPanning=!0;const f=xn(e,t,!p);p||null==(i=(o=t.options).onStart)||i.call(o,f),null==(r=(l=t.options).onPan)||r.call(l,f)}function Tn(e,t){var n,o;if(document.removeEventListener("mousemove",t.mousemoveHandler),document.removeEventListener("mouseup",t.mouseupHandler),!t.isPanning)return;const i=xn(e,t,!1,!0);null==(o=(n=t.options).onEnd)||o.call(n,i),t.isPanning=!1}function Cn(e){return"boolean"==typeof e?{enabled:e,speed:.5}:"number"==typeof e?{speed:e,enabled:!0}:__spreadValues({speed:.5,enabled:!0,reverse:!1,horizontal:!1,useTransform:!0},e)}const Sn=w({name:"parallax",ssr:!1,mounted(e,t){if(!f())return;const n={options:Cn(t.value),scrollHandler:()=>Dn(e,n),resizeHandler:()=>function(e,t){Dn(e,t)}(e,n),isVisible:!0,lastOffset:0,ticking:!1};e.__parallax=n,e.style.willChange="transform";P($n(e),"scroll",n.scrollHandler,{passive:!0}),P(window,"resize",n.resizeHandler,{passive:!0}),Dn(e,n),e.classList.add("v-parallax")},updated(e,t){const n=e.__parallax;n&&(n.options=Cn(t.value))},unmounted(e){const t=e.__parallax;if(!t)return;O($n(e),"scroll",t.scrollHandler),O(window,"resize",t.resizeHandler),e.style.willChange="",e.style.transform="",e.classList.remove("v-parallax"),delete e.__parallax}});function Dn(e,t){var n;!t.options.enabled||(n=t.options.mobileBreakpoint)&&window.innerWidth<n||(t.ticking||(t.ticking=!0,requestAnimationFrame(()=>{const n=e.getBoundingClientRect(),o=window.innerHeight;if(t.isVisible=n.top<o&&n.bottom>0,t.isVisible){const o=window.scrollY;let i=(o-(n.top+o))*(t.options.speed||.5);void 0!==t.options.minScroll&&(i=Math.max(i,t.options.minScroll)),void 0!==t.options.maxScroll&&(i=Math.min(i,t.options.maxScroll)),t.options.reverse&&(i=-i),t.options.transform?e.style.transform=t.options.transform(i,e):!1!==t.options.useTransform&&(t.options.horizontal?e.style.transform=`translateX(${i}px)`:e.style.transform=`translateY(${i}px)`),t.lastOffset=i}t.ticking=!1})))}function $n(e){let t=e.parentElement;for(;t;){const{overflow:e,overflowX:n,overflowY:o}=getComputedStyle(t);if(/(auto|scroll)/.test(e+n+o))return t;t=t.parentElement}return window}const Mn="__permission";let Hn=null;function In(e,t){return t.includes("*")||t.includes(e)}function Pn(e,t){var n,o;const i=function(e){return e[Mn]||(e[Mn]={options:{value:""},originalDisplay:"",originalDisabled:!1,parentNode:null,placeholder:null}),e[Mn]}(e);i.options=function(e){if(!e)throw new Error("[Directix] v-permission: permission value is required");return"string"==typeof e||Array.isArray(e)?{value:e}:e}(t.value);const l=function(e){var t;if(e.check)return e.check(e.value,e.mode||"some");if(!Hn)return console.warn("[Directix] v-permission: No permission config provided"),!0;const n=Hn.getPermissions(),o=(null==(t=Hn.getRoles)?void 0:t.call(Hn))||[],i=Hn.roleMap||{},l=Array.isArray(e.value)?e.value:[e.value];function r(e){if(e in i)return o.includes(e);if(In(e,n))return!0;for(const t of o)if(In(e,i[t]||[]))return!0;return!1}return"every"===(e.mode||"some")?l.every(r):l.some(r)}(i.options);null==(o=(n=i.options).onChange)||o.call(n,l);const r=i.options.action||"remove";l?function(e,t,n){switch(t){case"remove":n.placeholder&&n.parentNode&&(n.parentNode.insertBefore(e,n.placeholder),n.parentNode.removeChild(n.placeholder),n.placeholder=null);break;case"disable":!1===n.originalDisabled?e.removeAttribute("disabled"):n.originalDisabled&&e.setAttribute("disabled",n.originalDisabled),e.classList.remove("v-permission--disabled");break;case"hide":e.style.display=n.originalDisplay||"",e.classList.remove("v-permission--hidden")}}(e,r,i):function(e,t,n){var o,i;switch(t){case"remove":n.parentNode=e.parentNode,n.placeholder=document.createComment("v-permission"),null==(o=e.parentNode)||o.insertBefore(n.placeholder,e),null==(i=e.parentNode)||i.removeChild(e);break;case"disable":n.originalDisabled=e.getAttribute("disabled")||!1,e.setAttribute("disabled","true"),e.classList.add("v-permission--disabled");break;case"hide":n.originalDisplay=e.style.display,e.style.display="none",e.classList.add("v-permission--hidden")}}(e,r,i)}const On=w({name:"permission",ssr:!0,mounted(e,t){Pn(e,t)},updated(e,t){Pn(e,t)},unmounted(e){!function(e){const t=e[Mn];(null==t?void 0:t.placeholder)&&t.parentNode&&t.parentNode.removeChild(t.placeholder),delete e[Mn]}(e)}});function zn(e){return"function"==typeof e?{onPinch:e}:__spreadValues({preventDefault:!0,stopPropagation:!1,enableTransform:!1,transformOrigin:"center center"},e)}function An(e){if(e.length<2)return 0;const t=e[0].clientX-e[1].clientX,n=e[0].clientY-e[1].clientY;return Math.sqrt(t*t+n*n)}function Fn(e,t,n=!1,o=!1){const i=(l=e.touches).length<2?{x:l[0].clientX,y:l[0].clientY}:{x:(l[0].clientX+l[1].clientX)/2,y:(l[0].clientY+l[1].clientY)/2};var l;return{originalEvent:e,scale:t.initialDistance>0?t.currentDistance/t.initialDistance:1,distance:t.currentDistance,initialDistance:t.initialDistance,centerX:i.x,centerY:i.y,isPinching:t.isPinching,isFirst:n,isFinal:o}}const Yn=w({name:"pinch",ssr:!1,mounted(e,t){if(!f())return;const n={options:zn(t.value),initialDistance:0,currentDistance:0,isPinching:!1,initialScale:1,savedTransition:"",touchstartHandler:t=>function(e,t,n){if(2!==e.touches.length)return;if(t.initialDistance=An(e.touches),t.currentDistance=t.initialDistance,t.isPinching=!1,t.options.enableTransform){const e=getComputedStyle(n).transform,o=new DOMMatrix(e);t.initialScale=o.a,t.savedTransition=n.style.transition,n.style.transition="none"}t.options.preventDefault&&e.preventDefault();t.options.stopPropagation&&e.stopPropagation()}(t,n,e),touchmoveHandler:t=>function(e,t,n){var o,i,l,r;if(2!==e.touches.length)return;if(t.currentDistance=An(e.touches),t.initialDistance<=0)return;const s=t.currentDistance/t.initialDistance;if(void 0!==t.options.minScale&&s<t.options.minScale)return;if(void 0!==t.options.maxScale&&s>t.options.maxScale)return;t.options.preventDefault&&e.preventDefault();const a=t.isPinching;t.isPinching=!0;const u=Fn(e,t,!a);a||null==(i=(o=t.options).onStart)||i.call(o,u);if(t.options.enableTransform){const e=t.options.transformOrigin||"center center";n.style.transformOrigin=e,n.style.transform=`scale(${t.initialScale*s})`}null==(r=(l=t.options).onPinch)||r.call(l,u)}(t,n,e),touchendHandler:t=>function(e,t,n){var o,i;if(!t.isPinching)return;t.options.enableTransform&&(n.style.transition=t.savedTransition);const l=__spreadProps(__spreadValues({},e),{touches:e.touches.length>=2?e.touches:[]}),r=Fn(l,t,!1,!0);null==(i=(o=t.options).onEnd)||i.call(o,r),t.isPinching=!1,t.initialDistance=0,t.currentDistance=0}(t,n,e)};e.__pinch=n,P(e,"touchstart",n.touchstartHandler,{passive:!1}),P(e,"touchmove",n.touchmoveHandler,{passive:!1}),P(e,"touchend",n.touchendHandler),P(e,"touchcancel",n.touchendHandler),e.classList.add("v-pinch")},updated(e,t){const n=e.__pinch;n&&(n.options=zn(t.value))},unmounted(e){const t=e.__pinch;t&&(O(e,"touchstart",t.touchstartHandler),O(e,"touchmove",t.touchmoveHandler),O(e,"touchend",t.touchendHandler),O(e,"touchcancel",t.touchendHandler),e.classList.remove("v-pinch"),delete e.__pinch)}});const Rn=w({name:"print",ssr:!0,mounted(e,t){const n=Nn(t.value),o={options:n,clickHandler:null};if(e.__print=o,n.immediate)return void setTimeout(()=>Xn(e,n),100);const i=()=>{Xn(e,o.options)};e.addEventListener("click",i),o.clickHandler=i,e.style.cursor="pointer"},updated(e,t){const n=e.__print;if(!n)return;const o=Nn(t.value);n.options=o},unmounted(e){const t=e.__print;t&&(t.clickHandler&&e.removeEventListener("click",t.clickHandler),e.style.cursor="",delete e.__print)}});function Nn(e){return!0===e?{immediate:!0}:!1===e?{}:e||{}}function Xn(e,t){return __async(this,null,function*(){if(t.onBeforePrint){if(!1===t.onBeforePrint())return}const n=t.target?document.querySelector(t.target):e;n?(t.newWindow?yield function(e,t){return __async(this,null,function*(){const n=window.open("","_blank");if(!n)return void console.warn("[Directix] v-print: Could not open print window");const o=Vn(e,t);n.document.open(),n.document.write(o),n.document.close(),yield Bn(n.document),n.focus(),n.print(),setTimeout(()=>{n.close()},1e3)})}(n,t):yield function(e,t){return __async(this,null,function*(){var n,o,i;const l=document.createElement("iframe");l.style.cssText="position: absolute; top: -10000px; left: -10000px; width: 0; height: 0; border: none;",document.body.appendChild(l);const r=l.contentDocument||(null==(n=l.contentWindow)?void 0:n.document);if(!r)return console.warn("[Directix] v-print: Could not access iframe document"),void document.body.removeChild(l);const s=Vn(e,t);r.open(),r.write(s),r.close(),yield Bn(r);try{null==(o=l.contentWindow)||o.focus(),null==(i=l.contentWindow)||i.print()}catch(e){console.error("[Directix] v-print: Print failed",e)}setTimeout(()=>{document.body.removeChild(l)},1e3)})}(n,t),t.onAfterPrint&&t.onAfterPrint()):console.warn("[Directix] v-print: Target element not found")})}function Vn(e,t){let n="";if(document.querySelectorAll('style, link[rel="stylesheet"]').forEach(e=>{if("STYLE"===e.tagName)n+=`<style>${e.textContent}</style>`;else if("LINK"===e.tagName){const t=e.href;n+=`<link rel="stylesheet" href="${t}">`}}),t.cssUrls&&t.cssUrls.forEach(e=>{n+=`<link rel="stylesheet" href="${e}">`}),t.styles){const e=Array.isArray(t.styles)?t.styles.join("\n"):t.styles;n+=`<style>${e}</style>`}n+=`\n\t\t<style>\n\t\t\t@media print {\n\t\t\t\tbody { margin: 0; padding: 20px; }\n\t\t\t\t${t.printClass?`.${t.printClass} { page-break-inside: avoid; }`:""}\n\t\t\t}\n\t\t</style>\n\t`;const o=t.title||document.title||"Print",i=e.outerHTML;return`<!DOCTYPE html>\n<html>\n<head>\n\t<meta charset="utf-8">\n\t<title>${o}</title>\n\t${n}\n</head>\n<body>\n\t${i}\n</body>\n</html>`}function Bn(e){const t=e.querySelectorAll("img"),n=[];return t.forEach(e=>{e.complete||n.push(new Promise(t=>{e.onload=()=>t(),e.onerror=()=>t()}))}),Promise.all(n)}function Un(e){return"number"==typeof e?{value:e}:__spreadValues({value:0,max:100,min:0,height:4,color:"#42b883",backgroundColor:"rgba(0, 0, 0, 0.1)",duration:300,showText:!1,animate:!0,indeterminate:!1,striped:!1,animated:!1,position:"top"},e||{})}const jn=w({name:"progress",ssr:!1,mounted(e,t){if(!f())return;const n=Un(t.value);!function(){if(!f())return;const e="v-progress-styles";if(document.getElementById(e))return;const t=document.createElement("style");t.id=e,t.textContent="\n @keyframes v-progress-stripes {\n from { background-position: 1rem 0; }\n to { background-position: 0 0; }\n }\n @keyframes v-progress-indeterminate {\n 0% { transform: translateX(-100%); }\n 100% { transform: translateX(400%); }\n }\n .v-progress--indeterminate {\n position: absolute;\n width: 30% !important;\n }\n ",document.head.appendChild(t)}();"static"===getComputedStyle(e).position&&(e.style.position="relative");const{container:o,progressBar:i}=function(e){const t=document.createElement("div");t.className=`v-progress ${e.class||""}`,t.style.cssText=`\n position: absolute;\n ${"bottom"===e.position?"bottom":"top"}: 0;\n left: 0;\n right: 0;\n height: ${e.height}px;\n background: ${e.backgroundColor};\n overflow: hidden;\n z-index: 1000;\n `;const n=document.createElement("div");n.className="v-progress__bar";let o=`\n height: 100%;\n background-color: ${e.color};\n transition: ${!1!==e.animate?`width ${e.duration}ms ease`:"none"};\n width: 0%;\n `;if(e.striped&&(o+="\n background-image: linear-gradient(\n 45deg,\n rgba(255, 255, 255, 0.15) 25%,\n transparent 25%,\n transparent 50%,\n rgba(255, 255, 255, 0.15) 50%,\n rgba(255, 255, 255, 0.15) 75%,\n transparent 75%,\n transparent\n );\n background-size: 1rem 1rem;\n "),n.style.cssText=o,e.indeterminate?(n.classList.add("v-progress--indeterminate"),n.style.width="30%",n.style.animation="v-progress-indeterminate 1.5s infinite linear"):e.animated&&(n.style.animation="v-progress-stripes 1s linear infinite"),t.appendChild(n),e.showText){const n=document.createElement("span");n.className="v-progress__text",n.style.cssText=`\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n font-size: ${Math.max((e.height||4)-2,10)}px;\n color: #fff;\n text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);\n `,t.appendChild(n)}return{container:t,progressBar:n}}(n),l={options:n,progressBar:i,container:o,currentValue:0};e.__progress=l,e.appendChild(o),n.indeterminate||Wn(l,n.value),e.classList.add("v-progress-container")},updated(e,t){const n=e.__progress;if(!n)return;const o=n.options,i=Un(t.value);n.options=i,n.container&&(n.container.style.height=`${i.height}px`,n.container.style.background=i.backgroundColor||"rgba(0, 0, 0, 0.1)"),n.progressBar&&(n.progressBar.style.backgroundColor=i.color||"#42b883"),o.indeterminate!==i.indeterminate&&n.progressBar?i.indeterminate?(n.progressBar.classList.add("v-progress--indeterminate"),n.progressBar.style.width="30%",n.progressBar.style.animation="v-progress-indeterminate 1.5s infinite linear"):(n.progressBar.classList.remove("v-progress--indeterminate"),n.progressBar.style.animation="",Wn(n,i.value)):i.indeterminate||i.value===o.value||Wn(n,i.value)},unmounted(e){const t=e.__progress;t&&(t.container&&t.container.parentNode&&t.container.parentNode.removeChild(t.container),e.classList.remove("v-progress-container"),delete e.__progress)}});function Wn(e,t){var n,o;const{options:i,progressBar:l,container:r}=e;if(!l||!r)return;const s=i.min||0,a=i.max||100,u=Math.max(s,Math.min(a,t)),c=(u-s)/(a-s)*100;if(l.style.width=`${c}%`,i.showText){const e=r.querySelector(".v-progress__text");e&&(e.textContent=`${Math.round(c)}%`)}e.currentValue=u,null==(n=i.onChange)||n.call(i,u,c),c>=100&&(null==(o=i.onComplete)||o.call(i))}const qn={idle:"↓",pulling:"↓ Pull",ready:"↓ Release",loading:"⟳ Loading...",success:"✓ Done",error:"✗ Failed"};function Gn(e){var t,n,o,i,l;return"function"==typeof e?{handler:e}:{handler:e.handler,distance:null!=(t=e.distance)?t:60,maxDistance:null!=(n=e.maxDistance)?n:100,disabled:null!=(o=e.disabled)&&o,indicator:e.indicator,successDuration:null!=(i=e.successDuration)?i:500,errorDuration:null!=(l=e.errorDuration)?l:1e3,onStateChange:e.onStateChange}}function Kn(e,t,n){var o;const i=null==(o=n.indicator)?void 0:o[t];e.textContent=i||qn[t]}function Zn(e,t){var n,o;e.state!==t&&(e.state=t,Kn(e.indicatorEl,t,e.options),null==(o=(n=e.options).onStateChange)||o.call(n,t))}function Jn(e,t,n){e.contentEl.style.transform=`translateY(${t}px)`,e.indicatorEl.style.opacity="1",e.indicatorEl.style.transform=`translateY(${t}px)`}function Qn(e){e.contentEl.style.transform="",e.indicatorEl.style.opacity="0",Zn(e,"idle")}function eo(e){return new Promise(t=>setTimeout(t,e))}function to(e){const{contentEl:t,options:n}=e;return{touchStart:o=>{n.disabled||"loading"===e.state||t.scrollTop>0||(e.pulling=!0,e.startY=o.touches[0].clientY,e.currentY=e.startY,Zn(e,"idle"))},touchMove:o=>{if(!e.pulling||n.disabled||"loading"===e.state)return;e.currentY=o.touches[0].clientY;const i=e.currentY-e.startY;if(i<=0)return void(t.style.transform&&(t.style.transition="",Qn(e)));o.preventDefault();const l=Math.min(.5*i,n.maxDistance),r=l/n.distance;t.style.transition="none",Jn(e,l),Zn(e,r>=1?"ready":"pulling")},touchEnd:()=>{if(!e.pulling||n.disabled)return;e.pulling=!1;const o=e.currentY-e.startY,i=Math.min(.5*o,n.maxDistance);t.style.transition="","ready"===e.state&&i>=n.distance?function(e){__async(this,null,function*(){Zn(e,"loading");const t=e.options.distance;Jn(e,t);try{yield e.options.handler(),Zn(e,"success"),yield eo(e.options.successDuration)}catch(t){Zn(e,"error"),yield eo(e.options.errorDuration)}finally{Qn(e)}})}(e):Qn(e)}}}function no(e,t){e.addEventListener("touchstart",t.touchStart,{passive:!1}),e.addEventListener("touchmove",t.touchMove,{passive:!1}),e.addEventListener("touchend",t.touchEnd,{passive:!0})}function oo(e,t){e.removeEventListener("touchstart",t.touchStart),e.removeEventListener("touchmove",t.touchMove),e.removeEventListener("touchend",t.touchEnd)}const io=w({name:"pull-refresh",ssr:!1,mounted(e,t){const n=Gn(t.value);e.style.position="relative",e.style.overflow="hidden",e.classList.add("v-pull-refresh");const o=document.createElement("div");for(o.className="v-pull-refresh__content",o.style.cssText="position: relative; height: 100%; overflow-y: auto;";e.firstChild;)o.appendChild(e.firstChild);e.appendChild(o);const i=function(){const e=document.createElement("div");return e.className="v-pull-refresh__indicator",e.style.cssText="\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tright: 0;\n\t\theight: 60px;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\tbackground: #f5f5f5;\n\t\tfont-size: 14px;\n\t\tcolor: #666;\n\t\tz-index: 10;\n\t\tpointer-events: none;\n\t\topacity: 0;\n\t\ttransition: opacity 0.2s ease;\n\t",e}();e.insertBefore(i,o);const l={options:n,state:"idle",startY:0,currentY:0,pulling:!1,indicatorEl:i,contentEl:o,handlers:null};l.handlers=to(l),e.__pullRefresh=l,n.disabled||no(e,l.handlers),Kn(i,"idle",n)},updated(e,t){const n=e.__pullRefresh;if(!n)return;const o=n.options.disabled;n.options=Gn(t.value),Kn(n.indicatorEl,n.state,n.options),n.options.disabled&&!o?oo(e,n.handlers):!n.options.disabled&&o&&no(e,n.handlers)},unmounted(e){const t=e.__pullRefresh;t&&(oo(e,t.handlers),delete e.__pullRefresh)}});function lo(e){if("function"==typeof e)return{handler:e};if(!e)throw new Error("[Directix] v-resize: handler is required");return __spreadValues({disabled:!1,box:"content-box",debounce:0},e)}const ro=w({name:"resize",ssr:!1,defaults:{disabled:!1,box:"content-box",debounce:0},mounted(e,t){const n=lo(t.value);if(n.disabled||!f())return;I(e);const o={options:n,observer:null,debounceTimer:null,pendingEntry:null,fallbackIframe:null,handler:e=>{n.debounce&&n.debounce>0?(o.pendingEntry=e,o.debounceTimer||(o.debounceTimer=setTimeout(()=>{o.pendingEntry&&n.handler(o.pendingEntry),o.debounceTimer=null,o.pendingEntry=null},n.debounce))):n.handler(e)}};if(e.__resize=o,g())o.observer=new ResizeObserver(e=>{for(const t of e)o.handler(t)}),o.observer.observe(e,{box:n.box});else{console.warn("[Directix] v-resize: ResizeObserver not supported, using fallback");const{iframe:t,cleanup:i}=function(e,t){const n=document.createElement("iframe");n.style.cssText="\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border: none;\n pointer-events: none;\n opacity: 0;\n ",e.appendChild(n);const o=n.contentWindow;return o&&o.addEventListener("resize",t),{iframe:n,cleanup:()=>{o&&o.removeEventListener("resize",t),n.remove()}}}(e,()=>{const t=e.getBoundingClientRect(),i={target:e,contentRect:t,borderBoxSize:[],contentBoxSize:[],devicePixelContentBoxSize:[]};o.handler(i),n.onFallback&&n.onFallback(function(e){return{width:e.contentRect.width,height:e.contentRect.height,contentRect:e.contentRect,borderBoxSize:e.borderBoxSize,contentBoxSize:e.contentBoxSize,devicePixelContentBoxSize:e.devicePixelContentBoxSize}}(i))});o.fallbackIframe=t,e.__resizeCleanup=i}},updated(e,t){const n=e.__resize;n&&(n.options=lo(t.value))},unmounted(e){const t=e.__resize;if(!t)return;t.debounceTimer&&clearTimeout(t.debounceTimer),t.observer&&t.observer.disconnect();const n=e.__resizeCleanup;n&&n(),delete e.__resize,delete e.__resizeCleanup}});function so(e){if(!1===e)return{disabled:!0,color:"currentColor",duration:600};if("string"==typeof e)return{color:e,duration:600};const t={color:"currentColor",duration:600,disabled:!1,initialScale:0,finalScale:2};return e&&"object"==typeof e?__spreadValues(__spreadValues({},t),e):t}const ao=w({name:"ripple",ssr:!1,defaults:{color:"currentColor",duration:600,disabled:!1,initialScale:0,finalScale:2},mounted(e,t){const n=so(t.value);if(n.disabled||!f())return;I(e),function(e){f()&&"visible"===getComputedStyle(e).overflow&&(e.style.overflow="hidden")}(e),e.classList.add("v-ripple");const o={options:n,clickHandler:t=>{if(o.options.disabled)return;const n=function(e,t,n){const o=t.getBoundingClientRect(),i=e.clientX-o.left,l=e.clientY-o.top,r=2*Math.max(o.width,o.height),s=document.createElement("span");return s.className="v-ripple__wave",s.style.cssText=`\n position: absolute;\n border-radius: 50%;\n pointer-events: none;\n background-color: ${n.color};\n width: ${r}px;\n height: ${r}px;\n left: ${i-r/2}px;\n top: ${l-r/2}px;\n transform: scale(${n.initialScale});\n opacity: 0.3;\n z-index: 0;\n `,s}(t,e,o.options);n&&(e.appendChild(n),function(e,t){const n=t.duration||600,o=t.initialScale||0,i=t.finalScale||2;"function"==typeof e.animate?e.animate([{transform:`scale(${o})`,opacity:.3},{transform:`scale(${i})`,opacity:0}],{duration:n,easing:"ease-out",fill:"forwards"}).onfinish=()=>{e.remove()}:(e.style.transition=`transform ${n}ms ease-out, opacity ${n}ms ease-out`,String(e.offsetHeight),e.style.transform=`scale(${i})`,e.style.opacity="0",setTimeout(()=>{e.remove()},n))}(n,o.options))}};e.__ripple=o,P(e,"click",o.clickHandler)},updated(e,t){const n=e.__ripple;n&&(n.options=so(t.value))},unmounted(e){const t=e.__ripple;t&&(O(e,"click",t.clickHandler),e.classList.remove("v-ripple"),delete e.__ripple)}});function uo(e){return"function"==typeof e?{onRotate:e}:__spreadValues({preventDefault:!0,stopPropagation:!1,enableTransform:!1,transformOrigin:"center center"},e)}function co(e){if(e.length<2)return 0;const t=e[1].clientX-e[0].clientX,n=e[1].clientY-e[0].clientY;return Math.atan2(n,t)*(180/Math.PI)}function po(e,t,n=!1,o=!1){const i=(l=e.touches).length<2?{x:l[0].clientX,y:l[0].clientY}:{x:(l[0].clientX+l[1].clientX)/2,y:(l[0].clientY+l[1].clientY)/2};var l;const r=t.currentAngle*(Math.PI/180);return{originalEvent:e,angle:t.currentAngle,radians:r,rotation:t.currentAngle-t.initialAngle,centerX:i.x,centerY:i.y,isRotating:t.isRotating,isFirst:n,isFinal:o}}const fo=w({name:"rotate-gesture",ssr:!1,mounted(e,t){if(!f())return;const n={options:uo(t.value),initialAngle:0,currentAngle:0,isRotating:!1,baseRotation:0,savedTransition:"",touchstartHandler:t=>function(e,t,n){if(2!==e.touches.length)return;if(t.initialAngle=co(e.touches),t.currentAngle=t.initialAngle,t.isRotating=!1,t.options.enableTransform){const e=getComputedStyle(n).transform,o=new DOMMatrix(e);t.baseRotation=Math.atan2(o.b,o.a)*(180/Math.PI),t.savedTransition=n.style.transition,n.style.transition="none"}t.options.preventDefault&&e.preventDefault();t.options.stopPropagation&&e.stopPropagation()}(t,n,e),touchmoveHandler:t=>function(e,t,n){var o,i,l,r;if(2!==e.touches.length)return;t.currentAngle=co(e.touches),t.options.preventDefault&&e.preventDefault();const s=t.isRotating;t.isRotating=!0;const a=po(e,t,!s);s||null==(i=(o=t.options).onStart)||i.call(o,a);if(t.options.enableTransform){const e=t.currentAngle-t.initialAngle,o=t.options.transformOrigin||"center center";n.style.transformOrigin=o,n.style.transform=`rotate(${t.baseRotation+e}deg)`}null==(r=(l=t.options).onRotate)||r.call(l,a)}(t,n,e),touchendHandler:t=>function(e,t,n){var o,i;if(!t.isRotating)return;t.options.enableTransform&&(n.style.transition=t.savedTransition);const l=__spreadProps(__spreadValues({},e),{touches:e.touches.length>=2?e.touches:[]}),r=po(l,t,!1,!0);null==(i=(o=t.options).onEnd)||i.call(o,r),t.isRotating=!1,t.initialAngle=0,t.currentAngle=0}(t,n,e)};e.__rotateGesture=n,P(e,"touchstart",n.touchstartHandler,{passive:!1}),P(e,"touchmove",n.touchmoveHandler,{passive:!1}),P(e,"touchend",n.touchendHandler),P(e,"touchcancel",n.touchendHandler),e.classList.add("v-rotate-gesture")},updated(e,t){const n=e.__rotateGesture;n&&(n.options=uo(t.value))},unmounted(e){const t=e.__rotateGesture;t&&(O(e,"touchstart",t.touchstartHandler),O(e,"touchmove",t.touchmoveHandler),O(e,"touchend",t.touchendHandler),O(e,"touchcancel",t.touchendHandler),e.classList.remove("v-rotate-gesture"),delete e.__rotateGesture)}});const vo=["b","i","u","strong","em","br","p","span","div"],mo=["title","alt","href","src"],ho=["script","iframe","object","embed","form","input","style","link","meta","base"],go=["onclick","onerror","onload","onmouseover","onfocus","onblur","onchange","onsubmit"];function yo(e){return!1===e?{disabled:!0}:!0===e?{allowedTags:vo,allowedAttributes:mo}:__spreadValues({allowedTags:vo,allowedAttributes:mo,allowDataUrls:!1,allowStyles:!1,allowClass:!1,allowId:!1,disabled:!1,sanitizeOnUpdate:!0},e)}function bo(e,t){var n;if(t.handler)return t.handler(e);const o=document.createElement("div");o.innerHTML=e;for(const e of ho){const t=o.getElementsByTagName(e);for(;t.length>0;)null==(n=t[0].parentNode)||n.removeChild(t[0])}const i=e=>{var n;const o=e.tagName.toLowerCase();if(t.allowedTags&&!t.allowedTags.includes(o)){const t=document.createTextNode(e.textContent||"");return void(null==(n=e.parentNode)||n.replaceChild(t,e))}for(const t of go)e.removeAttribute(t);const l=e.getAttribute("href");if(l&&l.toLowerCase().startsWith("javascript:")&&e.removeAttribute("href"),!t.allowDataUrls){const t=e.getAttribute("src");t&&t.toLowerCase().startsWith("data:")&&e.removeAttribute("src")}if(t.allowedAttributes){const n=Array.from(e.attributes);for(const o of n){const n=t.allowedAttributes.includes(o.name.toLowerCase()),i="class"===o.name&&t.allowClass,l="id"===o.name&&t.allowId,r="style"===o.name&&t.allowStyles;n||i||l||r||e.removeAttribute(o.name)}}for(const t of Array.from(e.children))i(t)};for(const e of Array.from(o.children))i(e);return o.innerHTML}const wo=w({name:"sanitize",ssr:!0,defaults:{allowedTags:vo,allowedAttributes:mo,allowDataUrls:!1,allowStyles:!1,allowClass:!1,allowId:!1,disabled:!1,sanitizeOnUpdate:!0},mounted(e,t){if(!f())return;const n=yo(t.value);if(n.disabled)return;e.__sanitize={options:n};const o=e.innerHTML;o&&(e.innerHTML=bo(o,n))},updated(e,t){const n=e.__sanitize;if(!n)return;if(n.options=yo(t.value),n.options.disabled||!n.options.sanitizeOnUpdate)return;const o=e.innerHTML;o&&(e.innerHTML=bo(o,n.options))},unmounted(e){delete e.__sanitize}});function xo(e,t,n){let o=0,i=0,l=0,r=0;if(e===window)o=window.scrollX||document.documentElement.scrollLeft,i=window.scrollY||document.documentElement.scrollTop,l=document.documentElement.scrollWidth-window.innerWidth,r=document.documentElement.scrollHeight-window.innerHeight;else{const t=e;o=t.scrollLeft,i=t.scrollTop,l=t.scrollWidth-t.clientWidth,r=t.scrollHeight-t.clientHeight}return{scrollLeft:o,scrollTop:i,scrollLeftMax:l,scrollTopMax:r,progressX:l>0?o/l:0,progressY:r>0?i/r:0,directionX:o!==t?o>t?1:-1:0,directionY:i!==n?i>n?1:-1:0,container:e}}function _o(e){if("function"==typeof e)return{handler:e,passive:!0};if(!e)throw new Error("[Directix] v-scroll: handler is required");return __spreadValues({passive:!0,throttle:0,disabled:!1},e)}const Eo=w({name:"scroll",ssr:!1,defaults:{passive:!0,throttle:0,disabled:!1},mounted(e,t){const n=_o(t.value);if(n.disabled||!f())return;let o;if(n.container)if(n.container===window)o=window;else if("string"==typeof n.container){const t=document.querySelector(n.container);o=t||M(e)}else o=n.container;else{const{overflow:t,overflowX:n,overflowY:i}=getComputedStyle(e),l=/(auto|scroll)/.test(t+n+i);o=l?e:M(e)}const i={options:n,container:o,lastScrollLeft:0,lastScrollTop:0,throttleTimer:null,pendingEvent:null,scrollHandler:e=>{if(n.throttle&&n.throttle>0)i.pendingEvent=e,i.throttleTimer||(i.throttleTimer=setTimeout(()=>{if(i.pendingEvent){const e=xo(o,i.lastScrollLeft,i.lastScrollTop);i.lastScrollLeft=e.scrollLeft,i.lastScrollTop=e.scrollTop,n.handler(i.pendingEvent,e)}i.throttleTimer=null,i.pendingEvent=null},n.throttle));else{const t=xo(o,i.lastScrollLeft,i.lastScrollTop);i.lastScrollLeft=t.scrollLeft,i.lastScrollTop=t.scrollTop,n.handler(e,t)}}},l=xo(o,0,0);i.lastScrollLeft=l.scrollLeft,i.lastScrollTop=l.scrollTop,e.__scroll=i,P(o,"scroll",i.scrollHandler,{passive:n.passive})},updated(e,t){const n=e.__scroll;n&&(n.options=_o(t.value))},unmounted(e){const t=e.__scroll;t&&(t.throttleTimer&&clearTimeout(t.throttleTimer),O(t.container,"scroll",t.scrollHandler),delete e.__scroll)}}),Lo={loading:!0,animation:"wave",width:"100%",height:"1em",radius:"4px",color:"#e8e8e8",animationColor:"#f0f0f0",preserveDimensions:!0};function ko(e){return"boolean"==typeof e?__spreadProps(__spreadValues({},Lo),{loading:e}):__spreadValues(__spreadValues({},Lo),e)}const To=w({name:"skeleton",ssr:!0,mounted(e,t){if(!f())return;const n=ko(t.value);!function(){if(!f())return;const e="v-skeleton-styles";if(document.getElementById(e))return;const t=document.createElement("style");t.id=e,t.textContent="\n @keyframes skeleton-wave {\n 0% { background-position: 200% 0; }\n 100% { background-position: -200% 0; }\n }\n @keyframes skeleton-pulse {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0.5; }\n }\n ",document.head.appendChild(t)}();const o={options:n,originalDisplay:getComputedStyle(e).display,originalWidth:e.style.width,originalHeight:e.style.height,skeletonEl:null};e.__skeleton=o,n.loading&&Co(e,o),e.classList.add("v-skeleton-container")},updated(e,t){const n=e.__skeleton;if(!n)return;const o=ko(t.value),i=n.options.loading;n.options=o,o.loading&&!i?Co(e,n):!o.loading&&i&&function(e,t){t.skeletonEl&&t.skeletonEl.parentNode&&(t.skeletonEl.parentNode.removeChild(t.skeletonEl),t.skeletonEl=null);e.style.display=t.originalDisplay,e.style.width=t.originalWidth,e.style.height=t.originalHeight}(e,n)},unmounted(e){const t=e.__skeleton;t&&(t.skeletonEl&&t.skeletonEl.parentNode&&t.skeletonEl.parentNode.removeChild(t.skeletonEl),e.classList.remove("v-skeleton-container"),e.style.display=t.originalDisplay,e.style.width=t.originalWidth,e.style.height=t.originalHeight,delete e.__skeleton)}});function Co(e,t){var n;const o=t.options;if(t.originalDisplay=e.style.display||getComputedStyle(e).display,o.preserveDimensions){const n=getComputedStyle(e);t.originalWidth||(t.originalWidth=e.style.width),t.originalHeight||(t.originalHeight=e.style.height),o.width=n.width,o.height=n.height}e.style.display="none",t.skeletonEl=function(e){const t=document.createElement("div");t.className=`v-skeleton ${e.class||""}`;const n="number"==typeof e.width?`${e.width}px`:e.width,o="number"==typeof e.height?`${e.height}px`:e.height,i="number"==typeof e.radius?`${e.radius}px`:e.radius;let l="";return l="wave"===e.animation?`\n background: linear-gradient(90deg, ${e.color} 25%, ${e.animationColor} 50%, ${e.color} 75%);\n background-size: 200% 100%;\n animation: skeleton-wave 1.5s ease-in-out infinite;\n `:"pulse"===e.animation?`\n background: ${e.color};\n animation: skeleton-pulse 1.5s ease-in-out infinite;\n `:`background: ${e.color};`,t.style.cssText=`\n width: ${n};\n height: ${o};\n border-radius: ${i};\n ${l}\n `,t}(o),null==(n=e.parentNode)||n.insertBefore(t.skeletonEl,e.nextSibling)}const So="__sticky";function Do(e){return!1===e?{disabled:!0,top:0,zIndex:100}:"number"==typeof e?{top:e,zIndex:100}:__spreadValues({top:0,zIndex:100,stickyClass:"v-sticky--fixed",disabled:!1},e&&"object"==typeof e?e:{})}function $o(e){return void 0===e?"0":"number"==typeof e?`${e}px`:e}function Mo(e,t){if(t.options.disabled)return void Ho(e,t);const n=parseFloat($o(t.options.top)),o=t.container===window?{top:0}:t.container.getBoundingClientRect(),i=(t.placeholder||e).getBoundingClientRect().top-o.top<=n;i&&!t.isSticky?function(e,t,n,o){var i,l,r;t.isSticky=!0;const s=document.createElement("div");s.style.cssText=`width:${e.offsetWidth}px;height:${e.offsetHeight}px`,null==(i=e.parentNode)||i.insertBefore(s,e),t.placeholder=s;const a=t.container===window?n:o+n;e.style.position="fixed",e.style.top=`${a}px`,e.style.zIndex=String(t.options.zIndex||100),e.style.width=`${e.offsetWidth}px`,void 0!==t.options.bottom&&(e.style.bottom=$o(t.options.bottom));t.options.stickyClass&&e.classList.add(t.options.stickyClass),e.dispatchEvent(new CustomEvent("sticky:change",{detail:{isSticky:!0}})),null==(r=(l=t.options).onChange)||r.call(l,!0)}(e,t,n,o.top):!i&&t.isSticky&&Ho(e,t)}function Ho(e,t){var n,o,i,l;t.isSticky&&(t.isSticky=!1,null==(o=null==(n=t.placeholder)?void 0:n.parentNode)||o.removeChild(t.placeholder),t.placeholder=null,Object.assign(e.style,t.originalStyles),t.options.stickyClass&&e.classList.remove(t.options.stickyClass),e.dispatchEvent(new CustomEvent("sticky:change",{detail:{isSticky:!1}})),null==(l=(i=t.options).onChange)||l.call(i,!1))}const Io=w({name:"sticky",ssr:!1,defaults:{top:0,zIndex:100,stickyClass:"v-sticky--fixed",disabled:!1},mounted(e,t){const n=Do(t.value);if(n.disabled||!f())return;const o=function(e,t){if(t)return"string"==typeof t?document.querySelector(t)||M(e):t;const n=e.parentElement;if(n){const{overflow:e,overflowX:t,overflowY:o}=getComputedStyle(n);if(/(auto|scroll)/.test(e+t+o))return n}return M(e)}(e,n.container),i={options:n,placeholder:null,originalStyles:{position:e.style.position,top:e.style.top,bottom:e.style.bottom,zIndex:e.style.zIndex,width:e.style.width},isSticky:!1,container:o,scrollHandler:()=>Mo(e,i),resizeHandler:()=>Mo(e,i)};e.classList.add("v-sticky"),e[So]=i,P(o,"scroll",i.scrollHandler,{passive:!0}),P(window,"resize",i.resizeHandler,{passive:!0}),Mo(e,i)},updated(e,t){const n=e[So];n&&(n.options=Do(t.value),Mo(e,n))},unmounted(e){var t,n;const o=e[So];o&&(null==(n=null==(t=o.placeholder)?void 0:t.parentNode)||n.removeChild(o.placeholder),Object.assign(e.style,o.originalStyles),e.classList.remove("v-sticky",o.options.stickyClass||"v-sticky--fixed"),O(o.container,"scroll",o.scrollHandler),O(window,"resize",o.resizeHandler),delete e[So])}}),Po=["left","right","up","down"];function Oo(e){var t,n,o,i,l,r;return"function"==typeof e?{handler:e}:{handler:e.handler,threshold:null!=(t=e.threshold)?t:30,maxTime:null!=(n=e.maxTime)?n:500,directions:null!=(o=e.directions)?o:[...Po],preventScrollOnSwipe:null==(i=e.preventScrollOnSwipe)||i,disabled:null!=(l=e.disabled)&&l,mouse:null==(r=e.mouse)||r,onLeft:e.onLeft,onRight:e.onRight,onUp:e.onUp,onDown:e.onDown}}function zo(e,t,n,o,i,l){var r,s,a,u,c;const{options:d}=e;if(o>(null!=(r=d.maxTime)?r:500))return;if(Math.max(Math.abs(t),Math.abs(n))<(null!=(s=d.threshold)?s:30))return;const p=function(e,t,n){if(Math.abs(e)>Math.abs(t)){const t=e>0?"right":"left";return n.includes(t)?t:null}{const e=t>0?"down":"up";return n.includes(e)?e:null}}(t,n,null!=(a=d.directions)?a:Po);if(!p)return;d.preventScrollOnSwipe&&i.cancelable&&i.preventDefault(),null==(u=d.handler)||u.call(d,p,i);const f={left:d.onLeft,right:d.onRight,up:d.onUp,down:d.onDown};null==(c=f[p])||c.call(f),l.dispatchEvent(new CustomEvent("swipe",{detail:{direction:p,deltaX:t,deltaY:n,deltaTime:o}}))}function Ao(e,t){if(t.disabled)return null;e.style.touchAction="none",e.style.userSelect="none";const n={options:t,startX:0,startY:0,startTime:0,isActive:!1,handlers:null},o=function(e,t){return(n,o,i)=>{const l=n-t.startX,r=o-t.startY,s=Date.now()-t.startTime;zo(t,l,r,s,i,e)}}(e,n);return n.handlers={touchStart:e=>{n.options.disabled||(n.startX=e.touches[0].clientX,n.startY=e.touches[0].clientY,n.startTime=Date.now(),n.isActive=!0)},touchMove:e=>{n.isActive&&!n.options.disabled&&n.options.preventScrollOnSwipe&&e.preventDefault()},touchEnd:e=>{if(!n.isActive||n.options.disabled)return;n.isActive=!1;const t=e.changedTouches[0];o(t.clientX,t.clientY,e)},mouseDown:e=>{n.options.disabled||(n.startX=e.clientX,n.startY=e.clientY,n.startTime=Date.now(),n.isActive=!0)},mouseUp:e=>{n.isActive&&!n.options.disabled&&(n.isActive=!1,o(e.clientX,e.clientY,e))}},n}function Fo(e,t){var n;const{handlers:o}=t,i=null==(n=t.options.mouse)||n;e.addEventListener("touchstart",o.touchStart,{passive:!0}),e.addEventListener("touchmove",o.touchMove,{passive:!1}),e.addEventListener("touchend",o.touchEnd),e.addEventListener("touchcancel",o.touchEnd),i&&(e.addEventListener("mousedown",o.mouseDown),e.addEventListener("mouseup",o.mouseUp),e.addEventListener("mouseleave",o.mouseUp))}function Yo(e,t){var n;const{handlers:o}=t,i=null==(n=t.options.mouse)||n;e.removeEventListener("touchstart",o.touchStart),e.removeEventListener("touchmove",o.touchMove),e.removeEventListener("touchend",o.touchEnd),e.removeEventListener("touchcancel",o.touchEnd),i&&(e.removeEventListener("mousedown",o.mouseDown),e.removeEventListener("mouseup",o.mouseUp),e.removeEventListener("mouseleave",o.mouseUp))}const Ro=w({name:"swipe",ssr:!1,mounted(e,t){const n=Ao(e,Oo(t.value));n&&(e.__swipe=n,Fo(e,n))},updated(e,t){var n,o;const i=e.__swipe,l=Oo(t.value);if(!i){const t=Ao(e,l);return void(t&&(e.__swipe=t,Fo(e,t)))}const r=i.options.disabled,s=null==(n=i.options.mouse)||n,a=null==(o=l.mouse)||o;i.options=l,l.disabled&&!r?Yo(e,i):!l.disabled&&r?Fo(e,i):s!==a&&(s&&(e.removeEventListener("mousedown",i.handlers.mouseDown),e.removeEventListener("mouseup",i.handlers.mouseUp),e.removeEventListener("mouseleave",i.handlers.mouseUp)),a&&(e.addEventListener("mousedown",i.handlers.mouseDown),e.addEventListener("mouseup",i.handlers.mouseUp),e.addEventListener("mouseleave",i.handlers.mouseUp)))},unmounted(e){const t=e.__swipe;t&&(Yo(e,t),delete e.__swipe)}});function No(e,t){const n=q(t.arg)||300;return"function"==typeof e?{handler:e,wait:n}:__spreadProps(__spreadValues({},e),{wait:e.wait||n})}const Xo=w({name:"throttle",ssr:!0,defaults:{wait:300,leading:!0,trailing:!0},mounted(e,t){const n=No(t.value,t),o=R(t.modifiers)||N(e),i=W(n.handler,n.wait,{leading:n.leading,trailing:n.trailing});e.addEventListener(o,i),e.__throttle={throttledFn:i,eventType:o,options:n}},updated(e,t){const n=e.__throttle;if(!n)return;const o=No(t.value,t);if(o.wait!==n.options.wait||o.leading!==n.options.leading||o.trailing!==n.options.trailing){n.throttledFn.cancel();const t=W(o.handler,o.wait,{leading:o.leading,trailing:o.trailing});e.removeEventListener(n.eventType,n.throttledFn),e.addEventListener(n.eventType,t),e.__throttle={throttledFn:t,eventType:n.eventType,options:o}}else o.handler!==n.options.handler&&(n.options.handler=o.handler)},unmounted(e){const t=e.__throttle;t&&(t.throttledFn.cancel(),e.removeEventListener(t.eventType,t.throttledFn),delete e.__throttle)}}),Vo="8px 12px",Bo="#333",Uo="#fff",jo="6px",Wo="14px",qo="1.5",Go="96px",Ko="320px",Zo="0 4px 12px rgba(0, 0, 0, 0.15)";let Jo=null;function Qo(e,t){if(t.isVisible||t.options.disabled)return;t.hideTimeout&&(clearTimeout(t.hideTimeout),t.hideTimeout=null);const n=()=>{var n,o;const i=function(e){const t=document.createElement("div");t.className=`v-tooltip v-tooltip--${e.placement||"top"}`,e.class&&t.classList.add(e.class);const n=e.maxWidth?"number"==typeof e.maxWidth?`${e.maxWidth}px`:e.maxWidth:Ko;if(t.style.cssText=["position: absolute",`padding: ${Vo}`,`background: ${Bo}`,`color: ${Uo}`,`border-radius: ${jo}`,`font-size: ${Wo}`,`line-height: ${qo}`,`min-width: ${Go}`,`max-width: ${n}`,"word-wrap: break-word",`box-shadow: ${Zo}`,"pointer-events: none","opacity: 0","transition: opacity 0.2s ease",`z-index: ${e.zIndex||9999}`].join(";"),!1!==e.arrow){const e=document.createElement("div");e.className="v-tooltip__arrow",e.style.cssText="position: absolute; width: 8px; height: 8px; background: #333; transform: rotate(45deg);",t.appendChild(e)}const o=document.createElement("div");return o.className="v-tooltip__content",o.textContent=e.content,t.appendChild(o),t}(t.options);t.tooltip=i,(Jo||"undefined"==typeof document||(Jo=document.createElement("div"),Jo.id="directix-tooltip-container",Jo.style.cssText="position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999;",document.body.appendChild(Jo)),Jo).appendChild(i),requestAnimationFrame(()=>{!function(e,t,n,o){const i=t.getBoundingClientRect(),l=e.getBoundingClientRect();let r=0,s=0;switch(n){case"top":r=i.top-l.height-o,s=i.left+(i.width-l.width)/2;break;case"bottom":r=i.bottom+o,s=i.left+(i.width-l.width)/2;break;case"left":r=i.top+(i.height-l.height)/2,s=i.left-l.width-o;break;case"right":r=i.top+(i.height-l.height)/2,s=i.right+o}const a=window.innerWidth,u=window.innerHeight;s<0&&(s=8),s+l.width>a&&(s=a-l.width-8),r<0&&(r=8),r+l.height>u&&(r=u-l.height-8),e.style.top=`${r}px`,e.style.left=`${s}px`;const c=e.querySelector(".v-tooltip__arrow");if(c){const e=4;switch(n){case"top":Object.assign(c.style,{bottom:`-${e}px`,left:"50%",transform:"translateX(-50%) rotate(45deg)"});break;case"bottom":Object.assign(c.style,{top:`-${e}px`,left:"50%",transform:"translateX(-50%) rotate(45deg)"});break;case"left":Object.assign(c.style,{right:`-${e}px`,top:"50%",transform:"translateY(-50%) rotate(45deg)"});break;case"right":Object.assign(c.style,{left:`-${e}px`,top:"50%",transform:"translateY(-50%) rotate(45deg)"})}}}(i,e,t.options.placement||"top",t.options.offset||8),requestAnimationFrame(()=>{i.style.opacity="1"})}),t.isVisible=!0,null==(o=(n=t.options).onShow)||o.call(n)};t.options.delay&&t.options.delay>0?t.showTimeout=setTimeout(n,t.options.delay):n()}function ei(e){if(!e.isVisible)return;e.showTimeout&&(clearTimeout(e.showTimeout),e.showTimeout=null);const t=()=>{var t,n;e.tooltip&&(e.tooltip.style.opacity="0",setTimeout(()=>{var t;null==(t=e.tooltip)||t.remove(),e.tooltip=null},200)),e.isVisible=!1,null==(n=(t=e.options).onHide)||n.call(t)};e.options.hideDelay&&e.options.hideDelay>0?e.hideTimeout=setTimeout(t,e.options.hideDelay):t()}function ti(e,t){const{trigger:n="hover"}=t.options,o=()=>Qo(e,t),i=()=>ei(t),l=()=>t.isVisible?i():o();switch(t.handlers={show:o,hide:i,toggle:l},n){case"hover":e.addEventListener("mouseenter",o),e.addEventListener("mouseleave",i);break;case"click":e.addEventListener("click",l),document.addEventListener("click",t.handlers.docHide=n=>{t.isVisible&&!e.contains(n.target)&&i()});break;case"focus":e.addEventListener("focus",o),e.addEventListener("blur",i)}}function ni(e){var t,n,o,i,l,r,s,a;return"string"==typeof e?{content:e,placement:"top",trigger:"hover"}:e?{content:e.content,placement:null!=(t=e.placement)?t:"top",trigger:null!=(n=e.trigger)?n:"hover",delay:null!=(o=e.delay)?o:0,hideDelay:null!=(i=e.hideDelay)?i:0,offset:null!=(l=e.offset)?l:8,class:e.class,arrow:null==(r=e.arrow)||r,disabled:null!=(s=e.disabled)&&s,maxWidth:e.maxWidth,zIndex:null!=(a=e.zIndex)?a:9999,onShow:e.onShow,onHide:e.onHide}:{content:"",placement:"top",trigger:"hover"}}function oi(e){return{options:e,tooltip:null,showTimeout:null,hideTimeout:null,isVisible:!1,handlers:{}}}const ii=w({name:"tooltip",ssr:!1,mounted(e,t){const n=ni(t.value);if(n.disabled||!n.content)return;const o=oi(n);e.__tooltip=o,ti(e,o),e.setAttribute("aria-describedby","v-tooltip")},updated(e,t){const n=e.__tooltip,o=ni(t.value);if(n){if("manual"===o.trigger){const t=n.options.disabled;return n.options=o,void(o.disabled&&!t?ei(n):!o.disabled&&t&&Qo(e,n))}if(n.tooltip&&n.isVisible){const e=n.tooltip.querySelector(".v-tooltip__content");e&&(e.textContent=o.content)}n.options=o}else if(!o.disabled&&o.content){const t=oi(o);e.__tooltip=t,ti(e,t),"manual"===o.trigger&&Qo(e,t)}},unmounted(e){var t;const n=e.__tooltip;n&&(n.showTimeout&&clearTimeout(n.showTimeout),n.hideTimeout&&clearTimeout(n.hideTimeout),null==(t=n.tooltip)||t.remove(),function(e,t){const{show:n,hide:o,toggle:i,docHide:l}=t.handlers;n&&(e.removeEventListener("mouseenter",n),e.removeEventListener("focus",n)),o&&(e.removeEventListener("mouseleave",o),e.removeEventListener("blur",o)),i&&e.removeEventListener("click",i),l&&document.removeEventListener("click",l)}(e,n),delete e.__tooltip)}}),li=(e,t,n,o)=>Math.sqrt(__pow(n-e,2)+__pow(o-t,2)),ri=(e,t,n,o)=>180*Math.atan2(o-t,n-e)/Math.PI,si=w({name:"touch",ssr:!1,mounted(e,t){const n=ai(t.value),o={options:n,startX:0,startY:0,startTime:0,startDistance:0,startAngle:0,lastScale:1,lastAngle:0,longPressTimer:null,isLongPress:!1,isMouseDown:!1,lastTouchEndTime:0,handlers:{touchStart:()=>{},touchMove:()=>{},touchEnd:()=>{}}};e.__touch=o;const i=()=>{o.longPressTimer&&(clearTimeout(o.longPressTimer),o.longPressTimer=null)},l=e=>{i(),o.options.enableLongPress&&o.options.onLongPress&&(o.longPressTimer=setTimeout(()=>{o.isLongPress=!0,o.options.onLongPress(e)},o.options.longPressTimeout||500))},r=(e,t)=>{const n=o.options.tapThreshold||10;return Math.abs(e-o.startX)>n||Math.abs(t-o.startY)>n},s=(e,t,n)=>{var i,l,r,s,a,u,c,d,p,f,v,m;if(o.isLongPress)return;const h=Date.now()-o.startTime,g=e-o.startX,y=t-o.startY,b=Math.sqrt(__pow(g,2)+__pow(y,2));if(o.options.enableSwipe&&b>=(o.options.swipeThreshold||30)&&h<=(o.options.swipeTimeout||500)){const e=Math.abs(g)>Math.abs(y)?g>0?"right":"left":y>0?"down":"up";null==(l=(i=o.options).onSwipe)||l.call(i,e,n),"left"===e?null==(s=(r=o.options).onSwipeLeft)||s.call(r,n):"right"===e?null==(u=(a=o.options).onSwipeRight)||u.call(a,n):"up"===e?null==(d=(c=o.options).onSwipeUp)||d.call(c,n):null==(f=(p=o.options).onSwipeDown)||f.call(p,n)}else o.options.enableTap&&b<(o.options.tapThreshold||10)&&h<(o.options.tapTimeout||250)&&(null==(m=(v=o.options).onTap)||m.call(v,n))},a=e=>{var t,n;if(e.touches.length>1&&e.preventDefault(),o.startTime=Date.now(),o.isLongPress=!1,1===e.touches.length)o.startX=e.touches[0].clientX,o.startY=e.touches[0].clientY,l(e);else if(2===e.touches.length){i();const[t,n]=e.touches;o.startDistance=li(t.clientX,t.clientY,n.clientX,n.clientY),o.startAngle=ri(t.clientX,t.clientY,n.clientX,n.clientY),o.lastScale=1,o.lastAngle=0}null==(n=(t=o.options).onTouchStart)||n.call(t,e)},u=e=>{var t,n;if(e.touches.length>=1&&e.preventDefault(),o.longPressTimer&&1===e.touches.length&&r(e.touches[0].clientX,e.touches[0].clientY)&&i(),2===e.touches.length){const[t,n]=e.touches,i=li(t.clientX,t.clientY,n.clientX,n.clientY),l=ri(t.clientX,t.clientY,n.clientX,n.clientY);if(o.options.enablePinch&&o.options.onPinch){const t=i/o.startDistance;Math.abs(t-o.lastScale)>=(o.options.pinchThreshold||.1)&&(o.options.onPinch(t,e),o.lastScale=t)}if(o.options.enableRotate&&o.options.onRotate){const t=l-o.startAngle;Math.abs(t-o.lastAngle)>5&&(o.options.onRotate(t,e),o.lastAngle=t)}}null==(n=(t=o.options).onTouchMove)||n.call(t,e)},c=e=>{var t,n;if(i(),0===e.touches.length){o.lastTouchEndTime=Date.now();const t=e.changedTouches[0];s(t.clientX,t.clientY,e)}null==(n=(t=o.options).onTouchEnd)||n.call(t,e)},d=e=>{var t,n;o.options.enableMouse&&(Date.now()-o.lastTouchEndTime<400||(e.preventDefault(),o.isMouseDown=!0,o.startTime=Date.now(),o.startX=e.clientX,o.startY=e.clientY,o.isLongPress=!1,l(e),null==(n=(t=o.options).onTouchStart)||n.call(t,e)))},p=e=>{var t,n;o.isMouseDown&&o.options.enableMouse&&(o.longPressTimer&&r(e.clientX,e.clientY)&&i(),null==(n=(t=o.options).onTouchMove)||n.call(t,e))},f=e=>{var t,n;o.isMouseDown&&o.options.enableMouse&&(o.isMouseDown=!1,i(),o.isLongPress||s(e.clientX,e.clientY,e),null==(n=(t=o.options).onTouchEnd)||n.call(t,e))};o.handlers={touchStart:a,touchMove:u,touchEnd:c,mouseDown:d,mouseMove:p,mouseUp:f},e.addEventListener("touchstart",a,{passive:!1}),e.addEventListener("touchmove",u,{passive:!1}),e.addEventListener("touchend",c),e.addEventListener("touchcancel",c),n.enableMouse&&(e.addEventListener("mousedown",d),document.addEventListener("mousemove",p),document.addEventListener("mouseup",f))},updated(e,t){const n=e.__touch;n&&(n.options=ai(t.value))},unmounted(e){const t=e.__touch;(null==t?void 0:t.longPressTimer)&&clearTimeout(t.longPressTimer),(null==t?void 0:t.handlers)&&(e.removeEventListener("touchstart",t.handlers.touchStart),e.removeEventListener("touchmove",t.handlers.touchMove),e.removeEventListener("touchend",t.handlers.touchEnd),e.removeEventListener("touchcancel",t.handlers.touchEnd),t.handlers.mouseDown&&e.removeEventListener("mousedown",t.handlers.mouseDown),t.handlers.mouseMove&&document.removeEventListener("mousemove",t.handlers.mouseMove),t.handlers.mouseUp&&document.removeEventListener("mouseup",t.handlers.mouseUp)),delete e.__touch}});function ai(e){var t,n,o,i,l,r,s,a,u,c,d,p;return{swipeThreshold:null!=(t=null==e?void 0:e.swipeThreshold)?t:30,swipeTimeout:null!=(n=null==e?void 0:e.swipeTimeout)?n:500,pinchThreshold:null!=(o=null==e?void 0:e.pinchThreshold)?o:.1,enableSwipe:null==(i=null==e?void 0:e.enableSwipe)||i,enablePinch:null==(l=null==e?void 0:e.enablePinch)||l,enableRotate:null==(r=null==e?void 0:e.enableRotate)||r,enableTap:null==(s=null==e?void 0:e.enableTap)||s,tapTimeout:null!=(a=null==e?void 0:e.tapTimeout)?a:250,tapThreshold:null!=(u=null==e?void 0:e.tapThreshold)?u:10,enableLongPress:null==(c=null==e?void 0:e.enableLongPress)||c,longPressTimeout:null!=(d=null==e?void 0:e.longPressTimeout)?d:500,enableMouse:null==(p=null==e?void 0:e.enableMouse)||p,onSwipe:null==e?void 0:e.onSwipe,onSwipeLeft:null==e?void 0:e.onSwipeLeft,onSwipeRight:null==e?void 0:e.onSwipeRight,onSwipeUp:null==e?void 0:e.onSwipeUp,onSwipeDown:null==e?void 0:e.onSwipeDown,onPinch:null==e?void 0:e.onPinch,onRotate:null==e?void 0:e.onRotate,onTap:null==e?void 0:e.onTap,onLongPress:null==e?void 0:e.onLongPress,onTouchStart:null==e?void 0:e.onTouchStart,onTouchMove:null==e?void 0:e.onTouchMove,onTouchEnd:null==e?void 0:e.onTouchEnd}}function ui(e,t){const{position:n="both",chars:o}=t,i=o?`[\\s${l=o,l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}]`:"\\s";var l;switch(n){case"start":return e.replace(new RegExp(`^${i}+`,"g"),"");case"end":return e.replace(new RegExp(`${i}+$`,"g"),"");default:return e.replace(new RegExp(`^${i}+|${i}+$`,"g"),"")}}const ci=w({name:"trim",ssr:!0,mounted(e,t){const n=di(t.value);if(H(e))!function(e,t){const n={options:t};e.__trim=n;const o=()=>{const n=e.value,o=ui(n,t);n!==o&&(e.value=o,e.dispatchEvent(new Event("input",{bubbles:!0})))};if(t.onInput){const t=()=>{const t=e.value,n=e.selectionStart,o=t.replace(/\s+$/g,"");if(t!==o&&(e.value=o,null!==n)){const t=Math.min(n,o.length);e.setSelectionRange(t,t)}};e.addEventListener("input",t),n.inputHandler=t}if(t.onBlur){const t=()=>o();e.addEventListener("blur",t),n.blurHandler=t}e.value&&o()}(e,n);else{const t=e.textContent||"";e.textContent=ui(t,n)}},updated(e,t){const n=di(t.value),o=e.__trim;if(H(e))o&&(o.options=n);else{const t=e.textContent||"";e.textContent=ui(t,n)}},unmounted(e){const t=e.__trim;(null==t?void 0:t.inputHandler)&&e.removeEventListener("input",t.inputHandler),(null==t?void 0:t.blurHandler)&&e.removeEventListener("blur",t.blurHandler),delete e.__trim}});function di(e){var t,n,o;return void 0===e||!0===e?{position:"both",onInput:!0,onBlur:!0}:!1===e?{position:"both",onInput:!1,onBlur:!1}:"string"==typeof e?{position:e,onInput:!0,onBlur:!0}:{position:null!=(t=e.position)?t:"both",onInput:null==(n=e.onInput)||n,onBlur:null==(o=e.onBlur)||o,chars:e.chars}}const pi=w({name:"truncate",ssr:!0,mounted(e,t){const n=vi(t.value),o=e.textContent||"",i={originalText:o,options:n};e.__truncate=i,fi(e,o,n)},updated(e,t){const n=e.__truncate,o=vi(t.value);if(n){const t=n.originalText;JSON.stringify(o)!==JSON.stringify(n.options)&&(n.options=o,fi(e,t,o))}else{const t=e.textContent||"";e.__truncate={originalText:t,options:o},fi(e,t,o)}},unmounted(e){delete e.__truncate}});function fi(e,t,n){const{useCss:o,showTitle:i=!0}=n;if(o)e.style.overflow="hidden",e.style.textOverflow="ellipsis",e.style.whiteSpace="nowrap",i&&t&&e.setAttribute("title",t);else{const o=function(e,t){const{length:n=100,position:o="end",ellipsis:i="..."}=t;if(e.length<=n)return e;switch(o){case"start":return i+e.slice(-(n-i.length));case"middle":{const t=Math.ceil((n-i.length)/2),o=Math.floor((n-i.length)/2);return e.slice(0,t)+i+e.slice(-o)}default:return e.slice(0,n-i.length)+i}}(t,n);e.textContent=o,i&&t&&t!==o&&e.setAttribute("title",t)}}function vi(e){var t,n,o,i,l;return"number"==typeof e?{length:e,position:"end",ellipsis:"...",useCss:!1,showTitle:!0}:{length:null!=(t=null==e?void 0:e.length)?t:100,position:null!=(n=null==e?void 0:e.position)?n:"end",ellipsis:null!=(o=null==e?void 0:e.ellipsis)?o:"...",useCss:null!=(i=null==e?void 0:e.useCss)&&i,showTitle:null==(l=null==e?void 0:e.showTitle)||l}}function mi(e){return"string"==typeof e?{text:e}:__spreadProps(__spreadValues({speed:50,delay:0,loop:!1,deleteDelay:1500,deleteSpeed:30,cursor:"|",cursorBlink:!0},e),{text:"string"==typeof e?e:e.text||""})}function hi(e){if(!1===e.cursor)return null;const t=document.createElement("span");return t.className="v-typewriter__cursor",t.textContent=e.cursor||"|",!1!==e.cursorBlink&&(t.style.animation="v-typewriter-blink 0.7s infinite"),t}const gi=w({name:"typewriter",ssr:!0,mounted(e,t){const n=mi(t.value);if(!n.text)return;f()&&function(){if(!f())return;const e="v-typewriter-styles";if(document.getElementById(e))return;const t=document.createElement("style");t.id=e,t.textContent="\n @keyframes v-typewriter-blink {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0; }\n }\n .v-typewriter__cursor {\n display: inline-block;\n margin-left: 1px;\n }\n ",document.head.appendChild(t)}();const o={options:n,originalContent:e.textContent||"",currentText:"",timeoutId:null,animationFrameId:null,isTyping:!1,isDeleting:!1,cursorElement:null};e.__typewriter=o,e.textContent="",o.cursorElement=hi(n),o.cursorElement&&e.appendChild(o.cursorElement),e.classList.add("v-typewriter"),f()&&(o.timeoutId=setTimeout(()=>{yi(e,o)},n.delay||0))},updated(e,t){const n=e.__typewriter;if(!n)return;const o=mi(t.value);o.text!==n.options.text?(bi(n),n.options=o,n.currentText="",n.isTyping=!1,n.isDeleting=!1,e.textContent="",n.cursorElement=hi(o),n.cursorElement&&e.appendChild(n.cursorElement),f()&&(n.timeoutId=setTimeout(()=>{yi(e,n)},o.delay||0))):n.options=o},unmounted(e){const t=e.__typewriter;t&&(bi(t),e.classList.remove("v-typewriter"),delete e.__typewriter)}});function yi(e,t){var n;const{options:o,cursorElement:i}=t;t.isTyping=!0,null==(n=o.onStart)||n.call(o);const l=o.text;!function n(r){var s,a;if(r>=l.length)return t.isTyping=!1,null==(s=o.onComplete)||s.call(o),void(o.loop&&(t.timeoutId=setTimeout(()=>{!function(e,t){var n;const{options:o,cursorElement:i}=t;function l(){var n;if(0===t.currentText.length)return t.isDeleting=!1,null==(n=o.onDeleteComplete)||n.call(o),void(o.loop&&(t.timeoutId=setTimeout(()=>{yi(e,t)},o.delay||0)));t.currentText=t.currentText.slice(0,-1),e.textContent=t.currentText,i&&e.appendChild(i),t.timeoutId=setTimeout(()=>{l()},o.deleteSpeed||30)}t.isDeleting=!0,null==(n=o.onDeleteStart)||n.call(o),l()}(e,t)},o.deleteDelay)));const u=l[r];t.currentText+=u,e.textContent=t.currentText,i&&e.appendChild(i),null==(a=o.onType)||a.call(o,u,r),t.timeoutId=setTimeout(()=>{n(r+1)},o.speed||50)}(0)}function bi(e){e.timeoutId&&(clearTimeout(e.timeoutId),e.timeoutId=null),e.animationFrameId&&(cancelAnimationFrame(e.animationFrameId),e.animationFrameId=null),e.isTyping=!1,e.isDeleting=!1}function wi(e,t){return e?t.first?e.charAt(0).toUpperCase()+e.slice(1):e.toUpperCase():e}function xi(e){var t,n;return void 0===e||!0===e?{first:!1,onInput:!0}:!1===e?{first:!1,onInput:!1}:{first:null!=(t=e.first)&&t,onInput:null==(n=e.onInput)||n}}const _i=w({name:"uppercase",ssr:!0,mounted(e,t){const n=xi(t.value);if(H(e)){const t=G(e,n,e=>wi(e,n));e.__uppercaseCleanup=t}else K(e,e=>wi(e,n))},updated(e,t){const n=xi(t.value);H(e)?n.onInput&&(e.value=wi(e.value,n)):K(e,e=>wi(e,n))},unmounted(e){const t=e.__uppercaseCleanup;null==t||t(),delete e.__uppercaseCleanup}});function Ei(e){if("function"==typeof e.itemSize){let t=0;for(let n=0;n<e.items.length;n++)t+=e.itemSize(n);return t}return(e.itemSize||50)*e.items.length}function Li(e,t,n){const o=n.items,i=n.itemSize||50,l=n.overscan||3;let r=0,s=0,a=0;if("function"==typeof i){let n=0;for(let t=0;t<o.length;t++){const o=i(t);if(n+o>e){r=t,a=n;break}n+=o}for(s=r,n=a;s<o.length&&n<e+t;)n+=i(s),s++;r=Math.max(0,r-l),s=Math.min(o.length,s+l),n=0;for(let e=0;e<r;e++)n+=i(e);return a=n,{startIndex:r,endIndex:s,offsetY:a}}return r=Math.max(0,Math.floor(e/i)-l),s=Math.min(o.length,Math.ceil((e+t)/i)+l),a=r*i,{startIndex:r,endIndex:s,offsetY:a}}function ki(e){var t,n,o,i;return Array.isArray(e)?{items:e,itemSize:50,height:400,overscan:3,keyField:"id"}:{items:e.items,itemSize:null!=(t=e.itemSize)?t:50,height:null!=(n=e.height)?n:400,overscan:null!=(o=e.overscan)?o:3,render:e.render,keyField:null!=(i=e.keyField)?i:"id",onScroll:e.onScroll,onVisibleChange:e.onVisibleChange}}function Ti(e,t,n){const o=document.createElement("div");o.className="v-virtual-list__item",o.dataset.index=String(t);const i=n.keyField||"id";"object"==typeof e&&null!==e&&i in e&&(o.dataset.key=String(e[i]));const l=function(e,t){return"function"==typeof e.itemSize?e.itemSize(t):e.itemSize||50}(n,t);return o.style.height=`${l}px`,o.style.boxSizing="border-box",n.render?o.innerHTML=n.render(e,t):o.textContent="object"==typeof e?JSON.stringify(e):String(e),o}const Ci=w({name:"virtual-list",ssr:!1,mounted(e,t){const n=ki(t.value);e.classList.add("v-virtual-list"),e.style.height="number"==typeof n.height?`${n.height}px`:n.height,e.style.overflow="auto",e.style.position="relative";const o=document.createElement("div");o.className="v-virtual-list__content",o.style.position="relative",o.style.height=`${Ei(n)}px`,e.appendChild(o);const i=document.createElement("div");i.className="v-virtual-list__visible",i.style.position="absolute",i.style.top="0",i.style.left="0",i.style.right="0",o.appendChild(i);const l={options:n,containerEl:e,contentEl:o,scrollHandler:null,resizeObserver:null,startIndex:0,endIndex:0,visibleItems:[]};e.__virtualList=l;const r=t=>{const n=e.scrollTop,o=e.clientHeight,{startIndex:r,endIndex:s,offsetY:a}=Li(n,o,l.options);r===l.startIndex&&s===l.endIndex||(l.startIndex=r,l.endIndex=s,Si(i,l,a),l.options.onVisibleChange&&l.options.onVisibleChange(r,s)),l.options.onScroll&&l.options.onScroll(n)};l.scrollHandler=r,e.addEventListener("scroll",r,{passive:!0});const{startIndex:s,endIndex:a,offsetY:u}=Li(0,e.clientHeight,n);if(l.startIndex=s,l.endIndex=a,Si(i,l,u),"undefined"!=typeof ResizeObserver){const t=new ResizeObserver(()=>{r(new Event("scroll"))});t.observe(e),l.resizeObserver=t}},updated(e,t){var n;const o=e.__virtualList;if(!o)return;const i=ki(t.value);o.options=i,o.contentEl&&(o.contentEl.style.height=`${Ei(i)}px`);const l=e.scrollTop,r=e.clientHeight,{startIndex:s,endIndex:a,offsetY:u}=Li(l,r,i);o.startIndex=s,o.endIndex=a;const c=null==(n=o.contentEl)?void 0:n.querySelector(".v-virtual-list__visible");c&&Si(c,o,u)},unmounted(e){const t=e.__virtualList;t&&(t.scrollHandler&&e.removeEventListener("scroll",t.scrollHandler),t.resizeObserver&&t.resizeObserver.disconnect(),delete e.__virtualList)}});function Si(e,t,n){const{options:o,startIndex:i,endIndex:l}=t;e.style.transform=`translateY(${n}px)`,e.innerHTML="";for(let t=i;t<l;t++){const n=o.items[t];if(void 0!==n){const i=Ti(n,t,o);e.appendChild(i)}}}function Di(e){return"boolean"==typeof e?{initial:e}:__spreadValues({initial:!0,disabled:!1,useHidden:!1},e)}const $i=w({name:"visible",ssr:!0,defaults:{initial:!0,disabled:!1,useHidden:!1},mounted(e,t){var n,o;if(!f())return;const i=Di(t.value),l=e.style.display,r=e.style.visibility,s={options:i,isVisible:null==(n=i.initial)||n,originalDisplay:l,originalVisibility:r,transitionEndHandler:t=>{"opacity"!==t.propertyName&&"visibility"!==t.propertyName||e.dispatchEvent(new CustomEvent("visible:transition-end",{detail:{isVisible:s.isVisible}}))}};e.__visible=s,P(e,"transitionend",s.transitionEndHandler),Mi(e,s,null==(o=i.initial)||o)},updated(e,t){var n;const o=e.__visible;if(!o)return;const i=Di(t.value);let l;l="boolean"==typeof t.value?t.value:null==(n=i.initial)||n,o.isVisible!==l&&Mi(e,o,l),o.options=i},unmounted(e){const t=e.__visible;t&&(O(e,"transitionend",t.transitionEndHandler),e.style.display=t.originalDisplay,e.style.visibility=t.originalVisibility,delete e.__visible)}});function Mi(e,t,n){const o=t.isVisible;if(t.isVisible=n,n?(e.classList.remove("v-hidden"),e.classList.add("v-visible")):(e.classList.remove("v-visible"),e.classList.add("v-hidden")),t.options.useHidden)if(n)e.style.visibility=t.originalVisibility||"visible";else{if("0s"!==getComputedStyle(e).transitionDuration){const n=o=>{o.target!==e||"opacity"!==o.propertyName&&"transform"!==o.propertyName||(t.isVisible||(e.style.visibility="hidden"),e.removeEventListener("transitionend",n))};e.addEventListener("transitionend",n)}else e.style.visibility="hidden"}else e.style.display=n?t.originalDisplay:"none";e.dispatchEvent(new CustomEvent("visible:change",{detail:{isVisible:n,previousVisibility:o}})),t.options.handler&&o!==n&&t.options.handler(n)}function Hi(e){var t;const n=document.createElement("canvas"),o=n.getContext("2d");if(!o)throw new Error("[Directix] v-watermark: Could not get canvas context");const i=e.width||300,l=e.height||200,r=e.fontSize||16,s=e.fontFamily||"sans-serif",a=e.fontWeight||"normal",u=e.color||"rgba(128, 128, 128, 0.15)",c=null!=(t=e.rotate)?t:-22;n.width=i,n.height=l,o.font=`${a} ${r}px ${s}`,o.fillStyle=u,o.textAlign="center",o.textBaseline="middle",o.translate(i/2,l/2),o.rotate(c*Math.PI/180);const d=Array.isArray(e.content)?e.content:[e.content],p=1.5*r,f=-(d.length-1)*p/2;return d.forEach((e,t)=>{o.fillText(e,0,f+t*p)}),n}function Ii(e,t){var n;const o=Array.isArray(t.gap)?t.gap:[t.gap||100,t.gap||100],i=null!=(n=t.zIndex)?n:9999,l=document.createElement("div");return l.className="v-watermark",l.style.cssText=`\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tpointer-events: none;\n\t\tz-index: ${i};\n\t\tbackground-image: url("${e.toDataURL()}");\n\t\tbackground-repeat: repeat;\n\t\tbackground-position: ${o[0]/2}px ${o[1]/2}px;\n\t\tbackground-size: ${e.width+o[0]}px ${e.height+o[1]}px;\n\t`,l}function Pi(e){var t,n,o,i,l,r,s,a,u,c,d;return"string"==typeof e?{content:e}:{content:e.content,width:null!=(t=e.width)?t:300,height:null!=(n=e.height)?n:200,rotate:null!=(o=e.rotate)?o:-22,fontSize:null!=(i=e.fontSize)?i:16,fontFamily:null!=(l=e.fontFamily)?l:"sans-serif",fontWeight:null!=(r=e.fontWeight)?r:"normal",color:null!=(s=e.color)?s:"rgba(128, 128, 128, 0.15)",gap:null!=(a=e.gap)?a:[100,100],zIndex:null!=(u=e.zIndex)?u:9999,disabled:null!=(c=e.disabled)&&c,protect:null==(d=e.protect)||d}}const Oi=w({name:"watermark",ssr:!0,mounted(e,t){const n=Pi(t.value);"static"===getComputedStyle(e).position&&(e.style.position="relative");const o={options:n,watermarkEl:null,observer:null,canvas:null};e.__watermark=o,n.disabled||zi(e,o)},updated(e,t){const n=e.__watermark;if(!n)return;const o=Pi(t.value);o.disabled&&!n.options.disabled?Ai(n):!o.disabled&&n.options.disabled?(n.options=o,zi(e,n)):o.disabled||(n.options=o,Ai(n),zi(e,n)),n.options=o},unmounted(e){const t=e.__watermark;t&&(Ai(t),delete e.__watermark)}});function zi(e,t){const n=t.options;t.canvas=Hi(n),t.watermarkEl=Ii(t.canvas,n),e.appendChild(t.watermarkEl),n.protect&&function(e,t){if("undefined"==typeof MutationObserver)return;t.observer=new MutationObserver(n=>{t.watermarkEl&&e.contains(t.watermarkEl)||t.options.disabled||(t.canvas=Hi(t.options),t.watermarkEl=Ii(t.canvas,t.options),e.appendChild(t.watermarkEl));for(const e of n)if("attributes"===e.type&&e.target===t.watermarkEl){const e=Array.isArray(t.options.gap)?t.options.gap:[t.options.gap||100,t.options.gap||100];t.watermarkEl.style.display="block",t.watermarkEl.style.visibility="visible",t.watermarkEl.style.opacity="1",t.canvas&&(t.watermarkEl.style.backgroundImage=`url("${t.canvas.toDataURL()}")`),t.watermarkEl.style.backgroundSize=`${t.canvas.width+e[0]}px ${t.canvas.height+e[1]}px`}}),t.observer.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style","class","hidden"]})}(e,t)}function Ai(e){e.observer&&(e.observer.disconnect(),e.observer=null),e.watermarkEl&&e.watermarkEl.parentNode&&e.watermarkEl.parentNode.removeChild(e.watermarkEl),e.watermarkEl=null,e.canvas=null}const Fi=["a","an","the","and","but","or","for","nor","on","at","to","from","by","in","of","with","as"];function Yi(e){return e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():e}function Ri(e,t={}){if(!e)return e;const{every:n=!0,keepLower:o=Fi}=t;if(n){return e.toLowerCase().split(/\s+/).map((e,t)=>0===t?Yi(e):o.includes(e.toLowerCase())?e.toLowerCase():Yi(e)).join(" ")}return Yi(e)}function Ni(e,t,n,o,i,l){const r=n.getBoundingClientRect(),s=Math.min(r.width,r.height)*l,a=document.createElement("span");return a.className="v-click-wave__effect",a.style.cssText=`\n position: absolute;\n border-radius: 50%;\n pointer-events: none;\n background-color: ${o};\n width: ${s}px;\n height: ${s}px;\n left: ${e-s/2}px;\n top: ${t-s/2}px;\n transform: scale(0);\n opacity: 0.5;\n z-index: 0;\n `,"function"==typeof a.animate?a.animate([{transform:"scale(0)",opacity:.5},{transform:"scale(1)",opacity:0}],{duration:i,easing:"ease-out",fill:"forwards"}).onfinish=()=>{a.remove()}:(a.style.transition=`transform ${i}ms ease-out, opacity ${i}ms ease-out`,String(a.offsetHeight),a.style.transform="scale(1)",a.style.opacity="0",setTimeout(()=>a.remove(),i)),a}function Xi(e){return __async(this,null,function*(){if(y())try{return yield navigator.clipboard.writeText(e),!0}catch(e){console.warn("[Directix] Clipboard API failed, falling back to execCommand")}return function(e){if(!f())return!1;const t=document.createElement("textarea");t.value=e,t.style.cssText="\n position: fixed;\n top: -9999px;\n left: -9999px;\n opacity: 0;\n pointer-events: none;\n ",document.body.appendChild(t);try{return t.select(),t.setSelectionRange(0,t.value.length),document.execCommand("copy")}catch(e){return!1}finally{document.body.removeChild(t)}}(e)})}function Vi(e){return e instanceof Date?e.getTime():"number"==typeof e?e:new Date(e).getTime()}function Bi(e){const t=Math.max(0,e);return{days:Math.floor(t/864e5),hours:Math.floor(t%864e5/36e5),minutes:Math.floor(t%36e5/6e4),seconds:Math.floor(t%6e4/1e3),milliseconds:t%1e3,total:t}}function Ui(e,t){if("function"==typeof t)return t(e);const n=(e,t=2)=>String(e).padStart(t,"0");return t.replace(/dd/gi,n(e.days)).replace(/hh/gi,n(e.hours)).replace(/mm/gi,n(e.minutes)).replace(/ss/gi,n(e.seconds)).replace(/S{3}/gi,n(e.milliseconds,3)).replace(/SS/gi,n(Math.floor(e.milliseconds/10))).replace(/S/gi,String(Math.floor(e.milliseconds/100)))}const ji={linear:e=>e,easeOut:e=>1-__pow(1-e,3),easeInOut:e=>e<.5?4*e*e*e:1-__pow(-2*e+2,3)/2,easeOutQuart:e=>1-__pow(1-e,4),easeOutExpo:e=>1===e?1:1-__pow(2,-10*e)};function Wi(e,t){return t.formatter?t.formatter(e):new Intl.NumberFormat(t.locale||"en-US",{minimumFractionDigits:t.decimals||0,maximumFractionDigits:t.decimals||0,useGrouping:t.useGrouping||!1}).format(e)}function qi(e){if(e.type.startsWith("touch")){const t=e.touches[0]||e.changedTouches[0];return{clientX:t.clientX,clientY:t.clientY}}const t=e;return{clientX:t.clientX,clientY:t.clientY}}function Gi(e,t=14,n="sans-serif"){if("undefined"==typeof document)return 8*e.length;const o=document.createElement("canvas").getContext("2d");return o?(o.font=`${t}px ${n}`,o.measureText(e).width):8*e.length}function Ki(e,t,n="...",o=14,i="sans-serif"){if(t<=0)return e;if(Gi(e,o,i)<=t)return e;const l=t-Gi(n,o,i);if(l<=0)return n;let r=0,s=e.length;for(;r<s;){const t=Math.floor((r+s+1)/2);Gi(e.slice(0,t),o,i)<=l?r=t:s=t-1}return e.slice(0,r)+n}const Zi=/[\p{Emoji_Presentation}\p{Extended_Pictographic}]/gu;const Ji=new Set(["input","textarea","select","button"]);function Qi(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const el={esc:"Escape",space:" ",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",enter:"Enter",tab:"Tab",backspace:"Backspace",delete:"Delete",insert:"Insert",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown",plus:"+",minus:"-"},tl=new Set(["ctrl","alt","shift","meta"]);function nl(e){const t=e.toLowerCase().split("+").map(e=>e.trim()),n=new Set;let o="";for(const e of t)tl.has(e)?n.add(e):o=el[e]||e;return{key:o,modifiers:n}}function ol(e,t){if(t.modifiers.has("ctrl")!==(e.ctrlKey||e.metaKey))return!1;if(t.modifiers.has("alt")!==e.altKey)return!1;if(t.modifiers.has("shift")!==e.shiftKey)return!1;if(t.modifiers.has("meta")!==e.metaKey)return!1;const n=e.key,o=t.key;return n.toLowerCase()===o.toLowerCase()}let il=null;function ll(e,t){"IMG"===e.tagName?e.src=t:e.style.backgroundImage=`url("${t}")`}function rl(e,t=!1){return e?t?e.charAt(0).toLowerCase()+e.slice(1):e.toLowerCase():e}const sl={"#":/\d/,A:/[A-Za-z]/,N:/[A-Za-z0-9]/,X:/./};function al(e,t={}){const{precision:n=2,separator:o=",",decimal:i=".",symbol:l="$",symbolPosition:r="before"}=t,s=e.toFixed(n),[a,u]=s.split(".");let c=a.replace(/\B(?=(\d{3})+(?!\d))/g,o);return n>0&&u&&(c+=i+u),"before"===r?l+c:c+l}function ul(e,t={}){const{decimal:n=".",symbol:o="$"}=t;let i=e.replace(new RegExp(`[${o}\\s]`,"g"),"");return"."!==n?(i=i.replace(/,/g,""),i=i.replace(new RegExp(`\\${n}`,"g"),".")):i=i.replace(/,/g,""),parseFloat(i)||0}function cl(e,t={}){const{precision:n=0,separator:o=",",decimal:i=".",prefix:l="",suffix:r=""}=t,s=e.toFixed(n),[a,u]=s.split(".");let c=a.replace(/\B(?=(\d{3})+(?!\d))/g,o);return n>0&&u&&(c+=i+u),l+c+r}function dl(e,t={}){const{decimal:n=".",prefix:o="",suffix:i=""}=t;let l=e.replace(new RegExp(`^${pl(o)}`),"").replace(new RegExp(`${pl(i)}$`),"").replace(/\s/g,"");return"."!==n?(l=l.replace(/,/g,""),l=l.replace(new RegExp(`\\${n}`,"g"),".")):l=l.replace(/,/g,""),parseFloat(l)||0}function pl(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function fl(e,t){return Math.abs(e)>Math.abs(t)?e>0?"right":"left":t>0?"down":"up"}function vl(e){return"touches"in e&&e.touches.length>0?{x:e.touches[0].clientX,y:e.touches[0].clientY}:{x:e.clientX,y:e.clientY}}function ml(e,t){return t.includes("*")||t.includes(e)}function hl(e){if(e.length<2)return 0;const t=e[0].clientX-e[1].clientX,n=e[0].clientY-e[1].clientY;return Math.sqrt(t*t+n*n)}function gl(e){const t=e.querySelectorAll("img"),n=[];return t.forEach(e=>{e.complete||n.push(new Promise(t=>{e.onload=()=>t(),e.onerror=()=>t()}))}),Promise.all(n)}function yl(e,t){let n="";"undefined"!=typeof document&&document.querySelectorAll('style, link[rel="stylesheet"]').forEach(e=>{if("STYLE"===e.tagName)n+=`<style>${e.textContent}</style>`;else if("LINK"===e.tagName){const t=e.href;n+=`<link rel="stylesheet" href="${t}">`}}),t.cssUrls.forEach(e=>{n+=`<link rel="stylesheet" href="${e}">`}),t.styles&&(n+=`<style>${t.styles}</style>`),n+=`\n\t\t<style>\n\t\t\t@media print {\n\t\t\t\tbody { margin: 0; padding: 20px; }\n\t\t\t\t${t.printClass?`.${t.printClass} { page-break-inside: avoid; }`:""}\n\t\t\t}\n\t\t</style>\n\t`;const o=t.title||("undefined"!=typeof document?document.title:"Print"),i=e.outerHTML;return`<!DOCTYPE html>\n<html>\n<head>\n\t<meta charset="utf-8">\n\t<title>${o}</title>\n\t${n}\n</head>\n<body>\n\t${i}\n</body>\n</html>`}function bl(e={}){const{title:n,styles:o,cssUrls:i=[],onBeforePrint:l,onAfterPrint:r,newWindow:s=!1,printClass:a}=e,u=t.ref(!1);function c(e){return __async(this,null,function*(){if(l){if(!1===l())return}u.value=!0;try{let l=null;if(l="string"==typeof e?document.querySelector(e):e instanceof HTMLElement?e:document.body,!l)return void console.warn("[Directix] usePrint: Target element not found");const u={title:t.unref(n)||"",styles:Array.isArray(t.unref(o))?t.unref(o).join("\n"):t.unref(o)||"",cssUrls:t.unref(i)||[],printClass:t.unref(a)};t.unref(s)?yield function(e,t){return __async(this,null,function*(){const n=window.open("","_blank");if(!n)return void console.warn("[Directix] usePrint: Could not open print window");const o=yl(e,t);n.document.open(),n.document.write(o),n.document.close(),yield gl(n.document),n.focus(),n.print(),setTimeout(()=>{n.close()},1e3)})}(l,u):yield function(e,t){return __async(this,null,function*(){var n,o,i;const l=document.createElement("iframe");l.style.cssText="position: absolute; top: -10000px; left: -10000px; width: 0; height: 0; border: none;",document.body.appendChild(l);const r=l.contentDocument||(null==(n=l.contentWindow)?void 0:n.document);if(!r)return console.warn("[Directix] usePrint: Could not access iframe document"),void document.body.removeChild(l);const s=yl(e,t);r.open(),r.write(s),r.close(),yield gl(r);try{null==(o=l.contentWindow)||o.focus(),null==(i=l.contentWindow)||i.print()}catch(e){console.error("[Directix] usePrint: Print failed",e)}setTimeout(()=>{document.body.removeChild(l)},1e3)})}(l,u),r&&r()}finally{u.value=!1}})}return t.onUnmounted(()=>{}),{isPrinting:u,print:c,printPage:function(){return __async(this,null,function*(){yield c()})}}}function wl(e){return new Promise(t=>setTimeout(t,e))}function xl(e,t,n,o,i,l,r){const s=n.getBoundingClientRect(),a=2*Math.max(s.width,s.height),u=document.createElement("span");return u.className="v-ripple__wave",u.style.cssText=`\n position: absolute;\n border-radius: 50%;\n pointer-events: none;\n background-color: ${o};\n width: ${a}px;\n height: ${a}px;\n left: ${e-a/2}px;\n top: ${t-a/2}px;\n transform: scale(${l});\n opacity: 0.3;\n z-index: 0;\n `,"function"==typeof u.animate?u.animate([{transform:`scale(${l})`,opacity:.3},{transform:`scale(${r})`,opacity:0}],{duration:i,easing:"ease-out",fill:"forwards"}).onfinish=()=>{u.remove()}:(u.style.transition=`transform ${i}ms ease-out, opacity ${i}ms ease-out`,String(u.offsetHeight),u.style.transform=`scale(${r})`,u.style.opacity="0",setTimeout(()=>u.remove(),i)),u}function _l(e){if(e.length<2)return 0;const t=e[1].clientX-e[0].clientX,n=e[1].clientY-e[0].clientY;return Math.atan2(n,t)*(180/Math.PI)}const El=["b","i","u","strong","em","br","p","span","div"],Ll=["title","alt","href","src"],kl=["script","iframe","object","embed","form","input","style","link","meta","base"],Tl=["onclick","onerror","onload","onmouseover","onfocus","onblur","onchange","onsubmit"];function Cl(e,t,n){let o=0,i=0,l=0,r=0;if(e===window)o=window.scrollX||document.documentElement.scrollLeft,i=window.scrollY||document.documentElement.scrollTop,l=document.documentElement.scrollWidth-window.innerWidth,r=document.documentElement.scrollHeight-window.innerHeight;else{const t=e;o=t.scrollLeft,i=t.scrollTop,l=t.scrollWidth-t.clientWidth,r=t.scrollHeight-t.clientHeight}return{scrollLeft:o,scrollTop:i,scrollLeftMax:l,scrollTopMax:r,progressX:l>0?o/l:0,progressY:r>0?i/r:0,directionX:o!==t?o>t?1:-1:0,directionY:i!==n?i>n?1:-1:0}}const Sl=["left","right","up","down"];function Dl(e,t="both",n){if(!e)return"";const o=n?`[\\s${i=n,i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}]`:"\\s";var i;switch(t){case"start":return e.replace(new RegExp(`^${o}+`,"g"),"");case"end":return e.replace(new RegExp(`${o}+$`,"g"),"");default:return e.replace(new RegExp(`^${o}+|${o}+$`,"g"),"")}}function $l(e,t=!1){return e?t?e.charAt(0).toUpperCase()+e.slice(1):e.toUpperCase():e}function Ml(e){const t=document.createElement("canvas"),n=t.getContext("2d");if(!n)throw new Error("[Directix] useWatermark: Could not get canvas context");const{content:o,width:i,height:l,fontSize:r,fontFamily:s,fontWeight:a,color:u,rotate:c}=e;t.width=i,t.height=l,n.font=`${a} ${r}px ${s}`,n.fillStyle=u,n.textAlign="center",n.textBaseline="middle",n.translate(i/2,l/2),n.rotate(c*Math.PI/180);const d=Array.isArray(o)?o:[o],p=1.5*r,f=-(d.length-1)*p/2;return d.forEach((e,t)=>{n.fillText(e,0,f+t*p)}),t}const Hl={blur:E,"click-outside":se,"click-delay":re,"click-wave":de,"context-menu":ve,copy:he,debounce:$e,throttle:Xo,focus:Ze,hotkey:ht,lazy:Xt,intersect:Pt,visible:$i,loading:Bt,scroll:Eo,"infinite-scroll":Dt,sticky:Io,"long-press":qt,hover:xt,ripple:ao,mask:un,permission:On,sanitize:wo,resize:ro,mutation:gn,truncate:pi,ellipsis:Oe,uppercase:_i,lowercase:en,capitalcase:te,number:yn,money:mn,trim:ci,tooltip:ii,draggable:Pe,touch:si,swipe:Ro,"image-preview":Ct,countdown:xe,watermark:Oi,print:Rn,"virtual-list":Ci,"pull-refresh":io,counter:Ce,emoji:Xe,export:Ue,fade:Ge,fullscreen:nt,highlight:rt,lottie:Kt,pan:En,parallax:Sn,pinch:Yn,progress:jn,"rotate-gesture":fo,skeleton:To,typewriter:gi},Il={install:(e,t={})=>{var n,o,i,l,r,s,a;let u=null;if("function"==typeof e&&(null==(n=e.version)?void 0:n.startsWith("2")))u=2;else if((null==e?void 0:e.config)&&(null==(o=null==e?void 0:e.version)?void 0:o.startsWith("3")))u=3;else if("function"==typeof(null==e?void 0:e.directive)&&"function"==typeof(null==e?void 0:e.mixin)&&(null==(i=e.version)?void 0:i.startsWith("2")))u=2;else if("undefined"!=typeof window){const e=window;(null==(r=null==(l=e.Vue)?void 0:l.version)?void 0:r.startsWith("2"))?u=2:(null==(a=null==(s=e.Vue)?void 0:s.version)?void 0:a.startsWith("3"))&&(u=3)}u&&p(u);const{directives:c,all:d=!1}=t;d||!c?Object.entries(Hl).forEach(([t,n])=>{e.directive(t,n)}):c.forEach(t=>{const n=Hl[t];n?e.directive(t,n):console.warn(`[Directix] Unknown directive: ${t}`)})}};e.Directix=Il,e.addCleanupVue2=function(e,t){const n=e.__directix_state__;n&&n.cleanup.push(t)},e.addCleanupVue3=function(e,t){const n=e.__directix_state__;n&&n.cleanup.push(t)},e.calculateTime=Bi,e.capitalizeText=Ri,e.capitalizeWord=Yi,e.configurePermission=function(e){Hn=e},e.createCapitalizer=function(e={}){return t=>Ri(t,e)},e.createDelayedClick=function(e,t=300){let n=!1;return o=>{if(n)return o.preventDefault(),void o.stopPropagation();n=!0,e(o),setTimeout(()=>{n=!1},t)}},e.createLowercaser=function(e=!1){return t=>rl(t,e)},e.createMoneyFormatter=function(e={}){return t=>al(t,e)},e.createNumberFormatter=function(e={}){return t=>cl(t,e)},e.createPermissionChecker=function(e){const{getPermissions:t,getRoles:n,roleMap:o={}}=e;return(e,i="some")=>{const l=t(),r=(null==n?void 0:n())||[],s=Array.isArray(e)?e:[e];function a(e){if(e in o)return r.includes(e);if(ml(e,l))return!0;for(const t of r){if(ml(e,o[t]||[]))return!0}return!1}return"every"===i?s.every(a):s.some(a)}},e.createTrimmer=function(e="both",t){return n=>Dl(n,e,t)},e.createUppercaser=function(e=!1){return t=>$l(t,e)},e.createVue2Directive=n,e.createVue3Directive=i,e.createWatermarkUrl=function(e,t={}){var n,o,i,l,r;return Ml({content:e,width:null!=(n=t.width)?n:300,height:null!=(o=t.height)?o:200,fontSize:null!=(i=t.fontSize)?i:16,fontFamily:"sans-serif",fontWeight:"normal",color:null!=(l=t.color)?l:"rgba(128, 128, 128, 0.15)",rotate:null!=(r=t.rotate)?r:-22}).toDataURL()},e.debounceFn=function(e,t=300,n){return j(e,t,n)},e.deepClone=function e(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(t=>e(t));const n={};for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=e(t[o]));return n},e.deepMerge=function e(t,...n){if(!n.length)return t;const o=n.shift();if(B(t)&&B(o))for(const n in o)B(o[n])?(t[n]||Object.assign(t,{[n]:{}}),e(t[n],o[n])):Object.assign(t,{[n]:o[n]});return e(t,...n)},e.defineDirective=w,e.defineDirectiveGroup=function(e,t){return{name:e,directives:t,install(n,o){Object.entries(t).forEach(([t,o])=>{const i=`${e}-${t}`;n.directive(i,o)})}}},e.formatMoney=al,e.formatNumber=cl,e.formatTime=Ui,e.generateId=function(e=""){return`${e}${Date.now().toString(36)}${Math.random().toString(36).slice(2,9)}`},e.get=function(e,t,n){const o=t.split(".");let i=e;for(const e of o){if(null==i)return n;i=i[e]}return void 0===i?n:i},e.getPermissionConfig=function(){return Hn},e.getVueVersion=d,e.isArray=U,e.isBoolean=function(e){return"boolean"==typeof e},e.isBrowser=f,e.isEmpty=function(e){return null==e||(X(e)||U(e)?0===e.length:!!B(e)&&0===Object.keys(e).length)},e.isFunction=V,e.isNumber=function(e){return"number"==typeof e&&!isNaN(e)},e.isObject=B,e.isPromise=function(e){return B(e)&&V(e.then)},e.isSSR=v,e.isString=X,e.isVue2=function(){if(null===s){const e=d();s=2===e||2.7===e}return s},e.isVue27=function(){return null===a&&(a=2.7===d()),a},e.isVue3=function(){return null===u&&(u=3===d()),u},e.lowercaseText=rl,e.parseMoney=ul,e.parseNumber=dl,e.parseTargetTime=Vi,e.parseTime=q,e.quickPrint=function(e){return __async(this,arguments,function*(e,t={}){const{print:n}=bl(t);yield n(e)})},e.resetVueVersion=function(){r=null,s=null,a=null,u=null},e.set=function(e,t,n){const o=t.split("."),i=o.pop();let l=e;for(const e of o)void 0===l[e]&&(l[e]={}),l=l[e];l[i]=n},e.setVueVersion=p,e.supportsClipboard=y,e.supportsIntersectionObserver=h,e.supportsMutationObserver=b,e.supportsPassive=m,e.supportsResizeObserver=g,e.throttleFn=function(e,t=300,n){return W(e,t,n)},e.trimText=Dl,e.truncateText=function(e,t,n="..."){return!e||e.length<=t?e:e.slice(0,t-n.length)+n},e.uppercaseText=$l,e.useBlur=function(e={}){var n;const o=t.ref(null!=(n=t.unref(e.visible))&&n);let i=null,l="";function r(){var n,r;!i&&f()&&(o.value=!0,i=function(e){const t=document.createElement("div");return t.className=`v-blur-overlay ${e.class||""}`,t.style.cssText=`\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n backdrop-filter: blur(${e.radius||5}px);\n -webkit-backdrop-filter: blur(${e.radius||5}px);\n background: ${e.overlayColor||"transparent"};\n z-index: ${e.zIndex||999};\n opacity: 0;\n transition: opacity ${e.duration||300}ms ease;\n pointer-events: auto;\n `,t}(__spreadProps(__spreadValues({},e),{radius:null!=(n=t.unref(e.radius))?n:5})),document.body.appendChild(i),String(i.offsetHeight),i.style.opacity="1",e.lockScroll&&(l=document.body.style.overflow,document.body.style.overflow="hidden"),null==(r=e.onShow)||r.call(e))}function s(){var t;i&&(o.value=!1,i.style.opacity="0",e.lockScroll&&(document.body.style.overflow=l),setTimeout(()=>{i&&(i.remove(),i=null)},e.duration||300),null==(t=e.onHide)||t.call(e))}function a(){o.value?s():r()}return t.onUnmounted(()=>{i&&s()}),{isVisible:o,show:r,hide:s,toggle:a,bind:function(n){return f()?(n.classList.add("v-blur"),"boolean"!=typeof e.visible&&e.visible&&t.watch(e.visible,e=>{e!==o.value&&a()}),o.value&&r(),()=>{i&&s(),n.classList.remove("v-blur")}):()=>{}}}},e.useCapitalcase=function(e){const{text:n,every:o=!0,keepLower:i=Fi}=e,l=t.ref(t.unref(n)),r=t.ref("");return t.watch(()=>[t.unref(n),t.unref(o),t.unref(i)],()=>function(){const e=t.unref(n),s=t.unref(o),a=t.unref(i);l.value=e,r.value=Ri(e,{every:s,keepLower:a})}(),{immediate:!0}),{capitalized:r,original:l}},e.useClickDelay=function(e){const{handler:n,delay:o=300,disabled:i=!1}=e,l=t.ref(!1);let r=null;function s(){r&&(clearTimeout(r),r=null)}return t.onUnmounted(()=>{s()}),{isPending:l,click:function(e){if(t.unref(i)||l.value)return e.preventDefault(),void e.stopPropagation();l.value=!0,n(e),r=setTimeout(()=>{l.value=!1,r=null},t.unref(o))},reset:function(){r&&(clearTimeout(r),r=null),l.value=!1},cancel:s}},e.useClickOutside=function(e){const{handler:n,exclude:o=[],capture:i=!0,events:l=["click"],stop:r=!1,prevent:s=!1}=e;let a=null;const u=new Map;function c(e){return e=>{a&&function(e,n,o){const i=n.target;if(e.contains(i))return!1;if(null==o?void 0:o.length)for(const e of o){const n="function"==typeof e?e():t.unref(e),o="string"==typeof n?$(n):n;if(o&&(o===i||o.contains(i)))return!1}return!0}(a,e,o)&&(r&&e.stopPropagation(),s&&e.preventDefault(),n(e))}}function d(){u.forEach((e,t)=>{document.removeEventListener(t,e,{capture:i})}),u.clear(),a=null}return t.onUnmounted(()=>{d()}),{bind:function(e){return f()?(d(),a=e,l.forEach(e=>{const t=c();u.set(e,t),document.addEventListener(e,t,{capture:i,passive:!s})}),d):()=>{}}}},e.useClickWave=function(e={}){const{color:n="currentColor",duration:o=500,disabled:i=!1,sizeRatio:l=1.5}=e;let r=null,s=null;function a(e){if(t.unref(i))return;const s=r.getBoundingClientRect(),a=Ni(e.clientX-s.left,e.clientY-s.top,r,t.unref(n),t.unref(o),l);r.appendChild(a)}function u(){r&&s&&(r.removeEventListener("click",s),r.classList.remove("v-click-wave")),r=null,s=null}return t.onUnmounted(()=>{u()}),{bind:function(e){if(!f())return()=>{};u(),r=e;const t=getComputedStyle(e);return"static"===t.position&&(e.style.position="relative"),"visible"===t.overflow&&(e.style.overflow="hidden"),e.classList.add("v-click-wave"),s=a,e.addEventListener("click",s),u},trigger:function(e){var s,a;if(!r||t.unref(i))return;const u=r.getBoundingClientRect(),c=Ni(null!=(s=null==e?void 0:e.x)?s:u.width/2,null!=(a=null==e?void 0:e.y)?a:u.height/2,r,t.unref(n),t.unref(o),l);r.appendChild(c)}}},e.useContextMenu=function(e){let n=null,o=null,i=null,l=null;function r(){i&&(i.remove(),i=null),l&&document.removeEventListener("click",l)}function s(n,o){if(t.unref(e.disabled))return;r();const s=t.unref(e.items);i=function(e,t,n,o){const i=document.createElement("div");i.className=`v-context-menu ${o.class||""}`;const l=o.width?"number"==typeof o.width?`${o.width}px`:o.width:"150px";return i.style.cssText=`\n position: fixed;\n left: ${e}px;\n top: ${t}px;\n min-width: ${l};\n background: #fff;\n border-radius: 4px;\n box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);\n padding: 4px 0;\n z-index: 9999;\n font-size: 14px;\n `,n.forEach(e=>{if(e.divider){const e=document.createElement("div");e.className="v-context-menu__divider",e.style.cssText="\n height: 1px;\n background: #e8e8e8;\n margin: 4px 0;\n ",i.appendChild(e)}const t=document.createElement("div");if(t.className=`v-context-menu__item ${e.class||""}`,e.disabled&&t.classList.add("v-context-menu__item--disabled"),t.style.cssText=`\n padding: 8px 16px;\n cursor: ${e.disabled?"not-allowed":"pointer"};\n color: ${e.disabled?"#b0b0b0":"#333"};\n display: flex;\n align-items: center;\n gap: 8px;\n `,e.icon){const n=document.createElement("span");n.className="v-context-menu__icon",n.innerHTML=e.icon,t.appendChild(n)}const n=document.createElement("span");n.textContent=e.label,t.appendChild(n),!e.disabled&&e.handler&&(t.addEventListener("click",()=>{e.handler(),i.remove()}),t.addEventListener("mouseenter",()=>{t.style.background="#f5f5f5"}),t.addEventListener("mouseleave",()=>{t.style.background="transparent"})),i.appendChild(t)}),i}(n,o,s,e),document.body.appendChild(i);const a=i.getBoundingClientRect(),u=window.innerWidth,c=window.innerHeight;n+a.width>u&&(i.style.left=u-a.width-8+"px"),o+a.height>c&&(i.style.top=c-a.height-8+"px"),setTimeout(()=>{l=e=>{const t=e.target;i&&!i.contains(t)&&r()},document.addEventListener("click",l)},0)}function a(e){e.preventDefault(),s(e.clientX,e.clientY)}function u(){n&&o&&n.removeEventListener("contextmenu",o),r(),n=null,o=null}return t.onUnmounted(()=>{u()}),{bind:function(e){return f()?(u(),n=e,o=a,e.addEventListener("contextmenu",o),u):()=>{}},show:s,hide:r}},e.useCopy=function(e={}){const{source:n,onSuccess:o,onError:i,copiedTimeout:l=1500}=e,r=t.ref(!1),s=t.ref(null),a=y()||f();let u=null;return{copy:function(e){return __async(this,null,function*(){const a=null!=e?e:t.unref(n);if(!a)return console.warn("[Directix] useCopy: No text to copy"),!1;u&&(clearTimeout(u),u=null),s.value=null;try{if(yield Xi(a))return r.value=!0,null==o||o(a),u=setTimeout(()=>{r.value=!1,u=null},l),!0;throw new Error("Copy failed")}catch(e){const t=e;return s.value=t,r.value=!1,null==i||i(t),!1}})},copied:t.readonly(r),error:t.readonly(s),isSupported:a}},e.useCountdown=function(e){const{target:n,format:o="hh:mm:ss",onComplete:i,onTick:l,interval:r=1e3,autoStart:s=!0}=e,a=t.ref(Bi(0)),u=t.ref(""),c=t.ref(!1),d=t.ref(!1),p=t.ref(!1);let f=null,v=0,m=0;const h=()=>t.unref(r),g=()=>t.unref(o);function y(){const e=Date.now(),t=v-e;if(t<=0)return a.value=Bi(0),u.value=Ui(a.value,g()),p.value=!0,c.value=!1,w(),void(i&&i());a.value=Bi(t),u.value=Ui(a.value,g()),l&&l(a.value)}function b(){c.value||(v=Vi(t.unref(n)),c.value=!0,d.value=!1,p.value=!1,y(),f=setInterval(y,h()))}function w(){f&&(clearInterval(f),f=null),c.value=!1}return t.watch(()=>t.unref(n),e=>{c.value&&(v=Vi(e))}),t.unref(s)&&b(),t.onUnmounted(()=>{w()}),{time:a,formatted:u,running:c,paused:d,completed:p,start:b,pause:function(){c.value&&(m=v-Date.now(),w(),d.value=!0)},resume:function(){!c.value&&d.value&&(v=Date.now()+m,c.value=!0,d.value=!1,y(),f=setInterval(y,h()))},reset:function(){w(),d.value=!1,p.value=!1,m=0,a.value=Bi(0),u.value=Ui(a.value,g())}}},e.useCounter=function(e){var n;const o=t.ref(null!=(n=e.startValue)?n:0),i=t.ref(Wi(o.value,e)),l=t.ref(!1);let r=null,s=null,a=null,u=t.unref(e.value),c=o.value;function d(t){var n,p;a||(a=t);const f=t-a,v=e.duration||2e3,m=Math.min(f/v,1),h=(e.customEasing||ji[e.easing||"easeOutQuart"])(m);o.value=c+(u-c)*h,i.value=Wi(o.value,e),r&&(r.textContent=i.value),null==(n=e.onUpdate)||n.call(e,o.value,i.value),m<1?s=requestAnimationFrame(d):(o.value=u,i.value=Wi(u,e),r&&(r.textContent=i.value),l.value=!1,s=null,null==(p=e.onComplete)||p.call(e,u))}function p(){var t;l.value||(l.value=!0,a=null,c=o.value,null==(t=e.onStart)||t.call(e),s=requestAnimationFrame(d))}function v(){s&&(cancelAnimationFrame(s),s=null),l.value=!1}function m(e){u=e,c=o.value,a=null,l.value||p()}function h(){v(),r&&r.classList.remove("v-counter"),r=null}return t.onUnmounted(()=>{h()}),{currentValue:o,formattedValue:i,isAnimating:l,setValue:m,start:p,stop:v,bind:function(n){return f()?(h(),r=n,n.classList.add("v-counter"),n.textContent=i.value,"number"!=typeof e.value&&t.watch(e.value,e=>{m(e)}),p(),h):()=>{}}}},e.useDebounce=function(e){const{handler:n,wait:o=300,leading:i=!1,trailing:l=!0}=e;let r=null,s=null,a=null;const u=()=>{s&&(n.apply(a,s),s=null,a=null)};function c(){r&&(clearTimeout(r),r=null),s=null,a=null}return t.onUnmounted(()=>{c()}),{run:function(...e){s=e,a=this,r&&clearTimeout(r),t.unref(i)&&!r&&u(),r=setTimeout(()=>{t.unref(l)&&u(),r=null},t.unref(o))},cancel:c,flush:function(){r&&(clearTimeout(r),u(),r=null)},pending:function(){return null!==r}}},e.useDraggable=function(e={}){const{axis:n="both",constrain:o=!1,boundary:i,handle:l,grid:r,disabled:s=!1,onStart:a,onDrag:u,onEnd:c}=e,d=t.ref({x:0,y:0}),p=t.ref(!1);let v=null,m=null,h=0,g=0,y=0,b=0,w=0,x=0,_=0,E=0,L=0,k=0;function T(e){var n;if(t.unref(s))return;e.preventDefault();const{clientX:l,clientY:r}=qi(e);p.value=!0,h=l,g=r;const{x:u,y:c}=function(e){const t=e.match(/translate\(([-\d.]+)px,\s*([-\d.]+)px\)/);return t?{x:parseFloat(t[1]),y:parseFloat(t[2])}:{x:0,y:0}}(v.style.transform);if(y=u,b=c,t.unref(o)||i){const e=i?function(e){var t,n;if(!e)return null;if("function"==typeof e){const n=e();return null!=(t=null==n?void 0:n.getBoundingClientRect())?t:null}if("string"==typeof e){const t=document.querySelector(e);return null!=(n=null==t?void 0:t.getBoundingClientRect())?n:null}return e.getBoundingClientRect()}(i):null==(n=v.parentElement)?void 0:n.getBoundingClientRect();if(e){const t=v.getBoundingClientRect();w=t.left-e.left,x=t.top-e.top,_=e.width,E=e.height,L=t.width,k=t.height}}v.classList.add("v-draggable--dragging"),document.addEventListener("mousemove",C),document.addEventListener("mouseup",S),document.addEventListener("touchmove",C,{passive:!1}),document.addEventListener("touchend",S),null==a||a({x:y,y:b},e)}function C(e){if(!p.value||t.unref(s))return;e.preventDefault();const{clientX:l,clientY:a}=qi(e);let c=l-h,f=a-g,m=y+c,T=b+f;const C=t.unref(n);"x"===C?f=0:"y"===C&&(c=0);const S=t.unref(r);if(S&&(c=Math.round(c/S[0])*S[0],f=Math.round(f/S[1])*S[1]),t.unref(o)||i){const e=w+c,t=x+f,n=_-L,o=E-k,i=Math.max(0,Math.min(e,n)),l=Math.max(0,Math.min(t,o));m=y+(i-w),T=b+(l-x)}v.style.transform=`translate(${m}px, ${T}px)`,d.value={x:m,y:T},null==u||u({x:m,y:T},e)}function S(e){p.value&&(p.value=!1,null==v||v.classList.remove("v-draggable--dragging"),document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",S),document.removeEventListener("touchmove",C),document.removeEventListener("touchend",S),null==c||c(__spreadValues({},d.value),e))}function D(){if(v){const e=m||v;e.removeEventListener("mousedown",T),e.removeEventListener("touchstart",T)}v=null,m=null}return t.onUnmounted(()=>{D()}),{position:t.readonly(d),isDragging:t.readonly(p),reset:function(){v&&(v.style.transform="translate(0px, 0px)",d.value={x:0,y:0})},bind:function(e){if(!f())return()=>{};D(),v=e,"static"===getComputedStyle(e).position&&(e.style.position="absolute"),m=l?e.querySelector(l):null;const t=m||e;return t.addEventListener("mousedown",T),t.addEventListener("touchstart",T,{passive:!1}),D}}},e.useEllipsis=function(e){const{text:n,lines:o=1,ellipsis:i="...",maxWidth:l=0}=e,r=t.ref(t.unref(n)),s=t.ref(""),a=t.ref(!1);return t.watch(()=>[t.unref(n),t.unref(o),t.unref(i),t.unref(l)],()=>function(){const e=t.unref(n),u=t.unref(o),c=t.unref(i),d=t.unref(l);if(r.value=e,!e)return s.value="",void(a.value=!1);if(d>0){const t=Ki(e,d,c);s.value=t,a.value=t!==e}else if(u>1){const t=function(e,t,n="..."){if(t<=0)return"";const o=80*t;return e.length<=o?e:e.slice(0,o-n.length)+n}(e,u,c);s.value=t,a.value=t!==e}else s.value=e,a.value=!1}(),{immediate:!0}),t.onUnmounted(()=>{}),{truncated:s,isTruncated:a,original:r,calculateForWidth:function(e){const o=t.unref(n),l=t.unref(i);return!o||e<=0?o||"":Ki(o,e,l)},wouldTruncate:function(e){const o=t.unref(n);return!(!o||e<=0)&&Gi(o)>e}}},e.useEmoji=function(e={}){const{strip:n=!0,allowList:o,blockList:i,replacement:l="",onEmoji:r}=e,s=t.ref("");let a=null,u=null,c=null;function d(e){if(!t.unref(n))return e;let s=e;if(i&&i.length>0){const t=i.map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),n=new RegExp(t,"gu");s=e.replace(n,l)}else if(o&&o.length>0)s=e.replace(Zi,t=>o.includes(t)?t:(null==r||r(t,e.indexOf(t)),l));else{const t=e.match(Zi);t&&t.forEach(t=>null==r?void 0:r(t,e.indexOf(t))),s=e.replace(Zi,l)}return s}function p(e){return Zi.test(e)}function v(e){const t=e.target,n=t.value,o=d(n);if(o!==n){const e=t.selectionStart||0,i=t.selectionEnd||0;t.value=o,s.value=o;const l=n.length-o.length;t.setSelectionRange(Math.max(0,e-l),Math.max(0,i-l)),t.dispatchEvent(new Event("input",{bubbles:!0}))}}function m(e){var o;if(!t.unref(n))return;const i=null==(o=e.clipboardData)?void 0:o.getData("text");if(i&&p(i)){e.preventDefault();const t=d(i),n=e.target,o=n.selectionStart||0,l=n.selectionEnd||0,r=n.value;n.value=r.substring(0,o)+t+r.substring(l),s.value=n.value,n.setSelectionRange(o+t.length,o+t.length),n.dispatchEvent(new Event("input",{bubbles:!0}))}}function h(){a&&(u&&a.removeEventListener("input",u),c&&a.removeEventListener("paste",c),a.classList.remove("v-emoji")),a=null,u=null,c=null}return t.onUnmounted(()=>{h()}),{value:s,stripEmojis:d,hasEmoji:p,bind:function(e){if(!f())return()=>{};if(h(),a=e,s.value=e.value,u=v,c=m,e.addEventListener("input",u),e.addEventListener("paste",c),e.classList.add("v-emoji"),e.value&&t.unref(n)){const t=d(e.value);t!==e.value&&(e.value=t,s.value=t)}return"boolean"!=typeof n&&t.watch(n,()=>{if(t.unref(n)&&a){const e=d(a.value);e!==a.value&&(a.value=e,s.value=e)}}),h}}},e.useExport=function(e){function n(n){var o,i,l;if(!1!==(null==(o=e.onBeforeExport)?void 0:o.call(e)))try{const o=t.unref(e.data),l=n||t.unref(e.format)||"csv",r=t.unref(e.filename)||"export";let s;switch(l){case"json":s=JSON.stringify(o,null,2);break;case"html":s=function(e,t){var n;if(!Array.isArray(e)||0===e.length)return"";const o=t.columns||Object.keys(e[0]),i=t.headers||{};let l='<table border="1">\n';if(!1!==t.includeHeaders){l+=" <thead>\n <tr>\n";for(const e of o)l+=` <th>${i[e]||e}</th>\n`;l+=" </tr>\n </thead>\n"}l+=" <tbody>\n";for(const t of e){l+=" <tr>\n";for(const e of o)l+=` <td>${null!=(n=t[e])?n:""}</td>\n`;l+=" </tr>\n"}return l+=" </tbody>\n</table>",l}(Array.isArray(o)?o:[o],e);break;case"txt":s="string"==typeof o?o:JSON.stringify(o,null,2);break;default:s=function(e,t){if(!Array.isArray(e)||0===e.length)return"";const n=t.delimiter||",",o=t.columns||Object.keys(e[0]),i=t.headers||{};return(!1!==t.includeHeaders?`${o.map(e=>i[e]||e).join(n)}\n`:"")+e.map(e=>o.map(t=>{const o=e[t];return"string"==typeof o&&(o.includes(n)||o.includes("\n")||o.includes('"'))?`"${o.replace(/"/g,'""')}"`:null!=o?o:""}).join(n)).join("\n")}(Array.isArray(o)?o:[o],e)}!function(e,t,n){const o=new Blob([e],{type:{csv:"text/csv;charset=utf-8;",json:"application/json;charset=utf-8;",txt:"text/plain;charset=utf-8;",html:"text/html;charset=utf-8;"}[n]}),i=URL.createObjectURL(o),l=document.createElement("a");l.href=i,l.download=`${t}.${n}`,document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(i)}(s,r,l),null==(i=e.onAfterExport)||i.call(e)}catch(t){null==(l=e.onError)||l.call(e,t)}}return{exportData:n,exportCSV:function(){n("csv")},exportJSON:function(){n("json")},exportHTML:function(){n("html")},exportText:function(){n("txt")}}},e.useFade=function(e={}){var n;const o=t.ref(null==(n=t.unref(e.visible))||n);let i=null,l=!1;function r(){var t;i&&!l&&(l=!0,null==(t=e.onStart)||t.call(e,"in"),i.style.display="",i.style.opacity=String(e.minOpacity||0),String(i.offsetHeight),requestAnimationFrame(()=>{i&&(i.style.transition=`opacity ${e.duration||300}ms ${e.easing||"ease"} ${e.delay||0}ms`,i.style.opacity=String(e.maxOpacity||1),setTimeout(()=>{var t;l=!1,o.value=!0,null==(t=e.onComplete)||t.call(e,"in")},(e.duration||300)+(e.delay||0)))}))}function s(){var t;i&&!l&&(l=!0,null==(t=e.onStart)||t.call(e,"out"),i.style.transition=`opacity ${e.duration||300}ms ${e.easing||"ease"} ${e.delay||0}ms`,i.style.opacity=String(e.minOpacity||0),setTimeout(()=>{var t;i&&(i.style.display="none",l=!1,o.value=!1,null==(t=e.onComplete)||t.call(e,"out"))},(e.duration||300)+(e.delay||0)))}function a(){o.value?s():r()}function u(){i&&i.classList.remove("v-fade"),i=null}return t.onUnmounted(()=>{u()}),{isVisible:o,fadeIn:r,fadeOut:s,toggle:a,bind:function(n){return f()?(u(),i=n,n.classList.add("v-fade"),n.style.transition=`opacity ${e.duration||300}ms ${e.easing||"ease"} ${e.delay||0}ms`,n.style.opacity=o.value?String(e.maxOpacity||1):String(e.minOpacity||0),o.value||(n.style.display="none"),"boolean"!=typeof e.visible&&e.visible&&t.watch(e.visible,e=>{e!==o.value&&a()}),u):()=>{}}}},e.useFocus=function(e={}){const{onFocus:n,onBlur:o}=e,i=t.ref(!1);let l=null,r=null,s=null;function a(){l&&(r&&l.removeEventListener("focus",r),s&&l.removeEventListener("blur",s)),l=null,r=null,s=null,i.value=!1}return t.onUnmounted(()=>{a()}),{isFocused:t.readonly(i),focus:function(){l&&function(e){if(!f())return!1;const t=e.tagName.toLowerCase();if(Ji.has(t))return!e.disabled;if(e.isContentEditable)return!0;const n=e.getAttribute("tabindex");return null!=n?"-1"!==n:("a"===t||"area"===t)&&e.hasAttribute("href")}(l)&&l.focus()},blur:function(){l&&l.blur()},bind:function(e){return f()?(a(),l=e,r=e=>{i.value=!0,null==n||n(e)},s=e=>{i.value=!1,null==o||o(e)},e.addEventListener("focus",r),e.addEventListener("blur",s),i.value=document.activeElement===e,a):()=>{}}}},e.useFullscreen=function(e={}){const{fullscreenClass:n="v-fullscreen--active",onEnter:o,onExit:i,onChange:l}=e,r=t.ref(!1);let s=null,a=[];function u(){return __async(this,null,function*(){s&&!r.value&&(yield function(e){return __async(this,null,function*(){e.requestFullscreen?yield e.requestFullscreen():e.webkitRequestFullscreen?yield e.webkitRequestFullscreen():e.mozRequestFullScreen?yield e.mozRequestFullScreen():e.msRequestFullscreen&&(yield e.msRequestFullscreen())})}(s))})}function c(){return __async(this,null,function*(){r.value&&(yield function(){return __async(this,null,function*(){document.exitFullscreen?yield document.exitFullscreen():document.webkitExitFullscreen?yield document.webkitExitFullscreen():document.mozCancelFullScreen?yield document.mozCancelFullScreen():document.msExitFullscreen&&(yield document.msExitFullscreen())})}())})}function d(){const e=r.value;r.value=(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||null)===s,e!==r.value&&(r.value?(null==s||s.classList.add(n),null==o||o()):(null==s||s.classList.remove(n),null==i||i()),null==l||l(r.value))}function p(){s&&(s.classList.remove("v-fullscreen"),s.classList.remove(n)),a.forEach(e=>{document.removeEventListener("fullscreenchange",e),document.removeEventListener("webkitfullscreenchange",e),document.removeEventListener("mozfullscreenchange",e),document.removeEventListener("MSFullscreenChange",e)}),s=null,a=[]}return t.onUnmounted(()=>{r.value&&c(),p()}),{isFullscreen:r,enter:u,exit:c,toggle:function(){return __async(this,null,function*(){r.value?yield c():yield u()})},bind:function(e){return f()&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)?(p(),s=e,e.classList.add("v-fullscreen"),a=[d,d,d,d],document.addEventListener("fullscreenchange",a[0]),document.addEventListener("webkitfullscreenchange",a[1]),document.addEventListener("mozfullscreenchange",a[2]),document.addEventListener("MSFullscreenChange",a[3]),p):()=>{}}}},e.useHighlight=function(e){const n=t.ref(0);let o=null,i="";function l(){if(!o)return;o.innerHTML=i;const{html:l,count:r}=function(e,n){const o=t.unref(n.keywords),i=Array.isArray(o)?o:[o];if(0===i.length||!e)return{html:e,count:0};const l=n.caseSensitive||!1,r=n.wholeWord||!1,s=n.tag||"mark",a=n.className||"v-highlight",u=n.style?` style="${n.style}"`:"";i.sort((e,t)=>t.length-e.length);let c=e,d=0;for(const e of i){if(!e)continue;const t=Qi(e),n=r?"\\b":"",o=new RegExp(`${n}${t}${n}`,l?"g":"gi");c=c.replace(o,e=>(d++,`<${s} class="${a}"${u}>${e}</${s}>`))}return{html:c,count:d}}(i,e);o.innerHTML=l,n.value=r}function r(){o&&(o.innerHTML=i),o=null}return t.onUnmounted(()=>{r()}),{count:n,updateKeywords:function(t){e.keywords=t,l()},bind:function(n){return f()?(r(),o=n,i=n.innerHTML,"string"==typeof e.keywords||Array.isArray(e.keywords)||t.watch(e.keywords,()=>{l()}),l(),r):()=>{}}}},e.useHotkey=function(e={}){const{hotkey:n,hotkeys:o=[],target:i,enabled:l=!0}=e,r=t.ref(t.unref(l)),s=new Map;let a=null,u=null,c=null;function d(e){const t=nl(e.key).key.toLowerCase();s.has(t)||s.set(t,[]),s.get(t).push(e)}function p(e,n){if(!r.value)return;const o=e.key.toLowerCase(),i=s.get(o);if(i)for(const o of i){if(t.unref(o.disabled))continue;if(!!o.keyup!==n)continue;if(ol(e,nl(o.key))){!1!==o.prevent&&e.preventDefault(),o.stop&&e.stopPropagation(),o.handler(e);break}}}function v(){f()&&(m(),a=i?t.unref(i):document,u=e=>p(e,!1),c=e=>p(e,!0),null==a||a.addEventListener("keydown",u),null==a||a.addEventListener("keyup",c))}function m(){a&&(u&&a.removeEventListener("keydown",u),c&&a.removeEventListener("keyup",c)),a=null,u=null,c=null}return n&&d(n),o.forEach(d),t.watch(r,e=>{e?v():m()}),i&&"object"==typeof i&&"value"in i&&t.watch(i,()=>{r.value&&v()}),r.value&&v(),t.onUnmounted(()=>{m()}),{enabled:r,enable:function(){r.value=!0},disable:function(){r.value=!1},toggle:function(){r.value=!r.value},add:d,remove:function(e){s.delete(e.toLowerCase())},clear:function(){s.clear()}}},e.useHover=function(e={}){const{onEnter:n,onLeave:o,class:i,enterDelay:l=0,leaveDelay:r=0}=e,s=t.ref(!1);let a=null,u=null,c=null;function d(){a&&(clearTimeout(a),a=null),u&&(clearTimeout(u),u=null)}function p(e){if(u&&(clearTimeout(u),u=null),s.value)return;const o=t.unref(l);o&&o>0?a=setTimeout(()=>{s.value=!0,m(),null==n||n(e),a=null},o):(s.value=!0,m(),null==n||n(e))}function v(e){if(a&&(clearTimeout(a),a=null),!s.value)return;const n=t.unref(r);n&&n>0?u=setTimeout(()=>{s.value=!1,h(),null==o||o(e),u=null},n):(s.value=!1,h(),null==o||o(e))}function m(){c&&i&&c.classList.add(i)}function h(){c&&i&&c.classList.remove(i)}return t.onUnmounted(()=>{d(),h()}),{isHovering:s,bind:function(e){return f()?(c=e,e.addEventListener("mouseenter",p),e.addEventListener("mouseleave",v),()=>{e.removeEventListener("mouseenter",p),e.removeEventListener("mouseleave",v),d(),h(),c=null}):()=>{}}}},e.useImagePreview=function(e={}){const{src:n,closeOnClickOutside:o=!0,closeOnEsc:i=!0,showCloseButton:l=!0,onOpen:r,onClose:s}=e,a=t.ref(!1),u=t.ref("");let c=null,d=null,p=null,v=null;function m(e){if(!f())return;const t=e||(n&&"object"==typeof n?n.value:n);if(!t&&!c)return;const s=t||c.src;u.value=s,d=function(){const e=document.createElement("div");return e.className="v-image-preview",e.style.cssText="\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 9999;\n background: rgba(0, 0, 0, 0.9);\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: zoom-out;\n ",e}();const m=document.createElement("img");if(m.src=s,m.style.cssText="\n max-width: 90%;\n max-height: 90%;\n object-fit: contain;\n cursor: default;\n ",l){const e=document.createElement("button");e.className="v-image-preview__close",e.innerHTML="&times;",e.style.cssText="\n position: absolute;\n top: 20px;\n right: 20px;\n width: 40px;\n height: 40px;\n border: none;\n background: rgba(255, 255, 255, 0.2);\n color: white;\n font-size: 24px;\n cursor: pointer;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n ",e.addEventListener("click",e=>{e.stopPropagation(),h()}),d.appendChild(e)}d.appendChild(m),document.body.appendChild(d),o&&(p=h,d.addEventListener("click",p)),i&&(v=e=>{"Escape"===e.key&&h()},document.addEventListener("keydown",v)),a.value=!0,null==r||r()}function h(){d&&(d.remove(),d=null),p&&(document.removeEventListener("click",p),p=null),v&&(document.removeEventListener("keydown",v),v=null),a.value=!1,u.value="",null==s||s()}function g(){c&&m(c.src)}function y(){c&&(c.style.cursor="",c.removeEventListener("click",g)),c=null}return t.onUnmounted(()=>{y(),h()}),{isOpen:t.readonly(a),currentSrc:t.readonly(u),open:m,close:h,bind:function(e){return f()?(y(),c=e,e.style.cursor="zoom-in",e.addEventListener("click",g),y):()=>{}}}},e.useInfiniteScroll=function(e){const{onLoad:n,loading:o,finished:i,distance:l=0,immediate:r=!0,disabled:s=!1}=e,a=t.ref(!1),u=t.ref(!1),c=o||a,d=i||u;let p=null,v=null,m=null,g=null;function y(){return __async(this,null,function*(){if(!(t.unref(c)||t.unref(d)||t.unref(s))){a.value=!0;try{yield n()}finally{a.value=!1}}})}function b(){if(!p||t.unref(c)||t.unref(d)||t.unref(s))return;const e=t.unref(l);let n,o;if(p===window)n=document.documentElement.scrollHeight-window.scrollY,o=window.innerHeight;else{const e=p;n=e.scrollHeight-e.scrollTop,o=e.clientHeight}n<=o+e&&y()}function w(){m&&(m.disconnect(),m=null),g&&(g.remove(),g=null),p&&v&&p.removeEventListener("scroll",v),p=null,v=null}return t.onUnmounted(()=>{w()}),{loading:t.readonly(c),finished:t.readonly(d),load:y,bind:function(e){if(!f())return()=>{};if(w(),h()){g=document.createElement("div"),g.style.cssText="height: 1px; width: 100%; visibility: hidden;",e.appendChild(g);const n=M(e),o=n instanceof Window?null:n;m=new IntersectionObserver(e=>{e[0].isIntersecting&&y()},{root:o,rootMargin:`${t.unref(l)}px`}),m.observe(g)}else p=M(e),v=b,p.addEventListener("scroll",v);return r&&y(),w},stop:w}},e.useIntersect=function(e={}){const{handler:n,onEnter:o,onLeave:i,onChange:l,root:r=null,rootMargin:s="0px",threshold:a=0,once:u=!1}=e,c=t.ref(!1),d=t.ref(0);let p=null,v=!1;function m(){p&&(p.disconnect(),p=null),c.value=!1,d.value=0}return t.onUnmounted(()=>{m()}),{isIntersecting:t.readonly(c),ratio:t.readonly(d),bind:function(e){return f()?(m(),p=f()&&h()?new IntersectionObserver(e=>{for(const t of e){if(u&&v)continue;const e=t.isIntersecting;c.value=e,d.value=t.intersectionRatio,null==n||n(t,p),null==l||l(e,t),e?(null==o||o(t,p),u&&(v=!0)):null==i||i(t,p)}},{root:t.unref(r),rootMargin:s,threshold:a}):(console.warn("[Directix] useIntersect: IntersectionObserver not supported"),null),p&&p.observe(e),m):()=>{}},stop:m}},e.useLazy=function(e={}){const{src:n,placeholder:o,error:i,preload:l=0,onLoad:r,onError:s,attempt:a=1}=e,u=t.ref("pending"),c=t.ref(!1),d=t.ref(!1),p=t.ref(!1);let v=null,m=0,g=null;function y(){const e=t.unref(n);if(!e||!v)return;if("loading"===u.value)return;u.value="loading",c.value=!0;const o=new Image;o.onload=()=>{ll(v,e),u.value="loaded",c.value=!1,d.value=!0,p.value=!1,null==v||v.classList.remove("v-lazy--loading"),null==v||v.classList.add("v-lazy--loaded"),null==r||r(v)},o.onerror=()=>{null==v||v.classList.remove("v-lazy--loading"),m++,m<a?setTimeout(()=>y(),1e3*m):(i&&v&&ll(v,i),u.value="error",c.value=!1,p.value=!0,null==v||v.classList.add("v-lazy--error"),null==s||s(v,new Error("Failed to load image")))},v.classList.add("v-lazy--loading"),o.src=e}function b(){v&&(g&&g.unobserve(v),delete v.__lazyLoad,v.classList.remove("v-lazy","v-lazy--loading","v-lazy--loaded","v-lazy--error")),v=null}return t.onUnmounted(()=>{b()}),{state:t.readonly(u),isLoading:t.readonly(c),isLoaded:t.readonly(d),hasError:t.readonly(p),bind:function(e){return f()?(b(),v=e,m=0,u.value="pending",e.classList.add("v-lazy"),o&&ll(e,o),e.__lazyLoad=y,h()?(g=function(e){return il||(il=new IntersectionObserver(e=>{e.forEach(e=>{if(e.isIntersecting){const t=e.target,n=t.__lazyLoad;n&&(n(),null==il||il.unobserve(t))}})},{rootMargin:`${e}px`}),il)}(l),g.observe(e),b):(y(),b)):()=>{}},load:y,reset:function(){u.value="pending",c.value=!1,d.value=!1,p.value=!1,m=0}}},e.useLoading=function(e={}){const{initial:n=!1,text:o,loadingClass:i="v-loading",spinnerClass:l="v-loading__spinner",textClass:r="v-loading__text",spinner:s,background:a="rgba(255, 255, 255, 0.9)",lock:u=!1}=e,c=t.ref(t.unref(n));let d=null,p=null,v="",m="";function h(){d&&!p&&(p=function(e){const t=document.createElement("div");t.className=e.loadingClass||"v-loading",t.style.cssText=`\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 1000;\n background: ${e.background||"rgba(255, 255, 255, 0.9)"};\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n `;const n=e.spinner||'\n<svg class="v-loading__circular" viewBox="25 25 50 50">\n <circle class="v-loading__path" cx="50" cy="50" r="20" fill="none" stroke-width="2" stroke-miterlimit="10"/>\n</svg>\n',o=document.createElement("div");if(o.className=e.spinnerClass||"v-loading__spinner",o.innerHTML=n,t.appendChild(o),e.text){const n=document.createElement("div");n.className=e.textClass||"v-loading__text",n.textContent=e.text,t.appendChild(n)}return t}({text:t.unref(o),loadingClass:i,spinnerClass:l,textClass:r,spinner:s,background:a}),d.appendChild(p),u&&(d.style.overflow="hidden"),d.classList.add("v-loading--active"))}function g(){d&&p&&(p.remove(),p=null,u&&(d.style.overflow=m),d.classList.remove("v-loading--active"))}function y(){g(),d&&(d.style.position=v,d.style.overflow=m),d=null}return t.watch(c,e=>{e?h():g()}),"object"==typeof o&&"value"in o&&t.watch(o,e=>{if(p){const t=p.querySelector(`.${r}`);t&&(t.textContent=e||"")}}),t.onUnmounted(()=>{y()}),{loading:c,start:function(){c.value=!0},stop:function(){c.value=!1},toggle:function(){c.value=!c.value},bind:function(e){return f()?(y(),d=e,v=e.style.position,m=e.style.overflow,"static"===getComputedStyle(e).position&&(e.style.position="relative"),c.value&&h(),y):()=>{}}}},e.useLongPress=function(e={}){const{duration:n=500,distance:o=10,onStart:i,onTrigger:l,onCancel:r,onTick:s,tickInterval:a=100,prevent:u=!0}=e,c=t.ref(!1);let d=null,p=null,v={x:0,y:0},m=!1;function h(e){if(!f())return;u&&e.preventDefault(),b();const o=A(e);if(v={x:o.x,y:o.y},m=!0,c.value=!0,null==i||i(e),s){let e=t.unref(n);p=setInterval(()=>{e-=a,null==s||s(Math.max(0,e))},a)}d=setTimeout(()=>{b(),c.value=!1,null==l||l(e)},t.unref(n))}function g(e){c.value&&(b(),m=!1,c.value=!1,null==r||r(e))}function y(e){if(!c.value||!m)return;const n=A(e);var i,l;(i=v,l={x:n.x,y:n.y},Math.sqrt(__pow(l.x-i.x,2)+__pow(l.y-i.y,2)))>t.unref(o)&&g(e)}function b(){d&&(clearTimeout(d),d=null),p&&(clearInterval(p),p=null)}return t.onUnmounted(()=>{b()}),{isPressing:c,start:h,stop:g,bind:function(e){return e.addEventListener("mousedown",h),e.addEventListener("mouseup",g),e.addEventListener("mouseleave",g),e.addEventListener("mousemove",y),e.addEventListener("touchstart",h,{passive:!u}),e.addEventListener("touchend",g),e.addEventListener("touchcancel",g),e.addEventListener("touchmove",y,{passive:!0}),()=>{e.removeEventListener("mousedown",h),e.removeEventListener("mouseup",g),e.removeEventListener("mouseleave",g),e.removeEventListener("mousemove",y),e.removeEventListener("touchstart",h),e.removeEventListener("touchend",g),e.removeEventListener("touchcancel",g),e.removeEventListener("touchmove",y),b()}}}},e.useLottie=function(e){const n=t.ref("stopped"),o=t.shallowRef(null);let i=null,l=null;function r(){return __async(this,null,function*(){const i=yield function(){return __async(this,null,function*(){if(window.lottie)return window.lottie;try{const e=yield import("lottie-web");return window.lottie=e.default||e,e.default||e}catch(e){return console.warn("[Directix] useLottie: lottie-web not found. Install: npm install lottie-web"),null}})}();if(!i||!l)return;const r=t.unref(e.animationData),s={container:l,renderer:e.renderer||"svg",loop:!1!==e.loop,autoplay:!1!==e.autoplay};"string"==typeof r&&r.startsWith("http")?s.path=r:s.animationData=r,o.value=i.loadAnimation(s),void 0!==e.speed&&o.value.setSpeed(t.unref(e.speed)),void 0!==e.direction&&o.value.setDirection(e.direction),n.value=!1!==e.autoplay?"playing":"stopped",o.value.addEventListener("DOMLoaded",()=>{var t;null==(t=e.onReady)||t.call(e,o.value)}),o.value.addEventListener("complete",()=>{var t;n.value="stopped",null==(t=e.onComplete)||t.call(e)}),o.value.addEventListener("loopComplete",()=>{var t;null==(t=e.onLoopComplete)||t.call(e)})})}function s(){o.value&&(o.value.destroy(),o.value=null),l&&l.parentNode&&l.parentNode.removeChild(l),i&&i.classList.remove("v-lottie-container"),l=null,i=null,n.value="stopped"}return t.onUnmounted(()=>{s()}),{state:n,animation:o,play:function(){var e;null==(e=o.value)||e.play(),n.value="playing"},pause:function(){var e;null==(e=o.value)||e.pause(),n.value="paused"},stop:function(){var e;null==(e=o.value)||e.stop(),n.value="stopped"},setSpeed:function(e){var t;null==(t=o.value)||t.setSpeed(e)},setDirection:function(e){var t;null==(t=o.value)||t.setDirection(e)},goToAndPlay:function(e,t=!0){var i;null==(i=o.value)||i.goToAndPlay(e,t),n.value="playing"},goToAndStop:function(e,t=!0){var i;null==(i=o.value)||i.goToAndStop(e,t),n.value="paused"},bind:function(n){return f()?(s(),i=n,l=document.createElement("div"),l.className="v-lottie",l.style.cssText="width: 100%; height: 100%;",n.appendChild(l),n.classList.add("v-lottie-container"),r(),"number"!=typeof e.speed&&e.speed&&t.watch(e.speed,e=>{var t;null==(t=o.value)||t.setSpeed(e)}),s):()=>{}}}},e.useLowercase=function(e){const{text:n,first:o=!1}=e,i=t.ref(t.unref(n)),l=t.ref("");return t.watch(()=>[t.unref(n),t.unref(o)],()=>function(){const e=t.unref(n),r=t.unref(o);i.value=e,l.value=rl(e,r)}(),{immediate:!0}),{transformed:l,original:i}},e.useMask=function(e){const{mask:n,placeholder:o="_",showPlaceholder:i=!0,showMaskOnBlur:l=!1,clearIncomplete:r=!1,disabled:s=!1,onChange:a,onComplete:u}=e;let c=null,d=null,p=null,v=null;function m(){return function(e,t){return[...e].map(e=>{const n=sl[e];return n?{pattern:n,placeholder:t,isLiteral:!1}:{pattern:new RegExp(`\\${e}`),placeholder:e,isLiteral:!0}})}(t.unref(n),o)}function h(e,t,n){let i="",l=0;for(const r of t){if(l>=e.length){i+=r.isLiteral?r.placeholder:n?o:"";continue}const t=e[l];r.isLiteral?(t===r.placeholder&&l++,i+=r.placeholder):r.pattern.test(t)?(i+=t,l++):t===o?(i+=n?o:"",l++):l++}return i}function g(e,t){let n="";for(let i=0;i<e.length&&i<t.length;i++)t[i].isLiteral||e[i]===o||(n+=e[i]);return n}function y(e,t){for(let n=0;n<t.length;n++)if(!t[n].isLiteral&&(n>=e.length||e[n]===o))return!1;return!0}function b(e,t){let n=t;for(;n<e.length&&e[n].isLiteral;)n++;return Math.min(n,e.length)}function w(e){const t=e.target,n=m(),o=t.value,l=t.selectionStart||0,r=h(o,n,i);if(r!==o)return t.value=r,t.setSelectionRange(b(n,l),b(n,l)),void t.dispatchEvent(new Event("input",{bubbles:!0}));null==a||a(r,g(r,n)),y(r,n)&&(null==u||u(r))}function x(){if(!c)return;const e=m();!c.value&&i&&(c.value=h("",e,!0))}function _(){if(!c)return;const e=m();l||y(c.value,e)||!r||(c.value="")}function E(){c&&(d&&c.removeEventListener("input",d),p&&c.removeEventListener("focus",p),v&&c.removeEventListener("blur",v)),c=null,d=null,p=null,v=null}return t.onUnmounted(()=>{E()}),{getFormattedValue:e=>h(e,m(),i),getRawValue:e=>g(e,m()),isComplete:e=>y(e,m()),bind:function(e){if(!f())return()=>{};if(E(),c=e,d=w,p=x,v=_,e.addEventListener("input",d),e.addEventListener("focus",p),e.addEventListener("blur",v),e.value){const t=m();e.value=h(e.value,t,i)}return E}}},e.useMoney=function(e){const{value:n,symbol:o="$",symbolPosition:i="before",precision:l=2,separator:r=",",decimal:s="."}=e,a=t.ref(t.unref(n)),u=t.computed(()=>al(a.value,{precision:t.unref(l),separator:t.unref(r),decimal:t.unref(s),symbol:t.unref(o),symbolPosition:t.unref(i)}));return t.watch(()=>t.unref(n),e=>{a.value=e}),{value:a,formatted:u,parse:function(e){return ul(e,{decimal:t.unref(s),symbol:t.unref(o)})}}},e.useMutation=function(e){const{handler:n,attributes:o=!1,attributeFilter:i,childList:l=!0,subtree:r=!1,characterData:s=!1,attributeOldValue:a=!1,characterDataOldValue:u=!1,disabled:c=!1}=e;let d=null,p=null;function v(){d&&p&&!t.unref(c)&&p.observe(d,{attributes:o,attributeFilter:i,childList:l,subtree:r,characterData:s,attributeOldValue:a,characterDataOldValue:u})}function m(){p&&p.disconnect()}return t.onUnmounted(()=>{m(),p=null,d=null}),{bind:function(e){return f()?(m(),d=e,p=f()&&b()?new MutationObserver((e,o)=>{t.unref(c)||n(e,o)}):(console.warn("[Directix] useMutation: MutationObserver not supported"),null),p&&!t.unref(c)&&v(),m):()=>{}},stop:m,start:v}},e.useNumber=function(e){const{value:n,precision:o=0,separator:i=",",decimal:l=".",prefix:r="",suffix:s=""}=e,a=t.ref(t.unref(n)),u=t.computed(()=>cl(a.value,{precision:t.unref(o),separator:t.unref(i),decimal:t.unref(l),prefix:t.unref(r),suffix:t.unref(s)}));return t.watch(()=>t.unref(n),e=>{a.value=e}),{value:a,formatted:u,parse:function(e){return dl(e,{decimal:t.unref(l),prefix:t.unref(r),suffix:t.unref(s)})}}},e.usePan=function(e={}){const{onStart:n,onPan:o,onEnd:i,threshold:l=10,direction:r="all",preventDefault:s=!0,pointers:a=["touch","mouse"]}=e,u=t.ref(!1),c=t.ref(null),d=t.ref(0);let p=null,v=0,m=0,h=0,g=0,y=0,b={};function w(e,t=!1,n=!1){const o=h-v,i=g-m,l=Math.sqrt(o*o+i*i),r=Date.now()-y;return{direction:fl(o,i),deltaX:o,deltaY:i,distance:l,x:h,y:g,startX:v,startY:m,isPanning:u.value,isFirst:t,isFinal:n,velocity:l/(r||1)}}function x(e){const t=vl(e);v=t.x,m=t.y,h=t.x,g=t.y,u.value=!1,y=Date.now(),s&&e.preventDefault()}function _(e){const t=e,i=vl(t);h=i.x,g=i.y;const a=h-v,p=g-m,f=Math.sqrt(a*a+p*p);if(!u.value&&f<l)return;const y=fl(a,p);if(!function(e,t){return!t||"all"===t||("horizontal"===t?"left"===e||"right"===e:"up"===e||"down"===e)}(y,r))return;s&&e.preventDefault();const b=u.value;u.value=!0,c.value=y,d.value=f;const x=w(0,!b);b||null==n||n(x),null==o||o(x)}function E(e){if(!u.value)return;const t=w(0,!1,!0);null==i||i(t),u.value=!1,c.value=null,d.value=0}function L(){p&&(Object.entries(b).forEach(([e,t])=>{!e.startsWith("mouse")||"mousemove"!==e&&"mouseup"!==e?null==p||p.removeEventListener(e,t):document.removeEventListener(e,t)}),p.classList.remove("v-pan")),p=null,b={}}return t.onUnmounted(()=>{L()}),{isPanning:u,direction:c,distance:d,bind:function(e){return f()?(L(),p=e,a.includes("touch")&&(b.touchstart=x,b.touchmove=_,b.touchend=E,b.touchcancel=E,e.addEventListener("touchstart",b.touchstart,{passive:!1}),e.addEventListener("touchmove",b.touchmove,{passive:!1}),e.addEventListener("touchend",b.touchend),e.addEventListener("touchcancel",b.touchcancel)),a.includes("mouse")&&(b.mousedown=x,b.mousemove=_,b.mouseup=E,e.addEventListener("mousedown",b.mousedown),document.addEventListener("mousemove",b.mousemove),document.addEventListener("mouseup",b.mouseup)),e.classList.add("v-pan"),L):()=>{}}}},e.useParallax=function(e={}){const n=t.ref(0),o=t.ref(!1);let i=null,l=null,r=null,s=!1;function a(){var l;!t.unref(e.enabled)||(l=e.mobileBreakpoint)&&window.innerWidth<l||(s||(s=!0,requestAnimationFrame(()=>{if(!i)return;const l=i.getBoundingClientRect(),r=window.innerHeight;if(o.value=l.top<r&&l.bottom>0,o.value){const o=window.scrollY;let r=(o-(l.top+o))*(t.unref(e.speed)||.5);e.reverse&&(r=-r),n.value=r,e.transform?i.style.transform=e.transform(r,i):e.horizontal?i.style.transform=`translateX(${r}px)`:i.style.transform=`translateY(${r}px)`}s=!1})))}function u(){r&&l&&(r.removeEventListener("scroll",l),window.removeEventListener("resize",l)),i&&(i.style.willChange="",i.style.transform="",i.classList.remove("v-parallax")),i=null,l=null,r=null}return t.onUnmounted(()=>{u()}),{offset:n,isActive:o,bind:function(e){return f()?(u(),i=e,e.style.willChange="transform",l=a,r=function(e){let t=e.parentElement;for(;t;){const{overflow:e,overflowX:n,overflowY:o}=getComputedStyle(t);if(/(auto|scroll)/.test(e+n+o))return t;t=t.parentElement}return window}(e),r.addEventListener("scroll",l,{passive:!0}),window.addEventListener("resize",l,{passive:!0}),a(),e.classList.add("v-parallax"),u):()=>{}}}},e.usePermission=function(e){const{value:n,mode:o="some",check:i,getPermissions:l,getRoles:r,roleMap:s={}}=e,a=t.ref(!1);function u(){a.value=function(){if(i)return i(t.unref(n),t.unref(o));if(!l)return console.warn("[Directix] usePermission: getPermissions function is required"),!0;const e=l(),a=(null==r?void 0:r())||[],u=Array.isArray(t.unref(n))?t.unref(n):[t.unref(n)];function c(t){if(t in s)return a.includes(t);if(ml(t,e))return!0;for(const e of a)if(ml(t,s[e]||[]))return!0;return!1}return"every"===t.unref(o)?u.every(c):u.some(c)}()}return t.watch(()=>t.unref(n),()=>u(),{immediate:!0}),"object"==typeof o&&"value"in o&&t.watch(o,()=>u()),{granted:t.readonly(a),recheck:u}},e.usePinch=function(e={}){const{onStart:n,onPinch:o,onEnd:i,minScale:l,maxScale:r,enableTransform:s=!1}=e,a=t.ref(!1),u=t.ref(1);let c=null,d=0,p=0,v=1,m="",h={};function g(e,t=!1,n=!1){const o=(i=e.touches).length<2?{x:i[0].clientX,y:i[0].clientY}:{x:(i[0].clientX+i[1].clientX)/2,y:(i[0].clientY+i[1].clientY)/2};var i;return{scale:d>0?p/d:1,distance:p,initialDistance:d,centerX:o.x,centerY:o.y,isPinching:a.value,isFirst:t,isFinal:n}}function y(e){const t=e;if(2===t.touches.length){if(d=hl(t.touches),p=d,a.value=!1,s&&c){const e=getComputedStyle(c).transform,t=new DOMMatrix(e);v=t.a,m=c.style.transition,c.style.transition="none"}e.preventDefault()}}function b(e){const t=e;if(2!==t.touches.length)return;if(p=hl(t.touches),d<=0)return;const i=p/d;if(void 0!==l&&i<l)return;if(void 0!==r&&i>r)return;e.preventDefault();const f=a.value;a.value=!0,u.value=i;const m=g(t,!f);f||null==n||n(m),s&&c&&(c.style.transform=`scale(${v*i})`),null==o||o(m)}function w(e){if(!a.value)return;s&&c&&(c.style.transition=m);const t=g({touches:{length:0,item:()=>null}},!1,!0);null==i||i(t),a.value=!1,d=0,p=0}function x(){c&&(Object.entries(h).forEach(([e,t])=>{null==c||c.removeEventListener(e,t)}),c.classList.remove("v-pinch")),c=null,h={}}return t.onUnmounted(()=>{x()}),{isPinching:a,scale:u,bind:function(e){return f()?(x(),c=e,h={touchstart:y,touchmove:b,touchend:w,touchcancel:w},e.addEventListener("touchstart",h.touchstart,{passive:!1}),e.addEventListener("touchmove",h.touchmove,{passive:!1}),e.addEventListener("touchend",h.touchend),e.addEventListener("touchcancel",h.touchcancel),e.classList.add("v-pinch"),x):()=>{}}}},e.usePrint=bl,e.useProgress=function(e={}){var n,o,i;const l=t.ref(null!=(n=t.unref(e.value))?n:0),r=null!=(o=e.max)?o:100,s=null!=(i=e.min)?i:0,a=t.computed(()=>(Math.max(s,Math.min(r,l.value))-s)/(r-s)*100);let u=null,c=null,d=null,p=null;function v(){if(!u)return;!function(){if(!f())return;const e="v-progress-styles";if(document.getElementById(e))return;const t=document.createElement("style");t.id=e,t.textContent="\n @keyframes v-progress-stripes {\n from { background-position: 1rem 0; }\n to { background-position: 0 0; }\n }\n @keyframes v-progress-indeterminate {\n 0% { transform: translateX(-100%); }\n 100% { transform: translateX(400%); }\n }\n .v-progress--indeterminate {\n position: absolute;\n width: 30% !important;\n }\n ",document.head.appendChild(t)}();const n=e.height||4,o=e.color||"#42b883",i=e.backgroundColor||"rgba(0, 0, 0, 0.1)",l=e.duration||300;c=document.createElement("div"),c.className="v-progress",c.style.cssText=`\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n height: ${n}px;\n background: ${i};\n overflow: hidden;\n z-index: 1000;\n `,d=document.createElement("div"),d.className="v-progress__bar";let r=`\n height: 100%;\n background: ${o};\n transition: width ${l}ms ease;\n width: ${a.value}%;\n `;e.striped&&(r+="\n background-image: linear-gradient(\n 45deg,\n rgba(255, 255, 255, 0.15) 25%,\n transparent 25%,\n transparent 50%,\n rgba(255, 255, 255, 0.15) 50%,\n rgba(255, 255, 255, 0.15) 75%,\n transparent 75%,\n transparent\n );\n background-size: 1rem 1rem;\n "),d.style.cssText=r,t.unref(e.indeterminate)?(d.classList.add("v-progress--indeterminate"),d.style.width="30%",d.style.animation="v-progress-indeterminate 1.5s infinite linear"):e.animated&&(d.style.animation="v-progress-stripes 1s linear infinite"),c.appendChild(d),e.showText&&(p=document.createElement("span"),p.className="v-progress__text",p.style.cssText=`\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n font-size: ${Math.max(n-2,10)}px;\n color: #fff;\n text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);\n `,p.textContent=`${Math.round(a.value)}%`,c.appendChild(p)),u.appendChild(c)}function m(){var n,o;d&&(t.unref(e.indeterminate)||(d.style.width=`${a.value}%`,p&&(p.textContent=`${Math.round(a.value)}%`),null==(n=e.onChange)||n.call(e,l.value,a.value),a.value>=100&&(null==(o=e.onComplete)||o.call(e))))}function h(e){l.value=Math.max(s,Math.min(r,e)),m()}function g(){c&&c.parentNode&&c.parentNode.removeChild(c),u&&u.classList.remove("v-progress-container"),c=null,d=null,p=null,u=null}return t.onUnmounted(()=>{g()}),{value:l,percent:a,setValue:h,increment:function(e=1){h(l.value+e)},decrement:function(e=1){h(l.value-e)},reset:function(){h(s)},bind:function(n){return f()?(g(),u=n,"static"===getComputedStyle(n).position&&(n.style.position="relative"),v(),n.classList.add("v-progress-container"),"boolean"!=typeof e.indeterminate&&e.indeterminate&&t.watch(e.indeterminate,t=>{d&&(t?(d.classList.add("v-progress--indeterminate"),d.style.width="30%",d.style.animation="v-progress-indeterminate 1.5s infinite linear"):(d.classList.remove("v-progress--indeterminate"),d.style.animation=e.animated?"v-progress-stripes 1s linear infinite":"",m()))}),g):()=>{}}}},e.usePullRefresh=function(e){const{handler:n,distance:o=60,maxDistance:i=100,disabled:l=!1,successDuration:r=500,errorDuration:s=1e3}=e,a=t.ref("idle"),u=t.ref(0),c=t.ref(!1),d=t.ref(null);let p=0,f=0;const v=()=>t.unref(o),m=()=>t.unref(l);function h(){a.value="idle",u.value=0,c.value=!1}function g(){return __async(this,null,function*(){a.value="loading";try{yield n(),a.value="success",yield wl(t.unref(r))}catch(e){a.value="error",yield wl(t.unref(s))}finally{h()}})}return t.onUnmounted(()=>{h()}),{state:a,distance:u,isPulling:c,events:{touchstart:function(e){if(m()||"loading"===a.value)return;const t=d.value;t&&t.scrollTop>0||(c.value=!0,p=e.touches[0].clientY,f=p,a.value="idle")},touchmove:function(e){if(!c.value||m()||"loading"===a.value)return;f=e.touches[0].clientY;const n=f-p;if(n<=0)return u.value=0,void(a.value="idle");e.preventDefault();const o=Math.min(.5*n,t.unref(i));u.value=o;const l=o/v();a.value=l>=1?"ready":"pulling"},touchend:function(){c.value&&!m()&&(c.value=!1,"ready"===a.value&&u.value>=v()?g():(u.value=0,h()))}},containerRef:d,refresh:g}},e.useResize=function(e={}){const{debounce:n=0,box:o="content-box",onResize:i}=e,l=t.ref(0),r=t.ref(0);let s=null,a=null,u=null;function c(e){const o=t.unref(n);function s(){l.value=e.contentRect.width,r.value=e.contentRect.height,null==i||i({width:e.contentRect.width,height:e.contentRect.height,contentRect:e.contentRect})}o&&o>0?(a&&clearTimeout(a),a=setTimeout(s,o)):s()}function d(){s&&(s.disconnect(),s=null),u&&(u.remove(),u=null),a&&(clearTimeout(a),a=null)}return t.onUnmounted(()=>{d()}),{width:t.readonly(l),height:t.readonly(r),bind:function(e){if(!f())return()=>{};d();const t=e.getBoundingClientRect();if(l.value=t.width,r.value=t.height,g())f()&&g()&&(s=new ResizeObserver(e=>{for(const t of e)c(t)})),null==s||s.observe(e,{box:o});else{u=document.createElement("iframe"),u.style.cssText="\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border: none;\n pointer-events: none;\n opacity: 0;\n ";"static"===getComputedStyle(e).position&&(e.style.position="relative"),e.appendChild(u);const t=u.contentWindow;t&&t.addEventListener("resize",()=>{c({contentRect:e.getBoundingClientRect()})})}return d},stop:d}},e.useRipple=function(e={}){const{color:n="currentColor",duration:o=600,disabled:i=!1,initialScale:l=0,finalScale:r=2}=e;let s=null,a=null;function u(e){if(t.unref(i))return;const a=t.unref(n),u=t.unref(o),c=xl(e.clientX-s.getBoundingClientRect().left,e.clientY-s.getBoundingClientRect().top,s,a,u,l,r);s.appendChild(c)}function c(){s&&a&&(s.removeEventListener("click",a),s.classList.remove("v-ripple")),s=null,a=null}return t.onUnmounted(()=>{c()}),{bind:function(e){if(!f())return()=>{};c(),s=e;const t=getComputedStyle(e);return"static"===t.position&&(e.style.position="relative"),"visible"===t.overflow&&(e.style.overflow="hidden"),e.classList.add("v-ripple"),a=u,e.addEventListener("click",a),c},trigger:function(e){var a,u;if(!s||t.unref(i))return;const c=s.getBoundingClientRect(),d=xl(null!=(a=null==e?void 0:e.x)?a:c.width/2,null!=(u=null==e?void 0:e.y)?u:c.height/2,s,t.unref(n),t.unref(o),l,r);s.appendChild(d)}}},e.useRotateGesture=function(e={}){const{onStart:n,onRotate:o,onEnd:i,enableTransform:l=!1}=e,r=t.ref(!1),s=t.ref(0);let a=null,u=0,c=0,d=0,p="",v={};function m(e,t=!1,n=!1){const o=(i=e.touches).length<2?{x:i[0].clientX,y:i[0].clientY}:{x:(i[0].clientX+i[1].clientX)/2,y:(i[0].clientY+i[1].clientY)/2};var i;const l=c*(Math.PI/180);return{angle:c,radians:l,rotation:c-u,centerX:o.x,centerY:o.y,isRotating:r.value,isFirst:t,isFinal:n}}function h(e){const t=e;if(2===t.touches.length){if(u=_l(t.touches),c=u,r.value=!1,l&&a){const e=getComputedStyle(a).transform,t=new DOMMatrix(e);d=Math.atan2(t.b,t.a)*(180/Math.PI),p=a.style.transition,a.style.transition="none"}e.preventDefault()}}function g(e){const t=e;if(2!==t.touches.length)return;c=_l(t.touches),e.preventDefault();const i=r.value;r.value=!0,s.value=c;const p=m(t,!i);if(i||null==n||n(p),l&&a){const e=c-u;a.style.transform=`rotate(${d+e}deg)`}null==o||o(p)}function y(e){if(!r.value)return;l&&a&&(a.style.transition=p);const t=m({touches:{length:0,item:()=>null}},!1,!0);null==i||i(t),r.value=!1,u=0,c=0}function b(){a&&(Object.entries(v).forEach(([e,t])=>{null==a||a.removeEventListener(e,t)}),a.classList.remove("v-rotate-gesture")),a=null,v={}}return t.onUnmounted(()=>{b()}),{isRotating:r,angle:s,bind:function(e){return f()?(b(),a=e,v={touchstart:h,touchmove:g,touchend:y,touchcancel:y},e.addEventListener("touchstart",v.touchstart,{passive:!1}),e.addEventListener("touchmove",v.touchmove,{passive:!1}),e.addEventListener("touchend",v.touchend),e.addEventListener("touchcancel",v.touchcancel),e.classList.add("v-rotate-gesture"),b):()=>{}}}},e.useSanitize=function(e={}){const{allowedTags:n=El,allowedAttributes:o=Ll,allowDataUrls:i=!1,allowStyles:l=!1,allowClass:r=!1,allowId:s=!1,handler:a}=e;function u(e){var t;if(a)return a(e);if(!f())return e;const u=document.createElement("div");u.innerHTML=e;for(const e of kl){const n=u.getElementsByTagName(e);for(;n.length>0;)null==(t=n[0].parentNode)||t.removeChild(n[0])}const c=e=>{var t;const a=e.tagName.toLowerCase();if(!n.includes(a)){const n=document.createTextNode(e.textContent||"");return void(null==(t=e.parentNode)||t.replaceChild(n,e))}for(const t of Tl)e.removeAttribute(t);const u=e.getAttribute("href");if(u&&u.toLowerCase().startsWith("javascript:")&&e.removeAttribute("href"),!i){const t=e.getAttribute("src");t&&t.toLowerCase().startsWith("data:")&&e.removeAttribute("src")}const d=Array.from(e.attributes);for(const t of d){const n=o.includes(t.name.toLowerCase()),i="class"===t.name&&r,a="id"===t.name&&s,u="style"===t.name&&l;n||i||a||u||e.removeAttribute(t.name)}for(const t of Array.from(e.children))c(t)};for(const e of Array.from(u.children))c(e);return u.innerHTML}return t.onUnmounted(()=>{}),{sanitize:u,bind:function(e){if(!f())return()=>{};const t=e.innerHTML;return t&&(e.innerHTML=u(t)),()=>{}}}},e.useScroll=function(e={}){const{throttle:n=0,passive:o=!0}=e,i=t.ref(0),l=t.ref(0),r=t.ref(0),s=t.ref(0),a=t.ref(0),u=t.ref(0),c=t.ref(!1);let d=null,p=0,v=0,m=null,h=null,g=null;const y=t.computed(()=>({scrollLeft:i.value,scrollTop:l.value,scrollLeftMax:0,scrollTopMax:0,progressX:r.value,progressY:s.value,directionX:a.value,directionY:u.value}));function b(e){if(!d)return;const o=t.unref(n);function f(){const e=Cl(d,p,v);i.value=e.scrollLeft,l.value=e.scrollTop,r.value=e.progressX,s.value=e.progressY,a.value=e.directionX,u.value=e.directionY,p=e.scrollLeft,v=e.scrollTop,c.value=!0,g&&clearTimeout(g),g=setTimeout(()=>{c.value=!1},150)}o&&o>0?h||(h=setTimeout(()=>{f(),h=null},o)):f()}function w(){d&&m&&d.removeEventListener("scroll",m),h&&(clearTimeout(h),h=null),g&&(clearTimeout(g),g=null),d=null,m=null}return t.onUnmounted(()=>{w()}),{scrollLeft:t.readonly(i),scrollTop:t.readonly(l),progressX:t.readonly(r),progressY:t.readonly(s),directionX:t.readonly(a),directionY:t.readonly(u),isScrolling:t.readonly(c),info:t.readonly(y),bind:function(e){if(!f())return()=>{};w(),d=e||window;const t=Cl(d,0,0);return i.value=t.scrollLeft,l.value=t.scrollTop,r.value=t.progressX,s.value=t.progressY,p=t.scrollLeft,v=t.scrollTop,m=b,d.addEventListener("scroll",m,{passive:o}),w},stop:w,scrollTo:function(e){if(!d)return;const{top:t,left:n,behavior:o="smooth"}=e;if(d===window)window.scrollTo({top:t,left:n,behavior:o});else{const e=d;void 0!==t&&(e.scrollTop=t),void 0!==n&&(e.scrollLeft=n)}}}},e.useSkeleton=function(e={}){var n;const o=t.ref(null==(n=t.unref(e.loading))||n);let i=null,l=null,r="";function s(){var t,n,s;i&&(o.value?(r=i.style.display||getComputedStyle(i).display,i.style.display="none",l||(l=function(e){const t=document.createElement("div");t.className=`v-skeleton ${e.class||""}`;const n="number"==typeof e.width?`${e.width}px`:e.width||"100%",o="number"==typeof e.height?`${e.height}px`:e.height||"1em",i="number"==typeof e.radius?`${e.radius}px`:e.radius||"4px";let l="";return l="wave"===e.animation?`\n background: linear-gradient(90deg, ${e.color||"#e8e8e8"} 25%, ${e.animationColor||"#f0f0f0"} 50%, ${e.color||"#e8e8e8"} 75%);\n background-size: 200% 100%;\n animation: skeleton-wave 1.5s ease-in-out infinite;\n `:"pulse"===e.animation?`\n background: ${e.color||"#e8e8e8"};\n animation: skeleton-pulse 1.5s ease-in-out infinite;\n `:`background: ${e.color||"#e8e8e8"};`,t.style.cssText=`\n width: ${n};\n height: ${o};\n border-radius: ${i};\n ${l}\n `,t}(__spreadProps(__spreadValues({},e),{width:null!=(t=e.width)?t:i.offsetWidth,height:null!=(n=e.height)?n:i.offsetHeight}))),l.parentNode||null==(s=i.parentNode)||s.insertBefore(l,i.nextSibling)):(i.style.display=r,l&&l.parentNode&&l.parentNode.removeChild(l)))}function a(){l&&l.parentNode&&l.parentNode.removeChild(l),i&&(i.style.display=r,i.classList.remove("v-skeleton-container")),l=null,i=null}return t.onUnmounted(()=>{a()}),{isLoading:o,show:function(){o.value=!0,s()},hide:function(){o.value=!1,s()},toggle:function(){o.value=!o.value,s()},bind:function(n){return f()?(function(){if(!f())return;const e="v-skeleton-styles";if(document.getElementById(e))return;const t=document.createElement("style");t.id=e,t.textContent="\n @keyframes skeleton-wave {\n 0% { background-position: 200% 0; }\n 100% { background-position: -200% 0; }\n }\n @keyframes skeleton-pulse {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0.5; }\n }\n ",document.head.appendChild(t)}(),a(),i=n,n.classList.add("v-skeleton-container"),o.value&&s(),e.loading&&"boolean"!=typeof e.loading&&t.watch(e.loading,()=>{var n;o.value=null!=(n=t.unref(e.loading))&&n,s()}),a):()=>{}}}},e.useSticky=function(e={}){const{offsetTop:n=0,onStick:o,disabled:i=!1}=e,l=t.ref(!1);let r=null,s=null,a=null,u=null,c=null;function d(){var e;if(!r||t.unref(i))return;const a=(s===window?document.documentElement:s).getBoundingClientRect(),d=r.getBoundingClientRect(),p=t.unref(n),f=d.top<=p&&a.top<=p;f!==l.value&&(l.value=f,f?(u||(u=document.createElement("div"),u.style.width=`${d.width}px`,u.style.height=`${d.height}px`,null==(e=r.parentNode)||e.insertBefore(u,r)),r.style.position="fixed",r.style.top=`${p}px`,r.style.width=`${d.width}px`,r.classList.add("v-sticky--active")):(u&&(u.remove(),u=null),c&&(r.style.position=c.position,r.style.top=c.top,r.style.width=c.width),r.classList.remove("v-sticky--active")),null==o||o(f))}function p(){s&&a&&s.removeEventListener("scroll",a),r&&(c&&(r.style.position=c.position,r.style.top=c.top,r.style.width=c.width),r.classList.remove("v-sticky","v-sticky--active")),u&&(u.remove(),u=null),s=null,a=null,r=null,l.value=!1}return t.onUnmounted(()=>{p()}),{isSticky:t.readonly(l),bind:function(e){return f()?(p(),r=e,c={position:e.style.position,top:e.style.top,width:e.style.width},e.classList.add("v-sticky"),s=M(e),a=d,s.addEventListener("scroll",a,{passive:!0}),d(),p):()=>{}},stop:p}},e.useSwipe=function(e={}){const{handler:n,threshold:o=30,maxTime:i=500,directions:l=Sl,preventScrollOnSwipe:r=!0,mouse:s=!0,onLeft:a,onRight:u,onUp:c,onDown:d}=e,p=t.ref(null),v=t.ref(0),m=t.ref(0),h=t.ref(!1);let g=null,y=0,b=0,w=0;function x(e,s,f,h){var y;const b=t.unref(o);if(f>t.unref(i))return;if(Math.max(Math.abs(e),Math.abs(s))<b)return;const w=function(e,t,n){if(Math.abs(e)>Math.abs(t)){const t=e>0?"right":"left";return n.includes(t)?t:null}{const e=t>0?"down":"up";return n.includes(e)?e:null}}(e,s,l);if(!w)return;p.value=w,v.value=e,m.value=s,r&&h.cancelable&&h.preventDefault(),null==n||n(w,h);const x={left:a,right:u,up:c,down:d};null==(y=x[w])||y.call(x),null==g||g.dispatchEvent(new CustomEvent("swipe",{detail:{direction:w,deltaX:e,deltaY:s,deltaTime:f}}))}function _(e,t){y=e,b=t,w=Date.now(),h.value=!0,p.value=null,v.value=0,m.value=0}function E(e,t,n){if(!h.value)return;h.value=!1;x(e-y,t-b,Date.now()-w,n)}function L(e){_(e.touches[0].clientX,e.touches[0].clientY)}function k(e){h.value&&r&&e.preventDefault()}function T(e){const t=e.changedTouches[0];E(t.clientX,t.clientY,e)}function C(e){_(e.clientX,e.clientY)}function S(e){E(e.clientX,e.clientY,e)}function D(e){h.value&&E(e.clientX,e.clientY,e)}function $(){g&&(g.removeEventListener("touchstart",L),g.removeEventListener("touchmove",k),g.removeEventListener("touchend",T),g.removeEventListener("touchcancel",T),t.unref(s)&&(g.removeEventListener("mousedown",C),g.removeEventListener("mouseup",S),g.removeEventListener("mouseleave",D)),g=null)}return t.onUnmounted(()=>{$()}),{direction:t.readonly(p),lengthX:t.readonly(v),lengthY:t.readonly(m),isSwiping:t.readonly(h),bind:function(e){return f()?($(),g=e,e.style.touchAction="none",e.style.userSelect="none",e.addEventListener("touchstart",L,{passive:!0}),e.addEventListener("touchmove",k,{passive:!1}),e.addEventListener("touchend",T),e.addEventListener("touchcancel",T),t.unref(s)&&(e.addEventListener("mousedown",C),e.addEventListener("mouseup",S),e.addEventListener("mouseleave",D)),$):()=>{}}}},e.useThrottle=function(e){const{handler:n,wait:o=300,leading:i=!0,trailing:l=!0}=e;let r=null,s=null,a=null,u=0;const c=()=>t.unref(i),d=()=>{s&&(n.apply(a,s),s=null,a=null)};function p(){r&&(clearTimeout(r),r=null),u=0,s=null,a=null}return t.onUnmounted(()=>{p()}),{run:function(...e){const n=Date.now(),i=t.unref(o);u||c()||(u=n);const p=i-(n-u);s=e,a=this,p<=0||p>i?(r&&(clearTimeout(r),r=null),u=n,d()):!r&&t.unref(l)&&(r=setTimeout(()=>{u=c()?Date.now():0,r=null,d()},p))},cancel:p}},e.useTooltip=function(e={}){const{content:n,placement:o="top",trigger:i="hover",delay:l=0,hideDelay:r=0,arrow:s=!0,class:a,onShow:u,onHide:c,disabled:d=!1}=e,p=t.ref(!1);let v=null,m=null,h=null,g=null;const y={};function b(){!t.unref(d)&&n&&(g&&(clearTimeout(g),g=null),l>0?h=setTimeout(w,l):w())}function w(){var e;v&&(m||(m=function(){const e=document.createElement("div");return e.className=`v-tooltip v-tooltip--${o}${a?` ${a}`:""}${s?" v-tooltip--arrow":""}`,e.style.cssText="\n position: absolute;\n z-index: 9999;\n opacity: 0;\n transition: opacity 0.2s;\n pointer-events: none;\n ",e}(),document.body.appendChild(m)),m.textContent=null!=(e=t.unref(n))?e:null,function(){if(!m||!v)return;const e=v.getBoundingClientRect(),t=m.getBoundingClientRect();let n=0,i=0;switch(o){case"top":n=e.top-t.height-8,i=e.left+(e.width-t.width)/2;break;case"bottom":n=e.bottom+8,i=e.left+(e.width-t.width)/2;break;case"left":n=e.top+(e.height-t.height)/2,i=e.left-t.width-8;break;case"right":n=e.top+(e.height-t.height)/2,i=e.right+8}i<0&&(i=8),i+t.width>window.innerWidth&&(i=window.innerWidth-t.width-8),n<0&&(n=8),n+t.height>window.innerHeight&&(n=window.innerHeight-t.height-8),m.style.top=`${n+window.scrollY}px`,m.style.left=`${i+window.scrollX}px`}(),m.style.opacity="1",p.value=!0,null==u||u())}function x(){h&&(clearTimeout(h),h=null),r>0?g=setTimeout(_,r):_()}function _(){m&&(m.style.opacity="0"),p.value=!1,null==c||c()}function E(){p.value?x():b()}function L(){v&&Object.entries(y).forEach(([e,t])=>{v.removeEventListener(e,t)}),m&&(m.remove(),m=null),h&&(clearTimeout(h),h=null),g&&(clearTimeout(g),g=null),v=null,p.value=!1}return t.onUnmounted(()=>{L()}),{isVisible:t.readonly(p),show:b,hide:x,toggle:E,bind:function(e){return f()?(L(),v=e,"hover"===i?(y.mouseenter=b,y.mouseleave=x,e.addEventListener("mouseenter",y.mouseenter),e.addEventListener("mouseleave",y.mouseleave)):"click"===i?(y.click=E,e.addEventListener("click",y.click)):"focus"===i&&(y.focus=b,y.blur=x,e.addEventListener("focus",y.focus),e.addEventListener("blur",y.blur)),L):()=>{}}}},e.useTouch=function(e={}){const{onSwipe:n,onSwipeLeft:o,onSwipeRight:i,onSwipeUp:l,onSwipeDown:r,onPinch:s,onRotate:a,onTap:u,onLongPress:c,swipeThreshold:d=30,longPressDuration:p=500,tapDuration:v=250,disabled:m=!1}=e,h=t.ref(null);let g=null,y=0,b=0,w=0,x=null,_=0,E=0;function L(e){let t=0,n=0;for(let o=0;o<e.length;o++)t+=e[o].clientX,n+=e[o].clientY;return{x:t/e.length,y:n/e.length}}function k(e,t){const n=e.clientX-t.clientX,o=e.clientY-t.clientY;return Math.sqrt(n*n+o*o)}function T(e,t){return Math.atan2(t.clientY-e.clientY,t.clientX-e.clientX)*(180/Math.PI)}function C(e){t.unref(m)||(w=Date.now(),h.value=null,1===e.touches.length?(y=e.touches[0].clientX,b=e.touches[0].clientY,c&&(x=setTimeout(()=>{h.value="longPress",c({type:"longPress",center:{x:y,y:b},event:e})},p))):2===e.touches.length&&(_=k(e.touches[0],e.touches[1]),E=T(e.touches[0],e.touches[1])))}function S(e){if(!t.unref(m)&&(x&&(clearTimeout(x),x=null),2===e.touches.length&&(s||a))){const t=k(e.touches[0],e.touches[1]),n=T(e.touches[0],e.touches[1]);if(s&&_>0){const n=t/_;h.value="pinch",s({type:"pinch",scale:n,center:L(e.touches),event:e})}if(a){const t=n-E;h.value="rotate",a({type:"rotate",rotation:t,center:L(e.touches),event:e})}}}function D(e){if(t.unref(m))return;x&&(clearTimeout(x),x=null);const s=Date.now()-w;if(1===e.changedTouches.length){const t=e.changedTouches[0].clientX,a=e.changedTouches[0].clientY,c=t-y,p=a-b,f=Math.sqrt(c*c+p*p);if(f>=d){let s;h.value="swipe",s=Math.abs(c)>Math.abs(p)?c>0?"right":"left":p>0?"down":"up";const u={type:"swipe",direction:s,distance:f,angle:Math.atan2(p,c)*(180/Math.PI),center:{x:t,y:a},event:e};switch(null==n||n(u),s){case"left":null==o||o(u);break;case"right":null==i||i(u);break;case"up":null==l||l(u);break;case"down":null==r||r(u)}}else f<10&&s<v&&u&&(h.value="tap",u({type:"tap",center:{x:t,y:a},event:e}))}h.value=null}function $(){g&&(g.removeEventListener("touchstart",C),g.removeEventListener("touchmove",S),g.removeEventListener("touchend",D),g.removeEventListener("touchcancel",D)),x&&(clearTimeout(x),x=null),g=null,h.value=null}return t.onUnmounted(()=>{$()}),{gesture:t.readonly(h),bind:function(e){return f()?($(),g=e,e.addEventListener("touchstart",C,{passive:!0}),e.addEventListener("touchmove",S,{passive:!0}),e.addEventListener("touchend",D),e.addEventListener("touchcancel",D),$):()=>{}}}},e.useTrim=function(e){const{text:n,position:o="both",chars:i}=e,l=t.ref(t.unref(n)),r=t.ref(""),s=t.ref(!1);return t.watch(()=>[t.unref(n),t.unref(o),t.unref(i)],()=>function(){const e=t.unref(n),a=t.unref(o),u=t.unref(i);l.value=e,r.value=Dl(e,a,u),s.value=r.value!==e}(),{immediate:!0}),{trimmed:r,original:l,wasTrimmed:s}},e.useTruncate=function(e){const{text:n,length:o=100,position:i="end",omission:l="..."}=e,r=t.ref(""),s=t.ref(!1),a=t.ref(0);function u(e,n,r){const s=null!=n?n:t.unref(o),a=null!=r?r:t.unref(i);if(e.length<=s)return e;switch(a){case"start":return function(e,t,n){return e.length<=t?e:n+e.slice(-(t-n.length))}(e,s,l);case"middle":return function(e,t,n){if(e.length<=t)return e;const o=t-n.length,i=Math.ceil(o/2),l=Math.floor(o/2);return e.slice(0,i)+n+e.slice(-l)}(e,s,l);default:return function(e,t,n){return e.length<=t?e:e.slice(0,t-n.length)+n}(e,s,l)}}function c(){const e=t.unref(n),i=t.unref(o);a.value=e.length,s.value=e.length>i,r.value=u(e)}return t.watch(()=>t.unref(n),c,{immediate:!0}),t.watch(()=>t.unref(o),c),t.watch(()=>t.unref(i),c),{truncated:t.readonly(r),isTruncated:t.readonly(s),originalLength:t.readonly(a),truncate:u}},e.useTypewriter=function(e){const n=t.ref(""),o=t.ref(!1),i=t.ref(!1);let l=null,r=null,s=null,a=0;function u(){l&&(l.textContent=n.value,r&&l.appendChild(r))}function c(){var l,r;const p=t.unref(e.text);if(a>=p.length)return o.value=!1,null==(l=e.onComplete)||l.call(e),void(e.loop&&(s=setTimeout(()=>{!function(){function t(){if(0===n.value.length)return i.value=!1,void(e.loop&&(s=setTimeout(d,e.delay||0)));n.value=n.value.slice(0,-1),u(),s=setTimeout(t,e.deleteSpeed||30)}i.value=!0,t()}()},e.deleteDelay||1500)));const f=p[a];n.value+=f,a++,u(),null==(r=e.onType)||r.call(e,f,a-1),s=setTimeout(c,e.speed||50)}function d(){var t;o.value||i.value||(o.value=!0,a=0,n.value="",null==(t=e.onStart)||t.call(e),s=setTimeout(c,e.delay||0))}function p(){s&&(clearTimeout(s),s=null),o.value=!1,i.value=!1}function v(){p(),n.value="",a=0,u()}function m(){p(),l&&l.classList.remove("v-typewriter"),l=null,r=null}return t.onUnmounted(()=>{m()}),{displayedText:n,isTyping:o,isDeleting:i,start:d,stop:p,reset:v,bind:function(n){return f()?(function(){if(!f())return;const e="v-typewriter-styles";if(document.getElementById(e))return;const t=document.createElement("style");t.id=e,t.textContent="\n @keyframes v-typewriter-blink {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0; }\n }\n .v-typewriter__cursor {\n display: inline-block;\n margin-left: 1px;\n }\n ",document.head.appendChild(t)}(),m(),l=n,r=function(){if(!1===e.cursor)return null;const t=document.createElement("span");return t.className="v-typewriter__cursor",t.textContent=e.cursor||"|",!1!==e.cursorBlink&&(t.style.animation="v-typewriter-blink 0.7s infinite"),t}(),n.classList.add("v-typewriter"),"string"!=typeof e.text&&t.watch(e.text,()=>{v(),d()}),d(),m):()=>{}}}},e.useUppercase=function(e){const{text:n,first:o=!1}=e,i=t.ref(t.unref(n)),l=t.ref("");return t.watch(()=>[t.unref(n),t.unref(o)],()=>function(){const e=t.unref(n),r=t.unref(o);i.value=e,l.value=$l(e,r)}(),{immediate:!0}),{transformed:l,original:i}},e.useVirtualList=function(e){const{items:n,itemSize:o=50,height:i=400,overscan:l=3,keyField:r="id"}=e,s=t.ref(null),a=t.ref(0),u=t.ref(0),c=t.ref(0),d=()=>t.unref(n),p=()=>t.unref(o),f=()=>t.unref(i),v=t.computed(()=>{const e=d(),t=p();if("function"==typeof t){let n=0;for(let o=0;o<e.length;o++)n+=t(o);return n}return t*e.length});function m(){const e=d(),n=p(),o=f(),i=t.unref(l),r=a.value;let s=0,u=0,c=0;if("function"==typeof n){let t=0;for(let o=0;o<e.length;o++){const e=n(o);if(t+e>r){s=o,c=t;break}t+=e}for(u=s,t=c;u<e.length&&t<r+o;)t+=n(u),u++;s=Math.max(0,s-i),u=Math.min(e.length,u+i),t=0;for(let e=0;e<s;e++)t+=n(e);c=t}else s=Math.max(0,Math.floor(r/n)-i),u=Math.min(e.length,Math.ceil((r+o)/n)+i),c=s*n;return{start:s,end:u,offsetY:c}}const h=t.computed(()=>{const e=d(),t=p(),{start:n,end:o,offsetY:i}=m();u.value=n,c.value=o;const l=[];let r=i;for(let i=n;i<o;i++){const n=e[i];if(void 0!==n){const e="function"==typeof t?t(i):t;l.push({item:n,index:i,style:{position:"absolute",top:`${r}px`,height:`${e}px`,width:"100%"}}),r+=e}}return l}),g=t.computed(()=>({height:`${f()}px`,overflow:"auto",position:"relative"}));function y(e){const t=e.target;a.value=t.scrollTop}return t.onMounted(()=>{s.value&&s.value.addEventListener("scroll",y,{passive:!0})}),t.onUnmounted(()=>{s.value&&s.value.removeEventListener("scroll",y)}),{visibleItems:h,totalHeight:v,scrollTop:a,startIndex:u,endIndex:c,scrollToIndex:function(e){if(!s.value)return;const t=p(),n=d();if("function"==typeof t){let o=0;for(let i=0;i<Math.min(e,n.length);i++)o+=t(i);s.value.scrollTop=o}else s.value.scrollTop=e*t},scrollTo:function(e){s.value&&(s.value.scrollTop=e)},containerRef:s,listStyle:g}},e.useVisible=function(e={}){const{initial:n=!0,useHidden:o=!1,onChange:i}=e,l=t.ref(t.unref(n));let r=null,s="",a="";function u(e){r&&(e?(r.classList.remove("v-hidden"),r.classList.add("v-visible"),o?r.style.visibility=a||"visible":r.style.display=s):(r.classList.remove("v-visible"),r.classList.add("v-hidden"),o?r.style.visibility="hidden":r.style.display="none"))}function c(){r&&(r.style.display=s,r.style.visibility=a,r.classList.remove("v-hidden","v-visible")),r=null}return t.watch(l,(e,t)=>{e!==t&&(u(e),null==i||i(e))}),"object"==typeof n&&"value"in n&&t.watch(n,e=>{l.value=e}),t.onUnmounted(()=>{c()}),{visible:l,show:function(){l.value=!0},hide:function(){l.value=!1},toggle:function(){l.value=!l.value},bind:function(e){return f()?(c(),r=e,s=e.style.display,a=e.style.visibility,u(l.value),c):()=>{}}}},e.useWatermark=function(e){const{content:n,width:o=300,height:i=200,rotate:l=-22,fontSize:r=16,fontFamily:s="sans-serif",fontWeight:a="normal",color:u="rgba(128, 128, 128, 0.15)",gap:c=[100,100],zIndex:d=9999,disabled:p=!1,protect:f=!0}=e,v=t.ref(null),m=t.ref(""),h=t.ref(t.unref(p));function g(){const e=t.unref(n),c=t.unref(o),d=t.unref(i),p=t.unref(l),f=t.unref(r),h=t.unref(s),g=t.unref(a),y=t.unref(u);v.value=Ml({content:e,width:c,height:d,fontSize:f,fontFamily:h,fontWeight:g,color:y,rotate:p}),m.value=v.value.toDataURL()}const y=t.ref({position:"absolute",top:"0",left:"0",width:"100%",height:"100%",pointerEvents:"none",zIndex:t.unref(d),backgroundImage:"",backgroundRepeat:"repeat",backgroundPosition:"0 0",backgroundSize:""});function b(){const e=t.unref(c),n=t.unref(d),l=Array.isArray(e)?e:[e,e],r=t.unref(o),s=t.unref(i);y.value=__spreadProps(__spreadValues({},y.value),{zIndex:n,backgroundImage:`url("${m.value}")`,backgroundPosition:`${l[0]/2}px ${l[1]/2}px`,backgroundSize:`${r+l[0]}px ${s+l[1]}px`})}return t.watch(()=>[t.unref(n),t.unref(o),t.unref(i),t.unref(l),t.unref(r),t.unref(s),t.unref(a),t.unref(u),t.unref(c),t.unref(d)],()=>{g(),b()},{immediate:!0}),t.watch(h,e=>{y.value.display=e?"none":"block"}),t.unref(p)&&(y.value.display="none"),t.onUnmounted(()=>{}),{canvas:v,dataUrl:m,style:y,disabled:h,update:function(t){Object.assign(e,t),g(),b()},enable:function(){h.value=!1},disable:function(){h.value=!0}}},e.vBlur=E,e.vCapitalcase=te,e.vClickDelay=re,e.vClickOutside=se,e.vClickWave=de,e.vContextMenu=ve,e.vCopy=he,e.vCountdown=xe,e.vCounter=Ce,e.vDebounce=$e,e.vDraggable=Pe,e.vEllipsis=Oe,e.vEmoji=Xe,e.vExport=Ue,e.vFade=Ge,e.vFocus=Ze,e.vFullscreen=nt,e.vHighlight=rt,e.vHotkey=ht,e.vHover=xt,e.vImagePreview=Ct,e.vInfiniteScroll=Dt,e.vIntersect=Pt,e.vLazy=Xt,e.vLoading=Bt,e.vLongPress=qt,e.vLottie=Kt,e.vLowercase=en,e.vMask=un,e.vMoney=mn,e.vMutation=gn,e.vNumber=yn,e.vPan=En,e.vParallax=Sn,e.vPermission=On,e.vPinch=Yn,e.vPrint=Rn,e.vProgress=jn,e.vPullRefresh=io,e.vResize=ro,e.vRipple=ao,e.vRotateGesture=fo,e.vSanitize=wo,e.vScroll=Eo,e.vSkeleton=To,e.vSticky=Io,e.vSwipe=Ro,e.vThrottle=Xo,e.vTooltip=ii,e.vTouch=si,e.vTrim=ci,e.vTruncate=pi,e.vTypewriter=gi,e.vUppercase=_i,e.vVirtualList=Ci,e.vVisible=$i,e.vWatermark=Oi,e.wouldTextTruncate=function(e,t,n=14){return Gi(e,n)>t},Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}(this.Directix=this.Directix||{},Vue);