@kvass/widgets 1.2.2 → 1.2.4
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.
- package/dist/_plugin-vue_export-helper.js +1 -1
- package/dist/flatfinder.js +36 -36
- package/dist/index.es.js +12 -0
- package/dist/map.js +15 -15
- package/index.html +18 -15
- package/package.json +4 -3
- package/src/flatfinder/components/Flatfinder.ce.vue +9 -6
- package/src/map/components/Map.ce.vue +23 -6
- package/vite.config.js +3 -3
package/dist/index.es.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{q as yt,E as Bi,I as Vr,r as dt,H as bi,b as lt,o as z,e as pt,w as _t,G as On,c as ot,g as Z,F as $r,a as Wt,m as At,j as ce,a0 as zr,d as et,O as Hr,z as Ro,v as je,C as yi,t as Vt,A as jo,f as En,Q as Ur,i as wn,D as ki,n as on,y as _n,K as Gr,L as Yr,N as qr,s as Ri,a2 as Xr}from"./_plugin-vue_export-helper.js";function No(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=No(e[t]))&&(i&&(i+=" "),i+=n);else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}function Wr(){for(var e,t,n=0,i="";n<arguments.length;)(e=arguments[n++])&&(t=No(e))&&(i&&(i+=" "),i+=t);return i}const ji=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Ni=Wr,Kr=(e,t)=>n=>{var i;if(t?.variants==null)return Ni(e,n?.class,n?.className);const{variants:o,defaultVariants:r}=t,s=Object.keys(o).map(c=>{const u=n?.[c],d=r?.[c];if(u===null)return null;const h=ji(u)||ji(d);return o[c][h]}),l=n&&Object.entries(n).reduce((c,u)=>{let[d,h]=u;return h===void 0||(c[d]=h),c},{}),a=t==null||(i=t.compoundVariants)===null||i===void 0?void 0:i.reduce((c,u)=>{let{class:d,className:h,...p}=u;return Object.entries(p).every(v=>{let[f,b]=v;return Array.isArray(b)?b.includes({...r,...l}[f]):{...r,...l}[f]===b})?[...c,d,h]:c},[]);return Ni(e,s,a,n?.class,n?.className)},ke=/^[a-z0-9]+(-[a-z0-9]+)*$/,Cn=(e,t,n,i="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;i=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const l=o.pop(),a=o.pop(),c={provider:o.length>0?o[0]:i,prefix:a,name:l};return t&&!qe(c)?null:c}const r=o[0],s=r.split("-");if(s.length>1){const l={provider:i,prefix:s.shift(),name:s.join("-")};return t&&!qe(l)?null:l}if(n&&i===""){const l={provider:i,prefix:"",name:r};return t&&!qe(l,n)?null:l}return null},qe=(e,t)=>e?!!((e.provider===""||e.provider.match(ke))&&(t&&e.prefix===""||e.prefix.match(ke))&&e.name.match(ke)):!1,Lo=Object.freeze({left:0,top:0,width:16,height:16}),rn=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Sn=Object.freeze({...Lo,...rn}),Jn=Object.freeze({...Sn,body:"",hidden:!1});function Zr(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(n.rotate=i),n}function Li(e,t){const n=Zr(e,t);for(const i in Jn)i in rn?i in e&&!(i in n)&&(n[i]=rn[i]):i in t?n[i]=t[i]:i in e&&(n[i]=e[i]);return n}function Qr(e,t){const n=e.icons,i=e.aliases||Object.create(null),o=Object.create(null);function r(s){if(n[s])return o[s]=[];if(!(s in o)){o[s]=null;const l=i[s]&&i[s].parent,a=l&&r(l);a&&(o[s]=[l].concat(a))}return o[s]}return(t||Object.keys(n).concat(Object.keys(i))).forEach(r),o}function Jr(e,t,n){const i=e.icons,o=e.aliases||Object.create(null);let r={};function s(l){r=Li(i[l]||o[l],r)}return s(t),n.forEach(s),Li(e,r)}function Vo(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(o=>{t(o,null),n.push(o)});const i=Qr(e);for(const o in i){const r=i[o];r&&(t(o,Jr(e,o,r)),n.push(o))}return n}const ts={provider:"",aliases:{},not_found:{},...Lo};function Mn(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function $o(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!Mn(e,ts))return null;const n=t.icons;for(const o in n){const r=n[o];if(!o.match(ke)||typeof r.body!="string"||!Mn(r,Jn))return null}const i=t.aliases||Object.create(null);for(const o in i){const r=i[o],s=r.parent;if(!o.match(ke)||typeof s!="string"||!n[s]&&!i[s]||!Mn(r,Jn))return null}return t}const Vi=Object.create(null);function es(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function Qt(e,t){const n=Vi[e]||(Vi[e]=Object.create(null));return n[t]||(n[t]=es(e,t))}function xi(e,t){return $o(t)?Vo(t,(n,i)=>{i?e.icons[n]=i:e.missing.add(n)}):[]}function ns(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}let Te=!1;function zo(e){return typeof e=="boolean"&&(Te=e),Te}function is(e){const t=typeof e=="string"?Cn(e,!0,Te):e;if(t){const n=Qt(t.provider,t.prefix),i=t.name;return n.icons[i]||(n.missing.has(i)?null:void 0)}}function os(e,t){const n=Cn(e,!0,Te);if(!n)return!1;const i=Qt(n.provider,n.prefix);return ns(i,n.name,t)}function rs(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),Te&&!t&&!e.prefix){let o=!1;return $o(e)&&(e.prefix="",Vo(e,(r,s)=>{s&&os(r,s)&&(o=!0)})),o}const n=e.prefix;if(!qe({provider:t,prefix:n,name:"a"}))return!1;const i=Qt(t,n);return!!xi(i,e)}const Ho=Object.freeze({width:null,height:null}),Uo=Object.freeze({...Ho,...rn}),ss=/(-?[0-9.]*[0-9]+[0-9.]*)/g,as=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function $i(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const i=e.split(ss);if(i===null||!i.length)return e;const o=[];let r=i.shift(),s=as.test(r);for(;;){if(s){const l=parseFloat(r);isNaN(l)?o.push(r):o.push(Math.ceil(l*t*n)/n)}else o.push(r);if(r=i.shift(),r===void 0)return o.join("");s=!s}}const ls=e=>e==="unset"||e==="undefined"||e==="none";function us(e,t){const n={...Sn,...e},i={...Uo,...t},o={left:n.left,top:n.top,width:n.width,height:n.height};let r=n.body;[n,i].forEach(v=>{const f=[],b=v.hFlip,k=v.vFlip;let M=v.rotate;b?k?M+=2:(f.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),f.push("scale(-1 1)"),o.top=o.left=0):k&&(f.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),f.push("scale(1 -1)"),o.top=o.left=0);let O;switch(M<0&&(M-=Math.floor(M/4)*4),M=M%4,M){case 1:O=o.height/2+o.top,f.unshift("rotate(90 "+O.toString()+" "+O.toString()+")");break;case 2:f.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:O=o.width/2+o.left,f.unshift("rotate(-90 "+O.toString()+" "+O.toString()+")");break}M%2===1&&(o.left!==o.top&&(O=o.left,o.left=o.top,o.top=O),o.width!==o.height&&(O=o.width,o.width=o.height,o.height=O)),f.length&&(r='<g transform="'+f.join(" ")+'">'+r+"</g>")});const s=i.width,l=i.height,a=o.width,c=o.height;let u,d;s===null?(d=l===null?"1em":l==="auto"?c:l,u=$i(d,a/c)):(u=s==="auto"?a:s,d=l===null?$i(u,c/a):l==="auto"?c:l);const h={},p=(v,f)=>{ls(f)||(h[v]=f.toString())};return p("width",u),p("height",d),h.viewBox=o.left.toString()+" "+o.top.toString()+" "+a.toString()+" "+c.toString(),{attributes:h,body:r}}const cs=/\sid="(\S+)"/g,ds="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let hs=0;function ps(e,t=ds){const n=[];let i;for(;i=cs.exec(e);)n.push(i[1]);if(!n.length)return e;const o="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(r=>{const s=typeof t=="function"?t(r):t+(hs++).toString(),l=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+l+')([")]|\\.[a-z])',"g"),"$1"+s+o+"$3")}),e=e.replace(new RegExp(o,"g"),""),e}const ti=Object.create(null);function fs(e,t){ti[e]=t}function ei(e){return ti[e]||ti[""]}function Ei(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const wi=Object.create(null),Ne=["https://api.simplesvg.com","https://api.unisvg.com"],ni=[];for(;Ne.length>0;)Ne.length===1||Math.random()>.5?ni.push(Ne.shift()):ni.push(Ne.pop());wi[""]=Ei({resources:["https://api.iconify.design"].concat(ni)});function Go(e,t){const n=Ei(t);return n===null?!1:(wi[e]=n,!0)}function _i(e){return wi[e]}const gs=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let zi=gs();function ms(e,t){const n=_i(e);if(!n)return 0;let i;if(!n.maxURL)i=0;else{let o=0;n.resources.forEach(s=>{o=Math.max(o,s.length)});const r=t+".json?icons=";i=n.maxURL-o-n.path.length-r.length}return i}function vs(e){return e===404}const bs=(e,t,n)=>{const i=[],o=ms(e,t),r="icons";let s={type:r,provider:e,prefix:t,icons:[]},l=0;return n.forEach((a,c)=>{l+=a.length+1,l>=o&&c>0&&(i.push(s),s={type:r,provider:e,prefix:t,icons:[]},l=a.length),s.icons.push(a)}),i.push(s),i};function ys(e){if(typeof e=="string"){const t=_i(e);if(t)return t.path}return"/"}const ks=(e,t,n)=>{if(!zi){n("abort",424);return}let i=ys(t.provider);switch(t.type){case"icons":{const r=t.prefix,s=t.icons.join(","),l=new URLSearchParams({icons:s});i+=r+".json?"+l.toString();break}case"custom":{const r=t.uri;i+=r.slice(0,1)==="/"?r.slice(1):r;break}default:n("abort",400);return}let o=503;zi(e+i).then(r=>{const s=r.status;if(s!==200){setTimeout(()=>{n(vs(s)?"abort":"next",s)});return}return o=501,r.json()}).then(r=>{if(typeof r!="object"||r===null){setTimeout(()=>{r===404?n("abort",r):n("next",o)});return}setTimeout(()=>{n("success",r)})}).catch(()=>{n("next",o)})},xs={prepare:bs,send:ks};function Es(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((o,r)=>o.provider!==r.provider?o.provider.localeCompare(r.provider):o.prefix!==r.prefix?o.prefix.localeCompare(r.prefix):o.name.localeCompare(r.name));let i={provider:"",prefix:"",name:""};return e.forEach(o=>{if(i.name===o.name&&i.prefix===o.prefix&&i.provider===o.provider)return;i=o;const r=o.provider,s=o.prefix,l=o.name,a=n[r]||(n[r]=Object.create(null)),c=a[s]||(a[s]=Qt(r,s));let u;l in c.icons?u=t.loaded:s===""||c.missing.has(l)?u=t.missing:u=t.pending;const d={provider:r,prefix:s,name:l};u.push(d)}),t}function Yo(e,t){e.forEach(n=>{const i=n.loaderCallbacks;i&&(n.loaderCallbacks=i.filter(o=>o.id!==t))})}function ws(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const i=e.provider,o=e.prefix;t.forEach(r=>{const s=r.icons,l=s.pending.length;s.pending=s.pending.filter(a=>{if(a.prefix!==o)return!0;const c=a.name;if(e.icons[c])s.loaded.push({provider:i,prefix:o,name:c});else if(e.missing.has(c))s.missing.push({provider:i,prefix:o,name:c});else return n=!0,!0;return!1}),s.pending.length!==l&&(n||Yo([e],r.id),r.callback(s.loaded.slice(0),s.missing.slice(0),s.pending.slice(0),r.abort))})}))}let _s=0;function Cs(e,t,n){const i=_s++,o=Yo.bind(null,n,i);if(!t.pending.length)return o;const r={id:i,icons:t,callback:e,abort:o};return n.forEach(s=>{(s.loaderCallbacks||(s.loaderCallbacks=[])).push(r)}),o}function Ss(e,t=!0,n=!1){const i=[];return e.forEach(o=>{const r=typeof o=="string"?Cn(o,t,n):o;r&&i.push(r)}),i}var As={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Fs(e,t,n,i){const o=e.resources.length,r=e.random?Math.floor(Math.random()*o):e.index;let s;if(e.random){let A=e.resources.slice(0);for(s=[];A.length>1;){const G=Math.floor(Math.random()*A.length);s.push(A[G]),A=A.slice(0,G).concat(A.slice(G+1))}s=s.concat(A)}else s=e.resources.slice(r).concat(e.resources.slice(0,r));const l=Date.now();let a="pending",c=0,u,d=null,h=[],p=[];typeof i=="function"&&p.push(i);function v(){d&&(clearTimeout(d),d=null)}function f(){a==="pending"&&(a="aborted"),v(),h.forEach(A=>{A.status==="pending"&&(A.status="aborted")}),h=[]}function b(A,G){G&&(p=[]),typeof A=="function"&&p.push(A)}function k(){return{startTime:l,payload:t,status:a,queriesSent:c,queriesPending:h.length,subscribe:b,abort:f}}function M(){a="failed",p.forEach(A=>{A(void 0,u)})}function O(){h.forEach(A=>{A.status==="pending"&&(A.status="aborted")}),h=[]}function F(A,G,_){const m=G!=="success";switch(h=h.filter(g=>g!==A),a){case"pending":break;case"failed":if(m||!e.dataAfterTimeout)return;break;default:return}if(G==="abort"){u=_,M();return}if(m){u=_,h.length||(s.length?H():M());return}if(v(),O(),!e.random){const g=e.resources.indexOf(A.resource);g!==-1&&g!==e.index&&(e.index=g)}a="completed",p.forEach(g=>{g(_)})}function H(){if(a!=="pending")return;v();const A=s.shift();if(A===void 0){if(h.length){d=setTimeout(()=>{v(),a==="pending"&&(O(),M())},e.timeout);return}M();return}const G={status:"pending",resource:A,callback:(_,m)=>{F(G,_,m)}};h.push(G),c++,d=setTimeout(H,e.rotate),n(A,t,G.callback)}return setTimeout(H),k}function qo(e){const t={...As,...e};let n=[];function i(){n=n.filter(s=>s().status==="pending")}function o(s,l,a){const c=Fs(t,s,l,(u,d)=>{i(),a&&a(u,d)});return n.push(c),c}function r(s){return n.find(l=>s(l))||null}return{query:o,find:r,setIndex:s=>{t.index=s},getIndex:()=>t.index,cleanup:i}}function Hi(){}const Pn=Object.create(null);function Ts(e){if(!Pn[e]){const t=_i(e);if(!t)return;const n=qo(t),i={config:t,redundancy:n};Pn[e]=i}return Pn[e]}function Ds(e,t,n){let i,o;if(typeof e=="string"){const r=ei(e);if(!r)return n(void 0,424),Hi;o=r.send;const s=Ts(e);s&&(i=s.redundancy)}else{const r=Ei(e);if(r){i=qo(r);const s=e.resources?e.resources[0]:"",l=ei(s);l&&(o=l.send)}}return!i||!o?(n(void 0,424),Hi):i.query(t,o,n)().abort}const Ui="iconify2",De="iconify",Xo=De+"-count",Gi=De+"-version",Wo=36e5,Is=168;function ii(e,t){try{return e.getItem(t)}catch{}}function Ci(e,t,n){try{return e.setItem(t,n),!0}catch{}}function Yi(e,t){try{e.removeItem(t)}catch{}}function oi(e,t){return Ci(e,Xo,t.toString())}function ri(e){return parseInt(ii(e,Xo))||0}const An={local:!0,session:!0},Ko={local:new Set,session:new Set};let Si=!1;function Os(e){Si=e}let Le=typeof window>"u"?{}:window;function Zo(e){const t=e+"Storage";try{if(Le&&Le[t]&&typeof Le[t].length=="number")return Le[t]}catch{}An[e]=!1}function Qo(e,t){const n=Zo(e);if(!n)return;const i=ii(n,Gi);if(i!==Ui){if(i){const l=ri(n);for(let a=0;a<l;a++)Yi(n,De+a.toString())}Ci(n,Gi,Ui),oi(n,0);return}const o=Math.floor(Date.now()/Wo)-Is,r=l=>{const a=De+l.toString(),c=ii(n,a);if(typeof c=="string"){try{const u=JSON.parse(c);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>o&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&t(u,l))return!0}catch{}Yi(n,a)}};let s=ri(n);for(let l=s-1;l>=0;l--)r(l)||(l===s-1?(s--,oi(n,s)):Ko[e].add(l))}function Jo(){if(!Si){Os(!0);for(const e in An)Qo(e,t=>{const n=t.data,i=t.provider,o=n.prefix,r=Qt(i,o);if(!xi(r,n).length)return!1;const s=n.lastModified||-1;return r.lastModifiedCached=r.lastModifiedCached?Math.min(r.lastModifiedCached,s):s,!0})}}function Ms(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const i in An)Qo(i,o=>{const r=o.data;return o.provider!==e.provider||r.prefix!==e.prefix||r.lastModified===t});return!0}function Ps(e,t){Si||Jo();function n(i){let o;if(!An[i]||!(o=Zo(i)))return;const r=Ko[i];let s;if(r.size)r.delete(s=Array.from(r).shift());else if(s=ri(o),!oi(o,s+1))return;const l={cached:Math.floor(Date.now()/Wo),provider:e.provider,data:t};return Ci(o,De+s.toString(),JSON.stringify(l))}t.lastModified&&!Ms(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function qi(){}function Bs(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,ws(e)}))}function Rs(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:i}=e,o=e.iconsToLoad;delete e.iconsToLoad;let r;!o||!(r=ei(n))||r.prepare(n,i,o).forEach(s=>{Ds(n,s,l=>{if(typeof l!="object")s.icons.forEach(a=>{e.missing.add(a)});else try{const a=xi(e,l);if(!a.length)return;const c=e.pendingIcons;c&&a.forEach(u=>{c.delete(u)}),Ps(e,l)}catch(a){console.error(a)}Bs(e)})})}))}const js=(e,t)=>{const n=Ss(e,!0,zo()),i=Es(n);if(!i.pending.length){let a=!0;return t&&setTimeout(()=>{a&&t(i.loaded,i.missing,i.pending,qi)}),()=>{a=!1}}const o=Object.create(null),r=[];let s,l;return i.pending.forEach(a=>{const{provider:c,prefix:u}=a;if(u===l&&c===s)return;s=c,l=u,r.push(Qt(c,u));const d=o[c]||(o[c]=Object.create(null));d[u]||(d[u]=[])}),i.pending.forEach(a=>{const{provider:c,prefix:u,name:d}=a,h=Qt(c,u),p=h.pendingIcons||(h.pendingIcons=new Set);p.has(d)||(p.add(d),o[c][u].push(d))}),r.forEach(a=>{const{provider:c,prefix:u}=a;o[c][u].length&&Rs(a,o[c][u])}),t?Cs(t,i,r):qi};function Ns(e,t){const n={...e};for(const i in t){const o=t[i],r=typeof o;i in Ho?(o===null||o&&(r==="string"||r==="number"))&&(n[i]=o):r===typeof n[i]&&(n[i]=i==="rotate"?o%4:o)}return n}const Ls=/[\s,]+/;function Vs(e,t){t.split(Ls).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function $s(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function i(o){for(;o<0;)o+=4;return o%4}if(n===""){const o=parseInt(e);return isNaN(o)?0:i(o)}else if(n!==e){let o=0;switch(n){case"%":o=25;break;case"deg":o=90}if(o){let r=parseFloat(e.slice(0,e.length-n.length));return isNaN(r)?0:(r=r/o,r%1===0?i(r):0)}}return t}function zs(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)n+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function Hs(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Us(e){return"data:image/svg+xml,"+Hs(e)}function Gs(e){return'url("'+Us(e)+'")'}const Xi={...Uo,inline:!1},Ys={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},qs={display:"inline-block"},si={backgroundColor:"currentColor"},tr={backgroundColor:"transparent"},Wi={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Ki={webkitMask:si,mask:si,background:tr};for(const e in Ki){const t=Ki[e];for(const n in Wi)t[e+n]=Wi[n]}const Xe={};["horizontal","vertical"].forEach(e=>{const t=e.slice(0,1)+"Flip";Xe[e+"-flip"]=t,Xe[e.slice(0,1)+"-flip"]=t,Xe[e+"Flip"]=t});function Zi(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const Qi=(e,t)=>{const n=Ns(Xi,t),i={...Ys},o=t.mode||"svg",r={},s=t.style,l=typeof s=="object"&&!(s instanceof Array)?s:{};for(let f in t){const b=t[f];if(b!==void 0)switch(f){case"icon":case"style":case"onLoad":case"mode":break;case"inline":case"hFlip":case"vFlip":n[f]=b===!0||b==="true"||b===1;break;case"flip":typeof b=="string"&&Vs(n,b);break;case"color":r.color=b;break;case"rotate":typeof b=="string"?n[f]=$s(b):typeof b=="number"&&(n[f]=b);break;case"ariaHidden":case"aria-hidden":b!==!0&&b!=="true"&&delete i["aria-hidden"];break;default:{const k=Xe[f];k?(b===!0||b==="true"||b===1)&&(n[k]=!0):Xi[f]===void 0&&(i[f]=b)}}}const a=us(e,n),c=a.attributes;if(n.inline&&(r.verticalAlign="-0.125em"),o==="svg"){i.style={...r,...l},Object.assign(i,c);let f=0,b=t.id;return typeof b=="string"&&(b=b.replace(/-/g,"_")),i.innerHTML=ps(a.body,b?()=>b+"ID"+f++:"iconifyVue"),Ri("svg",i)}const{body:u,width:d,height:h}=e,p=o==="mask"||(o==="bg"?!1:u.indexOf("currentColor")!==-1),v=zs(u,{...c,width:d+"",height:h+""});return i.style={...r,"--svg":Gs(v),width:Zi(c.width),height:Zi(c.height),...qs,...p?si:tr,...l},Ri("span",i)};zo(!0);fs("",xs);if(typeof document<"u"&&typeof window<"u"){Jo();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(i=>{try{(typeof i!="object"||i===null||i instanceof Array||typeof i.icons!="object"||typeof i.prefix!="string"||!rs(i))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const i="IconifyProviders["+n+"] is invalid.";try{const o=t[n];if(typeof o!="object"||!o||o.resources===void 0)continue;Go(n,o)||console.error(i)}catch{console.error(i)}}}}const Xs={...Sn,body:""},Bn=yt({inheritAttrs:!1,data(){return{iconMounted:!1,counter:0}},mounted(){this._name="",this._loadingIcon=null,this.iconMounted=!0},unmounted(){this.abortLoading()},methods:{abortLoading(){this._loadingIcon&&(this._loadingIcon.abort(),this._loadingIcon=null)},getIcon(e,t){if(typeof e=="object"&&e!==null&&typeof e.body=="string")return this._name="",this.abortLoading(),{data:e};let n;if(typeof e!="string"||(n=Cn(e,!1,!0))===null)return this.abortLoading(),null;const i=is(n);if(!i)return(!this._loadingIcon||this._loadingIcon.name!==e)&&(this.abortLoading(),this._name="",i!==null&&(this._loadingIcon={name:e,abort:js([n],()=>{this.counter++})})),null;this.abortLoading(),this._name!==e&&(this._name=e,t&&t(e));const o=["iconify"];return n.prefix!==""&&o.push("iconify--"+n.prefix),n.provider!==""&&o.push("iconify--"+n.provider),{data:i,classes:o}}},render(){this.counter;const e=this.$attrs,t=this.iconMounted?this.getIcon(e.icon,e.onLoad):null;if(!t)return Qi(Xs,e);let n=e;return t.classes&&(n={...e,class:(typeof e.class=="string"?e.class+" ":"")+t.classes.join(" ")}),Qi({...Sn,...t.data},n)}});Go("",{resources:["https://icons.ui.kvass.no"]});function Ws(e){return!e||typeof e!="object"?!1:typeof e.then=="function"&&typeof e.catch=="function"}const Ks=["xxs","xs","sm","default","lg","xl","xxl","3xl","4xl"],Zs=(e,t)=>t==="default"?`var(--k-ui-${e})`:`var(--k-ui-${e}-${t})`,Ji=e=>{switch(e){case"start":case"end":return`flex-${e}`;default:return e}},Qs=(e,t="spacing")=>e.split(" ").map(n=>typeof n=="number"||typeof n=="string"&&n.match(/^\d+$/)?`${n}rem`:typeof n=="string"&&Ks.includes(n)?Zs(t,n):n).join(" ");function Js(){var e=new Date().getTime(),t=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var i=Math.random()*16;return e>0?(i=(e+i)%16|0,e=Math.floor(e/16)):(i=(t+i)%16|0,t=Math.floor(t/16)),(n==="x"?i:i&3|8).toString(16)})}const ta=(e,t)=>Object.fromEntries(Object.entries(t).map(([n,i])=>[`--k-${e}-${n}`,i])),er=yt({__name:"Spinner",props:{size:{default:"medium"}},setup(e){return(t,n)=>(z(),ot("span",{class:on(`k-spinner k-spinner--size-${t.size}`)},null,2))}}),ea={class:"k-button__content"},na={key:0,class:"k-button__icon k-button__icon--left"},ia={key:1,class:"k-button__icon k-button__icon--right"},oa={key:2,class:"k-button__confirm-label"},Ie=yt({__name:"Button",props:{variant:{default:"secondary"},size:{default:"medium"},loading:{type:Boolean},promise:{},confirm:{type:Boolean},is:{type:[String,Object,Function],default:"button"},stateTimeout:{default:1e3},confirmLabel:{default:"Are you sure?"},label:{},icon:{},iconLeft:{},iconRight:{}},emits:["idle","loading","success","error","confirm","click"],setup(e,{emit:t}){const n=e,i={success:"success",confirm:"warning",error:"danger",loading:null,idle:null},o=lt(()=>!d.value||a.value==="loading"?n.variant:a.value=="confirm"?"warning":i[a.value]||n.variant),r=lt(()=>n.loading||a.value==="loading"),s=dt(),l=lt(()=>{if(a.value)return["error","success"].includes(a.value)||r.value}),a=dt("idle"),c=dt(),u=dt(),d=lt(()=>a.value||r.value),h=lt(()=>["error","success"].includes(a.value)),p=lt(()=>a.value==="success"?"fa-pro-regular:check":"fa-pro-regular:exclamation-circle");function v(F){if(!F)return;f(),u.value=F,s.value=setTimeout(()=>a.value="loading",100);let H=A=>{f(),n.stateTimeout?(a.value=A,c.value=setTimeout(()=>{f(),t(A)},n.stateTimeout)):t(A)};u.value.then(()=>H("success")).catch(()=>H("error"))}function f(){s.value&&clearTimeout(s.value),c.value&&clearTimeout(c.value),u.value=null,a.value="idle"}bi(()=>n.promise,F=>{F&&Ws(F)&&v(F)});const b=dt(),k=lt(()=>a.value==="confirm");function M(F){if(n.confirm&&a.value!=="confirm")return a.value="confirm";f(),t("click",F)}const O=Kr("k-button",{variants:{variant:{primary:"k-button--variant-primary",secondary:"k-button--variant-secondary",tertiary:"k-button--variant-tertiary",danger:"k-button--variant-danger",warning:"k-button--variant-warning",success:"k-button--variant-success"},size:{small:"k-button--size-small",medium:"k-button--size-medium",large:"k-button--size-large"},isLoading:{true:"k-button--loading"},isBusy:{true:"k-button--busy"}}});return(F,H)=>(z(),pt(En(F.is),At({type:"button",class:je(O)({variant:o.value,size:F.size,isLoading:r.value,isBusy:l.value}),"aria-busy":l.value,inert:l.value},F.$attrs,{onClick:M,ref_key:"rootElement",ref:b}),{default:_t(()=>[Ro(Wt("span",ea,[F.icon||F.iconLeft||F.$slots.icon||F.$slots["icon-left"]?(z(),ot("span",na,[Z(F.$slots,"icon-left",{},()=>[Z(F.$slots,"icon",{},()=>[ce(je(Bn),{icon:F.icon||F.iconLeft},null,8,["icon"])])])])):et("",!0),Z(F.$slots,"default",{},()=>[yi(Vt(F.label),1)]),F.iconRight||F.$slots["icon-right"]?(z(),ot("span",ia,[Z(F.$slots,"icon-right",{},()=>[ce(je(Bn),{icon:F.iconRight},null,8,["icon"])])])):et("",!0)],512),[[jo,!k.value]]),r.value?(z(),pt(er,{key:0})):et("",!0),h.value?(z(),pt(je(Bn),{key:1,class:"k-button__state-indicator",icon:p.value},null,8,["icon"])):et("",!0),k.value?(z(),ot("span",oa,Vt(F.confirmLabel),1)):et("",!0)]),_:3},16,["class","aria-busy","inert"]))}});var $t=(e,t=[])=>({parts:(...n)=>{if(ra(t))return $t(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>$t(e,[...t,...n]),rename:n=>$t(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,i)=>Object.assign(n,{[i]:{selector:[`&[data-scope="${ne(e)}"][data-part="${ne(i)}"]`,`& [data-scope="${ne(e)}"][data-part="${ne(i)}"]`].join(", "),attrs:{"data-scope":ne(e),"data-part":ne(i)}}}),{})}),ne=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),ra=e=>e.length===0;function sn(e){return typeof e=="object"&&e?.nodeType===Node.ELEMENT_NODE&&typeof e?.nodeName=="string"}function an(e,t){return!e||!t||!sn(e)||!sn(t)?!1:e===t||e.contains(t)}var sa=e=>e.nodeType===Node.DOCUMENT_NODE?e:e.ownerDocument??document;function Me(e){const t={getRootNode:n=>{var i;return((i=n.getRootNode)==null?void 0:i.call(n))??document},getDoc:n=>sa(t.getRootNode(n)),getWin:n=>t.getDoc(n).defaultView??window,getActiveElement:n=>t.getDoc(n).activeElement,getById:(n,i)=>t.getRootNode(n).getElementById(i),setValue:(n,i)=>{n==null||i==null||(n.value=i.toString())}};return{...t,...e}}var aa=e=>e.nodeType===Node.DOCUMENT_NODE;function Ai(e){return aa(e)?e:e?.ownerDocument??document}function la(e){return e?.ownerDocument.defaultView??window}function ln(e){var t;return((t=e.composedPath)==null?void 0:t.call(e)[0])??e.target}var nr=()=>typeof document<"u";function ua(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var ir=e=>nr()&&e.test(ua()),ca=()=>nr()&&!!navigator.maxTouchPoints,da=()=>ir(/^Mac/)&&!ca(),ha=()=>ir(/mac|iphone|ipad|ipod/i),pa=()=>ha()&&!da();function or(e,t){return Array.from(e?.querySelectorAll(t)??[])}function fa(e){const t=new Set;function n(i){const o=globalThis.requestAnimationFrame(i);t.add(()=>globalThis.cancelAnimationFrame(o))}return n(()=>n(e)),function(){t.forEach(i=>i())}}function Oe(e){const t=globalThis.requestAnimationFrame(e);return()=>{globalThis.cancelAnimationFrame(t)}}const ga=Symbol(),to=Object.getPrototypeOf,ai=new WeakMap,ma=e=>e&&(ai.has(e)?ai.get(e):to(e)===Object.prototype||to(e)===Array.prototype),va=e=>ma(e)&&e[ga]||null,eo=(e,t=!0)=>{ai.set(e,t)};var Rn=e=>typeof e=="object"&&e!==null,qt=new WeakMap,me=new WeakSet,ba=(e=Object.is,t=(c,u)=>new Proxy(c,u),n=c=>Rn(c)&&!me.has(c)&&(Array.isArray(c)||!(Symbol.iterator in c))&&!(c instanceof WeakMap)&&!(c instanceof WeakSet)&&!(c instanceof Error)&&!(c instanceof Number)&&!(c instanceof Date)&&!(c instanceof String)&&!(c instanceof RegExp)&&!(c instanceof ArrayBuffer),i=c=>{switch(c.status){case"fulfilled":return c.value;case"rejected":throw c.reason;default:throw c}},o=new WeakMap,r=(c,u,d=i)=>{const h=o.get(c);if(h?.[0]===u)return h[1];const p=Array.isArray(c)?[]:Object.create(Object.getPrototypeOf(c));return eo(p,!0),o.set(c,[u,p]),Reflect.ownKeys(c).forEach(v=>{const f=Reflect.get(c,v);me.has(f)?(eo(f,!1),p[v]=f):f instanceof Promise?Object.defineProperty(p,v,{get(){return d(f)}}):qt.has(f)?p[v]=he(f,d):p[v]=f}),Object.freeze(p)},s=new WeakMap,l=[1,1],a=c=>{if(!Rn(c))throw new Error("object required");const u=s.get(c);if(u)return u;let d=l[0];const h=new Set,p=(_,m=++l[0])=>{d!==m&&(d=m,h.forEach(g=>g(_,m)))};let v=l[1];const f=(_=++l[1])=>(v!==_&&!h.size&&(v=_,k.forEach(([m])=>{const g=m[1](_);g>d&&(d=g)})),d),b=_=>(m,g)=>{const E=[...m];E[1]=[_,...E[1]],p(E,g)},k=new Map,M=(_,m)=>{if(h.size){const g=m[3](b(_));k.set(_,[m,g])}else k.set(_,[m])},O=_=>{var m;const g=k.get(_);g&&(k.delete(_),(m=g[1])==null||m.call(g))},F=_=>(h.add(_),h.size===1&&k.forEach(([m,g],E)=>{const I=m[3](b(E));k.set(E,[m,I])}),()=>{h.delete(_),h.size===0&&k.forEach(([m,g],E)=>{g&&(g(),k.set(E,[m]))})}),H=Array.isArray(c)?[]:Object.create(Object.getPrototypeOf(c)),A=t(H,{deleteProperty(_,m){const g=Reflect.get(_,m);O(m);const E=Reflect.deleteProperty(_,m);return E&&p(["delete",[m],g]),E},set(_,m,g,E){var I;const P=Reflect.has(_,m),B=Reflect.get(_,m,E);if(P&&(e(B,g)||s.has(g)&&e(B,s.get(g))))return!0;O(m),Rn(g)&&(g=va(g)||g);let R=g;if(!((I=Object.getOwnPropertyDescriptor(_,m))!=null&&I.set))if(g instanceof Promise)g.then(N=>{g.status="fulfilled",g.value=N,p(["resolve",[m],N])}).catch(N=>{g.status="rejected",g.reason=N,p(["reject",[m],N])});else{!qt.has(g)&&n(g)&&(R=Fi(g));const N=!me.has(R)&&qt.get(R);N&&M(m,N)}return Reflect.set(_,m,R,E),p(["set",[m],g,B]),!0}});s.set(c,A);const G=[H,f,r,F];return qt.set(A,G),Reflect.ownKeys(c).forEach(_=>{const m=Object.getOwnPropertyDescriptor(c,_);m.get||m.set?Object.defineProperty(H,_,m):A[_]=c[_]}),A})=>[a,qt,me,e,t,n,i,o,r,s,l],[ya]=ba();function Fi(e={}){return ya(e)}function li(e,t,n){const i=qt.get(e);let o;const r=[],s=i[3];let l=!1;const a=s(c=>{if(r.push(c),n){t(r.splice(0));return}o||(o=Promise.resolve().then(()=>{o=void 0,l&&t(r.splice(0))}))});return l=!0,()=>{l=!1,a()}}function he(e,t){const n=qt.get(e),[i,o,r]=n;return r(i,o(),t)}function no(e){return me.add(e),e}function ka(e,t){Object.keys(t).forEach(i=>{if(Object.getOwnPropertyDescriptor(e,i))throw new Error("object property already defined");const o=t[i],{get:r,set:s}=typeof o=="function"?{get:o}:o,l={};l.get=()=>r(he(n)),s&&(l.set=a=>s(n,a)),Object.defineProperty(e,i,l)});const n=Fi(e);return n}var xa=(e,t)=>Object.is(e,t);function io(e,t,n,i,o){let r=Reflect.get(he(e),t);const s=o||xa;function l(){const a=he(e);s(r,a[t])||(n(a[t]),r=Reflect.get(a,t))}return li(e,l,i)}function oo(e,t,n){typeof n.value=="object"&&(n.value=le(n.value)),!n.enumerable||n.get||n.set||!n.configurable||!n.writable||t==="__proto__"?Object.defineProperty(e,t,n):e[t]=n.value}function le(e){if(typeof e!="object")return e;var t=0,n,i,o,r=Object.prototype.toString.call(e);if(r==="[object Object]"?o=Object.create(e.__proto__||null):r==="[object Array]"?o=Array(e.length):r==="[object Set]"?(o=new Set,e.forEach(function(s){o.add(le(s))})):r==="[object Map]"?(o=new Map,e.forEach(function(s,l){o.set(le(l),le(s))})):r==="[object Date]"?o=new Date(+e):r==="[object RegExp]"?o=new RegExp(e.source,e.flags):r==="[object DataView]"?o=new e.constructor(le(e.buffer)):r==="[object ArrayBuffer]"?o=e.slice(0):r.slice(-6)==="Array]"&&(o=new e.constructor(e)),o){for(i=Object.getOwnPropertySymbols(e);t<i.length;t++)oo(o,i[t],Object.getOwnPropertyDescriptor(e,i[t]));for(t=0,i=Object.getOwnPropertyNames(e);t<i.length;t++)Object.hasOwnProperty.call(o,n=i[t])&&o[n]===e[n]||oo(o,n,Object.getOwnPropertyDescriptor(e,n))}return o||e}var Ea=Object.defineProperty,wa=(e,t,n)=>t in e?Ea(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,x=(e,t,n)=>(wa(e,typeof t!="symbol"?t+"":t,n),n);function _a(e){for(;e.length>0;)e.pop();return e}var ro=(e,...t)=>(typeof e=="function"?e(...t):e)??void 0,Ft=e=>e,jn=()=>{},Ca=(()=>{let e=0;return()=>(e++,e.toString(36))})(),xe=e=>Array.isArray(e),Ee=e=>!(e==null||typeof e!="object"||xe(e)),Sa=e=>typeof e=="number"&&!Number.isNaN(e),Tt=e=>typeof e=="string",ui=e=>typeof e=="function";function un(e){if(!Aa(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(i=>typeof i=="string"),n={};for(const i of t){const o=e[i];o!==void 0&&(n[i]=un(o))}return n}var Aa=e=>e&&typeof e=="object"&&e.constructor===Object;function Nn(...e){const t=e.length===1?e[0]:e[1];e.length!==2||e[0]}function We(...e){const t=e.length===1?e[0]:e[1];e.length!==2||e[0]}function rr(e,...t){for(const n of t){const i=un(n);for(const o in i)Ee(n[o])?(e[o]||(e[o]={}),rr(e[o],n[o])):e[o]=n[o]}return e}function so(e){return le(e)}function rt(e){return Tt(e)?{type:e}:e}function Rt(e){return e?xe(e)?e.slice():[e]:[]}function sr(e){return Ee(e)&&e.predicate!=null}var Fa=()=>!0;function ar(e,t){return e=e??Fa,(n,i,o)=>{if(Tt(e)){const r=t[e];return ui(r)?r(n,i,o):r}return sr(e)?e.predicate(t)(n,i,o):e?.(n,i,o)}}function Ln(e,t){return(n,i,o)=>sr(e)?e.predicate(t)(n,i,o):e}function Ta(e){const t=e.computed??Ft({}),n=e.context??Ft({}),i=Fi({value:e.initial??"",previousValue:"",event:Ft({}),previousEvent:Ft({}),context:ka(n,t),done:!1,tags:[],hasTag(o){return this.tags.includes(o)},matches(...o){return o.includes(this.value)},can(o){return Ft(this).nextEvents.includes(o)},get nextEvents(){var o,r;const s=((r=(o=e.states)==null?void 0:o[this.value])==null?void 0:r.on)??{},l=e?.on??{};return Object.keys({...s,...l})},get changed(){return this.event.value==="machine.init"||!this.previousValue?!1:this.value!==this.previousValue}});return Ft(i)}function Ve(e,t){return(n,i)=>{if(Sa(e))return e;if(ui(e))return e(n,i);if(Tt(e)){const o=Number.parseFloat(e);if(!Number.isNaN(o))return o;if(t){const r=t?.[e];return We(r==null,`[@zag-js/core > determine-delay] Cannot determine delay for \`${e}\`. It doesn't exist in \`options.delays\``),ui(r)?r(n,i):r}}}}function Da(e){return Tt(e)?{target:e}:e}function Ia(e,t){return(n,i,o)=>Rt(e).map(Da).find(r=>ar(r.guard,t)(n,i,o)??r.target??r.actions)}var Oa=class lr{constructor(t,n){var i,o,r,s,l,a;x(this,"status","Not Started"),x(this,"state"),x(this,"initialState"),x(this,"initialContext"),x(this,"id"),x(this,"type","machine"),x(this,"activityEvents",new Map),x(this,"delayedEvents",new Map),x(this,"stateListeners",new Set),x(this,"contextListeners",new Set),x(this,"eventListeners",new Set),x(this,"doneListeners",new Set),x(this,"contextWatchers",new Set),x(this,"removeStateListener",jn),x(this,"removeEventListener",jn),x(this,"removeContextListener",jn),x(this,"parent"),x(this,"children",new Map),x(this,"guardMap"),x(this,"actionMap"),x(this,"delayMap"),x(this,"activityMap"),x(this,"sync"),x(this,"options"),x(this,"config"),x(this,"start",u=>{if(this.state.value="",this.status==="Running")return this;this.status="Running",this.removeStateListener=li(this.state,()=>{this.stateListeners.forEach(b=>{b(this.stateSnapshot)})},this.sync),this.removeEventListener=io(this.state,"event",b=>{this.executeActions(this.config.onEvent,b),this.eventListeners.forEach(k=>{k(b)})},this.sync),this.removeContextListener=li(this.state.context,()=>{this.log("Context:",this.contextSnapshot),this.contextListeners.forEach(b=>{b(this.contextSnapshot)})},this.sync||this.options.debug),this.setupContextWatchers(),this.executeActivities(rt("machine.start"),Rt(this.config.activities),"machine.start"),this.executeActions(this.config.entry,rt("machine.start"));const d=rt("machine.init"),h=Ee(u)?u.value:u,p=Ee(u)?u.context:void 0;p&&this.setContext(p);const v={target:h??this.config.initial},f=this.getNextStateInfo(v,d);return this.initialState=f,this.performStateChangeEffects(this.state.value,f,d),this}),x(this,"setupContextWatchers",()=>{var u;for(const[d,h]of Object.entries(this.config.watch??{})){const p=(u=this.options.compareFns)==null?void 0:u[d],v=io(this.state.context,d,()=>{this.executeActions(h,this.state.event)},this.sync,p);this.contextWatchers.add(v)}}),x(this,"stop",()=>{if(this.status!=="Stopped")return this.performExitEffects(this.state.value,rt("machine.stop")),this.executeActions(this.config.exit,rt("machine.stop")),this.setState(""),this.setEvent("machine.stop"),this.stopStateListeners(),this.stopChildren(),this.stopActivities(),this.stopDelayedEvents(),this.stopContextWatchers(),this.stopEventListeners(),this.stopContextListeners(),this.status="Stopped",this}),x(this,"stopEventListeners",()=>{this.eventListeners.clear(),this.removeEventListener()}),x(this,"stopContextListeners",()=>{this.contextListeners.clear(),this.removeContextListener()}),x(this,"stopStateListeners",()=>{this.removeStateListener(),this.stateListeners.clear()}),x(this,"stopContextWatchers",()=>{this.contextWatchers.forEach(u=>u()),this.contextWatchers.clear()}),x(this,"stopDelayedEvents",()=>{this.delayedEvents.forEach(u=>{u.forEach(d=>d())}),this.delayedEvents.clear()}),x(this,"stopActivities",u=>{var d,h;u?((d=this.activityEvents.get(u))==null||d.forEach(p=>p()),(h=this.activityEvents.get(u))==null||h.clear(),this.activityEvents.delete(u)):(this.activityEvents.forEach(p=>{p.forEach(v=>v()),p.clear()}),this.activityEvents.clear())}),x(this,"sendChild",(u,d)=>{const h=rt(u),p=ro(d,this.contextSnapshot),v=this.children.get(p);v||We(`[@zag-js/core] Cannot send '${h.type}' event to unknown child`),v.send(h)}),x(this,"stopChild",u=>{this.children.has(u)||We(`[@zag-js/core > stop-child] Cannot stop unknown child ${u}`),this.children.get(u).stop(),this.children.delete(u)}),x(this,"removeChild",u=>{this.children.delete(u)}),x(this,"stopChildren",()=>{this.children.forEach(u=>u.stop()),this.children.clear()}),x(this,"setParent",u=>{this.parent=u}),x(this,"spawn",(u,d)=>{const h=ro(u);return d&&(h.id=d),h.type="machine.actor",h.setParent(this),this.children.set(h.id,Ft(h)),h.onDone(()=>{this.removeChild(h.id)}).start(),Ft(no(h))}),x(this,"addActivityCleanup",(u,d)=>{var h;u&&(this.activityEvents.has(u)?(h=this.activityEvents.get(u))==null||h.add(d):this.activityEvents.set(u,new Set([d])))}),x(this,"setState",u=>{this.state.previousValue=this.state.value,this.state.value=u;const d=this.getStateNode(u);u==null?_a(this.state.tags):this.state.tags=Rt(d?.tags)}),x(this,"transformContext",u=>{var d,h;return(h=(d=this.options)==null?void 0:d.transformContext)==null||h.call(d,u),u}),x(this,"setContext",u=>{u&&rr(this.state.context,this.transformContext(u))}),x(this,"withContext",u=>{const d=this.transformContext(u),h={...this.config.context,...un(d)};return new lr({...this.config,context:h},this.options)}),x(this,"setOptions",u=>{const d=un(u);this.actionMap={...this.actionMap,...d.actions},this.delayMap={...this.delayMap,...d.delays},this.activityMap={...this.activityMap,...d.activities},this.guardMap={...this.guardMap,...d.guards}}),x(this,"getStateNode",u=>{var d;if(u)return(d=this.config.states)==null?void 0:d[u]}),x(this,"getNextStateInfo",(u,d)=>{const h=this.determineTransition(u,d),p=!(h!=null&&h.target),v=h?.target??this.state.value,f=this.state.value!==v,b=this.getStateNode(v),k={reenter:!p&&!f&&!(h!=null&&h.internal),transition:h,stateNode:b,target:v,changed:f};return this.log("NextState:",`[${d.type}]`,this.state.value,"---->",k.target),k}),x(this,"getActionFromDelayedTransition",u=>{const d=rt("machine.after"),h=Ve(u.delay,this.delayMap)(this.contextSnapshot,d);let p;return{entry:()=>{p=globalThis.setTimeout(()=>{const v=this.getNextStateInfo(u,d);this.performStateChangeEffects(this.state.value,v,d)},h)},exit:()=>{globalThis.clearTimeout(p)}}}),x(this,"getDelayedEventActions",u=>{const d=this.getStateNode(u),h=rt("machine.after");if(!d||!d.after)return;const p=[],v=[];if(xe(d.after)){const f=this.determineTransition(d.after,h);if(!f)return;const b=this.getActionFromDelayedTransition(f);p.push(b.entry),v.push(b.exit)}else if(Ee(d.after))for(const f in d.after){const b=d.after[f];let k={};if(xe(b)){const O=this.determineTransition(b,h);O&&(k=O)}else Tt(b)?k={target:b,delay:f}:k={...b,delay:f};const M=this.getActionFromDelayedTransition(k);p.push(M.entry),v.push(M.exit)}return{entries:p,exits:v}}),x(this,"executeActions",(u,d)=>{var h;const p=Ln(u,this.guardMap)(this.contextSnapshot,d,this.guardMeta);for(const v of Rt(p)){const f=Tt(v)?(h=this.actionMap)==null?void 0:h[v]:v;Nn(Tt(v)&&!f,`[@zag-js/core > execute-actions] No implementation found for action: \`${v}\``),f?.(this.state.context,d,this.meta)}}),x(this,"executeActivities",(u,d,h)=>{var p;for(const v of d){const f=Tt(v)?(p=this.activityMap)==null?void 0:p[v]:v;if(!f){Nn(`[@zag-js/core > execute-activity] No implementation found for activity: \`${v}\``);continue}const b=f(this.state.context,u,this.meta);b&&this.addActivityCleanup(h??this.state.value,b)}}),x(this,"createEveryActivities",(u,d)=>{if(!u)return;const h=rt("machine.every");if(xe(u)){const p=Rt(u).find(f=>{const b=f.delay,k=Ve(b,this.delayMap)(this.contextSnapshot,h);return ar(f.guard,this.guardMap)(this.contextSnapshot,h,this.guardMeta)??k!=null});if(!p)return;const v=Ve(p.delay,this.delayMap)(this.contextSnapshot,h);d(()=>{const f=globalThis.setInterval(()=>{this.executeActions(p.actions,h)},v);return()=>{globalThis.clearInterval(f)}})}else for(const p in u){const v=u?.[p],f=Ve(p,this.delayMap)(this.contextSnapshot,h);d(()=>{const b=globalThis.setInterval(()=>{this.executeActions(v,h)},f);return()=>{globalThis.clearInterval(b)}})}}),x(this,"setEvent",u=>{this.state.previousEvent=this.state.event,this.state.event=no(rt(u))}),x(this,"performExitEffects",(u,d)=>{const h=this.state.value;if(h==="")return;const p=u?this.getStateNode(u):void 0;this.stopActivities(h);const v=Ln(p?.exit,this.guardMap)(this.contextSnapshot,d,this.guardMeta),f=Rt(v),b=this.delayedEvents.get(h);b&&f.push(...b),this.executeActions(f,d),this.eventListeners.clear()}),x(this,"performEntryEffects",(u,d)=>{const h=this.getStateNode(u),p=Rt(h?.activities);this.createEveryActivities(h?.every,k=>{p.unshift(k)}),p.length>0&&this.executeActivities(d,p);const v=Ln(h?.entry,this.guardMap)(this.contextSnapshot,d,this.guardMeta),f=Rt(v),b=this.getDelayedEventActions(u);h!=null&&h.after&&b&&(this.delayedEvents.set(u,b?.exits),f.push(...b.entries)),this.executeActions(f,d),h?.type==="final"&&(this.state.done=!0,this.doneListeners.forEach(k=>{k(this.stateSnapshot)}),this.stop())}),x(this,"performTransitionEffects",(u,d)=>{const h=this.determineTransition(u,d);this.executeActions(h?.actions,d)}),x(this,"performStateChangeEffects",(u,d,h)=>{this.setEvent(h);const p=d.changed||d.reenter;p&&this.performExitEffects(u,h),this.performTransitionEffects(d.transition,h),this.setState(d.target),p&&this.performEntryEffects(d.target,h)}),x(this,"determineTransition",(u,d)=>{const h=Ia(u,this.guardMap);return h?.(this.contextSnapshot,d,this.guardMeta)}),x(this,"sendParent",u=>{var d;this.parent||We("[@zag-js/core > send-parent] Cannot send event to an unknown parent");const h=rt(u);(d=this.parent)==null||d.send(h)}),x(this,"log",(...u)=>{}),x(this,"send",u=>{const d=rt(u);this.transition(this.state.value,d)}),x(this,"transition",(u,d)=>{var h,p;const v=Tt(u)?this.getStateNode(u):u?.stateNode,f=rt(d);if(!v&&!this.config.on){const M=this.status==="Stopped"?"[@zag-js/core > transition] Cannot transition a stopped machine":`[@zag-js/core > transition] State does not have a definition for \`state\`: ${u}, \`event\`: ${f.type}`;Nn(M);return}const b=((h=v?.on)==null?void 0:h[f.type])??((p=this.config.on)==null?void 0:p[f.type]),k=this.getNextStateInfo(b,f);return this.performStateChangeEffects(this.state.value,k,f),k.stateNode}),x(this,"subscribe",u=>(this.stateListeners.add(u),this.status==="Running"&&u(this.stateSnapshot),()=>{this.stateListeners.delete(u)})),x(this,"onDone",u=>(this.doneListeners.add(u),this)),x(this,"onTransition",u=>(this.stateListeners.add(u),this.status==="Running"&&u(this.stateSnapshot),this)),x(this,"onChange",u=>(this.contextListeners.add(u),this)),x(this,"onEvent",u=>(this.eventListeners.add(u),this)),this.config=so(t),this.options=so(n??{}),this.id=this.config.id??`machine-${Ca()}`,this.guardMap=((i=this.options)==null?void 0:i.guards)??{},this.actionMap=((o=this.options)==null?void 0:o.actions)??{},this.delayMap=((r=this.options)==null?void 0:r.delays)??{},this.activityMap=((s=this.options)==null?void 0:s.activities)??{},this.sync=((l=this.options)==null?void 0:l.sync)??!1,this.state=Ta(this.config),this.initialContext=he(this.state.context),this.transformContext(this.state.context);const c=rt("machine.created");this.executeActions((a=this.config)==null?void 0:a.created,c)}get stateSnapshot(){return Ft(he(this.state))}getState(){return this.stateSnapshot}get contextSnapshot(){return this.stateSnapshot.context}get self(){const t=this;return{id:this.id,send:this.send.bind(this),sendParent:this.sendParent.bind(this),sendChild:this.sendChild.bind(this),stop:this.stop.bind(this),stopChild:this.stopChild.bind(this),spawn:this.spawn.bind(this),get state(){return t.stateSnapshot},get initialContext(){return t.initialContext},get initialState(){var n;return((n=t.initialState)==null?void 0:n.target)??""}}}get meta(){var t;return{state:this.stateSnapshot,guards:this.guardMap,send:this.send.bind(this),self:this.self,initialContext:this.initialContext,initialState:((t=this.initialState)==null?void 0:t.target)??"",getState:()=>this.stateSnapshot,getAction:n=>this.actionMap[n],getGuard:n=>this.guardMap[n]}}get guardMeta(){return{state:this.stateSnapshot}}get[Symbol.toStringTag](){return"Machine"}},Ma=(e,t)=>new Oa(e,t),ur=e=>e.ownerDocument.defaultView||window;function Pa(e,t){const{type:n="HTMLInputElement",property:i="value"}=t,o=ur(e)[n].prototype;return Object.getOwnPropertyDescriptor(o,i)??{}}function Ba(e,t,n={}){var i;(i=Pa(e,n).set)==null||i.call(e,t)}function cr(e,t){const{value:n,bubbles:i=!0}=t;if(!e)return;const o=ur(e);e instanceof o.HTMLInputElement&&(Ba(e,`${n}`),e.dispatchEvent(new o.Event("input",{bubbles:i})))}var ao=(e,...t)=>(typeof e=="function"?e(...t):e)??void 0,lo=(...e)=>(...t)=>{e.forEach(function(n){n?.(...t)})};function dr(e){if(!Ra(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(i=>typeof i=="string"),n={};for(const i of t){const o=e[i];o!==void 0&&(n[i]=dr(o))}return n}var Ra=e=>e&&typeof e=="object"&&e.constructor===Object;function ja(...e){const t=e.length===1?e[0]:e[1];e.length!==2||e[0]}var Na=$t("checkbox").parts("root","label","control");Na.build();var $e=Me({getRootId:e=>{var t;return((t=e.ids)==null?void 0:t.root)??`checkbox:${e.id}`},getLabelId:e=>{var t;return((t=e.ids)==null?void 0:t.label)??`checkbox:${e.id}:label`},getControlId:e=>{var t;return((t=e.ids)==null?void 0:t.control)??`checkbox:${e.id}:control`},getHiddenInputId:e=>{var t;return((t=e.ids)==null?void 0:t.hiddenInput)??`checkbox:${e.id}:hidden`},getRootEl:e=>$e.getById(e,$e.getRootId(e)),getHiddenInputEl:e=>$e.getById(e,$e.getHiddenInputId(e))});function La(e){return new Proxy({},{get(){return e}})}function Va(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}var uo={htmlFor:"for",className:"class",onDoubleClick:"onDblclick",onChange:"onInput",onFocus:"onFocusin",onBlur:"onFocusout",defaultValue:"value",defaultChecked:"checked"};function $a(e){return e in uo?uo[e]:e.startsWith("on")?`on${Va(e.substr(2))}`:e.toLowerCase()}var za=La(e=>{const t={};for(const n in e){const i=e[n];n==="children"?typeof i=="string"&&(t.innerHTML=i):t[$a(n)]=e[n]}return t});function Ha(e,t){const{actions:n,state:i,context:o}=t??{},r=typeof e=="function"?e():e,s=o?r.withContext(o.value):r;return wn(()=>{s.start(i),s.state.can("SETUP")&&s.send("SETUP"),ki(()=>{s.stop()})}),qr(()=>{s.setOptions({actions:n})}),o&&bi(o,s.setContext,{deep:!0}),s}function Ua(e,t){const n=Ha(e,t),i=Ur(n.state);return wn(()=>{const o=n.subscribe(r=>{i.value=r});ki(()=>{o?.()})}),[i,n.send,n]}function Ga(e={}){const{prefix:t}=e,n=Js();return t?`${t}-${n}`:n}function zt(e){return typeof e=="string"||e instanceof String}function co(e){var t;return typeof e=="object"&&e!=null&&(e==null||(t=e.constructor)==null?void 0:t.name)==="Object"}function hr(e,t){return Array.isArray(t)?hr(e,(n,i)=>t.includes(i)):Object.entries(e).reduce((n,i)=>{let[o,r]=i;return t(r,o)&&(n[o]=r),n},{})}const w={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function Ya(e){switch(e){case w.LEFT:return w.FORCE_LEFT;case w.RIGHT:return w.FORCE_RIGHT;default:return e}}function Vn(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function cn(e,t){if(t===e)return!0;const n=Array.isArray(t),i=Array.isArray(e);let o;if(n&&i){if(t.length!=e.length)return!1;for(o=0;o<t.length;o++)if(!cn(t[o],e[o]))return!1;return!0}if(n!=i)return!1;if(t&&e&&typeof t=="object"&&typeof e=="object"){const r=t instanceof Date,s=e instanceof Date;if(r&&s)return t.getTime()==e.getTime();if(r!=s)return!1;const l=t instanceof RegExp,a=e instanceof RegExp;if(l&&a)return t.toString()==e.toString();if(l!=a)return!1;const c=Object.keys(t);for(o=0;o<c.length;o++)if(!Object.prototype.hasOwnProperty.call(e,c[o]))return!1;for(o=0;o<c.length;o++)if(!cn(e[c[o]],t[c[o]]))return!1;return!0}else if(t&&e&&typeof t=="function"&&typeof e=="function")return t.toString()===e.toString();return!1}class qa{constructor(t){for(Object.assign(this,t);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?w.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?w.RIGHT:w.LEFT}}function D(e,t){return new D.InputMask(e,t)}function pr(e){if(e==null)throw new Error("mask property should be defined");return e instanceof RegExp?D.MaskedRegExp:zt(e)?D.MaskedPattern:e===Date?D.MaskedDate:e===Number?D.MaskedNumber:Array.isArray(e)||e===Array?D.MaskedDynamic:D.Masked&&e.prototype instanceof D.Masked?e:D.Masked&&e instanceof D.Masked?e.constructor:e instanceof Function?D.MaskedFunction:(console.warn("Mask not found for mask",e),D.Masked)}function dn(e){if(!e)throw new Error("Options in not defined");if(D.Masked){if(e.prototype instanceof D.Masked)return{mask:e};const{mask:t=void 0,...n}=e instanceof D.Masked?{mask:e}:co(e)&&e.mask instanceof D.Masked?e:{};if(t){const i=t.mask;return{...hr(t,(o,r)=>!r.startsWith("_")),mask:t.constructor,_mask:i,...n}}}return co(e)?{...e}:{mask:e}}function Jt(e){if(D.Masked&&e instanceof D.Masked)return e;const t=dn(e),n=pr(t.mask);if(!n)throw new Error("Masked class is not found for provided mask, appropriate module needs to be imported manually before creating mask.");return t.mask===n&&delete t.mask,t._mask&&(t.mask=t._mask,delete t._mask),new n(t)}D.createMask=Jt;class Ti{get selectionStart(){let t;try{t=this._unsafeSelectionStart}catch{}return t??this.value.length}get selectionEnd(){let t;try{t=this._unsafeSelectionEnd}catch{}return t??this.value.length}select(t,n){if(!(t==null||n==null||t===this.selectionStart&&n===this.selectionEnd))try{this._unsafeSelect(t,n)}catch{}}get isActive(){return!1}}D.MaskElement=Ti;class ee extends Ti{constructor(t){super(),this.input=t,this._handlers={}}get rootElement(){var t,n,i;return(t=(n=(i=this.input).getRootNode)==null?void 0:n.call(i))!=null?t:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(t){Object.keys(t).forEach(n=>this._toggleEventHandler(ee.EVENTS_MAP[n],t[n]))}unbindEvents(){Object.keys(this._handlers).forEach(t=>this._toggleEventHandler(t))}_toggleEventHandler(t,n){this._handlers[t]&&(this.input.removeEventListener(t,this._handlers[t]),delete this._handlers[t]),n&&(this.input.addEventListener(t,n),this._handlers[t]=n)}}ee.EVENTS_MAP={selectionChange:"keydown",input:"input",drop:"drop",click:"click",focus:"focus",commit:"blur"};D.HTMLMaskElement=ee;class Xa extends ee{constructor(t){super(t),this.input=t,this._handlers={}}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(t,n){this.input.setSelectionRange(t,n)}get value(){return this.input.value}set value(t){this.input.value=t}}D.HTMLMaskElement=ee;class fr extends ee{get _unsafeSelectionStart(){const t=this.rootElement,n=t.getSelection&&t.getSelection(),i=n&&n.anchorOffset,o=n&&n.focusOffset;return o==null||i==null||i<o?i:o}get _unsafeSelectionEnd(){const t=this.rootElement,n=t.getSelection&&t.getSelection(),i=n&&n.anchorOffset,o=n&&n.focusOffset;return o==null||i==null||i>o?i:o}_unsafeSelect(t,n){if(!this.rootElement.createRange)return;const i=this.rootElement.createRange();i.setStart(this.input.firstChild||this.input,t),i.setEnd(this.input.lastChild||this.input,n);const o=this.rootElement,r=o.getSelection&&o.getSelection();r&&(r.removeAllRanges(),r.addRange(i))}get value(){return this.input.textContent||""}set value(t){this.input.textContent=t}}D.HTMLContenteditableMaskElement=fr;class Wa{constructor(t,n){this.el=t instanceof Ti?t:t.isContentEditable&&t.tagName!=="INPUT"&&t.tagName!=="TEXTAREA"?new fr(t):new Xa(t),this.masked=Jt(n),this._listeners={},this._value="",this._unmaskedValue="",this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(t){var n;return t==null||((n=this.masked)==null?void 0:n.maskEquals(t))}get mask(){return this.masked.mask}set mask(t){if(this.maskEquals(t))return;if(!(t instanceof D.Masked)&&this.masked.constructor===pr(t)){this.masked.updateOptions({mask:t});return}const n=t instanceof D.Masked?t:Jt({mask:t});n.unmaskedValue=this.masked.unmaskedValue,this.masked=n}get value(){return this._value}set value(t){this.value!==t&&(this.masked.value=t,this.updateControl(),this.alignCursor())}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(t){this.unmaskedValue!==t&&(this.masked.unmaskedValue=t,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(t){this.masked.typedValueEquals(t)||(this.masked.typedValue=t,this.updateControl(),this.alignCursor())}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(t,n){const i=this._listeners[t];i&&i.forEach(o=>o(n))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(t){!this.el||!this.el.isActive||(this.el.select(t,t),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value}updateControl(){const t=this.masked.unmaskedValue,n=this.masked.value,i=this.displayValue,o=this.unmaskedValue!==t||this.value!==n;this._unmaskedValue=t,this._value=n,this.el.value!==i&&(this.el.value=i),o&&this._fireChangeEvents()}updateOptions(t){const{mask:n,...i}=t,o=!this.maskEquals(n),r=!cn(this.masked,i);o&&(this.mask=n),r&&this.masked.updateOptions(i),(o||r)&&this.updateControl()}updateCursor(t){t!=null&&(this.cursorPos=t,this._delayUpdateCursor(t))}_delayUpdateCursor(t){this._abortUpdateCursor(),this._changingCursorPos=t,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,w.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(t,n){return this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(n),this}off(t,n){if(!this._listeners[t])return this;if(!n)return delete this._listeners[t],this;const i=this._listeners[t].indexOf(n);return i>=0&&this._listeners[t].splice(i,1),this}_onInput(t){if(this._inputEvent=t,this._abortUpdateCursor(),!this._selection)return this.updateValue();const n=new qa({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),i=this.masked.rawInputValue,o=this.masked.splice(n.startChangePos,n.removed.length,n.inserted,n.removeDirection,{input:!0,raw:!0}).offset,r=i===this.masked.rawInputValue?n.removeDirection:w.NONE;let s=this.masked.nearestInputPos(n.startChangePos+o,r);r!==w.NONE&&(s=this.masked.nearestInputPos(s,w.NONE)),this.updateControl(),this.updateCursor(s),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(t){t.preventDefault(),t.stopPropagation()}_onFocus(t){this.alignCursorFriendly()}_onClick(t){this.alignCursorFriendly()}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}D.InputMask=Wa;class ${static normalize(t){return Array.isArray(t)?t:[t,new $]}constructor(t){Object.assign(this,{inserted:"",rawInserted:"",skip:!1,tailShift:0},t)}aggregate(t){return this.rawInserted+=t.rawInserted,this.skip=this.skip||t.skip,this.inserted+=t.inserted,this.tailShift+=t.tailShift,this}get offset(){return this.tailShift+this.inserted.length}}D.ChangeDetails=$;class Dt{constructor(t,n,i){t===void 0&&(t=""),n===void 0&&(n=0),this.value=t,this.from=n,this.stop=i}toString(){return this.value}extend(t){this.value+=String(t)}appendTo(t){return t.append(this.toString(),{tail:!0}).aggregate(t._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(t){Object.assign(this,t)}unshift(t){if(!this.value.length||t!=null&&this.from>=t)return"";const n=this.value[0];return this.value=this.value.slice(1),n}shift(){if(!this.value.length)return"";const t=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),t}}class ft{constructor(t){this._value="",this._update({...ft.DEFAULTS,...t}),this._initialized=!0}updateOptions(t){Object.keys(t).length&&this.withValueRefresh(this._update.bind(this,t))}_update(t){Object.assign(this,t)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value}reset(){this._value=""}get value(){return this._value}set value(t){this.resolve(t,{input:!0})}resolve(t,n){n===void 0&&(n={input:!0}),this.reset(),this.append(t,n,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(t){this.resolve(t,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(t){this.format?this.value=this.format(t,this):this.unmaskedValue=String(t)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(t){this.resolve(t,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(t,n){return t}totalInputPositions(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),Math.min(this.displayValue.length,n-t)}extractInput(t,n,i){return t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),this.displayValue.slice(t,n)}extractTail(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),new Dt(this.extractInput(t,n),t)}appendTail(t){return zt(t)&&(t=new Dt(String(t))),t.appendTo(this)}_appendCharRaw(t,n){return t?(this._value+=t,new $({inserted:t,rawInserted:t})):new $}_appendChar(t,n,i){n===void 0&&(n={});const o=this.state;let r;if([t,r]=this.doPrepareChar(t,n),r=r.aggregate(this._appendCharRaw(t,n)),r.inserted){let s,l=this.doValidate(n)!==!1;if(l&&i!=null){const a=this.state;this.overwrite===!0&&(s=i.state,i.unshift(this.displayValue.length-r.tailShift));let c=this.appendTail(i);l=c.rawInserted===i.toString(),!(l&&c.inserted)&&this.overwrite==="shift"&&(this.state=a,s=i.state,i.shift(),c=this.appendTail(i),l=c.rawInserted===i.toString()),l&&c.inserted&&(this.state=a)}l||(r=new $,this.state=o,i&&s&&(i.state=s))}return r}_appendPlaceholder(){return new $}_appendEager(){return new $}append(t,n,i){if(!zt(t))throw new Error("value should be string");const o=zt(i)?new Dt(String(i)):i;n!=null&&n.tail&&(n._beforeTailState=this.state);let r;[t,r]=this.doPrepare(t,n);for(let s=0;s<t.length;++s){const l=this._appendChar(t[s],n,o);if(!l.rawInserted&&!this.doSkipInvalid(t[s],n,o))break;r.aggregate(l)}return(this.eager===!0||this.eager==="append")&&n!=null&&n.input&&t&&r.aggregate(this._appendEager()),o!=null&&(r.tailShift+=this.appendTail(o).tailShift),r}remove(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),this._value=this.displayValue.slice(0,t)+this.displayValue.slice(n),new $}withValueRefresh(t){if(this._refreshing||!this._initialized)return t();this._refreshing=!0;const n=this.rawInputValue,i=this.value,o=t();return this.rawInputValue=n,this.value&&this.value!==i&&i.indexOf(this.value)===0&&this.append(i.slice(this.displayValue.length),{},""),delete this._refreshing,o}runIsolated(t){if(this._isolated||!this._initialized)return t(this);this._isolated=!0;const n=this.state,i=t(this);return this.state=n,delete this._isolated,i}doSkipInvalid(t,n,i){return!!this.skipInvalid}doPrepare(t,n){return n===void 0&&(n={}),$.normalize(this.prepare?this.prepare(t,this,n):t)}doPrepareChar(t,n){return n===void 0&&(n={}),$.normalize(this.prepareChar?this.prepareChar(t,this,n):t)}doValidate(t){return(!this.validate||this.validate(this.value,this,t))&&(!this.parent||this.parent.doValidate(t))}doCommit(){this.commit&&this.commit(this.value,this)}splice(t,n,i,o,r){o===void 0&&(o=w.NONE),r===void 0&&(r={input:!0});const s=t+n,l=this.extractTail(s),a=this.eager===!0||this.eager==="remove";let c;a&&(o=Ya(o),c=this.extractInput(0,s,{raw:!0}));let u=t;const d=new $;if(o!==w.NONE&&(u=this.nearestInputPos(t,n>1&&t!==0&&!a?w.NONE:o),d.tailShift=u-t),d.aggregate(this.remove(u)),a&&o!==w.NONE&&c===this.rawInputValue)if(o===w.FORCE_LEFT){let h;for(;c===this.rawInputValue&&(h=this.displayValue.length);)d.aggregate(new $({tailShift:-1})).aggregate(this.remove(h-1))}else o===w.FORCE_RIGHT&&l.unshift();return d.aggregate(this.append(i,r,l))}maskEquals(t){return this.mask===t}typedValueEquals(t){const n=this.typedValue;return t===n||ft.EMPTY_VALUES.includes(t)&&ft.EMPTY_VALUES.includes(n)||(this.format?this.format(t,this)===this.format(this.typedValue,this):!1)}}ft.DEFAULTS={skipInvalid:!0};ft.EMPTY_VALUES=[void 0,null,""];D.Masked=ft;class Kt{constructor(t,n){t===void 0&&(t=[]),n===void 0&&(n=0),this.chunks=t,this.from=n}toString(){return this.chunks.map(String).join("")}extend(t){if(!String(t))return;t=zt(t)?new Dt(String(t)):t;const n=this.chunks[this.chunks.length-1],i=n&&(n.stop===t.stop||t.stop==null)&&t.from===n.from+n.toString().length;if(t instanceof Dt)i?n.extend(t.toString()):this.chunks.push(t);else if(t instanceof Kt){if(t.stop==null){let o;for(;t.chunks.length&&t.chunks[0].stop==null;)o=t.chunks.shift(),o.from+=t.from,this.extend(o)}t.toString()&&(t.stop=t.blockIndex,this.chunks.push(t))}}appendTo(t){if(!(t instanceof D.MaskedPattern))return new Dt(this.toString()).appendTo(t);const n=new $;for(let i=0;i<this.chunks.length&&!n.skip;++i){const o=this.chunks[i],r=t._mapPosToBlock(t.displayValue.length),s=o.stop;let l;if(s!=null&&(!r||r.index<=s)){if(o instanceof Kt||t._stops.indexOf(s)>=0){const a=t._appendPlaceholder(s);n.aggregate(a)}l=o instanceof Kt&&t._blocks[s]}if(l){const a=l.appendTail(o);a.skip=!1,n.aggregate(a),t._value+=a.inserted;const c=o.toString().slice(a.rawInserted.length);c&&n.aggregate(t.append(c,{tail:!0}))}else n.aggregate(t.append(o.toString(),{tail:!0}))}return n}get state(){return{chunks:this.chunks.map(t=>t.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(t){const{chunks:n,...i}=t;Object.assign(this,i),this.chunks=n.map(o=>{const r="chunks"in o?new Kt:new Dt;return r.state=o,r})}unshift(t){if(!this.chunks.length||t!=null&&this.from>=t)return"";const n=t!=null?t-this.from:t;let i=0;for(;i<this.chunks.length;){const o=this.chunks[i],r=o.unshift(n);if(o.toString()){if(!r)break;++i}else this.chunks.splice(i,1);if(r)return r}return""}shift(){if(!this.chunks.length)return"";let t=this.chunks.length-1;for(;0<=t;){const n=this.chunks[t],i=n.shift();if(n.toString()){if(!i)break;--t}else this.chunks.splice(t,1);if(i)return i}return""}}class Ka{constructor(t,n){this.masked=t,this._log=[];const{offset:i,index:o}=t._mapPosToBlock(n)||(n<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=i,this.index=o,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(t){Object.assign(this,t)}pushState(){this._log.push(this.state)}popState(){const t=this._log.pop();return t&&(this.state=t),t}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(t){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((n=this.block)==null?void 0:n.displayValue.length)||0){var n;if(t())return this.ok=!0}return this.ok=!1}_pushRight(t){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(t())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,w.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,w.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,w.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,w.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,w.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,w.NONE),!0})}}class gr{constructor(t){Object.assign(this,t),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(t,n){return t===void 0&&(t=0),n===void 0&&(n=this._value.length),this._value=this._value.slice(0,t)+this._value.slice(n),this._value||(this._isRawInput=!1),new $}nearestInputPos(t,n){n===void 0&&(n=w.NONE);const i=0,o=this._value.length;switch(n){case w.LEFT:case w.FORCE_LEFT:return i;case w.NONE:case w.RIGHT:case w.FORCE_RIGHT:default:return o}}totalInputPositions(t,n){return t===void 0&&(t=0),n===void 0&&(n=this._value.length),this._isRawInput?n-t:0}extractInput(t,n,i){return t===void 0&&(t=0),n===void 0&&(n=this._value.length),i===void 0&&(i={}),i.raw&&this._isRawInput&&this._value.slice(t,n)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(t,n){n===void 0&&(n={});const i=new $;if(this.isFilled)return i;const o=this.eager===!0||this.eager==="append",r=this.char===t&&(this.isUnmasking||n.input||n.raw)&&(!n.raw||!o)&&!n.tail;return r&&(i.rawInserted=this.char),this._value=i.inserted=this.char,this._isRawInput=r&&(n.raw||n.input),i}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const t=new $;return this.isFilled||(this._value=t.inserted=this.char),t}extractTail(){return new Dt("")}appendTail(t){return zt(t)&&(t=new Dt(String(t))),t.appendTo(this)}append(t,n,i){const o=this._appendChar(t[0],n);return i!=null&&(o.tailShift+=this.appendTail(i).tailShift),o}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value,this._isRawInput=!!t._rawInputValue}}class hn{constructor(t){const{parent:n,isOptional:i,placeholderChar:o,displayChar:r,lazy:s,eager:l,...a}=t;this.masked=Jt(a),Object.assign(this,{parent:n,isOptional:i,placeholderChar:o,displayChar:r,lazy:s,eager:l})}reset(){this.isFilled=!1,this.masked.reset()}remove(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.value.length),t===0&&n>=1?(this.isFilled=!1,this.masked.remove(t,n)):new $}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(t,n){if(n===void 0&&(n={}),this.isFilled)return new $;const i=this.masked.state,o=this.masked._appendChar(t,this.currentMaskFlags(n));return o.inserted&&this.doValidate(n)===!1&&(o.inserted=o.rawInserted="",this.masked.state=i),!o.inserted&&!this.isOptional&&!this.lazy&&!n.input&&(o.inserted=this.placeholderChar),o.skip=!o.inserted&&!this.isOptional,this.isFilled=!!o.inserted,o}append(t,n,i){return this.masked.append(t,this.currentMaskFlags(n),i)}_appendPlaceholder(){const t=new $;return this.isFilled||this.isOptional||(this.isFilled=!0,t.inserted=this.placeholderChar),t}_appendEager(){return new $}extractTail(t,n){return this.masked.extractTail(t,n)}appendTail(t){return this.masked.appendTail(t)}extractInput(t,n,i){return t===void 0&&(t=0),n===void 0&&(n=this.value.length),this.masked.extractInput(t,n,i)}nearestInputPos(t,n){n===void 0&&(n=w.NONE);const i=0,o=this.value.length,r=Math.min(Math.max(t,i),o);switch(n){case w.LEFT:case w.FORCE_LEFT:return this.isComplete?r:i;case w.RIGHT:case w.FORCE_RIGHT:return this.isComplete?r:o;case w.NONE:default:return r}}totalInputPositions(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.value.length),this.value.slice(t,n).length}doValidate(t){return this.masked.doValidate(this.currentMaskFlags(t))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(t)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(t){this.masked.state=t.masked,this.isFilled=t.isFilled}currentMaskFlags(t){var n;return{...t,_beforeTailState:(t==null||(n=t._beforeTailState)==null?void 0:n.masked)||t?._beforeTailState}}}hn.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class Za extends ft{updateOptions(t){super.updateOptions(t)}_update(t){const n=t.mask;n&&(t.validate=i=>i.search(n)>=0),super._update(t)}}D.MaskedRegExp=Za;class gt extends ft{constructor(t){super({...gt.DEFAULTS,...t,definitions:Object.assign({},hn.DEFAULT_DEFINITIONS,t?.definitions)})}updateOptions(t){super.updateOptions(t)}_update(t){t.definitions=Object.assign({},this.definitions,t.definitions),super._update(t),this._rebuildMask()}_rebuildMask(){const t=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const n=this.mask;if(!n||!t)return;let i=!1,o=!1;for(let r=0;r<n.length;++r){if(this.blocks){const c=n.slice(r),u=Object.keys(this.blocks).filter(h=>c.indexOf(h)===0);u.sort((h,p)=>p.length-h.length);const d=u[0];if(d){const{expose:h,...p}=dn(this.blocks[d]),v=Jt({lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,...p,parent:this});v&&(this._blocks.push(v),h&&(this.exposeBlock=v),this._maskedBlocks[d]||(this._maskedBlocks[d]=[]),this._maskedBlocks[d].push(this._blocks.length-1)),r+=d.length-1;continue}}let s=n[r],l=s in t;if(s===gt.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(s==="{"||s==="}"){i=!i;continue}if(s==="["||s==="]"){o=!o;continue}if(s===gt.ESCAPE_CHAR){if(++r,s=n[r],!s)break;l=!1}const a=l?new hn({isOptional:o,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...dn(t[s]),parent:this}):new gr({char:s,eager:this.eager,isUnmasking:i});this._blocks.push(a)}}get state(){return{...super.state,_blocks:this._blocks.map(t=>t.state)}}set state(t){const{_blocks:n,...i}=t;this._blocks.forEach((o,r)=>o.state=n[r]),super.state=i}reset(){super.reset(),this._blocks.forEach(t=>t.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(t=>t.isComplete)}get isFilled(){return this._blocks.every(t=>t.isFilled)}get isFixed(){return this._blocks.every(t=>t.isFixed)}get isOptional(){return this._blocks.every(t=>t.isOptional)}doCommit(){this._blocks.forEach(t=>t.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((t,n)=>t+=n.unmaskedValue,"")}set unmaskedValue(t){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=t,this.appendTail(n),this.doCommit()}else super.unmaskedValue=t}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((t,n)=>t+=n.value,"")}set value(t){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=t,this.appendTail(n),this.doCommit()}else super.value=t}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(t){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=t,this.appendTail(n),this.doCommit()}else super.typedValue=t}get displayValue(){return this._blocks.reduce((t,n)=>t+=n.displayValue,"")}appendTail(t){return super.appendTail(t).aggregate(this._appendPlaceholder())}_appendEager(){var t;const n=new $;let i=(t=this._mapPosToBlock(this.displayValue.length))==null?void 0:t.index;if(i==null)return n;this._blocks[i].isFilled&&++i;for(let o=i;o<this._blocks.length;++o){const r=this._blocks[o]._appendEager();if(!r.inserted)break;n.aggregate(r)}return n}_appendCharRaw(t,n){n===void 0&&(n={});const i=this._mapPosToBlock(this.displayValue.length),o=new $;if(!i)return o;for(let s=i.index;;++s){var r;const l=this._blocks[s];if(!l)break;const a=l._appendChar(t,{...n,_beforeTailState:(r=n._beforeTailState)==null||(r=r._blocks)==null?void 0:r[s]}),c=a.skip;if(o.aggregate(a),c||a.rawInserted)break}return o}extractTail(t,n){t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length);const i=new Kt;return t===n||this._forEachBlocksInRange(t,n,(o,r,s,l)=>{const a=o.extractTail(s,l);a.stop=this._findStopBefore(r),a.from=this._blockStartPos(r),a instanceof Kt&&(a.blockIndex=r),i.extend(a)}),i}extractInput(t,n,i){if(t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),i===void 0&&(i={}),t===n)return"";let o="";return this._forEachBlocksInRange(t,n,(r,s,l,a)=>{o+=r.extractInput(l,a,i)}),o}_findStopBefore(t){let n;for(let i=0;i<this._stops.length;++i){const o=this._stops[i];if(o<=t)n=o;else break}return n}_appendPlaceholder(t){const n=new $;if(this.lazy&&t==null)return n;const i=this._mapPosToBlock(this.displayValue.length);if(!i)return n;const o=i.index,r=t??this._blocks.length;return this._blocks.slice(o,r).forEach(s=>{if(!s.lazy||t!=null){var l;const a=s._appendPlaceholder((l=s._blocks)==null?void 0:l.length);this._value+=a.inserted,n.aggregate(a)}}),n}_mapPosToBlock(t){let n="";for(let i=0;i<this._blocks.length;++i){const o=this._blocks[i],r=n.length;if(n+=o.displayValue,t<=n.length)return{index:i,offset:t-r}}}_blockStartPos(t){return this._blocks.slice(0,t).reduce((n,i)=>n+=i.displayValue.length,0)}_forEachBlocksInRange(t,n,i){n===void 0&&(n=this.displayValue.length);const o=this._mapPosToBlock(t);if(o){const r=this._mapPosToBlock(n),s=r&&o.index===r.index,l=o.offset,a=r&&s?r.offset:this._blocks[o.index].displayValue.length;if(i(this._blocks[o.index],o.index,l,a),r&&!s){for(let c=o.index+1;c<r.index;++c)i(this._blocks[c],c,0,this._blocks[c].displayValue.length);i(this._blocks[r.index],r.index,0,r.offset)}}}remove(t,n){t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length);const i=super.remove(t,n);return this._forEachBlocksInRange(t,n,(o,r,s,l)=>{i.aggregate(o.remove(s,l))}),i}nearestInputPos(t,n){if(n===void 0&&(n=w.NONE),!this._blocks.length)return 0;const i=new Ka(this,t);if(n===w.NONE)return i.pushRightBeforeInput()||(i.popState(),i.pushLeftBeforeInput())?i.pos:this.displayValue.length;if(n===w.LEFT||n===w.FORCE_LEFT){if(n===w.LEFT){if(i.pushRightBeforeFilled(),i.ok&&i.pos===t)return t;i.popState()}if(i.pushLeftBeforeInput(),i.pushLeftBeforeRequired(),i.pushLeftBeforeFilled(),n===w.LEFT){if(i.pushRightBeforeInput(),i.pushRightBeforeRequired(),i.ok&&i.pos<=t||(i.popState(),i.ok&&i.pos<=t))return i.pos;i.popState()}return i.ok?i.pos:n===w.FORCE_LEFT?0:(i.popState(),i.ok||(i.popState(),i.ok)?i.pos:0)}return n===w.RIGHT||n===w.FORCE_RIGHT?(i.pushRightBeforeInput(),i.pushRightBeforeRequired(),i.pushRightBeforeFilled()?i.pos:n===w.FORCE_RIGHT?this.displayValue.length:(i.popState(),i.ok||(i.popState(),i.ok)?i.pos:this.nearestInputPos(t,w.LEFT))):t}totalInputPositions(t,n){t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length);let i=0;return this._forEachBlocksInRange(t,n,(o,r,s,l)=>{i+=o.totalInputPositions(s,l)}),i}maskedBlock(t){return this.maskedBlocks(t)[0]}maskedBlocks(t){const n=this._maskedBlocks[t];return n?n.map(i=>this._blocks[i]):[]}}gt.DEFAULTS={lazy:!0,placeholderChar:"_"};gt.STOP_CHAR="`";gt.ESCAPE_CHAR="\\";gt.InputDefinition=hn;gt.FixedDefinition=gr;D.MaskedPattern=gt;class Ke extends gt{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){const{to:n=this.to||0,from:i=this.from||0,maxLength:o=this.maxLength||0,autofix:r=this.autofix,...s}=t;this.to=n,this.from=i,this.maxLength=Math.max(String(n).length,o),this.autofix=r;const l=String(this.from).padStart(this.maxLength,"0"),a=String(this.to).padStart(this.maxLength,"0");let c=0;for(;c<a.length&&a[c]===l[c];)++c;s.mask=a.slice(0,c).replace(/0/g,"\\0")+"0".repeat(this.maxLength-c),super._update(s)}get isComplete(){return super.isComplete&&!!this.value}boundaries(t){let n="",i="";const[,o,r]=t.match(/^(\D*)(\d*)(\D*)/)||[];return r&&(n="0".repeat(o.length)+r,i="9".repeat(o.length)+r),n=n.padEnd(this.maxLength,"0"),i=i.padEnd(this.maxLength,"9"),[n,i]}doPrepareChar(t,n){n===void 0&&(n={});let i;if([t,i]=super.doPrepareChar(t.replace(/\D/g,""),n),!this.autofix||!t)return[t,i];const o=String(this.from).padStart(this.maxLength,"0"),r=String(this.to).padStart(this.maxLength,"0"),s=this.value+t;if(s.length>this.maxLength)return["",i];const[l,a]=this.boundaries(s);return Number(a)<this.from?[o[s.length-1],i]:Number(l)>this.to?this.autofix==="pad"&&s.length<this.maxLength?["",i.aggregate(this.append(o[s.length-1]+t,n))]:[r[s.length-1],i]:[t,i]}doValidate(t){const n=this.value;if(n.search(/[^0]/)===-1&&n.length<=this._matchFrom)return!0;const[i,o]=this.boundaries(n);return this.from<=Number(o)&&Number(i)<=this.to&&super.doValidate(t)}}D.MaskedRange=Ke;class Zt extends gt{constructor(t){const{mask:n,pattern:i,...o}={...Zt.DEFAULTS,...t};super({...o,mask:zt(n)?n:i})}updateOptions(t){super.updateOptions(t)}_update(t){const{mask:n,pattern:i,blocks:o,...r}={...Zt.DEFAULTS,...t},s=Object.assign({},Zt.GET_DEFAULT_BLOCKS());t.min&&(s.Y.from=t.min.getFullYear()),t.max&&(s.Y.to=t.max.getFullYear()),t.min&&t.max&&s.Y.from===s.Y.to&&(s.m.from=t.min.getMonth()+1,s.m.to=t.max.getMonth()+1,s.m.from===s.m.to&&(s.d.from=t.min.getDate(),s.d.to=t.max.getDate())),Object.assign(s,this.blocks,o),Object.keys(s).forEach(l=>{const a=s[l];!("autofix"in a)&&"autofix"in t&&(a.autofix=t.autofix)}),super._update({...r,mask:zt(n)?n:i,blocks:s})}doValidate(t){const n=this.date;return super.doValidate(t)&&(!this.isComplete||this.isDateExist(this.value)&&n!=null&&(this.min==null||this.min<=n)&&(this.max==null||n<=this.max))}isDateExist(t){return this.format(this.parse(t,this),this).indexOf(t)>=0}get date(){return this.typedValue}set date(t){this.typedValue=t}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(t){super.typedValue=t}maskEquals(t){return t===Date||super.maskEquals(t)}}Zt.GET_DEFAULT_BLOCKS=()=>({d:{mask:Ke,from:1,to:31,maxLength:2},m:{mask:Ke,from:1,to:12,maxLength:2},Y:{mask:Ke,from:1900,to:9999}});Zt.DEFAULTS={mask:Date,pattern:"d{.}`m{.}`Y",format:(e,t)=>{if(!e)return"";const n=String(e.getDate()).padStart(2,"0"),i=String(e.getMonth()+1).padStart(2,"0"),o=e.getFullYear();return[n,i,o].join(".")},parse:(e,t)=>{const[n,i,o]=e.split(".").map(Number);return new Date(o,i-1,n)}};D.MaskedDate=Zt;class Pe extends ft{constructor(t){super({...Pe.DEFAULTS,...t}),this.currentMask=void 0}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),"mask"in t&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(t.mask)?t.mask.map(n=>{const{expose:i,...o}=dn(n),r=Jt({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...o});return i&&(this.exposeMask=r),r}):[])}_appendCharRaw(t,n){n===void 0&&(n={});const i=this._applyDispatch(t,n);return this.currentMask&&i.aggregate(this.currentMask._appendChar(t,this.currentMaskFlags(n))),i}_applyDispatch(t,n,i){t===void 0&&(t=""),n===void 0&&(n={}),i===void 0&&(i="");const o=n.tail&&n._beforeTailState!=null?n._beforeTailState._value:this.value,r=this.rawInputValue,s=n.tail&&n._beforeTailState!=null?n._beforeTailState._rawInputValue:r,l=r.slice(s.length),a=this.currentMask,c=new $,u=a?.state;if(this.currentMask=this.doDispatch(t,{...n},i),this.currentMask)if(this.currentMask!==a){if(this.currentMask.reset(),s){const d=this.currentMask.append(s,{raw:!0});c.tailShift=d.inserted.length-o.length}l&&(c.tailShift+=this.currentMask.append(l,{raw:!0,tail:!0}).tailShift)}else u&&(this.currentMask.state=u);return c}_appendPlaceholder(){const t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendPlaceholder()),t}_appendEager(){const t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendEager()),t}appendTail(t){const n=new $;return t&&n.aggregate(this._applyDispatch("",{},t)),n.aggregate(this.currentMask?this.currentMask.appendTail(t):super.appendTail(t))}currentMaskFlags(t){var n,i;return{...t,_beforeTailState:((n=t._beforeTailState)==null?void 0:n.currentMaskRef)===this.currentMask&&((i=t._beforeTailState)==null?void 0:i.currentMask)||t._beforeTailState}}doDispatch(t,n,i){return n===void 0&&(n={}),i===void 0&&(i=""),this.dispatch(t,this,n,i)}doValidate(t){return super.doValidate(t)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(t)))}doPrepare(t,n){n===void 0&&(n={});let[i,o]=super.doPrepare(t,n);if(this.currentMask){let r;[i,r]=super.doPrepare(i,this.currentMaskFlags(n)),o=o.aggregate(r)}return[i,o]}doPrepareChar(t,n){n===void 0&&(n={});let[i,o]=super.doPrepareChar(t,n);if(this.currentMask){let r;[i,r]=super.doPrepareChar(i,this.currentMaskFlags(n)),o=o.aggregate(r)}return[i,o]}reset(){var t;(t=this.currentMask)==null||t.reset(),this.compiledMasks.forEach(n=>n.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(t){this.exposeMask?(this.exposeMask.value=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=t}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(t){this.exposeMask?(this.exposeMask.unmaskedValue=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=t}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(t){if(this.exposeMask){this.exposeMask.typedValue=t,this.currentMask=this.exposeMask,this._applyDispatch();return}let n=String(t);this.currentMask&&(this.currentMask.typedValue=t,n=this.currentMask.unmaskedValue),this.unmaskedValue=n}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var t;return!!((t=this.currentMask)!=null&&t.isComplete)}get isFilled(){var t;return!!((t=this.currentMask)!=null&&t.isFilled)}remove(t,n){const i=new $;return this.currentMask&&i.aggregate(this.currentMask.remove(t,n)).aggregate(this._applyDispatch()),i}get state(){var t;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(n=>n.state),currentMaskRef:this.currentMask,currentMask:(t=this.currentMask)==null?void 0:t.state}}set state(t){const{compiledMasks:n,currentMaskRef:i,currentMask:o,...r}=t;n&&this.compiledMasks.forEach((s,l)=>s.state=n[l]),i!=null&&(this.currentMask=i,this.currentMask.state=o),super.state=r}extractInput(t,n,i){return this.currentMask?this.currentMask.extractInput(t,n,i):""}extractTail(t,n){return this.currentMask?this.currentMask.extractTail(t,n):super.extractTail(t,n)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(t,n){return this.currentMask?this.currentMask.nearestInputPos(t,n):super.nearestInputPos(t,n)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(t){this._overwrite=t}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(t){this._eager=t}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(t){this._skipInvalid=t}maskEquals(t){return Array.isArray(t)?this.compiledMasks.every((n,i)=>{if(!t[i])return;const{mask:o,...r}=t[i];return cn(n,r)&&n.maskEquals(o)}):super.maskEquals(t)}typedValueEquals(t){var n;return!!((n=this.currentMask)!=null&&n.typedValueEquals(t))}}Pe.DEFAULTS=void 0;Pe.DEFAULTS={dispatch:(e,t,n,i)=>{if(!t.compiledMasks.length)return;const o=t.rawInputValue,r=t.compiledMasks.map((s,l)=>{const a=t.currentMask===s,c=a?s.displayValue.length:s.nearestInputPos(s.displayValue.length,w.FORCE_LEFT);return s.rawInputValue!==o?(s.reset(),s.append(o,{raw:!0})):a||s.remove(c),s.append(e,t.currentMaskFlags(n)),s.appendTail(i),{index:l,weight:s.rawInputValue.length,totalInputPositions:s.totalInputPositions(0,Math.max(c,s.nearestInputPos(s.displayValue.length,w.FORCE_LEFT)))}});return r.sort((s,l)=>l.weight-s.weight||l.totalInputPositions-s.totalInputPositions),t.compiledMasks[r[0].index]}};D.MaskedDynamic=Pe;class Qa extends gt{constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){const{enum:n,...i}=t;if(n){const o=n.map(l=>l.length),r=Math.min(...o),s=Math.max(...o)-r;i.mask="*".repeat(r),s&&(i.mask+="["+"*".repeat(s)+"]"),this.enum=n}super._update(i)}doValidate(t){return this.enum.some(n=>n.indexOf(this.unmaskedValue)===0)&&super.doValidate(t)}}D.MaskedEnum=Qa;class Ja extends ft{updateOptions(t){super.updateOptions(t)}_update(t){super._update({...t,validate:t.mask})}}D.MaskedFunction=Ja;class bt extends ft{constructor(t){super({...bt.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),this._updateRegExps()}_updateRegExps(){const t="^"+(this.allowNegative?"[+|\\-]?":""),n="\\d*",i=(this.scale?"("+Vn(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(t+n+i),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(Vn).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(Vn(this.thousandsSeparator),"g")}_removeThousandsSeparators(t){return t.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(t){const n=t.split(this.radix);return n[0]=n[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),n.join(this.radix)}doPrepareChar(t,n){n===void 0&&(n={});const[i,o]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(n.input&&n.raw||!n.input&&!n.raw)?t.replace(this._mapToRadixRegExp,this.radix):t),n);return t&&!i&&(o.skip=!0),i&&!this.allowPositive&&!this.value&&i!=="-"&&o.aggregate(this._appendChar("-")),[i,o]}_separatorsCount(t,n){n===void 0&&(n=!1);let i=0;for(let o=0;o<t;++o)this._value.indexOf(this.thousandsSeparator,o)===o&&(++i,n&&(t+=this.thousandsSeparator.length));return i}_separatorsCountFromSlice(t){return t===void 0&&(t=this._value),this._separatorsCount(this._removeThousandsSeparators(t).length,!0)}extractInput(t,n,i){return t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),[t,n]=this._adjustRangeWithSeparators(t,n),this._removeThousandsSeparators(super.extractInput(t,n,i))}_appendCharRaw(t,n){if(n===void 0&&(n={}),!this.thousandsSeparator)return super._appendCharRaw(t,n);const i=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,o=this._separatorsCountFromSlice(i);this._value=this._removeThousandsSeparators(this.value);const r=super._appendCharRaw(t,n);this._value=this._insertThousandsSeparators(this._value);const s=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,l=this._separatorsCountFromSlice(s);return r.tailShift+=(l-o)*this.thousandsSeparator.length,r.skip=!r.rawInserted&&t===this.thousandsSeparator,r}_findSeparatorAround(t){if(this.thousandsSeparator){const n=t-this.thousandsSeparator.length+1,i=this.value.indexOf(this.thousandsSeparator,n);if(i<=t)return i}return-1}_adjustRangeWithSeparators(t,n){const i=this._findSeparatorAround(t);i>=0&&(t=i);const o=this._findSeparatorAround(n);return o>=0&&(n=o+this.thousandsSeparator.length),[t,n]}remove(t,n){t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),[t,n]=this._adjustRangeWithSeparators(t,n);const i=this.value.slice(0,t),o=this.value.slice(n),r=this._separatorsCount(i.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(i+o));const s=this._separatorsCountFromSlice(i);return new $({tailShift:(s-r)*this.thousandsSeparator.length})}nearestInputPos(t,n){if(!this.thousandsSeparator)return t;switch(n){case w.NONE:case w.LEFT:case w.FORCE_LEFT:{const i=this._findSeparatorAround(t-1);if(i>=0){const o=i+this.thousandsSeparator.length;if(t<o||this.value.length<=o||n===w.FORCE_LEFT)return i}break}case w.RIGHT:case w.FORCE_RIGHT:{const i=this._findSeparatorAround(t);if(i>=0)return i+this.thousandsSeparator.length}}return t}doValidate(t){let n=!!this._removeThousandsSeparators(this.value).match(this._numberRegExp);if(n){const i=this.number;n=n&&!isNaN(i)&&(this.min==null||this.min>=0||this.min<=this.number)&&(this.max==null||this.max<=0||this.number<=this.max)}return n&&super.doValidate(t)}doCommit(){if(this.value){const t=this.number;let n=t;this.min!=null&&(n=Math.max(n,this.min)),this.max!=null&&(n=Math.min(n,this.max)),n!==t&&(this.unmaskedValue=this.format(n,this));let i=this.value;this.normalizeZeros&&(i=this._normalizeZeros(i)),this.padFractionalZeros&&this.scale>0&&(i=this._padFractionalZeros(i)),this._value=i}super.doCommit()}_normalizeZeros(t){const n=this._removeThousandsSeparators(t).split(this.radix);return n[0]=n[0].replace(/^(\D*)(0*)(\d*)/,(i,o,r,s)=>o+s),t.length&&!/\d$/.test(n[0])&&(n[0]=n[0]+"0"),n.length>1&&(n[1]=n[1].replace(/0*$/,""),n[1].length||(n.length=1)),this._insertThousandsSeparators(n.join(this.radix))}_padFractionalZeros(t){if(!t)return t;const n=t.split(this.radix);return n.length<2&&n.push(""),n[1]=n[1].padEnd(this.scale,"0"),n.join(this.radix)}doSkipInvalid(t,n,i){n===void 0&&(n={});const o=this.scale===0&&t!==this.thousandsSeparator&&(t===this.radix||t===bt.UNMASKED_RADIX||this.mapToRadix.includes(t));return super.doSkipInvalid(t,n,i)&&!o}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,bt.UNMASKED_RADIX)}set unmaskedValue(t){super.unmaskedValue=t}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(t){this.rawInputValue=this.format(t,this).replace(bt.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(t){this.typedValue=t}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(t){return(super.typedValueEquals(t)||bt.EMPTY_VALUES.includes(t)&&bt.EMPTY_VALUES.includes(this.typedValue))&&!(t===0&&this.value==="")}}bt.UNMASKED_RADIX=".";bt.EMPTY_VALUES=[...ft.EMPTY_VALUES,0];bt.DEFAULTS={mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[bt.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:e=>e.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})};D.MaskedNumber=bt;const ci={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function mr(e,t,n){t===void 0&&(t=ci.MASKED),n===void 0&&(n=ci.MASKED);const i=Jt(e);return o=>i.runIsolated(r=>(r[t]=o,r[n]))}function tl(e,t,n,i){return mr(t,n,i)(e)}D.PIPE_TYPE=ci;D.createPipe=mr;D.pipe=tl;try{globalThis.IMask=D}catch{}const el=["src","alt"],nl=yt({__name:"Image",props:{src:{},preview:{},alt:{},caption:{},captionVisibility:{default:"hover"},captionTheme:{default:"dark"},size:{default:"cover"},position:{default:"center"},width:{},height:{},aspectRatio:{}},emits:["loaded","error"],setup(e,{emit:t}){const n=e,i=dt(),o=dt(!1),r=dt(!1),s=dt(),l=lt(()=>({"--k-image-size":n.size,"--k-image-preview":n.preview||"","--k-image-position":n.position,"--k-image-width":n.width||"initial","--k-image-height":n.height||"initial","--k-image-aspectratio":(n.aspectRatio==="natural"?s.value:n.aspectRatio)||"initial"}));function a(){o.value=!0;const{naturalWidth:u=0,naturalHeight:d=0}=i.value||{};s.value=`${u}/${d}`,t("loaded")}function c(){o.value=!0,r.value=!0,t("error")}return wn(()=>{var u;return((u=i.value)==null?void 0:u.complete)&&a()}),(u,d)=>(z(),ot("figure",{class:on(["k-image",[`k-image--size-${u.size}`,{"k-image--loaded":o.value,"k-image--loading":!o.value}]]),style:_n(l.value)},[o.value?et("",!0):(z(),pt(er,{key:0,size:"small"})),Ro(Wt("img",{src:u.src,alt:u.alt||u.caption,onLoad:a,onError:c,ref_key:"image",ref:i},null,40,el),[[jo,!r.value]]),u.$slots.caption||u.caption?(z(),ot("figcaption",{key:1,class:on(`k-image__caption k-image__caption--visibility-${u.captionVisibility} k-image__caption--theme-${!o.value||r.value?"light":u.captionTheme}`)},[Z(u.$slots,"caption",{},()=>[yi(Vt(u.caption),1)])],2)):et("",!0)],6))}}),il={key:1,class:"k-card__content"},ol={key:0,class:"k-card__title"},rl={key:2,class:"k-card__footer"},sl=yt({inheritAttrs:!1,__name:"Card",props:{is:{default:"div"},title:{},variant:{default:"border"},thumbnail:{},thumbnailSize:{default:"cover"},headerMinHeight:{}},setup(e){return(t,n)=>(z(),pt(En(t.is),At({class:`k-card k-card--variant-${t.variant}`,style:`--k-header-min-height: ${t.headerMinHeight||""}`},t.$attrs),{default:_t(()=>[t.$slots.header||t.thumbnail?(z(),ot("div",{key:0,class:on(["k-card__header",[{"k-card__header--has-thumbnail":!t.$slots.header&&t.thumbnail},`k-card__header--thumbnail-size-${t.thumbnailSize}`]])},[Z(t.$slots,"header",{},()=>[t.thumbnail?(z(),pt(nl,{key:0,class:"k-card__thumbnail",src:t.thumbnail,size:t.thumbnailSize},null,8,["src","size"])):et("",!0)])],2)):et("",!0),t.$slots.default||t.title?(z(),ot("div",il,[t.title?(z(),ot("div",ol,Vt(t.title),1)):et("",!0),Z(t.$slots,"default")])):et("",!0),t.$slots.footer?(z(),ot("div",rl,[Z(t.$slots,"footer")])):et("",!0)]),_:3},16,["class","style"]))}});var di=(e,t,n,i)=>{const o=typeof e=="function"?e():e;return o?.addEventListener(t,n,i),()=>{o?.removeEventListener(t,n,i)}},al=e=>e.button===2||ll()&&e.ctrlKey&&e.button===0,ll=()=>/Mac|iPod|iPhone|iPad/.test(window.navigator.platform);function ho(e,t,n){if(!e)return;const i=e.ownerDocument.defaultView||window,o=new i.CustomEvent(t,n);return e.dispatchEvent(o)}function po(e){return Math.max(0,Math.min(1,e))}function vr(e,t){const{left:n,top:i,width:o,height:r}=t.getBoundingClientRect(),s={x:e.x-n,y:e.y-i},l={x:po(s.x/o),y:po(s.y/r)};function a(c={}){const{dir:u="ltr",orientation:d="horizontal",inverted:h}=c,p=typeof h=="object"?h.x:h,v=typeof h=="object"?h.y:h;return d==="horizontal"?u==="rtl"||p?1-l.x:l.x:v?1-l.y:l.y}return{offset:s,percent:l,getPercentValue:a}}function ul(e,t,n){return Math.round((e-t)/n)*n+t}function cl(e,t,n){return Math.min(Math.max(e,t),n)}function dl(e,t,n){return(e-t)/(n-t)}function br(e,t,n,i){const o=e*(n-t)+t,r=ul(o,t,i);return cl(r,t,n)}function hi(e,t){const n={min:e[0],max:e[1]},i={min:t[0],max:t[1]};return function(o){if(n.min===n.max||i.min===i.max)return i.min;const r=(i.max-i.min)/(n.max-n.min);return i.min+r*(o-n.min)}}var hl=$t("slider").parts("root","label","thumb","output","track","range","control","markerGroup","marker");hl.build();function pl(e){const{height:t=0}=e.thumbSize??{},n=hi([e.min,e.max],[-t/2,t/2]);return parseFloat(n(e.value).toFixed(2))}function fl(e){const{width:t=0}=e.thumbSize??{};if(e.isRtl){const i=hi([e.max,e.min],[-t/2,t/2]);return-1*parseFloat(i(e.value).toFixed(2))}const n=hi([e.min,e.max],[-t/2,t/2]);return parseFloat(n(e.value).toFixed(2))}function gl(e,t){if(e.thumbAlignment==="center")return`${t}%`;const n=e.isVertical?pl(e):fl(e);return`calc(${t}% - ${n}px)`}function Di(e){let t=dl(e.value,e.min,e.max)*100;return gl(e,t)}function yr(e){let t="visible";return e.thumbAlignment==="contain"&&!e.hasMeasuredThumbSize&&(t="hidden"),t}function ml(e){const t=e.isVertical?"bottom":"insetInlineStart";return{visibility:yr(e),position:"absolute",transform:"var(--slider-thumb-transform)",[t]:"var(--slider-thumb-offset)"}}function vl(e){let t="0%",n=`${100-e.valuePercent}%`;if(e.origin==="center"){const i=e.valuePercent<50;t=i?`${e.valuePercent}%`:"50%",n=i?"50%":n}return{start:t,end:n}}function bl(e){return e.isVertical?{position:"absolute",bottom:"var(--slider-range-start)",top:"var(--slider-range-end)"}:{position:"absolute",[e.isRtl?"right":"left"]:"var(--slider-range-start)",[e.isRtl?"left":"right"]:"var(--slider-range-end)"}}function yl(){return{touchAction:"none",userSelect:"none",position:"relative"}}function kl(e){const t=vl(e);return{"--slider-thumb-transform":e.isVertical?"translateY(50%)":e.isRtl?"translateX(50%)":"translateX(-50%)","--slider-thumb-offset":Di(e),"--slider-range-start":t.start,"--slider-range-end":t.end}}function xl(e,t){return{visibility:yr(e),position:"absolute",pointerEvents:"none",[e.isHorizontal?"insetInlineStart":"bottom"]:Di({...e,value:t}),translate:"var(--tx) var(--ty)","--tx":e.isHorizontal?e.isRtl?"50%":"-50%":"0%","--ty":e.isHorizontal?"0%":"50%"}}function El(){return{userSelect:"none"}}function wl(){return{position:"relative"}}function _l(){return{userSelect:"none",pointerEvents:"none",position:"relative"}}var Cl={getThumbOffset:Di,getControlStyle:yl,getThumbStyle:ml,getRangeStyle:bl,getRootStyle:kl,getMarkerStyle:xl,getLabelStyle:El,getTrackStyle:wl,getMarkerGroupStyle:_l},it=Me({...Cl,getRootId:e=>{var t;return((t=e.ids)==null?void 0:t.root)??`slider:${e.id}`},getThumbId:e=>{var t;return((t=e.ids)==null?void 0:t.thumb)??`slider:${e.id}:thumb`},getControlId:e=>{var t;return((t=e.ids)==null?void 0:t.control)??`slider:${e.id}:control`},getHiddenInputId:e=>{var t;return((t=e.ids)==null?void 0:t.hiddenInput)??`slider:${e.id}:input`},getOutputId:e=>{var t;return((t=e.ids)==null?void 0:t.output)??`slider:${e.id}:output`},getTrackId:e=>{var t;return((t=e.ids)==null?void 0:t.track)??`slider:${e.id}track`},getRangeId:e=>{var t;return((t=e.ids)==null?void 0:t.track)??`slider:${e.id}:range`},getLabelId:e=>{var t;return((t=e.ids)==null?void 0:t.label)??`slider:${e.id}:label`},getMarkerId:(e,t)=>`slider:${e.id}:marker:${t}`,getRootEl:e=>it.getById(e,it.getRootId(e)),getThumbEl:e=>it.getById(e,it.getThumbId(e)),getControlEl:e=>it.getById(e,it.getControlId(e)),getHiddenInputEl:e=>it.getById(e,it.getHiddenInputId(e)),getValueFromPoint(e,t){const n=it.getControlEl(e);if(!n)return;const i=vr(t,n).getPercentValue({orientation:e.orientation,dir:e.dir,inverted:{y:!0}});return br(i,e.min,e.max,e.step)},dispatchChangeEvent(e){const t=it.getHiddenInputEl(e);t&&cr(t,{value:e.value})}}),Sl=$t("range-slider").parts("root","label","thumb","output","track","range","control","markerGroup","marker");Sl.build();function Al(e){const t=e[0],n=e[e.length-1];return[t,n]}function Fl(e){const[t,n]=Al(e.valuePercent);return{start:`${t}%`,end:`${100-n}%`}}function Tl(e){let t="visible";return e.thumbAlignment==="contain"&&!e.hasMeasuredThumbSize&&(t="hidden"),t}function Dl(e,t){const n=e.isVertical?"bottom":"insetInlineStart";return{visibility:Tl(e),position:"absolute",transform:"var(--slider-thumb-transform)",[n]:`var(--slider-thumb-offset-${t})`}}function Il(e){const t=Fl(e);return{...e.value.reduce((n,i,o)=>{const r=it.getThumbOffset({...e,value:i});return{...n,[`--slider-thumb-offset-${o}`]:r}},{}),"--slider-thumb-transform":e.isVertical?"translateY(50%)":e.isRtl?"translateX(50%)":"translateX(-50%)","--slider-range-start":t.start,"--slider-range-end":t.end}}var Ol={getRootStyle:Il,getControlStyle:it.getControlStyle,getThumbStyle:Dl,getRangeStyle:it.getRangeStyle,getMarkerStyle:it.getMarkerStyle,getMarkerGroupStyle:it.getMarkerGroupStyle},st=Me({...Ol,getRootId:e=>{var t;return((t=e.ids)==null?void 0:t.root)??`slider:${e.id}`},getThumbId:(e,t)=>{var n,i;return((i=(n=e.ids)==null?void 0:n.thumb)==null?void 0:i.call(n,t))??`slider:${e.id}:thumb:${t}`},getHiddenInputId:(e,t)=>`slider:${e.id}:input:${t}`,getControlId:e=>{var t;return((t=e.ids)==null?void 0:t.control)??`slider:${e.id}:control`},getTrackId:e=>{var t;return((t=e.ids)==null?void 0:t.track)??`slider:${e.id}:track`},getRangeId:e=>{var t;return((t=e.ids)==null?void 0:t.range)??`slider:${e.id}:range`},getLabelId:e=>{var t;return((t=e.ids)==null?void 0:t.label)??`slider:${e.id}:label`},getOutputId:e=>{var t;return((t=e.ids)==null?void 0:t.output)??`slider:${e.id}:output`},getMarkerId:(e,t)=>{var n,i;return((i=(n=e.ids)==null?void 0:n.marker)==null?void 0:i.call(n,t))??`slider:${e.id}:marker:${t}`},getRootEl:e=>st.getById(e,st.getRootId(e)),getThumbEl:(e,t)=>st.getById(e,st.getThumbId(e,t)),getHiddenInputEl:(e,t)=>st.getById(e,st.getHiddenInputId(e,t)),getControlEl:e=>st.getById(e,st.getControlId(e)),getElements:e=>or(st.getControlEl(e),"[role=slider]"),getFirstEl:e=>st.getElements(e)[0],getRangeEl:e=>st.getById(e,st.getRangeId(e)),getValueFromPoint(e,t){const n=st.getControlEl(e);if(!n)return;const i=vr(t,n).getPercentValue({orientation:e.orientation,dir:e.dir,inverted:{y:!0}});return br(i,e.min,e.max,e.step)},dispatchChangeEvent(e){Array.from(e.value).forEach((t,n)=>{const i=st.getHiddenInputEl(e,n);i&&cr(i,{value:t})})}}),Ml=$t("radio-group").parts("root","label","radio","radioLabel","radioControl","indicator");Ml.build();var J=Me({getRootId:e=>{var t;return((t=e.ids)==null?void 0:t.root)??`radio-group:${e.id}`},getLabelId:e=>{var t;return((t=e.ids)==null?void 0:t.label)??`radio-group:${e.id}:label`},getRadioId:(e,t)=>{var n,i;return((i=(n=e.ids)==null?void 0:n.radio)==null?void 0:i.call(n,t))??`radio-group:${e.id}:radio:${t}`},getRadioHiddenInputId:(e,t)=>{var n,i;return((i=(n=e.ids)==null?void 0:n.radioHiddenInput)==null?void 0:i.call(n,t))??`radio-group:${e.id}:radio:input:${t}`},getRadioControlId:(e,t)=>{var n,i;return((i=(n=e.ids)==null?void 0:n.radioControl)==null?void 0:i.call(n,t))??`radio-group:${e.id}:radio:control:${t}`},getRadioLabelId:(e,t)=>{var n,i;return((i=(n=e.ids)==null?void 0:n.radioLabel)==null?void 0:i.call(n,t))??`radio-group:${e.id}:radio:label:${t}`},getIndicatorId:e=>{var t;return((t=e.ids)==null?void 0:t.indicator)??`radio-group:${e.id}:indicator`},getRootEl:e=>J.getById(e,J.getRootId(e)),getRadioHiddenInputEl:(e,t)=>J.getById(e,J.getRadioHiddenInputId(e,t)),getIndicatorEl:e=>J.getById(e,J.getIndicatorId(e)),getFirstEnabledInputEl:e=>{var t;return(t=J.getRootEl(e))==null?void 0:t.querySelector("input:not(:disabled)")},getFirstEnabledAndCheckedInputEl:e=>{var t;return(t=J.getRootEl(e))==null?void 0:t.querySelector("input:not(:disabled):checked")},getInputEls:e=>{const t=`input[type=radio][data-ownedby='${CSS.escape(J.getRootId(e))}']:not([disabled])`;return or(J.getRootEl(e),t)},getActiveRadioEl:e=>{if(e.value)return J.getById(e,J.getRadioId(e,e.value))},getOffsetRect:e=>({left:e?.offsetLeft??0,top:e?.offsetTop??0,width:e?.offsetWidth??0,height:e?.offsetHeight??0}),getRectById:(e,t)=>{const n=J.getById(e,J.getRadioId(e,t));if(n)return J.resolveRect(J.getOffsetRect(n))},resolveRect:e=>({width:`${e.width}px`,height:`${e.height}px`,left:`${e.left}px`,top:`${e.top}px`})});const Pl=yt({__name:"Flex",props:{is:{type:[Object,Function],default:"div"},gap:{default:"default"},justify:{},align:{},direction:{default:"row"},nowrap:{type:Boolean}},setup(e){const t=e,n=lt(()=>ta("flex",{justify:Ji(t.justify)||"initial",align:Ji(t.align)||"initial",wrap:t.nowrap?"nowrap":"wrap",gap:Qs(t.gap),direction:t.direction}));return(i,o)=>(z(),pt(En(i.is),{class:"k-flex",style:_n(n.value)},{default:_t(()=>[Z(i.$slots,"default")]),_:3},8,["style"]))}});var fe=new WeakMap,mt=[];function Bl(e,t={}){const{rootEl:n}=t,i=e.filter(Boolean);if(i.length===0)return;const o=i[0].ownerDocument||document,r=o.defaultView??window,s=new Set(i),l=new Set,a=n??o.body;let c=p=>{for(let k of p.querySelectorAll("[data-live-announcer], [data-zag-top-layer]"))s.add(k);let v=k=>{if(s.has(k)||l.has(k.parentElement)&&k.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let M of s)if(k.contains(M))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},f=o.createTreeWalker(p,NodeFilter.SHOW_ELEMENT,{acceptNode:v}),b=v(p);if(b===NodeFilter.FILTER_ACCEPT&&u(p),b!==NodeFilter.FILTER_REJECT){let k=f.nextNode();for(;k!=null;)u(k),k=f.nextNode()}},u=p=>{let v=fe.get(p)??0;p.getAttribute("aria-hidden")==="true"&&v===0||(v===0&&p.setAttribute("aria-hidden","true"),l.add(p),fe.set(p,v+1))};mt.length&&mt[mt.length-1].disconnect(),c(a);const d=new r.MutationObserver(p=>{for(let v of p)if(!(v.type!=="childList"||v.addedNodes.length===0)&&![...s,...l].some(f=>f.contains(v.target))){for(let f of v.removedNodes)f instanceof r.Element&&(s.delete(f),l.delete(f));for(let f of v.addedNodes)(f instanceof r.HTMLElement||f instanceof r.SVGElement)&&(f.dataset.liveAnnouncer==="true"||f.dataset.zagTopLayer==="true")?s.add(f):f instanceof r.Element&&c(f)}});d.observe(a,{childList:!0,subtree:!0});let h={observe(){d.observe(a,{childList:!0,subtree:!0})},disconnect(){d.disconnect()}};return mt.push(h),()=>{d.disconnect();for(let p of l){let v=fe.get(p);v===1?(p.removeAttribute("aria-hidden"),fe.delete(p)):fe.set(p,v-1)}h===mt[mt.length-1]?(mt.pop(),mt.length&&mt[mt.length-1].observe()):mt.splice(mt.indexOf(h),1)}}function Rl(e,t={}){const{defer:n}=t,i=n?Oe:r=>r(),o=[];return o.push(i(()=>{const r=typeof e=="function"?e():e;o.push(Bl(r,t))})),()=>{o.forEach(r=>r?.())}}var jl=e=>typeof e=="object"&&e!==null&&e.nodeType===1;function Nl(e){return jl(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1}var Ll="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type";function kr(e){return!e||e.closest("[inert]")?!1:e.matches(Ll)&&Nl(e)}function Vl(e){const t={each(n){var i;for(let o=0;o<((i=e.frames)==null?void 0:i.length);o+=1){const r=e.frames[o];r&&n(r)}},addEventListener(n,i,o){return t.each(r=>{try{r.document.addEventListener(n,i,o)}catch(s){console.warn(s)}}),()=>{try{t.removeEventListener(n,i,o)}catch(r){console.warn(r)}}},removeEventListener(n,i,o){t.each(r=>{try{r.document.removeEventListener(n,i,o)}catch(s){console.warn(s)}})}};return t}var fo="pointerdown.outside",go="focus.outside";function $l(e){const t=e.composedPath()??[e.target];for(const n of t)if(sn(n)&&kr(n))return!0;return!1}var zl=e=>"clientY"in e;function Hl(e,t){if(!zl(t)||!e)return!1;const n=e.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function Ul(e,t){const{exclude:n,onFocusOutside:i,onPointerDownOutside:o,onInteractOutside:r}=t;if(!e)return;const s=Ai(e),l=la(e),a=Vl(l);function c(f){const b=ln(f);return!sn(b)||an(e,b)||Hl(e,f)?!1:!(n!=null&&n(b))}let u;function d(f){function b(){if(!(!e||!c(f))){if(o||r){const k=lo(o,r);e.addEventListener(fo,k,{once:!0})}ho(e,fo,{bubbles:!1,cancelable:!0,detail:{originalEvent:f,contextmenu:al(f),focusable:$l(f)}})}}f.pointerType==="touch"?(a.removeEventListener("click",b),s.removeEventListener("click",b),u=b,s.addEventListener("click",b,{once:!0}),a.addEventListener("click",b,{once:!0})):b()}const h=new Set,p=setTimeout(()=>{h.add(a.addEventListener("pointerdown",d,!0)),h.add(di(s,"pointerdown",d,!0))},0);function v(f){if(!(!e||!c(f))){if(i||r){const b=lo(i,r);e.addEventListener(go,b,{once:!0})}ho(e,go,{bubbles:!1,cancelable:!0,detail:{originalEvent:f,contextmenu:!1,focusable:kr(ln(f))}})}}return h.add(di(s,"focusin",v,!0)),h.add(a.addEventListener("focusin",v,!0)),()=>{clearTimeout(p),u&&(a.removeEventListener("click",u),s.removeEventListener("click",u)),h.forEach(f=>f())}}function Gl(e,t){const{defer:n}=t,i=n?Oe:r=>r(),o=[];return o.push(i(()=>{const r=typeof e=="function"?e():e;o.push(Ul(r,t))})),()=>{o.forEach(r=>r?.())}}function Yl(e,t){const n=i=>{i.key==="Escape"&&t?.(i)};return di(Ai(e),"keydown",n)}var Et={layers:[],branches:[],count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){var t;const n=this.indexOf(e),i=this.topMostPointerBlockingLayer()?this.indexOf((t=this.topMostPointerBlockingLayer())==null?void 0:t.node):-1;return n<i},isTopMost(e){const t=this.layers[this.count()-1];return t?.node===e},getNestedLayers(e){return Array.from(this.layers).slice(this.indexOf(e)+1)},isInNestedLayer(e,t){return this.getNestedLayers(e).some(n=>an(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>an(t,e))},add(e){this.layers.push(e)},addBranch(e){this.branches.push(e)},remove(e){const t=this.indexOf(e);t<0||(t<this.count()-1&&this.getNestedLayers(e).forEach(n=>n.dismiss()),this.layers.splice(t,1))},removeBranch(e){const t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e){var t;(t=this.layers[this.indexOf(e)])==null||t.dismiss()},clear(){this.remove(this.layers[0].node)}},mo;function vo(){Et.layers.forEach(({node:e})=>{e.style.pointerEvents=Et.isBelowPointerBlockingLayer(e)?"none":"auto"})}function ql(e){e.style.pointerEvents=""}var $n="data-inert";function Xl(e){const t=Ai(e);return Et.hasPointerBlockingLayer()&&!t.body.hasAttribute($n)&&(mo=document.body.style.pointerEvents,t.body.style.pointerEvents="none",t.body.setAttribute($n,"")),()=>{Et.hasPointerBlockingLayer()||(t.body.style.pointerEvents=mo,t.body.removeAttribute($n),t.body.style.length===0&&t.body.removeAttribute("style"))}}function Wl(e,t){if(!e){ja("[@zag-js/dismissable] node is `null` or `undefined`");return}const{onDismiss:n,pointerBlocking:i,exclude:o,debug:r}=t,s={dismiss:n,node:e,pointerBlocking:i};Et.add(s),vo();function l(h){var p,v;const f=ln(h.detail.originalEvent);Et.isBelowPointerBlockingLayer(e)||Et.isInBranch(f)||((p=t.onPointerDownOutside)==null||p.call(t,h),(v=t.onInteractOutside)==null||v.call(t,h),!h.defaultPrevented&&(r&&console.log("onPointerDownOutside:",h.detail.originalEvent),n?.()))}function a(h){var p,v;const f=ln(h.detail.originalEvent);Et.isInBranch(f)||((p=t.onFocusOutside)==null||p.call(t,h),(v=t.onInteractOutside)==null||v.call(t,h),!h.defaultPrevented&&(r&&console.log("onFocusOutside:",h.detail.originalEvent),n?.()))}function c(h){var p;Et.isTopMost(e)&&((p=t.onEscapeKeyDown)==null||p.call(t,h),!h.defaultPrevented&&n&&(h.preventDefault(),n()))}function u(h){if(!e)return!1;const p=typeof o=="function"?o():o;return(Array.isArray(p)?p:[p]).some(v=>an(v,h))||Et.isInNestedLayer(e,h)}const d=[i?Xl(e):void 0,Yl(e,c),Gl(e,{exclude:u,onFocusOutside:a,onPointerDownOutside:l})];return()=>{Et.remove(e),vo(),ql(e),d.forEach(h=>h?.())}}function Kl(e,t){const{defer:n}=t,i=n?Oe:r=>r(),o=[];return o.push(i(()=>{const r=typeof e=="function"?e():e;o.push(Wl(r,t))})),()=>{o.forEach(r=>r?.())}}var zn="data-zag-scroll-lock";function bo(e,t){if(!e)return;const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function Zl(e,t,n){if(!e)return;const i=e.style.getPropertyValue(t);return e.style.setProperty(t,n),()=>{i?e.style.setProperty(t,i):e.style.removeProperty(t)}}function Ql(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function Jl(e){const t=e??document,n=t.defaultView??window,{documentElement:i,body:o}=t;if(o.hasAttribute(zn))return;o.setAttribute(zn,"");const r=n.innerWidth-i.clientWidth,s=()=>Zl(i,"--scrollbar-width",`${r}px`),l=Ql(i),a=()=>bo(o,{overflow:"hidden",[l]:`${r}px`}),c=()=>{const{scrollX:d,scrollY:h,visualViewport:p}=n,v=p?.offsetLeft??0,f=p?.offsetTop??0,b=bo(o,{position:"fixed",overflow:"hidden",top:`${-(h-Math.floor(f))}px`,left:`${-(d-Math.floor(v))}px`,right:"0",[l]:`${r}px`});return()=>{b?.(),n.scrollTo(d,h)}},u=[s(),pa()?c():a()];return()=>{u.forEach(d=>d?.()),o.removeAttribute(zn)}}/*!
|
|
2
|
+
* tabbable 6.2.0
|
|
3
|
+
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
4
|
+
*/var xr=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],pn=xr.join(","),Er=typeof Element>"u",te=Er?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,fn=!Er&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},gn=function e(t,n){var i;n===void 0&&(n=!0);var o=t==null||(i=t.getAttribute)===null||i===void 0?void 0:i.call(t,"inert"),r=o===""||o==="true",s=r||n&&t&&e(t.parentNode);return s},tu=function(e){var t,n=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return n===""||n==="true"},wr=function(e,t,n){if(gn(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(pn));return t&&te.call(e,pn)&&i.unshift(e),i=i.filter(n),i},_r=function e(t,n,i){for(var o=[],r=Array.from(t);r.length;){var s=r.shift();if(!gn(s,!1))if(s.tagName==="SLOT"){var l=s.assignedElements(),a=l.length?l:s.children,c=e(a,!0,i);i.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var u=te.call(s,pn);u&&i.filter(s)&&(n||!t.includes(s))&&o.push(s);var d=s.shadowRoot||typeof i.getShadowRoot=="function"&&i.getShadowRoot(s),h=!gn(d,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(s));if(d&&h){var p=e(d===!0?s.children:d.children,!0,i);i.flatten?o.push.apply(o,p):o.push({scopeParent:s,candidates:p})}else r.unshift.apply(r,s.children)}}return o},Cr=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Xt=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||tu(e))&&!Cr(e)?0:e.tabIndex},eu=function(e,t){var n=Xt(e);return n<0&&t&&!Cr(e)?0:n},nu=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Sr=function(e){return e.tagName==="INPUT"},iu=function(e){return Sr(e)&&e.type==="hidden"},ou=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(n){return n.tagName==="SUMMARY"});return t},ru=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},su=function(e){if(!e.name)return!0;var t=e.form||fn(e),n=function(r){return t.querySelectorAll('input[type="radio"][name="'+r+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=n(window.CSS.escape(e.name));else try{i=n(e.name)}catch(r){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",r.message),!1}var o=ru(i,e.form);return!o||o===e},au=function(e){return Sr(e)&&e.type==="radio"},lu=function(e){return au(e)&&!su(e)},uu=function(e){var t,n=e&&fn(e),i=(t=n)===null||t===void 0?void 0:t.host,o=!1;if(n&&n!==e){var r,s,l;for(o=!!((r=i)!==null&&r!==void 0&&(s=r.ownerDocument)!==null&&s!==void 0&&s.contains(i)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!o&&i;){var a,c,u;n=fn(i),i=(a=n)===null||a===void 0?void 0:a.host,o=!!((c=i)!==null&&c!==void 0&&(u=c.ownerDocument)!==null&&u!==void 0&&u.contains(i))}}return o},yo=function(e){var t=e.getBoundingClientRect(),n=t.width,i=t.height;return n===0&&i===0},cu=function(e,t){var n=t.displayCheck,i=t.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var o=te.call(e,"details>summary:first-of-type"),r=o?e.parentElement:e;if(te.call(r,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="legacy-full"){if(typeof i=="function"){for(var s=e;e;){var l=e.parentElement,a=fn(e);if(l&&!l.shadowRoot&&i(l)===!0)return yo(e);e.assignedSlot?e=e.assignedSlot:!l&&a!==e.ownerDocument?e=a.host:e=l}e=s}if(uu(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return yo(e);return!1},du=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var n=0;n<t.children.length;n++){var i=t.children.item(n);if(i.tagName==="LEGEND")return te.call(t,"fieldset[disabled] *")?!0:!i.contains(e)}return!0}t=t.parentElement}return!1},mn=function(e,t){return!(t.disabled||gn(t)||iu(t)||cu(t,e)||ou(t)||du(t))},pi=function(e,t){return!(lu(t)||Xt(t)<0||!mn(e,t))},hu=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},pu=function e(t){var n=[],i=[];return t.forEach(function(o,r){var s=!!o.scopeParent,l=s?o.scopeParent:o,a=eu(l,s),c=s?e(o.candidates):l;a===0?s?n.push.apply(n,c):n.push(l):i.push({documentOrder:r,tabIndex:a,item:o,isScope:s,content:c})}),i.sort(nu).reduce(function(o,r){return r.isScope?o.push.apply(o,r.content):o.push(r.content),o},[]).concat(n)},fu=function(e,t){t=t||{};var n;return t.getShadowRoot?n=_r([e],t.includeContainer,{filter:pi.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:hu}):n=wr(e,t.includeContainer,pi.bind(null,t)),pu(n)},gu=function(e,t){t=t||{};var n;return t.getShadowRoot?n=_r([e],t.includeContainer,{filter:mn.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):n=wr(e,t.includeContainer,mn.bind(null,t)),n},ie=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return te.call(e,pn)===!1?!1:pi(t,e)},mu=xr.concat("iframe").join(","),Hn=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return te.call(e,mu)===!1?!1:mn(t,e)};/*!
|
|
5
|
+
* focus-trap 7.5.2
|
|
6
|
+
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
7
|
+
*/function ko(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function xo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ko(Object(n),!0).forEach(function(i){vu(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ko(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function vu(e,t,n){return t=yu(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bu(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yu(e){var t=bu(e,"string");return typeof t=="symbol"?t:String(t)}var Eo={activateTrap:function(e,t){if(e.length>0){var n=e[e.length-1];n!==t&&n.pause()}var i=e.indexOf(t);i===-1||e.splice(i,1),e.push(t)},deactivateTrap:function(e,t){var n=e.indexOf(t);n!==-1&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},ku=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},xu=function(e){return e?.key==="Escape"||e?.key==="Esc"||e?.keyCode===27},we=function(e){return e?.key==="Tab"||e?.keyCode===9},Eu=function(e){return we(e)&&!e.shiftKey},wu=function(e){return we(e)&&e.shiftKey},wo=function(e){return setTimeout(e,0)},_o=function(e,t){var n=-1;return e.every(function(i,o){return t(i)?(n=o,!1):!0}),n},ge=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return typeof e=="function"?e.apply(void 0,n):e},ze=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},_u=[],Cu=function(e,t){var n=t?.document||document,i=t?.trapStack||_u,o=xo({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:Eu,isKeyBackward:wu},t),r={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},s,l=function(m,g,E){return m&&m[g]!==void 0?m[g]:o[E||g]},a=function(m,g){var E=typeof g?.composedPath=="function"?g.composedPath():void 0;return r.containerGroups.findIndex(function(I){var P=I.container,B=I.tabbableNodes;return P.contains(m)||E?.includes(P)||B.find(function(R){return R===m})})},c=function(m){var g=o[m];if(typeof g=="function"){for(var E=arguments.length,I=new Array(E>1?E-1:0),P=1;P<E;P++)I[P-1]=arguments[P];g=g.apply(void 0,I)}if(g===!0&&(g=void 0),!g){if(g===void 0||g===!1)return g;throw new Error("`".concat(m,"` was specified but was not a node, or did not return a node"))}var B=g;if(typeof g=="string"&&(B=n.querySelector(g),!B))throw new Error("`".concat(m,"` as selector refers to no known node"));return B},u=function(){var m=c("initialFocus");if(m===!1)return!1;if(m===void 0||!Hn(m,o.tabbableOptions))if(a(n.activeElement)>=0)m=n.activeElement;else{var g=r.tabbableGroups[0],E=g&&g.firstTabbableNode;m=E||c("fallbackFocus")}if(!m)throw new Error("Your focus-trap needs to have at least one focusable element");return m},d=function(){if(r.containerGroups=r.containers.map(function(m){var g=fu(m,o.tabbableOptions),E=gu(m,o.tabbableOptions),I=g.length>0?g[0]:void 0,P=g.length>0?g[g.length-1]:void 0,B=E.find(function(U){return ie(U)}),R=E.slice().reverse().find(function(U){return ie(U)}),N=!!g.find(function(U){return Xt(U)>0});return{container:m,tabbableNodes:g,focusableNodes:E,posTabIndexesFound:N,firstTabbableNode:I,lastTabbableNode:P,firstDomTabbableNode:B,lastDomTabbableNode:R,nextTabbableNode:function(U){var Pt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,Bt=g.indexOf(U);return Bt<0?Pt?E.slice(E.indexOf(U)+1).find(function(kt){return ie(kt)}):E.slice(0,E.indexOf(U)).reverse().find(function(kt){return ie(kt)}):g[Bt+(Pt?1:-1)]}}}),r.tabbableGroups=r.containerGroups.filter(function(m){return m.tabbableNodes.length>0}),r.tabbableGroups.length<=0&&!c("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(r.containerGroups.find(function(m){return m.posTabIndexesFound})&&r.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},h=function m(g){if(g!==!1&&g!==n.activeElement){if(!g||!g.focus){m(u());return}g.focus({preventScroll:!!o.preventScroll}),r.mostRecentlyFocusedNode=g,ku(g)&&g.select()}},p=function(m){var g=c("setReturnFocus",m);return g||(g===!1?!1:m)},v=function(m){var g=m.target,E=m.event,I=m.isBackward,P=I===void 0?!1:I;g=g||ze(E),d();var B=null;if(r.tabbableGroups.length>0){var R=a(g,E),N=R>=0?r.containerGroups[R]:void 0;if(R<0)P?B=r.tabbableGroups[r.tabbableGroups.length-1].lastTabbableNode:B=r.tabbableGroups[0].firstTabbableNode;else if(P){var U=_o(r.tabbableGroups,function(Dn){var In=Dn.firstTabbableNode;return g===In});if(U<0&&(N.container===g||Hn(g,o.tabbableOptions)&&!ie(g,o.tabbableOptions)&&!N.nextTabbableNode(g,!1))&&(U=R),U>=0){var Pt=U===0?r.tabbableGroups.length-1:U-1,Bt=r.tabbableGroups[Pt];B=Xt(g)>=0?Bt.lastTabbableNode:Bt.lastDomTabbableNode}else we(E)||(B=N.nextTabbableNode(g,!1))}else{var kt=_o(r.tabbableGroups,function(Dn){var In=Dn.lastTabbableNode;return g===In});if(kt<0&&(N.container===g||Hn(g,o.tabbableOptions)&&!ie(g,o.tabbableOptions)&&!N.nextTabbableNode(g))&&(kt=R),kt>=0){var Lr=kt===r.tabbableGroups.length-1?0:kt+1,Pi=r.tabbableGroups[Lr];B=Xt(g)>=0?Pi.firstTabbableNode:Pi.firstDomTabbableNode}else we(E)||(B=N.nextTabbableNode(g))}}else B=c("fallbackFocus");return B},f=function(m){var g=ze(m);if(!(a(g,m)>=0)){if(ge(o.clickOutsideDeactivates,m)){s.deactivate({returnFocus:o.returnFocusOnDeactivate});return}ge(o.allowOutsideClick,m)||m.preventDefault()}},b=function(m){var g=ze(m),E=a(g,m)>=0;if(E||g instanceof Document)E&&(r.mostRecentlyFocusedNode=g);else{m.stopImmediatePropagation();var I,P=!0;if(r.mostRecentlyFocusedNode)if(Xt(r.mostRecentlyFocusedNode)>0){var B=a(r.mostRecentlyFocusedNode),R=r.containerGroups[B].tabbableNodes;if(R.length>0){var N=R.findIndex(function(U){return U===r.mostRecentlyFocusedNode});N>=0&&(o.isKeyForward(r.recentNavEvent)?N+1<R.length&&(I=R[N+1],P=!1):N-1>=0&&(I=R[N-1],P=!1))}}else r.containerGroups.some(function(U){return U.tabbableNodes.some(function(Pt){return Xt(Pt)>0})})||(P=!1);else P=!1;P&&(I=v({target:r.mostRecentlyFocusedNode,isBackward:o.isKeyBackward(r.recentNavEvent)})),h(I||r.mostRecentlyFocusedNode||u())}r.recentNavEvent=void 0},k=function(m){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;r.recentNavEvent=m;var E=v({event:m,isBackward:g});E&&(we(m)&&m.preventDefault(),h(E))},M=function(m){if(xu(m)&&ge(o.escapeDeactivates,m)!==!1){m.preventDefault(),s.deactivate();return}(o.isKeyForward(m)||o.isKeyBackward(m))&&k(m,o.isKeyBackward(m))},O=function(m){var g=ze(m);a(g,m)>=0||ge(o.clickOutsideDeactivates,m)||ge(o.allowOutsideClick,m)||(m.preventDefault(),m.stopImmediatePropagation())},F=function(){if(r.active)return Eo.activateTrap(i,s),r.delayInitialFocusTimer=o.delayInitialFocus?wo(function(){h(u())}):h(u()),n.addEventListener("focusin",b,!0),n.addEventListener("mousedown",f,{capture:!0,passive:!1}),n.addEventListener("touchstart",f,{capture:!0,passive:!1}),n.addEventListener("click",O,{capture:!0,passive:!1}),n.addEventListener("keydown",M,{capture:!0,passive:!1}),s},H=function(){if(r.active)return n.removeEventListener("focusin",b,!0),n.removeEventListener("mousedown",f,!0),n.removeEventListener("touchstart",f,!0),n.removeEventListener("click",O,!0),n.removeEventListener("keydown",M,!0),s},A=function(m){var g=m.some(function(E){var I=Array.from(E.removedNodes);return I.some(function(P){return P===r.mostRecentlyFocusedNode})});g&&h(u())},G=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(A):void 0,_=function(){G&&(G.disconnect(),r.active&&!r.paused&&r.containers.map(function(m){G.observe(m,{subtree:!0,childList:!0})}))};return s={get active(){return r.active},get paused(){return r.paused},activate:function(m){if(r.active)return this;var g=l(m,"onActivate"),E=l(m,"onPostActivate"),I=l(m,"checkCanFocusTrap");I||d(),r.active=!0,r.paused=!1,r.nodeFocusedBeforeActivation=n.activeElement,g?.();var P=function(){I&&d(),F(),_(),E?.()};return I?(I(r.containers.concat()).then(P,P),this):(P(),this)},deactivate:function(m){if(!r.active)return this;var g=xo({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},m);clearTimeout(r.delayInitialFocusTimer),r.delayInitialFocusTimer=void 0,H(),r.active=!1,r.paused=!1,_(),Eo.deactivateTrap(i,s);var E=l(g,"onDeactivate"),I=l(g,"onPostDeactivate"),P=l(g,"checkCanReturnFocus"),B=l(g,"returnFocus","returnFocusOnDeactivate");E?.();var R=function(){wo(function(){B&&h(p(r.nodeFocusedBeforeActivation)),I?.()})};return B&&P?(P(p(r.nodeFocusedBeforeActivation)).then(R,R),this):(R(),this)},pause:function(m){if(r.paused||!r.active)return this;var g=l(m,"onPause"),E=l(m,"onPostPause");return r.paused=!0,g?.(),H(),_(),E?.(),this},unpause:function(m){if(!r.paused||!r.active)return this;var g=l(m,"onUnpause"),E=l(m,"onPostUnpause");return r.paused=!1,g?.(),d(),F(),_(),E?.(),this},updateContainerElements:function(m){var g=[].concat(m).filter(Boolean);return r.containers=g.map(function(E){return typeof E=="string"?n.querySelector(E):E}),r.active&&d(),_(),this}},s.updateContainerElements(e),s},Su=$t("dialog").parts("trigger","backdrop","container","content","title","description","closeTrigger"),Ht=Su.build(),V=Me({getContainerId:e=>{var t;return((t=e.ids)==null?void 0:t.container)??`dialog:${e.id}:container`},getBackdropId:e=>{var t;return((t=e.ids)==null?void 0:t.backdrop)??`dialog:${e.id}:backdrop`},getContentId:e=>{var t;return((t=e.ids)==null?void 0:t.content)??`dialog:${e.id}:content`},getTriggerId:e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`dialog:${e.id}:trigger`},getTitleId:e=>{var t;return((t=e.ids)==null?void 0:t.title)??`dialog:${e.id}:title`},getDescriptionId:e=>{var t;return((t=e.ids)==null?void 0:t.description)??`dialog:${e.id}:description`},getCloseTriggerId:e=>{var t;return((t=e.ids)==null?void 0:t.closeTrigger)??`dialog:${e.id}:close`},getContentEl:e=>V.getById(e,V.getContentId(e)),getTriggerEl:e=>V.getById(e,V.getTriggerId(e)),getContainerEl:e=>V.getById(e,V.getContainerId(e)),getTitleEl:e=>V.getById(e,V.getTitleId(e)),getDescriptionEl:e=>V.getById(e,V.getDescriptionId(e))});function Au(e,t,n){const i=e.context["aria-label"],o=e.matches("open"),r=e.context.renderedElements;return{isOpen:o,open(){t("OPEN")},close(){t("CLOSE")},triggerProps:n.button({...Ht.trigger.attrs,id:V.getTriggerId(e.context),"aria-haspopup":"dialog",type:"button","aria-expanded":o,"data-state":o?"open":"closed","aria-controls":V.getContentId(e.context),onClick(){t("TOGGLE")}}),backdropProps:n.element({...Ht.backdrop.attrs,hidden:!o,id:V.getBackdropId(e.context),"data-state":o?"open":"closed"}),containerProps:n.element({...Ht.container.attrs,hidden:!o,id:V.getContainerId(e.context),"data-state":o?"open":"closed",style:{pointerEvents:o?void 0:"none"}}),contentProps:n.element({...Ht.content.attrs,role:e.context.role,hidden:!o,id:V.getContentId(e.context),tabIndex:-1,"data-state":o?"open":"closed","aria-modal":!0,"aria-label":i||void 0,"aria-labelledby":i||!r.title?void 0:V.getTitleId(e.context),"aria-describedby":r.description?V.getDescriptionId(e.context):void 0}),titleProps:n.element({...Ht.title.attrs,id:V.getTitleId(e.context)}),descriptionProps:n.element({...Ht.description.attrs,id:V.getDescriptionId(e.context)}),closeTriggerProps:n.button({...Ht.closeTrigger.attrs,id:V.getCloseTriggerId(e.context),type:"button",onClick(s){s.stopPropagation(),t("CLOSE")}})}}function Fu(e){const t=dr(e);return Ma({id:"dialog",initial:t.open?"open":"closed",context:{role:"dialog",renderedElements:{title:!0,description:!0},modal:!0,trapFocus:!0,preventScroll:!0,closeOnOutsideClick:!0,closeOnEsc:!0,restoreFocus:!0,...t},watch:{open:["toggleVisibility"]},states:{open:{entry:["checkRenderedElements"],activities:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{CLOSE:{target:"closed",actions:["invokeOnClose","restoreFocus"]},TOGGLE:{target:"closed",actions:["invokeOnClose","restoreFocus"]}}},closed:{on:{OPEN:{target:"open",actions:["invokeOnOpen"]},TOGGLE:{target:"open",actions:["invokeOnOpen"]}}}}},{activities:{trackDismissableElement(n,i,{send:o}){return Kl(()=>V.getContentEl(n),{defer:!0,pointerBlocking:n.modal,exclude:[V.getTriggerEl(n)],onDismiss(){o({type:"CLOSE",src:"interact-outside"})},onEscapeKeyDown(r){var s;n.closeOnEsc?o({type:"CLOSE",src:"escape-key"}):r.preventDefault(),(s=n.onEsc)==null||s.call(n)},onPointerDownOutside(r){var s;n.closeOnOutsideClick||r.preventDefault(),(s=n.onOutsideClick)==null||s.call(n)}})},preventScroll(n){if(n.preventScroll)return Jl(V.getDoc(n))},trapFocus(n){if(!n.trapFocus)return;let i;return fa(()=>{const o=V.getContentEl(n);if(o){i=Cu(o,{document:V.getDoc(n),escapeDeactivates:!1,preventScroll:!0,returnFocusOnDeactivate:!1,fallbackFocus:o,allowOutsideClick:!0,initialFocus:ao(n.initialFocusEl)});try{i.activate()}catch{}}}),()=>i?.deactivate()},hideContentBelow(n){return n.modal?Rl(()=>[V.getContainerEl(n)],{defer:!0}):void 0}},actions:{checkRenderedElements(n){Oe(()=>{n.renderedElements.title=!!V.getTitleEl(n),n.renderedElements.description=!!V.getDescriptionEl(n)})},invokeOnClose(n){var i;(i=n.onClose)==null||i.call(n)},invokeOnOpen(n){var i;(i=n.onOpen)==null||i.call(n)},toggleVisibility(n,i,{send:o}){o({type:n.open?"OPEN":"CLOSE",src:"controlled"})},restoreFocus(n){n.restoreFocus&&Oe(()=>{const i=ao(n.finalFocusEl)??V.getTriggerEl(n);i?.focus({preventScroll:!0})})}}})}const Tu=["data-id"],Du=["data-id"],Iu=["data-id"],Ou={class:"k-dialog__card-header"},Mu=yt({__name:"Dialog",props:{title:{},description:{},closeOnOutsideClick:{type:Boolean,default:!0},role:{default:"dialog"},alignment:{default:"top"},triggerLabel:{},showCloseTrigger:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},dialogId:{}},emits:["open","close","clickoutside"],setup(e,{expose:t,emit:n}){const i=e,[o,r]=Ua(Fu({id:Ga({prefix:"dialog"}),closeOnOutsideClick:i.closeOnOutsideClick,closeOnEsc:i.closeOnEsc,modal:!0,role:i.role,onClose(){i.closeOnEsc&&n("close")},onOpen(){n("open")},onOutsideClick(){n("clickoutside")}}),{context:lt(()=>i)}),s=lt(()=>Au(o.value,r,za)),l=a=>i.dialogId?`${i.dialogId}-${a}`:"";return t({open:s.value.open,close:s.value.close}),(a,c)=>(z(),ot("div",{class:"k-dialog","data-id":a.dialogId},[Z(a.$slots,"trigger",{triggerProps:s.value.triggerProps},()=>[a.triggerLabel?(z(),pt(Ie,At({key:0,class:"k-dialog__trigger",variant:"secondary"},s.value.triggerProps),{default:_t(()=>[yi(Vt(a.triggerLabel),1)]),_:1},16)):et("",!0)]),(z(),pt(Hr,{to:"body"},[s.value.isOpen?(z(),ot($r,{key:0},[Wt("div",At({class:"k-dialog__backdrop"},s.value.backdropProps,{"data-id":l("backdrop")}),null,16,Du),Wt("div",At({class:`k-dialog__container k-dialog--align-${a.alignment}`},s.value.containerProps,{"data-id":l("container")}),[ce(sl,At({class:"k-dialog__card",variant:"shadow"},s.value.contentProps,{"data-id":l("dialog")}),zr({default:_t(()=>[Z(a.$slots,"header",{titleProps:s.value.titleProps,descriptionProps:s.value.descriptionProps,closeTriggerProps:s.value.closeTriggerProps},()=>[Wt("div",Ou,[Z(a.$slots,"title",{titleProps:s.value.titleProps},()=>[Wt("h2",At({class:"k-dialog__title"},s.value.titleProps),Vt(a.title),17)]),Z(a.$slots,"description",{descriptionProps:s.value.descriptionProps},()=>[a.description?(z(),ot("span",At({key:0,class:"k-dialog__description"},s.value.descriptionProps),Vt(a.description),17)):et("",!0)]),a.showCloseTrigger?(z(),pt(Ie,At({key:0,class:"k-dialog__close-trigger",variant:"tertiary",icon:"fa-pro-light:times",size:"small"},s.value.closeTriggerProps),null,16)):et("",!0)])]),Z(a.$slots,"default",{descriptionProps:s.value.descriptionProps})]),_:2},[a.$slots.footer?{name:"footer",fn:_t(()=>[Z(a.$slots,"footer",{close:s.value.close})]),key:"0"}:void 0]),1040,["data-id"])],16,Iu)],64)):et("",!0)]))],8,Tu))}});Bi({title:{},description:{},confirmLabel:{default:"Confirm"},cancelLabel:{default:"Cancel"},type:{default:"info"}},{open:{type:Boolean,default:!1}}),Bi(["cancel","confirm"],["update:open"]);function Fn(){this._types=Object.create(null),this._extensions=Object.create(null);for(let e=0;e<arguments.length;e++)this.define(arguments[e]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}Fn.prototype.define=function(e,t){for(let n in e){let i=e[n].map(function(o){return o.toLowerCase()});n=n.toLowerCase();for(let o=0;o<i.length;o++){const r=i[o];if(r[0]!=="*"){if(!t&&r in this._types)throw new Error('Attempt to change mapping for "'+r+'" extension from "'+this._types[r]+'" to "'+n+'". Pass `force=true` to allow this, otherwise remove "'+r+'" from the list of extensions for "'+n+'".');this._types[r]=n}}if(t||!this._extensions[n]){const o=i[0];this._extensions[n]=o[0]!=="*"?o:o.substr(1)}}};Fn.prototype.getType=function(e){e=String(e);let t=e.replace(/^.*[/\\]/,"").toLowerCase(),n=t.replace(/^.*\./,"").toLowerCase(),i=t.length<e.length;return(n.length<t.length-1||!i)&&this._types[n]||null};Fn.prototype.getExtension=function(e){return e=/^\s*([^;\s]*)/.test(e)&&RegExp.$1,e&&this._extensions[e.toLowerCase()]||null};var Pu=Fn,Bu={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]};let Ru=Pu;new Ru(Bu);const ju=yt({__name:"CreateTrigger",props:{label:{}},setup(e){return(t,n)=>(z(),pt(Ie,{type:"button",class:"k-media-image-create-trigger",label:t.label,iconRight:"fa6-solid:image"},null,8,["label"]))}}),Nu=yt({__name:"Thumbnail",props:{value:{}},setup(e){const t=e,n=lt(()=>({backgroundImage:`url(${t.value.url})`}));return(i,o)=>(z(),ot("div",{class:"k-media-image__thumbnail",style:_n(n.value),onClick:o[0]||(o[0]=r=>i.$emit("click"))},null,4))}}),Lu=yt({__name:"Preview",props:{value:{},size:{}},setup(e){const t=e,n=lt(()=>({padding:t.size==="cover"?"0":"1rem",backgroundSize:t.size,backgroundImage:`url(${t.value.url})`}));return(i,o)=>(z(),ot("div",{class:"k-media-image-preview",style:_n(n.value)},null,4))}});On(ju),On(Nu),On(Lu);/**!
|
|
8
|
+
* Sortable 1.14.0
|
|
9
|
+
* @author RubaXa <trash@rubaxa.org>
|
|
10
|
+
* @author owenm <owen23355@gmail.com>
|
|
11
|
+
* @license MIT
|
|
12
|
+
*/function Co(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function St(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Co(Object(n),!0).forEach(function(i){Vu(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Co(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Ze(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ze=function(t){return typeof t}:Ze=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ze(e)}function Vu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ot(){return Ot=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Ot.apply(this,arguments)}function $u(e,t){if(e==null)return{};var n={},i=Object.keys(e),o,r;for(r=0;r<i.length;r++)o=i[r],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function zu(e,t){if(e==null)return{};var n=$u(e,t),i,o;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}var Hu="1.14.0";function It(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var Mt=It(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Be=It(/Edge/i),So=It(/firefox/i),_e=It(/safari/i)&&!It(/chrome/i)&&!It(/android/i),Ar=It(/iP(ad|od|hone)/i),Uu=It(/chrome/i)&&It(/android/i),Fr={capture:!1,passive:!1};function L(e,t,n){e.addEventListener(t,n,!Mt&&Fr)}function j(e,t,n){e.removeEventListener(t,n,!Mt&&Fr)}function vn(e,t){if(t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function Gu(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function wt(e,t,n,i){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&vn(e,t):vn(e,t))||i&&e===n)return e;if(e===n)break}while(e=Gu(e))}return null}var Ao=/\s+/g;function ut(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var i=(" "+e.className+" ").replace(Ao," ").replace(" "+t+" "," ");e.className=(i+(n?" "+t:"")).replace(Ao," ")}}function C(e,t,n){var i=e&&e.style;if(i){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in i)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),i[t]=n+(typeof n=="string"?"":"px")}}function de(e,t){var n="";if(typeof e=="string")n=e;else do{var i=C(e,"transform");i&&i!=="none"&&(n=i+" "+n)}while(!t&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function Tr(e,t,n){if(e){var i=e.getElementsByTagName(t),o=0,r=i.length;if(n)for(;o<r;o++)n(i[o],o);return i}return[]}function Ct(){var e=document.scrollingElement;return e||document.documentElement}function K(e,t,n,i,o){if(!(!e.getBoundingClientRect&&e!==window)){var r,s,l,a,c,u,d;if(e!==window&&e.parentNode&&e!==Ct()?(r=e.getBoundingClientRect(),s=r.top,l=r.left,a=r.bottom,c=r.right,u=r.height,d=r.width):(s=0,l=0,a=window.innerHeight,c=window.innerWidth,u=window.innerHeight,d=window.innerWidth),(t||n)&&e!==window&&(o=o||e.parentNode,!Mt))do if(o&&o.getBoundingClientRect&&(C(o,"transform")!=="none"||n&&C(o,"position")!=="static")){var h=o.getBoundingClientRect();s-=h.top+parseInt(C(o,"border-top-width")),l-=h.left+parseInt(C(o,"border-left-width")),a=s+r.height,c=l+r.width;break}while(o=o.parentNode);if(i&&e!==window){var p=de(o||e),v=p&&p.a,f=p&&p.d;p&&(s/=f,l/=v,d/=v,u/=f,a=s+u,c=l+d)}return{top:s,left:l,bottom:a,right:c,width:d,height:u}}}function Fo(e,t,n){for(var i=Lt(e,!0),o=K(e)[t];i;){var r=K(i)[n],s=void 0;if(n==="top"||n==="left"?s=o>=r:s=o<=r,!s)return i;if(i===Ct())break;i=Lt(i,!1)}return!1}function pe(e,t,n,i){for(var o=0,r=0,s=e.children;r<s.length;){if(s[r].style.display!=="none"&&s[r]!==S.ghost&&(i||s[r]!==S.dragged)&&wt(s[r],n.draggable,e,!1)){if(o===t)return s[r];o++}r++}return null}function Ii(e,t){for(var n=e.lastElementChild;n&&(n===S.ghost||C(n,"display")==="none"||t&&!vn(n,t));)n=n.previousElementSibling;return n||null}function vt(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==S.clone&&(!t||vn(e,t))&&n++;return n}function To(e){var t=0,n=0,i=Ct();if(e)do{var o=de(e),r=o.a,s=o.d;t+=e.scrollLeft*r,n+=e.scrollTop*s}while(e!==i&&(e=e.parentNode));return[t,n]}function Yu(e,t){for(var n in e)if(e.hasOwnProperty(n)){for(var i in t)if(t.hasOwnProperty(i)&&t[i]===e[n][i])return Number(n)}return-1}function Lt(e,t){if(!e||!e.getBoundingClientRect)return Ct();var n=e,i=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=C(n);if(n.clientWidth<n.scrollWidth&&(o.overflowX=="auto"||o.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(o.overflowY=="auto"||o.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return Ct();if(i||t)return n;i=!0}}while(n=n.parentNode);return Ct()}function qu(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function Un(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}var Ce;function Dr(e,t){return function(){if(!Ce){var n=arguments,i=this;n.length===1?e.call(i,n[0]):e.apply(i,n),Ce=setTimeout(function(){Ce=void 0},t)}}}function Xu(){clearTimeout(Ce),Ce=void 0}function Ir(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function Or(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}var ht="Sortable"+new Date().getTime();function Wu(){var e=[],t;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var n=[].slice.call(this.el.children);n.forEach(function(i){if(!(C(i,"display")==="none"||i===S.ghost)){e.push({target:i,rect:K(i)});var o=St({},e[e.length-1].rect);if(i.thisAnimationDuration){var r=de(i,!0);r&&(o.top-=r.f,o.left-=r.e)}i.fromRect=o}})}},addAnimationState:function(n){e.push(n)},removeAnimationState:function(n){e.splice(Yu(e,{target:n}),1)},animateAll:function(n){var i=this;if(!this.options.animation){clearTimeout(t),typeof n=="function"&&n();return}var o=!1,r=0;e.forEach(function(s){var l=0,a=s.target,c=a.fromRect,u=K(a),d=a.prevFromRect,h=a.prevToRect,p=s.rect,v=de(a,!0);v&&(u.top-=v.f,u.left-=v.e),a.toRect=u,a.thisAnimationDuration&&Un(d,u)&&!Un(c,u)&&(p.top-u.top)/(p.left-u.left)===(c.top-u.top)/(c.left-u.left)&&(l=Zu(p,d,h,i.options)),Un(u,c)||(a.prevFromRect=c,a.prevToRect=u,l||(l=i.options.animation),i.animate(a,p,u,l)),l&&(o=!0,r=Math.max(r,l),clearTimeout(a.animationResetTimer),a.animationResetTimer=setTimeout(function(){a.animationTime=0,a.prevFromRect=null,a.fromRect=null,a.prevToRect=null,a.thisAnimationDuration=null},l),a.thisAnimationDuration=l)}),clearTimeout(t),o?t=setTimeout(function(){typeof n=="function"&&n()},r):typeof n=="function"&&n(),e=[]},animate:function(n,i,o,r){if(r){C(n,"transition",""),C(n,"transform","");var s=de(this.el),l=s&&s.a,a=s&&s.d,c=(i.left-o.left)/(l||1),u=(i.top-o.top)/(a||1);n.animatingX=!!c,n.animatingY=!!u,C(n,"transform","translate3d("+c+"px,"+u+"px,0)"),this.forRepaintDummy=Ku(n),C(n,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),C(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){C(n,"transition",""),C(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},r)}}}}function Ku(e){return e.offsetWidth}function Zu(e,t,n,i){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*i.animation}var oe=[],Gn={initializeByDefault:!0},Re={mount:function(e){for(var t in Gn)Gn.hasOwnProperty(t)&&!(t in e)&&(e[t]=Gn[t]);oe.forEach(function(n){if(n.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),oe.push(e)},pluginEvent:function(e,t,n){var i=this;this.eventCanceled=!1,n.cancel=function(){i.eventCanceled=!0};var o=e+"Global";oe.forEach(function(r){t[r.pluginName]&&(t[r.pluginName][o]&&t[r.pluginName][o](St({sortable:t},n)),t.options[r.pluginName]&&t[r.pluginName][e]&&t[r.pluginName][e](St({sortable:t},n)))})},initializePlugins:function(e,t,n,i){oe.forEach(function(s){var l=s.pluginName;if(!(!e.options[l]&&!s.initializeByDefault)){var a=new s(e,t,e.options);a.sortable=e,a.options=e.options,e[l]=a,Ot(n,a.defaults)}});for(var o in e.options)if(e.options.hasOwnProperty(o)){var r=this.modifyOption(e,o,e.options[o]);typeof r<"u"&&(e.options[o]=r)}},getEventProperties:function(e,t){var n={};return oe.forEach(function(i){typeof i.eventProperties=="function"&&Ot(n,i.eventProperties.call(t[i.pluginName],e))}),n},modifyOption:function(e,t,n){var i;return oe.forEach(function(o){e[o.pluginName]&&o.optionListeners&&typeof o.optionListeners[t]=="function"&&(i=o.optionListeners[t].call(e[o.pluginName],n))}),i}};function Qu(e){var t=e.sortable,n=e.rootEl,i=e.name,o=e.targetEl,r=e.cloneEl,s=e.toEl,l=e.fromEl,a=e.oldIndex,c=e.newIndex,u=e.oldDraggableIndex,d=e.newDraggableIndex,h=e.originalEvent,p=e.putSortable,v=e.extraEventProperties;if(t=t||n&&n[ht],!!t){var f,b=t.options,k="on"+i.charAt(0).toUpperCase()+i.substr(1);window.CustomEvent&&!Mt&&!Be?f=new CustomEvent(i,{bubbles:!0,cancelable:!0}):(f=document.createEvent("Event"),f.initEvent(i,!0,!0)),f.to=s||n,f.from=l||n,f.item=o||n,f.clone=r,f.oldIndex=a,f.newIndex=c,f.oldDraggableIndex=u,f.newDraggableIndex=d,f.originalEvent=h,f.pullMode=p?p.lastPutMode:void 0;var M=St(St({},v),Re.getEventProperties(i,t));for(var O in M)f[O]=M[O];n&&n.dispatchEvent(f),b[k]&&b[k].call(t,f)}}var Ju=["evt"],at=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.evt,o=zu(n,Ju);Re.pluginEvent.bind(S)(e,t,St({dragEl:y,parentEl:q,ghostEl:T,rootEl:Y,nextEl:Yt,lastDownEl:Qe,cloneEl:X,cloneHidden:Nt,dragStarted:ve,putSortable:Q,activeSortable:S.active,originalEvent:i,oldIndex:ue,oldDraggableIndex:Se,newIndex:ct,newDraggableIndex:jt,hideGhostForTarget:Rr,unhideGhostForTarget:jr,cloneNowHidden:function(){Nt=!0},cloneNowShown:function(){Nt=!1},dispatchSortableEvent:function(r){nt({sortable:t,name:r,originalEvent:i})}},o))};function nt(e){Qu(St({putSortable:Q,cloneEl:X,targetEl:y,rootEl:Y,oldIndex:ue,oldDraggableIndex:Se,newIndex:ct,newDraggableIndex:jt},e))}var y,q,T,Y,Yt,Qe,X,Nt,ue,ct,Se,jt,He,Q,ae=!1,bn=!1,yn=[],Ut,xt,Yn,qn,Do,Io,ve,re,Ae,Fe=!1,Ue=!1,Je,tt,Xn=[],fi=!1,kn=[],Tn=typeof document<"u",Ge=Ar,Oo=Be||Mt?"cssFloat":"float",tc=Tn&&!Uu&&!Ar&&"draggable"in document.createElement("div"),Mr=function(){if(Tn){if(Mt)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),Pr=function(e,t){var n=C(e),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=pe(e,0,t),r=pe(e,1,t),s=o&&C(o),l=r&&C(r),a=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+K(o).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+K(r).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&s.float&&s.float!=="none"){var u=s.float==="left"?"left":"right";return r&&(l.clear==="both"||l.clear===u)?"vertical":"horizontal"}return o&&(s.display==="block"||s.display==="flex"||s.display==="table"||s.display==="grid"||a>=i&&n[Oo]==="none"||r&&n[Oo]==="none"&&a+c>i)?"vertical":"horizontal"},ec=function(e,t,n){var i=n?e.left:e.top,o=n?e.right:e.bottom,r=n?e.width:e.height,s=n?t.left:t.top,l=n?t.right:t.bottom,a=n?t.width:t.height;return i===s||o===l||i+r/2===s+a/2},nc=function(e,t){var n;return yn.some(function(i){var o=i[ht].options.emptyInsertThreshold;if(!(!o||Ii(i))){var r=K(i),s=e>=r.left-o&&e<=r.right+o,l=t>=r.top-o&&t<=r.bottom+o;if(s&&l)return n=i}}),n},Br=function(e){function t(o,r){return function(s,l,a,c){var u=s.options.group.name&&l.options.group.name&&s.options.group.name===l.options.group.name;if(o==null&&(r||u))return!0;if(o==null||o===!1)return!1;if(r&&o==="clone")return o;if(typeof o=="function")return t(o(s,l,a,c),r)(s,l,a,c);var d=(r?s:l).options.group.name;return o===!0||typeof o=="string"&&o===d||o.join&&o.indexOf(d)>-1}}var n={},i=e.group;(!i||Ze(i)!="object")&&(i={name:i}),n.name=i.name,n.checkPull=t(i.pull,!0),n.checkPut=t(i.put),n.revertClone=i.revertClone,e.group=n},Rr=function(){!Mr&&T&&C(T,"display","none")},jr=function(){!Mr&&T&&C(T,"display","")};Tn&&document.addEventListener("click",function(e){if(bn)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),bn=!1,!1},!0);var Gt=function(e){if(y){e=e.touches?e.touches[0]:e;var t=nc(e.clientX,e.clientY);if(t){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[i]=e[i]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[ht]._onDragOver(n)}}},ic=function(e){y&&y.parentNode[ht]._isOutsideThisEl(e.target)};function S(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=Ot({},t),e[ht]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Pr(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(r,s){r.setData("Text",s.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:S.supportPointer!==!1&&"PointerEvent"in window&&!_e,emptyInsertThreshold:5};Re.initializePlugins(this,e,n);for(var i in n)!(i in t)&&(t[i]=n[i]);Br(t);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=t.forceFallback?!1:tc,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?L(e,"pointerdown",this._onTapStart):(L(e,"mousedown",this._onTapStart),L(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(L(e,"dragover",this),L(e,"dragenter",this)),yn.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),Ot(this,Wu())}S.prototype={constructor:S,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(re=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,y):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,i=this.options,o=i.preventOnFilter,r=e.type,s=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,l=(s||e).target,a=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,c=i.filter;if(dc(n),!y&&!(/mousedown|pointerdown/.test(r)&&e.button!==0||i.disabled)&&!a.isContentEditable&&!(!this.nativeDraggable&&_e&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=wt(l,i.draggable,n,!1),!(l&&l.animated)&&Qe!==l)){if(ue=vt(l),Se=vt(l,i.draggable),typeof c=="function"){if(c.call(this,e,l,this)){nt({sortable:t,rootEl:a,name:"filter",targetEl:l,toEl:n,fromEl:n}),at("filter",t,{evt:e}),o&&e.cancelable&&e.preventDefault();return}}else if(c&&(c=c.split(",").some(function(u){if(u=wt(a,u.trim(),n,!1),u)return nt({sortable:t,rootEl:u,name:"filter",targetEl:l,fromEl:n,toEl:n}),at("filter",t,{evt:e}),!0}),c)){o&&e.cancelable&&e.preventDefault();return}i.handle&&!wt(a,i.handle,n,!1)||this._prepareDragStart(e,s,l)}}},_prepareDragStart:function(e,t,n){var i=this,o=i.el,r=i.options,s=o.ownerDocument,l;if(n&&!y&&n.parentNode===o){var a=K(n);if(Y=o,y=n,q=y.parentNode,Yt=y.nextSibling,Qe=n,He=r.group,S.dragged=y,Ut={target:y,clientX:(t||e).clientX,clientY:(t||e).clientY},Do=Ut.clientX-a.left,Io=Ut.clientY-a.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,y.style["will-change"]="all",l=function(){if(at("delayEnded",i,{evt:e}),S.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!So&&i.nativeDraggable&&(y.draggable=!0),i._triggerDragStart(e,t),nt({sortable:i,name:"choose",originalEvent:e}),ut(y,r.chosenClass,!0)},r.ignore.split(",").forEach(function(c){Tr(y,c.trim(),Wn)}),L(s,"dragover",Gt),L(s,"mousemove",Gt),L(s,"touchmove",Gt),L(s,"mouseup",i._onDrop),L(s,"touchend",i._onDrop),L(s,"touchcancel",i._onDrop),So&&this.nativeDraggable&&(this.options.touchStartThreshold=4,y.draggable=!0),at("delayStart",this,{evt:e}),r.delay&&(!r.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(Be||Mt))){if(S.eventCanceled){this._onDrop();return}L(s,"mouseup",i._disableDelayedDrag),L(s,"touchend",i._disableDelayedDrag),L(s,"touchcancel",i._disableDelayedDrag),L(s,"mousemove",i._delayedDragTouchMoveHandler),L(s,"touchmove",i._delayedDragTouchMoveHandler),r.supportPointer&&L(s,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(l,r.delay)}else l()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){y&&Wn(y),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;j(e,"mouseup",this._disableDelayedDrag),j(e,"touchend",this._disableDelayedDrag),j(e,"touchcancel",this._disableDelayedDrag),j(e,"mousemove",this._delayedDragTouchMoveHandler),j(e,"touchmove",this._delayedDragTouchMoveHandler),j(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?L(document,"pointermove",this._onTouchMove):t?L(document,"touchmove",this._onTouchMove):L(document,"mousemove",this._onTouchMove):(L(y,"dragend",this),L(Y,"dragstart",this._onDragStart));try{document.selection?tn(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(ae=!1,Y&&y){at("dragStarted",this,{evt:t}),this.nativeDraggable&&L(document,"dragover",ic);var n=this.options;!e&&ut(y,n.dragClass,!1),ut(y,n.ghostClass,!0),S.active=this,e&&this._appendGhost(),nt({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(xt){this._lastX=xt.clientX,this._lastY=xt.clientY,Rr();for(var e=document.elementFromPoint(xt.clientX,xt.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(xt.clientX,xt.clientY),e!==t);)t=e;if(y.parentNode[ht]._isOutsideThisEl(e),t)do{if(t[ht]){var n=void 0;if(n=t[ht]._onDragOver({clientX:xt.clientX,clientY:xt.clientY,target:e,rootEl:t}),n&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);jr()}},_onTouchMove:function(e){if(Ut){var t=this.options,n=t.fallbackTolerance,i=t.fallbackOffset,o=e.touches?e.touches[0]:e,r=T&&de(T,!0),s=T&&r&&r.a,l=T&&r&&r.d,a=Ge&&tt&&To(tt),c=(o.clientX-Ut.clientX+i.x)/(s||1)+(a?a[0]-Xn[0]:0)/(s||1),u=(o.clientY-Ut.clientY+i.y)/(l||1)+(a?a[1]-Xn[1]:0)/(l||1);if(!S.active&&!ae){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(T){r?(r.e+=c-(Yn||0),r.f+=u-(qn||0)):r={a:1,b:0,c:0,d:1,e:c,f:u};var d="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");C(T,"webkitTransform",d),C(T,"mozTransform",d),C(T,"msTransform",d),C(T,"transform",d),Yn=c,qn=u,xt=o}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!T){var e=this.options.fallbackOnBody?document.body:Y,t=K(y,!0,Ge,!0,e),n=this.options;if(Ge){for(tt=e;C(tt,"position")==="static"&&C(tt,"transform")==="none"&&tt!==document;)tt=tt.parentNode;tt!==document.body&&tt!==document.documentElement?(tt===document&&(tt=Ct()),t.top+=tt.scrollTop,t.left+=tt.scrollLeft):tt=Ct(),Xn=To(tt)}T=y.cloneNode(!0),ut(T,n.ghostClass,!1),ut(T,n.fallbackClass,!0),ut(T,n.dragClass,!0),C(T,"transition",""),C(T,"transform",""),C(T,"box-sizing","border-box"),C(T,"margin",0),C(T,"top",t.top),C(T,"left",t.left),C(T,"width",t.width),C(T,"height",t.height),C(T,"opacity","0.8"),C(T,"position",Ge?"absolute":"fixed"),C(T,"zIndex","100000"),C(T,"pointerEvents","none"),S.ghost=T,e.appendChild(T),C(T,"transform-origin",Do/parseInt(T.style.width)*100+"% "+Io/parseInt(T.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,i=e.dataTransfer,o=n.options;if(at("dragStart",this,{evt:e}),S.eventCanceled){this._onDrop();return}at("setupClone",this),S.eventCanceled||(X=Or(y),X.draggable=!1,X.style["will-change"]="",this._hideClone(),ut(X,this.options.chosenClass,!1),S.clone=X),n.cloneId=tn(function(){at("clone",n),!S.eventCanceled&&(n.options.removeCloneOnHide||Y.insertBefore(X,y),n._hideClone(),nt({sortable:n,name:"clone"}))}),!t&&ut(y,o.dragClass,!0),t?(bn=!0,n._loopId=setInterval(n._emulateDragOver,50)):(j(document,"mouseup",n._onDrop),j(document,"touchend",n._onDrop),j(document,"touchcancel",n._onDrop),i&&(i.effectAllowed="move",o.setData&&o.setData.call(n,i,y)),L(document,"drop",n),C(y,"transform","translateZ(0)")),ae=!0,n._dragStartId=tn(n._dragStarted.bind(n,t,e)),L(document,"selectstart",n),ve=!0,_e&&C(document.body,"user-select","none")},_onDragOver:function(e){var t=this.el,n=e.target,i,o,r,s=this.options,l=s.group,a=S.active,c=He===l,u=s.sort,d=Q||a,h,p=this,v=!1;if(fi)return;function f(U,Pt){at(U,p,St({evt:e,isOwner:c,axis:h?"vertical":"horizontal",revert:r,dragRect:i,targetRect:o,canSort:u,fromSortable:d,target:n,completed:k,onMove:function(Bt,kt){return Ye(Y,t,y,i,Bt,K(Bt),e,kt)},changed:M},Pt))}function b(){f("dragOverAnimationCapture"),p.captureAnimationState(),p!==d&&d.captureAnimationState()}function k(U){return f("dragOverCompleted",{insertion:U}),U&&(c?a._hideClone():a._showClone(p),p!==d&&(ut(y,Q?Q.options.ghostClass:a.options.ghostClass,!1),ut(y,s.ghostClass,!0)),Q!==p&&p!==S.active?Q=p:p===S.active&&Q&&(Q=null),d===p&&(p._ignoreWhileAnimating=n),p.animateAll(function(){f("dragOverAnimationComplete"),p._ignoreWhileAnimating=null}),p!==d&&(d.animateAll(),d._ignoreWhileAnimating=null)),(n===y&&!y.animated||n===t&&!n.animated)&&(re=null),!s.dragoverBubble&&!e.rootEl&&n!==document&&(y.parentNode[ht]._isOutsideThisEl(e.target),!U&&Gt(e)),!s.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),v=!0}function M(){ct=vt(y),jt=vt(y,s.draggable),nt({sortable:p,name:"change",toEl:t,newIndex:ct,newDraggableIndex:jt,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),n=wt(n,s.draggable,t,!0),f("dragOver"),S.eventCanceled)return v;if(y.contains(e.target)||n.animated&&n.animatingX&&n.animatingY||p._ignoreWhileAnimating===n)return k(!1);if(bn=!1,a&&!s.disabled&&(c?u||(r=q!==Y):Q===this||(this.lastPutMode=He.checkPull(this,a,y,e))&&l.checkPut(this,a,y,e))){if(h=this._getDirection(e,n)==="vertical",i=K(y),f("dragOverValid"),S.eventCanceled)return v;if(r)return q=Y,b(),this._hideClone(),f("revert"),S.eventCanceled||(Yt?Y.insertBefore(y,Yt):Y.appendChild(y)),k(!0);var O=Ii(t,s.draggable);if(!O||ac(e,h,this)&&!O.animated){if(O===y)return k(!1);if(O&&t===e.target&&(n=O),n&&(o=K(n)),Ye(Y,t,y,i,n,o,e,!!n)!==!1)return b(),t.appendChild(y),q=t,M(),k(!0)}else if(O&&sc(e,h,this)){var F=pe(t,0,s,!0);if(F===y)return k(!1);if(n=F,o=K(n),Ye(Y,t,y,i,n,o,e,!1)!==!1)return b(),t.insertBefore(y,F),q=t,M(),k(!0)}else if(n.parentNode===t){o=K(n);var H=0,A,G=y.parentNode!==t,_=!ec(y.animated&&y.toRect||i,n.animated&&n.toRect||o,h),m=h?"top":"left",g=Fo(n,"top","top")||Fo(y,"top","top"),E=g?g.scrollTop:void 0;re!==n&&(A=o[m],Fe=!1,Ue=!_&&s.invertSwap||G),H=lc(e,n,o,h,_?1:s.swapThreshold,s.invertedSwapThreshold==null?s.swapThreshold:s.invertedSwapThreshold,Ue,re===n);var I;if(H!==0){var P=vt(y);do P-=H,I=q.children[P];while(I&&(C(I,"display")==="none"||I===T))}if(H===0||I===n)return k(!1);re=n,Ae=H;var B=n.nextElementSibling,R=!1;R=H===1;var N=Ye(Y,t,y,i,n,o,e,R);if(N!==!1)return(N===1||N===-1)&&(R=N===1),fi=!0,setTimeout(rc,30),b(),R&&!B?t.appendChild(y):n.parentNode.insertBefore(y,R?B:n),g&&Ir(g,0,E-g.scrollTop),q=y.parentNode,A!==void 0&&!Ue&&(Je=Math.abs(A-K(n)[m])),M(),k(!0)}if(t.contains(y))return k(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){j(document,"mousemove",this._onTouchMove),j(document,"touchmove",this._onTouchMove),j(document,"pointermove",this._onTouchMove),j(document,"dragover",Gt),j(document,"mousemove",Gt),j(document,"touchmove",Gt)},_offUpEvents:function(){var e=this.el.ownerDocument;j(e,"mouseup",this._onDrop),j(e,"touchend",this._onDrop),j(e,"pointerup",this._onDrop),j(e,"touchcancel",this._onDrop),j(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;if(ct=vt(y),jt=vt(y,n.draggable),at("drop",this,{evt:e}),q=y&&y.parentNode,ct=vt(y),jt=vt(y,n.draggable),S.eventCanceled){this._nulling();return}ae=!1,Ue=!1,Fe=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),gi(this.cloneId),gi(this._dragStartId),this.nativeDraggable&&(j(document,"drop",this),j(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),_e&&C(document.body,"user-select",""),C(y,"transform",""),e&&(ve&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),T&&T.parentNode&&T.parentNode.removeChild(T),(Y===q||Q&&Q.lastPutMode!=="clone")&&X&&X.parentNode&&X.parentNode.removeChild(X),y&&(this.nativeDraggable&&j(y,"dragend",this),Wn(y),y.style["will-change"]="",ve&&!ae&&ut(y,Q?Q.options.ghostClass:this.options.ghostClass,!1),ut(y,this.options.chosenClass,!1),nt({sortable:this,name:"unchoose",toEl:q,newIndex:null,newDraggableIndex:null,originalEvent:e}),Y!==q?(ct>=0&&(nt({rootEl:q,name:"add",toEl:q,fromEl:Y,originalEvent:e}),nt({sortable:this,name:"remove",toEl:q,originalEvent:e}),nt({rootEl:q,name:"sort",toEl:q,fromEl:Y,originalEvent:e}),nt({sortable:this,name:"sort",toEl:q,originalEvent:e})),Q&&Q.save()):ct!==ue&&ct>=0&&(nt({sortable:this,name:"update",toEl:q,originalEvent:e}),nt({sortable:this,name:"sort",toEl:q,originalEvent:e})),S.active&&((ct==null||ct===-1)&&(ct=ue,jt=Se),nt({sortable:this,name:"end",toEl:q,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){at("nulling",this),Y=y=q=T=Yt=X=Qe=Nt=Ut=xt=ve=ct=jt=ue=Se=re=Ae=Q=He=S.dragged=S.ghost=S.clone=S.active=null,kn.forEach(function(e){e.checked=!0}),kn.length=Yn=qn=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":y&&(this._onDragOver(e),oc(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,n=this.el.children,i=0,o=n.length,r=this.options;i<o;i++)t=n[i],wt(t,r.draggable,this.el,!1)&&e.push(t.getAttribute(r.dataIdAttr)||cc(t));return e},sort:function(e,t){var n={},i=this.el;this.toArray().forEach(function(o,r){var s=i.children[r];wt(s,this.options.draggable,i,!1)&&(n[o]=s)},this),t&&this.captureAnimationState(),e.forEach(function(o){n[o]&&(i.removeChild(n[o]),i.appendChild(n[o]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return wt(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(t===void 0)return n[e];var i=Re.modifyOption(this,e,t);typeof i<"u"?n[e]=i:n[e]=t,e==="group"&&Br(n)},destroy:function(){at("destroy",this);var e=this.el;e[ht]=null,j(e,"mousedown",this._onTapStart),j(e,"touchstart",this._onTapStart),j(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(j(e,"dragover",this),j(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),yn.splice(yn.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Nt){if(at("hideClone",this),S.eventCanceled)return;C(X,"display","none"),this.options.removeCloneOnHide&&X.parentNode&&X.parentNode.removeChild(X),Nt=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(Nt){if(at("showClone",this),S.eventCanceled)return;y.parentNode==Y&&!this.options.group.revertClone?Y.insertBefore(X,y):Yt?Y.insertBefore(X,Yt):Y.appendChild(X),this.options.group.revertClone&&this.animate(y,X),C(X,"display",""),Nt=!1}}};function oc(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function Ye(e,t,n,i,o,r,s,l){var a,c=e[ht],u=c.options.onMove,d;return window.CustomEvent&&!Mt&&!Be?a=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(a=document.createEvent("Event"),a.initEvent("move",!0,!0)),a.to=t,a.from=e,a.dragged=n,a.draggedRect=i,a.related=o||t,a.relatedRect=r||K(t),a.willInsertAfter=l,a.originalEvent=s,e.dispatchEvent(a),u&&(d=u.call(c,a,s)),d}function Wn(e){e.draggable=!1}function rc(){fi=!1}function sc(e,t,n){var i=K(pe(n.el,0,n.options,!0)),o=10;return t?e.clientX<i.left-o||e.clientY<i.top&&e.clientX<i.right:e.clientY<i.top-o||e.clientY<i.bottom&&e.clientX<i.left}function ac(e,t,n){var i=K(Ii(n.el,n.options.draggable)),o=10;return t?e.clientX>i.right+o||e.clientX<=i.right&&e.clientY>i.bottom&&e.clientX>=i.left:e.clientX>i.right&&e.clientY>i.top||e.clientX<=i.right&&e.clientY>i.bottom+o}function lc(e,t,n,i,o,r,s,l){var a=i?e.clientY:e.clientX,c=i?n.height:n.width,u=i?n.top:n.left,d=i?n.bottom:n.right,h=!1;if(!s){if(l&&Je<c*o){if(!Fe&&(Ae===1?a>u+c*r/2:a<d-c*r/2)&&(Fe=!0),Fe)h=!0;else if(Ae===1?a<u+Je:a>d-Je)return-Ae}else if(a>u+c*(1-o)/2&&a<d-c*(1-o)/2)return uc(t)}return h=h||s,h&&(a<u+c*r/2||a>d-c*r/2)?a>u+c/2?1:-1:0}function uc(e){return vt(y)<vt(e)?1:-1}function cc(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,i=0;n--;)i+=t.charCodeAt(n);return i.toString(36)}function dc(e){kn.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var i=t[n];i.checked&&kn.push(i)}}function tn(e){return setTimeout(e,0)}function gi(e){return clearTimeout(e)}Tn&&L(document,"touchmove",function(e){(S.active||ae)&&e.cancelable&&e.preventDefault()});S.utils={on:L,off:j,css:C,find:Tr,is:function(e,t){return!!wt(e,t,e,!1)},extend:qu,throttle:Dr,closest:wt,toggleClass:ut,clone:Or,index:vt,nextTick:tn,cancelNextTick:gi,detectDirection:Pr,getChild:pe};S.get=function(e){return e[ht]};S.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach(function(i){if(!i.prototype||!i.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(i));i.utils&&(S.utils=St(St({},S.utils),i.utils)),Re.mount(i)})};S.create=function(e,t){return new S(e,t)};S.version=Hu;var W=[],be,mi,vi=!1,Kn,Zn,xn,ye;function hc(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return e.prototype={dragStarted:function(t){var n=t.originalEvent;this.sortable.nativeDraggable?L(document,"dragover",this._handleAutoScroll):this.options.supportPointer?L(document,"pointermove",this._handleFallbackAutoScroll):n.touches?L(document,"touchmove",this._handleFallbackAutoScroll):L(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var n=t.originalEvent;!this.options.dragOverBubble&&!n.rootEl&&this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?j(document,"dragover",this._handleAutoScroll):(j(document,"pointermove",this._handleFallbackAutoScroll),j(document,"touchmove",this._handleFallbackAutoScroll),j(document,"mousemove",this._handleFallbackAutoScroll)),Mo(),en(),Xu()},nulling:function(){xn=mi=be=vi=ye=Kn=Zn=null,W.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,n){var i=this,o=(t.touches?t.touches[0]:t).clientX,r=(t.touches?t.touches[0]:t).clientY,s=document.elementFromPoint(o,r);if(xn=t,n||this.options.forceAutoScrollFallback||Be||Mt||_e){Qn(t,this.options,s,n);var l=Lt(s,!0);vi&&(!ye||o!==Kn||r!==Zn)&&(ye&&Mo(),ye=setInterval(function(){var a=Lt(document.elementFromPoint(o,r),!0);a!==l&&(l=a,en()),Qn(t,i.options,a,n)},10),Kn=o,Zn=r)}else{if(!this.options.bubbleScroll||Lt(s,!0)===Ct()){en();return}Qn(t,this.options,Lt(s,!1),!1)}}},Ot(e,{pluginName:"scroll",initializeByDefault:!0})}function en(){W.forEach(function(e){clearInterval(e.pid)}),W=[]}function Mo(){clearInterval(ye)}var Qn=Dr(function(e,t,n,i){if(t.scroll){var o=(e.touches?e.touches[0]:e).clientX,r=(e.touches?e.touches[0]:e).clientY,s=t.scrollSensitivity,l=t.scrollSpeed,a=Ct(),c=!1,u;mi!==n&&(mi=n,en(),be=t.scroll,u=t.scrollFn,be===!0&&(be=Lt(n,!0)));var d=0,h=be;do{var p=h,v=K(p),f=v.top,b=v.bottom,k=v.left,M=v.right,O=v.width,F=v.height,H=void 0,A=void 0,G=p.scrollWidth,_=p.scrollHeight,m=C(p),g=p.scrollLeft,E=p.scrollTop;p===a?(H=O<G&&(m.overflowX==="auto"||m.overflowX==="scroll"||m.overflowX==="visible"),A=F<_&&(m.overflowY==="auto"||m.overflowY==="scroll"||m.overflowY==="visible")):(H=O<G&&(m.overflowX==="auto"||m.overflowX==="scroll"),A=F<_&&(m.overflowY==="auto"||m.overflowY==="scroll"));var I=H&&(Math.abs(M-o)<=s&&g+O<G)-(Math.abs(k-o)<=s&&!!g),P=A&&(Math.abs(b-r)<=s&&E+F<_)-(Math.abs(f-r)<=s&&!!E);if(!W[d])for(var B=0;B<=d;B++)W[B]||(W[B]={});(W[d].vx!=I||W[d].vy!=P||W[d].el!==p)&&(W[d].el=p,W[d].vx=I,W[d].vy=P,clearInterval(W[d].pid),(I!=0||P!=0)&&(c=!0,W[d].pid=setInterval(function(){i&&this.layer===0&&S.active._onTouchMove(xn);var R=W[this.layer].vy?W[this.layer].vy*l:0,N=W[this.layer].vx?W[this.layer].vx*l:0;typeof u=="function"&&u.call(S.dragged.parentNode[ht],N,R,e,xn,W[this.layer].el)!=="continue"||Ir(W[this.layer].el,N,R)}.bind({layer:d}),24))),d++}while(t.bubbleScroll&&h!==a&&(h=Lt(h,!1)));vi=c}},30),Nr=function(e){var t=e.originalEvent,n=e.putSortable,i=e.dragEl,o=e.activeSortable,r=e.dispatchSortableEvent,s=e.hideGhostForTarget,l=e.unhideGhostForTarget;if(t){var a=n||o;s();var c=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,u=document.elementFromPoint(c.clientX,c.clientY);l(),a&&!a.el.contains(u)&&(r("spill"),this.onSpill({dragEl:i,putSortable:n}))}};function Oi(){}Oi.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var i=pe(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(t,i):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:Nr};Ot(Oi,{pluginName:"revertOnSpill"});function Mi(){}Mi.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable,i=n||this.sortable;i.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),i.animateAll()},drop:Nr};Ot(Mi,{pluginName:"removeOnSpill"});S.mount(new hc);S.mount(Mi,Oi);const pc=["Start","Add","Remove","Update","End"],fc=["Choose","Unchoose","Sort","Filter","Clone"],gc=["Move"],Po={manage:gc,manageAndEmit:pc,emit:fc};[...[...Po.manageAndEmit,...Po.emit].map(e=>e.toLowerCase())];var nn=(e,t=[])=>({parts:(...n)=>{if(mc(t))return nn(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>nn(e,[...t,...n]),rename:n=>nn(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,i)=>Object.assign(n,{[i]:{selector:[`&[data-scope="${se(e)}"][data-part="${se(i)}"]`,`& [data-scope="${se(e)}"][data-part="${se(i)}"]`].join(", "),attrs:{"data-scope":se(e),"data-part":se(i)}}}),{})}),se=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),mc=e=>e.length===0,vc=e=>e.nodeType===Node.DOCUMENT_NODE?e:e.ownerDocument??document;function bc(e){const t={getRootNode:n=>{var i;return((i=n.getRootNode)==null?void 0:i.call(n))??document},getDoc:n=>vc(t.getRootNode(n)),getWin:n=>t.getDoc(n).defaultView??window,getActiveElement:n=>t.getDoc(n).activeElement,isActiveElement:(n,i)=>i===t.getActiveElement(n),focus(n,i){i!=null&&(t.isActiveElement(n,i)||i.focus({preventScroll:!0}))},getById:(n,i)=>t.getRootNode(n).getElementById(i),setValue:(n,i)=>{if(n==null||i==null)return;const o=i.toString();n.value!==o&&(n.value=i.toString())}};return{...t,...e}}var yc=nn("switch").parts("root","label","control","thumb");yc.build();var Bo=bc({getRootId:e=>{var t;return((t=e.ids)==null?void 0:t.root)??`switch:${e.id}`},getLabelId:e=>{var t;return((t=e.ids)==null?void 0:t.label)??`switch:${e.id}:label`},getThumbId:e=>{var t;return((t=e.ids)==null?void 0:t.thumb)??`switch:${e.id}:thumb`},getControlId:e=>{var t;return((t=e.ids)==null?void 0:t.control)??`switch:${e.id}:control`},getHiddenInputId:e=>{var t;return((t=e.ids)==null?void 0:t.input)??`switch:${e.id}:input`},getHiddenInputEl:e=>Bo.getById(e,Bo.getHiddenInputId(e))});const xc=yt({__name:"LazyLoad",props:{wrapperTag:{default:"div"},threshold:{default:0},observerRoot:{default:null}},emits:["intersect"],setup(e,{emit:t}){const n=e,i=dt(!1);function o(a){const c=a[0];c.isIntersecting&&(i.value=!0,Xr(()=>{t("intersect",c),l()}))}const r=dt(),s=dt();wn(()=>{r.value=new IntersectionObserver(o,{root:n.observerRoot,threshold:n.threshold}),r.value.observe(s.value)}),ki(()=>{l()});function l(){r.value&&r.value.disconnect()}return(a,c)=>(z(),pt(En(a.wrapperTag),{ref_key:"rootRef",ref:s,class:"k-lazyload"},{default:_t(()=>[i.value?Z(a.$slots,"default",{key:0}):Z(a.$slots,"placeholder",{key:1})]),_:3},512))}});export{xc as k};
|