@kubex/zinc 1.1.75 → 1.1.76
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/custom-elements.json +882 -882
- package/dist/vscode.html-custom-data.json +30 -30
- package/dist/web-types.json +105 -105
- package/dist/zn.min.js +67 -66
- package/package.json +1 -1
- package/src/components/content-block/content-block.component.ts +2 -3
- package/src/components/content-block/content-block.test.ts +26 -2
package/dist/zn.min.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{a as En,b as E_,c as pr,d as c,e as B}from"./chunks/zn.UBLZO6CI.js";var b0=En((vZ,g0)=>{var io=-1,Tr=1,Be=0;function fl(i,o,t,r,n){if(i===o)return i?[[Be,i]]:[];if(t!=null){var a=y5(i,o,t);if(a)return a}var s=cu(i,o),l=i.substring(0,s);i=i.substring(s),o=o.substring(s),s=pd(i,o);var d=i.substring(i.length-s);i=i.substring(0,i.length-s),o=o.substring(0,o.length-s);var h=h5(i,o);return l&&h.unshift([Be,l]),d&&h.push([Be,d]),du(h,n),r&&f5(h),h}function h5(i,o){var t;if(!i)return[[Tr,o]];if(!o)return[[io,i]];var r=i.length>o.length?i:o,n=i.length>o.length?o:i,a=r.indexOf(n);if(a!==-1)return t=[[Tr,r.substring(0,a)],[Be,n],[Tr,r.substring(a+n.length)]],i.length>o.length&&(t[0][0]=t[2][0]=io),t;if(n.length===1)return[[io,i],[Tr,o]];var s=m5(i,o);if(s){var l=s[0],d=s[1],h=s[2],m=s[3],f=s[4],b=fl(l,h),g=fl(d,m);return b.concat([[Be,f]],g)}return u5(i,o)}function u5(i,o){for(var t=i.length,r=o.length,n=Math.ceil((t+r)/2),a=n,s=2*n,l=new Array(s),d=new Array(s),h=0;h<s;h++)l[h]=-1,d[h]=-1;l[a+1]=0,d[a+1]=0;for(var m=t-r,f=m%2!==0,b=0,g=0,v=0,x=0,_=0;_<n;_++){for(var $=-_+b;$<=_-g;$+=2){var N=a+$,G;$===-_||$!==_&&l[N-1]<l[N+1]?G=l[N+1]:G=l[N-1]+1;for(var I=G-$;G<t&&I<r&&i.charAt(G)===o.charAt(I);)G++,I++;if(l[N]=G,G>t)g+=2;else if(I>r)b+=2;else if(f){var w=a+m-$;if(w>=0&&w<s&&d[w]!==-1){var T=t-d[w];if(G>=T)return s0(i,o,G,I)}}}for(var L=-_+v;L<=_-x;L+=2){var w=a+L,T;L===-_||L!==_&&d[w-1]<d[w+1]?T=d[w+1]:T=d[w-1]+1;for(var W=T-L;T<t&&W<r&&i.charAt(t-T-1)===o.charAt(r-W-1);)T++,W++;if(d[w]=T,T>t)x+=2;else if(W>r)v+=2;else if(!f){var N=a+m-L;if(N>=0&&N<s&&l[N]!==-1){var G=l[N],I=a+G-N;if(T=t-T,G>=T)return s0(i,o,G,I)}}}}return[[io,i],[Tr,o]]}function s0(i,o,t,r){var n=i.substring(0,t),a=o.substring(0,r),s=i.substring(t),l=o.substring(r),d=fl(n,a),h=fl(s,l);return d.concat(h)}function cu(i,o){if(!i||!o||i.charAt(0)!==o.charAt(0))return 0;for(var t=0,r=Math.min(i.length,o.length),n=r,a=0;t<n;)i.substring(a,n)==o.substring(a,n)?(t=n,a=t):r=n,n=Math.floor((r-t)/2+t);return h0(i.charCodeAt(n-1))&&n--,n}function l0(i,o){var t=i.length,r=o.length;if(t==0||r==0)return 0;t>r?i=i.substring(t-r):t<r&&(o=o.substring(0,t));var n=Math.min(t,r);if(i==o)return n;for(var a=0,s=1;;){var l=i.substring(n-s),d=o.indexOf(l);if(d==-1)return a;s+=d,(d==0||i.substring(n-s)==o.substring(0,s))&&(a=s,s++)}}function pd(i,o){if(!i||!o||i.slice(-1)!==o.slice(-1))return 0;for(var t=0,r=Math.min(i.length,o.length),n=r,a=0;t<n;)i.substring(i.length-n,i.length-a)==o.substring(o.length-n,o.length-a)?(t=n,a=t):r=n,n=Math.floor((r-t)/2+t);return u0(i.charCodeAt(i.length-n))&&n--,n}function m5(i,o){var t=i.length>o.length?i:o,r=i.length>o.length?o:i;if(t.length<4||r.length*2<t.length)return null;function n(g,v,x){for(var _=g.substring(x,x+Math.floor(g.length/4)),$=-1,N="",G,I,w,T;($=v.indexOf(_,$+1))!==-1;){var L=cu(g.substring(x),v.substring($)),W=pd(g.substring(0,x),v.substring(0,$));N.length<W+L&&(N=v.substring($-W,$)+v.substring($,$+L),G=g.substring(0,x-W),I=g.substring(x+L),w=v.substring(0,$-W),T=v.substring($+L))}return N.length*2>=g.length?[G,I,w,T,N]:null}var a=n(t,r,Math.ceil(t.length/4)),s=n(t,r,Math.ceil(t.length/2)),l;if(!a&&!s)return null;s?a?l=a[4].length>s[4].length?a:s:l=s:l=a;var d,h,m,f;i.length>o.length?(d=l[0],h=l[1],m=l[2],f=l[3]):(m=l[0],f=l[1],d=l[2],h=l[3]);var b=l[4];return[d,h,m,f,b]}function f5(i){for(var o=!1,t=[],r=0,n=null,a=0,s=0,l=0,d=0,h=0;a<i.length;)i[a][0]==Be?(t[r++]=a,s=d,l=h,d=0,h=0,n=i[a][1]):(i[a][0]==Tr?d+=i[a][1].length:h+=i[a][1].length,n&&n.length<=Math.max(s,l)&&n.length<=Math.max(d,h)&&(i.splice(t[r-1],0,[io,n]),i[t[r-1]+1][0]=Tr,r--,r--,a=r>0?t[r-1]:-1,s=0,l=0,d=0,h=0,n=null,o=!0)),a++;for(o&&du(i),v5(i),a=1;a<i.length;){if(i[a-1][0]==io&&i[a][0]==Tr){var m=i[a-1][1],f=i[a][1],b=l0(m,f),g=l0(f,m);b>=g?(b>=m.length/2||b>=f.length/2)&&(i.splice(a,0,[Be,f.substring(0,b)]),i[a-1][1]=m.substring(0,m.length-b),i[a+1][1]=f.substring(b),a++):(g>=m.length/2||g>=f.length/2)&&(i.splice(a,0,[Be,m.substring(0,g)]),i[a-1][0]=Tr,i[a-1][1]=f.substring(0,f.length-g),i[a+1][0]=io,i[a+1][1]=m.substring(g),a++),a++}a++}}var c0=/[^a-zA-Z0-9]/,d0=/\s/,p0=/[\r\n]/,g5=/\n\r?\n$/,b5=/^\r?\n\r?\n/;function v5(i){function o(g,v){if(!g||!v)return 6;var x=g.charAt(g.length-1),_=v.charAt(0),$=x.match(c0),N=_.match(c0),G=$&&x.match(d0),I=N&&_.match(d0),w=G&&x.match(p0),T=I&&_.match(p0),L=w&&g.match(g5),W=T&&v.match(b5);return L||W?5:w||T?4:$&&!G&&I?3:G||I?2:$||N?1:0}for(var t=1;t<i.length-1;){if(i[t-1][0]==Be&&i[t+1][0]==Be){var r=i[t-1][1],n=i[t][1],a=i[t+1][1],s=pd(r,n);if(s){var l=n.substring(n.length-s);r=r.substring(0,r.length-s),n=l+n.substring(0,n.length-s),a=l+a}for(var d=r,h=n,m=a,f=o(r,n)+o(n,a);n.charAt(0)===a.charAt(0);){r+=n.charAt(0),n=n.substring(1)+a.charAt(0),a=a.substring(1);var b=o(r,n)+o(n,a);b>=f&&(f=b,d=r,h=n,m=a)}i[t-1][1]!=d&&(d?i[t-1][1]=d:(i.splice(t-1,1),t--),i[t][1]=h,m?i[t+1][1]=m:(i.splice(t+1,1),t--))}t++}}function du(i,o){i.push([Be,""]);for(var t=0,r=0,n=0,a="",s="",l;t<i.length;){if(t<i.length-1&&!i[t][1]){i.splice(t,1);continue}switch(i[t][0]){case Tr:n++,s+=i[t][1],t++;break;case io:r++,a+=i[t][1],t++;break;case Be:var d=t-n-r-1;if(o){if(d>=0&&f0(i[d][1])){var h=i[d][1].slice(-1);if(i[d][1]=i[d][1].slice(0,-1),a=h+a,s=h+s,!i[d][1]){i.splice(d,1),t--;var m=d-1;i[m]&&i[m][0]===Tr&&(n++,s=i[m][1]+s,m--),i[m]&&i[m][0]===io&&(r++,a=i[m][1]+a,m--),d=m}}if(m0(i[t][1])){var h=i[t][1].charAt(0);i[t][1]=i[t][1].slice(1),a+=h,s+=h}}if(t<i.length-1&&!i[t][1]){i.splice(t,1);break}if(a.length>0||s.length>0){a.length>0&&s.length>0&&(l=cu(s,a),l!==0&&(d>=0?i[d][1]+=s.substring(0,l):(i.splice(0,0,[Be,s.substring(0,l)]),t++),s=s.substring(l),a=a.substring(l)),l=pd(s,a),l!==0&&(i[t][1]=s.substring(s.length-l)+i[t][1],s=s.substring(0,s.length-l),a=a.substring(0,a.length-l)));var f=n+r;a.length===0&&s.length===0?(i.splice(t-f,f),t=t-f):a.length===0?(i.splice(t-f,f,[Tr,s]),t=t-f+1):s.length===0?(i.splice(t-f,f,[io,a]),t=t-f+1):(i.splice(t-f,f,[io,a],[Tr,s]),t=t-f+2)}t!==0&&i[t-1][0]===Be?(i[t-1][1]+=i[t][1],i.splice(t,1)):t++,n=0,r=0,a="",s="";break}}i[i.length-1][1]===""&&i.pop();var b=!1;for(t=1;t<i.length-1;)i[t-1][0]===Be&&i[t+1][0]===Be&&(i[t][1].substring(i[t][1].length-i[t-1][1].length)===i[t-1][1]?(i[t][1]=i[t-1][1]+i[t][1].substring(0,i[t][1].length-i[t-1][1].length),i[t+1][1]=i[t-1][1]+i[t+1][1],i.splice(t-1,1),b=!0):i[t][1].substring(0,i[t+1][1].length)==i[t+1][1]&&(i[t-1][1]+=i[t+1][1],i[t][1]=i[t][1].substring(i[t+1][1].length)+i[t+1][1],i.splice(t+1,1),b=!0)),t++;b&&du(i,o)}function h0(i){return i>=55296&&i<=56319}function u0(i){return i>=56320&&i<=57343}function m0(i){return u0(i.charCodeAt(0))}function f0(i){return h0(i.charCodeAt(i.length-1))}function x5(i){for(var o=[],t=0;t<i.length;t++)i[t][1].length>0&&o.push(i[t]);return o}function lu(i,o,t,r){return f0(i)||m0(r)?null:x5([[Be,i],[io,o],[Tr,t],[Be,r]])}function y5(i,o,t){var r=typeof t=="number"?{index:t,length:0}:t.oldRange,n=typeof t=="number"?null:t.newRange,a=i.length,s=o.length;if(r.length===0&&(n===null||n.length===0)){var l=r.index,d=i.slice(0,l),h=i.slice(l),m=n?n.index:null;t:{var f=l+s-a;if(m!==null&&m!==f||f<0||f>s)break t;var b=o.slice(0,f),g=o.slice(f);if(g!==h)break t;var v=Math.min(l,f),x=d.slice(0,v),_=b.slice(0,v);if(x!==_)break t;var $=d.slice(v),N=b.slice(v);return lu(x,$,N,h)}t:{if(m!==null&&m!==l)break t;var G=l,b=o.slice(0,G),g=o.slice(G);if(b!==d)break t;var I=Math.min(a-G,s-G),w=h.slice(h.length-I),T=g.slice(g.length-I);if(w!==T)break t;var $=h.slice(0,h.length-I),N=g.slice(0,g.length-I);return lu(d,$,N,w)}}if(r.length>0&&n&&n.length===0)t:{var x=i.slice(0,r.index),w=i.slice(r.index+r.length),v=x.length,I=w.length;if(s<v+I)break t;var _=o.slice(0,v),T=o.slice(s-I);if(x!==_||w!==T)break t;var $=i.slice(v,a-I),N=o.slice(v,s-I);return lu(x,$,N,w)}return null}function hd(i,o,t,r){return fl(i,o,t,r,!0)}hd.INSERT=Tr;hd.DELETE=io;hd.EQUAL=Be;g0.exports=hd});var Cu=En((gl,Ya)=>{var z5=200,$0="__lodash_hash_undefined__",A0=9007199254740991,vu="[object Arguments]",w5="[object Array]",L0="[object Boolean]",q0="[object Date]",_5="[object Error]",xu="[object Function]",M0="[object GeneratorFunction]",ud="[object Map]",I0="[object Number]",yu="[object Object]",v0="[object Promise]",D0="[object RegExp]",md="[object Set]",N0="[object String]",R0="[object Symbol]",hu="[object WeakMap]",O0="[object ArrayBuffer]",fd="[object DataView]",P0="[object Float32Array]",H0="[object Float64Array]",F0="[object Int8Array]",B0="[object Int16Array]",V0="[object Int32Array]",U0="[object Uint8Array]",j0="[object Uint8ClampedArray]",G0="[object Uint16Array]",W0="[object Uint32Array]",k5=/[\\^$.*+?()[\]{}|]/g,C5=/\w*$/,S5=/^\[object .+?Constructor\]$/,E5=/^(?:0|[1-9]\d*)$/,jt={};jt[vu]=jt[w5]=jt[O0]=jt[fd]=jt[L0]=jt[q0]=jt[P0]=jt[H0]=jt[F0]=jt[B0]=jt[V0]=jt[ud]=jt[I0]=jt[yu]=jt[D0]=jt[md]=jt[N0]=jt[R0]=jt[U0]=jt[j0]=jt[G0]=jt[W0]=!0;jt[_5]=jt[xu]=jt[hu]=!1;var T5=typeof global=="object"&&global&&global.Object===Object&&global,$5=typeof self=="object"&&self&&self.Object===Object&&self,Nn=T5||$5||Function("return this")(),K0=typeof gl=="object"&&gl&&!gl.nodeType&&gl,x0=K0&&typeof Ya=="object"&&Ya&&!Ya.nodeType&&Ya,A5=x0&&x0.exports===K0;function L5(i,o){return i.set(o[0],o[1]),i}function q5(i,o){return i.add(o),i}function M5(i,o){for(var t=-1,r=i?i.length:0;++t<r&&o(i[t],t,i)!==!1;);return i}function I5(i,o){for(var t=-1,r=o.length,n=i.length;++t<r;)i[n+t]=o[t];return i}function Y0(i,o,t,r){var n=-1,a=i?i.length:0;for(r&&a&&(t=i[++n]);++n<a;)t=o(t,i[n],n,i);return t}function D5(i,o){for(var t=-1,r=Array(i);++t<i;)r[t]=o(t);return r}function N5(i,o){return i?.[o]}function X0(i){var o=!1;if(i!=null&&typeof i.toString!="function")try{o=!!(i+"")}catch{}return o}function y0(i){var o=-1,t=Array(i.size);return i.forEach(function(r,n){t[++o]=[n,r]}),t}function zu(i,o){return function(t){return i(o(t))}}function z0(i){var o=-1,t=Array(i.size);return i.forEach(function(r){t[++o]=r}),t}var R5=Array.prototype,O5=Function.prototype,gd=Object.prototype,pu=Nn["__core-js_shared__"],w0=(function(){var i=/[^.]+$/.exec(pu&&pu.keys&&pu.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})(),Q0=O5.toString,ui=gd.hasOwnProperty,bd=gd.toString,P5=RegExp("^"+Q0.call(ui).replace(k5,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),_0=A5?Nn.Buffer:void 0,k0=Nn.Symbol,C0=Nn.Uint8Array,H5=zu(Object.getPrototypeOf,Object),F5=Object.create,B5=gd.propertyIsEnumerable,V5=R5.splice,S0=Object.getOwnPropertySymbols,U5=_0?_0.isBuffer:void 0,j5=zu(Object.keys,Object),uu=Ja(Nn,"DataView"),bl=Ja(Nn,"Map"),mu=Ja(Nn,"Promise"),fu=Ja(Nn,"Set"),gu=Ja(Nn,"WeakMap"),vl=Ja(Object,"create"),G5=ca(uu),W5=ca(bl),K5=ca(mu),Y5=ca(fu),X5=ca(gu),E0=k0?k0.prototype:void 0,T0=E0?E0.valueOf:void 0;function la(i){var o=-1,t=i?i.length:0;for(this.clear();++o<t;){var r=i[o];this.set(r[0],r[1])}}function Q5(){this.__data__=vl?vl(null):{}}function J5(i){return this.has(i)&&delete this.__data__[i]}function Z5(i){var o=this.__data__;if(vl){var t=o[i];return t===$0?void 0:t}return ui.call(o,i)?o[i]:void 0}function t4(i){var o=this.__data__;return vl?o[i]!==void 0:ui.call(o,i)}function e4(i,o){var t=this.__data__;return t[i]=vl&&o===void 0?$0:o,this}la.prototype.clear=Q5;la.prototype.delete=J5;la.prototype.get=Z5;la.prototype.has=t4;la.prototype.set=e4;function Rn(i){var o=-1,t=i?i.length:0;for(this.clear();++o<t;){var r=i[o];this.set(r[0],r[1])}}function r4(){this.__data__=[]}function o4(i){var o=this.__data__,t=vd(o,i);if(t<0)return!1;var r=o.length-1;return t==r?o.pop():V5.call(o,t,1),!0}function n4(i){var o=this.__data__,t=vd(o,i);return t<0?void 0:o[t][1]}function i4(i){return vd(this.__data__,i)>-1}function a4(i,o){var t=this.__data__,r=vd(t,i);return r<0?t.push([i,o]):t[r][1]=o,this}Rn.prototype.clear=r4;Rn.prototype.delete=o4;Rn.prototype.get=n4;Rn.prototype.has=i4;Rn.prototype.set=a4;function Xa(i){var o=-1,t=i?i.length:0;for(this.clear();++o<t;){var r=i[o];this.set(r[0],r[1])}}function s4(){this.__data__={hash:new la,map:new(bl||Rn),string:new la}}function l4(i){return xd(this,i).delete(i)}function c4(i){return xd(this,i).get(i)}function d4(i){return xd(this,i).has(i)}function p4(i,o){return xd(this,i).set(i,o),this}Xa.prototype.clear=s4;Xa.prototype.delete=l4;Xa.prototype.get=c4;Xa.prototype.has=d4;Xa.prototype.set=p4;function Qa(i){this.__data__=new Rn(i)}function h4(){this.__data__=new Rn}function u4(i){return this.__data__.delete(i)}function m4(i){return this.__data__.get(i)}function f4(i){return this.__data__.has(i)}function g4(i,o){var t=this.__data__;if(t instanceof Rn){var r=t.__data__;if(!bl||r.length<z5-1)return r.push([i,o]),this;t=this.__data__=new Xa(r)}return t.set(i,o),this}Qa.prototype.clear=h4;Qa.prototype.delete=u4;Qa.prototype.get=m4;Qa.prototype.has=f4;Qa.prototype.set=g4;function b4(i,o){var t=_u(i)||F4(i)?D5(i.length,String):[],r=t.length,n=!!r;for(var a in i)(o||ui.call(i,a))&&!(n&&(a=="length"||R4(a,r)))&&t.push(a);return t}function J0(i,o,t){var r=i[o];(!(ui.call(i,o)&&r1(r,t))||t===void 0&&!(o in i))&&(i[o]=t)}function vd(i,o){for(var t=i.length;t--;)if(r1(i[t][0],o))return t;return-1}function v4(i,o){return i&&Z0(o,ku(o),i)}function bu(i,o,t,r,n,a,s){var l;if(r&&(l=a?r(i,n,a,s):r(i)),l!==void 0)return l;if(!yd(i))return i;var d=_u(i);if(d){if(l=I4(i),!o)return L4(i,l)}else{var h=sa(i),m=h==xu||h==M0;if(V4(i))return k4(i,o);if(h==yu||h==vu||m&&!a){if(X0(i))return a?i:{};if(l=D4(m?{}:i),!o)return q4(i,v4(l,i))}else{if(!jt[h])return a?i:{};l=N4(i,h,bu,o)}}s||(s=new Qa);var f=s.get(i);if(f)return f;if(s.set(i,l),!d)var b=t?M4(i):ku(i);return M5(b||i,function(g,v){b&&(v=g,g=i[v]),J0(l,v,bu(g,o,t,r,v,i,s))}),l}function x4(i){return yd(i)?F5(i):{}}function y4(i,o,t){var r=o(i);return _u(i)?r:I5(r,t(i))}function z4(i){return bd.call(i)}function w4(i){if(!yd(i)||P4(i))return!1;var o=n1(i)||X0(i)?P5:S5;return o.test(ca(i))}function _4(i){if(!e1(i))return j5(i);var o=[];for(var t in Object(i))ui.call(i,t)&&t!="constructor"&&o.push(t);return o}function k4(i,o){if(o)return i.slice();var t=new i.constructor(i.length);return i.copy(t),t}function wu(i){var o=new i.constructor(i.byteLength);return new C0(o).set(new C0(i)),o}function C4(i,o){var t=o?wu(i.buffer):i.buffer;return new i.constructor(t,i.byteOffset,i.byteLength)}function S4(i,o,t){var r=o?t(y0(i),!0):y0(i);return Y0(r,L5,new i.constructor)}function E4(i){var o=new i.constructor(i.source,C5.exec(i));return o.lastIndex=i.lastIndex,o}function T4(i,o,t){var r=o?t(z0(i),!0):z0(i);return Y0(r,q5,new i.constructor)}function $4(i){return T0?Object(T0.call(i)):{}}function A4(i,o){var t=o?wu(i.buffer):i.buffer;return new i.constructor(t,i.byteOffset,i.length)}function L4(i,o){var t=-1,r=i.length;for(o||(o=Array(r));++t<r;)o[t]=i[t];return o}function Z0(i,o,t,r){t||(t={});for(var n=-1,a=o.length;++n<a;){var s=o[n],l=r?r(t[s],i[s],s,t,i):void 0;J0(t,s,l===void 0?i[s]:l)}return t}function q4(i,o){return Z0(i,t1(i),o)}function M4(i){return y4(i,ku,t1)}function xd(i,o){var t=i.__data__;return O4(o)?t[typeof o=="string"?"string":"hash"]:t.map}function Ja(i,o){var t=N5(i,o);return w4(t)?t:void 0}var t1=S0?zu(S0,Object):G4,sa=z4;(uu&&sa(new uu(new ArrayBuffer(1)))!=fd||bl&&sa(new bl)!=ud||mu&&sa(mu.resolve())!=v0||fu&&sa(new fu)!=md||gu&&sa(new gu)!=hu)&&(sa=function(i){var o=bd.call(i),t=o==yu?i.constructor:void 0,r=t?ca(t):void 0;if(r)switch(r){case G5:return fd;case W5:return ud;case K5:return v0;case Y5:return md;case X5:return hu}return o});function I4(i){var o=i.length,t=i.constructor(o);return o&&typeof i[0]=="string"&&ui.call(i,"index")&&(t.index=i.index,t.input=i.input),t}function D4(i){return typeof i.constructor=="function"&&!e1(i)?x4(H5(i)):{}}function N4(i,o,t,r){var n=i.constructor;switch(o){case O0:return wu(i);case L0:case q0:return new n(+i);case fd:return C4(i,r);case P0:case H0:case F0:case B0:case V0:case U0:case j0:case G0:case W0:return A4(i,r);case ud:return S4(i,r,t);case I0:case N0:return new n(i);case D0:return E4(i);case md:return T4(i,r,t);case R0:return $4(i)}}function R4(i,o){return o=o??A0,!!o&&(typeof i=="number"||E5.test(i))&&i>-1&&i%1==0&&i<o}function O4(i){var o=typeof i;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?i!=="__proto__":i===null}function P4(i){return!!w0&&w0 in i}function e1(i){var o=i&&i.constructor,t=typeof o=="function"&&o.prototype||gd;return i===t}function ca(i){if(i!=null){try{return Q0.call(i)}catch{}try{return i+""}catch{}}return""}function H4(i){return bu(i,!0,!0)}function r1(i,o){return i===o||i!==i&&o!==o}function F4(i){return B4(i)&&ui.call(i,"callee")&&(!B5.call(i,"callee")||bd.call(i)==vu)}var _u=Array.isArray;function o1(i){return i!=null&&U4(i.length)&&!n1(i)}function B4(i){return j4(i)&&o1(i)}var V4=U5||W4;function n1(i){var o=yd(i)?bd.call(i):"";return o==xu||o==M0}function U4(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=A0}function yd(i){var o=typeof i;return!!i&&(o=="object"||o=="function")}function j4(i){return!!i&&typeof i=="object"}function ku(i){return o1(i)?b4(i):_4(i)}function G4(){return[]}function W4(){return!1}Ya.exports=H4});var Ru=En((xl,ts)=>{var K4=200,Nu="__lodash_hash_undefined__",Td=1,g1=2,b1=9007199254740991,zd="[object Arguments]",$u="[object Array]",Y4="[object AsyncFunction]",v1="[object Boolean]",x1="[object Date]",y1="[object Error]",z1="[object Function]",X4="[object GeneratorFunction]",wd="[object Map]",w1="[object Number]",Q4="[object Null]",Za="[object Object]",i1="[object Promise]",J4="[object Proxy]",_1="[object RegExp]",_d="[object Set]",k1="[object String]",Z4="[object Symbol]",t8="[object Undefined]",Au="[object WeakMap]",C1="[object ArrayBuffer]",kd="[object DataView]",e8="[object Float32Array]",r8="[object Float64Array]",o8="[object Int8Array]",n8="[object Int16Array]",i8="[object Int32Array]",a8="[object Uint8Array]",s8="[object Uint8ClampedArray]",l8="[object Uint16Array]",c8="[object Uint32Array]",d8=/[\\^$.*+?()[\]{}|]/g,p8=/^\[object .+?Constructor\]$/,h8=/^(?:0|[1-9]\d*)$/,Xt={};Xt[e8]=Xt[r8]=Xt[o8]=Xt[n8]=Xt[i8]=Xt[a8]=Xt[s8]=Xt[l8]=Xt[c8]=!0;Xt[zd]=Xt[$u]=Xt[C1]=Xt[v1]=Xt[kd]=Xt[x1]=Xt[y1]=Xt[z1]=Xt[wd]=Xt[w1]=Xt[Za]=Xt[_1]=Xt[_d]=Xt[k1]=Xt[Au]=!1;var S1=typeof global=="object"&&global&&global.Object===Object&&global,u8=typeof self=="object"&&self&&self.Object===Object&&self,On=S1||u8||Function("return this")(),E1=typeof xl=="object"&&xl&&!xl.nodeType&&xl,a1=E1&&typeof ts=="object"&&ts&&!ts.nodeType&&ts,T1=a1&&a1.exports===E1,Su=T1&&S1.process,s1=(function(){try{return Su&&Su.binding&&Su.binding("util")}catch{}})(),l1=s1&&s1.isTypedArray;function m8(i,o){for(var t=-1,r=i==null?0:i.length,n=0,a=[];++t<r;){var s=i[t];o(s,t,i)&&(a[n++]=s)}return a}function f8(i,o){for(var t=-1,r=o.length,n=i.length;++t<r;)i[n+t]=o[t];return i}function g8(i,o){for(var t=-1,r=i==null?0:i.length;++t<r;)if(o(i[t],t,i))return!0;return!1}function b8(i,o){for(var t=-1,r=Array(i);++t<i;)r[t]=o(t);return r}function v8(i){return function(o){return i(o)}}function x8(i,o){return i.has(o)}function y8(i,o){return i?.[o]}function z8(i){var o=-1,t=Array(i.size);return i.forEach(function(r,n){t[++o]=[n,r]}),t}function w8(i,o){return function(t){return i(o(t))}}function _8(i){var o=-1,t=Array(i.size);return i.forEach(function(r){t[++o]=r}),t}var k8=Array.prototype,C8=Function.prototype,$d=Object.prototype,Eu=On["__core-js_shared__"],$1=C8.toString,fn=$d.hasOwnProperty,c1=(function(){var i=/[^.]+$/.exec(Eu&&Eu.keys&&Eu.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})(),A1=$d.toString,S8=RegExp("^"+$1.call(fn).replace(d8,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),d1=T1?On.Buffer:void 0,Cd=On.Symbol,p1=On.Uint8Array,L1=$d.propertyIsEnumerable,E8=k8.splice,da=Cd?Cd.toStringTag:void 0,h1=Object.getOwnPropertySymbols,T8=d1?d1.isBuffer:void 0,$8=w8(Object.keys,Object),Lu=es(On,"DataView"),yl=es(On,"Map"),qu=es(On,"Promise"),Mu=es(On,"Set"),Iu=es(On,"WeakMap"),zl=es(Object,"create"),A8=ua(Lu),L8=ua(yl),q8=ua(qu),M8=ua(Mu),I8=ua(Iu),u1=Cd?Cd.prototype:void 0,Tu=u1?u1.valueOf:void 0;function pa(i){var o=-1,t=i==null?0:i.length;for(this.clear();++o<t;){var r=i[o];this.set(r[0],r[1])}}function D8(){this.__data__=zl?zl(null):{},this.size=0}function N8(i){var o=this.has(i)&&delete this.__data__[i];return this.size-=o?1:0,o}function R8(i){var o=this.__data__;if(zl){var t=o[i];return t===Nu?void 0:t}return fn.call(o,i)?o[i]:void 0}function O8(i){var o=this.__data__;return zl?o[i]!==void 0:fn.call(o,i)}function P8(i,o){var t=this.__data__;return this.size+=this.has(i)?0:1,t[i]=zl&&o===void 0?Nu:o,this}pa.prototype.clear=D8;pa.prototype.delete=N8;pa.prototype.get=R8;pa.prototype.has=O8;pa.prototype.set=P8;function Pn(i){var o=-1,t=i==null?0:i.length;for(this.clear();++o<t;){var r=i[o];this.set(r[0],r[1])}}function H8(){this.__data__=[],this.size=0}function F8(i){var o=this.__data__,t=Ad(o,i);if(t<0)return!1;var r=o.length-1;return t==r?o.pop():E8.call(o,t,1),--this.size,!0}function B8(i){var o=this.__data__,t=Ad(o,i);return t<0?void 0:o[t][1]}function V8(i){return Ad(this.__data__,i)>-1}function U8(i,o){var t=this.__data__,r=Ad(t,i);return r<0?(++this.size,t.push([i,o])):t[r][1]=o,this}Pn.prototype.clear=H8;Pn.prototype.delete=F8;Pn.prototype.get=B8;Pn.prototype.has=V8;Pn.prototype.set=U8;function ha(i){var o=-1,t=i==null?0:i.length;for(this.clear();++o<t;){var r=i[o];this.set(r[0],r[1])}}function j8(){this.size=0,this.__data__={hash:new pa,map:new(yl||Pn),string:new pa}}function G8(i){var o=Ld(this,i).delete(i);return this.size-=o?1:0,o}function W8(i){return Ld(this,i).get(i)}function K8(i){return Ld(this,i).has(i)}function Y8(i,o){var t=Ld(this,i),r=t.size;return t.set(i,o),this.size+=t.size==r?0:1,this}ha.prototype.clear=j8;ha.prototype.delete=G8;ha.prototype.get=W8;ha.prototype.has=K8;ha.prototype.set=Y8;function Sd(i){var o=-1,t=i==null?0:i.length;for(this.__data__=new ha;++o<t;)this.add(i[o])}function X8(i){return this.__data__.set(i,Nu),this}function Q8(i){return this.__data__.has(i)}Sd.prototype.add=Sd.prototype.push=X8;Sd.prototype.has=Q8;function fi(i){var o=this.__data__=new Pn(i);this.size=o.size}function J8(){this.__data__=new Pn,this.size=0}function Z8(i){var o=this.__data__,t=o.delete(i);return this.size=o.size,t}function t6(i){return this.__data__.get(i)}function e6(i){return this.__data__.has(i)}function r6(i,o){var t=this.__data__;if(t instanceof Pn){var r=t.__data__;if(!yl||r.length<K4-1)return r.push([i,o]),this.size=++t.size,this;t=this.__data__=new ha(r)}return t.set(i,o),this.size=t.size,this}fi.prototype.clear=J8;fi.prototype.delete=Z8;fi.prototype.get=t6;fi.prototype.has=e6;fi.prototype.set=r6;function o6(i,o){var t=Ed(i),r=!t&&v6(i),n=!t&&!r&&Du(i),a=!t&&!r&&!n&&O1(i),s=t||r||n||a,l=s?b8(i.length,String):[],d=l.length;for(var h in i)(o||fn.call(i,h))&&!(s&&(h=="length"||n&&(h=="offset"||h=="parent")||a&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||u6(h,d)))&&l.push(h);return l}function Ad(i,o){for(var t=i.length;t--;)if(I1(i[t][0],o))return t;return-1}function n6(i,o,t){var r=o(i);return Ed(i)?r:f8(r,t(i))}function _l(i){return i==null?i===void 0?t8:Q4:da&&da in Object(i)?p6(i):b6(i)}function m1(i){return wl(i)&&_l(i)==zd}function q1(i,o,t,r,n){return i===o?!0:i==null||o==null||!wl(i)&&!wl(o)?i!==i&&o!==o:i6(i,o,t,r,q1,n)}function i6(i,o,t,r,n,a){var s=Ed(i),l=Ed(o),d=s?$u:mi(i),h=l?$u:mi(o);d=d==zd?Za:d,h=h==zd?Za:h;var m=d==Za,f=h==Za,b=d==h;if(b&&Du(i)){if(!Du(o))return!1;s=!0,m=!1}if(b&&!m)return a||(a=new fi),s||O1(i)?M1(i,o,t,r,n,a):c6(i,o,d,t,r,n,a);if(!(t&Td)){var g=m&&fn.call(i,"__wrapped__"),v=f&&fn.call(o,"__wrapped__");if(g||v){var x=g?i.value():i,_=v?o.value():o;return a||(a=new fi),n(x,_,t,r,a)}}return b?(a||(a=new fi),d6(i,o,t,r,n,a)):!1}function a6(i){if(!R1(i)||f6(i))return!1;var o=D1(i)?S8:p8;return o.test(ua(i))}function s6(i){return wl(i)&&N1(i.length)&&!!Xt[_l(i)]}function l6(i){if(!g6(i))return $8(i);var o=[];for(var t in Object(i))fn.call(i,t)&&t!="constructor"&&o.push(t);return o}function M1(i,o,t,r,n,a){var s=t&Td,l=i.length,d=o.length;if(l!=d&&!(s&&d>l))return!1;var h=a.get(i);if(h&&a.get(o))return h==o;var m=-1,f=!0,b=t&g1?new Sd:void 0;for(a.set(i,o),a.set(o,i);++m<l;){var g=i[m],v=o[m];if(r)var x=s?r(v,g,m,o,i,a):r(g,v,m,i,o,a);if(x!==void 0){if(x)continue;f=!1;break}if(b){if(!g8(o,function(_,$){if(!x8(b,$)&&(g===_||n(g,_,t,r,a)))return b.push($)})){f=!1;break}}else if(!(g===v||n(g,v,t,r,a))){f=!1;break}}return a.delete(i),a.delete(o),f}function c6(i,o,t,r,n,a,s){switch(t){case kd:if(i.byteLength!=o.byteLength||i.byteOffset!=o.byteOffset)return!1;i=i.buffer,o=o.buffer;case C1:return!(i.byteLength!=o.byteLength||!a(new p1(i),new p1(o)));case v1:case x1:case w1:return I1(+i,+o);case y1:return i.name==o.name&&i.message==o.message;case _1:case k1:return i==o+"";case wd:var l=z8;case _d:var d=r&Td;if(l||(l=_8),i.size!=o.size&&!d)return!1;var h=s.get(i);if(h)return h==o;r|=g1,s.set(i,o);var m=M1(l(i),l(o),r,n,a,s);return s.delete(i),m;case Z4:if(Tu)return Tu.call(i)==Tu.call(o)}return!1}function d6(i,o,t,r,n,a){var s=t&Td,l=f1(i),d=l.length,h=f1(o),m=h.length;if(d!=m&&!s)return!1;for(var f=d;f--;){var b=l[f];if(!(s?b in o:fn.call(o,b)))return!1}var g=a.get(i);if(g&&a.get(o))return g==o;var v=!0;a.set(i,o),a.set(o,i);for(var x=s;++f<d;){b=l[f];var _=i[b],$=o[b];if(r)var N=s?r($,_,b,o,i,a):r(_,$,b,i,o,a);if(!(N===void 0?_===$||n(_,$,t,r,a):N)){v=!1;break}x||(x=b=="constructor")}if(v&&!x){var G=i.constructor,I=o.constructor;G!=I&&"constructor"in i&&"constructor"in o&&!(typeof G=="function"&&G instanceof G&&typeof I=="function"&&I instanceof I)&&(v=!1)}return a.delete(i),a.delete(o),v}function f1(i){return n6(i,z6,h6)}function Ld(i,o){var t=i.__data__;return m6(o)?t[typeof o=="string"?"string":"hash"]:t.map}function es(i,o){var t=y8(i,o);return a6(t)?t:void 0}function p6(i){var o=fn.call(i,da),t=i[da];try{i[da]=void 0;var r=!0}catch{}var n=A1.call(i);return r&&(o?i[da]=t:delete i[da]),n}var h6=h1?function(i){return i==null?[]:(i=Object(i),m8(h1(i),function(o){return L1.call(i,o)}))}:w6,mi=_l;(Lu&&mi(new Lu(new ArrayBuffer(1)))!=kd||yl&&mi(new yl)!=wd||qu&&mi(qu.resolve())!=i1||Mu&&mi(new Mu)!=_d||Iu&&mi(new Iu)!=Au)&&(mi=function(i){var o=_l(i),t=o==Za?i.constructor:void 0,r=t?ua(t):"";if(r)switch(r){case A8:return kd;case L8:return wd;case q8:return i1;case M8:return _d;case I8:return Au}return o});function u6(i,o){return o=o??b1,!!o&&(typeof i=="number"||h8.test(i))&&i>-1&&i%1==0&&i<o}function m6(i){var o=typeof i;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?i!=="__proto__":i===null}function f6(i){return!!c1&&c1 in i}function g6(i){var o=i&&i.constructor,t=typeof o=="function"&&o.prototype||$d;return i===t}function b6(i){return A1.call(i)}function ua(i){if(i!=null){try{return $1.call(i)}catch{}try{return i+""}catch{}}return""}function I1(i,o){return i===o||i!==i&&o!==o}var v6=m1((function(){return arguments})())?m1:function(i){return wl(i)&&fn.call(i,"callee")&&!L1.call(i,"callee")},Ed=Array.isArray;function x6(i){return i!=null&&N1(i.length)&&!D1(i)}var Du=T8||_6;function y6(i,o){return q1(i,o)}function D1(i){if(!R1(i))return!1;var o=_l(i);return o==z1||o==X4||o==Y4||o==J4}function N1(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=b1}function R1(i){var o=typeof i;return i!=null&&(o=="object"||o=="function")}function wl(i){return i!=null&&typeof i=="object"}var O1=l1?v8(l1):s6;function z6(i){return x6(i)?o6(i):l6(i)}function w6(){return[]}function _6(){return!1}ts.exports=y6});var P1=En(Pu=>{"use strict";Object.defineProperty(Pu,"__esModule",{value:!0});var k6=Cu(),C6=Ru(),Ou;(function(i){function o(a={},s={},l=!1){typeof a!="object"&&(a={}),typeof s!="object"&&(s={});let d=k6(s);l||(d=Object.keys(d).reduce((h,m)=>(d[m]!=null&&(h[m]=d[m]),h),{}));for(let h in a)a[h]!==void 0&&s[h]===void 0&&(d[h]=a[h]);return Object.keys(d).length>0?d:void 0}i.compose=o;function t(a={},s={}){typeof a!="object"&&(a={}),typeof s!="object"&&(s={});let l=Object.keys(a).concat(Object.keys(s)).reduce((d,h)=>(C6(a[h],s[h])||(d[h]=s[h]===void 0?null:s[h]),d),{});return Object.keys(l).length>0?l:void 0}i.diff=t;function r(a={},s={}){a=a||{};let l=Object.keys(s).reduce((d,h)=>(s[h]!==a[h]&&a[h]!==void 0&&(d[h]=s[h]),d),{});return Object.keys(a).reduce((d,h)=>(a[h]!==s[h]&&s[h]===void 0&&(d[h]=null),d),l)}i.invert=r;function n(a,s,l=!1){if(typeof a!="object")return s;if(typeof s!="object")return;if(!l)return s;let d=Object.keys(s).reduce((h,m)=>(a[m]===void 0&&(h[m]=s[m]),h),{});return Object.keys(d).length>0?d:void 0}i.transform=n})(Ou||(Ou={}));Pu.default=Ou});var Bu=En(Fu=>{"use strict";Object.defineProperty(Fu,"__esModule",{value:!0});var Hu;(function(i){function o(t){return typeof t.delete=="number"?t.delete:typeof t.retain=="number"?t.retain:typeof t.retain=="object"&&t.retain!==null?1:typeof t.insert=="string"?t.insert.length:1}i.length=o})(Hu||(Hu={}));Fu.default=Hu});var F1=En(Uu=>{"use strict";Object.defineProperty(Uu,"__esModule",{value:!0});var H1=Bu(),Vu=class{constructor(o){this.ops=o,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(o){o||(o=1/0);let t=this.ops[this.index];if(t){let r=this.offset,n=H1.default.length(t);if(o>=n-r?(o=n-r,this.index+=1,this.offset=0):this.offset+=o,typeof t.delete=="number")return{delete:o};{let a={};return t.attributes&&(a.attributes=t.attributes),typeof t.retain=="number"?a.retain=o:typeof t.retain=="object"&&t.retain!==null?a.retain=t.retain:typeof t.insert=="string"?a.insert=t.insert.substr(r,o):a.insert=t.insert,a}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?H1.default.length(this.ops[this.index])-this.offset:1/0}peekType(){let o=this.ops[this.index];return o?typeof o.delete=="number"?"delete":typeof o.retain=="number"||typeof o.retain=="object"&&o.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{let o=this.offset,t=this.index,r=this.next(),n=this.ops.slice(this.index);return this.offset=o,this.index=t,[r].concat(n)}}else return[]}};Uu.default=Vu});var Br=En((Fn,Md)=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.AttributeMap=Fn.OpIterator=Fn.Op=void 0;var qd=b0(),S6=Cu(),ju=Ru(),ma=P1();Fn.AttributeMap=ma.default;var Hn=Bu();Fn.Op=Hn.default;var yo=F1();Fn.OpIterator=yo.default;var E6="\0",B1=(i,o)=>{if(typeof i!="object"||i===null)throw new Error(`cannot retain a ${typeof i}`);if(typeof o!="object"||o===null)throw new Error(`cannot retain a ${typeof o}`);let t=Object.keys(i)[0];if(!t||t!==Object.keys(o)[0])throw new Error(`embed types not matched: ${t} != ${Object.keys(o)[0]}`);return[t,i[t],o[t]]},Bn=class i{constructor(o){Array.isArray(o)?this.ops=o:o!=null&&Array.isArray(o.ops)?this.ops=o.ops:this.ops=[]}static registerEmbed(o,t){this.handlers[o]=t}static unregisterEmbed(o){delete this.handlers[o]}static getHandler(o){let t=this.handlers[o];if(!t)throw new Error(`no handlers for embed type "${o}"`);return t}insert(o,t){let r={};return typeof o=="string"&&o.length===0?this:(r.insert=o,t!=null&&typeof t=="object"&&Object.keys(t).length>0&&(r.attributes=t),this.push(r))}delete(o){return o<=0?this:this.push({delete:o})}retain(o,t){if(typeof o=="number"&&o<=0)return this;let r={retain:o};return t!=null&&typeof t=="object"&&Object.keys(t).length>0&&(r.attributes=t),this.push(r)}push(o){let t=this.ops.length,r=this.ops[t-1];if(o=S6(o),typeof r=="object"){if(typeof o.delete=="number"&&typeof r.delete=="number")return this.ops[t-1]={delete:r.delete+o.delete},this;if(typeof r.delete=="number"&&o.insert!=null&&(t-=1,r=this.ops[t-1],typeof r!="object"))return this.ops.unshift(o),this;if(ju(o.attributes,r.attributes)){if(typeof o.insert=="string"&&typeof r.insert=="string")return this.ops[t-1]={insert:r.insert+o.insert},typeof o.attributes=="object"&&(this.ops[t-1].attributes=o.attributes),this;if(typeof o.retain=="number"&&typeof r.retain=="number")return this.ops[t-1]={retain:r.retain+o.retain},typeof o.attributes=="object"&&(this.ops[t-1].attributes=o.attributes),this}}return t===this.ops.length?this.ops.push(o):this.ops.splice(t,0,o),this}chop(){let o=this.ops[this.ops.length-1];return o&&typeof o.retain=="number"&&!o.attributes&&this.ops.pop(),this}filter(o){return this.ops.filter(o)}forEach(o){this.ops.forEach(o)}map(o){return this.ops.map(o)}partition(o){let t=[],r=[];return this.forEach(n=>{(o(n)?t:r).push(n)}),[t,r]}reduce(o,t){return this.ops.reduce(o,t)}changeLength(){return this.reduce((o,t)=>t.insert?o+Hn.default.length(t):t.delete?o-t.delete:o,0)}length(){return this.reduce((o,t)=>o+Hn.default.length(t),0)}slice(o=0,t=1/0){let r=[],n=new yo.default(this.ops),a=0;for(;a<t&&n.hasNext();){let s;a<o?s=n.next(o-a):(s=n.next(t-a),r.push(s)),a+=Hn.default.length(s)}return new i(r)}compose(o){let t=new yo.default(this.ops),r=new yo.default(o.ops),n=[],a=r.peek();if(a!=null&&typeof a.retain=="number"&&a.attributes==null){let l=a.retain;for(;t.peekType()==="insert"&&t.peekLength()<=l;)l-=t.peekLength(),n.push(t.next());a.retain-l>0&&r.next(a.retain-l)}let s=new i(n);for(;t.hasNext()||r.hasNext();)if(r.peekType()==="insert")s.push(r.next());else if(t.peekType()==="delete")s.push(t.next());else{let l=Math.min(t.peekLength(),r.peekLength()),d=t.next(l),h=r.next(l);if(h.retain){let m={};if(typeof d.retain=="number")m.retain=typeof h.retain=="number"?l:h.retain;else if(typeof h.retain=="number")d.retain==null?m.insert=d.insert:m.retain=d.retain;else{let b=d.retain==null?"insert":"retain",[g,v,x]=B1(d[b],h.retain),_=i.getHandler(g);m[b]={[g]:_.compose(v,x,b==="retain")}}let f=ma.default.compose(d.attributes,h.attributes,typeof d.retain=="number");if(f&&(m.attributes=f),s.push(m),!r.hasNext()&&ju(s.ops[s.ops.length-1],m)){let b=new i(t.rest());return s.concat(b).chop()}}else typeof h.delete=="number"&&(typeof d.retain=="number"||typeof d.retain=="object"&&d.retain!==null)&&s.push(h)}return s.chop()}concat(o){let t=new i(this.ops.slice());return o.ops.length>0&&(t.push(o.ops[0]),t.ops=t.ops.concat(o.ops.slice(1))),t}diff(o,t){if(this.ops===o.ops)return new i;let r=[this,o].map(d=>d.map(h=>{if(h.insert!=null)return typeof h.insert=="string"?h.insert:E6;let m=d===o?"on":"with";throw new Error("diff() called "+m+" non-document")}).join("")),n=new i,a=qd(r[0],r[1],t,!0),s=new yo.default(this.ops),l=new yo.default(o.ops);return a.forEach(d=>{let h=d[1].length;for(;h>0;){let m=0;switch(d[0]){case qd.INSERT:m=Math.min(l.peekLength(),h),n.push(l.next(m));break;case qd.DELETE:m=Math.min(h,s.peekLength()),s.next(m),n.delete(m);break;case qd.EQUAL:m=Math.min(s.peekLength(),l.peekLength(),h);let f=s.next(m),b=l.next(m);ju(f.insert,b.insert)?n.retain(m,ma.default.diff(f.attributes,b.attributes)):n.push(b).delete(m);break}h-=m}}),n.chop()}eachLine(o,t=`
|
|
2
|
-
`){let r=new yo.default(this.ops),n=new i,a=0;for(;r.hasNext();){if(r.peekType()!=="insert")return;let s=r.peek(),l=Hn.default.length(s)-r.peekLength(),d=typeof s.insert=="string"?s.insert.indexOf(t,l)-l:-1;if(d<0)n.push(r.next());else if(d>0)n.push(r.next(d));else{if(o(n,r.next(1).attributes||{},a)===!1)return;a+=1,n=new i}}n.length()>0&&o(n,{},a)}invert(o){let t=new i;return this.reduce((r,n)=>{if(n.insert)t.delete(Hn.default.length(n));else{if(typeof n.retain=="number"&&n.attributes==null)return t.retain(n.retain),r+n.retain;if(n.delete||typeof n.retain=="number"){let a=n.delete||n.retain;return o.slice(r,r+a).forEach(l=>{n.delete?t.push(l):n.retain&&n.attributes&&t.retain(Hn.default.length(l),ma.default.invert(n.attributes,l.attributes))}),r+a}else if(typeof n.retain=="object"&&n.retain!==null){let a=o.slice(r,r+1),s=new yo.default(a.ops).next(),[l,d,h]=B1(n.retain,s.insert),m=i.getHandler(l);return t.retain({[l]:m.invert(d,h)},ma.default.invert(n.attributes,s.attributes)),r+1}}return r},0),t.chop()}transform(o,t=!1){if(t=!!t,typeof o=="number")return this.transformPosition(o,t);let r=o,n=new yo.default(this.ops),a=new yo.default(r.ops),s=new i;for(;n.hasNext()||a.hasNext();)if(n.peekType()==="insert"&&(t||a.peekType()!=="insert"))s.retain(Hn.default.length(n.next()));else if(a.peekType()==="insert")s.push(a.next());else{let l=Math.min(n.peekLength(),a.peekLength()),d=n.next(l),h=a.next(l);if(d.delete)continue;if(h.delete)s.push(h);else{let m=d.retain,f=h.retain,b=typeof f=="object"&&f!==null?f:l;if(typeof m=="object"&&m!==null&&typeof f=="object"&&f!==null){let g=Object.keys(m)[0];if(g===Object.keys(f)[0]){let v=i.getHandler(g);v&&(b={[g]:v.transform(m[g],f[g],t)})}}s.retain(b,ma.default.transform(d.attributes,h.attributes,t))}}return s.chop()}transformPosition(o,t=!1){t=!!t;let r=new yo.default(this.ops),n=0;for(;r.hasNext()&&n<=o;){let a=r.peekLength(),s=r.peekType();if(r.next(),s==="delete"){o-=Math.min(a,o-n);continue}else s==="insert"&&(n<o||!t)&&(o+=a);n+=a}return o}};Bn.Op=Hn.default;Bn.OpIterator=yo.default;Bn.AttributeMap=ma.default;Bn.handlers={};Fn.default=Bn;typeof Md=="object"&&(Md.exports=Bn,Md.exports.default=Bn)});var nz=En((xst,dm)=>{"use strict";var cT=Object.prototype.hasOwnProperty,Ar="~";function Il(){}Object.create&&(Il.prototype=Object.create(null),new Il().__proto__||(Ar=!1));function dT(i,o,t){this.fn=i,this.context=o,this.once=t||!1}function oz(i,o,t,r,n){if(typeof t!="function")throw new TypeError("The listener must be a function");var a=new dT(t,r||i,n),s=Ar?Ar+o:o;return i._events[s]?i._events[s].fn?i._events[s]=[i._events[s],a]:i._events[s].push(a):(i._events[s]=a,i._eventsCount++),i}function ap(i,o){--i._eventsCount===0?i._events=new Il:delete i._events[o]}function xr(){this._events=new Il,this._eventsCount=0}xr.prototype.eventNames=function(){var o=[],t,r;if(this._eventsCount===0)return o;for(r in t=this._events)cT.call(t,r)&&o.push(Ar?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(t)):o};xr.prototype.listeners=function(o){var t=Ar?Ar+o:o,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var n=0,a=r.length,s=new Array(a);n<a;n++)s[n]=r[n].fn;return s};xr.prototype.listenerCount=function(o){var t=Ar?Ar+o:o,r=this._events[t];return r?r.fn?1:r.length:0};xr.prototype.emit=function(o,t,r,n,a,s){var l=Ar?Ar+o:o;if(!this._events[l])return!1;var d=this._events[l],h=arguments.length,m,f;if(d.fn){switch(d.once&&this.removeListener(o,d.fn,void 0,!0),h){case 1:return d.fn.call(d.context),!0;case 2:return d.fn.call(d.context,t),!0;case 3:return d.fn.call(d.context,t,r),!0;case 4:return d.fn.call(d.context,t,r,n),!0;case 5:return d.fn.call(d.context,t,r,n,a),!0;case 6:return d.fn.call(d.context,t,r,n,a,s),!0}for(f=1,m=new Array(h-1);f<h;f++)m[f-1]=arguments[f];d.fn.apply(d.context,m)}else{var b=d.length,g;for(f=0;f<b;f++)switch(d[f].once&&this.removeListener(o,d[f].fn,void 0,!0),h){case 1:d[f].fn.call(d[f].context);break;case 2:d[f].fn.call(d[f].context,t);break;case 3:d[f].fn.call(d[f].context,t,r);break;case 4:d[f].fn.call(d[f].context,t,r,n);break;default:if(!m)for(g=1,m=new Array(h-1);g<h;g++)m[g-1]=arguments[g];d[f].fn.apply(d[f].context,m)}}return!0};xr.prototype.on=function(o,t,r){return oz(this,o,t,r,!1)};xr.prototype.once=function(o,t,r){return oz(this,o,t,r,!0)};xr.prototype.removeListener=function(o,t,r,n){var a=Ar?Ar+o:o;if(!this._events[a])return this;if(!t)return ap(this,a),this;var s=this._events[a];if(s.fn)s.fn===t&&(!n||s.once)&&(!r||s.context===r)&&ap(this,a);else{for(var l=0,d=[],h=s.length;l<h;l++)(s[l].fn!==t||n&&!s[l].once||r&&s[l].context!==r)&&d.push(s[l]);d.length?this._events[a]=d.length===1?d[0]:d:ap(this,a)}return this};xr.prototype.removeAllListeners=function(o){var t;return o?(t=Ar?Ar+o:o,this._events[t]&&ap(this,t)):(this._events=new Il,this._eventsCount=0),this};xr.prototype.off=xr.prototype.removeListener;xr.prototype.addListener=xr.prototype.on;xr.prefixed=Ar;xr.EventEmitter=xr;typeof dm<"u"&&(dm.exports=xr)});var Qm=En((sc,Xm)=>{(function(i,o){typeof sc=="object"&&typeof Xm=="object"?Xm.exports=o():typeof define=="function"&&define.amd?define([],o):typeof sc=="object"?sc.AirDatepicker=o():i.AirDatepicker=o()})(sc,(function(){return(function(){"use strict";var i={d:function(R,y){for(var k in y)i.o(y,k)&&!i.o(R,k)&&Object.defineProperty(R,k,{enumerable:!0,get:y[k]})},o:function(R,y){return Object.prototype.hasOwnProperty.call(R,y)}},o={};i.d(o,{default:function(){return nt}});var t={days:"days",months:"months",years:"years",day:"day",month:"month",year:"year",eventChangeViewDate:"changeViewDate",eventChangeCurrentView:"changeCurrentView",eventChangeFocusDate:"changeFocusDate",eventChangeSelectedDate:"changeSelectedDate",eventChangeTime:"changeTime",eventChangeLastSelectedDate:"changeLastSelectedDate",actionSelectDate:"selectDate",actionUnselectDate:"unselectDate",cssClassWeekend:"-weekend-"},r={classes:"",inline:!1,locale:{days:["\u0412\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435","\u041F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A","\u0412\u0442\u043E\u0440\u043D\u0438\u043A","\u0421\u0440\u0435\u0434\u0430","\u0427\u0435\u0442\u0432\u0435\u0440\u0433","\u041F\u044F\u0442\u043D\u0438\u0446\u0430","\u0421\u0443\u0431\u0431\u043E\u0442\u0430"],daysShort:["\u0412\u043E\u0441","\u041F\u043E\u043D","\u0412\u0442\u043E","\u0421\u0440\u0435","\u0427\u0435\u0442","\u041F\u044F\u0442","\u0421\u0443\u0431"],daysMin:["\u0412\u0441","\u041F\u043D","\u0412\u0442","\u0421\u0440","\u0427\u0442","\u041F\u0442","\u0421\u0431"],months:["\u042F\u043D\u0432\u0430\u0440\u044C","\u0424\u0435\u0432\u0440\u0430\u043B\u044C","\u041C\u0430\u0440\u0442","\u0410\u043F\u0440\u0435\u043B\u044C","\u041C\u0430\u0439","\u0418\u044E\u043D\u044C","\u0418\u044E\u043B\u044C","\u0410\u0432\u0433\u0443\u0441\u0442","\u0421\u0435\u043D\u0442\u044F\u0431\u0440\u044C","\u041E\u043A\u0442\u044F\u0431\u0440\u044C","\u041D\u043E\u044F\u0431\u0440\u044C","\u0414\u0435\u043A\u0430\u0431\u0440\u044C"],monthsShort:["\u042F\u043D\u0432","\u0424\u0435\u0432","\u041C\u0430\u0440","\u0410\u043F\u0440","\u041C\u0430\u0439","\u0418\u044E\u043D","\u0418\u044E\u043B","\u0410\u0432\u0433","\u0421\u0435\u043D","\u041E\u043A\u0442","\u041D\u043E\u044F","\u0414\u0435\u043A"],today:"\u0421\u0435\u0433\u043E\u0434\u043D\u044F",clear:"\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C",dateFormat:"dd.MM.yyyy",timeFormat:"HH:mm",firstDay:1},startDate:new Date,firstDay:"",weekends:[6,0],dateFormat:"",altField:"",altFieldDateFormat:"T",toggleSelected:!0,keyboardNav:!0,selectedDates:!1,container:"",isMobile:!1,visible:!1,position:"bottom left",offset:12,view:t.days,minView:t.days,showOtherMonths:!0,selectOtherMonths:!0,moveToOtherMonthsOnSelect:!0,showOtherYears:!0,selectOtherYears:!0,moveToOtherYearsOnSelect:!0,minDate:"",maxDate:"",disableNavWhenOutOfRange:!0,multipleDates:!1,multipleDatesSeparator:", ",range:!1,dynamicRange:!0,buttons:!1,monthsField:"monthsShort",showEvent:"focus",autoClose:!1,fixedHeight:!1,prevHtml:'<svg><path d="M 17,12 l -5,5 l 5,5"></path></svg>',nextHtml:'<svg><path d="M 14,12 l 5,5 l -5,5"></path></svg>',navTitles:{days:"MMMM, <i>yyyy</i>",months:"yyyy",years:"yyyy1 - yyyy2"},timepicker:!1,onlyTimepicker:!1,dateTimeSeparator:" ",timeFormat:"",minHours:0,maxHours:24,minMinutes:0,maxMinutes:59,hoursStep:1,minutesStep:1,onSelect:!1,onChangeViewDate:!1,onChangeView:!1,onRenderCell:!1,onShow:!1,onHide:!1,onClickDayName:!1};function n(R){let y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:document;return typeof R=="string"?y.querySelector(R):R}function a(){let{tagName:R="div",className:y="",innerHtml:k="",id:z="",attrs:M={}}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},q=document.createElement(R);return y&&q.classList.add(...y.split(" ")),z&&(q.id=z),k&&(q.innerHTML=k),M&&s(q,M),q}function s(R,y){for(let[k,z]of Object.entries(y))z!==void 0&&R.setAttribute(k,z);return R}function l(R){return new Date(R.getFullYear(),R.getMonth()+1,0).getDate()}function d(R){let y=R.getHours(),{hours:k,dayPeriod:z}=h(y);return{year:R.getFullYear(),month:R.getMonth(),fullMonth:R.getMonth()+1<10?"0"+(R.getMonth()+1):R.getMonth()+1,date:R.getDate(),fullDate:R.getDate()<10?"0"+R.getDate():R.getDate(),day:R.getDay(),hours:y,fullHours:m(y),hours12:k,dayPeriod:z,fullHours12:m(k),minutes:R.getMinutes(),fullMinutes:R.getMinutes()<10?"0"+R.getMinutes():R.getMinutes()}}function h(R){return{dayPeriod:R>11?"pm":"am",hours:R%12==0?12:R%12}}function m(R){return R<10?"0"+R:R}function f(R){let y=10*Math.floor(R.getFullYear()/10);return[y,y+9]}function b(){let R=[];for(var y=arguments.length,k=new Array(y),z=0;z<y;z++)k[z]=arguments[z];return k.forEach((M=>{if(typeof M=="object")for(let q in M)M[q]&&R.push(q);else M&&R.push(M)})),R.join(" ")}function g(R,y){let k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.days;if(!R||!y)return!1;let z=d(R),M=d(y);return{[t.days]:z.date===M.date&&z.month===M.month&&z.year===M.year,[t.months]:z.month===M.month&&z.year===M.year,[t.years]:z.year===M.year}[k]}function v(R,y,k){let z=_(R,!1).getTime(),M=_(y,!1).getTime();return k?z>=M:z>M}function x(R,y){return!v(R,y,!0)}function _(R){let y=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],k=new Date(R.getTime());return typeof y!="boolean"||y||(function(z){z.setHours(0,0,0,0)})(k),k}function $(R,y,k){R.length?R.forEach((z=>{z.addEventListener(y,k)})):R.addEventListener(y,k)}function N(R,y){return!(!R||R===document||R instanceof DocumentFragment)&&(R.matches(y)?R:N(R.parentNode,y))}function G(R,y,k){return R>k?k:R<y?y:R}function I(R){for(var y=arguments.length,k=new Array(y>1?y-1:0),z=1;z<y;z++)k[z-1]=arguments[z];return k.filter((M=>M)).forEach((M=>{for(let[q,A]of Object.entries(M))if(A!==void 0&&A.toString()==="[object Object]"){let P=R[q]!==void 0?R[q].toString():void 0,U=A.toString(),Y=Array.isArray(A)?[]:{};R[q]=R[q]?P!==U?Y:R[q]:Y,I(R[q],A)}else R[q]=A})),R}function w(R){let y=R;return R instanceof Date||(typeof R=="string"&&/^\d{4}-\d{2}-\d{2}$/.test(R)&&(R+="T00:00:00"),y=new Date(R)),isNaN(y.getTime())&&(console.log(`Unable to convert value "${R}" to Date object`),y=!1),y}function T(R){let y="\\s|\\.|-|/|\\\\|,|\\$|\\!|\\?|:|;";return new RegExp("(^|>|"+y+")("+R+")($|<|"+y+")","g")}function L(R,y,k){return(y=(function(z){var M=(function(q,A){if(typeof q!="object"||q===null)return q;var P=q[Symbol.toPrimitive];if(P!==void 0){var U=P.call(q,"string");if(typeof U!="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(z);return typeof M=="symbol"?M:String(M)})(y))in R?Object.defineProperty(R,y,{value:k,enumerable:!0,configurable:!0,writable:!0}):R[y]=k,R}class W{constructor(){let{type:y,date:k,dp:z,opts:M,body:q}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};L(this,"focus",(()=>{this.$cell.classList.add("-focus-"),this.focused=!0})),L(this,"removeFocus",(()=>{this.$cell.classList.remove("-focus-"),this.focused=!1})),L(this,"select",(()=>{this.$cell.classList.add("-selected-"),this.selected=!0})),L(this,"removeSelect",(()=>{this.$cell.classList.remove("-selected-","-range-from-","-range-to-"),this.selected=!1})),L(this,"onChangeSelectedDate",(()=>{this.isDisabled||(this._handleSelectedStatus(),this.opts.range&&this._handleRangeStatus())})),L(this,"onChangeFocusDate",(A=>{if(!A)return void(this.focused&&this.removeFocus());let P=g(A,this.date,this.type);P?this.focus():!P&&this.focused&&this.removeFocus(),this.opts.range&&this._handleRangeStatus()})),L(this,"render",(()=>(this.$cell.innerHTML=this._getHtml(),this._handleClasses(),this.$cell))),this.type=y,this.singleType=this.type.slice(0,-1),this.date=k,this.dp=z,this.opts=M,this.body=q,this.customData=!1,this.init()}init(){var y,k;let{onRenderCell:z}=this.opts;z&&(this.customData=z({date:this.date,cellType:this.singleType,datepicker:this.dp})),this._createElement(),this._bindDatepickerEvents(),(y=this.customData)!==null&&y!==void 0&&y.disabled?this.dp.disableDate(this.date):((k=this.customData)===null||k===void 0?void 0:k.disabled)===!1&&this.dp.enableDate(this.date)}_bindDatepickerEvents(){this.dp.on(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.on(t.eventChangeFocusDate,this.onChangeFocusDate)}unbindDatepickerEvents(){this.dp.off(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.off(t.eventChangeFocusDate,this.onChangeFocusDate)}_createElement(){var y;let{year:k,month:z,fullMonth:M,date:q,fullDate:A}=d(this.date),P=((y=this.customData)===null||y===void 0?void 0:y.attrs)||{};this.$cell=a({attrs:{"data-year":k,"data-month":z,"data-date":q,"data-iso-date":`${k}-${M}-${A}`,...P}}),this.$cell.adpCell=this}_getClassName(){var y;let k=new Date,{selectOtherMonths:z,selectOtherYears:M}=this.opts,{minDate:q,maxDate:A,isDateDisabled:P}=this.dp,{day:U}=d(this.date),Y=this._isOutOfMinMaxRange(),rt=P(this.date),et=b("air-datepicker-cell",`-${this.singleType}-`,{"-current-":g(k,this.date,this.type),"-min-date-":q&&g(q,this.date,this.type),"-max-date-":A&&g(A,this.date,this.type)}),it="";switch(this.type){case t.days:it=b({"-weekend-":this.dp.isWeekend(U),"-other-month-":this.isOtherMonth,"-disabled-":this.isOtherMonth&&!z||Y||rt});break;case t.months:it=b({"-disabled-":Y});break;case t.years:it=b({"-other-decade-":this.isOtherDecade,"-disabled-":Y||this.isOtherDecade&&!M})}return b(et,it,(y=this.customData)===null||y===void 0?void 0:y.classes).split(" ")}_getHtml(){var y;let{year:k,month:z,date:M}=d(this.date),{showOtherMonths:q,showOtherYears:A}=this.opts;if((y=this.customData)!==null&&y!==void 0&&y.html)return this.customData.html;switch(this.type){case t.days:return!q&&this.isOtherMonth?"":M;case t.months:return this.dp.locale[this.opts.monthsField][z];case t.years:return!A&&this.isOtherDecade?"":k}}_isOutOfMinMaxRange(){let{minDate:y,maxDate:k}=this.dp,{type:z,date:M}=this,{month:q,year:A,date:P}=d(M),U=z===t.days,Y=z===t.years,rt=!!y&&new Date(A,Y?y.getMonth():q,U?P:y.getDate()),et=!!k&&new Date(A,Y?k.getMonth():q,U?P:k.getDate());return y&&k?x(rt,y)||v(et,k):y?x(rt,y):k?v(et,k):void 0}destroy(){this.unbindDatepickerEvents()}_handleRangeStatus(){let{selectedDates:y,focusDate:k,rangeDateTo:z,rangeDateFrom:M}=this.dp,q=y.length;if(this.$cell.classList.remove("-range-from-","-range-to-","-in-range-"),!q)return;let A=M,P=z;if(q===1&&k){let it=v(k,y[0]);A=it?y[0]:k,P=it?k:y[0]}let U=b({"-in-range-":A&&P&&(Y=this.date,rt=A,et=P,v(Y,rt)&&x(Y,et)),"-range-from-":A&&g(this.date,A,this.type),"-range-to-":P&&g(this.date,P,this.type)});var Y,rt,et;U&&this.$cell.classList.add(...U.split(" "))}_handleSelectedStatus(){let y=this.dp._checkIfDateIsSelected(this.date,this.type);y?this.select():!y&&this.selected&&this.removeSelect()}_handleInitialFocusStatus(){g(this.dp.focusDate,this.date,this.type)&&this.focus()}_handleClasses(){this.$cell.setAttribute("class",""),this._handleInitialFocusStatus(),this.dp.hasSelectedDates&&(this._handleSelectedStatus(),this.dp.opts.range&&this._handleRangeStatus()),this.$cell.classList.add(...this._getClassName())}get isDisabled(){return this.$cell.matches(".-disabled-")}get isOtherMonth(){return this.dp.isOtherMonth(this.date)}get isOtherDecade(){return this.dp.isOtherDecade(this.date)}}function tt(R,y,k){return(y=(function(z){var M=(function(q,A){if(typeof q!="object"||q===null)return q;var P=q[Symbol.toPrimitive];if(P!==void 0){var U=P.call(q,"string");if(typeof U!="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(z);return typeof M=="symbol"?M:String(M)})(y))in R?Object.defineProperty(R,y,{value:k,enumerable:!0,configurable:!0,writable:!0}):R[y]=k,R}let dt={[t.days]:`<div class="air-datepicker-body--day-names"></div><div class="air-datepicker-body--cells -${t.days}-"></div>`,[t.months]:`<div class="air-datepicker-body--cells -${t.months}-"></div>`,[t.years]:`<div class="air-datepicker-body--cells -${t.years}-"></div>`},gt=".air-datepicker-cell";class _t{constructor(y){let{dp:k,type:z,opts:M}=y;tt(this,"handleClick",(q=>{let A=q.target.closest(gt).adpCell;if(A.isDisabled)return;if(!this.dp.isMinViewReached)return void this.dp.down();let P=this.dp._checkIfDateIsSelected(A.date,A.type);P?this.dp._handleAlreadySelectedDates(P,A.date):this.dp.selectDate(A.date)})),tt(this,"handleDayNameClick",(q=>{let A=q.target.getAttribute("data-day-index");this.opts.onClickDayName({dayIndex:Number(A),datepicker:this.dp})})),tt(this,"onChangeCurrentView",(q=>{q!==this.type?this.hide():(this.show(),this.render())})),tt(this,"onMouseOverCell",(q=>{let A=N(q.target,gt);this.dp.setFocusDate(!!A&&A.adpCell.date)})),tt(this,"onMouseOutCell",(()=>{this.dp.setFocusDate(!1)})),tt(this,"onClickBody",(q=>{let{onClickDayName:A}=this.opts,P=q.target;P.closest(gt)&&this.handleClick(q),A&&P.closest(".air-datepicker-body--day-name")&&this.handleDayNameClick(q)})),tt(this,"onMouseDown",(q=>{this.pressed=!0;let A=N(q.target,gt),P=A&&A.adpCell;g(P.date,this.dp.rangeDateFrom)&&(this.rangeFromFocused=!0),g(P.date,this.dp.rangeDateTo)&&(this.rangeToFocused=!0)})),tt(this,"onMouseMove",(q=>{if(!this.pressed||!this.dp.isMinViewReached)return;q.preventDefault();let A=N(q.target,gt),P=A&&A.adpCell,{selectedDates:U,rangeDateTo:Y,rangeDateFrom:rt}=this.dp;if(!P||P.isDisabled)return;let{date:et}=P;if(U.length===2){if(this.rangeFromFocused&&!v(et,Y)){let{hours:it,minutes:fe}=d(rt);et.setHours(it),et.setMinutes(fe),this.dp.rangeDateFrom=et,this.dp.replaceDate(rt,et)}if(this.rangeToFocused&&!x(et,rt)){let{hours:it,minutes:fe}=d(Y);et.setHours(it),et.setMinutes(fe),this.dp.rangeDateTo=et,this.dp.replaceDate(Y,et)}}})),tt(this,"onMouseUp",(()=>{this.pressed=!1,this.rangeFromFocused=!1,this.rangeToFocused=!1})),tt(this,"onChangeViewDate",((q,A)=>{if(!this.isVisible)return;let P=f(q),U=f(A);switch(this.dp.currentView){case t.days:if(g(q,A,t.months))return;break;case t.months:if(g(q,A,t.years))return;break;case t.years:if(P[0]===U[0]&&P[1]===U[1])return}this.render()})),tt(this,"render",(()=>{this.destroyCells(),this._generateCells(),this.cells.forEach((q=>{this.$cells.appendChild(q.render())}))})),this.dp=k,this.type=z,this.opts=M,this.cells=[],this.$el="",this.pressed=!1,this.isVisible=!0,this.init()}init(){this._buildBaseHtml(),this.type===t.days&&this.renderDayNames(),this.render(),this._bindEvents(),this._bindDatepickerEvents()}_bindEvents(){let{range:y,dynamicRange:k}=this.opts;$(this.$el,"mouseover",this.onMouseOverCell),$(this.$el,"mouseout",this.onMouseOutCell),$(this.$el,"click",this.onClickBody),y&&k&&($(this.$el,"mousedown",this.onMouseDown),$(this.$el,"mousemove",this.onMouseMove),$(window.document,"mouseup",this.onMouseUp))}_bindDatepickerEvents(){this.dp.on(t.eventChangeViewDate,this.onChangeViewDate),this.dp.on(t.eventChangeCurrentView,this.onChangeCurrentView)}_buildBaseHtml(){this.$el=a({className:`air-datepicker-body -${this.type}-`,innerHtml:dt[this.type]}),this.$names=n(".air-datepicker-body--day-names",this.$el),this.$cells=n(".air-datepicker-body--cells",this.$el)}_getDayNamesHtml(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.dp.locale.firstDay,k="",z=this.dp.isWeekend,{onClickDayName:M}=this.opts,q=y,A=0;for(;A<7;){let P=q%7;k+=`<div class="${b("air-datepicker-body--day-name",{[t.cssClassWeekend]:z(P),"-clickable-":!!M})}" data-day-index='${P}'>${this.dp.locale.daysMin[P]}</div>`,A++,q++}return k}renderDayNames(){this.$names.innerHTML=this._getDayNamesHtml()}_generateCell(y){let{type:k,dp:z,opts:M}=this;return new W({type:k,dp:z,opts:M,date:y,body:this})}_generateCells(){_t.getDatesFunction(this.type)(this.dp,(y=>{this.cells.push(this._generateCell(y))}))}show(){this.isVisible=!0,this.$el.classList.remove("-hidden-")}hide(){this.isVisible=!1,this.$el.classList.add("-hidden-")}destroyCells(){this.cells.forEach((y=>y.destroy())),this.cells=[],this.$cells.innerHTML=""}destroy(){this.destroyCells(),this.dp.off(t.eventChangeViewDate,this.onChangeViewDate),this.dp.off(t.eventChangeCurrentView,this.onChangeCurrentView)}static getDaysDates(y,k){let{viewDate:z,opts:{fixedHeight:M},locale:{firstDay:q}}=y,A=l(z),{year:P,month:U}=d(z),Y=new Date(P,U,1),rt=new Date(P,U,A),et=Y.getDay()-q,it=6-rt.getDay()+q;et=et<0?et+7:et,it=it>6?it-7:it;let fe=(function(Vi,Qp){let{year:wc,month:C_,date:S_}=d(Vi);return new Date(wc,C_,S_-Qp)})(Y,et),Rr=A+et+it,dr=fe.getDate(),{year:en,month:Hs}=d(fe),Fi=0;M&&(Rr=42);let Bi=[];for(;Fi<Rr;){let Vi=new Date(en,Hs,dr+Fi);k&&k(Vi),Bi.push(Vi),Fi++}return Bi}static getMonthsDates(y,k){let{year:z}=y.parsedViewDate,M=0,q=[];for(;M<12;){let A=new Date(z,M);q.push(A),k&&k(A),M++}return q}static getYearsDates(y,k){let z=f(y.viewDate),M=z[0]-1,q=z[1]+1,A=M,P=[];for(;A<=q;){let U=new Date(A,0);P.push(U),k&&k(U),A++}return P}static getDatesFunction(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t.days;return{[t.days]:_t.getDaysDates,[t.months]:_t.getMonthsDates,[t.years]:_t.getYearsDates}[y]}}function Nt(R,y,k){return(y=(function(z){var M=(function(q,A){if(typeof q!="object"||q===null)return q;var P=q[Symbol.toPrimitive];if(P!==void 0){var U=P.call(q,"string");if(typeof U!="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(z);return typeof M=="symbol"?M:String(M)})(y))in R?Object.defineProperty(R,y,{value:k,enumerable:!0,configurable:!0,writable:!0}):R[y]=k,R}class ze{constructor(y){let{dp:k,opts:z}=y;Nt(this,"onClickNav",(M=>{let q=N(M.target,".air-datepicker-nav--action");if(!q)return;let A=q.dataset.action;this.dp[A]()})),Nt(this,"onChangeViewDate",(()=>{this.render(),this._resetNavStatus(),this.handleNavStatus()})),Nt(this,"onChangeCurrentView",(()=>{this.render(),this._resetNavStatus(),this.handleNavStatus()})),Nt(this,"onClickNavTitle",(()=>{this.dp.isFinalView||this.dp.up()})),Nt(this,"update",(()=>{let{prevHtml:M,nextHtml:q}=this.opts;this.$prev.innerHTML=M,this.$next.innerHTML=q,this._resetNavStatus(),this.render(),this.handleNavStatus()})),Nt(this,"renderDelay",(()=>{setTimeout(this.render)})),Nt(this,"render",(()=>{this.$title.innerHTML=this._getTitle(),(function(M,q){for(let A in q)q[A]?M.classList.add(A):M.classList.remove(A)})(this.$title,{"-disabled-":this.dp.isFinalView})})),this.dp=k,this.opts=z,this.init()}init(){this._createElement(),this._buildBaseHtml(),this._defineDOM(),this.render(),this.handleNavStatus(),this._bindEvents(),this._bindDatepickerEvents()}_defineDOM(){this.$title=n(".air-datepicker-nav--title",this.$el),this.$prev=n('[data-action="prev"]',this.$el),this.$next=n('[data-action="next"]',this.$el)}_bindEvents(){this.$el.addEventListener("click",this.onClickNav),this.$title.addEventListener("click",this.onClickNavTitle)}_bindDatepickerEvents(){this.dp.on(t.eventChangeViewDate,this.onChangeViewDate),this.dp.on(t.eventChangeCurrentView,this.onChangeCurrentView),this.isNavIsFunction&&(this.dp.on(t.eventChangeSelectedDate,this.renderDelay),this.dp.opts.timepicker&&this.dp.on(t.eventChangeTime,this.render))}destroy(){this.dp.off(t.eventChangeViewDate,this.onChangeViewDate),this.dp.off(t.eventChangeCurrentView,this.onChangeCurrentView),this.isNavIsFunction&&(this.dp.off(t.eventChangeSelectedDate,this.renderDelay),this.dp.opts.timepicker&&this.dp.off(t.eventChangeTime,this.render))}_createElement(){this.$el=a({tagName:"nav",className:"air-datepicker-nav"})}_getTitle(){let{dp:y,opts:k}=this,z=k.navTitles[y.currentView];return typeof z=="function"?z(y):y.formatDate(y.viewDate,z)}handleNavStatus(){let{disableNavWhenOutOfRange:y}=this.opts,{minDate:k,maxDate:z}=this.dp;if(!k&&!z||!y)return;let{year:M,month:q}=this.dp.parsedViewDate,A=!!k&&d(k),P=!!z&&d(z);switch(this.dp.currentView){case t.days:k&&A.month>=q&&A.year>=M&&this._disableNav("prev"),z&&P.month<=q&&P.year<=M&&this._disableNav("next");break;case t.months:k&&A.year>=M&&this._disableNav("prev"),z&&P.year<=M&&this._disableNav("next");break;case t.years:{let U=f(this.dp.viewDate);k&&A.year>=U[0]&&this._disableNav("prev"),z&&P.year<=U[1]&&this._disableNav("next");break}}}_disableNav(y){n('[data-action="'+y+'"]',this.$el).classList.add("-disabled-")}_resetNavStatus(){(function(y){for(var k=arguments.length,z=new Array(k>1?k-1:0),M=1;M<k;M++)z[M-1]=arguments[M];y.length?y.forEach((q=>{q.classList.remove(...z)})):y.classList.remove(...z)})(this.$el.querySelectorAll(".air-datepicker-nav--action"),"-disabled-")}_buildBaseHtml(){let{prevHtml:y,nextHtml:k}=this.opts;this.$el.innerHTML=`<div class="air-datepicker-nav--action" data-action="prev">${y}</div><div class="air-datepicker-nav--title"></div><div class="air-datepicker-nav--action" data-action="next">${k}</div>`}get isNavIsFunction(){let{navTitles:y}=this.opts;return Object.keys(y).find((k=>typeof y[k]=="function"))}}var Ke={today:{content:R=>R.locale.today,onClick:R=>R.setViewDate(new Date)},clear:{content:R=>R.locale.clear,onClick:R=>R.clear()}};class cr{constructor(y){let{dp:k,opts:z}=y;this.dp=k,this.opts=z,this.init()}init(){this.createElement(),this.render()}createElement(){this.$el=a({className:"air-datepicker-buttons"})}destroy(){this.$el.parentNode.removeChild(this.$el)}clearHtml(){return this.$el.innerHTML="",this}generateButtons(){let{buttons:y}=this.opts;Array.isArray(y)||(y=[y]),y.forEach((k=>{let z=k;typeof k=="string"&&Ke[k]&&(z=Ke[k]);let M=this.createButton(z);z.onClick&&this.attachEventToButton(M,z.onClick),this.$el.appendChild(M)}))}attachEventToButton(y,k){y.addEventListener("click",(()=>{k(this.dp)}))}createButton(y){let{content:k,className:z,tagName:M="button",attrs:q={}}=y;return a({tagName:M,innerHtml:`<span tabindex='-1'>${typeof k=="function"?k(this.dp):k}</span>`,className:b("air-datepicker-button",z),attrs:q})}render(){this.generateButtons()}}function $e(R,y,k){return(y=(function(z){var M=(function(q,A){if(typeof q!="object"||q===null)return q;var P=q[Symbol.toPrimitive];if(P!==void 0){var U=P.call(q,"string");if(typeof U!="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(z);return typeof M=="symbol"?M:String(M)})(y))in R?Object.defineProperty(R,y,{value:k,enumerable:!0,configurable:!0,writable:!0}):R[y]=k,R}class Ye{constructor(){let{opts:y,dp:k}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};$e(this,"toggleTimepickerIsActive",(M=>{this.dp.timepickerIsActive=M})),$e(this,"onChangeSelectedDate",(M=>{let{date:q,updateTime:A=!1}=M;q&&(this.setMinMaxTime(q),this.setCurrentTime(!!A&&q),this.addTimeToDate(q))})),$e(this,"onChangeLastSelectedDate",(M=>{M&&(this.setTime(M),this.render())})),$e(this,"onChangeInputRange",(M=>{let q=M.target;this[q.getAttribute("name")]=q.value,this.updateText(),this.dp.trigger(t.eventChangeTime,{hours:this.hours,minutes:this.minutes})})),$e(this,"onMouseEnterLeave",(M=>{let q=M.target.getAttribute("name"),A=this.$minutesText;q==="hours"&&(A=this.$hoursText),A.classList.toggle("-focus-")})),$e(this,"onFocus",(()=>{this.toggleTimepickerIsActive(!0)})),$e(this,"onBlur",(()=>{this.toggleTimepickerIsActive(!1)})),this.opts=y,this.dp=k;let{timeFormat:z}=this.dp.locale;z&&(z.match(T("h"))||z.match(T("hh")))&&(this.ampm=!0),this.init()}init(){this.setTime(this.dp.lastSelectedDate||this.dp.viewDate),this.createElement(),this.buildHtml(),this.defineDOM(),this.render(),this.bindDatepickerEvents(),this.bindDOMEvents()}bindDatepickerEvents(){this.dp.on(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.on(t.eventChangeLastSelectedDate,this.onChangeLastSelectedDate)}bindDOMEvents(){let y="input";navigator.userAgent.match(/trident/gi)&&(y="change"),$(this.$ranges,y,this.onChangeInputRange),$(this.$ranges,"mouseenter",this.onMouseEnterLeave),$(this.$ranges,"mouseleave",this.onMouseEnterLeave),$(this.$ranges,"focus",this.onFocus),$(this.$ranges,"mousedown",this.onFocus),$(this.$ranges,"blur",this.onBlur)}createElement(){this.$el=a({className:b("air-datepicker-time",{"-am-pm-":this.dp.ampm})})}destroy(){this.dp.off(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.off(t.eventChangeLastSelectedDate,this.onChangeLastSelectedDate),this.$el.parentNode.removeChild(this.$el)}buildHtml(){let{ampm:y,hours:k,displayHours:z,minutes:M,minHours:q,minMinutes:A,maxHours:P,maxMinutes:U,dayPeriod:Y,opts:{hoursStep:rt,minutesStep:et}}=this;this.$el.innerHTML=`<div class="air-datepicker-time--current"> <span class="air-datepicker-time--current-hours">${m(z)}</span> <span class="air-datepicker-time--current-colon">:</span> <span class="air-datepicker-time--current-minutes">${m(M)}</span> `+(y?`<span class='air-datepicker-time--current-ampm'>${Y}</span>`:"")+`</div><div class="air-datepicker-time--sliders"> <div class="air-datepicker-time--row"> <input type="range" name="hours" value="${k}" min="${q}" max="${P}" step="${rt}"/> </div> <div class="air-datepicker-time--row"> <input type="range" name="minutes" value="${M}" min="${A}" max="${U}" step="${et}"/> </div></div>`}defineDOM(){let y=k=>n(k,this.$el);this.$ranges=this.$el.querySelectorAll('[type="range"]'),this.$hours=y('[name="hours"]'),this.$minutes=y('[name="minutes"]'),this.$hoursText=y(".air-datepicker-time--current-hours"),this.$minutesText=y(".air-datepicker-time--current-minutes"),this.$ampm=y(".air-datepicker-time--current-ampm")}setTime(y){this.setMinMaxTime(y),this.setCurrentTime(y)}addTimeToDate(y){y&&(y.setHours(this.hours),y.setMinutes(this.minutes))}setMinMaxTime(y){if(this.setMinMaxTimeFromOptions(),y){let{minDate:k,maxDate:z}=this.dp;k&&g(y,k)&&this.setMinTimeFromMinDate(k),z&&g(y,z)&&this.setMaxTimeFromMaxDate(z)}}setCurrentTime(y){let{hours:k,minutes:z}=y?d(y):this;this.hours=G(k,this.minHours,this.maxHours),this.minutes=G(z,this.minMinutes,this.maxMinutes)}setMinMaxTimeFromOptions(){let{minHours:y,minMinutes:k,maxHours:z,maxMinutes:M}=this.opts;this.minHours=G(y,0,23),this.minMinutes=G(k,0,59),this.maxHours=G(z,0,23),this.maxMinutes=G(M,0,59)}setMinTimeFromMinDate(y){let{lastSelectedDate:k}=this.dp;this.minHours=y.getHours(),k&&k.getHours()>y.getHours()?this.minMinutes=this.opts.minMinutes:this.minMinutes=y.getMinutes()}setMaxTimeFromMaxDate(y){let{lastSelectedDate:k}=this.dp;this.maxHours=y.getHours(),k&&k.getHours()<y.getHours()?this.maxMinutes=this.opts.maxMinutes:this.maxMinutes=y.getMinutes()}updateSliders(){s(this.$hours,{min:this.minHours,max:this.maxHours}).value=this.hours,s(this.$minutes,{min:this.minMinutes,max:this.maxMinutes}).value=this.minutes}updateText(){this.$hoursText.innerHTML=m(this.displayHours),this.$minutesText.innerHTML=m(this.minutes),this.ampm&&(this.$ampm.innerHTML=this.dayPeriod)}set hours(y){this._hours=y;let{hours:k,dayPeriod:z}=h(y);this.displayHours=this.ampm?k:y,this.dayPeriod=z}get hours(){return this._hours}render(){this.updateSliders(),this.updateText()}}function we(R,y,k){return(y=(function(z){var M=(function(q,A){if(typeof q!="object"||q===null)return q;var P=q[Symbol.toPrimitive];if(P!==void 0){var U=P.call(q,"string");if(typeof U!="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(z);return typeof M=="symbol"?M:String(M)})(y))in R?Object.defineProperty(R,y,{value:k,enumerable:!0,configurable:!0,writable:!0}):R[y]=k,R}class ti{constructor(y){let{dp:k,opts:z}=y;we(this,"pressedKeys",new Set),we(this,"hotKeys",new Map([[[["Control","ArrowRight"],["Control","ArrowUp"]],M=>M.month++],[[["Control","ArrowLeft"],["Control","ArrowDown"]],M=>M.month--],[[["Shift","ArrowRight"],["Shift","ArrowUp"]],M=>M.year++],[[["Shift","ArrowLeft"],["Shift","ArrowDown"]],M=>M.year--],[[["Alt","ArrowRight"],["Alt","ArrowUp"]],M=>M.year+=10],[[["Alt","ArrowLeft"],["Alt","ArrowDown"]],M=>M.year-=10],[["Control","Shift","ArrowUp"],(M,q)=>q.up()]])),we(this,"handleHotKey",(M=>{let q=this.hotKeys.get(M),A=d(this.getInitialFocusDate());q(A,this.dp);let{year:P,month:U,date:Y}=A,rt=l(new Date(P,U));rt<Y&&(Y=rt);let et=this.dp.getClampedDate(new Date(P,U,Y));this.dp.setFocusDate(et,{viewDateTransition:!0})})),we(this,"isHotKeyPressed",(()=>{let M=!1,q=this.pressedKeys.size,A=P=>this.pressedKeys.has(P);for(let[P]of this.hotKeys){if(M)break;if(Array.isArray(P[0]))P.forEach((U=>{M||q!==U.length||(M=U.every(A)&&P)}));else{if(q!==P.length)continue;M=P.every(A)&&P}}return M})),we(this,"isArrow",(M=>M>=37&&M<=40)),we(this,"onKeyDown",(M=>{if(!this.dp.visible&&!this.dp.treatAsInline)return;let{key:q,which:A}=M,{dp:P,dp:{focusDate:U},opts:Y}=this;this.registerKey(q);let rt=this.isHotKeyPressed();if(rt)return M.preventDefault(),void this.handleHotKey(rt);if(this.isArrow(A))return M.preventDefault(),void this.focusNextCell(q);if(q==="Enter"){if(P.currentView!==Y.minView)return void P.down();if(U){let et=P._checkIfDateIsSelected(U);return void(et?P._handleAlreadySelectedDates(et,U):P.selectDate(U))}}q==="Escape"&&this.dp.hide()})),we(this,"onKeyUp",(M=>{this.removeKey(M.key)})),this.dp=k,this.opts=z,this.init()}init(){this.bindKeyboardEvents()}bindKeyboardEvents(){let{$el:y}=this.dp;y.addEventListener("keydown",this.onKeyDown),y.addEventListener("keyup",this.onKeyUp)}destroy(){let{$el:y}=this.dp;y.removeEventListener("keydown",this.onKeyDown),y.removeEventListener("keyup",this.onKeyUp),this.hotKeys=null,this.pressedKeys=null}getInitialFocusDate(){let{focusDate:y,currentView:k,selectedDates:z,parsedViewDate:{year:M,month:q}}=this.dp,A=y||z[z.length-1];if(!A)switch(k){case t.days:A=new Date(M,q,new Date().getDate());break;case t.months:A=new Date(M,q,1);break;case t.years:A=new Date(M,0,1)}return A}focusNextCell(y){let k=this.getInitialFocusDate(),{currentView:z}=this.dp,{days:M,months:q,years:A}=t,P=d(k),U=P.year,Y=P.month,rt=P.date;switch(y){case"ArrowLeft":z===M&&(rt-=1),z===q&&(Y-=1),z===A&&(U-=1);break;case"ArrowUp":z===M&&(rt-=7),z===q&&(Y-=3),z===A&&(U-=4);break;case"ArrowRight":z===M&&(rt+=1),z===q&&(Y+=1),z===A&&(U+=1);break;case"ArrowDown":z===M&&(rt+=7),z===q&&(Y+=3),z===A&&(U+=4)}let et=this.dp.getClampedDate(new Date(U,Y,rt));this.dp.setFocusDate(et,{viewDateTransition:!0})}registerKey(y){this.pressedKeys.add(y)}removeKey(y){this.pressedKeys.delete(y)}}let $a={on(R,y){this.__events||(this.__events={}),this.__events[R]?this.__events[R].push(y):this.__events[R]=[y]},off(R,y){this.__events&&this.__events[R]&&(this.__events[R]=this.__events[R].filter((k=>k!==y)))},removeAllEvents(){this.__events={}},trigger(R){for(var y=arguments.length,k=new Array(y>1?y-1:0),z=1;z<y;z++)k[z-1]=arguments[z];this.__events&&this.__events[R]&&this.__events[R].forEach((M=>{M(...k)}))}};function ut(R,y,k){return(y=(function(z){var M=(function(q,A){if(typeof q!="object"||q===null)return q;var P=q[Symbol.toPrimitive];if(P!==void 0){var U=P.call(q,"string");if(typeof U!="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(z);return typeof M=="symbol"?M:String(M)})(y))in R?Object.defineProperty(R,y,{value:k,enumerable:!0,configurable:!0,writable:!0}):R[y]=k,R}let qo="",Mo="",pt=!1;class nt{static buildGlobalContainer(y){pt=!0,qo=a({className:y,id:y}),n("body").appendChild(qo)}constructor(y,k){var z=this;if(ut(this,"viewIndexes",[t.days,t.months,t.years]),ut(this,"next",(()=>{let{year:A,month:P}=this.parsedViewDate;switch(this.currentView){case t.days:this.setViewDate(new Date(A,P+1,1));break;case t.months:this.setViewDate(new Date(A+1,P,1));break;case t.years:this.setViewDate(new Date(A+10,0,1))}})),ut(this,"prev",(()=>{let{year:A,month:P}=this.parsedViewDate;switch(this.currentView){case t.days:this.setViewDate(new Date(A,P-1,1));break;case t.months:this.setViewDate(new Date(A-1,P,1));break;case t.years:this.setViewDate(new Date(A-10,0,1))}})),ut(this,"_finishHide",(()=>{this.hideAnimation=!1,this._destroyComponents(),this.$container.removeChild(this.$datepicker)})),ut(this,"setPosition",(function(A){let P=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(typeof(A=A||z.opts.position)=="function")return void(z.customHide=A({$datepicker:z.$datepicker,$target:z.$el,$pointer:z.$pointer,isViewChange:P,done:z._finishHide}));let U,Y,{isMobile:rt}=z.opts,et=z.$el.getBoundingClientRect(),it=z.$el.getBoundingClientRect(),fe=z.$datepicker.offsetParent,Rr=z.$el.offsetParent,dr=z.$datepicker.getBoundingClientRect(),en=A.split(" "),Hs=window.scrollY,Fi=window.scrollX,Bi=z.opts.offset,Vi=en[0],Qp=en[1];if(rt)z.$datepicker.style.cssText="left: 50%; top: 50%";else{if(fe===Rr&&fe!==document.body&&(it={top:z.$el.offsetTop,left:z.$el.offsetLeft,width:et.width,height:z.$el.offsetHeight},Hs=0,Fi=0),fe!==Rr&&fe!==document.body){let wc=fe.getBoundingClientRect();it={top:et.top-wc.top,left:et.left-wc.left,width:et.width,height:et.height},Hs=0,Fi=0}switch(Vi){case"top":U=it.top-dr.height-Bi;break;case"right":Y=it.left+it.width+Bi;break;case"bottom":U=it.top+it.height+Bi;break;case"left":Y=it.left-dr.width-Bi}switch(Qp){case"top":U=it.top;break;case"right":Y=it.left+it.width-dr.width;break;case"bottom":U=it.top+it.height-dr.height;break;case"left":Y=it.left;break;case"center":/left|right/.test(Vi)?U=it.top+it.height/2-dr.height/2:Y=it.left+it.width/2-dr.width/2}z.$datepicker.style.cssText=`left: ${Y+Fi}px; top: ${U+Hs}px`}})),ut(this,"_setInputValue",(()=>{let{opts:A,$altField:P,locale:{dateFormat:U}}=this,{altFieldDateFormat:Y,altField:rt}=A;rt&&P&&(P.value=this._getInputValue(Y)),this.$el.value=this._getInputValue(U),this.$el.dispatchEvent(new Event("change"))})),ut(this,"_getInputValue",(A=>{let{selectedDates:P,opts:U}=this,{multipleDates:Y,multipleDatesSeparator:rt}=U;if(!P.length)return"";let et=typeof A=="function",it=et?A(Y?P:P[0]):P.map((fe=>this.formatDate(fe,A)));return it=et?it:it.join(rt),it})),ut(this,"_checkIfDateIsSelected",(function(A){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.days,U=!1;return z.selectedDates.some((Y=>{let rt=g(A,Y,P);return U=rt&&Y,rt})),U})),ut(this,"_scheduleCallAfterTransition",(A=>{this._cancelScheduledCall(),A&&A(!1),this._onTransitionEnd=()=>{A&&A(!0)},this.$datepicker.addEventListener("transitionend",this._onTransitionEnd,{once:!0})})),ut(this,"_cancelScheduledCall",(()=>{this.$datepicker.removeEventListener("transitionend",this._onTransitionEnd)})),ut(this,"setViewDate",(A=>{if(!((A=w(A))instanceof Date)||g(A,this.viewDate))return;let P=this.viewDate;this.viewDate=A;let{onChangeViewDate:U}=this.opts;if(U){let{month:Y,year:rt}=this.parsedViewDate;U({month:Y,year:rt,decade:this.curDecade})}this.trigger(t.eventChangeViewDate,A,P)})),ut(this,"setFocusDate",(function(A){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(!A||(A=w(A))instanceof Date)&&(z.focusDate=A,z.trigger(t.eventChangeFocusDate,A,P))})),ut(this,"setCurrentView",(function(A){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(z.viewIndexes.includes(A)){if(z.currentView=A,z.elIsInput&&z.visible&&z.setPosition(void 0,!0),z.trigger(t.eventChangeCurrentView,A),!z.views[A]){let U=z.views[A]=new _t({dp:z,opts:z.opts,type:A});z.shouldUpdateDOM&&z.$content.appendChild(U.$el)}z.opts.onChangeView&&!P.silent&&z.opts.onChangeView(A)}})),ut(this,"_updateLastSelectedDate",(A=>{this.lastSelectedDate=A,this.trigger(t.eventChangeLastSelectedDate,A)})),ut(this,"destroy",(()=>{if(this.isDestroyed)return;let{showEvent:A,isMobile:P}=this.opts,U=this.$datepicker.parentNode;U&&U.removeChild(this.$datepicker),this.$el.removeEventListener(A,this._onFocus),this.$el.removeEventListener("blur",this._onBlur),window.removeEventListener("resize",this._onResize),P&&this._removeMobileAttributes(),this.keyboardNav&&this.keyboardNav.destroy(),this.views=null,this.nav=null,this.$datepicker=null,this.opts={},this.$customContainer=null,this.viewDate=null,this.focusDate=null,this.selectedDates=[],this.rangeDateFrom=null,this.rangeDateTo=null,this.isDestroyed=!0})),ut(this,"update",(function(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},U=I({},z.opts),{silent:Y}=P;I(z.opts,A);let{timepicker:rt,buttons:et,range:it,selectedDates:fe,isMobile:Rr}=z.opts,dr=z.visible||z.treatAsInline;z._createMinMaxDates(),z._limitViewDateByMaxMinDates(),z._handleLocale(),fe&&(z.selectedDates=[],z.selectDate(fe,{silent:Y})),A.view&&z.setCurrentView(A.view,{silent:Y}),z._setInputValue(),U.range&&!it?(z.rangeDateTo=!1,z.rangeDateFrom=!1):!U.range&&it&&z.selectedDates.length&&(z.rangeDateFrom=z.selectedDates[0],z.rangeDateTo=z.selectedDates[1]),U.timepicker&&!rt?(dr&&z.timepicker.destroy(),z.timepicker=!1,z.$timepicker.parentNode.removeChild(z.$timepicker)):!U.timepicker&&rt&&z._addTimepicker(),!U.buttons&&et?z._addButtons():U.buttons&&!et?(z.buttons.destroy(),z.$buttons.parentNode.removeChild(z.$buttons)):dr&&U.buttons&&et&&z.buttons.clearHtml().render(),!U.isMobile&&Rr?(z.treatAsInline||Mo||z._createMobileOverlay(),z._addMobileAttributes(),z.visible&&z._showMobileOverlay()):U.isMobile&&!Rr&&(z._removeMobileAttributes(),z.visible&&(Mo.classList.remove("-active-"),typeof z.opts.position!="function"&&z.setPosition())),dr&&(z.nav.update(),z.views[z.currentView].render(),z.currentView===t.days&&z.views[z.currentView].renderDayNames())})),ut(this,"disableDate",((A,P)=>{(Array.isArray(A)?A:[A]).forEach((U=>{let Y=w(U);if(!Y)return;let rt=P?"delete":"add";this.disabledDates[rt](this.formatDate(Y,"yyyy-MM-dd"));let et=this.getCell(Y,this.currentViewSingular);et&&et.adpCell.render()}),[])})),ut(this,"enableDate",(A=>{this.disableDate(A,!0)})),ut(this,"isDateDisabled",(A=>{let P=w(A);return this.disabledDates.has(this.formatDate(P,"yyyy-MM-dd"))})),ut(this,"isOtherMonth",(A=>{let{month:P}=d(A);return P!==this.parsedViewDate.month})),ut(this,"isOtherYear",(A=>{let{year:P}=d(A);return P!==this.parsedViewDate.year})),ut(this,"isOtherDecade",(A=>{let{year:P}=d(A),[U,Y]=f(this.viewDate);return P<U||P>Y})),ut(this,"_onChangeSelectedDate",(A=>{let{silent:P}=A;setTimeout((()=>{this._setInputValue(),this.opts.onSelect&&!P&&this._triggerOnSelect()}))})),ut(this,"_onChangeFocusedDate",(function(A){let{viewDateTransition:P}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!A)return;let U=!1;P&&(U=z.isOtherMonth(A)||z.isOtherYear(A)||z.isOtherDecade(A)),U&&z.setViewDate(A),z.opts.onFocus&&z.opts.onFocus({datepicker:z,date:A})})),ut(this,"_onChangeTime",(A=>{let{hours:P,minutes:U}=A,Y=new Date,{lastSelectedDate:rt,opts:{onSelect:et}}=this,it=rt;rt||(it=Y);let fe=this.getCell(it,this.currentViewSingular),Rr=fe&&fe.adpCell;Rr&&Rr.isDisabled||(it.setHours(P),it.setMinutes(U),rt?(this._setInputValue(),et&&this._triggerOnSelect()):this.selectDate(it))})),ut(this,"_onFocus",(A=>{this.visible||this.show()})),ut(this,"_onBlur",(A=>{this.inFocus||!this.visible||this.opts.isMobile||this.hide()})),ut(this,"_onMouseDown",(A=>{this.inFocus=!0})),ut(this,"_onMouseUp",(A=>{this.inFocus=!1,this.$el.focus()})),ut(this,"_onResize",(()=>{this.visible&&typeof this.opts.position!="function"&&this.setPosition()})),ut(this,"_onClickOverlay",(()=>{this.visible&&this.hide()})),ut(this,"getViewDates",(function(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t.days;return _t.getDatesFunction(A)(z)})),ut(this,"isWeekend",(A=>this.opts.weekends.includes(A))),ut(this,"getClampedDate",(A=>{let{minDate:P,maxDate:U}=this,Y=A;return U&&v(A,U)?Y=U:P&&x(A,P)&&(Y=P),Y})),this.$el=n(y),!this.$el)return;this.$datepicker=a({className:"air-datepicker"}),this.opts=I({},r,k),this.$customContainer=!!this.opts.container&&n(this.opts.container),this.$altField=n(this.opts.altField||!1);let{view:M,startDate:q}=this.opts;q||(this.opts.startDate=new Date),this.$el.nodeName==="INPUT"&&(this.elIsInput=!0),this.inited=!1,this.visible=!1,this.viewDate=w(this.opts.startDate),this.focusDate=!1,this.initialReadonly=this.$el.getAttribute("readonly"),this.customHide=!1,this.currentView=M,this.selectedDates=[],this.disabledDates=new Set,this.isDestroyed=!1,this.views={},this.keys=[],this.rangeDateFrom="",this.rangeDateTo="",this.timepickerIsActive=!1,this.treatAsInline=this.opts.inline||!this.elIsInput,this.init()}init(){let{opts:y,treatAsInline:k,opts:{inline:z,isMobile:M,selectedDates:q,keyboardNav:A,onlyTimepicker:P}}=this,U=n("body");(!pt||pt&&qo&&!U.contains(qo))&&!z&&this.elIsInput&&!this.$customContainer&&nt.buildGlobalContainer(nt.defaultGlobalContainerId),!M||Mo||k||this._createMobileOverlay(),this._handleLocale(),this._bindSubEvents(),this._createMinMaxDates(),this._limitViewDateByMaxMinDates(),this.elIsInput&&(z||this._bindEvents(),A&&!P&&(this.keyboardNav=new ti({dp:this,opts:y}))),q&&this.selectDate(q,{silent:!0}),this.opts.visible&&!k&&this.show(),M&&!k&&this.$el.setAttribute("readonly",!0),k&&this._createComponents()}_createMobileOverlay(){Mo=a({className:"air-datepicker-overlay"}),qo.appendChild(Mo)}_createComponents(){let{opts:y,treatAsInline:k,opts:{inline:z,buttons:M,timepicker:q,position:A,classes:P,onlyTimepicker:U,isMobile:Y}}=this;this._buildBaseHtml(),this.elIsInput&&(z||this._setPositionClasses(A)),!z&&this.elIsInput||this.$datepicker.classList.add("-inline-"),P&&this.$datepicker.classList.add(...P.split(" ")),U&&this.$datepicker.classList.add("-only-timepicker-"),Y&&!k&&this._addMobileAttributes(),this.views[this.currentView]=new _t({dp:this,type:this.currentView,opts:y}),this.nav=new ze({dp:this,opts:y}),q&&this._addTimepicker(),M&&this._addButtons(),this.$content.appendChild(this.views[this.currentView].$el),this.$nav.appendChild(this.nav.$el)}_destroyComponents(){for(let y in this.views)this.views[y].destroy();this.views={},this.nav.destroy(),this.timepicker&&this.timepicker.destroy()}_addMobileAttributes(){Mo.addEventListener("click",this._onClickOverlay),this.$datepicker.classList.add("-is-mobile-"),this.$el.setAttribute("readonly",!0)}_removeMobileAttributes(){Mo.removeEventListener("click",this._onClickOverlay),this.$datepicker.classList.remove("-is-mobile-"),this.initialReadonly||this.initialReadonly===""||this.$el.removeAttribute("readonly")}_createMinMaxDates(){let{minDate:y,maxDate:k}=this.opts;this.minDate=!!y&&w(y),this.maxDate=!!k&&w(k)}_addTimepicker(){this.$timepicker=a({className:"air-datepicker--time"}),this.$datepicker.appendChild(this.$timepicker),this.timepicker=new Ye({dp:this,opts:this.opts}),this.$timepicker.appendChild(this.timepicker.$el)}_addButtons(){this.$buttons=a({className:"air-datepicker--buttons"}),this.$datepicker.appendChild(this.$buttons),this.buttons=new cr({dp:this,opts:this.opts}),this.$buttons.appendChild(this.buttons.$el)}_bindSubEvents(){this.on(t.eventChangeSelectedDate,this._onChangeSelectedDate),this.on(t.eventChangeFocusDate,this._onChangeFocusedDate),this.on(t.eventChangeTime,this._onChangeTime)}_buildBaseHtml(){let{inline:y}=this.opts;var k,z;this.elIsInput?y?(k=this.$datepicker,(z=this.$el).parentNode.insertBefore(k,z.nextSibling)):this.$container.appendChild(this.$datepicker):this.$el.appendChild(this.$datepicker),this.$datepicker.innerHTML='<i class="air-datepicker--pointer"></i><div class="air-datepicker--navigation"></div><div class="air-datepicker--content"></div>',this.$content=n(".air-datepicker--content",this.$datepicker),this.$pointer=n(".air-datepicker--pointer",this.$datepicker),this.$nav=n(".air-datepicker--navigation",this.$datepicker)}_handleLocale(){let{locale:y,dateFormat:k,firstDay:z,timepicker:M,onlyTimepicker:q,timeFormat:A,dateTimeSeparator:P}=this.opts;var U;this.locale=(U=y,JSON.parse(JSON.stringify(U))),k&&(this.locale.dateFormat=k),A!==void 0&&A!==""&&(this.locale.timeFormat=A);let{timeFormat:Y}=this.locale;if(z!==""&&(this.locale.firstDay=z),M&&typeof k!="function"){let rt=Y?P:"";this.locale.dateFormat=[this.locale.dateFormat,Y||""].join(rt)}q&&typeof k!="function"&&(this.locale.dateFormat=this.locale.timeFormat)}_setPositionClasses(y){if(typeof y=="function")return void this.$datepicker.classList.add("-custom-position-");let k=(y=y.split(" "))[0],z=`air-datepicker -${k}-${y[1]}- -from-${k}-`;this.$datepicker.classList.add(...z.split(" "))}_bindEvents(){this.$el.addEventListener(this.opts.showEvent,this._onFocus),this.$el.addEventListener("blur",this._onBlur),this.$datepicker.addEventListener("mousedown",this._onMouseDown),this.$datepicker.addEventListener("mouseup",this._onMouseUp),window.addEventListener("resize",this._onResize)}_limitViewDateByMaxMinDates(){let{viewDate:y,minDate:k,maxDate:z}=this;z&&v(y,z)&&this.setViewDate(z),k&&x(y,k)&&this.setViewDate(k)}formatDate(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.viewDate,k=arguments.length>1?arguments[1]:void 0;if(y=w(y),!(y instanceof Date))return;let z=k,M=this.locale,q=d(y),A=q.dayPeriod,P=f(y),U=nt.replacer,Y={T:y.getTime(),m:q.minutes,mm:q.fullMinutes,h:q.hours12,hh:q.fullHours12,H:q.hours,HH:q.fullHours,aa:A,AA:A.toUpperCase(),E:M.daysShort[q.day],EEEE:M.days[q.day],d:q.date,dd:q.fullDate,M:q.month+1,MM:q.fullMonth,MMM:M.monthsShort[q.month],MMMM:M.months[q.month],yy:q.year.toString().slice(-2),yyyy:q.year,yyyy1:P[0],yyyy2:P[1]};for(let[rt,et]of Object.entries(Y))z=U(z,T(rt),et);return z}down(y){this._handleUpDownActions(y,"down")}up(y){this._handleUpDownActions(y,"up")}selectDate(y){let k,z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{currentView:M,parsedViewDate:q,selectedDates:A}=this,{updateTime:P,silent:U}=z,{moveToOtherMonthsOnSelect:Y,moveToOtherYearsOnSelect:rt,multipleDates:et,range:it,autoClose:fe,onBeforeSelect:Rr}=this.opts,dr=A.length;if(Array.isArray(y))return y.forEach((en=>{this.selectDate(en,z)})),new Promise((en=>{setTimeout(en)}));if((y=w(y))instanceof Date){if(Rr&&!U&&!Rr({date:y,datepicker:this}))return Promise.resolve();if(M===t.days&&y.getMonth()!==q.month&&Y&&(k=new Date(y.getFullYear(),y.getMonth(),1)),M===t.years&&y.getFullYear()!==q.year&&rt&&(k=new Date(y.getFullYear(),0,1)),k&&this.setViewDate(k),et&&!it){if(dr===et)return;this._checkIfDateIsSelected(y)||A.push(y)}else if(it)switch(dr){case 1:A.push(y),this.rangeDateTo||(this.rangeDateTo=y),v(this.rangeDateFrom,this.rangeDateTo)&&(this.rangeDateTo=this.rangeDateFrom,this.rangeDateFrom=y),this.selectedDates=[this.rangeDateFrom,this.rangeDateTo];break;case 2:this.selectedDates=[y],this.rangeDateFrom=y,this.rangeDateTo="";break;default:this.selectedDates=[y],this.rangeDateFrom=y}else this.selectedDates=[y];return this.trigger(t.eventChangeSelectedDate,{action:t.actionSelectDate,silent:z?.silent,date:y,updateTime:P}),this._updateLastSelectedDate(y),fe&&!this.timepickerIsActive&&this.visible&&(et||it?it&&dr===1&&this.hide():this.hide()),new Promise((en=>{setTimeout(en)}))}}unselectDate(y){let k=this.selectedDates,z=this;if((y=w(y))instanceof Date)return k.some(((M,q)=>{if(g(M,y))return k.splice(q,1),z.selectedDates.length?(z.rangeDateTo="",z.rangeDateFrom=k[0],z._updateLastSelectedDate(z.selectedDates[z.selectedDates.length-1])):(z.rangeDateFrom="",z.rangeDateTo="",z._updateLastSelectedDate(!1)),this.trigger(t.eventChangeSelectedDate,{action:t.actionUnselectDate,date:y}),!0}))}replaceDate(y,k){let z=this.selectedDates.find((q=>g(q,y,this.currentView))),M=this.selectedDates.indexOf(z);M<0||g(this.selectedDates[M],k,this.currentView)||(this.selectedDates[M]=k,this.trigger(t.eventChangeSelectedDate,{action:t.actionSelectDate,date:k,updateTime:!0}),this._updateLastSelectedDate(k))}clear(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.selectedDates=[],this.rangeDateFrom=!1,this.rangeDateTo=!1,this.lastSelectedDate=!1,this.trigger(t.eventChangeSelectedDate,{action:t.actionUnselectDate,silent:y.silent}),new Promise((k=>{setTimeout(k)}))}show(){let{onShow:y,isMobile:k}=this.opts;this._cancelScheduledCall(),this.visible||this.hideAnimation||this._createComponents(),this.setPosition(this.opts.position),this.$datepicker.classList.add("-active-"),this.visible=!0,y&&this._scheduleCallAfterTransition(y),k&&this._showMobileOverlay()}hide(){let{onHide:y,isMobile:k}=this.opts,z=this._hasTransition();this.visible=!1,this.hideAnimation=!0,this.$datepicker.classList.remove("-active-"),this.customHide&&this.customHide(),this.elIsInput&&this.$el.blur(),this._scheduleCallAfterTransition((M=>{!this.customHide&&(M&&z||!M&&!z)&&this._finishHide(),y&&y(M)})),k&&Mo.classList.remove("-active-")}_triggerOnSelect(){let y=[],k=[],{selectedDates:z,locale:M,opts:{onSelect:q,multipleDates:A,range:P}}=this,U=A||P,Y=typeof M.dateFormat=="function";z.length&&(y=z.map(_),k=Y?A?M.dateFormat(y):y.map((rt=>M.dateFormat(rt))):y.map((rt=>this.formatDate(rt,M.dateFormat)))),q({date:U?y:y[0],formattedDate:U?k:k[0],datepicker:this})}_handleAlreadySelectedDates(y,k){let{selectedDates:z,rangeDateFrom:M,rangeDateTo:q}=this,{range:A,toggleSelected:P}=this.opts,U=z.length,Y=typeof P=="function"?P({datepicker:this,date:k}):P,rt=!!(A&&U===1&&y),et=rt?_(k):k;A&&!Y&&(U!==2&&this.selectDate(et),U===2&&g(M,q))||(Y?this.unselectDate(et):this._updateLastSelectedDate(rt?et:y))}_handleUpDownActions(y,k){if(!((y=w(y||this.focusDate||this.viewDate))instanceof Date))return;let z=k==="up"?this.viewIndex+1:this.viewIndex-1;z>2&&(z=2),z<0&&(z=0),this.setViewDate(new Date(y.getFullYear(),y.getMonth(),1)),this.setCurrentView(this.viewIndexes[z])}getCell(y){let k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.day;if(!((y=w(y))instanceof Date))return;let{year:z,month:M,date:q}=d(y),A=`[data-year="${z}"]`,P=`[data-month="${M}"]`,U={[t.day]:`${A}${P}[data-date="${q}"]`,[t.month]:`${A}${P}`,[t.year]:`${A}`};return this.views[this.currentView]?this.views[this.currentView].$el.querySelector(U[k]):void 0}_showMobileOverlay(){Mo.classList.add("-active-")}_hasTransition(){return window.getComputedStyle(this.$datepicker).getPropertyValue("transition-duration").split(", ").reduce(((y,k)=>parseFloat(k)+y),0)>0}get shouldUpdateDOM(){return this.visible||this.treatAsInline}get parsedViewDate(){return d(this.viewDate)}get currentViewSingular(){return this.currentView.slice(0,-1)}get curDecade(){return f(this.viewDate)}get viewIndex(){return this.viewIndexes.indexOf(this.currentView)}get isFinalView(){return this.currentView===t.years}get hasSelectedDates(){return this.selectedDates.length>0}get isMinViewReached(){return this.currentView===this.opts.minView||this.currentView===t.days}get $container(){return this.$customContainer||qo}static replacer(y,k,z){return y.replace(k,(function(M,q,A,P){return q+z+P}))}}var xt;return ut(nt,"defaults",r),ut(nt,"version","3.6.0"),ut(nt,"defaultGlobalContainerId","air-datepicker-global-container"),xt=nt.prototype,Object.assign(xt,$a),o.default})()}))});var Bs=globalThis,Bf=i=>i,_c=Bs.trustedTypes,Vf=_c?_c.createPolicy("lit-html",{createHTML:i=>i}):void 0,Zp="$lit$",Tn=`lit$${Math.random().toFixed(9).slice(2)}$`,th="?"+Tn,T_=`<${th}>`,Gi=document,Vs=()=>Gi.createComment(""),Us=i=>i===null||typeof i!="object"&&typeof i!="function",eh=Array.isArray,Yf=i=>eh(i)||typeof i?.[Symbol.iterator]=="function",Jp=`[
|
|
1
|
+
import{a as En,b as E_,c as pr,d as c,e as B}from"./chunks/zn.UBLZO6CI.js";var b0=En((vZ,g0)=>{var io=-1,Tr=1,Fe=0;function fl(i,o,t,r,n){if(i===o)return i?[[Fe,i]]:[];if(t!=null){var a=y5(i,o,t);if(a)return a}var s=cu(i,o),l=i.substring(0,s);i=i.substring(s),o=o.substring(s),s=pd(i,o);var d=i.substring(i.length-s);i=i.substring(0,i.length-s),o=o.substring(0,o.length-s);var h=h5(i,o);return l&&h.unshift([Fe,l]),d&&h.push([Fe,d]),du(h,n),r&&f5(h),h}function h5(i,o){var t;if(!i)return[[Tr,o]];if(!o)return[[io,i]];var r=i.length>o.length?i:o,n=i.length>o.length?o:i,a=r.indexOf(n);if(a!==-1)return t=[[Tr,r.substring(0,a)],[Fe,n],[Tr,r.substring(a+n.length)]],i.length>o.length&&(t[0][0]=t[2][0]=io),t;if(n.length===1)return[[io,i],[Tr,o]];var s=m5(i,o);if(s){var l=s[0],d=s[1],h=s[2],m=s[3],f=s[4],b=fl(l,h),g=fl(d,m);return b.concat([[Fe,f]],g)}return u5(i,o)}function u5(i,o){for(var t=i.length,r=o.length,n=Math.ceil((t+r)/2),a=n,s=2*n,l=new Array(s),d=new Array(s),h=0;h<s;h++)l[h]=-1,d[h]=-1;l[a+1]=0,d[a+1]=0;for(var m=t-r,f=m%2!==0,b=0,g=0,v=0,x=0,_=0;_<n;_++){for(var $=-_+b;$<=_-g;$+=2){var N=a+$,G;$===-_||$!==_&&l[N-1]<l[N+1]?G=l[N+1]:G=l[N-1]+1;for(var I=G-$;G<t&&I<r&&i.charAt(G)===o.charAt(I);)G++,I++;if(l[N]=G,G>t)g+=2;else if(I>r)b+=2;else if(f){var w=a+m-$;if(w>=0&&w<s&&d[w]!==-1){var T=t-d[w];if(G>=T)return s0(i,o,G,I)}}}for(var L=-_+v;L<=_-x;L+=2){var w=a+L,T;L===-_||L!==_&&d[w-1]<d[w+1]?T=d[w+1]:T=d[w-1]+1;for(var W=T-L;T<t&&W<r&&i.charAt(t-T-1)===o.charAt(r-W-1);)T++,W++;if(d[w]=T,T>t)x+=2;else if(W>r)v+=2;else if(!f){var N=a+m-L;if(N>=0&&N<s&&l[N]!==-1){var G=l[N],I=a+G-N;if(T=t-T,G>=T)return s0(i,o,G,I)}}}}return[[io,i],[Tr,o]]}function s0(i,o,t,r){var n=i.substring(0,t),a=o.substring(0,r),s=i.substring(t),l=o.substring(r),d=fl(n,a),h=fl(s,l);return d.concat(h)}function cu(i,o){if(!i||!o||i.charAt(0)!==o.charAt(0))return 0;for(var t=0,r=Math.min(i.length,o.length),n=r,a=0;t<n;)i.substring(a,n)==o.substring(a,n)?(t=n,a=t):r=n,n=Math.floor((r-t)/2+t);return h0(i.charCodeAt(n-1))&&n--,n}function l0(i,o){var t=i.length,r=o.length;if(t==0||r==0)return 0;t>r?i=i.substring(t-r):t<r&&(o=o.substring(0,t));var n=Math.min(t,r);if(i==o)return n;for(var a=0,s=1;;){var l=i.substring(n-s),d=o.indexOf(l);if(d==-1)return a;s+=d,(d==0||i.substring(n-s)==o.substring(0,s))&&(a=s,s++)}}function pd(i,o){if(!i||!o||i.slice(-1)!==o.slice(-1))return 0;for(var t=0,r=Math.min(i.length,o.length),n=r,a=0;t<n;)i.substring(i.length-n,i.length-a)==o.substring(o.length-n,o.length-a)?(t=n,a=t):r=n,n=Math.floor((r-t)/2+t);return u0(i.charCodeAt(i.length-n))&&n--,n}function m5(i,o){var t=i.length>o.length?i:o,r=i.length>o.length?o:i;if(t.length<4||r.length*2<t.length)return null;function n(g,v,x){for(var _=g.substring(x,x+Math.floor(g.length/4)),$=-1,N="",G,I,w,T;($=v.indexOf(_,$+1))!==-1;){var L=cu(g.substring(x),v.substring($)),W=pd(g.substring(0,x),v.substring(0,$));N.length<W+L&&(N=v.substring($-W,$)+v.substring($,$+L),G=g.substring(0,x-W),I=g.substring(x+L),w=v.substring(0,$-W),T=v.substring($+L))}return N.length*2>=g.length?[G,I,w,T,N]:null}var a=n(t,r,Math.ceil(t.length/4)),s=n(t,r,Math.ceil(t.length/2)),l;if(!a&&!s)return null;s?a?l=a[4].length>s[4].length?a:s:l=s:l=a;var d,h,m,f;i.length>o.length?(d=l[0],h=l[1],m=l[2],f=l[3]):(m=l[0],f=l[1],d=l[2],h=l[3]);var b=l[4];return[d,h,m,f,b]}function f5(i){for(var o=!1,t=[],r=0,n=null,a=0,s=0,l=0,d=0,h=0;a<i.length;)i[a][0]==Fe?(t[r++]=a,s=d,l=h,d=0,h=0,n=i[a][1]):(i[a][0]==Tr?d+=i[a][1].length:h+=i[a][1].length,n&&n.length<=Math.max(s,l)&&n.length<=Math.max(d,h)&&(i.splice(t[r-1],0,[io,n]),i[t[r-1]+1][0]=Tr,r--,r--,a=r>0?t[r-1]:-1,s=0,l=0,d=0,h=0,n=null,o=!0)),a++;for(o&&du(i),v5(i),a=1;a<i.length;){if(i[a-1][0]==io&&i[a][0]==Tr){var m=i[a-1][1],f=i[a][1],b=l0(m,f),g=l0(f,m);b>=g?(b>=m.length/2||b>=f.length/2)&&(i.splice(a,0,[Fe,f.substring(0,b)]),i[a-1][1]=m.substring(0,m.length-b),i[a+1][1]=f.substring(b),a++):(g>=m.length/2||g>=f.length/2)&&(i.splice(a,0,[Fe,m.substring(0,g)]),i[a-1][0]=Tr,i[a-1][1]=f.substring(0,f.length-g),i[a+1][0]=io,i[a+1][1]=m.substring(g),a++),a++}a++}}var c0=/[^a-zA-Z0-9]/,d0=/\s/,p0=/[\r\n]/,g5=/\n\r?\n$/,b5=/^\r?\n\r?\n/;function v5(i){function o(g,v){if(!g||!v)return 6;var x=g.charAt(g.length-1),_=v.charAt(0),$=x.match(c0),N=_.match(c0),G=$&&x.match(d0),I=N&&_.match(d0),w=G&&x.match(p0),T=I&&_.match(p0),L=w&&g.match(g5),W=T&&v.match(b5);return L||W?5:w||T?4:$&&!G&&I?3:G||I?2:$||N?1:0}for(var t=1;t<i.length-1;){if(i[t-1][0]==Fe&&i[t+1][0]==Fe){var r=i[t-1][1],n=i[t][1],a=i[t+1][1],s=pd(r,n);if(s){var l=n.substring(n.length-s);r=r.substring(0,r.length-s),n=l+n.substring(0,n.length-s),a=l+a}for(var d=r,h=n,m=a,f=o(r,n)+o(n,a);n.charAt(0)===a.charAt(0);){r+=n.charAt(0),n=n.substring(1)+a.charAt(0),a=a.substring(1);var b=o(r,n)+o(n,a);b>=f&&(f=b,d=r,h=n,m=a)}i[t-1][1]!=d&&(d?i[t-1][1]=d:(i.splice(t-1,1),t--),i[t][1]=h,m?i[t+1][1]=m:(i.splice(t+1,1),t--))}t++}}function du(i,o){i.push([Fe,""]);for(var t=0,r=0,n=0,a="",s="",l;t<i.length;){if(t<i.length-1&&!i[t][1]){i.splice(t,1);continue}switch(i[t][0]){case Tr:n++,s+=i[t][1],t++;break;case io:r++,a+=i[t][1],t++;break;case Fe:var d=t-n-r-1;if(o){if(d>=0&&f0(i[d][1])){var h=i[d][1].slice(-1);if(i[d][1]=i[d][1].slice(0,-1),a=h+a,s=h+s,!i[d][1]){i.splice(d,1),t--;var m=d-1;i[m]&&i[m][0]===Tr&&(n++,s=i[m][1]+s,m--),i[m]&&i[m][0]===io&&(r++,a=i[m][1]+a,m--),d=m}}if(m0(i[t][1])){var h=i[t][1].charAt(0);i[t][1]=i[t][1].slice(1),a+=h,s+=h}}if(t<i.length-1&&!i[t][1]){i.splice(t,1);break}if(a.length>0||s.length>0){a.length>0&&s.length>0&&(l=cu(s,a),l!==0&&(d>=0?i[d][1]+=s.substring(0,l):(i.splice(0,0,[Fe,s.substring(0,l)]),t++),s=s.substring(l),a=a.substring(l)),l=pd(s,a),l!==0&&(i[t][1]=s.substring(s.length-l)+i[t][1],s=s.substring(0,s.length-l),a=a.substring(0,a.length-l)));var f=n+r;a.length===0&&s.length===0?(i.splice(t-f,f),t=t-f):a.length===0?(i.splice(t-f,f,[Tr,s]),t=t-f+1):s.length===0?(i.splice(t-f,f,[io,a]),t=t-f+1):(i.splice(t-f,f,[io,a],[Tr,s]),t=t-f+2)}t!==0&&i[t-1][0]===Fe?(i[t-1][1]+=i[t][1],i.splice(t,1)):t++,n=0,r=0,a="",s="";break}}i[i.length-1][1]===""&&i.pop();var b=!1;for(t=1;t<i.length-1;)i[t-1][0]===Fe&&i[t+1][0]===Fe&&(i[t][1].substring(i[t][1].length-i[t-1][1].length)===i[t-1][1]?(i[t][1]=i[t-1][1]+i[t][1].substring(0,i[t][1].length-i[t-1][1].length),i[t+1][1]=i[t-1][1]+i[t+1][1],i.splice(t-1,1),b=!0):i[t][1].substring(0,i[t+1][1].length)==i[t+1][1]&&(i[t-1][1]+=i[t+1][1],i[t][1]=i[t][1].substring(i[t+1][1].length)+i[t+1][1],i.splice(t+1,1),b=!0)),t++;b&&du(i,o)}function h0(i){return i>=55296&&i<=56319}function u0(i){return i>=56320&&i<=57343}function m0(i){return u0(i.charCodeAt(0))}function f0(i){return h0(i.charCodeAt(i.length-1))}function x5(i){for(var o=[],t=0;t<i.length;t++)i[t][1].length>0&&o.push(i[t]);return o}function lu(i,o,t,r){return f0(i)||m0(r)?null:x5([[Fe,i],[io,o],[Tr,t],[Fe,r]])}function y5(i,o,t){var r=typeof t=="number"?{index:t,length:0}:t.oldRange,n=typeof t=="number"?null:t.newRange,a=i.length,s=o.length;if(r.length===0&&(n===null||n.length===0)){var l=r.index,d=i.slice(0,l),h=i.slice(l),m=n?n.index:null;t:{var f=l+s-a;if(m!==null&&m!==f||f<0||f>s)break t;var b=o.slice(0,f),g=o.slice(f);if(g!==h)break t;var v=Math.min(l,f),x=d.slice(0,v),_=b.slice(0,v);if(x!==_)break t;var $=d.slice(v),N=b.slice(v);return lu(x,$,N,h)}t:{if(m!==null&&m!==l)break t;var G=l,b=o.slice(0,G),g=o.slice(G);if(b!==d)break t;var I=Math.min(a-G,s-G),w=h.slice(h.length-I),T=g.slice(g.length-I);if(w!==T)break t;var $=h.slice(0,h.length-I),N=g.slice(0,g.length-I);return lu(d,$,N,w)}}if(r.length>0&&n&&n.length===0)t:{var x=i.slice(0,r.index),w=i.slice(r.index+r.length),v=x.length,I=w.length;if(s<v+I)break t;var _=o.slice(0,v),T=o.slice(s-I);if(x!==_||w!==T)break t;var $=i.slice(v,a-I),N=o.slice(v,s-I);return lu(x,$,N,w)}return null}function hd(i,o,t,r){return fl(i,o,t,r,!0)}hd.INSERT=Tr;hd.DELETE=io;hd.EQUAL=Fe;g0.exports=hd});var Cu=En((gl,Ya)=>{var z5=200,$0="__lodash_hash_undefined__",A0=9007199254740991,vu="[object Arguments]",w5="[object Array]",L0="[object Boolean]",q0="[object Date]",_5="[object Error]",xu="[object Function]",M0="[object GeneratorFunction]",ud="[object Map]",I0="[object Number]",yu="[object Object]",v0="[object Promise]",D0="[object RegExp]",md="[object Set]",N0="[object String]",R0="[object Symbol]",hu="[object WeakMap]",O0="[object ArrayBuffer]",fd="[object DataView]",P0="[object Float32Array]",H0="[object Float64Array]",F0="[object Int8Array]",B0="[object Int16Array]",V0="[object Int32Array]",U0="[object Uint8Array]",j0="[object Uint8ClampedArray]",G0="[object Uint16Array]",W0="[object Uint32Array]",k5=/[\\^$.*+?()[\]{}|]/g,C5=/\w*$/,S5=/^\[object .+?Constructor\]$/,E5=/^(?:0|[1-9]\d*)$/,jt={};jt[vu]=jt[w5]=jt[O0]=jt[fd]=jt[L0]=jt[q0]=jt[P0]=jt[H0]=jt[F0]=jt[B0]=jt[V0]=jt[ud]=jt[I0]=jt[yu]=jt[D0]=jt[md]=jt[N0]=jt[R0]=jt[U0]=jt[j0]=jt[G0]=jt[W0]=!0;jt[_5]=jt[xu]=jt[hu]=!1;var T5=typeof global=="object"&&global&&global.Object===Object&&global,$5=typeof self=="object"&&self&&self.Object===Object&&self,Nn=T5||$5||Function("return this")(),K0=typeof gl=="object"&&gl&&!gl.nodeType&&gl,x0=K0&&typeof Ya=="object"&&Ya&&!Ya.nodeType&&Ya,A5=x0&&x0.exports===K0;function L5(i,o){return i.set(o[0],o[1]),i}function q5(i,o){return i.add(o),i}function M5(i,o){for(var t=-1,r=i?i.length:0;++t<r&&o(i[t],t,i)!==!1;);return i}function I5(i,o){for(var t=-1,r=o.length,n=i.length;++t<r;)i[n+t]=o[t];return i}function Y0(i,o,t,r){var n=-1,a=i?i.length:0;for(r&&a&&(t=i[++n]);++n<a;)t=o(t,i[n],n,i);return t}function D5(i,o){for(var t=-1,r=Array(i);++t<i;)r[t]=o(t);return r}function N5(i,o){return i?.[o]}function X0(i){var o=!1;if(i!=null&&typeof i.toString!="function")try{o=!!(i+"")}catch{}return o}function y0(i){var o=-1,t=Array(i.size);return i.forEach(function(r,n){t[++o]=[n,r]}),t}function zu(i,o){return function(t){return i(o(t))}}function z0(i){var o=-1,t=Array(i.size);return i.forEach(function(r){t[++o]=r}),t}var R5=Array.prototype,O5=Function.prototype,gd=Object.prototype,pu=Nn["__core-js_shared__"],w0=(function(){var i=/[^.]+$/.exec(pu&&pu.keys&&pu.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})(),Q0=O5.toString,ui=gd.hasOwnProperty,bd=gd.toString,P5=RegExp("^"+Q0.call(ui).replace(k5,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),_0=A5?Nn.Buffer:void 0,k0=Nn.Symbol,C0=Nn.Uint8Array,H5=zu(Object.getPrototypeOf,Object),F5=Object.create,B5=gd.propertyIsEnumerable,V5=R5.splice,S0=Object.getOwnPropertySymbols,U5=_0?_0.isBuffer:void 0,j5=zu(Object.keys,Object),uu=Ja(Nn,"DataView"),bl=Ja(Nn,"Map"),mu=Ja(Nn,"Promise"),fu=Ja(Nn,"Set"),gu=Ja(Nn,"WeakMap"),vl=Ja(Object,"create"),G5=ca(uu),W5=ca(bl),K5=ca(mu),Y5=ca(fu),X5=ca(gu),E0=k0?k0.prototype:void 0,T0=E0?E0.valueOf:void 0;function la(i){var o=-1,t=i?i.length:0;for(this.clear();++o<t;){var r=i[o];this.set(r[0],r[1])}}function Q5(){this.__data__=vl?vl(null):{}}function J5(i){return this.has(i)&&delete this.__data__[i]}function Z5(i){var o=this.__data__;if(vl){var t=o[i];return t===$0?void 0:t}return ui.call(o,i)?o[i]:void 0}function t4(i){var o=this.__data__;return vl?o[i]!==void 0:ui.call(o,i)}function e4(i,o){var t=this.__data__;return t[i]=vl&&o===void 0?$0:o,this}la.prototype.clear=Q5;la.prototype.delete=J5;la.prototype.get=Z5;la.prototype.has=t4;la.prototype.set=e4;function Rn(i){var o=-1,t=i?i.length:0;for(this.clear();++o<t;){var r=i[o];this.set(r[0],r[1])}}function r4(){this.__data__=[]}function o4(i){var o=this.__data__,t=vd(o,i);if(t<0)return!1;var r=o.length-1;return t==r?o.pop():V5.call(o,t,1),!0}function n4(i){var o=this.__data__,t=vd(o,i);return t<0?void 0:o[t][1]}function i4(i){return vd(this.__data__,i)>-1}function a4(i,o){var t=this.__data__,r=vd(t,i);return r<0?t.push([i,o]):t[r][1]=o,this}Rn.prototype.clear=r4;Rn.prototype.delete=o4;Rn.prototype.get=n4;Rn.prototype.has=i4;Rn.prototype.set=a4;function Xa(i){var o=-1,t=i?i.length:0;for(this.clear();++o<t;){var r=i[o];this.set(r[0],r[1])}}function s4(){this.__data__={hash:new la,map:new(bl||Rn),string:new la}}function l4(i){return xd(this,i).delete(i)}function c4(i){return xd(this,i).get(i)}function d4(i){return xd(this,i).has(i)}function p4(i,o){return xd(this,i).set(i,o),this}Xa.prototype.clear=s4;Xa.prototype.delete=l4;Xa.prototype.get=c4;Xa.prototype.has=d4;Xa.prototype.set=p4;function Qa(i){this.__data__=new Rn(i)}function h4(){this.__data__=new Rn}function u4(i){return this.__data__.delete(i)}function m4(i){return this.__data__.get(i)}function f4(i){return this.__data__.has(i)}function g4(i,o){var t=this.__data__;if(t instanceof Rn){var r=t.__data__;if(!bl||r.length<z5-1)return r.push([i,o]),this;t=this.__data__=new Xa(r)}return t.set(i,o),this}Qa.prototype.clear=h4;Qa.prototype.delete=u4;Qa.prototype.get=m4;Qa.prototype.has=f4;Qa.prototype.set=g4;function b4(i,o){var t=_u(i)||F4(i)?D5(i.length,String):[],r=t.length,n=!!r;for(var a in i)(o||ui.call(i,a))&&!(n&&(a=="length"||R4(a,r)))&&t.push(a);return t}function J0(i,o,t){var r=i[o];(!(ui.call(i,o)&&r1(r,t))||t===void 0&&!(o in i))&&(i[o]=t)}function vd(i,o){for(var t=i.length;t--;)if(r1(i[t][0],o))return t;return-1}function v4(i,o){return i&&Z0(o,ku(o),i)}function bu(i,o,t,r,n,a,s){var l;if(r&&(l=a?r(i,n,a,s):r(i)),l!==void 0)return l;if(!yd(i))return i;var d=_u(i);if(d){if(l=I4(i),!o)return L4(i,l)}else{var h=sa(i),m=h==xu||h==M0;if(V4(i))return k4(i,o);if(h==yu||h==vu||m&&!a){if(X0(i))return a?i:{};if(l=D4(m?{}:i),!o)return q4(i,v4(l,i))}else{if(!jt[h])return a?i:{};l=N4(i,h,bu,o)}}s||(s=new Qa);var f=s.get(i);if(f)return f;if(s.set(i,l),!d)var b=t?M4(i):ku(i);return M5(b||i,function(g,v){b&&(v=g,g=i[v]),J0(l,v,bu(g,o,t,r,v,i,s))}),l}function x4(i){return yd(i)?F5(i):{}}function y4(i,o,t){var r=o(i);return _u(i)?r:I5(r,t(i))}function z4(i){return bd.call(i)}function w4(i){if(!yd(i)||P4(i))return!1;var o=n1(i)||X0(i)?P5:S5;return o.test(ca(i))}function _4(i){if(!e1(i))return j5(i);var o=[];for(var t in Object(i))ui.call(i,t)&&t!="constructor"&&o.push(t);return o}function k4(i,o){if(o)return i.slice();var t=new i.constructor(i.length);return i.copy(t),t}function wu(i){var o=new i.constructor(i.byteLength);return new C0(o).set(new C0(i)),o}function C4(i,o){var t=o?wu(i.buffer):i.buffer;return new i.constructor(t,i.byteOffset,i.byteLength)}function S4(i,o,t){var r=o?t(y0(i),!0):y0(i);return Y0(r,L5,new i.constructor)}function E4(i){var o=new i.constructor(i.source,C5.exec(i));return o.lastIndex=i.lastIndex,o}function T4(i,o,t){var r=o?t(z0(i),!0):z0(i);return Y0(r,q5,new i.constructor)}function $4(i){return T0?Object(T0.call(i)):{}}function A4(i,o){var t=o?wu(i.buffer):i.buffer;return new i.constructor(t,i.byteOffset,i.length)}function L4(i,o){var t=-1,r=i.length;for(o||(o=Array(r));++t<r;)o[t]=i[t];return o}function Z0(i,o,t,r){t||(t={});for(var n=-1,a=o.length;++n<a;){var s=o[n],l=r?r(t[s],i[s],s,t,i):void 0;J0(t,s,l===void 0?i[s]:l)}return t}function q4(i,o){return Z0(i,t1(i),o)}function M4(i){return y4(i,ku,t1)}function xd(i,o){var t=i.__data__;return O4(o)?t[typeof o=="string"?"string":"hash"]:t.map}function Ja(i,o){var t=N5(i,o);return w4(t)?t:void 0}var t1=S0?zu(S0,Object):G4,sa=z4;(uu&&sa(new uu(new ArrayBuffer(1)))!=fd||bl&&sa(new bl)!=ud||mu&&sa(mu.resolve())!=v0||fu&&sa(new fu)!=md||gu&&sa(new gu)!=hu)&&(sa=function(i){var o=bd.call(i),t=o==yu?i.constructor:void 0,r=t?ca(t):void 0;if(r)switch(r){case G5:return fd;case W5:return ud;case K5:return v0;case Y5:return md;case X5:return hu}return o});function I4(i){var o=i.length,t=i.constructor(o);return o&&typeof i[0]=="string"&&ui.call(i,"index")&&(t.index=i.index,t.input=i.input),t}function D4(i){return typeof i.constructor=="function"&&!e1(i)?x4(H5(i)):{}}function N4(i,o,t,r){var n=i.constructor;switch(o){case O0:return wu(i);case L0:case q0:return new n(+i);case fd:return C4(i,r);case P0:case H0:case F0:case B0:case V0:case U0:case j0:case G0:case W0:return A4(i,r);case ud:return S4(i,r,t);case I0:case N0:return new n(i);case D0:return E4(i);case md:return T4(i,r,t);case R0:return $4(i)}}function R4(i,o){return o=o??A0,!!o&&(typeof i=="number"||E5.test(i))&&i>-1&&i%1==0&&i<o}function O4(i){var o=typeof i;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?i!=="__proto__":i===null}function P4(i){return!!w0&&w0 in i}function e1(i){var o=i&&i.constructor,t=typeof o=="function"&&o.prototype||gd;return i===t}function ca(i){if(i!=null){try{return Q0.call(i)}catch{}try{return i+""}catch{}}return""}function H4(i){return bu(i,!0,!0)}function r1(i,o){return i===o||i!==i&&o!==o}function F4(i){return B4(i)&&ui.call(i,"callee")&&(!B5.call(i,"callee")||bd.call(i)==vu)}var _u=Array.isArray;function o1(i){return i!=null&&U4(i.length)&&!n1(i)}function B4(i){return j4(i)&&o1(i)}var V4=U5||W4;function n1(i){var o=yd(i)?bd.call(i):"";return o==xu||o==M0}function U4(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=A0}function yd(i){var o=typeof i;return!!i&&(o=="object"||o=="function")}function j4(i){return!!i&&typeof i=="object"}function ku(i){return o1(i)?b4(i):_4(i)}function G4(){return[]}function W4(){return!1}Ya.exports=H4});var Ru=En((xl,ts)=>{var K4=200,Nu="__lodash_hash_undefined__",Td=1,g1=2,b1=9007199254740991,zd="[object Arguments]",$u="[object Array]",Y4="[object AsyncFunction]",v1="[object Boolean]",x1="[object Date]",y1="[object Error]",z1="[object Function]",X4="[object GeneratorFunction]",wd="[object Map]",w1="[object Number]",Q4="[object Null]",Za="[object Object]",i1="[object Promise]",J4="[object Proxy]",_1="[object RegExp]",_d="[object Set]",k1="[object String]",Z4="[object Symbol]",t8="[object Undefined]",Au="[object WeakMap]",C1="[object ArrayBuffer]",kd="[object DataView]",e8="[object Float32Array]",r8="[object Float64Array]",o8="[object Int8Array]",n8="[object Int16Array]",i8="[object Int32Array]",a8="[object Uint8Array]",s8="[object Uint8ClampedArray]",l8="[object Uint16Array]",c8="[object Uint32Array]",d8=/[\\^$.*+?()[\]{}|]/g,p8=/^\[object .+?Constructor\]$/,h8=/^(?:0|[1-9]\d*)$/,Xt={};Xt[e8]=Xt[r8]=Xt[o8]=Xt[n8]=Xt[i8]=Xt[a8]=Xt[s8]=Xt[l8]=Xt[c8]=!0;Xt[zd]=Xt[$u]=Xt[C1]=Xt[v1]=Xt[kd]=Xt[x1]=Xt[y1]=Xt[z1]=Xt[wd]=Xt[w1]=Xt[Za]=Xt[_1]=Xt[_d]=Xt[k1]=Xt[Au]=!1;var S1=typeof global=="object"&&global&&global.Object===Object&&global,u8=typeof self=="object"&&self&&self.Object===Object&&self,On=S1||u8||Function("return this")(),E1=typeof xl=="object"&&xl&&!xl.nodeType&&xl,a1=E1&&typeof ts=="object"&&ts&&!ts.nodeType&&ts,T1=a1&&a1.exports===E1,Su=T1&&S1.process,s1=(function(){try{return Su&&Su.binding&&Su.binding("util")}catch{}})(),l1=s1&&s1.isTypedArray;function m8(i,o){for(var t=-1,r=i==null?0:i.length,n=0,a=[];++t<r;){var s=i[t];o(s,t,i)&&(a[n++]=s)}return a}function f8(i,o){for(var t=-1,r=o.length,n=i.length;++t<r;)i[n+t]=o[t];return i}function g8(i,o){for(var t=-1,r=i==null?0:i.length;++t<r;)if(o(i[t],t,i))return!0;return!1}function b8(i,o){for(var t=-1,r=Array(i);++t<i;)r[t]=o(t);return r}function v8(i){return function(o){return i(o)}}function x8(i,o){return i.has(o)}function y8(i,o){return i?.[o]}function z8(i){var o=-1,t=Array(i.size);return i.forEach(function(r,n){t[++o]=[n,r]}),t}function w8(i,o){return function(t){return i(o(t))}}function _8(i){var o=-1,t=Array(i.size);return i.forEach(function(r){t[++o]=r}),t}var k8=Array.prototype,C8=Function.prototype,$d=Object.prototype,Eu=On["__core-js_shared__"],$1=C8.toString,fn=$d.hasOwnProperty,c1=(function(){var i=/[^.]+$/.exec(Eu&&Eu.keys&&Eu.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})(),A1=$d.toString,S8=RegExp("^"+$1.call(fn).replace(d8,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),d1=T1?On.Buffer:void 0,Cd=On.Symbol,p1=On.Uint8Array,L1=$d.propertyIsEnumerable,E8=k8.splice,da=Cd?Cd.toStringTag:void 0,h1=Object.getOwnPropertySymbols,T8=d1?d1.isBuffer:void 0,$8=w8(Object.keys,Object),Lu=es(On,"DataView"),yl=es(On,"Map"),qu=es(On,"Promise"),Mu=es(On,"Set"),Iu=es(On,"WeakMap"),zl=es(Object,"create"),A8=ua(Lu),L8=ua(yl),q8=ua(qu),M8=ua(Mu),I8=ua(Iu),u1=Cd?Cd.prototype:void 0,Tu=u1?u1.valueOf:void 0;function pa(i){var o=-1,t=i==null?0:i.length;for(this.clear();++o<t;){var r=i[o];this.set(r[0],r[1])}}function D8(){this.__data__=zl?zl(null):{},this.size=0}function N8(i){var o=this.has(i)&&delete this.__data__[i];return this.size-=o?1:0,o}function R8(i){var o=this.__data__;if(zl){var t=o[i];return t===Nu?void 0:t}return fn.call(o,i)?o[i]:void 0}function O8(i){var o=this.__data__;return zl?o[i]!==void 0:fn.call(o,i)}function P8(i,o){var t=this.__data__;return this.size+=this.has(i)?0:1,t[i]=zl&&o===void 0?Nu:o,this}pa.prototype.clear=D8;pa.prototype.delete=N8;pa.prototype.get=R8;pa.prototype.has=O8;pa.prototype.set=P8;function Pn(i){var o=-1,t=i==null?0:i.length;for(this.clear();++o<t;){var r=i[o];this.set(r[0],r[1])}}function H8(){this.__data__=[],this.size=0}function F8(i){var o=this.__data__,t=Ad(o,i);if(t<0)return!1;var r=o.length-1;return t==r?o.pop():E8.call(o,t,1),--this.size,!0}function B8(i){var o=this.__data__,t=Ad(o,i);return t<0?void 0:o[t][1]}function V8(i){return Ad(this.__data__,i)>-1}function U8(i,o){var t=this.__data__,r=Ad(t,i);return r<0?(++this.size,t.push([i,o])):t[r][1]=o,this}Pn.prototype.clear=H8;Pn.prototype.delete=F8;Pn.prototype.get=B8;Pn.prototype.has=V8;Pn.prototype.set=U8;function ha(i){var o=-1,t=i==null?0:i.length;for(this.clear();++o<t;){var r=i[o];this.set(r[0],r[1])}}function j8(){this.size=0,this.__data__={hash:new pa,map:new(yl||Pn),string:new pa}}function G8(i){var o=Ld(this,i).delete(i);return this.size-=o?1:0,o}function W8(i){return Ld(this,i).get(i)}function K8(i){return Ld(this,i).has(i)}function Y8(i,o){var t=Ld(this,i),r=t.size;return t.set(i,o),this.size+=t.size==r?0:1,this}ha.prototype.clear=j8;ha.prototype.delete=G8;ha.prototype.get=W8;ha.prototype.has=K8;ha.prototype.set=Y8;function Sd(i){var o=-1,t=i==null?0:i.length;for(this.__data__=new ha;++o<t;)this.add(i[o])}function X8(i){return this.__data__.set(i,Nu),this}function Q8(i){return this.__data__.has(i)}Sd.prototype.add=Sd.prototype.push=X8;Sd.prototype.has=Q8;function fi(i){var o=this.__data__=new Pn(i);this.size=o.size}function J8(){this.__data__=new Pn,this.size=0}function Z8(i){var o=this.__data__,t=o.delete(i);return this.size=o.size,t}function t6(i){return this.__data__.get(i)}function e6(i){return this.__data__.has(i)}function r6(i,o){var t=this.__data__;if(t instanceof Pn){var r=t.__data__;if(!yl||r.length<K4-1)return r.push([i,o]),this.size=++t.size,this;t=this.__data__=new ha(r)}return t.set(i,o),this.size=t.size,this}fi.prototype.clear=J8;fi.prototype.delete=Z8;fi.prototype.get=t6;fi.prototype.has=e6;fi.prototype.set=r6;function o6(i,o){var t=Ed(i),r=!t&&v6(i),n=!t&&!r&&Du(i),a=!t&&!r&&!n&&O1(i),s=t||r||n||a,l=s?b8(i.length,String):[],d=l.length;for(var h in i)(o||fn.call(i,h))&&!(s&&(h=="length"||n&&(h=="offset"||h=="parent")||a&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||u6(h,d)))&&l.push(h);return l}function Ad(i,o){for(var t=i.length;t--;)if(I1(i[t][0],o))return t;return-1}function n6(i,o,t){var r=o(i);return Ed(i)?r:f8(r,t(i))}function _l(i){return i==null?i===void 0?t8:Q4:da&&da in Object(i)?p6(i):b6(i)}function m1(i){return wl(i)&&_l(i)==zd}function q1(i,o,t,r,n){return i===o?!0:i==null||o==null||!wl(i)&&!wl(o)?i!==i&&o!==o:i6(i,o,t,r,q1,n)}function i6(i,o,t,r,n,a){var s=Ed(i),l=Ed(o),d=s?$u:mi(i),h=l?$u:mi(o);d=d==zd?Za:d,h=h==zd?Za:h;var m=d==Za,f=h==Za,b=d==h;if(b&&Du(i)){if(!Du(o))return!1;s=!0,m=!1}if(b&&!m)return a||(a=new fi),s||O1(i)?M1(i,o,t,r,n,a):c6(i,o,d,t,r,n,a);if(!(t&Td)){var g=m&&fn.call(i,"__wrapped__"),v=f&&fn.call(o,"__wrapped__");if(g||v){var x=g?i.value():i,_=v?o.value():o;return a||(a=new fi),n(x,_,t,r,a)}}return b?(a||(a=new fi),d6(i,o,t,r,n,a)):!1}function a6(i){if(!R1(i)||f6(i))return!1;var o=D1(i)?S8:p8;return o.test(ua(i))}function s6(i){return wl(i)&&N1(i.length)&&!!Xt[_l(i)]}function l6(i){if(!g6(i))return $8(i);var o=[];for(var t in Object(i))fn.call(i,t)&&t!="constructor"&&o.push(t);return o}function M1(i,o,t,r,n,a){var s=t&Td,l=i.length,d=o.length;if(l!=d&&!(s&&d>l))return!1;var h=a.get(i);if(h&&a.get(o))return h==o;var m=-1,f=!0,b=t&g1?new Sd:void 0;for(a.set(i,o),a.set(o,i);++m<l;){var g=i[m],v=o[m];if(r)var x=s?r(v,g,m,o,i,a):r(g,v,m,i,o,a);if(x!==void 0){if(x)continue;f=!1;break}if(b){if(!g8(o,function(_,$){if(!x8(b,$)&&(g===_||n(g,_,t,r,a)))return b.push($)})){f=!1;break}}else if(!(g===v||n(g,v,t,r,a))){f=!1;break}}return a.delete(i),a.delete(o),f}function c6(i,o,t,r,n,a,s){switch(t){case kd:if(i.byteLength!=o.byteLength||i.byteOffset!=o.byteOffset)return!1;i=i.buffer,o=o.buffer;case C1:return!(i.byteLength!=o.byteLength||!a(new p1(i),new p1(o)));case v1:case x1:case w1:return I1(+i,+o);case y1:return i.name==o.name&&i.message==o.message;case _1:case k1:return i==o+"";case wd:var l=z8;case _d:var d=r&Td;if(l||(l=_8),i.size!=o.size&&!d)return!1;var h=s.get(i);if(h)return h==o;r|=g1,s.set(i,o);var m=M1(l(i),l(o),r,n,a,s);return s.delete(i),m;case Z4:if(Tu)return Tu.call(i)==Tu.call(o)}return!1}function d6(i,o,t,r,n,a){var s=t&Td,l=f1(i),d=l.length,h=f1(o),m=h.length;if(d!=m&&!s)return!1;for(var f=d;f--;){var b=l[f];if(!(s?b in o:fn.call(o,b)))return!1}var g=a.get(i);if(g&&a.get(o))return g==o;var v=!0;a.set(i,o),a.set(o,i);for(var x=s;++f<d;){b=l[f];var _=i[b],$=o[b];if(r)var N=s?r($,_,b,o,i,a):r(_,$,b,i,o,a);if(!(N===void 0?_===$||n(_,$,t,r,a):N)){v=!1;break}x||(x=b=="constructor")}if(v&&!x){var G=i.constructor,I=o.constructor;G!=I&&"constructor"in i&&"constructor"in o&&!(typeof G=="function"&&G instanceof G&&typeof I=="function"&&I instanceof I)&&(v=!1)}return a.delete(i),a.delete(o),v}function f1(i){return n6(i,z6,h6)}function Ld(i,o){var t=i.__data__;return m6(o)?t[typeof o=="string"?"string":"hash"]:t.map}function es(i,o){var t=y8(i,o);return a6(t)?t:void 0}function p6(i){var o=fn.call(i,da),t=i[da];try{i[da]=void 0;var r=!0}catch{}var n=A1.call(i);return r&&(o?i[da]=t:delete i[da]),n}var h6=h1?function(i){return i==null?[]:(i=Object(i),m8(h1(i),function(o){return L1.call(i,o)}))}:w6,mi=_l;(Lu&&mi(new Lu(new ArrayBuffer(1)))!=kd||yl&&mi(new yl)!=wd||qu&&mi(qu.resolve())!=i1||Mu&&mi(new Mu)!=_d||Iu&&mi(new Iu)!=Au)&&(mi=function(i){var o=_l(i),t=o==Za?i.constructor:void 0,r=t?ua(t):"";if(r)switch(r){case A8:return kd;case L8:return wd;case q8:return i1;case M8:return _d;case I8:return Au}return o});function u6(i,o){return o=o??b1,!!o&&(typeof i=="number"||h8.test(i))&&i>-1&&i%1==0&&i<o}function m6(i){var o=typeof i;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?i!=="__proto__":i===null}function f6(i){return!!c1&&c1 in i}function g6(i){var o=i&&i.constructor,t=typeof o=="function"&&o.prototype||$d;return i===t}function b6(i){return A1.call(i)}function ua(i){if(i!=null){try{return $1.call(i)}catch{}try{return i+""}catch{}}return""}function I1(i,o){return i===o||i!==i&&o!==o}var v6=m1((function(){return arguments})())?m1:function(i){return wl(i)&&fn.call(i,"callee")&&!L1.call(i,"callee")},Ed=Array.isArray;function x6(i){return i!=null&&N1(i.length)&&!D1(i)}var Du=T8||_6;function y6(i,o){return q1(i,o)}function D1(i){if(!R1(i))return!1;var o=_l(i);return o==z1||o==X4||o==Y4||o==J4}function N1(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=b1}function R1(i){var o=typeof i;return i!=null&&(o=="object"||o=="function")}function wl(i){return i!=null&&typeof i=="object"}var O1=l1?v8(l1):s6;function z6(i){return x6(i)?o6(i):l6(i)}function w6(){return[]}function _6(){return!1}ts.exports=y6});var P1=En(Pu=>{"use strict";Object.defineProperty(Pu,"__esModule",{value:!0});var k6=Cu(),C6=Ru(),Ou;(function(i){function o(a={},s={},l=!1){typeof a!="object"&&(a={}),typeof s!="object"&&(s={});let d=k6(s);l||(d=Object.keys(d).reduce((h,m)=>(d[m]!=null&&(h[m]=d[m]),h),{}));for(let h in a)a[h]!==void 0&&s[h]===void 0&&(d[h]=a[h]);return Object.keys(d).length>0?d:void 0}i.compose=o;function t(a={},s={}){typeof a!="object"&&(a={}),typeof s!="object"&&(s={});let l=Object.keys(a).concat(Object.keys(s)).reduce((d,h)=>(C6(a[h],s[h])||(d[h]=s[h]===void 0?null:s[h]),d),{});return Object.keys(l).length>0?l:void 0}i.diff=t;function r(a={},s={}){a=a||{};let l=Object.keys(s).reduce((d,h)=>(s[h]!==a[h]&&a[h]!==void 0&&(d[h]=s[h]),d),{});return Object.keys(a).reduce((d,h)=>(a[h]!==s[h]&&s[h]===void 0&&(d[h]=null),d),l)}i.invert=r;function n(a,s,l=!1){if(typeof a!="object")return s;if(typeof s!="object")return;if(!l)return s;let d=Object.keys(s).reduce((h,m)=>(a[m]===void 0&&(h[m]=s[m]),h),{});return Object.keys(d).length>0?d:void 0}i.transform=n})(Ou||(Ou={}));Pu.default=Ou});var Bu=En(Fu=>{"use strict";Object.defineProperty(Fu,"__esModule",{value:!0});var Hu;(function(i){function o(t){return typeof t.delete=="number"?t.delete:typeof t.retain=="number"?t.retain:typeof t.retain=="object"&&t.retain!==null?1:typeof t.insert=="string"?t.insert.length:1}i.length=o})(Hu||(Hu={}));Fu.default=Hu});var F1=En(Uu=>{"use strict";Object.defineProperty(Uu,"__esModule",{value:!0});var H1=Bu(),Vu=class{constructor(o){this.ops=o,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(o){o||(o=1/0);let t=this.ops[this.index];if(t){let r=this.offset,n=H1.default.length(t);if(o>=n-r?(o=n-r,this.index+=1,this.offset=0):this.offset+=o,typeof t.delete=="number")return{delete:o};{let a={};return t.attributes&&(a.attributes=t.attributes),typeof t.retain=="number"?a.retain=o:typeof t.retain=="object"&&t.retain!==null?a.retain=t.retain:typeof t.insert=="string"?a.insert=t.insert.substr(r,o):a.insert=t.insert,a}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?H1.default.length(this.ops[this.index])-this.offset:1/0}peekType(){let o=this.ops[this.index];return o?typeof o.delete=="number"?"delete":typeof o.retain=="number"||typeof o.retain=="object"&&o.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{let o=this.offset,t=this.index,r=this.next(),n=this.ops.slice(this.index);return this.offset=o,this.index=t,[r].concat(n)}}else return[]}};Uu.default=Vu});var Br=En((Fn,Md)=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.AttributeMap=Fn.OpIterator=Fn.Op=void 0;var qd=b0(),S6=Cu(),ju=Ru(),ma=P1();Fn.AttributeMap=ma.default;var Hn=Bu();Fn.Op=Hn.default;var yo=F1();Fn.OpIterator=yo.default;var E6="\0",B1=(i,o)=>{if(typeof i!="object"||i===null)throw new Error(`cannot retain a ${typeof i}`);if(typeof o!="object"||o===null)throw new Error(`cannot retain a ${typeof o}`);let t=Object.keys(i)[0];if(!t||t!==Object.keys(o)[0])throw new Error(`embed types not matched: ${t} != ${Object.keys(o)[0]}`);return[t,i[t],o[t]]},Bn=class i{constructor(o){Array.isArray(o)?this.ops=o:o!=null&&Array.isArray(o.ops)?this.ops=o.ops:this.ops=[]}static registerEmbed(o,t){this.handlers[o]=t}static unregisterEmbed(o){delete this.handlers[o]}static getHandler(o){let t=this.handlers[o];if(!t)throw new Error(`no handlers for embed type "${o}"`);return t}insert(o,t){let r={};return typeof o=="string"&&o.length===0?this:(r.insert=o,t!=null&&typeof t=="object"&&Object.keys(t).length>0&&(r.attributes=t),this.push(r))}delete(o){return o<=0?this:this.push({delete:o})}retain(o,t){if(typeof o=="number"&&o<=0)return this;let r={retain:o};return t!=null&&typeof t=="object"&&Object.keys(t).length>0&&(r.attributes=t),this.push(r)}push(o){let t=this.ops.length,r=this.ops[t-1];if(o=S6(o),typeof r=="object"){if(typeof o.delete=="number"&&typeof r.delete=="number")return this.ops[t-1]={delete:r.delete+o.delete},this;if(typeof r.delete=="number"&&o.insert!=null&&(t-=1,r=this.ops[t-1],typeof r!="object"))return this.ops.unshift(o),this;if(ju(o.attributes,r.attributes)){if(typeof o.insert=="string"&&typeof r.insert=="string")return this.ops[t-1]={insert:r.insert+o.insert},typeof o.attributes=="object"&&(this.ops[t-1].attributes=o.attributes),this;if(typeof o.retain=="number"&&typeof r.retain=="number")return this.ops[t-1]={retain:r.retain+o.retain},typeof o.attributes=="object"&&(this.ops[t-1].attributes=o.attributes),this}}return t===this.ops.length?this.ops.push(o):this.ops.splice(t,0,o),this}chop(){let o=this.ops[this.ops.length-1];return o&&typeof o.retain=="number"&&!o.attributes&&this.ops.pop(),this}filter(o){return this.ops.filter(o)}forEach(o){this.ops.forEach(o)}map(o){return this.ops.map(o)}partition(o){let t=[],r=[];return this.forEach(n=>{(o(n)?t:r).push(n)}),[t,r]}reduce(o,t){return this.ops.reduce(o,t)}changeLength(){return this.reduce((o,t)=>t.insert?o+Hn.default.length(t):t.delete?o-t.delete:o,0)}length(){return this.reduce((o,t)=>o+Hn.default.length(t),0)}slice(o=0,t=1/0){let r=[],n=new yo.default(this.ops),a=0;for(;a<t&&n.hasNext();){let s;a<o?s=n.next(o-a):(s=n.next(t-a),r.push(s)),a+=Hn.default.length(s)}return new i(r)}compose(o){let t=new yo.default(this.ops),r=new yo.default(o.ops),n=[],a=r.peek();if(a!=null&&typeof a.retain=="number"&&a.attributes==null){let l=a.retain;for(;t.peekType()==="insert"&&t.peekLength()<=l;)l-=t.peekLength(),n.push(t.next());a.retain-l>0&&r.next(a.retain-l)}let s=new i(n);for(;t.hasNext()||r.hasNext();)if(r.peekType()==="insert")s.push(r.next());else if(t.peekType()==="delete")s.push(t.next());else{let l=Math.min(t.peekLength(),r.peekLength()),d=t.next(l),h=r.next(l);if(h.retain){let m={};if(typeof d.retain=="number")m.retain=typeof h.retain=="number"?l:h.retain;else if(typeof h.retain=="number")d.retain==null?m.insert=d.insert:m.retain=d.retain;else{let b=d.retain==null?"insert":"retain",[g,v,x]=B1(d[b],h.retain),_=i.getHandler(g);m[b]={[g]:_.compose(v,x,b==="retain")}}let f=ma.default.compose(d.attributes,h.attributes,typeof d.retain=="number");if(f&&(m.attributes=f),s.push(m),!r.hasNext()&&ju(s.ops[s.ops.length-1],m)){let b=new i(t.rest());return s.concat(b).chop()}}else typeof h.delete=="number"&&(typeof d.retain=="number"||typeof d.retain=="object"&&d.retain!==null)&&s.push(h)}return s.chop()}concat(o){let t=new i(this.ops.slice());return o.ops.length>0&&(t.push(o.ops[0]),t.ops=t.ops.concat(o.ops.slice(1))),t}diff(o,t){if(this.ops===o.ops)return new i;let r=[this,o].map(d=>d.map(h=>{if(h.insert!=null)return typeof h.insert=="string"?h.insert:E6;let m=d===o?"on":"with";throw new Error("diff() called "+m+" non-document")}).join("")),n=new i,a=qd(r[0],r[1],t,!0),s=new yo.default(this.ops),l=new yo.default(o.ops);return a.forEach(d=>{let h=d[1].length;for(;h>0;){let m=0;switch(d[0]){case qd.INSERT:m=Math.min(l.peekLength(),h),n.push(l.next(m));break;case qd.DELETE:m=Math.min(h,s.peekLength()),s.next(m),n.delete(m);break;case qd.EQUAL:m=Math.min(s.peekLength(),l.peekLength(),h);let f=s.next(m),b=l.next(m);ju(f.insert,b.insert)?n.retain(m,ma.default.diff(f.attributes,b.attributes)):n.push(b).delete(m);break}h-=m}}),n.chop()}eachLine(o,t=`
|
|
2
|
+
`){let r=new yo.default(this.ops),n=new i,a=0;for(;r.hasNext();){if(r.peekType()!=="insert")return;let s=r.peek(),l=Hn.default.length(s)-r.peekLength(),d=typeof s.insert=="string"?s.insert.indexOf(t,l)-l:-1;if(d<0)n.push(r.next());else if(d>0)n.push(r.next(d));else{if(o(n,r.next(1).attributes||{},a)===!1)return;a+=1,n=new i}}n.length()>0&&o(n,{},a)}invert(o){let t=new i;return this.reduce((r,n)=>{if(n.insert)t.delete(Hn.default.length(n));else{if(typeof n.retain=="number"&&n.attributes==null)return t.retain(n.retain),r+n.retain;if(n.delete||typeof n.retain=="number"){let a=n.delete||n.retain;return o.slice(r,r+a).forEach(l=>{n.delete?t.push(l):n.retain&&n.attributes&&t.retain(Hn.default.length(l),ma.default.invert(n.attributes,l.attributes))}),r+a}else if(typeof n.retain=="object"&&n.retain!==null){let a=o.slice(r,r+1),s=new yo.default(a.ops).next(),[l,d,h]=B1(n.retain,s.insert),m=i.getHandler(l);return t.retain({[l]:m.invert(d,h)},ma.default.invert(n.attributes,s.attributes)),r+1}}return r},0),t.chop()}transform(o,t=!1){if(t=!!t,typeof o=="number")return this.transformPosition(o,t);let r=o,n=new yo.default(this.ops),a=new yo.default(r.ops),s=new i;for(;n.hasNext()||a.hasNext();)if(n.peekType()==="insert"&&(t||a.peekType()!=="insert"))s.retain(Hn.default.length(n.next()));else if(a.peekType()==="insert")s.push(a.next());else{let l=Math.min(n.peekLength(),a.peekLength()),d=n.next(l),h=a.next(l);if(d.delete)continue;if(h.delete)s.push(h);else{let m=d.retain,f=h.retain,b=typeof f=="object"&&f!==null?f:l;if(typeof m=="object"&&m!==null&&typeof f=="object"&&f!==null){let g=Object.keys(m)[0];if(g===Object.keys(f)[0]){let v=i.getHandler(g);v&&(b={[g]:v.transform(m[g],f[g],t)})}}s.retain(b,ma.default.transform(d.attributes,h.attributes,t))}}return s.chop()}transformPosition(o,t=!1){t=!!t;let r=new yo.default(this.ops),n=0;for(;r.hasNext()&&n<=o;){let a=r.peekLength(),s=r.peekType();if(r.next(),s==="delete"){o-=Math.min(a,o-n);continue}else s==="insert"&&(n<o||!t)&&(o+=a);n+=a}return o}};Bn.Op=Hn.default;Bn.OpIterator=yo.default;Bn.AttributeMap=ma.default;Bn.handlers={};Fn.default=Bn;typeof Md=="object"&&(Md.exports=Bn,Md.exports.default=Bn)});var nz=En((xst,dm)=>{"use strict";var cT=Object.prototype.hasOwnProperty,Ar="~";function Il(){}Object.create&&(Il.prototype=Object.create(null),new Il().__proto__||(Ar=!1));function dT(i,o,t){this.fn=i,this.context=o,this.once=t||!1}function oz(i,o,t,r,n){if(typeof t!="function")throw new TypeError("The listener must be a function");var a=new dT(t,r||i,n),s=Ar?Ar+o:o;return i._events[s]?i._events[s].fn?i._events[s]=[i._events[s],a]:i._events[s].push(a):(i._events[s]=a,i._eventsCount++),i}function ap(i,o){--i._eventsCount===0?i._events=new Il:delete i._events[o]}function xr(){this._events=new Il,this._eventsCount=0}xr.prototype.eventNames=function(){var o=[],t,r;if(this._eventsCount===0)return o;for(r in t=this._events)cT.call(t,r)&&o.push(Ar?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(t)):o};xr.prototype.listeners=function(o){var t=Ar?Ar+o:o,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var n=0,a=r.length,s=new Array(a);n<a;n++)s[n]=r[n].fn;return s};xr.prototype.listenerCount=function(o){var t=Ar?Ar+o:o,r=this._events[t];return r?r.fn?1:r.length:0};xr.prototype.emit=function(o,t,r,n,a,s){var l=Ar?Ar+o:o;if(!this._events[l])return!1;var d=this._events[l],h=arguments.length,m,f;if(d.fn){switch(d.once&&this.removeListener(o,d.fn,void 0,!0),h){case 1:return d.fn.call(d.context),!0;case 2:return d.fn.call(d.context,t),!0;case 3:return d.fn.call(d.context,t,r),!0;case 4:return d.fn.call(d.context,t,r,n),!0;case 5:return d.fn.call(d.context,t,r,n,a),!0;case 6:return d.fn.call(d.context,t,r,n,a,s),!0}for(f=1,m=new Array(h-1);f<h;f++)m[f-1]=arguments[f];d.fn.apply(d.context,m)}else{var b=d.length,g;for(f=0;f<b;f++)switch(d[f].once&&this.removeListener(o,d[f].fn,void 0,!0),h){case 1:d[f].fn.call(d[f].context);break;case 2:d[f].fn.call(d[f].context,t);break;case 3:d[f].fn.call(d[f].context,t,r);break;case 4:d[f].fn.call(d[f].context,t,r,n);break;default:if(!m)for(g=1,m=new Array(h-1);g<h;g++)m[g-1]=arguments[g];d[f].fn.apply(d[f].context,m)}}return!0};xr.prototype.on=function(o,t,r){return oz(this,o,t,r,!1)};xr.prototype.once=function(o,t,r){return oz(this,o,t,r,!0)};xr.prototype.removeListener=function(o,t,r,n){var a=Ar?Ar+o:o;if(!this._events[a])return this;if(!t)return ap(this,a),this;var s=this._events[a];if(s.fn)s.fn===t&&(!n||s.once)&&(!r||s.context===r)&&ap(this,a);else{for(var l=0,d=[],h=s.length;l<h;l++)(s[l].fn!==t||n&&!s[l].once||r&&s[l].context!==r)&&d.push(s[l]);d.length?this._events[a]=d.length===1?d[0]:d:ap(this,a)}return this};xr.prototype.removeAllListeners=function(o){var t;return o?(t=Ar?Ar+o:o,this._events[t]&&ap(this,t)):(this._events=new Il,this._eventsCount=0),this};xr.prototype.off=xr.prototype.removeListener;xr.prototype.addListener=xr.prototype.on;xr.prefixed=Ar;xr.EventEmitter=xr;typeof dm<"u"&&(dm.exports=xr)});var Qm=En((sc,Xm)=>{(function(i,o){typeof sc=="object"&&typeof Xm=="object"?Xm.exports=o():typeof define=="function"&&define.amd?define([],o):typeof sc=="object"?sc.AirDatepicker=o():i.AirDatepicker=o()})(sc,(function(){return(function(){"use strict";var i={d:function(R,y){for(var k in y)i.o(y,k)&&!i.o(R,k)&&Object.defineProperty(R,k,{enumerable:!0,get:y[k]})},o:function(R,y){return Object.prototype.hasOwnProperty.call(R,y)}},o={};i.d(o,{default:function(){return nt}});var t={days:"days",months:"months",years:"years",day:"day",month:"month",year:"year",eventChangeViewDate:"changeViewDate",eventChangeCurrentView:"changeCurrentView",eventChangeFocusDate:"changeFocusDate",eventChangeSelectedDate:"changeSelectedDate",eventChangeTime:"changeTime",eventChangeLastSelectedDate:"changeLastSelectedDate",actionSelectDate:"selectDate",actionUnselectDate:"unselectDate",cssClassWeekend:"-weekend-"},r={classes:"",inline:!1,locale:{days:["\u0412\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435","\u041F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A","\u0412\u0442\u043E\u0440\u043D\u0438\u043A","\u0421\u0440\u0435\u0434\u0430","\u0427\u0435\u0442\u0432\u0435\u0440\u0433","\u041F\u044F\u0442\u043D\u0438\u0446\u0430","\u0421\u0443\u0431\u0431\u043E\u0442\u0430"],daysShort:["\u0412\u043E\u0441","\u041F\u043E\u043D","\u0412\u0442\u043E","\u0421\u0440\u0435","\u0427\u0435\u0442","\u041F\u044F\u0442","\u0421\u0443\u0431"],daysMin:["\u0412\u0441","\u041F\u043D","\u0412\u0442","\u0421\u0440","\u0427\u0442","\u041F\u0442","\u0421\u0431"],months:["\u042F\u043D\u0432\u0430\u0440\u044C","\u0424\u0435\u0432\u0440\u0430\u043B\u044C","\u041C\u0430\u0440\u0442","\u0410\u043F\u0440\u0435\u043B\u044C","\u041C\u0430\u0439","\u0418\u044E\u043D\u044C","\u0418\u044E\u043B\u044C","\u0410\u0432\u0433\u0443\u0441\u0442","\u0421\u0435\u043D\u0442\u044F\u0431\u0440\u044C","\u041E\u043A\u0442\u044F\u0431\u0440\u044C","\u041D\u043E\u044F\u0431\u0440\u044C","\u0414\u0435\u043A\u0430\u0431\u0440\u044C"],monthsShort:["\u042F\u043D\u0432","\u0424\u0435\u0432","\u041C\u0430\u0440","\u0410\u043F\u0440","\u041C\u0430\u0439","\u0418\u044E\u043D","\u0418\u044E\u043B","\u0410\u0432\u0433","\u0421\u0435\u043D","\u041E\u043A\u0442","\u041D\u043E\u044F","\u0414\u0435\u043A"],today:"\u0421\u0435\u0433\u043E\u0434\u043D\u044F",clear:"\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C",dateFormat:"dd.MM.yyyy",timeFormat:"HH:mm",firstDay:1},startDate:new Date,firstDay:"",weekends:[6,0],dateFormat:"",altField:"",altFieldDateFormat:"T",toggleSelected:!0,keyboardNav:!0,selectedDates:!1,container:"",isMobile:!1,visible:!1,position:"bottom left",offset:12,view:t.days,minView:t.days,showOtherMonths:!0,selectOtherMonths:!0,moveToOtherMonthsOnSelect:!0,showOtherYears:!0,selectOtherYears:!0,moveToOtherYearsOnSelect:!0,minDate:"",maxDate:"",disableNavWhenOutOfRange:!0,multipleDates:!1,multipleDatesSeparator:", ",range:!1,dynamicRange:!0,buttons:!1,monthsField:"monthsShort",showEvent:"focus",autoClose:!1,fixedHeight:!1,prevHtml:'<svg><path d="M 17,12 l -5,5 l 5,5"></path></svg>',nextHtml:'<svg><path d="M 14,12 l 5,5 l -5,5"></path></svg>',navTitles:{days:"MMMM, <i>yyyy</i>",months:"yyyy",years:"yyyy1 - yyyy2"},timepicker:!1,onlyTimepicker:!1,dateTimeSeparator:" ",timeFormat:"",minHours:0,maxHours:24,minMinutes:0,maxMinutes:59,hoursStep:1,minutesStep:1,onSelect:!1,onChangeViewDate:!1,onChangeView:!1,onRenderCell:!1,onShow:!1,onHide:!1,onClickDayName:!1};function n(R){let y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:document;return typeof R=="string"?y.querySelector(R):R}function a(){let{tagName:R="div",className:y="",innerHtml:k="",id:z="",attrs:M={}}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},q=document.createElement(R);return y&&q.classList.add(...y.split(" ")),z&&(q.id=z),k&&(q.innerHTML=k),M&&s(q,M),q}function s(R,y){for(let[k,z]of Object.entries(y))z!==void 0&&R.setAttribute(k,z);return R}function l(R){return new Date(R.getFullYear(),R.getMonth()+1,0).getDate()}function d(R){let y=R.getHours(),{hours:k,dayPeriod:z}=h(y);return{year:R.getFullYear(),month:R.getMonth(),fullMonth:R.getMonth()+1<10?"0"+(R.getMonth()+1):R.getMonth()+1,date:R.getDate(),fullDate:R.getDate()<10?"0"+R.getDate():R.getDate(),day:R.getDay(),hours:y,fullHours:m(y),hours12:k,dayPeriod:z,fullHours12:m(k),minutes:R.getMinutes(),fullMinutes:R.getMinutes()<10?"0"+R.getMinutes():R.getMinutes()}}function h(R){return{dayPeriod:R>11?"pm":"am",hours:R%12==0?12:R%12}}function m(R){return R<10?"0"+R:R}function f(R){let y=10*Math.floor(R.getFullYear()/10);return[y,y+9]}function b(){let R=[];for(var y=arguments.length,k=new Array(y),z=0;z<y;z++)k[z]=arguments[z];return k.forEach((M=>{if(typeof M=="object")for(let q in M)M[q]&&R.push(q);else M&&R.push(M)})),R.join(" ")}function g(R,y){let k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.days;if(!R||!y)return!1;let z=d(R),M=d(y);return{[t.days]:z.date===M.date&&z.month===M.month&&z.year===M.year,[t.months]:z.month===M.month&&z.year===M.year,[t.years]:z.year===M.year}[k]}function v(R,y,k){let z=_(R,!1).getTime(),M=_(y,!1).getTime();return k?z>=M:z>M}function x(R,y){return!v(R,y,!0)}function _(R){let y=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],k=new Date(R.getTime());return typeof y!="boolean"||y||(function(z){z.setHours(0,0,0,0)})(k),k}function $(R,y,k){R.length?R.forEach((z=>{z.addEventListener(y,k)})):R.addEventListener(y,k)}function N(R,y){return!(!R||R===document||R instanceof DocumentFragment)&&(R.matches(y)?R:N(R.parentNode,y))}function G(R,y,k){return R>k?k:R<y?y:R}function I(R){for(var y=arguments.length,k=new Array(y>1?y-1:0),z=1;z<y;z++)k[z-1]=arguments[z];return k.filter((M=>M)).forEach((M=>{for(let[q,A]of Object.entries(M))if(A!==void 0&&A.toString()==="[object Object]"){let P=R[q]!==void 0?R[q].toString():void 0,U=A.toString(),Y=Array.isArray(A)?[]:{};R[q]=R[q]?P!==U?Y:R[q]:Y,I(R[q],A)}else R[q]=A})),R}function w(R){let y=R;return R instanceof Date||(typeof R=="string"&&/^\d{4}-\d{2}-\d{2}$/.test(R)&&(R+="T00:00:00"),y=new Date(R)),isNaN(y.getTime())&&(console.log(`Unable to convert value "${R}" to Date object`),y=!1),y}function T(R){let y="\\s|\\.|-|/|\\\\|,|\\$|\\!|\\?|:|;";return new RegExp("(^|>|"+y+")("+R+")($|<|"+y+")","g")}function L(R,y,k){return(y=(function(z){var M=(function(q,A){if(typeof q!="object"||q===null)return q;var P=q[Symbol.toPrimitive];if(P!==void 0){var U=P.call(q,"string");if(typeof U!="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(z);return typeof M=="symbol"?M:String(M)})(y))in R?Object.defineProperty(R,y,{value:k,enumerable:!0,configurable:!0,writable:!0}):R[y]=k,R}class W{constructor(){let{type:y,date:k,dp:z,opts:M,body:q}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};L(this,"focus",(()=>{this.$cell.classList.add("-focus-"),this.focused=!0})),L(this,"removeFocus",(()=>{this.$cell.classList.remove("-focus-"),this.focused=!1})),L(this,"select",(()=>{this.$cell.classList.add("-selected-"),this.selected=!0})),L(this,"removeSelect",(()=>{this.$cell.classList.remove("-selected-","-range-from-","-range-to-"),this.selected=!1})),L(this,"onChangeSelectedDate",(()=>{this.isDisabled||(this._handleSelectedStatus(),this.opts.range&&this._handleRangeStatus())})),L(this,"onChangeFocusDate",(A=>{if(!A)return void(this.focused&&this.removeFocus());let P=g(A,this.date,this.type);P?this.focus():!P&&this.focused&&this.removeFocus(),this.opts.range&&this._handleRangeStatus()})),L(this,"render",(()=>(this.$cell.innerHTML=this._getHtml(),this._handleClasses(),this.$cell))),this.type=y,this.singleType=this.type.slice(0,-1),this.date=k,this.dp=z,this.opts=M,this.body=q,this.customData=!1,this.init()}init(){var y,k;let{onRenderCell:z}=this.opts;z&&(this.customData=z({date:this.date,cellType:this.singleType,datepicker:this.dp})),this._createElement(),this._bindDatepickerEvents(),(y=this.customData)!==null&&y!==void 0&&y.disabled?this.dp.disableDate(this.date):((k=this.customData)===null||k===void 0?void 0:k.disabled)===!1&&this.dp.enableDate(this.date)}_bindDatepickerEvents(){this.dp.on(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.on(t.eventChangeFocusDate,this.onChangeFocusDate)}unbindDatepickerEvents(){this.dp.off(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.off(t.eventChangeFocusDate,this.onChangeFocusDate)}_createElement(){var y;let{year:k,month:z,fullMonth:M,date:q,fullDate:A}=d(this.date),P=((y=this.customData)===null||y===void 0?void 0:y.attrs)||{};this.$cell=a({attrs:{"data-year":k,"data-month":z,"data-date":q,"data-iso-date":`${k}-${M}-${A}`,...P}}),this.$cell.adpCell=this}_getClassName(){var y;let k=new Date,{selectOtherMonths:z,selectOtherYears:M}=this.opts,{minDate:q,maxDate:A,isDateDisabled:P}=this.dp,{day:U}=d(this.date),Y=this._isOutOfMinMaxRange(),rt=P(this.date),et=b("air-datepicker-cell",`-${this.singleType}-`,{"-current-":g(k,this.date,this.type),"-min-date-":q&&g(q,this.date,this.type),"-max-date-":A&&g(A,this.date,this.type)}),it="";switch(this.type){case t.days:it=b({"-weekend-":this.dp.isWeekend(U),"-other-month-":this.isOtherMonth,"-disabled-":this.isOtherMonth&&!z||Y||rt});break;case t.months:it=b({"-disabled-":Y});break;case t.years:it=b({"-other-decade-":this.isOtherDecade,"-disabled-":Y||this.isOtherDecade&&!M})}return b(et,it,(y=this.customData)===null||y===void 0?void 0:y.classes).split(" ")}_getHtml(){var y;let{year:k,month:z,date:M}=d(this.date),{showOtherMonths:q,showOtherYears:A}=this.opts;if((y=this.customData)!==null&&y!==void 0&&y.html)return this.customData.html;switch(this.type){case t.days:return!q&&this.isOtherMonth?"":M;case t.months:return this.dp.locale[this.opts.monthsField][z];case t.years:return!A&&this.isOtherDecade?"":k}}_isOutOfMinMaxRange(){let{minDate:y,maxDate:k}=this.dp,{type:z,date:M}=this,{month:q,year:A,date:P}=d(M),U=z===t.days,Y=z===t.years,rt=!!y&&new Date(A,Y?y.getMonth():q,U?P:y.getDate()),et=!!k&&new Date(A,Y?k.getMonth():q,U?P:k.getDate());return y&&k?x(rt,y)||v(et,k):y?x(rt,y):k?v(et,k):void 0}destroy(){this.unbindDatepickerEvents()}_handleRangeStatus(){let{selectedDates:y,focusDate:k,rangeDateTo:z,rangeDateFrom:M}=this.dp,q=y.length;if(this.$cell.classList.remove("-range-from-","-range-to-","-in-range-"),!q)return;let A=M,P=z;if(q===1&&k){let it=v(k,y[0]);A=it?y[0]:k,P=it?k:y[0]}let U=b({"-in-range-":A&&P&&(Y=this.date,rt=A,et=P,v(Y,rt)&&x(Y,et)),"-range-from-":A&&g(this.date,A,this.type),"-range-to-":P&&g(this.date,P,this.type)});var Y,rt,et;U&&this.$cell.classList.add(...U.split(" "))}_handleSelectedStatus(){let y=this.dp._checkIfDateIsSelected(this.date,this.type);y?this.select():!y&&this.selected&&this.removeSelect()}_handleInitialFocusStatus(){g(this.dp.focusDate,this.date,this.type)&&this.focus()}_handleClasses(){this.$cell.setAttribute("class",""),this._handleInitialFocusStatus(),this.dp.hasSelectedDates&&(this._handleSelectedStatus(),this.dp.opts.range&&this._handleRangeStatus()),this.$cell.classList.add(...this._getClassName())}get isDisabled(){return this.$cell.matches(".-disabled-")}get isOtherMonth(){return this.dp.isOtherMonth(this.date)}get isOtherDecade(){return this.dp.isOtherDecade(this.date)}}function tt(R,y,k){return(y=(function(z){var M=(function(q,A){if(typeof q!="object"||q===null)return q;var P=q[Symbol.toPrimitive];if(P!==void 0){var U=P.call(q,"string");if(typeof U!="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(z);return typeof M=="symbol"?M:String(M)})(y))in R?Object.defineProperty(R,y,{value:k,enumerable:!0,configurable:!0,writable:!0}):R[y]=k,R}let dt={[t.days]:`<div class="air-datepicker-body--day-names"></div><div class="air-datepicker-body--cells -${t.days}-"></div>`,[t.months]:`<div class="air-datepicker-body--cells -${t.months}-"></div>`,[t.years]:`<div class="air-datepicker-body--cells -${t.years}-"></div>`},gt=".air-datepicker-cell";class _t{constructor(y){let{dp:k,type:z,opts:M}=y;tt(this,"handleClick",(q=>{let A=q.target.closest(gt).adpCell;if(A.isDisabled)return;if(!this.dp.isMinViewReached)return void this.dp.down();let P=this.dp._checkIfDateIsSelected(A.date,A.type);P?this.dp._handleAlreadySelectedDates(P,A.date):this.dp.selectDate(A.date)})),tt(this,"handleDayNameClick",(q=>{let A=q.target.getAttribute("data-day-index");this.opts.onClickDayName({dayIndex:Number(A),datepicker:this.dp})})),tt(this,"onChangeCurrentView",(q=>{q!==this.type?this.hide():(this.show(),this.render())})),tt(this,"onMouseOverCell",(q=>{let A=N(q.target,gt);this.dp.setFocusDate(!!A&&A.adpCell.date)})),tt(this,"onMouseOutCell",(()=>{this.dp.setFocusDate(!1)})),tt(this,"onClickBody",(q=>{let{onClickDayName:A}=this.opts,P=q.target;P.closest(gt)&&this.handleClick(q),A&&P.closest(".air-datepicker-body--day-name")&&this.handleDayNameClick(q)})),tt(this,"onMouseDown",(q=>{this.pressed=!0;let A=N(q.target,gt),P=A&&A.adpCell;g(P.date,this.dp.rangeDateFrom)&&(this.rangeFromFocused=!0),g(P.date,this.dp.rangeDateTo)&&(this.rangeToFocused=!0)})),tt(this,"onMouseMove",(q=>{if(!this.pressed||!this.dp.isMinViewReached)return;q.preventDefault();let A=N(q.target,gt),P=A&&A.adpCell,{selectedDates:U,rangeDateTo:Y,rangeDateFrom:rt}=this.dp;if(!P||P.isDisabled)return;let{date:et}=P;if(U.length===2){if(this.rangeFromFocused&&!v(et,Y)){let{hours:it,minutes:fe}=d(rt);et.setHours(it),et.setMinutes(fe),this.dp.rangeDateFrom=et,this.dp.replaceDate(rt,et)}if(this.rangeToFocused&&!x(et,rt)){let{hours:it,minutes:fe}=d(Y);et.setHours(it),et.setMinutes(fe),this.dp.rangeDateTo=et,this.dp.replaceDate(Y,et)}}})),tt(this,"onMouseUp",(()=>{this.pressed=!1,this.rangeFromFocused=!1,this.rangeToFocused=!1})),tt(this,"onChangeViewDate",((q,A)=>{if(!this.isVisible)return;let P=f(q),U=f(A);switch(this.dp.currentView){case t.days:if(g(q,A,t.months))return;break;case t.months:if(g(q,A,t.years))return;break;case t.years:if(P[0]===U[0]&&P[1]===U[1])return}this.render()})),tt(this,"render",(()=>{this.destroyCells(),this._generateCells(),this.cells.forEach((q=>{this.$cells.appendChild(q.render())}))})),this.dp=k,this.type=z,this.opts=M,this.cells=[],this.$el="",this.pressed=!1,this.isVisible=!0,this.init()}init(){this._buildBaseHtml(),this.type===t.days&&this.renderDayNames(),this.render(),this._bindEvents(),this._bindDatepickerEvents()}_bindEvents(){let{range:y,dynamicRange:k}=this.opts;$(this.$el,"mouseover",this.onMouseOverCell),$(this.$el,"mouseout",this.onMouseOutCell),$(this.$el,"click",this.onClickBody),y&&k&&($(this.$el,"mousedown",this.onMouseDown),$(this.$el,"mousemove",this.onMouseMove),$(window.document,"mouseup",this.onMouseUp))}_bindDatepickerEvents(){this.dp.on(t.eventChangeViewDate,this.onChangeViewDate),this.dp.on(t.eventChangeCurrentView,this.onChangeCurrentView)}_buildBaseHtml(){this.$el=a({className:`air-datepicker-body -${this.type}-`,innerHtml:dt[this.type]}),this.$names=n(".air-datepicker-body--day-names",this.$el),this.$cells=n(".air-datepicker-body--cells",this.$el)}_getDayNamesHtml(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.dp.locale.firstDay,k="",z=this.dp.isWeekend,{onClickDayName:M}=this.opts,q=y,A=0;for(;A<7;){let P=q%7;k+=`<div class="${b("air-datepicker-body--day-name",{[t.cssClassWeekend]:z(P),"-clickable-":!!M})}" data-day-index='${P}'>${this.dp.locale.daysMin[P]}</div>`,A++,q++}return k}renderDayNames(){this.$names.innerHTML=this._getDayNamesHtml()}_generateCell(y){let{type:k,dp:z,opts:M}=this;return new W({type:k,dp:z,opts:M,date:y,body:this})}_generateCells(){_t.getDatesFunction(this.type)(this.dp,(y=>{this.cells.push(this._generateCell(y))}))}show(){this.isVisible=!0,this.$el.classList.remove("-hidden-")}hide(){this.isVisible=!1,this.$el.classList.add("-hidden-")}destroyCells(){this.cells.forEach((y=>y.destroy())),this.cells=[],this.$cells.innerHTML=""}destroy(){this.destroyCells(),this.dp.off(t.eventChangeViewDate,this.onChangeViewDate),this.dp.off(t.eventChangeCurrentView,this.onChangeCurrentView)}static getDaysDates(y,k){let{viewDate:z,opts:{fixedHeight:M},locale:{firstDay:q}}=y,A=l(z),{year:P,month:U}=d(z),Y=new Date(P,U,1),rt=new Date(P,U,A),et=Y.getDay()-q,it=6-rt.getDay()+q;et=et<0?et+7:et,it=it>6?it-7:it;let fe=(function(Vi,Qp){let{year:wc,month:C_,date:S_}=d(Vi);return new Date(wc,C_,S_-Qp)})(Y,et),Rr=A+et+it,dr=fe.getDate(),{year:en,month:Hs}=d(fe),Fi=0;M&&(Rr=42);let Bi=[];for(;Fi<Rr;){let Vi=new Date(en,Hs,dr+Fi);k&&k(Vi),Bi.push(Vi),Fi++}return Bi}static getMonthsDates(y,k){let{year:z}=y.parsedViewDate,M=0,q=[];for(;M<12;){let A=new Date(z,M);q.push(A),k&&k(A),M++}return q}static getYearsDates(y,k){let z=f(y.viewDate),M=z[0]-1,q=z[1]+1,A=M,P=[];for(;A<=q;){let U=new Date(A,0);P.push(U),k&&k(U),A++}return P}static getDatesFunction(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t.days;return{[t.days]:_t.getDaysDates,[t.months]:_t.getMonthsDates,[t.years]:_t.getYearsDates}[y]}}function Nt(R,y,k){return(y=(function(z){var M=(function(q,A){if(typeof q!="object"||q===null)return q;var P=q[Symbol.toPrimitive];if(P!==void 0){var U=P.call(q,"string");if(typeof U!="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(z);return typeof M=="symbol"?M:String(M)})(y))in R?Object.defineProperty(R,y,{value:k,enumerable:!0,configurable:!0,writable:!0}):R[y]=k,R}class ze{constructor(y){let{dp:k,opts:z}=y;Nt(this,"onClickNav",(M=>{let q=N(M.target,".air-datepicker-nav--action");if(!q)return;let A=q.dataset.action;this.dp[A]()})),Nt(this,"onChangeViewDate",(()=>{this.render(),this._resetNavStatus(),this.handleNavStatus()})),Nt(this,"onChangeCurrentView",(()=>{this.render(),this._resetNavStatus(),this.handleNavStatus()})),Nt(this,"onClickNavTitle",(()=>{this.dp.isFinalView||this.dp.up()})),Nt(this,"update",(()=>{let{prevHtml:M,nextHtml:q}=this.opts;this.$prev.innerHTML=M,this.$next.innerHTML=q,this._resetNavStatus(),this.render(),this.handleNavStatus()})),Nt(this,"renderDelay",(()=>{setTimeout(this.render)})),Nt(this,"render",(()=>{this.$title.innerHTML=this._getTitle(),(function(M,q){for(let A in q)q[A]?M.classList.add(A):M.classList.remove(A)})(this.$title,{"-disabled-":this.dp.isFinalView})})),this.dp=k,this.opts=z,this.init()}init(){this._createElement(),this._buildBaseHtml(),this._defineDOM(),this.render(),this.handleNavStatus(),this._bindEvents(),this._bindDatepickerEvents()}_defineDOM(){this.$title=n(".air-datepicker-nav--title",this.$el),this.$prev=n('[data-action="prev"]',this.$el),this.$next=n('[data-action="next"]',this.$el)}_bindEvents(){this.$el.addEventListener("click",this.onClickNav),this.$title.addEventListener("click",this.onClickNavTitle)}_bindDatepickerEvents(){this.dp.on(t.eventChangeViewDate,this.onChangeViewDate),this.dp.on(t.eventChangeCurrentView,this.onChangeCurrentView),this.isNavIsFunction&&(this.dp.on(t.eventChangeSelectedDate,this.renderDelay),this.dp.opts.timepicker&&this.dp.on(t.eventChangeTime,this.render))}destroy(){this.dp.off(t.eventChangeViewDate,this.onChangeViewDate),this.dp.off(t.eventChangeCurrentView,this.onChangeCurrentView),this.isNavIsFunction&&(this.dp.off(t.eventChangeSelectedDate,this.renderDelay),this.dp.opts.timepicker&&this.dp.off(t.eventChangeTime,this.render))}_createElement(){this.$el=a({tagName:"nav",className:"air-datepicker-nav"})}_getTitle(){let{dp:y,opts:k}=this,z=k.navTitles[y.currentView];return typeof z=="function"?z(y):y.formatDate(y.viewDate,z)}handleNavStatus(){let{disableNavWhenOutOfRange:y}=this.opts,{minDate:k,maxDate:z}=this.dp;if(!k&&!z||!y)return;let{year:M,month:q}=this.dp.parsedViewDate,A=!!k&&d(k),P=!!z&&d(z);switch(this.dp.currentView){case t.days:k&&A.month>=q&&A.year>=M&&this._disableNav("prev"),z&&P.month<=q&&P.year<=M&&this._disableNav("next");break;case t.months:k&&A.year>=M&&this._disableNav("prev"),z&&P.year<=M&&this._disableNav("next");break;case t.years:{let U=f(this.dp.viewDate);k&&A.year>=U[0]&&this._disableNav("prev"),z&&P.year<=U[1]&&this._disableNav("next");break}}}_disableNav(y){n('[data-action="'+y+'"]',this.$el).classList.add("-disabled-")}_resetNavStatus(){(function(y){for(var k=arguments.length,z=new Array(k>1?k-1:0),M=1;M<k;M++)z[M-1]=arguments[M];y.length?y.forEach((q=>{q.classList.remove(...z)})):y.classList.remove(...z)})(this.$el.querySelectorAll(".air-datepicker-nav--action"),"-disabled-")}_buildBaseHtml(){let{prevHtml:y,nextHtml:k}=this.opts;this.$el.innerHTML=`<div class="air-datepicker-nav--action" data-action="prev">${y}</div><div class="air-datepicker-nav--title"></div><div class="air-datepicker-nav--action" data-action="next">${k}</div>`}get isNavIsFunction(){let{navTitles:y}=this.opts;return Object.keys(y).find((k=>typeof y[k]=="function"))}}var We={today:{content:R=>R.locale.today,onClick:R=>R.setViewDate(new Date)},clear:{content:R=>R.locale.clear,onClick:R=>R.clear()}};class cr{constructor(y){let{dp:k,opts:z}=y;this.dp=k,this.opts=z,this.init()}init(){this.createElement(),this.render()}createElement(){this.$el=a({className:"air-datepicker-buttons"})}destroy(){this.$el.parentNode.removeChild(this.$el)}clearHtml(){return this.$el.innerHTML="",this}generateButtons(){let{buttons:y}=this.opts;Array.isArray(y)||(y=[y]),y.forEach((k=>{let z=k;typeof k=="string"&&We[k]&&(z=We[k]);let M=this.createButton(z);z.onClick&&this.attachEventToButton(M,z.onClick),this.$el.appendChild(M)}))}attachEventToButton(y,k){y.addEventListener("click",(()=>{k(this.dp)}))}createButton(y){let{content:k,className:z,tagName:M="button",attrs:q={}}=y;return a({tagName:M,innerHtml:`<span tabindex='-1'>${typeof k=="function"?k(this.dp):k}</span>`,className:b("air-datepicker-button",z),attrs:q})}render(){this.generateButtons()}}function $e(R,y,k){return(y=(function(z){var M=(function(q,A){if(typeof q!="object"||q===null)return q;var P=q[Symbol.toPrimitive];if(P!==void 0){var U=P.call(q,"string");if(typeof U!="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(z);return typeof M=="symbol"?M:String(M)})(y))in R?Object.defineProperty(R,y,{value:k,enumerable:!0,configurable:!0,writable:!0}):R[y]=k,R}class Ke{constructor(){let{opts:y,dp:k}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};$e(this,"toggleTimepickerIsActive",(M=>{this.dp.timepickerIsActive=M})),$e(this,"onChangeSelectedDate",(M=>{let{date:q,updateTime:A=!1}=M;q&&(this.setMinMaxTime(q),this.setCurrentTime(!!A&&q),this.addTimeToDate(q))})),$e(this,"onChangeLastSelectedDate",(M=>{M&&(this.setTime(M),this.render())})),$e(this,"onChangeInputRange",(M=>{let q=M.target;this[q.getAttribute("name")]=q.value,this.updateText(),this.dp.trigger(t.eventChangeTime,{hours:this.hours,minutes:this.minutes})})),$e(this,"onMouseEnterLeave",(M=>{let q=M.target.getAttribute("name"),A=this.$minutesText;q==="hours"&&(A=this.$hoursText),A.classList.toggle("-focus-")})),$e(this,"onFocus",(()=>{this.toggleTimepickerIsActive(!0)})),$e(this,"onBlur",(()=>{this.toggleTimepickerIsActive(!1)})),this.opts=y,this.dp=k;let{timeFormat:z}=this.dp.locale;z&&(z.match(T("h"))||z.match(T("hh")))&&(this.ampm=!0),this.init()}init(){this.setTime(this.dp.lastSelectedDate||this.dp.viewDate),this.createElement(),this.buildHtml(),this.defineDOM(),this.render(),this.bindDatepickerEvents(),this.bindDOMEvents()}bindDatepickerEvents(){this.dp.on(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.on(t.eventChangeLastSelectedDate,this.onChangeLastSelectedDate)}bindDOMEvents(){let y="input";navigator.userAgent.match(/trident/gi)&&(y="change"),$(this.$ranges,y,this.onChangeInputRange),$(this.$ranges,"mouseenter",this.onMouseEnterLeave),$(this.$ranges,"mouseleave",this.onMouseEnterLeave),$(this.$ranges,"focus",this.onFocus),$(this.$ranges,"mousedown",this.onFocus),$(this.$ranges,"blur",this.onBlur)}createElement(){this.$el=a({className:b("air-datepicker-time",{"-am-pm-":this.dp.ampm})})}destroy(){this.dp.off(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.off(t.eventChangeLastSelectedDate,this.onChangeLastSelectedDate),this.$el.parentNode.removeChild(this.$el)}buildHtml(){let{ampm:y,hours:k,displayHours:z,minutes:M,minHours:q,minMinutes:A,maxHours:P,maxMinutes:U,dayPeriod:Y,opts:{hoursStep:rt,minutesStep:et}}=this;this.$el.innerHTML=`<div class="air-datepicker-time--current"> <span class="air-datepicker-time--current-hours">${m(z)}</span> <span class="air-datepicker-time--current-colon">:</span> <span class="air-datepicker-time--current-minutes">${m(M)}</span> `+(y?`<span class='air-datepicker-time--current-ampm'>${Y}</span>`:"")+`</div><div class="air-datepicker-time--sliders"> <div class="air-datepicker-time--row"> <input type="range" name="hours" value="${k}" min="${q}" max="${P}" step="${rt}"/> </div> <div class="air-datepicker-time--row"> <input type="range" name="minutes" value="${M}" min="${A}" max="${U}" step="${et}"/> </div></div>`}defineDOM(){let y=k=>n(k,this.$el);this.$ranges=this.$el.querySelectorAll('[type="range"]'),this.$hours=y('[name="hours"]'),this.$minutes=y('[name="minutes"]'),this.$hoursText=y(".air-datepicker-time--current-hours"),this.$minutesText=y(".air-datepicker-time--current-minutes"),this.$ampm=y(".air-datepicker-time--current-ampm")}setTime(y){this.setMinMaxTime(y),this.setCurrentTime(y)}addTimeToDate(y){y&&(y.setHours(this.hours),y.setMinutes(this.minutes))}setMinMaxTime(y){if(this.setMinMaxTimeFromOptions(),y){let{minDate:k,maxDate:z}=this.dp;k&&g(y,k)&&this.setMinTimeFromMinDate(k),z&&g(y,z)&&this.setMaxTimeFromMaxDate(z)}}setCurrentTime(y){let{hours:k,minutes:z}=y?d(y):this;this.hours=G(k,this.minHours,this.maxHours),this.minutes=G(z,this.minMinutes,this.maxMinutes)}setMinMaxTimeFromOptions(){let{minHours:y,minMinutes:k,maxHours:z,maxMinutes:M}=this.opts;this.minHours=G(y,0,23),this.minMinutes=G(k,0,59),this.maxHours=G(z,0,23),this.maxMinutes=G(M,0,59)}setMinTimeFromMinDate(y){let{lastSelectedDate:k}=this.dp;this.minHours=y.getHours(),k&&k.getHours()>y.getHours()?this.minMinutes=this.opts.minMinutes:this.minMinutes=y.getMinutes()}setMaxTimeFromMaxDate(y){let{lastSelectedDate:k}=this.dp;this.maxHours=y.getHours(),k&&k.getHours()<y.getHours()?this.maxMinutes=this.opts.maxMinutes:this.maxMinutes=y.getMinutes()}updateSliders(){s(this.$hours,{min:this.minHours,max:this.maxHours}).value=this.hours,s(this.$minutes,{min:this.minMinutes,max:this.maxMinutes}).value=this.minutes}updateText(){this.$hoursText.innerHTML=m(this.displayHours),this.$minutesText.innerHTML=m(this.minutes),this.ampm&&(this.$ampm.innerHTML=this.dayPeriod)}set hours(y){this._hours=y;let{hours:k,dayPeriod:z}=h(y);this.displayHours=this.ampm?k:y,this.dayPeriod=z}get hours(){return this._hours}render(){this.updateSliders(),this.updateText()}}function we(R,y,k){return(y=(function(z){var M=(function(q,A){if(typeof q!="object"||q===null)return q;var P=q[Symbol.toPrimitive];if(P!==void 0){var U=P.call(q,"string");if(typeof U!="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(z);return typeof M=="symbol"?M:String(M)})(y))in R?Object.defineProperty(R,y,{value:k,enumerable:!0,configurable:!0,writable:!0}):R[y]=k,R}class ti{constructor(y){let{dp:k,opts:z}=y;we(this,"pressedKeys",new Set),we(this,"hotKeys",new Map([[[["Control","ArrowRight"],["Control","ArrowUp"]],M=>M.month++],[[["Control","ArrowLeft"],["Control","ArrowDown"]],M=>M.month--],[[["Shift","ArrowRight"],["Shift","ArrowUp"]],M=>M.year++],[[["Shift","ArrowLeft"],["Shift","ArrowDown"]],M=>M.year--],[[["Alt","ArrowRight"],["Alt","ArrowUp"]],M=>M.year+=10],[[["Alt","ArrowLeft"],["Alt","ArrowDown"]],M=>M.year-=10],[["Control","Shift","ArrowUp"],(M,q)=>q.up()]])),we(this,"handleHotKey",(M=>{let q=this.hotKeys.get(M),A=d(this.getInitialFocusDate());q(A,this.dp);let{year:P,month:U,date:Y}=A,rt=l(new Date(P,U));rt<Y&&(Y=rt);let et=this.dp.getClampedDate(new Date(P,U,Y));this.dp.setFocusDate(et,{viewDateTransition:!0})})),we(this,"isHotKeyPressed",(()=>{let M=!1,q=this.pressedKeys.size,A=P=>this.pressedKeys.has(P);for(let[P]of this.hotKeys){if(M)break;if(Array.isArray(P[0]))P.forEach((U=>{M||q!==U.length||(M=U.every(A)&&P)}));else{if(q!==P.length)continue;M=P.every(A)&&P}}return M})),we(this,"isArrow",(M=>M>=37&&M<=40)),we(this,"onKeyDown",(M=>{if(!this.dp.visible&&!this.dp.treatAsInline)return;let{key:q,which:A}=M,{dp:P,dp:{focusDate:U},opts:Y}=this;this.registerKey(q);let rt=this.isHotKeyPressed();if(rt)return M.preventDefault(),void this.handleHotKey(rt);if(this.isArrow(A))return M.preventDefault(),void this.focusNextCell(q);if(q==="Enter"){if(P.currentView!==Y.minView)return void P.down();if(U){let et=P._checkIfDateIsSelected(U);return void(et?P._handleAlreadySelectedDates(et,U):P.selectDate(U))}}q==="Escape"&&this.dp.hide()})),we(this,"onKeyUp",(M=>{this.removeKey(M.key)})),this.dp=k,this.opts=z,this.init()}init(){this.bindKeyboardEvents()}bindKeyboardEvents(){let{$el:y}=this.dp;y.addEventListener("keydown",this.onKeyDown),y.addEventListener("keyup",this.onKeyUp)}destroy(){let{$el:y}=this.dp;y.removeEventListener("keydown",this.onKeyDown),y.removeEventListener("keyup",this.onKeyUp),this.hotKeys=null,this.pressedKeys=null}getInitialFocusDate(){let{focusDate:y,currentView:k,selectedDates:z,parsedViewDate:{year:M,month:q}}=this.dp,A=y||z[z.length-1];if(!A)switch(k){case t.days:A=new Date(M,q,new Date().getDate());break;case t.months:A=new Date(M,q,1);break;case t.years:A=new Date(M,0,1)}return A}focusNextCell(y){let k=this.getInitialFocusDate(),{currentView:z}=this.dp,{days:M,months:q,years:A}=t,P=d(k),U=P.year,Y=P.month,rt=P.date;switch(y){case"ArrowLeft":z===M&&(rt-=1),z===q&&(Y-=1),z===A&&(U-=1);break;case"ArrowUp":z===M&&(rt-=7),z===q&&(Y-=3),z===A&&(U-=4);break;case"ArrowRight":z===M&&(rt+=1),z===q&&(Y+=1),z===A&&(U+=1);break;case"ArrowDown":z===M&&(rt+=7),z===q&&(Y+=3),z===A&&(U+=4)}let et=this.dp.getClampedDate(new Date(U,Y,rt));this.dp.setFocusDate(et,{viewDateTransition:!0})}registerKey(y){this.pressedKeys.add(y)}removeKey(y){this.pressedKeys.delete(y)}}let $a={on(R,y){this.__events||(this.__events={}),this.__events[R]?this.__events[R].push(y):this.__events[R]=[y]},off(R,y){this.__events&&this.__events[R]&&(this.__events[R]=this.__events[R].filter((k=>k!==y)))},removeAllEvents(){this.__events={}},trigger(R){for(var y=arguments.length,k=new Array(y>1?y-1:0),z=1;z<y;z++)k[z-1]=arguments[z];this.__events&&this.__events[R]&&this.__events[R].forEach((M=>{M(...k)}))}};function ut(R,y,k){return(y=(function(z){var M=(function(q,A){if(typeof q!="object"||q===null)return q;var P=q[Symbol.toPrimitive];if(P!==void 0){var U=P.call(q,"string");if(typeof U!="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(z);return typeof M=="symbol"?M:String(M)})(y))in R?Object.defineProperty(R,y,{value:k,enumerable:!0,configurable:!0,writable:!0}):R[y]=k,R}let qo="",Mo="",pt=!1;class nt{static buildGlobalContainer(y){pt=!0,qo=a({className:y,id:y}),n("body").appendChild(qo)}constructor(y,k){var z=this;if(ut(this,"viewIndexes",[t.days,t.months,t.years]),ut(this,"next",(()=>{let{year:A,month:P}=this.parsedViewDate;switch(this.currentView){case t.days:this.setViewDate(new Date(A,P+1,1));break;case t.months:this.setViewDate(new Date(A+1,P,1));break;case t.years:this.setViewDate(new Date(A+10,0,1))}})),ut(this,"prev",(()=>{let{year:A,month:P}=this.parsedViewDate;switch(this.currentView){case t.days:this.setViewDate(new Date(A,P-1,1));break;case t.months:this.setViewDate(new Date(A-1,P,1));break;case t.years:this.setViewDate(new Date(A-10,0,1))}})),ut(this,"_finishHide",(()=>{this.hideAnimation=!1,this._destroyComponents(),this.$container.removeChild(this.$datepicker)})),ut(this,"setPosition",(function(A){let P=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(typeof(A=A||z.opts.position)=="function")return void(z.customHide=A({$datepicker:z.$datepicker,$target:z.$el,$pointer:z.$pointer,isViewChange:P,done:z._finishHide}));let U,Y,{isMobile:rt}=z.opts,et=z.$el.getBoundingClientRect(),it=z.$el.getBoundingClientRect(),fe=z.$datepicker.offsetParent,Rr=z.$el.offsetParent,dr=z.$datepicker.getBoundingClientRect(),en=A.split(" "),Hs=window.scrollY,Fi=window.scrollX,Bi=z.opts.offset,Vi=en[0],Qp=en[1];if(rt)z.$datepicker.style.cssText="left: 50%; top: 50%";else{if(fe===Rr&&fe!==document.body&&(it={top:z.$el.offsetTop,left:z.$el.offsetLeft,width:et.width,height:z.$el.offsetHeight},Hs=0,Fi=0),fe!==Rr&&fe!==document.body){let wc=fe.getBoundingClientRect();it={top:et.top-wc.top,left:et.left-wc.left,width:et.width,height:et.height},Hs=0,Fi=0}switch(Vi){case"top":U=it.top-dr.height-Bi;break;case"right":Y=it.left+it.width+Bi;break;case"bottom":U=it.top+it.height+Bi;break;case"left":Y=it.left-dr.width-Bi}switch(Qp){case"top":U=it.top;break;case"right":Y=it.left+it.width-dr.width;break;case"bottom":U=it.top+it.height-dr.height;break;case"left":Y=it.left;break;case"center":/left|right/.test(Vi)?U=it.top+it.height/2-dr.height/2:Y=it.left+it.width/2-dr.width/2}z.$datepicker.style.cssText=`left: ${Y+Fi}px; top: ${U+Hs}px`}})),ut(this,"_setInputValue",(()=>{let{opts:A,$altField:P,locale:{dateFormat:U}}=this,{altFieldDateFormat:Y,altField:rt}=A;rt&&P&&(P.value=this._getInputValue(Y)),this.$el.value=this._getInputValue(U),this.$el.dispatchEvent(new Event("change"))})),ut(this,"_getInputValue",(A=>{let{selectedDates:P,opts:U}=this,{multipleDates:Y,multipleDatesSeparator:rt}=U;if(!P.length)return"";let et=typeof A=="function",it=et?A(Y?P:P[0]):P.map((fe=>this.formatDate(fe,A)));return it=et?it:it.join(rt),it})),ut(this,"_checkIfDateIsSelected",(function(A){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.days,U=!1;return z.selectedDates.some((Y=>{let rt=g(A,Y,P);return U=rt&&Y,rt})),U})),ut(this,"_scheduleCallAfterTransition",(A=>{this._cancelScheduledCall(),A&&A(!1),this._onTransitionEnd=()=>{A&&A(!0)},this.$datepicker.addEventListener("transitionend",this._onTransitionEnd,{once:!0})})),ut(this,"_cancelScheduledCall",(()=>{this.$datepicker.removeEventListener("transitionend",this._onTransitionEnd)})),ut(this,"setViewDate",(A=>{if(!((A=w(A))instanceof Date)||g(A,this.viewDate))return;let P=this.viewDate;this.viewDate=A;let{onChangeViewDate:U}=this.opts;if(U){let{month:Y,year:rt}=this.parsedViewDate;U({month:Y,year:rt,decade:this.curDecade})}this.trigger(t.eventChangeViewDate,A,P)})),ut(this,"setFocusDate",(function(A){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(!A||(A=w(A))instanceof Date)&&(z.focusDate=A,z.trigger(t.eventChangeFocusDate,A,P))})),ut(this,"setCurrentView",(function(A){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(z.viewIndexes.includes(A)){if(z.currentView=A,z.elIsInput&&z.visible&&z.setPosition(void 0,!0),z.trigger(t.eventChangeCurrentView,A),!z.views[A]){let U=z.views[A]=new _t({dp:z,opts:z.opts,type:A});z.shouldUpdateDOM&&z.$content.appendChild(U.$el)}z.opts.onChangeView&&!P.silent&&z.opts.onChangeView(A)}})),ut(this,"_updateLastSelectedDate",(A=>{this.lastSelectedDate=A,this.trigger(t.eventChangeLastSelectedDate,A)})),ut(this,"destroy",(()=>{if(this.isDestroyed)return;let{showEvent:A,isMobile:P}=this.opts,U=this.$datepicker.parentNode;U&&U.removeChild(this.$datepicker),this.$el.removeEventListener(A,this._onFocus),this.$el.removeEventListener("blur",this._onBlur),window.removeEventListener("resize",this._onResize),P&&this._removeMobileAttributes(),this.keyboardNav&&this.keyboardNav.destroy(),this.views=null,this.nav=null,this.$datepicker=null,this.opts={},this.$customContainer=null,this.viewDate=null,this.focusDate=null,this.selectedDates=[],this.rangeDateFrom=null,this.rangeDateTo=null,this.isDestroyed=!0})),ut(this,"update",(function(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},U=I({},z.opts),{silent:Y}=P;I(z.opts,A);let{timepicker:rt,buttons:et,range:it,selectedDates:fe,isMobile:Rr}=z.opts,dr=z.visible||z.treatAsInline;z._createMinMaxDates(),z._limitViewDateByMaxMinDates(),z._handleLocale(),fe&&(z.selectedDates=[],z.selectDate(fe,{silent:Y})),A.view&&z.setCurrentView(A.view,{silent:Y}),z._setInputValue(),U.range&&!it?(z.rangeDateTo=!1,z.rangeDateFrom=!1):!U.range&&it&&z.selectedDates.length&&(z.rangeDateFrom=z.selectedDates[0],z.rangeDateTo=z.selectedDates[1]),U.timepicker&&!rt?(dr&&z.timepicker.destroy(),z.timepicker=!1,z.$timepicker.parentNode.removeChild(z.$timepicker)):!U.timepicker&&rt&&z._addTimepicker(),!U.buttons&&et?z._addButtons():U.buttons&&!et?(z.buttons.destroy(),z.$buttons.parentNode.removeChild(z.$buttons)):dr&&U.buttons&&et&&z.buttons.clearHtml().render(),!U.isMobile&&Rr?(z.treatAsInline||Mo||z._createMobileOverlay(),z._addMobileAttributes(),z.visible&&z._showMobileOverlay()):U.isMobile&&!Rr&&(z._removeMobileAttributes(),z.visible&&(Mo.classList.remove("-active-"),typeof z.opts.position!="function"&&z.setPosition())),dr&&(z.nav.update(),z.views[z.currentView].render(),z.currentView===t.days&&z.views[z.currentView].renderDayNames())})),ut(this,"disableDate",((A,P)=>{(Array.isArray(A)?A:[A]).forEach((U=>{let Y=w(U);if(!Y)return;let rt=P?"delete":"add";this.disabledDates[rt](this.formatDate(Y,"yyyy-MM-dd"));let et=this.getCell(Y,this.currentViewSingular);et&&et.adpCell.render()}),[])})),ut(this,"enableDate",(A=>{this.disableDate(A,!0)})),ut(this,"isDateDisabled",(A=>{let P=w(A);return this.disabledDates.has(this.formatDate(P,"yyyy-MM-dd"))})),ut(this,"isOtherMonth",(A=>{let{month:P}=d(A);return P!==this.parsedViewDate.month})),ut(this,"isOtherYear",(A=>{let{year:P}=d(A);return P!==this.parsedViewDate.year})),ut(this,"isOtherDecade",(A=>{let{year:P}=d(A),[U,Y]=f(this.viewDate);return P<U||P>Y})),ut(this,"_onChangeSelectedDate",(A=>{let{silent:P}=A;setTimeout((()=>{this._setInputValue(),this.opts.onSelect&&!P&&this._triggerOnSelect()}))})),ut(this,"_onChangeFocusedDate",(function(A){let{viewDateTransition:P}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!A)return;let U=!1;P&&(U=z.isOtherMonth(A)||z.isOtherYear(A)||z.isOtherDecade(A)),U&&z.setViewDate(A),z.opts.onFocus&&z.opts.onFocus({datepicker:z,date:A})})),ut(this,"_onChangeTime",(A=>{let{hours:P,minutes:U}=A,Y=new Date,{lastSelectedDate:rt,opts:{onSelect:et}}=this,it=rt;rt||(it=Y);let fe=this.getCell(it,this.currentViewSingular),Rr=fe&&fe.adpCell;Rr&&Rr.isDisabled||(it.setHours(P),it.setMinutes(U),rt?(this._setInputValue(),et&&this._triggerOnSelect()):this.selectDate(it))})),ut(this,"_onFocus",(A=>{this.visible||this.show()})),ut(this,"_onBlur",(A=>{this.inFocus||!this.visible||this.opts.isMobile||this.hide()})),ut(this,"_onMouseDown",(A=>{this.inFocus=!0})),ut(this,"_onMouseUp",(A=>{this.inFocus=!1,this.$el.focus()})),ut(this,"_onResize",(()=>{this.visible&&typeof this.opts.position!="function"&&this.setPosition()})),ut(this,"_onClickOverlay",(()=>{this.visible&&this.hide()})),ut(this,"getViewDates",(function(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t.days;return _t.getDatesFunction(A)(z)})),ut(this,"isWeekend",(A=>this.opts.weekends.includes(A))),ut(this,"getClampedDate",(A=>{let{minDate:P,maxDate:U}=this,Y=A;return U&&v(A,U)?Y=U:P&&x(A,P)&&(Y=P),Y})),this.$el=n(y),!this.$el)return;this.$datepicker=a({className:"air-datepicker"}),this.opts=I({},r,k),this.$customContainer=!!this.opts.container&&n(this.opts.container),this.$altField=n(this.opts.altField||!1);let{view:M,startDate:q}=this.opts;q||(this.opts.startDate=new Date),this.$el.nodeName==="INPUT"&&(this.elIsInput=!0),this.inited=!1,this.visible=!1,this.viewDate=w(this.opts.startDate),this.focusDate=!1,this.initialReadonly=this.$el.getAttribute("readonly"),this.customHide=!1,this.currentView=M,this.selectedDates=[],this.disabledDates=new Set,this.isDestroyed=!1,this.views={},this.keys=[],this.rangeDateFrom="",this.rangeDateTo="",this.timepickerIsActive=!1,this.treatAsInline=this.opts.inline||!this.elIsInput,this.init()}init(){let{opts:y,treatAsInline:k,opts:{inline:z,isMobile:M,selectedDates:q,keyboardNav:A,onlyTimepicker:P}}=this,U=n("body");(!pt||pt&&qo&&!U.contains(qo))&&!z&&this.elIsInput&&!this.$customContainer&&nt.buildGlobalContainer(nt.defaultGlobalContainerId),!M||Mo||k||this._createMobileOverlay(),this._handleLocale(),this._bindSubEvents(),this._createMinMaxDates(),this._limitViewDateByMaxMinDates(),this.elIsInput&&(z||this._bindEvents(),A&&!P&&(this.keyboardNav=new ti({dp:this,opts:y}))),q&&this.selectDate(q,{silent:!0}),this.opts.visible&&!k&&this.show(),M&&!k&&this.$el.setAttribute("readonly",!0),k&&this._createComponents()}_createMobileOverlay(){Mo=a({className:"air-datepicker-overlay"}),qo.appendChild(Mo)}_createComponents(){let{opts:y,treatAsInline:k,opts:{inline:z,buttons:M,timepicker:q,position:A,classes:P,onlyTimepicker:U,isMobile:Y}}=this;this._buildBaseHtml(),this.elIsInput&&(z||this._setPositionClasses(A)),!z&&this.elIsInput||this.$datepicker.classList.add("-inline-"),P&&this.$datepicker.classList.add(...P.split(" ")),U&&this.$datepicker.classList.add("-only-timepicker-"),Y&&!k&&this._addMobileAttributes(),this.views[this.currentView]=new _t({dp:this,type:this.currentView,opts:y}),this.nav=new ze({dp:this,opts:y}),q&&this._addTimepicker(),M&&this._addButtons(),this.$content.appendChild(this.views[this.currentView].$el),this.$nav.appendChild(this.nav.$el)}_destroyComponents(){for(let y in this.views)this.views[y].destroy();this.views={},this.nav.destroy(),this.timepicker&&this.timepicker.destroy()}_addMobileAttributes(){Mo.addEventListener("click",this._onClickOverlay),this.$datepicker.classList.add("-is-mobile-"),this.$el.setAttribute("readonly",!0)}_removeMobileAttributes(){Mo.removeEventListener("click",this._onClickOverlay),this.$datepicker.classList.remove("-is-mobile-"),this.initialReadonly||this.initialReadonly===""||this.$el.removeAttribute("readonly")}_createMinMaxDates(){let{minDate:y,maxDate:k}=this.opts;this.minDate=!!y&&w(y),this.maxDate=!!k&&w(k)}_addTimepicker(){this.$timepicker=a({className:"air-datepicker--time"}),this.$datepicker.appendChild(this.$timepicker),this.timepicker=new Ke({dp:this,opts:this.opts}),this.$timepicker.appendChild(this.timepicker.$el)}_addButtons(){this.$buttons=a({className:"air-datepicker--buttons"}),this.$datepicker.appendChild(this.$buttons),this.buttons=new cr({dp:this,opts:this.opts}),this.$buttons.appendChild(this.buttons.$el)}_bindSubEvents(){this.on(t.eventChangeSelectedDate,this._onChangeSelectedDate),this.on(t.eventChangeFocusDate,this._onChangeFocusedDate),this.on(t.eventChangeTime,this._onChangeTime)}_buildBaseHtml(){let{inline:y}=this.opts;var k,z;this.elIsInput?y?(k=this.$datepicker,(z=this.$el).parentNode.insertBefore(k,z.nextSibling)):this.$container.appendChild(this.$datepicker):this.$el.appendChild(this.$datepicker),this.$datepicker.innerHTML='<i class="air-datepicker--pointer"></i><div class="air-datepicker--navigation"></div><div class="air-datepicker--content"></div>',this.$content=n(".air-datepicker--content",this.$datepicker),this.$pointer=n(".air-datepicker--pointer",this.$datepicker),this.$nav=n(".air-datepicker--navigation",this.$datepicker)}_handleLocale(){let{locale:y,dateFormat:k,firstDay:z,timepicker:M,onlyTimepicker:q,timeFormat:A,dateTimeSeparator:P}=this.opts;var U;this.locale=(U=y,JSON.parse(JSON.stringify(U))),k&&(this.locale.dateFormat=k),A!==void 0&&A!==""&&(this.locale.timeFormat=A);let{timeFormat:Y}=this.locale;if(z!==""&&(this.locale.firstDay=z),M&&typeof k!="function"){let rt=Y?P:"";this.locale.dateFormat=[this.locale.dateFormat,Y||""].join(rt)}q&&typeof k!="function"&&(this.locale.dateFormat=this.locale.timeFormat)}_setPositionClasses(y){if(typeof y=="function")return void this.$datepicker.classList.add("-custom-position-");let k=(y=y.split(" "))[0],z=`air-datepicker -${k}-${y[1]}- -from-${k}-`;this.$datepicker.classList.add(...z.split(" "))}_bindEvents(){this.$el.addEventListener(this.opts.showEvent,this._onFocus),this.$el.addEventListener("blur",this._onBlur),this.$datepicker.addEventListener("mousedown",this._onMouseDown),this.$datepicker.addEventListener("mouseup",this._onMouseUp),window.addEventListener("resize",this._onResize)}_limitViewDateByMaxMinDates(){let{viewDate:y,minDate:k,maxDate:z}=this;z&&v(y,z)&&this.setViewDate(z),k&&x(y,k)&&this.setViewDate(k)}formatDate(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.viewDate,k=arguments.length>1?arguments[1]:void 0;if(y=w(y),!(y instanceof Date))return;let z=k,M=this.locale,q=d(y),A=q.dayPeriod,P=f(y),U=nt.replacer,Y={T:y.getTime(),m:q.minutes,mm:q.fullMinutes,h:q.hours12,hh:q.fullHours12,H:q.hours,HH:q.fullHours,aa:A,AA:A.toUpperCase(),E:M.daysShort[q.day],EEEE:M.days[q.day],d:q.date,dd:q.fullDate,M:q.month+1,MM:q.fullMonth,MMM:M.monthsShort[q.month],MMMM:M.months[q.month],yy:q.year.toString().slice(-2),yyyy:q.year,yyyy1:P[0],yyyy2:P[1]};for(let[rt,et]of Object.entries(Y))z=U(z,T(rt),et);return z}down(y){this._handleUpDownActions(y,"down")}up(y){this._handleUpDownActions(y,"up")}selectDate(y){let k,z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{currentView:M,parsedViewDate:q,selectedDates:A}=this,{updateTime:P,silent:U}=z,{moveToOtherMonthsOnSelect:Y,moveToOtherYearsOnSelect:rt,multipleDates:et,range:it,autoClose:fe,onBeforeSelect:Rr}=this.opts,dr=A.length;if(Array.isArray(y))return y.forEach((en=>{this.selectDate(en,z)})),new Promise((en=>{setTimeout(en)}));if((y=w(y))instanceof Date){if(Rr&&!U&&!Rr({date:y,datepicker:this}))return Promise.resolve();if(M===t.days&&y.getMonth()!==q.month&&Y&&(k=new Date(y.getFullYear(),y.getMonth(),1)),M===t.years&&y.getFullYear()!==q.year&&rt&&(k=new Date(y.getFullYear(),0,1)),k&&this.setViewDate(k),et&&!it){if(dr===et)return;this._checkIfDateIsSelected(y)||A.push(y)}else if(it)switch(dr){case 1:A.push(y),this.rangeDateTo||(this.rangeDateTo=y),v(this.rangeDateFrom,this.rangeDateTo)&&(this.rangeDateTo=this.rangeDateFrom,this.rangeDateFrom=y),this.selectedDates=[this.rangeDateFrom,this.rangeDateTo];break;case 2:this.selectedDates=[y],this.rangeDateFrom=y,this.rangeDateTo="";break;default:this.selectedDates=[y],this.rangeDateFrom=y}else this.selectedDates=[y];return this.trigger(t.eventChangeSelectedDate,{action:t.actionSelectDate,silent:z?.silent,date:y,updateTime:P}),this._updateLastSelectedDate(y),fe&&!this.timepickerIsActive&&this.visible&&(et||it?it&&dr===1&&this.hide():this.hide()),new Promise((en=>{setTimeout(en)}))}}unselectDate(y){let k=this.selectedDates,z=this;if((y=w(y))instanceof Date)return k.some(((M,q)=>{if(g(M,y))return k.splice(q,1),z.selectedDates.length?(z.rangeDateTo="",z.rangeDateFrom=k[0],z._updateLastSelectedDate(z.selectedDates[z.selectedDates.length-1])):(z.rangeDateFrom="",z.rangeDateTo="",z._updateLastSelectedDate(!1)),this.trigger(t.eventChangeSelectedDate,{action:t.actionUnselectDate,date:y}),!0}))}replaceDate(y,k){let z=this.selectedDates.find((q=>g(q,y,this.currentView))),M=this.selectedDates.indexOf(z);M<0||g(this.selectedDates[M],k,this.currentView)||(this.selectedDates[M]=k,this.trigger(t.eventChangeSelectedDate,{action:t.actionSelectDate,date:k,updateTime:!0}),this._updateLastSelectedDate(k))}clear(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.selectedDates=[],this.rangeDateFrom=!1,this.rangeDateTo=!1,this.lastSelectedDate=!1,this.trigger(t.eventChangeSelectedDate,{action:t.actionUnselectDate,silent:y.silent}),new Promise((k=>{setTimeout(k)}))}show(){let{onShow:y,isMobile:k}=this.opts;this._cancelScheduledCall(),this.visible||this.hideAnimation||this._createComponents(),this.setPosition(this.opts.position),this.$datepicker.classList.add("-active-"),this.visible=!0,y&&this._scheduleCallAfterTransition(y),k&&this._showMobileOverlay()}hide(){let{onHide:y,isMobile:k}=this.opts,z=this._hasTransition();this.visible=!1,this.hideAnimation=!0,this.$datepicker.classList.remove("-active-"),this.customHide&&this.customHide(),this.elIsInput&&this.$el.blur(),this._scheduleCallAfterTransition((M=>{!this.customHide&&(M&&z||!M&&!z)&&this._finishHide(),y&&y(M)})),k&&Mo.classList.remove("-active-")}_triggerOnSelect(){let y=[],k=[],{selectedDates:z,locale:M,opts:{onSelect:q,multipleDates:A,range:P}}=this,U=A||P,Y=typeof M.dateFormat=="function";z.length&&(y=z.map(_),k=Y?A?M.dateFormat(y):y.map((rt=>M.dateFormat(rt))):y.map((rt=>this.formatDate(rt,M.dateFormat)))),q({date:U?y:y[0],formattedDate:U?k:k[0],datepicker:this})}_handleAlreadySelectedDates(y,k){let{selectedDates:z,rangeDateFrom:M,rangeDateTo:q}=this,{range:A,toggleSelected:P}=this.opts,U=z.length,Y=typeof P=="function"?P({datepicker:this,date:k}):P,rt=!!(A&&U===1&&y),et=rt?_(k):k;A&&!Y&&(U!==2&&this.selectDate(et),U===2&&g(M,q))||(Y?this.unselectDate(et):this._updateLastSelectedDate(rt?et:y))}_handleUpDownActions(y,k){if(!((y=w(y||this.focusDate||this.viewDate))instanceof Date))return;let z=k==="up"?this.viewIndex+1:this.viewIndex-1;z>2&&(z=2),z<0&&(z=0),this.setViewDate(new Date(y.getFullYear(),y.getMonth(),1)),this.setCurrentView(this.viewIndexes[z])}getCell(y){let k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.day;if(!((y=w(y))instanceof Date))return;let{year:z,month:M,date:q}=d(y),A=`[data-year="${z}"]`,P=`[data-month="${M}"]`,U={[t.day]:`${A}${P}[data-date="${q}"]`,[t.month]:`${A}${P}`,[t.year]:`${A}`};return this.views[this.currentView]?this.views[this.currentView].$el.querySelector(U[k]):void 0}_showMobileOverlay(){Mo.classList.add("-active-")}_hasTransition(){return window.getComputedStyle(this.$datepicker).getPropertyValue("transition-duration").split(", ").reduce(((y,k)=>parseFloat(k)+y),0)>0}get shouldUpdateDOM(){return this.visible||this.treatAsInline}get parsedViewDate(){return d(this.viewDate)}get currentViewSingular(){return this.currentView.slice(0,-1)}get curDecade(){return f(this.viewDate)}get viewIndex(){return this.viewIndexes.indexOf(this.currentView)}get isFinalView(){return this.currentView===t.years}get hasSelectedDates(){return this.selectedDates.length>0}get isMinViewReached(){return this.currentView===this.opts.minView||this.currentView===t.days}get $container(){return this.$customContainer||qo}static replacer(y,k,z){return y.replace(k,(function(M,q,A,P){return q+z+P}))}}var xt;return ut(nt,"defaults",r),ut(nt,"version","3.6.0"),ut(nt,"defaultGlobalContainerId","air-datepicker-global-container"),xt=nt.prototype,Object.assign(xt,$a),o.default})()}))});var Bs=globalThis,Bf=i=>i,_c=Bs.trustedTypes,Vf=_c?_c.createPolicy("lit-html",{createHTML:i=>i}):void 0,Zp="$lit$",Tn=`lit$${Math.random().toFixed(9).slice(2)}$`,th="?"+Tn,T_=`<${th}>`,Gi=document,Vs=()=>Gi.createComment(""),Us=i=>i===null||typeof i!="object"&&typeof i!="function",eh=Array.isArray,Yf=i=>eh(i)||typeof i?.[Symbol.iterator]=="function",Jp=`[
|
|
3
3
|
\f\r]`,Fs=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Uf=/-->/g,jf=/>/g,Ui=RegExp(`>|${Jp}(?:([^\\s"'>=/]+)(${Jp}*=${Jp}*(?:[^
|
|
4
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Gf=/'/g,Wf=/"/g,Xf=/^(?:script|style|textarea|title)$/i,rh=i=>(o,...t)=>({_$litType$:i,strings:o,values:t}),u=rh(1),Io=rh(2),Qf=rh(3),ie=Symbol.for("lit-noChange"),V=Symbol.for("lit-nothing"),Kf=new WeakMap,ji=Gi.createTreeWalker(Gi,129);function Jf(i,o){if(!eh(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return Vf!==void 0?Vf.createHTML(o):o}var Zf=(i,o)=>{let t=i.length-1,r=[],n,a=o===2?"<svg>":o===3?"<math>":"",s=Fs;for(let l=0;l<t;l++){let d=i[l],h,m,f=-1,b=0;for(;b<d.length&&(s.lastIndex=b,m=s.exec(d),m!==null);)b=s.lastIndex,s===Fs?m[1]==="!--"?s=Uf:m[1]!==void 0?s=jf:m[2]!==void 0?(Xf.test(m[2])&&(n=RegExp("</"+m[2],"g")),s=Ui):m[3]!==void 0&&(s=Ui):s===Ui?m[0]===">"?(s=n??Fs,f=-1):m[1]===void 0?f=-2:(f=s.lastIndex-m[2].length,h=m[1],s=m[3]===void 0?Ui:m[3]==='"'?Wf:Gf):s===Wf||s===Gf?s=Ui:s===Uf||s===jf?s=Fs:(s=Ui,n=void 0);let g=s===Ui&&i[l+1].startsWith("/>")?" ":"";a+=s===Fs?d+T_:f>=0?(r.push(h),d.slice(0,f)+Zp+d.slice(f)+Tn+g):d+Tn+(f===-2?l:g)}return[Jf(i,a+(i[t]||"<?>")+(o===2?"</svg>":o===3?"</math>":"")),r]},js=class i{constructor({strings:o,_$litType$:t},r){let n;this.parts=[];let a=0,s=0,l=o.length-1,d=this.parts,[h,m]=Zf(o,t);if(this.el=i.createElement(h,r),ji.currentNode=this.el.content,t===2||t===3){let f=this.el.content.firstChild;f.replaceWith(...f.childNodes)}for(;(n=ji.nextNode())!==null&&d.length<l;){if(n.nodeType===1){if(n.hasAttributes())for(let f of n.getAttributeNames())if(f.endsWith(Zp)){let b=m[s++],g=n.getAttribute(f).split(Tn),v=/([.?@])?(.*)/.exec(b);d.push({type:1,index:a,name:v[2],strings:g,ctor:v[1]==="."?Cc:v[1]==="?"?Sc:v[1]==="@"?Ec:Ki}),n.removeAttribute(f)}else f.startsWith(Tn)&&(d.push({type:6,index:a}),n.removeAttribute(f));if(Xf.test(n.tagName)){let f=n.textContent.split(Tn),b=f.length-1;if(b>0){n.textContent=_c?_c.emptyScript:"";for(let g=0;g<b;g++)n.append(f[g],Vs()),ji.nextNode(),d.push({type:2,index:++a});n.append(f[b],Vs())}}}else if(n.nodeType===8)if(n.data===th)d.push({type:2,index:a});else{let f=-1;for(;(f=n.data.indexOf(Tn,f+1))!==-1;)d.push({type:7,index:a}),f+=Tn.length-1}a++}}static createElement(o,t){let r=Gi.createElement("template");return r.innerHTML=o,r}};function Wi(i,o,t=i,r){if(o===ie)return o;let n=r!==void 0?t._$Co?.[r]:t._$Cl,a=Us(o)?void 0:o._$litDirective$;return n?.constructor!==a&&(n?._$AO?.(!1),a===void 0?n=void 0:(n=new a(i),n._$AT(i,t,r)),r!==void 0?(t._$Co??(t._$Co=[]))[r]=n:t._$Cl=n),n!==void 0&&(o=Wi(i,n._$AS(i,o.values),n,r)),o}var kc=class{constructor(o,t){this._$AV=[],this._$AN=void 0,this._$AD=o,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(o){let{el:{content:t},parts:r}=this._$AD,n=(o?.creationScope??Gi).importNode(t,!0);ji.currentNode=n;let a=ji.nextNode(),s=0,l=0,d=r[0];for(;d!==void 0;){if(s===d.index){let h;d.type===2?h=new Aa(a,a.nextSibling,this,o):d.type===1?h=new d.ctor(a,d.name,d.strings,this,o):d.type===6&&(h=new Tc(a,this,o)),this._$AV.push(h),d=r[++l]}s!==d?.index&&(a=ji.nextNode(),s++)}return ji.currentNode=Gi,n}p(o){let t=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(o,r,t),t+=r.strings.length-2):r._$AI(o[t])),t++}},Aa=class i{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(o,t,r,n){this.type=2,this._$AH=V,this._$AN=void 0,this._$AA=o,this._$AB=t,this._$AM=r,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let o=this._$AA.parentNode,t=this._$AM;return t!==void 0&&o?.nodeType===11&&(o=t.parentNode),o}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(o,t=this){o=Wi(this,o,t),Us(o)?o===V||o==null||o===""?(this._$AH!==V&&this._$AR(),this._$AH=V):o!==this._$AH&&o!==ie&&this._(o):o._$litType$!==void 0?this.$(o):o.nodeType!==void 0?this.T(o):Yf(o)?this.k(o):this._(o)}O(o){return this._$AA.parentNode.insertBefore(o,this._$AB)}T(o){this._$AH!==o&&(this._$AR(),this._$AH=this.O(o))}_(o){this._$AH!==V&&Us(this._$AH)?this._$AA.nextSibling.data=o:this.T(Gi.createTextNode(o)),this._$AH=o}$(o){let{values:t,_$litType$:r}=o,n=typeof r=="number"?this._$AC(o):(r.el===void 0&&(r.el=js.createElement(Jf(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(t);else{let a=new kc(n,this),s=a.u(this.options);a.p(t),this.T(s),this._$AH=a}}_$AC(o){let t=Kf.get(o.strings);return t===void 0&&Kf.set(o.strings,t=new js(o)),t}k(o){eh(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,r,n=0;for(let a of o)n===t.length?t.push(r=new i(this.O(Vs()),this.O(Vs()),this,this.options)):r=t[n],r._$AI(a),n++;n<t.length&&(this._$AR(r&&r._$AB.nextSibling,n),t.length=n)}_$AR(o=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);o!==this._$AB;){let r=Bf(o).nextSibling;Bf(o).remove(),o=r}}setConnected(o){this._$AM===void 0&&(this._$Cv=o,this._$AP?.(o))}},Ki=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(o,t,r,n,a){this.type=1,this._$AH=V,this._$AN=void 0,this.element=o,this.name=t,this._$AM=n,this.options=a,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=V}_$AI(o,t=this,r,n){let a=this.strings,s=!1;if(a===void 0)o=Wi(this,o,t,0),s=!Us(o)||o!==this._$AH&&o!==ie,s&&(this._$AH=o);else{let l=o,d,h;for(o=a[0],d=0;d<a.length-1;d++)h=Wi(this,l[r+d],t,d),h===ie&&(h=this._$AH[d]),s||(s=!Us(h)||h!==this._$AH[d]),h===V?o=V:o!==V&&(o+=(h??"")+a[d+1]),this._$AH[d]=h}s&&!n&&this.j(o)}j(o){o===V?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,o??"")}},Cc=class extends Ki{constructor(){super(...arguments),this.type=3}j(o){this.element[this.name]=o===V?void 0:o}},Sc=class extends Ki{constructor(){super(...arguments),this.type=4}j(o){this.element.toggleAttribute(this.name,!!o&&o!==V)}},Ec=class extends Ki{constructor(o,t,r,n,a){super(o,t,r,n,a),this.type=5}_$AI(o,t=this){if((o=Wi(this,o,t,0)??V)===ie)return;let r=this._$AH,n=o===V&&r!==V||o.capture!==r.capture||o.once!==r.once||o.passive!==r.passive,a=o!==V&&(r===V||n);n&&this.element.removeEventListener(this.name,this,r),a&&this.element.addEventListener(this.name,this,o),this._$AH=o}handleEvent(o){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,o):this._$AH.handleEvent(o)}},Tc=class{constructor(o,t,r){this.element=o,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(o){Wi(this,o)}},tg={M:Zp,P:Tn,A:th,C:1,L:Zf,R:kc,D:Yf,V:Wi,I:Aa,H:Ki,N:Sc,U:Ec,B:Cc,F:Tc},$_=Bs.litHtmlPolyfillSupport;$_?.(js,Aa),(Bs.litHtmlVersions??(Bs.litHtmlVersions=[])).push("3.3.3");var La=(i,o,t)=>{let r=t?.renderBefore??o,n=r._$litPart$;if(n===void 0){let a=t?.renderBefore??null;r._$litPart$=n=new Aa(o.insertBefore(Vs(),a),a,void 0,t??{})}return n._$AI(i),n};var rr={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},ae=i=>(...o)=>({_$litDirective$:i,values:o}),Xe=class{constructor(o){}get _$AU(){return this._$AM._$AU}_$AT(o,t,r){this._$Ct=o,this._$AM=t,this._$Ci=r}_$AS(o,t){return this.update(o,t)}update(o,t){return this.render(...t)}};var D=ae(class extends Xe{constructor(i){if(super(i),i.type!==rr.ATTRIBUTE||i.name!=="class"||i.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(i){return" "+Object.keys(i).filter(o=>i[o]).join(" ")+" "}update(i,[o]){if(this.st===void 0){this.st=new Set,i.strings!==void 0&&(this.nt=new Set(i.strings.join(" ").split(/\s/).filter(r=>r!=="")));for(let r in o)o[r]&&!this.nt?.has(r)&&this.st.add(r);return this.render(o)}let t=i.element.classList;for(let r of this.st)r in o||(t.remove(r),this.st.delete(r));for(let r in o){let n=!!o[r];n===this.st.has(r)||this.nt?.has(r)||(n?(t.add(r),this.st.add(r)):(t.remove(r),this.st.delete(r)))}return ie}});var $c=globalThis,Ac=$c.ShadowRoot&&($c.ShadyCSS===void 0||$c.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,oh=Symbol(),eg=new WeakMap,Gs=class{constructor(o,t,r){if(this._$cssResult$=!0,r!==oh)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=o,this.t=t}get styleSheet(){let o=this.o,t=this.t;if(Ac&&o===void 0){let r=t!==void 0&&t.length===1;r&&(o=eg.get(t)),o===void 0&&((this.o=o=new CSSStyleSheet).replaceSync(this.cssText),r&&eg.set(t,o))}return o}toString(){return this.cssText}},E=i=>new Gs(typeof i=="string"?i:i+"",void 0,oh),S=(i,...o)=>{let t=i.length===1?i[0]:o.reduce((r,n,a)=>r+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+i[a+1],i[0]);return new Gs(t,i,oh)},rg=(i,o)=>{if(Ac)i.adoptedStyleSheets=o.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of o){let r=document.createElement("style"),n=$c.litNonce;n!==void 0&&r.setAttribute("nonce",n),r.textContent=t.cssText,i.appendChild(r)}},nh=Ac?i=>i:i=>i instanceof CSSStyleSheet?(o=>{let t="";for(let r of o.cssRules)t+=r.cssText;return E(t)})(i):i;var{is:A_,defineProperty:L_,getOwnPropertyDescriptor:q_,getOwnPropertyNames:M_,getOwnPropertySymbols:I_,getPrototypeOf:D_}=Object,ei=globalThis,og=ei.trustedTypes,N_=og?og.emptyScript:"",R_=ei.reactiveElementPolyfillSupport,Ws=(i,o)=>i,ri={toAttribute(i,o){switch(o){case Boolean:i=i?N_:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,o){let t=i;switch(o){case Boolean:t=i!==null;break;case Number:t=i===null?null:Number(i);break;case Object:case Array:try{t=JSON.parse(i)}catch{t=null}}return t}},qa=(i,o)=>!A_(i,o),ng={attribute:!0,type:String,converter:ri,reflect:!1,useDefault:!1,hasChanged:qa};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),ei.litPropertyMetadata??(ei.litPropertyMetadata=new WeakMap);var $n=class extends HTMLElement{static addInitializer(o){this._$Ei(),(this.l??(this.l=[])).push(o)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(o,t=ng){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(o)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(o,t),!t.noAccessor){let r=Symbol(),n=this.getPropertyDescriptor(o,r,t);n!==void 0&&L_(this.prototype,o,n)}}static getPropertyDescriptor(o,t,r){let{get:n,set:a}=q_(this.prototype,o)??{get(){return this[t]},set(s){this[t]=s}};return{get:n,set(s){let l=n?.call(this);a?.call(this,s),this.requestUpdate(o,l,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(o){return this.elementProperties.get(o)??ng}static _$Ei(){if(this.hasOwnProperty(Ws("elementProperties")))return;let o=D_(this);o.finalize(),o.l!==void 0&&(this.l=[...o.l]),this.elementProperties=new Map(o.elementProperties)}static finalize(){if(this.hasOwnProperty(Ws("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Ws("properties"))){let t=this.properties,r=[...M_(t),...I_(t)];for(let n of r)this.createProperty(n,t[n])}let o=this[Symbol.metadata];if(o!==null){let t=litPropertyMetadata.get(o);if(t!==void 0)for(let[r,n]of t)this.elementProperties.set(r,n)}this._$Eh=new Map;for(let[t,r]of this.elementProperties){let n=this._$Eu(t,r);n!==void 0&&this._$Eh.set(n,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(o){let t=[];if(Array.isArray(o)){let r=new Set(o.flat(1/0).reverse());for(let n of r)t.unshift(nh(n))}else o!==void 0&&t.push(nh(o));return t}static _$Eu(o,t){let r=t.attribute;return r===!1?void 0:typeof r=="string"?r:typeof o=="string"?o.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(o=>this.enableUpdating=o),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(o=>o(this))}addController(o){(this._$EO??(this._$EO=new Set)).add(o),this.renderRoot!==void 0&&this.isConnected&&o.hostConnected?.()}removeController(o){this._$EO?.delete(o)}_$E_(){let o=new Map,t=this.constructor.elementProperties;for(let r of t.keys())this.hasOwnProperty(r)&&(o.set(r,this[r]),delete this[r]);o.size>0&&(this._$Ep=o)}createRenderRoot(){let o=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return rg(o,this.constructor.elementStyles),o}connectedCallback(){this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),this._$EO?.forEach(o=>o.hostConnected?.())}enableUpdating(o){}disconnectedCallback(){this._$EO?.forEach(o=>o.hostDisconnected?.())}attributeChangedCallback(o,t,r){this._$AK(o,r)}_$ET(o,t){let r=this.constructor.elementProperties.get(o),n=this.constructor._$Eu(o,r);if(n!==void 0&&r.reflect===!0){let a=(r.converter?.toAttribute!==void 0?r.converter:ri).toAttribute(t,r.type);this._$Em=o,a==null?this.removeAttribute(n):this.setAttribute(n,a),this._$Em=null}}_$AK(o,t){let r=this.constructor,n=r._$Eh.get(o);if(n!==void 0&&this._$Em!==n){let a=r.getPropertyOptions(n),s=typeof a.converter=="function"?{fromAttribute:a.converter}:a.converter?.fromAttribute!==void 0?a.converter:ri;this._$Em=n;let l=s.fromAttribute(t,a.type);this[n]=l??this._$Ej?.get(n)??l,this._$Em=null}}requestUpdate(o,t,r,n=!1,a){if(o!==void 0){let s=this.constructor;if(n===!1&&(a=this[o]),r??(r=s.getPropertyOptions(o)),!((r.hasChanged??qa)(a,t)||r.useDefault&&r.reflect&&a===this._$Ej?.get(o)&&!this.hasAttribute(s._$Eu(o,r))))return;this.C(o,t,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(o,t,{useDefault:r,reflect:n,wrapped:a},s){r&&!(this._$Ej??(this._$Ej=new Map)).has(o)&&(this._$Ej.set(o,s??t??this[o]),a!==!0||s!==void 0)||(this._$AL.has(o)||(this.hasUpdated||r||(t=void 0),this._$AL.set(o,t)),n===!0&&this._$Em!==o&&(this._$Eq??(this._$Eq=new Set)).add(o))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let o=this.scheduleUpdate();return o!=null&&await o,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[n,a]of this._$Ep)this[n]=a;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[n,a]of r){let{wrapped:s}=a,l=this[n];s!==!0||this._$AL.has(n)||l===void 0||this.C(n,void 0,a,l)}}let o=!1,t=this._$AL;try{o=this.shouldUpdate(t),o?(this.willUpdate(t),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(t)):this._$EM()}catch(r){throw o=!1,this._$EM(),r}o&&this._$AE(t)}willUpdate(o){}_$AE(o){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(o)),this.updated(o)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(o){return!0}update(o){this._$Eq&&(this._$Eq=this._$Eq.forEach(t=>this._$ET(t,this[t]))),this._$EM()}updated(o){}firstUpdated(o){}};$n.elementStyles=[],$n.shadowRootOptions={mode:"open"},$n[Ws("elementProperties")]=new Map,$n[Ws("finalized")]=new Map,R_?.({ReactiveElement:$n}),(ei.reactiveElementVersions??(ei.reactiveElementVersions=[])).push("2.1.2");var Ks=globalThis,oi=class extends $n{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;let o=super.createRenderRoot();return(t=this.renderOptions).renderBefore??(t.renderBefore=o.firstChild),o}update(o){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(o),this._$Do=La(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return ie}};oi._$litElement$=!0,oi.finalized=!0,Ks.litElementHydrateSupport?.({LitElement:oi});var O_=Ks.litElementPolyfillSupport;O_?.({LitElement:oi});(Ks.litElementVersions??(Ks.litElementVersions=[])).push("4.2.2");var ig=new WeakMap;function ag(i){let o=ig.get(i);return o||(o=window.getComputedStyle(i,null),ig.set(i,o)),o}function P_(i){if(typeof i.checkVisibility=="function")return i.checkVisibility({checkOpacity:!1,checkVisibilityCSS:!0});let o=ag(i);return o.visibility!=="hidden"&&o.display!=="none"}function H_(i){let o=ag(i),{overflowY:t,overflowX:r}=o;return t==="scroll"||r==="scroll"?!0:t!=="auto"||r!=="auto"?!1:i.scrollHeight>i.clientHeight&&t==="auto"||i.scrollWidth>i.clientWidth&&r==="auto"}function F_(i){let o=i.tagName.toLowerCase(),t=Number(i.getAttribute("tabindex"));return i.hasAttribute("tabindex")&&(isNaN(t)||t<=-1)||i.hasAttribute("disabled")||i.closest("[inert]")||o==="input"&&i.getAttribute("type")==="radio"&&!i.hasAttribute("checked")||!P_(i)?!1:(o==="audio"||o==="video")&&i.hasAttribute("controls")||i.hasAttribute("tabindex")||i.hasAttribute("contenteditable")&&i.getAttribute("contenteditable")!=="false"||["button","input","select","textarea","a","audio","video","summary","iframe"].includes(o)?!0:H_(i)}function sg(i){let o=ih(i),t=o[0]??null,r=o[o.length-1]??null;return{start:t,end:r}}function B_(i,o){return i.getRootNode({composed:!0})?.host!==o}function ih(i){let o=new WeakMap,t=[];function r(n){if(n instanceof Element){if(n.hasAttribute("inert")||n.closest("[inert]")||o.has(n))return;o.set(n,!0),!t.includes(n)&&F_(n)&&t.push(n),n instanceof HTMLSlotElement&&B_(n,i)&&n.assignedElements({flatten:!0}).forEach(a=>{r(a)}),n.shadowRoot!==null&&n.shadowRoot.mode==="open"&&r(n.shadowRoot)}for(let a of n.children)r(a)}return r(i),t.sort((n,a)=>{let s=Number(n.getAttribute("tabindex"))||0;return(Number(a.getAttribute("tabindex"))||0)-s})}var lg=new WeakMap,ah=class{constructor(o){this.handleKeyDown=o=>{if(o.key==="Enter"){if(o.altKey||o.ctrlKey||o.metaKey||o.shiftKey||o.isComposing||o.defaultPrevented)return;let r=o.target;if(this.isSelectOption(r)){o.preventDefault(),setTimeout(()=>{let a=this.findParentSelect(r);a&&this.focusNextControl(a)},0);return}if(this.shouldSkipEnterKey(r)||r.hasAttribute("trigger-submit"))return;let n=this.findParentGroup(r);if(n){o.preventDefault(),this.focusNextInGroup(r,n)||this.focusNextControl(n);return}o.preventDefault(),this.areRequiredFieldsFilled()?this.submitForm():this.focusNextControl(r);return}if(o.key==="ArrowDown"){let t=o.target,r=t.tagName;if(!(o.altKey||o.ctrlKey||o.metaKey||o.shiftKey)&&!o.defaultPrevented){let a=this.findParentGroup(t);if(a){o.preventDefault(),this.focusNextInGroup(t,a)||this.focusNextControl(a);return}(r==="ZN-CHECKBOX"||r==="ZN-TOGGLE")&&(o.preventDefault(),this.focusNextControl(t))}}if(o.key==="ArrowUp"){let t=o.target,r=t.tagName;if(!(o.altKey||o.ctrlKey||o.metaKey||o.shiftKey)&&!o.defaultPrevented){let a=this.findParentGroup(t);if(a){o.preventDefault(),this.focusPreviousInGroup(t,a)||this.focusPreviousControl(a);return}(r==="ZN-CHECKBOX"||r==="ZN-TOGGLE")&&(o.preventDefault(),this.focusPreviousControl(t))}}};this.form=o,this.form.addEventListener("keydown",this.handleKeyDown,!0)}shouldSkipEnterKey(o){let t=o.tagName.toLowerCase();return t==="zn-textarea"||t==="textarea"||(t==="zn-input"||t==="input")&&o.getAttribute("type")==="search"?!0:t==="button"||t==="zn-button"}shouldExcludeFromNavigation(o){let t=o.tagName.toLowerCase();return t==="button"||t==="zn-button"}isSelectOption(o){return o.tagName.toLowerCase()==="zn-option"}findParentSelect(o){let t=o;for(;t;){if(t.tagName.toLowerCase()==="zn-select")return t;let r=t.getRootNode();if(r instanceof ShadowRoot)t=r.host;else if(t.parentElement)t=t.parentElement;else break}return null}findParentGroup(o){let t=o;for(;t;){let r=t.tagName;if(r==="ZN-RADIO-GROUP"||r==="ZN-CHECKBOX-GROUP")return t;let n=t.getRootNode();if(n instanceof ShadowRoot)t=n.host;else if(t.parentElement)t=t.parentElement;else break}return null}getGroupItems(o){let t=o.tagName==="ZN-RADIO-GROUP"?"ZN-RADIO":"ZN-CHECKBOX",r=[],n=document.createTreeWalker(o,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>s.tagName===t?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}),a;for(;a=n.nextNode();)r.push(a);return r}focusNextInGroup(o,t){let r=this.getGroupItems(t);if(r.length===0)return!1;let n=-1;for(let a=0;a<r.length;a++)if(r[a]===o||r[a].contains(o)){n=a;break}if(n>=0&&n<r.length-1){let a=r[n+1];if(typeof a.focus=="function")return a.focus(),!0}return!1}focusPreviousInGroup(o,t){let r=this.getGroupItems(t);if(r.length===0)return!1;let n=-1;for(let a=0;a<r.length;a++)if(r[a]===o||r[a].contains(o)){n=a;break}if(n>0){let a=r[n-1];if(typeof a.focus=="function")return a.focus(),!0}return!1}areRequiredFieldsFilled(){let o=Yi.get(this.form);if(!o)return!0;for(let t of o){let r=t;if(!r.name||r.disabled)continue;let n=r.value;if(!(n!=null&&n!=="")||typeof r.checkValidity=="function"&&!r.checkValidity())return!1}return!0}getNavigableControls(){let o=ih(this.form),t=[],r=new Set;for(let n of o){let a=n.tagName.toLowerCase();if(["zn-input","zn-select","zn-datepicker","zn-textarea","zn-file","zn-checkbox","zn-radio","zn-radio-group","zn-toggle"].includes(a)){if(a==="zn-radio"){let h=n.closest("zn-radio-group");if(h){r.has(h)||(r.add(h),this.shouldExcludeFromNavigation(h)||t.push(h));continue}}if(r.has(n)||(r.add(n),this.shouldExcludeFromNavigation(n)))continue;t.push(n);continue}let l=n.getRootNode().host;if(l&&l!==this.form){let h=l.tagName.toLowerCase();if(["zn-input","zn-select","zn-datepicker","zn-textarea","zn-file","zn-checkbox","zn-radio","zn-radio-group","zn-toggle"].includes(h)){if(h==="zn-radio"){let f=l.closest("zn-radio-group");if(f){r.has(f)||(r.add(f),this.shouldExcludeFromNavigation(f)||t.push(f));continue}}if(r.has(l)||(r.add(l),this.shouldExcludeFromNavigation(l)))continue;t.push(l);continue}}if(["input","select"].includes(a)){if(r.has(n)||(r.add(n),n.getAttribute("type")==="search"))continue;t.push(n)}}return t}findCurrentControlIndex(o,t){for(let r=0;r<t.length;r++){let n=t[r];if(n===o)return r;let a=o.getRootNode();if(a instanceof ShadowRoot&&a.host===n||n.contains(o)||o.contains(n))return r}return-1}focusNextControl(o){let t=this.getNavigableControls(),r=this.findCurrentControlIndex(o,t);if(r>=0&&r<t.length-1){let n=t[r+1];if(typeof n.focus=="function"&&(n.focus(),n.tagName.toLowerCase()==="zn-select")){let s=n;typeof s.show=="function"&&setTimeout(()=>{s.show?.()},0)}}}focusPreviousControl(o){let t=this.getNavigableControls(),r=this.findCurrentControlIndex(o,t);if(r>0){let n=t[r-1];if(typeof n.focus=="function"&&(n.focus(),n.tagName.toLowerCase()==="zn-select")){let s=n;typeof s.show=="function"&&setTimeout(()=>{s.show?.()},0)}}}submitForm(){let o=this.form.querySelector('[type="submit"]');if(o)o.click();else if(typeof this.form.requestSubmit=="function")this.form.requestSubmit();else{let t=new Event("submit",{bubbles:!0,cancelable:!0});this.form.dispatchEvent(t)}}destroy(){this.form.removeEventListener("keydown",this.handleKeyDown,!0)}};function cg(i){let o=lg.get(i);return o||(o=new ah(i),lg.set(i,o)),o}var hr=class{constructor(o,t,r=0){this.storage=o,this.prefix=t,this.ttl=r*1e3,this.cleanup()}get(o){return!o||o.length<1?null:this.stripTtl(this.storage.getItem(this.prefix+o))}stripTtl(o){if(o===null)return null;let t=o.split(",");if(t.length===1)return t[0];let r=t.shift(),n=r?parseInt(r):0;return n>0&&n<Date.now()?null:t.join(",")||""}setWithTTL(o,t,r){!o||o.length<1||(r=r>0?Date.now()+r*1e3:0,this.storage.setItem(this.prefix+o,r+","+t))}set(o,t){this.setWithTTL(o,t,this.ttl)}remove(o){this.storage.removeItem(this.prefix+o)}cleanup(){for(let o=0;o<this.storage.length;o++){let t=this.storage.key(o);t!==null&&t.startsWith(this.prefix)&&this.stripTtl(this.storage.getItem(t))===null&&this.storage.removeItem(t)}}};var Yi=new WeakMap,Ys=new WeakMap,Xs=new WeakMap,Lc=new WeakMap,sh=new WeakSet,qc=new WeakMap,mg="znform:";function lh(i=!1){try{return i?window.localStorage:window.sessionStorage}catch{return null}}function V_(i=!1,o=0){let t=lh(i);return t?new hr(t,mg,o):null}function dg(i){let o=i?.getAttribute("store-ttl");return o&&Number(o)||0}function pg(i){return!!i?.hasAttribute("local-storage")}function fg(i){return i?.getAttribute("store-key")||""}function U_(i){return i.getAttribute("store-key")||""}function j_(i){return i.getAttribute("name")||("name"in i&&typeof i.name=="string"?i.name:"")}function gg(i,o){let t=U_(i),r=fg(o);if(t)return r?`${r}:${t}`:t;let n=j_(i);return r&&n?`${r}:${n}`:""}function bg(i,o){let t=pg(i)||pg(o),r=dg(i)||dg(o);return V_(t,r)}function vg(i,o){let t=gg(i,o),n=(t?bg(i,o):null)?.get(t);if(!n)return null;try{return JSON.parse(n)}catch{return{value:n}}}function xg(i,o,t){let r=gg(i,o),n=r?bg(i,o):null;n&&n.set(r,JSON.stringify(t))}function G_(i){return i instanceof HTMLInputElement||i instanceof HTMLTextAreaElement||i instanceof HTMLSelectElement}function W_(i){return i instanceof HTMLInputElement&&(i.type==="checkbox"||i.type==="radio")?{checked:i.checked,value:i.value}:{value:i.value}}function K_(i){i.querySelectorAll("input, textarea, select").forEach(t=>{let r=vg(t,i);if(r){if(t instanceof HTMLInputElement&&(t.type==="checkbox"||t.type==="radio")){typeof r.checked=="boolean"&&(t.checked=r.checked);return}"value"in r&&(t.value=String(r.value??""))}})}function hg(i,o){!G_(i)||i.form!==o||xg(i,o,W_(i))}function Y_(i,o){let t={value:o};return"checked"in i&&typeof i.checked=="boolean"&&(t.checked=i.checked),"indeterminate"in i&&typeof i.indeterminate=="boolean"&&(t.indeterminate=i.indeterminate),t}function ug(i,o){let t=[],r=mg+o;for(let n=0;n<i.length;n++){let a=i.key(n);(a===r||a?.startsWith(r+":"))&&t.push(a)}t.forEach(n=>i.removeItem(n))}function X_(i){let o=typeof i=="string"?i:fg(i);if(!o)return;let t=lh(!0),r=lh(!1);t&&ug(t,o),r&&r!==t&&ug(r,o)}var ot=class{constructor(o,t){this.handleFormData=o=>{let t=this.options.disabled(this.host),r=this.options.name(this.host),n=this.options.value(this.host),a=this.host.tagName.toLowerCase()==="zn-button";if(this.host.isConnected&&!t&&!a&&r.length>0&&typeof n<"u"){let s=m=>{o.formData.append(r,m.toString())},l=(m,f)=>{let b=m,g=f??(typeof b.name=="string"?b.name:void 0);typeof g=="string"?o.formData.append(r,m,g):o.formData.append(r,m)},d=m=>typeof FileList<"u"&&m instanceof FileList,h=m=>typeof Blob<"u"&&m instanceof Blob;if(d(n)){if(n.length>0)for(let m=0;m<n.length;m++){let f=n.item(m);f&&l(f,f.name)}}else h(n)?l(n,n.name):Array.isArray(n)?n.forEach(m=>{if(h(m))l(m,m.name);else if(d(m)){let f=m;for(let b=0;b<f.length;b++){let g=f.item(b);g&&l(g,g.name)}}else s(m)}):s(n);this.host.dispatchEvent(new CustomEvent("zn-formdata",{bubbles:!0,composed:!0}))}};this.handleFormSubmit=o=>{let t=this.options.disabled(this.host),r=this.options.reportValidity;this.form&&!this.form.noValidate&&Yi.get(this.form)?.forEach(s=>{this.setUserInteracted(s,!0)});let n=this.form?.querySelector('[type="submit"]'),a=n?.innerHTML??"Submit";n&&(n.setAttribute("data-original-text",a),setTimeout(()=>{n.disabled=!0,n.innerHTML=this.form?.hasAttribute("data-no-loading-text")?a:this.form?.getAttribute("data-loading-text")||"Processing..."},20),setTimeout(()=>{n.disabled=!1,n.innerHTML=a},15e3)),this.form&&!this.form.noValidate&&!t&&!r(this.host)&&(o.preventDefault(),o.stopImmediatePropagation(),n&&(n.disabled=!1,n.innerHTML=a))};this.enableSubmit=o=>{if(o.target!==this.form)return;let r=this.form?.querySelector('[type="submit"]');if(r){let n=r.getAttribute("data-original-text")??r.innerHTML;r.disabled=!1,r.innerHTML=n}};this.handleFormReset=()=>{this.options.setValue(this.host,this.options.defaultValue(this.host)),this.setUserInteracted(this.host,!1),qc.set(this.host,[])};this.handleInteraction=o=>{let t=qc.get(this.host);t.includes(o.type)||t.push(o.type),t.length===this.options.assumeInteractionOn.length&&this.setUserInteracted(this.host,!0),this.persistHostValue(),this.checkFormValidity()};this.checkFormValidity=()=>{let o=this.form?.querySelector('[type="submit"]');if(this.form&&!this.form.noValidate){let t=this.form.querySelectorAll("*");for(let r of t)if(typeof r.checkValidity=="function"&&!r.checkValidity())return o?.setAttribute("disabled","disabled"),!1}return o?.removeAttribute("disabled"),!0};this.reportFormValidity=()=>{if(this.form&&!this.form.noValidate){let o=this.form.querySelectorAll("*");for(let t of o)if(typeof t.reportValidity=="function"&&!t.reportValidity())return!1}return!0};(this.host=o).addController(this),this.options={form:r=>{let n=r.form;if(n){let s=r.getRootNode().querySelector(`#${n}`);if(s)return s}return r.closest("form")},name:r=>r.name,value:r=>r.value,defaultValue:r=>r.defaultValue,disabled:r=>r.disabled??!1,reportValidity:r=>typeof r.reportValidity=="function"?r.reportValidity():!0,checkValidity:r=>typeof r.checkValidity=="function"?r.checkValidity():!0,setValue:(r,n)=>r.value=n,assumeInteractionOn:["zn-input"],...t}}async hostConnected(){let o=this.options.form(this.host);o&&this.attachForm(o),qc.set(this.host,[]),this.options.assumeInteractionOn.forEach(t=>{this.host.addEventListener(t,this.handleInteraction)}),await this.host.updateComplete,this.restorePersistedValue(),o&&this.checkFormValidity()}hostDisconnected(){this.detachForm(),qc.delete(this.host),this.options.assumeInteractionOn.forEach(o=>{this.host.removeEventListener(o,this.handleInteraction)})}hostUpdated(){let o=this.options.form(this.host);o||this.detachForm(),o&&this.form!==o&&(this.detachForm(),this.attachForm(o)),this.host.hasUpdated&&this.setValidity(this.host.validity?.valid)}attachForm(o){if(!o){this.form=void 0;return}this.form=o,Yi.has(this.form)?Yi.get(this.form).add(this.host):Yi.set(this.form,new Set([this.host])),this.form.hasAttribute("data-enter-navigation")&&cg(this.form),this.form.addEventListener("formdata",this.handleFormData),this.form.addEventListener("submit",this.handleFormSubmit),this.form.addEventListener("reset",this.handleFormReset),this.form.addEventListener("complete",this.enableSubmit),this.form.addEventListener("cancelled",this.enableSubmit),this.form.addEventListener("error",this.enableSubmit),this.attachFormPersistence(this.form),Ys.has(this.form)||(Ys.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity()),Xs.has(this.form)||(Xs.set(this.form,this.form.checkValidity),this.form.checkValidity=()=>this.checkFormValidity())}detachForm(){if(!this.form)return;let o=Yi.get(this.form);o&&(o.delete(this.host),o.size<=0&&(this.form.removeEventListener("formdata",this.handleFormData),this.form.removeEventListener("submit",this.handleFormSubmit),this.form.removeEventListener("reset",this.handleFormReset),this.form.removeEventListener("complete",this.enableSubmit),this.form.removeEventListener("cancelled",this.enableSubmit),this.form.removeEventListener("error",this.enableSubmit),this.detachFormPersistence(this.form),Ys.has(this.form)&&(this.form.reportValidity=Ys.get(this.form),Ys.delete(this.form)),Xs.has(this.form)&&(this.form.checkValidity=Xs.get(this.form),Xs.delete(this.form)),this.form=void 0))}attachFormPersistence(o){if(Lc.has(o))return;let t=n=>hg(n.target,o),r=n=>hg(n.target,o);o.addEventListener("input",t),o.addEventListener("change",r),Lc.set(o,{handleInput:t,handleChange:r}),K_(o)}detachFormPersistence(o){let t=Lc.get(o);t&&(o.removeEventListener("input",t.handleInput),o.removeEventListener("change",t.handleChange),Lc.delete(o))}restorePersistedValue(){let o=vg(this.host,this.form);o&&("checked"in this.host&&typeof o.checked=="boolean"?this.options.setValue(this.host,o.checked):"value"in o&&this.options.setValue(this.host,o.value),"indeterminate"in this.host&&typeof o.indeterminate=="boolean"&&(this.host.indeterminate=o.indeterminate))}persistHostValue(){xg(this.host,this.form,Y_(this.host,this.options.value(this.host)))}setUserInteracted(o,t){t?sh.add(o):sh.delete(o),o.requestUpdate()}doAction(o,t){if(this.form){let r=document.createElement("button");r.type=o,r.style.position="absolute",r.style.width="0",r.style.height="0",r.style.clipPath="inset(50%)",r.style.overflow="hidden",r.style.whiteSpace="nowrap",t&&(r.name=t.name,r.value=t.value,["formaction","formenctype","formmethod","formnovalidate","formtarget"].forEach(n=>{t.hasAttribute(n)&&r.setAttribute(n,t.getAttribute(n))})),this.form.append(r),this.form instanceof HTMLFormElement&&document.dispatchEvent(new CustomEvent("zn-register-element",{detail:{element:this.form}})),r.click(),r.remove()}}getForm(){return this.form??null}reset(o){this.doAction("reset",o)}submit(o){this.doAction("submit",o)}setValidity(o){let t=this.host,r=!!sh.has(t),n=!!t.required;t.toggleAttribute("data-required",n),t.toggleAttribute("data-optional",!n),t.toggleAttribute("data-invalid",!o),t.toggleAttribute("data-valid",o),t.toggleAttribute("data-user-invalid",!o&&r),t.toggleAttribute("data-user-valid",o&&r)}updateValidity(){let o=this.host;this.setValidity(o.validity?.valid)}emitInvalidEvent(o){let t=new CustomEvent("zn-invalid",{bubbles:!1,composed:!1,cancelable:!0,detail:{}});o||t.preventDefault(),this.host.dispatchEvent(t)||o?.preventDefault()}},ge=Object.freeze({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1}),Mc=Object.freeze({...ge,customError:!0,valid:!1}),Ic=Object.freeze({...ge,valueMissing:!0,valid:!1});var Q=class{constructor(o,...t){this.slotNames=[];this.handleSlotChange=o=>{let t=o.target;(this.slotNames.includes("[default]")&&!t.name||t.name&&this.slotNames.includes(t.name))&&this.host.requestUpdate()};(this.host=o).addController(this),this.slotNames=t}hasDefaultSlot(){return[...this.host.childNodes].some(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent.trim()!=="")return!0;if(o.nodeType===o.ELEMENT_NODE){let t=o;if(t.tagName.toLowerCase()==="zn-visually-hidden")return!1;if(!t.hasAttribute("slot"))return!0}return!1})}hasNamedSlot(o){return this.host.querySelector(`:scope > [slot="${o}"]`)!==null}test(o){return o==="[default]"?this.hasDefaultSlot():this.hasNamedSlot(o)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.handleSlotChange)}getSlot(o){return this.host.querySelector(`:scope > [slot="${o}"]`)}getDefaultSlot(){return[...this.host.childNodes].filter(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent.trim()!=="")return!0;if(o.nodeType===o.ELEMENT_NODE){let t=o;if(t.tagName.toLowerCase()==="zn-visually-hidden")return!1;if(!t.hasAttribute("slot"))return!0}return!1})}getSlots(o){return this.host.querySelectorAll(`:scope > [slot="${o}"]`)}};function yg(i){if(!i)return"";let o=i.assignedNodes({flatten:!0}),t="";return[...o].forEach(r=>{r.nodeType===Node.TEXT_NODE&&(t+=r.textContent)}),t}var wg=Symbol.for(""),Q_=i=>{if(i?.r===wg)return i?._$litStatic$};var An=(i,...o)=>({_$litStatic$:o.reduce((t,r,n)=>t+(a=>{if(a._$litStatic$!==void 0)return a._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${a}. Use 'unsafeStatic' to pass non-literal values, but
|
|
5
|
-
take care to ensure page security.`)})(r)+i[n+1],i[0]),r:wg}),zg=new Map,ch=i=>(o,...t)=>{let r=t.length,n,a,s=[],l=[],d,h=0,m=!1;for(;h<r;){for(d=o[h];h<r&&(a=t[h],(n=Q_(a))!==void 0);)d+=n+o[++h],m=!0;h!==r&&l.push(a),s.push(d),h++}if(h===r&&s.push(o[r]),m){let f=s.join("$$lit$$");(o=zg.get(f))===void 0&&(s.raw=s,zg.set(f,o=s)),t=l}return i(o,...t)},se=ch(u),tM=ch(Io),eM=ch(Qf);var H=i=>i??V;var _g=i=>(o,t)=>{t!==void 0?t.addInitializer(()=>{customElements.define(i,o)}):customElements.define(i,o)};var J_={attribute:!0,type:String,converter:ri,reflect:!1,hasChanged:qa},Z_=(i=J_,o,t)=>{let{kind:r,metadata:n}=t,a=globalThis.litPropertyMetadata.get(n);if(a===void 0&&globalThis.litPropertyMetadata.set(n,a=new Map),r==="setter"&&((i=Object.create(i)).wrapped=!0),a.set(t.name,i),r==="accessor"){let{name:s}=t;return{set(l){let d=o.get.call(this);o.set.call(this,l),this.requestUpdate(s,d,i,!0,l)},init(l){return l!==void 0&&this.C(s,void 0,i,l),l}}}if(r==="setter"){let{name:s}=t;return function(l){let d=this[s];o.call(this,l),this.requestUpdate(s,d,i,!0,l)}}throw Error("Unsupported decorator location: "+r)};function p(i){return(o,t)=>typeof t=="object"?Z_(i,o,t):((r,n,a)=>{let s=n.hasOwnProperty(a);return n.constructor.createProperty(a,r),s?Object.getOwnPropertyDescriptor(n,a):void 0})(i,o,t)}function O(i){return p({...i,state:!0,attribute:!1})}function kg(i){return(o,t)=>{let r=typeof o=="function"?o:o[t];Object.assign(r,i)}}var rn=(i,o,t)=>(t.configurable=!0,t.enumerable=!0,Reflect.decorate&&typeof o!="object"&&Object.defineProperty(i,o,t),t);function F(i,o){return(t,r,n)=>{let a=s=>s.renderRoot?.querySelector(i)??null;if(o){let{get:s,set:l}=typeof r=="object"?t:n??(()=>{let d=Symbol();return{get(){return this[d]},set(h){this[d]=h}}})();return rn(t,r,{get(){let d=s.call(this);return d===void 0&&(d=a(this),(d!==null||this.hasUpdated)&&l.call(this,d)),d}})}return rn(t,r,{get(){return a(this)}})}}var tk;function Ma(i){return(o,t)=>rn(o,t,{get(){return(this.renderRoot??tk??(tk=document.createDocumentFragment())).querySelectorAll(i)}})}function Cg(i){return(o,t)=>rn(o,t,{async get(){return await this.updateComplete,this.renderRoot?.querySelector(i)??null}})}function Sg(i){return(o,t)=>{let{slot:r}=i??{},n="slot"+(r?`[name=${r}]`:":not([name])");return rn(o,t,{get(){return this.renderRoot?.querySelector(n)?.assignedNodes(i)??[]}})}}var Eg="important",ek=" !"+Eg,_r=ae(class extends Xe{constructor(i){if(super(i),i.type!==rr.ATTRIBUTE||i.name!=="style"||i.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(i){return Object.keys(i).reduce((o,t)=>{let r=i[t];return r==null?o:o+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`},"")}update(i,[o]){let{style:t}=i.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(o)),this.render(o);for(let r of this.ft)o[r]==null&&(this.ft.delete(r),r.includes("-")?t.removeProperty(r):t[r]=null);for(let r in o){let n=o[r];if(n!=null){this.ft.add(r);let a=typeof n=="string"&&n.endsWith(ek);r.includes("-")||a?t.setProperty(r,a?n.slice(0,-11):n,a?Eg:""):t[r]=n}}return ie}});function K(i,o){let t={waitUntilFirstUpdate:!1,...o};return(r,n)=>{let{update:a}=r,s=Array.isArray(i)?i:[i];r.update=function(l){s.forEach(d=>{let h=d;if(l.has(h)){let m=l.get(h),f=this[h];m!==f&&(!t.waitUntilFirstUpdate||this.hasUpdated)&&this[n](m,f)}}),a.call(this,l)}}}var rk=Object.defineProperty,ok=(i,o,t)=>o in i?rk(i,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[o]=t,dh=(i,o,t)=>(ok(i,typeof o!="symbol"?o+"":o,t),t),nk=(i,o,t)=>{if(!o.has(i))throw TypeError("Cannot "+t)},ph=(i,o)=>{if(Object(o)!==o)throw TypeError('Cannot use the "in" operator on this value');return i.has(o)},Dc=(i,o,t)=>{if(o.has(i))throw TypeError("Cannot add the same private member more than once");o instanceof WeakSet?o.add(i):o.set(i,t)},Tg=(i,o,t)=>(nk(i,o,"access private method"),t);function $g(i,o){return Object.is(i,o)}var Ae=null,Qs=!1,Nc=1,Rc=Symbol("SIGNAL");function Ia(i){let o=Ae;return Ae=i,o}function ik(){return Ae}function ak(){return Qs}var gh={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function Oc(i){if(Qs)throw new Error(typeof ngDevMode<"u"&&ngDevMode?"Assertion error: signal read during notification phase":"");if(Ae===null)return;Ae.consumerOnSignalRead(i);let o=Ae.nextProducerIndex++;if(Da(Ae),o<Ae.producerNode.length&&Ae.producerNode[o]!==i&&mh(Ae)){let t=Ae.producerNode[o];Pc(t,Ae.producerIndexOfThis[o])}Ae.producerNode[o]!==i&&(Ae.producerNode[o]=i,Ae.producerIndexOfThis[o]=mh(Ae)?qg(i,Ae,o):0),Ae.producerLastReadVersion[o]=i.version}function sk(){Nc++}function Ag(i){if(!(!i.dirty&&i.lastCleanEpoch===Nc)){if(!i.producerMustRecompute(i)&&!hk(i)){i.dirty=!1,i.lastCleanEpoch=Nc;return}i.producerRecomputeValue(i),i.dirty=!1,i.lastCleanEpoch=Nc}}function Lg(i){if(i.liveConsumerNode===void 0)return;let o=Qs;Qs=!0;try{for(let t of i.liveConsumerNode)t.dirty||ck(t)}finally{Qs=o}}function lk(){return Ae?.consumerAllowSignalWrites!==!1}function ck(i){var o;i.dirty=!0,Lg(i),(o=i.consumerMarkedDirty)==null||o.call(i.wrapper??i)}function dk(i){return i&&(i.nextProducerIndex=0),Ia(i)}function pk(i,o){if(Ia(o),!(!i||i.producerNode===void 0||i.producerIndexOfThis===void 0||i.producerLastReadVersion===void 0)){if(mh(i))for(let t=i.nextProducerIndex;t<i.producerNode.length;t++)Pc(i.producerNode[t],i.producerIndexOfThis[t]);for(;i.producerNode.length>i.nextProducerIndex;)i.producerNode.pop(),i.producerLastReadVersion.pop(),i.producerIndexOfThis.pop()}}function hk(i){Da(i);for(let o=0;o<i.producerNode.length;o++){let t=i.producerNode[o],r=i.producerLastReadVersion[o];if(r!==t.version||(Ag(t),r!==t.version))return!0}return!1}function qg(i,o,t){var r;if(bh(i),Da(i),i.liveConsumerNode.length===0){(r=i.watched)==null||r.call(i.wrapper);for(let n=0;n<i.producerNode.length;n++)i.producerIndexOfThis[n]=qg(i.producerNode[n],i,n)}return i.liveConsumerIndexOfThis.push(t),i.liveConsumerNode.push(o)-1}function Pc(i,o){var t;if(bh(i),Da(i),typeof ngDevMode<"u"&&ngDevMode&&o>=i.liveConsumerNode.length)throw new Error(`Assertion error: active consumer index ${o} is out of bounds of ${i.liveConsumerNode.length} consumers)`);if(i.liveConsumerNode.length===1){(t=i.unwatched)==null||t.call(i.wrapper);for(let n=0;n<i.producerNode.length;n++)Pc(i.producerNode[n],i.producerIndexOfThis[n])}let r=i.liveConsumerNode.length-1;if(i.liveConsumerNode[o]=i.liveConsumerNode[r],i.liveConsumerIndexOfThis[o]=i.liveConsumerIndexOfThis[r],i.liveConsumerNode.length--,i.liveConsumerIndexOfThis.length--,o<i.liveConsumerNode.length){let n=i.liveConsumerIndexOfThis[o],a=i.liveConsumerNode[o];Da(a),a.producerIndexOfThis[n]=o}}function mh(i){var o;return i.consumerIsAlwaysLive||(((o=i?.liveConsumerNode)==null?void 0:o.length)??0)>0}function Da(i){i.producerNode??(i.producerNode=[]),i.producerIndexOfThis??(i.producerIndexOfThis=[]),i.producerLastReadVersion??(i.producerLastReadVersion=[])}function bh(i){i.liveConsumerNode??(i.liveConsumerNode=[]),i.liveConsumerIndexOfThis??(i.liveConsumerIndexOfThis=[])}function Mg(i){if(Ag(i),Oc(i),i.value===fh)throw i.error;return i.value}function uk(i){let o=Object.create(mk);o.computation=i;let t=()=>Mg(o);return t[Rc]=o,t}var hh=Symbol("UNSET"),uh=Symbol("COMPUTING"),fh=Symbol("ERRORED"),mk={...gh,value:hh,dirty:!0,error:null,equal:$g,producerMustRecompute(i){return i.value===hh||i.value===uh},producerRecomputeValue(i){if(i.value===uh)throw new Error("Detected cycle in computations.");let o=i.value;i.value=uh;let t=dk(i),r,n=!1;try{r=i.computation.call(i.wrapper),n=o!==hh&&o!==fh&&i.equal.call(i.wrapper,o,r)}catch(a){r=fh,i.error=a}finally{pk(i,t)}if(n){i.value=o;return}i.value=r,i.version++}};function fk(){throw new Error}var gk=fk;function bk(){gk()}function vk(i){let o=Object.create(zk);o.value=i;let t=()=>(Oc(o),o.value);return t[Rc]=o,t}function xk(){return Oc(this),this.value}function yk(i,o){lk()||bk(),i.equal.call(i.wrapper,i.value,o)||(i.value=o,wk(i))}var zk={...gh,equal:$g,value:void 0};function wk(i){i.version++,sk(),Lg(i)}var or=Symbol("node"),Kt;(i=>{var o,t,r,n,a,s;class l{constructor(m,f={}){Dc(this,t),dh(this,o);let g=vk(m)[Rc];if(this[or]=g,g.wrapper=this,f){let v=f.equals;v&&(g.equal=v),g.watched=f[i.subtle.watched],g.unwatched=f[i.subtle.unwatched]}}get(){if(!(0,i.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.get");return xk.call(this[or])}set(m){if(!(0,i.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.set");if(ak())throw new Error("Writes to signals not permitted during Watcher callback");let f=this[or];yk(f,m)}}o=or,t=new WeakSet,r=function(){},i.isState=h=>typeof h=="object"&&ph(t,h),i.State=l;class d{constructor(m,f){Dc(this,a),dh(this,n);let g=uk(m)[Rc];if(g.consumerAllowSignalWrites=!0,this[or]=g,g.wrapper=this,f){let v=f.equals;v&&(g.equal=v),g.watched=f[i.subtle.watched],g.unwatched=f[i.subtle.unwatched]}}get(){if(!(0,i.isComputed)(this))throw new TypeError("Wrong receiver type for Signal.Computed.prototype.get");return Mg(this[or])}}n=or,a=new WeakSet,s=function(){},i.isComputed=h=>typeof h=="object"&&ph(a,h),i.Computed=d,(h=>{var m,f,b,g,v;function x(T){let L,W=null;try{W=Ia(null),L=T()}finally{Ia(W)}return L}h.untrack=x;function _(T){var L;if(!(0,i.isComputed)(T)&&!(0,i.isWatcher)(T))throw new TypeError("Called introspectSources without a Computed or Watcher argument");return((L=T[or].producerNode)==null?void 0:L.map(W=>W.wrapper))??[]}h.introspectSources=_;function $(T){var L;if(!(0,i.isComputed)(T)&&!(0,i.isState)(T))throw new TypeError("Called introspectSinks without a Signal argument");return((L=T[or].liveConsumerNode)==null?void 0:L.map(W=>W.wrapper))??[]}h.introspectSinks=$;function N(T){if(!(0,i.isComputed)(T)&&!(0,i.isState)(T))throw new TypeError("Called hasSinks without a Signal argument");let L=T[or].liveConsumerNode;return L?L.length>0:!1}h.hasSinks=N;function G(T){if(!(0,i.isComputed)(T)&&!(0,i.isWatcher)(T))throw new TypeError("Called hasSources without a Computed or Watcher argument");let L=T[or].producerNode;return L?L.length>0:!1}h.hasSources=G;class I{constructor(L){Dc(this,f),Dc(this,g),dh(this,m);let W=Object.create(gh);W.wrapper=this,W.consumerMarkedDirty=L,W.consumerIsAlwaysLive=!0,W.consumerAllowSignalWrites=!1,W.producerNode=[],this[or]=W}watch(...L){if(!(0,i.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");Tg(this,g,v).call(this,L);let W=this[or];W.dirty=!1;let tt=Ia(W);for(let dt of L)Oc(dt[or]);Ia(tt)}unwatch(...L){if(!(0,i.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");Tg(this,g,v).call(this,L);let W=this[or];Da(W);for(let tt=W.producerNode.length-1;tt>=0;tt--)if(L.includes(W.producerNode[tt].wrapper)){Pc(W.producerNode[tt],W.producerIndexOfThis[tt]);let dt=W.producerNode.length-1;if(W.producerNode[tt]=W.producerNode[dt],W.producerIndexOfThis[tt]=W.producerIndexOfThis[dt],W.producerNode.length--,W.producerIndexOfThis.length--,W.nextProducerIndex--,tt<W.producerNode.length){let gt=W.producerIndexOfThis[tt],_t=W.producerNode[tt];bh(_t),_t.liveConsumerIndexOfThis[gt]=tt}}}getPending(){if(!(0,i.isWatcher)(this))throw new TypeError("Called getPending without Watcher receiver");return this[or].producerNode.filter(W=>W.dirty).map(W=>W.wrapper)}}m=or,f=new WeakSet,b=function(){},g=new WeakSet,v=function(T){for(let L of T)if(!(0,i.isComputed)(L)&&!(0,i.isState)(L))throw new TypeError("Called watch/unwatch without a Computed or State argument")},i.isWatcher=T=>ph(f,T),h.Watcher=I;function w(){var T;return(T=ik())==null?void 0:T.wrapper}h.currentComputed=w,h.watched=Symbol("watched"),h.unwatched=Symbol("unwatched")})(i.subtle||(i.subtle={}))})(Kt||(Kt={}));var vh=!1,Ig=new Kt.subtle.Watcher(()=>{vh||(vh=!0,queueMicrotask(()=>{vh=!1;for(let i of Ig.getPending())i.get();Ig.watch()}))}),_k=Symbol("SignalWatcherBrand"),kk=new FinalizationRegistry(i=>{i.unwatch(...Kt.subtle.introspectSources(i))}),Dg=new WeakMap;function Hc(i){return i[_k]===!0?(console.warn("SignalWatcher should not be applied to the same class more than once."),i):class extends i{constructor(){super(...arguments),this._$St=new Map,this._$So=new Kt.State(0),this._$Si=!1}_$Sl(){var o,t;let r=[],n=[];this._$St.forEach((s,l)=>{(s?.beforeUpdate?r:n).push(l)});let a=(o=this.h)===null||o===void 0?void 0:o.getPending().filter(s=>s!==this._$Su&&!this._$St.has(s));r.forEach(s=>s.get()),(t=this._$Su)===null||t===void 0||t.get(),a.forEach(s=>s.get()),n.forEach(s=>s.get())}_$Sv(){this.isUpdatePending||queueMicrotask(()=>{this.isUpdatePending||this._$Sl()})}_$S_(){if(this.h!==void 0)return;this._$Su=new Kt.Computed(()=>{this._$So.get(),super.performUpdate()});let o=this.h=new Kt.subtle.Watcher(function(){let t=Dg.get(this);t!==void 0&&(t._$Si===!1&&(new Set(this.getPending()).has(t._$Su)?t.requestUpdate():t._$Sv()),this.watch())});Dg.set(o,this),kk.register(this,o),o.watch(this._$Su),o.watch(...Array.from(this._$St).map(([t])=>t))}_$Sp(){if(this.h===void 0)return;let o=!1;this.h.unwatch(...Kt.subtle.introspectSources(this.h).filter(t=>{var r;let n=((r=this._$St.get(t))===null||r===void 0?void 0:r.manualDispose)!==!0;return n&&this._$St.delete(t),o||(o=!n),n})),o||(this._$Su=void 0,this.h=void 0,this._$St.clear())}updateEffect(o,t){var r;this._$S_();let n=new Kt.Computed(()=>{o()});return this.h.watch(n),this._$St.set(n,t),(r=t?.beforeUpdate)!==null&&r!==void 0&&r?Kt.subtle.untrack(()=>n.get()):this.updateComplete.then(()=>Kt.subtle.untrack(()=>n.get())),()=>{this._$St.delete(n),this.h.unwatch(n),this.isConnected===!1&&this._$Sp()}}performUpdate(){this.isUpdatePending&&(this._$S_(),this._$Si=!0,this._$So.set(this._$So.get()+1),this._$Si=!1,this._$Sl())}connectedCallback(){super.connectedCallback(),this.requestUpdate()}disconnectedCallback(){super.disconnectedCallback(),queueMicrotask(()=>{this.isConnected===!1&&this._$Sp()})}}}var{I:Ck}=tg,Ng=i=>i;var Fc=i=>i.strings===void 0,Rg=()=>document.createComment(""),Na=(i,o,t)=>{let r=i._$AA.parentNode,n=o===void 0?i._$AB:o._$AA;if(t===void 0){let a=r.insertBefore(Rg(),n),s=r.insertBefore(Rg(),n);t=new Ck(a,s,i,i.options)}else{let a=t._$AB.nextSibling,s=t._$AM,l=s!==i;if(l){let d;t._$AQ?.(i),t._$AM=i,t._$AP!==void 0&&(d=i._$AU)!==s._$AU&&t._$AP(d)}if(a!==n||l){let d=t._$AA;for(;d!==a;){let h=Ng(d).nextSibling;Ng(r).insertBefore(d,n),d=h}}}return t},ni=(i,o,t=i)=>(i._$AI(o,t),i),Sk={},Ra=(i,o=Sk)=>i._$AH=o,Og=i=>i._$AH,Bc=i=>{i._$AR(),i._$AA.remove()};var Js=(i,o)=>{let t=i._$AN;if(t===void 0)return!1;for(let r of t)r._$AO?.(o,!1),Js(r,o);return!0},Vc=i=>{let o,t;do{if((o=i._$AM)===void 0)break;t=o._$AN,t.delete(i),i=o}while(t?.size===0)},Pg=i=>{for(let o;o=i._$AM;i=o){let t=o._$AN;if(t===void 0)o._$AN=t=new Set;else if(t.has(i))break;t.add(i),$k(o)}};function Ek(i){this._$AN!==void 0?(Vc(this),this._$AM=i,Pg(this)):this._$AM=i}function Tk(i,o=!1,t=0){let r=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(o)if(Array.isArray(r))for(let a=t;a<r.length;a++)Js(r[a],!1),Vc(r[a]);else r!=null&&(Js(r,!1),Vc(r));else Js(this,i)}var $k=i=>{i.type==rr.CHILD&&(i._$AP??(i._$AP=Tk),i._$AQ??(i._$AQ=Ek))},ii=class extends Xe{constructor(){super(...arguments),this._$AN=void 0}_$AT(o,t,r){super._$AT(o,t,r),Pg(this),this.isConnected=o._$AU}_$AO(o,t=!0){o!==this.isConnected&&(this.isConnected=o,o?this.reconnected?.():this.disconnected?.()),t&&(Js(this,o),Vc(this))}setValue(o){if(Fc(this._$Ct))this._$Ct._$AI(o,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=o,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}};var xh=!1,yh=new Kt.subtle.Watcher(async()=>{xh||(xh=!0,queueMicrotask(()=>{xh=!1;for(let i of yh.getPending())i.get();yh.watch()}))}),Uc=class extends ii{_$S_(){var o,t;this._$Sm===void 0&&(this._$Sj=new Kt.Computed(()=>{var r;let n=(r=this._$SW)===null||r===void 0?void 0:r.get();return this.setValue(n),n}),this._$Sm=(t=(o=this._$Sk)===null||o===void 0?void 0:o.h)!==null&&t!==void 0?t:yh,this._$Sm.watch(this._$Sj),Kt.subtle.untrack(()=>{var r;return(r=this._$Sj)===null||r===void 0?void 0:r.get()}))}_$Sp(){this._$Sm!==void 0&&(this._$Sm.unwatch(this._$SW),this._$Sm=void 0)}render(o){return Kt.subtle.untrack(()=>o.get())}update(o,[t]){var r,n;return(r=this._$Sk)!==null&&r!==void 0||(this._$Sk=(n=o.options)===null||n===void 0?void 0:n.host),t!==this._$SW&&this._$SW!==void 0&&this._$Sp(),this._$SW=t,this._$S_(),Kt.subtle.untrack(()=>this._$SW.get())}disconnected(){this._$Sp()}reconnected(){this._$S_()}},zh=ae(Uc);var wh=i=>(o,...t)=>i(o,...t.map(r=>r instanceof Kt.State||r instanceof Kt.Computed?zh(r):r)),Ak=wh(u),Lk=wh(Io);var mI=Kt.State,fI=Kt.Computed,Hg=(i,o)=>new Kt.State(i,o);function Bg(){return typeof document>"u"?"light":document.documentElement.getAttribute("t")||document.body.getAttribute("t")||"light"}var jc=Hg(Bg()),Fg=!1;function qk(){Fg||typeof window>"u"||(Fg=!0,window.addEventListener("theme-change",i=>{let o=i.detail,t;typeof o=="string"?t=o:o&&typeof o=="object"&&"theme"in o&&typeof o.theme=="string"?t=o.theme:t=Bg(),t!==jc.get()&&jc.set(t)}))}qk();var Mk=Hc(oi),C=class extends Mk{willUpdate(o){this.t=jc.get(),super.willUpdate(o)}static define(o,t=this,r={}){let n=customElements.get(o);if(!n){customElements.define(o,class extends t{},r);return}let a=" (unknown version)",s=a;"version"in t&&t.version&&typeof t.version=="string"&&(a=` v${t.version}`),"version"in n&&n.version&&typeof n.version=="string"&&(s=` v${n.version}`),!(a&&s&&a===s)&&console.warn(`Attempted to register <${o}>${a} but it is already registered as <${o}>${s}.`)}constructor(){super(),Object.entries(this.constructor.dependencies).forEach(([o,t])=>{this.constructor.define(o,t)})}emit(o,t){let r=new CustomEvent(o,{bubbles:!0,cancelable:!0,composed:!0,detail:{element:this},...t});return this.dispatchEvent(r),r}};C.dependencies={},c([p()],C.prototype,"dir",2),c([p()],C.prototype,"lang",2),c([p({reflect:!0})],C.prototype,"t",2);var Xi=class extends Xe{constructor(o){if(super(o),this.it=V,o.type!==rr.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(o){if(o===V||o==null)return this._t=void 0,this.it=o;if(o===ie)return o;if(typeof o!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(o===this.it)return this._t;this.it=o;let t=[o];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};Xi.directiveName="unsafeHTML",Xi.resultType=1;var Le=ae(Xi);function mo(i,o){return new Promise(t=>{function r(n){n.target===i&&(i.removeEventListener(o,r),t())}i.addEventListener(o,r)})}var _h=class{constructor(){this.openDropdowns=new Set;this.openTooltips=new Set}registerDropdown(o){this.openDropdowns.add(o)}unregisterDropdown(o){this.openDropdowns.delete(o)}isDropdownOpen(){return this.openDropdowns.size>0}registerTooltip(o){this.openTooltips.add(o)}unregisterTooltip(o){this.openTooltips.delete(o)}isTooltipOpen(){return this.openTooltips.size>0}},Ik=new _h,Do=Ik;var Vg=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:inline-block}.dropdown::part(popup){z-index:var(--zn-z-index-dropdown)}`;var be=class extends C{constructor(){super(...arguments);this.open=!1;this.placement="bottom-start";this.disabled=!1;this.stayOpenOnSelect=!1;this.distance=0;this.skidding=0;this.hoist=!0;this.sync=void 0;this.fetchedContent="";this.handlePanelSelect=t=>{let r=t.target;!this.stayOpenOnSelect&&r.tagName.toLowerCase()==="zn-menu"&&(this.hide().then(n=>n),this.focusOnTrigger())};this.handlePreload=()=>{this.preloadContent().then(t=>t)}}connectedCallback(){super.connectedCallback(),this.containingElement||(this.containingElement=this)}focusOnTrigger(){let t=this.trigger?.assignedElements({flatten:!0})[0];typeof t?.focus=="function"&&t.focus()}firstUpdated(t){this.panel.hidden=!this.open,this.open&&(this.addOpenListeners(),this.popup.active=!0),super.firstUpdated(t)}disconnectedCallback(){super.disconnectedCallback(),this.removeOpenListeners(),this.hide().then(t=>t)}getMenu(){return this.panel.assignedElements({flatten:!0}).find(t=>t.tagName.toLowerCase()==="zn-menu")}addOpenListeners(){this.panel.addEventListener("zn-select",this.handlePanelSelect),"CloseWatcher"in window?(this.closeWatcher?.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>{this.hide().then(t=>t),this.focusOnTrigger()}):this.panel.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keydown",this.handleDocumentKeyDown.bind(this)),document.addEventListener("mousedown",this.handleDocumentMouseDown.bind(this)),this.closeWatcher?.destroy()}removeOpenListeners(){this.panel&&(this.panel.removeEventListener("zn-select",this.handlePanelSelect),this.panel.removeEventListener("keydown",this.handleKeyDown)),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown),this.closeWatcher?.destroy()}async preloadContent(){if(this.uri&&!this.fetchedContent){let t=await fetch(this.uri,{credentials:"same-origin",headers:{"x-kx-inline":"inline"}});this.fetchedContent=await t.text(),this.requestUpdate()}}async handleTriggerClick(){this.open?await this.hide():(await this.show(),this.focusOnTrigger())}handleKeyDown(t){this.open&&t.key==="Escape"&&(t.stopPropagation(),this.hide().then(r=>r),this.focusOnTrigger())}async handleTriggerKeyDown(t){if([" ","Enter","Tab"].includes(t.key)){t.preventDefault(),await this.handleTriggerClick();return}let r=this.getMenu();if(r){let n=r.getAllItems(),a=n[0],s=n[n.length-1];["ArrowDown","ArrowUp","Home","End"].includes(t.key)&&(t.preventDefault(),this.open||(this.show().then(l=>l),await this.updateComplete),n.length>0&&this.updateComplete.then(()=>{(t.key==="ArrowDown"||t.key==="Home")&&(r.setCurrentItem(a),a.focus()),(t.key==="ArrowUp"||t.key==="End")&&(r.setCurrentItem(s),s.focus())}))}}handleTriggerKeyUp(t){t.key===" "&&t.preventDefault()}handleTriggerSlotChange(){this.updateAccessibleTrigger()}handleDocumentMouseDown(t){let r=t.composedPath();this.containingElement&&!r.includes(this.containingElement)&&this.hide().then(n=>n)}handleDocumentKeyDown(t){if(t.key==="Escape"&&this.open&&!this.closeWatcher){t.stopPropagation(),this.focusOnTrigger(),this.hide().then(r=>r);return}if(t.key==="Tab"){if(this.open){t.preventDefault(),this.hide().then(r=>r),this.focusOnTrigger();return}setTimeout(()=>{let r=this.containingElement?.getRootNode()instanceof ShadowRoot?document.activeElement?.shadowRoot?.activeElement:document.activeElement;(!this.containingElement||r?.closest(this.containingElement.tagName.toLowerCase())!==this.containingElement)&&this.hide().then(n=>n)})}}async show(){if(!this.open)return this.open=!0,mo(this,"zn-after-show")}async hide(){if(this.open)return this.open=!1,mo(this,"zn-after-hide")}reposition(){this.popup.reposition()}updateAccessibleTrigger(){let r=this.trigger.assignedElements({flatten:!0}).find(a=>sg(a).start),n=null;r&&(r.tagName.toLowerCase()==="zn-button"?n=r.button:n=r),n&&(n.setAttribute("aria-haspopup","true"),n.setAttribute("aria-expanded",this.open.toString()))}handleOpenChange(){if(this.disabled){this.open=!1;return}if(this.updateAccessibleTrigger(),this.open)this.emit("zn-show"),Do.registerDropdown(this),this.addOpenListeners(),this.panel.hidden=!1,this.popup.active=!0,this.panel.focus(),this.emit("zn-after-show");else{this.emit("zn-hide"),Do.unregisterDropdown(this),this.removeOpenListeners();let t=this.getRootNode().activeElement;t&&this.panel.assignedElements({flatten:!0}).some(r=>r.contains(t))&&(this.focusOnTrigger(),t.blur()),this.panel.blur(),this.panel.hidden=!0,this.popup.active=!1,this.emit("zn-after-hide")}}render(){return u`
|
|
4
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Gf=/'/g,Wf=/"/g,Xf=/^(?:script|style|textarea|title)$/i,rh=i=>(o,...t)=>({_$litType$:i,strings:o,values:t}),u=rh(1),Io=rh(2),Qf=rh(3),ie=Symbol.for("lit-noChange"),V=Symbol.for("lit-nothing"),Kf=new WeakMap,ji=Gi.createTreeWalker(Gi,129);function Jf(i,o){if(!eh(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return Vf!==void 0?Vf.createHTML(o):o}var Zf=(i,o)=>{let t=i.length-1,r=[],n,a=o===2?"<svg>":o===3?"<math>":"",s=Fs;for(let l=0;l<t;l++){let d=i[l],h,m,f=-1,b=0;for(;b<d.length&&(s.lastIndex=b,m=s.exec(d),m!==null);)b=s.lastIndex,s===Fs?m[1]==="!--"?s=Uf:m[1]!==void 0?s=jf:m[2]!==void 0?(Xf.test(m[2])&&(n=RegExp("</"+m[2],"g")),s=Ui):m[3]!==void 0&&(s=Ui):s===Ui?m[0]===">"?(s=n??Fs,f=-1):m[1]===void 0?f=-2:(f=s.lastIndex-m[2].length,h=m[1],s=m[3]===void 0?Ui:m[3]==='"'?Wf:Gf):s===Wf||s===Gf?s=Ui:s===Uf||s===jf?s=Fs:(s=Ui,n=void 0);let g=s===Ui&&i[l+1].startsWith("/>")?" ":"";a+=s===Fs?d+T_:f>=0?(r.push(h),d.slice(0,f)+Zp+d.slice(f)+Tn+g):d+Tn+(f===-2?l:g)}return[Jf(i,a+(i[t]||"<?>")+(o===2?"</svg>":o===3?"</math>":"")),r]},js=class i{constructor({strings:o,_$litType$:t},r){let n;this.parts=[];let a=0,s=0,l=o.length-1,d=this.parts,[h,m]=Zf(o,t);if(this.el=i.createElement(h,r),ji.currentNode=this.el.content,t===2||t===3){let f=this.el.content.firstChild;f.replaceWith(...f.childNodes)}for(;(n=ji.nextNode())!==null&&d.length<l;){if(n.nodeType===1){if(n.hasAttributes())for(let f of n.getAttributeNames())if(f.endsWith(Zp)){let b=m[s++],g=n.getAttribute(f).split(Tn),v=/([.?@])?(.*)/.exec(b);d.push({type:1,index:a,name:v[2],strings:g,ctor:v[1]==="."?Cc:v[1]==="?"?Sc:v[1]==="@"?Ec:Ki}),n.removeAttribute(f)}else f.startsWith(Tn)&&(d.push({type:6,index:a}),n.removeAttribute(f));if(Xf.test(n.tagName)){let f=n.textContent.split(Tn),b=f.length-1;if(b>0){n.textContent=_c?_c.emptyScript:"";for(let g=0;g<b;g++)n.append(f[g],Vs()),ji.nextNode(),d.push({type:2,index:++a});n.append(f[b],Vs())}}}else if(n.nodeType===8)if(n.data===th)d.push({type:2,index:a});else{let f=-1;for(;(f=n.data.indexOf(Tn,f+1))!==-1;)d.push({type:7,index:a}),f+=Tn.length-1}a++}}static createElement(o,t){let r=Gi.createElement("template");return r.innerHTML=o,r}};function Wi(i,o,t=i,r){if(o===ie)return o;let n=r!==void 0?t._$Co?.[r]:t._$Cl,a=Us(o)?void 0:o._$litDirective$;return n?.constructor!==a&&(n?._$AO?.(!1),a===void 0?n=void 0:(n=new a(i),n._$AT(i,t,r)),r!==void 0?(t._$Co??(t._$Co=[]))[r]=n:t._$Cl=n),n!==void 0&&(o=Wi(i,n._$AS(i,o.values),n,r)),o}var kc=class{constructor(o,t){this._$AV=[],this._$AN=void 0,this._$AD=o,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(o){let{el:{content:t},parts:r}=this._$AD,n=(o?.creationScope??Gi).importNode(t,!0);ji.currentNode=n;let a=ji.nextNode(),s=0,l=0,d=r[0];for(;d!==void 0;){if(s===d.index){let h;d.type===2?h=new Aa(a,a.nextSibling,this,o):d.type===1?h=new d.ctor(a,d.name,d.strings,this,o):d.type===6&&(h=new Tc(a,this,o)),this._$AV.push(h),d=r[++l]}s!==d?.index&&(a=ji.nextNode(),s++)}return ji.currentNode=Gi,n}p(o){let t=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(o,r,t),t+=r.strings.length-2):r._$AI(o[t])),t++}},Aa=class i{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(o,t,r,n){this.type=2,this._$AH=V,this._$AN=void 0,this._$AA=o,this._$AB=t,this._$AM=r,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let o=this._$AA.parentNode,t=this._$AM;return t!==void 0&&o?.nodeType===11&&(o=t.parentNode),o}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(o,t=this){o=Wi(this,o,t),Us(o)?o===V||o==null||o===""?(this._$AH!==V&&this._$AR(),this._$AH=V):o!==this._$AH&&o!==ie&&this._(o):o._$litType$!==void 0?this.$(o):o.nodeType!==void 0?this.T(o):Yf(o)?this.k(o):this._(o)}O(o){return this._$AA.parentNode.insertBefore(o,this._$AB)}T(o){this._$AH!==o&&(this._$AR(),this._$AH=this.O(o))}_(o){this._$AH!==V&&Us(this._$AH)?this._$AA.nextSibling.data=o:this.T(Gi.createTextNode(o)),this._$AH=o}$(o){let{values:t,_$litType$:r}=o,n=typeof r=="number"?this._$AC(o):(r.el===void 0&&(r.el=js.createElement(Jf(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(t);else{let a=new kc(n,this),s=a.u(this.options);a.p(t),this.T(s),this._$AH=a}}_$AC(o){let t=Kf.get(o.strings);return t===void 0&&Kf.set(o.strings,t=new js(o)),t}k(o){eh(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,r,n=0;for(let a of o)n===t.length?t.push(r=new i(this.O(Vs()),this.O(Vs()),this,this.options)):r=t[n],r._$AI(a),n++;n<t.length&&(this._$AR(r&&r._$AB.nextSibling,n),t.length=n)}_$AR(o=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);o!==this._$AB;){let r=Bf(o).nextSibling;Bf(o).remove(),o=r}}setConnected(o){this._$AM===void 0&&(this._$Cv=o,this._$AP?.(o))}},Ki=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(o,t,r,n,a){this.type=1,this._$AH=V,this._$AN=void 0,this.element=o,this.name=t,this._$AM=n,this.options=a,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=V}_$AI(o,t=this,r,n){let a=this.strings,s=!1;if(a===void 0)o=Wi(this,o,t,0),s=!Us(o)||o!==this._$AH&&o!==ie,s&&(this._$AH=o);else{let l=o,d,h;for(o=a[0],d=0;d<a.length-1;d++)h=Wi(this,l[r+d],t,d),h===ie&&(h=this._$AH[d]),s||(s=!Us(h)||h!==this._$AH[d]),h===V?o=V:o!==V&&(o+=(h??"")+a[d+1]),this._$AH[d]=h}s&&!n&&this.j(o)}j(o){o===V?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,o??"")}},Cc=class extends Ki{constructor(){super(...arguments),this.type=3}j(o){this.element[this.name]=o===V?void 0:o}},Sc=class extends Ki{constructor(){super(...arguments),this.type=4}j(o){this.element.toggleAttribute(this.name,!!o&&o!==V)}},Ec=class extends Ki{constructor(o,t,r,n,a){super(o,t,r,n,a),this.type=5}_$AI(o,t=this){if((o=Wi(this,o,t,0)??V)===ie)return;let r=this._$AH,n=o===V&&r!==V||o.capture!==r.capture||o.once!==r.once||o.passive!==r.passive,a=o!==V&&(r===V||n);n&&this.element.removeEventListener(this.name,this,r),a&&this.element.addEventListener(this.name,this,o),this._$AH=o}handleEvent(o){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,o):this._$AH.handleEvent(o)}},Tc=class{constructor(o,t,r){this.element=o,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(o){Wi(this,o)}},tg={M:Zp,P:Tn,A:th,C:1,L:Zf,R:kc,D:Yf,V:Wi,I:Aa,H:Ki,N:Sc,U:Ec,B:Cc,F:Tc},$_=Bs.litHtmlPolyfillSupport;$_?.(js,Aa),(Bs.litHtmlVersions??(Bs.litHtmlVersions=[])).push("3.3.3");var La=(i,o,t)=>{let r=t?.renderBefore??o,n=r._$litPart$;if(n===void 0){let a=t?.renderBefore??null;r._$litPart$=n=new Aa(o.insertBefore(Vs(),a),a,void 0,t??{})}return n._$AI(i),n};var rr={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},ae=i=>(...o)=>({_$litDirective$:i,values:o}),Ye=class{constructor(o){}get _$AU(){return this._$AM._$AU}_$AT(o,t,r){this._$Ct=o,this._$AM=t,this._$Ci=r}_$AS(o,t){return this.update(o,t)}update(o,t){return this.render(...t)}};var D=ae(class extends Ye{constructor(i){if(super(i),i.type!==rr.ATTRIBUTE||i.name!=="class"||i.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(i){return" "+Object.keys(i).filter(o=>i[o]).join(" ")+" "}update(i,[o]){if(this.st===void 0){this.st=new Set,i.strings!==void 0&&(this.nt=new Set(i.strings.join(" ").split(/\s/).filter(r=>r!=="")));for(let r in o)o[r]&&!this.nt?.has(r)&&this.st.add(r);return this.render(o)}let t=i.element.classList;for(let r of this.st)r in o||(t.remove(r),this.st.delete(r));for(let r in o){let n=!!o[r];n===this.st.has(r)||this.nt?.has(r)||(n?(t.add(r),this.st.add(r)):(t.remove(r),this.st.delete(r)))}return ie}});var $c=globalThis,Ac=$c.ShadowRoot&&($c.ShadyCSS===void 0||$c.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,oh=Symbol(),eg=new WeakMap,Gs=class{constructor(o,t,r){if(this._$cssResult$=!0,r!==oh)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=o,this.t=t}get styleSheet(){let o=this.o,t=this.t;if(Ac&&o===void 0){let r=t!==void 0&&t.length===1;r&&(o=eg.get(t)),o===void 0&&((this.o=o=new CSSStyleSheet).replaceSync(this.cssText),r&&eg.set(t,o))}return o}toString(){return this.cssText}},E=i=>new Gs(typeof i=="string"?i:i+"",void 0,oh),S=(i,...o)=>{let t=i.length===1?i[0]:o.reduce((r,n,a)=>r+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+i[a+1],i[0]);return new Gs(t,i,oh)},rg=(i,o)=>{if(Ac)i.adoptedStyleSheets=o.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of o){let r=document.createElement("style"),n=$c.litNonce;n!==void 0&&r.setAttribute("nonce",n),r.textContent=t.cssText,i.appendChild(r)}},nh=Ac?i=>i:i=>i instanceof CSSStyleSheet?(o=>{let t="";for(let r of o.cssRules)t+=r.cssText;return E(t)})(i):i;var{is:A_,defineProperty:L_,getOwnPropertyDescriptor:q_,getOwnPropertyNames:M_,getOwnPropertySymbols:I_,getPrototypeOf:D_}=Object,ei=globalThis,og=ei.trustedTypes,N_=og?og.emptyScript:"",R_=ei.reactiveElementPolyfillSupport,Ws=(i,o)=>i,ri={toAttribute(i,o){switch(o){case Boolean:i=i?N_:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,o){let t=i;switch(o){case Boolean:t=i!==null;break;case Number:t=i===null?null:Number(i);break;case Object:case Array:try{t=JSON.parse(i)}catch{t=null}}return t}},qa=(i,o)=>!A_(i,o),ng={attribute:!0,type:String,converter:ri,reflect:!1,useDefault:!1,hasChanged:qa};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),ei.litPropertyMetadata??(ei.litPropertyMetadata=new WeakMap);var $n=class extends HTMLElement{static addInitializer(o){this._$Ei(),(this.l??(this.l=[])).push(o)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(o,t=ng){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(o)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(o,t),!t.noAccessor){let r=Symbol(),n=this.getPropertyDescriptor(o,r,t);n!==void 0&&L_(this.prototype,o,n)}}static getPropertyDescriptor(o,t,r){let{get:n,set:a}=q_(this.prototype,o)??{get(){return this[t]},set(s){this[t]=s}};return{get:n,set(s){let l=n?.call(this);a?.call(this,s),this.requestUpdate(o,l,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(o){return this.elementProperties.get(o)??ng}static _$Ei(){if(this.hasOwnProperty(Ws("elementProperties")))return;let o=D_(this);o.finalize(),o.l!==void 0&&(this.l=[...o.l]),this.elementProperties=new Map(o.elementProperties)}static finalize(){if(this.hasOwnProperty(Ws("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Ws("properties"))){let t=this.properties,r=[...M_(t),...I_(t)];for(let n of r)this.createProperty(n,t[n])}let o=this[Symbol.metadata];if(o!==null){let t=litPropertyMetadata.get(o);if(t!==void 0)for(let[r,n]of t)this.elementProperties.set(r,n)}this._$Eh=new Map;for(let[t,r]of this.elementProperties){let n=this._$Eu(t,r);n!==void 0&&this._$Eh.set(n,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(o){let t=[];if(Array.isArray(o)){let r=new Set(o.flat(1/0).reverse());for(let n of r)t.unshift(nh(n))}else o!==void 0&&t.push(nh(o));return t}static _$Eu(o,t){let r=t.attribute;return r===!1?void 0:typeof r=="string"?r:typeof o=="string"?o.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(o=>this.enableUpdating=o),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(o=>o(this))}addController(o){(this._$EO??(this._$EO=new Set)).add(o),this.renderRoot!==void 0&&this.isConnected&&o.hostConnected?.()}removeController(o){this._$EO?.delete(o)}_$E_(){let o=new Map,t=this.constructor.elementProperties;for(let r of t.keys())this.hasOwnProperty(r)&&(o.set(r,this[r]),delete this[r]);o.size>0&&(this._$Ep=o)}createRenderRoot(){let o=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return rg(o,this.constructor.elementStyles),o}connectedCallback(){this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),this._$EO?.forEach(o=>o.hostConnected?.())}enableUpdating(o){}disconnectedCallback(){this._$EO?.forEach(o=>o.hostDisconnected?.())}attributeChangedCallback(o,t,r){this._$AK(o,r)}_$ET(o,t){let r=this.constructor.elementProperties.get(o),n=this.constructor._$Eu(o,r);if(n!==void 0&&r.reflect===!0){let a=(r.converter?.toAttribute!==void 0?r.converter:ri).toAttribute(t,r.type);this._$Em=o,a==null?this.removeAttribute(n):this.setAttribute(n,a),this._$Em=null}}_$AK(o,t){let r=this.constructor,n=r._$Eh.get(o);if(n!==void 0&&this._$Em!==n){let a=r.getPropertyOptions(n),s=typeof a.converter=="function"?{fromAttribute:a.converter}:a.converter?.fromAttribute!==void 0?a.converter:ri;this._$Em=n;let l=s.fromAttribute(t,a.type);this[n]=l??this._$Ej?.get(n)??l,this._$Em=null}}requestUpdate(o,t,r,n=!1,a){if(o!==void 0){let s=this.constructor;if(n===!1&&(a=this[o]),r??(r=s.getPropertyOptions(o)),!((r.hasChanged??qa)(a,t)||r.useDefault&&r.reflect&&a===this._$Ej?.get(o)&&!this.hasAttribute(s._$Eu(o,r))))return;this.C(o,t,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(o,t,{useDefault:r,reflect:n,wrapped:a},s){r&&!(this._$Ej??(this._$Ej=new Map)).has(o)&&(this._$Ej.set(o,s??t??this[o]),a!==!0||s!==void 0)||(this._$AL.has(o)||(this.hasUpdated||r||(t=void 0),this._$AL.set(o,t)),n===!0&&this._$Em!==o&&(this._$Eq??(this._$Eq=new Set)).add(o))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let o=this.scheduleUpdate();return o!=null&&await o,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[n,a]of this._$Ep)this[n]=a;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[n,a]of r){let{wrapped:s}=a,l=this[n];s!==!0||this._$AL.has(n)||l===void 0||this.C(n,void 0,a,l)}}let o=!1,t=this._$AL;try{o=this.shouldUpdate(t),o?(this.willUpdate(t),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(t)):this._$EM()}catch(r){throw o=!1,this._$EM(),r}o&&this._$AE(t)}willUpdate(o){}_$AE(o){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(o)),this.updated(o)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(o){return!0}update(o){this._$Eq&&(this._$Eq=this._$Eq.forEach(t=>this._$ET(t,this[t]))),this._$EM()}updated(o){}firstUpdated(o){}};$n.elementStyles=[],$n.shadowRootOptions={mode:"open"},$n[Ws("elementProperties")]=new Map,$n[Ws("finalized")]=new Map,R_?.({ReactiveElement:$n}),(ei.reactiveElementVersions??(ei.reactiveElementVersions=[])).push("2.1.2");var Ks=globalThis,oi=class extends $n{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;let o=super.createRenderRoot();return(t=this.renderOptions).renderBefore??(t.renderBefore=o.firstChild),o}update(o){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(o),this._$Do=La(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return ie}};oi._$litElement$=!0,oi.finalized=!0,Ks.litElementHydrateSupport?.({LitElement:oi});var O_=Ks.litElementPolyfillSupport;O_?.({LitElement:oi});(Ks.litElementVersions??(Ks.litElementVersions=[])).push("4.2.2");var ig=new WeakMap;function ag(i){let o=ig.get(i);return o||(o=window.getComputedStyle(i,null),ig.set(i,o)),o}function P_(i){if(typeof i.checkVisibility=="function")return i.checkVisibility({checkOpacity:!1,checkVisibilityCSS:!0});let o=ag(i);return o.visibility!=="hidden"&&o.display!=="none"}function H_(i){let o=ag(i),{overflowY:t,overflowX:r}=o;return t==="scroll"||r==="scroll"?!0:t!=="auto"||r!=="auto"?!1:i.scrollHeight>i.clientHeight&&t==="auto"||i.scrollWidth>i.clientWidth&&r==="auto"}function F_(i){let o=i.tagName.toLowerCase(),t=Number(i.getAttribute("tabindex"));return i.hasAttribute("tabindex")&&(isNaN(t)||t<=-1)||i.hasAttribute("disabled")||i.closest("[inert]")||o==="input"&&i.getAttribute("type")==="radio"&&!i.hasAttribute("checked")||!P_(i)?!1:(o==="audio"||o==="video")&&i.hasAttribute("controls")||i.hasAttribute("tabindex")||i.hasAttribute("contenteditable")&&i.getAttribute("contenteditable")!=="false"||["button","input","select","textarea","a","audio","video","summary","iframe"].includes(o)?!0:H_(i)}function sg(i){let o=ih(i),t=o[0]??null,r=o[o.length-1]??null;return{start:t,end:r}}function B_(i,o){return i.getRootNode({composed:!0})?.host!==o}function ih(i){let o=new WeakMap,t=[];function r(n){if(n instanceof Element){if(n.hasAttribute("inert")||n.closest("[inert]")||o.has(n))return;o.set(n,!0),!t.includes(n)&&F_(n)&&t.push(n),n instanceof HTMLSlotElement&&B_(n,i)&&n.assignedElements({flatten:!0}).forEach(a=>{r(a)}),n.shadowRoot!==null&&n.shadowRoot.mode==="open"&&r(n.shadowRoot)}for(let a of n.children)r(a)}return r(i),t.sort((n,a)=>{let s=Number(n.getAttribute("tabindex"))||0;return(Number(a.getAttribute("tabindex"))||0)-s})}var lg=new WeakMap,ah=class{constructor(o){this.handleKeyDown=o=>{if(o.key==="Enter"){if(o.altKey||o.ctrlKey||o.metaKey||o.shiftKey||o.isComposing||o.defaultPrevented)return;let r=o.target;if(this.isSelectOption(r)){o.preventDefault(),setTimeout(()=>{let a=this.findParentSelect(r);a&&this.focusNextControl(a)},0);return}if(this.shouldSkipEnterKey(r)||r.hasAttribute("trigger-submit"))return;let n=this.findParentGroup(r);if(n){o.preventDefault(),this.focusNextInGroup(r,n)||this.focusNextControl(n);return}o.preventDefault(),this.areRequiredFieldsFilled()?this.submitForm():this.focusNextControl(r);return}if(o.key==="ArrowDown"){let t=o.target,r=t.tagName;if(!(o.altKey||o.ctrlKey||o.metaKey||o.shiftKey)&&!o.defaultPrevented){let a=this.findParentGroup(t);if(a){o.preventDefault(),this.focusNextInGroup(t,a)||this.focusNextControl(a);return}(r==="ZN-CHECKBOX"||r==="ZN-TOGGLE")&&(o.preventDefault(),this.focusNextControl(t))}}if(o.key==="ArrowUp"){let t=o.target,r=t.tagName;if(!(o.altKey||o.ctrlKey||o.metaKey||o.shiftKey)&&!o.defaultPrevented){let a=this.findParentGroup(t);if(a){o.preventDefault(),this.focusPreviousInGroup(t,a)||this.focusPreviousControl(a);return}(r==="ZN-CHECKBOX"||r==="ZN-TOGGLE")&&(o.preventDefault(),this.focusPreviousControl(t))}}};this.form=o,this.form.addEventListener("keydown",this.handleKeyDown,!0)}shouldSkipEnterKey(o){let t=o.tagName.toLowerCase();return t==="zn-textarea"||t==="textarea"||(t==="zn-input"||t==="input")&&o.getAttribute("type")==="search"?!0:t==="button"||t==="zn-button"}shouldExcludeFromNavigation(o){let t=o.tagName.toLowerCase();return t==="button"||t==="zn-button"}isSelectOption(o){return o.tagName.toLowerCase()==="zn-option"}findParentSelect(o){let t=o;for(;t;){if(t.tagName.toLowerCase()==="zn-select")return t;let r=t.getRootNode();if(r instanceof ShadowRoot)t=r.host;else if(t.parentElement)t=t.parentElement;else break}return null}findParentGroup(o){let t=o;for(;t;){let r=t.tagName;if(r==="ZN-RADIO-GROUP"||r==="ZN-CHECKBOX-GROUP")return t;let n=t.getRootNode();if(n instanceof ShadowRoot)t=n.host;else if(t.parentElement)t=t.parentElement;else break}return null}getGroupItems(o){let t=o.tagName==="ZN-RADIO-GROUP"?"ZN-RADIO":"ZN-CHECKBOX",r=[],n=document.createTreeWalker(o,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>s.tagName===t?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}),a;for(;a=n.nextNode();)r.push(a);return r}focusNextInGroup(o,t){let r=this.getGroupItems(t);if(r.length===0)return!1;let n=-1;for(let a=0;a<r.length;a++)if(r[a]===o||r[a].contains(o)){n=a;break}if(n>=0&&n<r.length-1){let a=r[n+1];if(typeof a.focus=="function")return a.focus(),!0}return!1}focusPreviousInGroup(o,t){let r=this.getGroupItems(t);if(r.length===0)return!1;let n=-1;for(let a=0;a<r.length;a++)if(r[a]===o||r[a].contains(o)){n=a;break}if(n>0){let a=r[n-1];if(typeof a.focus=="function")return a.focus(),!0}return!1}areRequiredFieldsFilled(){let o=Yi.get(this.form);if(!o)return!0;for(let t of o){let r=t;if(!r.name||r.disabled)continue;let n=r.value;if(!(n!=null&&n!=="")||typeof r.checkValidity=="function"&&!r.checkValidity())return!1}return!0}getNavigableControls(){let o=ih(this.form),t=[],r=new Set;for(let n of o){let a=n.tagName.toLowerCase();if(["zn-input","zn-select","zn-datepicker","zn-textarea","zn-file","zn-checkbox","zn-radio","zn-radio-group","zn-toggle"].includes(a)){if(a==="zn-radio"){let h=n.closest("zn-radio-group");if(h){r.has(h)||(r.add(h),this.shouldExcludeFromNavigation(h)||t.push(h));continue}}if(r.has(n)||(r.add(n),this.shouldExcludeFromNavigation(n)))continue;t.push(n);continue}let l=n.getRootNode().host;if(l&&l!==this.form){let h=l.tagName.toLowerCase();if(["zn-input","zn-select","zn-datepicker","zn-textarea","zn-file","zn-checkbox","zn-radio","zn-radio-group","zn-toggle"].includes(h)){if(h==="zn-radio"){let f=l.closest("zn-radio-group");if(f){r.has(f)||(r.add(f),this.shouldExcludeFromNavigation(f)||t.push(f));continue}}if(r.has(l)||(r.add(l),this.shouldExcludeFromNavigation(l)))continue;t.push(l);continue}}if(["input","select"].includes(a)){if(r.has(n)||(r.add(n),n.getAttribute("type")==="search"))continue;t.push(n)}}return t}findCurrentControlIndex(o,t){for(let r=0;r<t.length;r++){let n=t[r];if(n===o)return r;let a=o.getRootNode();if(a instanceof ShadowRoot&&a.host===n||n.contains(o)||o.contains(n))return r}return-1}focusNextControl(o){let t=this.getNavigableControls(),r=this.findCurrentControlIndex(o,t);if(r>=0&&r<t.length-1){let n=t[r+1];if(typeof n.focus=="function"&&(n.focus(),n.tagName.toLowerCase()==="zn-select")){let s=n;typeof s.show=="function"&&setTimeout(()=>{s.show?.()},0)}}}focusPreviousControl(o){let t=this.getNavigableControls(),r=this.findCurrentControlIndex(o,t);if(r>0){let n=t[r-1];if(typeof n.focus=="function"&&(n.focus(),n.tagName.toLowerCase()==="zn-select")){let s=n;typeof s.show=="function"&&setTimeout(()=>{s.show?.()},0)}}}submitForm(){let o=this.form.querySelector('[type="submit"]');if(o)o.click();else if(typeof this.form.requestSubmit=="function")this.form.requestSubmit();else{let t=new Event("submit",{bubbles:!0,cancelable:!0});this.form.dispatchEvent(t)}}destroy(){this.form.removeEventListener("keydown",this.handleKeyDown,!0)}};function cg(i){let o=lg.get(i);return o||(o=new ah(i),lg.set(i,o)),o}var hr=class{constructor(o,t,r=0){this.storage=o,this.prefix=t,this.ttl=r*1e3,this.cleanup()}get(o){return!o||o.length<1?null:this.stripTtl(this.storage.getItem(this.prefix+o))}stripTtl(o){if(o===null)return null;let t=o.split(",");if(t.length===1)return t[0];let r=t.shift(),n=r?parseInt(r):0;return n>0&&n<Date.now()?null:t.join(",")||""}setWithTTL(o,t,r){!o||o.length<1||(r=r>0?Date.now()+r*1e3:0,this.storage.setItem(this.prefix+o,r+","+t))}set(o,t){this.setWithTTL(o,t,this.ttl)}remove(o){this.storage.removeItem(this.prefix+o)}cleanup(){for(let o=0;o<this.storage.length;o++){let t=this.storage.key(o);t!==null&&t.startsWith(this.prefix)&&this.stripTtl(this.storage.getItem(t))===null&&this.storage.removeItem(t)}}};var Yi=new WeakMap,Ys=new WeakMap,Xs=new WeakMap,Lc=new WeakMap,sh=new WeakSet,qc=new WeakMap,mg="znform:";function lh(i=!1){try{return i?window.localStorage:window.sessionStorage}catch{return null}}function V_(i=!1,o=0){let t=lh(i);return t?new hr(t,mg,o):null}function dg(i){let o=i?.getAttribute("store-ttl");return o&&Number(o)||0}function pg(i){return!!i?.hasAttribute("local-storage")}function fg(i){return i?.getAttribute("store-key")||""}function U_(i){return i.getAttribute("store-key")||""}function j_(i){return i.getAttribute("name")||("name"in i&&typeof i.name=="string"?i.name:"")}function gg(i,o){let t=U_(i),r=fg(o);if(t)return r?`${r}:${t}`:t;let n=j_(i);return r&&n?`${r}:${n}`:""}function bg(i,o){let t=pg(i)||pg(o),r=dg(i)||dg(o);return V_(t,r)}function vg(i,o){let t=gg(i,o),n=(t?bg(i,o):null)?.get(t);if(!n)return null;try{return JSON.parse(n)}catch{return{value:n}}}function xg(i,o,t){let r=gg(i,o),n=r?bg(i,o):null;n&&n.set(r,JSON.stringify(t))}function G_(i){return i instanceof HTMLInputElement||i instanceof HTMLTextAreaElement||i instanceof HTMLSelectElement}function W_(i){return i instanceof HTMLInputElement&&(i.type==="checkbox"||i.type==="radio")?{checked:i.checked,value:i.value}:{value:i.value}}function K_(i){i.querySelectorAll("input, textarea, select").forEach(t=>{let r=vg(t,i);if(r){if(t instanceof HTMLInputElement&&(t.type==="checkbox"||t.type==="radio")){typeof r.checked=="boolean"&&(t.checked=r.checked);return}"value"in r&&(t.value=String(r.value??""))}})}function hg(i,o){!G_(i)||i.form!==o||xg(i,o,W_(i))}function Y_(i,o){let t={value:o};return"checked"in i&&typeof i.checked=="boolean"&&(t.checked=i.checked),"indeterminate"in i&&typeof i.indeterminate=="boolean"&&(t.indeterminate=i.indeterminate),t}function ug(i,o){let t=[],r=mg+o;for(let n=0;n<i.length;n++){let a=i.key(n);(a===r||a?.startsWith(r+":"))&&t.push(a)}t.forEach(n=>i.removeItem(n))}function X_(i){let o=typeof i=="string"?i:fg(i);if(!o)return;let t=lh(!0),r=lh(!1);t&&ug(t,o),r&&r!==t&&ug(r,o)}var ot=class{constructor(o,t){this.handleFormData=o=>{let t=this.options.disabled(this.host),r=this.options.name(this.host),n=this.options.value(this.host),a=this.host.tagName.toLowerCase()==="zn-button";if(this.host.isConnected&&!t&&!a&&r.length>0&&typeof n<"u"){let s=m=>{o.formData.append(r,m.toString())},l=(m,f)=>{let b=m,g=f??(typeof b.name=="string"?b.name:void 0);typeof g=="string"?o.formData.append(r,m,g):o.formData.append(r,m)},d=m=>typeof FileList<"u"&&m instanceof FileList,h=m=>typeof Blob<"u"&&m instanceof Blob;if(d(n)){if(n.length>0)for(let m=0;m<n.length;m++){let f=n.item(m);f&&l(f,f.name)}}else h(n)?l(n,n.name):Array.isArray(n)?n.forEach(m=>{if(h(m))l(m,m.name);else if(d(m)){let f=m;for(let b=0;b<f.length;b++){let g=f.item(b);g&&l(g,g.name)}}else s(m)}):s(n);this.host.dispatchEvent(new CustomEvent("zn-formdata",{bubbles:!0,composed:!0}))}};this.handleFormSubmit=o=>{let t=this.options.disabled(this.host),r=this.options.reportValidity;this.form&&!this.form.noValidate&&Yi.get(this.form)?.forEach(s=>{this.setUserInteracted(s,!0)});let n=this.form?.querySelector('[type="submit"]'),a=n?.innerHTML??"Submit";n&&(n.setAttribute("data-original-text",a),setTimeout(()=>{n.disabled=!0,n.innerHTML=this.form?.hasAttribute("data-no-loading-text")?a:this.form?.getAttribute("data-loading-text")||"Processing..."},20),setTimeout(()=>{n.disabled=!1,n.innerHTML=a},15e3)),this.form&&!this.form.noValidate&&!t&&!r(this.host)&&(o.preventDefault(),o.stopImmediatePropagation(),n&&(n.disabled=!1,n.innerHTML=a))};this.enableSubmit=o=>{if(o.target!==this.form)return;let r=this.form?.querySelector('[type="submit"]');if(r){let n=r.getAttribute("data-original-text")??r.innerHTML;r.disabled=!1,r.innerHTML=n}};this.handleFormReset=()=>{this.options.setValue(this.host,this.options.defaultValue(this.host)),this.setUserInteracted(this.host,!1),qc.set(this.host,[])};this.handleInteraction=o=>{let t=qc.get(this.host);t.includes(o.type)||t.push(o.type),t.length===this.options.assumeInteractionOn.length&&this.setUserInteracted(this.host,!0),this.persistHostValue(),this.checkFormValidity()};this.checkFormValidity=()=>{let o=this.form?.querySelector('[type="submit"]');if(this.form&&!this.form.noValidate){let t=this.form.querySelectorAll("*");for(let r of t)if(typeof r.checkValidity=="function"&&!r.checkValidity())return o?.setAttribute("disabled","disabled"),!1}return o?.removeAttribute("disabled"),!0};this.reportFormValidity=()=>{if(this.form&&!this.form.noValidate){let o=this.form.querySelectorAll("*");for(let t of o)if(typeof t.reportValidity=="function"&&!t.reportValidity())return!1}return!0};(this.host=o).addController(this),this.options={form:r=>{let n=r.form;if(n){let s=r.getRootNode().querySelector(`#${n}`);if(s)return s}return r.closest("form")},name:r=>r.name,value:r=>r.value,defaultValue:r=>r.defaultValue,disabled:r=>r.disabled??!1,reportValidity:r=>typeof r.reportValidity=="function"?r.reportValidity():!0,checkValidity:r=>typeof r.checkValidity=="function"?r.checkValidity():!0,setValue:(r,n)=>r.value=n,assumeInteractionOn:["zn-input"],...t}}async hostConnected(){let o=this.options.form(this.host);o&&this.attachForm(o),qc.set(this.host,[]),this.options.assumeInteractionOn.forEach(t=>{this.host.addEventListener(t,this.handleInteraction)}),await this.host.updateComplete,this.restorePersistedValue(),o&&this.checkFormValidity()}hostDisconnected(){this.detachForm(),qc.delete(this.host),this.options.assumeInteractionOn.forEach(o=>{this.host.removeEventListener(o,this.handleInteraction)})}hostUpdated(){let o=this.options.form(this.host);o||this.detachForm(),o&&this.form!==o&&(this.detachForm(),this.attachForm(o)),this.host.hasUpdated&&this.setValidity(this.host.validity?.valid)}attachForm(o){if(!o){this.form=void 0;return}this.form=o,Yi.has(this.form)?Yi.get(this.form).add(this.host):Yi.set(this.form,new Set([this.host])),this.form.hasAttribute("data-enter-navigation")&&cg(this.form),this.form.addEventListener("formdata",this.handleFormData),this.form.addEventListener("submit",this.handleFormSubmit),this.form.addEventListener("reset",this.handleFormReset),this.form.addEventListener("complete",this.enableSubmit),this.form.addEventListener("cancelled",this.enableSubmit),this.form.addEventListener("error",this.enableSubmit),this.attachFormPersistence(this.form),Ys.has(this.form)||(Ys.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity()),Xs.has(this.form)||(Xs.set(this.form,this.form.checkValidity),this.form.checkValidity=()=>this.checkFormValidity())}detachForm(){if(!this.form)return;let o=Yi.get(this.form);o&&(o.delete(this.host),o.size<=0&&(this.form.removeEventListener("formdata",this.handleFormData),this.form.removeEventListener("submit",this.handleFormSubmit),this.form.removeEventListener("reset",this.handleFormReset),this.form.removeEventListener("complete",this.enableSubmit),this.form.removeEventListener("cancelled",this.enableSubmit),this.form.removeEventListener("error",this.enableSubmit),this.detachFormPersistence(this.form),Ys.has(this.form)&&(this.form.reportValidity=Ys.get(this.form),Ys.delete(this.form)),Xs.has(this.form)&&(this.form.checkValidity=Xs.get(this.form),Xs.delete(this.form)),this.form=void 0))}attachFormPersistence(o){if(Lc.has(o))return;let t=n=>hg(n.target,o),r=n=>hg(n.target,o);o.addEventListener("input",t),o.addEventListener("change",r),Lc.set(o,{handleInput:t,handleChange:r}),K_(o)}detachFormPersistence(o){let t=Lc.get(o);t&&(o.removeEventListener("input",t.handleInput),o.removeEventListener("change",t.handleChange),Lc.delete(o))}restorePersistedValue(){let o=vg(this.host,this.form);o&&("checked"in this.host&&typeof o.checked=="boolean"?this.options.setValue(this.host,o.checked):"value"in o&&this.options.setValue(this.host,o.value),"indeterminate"in this.host&&typeof o.indeterminate=="boolean"&&(this.host.indeterminate=o.indeterminate))}persistHostValue(){xg(this.host,this.form,Y_(this.host,this.options.value(this.host)))}setUserInteracted(o,t){t?sh.add(o):sh.delete(o),o.requestUpdate()}doAction(o,t){if(this.form){let r=document.createElement("button");r.type=o,r.style.position="absolute",r.style.width="0",r.style.height="0",r.style.clipPath="inset(50%)",r.style.overflow="hidden",r.style.whiteSpace="nowrap",t&&(r.name=t.name,r.value=t.value,["formaction","formenctype","formmethod","formnovalidate","formtarget"].forEach(n=>{t.hasAttribute(n)&&r.setAttribute(n,t.getAttribute(n))})),this.form.append(r),this.form instanceof HTMLFormElement&&document.dispatchEvent(new CustomEvent("zn-register-element",{detail:{element:this.form}})),r.click(),r.remove()}}getForm(){return this.form??null}reset(o){this.doAction("reset",o)}submit(o){this.doAction("submit",o)}setValidity(o){let t=this.host,r=!!sh.has(t),n=!!t.required;t.toggleAttribute("data-required",n),t.toggleAttribute("data-optional",!n),t.toggleAttribute("data-invalid",!o),t.toggleAttribute("data-valid",o),t.toggleAttribute("data-user-invalid",!o&&r),t.toggleAttribute("data-user-valid",o&&r)}updateValidity(){let o=this.host;this.setValidity(o.validity?.valid)}emitInvalidEvent(o){let t=new CustomEvent("zn-invalid",{bubbles:!1,composed:!1,cancelable:!0,detail:{}});o||t.preventDefault(),this.host.dispatchEvent(t)||o?.preventDefault()}},ge=Object.freeze({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1}),Mc=Object.freeze({...ge,customError:!0,valid:!1}),Ic=Object.freeze({...ge,valueMissing:!0,valid:!1});var Q=class{constructor(o,...t){this.slotNames=[];this.handleSlotChange=o=>{let t=o.target;(this.slotNames.includes("[default]")&&!t.name||t.name&&this.slotNames.includes(t.name))&&this.host.requestUpdate()};(this.host=o).addController(this),this.slotNames=t}hasDefaultSlot(){return[...this.host.childNodes].some(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent.trim()!=="")return!0;if(o.nodeType===o.ELEMENT_NODE){let t=o;if(t.tagName.toLowerCase()==="zn-visually-hidden")return!1;if(!t.hasAttribute("slot"))return!0}return!1})}hasNamedSlot(o){return this.host.querySelector(`:scope > [slot="${o}"]`)!==null}test(o){return o==="[default]"?this.hasDefaultSlot():this.hasNamedSlot(o)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.handleSlotChange)}getSlot(o){return this.host.querySelector(`:scope > [slot="${o}"]`)}getDefaultSlot(){return[...this.host.childNodes].filter(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent.trim()!=="")return!0;if(o.nodeType===o.ELEMENT_NODE){let t=o;if(t.tagName.toLowerCase()==="zn-visually-hidden")return!1;if(!t.hasAttribute("slot"))return!0}return!1})}getSlots(o){return this.host.querySelectorAll(`:scope > [slot="${o}"]`)}};function yg(i){if(!i)return"";let o=i.assignedNodes({flatten:!0}),t="";return[...o].forEach(r=>{r.nodeType===Node.TEXT_NODE&&(t+=r.textContent)}),t}var wg=Symbol.for(""),Q_=i=>{if(i?.r===wg)return i?._$litStatic$};var An=(i,...o)=>({_$litStatic$:o.reduce((t,r,n)=>t+(a=>{if(a._$litStatic$!==void 0)return a._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${a}. Use 'unsafeStatic' to pass non-literal values, but
|
|
5
|
+
take care to ensure page security.`)})(r)+i[n+1],i[0]),r:wg}),zg=new Map,ch=i=>(o,...t)=>{let r=t.length,n,a,s=[],l=[],d,h=0,m=!1;for(;h<r;){for(d=o[h];h<r&&(a=t[h],(n=Q_(a))!==void 0);)d+=n+o[++h],m=!0;h!==r&&l.push(a),s.push(d),h++}if(h===r&&s.push(o[r]),m){let f=s.join("$$lit$$");(o=zg.get(f))===void 0&&(s.raw=s,zg.set(f,o=s)),t=l}return i(o,...t)},se=ch(u),tM=ch(Io),eM=ch(Qf);var H=i=>i??V;var _g=i=>(o,t)=>{t!==void 0?t.addInitializer(()=>{customElements.define(i,o)}):customElements.define(i,o)};var J_={attribute:!0,type:String,converter:ri,reflect:!1,hasChanged:qa},Z_=(i=J_,o,t)=>{let{kind:r,metadata:n}=t,a=globalThis.litPropertyMetadata.get(n);if(a===void 0&&globalThis.litPropertyMetadata.set(n,a=new Map),r==="setter"&&((i=Object.create(i)).wrapped=!0),a.set(t.name,i),r==="accessor"){let{name:s}=t;return{set(l){let d=o.get.call(this);o.set.call(this,l),this.requestUpdate(s,d,i,!0,l)},init(l){return l!==void 0&&this.C(s,void 0,i,l),l}}}if(r==="setter"){let{name:s}=t;return function(l){let d=this[s];o.call(this,l),this.requestUpdate(s,d,i,!0,l)}}throw Error("Unsupported decorator location: "+r)};function p(i){return(o,t)=>typeof t=="object"?Z_(i,o,t):((r,n,a)=>{let s=n.hasOwnProperty(a);return n.constructor.createProperty(a,r),s?Object.getOwnPropertyDescriptor(n,a):void 0})(i,o,t)}function O(i){return p({...i,state:!0,attribute:!1})}function kg(i){return(o,t)=>{let r=typeof o=="function"?o:o[t];Object.assign(r,i)}}var rn=(i,o,t)=>(t.configurable=!0,t.enumerable=!0,Reflect.decorate&&typeof o!="object"&&Object.defineProperty(i,o,t),t);function F(i,o){return(t,r,n)=>{let a=s=>s.renderRoot?.querySelector(i)??null;if(o){let{get:s,set:l}=typeof r=="object"?t:n??(()=>{let d=Symbol();return{get(){return this[d]},set(h){this[d]=h}}})();return rn(t,r,{get(){let d=s.call(this);return d===void 0&&(d=a(this),(d!==null||this.hasUpdated)&&l.call(this,d)),d}})}return rn(t,r,{get(){return a(this)}})}}var tk;function Ma(i){return(o,t)=>rn(o,t,{get(){return(this.renderRoot??tk??(tk=document.createDocumentFragment())).querySelectorAll(i)}})}function Cg(i){return(o,t)=>rn(o,t,{async get(){return await this.updateComplete,this.renderRoot?.querySelector(i)??null}})}function Sg(i){return(o,t)=>{let{slot:r}=i??{},n="slot"+(r?`[name=${r}]`:":not([name])");return rn(o,t,{get(){return this.renderRoot?.querySelector(n)?.assignedNodes(i)??[]}})}}var Eg="important",ek=" !"+Eg,_r=ae(class extends Ye{constructor(i){if(super(i),i.type!==rr.ATTRIBUTE||i.name!=="style"||i.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(i){return Object.keys(i).reduce((o,t)=>{let r=i[t];return r==null?o:o+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`},"")}update(i,[o]){let{style:t}=i.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(o)),this.render(o);for(let r of this.ft)o[r]==null&&(this.ft.delete(r),r.includes("-")?t.removeProperty(r):t[r]=null);for(let r in o){let n=o[r];if(n!=null){this.ft.add(r);let a=typeof n=="string"&&n.endsWith(ek);r.includes("-")||a?t.setProperty(r,a?n.slice(0,-11):n,a?Eg:""):t[r]=n}}return ie}});function K(i,o){let t={waitUntilFirstUpdate:!1,...o};return(r,n)=>{let{update:a}=r,s=Array.isArray(i)?i:[i];r.update=function(l){s.forEach(d=>{let h=d;if(l.has(h)){let m=l.get(h),f=this[h];m!==f&&(!t.waitUntilFirstUpdate||this.hasUpdated)&&this[n](m,f)}}),a.call(this,l)}}}var rk=Object.defineProperty,ok=(i,o,t)=>o in i?rk(i,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[o]=t,dh=(i,o,t)=>(ok(i,typeof o!="symbol"?o+"":o,t),t),nk=(i,o,t)=>{if(!o.has(i))throw TypeError("Cannot "+t)},ph=(i,o)=>{if(Object(o)!==o)throw TypeError('Cannot use the "in" operator on this value');return i.has(o)},Dc=(i,o,t)=>{if(o.has(i))throw TypeError("Cannot add the same private member more than once");o instanceof WeakSet?o.add(i):o.set(i,t)},Tg=(i,o,t)=>(nk(i,o,"access private method"),t);function $g(i,o){return Object.is(i,o)}var Ae=null,Qs=!1,Nc=1,Rc=Symbol("SIGNAL");function Ia(i){let o=Ae;return Ae=i,o}function ik(){return Ae}function ak(){return Qs}var gh={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function Oc(i){if(Qs)throw new Error(typeof ngDevMode<"u"&&ngDevMode?"Assertion error: signal read during notification phase":"");if(Ae===null)return;Ae.consumerOnSignalRead(i);let o=Ae.nextProducerIndex++;if(Da(Ae),o<Ae.producerNode.length&&Ae.producerNode[o]!==i&&mh(Ae)){let t=Ae.producerNode[o];Pc(t,Ae.producerIndexOfThis[o])}Ae.producerNode[o]!==i&&(Ae.producerNode[o]=i,Ae.producerIndexOfThis[o]=mh(Ae)?qg(i,Ae,o):0),Ae.producerLastReadVersion[o]=i.version}function sk(){Nc++}function Ag(i){if(!(!i.dirty&&i.lastCleanEpoch===Nc)){if(!i.producerMustRecompute(i)&&!hk(i)){i.dirty=!1,i.lastCleanEpoch=Nc;return}i.producerRecomputeValue(i),i.dirty=!1,i.lastCleanEpoch=Nc}}function Lg(i){if(i.liveConsumerNode===void 0)return;let o=Qs;Qs=!0;try{for(let t of i.liveConsumerNode)t.dirty||ck(t)}finally{Qs=o}}function lk(){return Ae?.consumerAllowSignalWrites!==!1}function ck(i){var o;i.dirty=!0,Lg(i),(o=i.consumerMarkedDirty)==null||o.call(i.wrapper??i)}function dk(i){return i&&(i.nextProducerIndex=0),Ia(i)}function pk(i,o){if(Ia(o),!(!i||i.producerNode===void 0||i.producerIndexOfThis===void 0||i.producerLastReadVersion===void 0)){if(mh(i))for(let t=i.nextProducerIndex;t<i.producerNode.length;t++)Pc(i.producerNode[t],i.producerIndexOfThis[t]);for(;i.producerNode.length>i.nextProducerIndex;)i.producerNode.pop(),i.producerLastReadVersion.pop(),i.producerIndexOfThis.pop()}}function hk(i){Da(i);for(let o=0;o<i.producerNode.length;o++){let t=i.producerNode[o],r=i.producerLastReadVersion[o];if(r!==t.version||(Ag(t),r!==t.version))return!0}return!1}function qg(i,o,t){var r;if(bh(i),Da(i),i.liveConsumerNode.length===0){(r=i.watched)==null||r.call(i.wrapper);for(let n=0;n<i.producerNode.length;n++)i.producerIndexOfThis[n]=qg(i.producerNode[n],i,n)}return i.liveConsumerIndexOfThis.push(t),i.liveConsumerNode.push(o)-1}function Pc(i,o){var t;if(bh(i),Da(i),typeof ngDevMode<"u"&&ngDevMode&&o>=i.liveConsumerNode.length)throw new Error(`Assertion error: active consumer index ${o} is out of bounds of ${i.liveConsumerNode.length} consumers)`);if(i.liveConsumerNode.length===1){(t=i.unwatched)==null||t.call(i.wrapper);for(let n=0;n<i.producerNode.length;n++)Pc(i.producerNode[n],i.producerIndexOfThis[n])}let r=i.liveConsumerNode.length-1;if(i.liveConsumerNode[o]=i.liveConsumerNode[r],i.liveConsumerIndexOfThis[o]=i.liveConsumerIndexOfThis[r],i.liveConsumerNode.length--,i.liveConsumerIndexOfThis.length--,o<i.liveConsumerNode.length){let n=i.liveConsumerIndexOfThis[o],a=i.liveConsumerNode[o];Da(a),a.producerIndexOfThis[n]=o}}function mh(i){var o;return i.consumerIsAlwaysLive||(((o=i?.liveConsumerNode)==null?void 0:o.length)??0)>0}function Da(i){i.producerNode??(i.producerNode=[]),i.producerIndexOfThis??(i.producerIndexOfThis=[]),i.producerLastReadVersion??(i.producerLastReadVersion=[])}function bh(i){i.liveConsumerNode??(i.liveConsumerNode=[]),i.liveConsumerIndexOfThis??(i.liveConsumerIndexOfThis=[])}function Mg(i){if(Ag(i),Oc(i),i.value===fh)throw i.error;return i.value}function uk(i){let o=Object.create(mk);o.computation=i;let t=()=>Mg(o);return t[Rc]=o,t}var hh=Symbol("UNSET"),uh=Symbol("COMPUTING"),fh=Symbol("ERRORED"),mk={...gh,value:hh,dirty:!0,error:null,equal:$g,producerMustRecompute(i){return i.value===hh||i.value===uh},producerRecomputeValue(i){if(i.value===uh)throw new Error("Detected cycle in computations.");let o=i.value;i.value=uh;let t=dk(i),r,n=!1;try{r=i.computation.call(i.wrapper),n=o!==hh&&o!==fh&&i.equal.call(i.wrapper,o,r)}catch(a){r=fh,i.error=a}finally{pk(i,t)}if(n){i.value=o;return}i.value=r,i.version++}};function fk(){throw new Error}var gk=fk;function bk(){gk()}function vk(i){let o=Object.create(zk);o.value=i;let t=()=>(Oc(o),o.value);return t[Rc]=o,t}function xk(){return Oc(this),this.value}function yk(i,o){lk()||bk(),i.equal.call(i.wrapper,i.value,o)||(i.value=o,wk(i))}var zk={...gh,equal:$g,value:void 0};function wk(i){i.version++,sk(),Lg(i)}var or=Symbol("node"),Kt;(i=>{var o,t,r,n,a,s;class l{constructor(m,f={}){Dc(this,t),dh(this,o);let g=vk(m)[Rc];if(this[or]=g,g.wrapper=this,f){let v=f.equals;v&&(g.equal=v),g.watched=f[i.subtle.watched],g.unwatched=f[i.subtle.unwatched]}}get(){if(!(0,i.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.get");return xk.call(this[or])}set(m){if(!(0,i.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.set");if(ak())throw new Error("Writes to signals not permitted during Watcher callback");let f=this[or];yk(f,m)}}o=or,t=new WeakSet,r=function(){},i.isState=h=>typeof h=="object"&&ph(t,h),i.State=l;class d{constructor(m,f){Dc(this,a),dh(this,n);let g=uk(m)[Rc];if(g.consumerAllowSignalWrites=!0,this[or]=g,g.wrapper=this,f){let v=f.equals;v&&(g.equal=v),g.watched=f[i.subtle.watched],g.unwatched=f[i.subtle.unwatched]}}get(){if(!(0,i.isComputed)(this))throw new TypeError("Wrong receiver type for Signal.Computed.prototype.get");return Mg(this[or])}}n=or,a=new WeakSet,s=function(){},i.isComputed=h=>typeof h=="object"&&ph(a,h),i.Computed=d,(h=>{var m,f,b,g,v;function x(T){let L,W=null;try{W=Ia(null),L=T()}finally{Ia(W)}return L}h.untrack=x;function _(T){var L;if(!(0,i.isComputed)(T)&&!(0,i.isWatcher)(T))throw new TypeError("Called introspectSources without a Computed or Watcher argument");return((L=T[or].producerNode)==null?void 0:L.map(W=>W.wrapper))??[]}h.introspectSources=_;function $(T){var L;if(!(0,i.isComputed)(T)&&!(0,i.isState)(T))throw new TypeError("Called introspectSinks without a Signal argument");return((L=T[or].liveConsumerNode)==null?void 0:L.map(W=>W.wrapper))??[]}h.introspectSinks=$;function N(T){if(!(0,i.isComputed)(T)&&!(0,i.isState)(T))throw new TypeError("Called hasSinks without a Signal argument");let L=T[or].liveConsumerNode;return L?L.length>0:!1}h.hasSinks=N;function G(T){if(!(0,i.isComputed)(T)&&!(0,i.isWatcher)(T))throw new TypeError("Called hasSources without a Computed or Watcher argument");let L=T[or].producerNode;return L?L.length>0:!1}h.hasSources=G;class I{constructor(L){Dc(this,f),Dc(this,g),dh(this,m);let W=Object.create(gh);W.wrapper=this,W.consumerMarkedDirty=L,W.consumerIsAlwaysLive=!0,W.consumerAllowSignalWrites=!1,W.producerNode=[],this[or]=W}watch(...L){if(!(0,i.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");Tg(this,g,v).call(this,L);let W=this[or];W.dirty=!1;let tt=Ia(W);for(let dt of L)Oc(dt[or]);Ia(tt)}unwatch(...L){if(!(0,i.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");Tg(this,g,v).call(this,L);let W=this[or];Da(W);for(let tt=W.producerNode.length-1;tt>=0;tt--)if(L.includes(W.producerNode[tt].wrapper)){Pc(W.producerNode[tt],W.producerIndexOfThis[tt]);let dt=W.producerNode.length-1;if(W.producerNode[tt]=W.producerNode[dt],W.producerIndexOfThis[tt]=W.producerIndexOfThis[dt],W.producerNode.length--,W.producerIndexOfThis.length--,W.nextProducerIndex--,tt<W.producerNode.length){let gt=W.producerIndexOfThis[tt],_t=W.producerNode[tt];bh(_t),_t.liveConsumerIndexOfThis[gt]=tt}}}getPending(){if(!(0,i.isWatcher)(this))throw new TypeError("Called getPending without Watcher receiver");return this[or].producerNode.filter(W=>W.dirty).map(W=>W.wrapper)}}m=or,f=new WeakSet,b=function(){},g=new WeakSet,v=function(T){for(let L of T)if(!(0,i.isComputed)(L)&&!(0,i.isState)(L))throw new TypeError("Called watch/unwatch without a Computed or State argument")},i.isWatcher=T=>ph(f,T),h.Watcher=I;function w(){var T;return(T=ik())==null?void 0:T.wrapper}h.currentComputed=w,h.watched=Symbol("watched"),h.unwatched=Symbol("unwatched")})(i.subtle||(i.subtle={}))})(Kt||(Kt={}));var vh=!1,Ig=new Kt.subtle.Watcher(()=>{vh||(vh=!0,queueMicrotask(()=>{vh=!1;for(let i of Ig.getPending())i.get();Ig.watch()}))}),_k=Symbol("SignalWatcherBrand"),kk=new FinalizationRegistry(i=>{i.unwatch(...Kt.subtle.introspectSources(i))}),Dg=new WeakMap;function Hc(i){return i[_k]===!0?(console.warn("SignalWatcher should not be applied to the same class more than once."),i):class extends i{constructor(){super(...arguments),this._$St=new Map,this._$So=new Kt.State(0),this._$Si=!1}_$Sl(){var o,t;let r=[],n=[];this._$St.forEach((s,l)=>{(s?.beforeUpdate?r:n).push(l)});let a=(o=this.h)===null||o===void 0?void 0:o.getPending().filter(s=>s!==this._$Su&&!this._$St.has(s));r.forEach(s=>s.get()),(t=this._$Su)===null||t===void 0||t.get(),a.forEach(s=>s.get()),n.forEach(s=>s.get())}_$Sv(){this.isUpdatePending||queueMicrotask(()=>{this.isUpdatePending||this._$Sl()})}_$S_(){if(this.h!==void 0)return;this._$Su=new Kt.Computed(()=>{this._$So.get(),super.performUpdate()});let o=this.h=new Kt.subtle.Watcher(function(){let t=Dg.get(this);t!==void 0&&(t._$Si===!1&&(new Set(this.getPending()).has(t._$Su)?t.requestUpdate():t._$Sv()),this.watch())});Dg.set(o,this),kk.register(this,o),o.watch(this._$Su),o.watch(...Array.from(this._$St).map(([t])=>t))}_$Sp(){if(this.h===void 0)return;let o=!1;this.h.unwatch(...Kt.subtle.introspectSources(this.h).filter(t=>{var r;let n=((r=this._$St.get(t))===null||r===void 0?void 0:r.manualDispose)!==!0;return n&&this._$St.delete(t),o||(o=!n),n})),o||(this._$Su=void 0,this.h=void 0,this._$St.clear())}updateEffect(o,t){var r;this._$S_();let n=new Kt.Computed(()=>{o()});return this.h.watch(n),this._$St.set(n,t),(r=t?.beforeUpdate)!==null&&r!==void 0&&r?Kt.subtle.untrack(()=>n.get()):this.updateComplete.then(()=>Kt.subtle.untrack(()=>n.get())),()=>{this._$St.delete(n),this.h.unwatch(n),this.isConnected===!1&&this._$Sp()}}performUpdate(){this.isUpdatePending&&(this._$S_(),this._$Si=!0,this._$So.set(this._$So.get()+1),this._$Si=!1,this._$Sl())}connectedCallback(){super.connectedCallback(),this.requestUpdate()}disconnectedCallback(){super.disconnectedCallback(),queueMicrotask(()=>{this.isConnected===!1&&this._$Sp()})}}}var{I:Ck}=tg,Ng=i=>i;var Fc=i=>i.strings===void 0,Rg=()=>document.createComment(""),Na=(i,o,t)=>{let r=i._$AA.parentNode,n=o===void 0?i._$AB:o._$AA;if(t===void 0){let a=r.insertBefore(Rg(),n),s=r.insertBefore(Rg(),n);t=new Ck(a,s,i,i.options)}else{let a=t._$AB.nextSibling,s=t._$AM,l=s!==i;if(l){let d;t._$AQ?.(i),t._$AM=i,t._$AP!==void 0&&(d=i._$AU)!==s._$AU&&t._$AP(d)}if(a!==n||l){let d=t._$AA;for(;d!==a;){let h=Ng(d).nextSibling;Ng(r).insertBefore(d,n),d=h}}}return t},ni=(i,o,t=i)=>(i._$AI(o,t),i),Sk={},Ra=(i,o=Sk)=>i._$AH=o,Og=i=>i._$AH,Bc=i=>{i._$AR(),i._$AA.remove()};var Js=(i,o)=>{let t=i._$AN;if(t===void 0)return!1;for(let r of t)r._$AO?.(o,!1),Js(r,o);return!0},Vc=i=>{let o,t;do{if((o=i._$AM)===void 0)break;t=o._$AN,t.delete(i),i=o}while(t?.size===0)},Pg=i=>{for(let o;o=i._$AM;i=o){let t=o._$AN;if(t===void 0)o._$AN=t=new Set;else if(t.has(i))break;t.add(i),$k(o)}};function Ek(i){this._$AN!==void 0?(Vc(this),this._$AM=i,Pg(this)):this._$AM=i}function Tk(i,o=!1,t=0){let r=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(o)if(Array.isArray(r))for(let a=t;a<r.length;a++)Js(r[a],!1),Vc(r[a]);else r!=null&&(Js(r,!1),Vc(r));else Js(this,i)}var $k=i=>{i.type==rr.CHILD&&(i._$AP??(i._$AP=Tk),i._$AQ??(i._$AQ=Ek))},ii=class extends Ye{constructor(){super(...arguments),this._$AN=void 0}_$AT(o,t,r){super._$AT(o,t,r),Pg(this),this.isConnected=o._$AU}_$AO(o,t=!0){o!==this.isConnected&&(this.isConnected=o,o?this.reconnected?.():this.disconnected?.()),t&&(Js(this,o),Vc(this))}setValue(o){if(Fc(this._$Ct))this._$Ct._$AI(o,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=o,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}};var xh=!1,yh=new Kt.subtle.Watcher(async()=>{xh||(xh=!0,queueMicrotask(()=>{xh=!1;for(let i of yh.getPending())i.get();yh.watch()}))}),Uc=class extends ii{_$S_(){var o,t;this._$Sm===void 0&&(this._$Sj=new Kt.Computed(()=>{var r;let n=(r=this._$SW)===null||r===void 0?void 0:r.get();return this.setValue(n),n}),this._$Sm=(t=(o=this._$Sk)===null||o===void 0?void 0:o.h)!==null&&t!==void 0?t:yh,this._$Sm.watch(this._$Sj),Kt.subtle.untrack(()=>{var r;return(r=this._$Sj)===null||r===void 0?void 0:r.get()}))}_$Sp(){this._$Sm!==void 0&&(this._$Sm.unwatch(this._$SW),this._$Sm=void 0)}render(o){return Kt.subtle.untrack(()=>o.get())}update(o,[t]){var r,n;return(r=this._$Sk)!==null&&r!==void 0||(this._$Sk=(n=o.options)===null||n===void 0?void 0:n.host),t!==this._$SW&&this._$SW!==void 0&&this._$Sp(),this._$SW=t,this._$S_(),Kt.subtle.untrack(()=>this._$SW.get())}disconnected(){this._$Sp()}reconnected(){this._$S_()}},zh=ae(Uc);var wh=i=>(o,...t)=>i(o,...t.map(r=>r instanceof Kt.State||r instanceof Kt.Computed?zh(r):r)),Ak=wh(u),Lk=wh(Io);var mI=Kt.State,fI=Kt.Computed,Hg=(i,o)=>new Kt.State(i,o);function Bg(){return typeof document>"u"?"light":document.documentElement.getAttribute("t")||document.body.getAttribute("t")||"light"}var jc=Hg(Bg()),Fg=!1;function qk(){Fg||typeof window>"u"||(Fg=!0,window.addEventListener("theme-change",i=>{let o=i.detail,t;typeof o=="string"?t=o:o&&typeof o=="object"&&"theme"in o&&typeof o.theme=="string"?t=o.theme:t=Bg(),t!==jc.get()&&jc.set(t)}))}qk();var Mk=Hc(oi),C=class extends Mk{willUpdate(o){this.t=jc.get(),super.willUpdate(o)}static define(o,t=this,r={}){let n=customElements.get(o);if(!n){customElements.define(o,class extends t{},r);return}let a=" (unknown version)",s=a;"version"in t&&t.version&&typeof t.version=="string"&&(a=` v${t.version}`),"version"in n&&n.version&&typeof n.version=="string"&&(s=` v${n.version}`),!(a&&s&&a===s)&&console.warn(`Attempted to register <${o}>${a} but it is already registered as <${o}>${s}.`)}constructor(){super(),Object.entries(this.constructor.dependencies).forEach(([o,t])=>{this.constructor.define(o,t)})}emit(o,t){let r=new CustomEvent(o,{bubbles:!0,cancelable:!0,composed:!0,detail:{element:this},...t});return this.dispatchEvent(r),r}};C.dependencies={},c([p()],C.prototype,"dir",2),c([p()],C.prototype,"lang",2),c([p({reflect:!0})],C.prototype,"t",2);var Xi=class extends Ye{constructor(o){if(super(o),this.it=V,o.type!==rr.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(o){if(o===V||o==null)return this._t=void 0,this.it=o;if(o===ie)return o;if(typeof o!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(o===this.it)return this._t;this.it=o;let t=[o];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};Xi.directiveName="unsafeHTML",Xi.resultType=1;var Xe=ae(Xi);function mo(i,o){return new Promise(t=>{function r(n){n.target===i&&(i.removeEventListener(o,r),t())}i.addEventListener(o,r)})}var _h=class{constructor(){this.openDropdowns=new Set;this.openTooltips=new Set}registerDropdown(o){this.openDropdowns.add(o)}unregisterDropdown(o){this.openDropdowns.delete(o)}isDropdownOpen(){return this.openDropdowns.size>0}registerTooltip(o){this.openTooltips.add(o)}unregisterTooltip(o){this.openTooltips.delete(o)}isTooltipOpen(){return this.openTooltips.size>0}},Ik=new _h,Do=Ik;var Vg=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:inline-block}.dropdown::part(popup){z-index:var(--zn-z-index-dropdown)}`;var be=class extends C{constructor(){super(...arguments);this.open=!1;this.placement="bottom-start";this.disabled=!1;this.stayOpenOnSelect=!1;this.distance=0;this.skidding=0;this.hoist=!0;this.sync=void 0;this.fetchedContent="";this.handlePanelSelect=t=>{let r=t.target;!this.stayOpenOnSelect&&r.tagName.toLowerCase()==="zn-menu"&&(this.hide().then(n=>n),this.focusOnTrigger())};this.handlePreload=()=>{this.preloadContent().then(t=>t)}}connectedCallback(){super.connectedCallback(),this.containingElement||(this.containingElement=this)}focusOnTrigger(){let t=this.trigger?.assignedElements({flatten:!0})[0];typeof t?.focus=="function"&&t.focus()}firstUpdated(t){this.panel.hidden=!this.open,this.open&&(this.addOpenListeners(),this.popup.active=!0),super.firstUpdated(t)}disconnectedCallback(){super.disconnectedCallback(),this.removeOpenListeners(),this.hide().then(t=>t)}getMenu(){return this.panel.assignedElements({flatten:!0}).find(t=>t.tagName.toLowerCase()==="zn-menu")}addOpenListeners(){this.panel.addEventListener("zn-select",this.handlePanelSelect),"CloseWatcher"in window?(this.closeWatcher?.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>{this.hide().then(t=>t),this.focusOnTrigger()}):this.panel.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keydown",this.handleDocumentKeyDown.bind(this)),document.addEventListener("mousedown",this.handleDocumentMouseDown.bind(this)),this.closeWatcher?.destroy()}removeOpenListeners(){this.panel&&(this.panel.removeEventListener("zn-select",this.handlePanelSelect),this.panel.removeEventListener("keydown",this.handleKeyDown)),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown),this.closeWatcher?.destroy()}async preloadContent(){if(this.uri&&!this.fetchedContent){let t=await fetch(this.uri,{credentials:"same-origin",headers:{"x-kx-inline":"inline"}});this.fetchedContent=await t.text(),this.requestUpdate()}}async handleTriggerClick(){this.open?await this.hide():(await this.show(),this.focusOnTrigger())}handleKeyDown(t){this.open&&t.key==="Escape"&&(t.stopPropagation(),this.hide().then(r=>r),this.focusOnTrigger())}async handleTriggerKeyDown(t){if([" ","Enter","Tab"].includes(t.key)){t.preventDefault(),await this.handleTriggerClick();return}let r=this.getMenu();if(r){let n=r.getAllItems(),a=n[0],s=n[n.length-1];["ArrowDown","ArrowUp","Home","End"].includes(t.key)&&(t.preventDefault(),this.open||(this.show().then(l=>l),await this.updateComplete),n.length>0&&this.updateComplete.then(()=>{(t.key==="ArrowDown"||t.key==="Home")&&(r.setCurrentItem(a),a.focus()),(t.key==="ArrowUp"||t.key==="End")&&(r.setCurrentItem(s),s.focus())}))}}handleTriggerKeyUp(t){t.key===" "&&t.preventDefault()}handleTriggerSlotChange(){this.updateAccessibleTrigger()}handleDocumentMouseDown(t){let r=t.composedPath();this.containingElement&&!r.includes(this.containingElement)&&this.hide().then(n=>n)}handleDocumentKeyDown(t){if(t.key==="Escape"&&this.open&&!this.closeWatcher){t.stopPropagation(),this.focusOnTrigger(),this.hide().then(r=>r);return}if(t.key==="Tab"){if(this.open){t.preventDefault(),this.hide().then(r=>r),this.focusOnTrigger();return}setTimeout(()=>{let r=this.containingElement?.getRootNode()instanceof ShadowRoot?document.activeElement?.shadowRoot?.activeElement:document.activeElement;(!this.containingElement||r?.closest(this.containingElement.tagName.toLowerCase())!==this.containingElement)&&this.hide().then(n=>n)})}}async show(){if(!this.open)return this.open=!0,mo(this,"zn-after-show")}async hide(){if(this.open)return this.open=!1,mo(this,"zn-after-hide")}reposition(){this.popup.reposition()}updateAccessibleTrigger(){let r=this.trigger.assignedElements({flatten:!0}).find(a=>sg(a).start),n=null;r&&(r.tagName.toLowerCase()==="zn-button"?n=r.button:n=r),n&&(n.setAttribute("aria-haspopup","true"),n.setAttribute("aria-expanded",this.open.toString()))}handleOpenChange(){if(this.disabled){this.open=!1;return}if(this.updateAccessibleTrigger(),this.open)this.emit("zn-show"),Do.registerDropdown(this),this.addOpenListeners(),this.panel.hidden=!1,this.popup.active=!0,this.panel.focus(),this.emit("zn-after-show");else{this.emit("zn-hide"),Do.unregisterDropdown(this),this.removeOpenListeners();let t=this.getRootNode().activeElement;t&&this.panel.assignedElements({flatten:!0}).some(r=>r.contains(t))&&(this.focusOnTrigger(),t.blur()),this.panel.blur(),this.panel.hidden=!0,this.popup.active=!1,this.emit("zn-after-hide")}}render(){return u`
|
|
6
6
|
<zn-popup
|
|
7
7
|
part="base"
|
|
8
8
|
exportparts="popup:base__popup"
|
|
@@ -31,7 +31,7 @@ import{a as En,b as E_,c as pr,d as c,e as B}from"./chunks/zn.UBLZO6CI.js";var b
|
|
|
31
31
|
></slot>
|
|
32
32
|
|
|
33
33
|
<div aria-hidden=${this.open?"false":"true"} ?inert=${!this.open} aria-labelledby="dropdown">
|
|
34
|
-
${this.fetchedContent?
|
|
34
|
+
${this.fetchedContent?Xe(this.fetchedContent):""}
|
|
35
35
|
<slot part="panel" class="dropdown__panel"></slot>
|
|
36
36
|
</div>
|
|
37
37
|
</zn-popup>
|
|
@@ -135,7 +135,7 @@ import{a as En,b as E_,c as pr,d as c,e as B}from"./chunks/zn.UBLZO6CI.js";var b
|
|
|
135
135
|
${this.loadingText}<span class="loading-countdown"></span>
|
|
136
136
|
</span>
|
|
137
137
|
</div>
|
|
138
|
-
`:null}`}};lt.styles=E(Xg),lt.dependencies={"zn-tooltip":No,"zn-icon":ct},c([F(".button")],lt.prototype,"button",2),c([Ma(".loading-countdown")],lt.prototype,"countdownContainer",2),c([p({})],lt.prototype,"color",2),c([p({attribute:"hover-color"})],lt.prototype,"hoverColor",2),c([p({type:Boolean})],lt.prototype,"text",2),c([p({type:Boolean})],lt.prototype,"outline",2),c([p({type:Boolean})],lt.prototype,"disabled",2),c([p({type:Boolean})],lt.prototype,"grow",2),c([p({type:Boolean})],lt.prototype,"square",2),c([p({attribute:"icon-button",converter:{fromAttribute:t=>t==="small"||t==="round"?t:t!==null,toAttribute:t=>t==="small"||t==="round"?t:t?"":null}})],lt.prototype,"iconButton",2),c([p({type:Boolean})],lt.prototype,"plain",2),c([p({type:Boolean,attribute:"no-hover"})],lt.prototype,"noHover",2),c([p({type:Boolean,attribute:"panel-bg"})],lt.prototype,"panelBackground",2),c([p({attribute:"dropdown-closer",type:Boolean})],lt.prototype,"dropdownCloser",2),c([p({type:Number})],lt.prototype,"notification",2),c([p({attribute:"muted-notifications",type:Boolean})],lt.prototype,"mutedNotifications",2),c([p()],lt.prototype,"verticalAlign",2),c([p()],lt.prototype,"content",2),c([p()],lt.prototype,"icon",2),c([p()],lt.prototype,"gaid",2),c([p({attribute:"icon-position"})],lt.prototype,"iconPosition",2),c([p({attribute:"icon-size"})],lt.prototype,"iconSize",2),c([p({attribute:"icon-color"})],lt.prototype,"iconColor",2),c([p({attribute:"icon-fill"})],lt.prototype,"iconFill",2),c([p({attribute:"icon-library"})],lt.prototype,"iconLibrary",2),c([p()],lt.prototype,"type",2),c([p()],lt.prototype,"name",2),c([p()],lt.prototype,"value",2),c([p()],lt.prototype,"form",2),c([p({attribute:"formaction"})],lt.prototype,"formAction",2),c([p({attribute:"formenctype"})],lt.prototype,"formEnctype",2),c([p({attribute:"formmethod"})],lt.prototype,"formMethod",2),c([p({attribute:"formnovalidate",type:Boolean})],lt.prototype,"formNoValidate",2),c([p({attribute:"formtarget"})],lt.prototype,"formTarget",2),c([p()],lt.prototype,"href",2),c([p()],lt.prototype,"target",2),c([p({attribute:"data-target"})],lt.prototype,"dataTarget",2),c([p()],lt.prototype,"rel",2),c([p()],lt.prototype,"tooltip",2),c([p({type:Boolean,attribute:"auto-click"})],lt.prototype,"autoClick",2),c([p({type:Number,attribute:"auto-click-delay"})],lt.prototype,"autoClickDelay",2),c([p({type:String,attribute:"loading-text"})],lt.prototype,"loadingText",2),c([p({type:String,attribute:"loading-text-position"})],lt.prototype,"loadingTextPosition",2),c([p({type:Boolean})],lt.prototype,"loading",2),c([K("autoClick")],lt.prototype,"handleAutoClickChange",1);var Ct=lt;lt.define("zn-button");var Lt=class{constructor(o,{target:t,config:r,callback:n,skipInitial:a}){this.t=new Set,this.o=!1,this.i=!1,this.h=o,t!==null&&this.t.add(t??o),this.l=r,this.o=a??this.o,this.callback=n,window.MutationObserver?(this.u=new MutationObserver(s=>{this.handleChanges(s),this.h.requestUpdate()}),o.addController(this)):console.warn("MutationController error: browser does not support MutationObserver.")}handleChanges(o){this.value=this.callback?.(o,this.u)}hostConnected(){for(let o of this.t)this.observe(o)}hostDisconnected(){this.disconnect()}async hostUpdated(){let o=this.u.takeRecords();(o.length||!this.o&&this.i)&&this.handleChanges(o),this.i=!1}observe(o){this.t.add(o),this.u.observe(o,this.l),this.i=!0,this.h.requestUpdate()}disconnect(){this.u.disconnect()}};var Pa=class extends C{constructor(){super(),new Lt(this,{config:{childList:!0,subtree:!0,attributes:!0,characterData:!0},callback:()=>this.resize(),skipInitial:!0})}firstUpdated(o){super.firstUpdated(o),this.resize()}resize(){let o=0;Array.from(this.children).forEach(t=>{o+=t.getBoundingClientRect().height}),this.style.minHeight=o+"px"}createRenderRoot(){return this}};var Dk=Pa;Pa.define("zn-absolute-container");var on=Math.min,Ro=Math.max,el=Math.round,rl=Math.floor,nn=i=>({x:i,y:i}),Nk={left:"right",right:"left",bottom:"top",top:"bottom"};function Sh(i,o,t){return Ro(i,on(o,t))}function Qi(i,o){return typeof i=="function"?i(o):i}function si(i){return i.split("-")[0]}function Ji(i){return i.split("-")[1]}function Eh(i){return i==="x"?"y":"x"}function Wc(i){return i==="y"?"height":"width"}function an(i){let o=i[0];return o==="t"||o==="b"?"y":"x"}function Kc(i){return Eh(an(i))}function Zg(i,o,t){t===void 0&&(t=!1);let r=Ji(i),n=Kc(i),a=Wc(n),s=n==="x"?r===(t?"end":"start")?"right":"left":r==="start"?"bottom":"top";return o.reference[a]>o.floating[a]&&(s=tl(s)),[s,tl(s)]}function tb(i){let o=tl(i);return[Gc(i),o,Gc(o)]}function Gc(i){return i.includes("start")?i.replace("start","end"):i.replace("end","start")}var Qg=["left","right"],Jg=["right","left"],Rk=["top","bottom"],Ok=["bottom","top"];function Pk(i,o,t){switch(i){case"top":case"bottom":return t?o?Jg:Qg:o?Qg:Jg;case"left":case"right":return o?Rk:Ok;default:return[]}}function eb(i,o,t,r){let n=Ji(i),a=Pk(si(i),t==="start",r);return n&&(a=a.map(s=>s+"-"+n),o&&(a=a.concat(a.map(Gc)))),a}function tl(i){let o=si(i);return Nk[o]+i.slice(o.length)}function Hk(i){var o,t,r,n;return{top:(o=i.top)!=null?o:0,right:(t=i.right)!=null?t:0,bottom:(r=i.bottom)!=null?r:0,left:(n=i.left)!=null?n:0}}function Th(i){return typeof i!="number"?Hk(i):{top:i,right:i,bottom:i,left:i}}function Zi(i){let{x:o,y:t,width:r,height:n}=i;return{width:r,height:n,top:t,left:o,right:o+r,bottom:t+n,x:o,y:t}}function rb(i,o,t){let{reference:r,floating:n}=i,a=an(o),s=Kc(o),l=Wc(s),d=si(o),h=a==="y",m=r.x+r.width/2-n.width/2,f=r.y+r.height/2-n.height/2,b=r[l]/2-n[l]/2,g;switch(d){case"top":g={x:m,y:r.y-n.height};break;case"bottom":g={x:m,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:f};break;case"left":g={x:r.x-n.width,y:f};break;default:g={x:r.x,y:r.y}}let v=Ji(o);return v&&(g[s]+=b*(v==="end"?1:-1)*(t&&h?-1:1)),g}async function ob(i,o){var t;o===void 0&&(o={});let{x:r,y:n,platform:a,rects:s,elements:l,strategy:d}=i,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:f="floating",altBoundary:b=!1,padding:g=0}=Qi(o,i),v=Th(g),_=l[b?f==="floating"?"reference":"floating":f],$=Zi(await a.getClippingRect({element:(t=await(a.isElement==null?void 0:a.isElement(_)))==null||t?_:_.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:h,rootBoundary:m,strategy:d})),N=f==="floating"?{x:r,y:n,width:s.floating.width,height:s.floating.height}:s.reference,G=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),I=await(a.isElement==null?void 0:a.isElement(G))&&await(a.getScale==null?void 0:a.getScale(G))||{x:1,y:1},w=Zi(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:N,offsetParent:G,strategy:d}):N);return{top:($.top-w.top+v.top)/I.y,bottom:(w.bottom-$.bottom+v.bottom)/I.y,left:($.left-w.left+v.left)/I.x,right:(w.right-$.right+v.right)/I.x}}var Fk=50,nb=async(i,o,t)=>{let{placement:r="bottom",strategy:n="absolute",middleware:a=[],platform:s}=t,l=s.detectOverflow?s:{...s,detectOverflow:ob},d=await(s.isRTL==null?void 0:s.isRTL(o)),h=await s.getElementRects({reference:i,floating:o,strategy:n}),{x:m,y:f}=rb(h,r,d),b=r,g=0,v={};for(let x=0;x<a.length;x++){let _=a[x];if(!_)continue;let{name:$,fn:N}=_,{x:G,y:I,data:w,reset:T}=await N({x:m,y:f,initialPlacement:r,placement:b,strategy:n,middlewareData:v,rects:h,platform:l,elements:{reference:i,floating:o}});m=G??m,f=I??f,v[$]={...v[$],...w},T&&g<Fk&&(g++,typeof T=="object"&&(T.placement&&(b=T.placement),T.rects&&(h=T.rects===!0?await s.getElementRects({reference:i,floating:o,strategy:n}):T.rects),{x:m,y:f}=rb(h,b,d)),x=-1)}return{x:m,y:f,placement:b,strategy:n,middlewareData:v}},ib=i=>({name:"arrow",options:i,async fn(o){let{x:t,y:r,placement:n,rects:a,platform:s,elements:l,middlewareData:d}=o,{element:h,padding:m=0}=Qi(i,o)||{};if(h==null)return{};let f=Th(m),b={x:t,y:r},g=Kc(n),v=Wc(g),x=await s.getDimensions(h),_=g==="y",$=_?"top":"left",N=_?"bottom":"right",G=_?"clientHeight":"clientWidth",I=a.reference[v]+a.reference[g]-b[g]-a.floating[v],w=b[g]-a.reference[g],T=await(s.getOffsetParent==null?void 0:s.getOffsetParent(h)),L=T?T[G]:0;(!L||!await(s.isElement==null?void 0:s.isElement(T)))&&(L=l.floating[G]||a.floating[v]);let W=I/2-w/2,tt=L/2-x[v]/2-1,dt=on(f[$],tt),gt=on(f[N],tt),_t=L-x[v]-gt,Nt=L/2-x[v]/2+W,ze=Sh(dt,Nt,_t),Ke=!d.arrow&&Ji(n)!=null&&Nt!==ze&&a.reference[v]/2-(Nt<dt?dt:gt)-x[v]/2<0,cr=Ke?Nt<dt?Nt-dt:Nt-_t:0;return{[g]:b[g]+cr,data:{[g]:ze,centerOffset:Nt-ze-cr,...Ke&&{alignmentOffset:cr}},reset:Ke}}});var ab=function(i){return i===void 0&&(i={}),{name:"flip",options:i,async fn(o){var t,r;let{placement:n,middlewareData:a,rects:s,initialPlacement:l,platform:d,elements:h}=o,{mainAxis:m=!0,crossAxis:f=!0,fallbackPlacements:b,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:x=!0,..._}=Qi(i,o);if((t=a.arrow)!=null&&t.alignmentOffset)return{};let $=si(n),N=an(l),G=si(l)===l,I=await(d.isRTL==null?void 0:d.isRTL(h.floating)),w=b||(G||!x?[tl(l)]:tb(l)),T=v!=="none";!b&&T&&w.push(...eb(l,x,v,I));let L=[l,...w],W=await d.detectOverflow(o,_),tt=[],dt=((r=a.flip)==null?void 0:r.overflows)||[];if(m&&tt.push(W[$]),f){let ze=Zg(n,s,I);tt.push(W[ze[0]],W[ze[1]])}if(dt=[...dt,{placement:n,overflows:tt}],!tt.every(ze=>ze<=0)){var gt,_t;let ze=(((gt=a.flip)==null?void 0:gt.index)||0)+1,Ke=L[ze];if(Ke&&(!(f==="alignment"?N!==an(Ke):!1)||dt.every(Ye=>an(Ye.placement)===N?Ye.overflows[0]>0:!0)))return{data:{index:ze,overflows:dt},reset:{placement:Ke}};let cr=(_t=dt.filter($e=>$e.overflows[0]<=0).sort(($e,Ye)=>$e.overflows[1]-Ye.overflows[1])[0])==null?void 0:_t.placement;if(!cr)switch(g){case"bestFit":{var Nt;let $e=(Nt=dt.filter(Ye=>{if(T){let we=an(Ye.placement);return we===N||we==="y"}return!0}).map(Ye=>[Ye.placement,Ye.overflows.filter(we=>we>0).reduce((we,ti)=>we+ti,0)]).sort((Ye,we)=>Ye[1]-we[1])[0])==null?void 0:Nt[0];$e&&(cr=$e);break}case"initialPlacement":cr=l;break}if(n!==cr)return{reset:{placement:cr}}}return{}}}};var Bk=new Set(["left","top"]);async function Vk(i,o){let{placement:t,platform:r,elements:n}=i,a=await(r.isRTL==null?void 0:r.isRTL(n.floating)),s=si(t),l=Ji(t),d=an(t)==="y",h=Bk.has(s)?-1:1,m=a&&d?-1:1,f=Qi(o,i),{mainAxis:b,crossAxis:g,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof v=="number"&&(g=l==="end"?v*-1:v),d?{x:g*m,y:b*h}:{x:b*h,y:g*m}}var sb=function(i){return i===void 0&&(i=0),{name:"offset",options:i,async fn(o){var t,r;let{x:n,y:a,placement:s,middlewareData:l}=o,d=await Vk(o,i);return s===((t=l.offset)==null?void 0:t.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:n+d.x,y:a+d.y,data:{...d,placement:s}}}}},lb=function(i){return i===void 0&&(i={}),{name:"shift",options:i,async fn(o){let{x:t,y:r,placement:n,platform:a}=o,{mainAxis:s=!0,crossAxis:l=!1,limiter:d={fn:N=>{let{x:G,y:I}=N;return{x:G,y:I}}},...h}=Qi(i,o),m={x:t,y:r},f=await a.detectOverflow(o,h),b=an(n),g=Eh(b),v=m[g],x=m[b],_=(N,G)=>Sh(G+f[N==="y"?"top":"left"],G,G-f[N==="y"?"bottom":"right"]);s&&(v=_(g,v)),l&&(x=_(b,x));let $=d.fn({...o,[g]:v,[b]:x});return{...$,data:{x:$.x-t,y:$.y-r,enabled:{[g]:s,[b]:l}}}}}};var cb=function(i){return i===void 0&&(i={}),{name:"size",options:i,async fn(o){let{placement:t,rects:r,platform:n,elements:a}=o,{apply:s=()=>{},...l}=Qi(i,o),d=await n.detectOverflow(o,l),h=si(t),m=Ji(t),f=an(t)==="y",{width:b,height:g}=r.floating,v,x;h==="top"||h==="bottom"?(v=h,x=m===(await(n.isRTL==null?void 0:n.isRTL(a.floating))?"start":"end")?"left":"right"):(x=h,v=m==="end"?"top":"bottom");let _=g-d.top-d.bottom,$=b-d.left-d.right,N=on(g-d[v],_),G=on(b-d[x],$),I=o.middlewareData.shift,w=!I,T=N,L=G;I!=null&&I.enabled.x&&(L=$),I!=null&&I.enabled.y&&(T=_),w&&!m&&(f?L=b-2*Ro(d.left,d.right):T=g-2*Ro(d.top,d.bottom)),await s({...o,availableWidth:L,availableHeight:T});let W=await n.getDimensions(a.floating);return b!==W.width||g!==W.height?{reset:{rects:!0}}:{}}}};function Yc(){return typeof window<"u"}function ea(i){return pb(i)?(i.nodeName||"").toLowerCase():"#document"}function kr(i){var o;return(i==null||(o=i.ownerDocument)==null?void 0:o.defaultView)||window}function sn(i){var o;return(o=(pb(i)?i.ownerDocument:i.document)||window.document)==null?void 0:o.documentElement}function pb(i){return Yc()?i instanceof Node||i instanceof kr(i).Node:!1}function Oo(i){return Yc()?i instanceof Element||i instanceof kr(i).Element:!1}function Ln(i){return Yc()?i instanceof HTMLElement||i instanceof kr(i).HTMLElement:!1}function db(i){return!Yc()||typeof ShadowRoot>"u"?!1:i instanceof ShadowRoot||i instanceof kr(i).ShadowRoot}function ol(i){let{overflow:o,overflowX:t,overflowY:r,display:n}=Po(i);return/auto|scroll|overlay|hidden|clip/.test(o+r+t)&&n!=="inline"&&n!=="contents"}function hb(i){return/^(table|td|th)$/.test(ea(i))}function nl(i){try{if(i.matches(":popover-open"))return!0}catch{}try{return i.matches(":modal")}catch{return!1}}var Uk=/transform|translate|scale|rotate|perspective|filter/,jk=/paint|layout|strict|content/,ta=i=>!!i&&i!=="none",$h;function Fa(i){let o=Oo(i)?Po(i):i;return ta(o.transform)||ta(o.translate)||ta(o.scale)||ta(o.rotate)||ta(o.perspective)||!Xc()&&(ta(o.backdropFilter)||ta(o.filter))||Uk.test(o.willChange||"")||jk.test(o.contain||"")}function ub(i){let o=li(i);for(;Ln(o)&&!Ba(o);){if(Fa(o))return o;if(nl(o))return null;o=li(o)}return null}function Xc(){return $h==null&&($h=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),$h}function Ba(i){return/^(html|body|#document)$/.test(ea(i))}function Po(i){return kr(i).getComputedStyle(i)}function il(i){return Oo(i)?{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}:{scrollLeft:i.scrollX,scrollTop:i.scrollY}}function li(i){if(ea(i)==="html")return i;let o=i.assignedSlot||i.parentNode||db(i)&&i.host||sn(i);return db(o)?o.host:o}function mb(i){let o=li(i);return Ba(o)?(i.ownerDocument||i).body:Ln(o)&&ol(o)?o:mb(o)}function Ha(i,o,t){var r;o===void 0&&(o=[]),t===void 0&&(t=!0);let n=mb(i),a=n===((r=i.ownerDocument)==null?void 0:r.body),s=kr(n);if(a){let l=Qc(s);return o.concat(s,s.visualViewport||[],ol(n)?n:[],l&&t?Ha(l):[])}else return o.concat(n,Ha(n,[],t))}function Qc(i){return i.parent&&Object.getPrototypeOf(i.parent)?i.frameElement:null}function bb(i){let o=Po(i),t=parseFloat(o.width)||0,r=parseFloat(o.height)||0,n=Ln(i),a=n?i.offsetWidth:t,s=n?i.offsetHeight:r,l=el(t)!==a||el(r)!==s;return l&&(t=a,r=s),{width:t,height:r,$:l}}function Lh(i){return Oo(i)?i:i.contextElement}function Va(i){let o=Lh(i);if(!Ln(o))return nn(1);let t=o.getBoundingClientRect(),{width:r,height:n,$:a}=bb(o),s=(a?el(t.width):t.width)/r,l=(a?el(t.height):t.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var Gk=nn(0);function vb(i){let o=kr(i);return!Xc()||!o.visualViewport?Gk:{x:o.visualViewport.offsetLeft,y:o.visualViewport.offsetTop}}function Wk(i,o,t){return o===void 0&&(o=!1),!!t&&o&&t===kr(i)}function ra(i,o,t,r){o===void 0&&(o=!1),t===void 0&&(t=!1);let n=i.getBoundingClientRect(),a=Lh(i),s=nn(1);o&&(r?Oo(r)&&(s=Va(r)):s=Va(i));let l=Wk(a,t,r)?vb(a):nn(0),d=(n.left+l.x)/s.x,h=(n.top+l.y)/s.y,m=n.width/s.x,f=n.height/s.y;if(a&&r){let b=kr(a),g=Oo(r)?kr(r):r,v=b,x=Qc(v);for(;x&&g!==v;){let _=Va(x),$=x.getBoundingClientRect(),N=Po(x),G=$.left+(x.clientLeft+parseFloat(N.paddingLeft))*_.x,I=$.top+(x.clientTop+parseFloat(N.paddingTop))*_.y;d*=_.x,h*=_.y,m*=_.x,f*=_.y,d+=G,h+=I,v=kr(x),x=Qc(v)}}return Zi({width:m,height:f,x:d,y:h})}function Jc(i,o){let t=il(i).scrollLeft;return o?o.left+t:ra(sn(i)).left+t}function xb(i,o){let t=i.getBoundingClientRect(),r=t.left+o.scrollLeft-Jc(i,t),n=t.top+o.scrollTop;return{x:r,y:n}}function Kk(i){let{elements:o,rect:t,offsetParent:r,strategy:n}=i,a=n==="fixed",s=sn(r),l=o?nl(o.floating):!1;if(r===s||l&&a)return t;let d={scrollLeft:0,scrollTop:0},h=nn(1),m=nn(0),f=Ln(r);if((f||!a)&&((ea(r)!=="body"||ol(s))&&(d=il(r)),f)){let g=ra(r);h=Va(r),m.x=g.x+r.clientLeft,m.y=g.y+r.clientTop}let b=s&&!f&&!a?xb(s,d):nn(0);return{width:t.width*h.x,height:t.height*h.y,x:t.x*h.x-d.scrollLeft*h.x+m.x+b.x,y:t.y*h.y-d.scrollTop*h.y+m.y+b.y}}function Yk(i){return i.getClientRects?Array.from(i.getClientRects()):[]}function Xk(i){let o=il(i),t=i.ownerDocument.body,r=Ro(i.scrollWidth,i.clientWidth,t.scrollWidth,t.clientWidth),n=Ro(i.scrollHeight,i.clientHeight,t.scrollHeight,t.clientHeight),a=-o.scrollLeft+Jc(i),s=-o.scrollTop;return Po(t).direction==="rtl"&&(a+=Ro(i.clientWidth,t.clientWidth)-r),{width:r,height:n,x:a,y:s}}var Qk=25;function Jk(i,o,t){t===void 0&&(t="viewport");let r=t==="layoutViewport",n=kr(i),a=sn(i),s=n.visualViewport,l=a.clientWidth,d=a.clientHeight,h=0,m=0;if(s){let b=!Xc()||o==="fixed";r?b||(h=-s.offsetLeft,m=-s.offsetTop):(l=s.width,d=s.height,b&&(h=s.offsetLeft,m=s.offsetTop))}if(Jc(a)<=0){let b=a.ownerDocument,g=b.body,v=getComputedStyle(g),x=b.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,_=Math.abs(a.clientWidth-g.clientWidth-x),$=getComputedStyle(a).scrollbarGutter==="stable both-edges"?_/2:_;$<=Qk&&(l-=$)}return{width:l,height:d,x:h,y:m}}function Zk(i,o){let t=ra(i,!0,o==="fixed"),r=t.top+i.clientTop,n=t.left+i.clientLeft,a=Va(i),s=i.clientWidth*a.x,l=i.clientHeight*a.y,d=n*a.x,h=r*a.y;return{width:s,height:l,x:d,y:h}}function fb(i,o,t){let r;if(o==="viewport"||o==="layoutViewport")r=Jk(i,t,o);else if(o==="document")r=Xk(sn(i));else if(Oo(o))r=Zk(o,t);else{let n=vb(i);r={x:o.x-n.x,y:o.y-n.y,width:o.width,height:o.height}}return Zi(r)}function t3(i,o){let t=o.get(i);if(t)return t;let r=Ha(i,[],!1).filter(l=>Oo(l)&&ea(l)!=="body"),n=null,a=Po(i).position==="fixed",s=a?li(i):i;for(;Oo(s)&&!Ba(s);){let l=Po(s),d=Fa(s),h=n?n.position:a?"fixed":"";!d&&(h==="fixed"||h==="absolute"&&l.position==="static")?r=r.filter(f=>f!==s):n=l,s=li(s)}return o.set(i,r),r}function e3(i){let{element:o,boundary:t,rootBoundary:r,strategy:n}=i,s=[...t==="clippingAncestors"?nl(o)?[]:t3(o,this._c):[].concat(t),r],l=fb(o,s[0],n),d=l.top,h=l.right,m=l.bottom,f=l.left;for(let b=1;b<s.length;b++){let g=fb(o,s[b],n);d=Ro(g.top,d),h=on(g.right,h),m=on(g.bottom,m),f=Ro(g.left,f)}return{width:h-f,height:m-d,x:f,y:d}}function r3(i){let{width:o,height:t}=bb(i);return{width:o,height:t}}function o3(i,o,t){let r=Ln(o),n=sn(o),a=t==="fixed",s=ra(i,!0,a,o),l={scrollLeft:0,scrollTop:0},d=nn(0);if((r||!a)&&((ea(o)!=="body"||ol(n))&&(l=il(o)),r)){let b=ra(o,!0,a,o);d.x=b.x+o.clientLeft,d.y=b.y+o.clientTop}!r&&n&&(d.x=Jc(n));let h=n&&!r&&!a?xb(n,l):nn(0),m=s.left+l.scrollLeft-d.x-h.x,f=s.top+l.scrollTop-d.y-h.y;return{x:m,y:f,width:s.width,height:s.height}}function Ah(i){return Po(i).position==="static"}function gb(i,o){if(!Ln(i)||Po(i).position==="fixed")return null;if(o)return o(i);let t=i.offsetParent;return sn(i)===t&&(t=t.ownerDocument.body),t}function yb(i,o){let t=kr(i);if(nl(i))return t;if(!Ln(i)){let n=li(i);for(;n&&!Ba(n);){if(Oo(n)&&!Ah(n))return n;n=li(n)}return t}let r=gb(i,o);for(;r&&hb(r)&&Ah(r);)r=gb(r,o);return r&&Ba(r)&&Ah(r)&&!Fa(r)?t:r||ub(i)||t}var n3=async function(i){let o=this.getOffsetParent||yb,t=this.getDimensions,r=await t(i.floating);return{reference:o3(i.reference,await o(i.floating),i.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function i3(i){return Po(i).direction==="rtl"}var al={convertOffsetParentRelativeRectToViewportRelativeRect:Kk,getDocumentElement:sn,getClippingRect:e3,getOffsetParent:yb,getElementRects:n3,getClientRects:Yk,getDimensions:r3,getScale:Va,isElement:Oo,isRTL:i3};function zb(i,o){return i.x===o.x&&i.y===o.y&&i.width===o.width&&i.height===o.height}function a3(i,o,t){let r=null,n,a=sn(i);function s(){var m;clearTimeout(n),(m=r)==null||m.disconnect(),r=null}function l(m,f){m===void 0&&(m=!1),f===void 0&&(f=1),s();let b=i.getBoundingClientRect(),{left:g,top:v,width:x,height:_}=b;if(m||o(),!x||!_)return;let $=rl(v),N=rl(a.clientWidth-(g+x)),G=rl(a.clientHeight-(v+_)),I=rl(g),T={rootMargin:-$+"px "+-N+"px "+-G+"px "+-I+"px",threshold:Ro(0,on(1,f))||1},L=!0;function W(tt){let dt=tt[0].intersectionRatio;if(!zb(b,i.getBoundingClientRect()))return l();if(dt!==f){if(!L)return l();dt?l(!1,dt):n=setTimeout(()=>{l(!1,1e-7)},1e3)}L=!1}try{r=new IntersectionObserver(W,{...T,root:a.ownerDocument})}catch{r=new IntersectionObserver(W,T)}r.observe(i)}let d=kr(i),h=()=>l(t);return d.addEventListener("resize",h),l(!0),()=>{d.removeEventListener("resize",h),s()}}function wb(i,o,t,r){r===void 0&&(r={});let{ancestorScroll:n=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,h=Lh(i),m=n||a?[...h?Ha(h):[],...o?Ha(o):[]]:[];m.forEach($=>{n&&$.addEventListener("scroll",t),a&&$.addEventListener("resize",t)});let f=h&&l?a3(h,t,a):null,b=-1,g=null;s&&(g=new ResizeObserver($=>{let[N]=$;N&&N.target===h&&g&&o&&(g.unobserve(o),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var G;(G=g)==null||G.observe(o)})),t()}),h&&!d&&g.observe(h),o&&g.observe(o));let v,x=d?ra(i):null;d&&_();function _(){let $=ra(i);x&&!zb(x,$)&&t(),x=$,v=requestAnimationFrame(_)}return t(),()=>{var $;m.forEach(N=>{n&&N.removeEventListener("scroll",t),a&&N.removeEventListener("resize",t)}),f?.(),($=g)==null||$.disconnect(),g=null,d&&cancelAnimationFrame(v)}}var _b=sb;var kb=lb,Cb=ab,qh=cb;var Sb=ib;var Eb=(i,o,t)=>{let r=new Map,n=t??{},a={...al,...n.platform,_c:r};return nb(i,o,{...n,platform:a})};function Tb(i){return s3(i)}function Mh(i){return i.assignedSlot?i.assignedSlot:i.parentNode instanceof ShadowRoot?i.parentNode.host:i.parentNode}function s3(i){for(let o=i;o;o=Mh(o))if(o instanceof Element&&getComputedStyle(o).display==="none")return null;for(let o=Mh(i);o;o=Mh(o)){if(!(o instanceof Element))continue;let t=getComputedStyle(o);if(t.display!=="contents"&&(t.position!=="static"||Fa(t)||o.tagName==="BODY"))return o}return null}var $b=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{--arrow-color:rgb(var(--zn-color-text));--arrow-size:6px;--arrow-size-diagonal:calc(var(--arrow-size) * 0.7071);--arrow-padding-offset:calc(var(--arrow-size-diagonal) - var(--arrow-size));display:contents}.popup{position:absolute;isolation:isolate;margin:0;border:0;padding:0;background:transparent;overflow:visible;max-width:var(--auto-size-available-width,none)}.popup--fixed{position:fixed}.popup:not(.popup--active){display:none}.popup__arrow{position:absolute;width:calc(var(--arrow-size-diagonal) * 2);height:calc(var(--arrow-size-diagonal) * 2);rotate:45deg;background:var(--arrow-color);z-index:-1}.popup{}.popup-hover-bridge:not(.popup-hover-bridge--visible){display:none}.popup-hover-bridge{position:fixed;z-index:calc(var(--zn-z-index-dropdown) - 1);top:0;right:0;bottom:0;left:0;clip-path:polygon(var(--hover-bridge-top-left-x,0) var(--hover-bridge-top-left-y,0),var(--hover-bridge-top-right-x,0) var(--hover-bridge-top-right-y,0),var(--hover-bridge-bottom-right-x,0) var(--hover-bridge-bottom-right-y,0),var(--hover-bridge-bottom-left-x,0) var(--hover-bridge-bottom-left-y,0))}`;function l3(i){return i!==null&&typeof i=="object"&&"getBoundingClientRect"in i&&("contextElement"in i?i instanceof Element:!0)}var Tt=class extends C{constructor(){super(...arguments);this.active=!1;this.placement="top";this.strategy="fixed";this.distance=0;this.skidding=0;this.arrow=!1;this.arrowPlacement="anchor";this.arrowPadding=10;this.flip=!1;this.flipFallbackPlacements="";this.flipFallbackStrategy="best-fit";this.flipPadding=0;this.shift=!1;this.shiftPadding=0;this.autoSizePadding=0;this.hoverBridge=!1;this.handleAnchorHover=()=>{this.active||this.start()};this.updateHoverBridge=()=>{if(this.hoverBridge&&this.anchorEl){let t=this.anchorEl.getBoundingClientRect(),r=this.popup.getBoundingClientRect(),n=this.placement.includes("top")||this.placement.includes("bottom"),a,s,l,d,h,m,f,b;n?t.top<r.top?(a=t.left,s=t.bottom,l=t.right,d=t.bottom,h=r.left,m=r.top,f=r.right,b=r.top):(a=r.left,s=r.bottom,l=r.right,d=r.bottom,h=t.left,m=t.top,f=t.right,b=t.top):t.left<r.left?(a=t.right,s=t.top,l=r.left,d=r.top,h=t.right,m=t.bottom,f=r.left,b=r.bottom):(a=r.right,s=r.top,l=t.left,d=t.top,h=r.right,m=r.bottom,f=t.left,b=t.bottom),this.style.setProperty("--hover-bridge-top-left-x",`${a}px`),this.style.setProperty("--hover-bridge-top-left-y",`${s}px`),this.style.setProperty("--hover-bridge-top-right-x",`${l}px`),this.style.setProperty("--hover-bridge-top-right-y",`${d}px`),this.style.setProperty("--hover-bridge-bottom-left-x",`${h}px`),this.style.setProperty("--hover-bridge-bottom-left-y",`${m}px`),this.style.setProperty("--hover-bridge-bottom-right-x",`${f}px`),this.style.setProperty("--hover-bridge-bottom-right-y",`${b}px`)}}}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.active&&this.start()}disconnectedCallback(){super.disconnectedCallback(),this.stop()}async updated(t){super.updated(t),t.has("active")&&(this.active?this.start():this.stop()),t.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}async handleAnchorChange(){if(await this.stop(),this.anchor&&typeof this.anchor=="string"){let t=this.getRootNode();this.anchorEl=t.getElementById(this.anchor)}else this.anchor instanceof Element||l3(this.anchor)?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),this.anchorEl&&!this.active&&this.anchorEl instanceof Element&&(this.anchorEl.removeEventListener("mouseover",this.handleAnchorHover),this.anchorEl.addEventListener("mouseover",this.handleAnchorHover))}start(){this.anchorEl&&(this.cleanup=wb(this.anchorEl,this.popup,()=>{this.reposition()}))}async stop(){return new Promise(t=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),this.popup.hidePopover(),requestAnimationFrame(()=>t())):t()})}reposition(){if(!this.active||!this.anchorEl)return;let t=[_b({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push(qh({apply:({rects:n})=>{let a=this.sync==="width"||this.sync==="both",s=this.sync==="height"||this.sync==="both";this.popup.style.minWidth=a?`${n.reference.width}px`:"",this.popup.style.minHeight=s?`${n.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&t.push(Cb({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(kb({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push(qh({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:n,availableHeight:a})=>{this.autoSize==="vertical"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-height",`${a}px`):this.style.removeProperty("--auto-size-available-height"),this.autoSize==="horizontal"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-width",`${n}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&t.push(Sb({element:this.arrowEl,padding:this.arrowPadding}));let r=this.strategy==="absolute"?n=>al.getOffsetParent(n,Tb):al.getOffsetParent;Eb(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy,platform:{...al,getOffsetParent:r}}).then(({x:n,y:a,middlewareData:s,placement:l})=>{let d={top:"bottom",right:"left",bottom:"top",left:"right"}[l.split("-")[0]];if(this.setAttribute("data-current-placement",l),Object.assign(this.popup.style,{left:`${n}px`,top:`${a}px`}),!!this.popup?.isConnected&&(this.popup.showPopover(),this.arrow)){let h=s.arrow.x,m=s.arrow.y,f="",b="",g="",v;this.arrowPlacement==="start"?(f=typeof m=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",b="",v=typeof h=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""):this.arrowPlacement==="end"?(b=typeof h=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",v="",g=typeof m=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""):this.arrowPlacement==="center"?(v=typeof h=="number"?"calc(50% - var(--arrow-size-diagonal))":"",f=typeof m=="number"?"calc(50% - var(--arrow-size-diagonal))":""):(v=typeof h=="number"?`${h}px`:"",f=typeof m=="number"?`${m}px`:""),Object.assign(this.arrowEl.style,{top:f,right:b,bottom:g,left:v,[d]:"calc(var(--arrow-size-diagonal) * -1)"})}}),requestAnimationFrame(()=>this.updateHoverBridge())}render(){return u`
|
|
138
|
+
`:null}`}};lt.styles=E(Xg),lt.dependencies={"zn-tooltip":No,"zn-icon":ct},c([F(".button")],lt.prototype,"button",2),c([Ma(".loading-countdown")],lt.prototype,"countdownContainer",2),c([p({})],lt.prototype,"color",2),c([p({attribute:"hover-color"})],lt.prototype,"hoverColor",2),c([p({type:Boolean})],lt.prototype,"text",2),c([p({type:Boolean})],lt.prototype,"outline",2),c([p({type:Boolean})],lt.prototype,"disabled",2),c([p({type:Boolean})],lt.prototype,"grow",2),c([p({type:Boolean})],lt.prototype,"square",2),c([p({attribute:"icon-button",converter:{fromAttribute:t=>t==="small"||t==="round"?t:t!==null,toAttribute:t=>t==="small"||t==="round"?t:t?"":null}})],lt.prototype,"iconButton",2),c([p({type:Boolean})],lt.prototype,"plain",2),c([p({type:Boolean,attribute:"no-hover"})],lt.prototype,"noHover",2),c([p({type:Boolean,attribute:"panel-bg"})],lt.prototype,"panelBackground",2),c([p({attribute:"dropdown-closer",type:Boolean})],lt.prototype,"dropdownCloser",2),c([p({type:Number})],lt.prototype,"notification",2),c([p({attribute:"muted-notifications",type:Boolean})],lt.prototype,"mutedNotifications",2),c([p()],lt.prototype,"verticalAlign",2),c([p()],lt.prototype,"content",2),c([p()],lt.prototype,"icon",2),c([p()],lt.prototype,"gaid",2),c([p({attribute:"icon-position"})],lt.prototype,"iconPosition",2),c([p({attribute:"icon-size"})],lt.prototype,"iconSize",2),c([p({attribute:"icon-color"})],lt.prototype,"iconColor",2),c([p({attribute:"icon-fill"})],lt.prototype,"iconFill",2),c([p({attribute:"icon-library"})],lt.prototype,"iconLibrary",2),c([p()],lt.prototype,"type",2),c([p()],lt.prototype,"name",2),c([p()],lt.prototype,"value",2),c([p()],lt.prototype,"form",2),c([p({attribute:"formaction"})],lt.prototype,"formAction",2),c([p({attribute:"formenctype"})],lt.prototype,"formEnctype",2),c([p({attribute:"formmethod"})],lt.prototype,"formMethod",2),c([p({attribute:"formnovalidate",type:Boolean})],lt.prototype,"formNoValidate",2),c([p({attribute:"formtarget"})],lt.prototype,"formTarget",2),c([p()],lt.prototype,"href",2),c([p()],lt.prototype,"target",2),c([p({attribute:"data-target"})],lt.prototype,"dataTarget",2),c([p()],lt.prototype,"rel",2),c([p()],lt.prototype,"tooltip",2),c([p({type:Boolean,attribute:"auto-click"})],lt.prototype,"autoClick",2),c([p({type:Number,attribute:"auto-click-delay"})],lt.prototype,"autoClickDelay",2),c([p({type:String,attribute:"loading-text"})],lt.prototype,"loadingText",2),c([p({type:String,attribute:"loading-text-position"})],lt.prototype,"loadingTextPosition",2),c([p({type:Boolean})],lt.prototype,"loading",2),c([K("autoClick")],lt.prototype,"handleAutoClickChange",1);var Ct=lt;lt.define("zn-button");var Lt=class{constructor(o,{target:t,config:r,callback:n,skipInitial:a}){this.t=new Set,this.o=!1,this.i=!1,this.h=o,t!==null&&this.t.add(t??o),this.l=r,this.o=a??this.o,this.callback=n,window.MutationObserver?(this.u=new MutationObserver(s=>{this.handleChanges(s),this.h.requestUpdate()}),o.addController(this)):console.warn("MutationController error: browser does not support MutationObserver.")}handleChanges(o){this.value=this.callback?.(o,this.u)}hostConnected(){for(let o of this.t)this.observe(o)}hostDisconnected(){this.disconnect()}async hostUpdated(){let o=this.u.takeRecords();(o.length||!this.o&&this.i)&&this.handleChanges(o),this.i=!1}observe(o){this.t.add(o),this.u.observe(o,this.l),this.i=!0,this.h.requestUpdate()}disconnect(){this.u.disconnect()}};var Pa=class extends C{constructor(){super(),new Lt(this,{config:{childList:!0,subtree:!0,attributes:!0,characterData:!0},callback:()=>this.resize(),skipInitial:!0})}firstUpdated(o){super.firstUpdated(o),this.resize()}resize(){let o=0;Array.from(this.children).forEach(t=>{o+=t.getBoundingClientRect().height}),this.style.minHeight=o+"px"}createRenderRoot(){return this}};var Dk=Pa;Pa.define("zn-absolute-container");var on=Math.min,Ro=Math.max,el=Math.round,rl=Math.floor,nn=i=>({x:i,y:i}),Nk={left:"right",right:"left",bottom:"top",top:"bottom"};function Sh(i,o,t){return Ro(i,on(o,t))}function Qi(i,o){return typeof i=="function"?i(o):i}function si(i){return i.split("-")[0]}function Ji(i){return i.split("-")[1]}function Eh(i){return i==="x"?"y":"x"}function Wc(i){return i==="y"?"height":"width"}function an(i){let o=i[0];return o==="t"||o==="b"?"y":"x"}function Kc(i){return Eh(an(i))}function Zg(i,o,t){t===void 0&&(t=!1);let r=Ji(i),n=Kc(i),a=Wc(n),s=n==="x"?r===(t?"end":"start")?"right":"left":r==="start"?"bottom":"top";return o.reference[a]>o.floating[a]&&(s=tl(s)),[s,tl(s)]}function tb(i){let o=tl(i);return[Gc(i),o,Gc(o)]}function Gc(i){return i.includes("start")?i.replace("start","end"):i.replace("end","start")}var Qg=["left","right"],Jg=["right","left"],Rk=["top","bottom"],Ok=["bottom","top"];function Pk(i,o,t){switch(i){case"top":case"bottom":return t?o?Jg:Qg:o?Qg:Jg;case"left":case"right":return o?Rk:Ok;default:return[]}}function eb(i,o,t,r){let n=Ji(i),a=Pk(si(i),t==="start",r);return n&&(a=a.map(s=>s+"-"+n),o&&(a=a.concat(a.map(Gc)))),a}function tl(i){let o=si(i);return Nk[o]+i.slice(o.length)}function Hk(i){var o,t,r,n;return{top:(o=i.top)!=null?o:0,right:(t=i.right)!=null?t:0,bottom:(r=i.bottom)!=null?r:0,left:(n=i.left)!=null?n:0}}function Th(i){return typeof i!="number"?Hk(i):{top:i,right:i,bottom:i,left:i}}function Zi(i){let{x:o,y:t,width:r,height:n}=i;return{width:r,height:n,top:t,left:o,right:o+r,bottom:t+n,x:o,y:t}}function rb(i,o,t){let{reference:r,floating:n}=i,a=an(o),s=Kc(o),l=Wc(s),d=si(o),h=a==="y",m=r.x+r.width/2-n.width/2,f=r.y+r.height/2-n.height/2,b=r[l]/2-n[l]/2,g;switch(d){case"top":g={x:m,y:r.y-n.height};break;case"bottom":g={x:m,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:f};break;case"left":g={x:r.x-n.width,y:f};break;default:g={x:r.x,y:r.y}}let v=Ji(o);return v&&(g[s]+=b*(v==="end"?1:-1)*(t&&h?-1:1)),g}async function ob(i,o){var t;o===void 0&&(o={});let{x:r,y:n,platform:a,rects:s,elements:l,strategy:d}=i,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:f="floating",altBoundary:b=!1,padding:g=0}=Qi(o,i),v=Th(g),_=l[b?f==="floating"?"reference":"floating":f],$=Zi(await a.getClippingRect({element:(t=await(a.isElement==null?void 0:a.isElement(_)))==null||t?_:_.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:h,rootBoundary:m,strategy:d})),N=f==="floating"?{x:r,y:n,width:s.floating.width,height:s.floating.height}:s.reference,G=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),I=await(a.isElement==null?void 0:a.isElement(G))&&await(a.getScale==null?void 0:a.getScale(G))||{x:1,y:1},w=Zi(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:N,offsetParent:G,strategy:d}):N);return{top:($.top-w.top+v.top)/I.y,bottom:(w.bottom-$.bottom+v.bottom)/I.y,left:($.left-w.left+v.left)/I.x,right:(w.right-$.right+v.right)/I.x}}var Fk=50,nb=async(i,o,t)=>{let{placement:r="bottom",strategy:n="absolute",middleware:a=[],platform:s}=t,l=s.detectOverflow?s:{...s,detectOverflow:ob},d=await(s.isRTL==null?void 0:s.isRTL(o)),h=await s.getElementRects({reference:i,floating:o,strategy:n}),{x:m,y:f}=rb(h,r,d),b=r,g=0,v={};for(let x=0;x<a.length;x++){let _=a[x];if(!_)continue;let{name:$,fn:N}=_,{x:G,y:I,data:w,reset:T}=await N({x:m,y:f,initialPlacement:r,placement:b,strategy:n,middlewareData:v,rects:h,platform:l,elements:{reference:i,floating:o}});m=G??m,f=I??f,v[$]={...v[$],...w},T&&g<Fk&&(g++,typeof T=="object"&&(T.placement&&(b=T.placement),T.rects&&(h=T.rects===!0?await s.getElementRects({reference:i,floating:o,strategy:n}):T.rects),{x:m,y:f}=rb(h,b,d)),x=-1)}return{x:m,y:f,placement:b,strategy:n,middlewareData:v}},ib=i=>({name:"arrow",options:i,async fn(o){let{x:t,y:r,placement:n,rects:a,platform:s,elements:l,middlewareData:d}=o,{element:h,padding:m=0}=Qi(i,o)||{};if(h==null)return{};let f=Th(m),b={x:t,y:r},g=Kc(n),v=Wc(g),x=await s.getDimensions(h),_=g==="y",$=_?"top":"left",N=_?"bottom":"right",G=_?"clientHeight":"clientWidth",I=a.reference[v]+a.reference[g]-b[g]-a.floating[v],w=b[g]-a.reference[g],T=await(s.getOffsetParent==null?void 0:s.getOffsetParent(h)),L=T?T[G]:0;(!L||!await(s.isElement==null?void 0:s.isElement(T)))&&(L=l.floating[G]||a.floating[v]);let W=I/2-w/2,tt=L/2-x[v]/2-1,dt=on(f[$],tt),gt=on(f[N],tt),_t=L-x[v]-gt,Nt=L/2-x[v]/2+W,ze=Sh(dt,Nt,_t),We=!d.arrow&&Ji(n)!=null&&Nt!==ze&&a.reference[v]/2-(Nt<dt?dt:gt)-x[v]/2<0,cr=We?Nt<dt?Nt-dt:Nt-_t:0;return{[g]:b[g]+cr,data:{[g]:ze,centerOffset:Nt-ze-cr,...We&&{alignmentOffset:cr}},reset:We}}});var ab=function(i){return i===void 0&&(i={}),{name:"flip",options:i,async fn(o){var t,r;let{placement:n,middlewareData:a,rects:s,initialPlacement:l,platform:d,elements:h}=o,{mainAxis:m=!0,crossAxis:f=!0,fallbackPlacements:b,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:x=!0,..._}=Qi(i,o);if((t=a.arrow)!=null&&t.alignmentOffset)return{};let $=si(n),N=an(l),G=si(l)===l,I=await(d.isRTL==null?void 0:d.isRTL(h.floating)),w=b||(G||!x?[tl(l)]:tb(l)),T=v!=="none";!b&&T&&w.push(...eb(l,x,v,I));let L=[l,...w],W=await d.detectOverflow(o,_),tt=[],dt=((r=a.flip)==null?void 0:r.overflows)||[];if(m&&tt.push(W[$]),f){let ze=Zg(n,s,I);tt.push(W[ze[0]],W[ze[1]])}if(dt=[...dt,{placement:n,overflows:tt}],!tt.every(ze=>ze<=0)){var gt,_t;let ze=(((gt=a.flip)==null?void 0:gt.index)||0)+1,We=L[ze];if(We&&(!(f==="alignment"?N!==an(We):!1)||dt.every(Ke=>an(Ke.placement)===N?Ke.overflows[0]>0:!0)))return{data:{index:ze,overflows:dt},reset:{placement:We}};let cr=(_t=dt.filter($e=>$e.overflows[0]<=0).sort(($e,Ke)=>$e.overflows[1]-Ke.overflows[1])[0])==null?void 0:_t.placement;if(!cr)switch(g){case"bestFit":{var Nt;let $e=(Nt=dt.filter(Ke=>{if(T){let we=an(Ke.placement);return we===N||we==="y"}return!0}).map(Ke=>[Ke.placement,Ke.overflows.filter(we=>we>0).reduce((we,ti)=>we+ti,0)]).sort((Ke,we)=>Ke[1]-we[1])[0])==null?void 0:Nt[0];$e&&(cr=$e);break}case"initialPlacement":cr=l;break}if(n!==cr)return{reset:{placement:cr}}}return{}}}};var Bk=new Set(["left","top"]);async function Vk(i,o){let{placement:t,platform:r,elements:n}=i,a=await(r.isRTL==null?void 0:r.isRTL(n.floating)),s=si(t),l=Ji(t),d=an(t)==="y",h=Bk.has(s)?-1:1,m=a&&d?-1:1,f=Qi(o,i),{mainAxis:b,crossAxis:g,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof v=="number"&&(g=l==="end"?v*-1:v),d?{x:g*m,y:b*h}:{x:b*h,y:g*m}}var sb=function(i){return i===void 0&&(i=0),{name:"offset",options:i,async fn(o){var t,r;let{x:n,y:a,placement:s,middlewareData:l}=o,d=await Vk(o,i);return s===((t=l.offset)==null?void 0:t.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:n+d.x,y:a+d.y,data:{...d,placement:s}}}}},lb=function(i){return i===void 0&&(i={}),{name:"shift",options:i,async fn(o){let{x:t,y:r,placement:n,platform:a}=o,{mainAxis:s=!0,crossAxis:l=!1,limiter:d={fn:N=>{let{x:G,y:I}=N;return{x:G,y:I}}},...h}=Qi(i,o),m={x:t,y:r},f=await a.detectOverflow(o,h),b=an(n),g=Eh(b),v=m[g],x=m[b],_=(N,G)=>Sh(G+f[N==="y"?"top":"left"],G,G-f[N==="y"?"bottom":"right"]);s&&(v=_(g,v)),l&&(x=_(b,x));let $=d.fn({...o,[g]:v,[b]:x});return{...$,data:{x:$.x-t,y:$.y-r,enabled:{[g]:s,[b]:l}}}}}};var cb=function(i){return i===void 0&&(i={}),{name:"size",options:i,async fn(o){let{placement:t,rects:r,platform:n,elements:a}=o,{apply:s=()=>{},...l}=Qi(i,o),d=await n.detectOverflow(o,l),h=si(t),m=Ji(t),f=an(t)==="y",{width:b,height:g}=r.floating,v,x;h==="top"||h==="bottom"?(v=h,x=m===(await(n.isRTL==null?void 0:n.isRTL(a.floating))?"start":"end")?"left":"right"):(x=h,v=m==="end"?"top":"bottom");let _=g-d.top-d.bottom,$=b-d.left-d.right,N=on(g-d[v],_),G=on(b-d[x],$),I=o.middlewareData.shift,w=!I,T=N,L=G;I!=null&&I.enabled.x&&(L=$),I!=null&&I.enabled.y&&(T=_),w&&!m&&(f?L=b-2*Ro(d.left,d.right):T=g-2*Ro(d.top,d.bottom)),await s({...o,availableWidth:L,availableHeight:T});let W=await n.getDimensions(a.floating);return b!==W.width||g!==W.height?{reset:{rects:!0}}:{}}}};function Yc(){return typeof window<"u"}function ea(i){return pb(i)?(i.nodeName||"").toLowerCase():"#document"}function kr(i){var o;return(i==null||(o=i.ownerDocument)==null?void 0:o.defaultView)||window}function sn(i){var o;return(o=(pb(i)?i.ownerDocument:i.document)||window.document)==null?void 0:o.documentElement}function pb(i){return Yc()?i instanceof Node||i instanceof kr(i).Node:!1}function Oo(i){return Yc()?i instanceof Element||i instanceof kr(i).Element:!1}function Ln(i){return Yc()?i instanceof HTMLElement||i instanceof kr(i).HTMLElement:!1}function db(i){return!Yc()||typeof ShadowRoot>"u"?!1:i instanceof ShadowRoot||i instanceof kr(i).ShadowRoot}function ol(i){let{overflow:o,overflowX:t,overflowY:r,display:n}=Po(i);return/auto|scroll|overlay|hidden|clip/.test(o+r+t)&&n!=="inline"&&n!=="contents"}function hb(i){return/^(table|td|th)$/.test(ea(i))}function nl(i){try{if(i.matches(":popover-open"))return!0}catch{}try{return i.matches(":modal")}catch{return!1}}var Uk=/transform|translate|scale|rotate|perspective|filter/,jk=/paint|layout|strict|content/,ta=i=>!!i&&i!=="none",$h;function Fa(i){let o=Oo(i)?Po(i):i;return ta(o.transform)||ta(o.translate)||ta(o.scale)||ta(o.rotate)||ta(o.perspective)||!Xc()&&(ta(o.backdropFilter)||ta(o.filter))||Uk.test(o.willChange||"")||jk.test(o.contain||"")}function ub(i){let o=li(i);for(;Ln(o)&&!Ba(o);){if(Fa(o))return o;if(nl(o))return null;o=li(o)}return null}function Xc(){return $h==null&&($h=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),$h}function Ba(i){return/^(html|body|#document)$/.test(ea(i))}function Po(i){return kr(i).getComputedStyle(i)}function il(i){return Oo(i)?{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}:{scrollLeft:i.scrollX,scrollTop:i.scrollY}}function li(i){if(ea(i)==="html")return i;let o=i.assignedSlot||i.parentNode||db(i)&&i.host||sn(i);return db(o)?o.host:o}function mb(i){let o=li(i);return Ba(o)?(i.ownerDocument||i).body:Ln(o)&&ol(o)?o:mb(o)}function Ha(i,o,t){var r;o===void 0&&(o=[]),t===void 0&&(t=!0);let n=mb(i),a=n===((r=i.ownerDocument)==null?void 0:r.body),s=kr(n);if(a){let l=Qc(s);return o.concat(s,s.visualViewport||[],ol(n)?n:[],l&&t?Ha(l):[])}else return o.concat(n,Ha(n,[],t))}function Qc(i){return i.parent&&Object.getPrototypeOf(i.parent)?i.frameElement:null}function bb(i){let o=Po(i),t=parseFloat(o.width)||0,r=parseFloat(o.height)||0,n=Ln(i),a=n?i.offsetWidth:t,s=n?i.offsetHeight:r,l=el(t)!==a||el(r)!==s;return l&&(t=a,r=s),{width:t,height:r,$:l}}function Lh(i){return Oo(i)?i:i.contextElement}function Va(i){let o=Lh(i);if(!Ln(o))return nn(1);let t=o.getBoundingClientRect(),{width:r,height:n,$:a}=bb(o),s=(a?el(t.width):t.width)/r,l=(a?el(t.height):t.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var Gk=nn(0);function vb(i){let o=kr(i);return!Xc()||!o.visualViewport?Gk:{x:o.visualViewport.offsetLeft,y:o.visualViewport.offsetTop}}function Wk(i,o,t){return o===void 0&&(o=!1),!!t&&o&&t===kr(i)}function ra(i,o,t,r){o===void 0&&(o=!1),t===void 0&&(t=!1);let n=i.getBoundingClientRect(),a=Lh(i),s=nn(1);o&&(r?Oo(r)&&(s=Va(r)):s=Va(i));let l=Wk(a,t,r)?vb(a):nn(0),d=(n.left+l.x)/s.x,h=(n.top+l.y)/s.y,m=n.width/s.x,f=n.height/s.y;if(a&&r){let b=kr(a),g=Oo(r)?kr(r):r,v=b,x=Qc(v);for(;x&&g!==v;){let _=Va(x),$=x.getBoundingClientRect(),N=Po(x),G=$.left+(x.clientLeft+parseFloat(N.paddingLeft))*_.x,I=$.top+(x.clientTop+parseFloat(N.paddingTop))*_.y;d*=_.x,h*=_.y,m*=_.x,f*=_.y,d+=G,h+=I,v=kr(x),x=Qc(v)}}return Zi({width:m,height:f,x:d,y:h})}function Jc(i,o){let t=il(i).scrollLeft;return o?o.left+t:ra(sn(i)).left+t}function xb(i,o){let t=i.getBoundingClientRect(),r=t.left+o.scrollLeft-Jc(i,t),n=t.top+o.scrollTop;return{x:r,y:n}}function Kk(i){let{elements:o,rect:t,offsetParent:r,strategy:n}=i,a=n==="fixed",s=sn(r),l=o?nl(o.floating):!1;if(r===s||l&&a)return t;let d={scrollLeft:0,scrollTop:0},h=nn(1),m=nn(0),f=Ln(r);if((f||!a)&&((ea(r)!=="body"||ol(s))&&(d=il(r)),f)){let g=ra(r);h=Va(r),m.x=g.x+r.clientLeft,m.y=g.y+r.clientTop}let b=s&&!f&&!a?xb(s,d):nn(0);return{width:t.width*h.x,height:t.height*h.y,x:t.x*h.x-d.scrollLeft*h.x+m.x+b.x,y:t.y*h.y-d.scrollTop*h.y+m.y+b.y}}function Yk(i){return i.getClientRects?Array.from(i.getClientRects()):[]}function Xk(i){let o=il(i),t=i.ownerDocument.body,r=Ro(i.scrollWidth,i.clientWidth,t.scrollWidth,t.clientWidth),n=Ro(i.scrollHeight,i.clientHeight,t.scrollHeight,t.clientHeight),a=-o.scrollLeft+Jc(i),s=-o.scrollTop;return Po(t).direction==="rtl"&&(a+=Ro(i.clientWidth,t.clientWidth)-r),{width:r,height:n,x:a,y:s}}var Qk=25;function Jk(i,o,t){t===void 0&&(t="viewport");let r=t==="layoutViewport",n=kr(i),a=sn(i),s=n.visualViewport,l=a.clientWidth,d=a.clientHeight,h=0,m=0;if(s){let b=!Xc()||o==="fixed";r?b||(h=-s.offsetLeft,m=-s.offsetTop):(l=s.width,d=s.height,b&&(h=s.offsetLeft,m=s.offsetTop))}if(Jc(a)<=0){let b=a.ownerDocument,g=b.body,v=getComputedStyle(g),x=b.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,_=Math.abs(a.clientWidth-g.clientWidth-x),$=getComputedStyle(a).scrollbarGutter==="stable both-edges"?_/2:_;$<=Qk&&(l-=$)}return{width:l,height:d,x:h,y:m}}function Zk(i,o){let t=ra(i,!0,o==="fixed"),r=t.top+i.clientTop,n=t.left+i.clientLeft,a=Va(i),s=i.clientWidth*a.x,l=i.clientHeight*a.y,d=n*a.x,h=r*a.y;return{width:s,height:l,x:d,y:h}}function fb(i,o,t){let r;if(o==="viewport"||o==="layoutViewport")r=Jk(i,t,o);else if(o==="document")r=Xk(sn(i));else if(Oo(o))r=Zk(o,t);else{let n=vb(i);r={x:o.x-n.x,y:o.y-n.y,width:o.width,height:o.height}}return Zi(r)}function t3(i,o){let t=o.get(i);if(t)return t;let r=Ha(i,[],!1).filter(l=>Oo(l)&&ea(l)!=="body"),n=null,a=Po(i).position==="fixed",s=a?li(i):i;for(;Oo(s)&&!Ba(s);){let l=Po(s),d=Fa(s),h=n?n.position:a?"fixed":"";!d&&(h==="fixed"||h==="absolute"&&l.position==="static")?r=r.filter(f=>f!==s):n=l,s=li(s)}return o.set(i,r),r}function e3(i){let{element:o,boundary:t,rootBoundary:r,strategy:n}=i,s=[...t==="clippingAncestors"?nl(o)?[]:t3(o,this._c):[].concat(t),r],l=fb(o,s[0],n),d=l.top,h=l.right,m=l.bottom,f=l.left;for(let b=1;b<s.length;b++){let g=fb(o,s[b],n);d=Ro(g.top,d),h=on(g.right,h),m=on(g.bottom,m),f=Ro(g.left,f)}return{width:h-f,height:m-d,x:f,y:d}}function r3(i){let{width:o,height:t}=bb(i);return{width:o,height:t}}function o3(i,o,t){let r=Ln(o),n=sn(o),a=t==="fixed",s=ra(i,!0,a,o),l={scrollLeft:0,scrollTop:0},d=nn(0);if((r||!a)&&((ea(o)!=="body"||ol(n))&&(l=il(o)),r)){let b=ra(o,!0,a,o);d.x=b.x+o.clientLeft,d.y=b.y+o.clientTop}!r&&n&&(d.x=Jc(n));let h=n&&!r&&!a?xb(n,l):nn(0),m=s.left+l.scrollLeft-d.x-h.x,f=s.top+l.scrollTop-d.y-h.y;return{x:m,y:f,width:s.width,height:s.height}}function Ah(i){return Po(i).position==="static"}function gb(i,o){if(!Ln(i)||Po(i).position==="fixed")return null;if(o)return o(i);let t=i.offsetParent;return sn(i)===t&&(t=t.ownerDocument.body),t}function yb(i,o){let t=kr(i);if(nl(i))return t;if(!Ln(i)){let n=li(i);for(;n&&!Ba(n);){if(Oo(n)&&!Ah(n))return n;n=li(n)}return t}let r=gb(i,o);for(;r&&hb(r)&&Ah(r);)r=gb(r,o);return r&&Ba(r)&&Ah(r)&&!Fa(r)?t:r||ub(i)||t}var n3=async function(i){let o=this.getOffsetParent||yb,t=this.getDimensions,r=await t(i.floating);return{reference:o3(i.reference,await o(i.floating),i.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function i3(i){return Po(i).direction==="rtl"}var al={convertOffsetParentRelativeRectToViewportRelativeRect:Kk,getDocumentElement:sn,getClippingRect:e3,getOffsetParent:yb,getElementRects:n3,getClientRects:Yk,getDimensions:r3,getScale:Va,isElement:Oo,isRTL:i3};function zb(i,o){return i.x===o.x&&i.y===o.y&&i.width===o.width&&i.height===o.height}function a3(i,o,t){let r=null,n,a=sn(i);function s(){var m;clearTimeout(n),(m=r)==null||m.disconnect(),r=null}function l(m,f){m===void 0&&(m=!1),f===void 0&&(f=1),s();let b=i.getBoundingClientRect(),{left:g,top:v,width:x,height:_}=b;if(m||o(),!x||!_)return;let $=rl(v),N=rl(a.clientWidth-(g+x)),G=rl(a.clientHeight-(v+_)),I=rl(g),T={rootMargin:-$+"px "+-N+"px "+-G+"px "+-I+"px",threshold:Ro(0,on(1,f))||1},L=!0;function W(tt){let dt=tt[0].intersectionRatio;if(!zb(b,i.getBoundingClientRect()))return l();if(dt!==f){if(!L)return l();dt?l(!1,dt):n=setTimeout(()=>{l(!1,1e-7)},1e3)}L=!1}try{r=new IntersectionObserver(W,{...T,root:a.ownerDocument})}catch{r=new IntersectionObserver(W,T)}r.observe(i)}let d=kr(i),h=()=>l(t);return d.addEventListener("resize",h),l(!0),()=>{d.removeEventListener("resize",h),s()}}function wb(i,o,t,r){r===void 0&&(r={});let{ancestorScroll:n=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,h=Lh(i),m=n||a?[...h?Ha(h):[],...o?Ha(o):[]]:[];m.forEach($=>{n&&$.addEventListener("scroll",t),a&&$.addEventListener("resize",t)});let f=h&&l?a3(h,t,a):null,b=-1,g=null;s&&(g=new ResizeObserver($=>{let[N]=$;N&&N.target===h&&g&&o&&(g.unobserve(o),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var G;(G=g)==null||G.observe(o)})),t()}),h&&!d&&g.observe(h),o&&g.observe(o));let v,x=d?ra(i):null;d&&_();function _(){let $=ra(i);x&&!zb(x,$)&&t(),x=$,v=requestAnimationFrame(_)}return t(),()=>{var $;m.forEach(N=>{n&&N.removeEventListener("scroll",t),a&&N.removeEventListener("resize",t)}),f?.(),($=g)==null||$.disconnect(),g=null,d&&cancelAnimationFrame(v)}}var _b=sb;var kb=lb,Cb=ab,qh=cb;var Sb=ib;var Eb=(i,o,t)=>{let r=new Map,n=t??{},a={...al,...n.platform,_c:r};return nb(i,o,{...n,platform:a})};function Tb(i){return s3(i)}function Mh(i){return i.assignedSlot?i.assignedSlot:i.parentNode instanceof ShadowRoot?i.parentNode.host:i.parentNode}function s3(i){for(let o=i;o;o=Mh(o))if(o instanceof Element&&getComputedStyle(o).display==="none")return null;for(let o=Mh(i);o;o=Mh(o)){if(!(o instanceof Element))continue;let t=getComputedStyle(o);if(t.display!=="contents"&&(t.position!=="static"||Fa(t)||o.tagName==="BODY"))return o}return null}var $b=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{--arrow-color:rgb(var(--zn-color-text));--arrow-size:6px;--arrow-size-diagonal:calc(var(--arrow-size) * 0.7071);--arrow-padding-offset:calc(var(--arrow-size-diagonal) - var(--arrow-size));display:contents}.popup{position:absolute;isolation:isolate;margin:0;border:0;padding:0;background:transparent;overflow:visible;max-width:var(--auto-size-available-width,none)}.popup--fixed{position:fixed}.popup:not(.popup--active){display:none}.popup__arrow{position:absolute;width:calc(var(--arrow-size-diagonal) * 2);height:calc(var(--arrow-size-diagonal) * 2);rotate:45deg;background:var(--arrow-color);z-index:-1}.popup{}.popup-hover-bridge:not(.popup-hover-bridge--visible){display:none}.popup-hover-bridge{position:fixed;z-index:calc(var(--zn-z-index-dropdown) - 1);top:0;right:0;bottom:0;left:0;clip-path:polygon(var(--hover-bridge-top-left-x,0) var(--hover-bridge-top-left-y,0),var(--hover-bridge-top-right-x,0) var(--hover-bridge-top-right-y,0),var(--hover-bridge-bottom-right-x,0) var(--hover-bridge-bottom-right-y,0),var(--hover-bridge-bottom-left-x,0) var(--hover-bridge-bottom-left-y,0))}`;function l3(i){return i!==null&&typeof i=="object"&&"getBoundingClientRect"in i&&("contextElement"in i?i instanceof Element:!0)}var Tt=class extends C{constructor(){super(...arguments);this.active=!1;this.placement="top";this.strategy="fixed";this.distance=0;this.skidding=0;this.arrow=!1;this.arrowPlacement="anchor";this.arrowPadding=10;this.flip=!1;this.flipFallbackPlacements="";this.flipFallbackStrategy="best-fit";this.flipPadding=0;this.shift=!1;this.shiftPadding=0;this.autoSizePadding=0;this.hoverBridge=!1;this.handleAnchorHover=()=>{this.active||this.start()};this.updateHoverBridge=()=>{if(this.hoverBridge&&this.anchorEl){let t=this.anchorEl.getBoundingClientRect(),r=this.popup.getBoundingClientRect(),n=this.placement.includes("top")||this.placement.includes("bottom"),a,s,l,d,h,m,f,b;n?t.top<r.top?(a=t.left,s=t.bottom,l=t.right,d=t.bottom,h=r.left,m=r.top,f=r.right,b=r.top):(a=r.left,s=r.bottom,l=r.right,d=r.bottom,h=t.left,m=t.top,f=t.right,b=t.top):t.left<r.left?(a=t.right,s=t.top,l=r.left,d=r.top,h=t.right,m=t.bottom,f=r.left,b=r.bottom):(a=r.right,s=r.top,l=t.left,d=t.top,h=r.right,m=r.bottom,f=t.left,b=t.bottom),this.style.setProperty("--hover-bridge-top-left-x",`${a}px`),this.style.setProperty("--hover-bridge-top-left-y",`${s}px`),this.style.setProperty("--hover-bridge-top-right-x",`${l}px`),this.style.setProperty("--hover-bridge-top-right-y",`${d}px`),this.style.setProperty("--hover-bridge-bottom-left-x",`${h}px`),this.style.setProperty("--hover-bridge-bottom-left-y",`${m}px`),this.style.setProperty("--hover-bridge-bottom-right-x",`${f}px`),this.style.setProperty("--hover-bridge-bottom-right-y",`${b}px`)}}}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.active&&this.start()}disconnectedCallback(){super.disconnectedCallback(),this.stop()}async updated(t){super.updated(t),t.has("active")&&(this.active?this.start():this.stop()),t.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}async handleAnchorChange(){if(await this.stop(),this.anchor&&typeof this.anchor=="string"){let t=this.getRootNode();this.anchorEl=t.getElementById(this.anchor)}else this.anchor instanceof Element||l3(this.anchor)?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),this.anchorEl&&!this.active&&this.anchorEl instanceof Element&&(this.anchorEl.removeEventListener("mouseover",this.handleAnchorHover),this.anchorEl.addEventListener("mouseover",this.handleAnchorHover))}start(){this.anchorEl&&(this.cleanup=wb(this.anchorEl,this.popup,()=>{this.reposition()}))}async stop(){return new Promise(t=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),this.popup.hidePopover(),requestAnimationFrame(()=>t())):t()})}reposition(){if(!this.active||!this.anchorEl)return;let t=[_b({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push(qh({apply:({rects:n})=>{let a=this.sync==="width"||this.sync==="both",s=this.sync==="height"||this.sync==="both";this.popup.style.minWidth=a?`${n.reference.width}px`:"",this.popup.style.minHeight=s?`${n.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&t.push(Cb({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(kb({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push(qh({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:n,availableHeight:a})=>{this.autoSize==="vertical"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-height",`${a}px`):this.style.removeProperty("--auto-size-available-height"),this.autoSize==="horizontal"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-width",`${n}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&t.push(Sb({element:this.arrowEl,padding:this.arrowPadding}));let r=this.strategy==="absolute"?n=>al.getOffsetParent(n,Tb):al.getOffsetParent;Eb(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy,platform:{...al,getOffsetParent:r}}).then(({x:n,y:a,middlewareData:s,placement:l})=>{let d={top:"bottom",right:"left",bottom:"top",left:"right"}[l.split("-")[0]];if(this.setAttribute("data-current-placement",l),Object.assign(this.popup.style,{left:`${n}px`,top:`${a}px`}),!!this.popup?.isConnected&&(this.popup.showPopover(),this.arrow)){let h=s.arrow.x,m=s.arrow.y,f="",b="",g="",v;this.arrowPlacement==="start"?(f=typeof m=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",b="",v=typeof h=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""):this.arrowPlacement==="end"?(b=typeof h=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",v="",g=typeof m=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""):this.arrowPlacement==="center"?(v=typeof h=="number"?"calc(50% - var(--arrow-size-diagonal))":"",f=typeof m=="number"?"calc(50% - var(--arrow-size-diagonal))":""):(v=typeof h=="number"?`${h}px`:"",f=typeof m=="number"?`${m}px`:""),Object.assign(this.arrowEl.style,{top:f,right:b,bottom:g,left:v,[d]:"calc(var(--arrow-size-diagonal) * -1)"})}}),requestAnimationFrame(()=>this.updateHoverBridge())}render(){return u`
|
|
139
139
|
<slot class="anchor" name="anchor" @slotchange="${this.handleAnchorChange}"></slot>
|
|
140
140
|
|
|
141
141
|
<span
|
|
@@ -153,7 +153,7 @@ import{a as En,b as E_,c as pr,d as c,e as B}from"./chunks/zn.UBLZO6CI.js";var b
|
|
|
153
153
|
${this.arrow?u`
|
|
154
154
|
<div part="arrow" class="popup__arrow" role="presentation"></div>`:""}
|
|
155
155
|
</div>
|
|
156
|
-
`}};Tt.styles=E($b),c([F(".popup")],Tt.prototype,"popup",2),c([F(".popup__arrow")],Tt.prototype,"arrowEl",2),c([p()],Tt.prototype,"anchor",2),c([p({type:Boolean,reflect:!0})],Tt.prototype,"active",2),c([p({reflect:!0})],Tt.prototype,"placement",2),c([p({reflect:!0})],Tt.prototype,"strategy",2),c([p({type:Number})],Tt.prototype,"distance",2),c([p({type:Number})],Tt.prototype,"skidding",2),c([p({type:Boolean})],Tt.prototype,"arrow",2),c([p({attribute:"arrow-placement"})],Tt.prototype,"arrowPlacement",2),c([p({attribute:"arrow-padding",type:Number})],Tt.prototype,"arrowPadding",2),c([p({type:Boolean})],Tt.prototype,"flip",2),c([p({attribute:"flip-fallback-placements",converter:{fromAttribute:t=>t.split(" ").map(r=>r.trim()).filter(r=>r!==""),toAttribute:t=>t.join(" ")}})],Tt.prototype,"flipFallbackPlacements",2),c([p({attribute:"flip-fallback-strategy"})],Tt.prototype,"flipFallbackStrategy",2),c([p({type:Object})],Tt.prototype,"flipBoundary",2),c([p({attribute:"flip-padding",type:Number})],Tt.prototype,"flipPadding",2),c([p({type:Boolean})],Tt.prototype,"shift",2),c([p({type:Object})],Tt.prototype,"shiftBoundary",2),c([p({attribute:"shift-padding",type:Number})],Tt.prototype,"shiftPadding",2),c([p({attribute:"auto-size"})],Tt.prototype,"autoSize",2),c([p()],Tt.prototype,"sync",2),c([p({type:Object})],Tt.prototype,"autoSizeBoundary",2),c([p({attribute:"auto-size-padding",type:Number})],Tt.prototype,"autoSizePadding",2),c([p({attribute:"hover-bridge",type:Boolean})],Tt.prototype,"hoverBridge",2);var sl=Tt;Tt.define("zn-popup");var Ab=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host(:not([expanded])){cursor:pointer}:host([expanded]) .expand{transform:rotate(180deg)}:host-context(.app-navigation) .header{padding:var(--zn-base-px)}.header{display:flex;flex-direction:row;justify-content:space-between;cursor:pointer;overflow:hidden;padding:var(--zn-base-gap);justify-items:center}.header .caption{font-weight:600;margin:0;flex-grow:1;width:100%;color:rgb(var(--zn-text-heading))}.header .description{text-align:right;padding:0;margin:0}.header .summary{font-weight:500;font-size:90%}.header .label{font-weight:500;font-size:90%}.header__left{flex-grow:1;display:flex;flex-direction:column;justify-content:center;align-items:flex-start}.header__right{display:flex;flex-direction:row;align-items:center}:host([error-label]) .header .caption{color:rgb(var(--zn-color-error))}:host([warning-label]) .header .caption{color:rgb(var(--zn-color-warning))}:host(:not([flush])).content{padding:var(--zn-base-gap,0)}.content{transition:0.1s all ease-out}:host([expanded]) .content{margin:0 var(--zn-spacing-medium);padding-bottom:var(--zn-spacing-medium)}:host([expanded]) .content--flush{margin:0;padding:0}:host(:not([expanded])) .content{max-height:0;opacity:0;overflow:hidden;padding:0}.expand{margin-left:var(--zn-spacing-medium)}`;var
|
|
156
|
+
`}};Tt.styles=E($b),c([F(".popup")],Tt.prototype,"popup",2),c([F(".popup__arrow")],Tt.prototype,"arrowEl",2),c([p()],Tt.prototype,"anchor",2),c([p({type:Boolean,reflect:!0})],Tt.prototype,"active",2),c([p({reflect:!0})],Tt.prototype,"placement",2),c([p({reflect:!0})],Tt.prototype,"strategy",2),c([p({type:Number})],Tt.prototype,"distance",2),c([p({type:Number})],Tt.prototype,"skidding",2),c([p({type:Boolean})],Tt.prototype,"arrow",2),c([p({attribute:"arrow-placement"})],Tt.prototype,"arrowPlacement",2),c([p({attribute:"arrow-padding",type:Number})],Tt.prototype,"arrowPadding",2),c([p({type:Boolean})],Tt.prototype,"flip",2),c([p({attribute:"flip-fallback-placements",converter:{fromAttribute:t=>t.split(" ").map(r=>r.trim()).filter(r=>r!==""),toAttribute:t=>t.join(" ")}})],Tt.prototype,"flipFallbackPlacements",2),c([p({attribute:"flip-fallback-strategy"})],Tt.prototype,"flipFallbackStrategy",2),c([p({type:Object})],Tt.prototype,"flipBoundary",2),c([p({attribute:"flip-padding",type:Number})],Tt.prototype,"flipPadding",2),c([p({type:Boolean})],Tt.prototype,"shift",2),c([p({type:Object})],Tt.prototype,"shiftBoundary",2),c([p({attribute:"shift-padding",type:Number})],Tt.prototype,"shiftPadding",2),c([p({attribute:"auto-size"})],Tt.prototype,"autoSize",2),c([p()],Tt.prototype,"sync",2),c([p({type:Object})],Tt.prototype,"autoSizeBoundary",2),c([p({attribute:"auto-size-padding",type:Number})],Tt.prototype,"autoSizePadding",2),c([p({attribute:"hover-bridge",type:Boolean})],Tt.prototype,"hoverBridge",2);var sl=Tt;Tt.define("zn-popup");var Ab=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host(:not([expanded])){cursor:pointer}:host([expanded]) .expand{transform:rotate(180deg)}:host-context(.app-navigation) .header{padding:var(--zn-base-px)}.header{display:flex;flex-direction:row;justify-content:space-between;cursor:pointer;overflow:hidden;padding:var(--zn-base-gap);justify-items:center}.header .caption{font-weight:600;margin:0;flex-grow:1;width:100%;color:rgb(var(--zn-text-heading))}.header .description{text-align:right;padding:0;margin:0}.header .summary{font-weight:500;font-size:90%}.header .label{font-weight:500;font-size:90%}.header__left{flex-grow:1;display:flex;flex-direction:column;justify-content:center;align-items:flex-start}.header__right{display:flex;flex-direction:row;align-items:center}:host([error-label]) .header .caption{color:rgb(var(--zn-color-error))}:host([warning-label]) .header .caption{color:rgb(var(--zn-color-warning))}:host(:not([flush])).content{padding:var(--zn-base-gap,0)}.content{transition:0.1s all ease-out}:host([expanded]) .content{margin:0 var(--zn-spacing-medium);padding-bottom:var(--zn-spacing-medium)}:host([expanded]) .content--flush{margin:0;padding:0}:host(:not([expanded])) .content{max-height:0;opacity:0;overflow:hidden;padding:0}.expand{margin-left:var(--zn-spacing-medium)}`;var De=class extends C{constructor(){super(...arguments);this.caption="";this.label="";this.showNumber=!1;this.countElement="*";this.expanded=!1;this.storeKey="";this.storeTtl=0;this.flush=!1;this.numberOfItems=0;this.hasSlotController=new Q(this,"[default]","header","caption","label","description");this.observer=new Lt(this,{target:null,config:{childList:!0,subtree:!0},callback:()=>this.recalculateNumberOfItems()});this.showArrow=!0;this.handleCaptionToggle=t=>{let r=t.target;r&&(this.expanded=r.checked)};this.handleCollapse=t=>{let r=t.target;r.tagName.toLowerCase()==="input"&&r.type==="checkbox"||this.expanded&&(this.expanded=!1,t.stopPropagation())};this.recalculateNumberOfItems=()=>{let t=this.hasSlotController.getDefaultSlot().filter(n=>n.nodeType===Node.ELEMENT_NODE);if(this.countElement==="*"){this.numberOfItems=t.length;return}let r=t.flatMap(n=>Array.from(n.querySelectorAll(this.countElement)));this.numberOfItems=r.length}}async connectedCallback(){if(super.connectedCallback(),this._store=new hr(this.localStorage?window.localStorage:window.sessionStorage,"zncla:",this.storeTtl),this.expanded=this.defaultState==="open",this.storeKey){let r=this._store.get(this.storeKey);r&&(this.expanded=r==="true")}this.showNumber&&this.observer.observe(this),await this.updateComplete;let t=this.hasSlotController.getSlot("caption");if(t){let r=t.querySelectorAll("zn-toggle");this.showArrow=!1,r.forEach(n=>{n.removeEventListener("zn-input",this.handleCaptionToggle),n.addEventListener("zn-input",this.handleCaptionToggle)})}}updated(t){super.updated(t),t.has("expanded")&&this.storeKey&&this._store.set(this.storeKey,this.expanded.toString())}render(){return this.recalculateNumberOfItems(),u`
|
|
157
157
|
<div @click="${()=>this.expanded?"":this.expanded=!0}">
|
|
158
158
|
<slot name="header" part="header" class="header" @click="${this.handleCollapse}">
|
|
159
159
|
<div class="header__left">
|
|
@@ -176,7 +176,7 @@ import{a as En,b as E_,c as pr,d as c,e as B}from"./chunks/zn.UBLZO6CI.js";var b
|
|
|
176
176
|
<div class=${D({content:!0,"content--flush":this.flush})} part="content">
|
|
177
177
|
<slot @slotchange="${this.requestUpdate}"></slot>
|
|
178
178
|
</div>
|
|
179
|
-
</div>`}};
|
|
179
|
+
</div>`}};De.styles=E(Ab),c([p({reflect:!0})],De.prototype,"caption",2),c([p({reflect:!0})],De.prototype,"description",2),c([p({reflect:!0})],De.prototype,"label",2),c([p({type:Boolean,attribute:"show-number",reflect:!0})],De.prototype,"showNumber",2),c([p({type:String,attribute:"count-element"})],De.prototype,"countElement",2),c([p({type:Boolean,reflect:!0})],De.prototype,"expanded",2),c([p({attribute:"default"})],De.prototype,"defaultState",2),c([p({attribute:"local-storage",type:Boolean,reflect:!0})],De.prototype,"localStorage",2),c([p({attribute:"store-key",reflect:!0})],De.prototype,"storeKey",2),c([p({attribute:"store-ttl",type:Number,reflect:!0})],De.prototype,"storeTtl",2),c([p({attribute:"flush",type:Boolean,reflect:!0})],De.prototype,"flush",2),c([O()],De.prototype,"numberOfItems",2);var oa=De;De.define("zn-collapsible");var Lb=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host,.wrapper{display:flex;justify-content:flex-start;align-items:center;border-radius:10px}:host{background-color:rgba(var(--zn-panel),0.8)}:host([appearance=solid]){background-color:rgb(var(--zn-panel))}:host([appearance=solid]) .wrapper:before{backdrop-filter:none}.alert-icon{padding:var(--zn-spacing-2x-small) var(--zn-spacing-x-small)}p{margin:0}.wrapper{position:relative;border:1px solid rgb(var(--zn-border-color)) !important;width:100%;height:100%}.wrapper:before{border-radius:10px;position:absolute;content:"";inset:0;z-index:-1;backdrop-filter:blur(3px)}:host([center]) .content{text-align:center}:host([caption]) zn-icon{align-self:flex-start;margin-top:6px}.content{display:flex;flex-direction:column;flex-grow:1;align-self:start;text-align:left;padding:8px}.content>h6{font-size:inherit;font-weight:600;margin:0;padding:0}.actions{display:flex;justify-content:flex-end;align-items:center;gap:var(--zn-spacing-small)}:host .wrapper h6{color:rgb(var(--zn-text))}:host .wrapper{border-color:rgb(var(--zn-border-color)) !important;background:rgba(var(--zn-panel),0.05)}:host([level=primary]) .wrapper h6{color:rgb(var(--zn-primary))}:host([level=primary]) .wrapper{border-color:rgb(var(--zn-primary)) !important;background:rgba(var(--zn-primary),0.05)}:host([level=primary]) .wrapper zn-icon{--icon-color:rgb(var(--zn-primary))}:host([level=error]) .wrapper h6{color:rgb(var(--zn-color-error))}:host([level=error]) .wrapper{border-color:rgb(var(--zn-color-error)) !important;background:rgba(var(--zn-color-error),0.05)}:host([level=error]) .wrapper zn-icon{--icon-color:rgb(var(--zn-color-error))}:host([level=info]) .wrapper h6{color:rgb(var(--zn-color-info))}:host([level=info]) .wrapper{border-color:rgb(var(--zn-color-info)) !important;background:rgba(var(--zn-color-info),0.05)}:host([level=info]) .wrapper zn-icon{--icon-color:rgb(var(--zn-color-info))}:host([level=warning]) .wrapper h6{color:rgb(var(--zn-color-warning))}:host([level=warning]) .wrapper{border-color:rgb(var(--zn-color-warning)) !important;background:rgba(var(--zn-color-warning),0.05)}:host([level=warning]) .wrapper zn-icon{--icon-color:rgb(var(--zn-color-warning))}:host([level=success]) .wrapper h6{color:rgb(var(--zn-color-success))}:host([level=success]) .wrapper{border-color:rgb(var(--zn-color-success)) !important;background:rgba(var(--zn-color-success),0.05)}:host([level=success]) .wrapper zn-icon{--icon-color:rgb(var(--zn-color-success))}:host([level=note]) .wrapper h6{color:var(--zn-color-gray-800)}:host([level=note]) .wrapper{border-color:var(--zn-color-gray-500) !important;background:var(--zn-color-gray-100)}:host([level=note]) .wrapper zn-icon{--icon-color:var(--zn-color-gray-800)}.alert--small{padding:var(--zn-spacing-2x-small) var(--zn-spacing-x-small);font-size:90%}.alert--medium{padding:var(--zn-spacing-x-small) var(--zn-spacing-small);font-size:100%}.alert--large{padding:var(--zn-spacing-small) var(--zn-spacing-medium);font-size:110%}:host([level=cosmic]){border:1px solid transparent}:host([level=cosmic]):before{content:"";z-index:-1;position:absolute;top:-2px;left:-2px;height:calc(100% + 4px);width:calc(100% + 4px);filter:blur(var(--zn-blur,1px));opacity:0.9;border-radius:var(--zn-border-radius);background-image:conic-gradient(from var(--rotate) at 50% 50%,#71d9ff 0%,#a100ff 22%,#71d9ff 44%,#ff00ce 74%,#71d9ff 94%);animation:rotate-gradient 6s linear infinite}:host([level=cosmic]){position:relative;z-index:0}:host([level=cosmic]):before{border-radius:11px}:host([level=cosmic]) .wrapper{border:none !important;background:rgba(var(--zn-panel),0.99)}`;var Or=class extends C{constructor(){super(...arguments);this.icon="";this.caption="";this.collapse=!1;this.appearance="transparent";this.level="info";this.center=!1;this.size="medium"}render(){let t;this.icon&&(this.collapse?t=this.icon?u`
|
|
180
180
|
<zn-icon class="alert-icon" src="${this.icon}" id="xy2" @click="${this.hideAlert}"
|
|
181
181
|
style="cursor: pointer"></zn-icon>`:"":t=this.icon?u`
|
|
182
182
|
<zn-icon class="alert-icon" src="${this.icon}" id="xy2"></zn-icon>`:"");let r=this.caption?u`<h6>${this.caption}</h6>`:"";return u`
|
|
@@ -238,7 +238,7 @@ import{a as En,b as E_,c as pr,d as c,e as B}from"./chunks/zn.UBLZO6CI.js";var b
|
|
|
238
238
|
<zn-chip type="info">Internal Note</zn-chip>`:V}
|
|
239
239
|
<slot name="badge"></slot>
|
|
240
240
|
</div>`}renderContent(){if(!this.message)return u`
|
|
241
|
-
<slot></slot>`;let t=Ib(this.message);return t=t.replace(/\r\n|\r|\n/g,"<br>"),t=t.replace(/\b(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+)(?=\s|$)(?!["<>])/g,'<a href="$1" target="_blank">$1</a>'),
|
|
241
|
+
<slot></slot>`;let t=Ib(this.message);return t=t.replace(/\r\n|\r|\n/g,"<br>"),t=t.replace(/\b(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+)(?=\s|$)(?!["<>])/g,'<a href="$1" target="_blank">$1</a>'),Xe(t)}getTime(){return new Date(parseInt(this.time,10)*1e3).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}getSentTime(){let t=new Date(parseInt(this.time,10)*1e3),r=t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});return t.getDate()!==new Date().getDate()?`${t.toLocaleDateString()} ${r}`:r}};Qe.styles=E(Db),Qe.dependencies={"zn-icon":ct},Qe.SYSTEM_ACTION_TYPES=["connected.agent","attachment.added","transfer","ended","customer.ended","customer.connected","customer.disconnected"],Qe.DISPLAYED_ACTION_TYPES=["","connected.agent","attachment.added","multi.answer","transfer","ended","error","customer.ended","message-sending","customer.connected","customer.disconnected","internal"],c([p()],Qe.prototype,"sender",2),c([p()],Qe.prototype,"message",2),c([p()],Qe.prototype,"time",2),c([p()],Qe.prototype,"avatar",2),c([p({attribute:"action-type",reflect:!0})],Qe.prototype,"actionType",2),c([p({type:Boolean,reflect:!0,attribute:"customer-initiated"})],Qe.prototype,"customerInitiated",2),c([p({type:Boolean,reflect:!0,attribute:"agent-initiated"})],Qe.prototype,"agentInitiated",2),c([p({type:Boolean,reflect:!0,attribute:"hide-sender"})],Qe.prototype,"hideSender",2),c([O()],Qe.prototype,"hasAttachments",2);var Ua=Qe;var u3=Ua;Ua.define("zn-chat-message");var Nb=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:inline-flex;min-width:0}.attachment{font-family:var(--zn-font-sans);font-size:var(--zn-text-paragraph-font-size);font-weight:var(--zn-text-paragraph-font-weight);line-height:var(--zn-text-paragraph-line-height);color:var(--zn-text-paragraph-color);text-transform:var(--zn-text-paragraph-transform);display:inline-flex;align-items:center;gap:var(--zn-spacing-2x-small);color:rgb(var(--zn-text));text-decoration:none;min-width:0}.attachment__icon{flex:0 0 auto}.attachment__label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.attachment:hover .attachment__label{text-decoration:underline}`;var oo=class extends C{constructor(){super(...arguments);this.href="";this.name="";this.icon="paperclip@lu";this.target="_blank";this.download=!1}connectedCallback(){super.connectedCallback(),this.closest("zn-chat-message, zn-content-block")?this.slot||(this.slot="attachments"):console.warn("<zn-chat-message-attachment> can only be used inside a <zn-chat-message> or <zn-content-block>.",this)}render(){let t=this.target==="_blank";return u`
|
|
242
242
|
<a
|
|
243
243
|
part="base"
|
|
244
244
|
class="attachment"
|
|
@@ -377,7 +377,7 @@ import{a as En,b as E_,c as pr,d as c,e as B}from"./chunks/zn.UBLZO6CI.js";var b
|
|
|
377
377
|
<zn-button color="default" slot="footer" @click=${this.handleQBUpdate}>Show Results</zn-button>
|
|
378
378
|
</div>
|
|
379
379
|
</zn-slideout>
|
|
380
|
-
`}};ln.styles=E(Kb),c([p()],ln.prototype,"filters",2),c([p()],ln.prototype,"name",2),c([p()],ln.prototype,"value",2);var Oh=ln;ln.define("zn-data-table-filter");var ee=(i="value")=>(o,t)=>{let r=o.constructor,n=r.prototype.attributeChangedCallback;r.prototype.attributeChangedCallback=function(a,s,l){let d=r.getPropertyOptions(i),h=typeof d.attribute=="string"?d.attribute:i;if(a===h){let m=d.converter||ri,b=(typeof m=="function"?m:m?.fromAttribute??ri.fromAttribute)(l,d.type);this[i]!==b&&(this[t]=b)}n.call(this,a,s,l)}};var Cr=ae(class extends Xe{constructor(i){if(super(i),i.type!==rr.PROPERTY&&i.type!==rr.ATTRIBUTE&&i.type!==rr.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Fc(i))throw Error("`live` bindings can only contain a single expression")}render(i){return i}update(i,[o]){if(o===ie||o===V)return o;let t=i.element,r=i.name;if(i.type===rr.PROPERTY){if(o===t[r])return ie}else if(i.type===rr.BOOLEAN_ATTRIBUTE){if(!!o===t.hasAttribute(r))return ie}else if(i.type===rr.ATTRIBUTE&&t.getAttribute(r)===o+"")return ie;return Ra(i),o}});var Ph=new Set,ja=new Map,Mn,Hh="ltr",Fh="en",Yb=typeof MutationObserver<"u"&&typeof document<"u"&&typeof document.documentElement<"u";if(Yb){let i=new MutationObserver(Xb);Hh=document.documentElement.dir||"ltr",Fh=document.documentElement.lang||navigator.language,i.observe(document.documentElement,{attributes:!0,attributeFilter:["dir","lang"]})}function hl(...i){i.map(o=>{let t=o.$code.toLowerCase();ja.has(t)?ja.set(t,Object.assign(Object.assign({},ja.get(t)),o)):ja.set(t,o),Mn||(Mn=o)}),Xb()}function Xb(){Yb&&(Hh=document.documentElement.dir||"ltr",Fh=document.documentElement.lang||navigator.language),[...Ph.keys()].map(i=>{typeof i.requestUpdate=="function"&&i.requestUpdate()})}var td=class{constructor(o){this.host=o,this.host.addController(this)}hostConnected(){Ph.add(this.host)}hostDisconnected(){Ph.delete(this.host)}dir(){return`${this.host.dir||Hh}`.toLowerCase()}lang(){let o=`${this.host.lang||Fh}`.toLowerCase().replace(/_/g,"-");try{return new Intl.Locale(o),o}catch{return Mn?Mn.$code.toLowerCase():"en"}}getTranslationData(o){var t,r;let n;try{n=new Intl.Locale(o.replace(/_/g,"-"))}catch{return{locale:void 0,language:"",region:"",primary:void 0,secondary:void 0}}let a=n.language.toLowerCase(),s=(r=(t=n.region)===null||t===void 0?void 0:t.toLowerCase())!==null&&r!==void 0?r:"",l=ja.get(`${a}-${s}`),d=ja.get(a);return{locale:n,language:a,region:s,primary:l,secondary:d}}exists(o,t){var r;let{primary:n,secondary:a}=this.getTranslationData((r=t.lang)!==null&&r!==void 0?r:this.lang());return t=Object.assign({includeFallback:!1},t),!!(n&&n[o]||a&&a[o]||t.includeFallback&&Mn&&Mn[o])}term(o,...t){let{primary:r,secondary:n}=this.getTranslationData(this.lang()),a;if(r&&r[o])a=r[o];else if(n&&n[o])a=n[o];else if(Mn&&Mn[o])a=Mn[o];else return console.error(`No translation found for: ${String(o)}`),String(o);return typeof a=="function"?a(...t):a}date(o,t){return o=new Date(o),new Intl.DateTimeFormat(this.lang(),t).format(o)}number(o,t){return o=Number(o),isNaN(o)?"":new Intl.NumberFormat(this.lang(),t).format(o)}relativeTime(o,t,r){return new Intl.RelativeTimeFormat(this.lang(),r).format(o,t)}};var Qb={$code:"en",$name:"English",$dir:"ltr",onChange:"onChange",showPassword:"Show password",hidePassword:"Hide password",clearEntry:"Clear entry",numOptionsSelected:i=>i===0?"No options selected":i===1?"1 option selected":`${i} options selected`,fileButtonText:"Choose a file",fileButtonTextMultiple:"Choose files",folderButtonText:"Choose a folder",fileDragDrop:"Drop files here to upload",folderDragDrop:"Drop folder here to upload",numFilesSelected:i=>i===0?"No files selected":i===1?"1 file selected":`${i} files selected`};hl(Qb);var Jb=Qb;var Ze=class extends td{};hl(Jb);var Zb=S`@charset "UTF-8";@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}.form-control-input{margin:var(--zn-spacing-2x-small) 3px 3px 0}.form-control-input--flush{margin:0}.form-control .form-control__label{display:none}.form-control .form-control__help-text{display:none}.form-control--has-label .form-control__label{display:inline-block;color:var(--zn-input-label-color);font-weight:var(--zn-input-label-font-weight);line-height:var(--zn-input-label-line-height);margin-bottom:var(--zn-spacing-x-small)}.form-control--has-label.form-control--medium .form-control__label{font-size:var(--zn-input-label-font-size-medium)}.form-control--has-label.form-control--large .form-control__label{font-size:var(--zn-input-label-font-size-large)}:host([required]) .form-control--has-label .form-control__label::after{content:var(--zn-input-required-content);margin-inline-start:var(--zn-input-required-content-offset);color:var(--zn-input-required-content-color)}.form-control--has-label.form-control--radio-group .form-control__label,.form-control--has-label.form-control--checkbox-group .form-control__label{margin-bottom:0}.form-control--has-label.form-control--has-label-tooltip .form-control__label{display:inline-flex;align-items:center;gap:var(--zn-spacing-2x-small)}.form-control--has-label.form-control--small .form-control__label{font-size:var(--zn-input-label-font-size-small)}.form-control--label-tooltip{color:var(--zn-color-neutral-700);font-size:var(--zn-font-size-small)}.form-control--label-tooltip zn-icon{--icon-color:var(--zn-color-neutral-700);--icon-size:var(--zn-font-size-small)}.form-control--has-label.form-control--has-context-note{display:flex;justify-content:space-between;flex-wrap:wrap}.form-control__label-context-note{color:var(--zn-input-help-text-color);font-size:var(--zn-font-size-small);margin-bottom:var(--zn-spacing-2x-small)}.form-control--has-label.form-control--has-context-note .form-control-input{width:100%}.form-control--has-help-text .form-control__help-text,.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{display:block;color:var(--zn-input-help-text-color);margin-top:var(--zn-spacing-x-small)}.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{margin-top:0.375rem}.radio--has-selected-content .radio__selected-content,.checkbox--has-selected-content .checkbox__selected-content{display:block;margin-top:var(--zn-spacing-small)}.form-control--has-help-text.form-control--small .form-control__help-text{font-size:var(--zn-input-help-text-font-size-small)}.form-control--has-help-text.form-control--medium .form-control__help-text,.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{font-size:var(--zn-input-help-text-font-size-medium)}.form-control--has-help-text.form-control--large .form-control__help-text{font-size:var(--zn-input-help-text-font-size-large)}.form-control--has-help-text.form-control--radio-group .form-control__help-text,.form-control--has-help-text.form-control--checkbox-group .form-control__help-text{margin-top:var(--zn-spacing-medium)}.form-control--has-help-text .switch .form-control__help-text{margin-top:var(--zn-spacing-3x-small)}.form-control--checkbox-contained-wrapper{height:100%}:host{display:block}.input{flex:1 1 auto;display:inline-flex;align-items:stretch;justify-content:start;position:relative;width:100%;box-shadow:var(--zn-shadow-x-small);font-family:var(--zn-input-font-family),sans-serif;font-weight:var(--zn-input-font-weight);letter-spacing:var(--zn-input-letter-spacing);vertical-align:middle;overflow:hidden;cursor:text;transition:var(--zn-transition-fast) color,var(--zn-transition-fast) border,var(--zn-transition-fast) background-color}.input--standard{background-color:var(--zn-input-background-color);border:solid var(--zn-input-border-width) var(--zn-input-border-color)}.input--standard:hover:not(.input--disabled,.input--filled){background-color:var(--zn-input-background-color-hover);border-color:var(--zn-input-border-color-hover)}.input--filled:hover:not(.input--disabled){background-color:var(--zn-color-neutral-50);border-color:var(--zn-input-border-color-hover)}.input--standard.input--focused:not(.input--disabled){background-color:var(--zn-input-background-color-focus);border-color:var(--zn-input-border-color-focus)}.input--standard.input--focused:not(.input--disabled):not(.input--x-small){box-shadow:0 0 0 var(--zn-focus-ring-width) var(--zn-input-focus-ring-color)}.input--standard.input--focused:not(.input--disabled).input--x-small{box-shadow:0 0 0 var(--zn-focus-ring-width-x-small) var(--zn-input-focus-ring-color)}.input--standard.input--focused:not(.input--disabled) .input__control{color:var(--zn-input-color-focus)}.input--standard.input--disabled{background-color:var(--zn-input-background-color-disabled);border-color:var(--zn-input-border-color-disabled);opacity:0.5;cursor:not-allowed}.input--standard.input--filled{background-color:rgba(var(--zn-panel),var(--zn-panel-opacity))}.input--standard.input--disabled .input__control{color:var(--zn-input-color-disabled)}.input--standard.input--disabled .input__control::-moz-placeholder{color:var(--zn-input-placeholder-color-disabled)}.input--standard.input--disabled .input__control::placeholder{color:var(--zn-input-placeholder-color-disabled)}.input__control{flex:1 1 auto;font-family:inherit;font-size:inherit;font-weight:inherit;min-width:0;height:100%;color:var(--zn-input-color);border:none;background:inherit;box-shadow:none;padding:0;margin:0;cursor:inherit;-webkit-appearance:none;line-height:var(--zn-input-line-height)}input[type=text].input__control[data-color-input]{font-family:var(--zn-font-mono,"SFMono-Regular","Consolas","Liberation Mono","Menlo",monospace);font-size:0.9em}.input__control::-webkit-search-decoration,.input__control::-webkit-search-cancel-button,.input__control::-webkit-search-results-button,.input__control::-webkit-search-results-decoration{-webkit-appearance:none}.input__control:-webkit-autofill,.input__control:-webkit-autofill:hover,.input__control:-webkit-autofill:focus,.input__control:-webkit-autofill:active{box-shadow:0 0 0 var(--zn-input-height-large) var(--zn-input-background-color) inset !important;-webkit-text-fill-color:var(--zn-input-color);caret-color:var(--zn-input-color)}.input__control::-moz-placeholder{color:var(--zn-input-placeholder-color);-moz-user-select:none;user-select:none;-webkit-user-select:none}.input__control::placeholder{color:var(--zn-input-placeholder-color);-moz-user-select:none;user-select:none;-webkit-user-select:none}.input:hover:not(.input--disabled) .input__control{color:var(--zn-input-color-hover)}.input__control:focus{outline:none}.input__prefix,.input__suffix{display:inline-flex;flex:0 0 auto;align-items:center;align-self:stretch;height:100%;cursor:default;color:var(--zn-input-icon-color);font-size:var(--zn-font-size-small)}.input__prefix zn-icon,.input__suffix zn-icon{--icon-size:var(--zn-font-size-x-large);color:var(--zn-input-icon-color);font-size:var(--zn-font-size-small)}.input__prefix ::slotted(zn-icon),.input__suffix ::slotted(zn-icon){--icon-size:var(--zn-font-size-medium);font-size:var(--zn-font-size-medium);color:var(--zn-input-icon-color)}.input--x-small{border-radius:var(--zn-input-border-radius-x-small);font-size:var(--zn-input-font-size-small);height:var(--zn-input-height-x-small)}.input--x-small .input__control{height:calc(var(--zn-input-height-x-small) - var(--zn-input-border-width) * 2);padding:0 var(--zn-input-spacing-small) 0 var(--zn-spacing-small)}.input--x-small .input__clear,.input--x-small .input__password-toggle{width:calc(1em + var(--zn-input-spacing-x-small) * 2)}.input--x-small .input__prefix ::slotted(*),.input__prefix-default{margin-inline-start:var(--zn-spacing-x-small)}.input--x-small .input__suffix ::slotted(*),.input__suffix-default{margin-inline-end:var(--zn-input-spacing-x-small)}.input--x-small .input__suffix ::slotted(zn-button),.input--x-small .input__prefix ::slotted(zn-button),.input--x-small .input__suffix ::slotted(zn-checkbox),.input--x-small .input__prefix ::slotted(zn-checkbox){margin-inline-end:0;margin-inline-start:0}.input--small{border-radius:var(--zn-input-border-radius-small);font-size:var(--zn-input-font-size-small);height:var(--zn-input-height-small)}.input--small .input__control{height:calc(var(--zn-input-height-small) - var(--zn-input-border-width) * 2);padding:0 var(--zn-input-spacing-small) 0 var(--zn-spacing-small)}.input--small .input__clear,.input--small .input__password-toggle{width:calc(1em + var(--zn-input-spacing-small) * 2)}.input--small .input__prefix ::slotted(*),.input__prefix-default{margin-inline-start:var(--zn-input-spacing-small)}.input--small .input__suffix ::slotted(*),.input__suffix-default{margin-inline-end:var(--zn-input-spacing-small)}.input--small .input__suffix ::slotted(zn-button),.input--small .input__prefix ::slotted(zn-button),.input--small .input__suffix ::slotted(zn-checkbox),.input--small .input__prefix ::slotted(zn-checkbox){margin-inline-end:0;margin-inline-start:0}.input--medium{border-radius:var(--zn-input-border-radius-medium);font-size:var(--zn-input-font-size-medium);height:var(--zn-input-height-medium)}.input--medium .input__control{height:calc(var(--zn-input-height-medium) - var(--zn-input-border-width) * 2);padding:0 var(--zn-input-spacing-small) 0 var(--zn-spacing-small)}.input--medium .input__clear,.input--medium .input__password-toggle{width:calc(1em + var(--zn-input-spacing-medium) * 2)}.input--medium .input__prefix ::slotted(*),.input__prefix-default{margin-inline-start:var(--zn-spacing-small)}.input--medium .input__suffix ::slotted(*),.input__suffix-default{margin-inline-end:var(--zn-spacing-small)}.input--medium .input__suffix ::slotted(zn-button),.input--medium .input__prefix ::slotted(zn-button),.input--medium .input__suffix ::slotted(zn-checkbox),.input--medium .input__prefix ::slotted(zn-checkbox){margin-inline-end:0;margin-inline-start:0}.input__suffix ::slotted(zn-button),.input__prefix ::slotted(zn-button){--zn-button-border-color:rgb(var(--zn-color-border));--zn-button-border-width:0}.input__suffix ::slotted(zn-button){--zn-button-border-left-width:1px}.input__prefix ::slotted(zn-button){--zn-button-border-right-width:1px}.input--large{border-radius:var(--zn-input-border-radius-large);font-size:var(--zn-input-font-size-large);height:var(--zn-input-height-large)}.input--large .input__control{height:calc(var(--zn-input-height-large) - var(--zn-input-border-width) * 2);padding:0 var(--zn-input-spacing-medium) 0 var(--zn-spacing-small)}.input--large .input__clear,.input--large .input__password-toggle{width:calc(1em + var(--zn-input-spacing-large) * 2)}.input--large .input__suffix ::slotted(zn-button),.input--large .input__prefix ::slotted(zn-button),.input--large .input__suffix ::slotted(zn-checkbox),.input--large .input__prefix ::slotted(zn-checkbox){margin-inline-end:0;margin-inline-start:0}.input--pill.input--x-small{border-radius:var(--zn-input-height-small);padding:0 var(--zn-spacing-x-small)}.input--pill.input--small{border-radius:var(--zn-input-height-small);padding:0 var(--zn-spacing-x-small)}.input--pill.input--medium{border-radius:var(--zn-input-height-medium);padding:0 var(--zn-spacing-x-small)}.input--pill.input--large{border-radius:var(--zn-input-height-large);padding:0 var(--zn-spacing-x-small)}.input__clear:not(.input__clear--visible){visibility:hidden}.input__clear,.input__password-toggle{display:inline-flex;align-items:center;justify-content:center;font-size:var(--zn-font-size-large);color:var(--zn-input-icon-color);border:none;background:none;padding:0;transition:var(--zn-transition-fast) color;cursor:pointer}.input__clear zn-icon,.input__password-toggle zn-icon{--icon-size:var(--zn-font-size-large)}.input__clear:hover,.input__password-toggle:hover{color:var(--zn-input-icon-color-hover)}.input__clear:focus,.input__password-toggle:focus{outline:none}.input--empty .input__clear{visibility:hidden}::-ms-reveal{display:none}.input--no-spin-buttons input[type=number]::-webkit-outer-spin-button,.input--no-spin-buttons input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;display:none}.input--no-spin-buttons input[type=number]{-moz-appearance:textfield}input[type=date]::-webkit-calendar-picker-indicator{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" height="14" width="12.25" viewBox="0 0 448 512"><path fill="%236d7176" d="M128 0c13.3 0 24 10.7 24 24V64H296V24c0-13.3 10.7-24 24-24s24 10.7 24 24V64h40c35.3 0 64 28.7 64 64v16 48V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V192 144 128C0 92.7 28.7 64 64 64h40V24c0-13.3 10.7-24 24-24zM400 192H48V448c0 8.8 7.2 16 16 16H384c8.8 0 16-7.2 16-16V192zM112 256h96c8.8 0 16 7.2 16 16v96c0 8.8-7.2 16-16 16H112c-8.8 0-16-7.2-16-16V272c0-8.8 7.2-16 16-16z"/></svg>')}.input__color-swatch{display:inline-flex;align-self:stretch;border:none;border-inline-start:solid var(--zn-input-border-width) var(--zn-input-border-color);border-radius:0;background-color:var(--zn-color-neutral-0);cursor:pointer;overflow:hidden;position:relative;flex-shrink:0;margin:0}.input__color-swatch:hover .input__color-swatch-inner{filter:brightness(0.95)}.input__color-swatch-inner{width:100%;height:100%;background-color:var(--color-value,#000000);transition:var(--zn-transition-fast) filter}.input--x-small .input__color-swatch{width:calc(var(--zn-input-height-x-small) * 1.2)}.input--small .input__color-swatch{width:calc(var(--zn-input-height-small) * 1.2)}.input--medium .input__color-swatch{width:calc(var(--zn-input-height-medium) * 1.2)}.input--large .input__color-swatch{width:calc(var(--zn-input-height-large) * 1.2)}:host([type=range]) .form-control--has-label .form-control__label,:host([type=range]) .form-control__label-context-note{margin-bottom:0}:host([type=range]) .form-control-input{margin-top:0}.input--standard.input--range{--zn-range-track-height:6px;--zn-range-track-color:var(--zn-color-neutral-200);--zn-range-thumb-size:18px;--zn-range-thumb-color:var(--zn-color-primary-600);--zn-range-thumb-ring-width:4px;align-items:center;height:var(--zn-range-thumb-size);padding:0;overflow:visible;cursor:pointer}.input--standard.input--range,.input--standard.input--range:hover,.input--standard.input--range.input--focused,.input--standard.input--range.input--disabled{border:none;background:none;box-shadow:none}.input--standard.input--range.input--x-small{--zn-range-track-height:4px;--zn-range-thumb-size:14px;--zn-range-thumb-ring-width:3px}.input--standard.input--range.input--small{--zn-range-track-height:5px;--zn-range-thumb-size:16px;--zn-range-thumb-ring-width:3px}.input--standard.input--range.input--large{--zn-range-track-height:7px;--zn-range-thumb-size:20px}.input--range .input__control{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:var(--zn-range-thumb-size);padding:0;margin:0;background:none;cursor:inherit}.input--range .input__control::-webkit-slider-runnable-track{height:var(--zn-range-track-height);border-radius:calc(var(--zn-range-track-height) / 2);background-color:var(--zn-range-track-color)}.input--range .input__control::-moz-range-track{height:var(--zn-range-track-height);border-radius:calc(var(--zn-range-track-height) / 2);background-color:var(--zn-range-track-color)}.input--range .input__control::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:var(--zn-range-thumb-size);height:var(--zn-range-thumb-size);margin-top:calc((var(--zn-range-track-height) - var(--zn-range-thumb-size)) / 2);border:var(--zn-range-thumb-ring-width) solid var(--zn-color-neutral-0);border-radius:50%;background-color:var(--zn-range-thumb-color);box-shadow:0 0 0 1px var(--zn-input-border-color);-webkit-transition:var(--zn-transition-fast) box-shadow,var(--zn-transition-fast) background-color;transition:var(--zn-transition-fast) box-shadow,var(--zn-transition-fast) background-color}.input--range .input__control::-moz-range-thumb{width:var(--zn-range-thumb-size);height:var(--zn-range-thumb-size);box-sizing:border-box;border:var(--zn-range-thumb-ring-width) solid var(--zn-color-neutral-0);border-radius:50%;background-color:var(--zn-range-thumb-color);box-shadow:0 0 0 1px var(--zn-input-border-color);-moz-transition:var(--zn-transition-fast) box-shadow,var(--zn-transition-fast) background-color;transition:var(--zn-transition-fast) box-shadow,var(--zn-transition-fast) background-color}.input--range:hover:not(.input--disabled) .input__control::-webkit-slider-thumb{background-color:var(--zn-color-primary-500);box-shadow:0 0 0 1px var(--zn-input-border-color-hover)}.input--range:hover:not(.input--disabled) .input__control::-moz-range-thumb{background-color:var(--zn-color-primary-500);box-shadow:0 0 0 1px var(--zn-input-border-color-hover)}.input--range .input__control:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 var(--zn-focus-ring-width) var(--zn-input-focus-ring-color)}.input--range .input__control:focus-visible::-moz-range-thumb{box-shadow:0 0 0 var(--zn-focus-ring-width) var(--zn-input-focus-ring-color)}.input__color-picker{position:absolute;opacity:0;width:0;height:0;padding:0;margin:0;pointer-events:none;border:none;visibility:hidden}`;var at=class extends C{constructor(){super(...arguments);this.formControlController=new ot(this,{assumeInteractionOn:["zn-blur","zn-input"]});this.hasSlotController=new Q(this,"help-text","label","label-tooltip");this.localize=new Ze(this);this.hasFocus=!1;this.isUserTyping=!1;this.title="";this.__numberInput=Object.assign(document.createElement("input"),{type:"number"});this.__dateInput=Object.assign(document.createElement("input"),{type:"date"});this.type="text";this.name="";this.value="";this.defaultValue="";this.size="medium";this.pill=!1;this.label="";this.labelTooltip="";this.contextNote="";this.helpText="";this.clearable=!1;this.optionalIcon=!1;this.disabled=!1;this.filled=!1;this.placeholder="";this.readonly=!1;this.passwordToggle=!1;this.passwordVisible=!1;this.noSpinButtons=!1;this.colorFormat="hex";this.valueSuffix="";this.required=!1;this.spellcheck=!0;this.triggerSubmit=!1}get valueAsDate(){return this.__dateInput.type=this.type,this.__dateInput.value=this.value,this.input?.valueAsDate||this.__dateInput.valueAsDate}set valueAsDate(t){this.__dateInput.type=this.type,this.__dateInput.valueAsDate=t,this.value=this.__dateInput.value}get valueAsNumber(){return this.__numberInput.value=this.value,this.input?.valueAsNumber||this.__numberInput.valueAsNumber}set valueAsNumber(t){this.__numberInput.valueAsNumber=t,this.value=this.__numberInput.value}get validity(){return this.input?.validity}get validationMessage(){return this.input.validationMessage}validateMinMax(){this.type!=="number"&&this.type!=="date"||(typeof this.min<"u"&&parseInt(this.value)<parseInt(this.min)&&(this.value=this.min.toString()),typeof this.max<"u"&&parseInt(this.value)>parseInt(this.max)&&(this.value=this.max.toString()))}hexToRgb(t){let r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(!r)return"";let n=parseInt(r[1],16),a=parseInt(r[2],16),s=parseInt(r[3],16);return`rgb(${n}, ${a}, ${s})`}rgbToHex(t){let r=t.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);if(!r)return"";let n=parseInt(r[1]).toString(16).padStart(2,"0"),a=parseInt(r[2]).toString(16).padStart(2,"0"),s=parseInt(r[3]).toString(16).padStart(2,"0");return`#${n}${a}${s}`}hexToOklch(t){let r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(!r)return"";let n=parseInt(r[1],16)/255,a=parseInt(r[2],16)/255,s=parseInt(r[3],16)/255;n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,a=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92,s=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92;let l=n*.4124564+a*.3575761+s*.1804375,d=n*.2126729+a*.7151522+s*.072175,h=n*.0193339+a*.119192+s*.9503041,m=l/.95047,f=d/1,b=h/1.08883,g=m>.008856?Math.pow(m,1/3):7.787*m+16/116,v=f>.008856?Math.pow(f,1/3):7.787*f+16/116,x=b>.008856?Math.pow(b,1/3):7.787*b+16/116,_=116*v-16,$=500*(g-v),N=200*(v-x),G=Math.sqrt($*$+N*N),I=Math.atan2(N,$)*180/Math.PI;I<0&&(I+=360);let w=(_/100).toFixed(3),T=(G/150).toFixed(3),L=I.toFixed(1);return`oklch(${w} ${T} ${L})`}oklchToHex(t){let r=t.match(/^oklch\(([0-9.]+)\s+([0-9.]+)\s+([0-9.]+)\)$/);if(!r)return"";let n=parseFloat(r[1])*100,a=parseFloat(r[2])*150,s=parseFloat(r[3]),l=a*Math.cos(s*Math.PI/180),d=a*Math.sin(s*Math.PI/180),h=(n+16)/116,m=l/500+h,f=h-d/200,b=m>.206897?Math.pow(m,3):(m-16/116)/7.787,g=h>.206897?Math.pow(h,3):(h-16/116)/7.787,v=f>.206897?Math.pow(f,3):(f-16/116)/7.787,x=b*.95047,_=g*1,$=v*1.08883,N=x*3.2404542+_*-1.5371385+$*-.4985314,G=x*-.969266+_*1.8760108+$*.041556,I=x*.0556434+_*-.2040259+$*1.0572252;N=N>.0031308?1.055*Math.pow(N,1/2.4)-.055:12.92*N,G=G>.0031308?1.055*Math.pow(G,1/2.4)-.055:12.92*G,I=I>.0031308?1.055*Math.pow(I,1/2.4)-.055:12.92*I,N=Math.max(0,Math.min(1,N)),G=Math.max(0,Math.min(1,G)),I=Math.max(0,Math.min(1,I));let w=Math.round(N*255).toString(16).padStart(2,"0"),T=Math.round(G*255).toString(16).padStart(2,"0"),L=Math.round(I*255).toString(16).padStart(2,"0");return`#${w}${T}${L}`}hexToHsl(t){let r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(!r)return"";let n=parseInt(r[1],16)/255,a=parseInt(r[2],16)/255,s=parseInt(r[3],16)/255,l=Math.max(n,a,s),d=Math.min(n,a,s),h=(l+d)/2,m=0,f=0;if(l!==d){let b=l-d;switch(f=h>.5?b/(2-l-d):b/(l+d),l){case n:m=((a-s)/b+(a<s?6:0))/6;break;case a:m=((s-n)/b+2)/6;break;case s:m=((n-a)/b+4)/6;break}}return`hsl(${Math.round(m*360)}, ${Math.round(f*100)}%, ${Math.round(h*100)}%)`}hslToHex(t){let r=t.match(/^hsl\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*\)$/);if(!r)return"";let n=parseInt(r[1])/360,a=parseInt(r[2])/100,s=parseInt(r[3])/100,l,d,h;if(a===0)l=d=h=s;else{let g=(_,$,N)=>(N<0&&(N+=1),N>1&&(N-=1),N<.16666666666666666?_+($-_)*6*N:N<.5?$:N<.6666666666666666?_+($-_)*(.6666666666666666-N)*6:_),v=s<.5?s*(1+a):s+a-s*a,x=2*s-v;l=g(x,v,n+1/3),d=g(x,v,n),h=g(x,v,n-1/3)}let m=Math.round(l*255).toString(16).padStart(2,"0"),f=Math.round(d*255).toString(16).padStart(2,"0"),b=Math.round(h*255).toString(16).padStart(2,"0");return`#${m}${f}${b}`}convertToHex(t){return t?t.startsWith("#")?t:t.startsWith("rgb")?this.rgbToHex(t):t.startsWith("hsl")?this.hslToHex(t):t.startsWith("oklch")?this.oklchToHex(t):t:"#000000"}convertFromHex(t){return t?this.colorFormat==="hex"?t:this.colorFormat==="rgb"?this.hexToRgb(t):this.colorFormat==="hsl"?this.hexToHsl(t):this.colorFormat==="oklch"?this.hexToOklch(t):t:""}handleBlur(){if(this.hasFocus=!1,this.isUserTyping=!1,this.validateMinMax(),this.type==="color"&&this.value){let t=this.convertToHex(this.value);if(t){let r=this.convertFromHex(t);r!==this.value&&(this.value=r)}}this.emit("zn-blur")}handleChange(){if(this.type==="currency"&&this.input.value)this.value=parseFloat(this.input.value).toFixed(2);else if(this.type==="color"){let t=this.input.value.trim();if(t==="")this.value="";else if(this.colorFormat==="hex"){let r=t;r&&!r.startsWith("#")&&(r="#"+r),/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(r)&&(this.value=r.toLowerCase())}else this.colorFormat==="rgb"?/^rgb\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*\)$/.test(t)&&(this.value=t):this.colorFormat==="hsl"?/^hsl\(\s*\d+\s*,\s*\d+%\s*,\s*\d+%\s*\)$/.test(t)&&(this.value=t):this.colorFormat==="oklch"&&/^oklch\(\s*[0-9.]+\s+[0-9.]+\s+[0-9.]+\s*\)$/.test(t)&&(this.value=t)}else this.value=this.input.value;this.emit("zn-change")}handleClearClick(t){this.value="",this.emit("zn-clear"),this.emit("zn-input"),this.emit("zn-change"),this.input.focus(),t.stopPropagation()}handleFocus(){this.hasFocus=!0,this.emit("zn-focus")}handleInput(){this.isUserTyping=!0,this.type==="color"?this.value=this.input.value:this.value=this.input.value,this.formControlController.updateValidity(),this.emit("zn-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t)}handleKeyDown(t){if(t.key==="Escape"){this.input.blur(),t.stopPropagation();return}let r=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;if(t.key==="Enter"&&!r&&!t.defaultPrevented&&!t.isComposing){let n=this.formControlController.getForm();if(!this.triggerSubmit&&(n?.hasAttribute("enter-navigation")||n?.hasAttribute("data-enter-navigation")))return;this.formControlController.submit()}}handlePasswordToggle(){this.passwordVisible=!this.passwordVisible}handleColorSwatchClick(){this.type==="color"&&this.colorPicker&&this.colorPicker.click()}handleColorPickerChange(){if(this.type==="color"&&this.colorPicker){let t=this.colorPicker.value;this.value=this.convertFromHex(t),this.emit("zn-change"),this.emit("zn-input")}}focusInput(t){if(this.hasFocus)return;let r=t.target;r.tagName==="ZN-CHECKBOX"&&(r.slot==="prefix"||r.closest('[slot="prefix"]'))||(r.classList.contains("input__prefix")||r.slot==="prefix"||r.hasAttribute("part")&&r.getAttribute("part")==="base")&&(this.handleFocus(),this.input.focus())}firstUpdated(){this.type==="range"&&this.value===""&&(this.value=this.input.value)}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleStepChange(){this.input.step=String(this.step),this.formControlController.updateValidity()}async handleValueChange(){if(await this.updateComplete,this.type==="color"&&this.value&&!this.isUserTyping){let t=this.convertToHex(this.value);if(t){let r=this.convertFromHex(t);if(r!==this.value){this.value=r,this.emit("zn-change");return}}}this.formControlController.updateValidity(),this.type==="color"&&this.colorPicker&&(this.colorPicker.value=this.convertToHex(this.value)||"#000000")}async handleColorFormatChange(){if(this.type==="color"&&this.value){let t=this.convertToHex(this.value);if(t){let r=this.convertFromHex(t);r!==this.value&&(this.value=r,this.emit("zn-change"))}}}focus(t){this.input.focus(t)}blur(){this.input.blur()}select(){this.input.select()}setSelectionRange(t,r,n="none"){this.input.setSelectionRange(t,r,n)}setRangeText(t,r,n,a="preserve"){let s=r??this.input.selectionStart,l=n??this.input.selectionEnd;this.input.setRangeText(t,s,l,a),this.value!==this.input.value&&(this.value=this.input.value)}showPicker(){"showPicker"in HTMLInputElement.prototype&&this.input.showPicker()}stepUp(){this.input.stepUp(),this.value!==this.input.value&&(this.value=this.input.value)}stepDown(){this.input.stepDown(),this.value!==this.input.value&&(this.value=this.input.value)}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t=this.hasSlotController.test("label"),r=this.hasSlotController.test("label-tooltip"),n=this.hasSlotController.test("context-note"),a=this.hasSlotController.test("help-text"),s=this.type==="range",l=this.label?!0:t,d=this.labelTooltip?!0:r,h=this.contextNote||s?!0:n,m=this.helpText?!0:a,f=this.clearable&&!this.disabled&&!this.readonly,b=this.optionalIcon,g=f&&(typeof this.value=="number"||this.value.length>0);return u`
|
|
380
|
+
`}};ln.styles=E(Kb),c([p()],ln.prototype,"filters",2),c([p()],ln.prototype,"name",2),c([p()],ln.prototype,"value",2);var Oh=ln;ln.define("zn-data-table-filter");var ee=(i="value")=>(o,t)=>{let r=o.constructor,n=r.prototype.attributeChangedCallback;r.prototype.attributeChangedCallback=function(a,s,l){let d=r.getPropertyOptions(i),h=typeof d.attribute=="string"?d.attribute:i;if(a===h){let m=d.converter||ri,b=(typeof m=="function"?m:m?.fromAttribute??ri.fromAttribute)(l,d.type);this[i]!==b&&(this[t]=b)}n.call(this,a,s,l)}};var Cr=ae(class extends Ye{constructor(i){if(super(i),i.type!==rr.PROPERTY&&i.type!==rr.ATTRIBUTE&&i.type!==rr.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Fc(i))throw Error("`live` bindings can only contain a single expression")}render(i){return i}update(i,[o]){if(o===ie||o===V)return o;let t=i.element,r=i.name;if(i.type===rr.PROPERTY){if(o===t[r])return ie}else if(i.type===rr.BOOLEAN_ATTRIBUTE){if(!!o===t.hasAttribute(r))return ie}else if(i.type===rr.ATTRIBUTE&&t.getAttribute(r)===o+"")return ie;return Ra(i),o}});var Ph=new Set,ja=new Map,Mn,Hh="ltr",Fh="en",Yb=typeof MutationObserver<"u"&&typeof document<"u"&&typeof document.documentElement<"u";if(Yb){let i=new MutationObserver(Xb);Hh=document.documentElement.dir||"ltr",Fh=document.documentElement.lang||navigator.language,i.observe(document.documentElement,{attributes:!0,attributeFilter:["dir","lang"]})}function hl(...i){i.map(o=>{let t=o.$code.toLowerCase();ja.has(t)?ja.set(t,Object.assign(Object.assign({},ja.get(t)),o)):ja.set(t,o),Mn||(Mn=o)}),Xb()}function Xb(){Yb&&(Hh=document.documentElement.dir||"ltr",Fh=document.documentElement.lang||navigator.language),[...Ph.keys()].map(i=>{typeof i.requestUpdate=="function"&&i.requestUpdate()})}var td=class{constructor(o){this.host=o,this.host.addController(this)}hostConnected(){Ph.add(this.host)}hostDisconnected(){Ph.delete(this.host)}dir(){return`${this.host.dir||Hh}`.toLowerCase()}lang(){let o=`${this.host.lang||Fh}`.toLowerCase().replace(/_/g,"-");try{return new Intl.Locale(o),o}catch{return Mn?Mn.$code.toLowerCase():"en"}}getTranslationData(o){var t,r;let n;try{n=new Intl.Locale(o.replace(/_/g,"-"))}catch{return{locale:void 0,language:"",region:"",primary:void 0,secondary:void 0}}let a=n.language.toLowerCase(),s=(r=(t=n.region)===null||t===void 0?void 0:t.toLowerCase())!==null&&r!==void 0?r:"",l=ja.get(`${a}-${s}`),d=ja.get(a);return{locale:n,language:a,region:s,primary:l,secondary:d}}exists(o,t){var r;let{primary:n,secondary:a}=this.getTranslationData((r=t.lang)!==null&&r!==void 0?r:this.lang());return t=Object.assign({includeFallback:!1},t),!!(n&&n[o]||a&&a[o]||t.includeFallback&&Mn&&Mn[o])}term(o,...t){let{primary:r,secondary:n}=this.getTranslationData(this.lang()),a;if(r&&r[o])a=r[o];else if(n&&n[o])a=n[o];else if(Mn&&Mn[o])a=Mn[o];else return console.error(`No translation found for: ${String(o)}`),String(o);return typeof a=="function"?a(...t):a}date(o,t){return o=new Date(o),new Intl.DateTimeFormat(this.lang(),t).format(o)}number(o,t){return o=Number(o),isNaN(o)?"":new Intl.NumberFormat(this.lang(),t).format(o)}relativeTime(o,t,r){return new Intl.RelativeTimeFormat(this.lang(),r).format(o,t)}};var Qb={$code:"en",$name:"English",$dir:"ltr",onChange:"onChange",showPassword:"Show password",hidePassword:"Hide password",clearEntry:"Clear entry",numOptionsSelected:i=>i===0?"No options selected":i===1?"1 option selected":`${i} options selected`,fileButtonText:"Choose a file",fileButtonTextMultiple:"Choose files",folderButtonText:"Choose a folder",fileDragDrop:"Drop files here to upload",folderDragDrop:"Drop folder here to upload",numFilesSelected:i=>i===0?"No files selected":i===1?"1 file selected":`${i} files selected`};hl(Qb);var Jb=Qb;var Ze=class extends td{};hl(Jb);var Zb=S`@charset "UTF-8";@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}.form-control-input{margin:var(--zn-spacing-2x-small) 3px 3px 0}.form-control-input--flush{margin:0}.form-control .form-control__label{display:none}.form-control .form-control__help-text{display:none}.form-control--has-label .form-control__label{display:inline-block;color:var(--zn-input-label-color);font-weight:var(--zn-input-label-font-weight);line-height:var(--zn-input-label-line-height);margin-bottom:var(--zn-spacing-x-small)}.form-control--has-label.form-control--medium .form-control__label{font-size:var(--zn-input-label-font-size-medium)}.form-control--has-label.form-control--large .form-control__label{font-size:var(--zn-input-label-font-size-large)}:host([required]) .form-control--has-label .form-control__label::after{content:var(--zn-input-required-content);margin-inline-start:var(--zn-input-required-content-offset);color:var(--zn-input-required-content-color)}.form-control--has-label.form-control--radio-group .form-control__label,.form-control--has-label.form-control--checkbox-group .form-control__label{margin-bottom:0}.form-control--has-label.form-control--has-label-tooltip .form-control__label{display:inline-flex;align-items:center;gap:var(--zn-spacing-2x-small)}.form-control--has-label.form-control--small .form-control__label{font-size:var(--zn-input-label-font-size-small)}.form-control--label-tooltip{color:var(--zn-color-neutral-700);font-size:var(--zn-font-size-small)}.form-control--label-tooltip zn-icon{--icon-color:var(--zn-color-neutral-700);--icon-size:var(--zn-font-size-small)}.form-control--has-label.form-control--has-context-note{display:flex;justify-content:space-between;flex-wrap:wrap}.form-control__label-context-note{color:var(--zn-input-help-text-color);font-size:var(--zn-font-size-small);margin-bottom:var(--zn-spacing-2x-small)}.form-control--has-label.form-control--has-context-note .form-control-input{width:100%}.form-control--has-help-text .form-control__help-text,.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{display:block;color:var(--zn-input-help-text-color);margin-top:var(--zn-spacing-x-small)}.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{margin-top:0.375rem}.radio--has-selected-content .radio__selected-content,.checkbox--has-selected-content .checkbox__selected-content{display:block;margin-top:var(--zn-spacing-small)}.form-control--has-help-text.form-control--small .form-control__help-text{font-size:var(--zn-input-help-text-font-size-small)}.form-control--has-help-text.form-control--medium .form-control__help-text,.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{font-size:var(--zn-input-help-text-font-size-medium)}.form-control--has-help-text.form-control--large .form-control__help-text{font-size:var(--zn-input-help-text-font-size-large)}.form-control--has-help-text.form-control--radio-group .form-control__help-text,.form-control--has-help-text.form-control--checkbox-group .form-control__help-text{margin-top:var(--zn-spacing-medium)}.form-control--has-help-text .switch .form-control__help-text{margin-top:var(--zn-spacing-3x-small)}.form-control--checkbox-contained-wrapper{height:100%}:host{display:block}.input{flex:1 1 auto;display:inline-flex;align-items:stretch;justify-content:start;position:relative;width:100%;box-shadow:var(--zn-shadow-x-small);font-family:var(--zn-input-font-family),sans-serif;font-weight:var(--zn-input-font-weight);letter-spacing:var(--zn-input-letter-spacing);vertical-align:middle;overflow:hidden;cursor:text;transition:var(--zn-transition-fast) color,var(--zn-transition-fast) border,var(--zn-transition-fast) background-color}.input--standard{background-color:var(--zn-input-background-color);border:solid var(--zn-input-border-width) var(--zn-input-border-color)}.input--standard:hover:not(.input--disabled,.input--filled){background-color:var(--zn-input-background-color-hover);border-color:var(--zn-input-border-color-hover)}.input--filled:hover:not(.input--disabled){background-color:var(--zn-color-neutral-50);border-color:var(--zn-input-border-color-hover)}.input--standard.input--focused:not(.input--disabled){background-color:var(--zn-input-background-color-focus);border-color:var(--zn-input-border-color-focus)}.input--standard.input--focused:not(.input--disabled):not(.input--x-small){box-shadow:0 0 0 var(--zn-focus-ring-width) var(--zn-input-focus-ring-color)}.input--standard.input--focused:not(.input--disabled).input--x-small{box-shadow:0 0 0 var(--zn-focus-ring-width-x-small) var(--zn-input-focus-ring-color)}.input--standard.input--focused:not(.input--disabled) .input__control{color:var(--zn-input-color-focus)}.input--standard.input--disabled{background-color:var(--zn-input-background-color-disabled);border-color:var(--zn-input-border-color-disabled);opacity:0.5;cursor:not-allowed}.input--standard.input--filled{background-color:rgba(var(--zn-panel),var(--zn-panel-opacity))}.input--standard.input--disabled .input__control{color:var(--zn-input-color-disabled)}.input--standard.input--disabled .input__control::-moz-placeholder{color:var(--zn-input-placeholder-color-disabled)}.input--standard.input--disabled .input__control::placeholder{color:var(--zn-input-placeholder-color-disabled)}.input__control{flex:1 1 auto;font-family:inherit;font-size:inherit;font-weight:inherit;min-width:0;height:100%;color:var(--zn-input-color);border:none;background:inherit;box-shadow:none;padding:0;margin:0;cursor:inherit;-webkit-appearance:none;line-height:var(--zn-input-line-height)}input[type=text].input__control[data-color-input]{font-family:var(--zn-font-mono,"SFMono-Regular","Consolas","Liberation Mono","Menlo",monospace);font-size:0.9em}.input__control::-webkit-search-decoration,.input__control::-webkit-search-cancel-button,.input__control::-webkit-search-results-button,.input__control::-webkit-search-results-decoration{-webkit-appearance:none}.input__control:-webkit-autofill,.input__control:-webkit-autofill:hover,.input__control:-webkit-autofill:focus,.input__control:-webkit-autofill:active{box-shadow:0 0 0 var(--zn-input-height-large) var(--zn-input-background-color) inset !important;-webkit-text-fill-color:var(--zn-input-color);caret-color:var(--zn-input-color)}.input__control::-moz-placeholder{color:var(--zn-input-placeholder-color);-moz-user-select:none;user-select:none;-webkit-user-select:none}.input__control::placeholder{color:var(--zn-input-placeholder-color);-moz-user-select:none;user-select:none;-webkit-user-select:none}.input:hover:not(.input--disabled) .input__control{color:var(--zn-input-color-hover)}.input__control:focus{outline:none}.input__prefix,.input__suffix{display:inline-flex;flex:0 0 auto;align-items:center;align-self:stretch;height:100%;cursor:default;color:var(--zn-input-icon-color);font-size:var(--zn-font-size-small)}.input__prefix zn-icon,.input__suffix zn-icon{--icon-size:var(--zn-font-size-x-large);color:var(--zn-input-icon-color);font-size:var(--zn-font-size-small)}.input__prefix ::slotted(zn-icon),.input__suffix ::slotted(zn-icon){--icon-size:var(--zn-font-size-medium);font-size:var(--zn-font-size-medium);color:var(--zn-input-icon-color)}.input--x-small{border-radius:var(--zn-input-border-radius-x-small);font-size:var(--zn-input-font-size-small);height:var(--zn-input-height-x-small)}.input--x-small .input__control{height:calc(var(--zn-input-height-x-small) - var(--zn-input-border-width) * 2);padding:0 var(--zn-input-spacing-small) 0 var(--zn-spacing-small)}.input--x-small .input__clear,.input--x-small .input__password-toggle{width:calc(1em + var(--zn-input-spacing-x-small) * 2)}.input--x-small .input__prefix ::slotted(*),.input__prefix-default{margin-inline-start:var(--zn-spacing-x-small)}.input--x-small .input__suffix ::slotted(*),.input__suffix-default{margin-inline-end:var(--zn-input-spacing-x-small)}.input--x-small .input__suffix ::slotted(zn-button),.input--x-small .input__prefix ::slotted(zn-button),.input--x-small .input__suffix ::slotted(zn-checkbox),.input--x-small .input__prefix ::slotted(zn-checkbox){margin-inline-end:0;margin-inline-start:0}.input--small{border-radius:var(--zn-input-border-radius-small);font-size:var(--zn-input-font-size-small);height:var(--zn-input-height-small)}.input--small .input__control{height:calc(var(--zn-input-height-small) - var(--zn-input-border-width) * 2);padding:0 var(--zn-input-spacing-small) 0 var(--zn-spacing-small)}.input--small .input__clear,.input--small .input__password-toggle{width:calc(1em + var(--zn-input-spacing-small) * 2)}.input--small .input__prefix ::slotted(*),.input__prefix-default{margin-inline-start:var(--zn-input-spacing-small)}.input--small .input__suffix ::slotted(*),.input__suffix-default{margin-inline-end:var(--zn-input-spacing-small)}.input--small .input__suffix ::slotted(zn-button),.input--small .input__prefix ::slotted(zn-button),.input--small .input__suffix ::slotted(zn-checkbox),.input--small .input__prefix ::slotted(zn-checkbox){margin-inline-end:0;margin-inline-start:0}.input--medium{border-radius:var(--zn-input-border-radius-medium);font-size:var(--zn-input-font-size-medium);height:var(--zn-input-height-medium)}.input--medium .input__control{height:calc(var(--zn-input-height-medium) - var(--zn-input-border-width) * 2);padding:0 var(--zn-input-spacing-small) 0 var(--zn-spacing-small)}.input--medium .input__clear,.input--medium .input__password-toggle{width:calc(1em + var(--zn-input-spacing-medium) * 2)}.input--medium .input__prefix ::slotted(*),.input__prefix-default{margin-inline-start:var(--zn-spacing-small)}.input--medium .input__suffix ::slotted(*),.input__suffix-default{margin-inline-end:var(--zn-spacing-small)}.input--medium .input__suffix ::slotted(zn-button),.input--medium .input__prefix ::slotted(zn-button),.input--medium .input__suffix ::slotted(zn-checkbox),.input--medium .input__prefix ::slotted(zn-checkbox){margin-inline-end:0;margin-inline-start:0}.input__suffix ::slotted(zn-button),.input__prefix ::slotted(zn-button){--zn-button-border-color:rgb(var(--zn-color-border));--zn-button-border-width:0}.input__suffix ::slotted(zn-button){--zn-button-border-left-width:1px}.input__prefix ::slotted(zn-button){--zn-button-border-right-width:1px}.input--large{border-radius:var(--zn-input-border-radius-large);font-size:var(--zn-input-font-size-large);height:var(--zn-input-height-large)}.input--large .input__control{height:calc(var(--zn-input-height-large) - var(--zn-input-border-width) * 2);padding:0 var(--zn-input-spacing-medium) 0 var(--zn-spacing-small)}.input--large .input__clear,.input--large .input__password-toggle{width:calc(1em + var(--zn-input-spacing-large) * 2)}.input--large .input__suffix ::slotted(zn-button),.input--large .input__prefix ::slotted(zn-button),.input--large .input__suffix ::slotted(zn-checkbox),.input--large .input__prefix ::slotted(zn-checkbox){margin-inline-end:0;margin-inline-start:0}.input--pill.input--x-small{border-radius:var(--zn-input-height-small);padding:0 var(--zn-spacing-x-small)}.input--pill.input--small{border-radius:var(--zn-input-height-small);padding:0 var(--zn-spacing-x-small)}.input--pill.input--medium{border-radius:var(--zn-input-height-medium);padding:0 var(--zn-spacing-x-small)}.input--pill.input--large{border-radius:var(--zn-input-height-large);padding:0 var(--zn-spacing-x-small)}.input__clear:not(.input__clear--visible){visibility:hidden}.input__clear,.input__password-toggle{display:inline-flex;align-items:center;justify-content:center;font-size:var(--zn-font-size-large);color:var(--zn-input-icon-color);border:none;background:none;padding:0;transition:var(--zn-transition-fast) color;cursor:pointer}.input__clear zn-icon,.input__password-toggle zn-icon{--icon-size:var(--zn-font-size-large)}.input__clear:hover,.input__password-toggle:hover{color:var(--zn-input-icon-color-hover)}.input__clear:focus,.input__password-toggle:focus{outline:none}.input--empty .input__clear{visibility:hidden}::-ms-reveal{display:none}.input--no-spin-buttons input[type=number]::-webkit-outer-spin-button,.input--no-spin-buttons input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;display:none}.input--no-spin-buttons input[type=number]{-moz-appearance:textfield}input[type=date]::-webkit-calendar-picker-indicator{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" height="14" width="12.25" viewBox="0 0 448 512"><path fill="%236d7176" d="M128 0c13.3 0 24 10.7 24 24V64H296V24c0-13.3 10.7-24 24-24s24 10.7 24 24V64h40c35.3 0 64 28.7 64 64v16 48V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V192 144 128C0 92.7 28.7 64 64 64h40V24c0-13.3 10.7-24 24-24zM400 192H48V448c0 8.8 7.2 16 16 16H384c8.8 0 16-7.2 16-16V192zM112 256h96c8.8 0 16 7.2 16 16v96c0 8.8-7.2 16-16 16H112c-8.8 0-16-7.2-16-16V272c0-8.8 7.2-16 16-16z"/></svg>')}.input__color-swatch{display:inline-flex;align-self:stretch;border:none;border-inline-start:solid var(--zn-input-border-width) var(--zn-input-border-color);border-radius:0;background-color:var(--zn-color-neutral-0);cursor:pointer;overflow:hidden;position:relative;flex-shrink:0;margin:0}.input__color-swatch:hover .input__color-swatch-inner{filter:brightness(0.95)}.input__color-swatch-inner{width:100%;height:100%;background-color:var(--color-value,#000000);transition:var(--zn-transition-fast) filter}.input--x-small .input__color-swatch{width:calc(var(--zn-input-height-x-small) * 1.2)}.input--small .input__color-swatch{width:calc(var(--zn-input-height-small) * 1.2)}.input--medium .input__color-swatch{width:calc(var(--zn-input-height-medium) * 1.2)}.input--large .input__color-swatch{width:calc(var(--zn-input-height-large) * 1.2)}:host([type=range]) .form-control--has-label .form-control__label,:host([type=range]) .form-control__label-context-note{margin-bottom:0}:host([type=range]) .form-control-input{margin-top:0}.input--standard.input--range{--zn-range-track-height:6px;--zn-range-track-color:var(--zn-color-neutral-200);--zn-range-thumb-size:18px;--zn-range-thumb-color:var(--zn-color-primary-600);--zn-range-thumb-ring-width:4px;align-items:center;height:var(--zn-range-thumb-size);padding:0;overflow:visible;cursor:pointer}.input--standard.input--range,.input--standard.input--range:hover,.input--standard.input--range.input--focused,.input--standard.input--range.input--disabled{border:none;background:none;box-shadow:none}.input--standard.input--range.input--x-small{--zn-range-track-height:4px;--zn-range-thumb-size:14px;--zn-range-thumb-ring-width:3px}.input--standard.input--range.input--small{--zn-range-track-height:5px;--zn-range-thumb-size:16px;--zn-range-thumb-ring-width:3px}.input--standard.input--range.input--large{--zn-range-track-height:7px;--zn-range-thumb-size:20px}.input--range .input__control{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:var(--zn-range-thumb-size);padding:0;margin:0;background:none;cursor:inherit}.input--range .input__control::-webkit-slider-runnable-track{height:var(--zn-range-track-height);border-radius:calc(var(--zn-range-track-height) / 2);background-color:var(--zn-range-track-color)}.input--range .input__control::-moz-range-track{height:var(--zn-range-track-height);border-radius:calc(var(--zn-range-track-height) / 2);background-color:var(--zn-range-track-color)}.input--range .input__control::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:var(--zn-range-thumb-size);height:var(--zn-range-thumb-size);margin-top:calc((var(--zn-range-track-height) - var(--zn-range-thumb-size)) / 2);border:var(--zn-range-thumb-ring-width) solid var(--zn-color-neutral-0);border-radius:50%;background-color:var(--zn-range-thumb-color);box-shadow:0 0 0 1px var(--zn-input-border-color);-webkit-transition:var(--zn-transition-fast) box-shadow,var(--zn-transition-fast) background-color;transition:var(--zn-transition-fast) box-shadow,var(--zn-transition-fast) background-color}.input--range .input__control::-moz-range-thumb{width:var(--zn-range-thumb-size);height:var(--zn-range-thumb-size);box-sizing:border-box;border:var(--zn-range-thumb-ring-width) solid var(--zn-color-neutral-0);border-radius:50%;background-color:var(--zn-range-thumb-color);box-shadow:0 0 0 1px var(--zn-input-border-color);-moz-transition:var(--zn-transition-fast) box-shadow,var(--zn-transition-fast) background-color;transition:var(--zn-transition-fast) box-shadow,var(--zn-transition-fast) background-color}.input--range:hover:not(.input--disabled) .input__control::-webkit-slider-thumb{background-color:var(--zn-color-primary-500);box-shadow:0 0 0 1px var(--zn-input-border-color-hover)}.input--range:hover:not(.input--disabled) .input__control::-moz-range-thumb{background-color:var(--zn-color-primary-500);box-shadow:0 0 0 1px var(--zn-input-border-color-hover)}.input--range .input__control:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 var(--zn-focus-ring-width) var(--zn-input-focus-ring-color)}.input--range .input__control:focus-visible::-moz-range-thumb{box-shadow:0 0 0 var(--zn-focus-ring-width) var(--zn-input-focus-ring-color)}.input__color-picker{position:absolute;opacity:0;width:0;height:0;padding:0;margin:0;pointer-events:none;border:none;visibility:hidden}`;var at=class extends C{constructor(){super(...arguments);this.formControlController=new ot(this,{assumeInteractionOn:["zn-blur","zn-input"]});this.hasSlotController=new Q(this,"help-text","label","label-tooltip");this.localize=new Ze(this);this.hasFocus=!1;this.isUserTyping=!1;this.title="";this.__numberInput=Object.assign(document.createElement("input"),{type:"number"});this.__dateInput=Object.assign(document.createElement("input"),{type:"date"});this.type="text";this.name="";this.value="";this.defaultValue="";this.size="medium";this.pill=!1;this.label="";this.labelTooltip="";this.contextNote="";this.helpText="";this.clearable=!1;this.optionalIcon=!1;this.disabled=!1;this.filled=!1;this.placeholder="";this.readonly=!1;this.passwordToggle=!1;this.passwordVisible=!1;this.noSpinButtons=!1;this.colorFormat="hex";this.valueSuffix="";this.required=!1;this.spellcheck=!0;this.triggerSubmit=!1}get valueAsDate(){return this.__dateInput.type=this.type,this.__dateInput.value=this.value,this.input?.valueAsDate||this.__dateInput.valueAsDate}set valueAsDate(t){this.__dateInput.type=this.type,this.__dateInput.valueAsDate=t,this.value=this.__dateInput.value}get valueAsNumber(){return this.__numberInput.value=this.value,this.input?.valueAsNumber||this.__numberInput.valueAsNumber}set valueAsNumber(t){this.__numberInput.valueAsNumber=t,this.value=this.__numberInput.value}get validity(){return this.input?.validity}get validationMessage(){return this.input.validationMessage}validateMinMax(){this.type!=="number"&&this.type!=="date"||(typeof this.min<"u"&&parseInt(this.value)<parseInt(this.min)&&(this.value=this.min.toString()),typeof this.max<"u"&&parseInt(this.value)>parseInt(this.max)&&(this.value=this.max.toString()))}hexToRgb(t){let r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(!r)return"";let n=parseInt(r[1],16),a=parseInt(r[2],16),s=parseInt(r[3],16);return`rgb(${n}, ${a}, ${s})`}rgbToHex(t){let r=t.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);if(!r)return"";let n=parseInt(r[1]).toString(16).padStart(2,"0"),a=parseInt(r[2]).toString(16).padStart(2,"0"),s=parseInt(r[3]).toString(16).padStart(2,"0");return`#${n}${a}${s}`}hexToOklch(t){let r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(!r)return"";let n=parseInt(r[1],16)/255,a=parseInt(r[2],16)/255,s=parseInt(r[3],16)/255;n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,a=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92,s=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92;let l=n*.4124564+a*.3575761+s*.1804375,d=n*.2126729+a*.7151522+s*.072175,h=n*.0193339+a*.119192+s*.9503041,m=l/.95047,f=d/1,b=h/1.08883,g=m>.008856?Math.pow(m,1/3):7.787*m+16/116,v=f>.008856?Math.pow(f,1/3):7.787*f+16/116,x=b>.008856?Math.pow(b,1/3):7.787*b+16/116,_=116*v-16,$=500*(g-v),N=200*(v-x),G=Math.sqrt($*$+N*N),I=Math.atan2(N,$)*180/Math.PI;I<0&&(I+=360);let w=(_/100).toFixed(3),T=(G/150).toFixed(3),L=I.toFixed(1);return`oklch(${w} ${T} ${L})`}oklchToHex(t){let r=t.match(/^oklch\(([0-9.]+)\s+([0-9.]+)\s+([0-9.]+)\)$/);if(!r)return"";let n=parseFloat(r[1])*100,a=parseFloat(r[2])*150,s=parseFloat(r[3]),l=a*Math.cos(s*Math.PI/180),d=a*Math.sin(s*Math.PI/180),h=(n+16)/116,m=l/500+h,f=h-d/200,b=m>.206897?Math.pow(m,3):(m-16/116)/7.787,g=h>.206897?Math.pow(h,3):(h-16/116)/7.787,v=f>.206897?Math.pow(f,3):(f-16/116)/7.787,x=b*.95047,_=g*1,$=v*1.08883,N=x*3.2404542+_*-1.5371385+$*-.4985314,G=x*-.969266+_*1.8760108+$*.041556,I=x*.0556434+_*-.2040259+$*1.0572252;N=N>.0031308?1.055*Math.pow(N,1/2.4)-.055:12.92*N,G=G>.0031308?1.055*Math.pow(G,1/2.4)-.055:12.92*G,I=I>.0031308?1.055*Math.pow(I,1/2.4)-.055:12.92*I,N=Math.max(0,Math.min(1,N)),G=Math.max(0,Math.min(1,G)),I=Math.max(0,Math.min(1,I));let w=Math.round(N*255).toString(16).padStart(2,"0"),T=Math.round(G*255).toString(16).padStart(2,"0"),L=Math.round(I*255).toString(16).padStart(2,"0");return`#${w}${T}${L}`}hexToHsl(t){let r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(!r)return"";let n=parseInt(r[1],16)/255,a=parseInt(r[2],16)/255,s=parseInt(r[3],16)/255,l=Math.max(n,a,s),d=Math.min(n,a,s),h=(l+d)/2,m=0,f=0;if(l!==d){let b=l-d;switch(f=h>.5?b/(2-l-d):b/(l+d),l){case n:m=((a-s)/b+(a<s?6:0))/6;break;case a:m=((s-n)/b+2)/6;break;case s:m=((n-a)/b+4)/6;break}}return`hsl(${Math.round(m*360)}, ${Math.round(f*100)}%, ${Math.round(h*100)}%)`}hslToHex(t){let r=t.match(/^hsl\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*\)$/);if(!r)return"";let n=parseInt(r[1])/360,a=parseInt(r[2])/100,s=parseInt(r[3])/100,l,d,h;if(a===0)l=d=h=s;else{let g=(_,$,N)=>(N<0&&(N+=1),N>1&&(N-=1),N<.16666666666666666?_+($-_)*6*N:N<.5?$:N<.6666666666666666?_+($-_)*(.6666666666666666-N)*6:_),v=s<.5?s*(1+a):s+a-s*a,x=2*s-v;l=g(x,v,n+1/3),d=g(x,v,n),h=g(x,v,n-1/3)}let m=Math.round(l*255).toString(16).padStart(2,"0"),f=Math.round(d*255).toString(16).padStart(2,"0"),b=Math.round(h*255).toString(16).padStart(2,"0");return`#${m}${f}${b}`}convertToHex(t){return t?t.startsWith("#")?t:t.startsWith("rgb")?this.rgbToHex(t):t.startsWith("hsl")?this.hslToHex(t):t.startsWith("oklch")?this.oklchToHex(t):t:"#000000"}convertFromHex(t){return t?this.colorFormat==="hex"?t:this.colorFormat==="rgb"?this.hexToRgb(t):this.colorFormat==="hsl"?this.hexToHsl(t):this.colorFormat==="oklch"?this.hexToOklch(t):t:""}handleBlur(){if(this.hasFocus=!1,this.isUserTyping=!1,this.validateMinMax(),this.type==="color"&&this.value){let t=this.convertToHex(this.value);if(t){let r=this.convertFromHex(t);r!==this.value&&(this.value=r)}}this.emit("zn-blur")}handleChange(){if(this.type==="currency"&&this.input.value)this.value=parseFloat(this.input.value).toFixed(2);else if(this.type==="color"){let t=this.input.value.trim();if(t==="")this.value="";else if(this.colorFormat==="hex"){let r=t;r&&!r.startsWith("#")&&(r="#"+r),/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(r)&&(this.value=r.toLowerCase())}else this.colorFormat==="rgb"?/^rgb\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*\)$/.test(t)&&(this.value=t):this.colorFormat==="hsl"?/^hsl\(\s*\d+\s*,\s*\d+%\s*,\s*\d+%\s*\)$/.test(t)&&(this.value=t):this.colorFormat==="oklch"&&/^oklch\(\s*[0-9.]+\s+[0-9.]+\s+[0-9.]+\s*\)$/.test(t)&&(this.value=t)}else this.value=this.input.value;this.emit("zn-change")}handleClearClick(t){this.value="",this.emit("zn-clear"),this.emit("zn-input"),this.emit("zn-change"),this.input.focus(),t.stopPropagation()}handleFocus(){this.hasFocus=!0,this.emit("zn-focus")}handleInput(){this.isUserTyping=!0,this.type==="color"?this.value=this.input.value:this.value=this.input.value,this.formControlController.updateValidity(),this.emit("zn-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t)}handleKeyDown(t){if(t.key==="Escape"){this.input.blur(),t.stopPropagation();return}let r=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;if(t.key==="Enter"&&!r&&!t.defaultPrevented&&!t.isComposing){let n=this.formControlController.getForm();if(!this.triggerSubmit&&(n?.hasAttribute("enter-navigation")||n?.hasAttribute("data-enter-navigation")))return;this.formControlController.submit()}}handlePasswordToggle(){this.passwordVisible=!this.passwordVisible}handleColorSwatchClick(){this.type==="color"&&this.colorPicker&&this.colorPicker.click()}handleColorPickerChange(){if(this.type==="color"&&this.colorPicker){let t=this.colorPicker.value;this.value=this.convertFromHex(t),this.emit("zn-change"),this.emit("zn-input")}}focusInput(t){if(this.hasFocus)return;let r=t.target;r.tagName==="ZN-CHECKBOX"&&(r.slot==="prefix"||r.closest('[slot="prefix"]'))||(r.classList.contains("input__prefix")||r.slot==="prefix"||r.hasAttribute("part")&&r.getAttribute("part")==="base")&&(this.handleFocus(),this.input.focus())}firstUpdated(){this.type==="range"&&this.value===""&&(this.value=this.input.value)}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleStepChange(){this.input.step=String(this.step),this.formControlController.updateValidity()}async handleValueChange(){if(await this.updateComplete,this.type==="color"&&this.value&&!this.isUserTyping){let t=this.convertToHex(this.value);if(t){let r=this.convertFromHex(t);if(r!==this.value){this.value=r,this.emit("zn-change");return}}}this.formControlController.updateValidity(),this.type==="color"&&this.colorPicker&&(this.colorPicker.value=this.convertToHex(this.value)||"#000000")}async handleColorFormatChange(){if(this.type==="color"&&this.value){let t=this.convertToHex(this.value);if(t){let r=this.convertFromHex(t);r!==this.value&&(this.value=r,this.emit("zn-change"))}}}focus(t){this.input.focus(t)}blur(){this.input.blur()}select(){this.input.select()}setSelectionRange(t,r,n="none"){this.input.setSelectionRange(t,r,n)}setRangeText(t,r,n,a="preserve"){let s=r??this.input.selectionStart,l=n??this.input.selectionEnd;this.input.setRangeText(t,s,l,a),this.value!==this.input.value&&(this.value=this.input.value)}showPicker(){"showPicker"in HTMLInputElement.prototype&&this.input.showPicker()}stepUp(){this.input.stepUp(),this.value!==this.input.value&&(this.value=this.input.value)}stepDown(){this.input.stepDown(),this.value!==this.input.value&&(this.value=this.input.value)}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t=this.hasSlotController.test("label"),r=this.hasSlotController.test("label-tooltip"),n=this.hasSlotController.test("context-note"),a=this.hasSlotController.test("help-text"),s=this.type==="range",l=this.label?!0:t,d=this.labelTooltip?!0:r,h=this.contextNote||s?!0:n,m=this.helpText?!0:a,f=this.clearable&&!this.disabled&&!this.readonly,b=this.optionalIcon,g=f&&(typeof this.value=="number"||this.value.length>0);return u`
|
|
381
381
|
<div part="form-control"
|
|
382
382
|
class="${D({"form-control":!0,"form-control--x-small":this.size==="x-small","form-control--small":this.size==="small","form-control--medium":this.size==="medium","form-control--large":this.size==="large","form-control--has-label":l,"form-control--has-label-tooltip":d,"form-control--has-context-note":h,"form-control--has-help-text":m})}">
|
|
383
383
|
|
|
@@ -810,7 +810,7 @@ import{a as En,b as E_,c as pr,d as c,e as B}from"./chunks/zn.UBLZO6CI.js";var b
|
|
|
810
810
|
</zn-button>`),this.hasSlotController.test("delete-action".valueOf())&&t.push(u`
|
|
811
811
|
<slot name="${"delete-action".valueOf()}"></slot>`),this.hasSlotController.test("modify-action".valueOf())&&t.push(u`
|
|
812
812
|
<slot name="${"modify-action".valueOf()}"></slot>`)),this.hasSlotController.test("create-action".valueOf())&&t.push(u`
|
|
813
|
-
<slot name="${"create-action".valueOf()}"></slot>`),t):[]}goToPage(t){this.page=t,this.selectedRows=[],this.numberOfRowsSelected=0,this._dataTask.run().then(r=>r),this.resizeObserver.observe(this)}goToFirstPage(){this.goToPage(1)}goToPreviousPage(){this.goToPage(Math.max(this.page-1,1))}goToNextPage(){this.goToPage(Math.min(this.page+1,this.totalPages))}goToLastPage(){this.goToPage(this.totalPages)}updateRowsPerPage(t){let r=t.target;this.itemsPerPage=parseInt(r.value),this.page=1,this.requestUpdate(),this._dataTask.run().then(n=>n)}selectAll(t){if(!t.target.disabled){if(this.numberOfRowsSelected===this._rows.length){this.clearSelectedRows(t);return}this.selectedRows=this._rows,this.numberOfRowsSelected=this.selectedRows.length,this.updateKeys(),this.requestUpdate()}}selectRow(t){if(this.hideCheckboxes||!(t.target&&t.target instanceof Element))return;let r=t.target;if(r?.tagName==="ZN-BUTTON"||r?.tagName==="A"||r?.tagName==="BUTTON")return;let n=r.closest?r.closest("tr"):r.parentElement;for(;n&&n.tagName!=="TR";)n=n.parentElement;if(n===null)return;let s=Array.from(this.renderRoot.querySelectorAll("tbody tr.table__row--data")).indexOf(n);if(s===-1)return;let l=this._rows[s];if(!l)return;this.selectedRows.some(h=>h.id===l.id)?this.selectedRows=this.selectedRows.filter(h=>h.id!==l.id):this.selectedRows=[...this.selectedRows,l],this.numberOfRowsSelected=this.selectedRows.length,this.updateKeys(),this.requestUpdate()}clearSelectedRows(t){t.target.disabled||(this.selectedRows=[],this.numberOfRowsSelected=0,this.updateKeys(),this.requestUpdate())}updateSort(t){return()=>{this.sortColumn=t,this.sortDirection=this.sortDirection==="asc"?"desc":"asc",this.localSort?(this._rows=this.sortLocalData(this._rows),this.requestUpdate()):this._dataTask.run().then(r=>r)}}renderCell(t,r,n){let a=n?.type?this.getTemplate(n.type):void 0;if(!t.text&&!t.iconSrc&&n?.ifEmpty!==void 0){let l={...n,type:void 0,render:void 0,renderTemplate:void 0};return this.renderCell({...t,...n.ifEmpty},r,l)}if(a&&r&&n){let l=a(t,r,n);return typeof l=="string"?u`${
|
|
813
|
+
<slot name="${"create-action".valueOf()}"></slot>`),t):[]}goToPage(t){this.page=t,this.selectedRows=[],this.numberOfRowsSelected=0,this._dataTask.run().then(r=>r),this.resizeObserver.observe(this)}goToFirstPage(){this.goToPage(1)}goToPreviousPage(){this.goToPage(Math.max(this.page-1,1))}goToNextPage(){this.goToPage(Math.min(this.page+1,this.totalPages))}goToLastPage(){this.goToPage(this.totalPages)}updateRowsPerPage(t){let r=t.target;this.itemsPerPage=parseInt(r.value),this.page=1,this.requestUpdate(),this._dataTask.run().then(n=>n)}selectAll(t){if(!t.target.disabled){if(this.numberOfRowsSelected===this._rows.length){this.clearSelectedRows(t);return}this.selectedRows=this._rows,this.numberOfRowsSelected=this.selectedRows.length,this.updateKeys(),this.requestUpdate()}}selectRow(t){if(this.hideCheckboxes||!(t.target&&t.target instanceof Element))return;let r=t.target;if(r?.tagName==="ZN-BUTTON"||r?.tagName==="A"||r?.tagName==="BUTTON")return;let n=r.closest?r.closest("tr"):r.parentElement;for(;n&&n.tagName!=="TR";)n=n.parentElement;if(n===null)return;let s=Array.from(this.renderRoot.querySelectorAll("tbody tr.table__row--data")).indexOf(n);if(s===-1)return;let l=this._rows[s];if(!l)return;this.selectedRows.some(h=>h.id===l.id)?this.selectedRows=this.selectedRows.filter(h=>h.id!==l.id):this.selectedRows=[...this.selectedRows,l],this.numberOfRowsSelected=this.selectedRows.length,this.updateKeys(),this.requestUpdate()}clearSelectedRows(t){t.target.disabled||(this.selectedRows=[],this.numberOfRowsSelected=0,this.updateKeys(),this.requestUpdate())}updateSort(t){return()=>{this.sortColumn=t,this.sortDirection=this.sortDirection==="asc"?"desc":"asc",this.localSort?(this._rows=this.sortLocalData(this._rows),this.requestUpdate()):this._dataTask.run().then(r=>r)}}renderCell(t,r,n){let a=n?.type?this.getTemplate(n.type):void 0;if(!t.text&&!t.iconSrc&&n?.ifEmpty!==void 0){let l={...n,type:void 0,render:void 0,renderTemplate:void 0};return this.renderCell({...t,...n.ifEmpty},r,l)}if(a&&r&&n){let l=a(t,r,n);return typeof l=="string"?u`${Xe(l)}`:l}if(!t||typeof t!="object")return t;n?.cellTemplate!==void 0&&(t={...n.cellTemplate,...t});let s=u`${t.text}`;if(t.style||t.color){let l=typeof t.style=="string"?t.style:"",d=new Set(l.split(",").filter(Boolean)),h=d.has("mono")||d.has("code"),m=d.has("border"),f=d.has("center"),b=d.has("muted");(d.has("bold")||d.has("strong"))&&(s=u`<strong>${s}</strong>`),d.has("italic")&&(s=u`<em>${s}</em>`),s=u`
|
|
814
814
|
<zn-style
|
|
815
815
|
font="${h?"mono":V}"
|
|
816
816
|
border="${m||V}"
|
|
@@ -835,13 +835,13 @@ import{a as En,b as E_,c as pr,d as c,e as B}from"./chunks/zn.UBLZO6CI.js";var b
|
|
|
835
835
|
<zn-hover-container placement="${l}" flip>
|
|
836
836
|
${s}
|
|
837
837
|
<div slot="content">
|
|
838
|
-
${
|
|
838
|
+
${Xe(t.hoverContent)}
|
|
839
839
|
</div>
|
|
840
840
|
</zn-hover-container>`:s=u`
|
|
841
841
|
<zn-hover-container placement="${l}" flip>
|
|
842
842
|
${s}
|
|
843
843
|
<div slot="content">
|
|
844
|
-
${
|
|
844
|
+
${Xe(t.hoverContent)}
|
|
845
845
|
</div>
|
|
846
846
|
</zn-hover-container>`}return t.copyable&&(s=u`
|
|
847
847
|
${s}
|
|
@@ -1016,7 +1016,7 @@ import{a as En,b as E_,c as pr,d as c,e as B}from"./chunks/zn.UBLZO6CI.js";var b
|
|
|
1016
1016
|
aria-hidden="true"
|
|
1017
1017
|
></zn-icon>
|
|
1018
1018
|
</div>
|
|
1019
|
-
`}};ur.styles=E(dv),ur.dependencies={"zn-icon":ct},c([F(".option__label")],ur.prototype,"defaultSlot",2),c([O()],ur.prototype,"current",2),c([O()],ur.prototype,"hasHover",2),c([p({reflect:!0})],ur.prototype,"value",2),c([p({type:Boolean,reflect:!0})],ur.prototype,"disabled",2),c([p({type:Boolean,reflect:!0})],ur.prototype,"selected",2),c([K("disabled")],ur.prototype,"handleDisabledChange",1),c([K("selected")],ur.prototype,"handleSelectedChange",1);var
|
|
1019
|
+
`}};ur.styles=E(dv),ur.dependencies={"zn-icon":ct},c([F(".option__label")],ur.prototype,"defaultSlot",2),c([O()],ur.prototype,"current",2),c([O()],ur.prototype,"hasHover",2),c([p({reflect:!0})],ur.prototype,"value",2),c([p({type:Boolean,reflect:!0})],ur.prototype,"disabled",2),c([p({type:Boolean,reflect:!0})],ur.prototype,"selected",2),c([K("disabled")],ur.prototype,"handleDisabledChange",1),c([K("selected")],ur.prototype,"handleSelectedChange",1);var Ne=ur;ur.define("zn-option");function cn(i,o,t){return new Promise(r=>{if(t?.duration===1/0)throw new Error("Promise-based animations must be finite.");let n=i.animate(o,{...t,duration:w3()?0:t.duration});n.addEventListener("cancel",r,{once:!0}),n.addEventListener("finish",r,{once:!0})})}function w3(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function Kh(i){return Promise.all(i.getAnimations().map(o=>new Promise(t=>{o.cancel(),requestAnimationFrame(t)})))}var Ga=class{constructor(o){this.conditionals=[];this.initiallyDisabled=!1;this.handleChange=()=>this.checkConditionals();(this.host=o).addController(this)}setup(){if(this.host.conditional==="")return;let o=this.host.conditional.split(",").map(t=>t.trim());o.forEach(t=>{let r=Rt(`#${t}`,document.documentElement,""),n=Rt(`[name="${t}"]`,document.documentElement,""),a=new Set;[...r,...n].forEach(s=>{a.has(s)||(a.add(s),this.conditionals.push(s))})}),this.initiallyDisabled=this.host.disabled,o.length!==0&&(this.conditionals.forEach(t=>{t.addEventListener("zn-change",this.handleChange),t.addEventListener("zn-input",this.handleChange)}),this.checkConditionals())}hostConnected(){}hostDisconnected(){this.conditionals.forEach(o=>{o.removeEventListener("zn-change",this.handleChange)}),this.conditionals=[]}check(){this.checkConditionals()}checkConditionals(){let o=this.conditionals.some(t=>{let r=Array.isArray(t.value)?t.value:[t.value];return r=r.filter(n=>n!==""&&n!=="0"),r.length>0});this.host.disabled=this.initiallyDisabled||o}};var hv=new Map,_3=new WeakMap;function k3(i){return i??{keyframes:[],options:{duration:0}}}function pv(i,o){return o.toLowerCase()==="rtl"?{keyframes:i.rtlKeyframes||i.keyframes,options:i.options}:i}function dn(i,o){hv.set(i,k3(o))}function pn(i,o,t){let r=_3.get(i);if(r?.[o])return pv(r[o],t.dir);let n=hv.get(o);return n?pv(n,t.dir):{keyframes:[],options:{duration:0}}}var uv=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}:host([hidden]){display:none !important}.opt-group__label{font-family:var(--zn-font-sans);font-size:var(--zn-font-size-x-small);font-weight:var(--zn-font-weight-semibold);line-height:var(--zn-line-height-normal);letter-spacing:var(--zn-letter-spacing-normal);color:var(--zn-color-neutral-500);text-transform:uppercase;padding-block:var(--zn-spacing-2x-small);padding-inline:var(--zn-spacing-large);-moz-user-select:none;user-select:none;-webkit-user-select:none}:host(:not(:first-of-type)) .opt-group__label{border-block-start:solid var(--zn-panel-border-width) var(--zn-panel-border-color);margin-block-start:var(--zn-spacing-x-small);padding-block-start:var(--zn-spacing-small)}.opt-group__options{display:block}:host([disabled]){opacity:0.5}`;var Vo=class extends C{constructor(){super(...arguments);this.label="";this.disabled=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","group"),this.setAttribute("aria-label",this.label)}handleLabelChange(){this.setAttribute("aria-label",this.label)}handleDisabledChange(){this.propagateDisabled()}updateVisibility(){let t=[...this.querySelectorAll("zn-option")];this.hidden=t.length>0&&t.every(r=>r.hidden)}render(){return u`
|
|
1020
1020
|
<div part="base" class="opt-group">
|
|
1021
1021
|
<div part="label" class="opt-group__label" aria-hidden="true">
|
|
1022
1022
|
${this.label}
|
|
@@ -1044,7 +1044,7 @@ import{a as En,b as E_,c as pr,d as c,e as B}from"./chunks/zn.UBLZO6CI.js";var b
|
|
|
1044
1044
|
</zn-chip>
|
|
1045
1045
|
`;this.selectFirst=!1;this.distinct="";this.conditional="";this.maxResults=0;this.searchDebounce=300;this.searchParam="q";this.searchOnly=!1;this.handleDocumentFocusIn=t=>{let r=t.composedPath();this&&!r.includes(this)&&this.hide().then()};this.handleDocumentKeyDown=t=>{let r=t.target,n=r.closest(".select__clear")!==null,a=r.closest("zn-icon")!==null,s=r.closest(".select__expand-icon")!==null;if(!((n||a)&&!s)){if(t.key==="Escape"&&this.open&&this.freeText&&this._searchDisplayValue.trim()&&(this.clearSearch(),this.displayInput.value=""),(t.key==="Escape"||t.key==="Tab")&&this.open&&!this.closeWatcher&&(t.preventDefault(),t.stopPropagation(),this.hide().then(),this.displayInput.focus({preventScroll:!0})),t.key==="Escape"&&!this.open&&(t.stopPropagation(),this.displayInput.blur()),t.key==="Enter"||t.key===" "&&!this._isTypeable&&this.typeToSelectString===""){if(t.preventDefault(),t.stopImmediatePropagation(),!this.open){this.show().then();return}if(this.freeText&&!(!(this._addOptionActive&&this._freeTextAddValue!==null)&&this.currentOption&&!this.currentOption.disabled&&!this.currentOption.hidden)&&this.commitFreeText())return;this.currentOption&&!this.currentOption.disabled&&(this.valueHasChanged=!0,this.multiple?this.toggleOptionSelection(this.currentOption):this.setSelectedOptions(this.currentOption),this._isTypeable&&(this.clearSearch(),this.multiple&&(this.displayInput.value="")),this.updateComplete.then(()=>{this.emit("zn-input"),this.emit("zn-change")}),this.multiple?this._isTypeable&&this.updateComplete.then(()=>{this.displayInput.value="",this.displayInput.focus({preventScroll:!0})}):(this.hide().then(),this.displayInput.focus({preventScroll:!0})));return}if(["ArrowUp","ArrowDown","Home","End"].includes(t.key)){if(t.preventDefault(),!this.open&&(this.show().then(),this.currentOption))return;let l=this._isTypeable?this.getVisibleOptions():this.getAllOptions(),d=this.freeText&&this._freeTextAddValue!==null,h="add",m=d?[h,...l]:[...l];if(m.length===0)return;let f=this._addOptionActive&&d?h:this.currentOption??null,b=f===null?-1:m.indexOf(f),g=Math.max(0,b);t.key==="ArrowDown"?(g=b+1,g>m.length-1&&(g=0)):t.key==="ArrowUp"?(g=b-1,g<0&&(g=m.length-1)):t.key==="Home"?g=0:t.key==="End"&&(g=m.length-1);let v=m[g];v===h?(this._addOptionActive=!0,this.setCurrentOption(null)):(this._addOptionActive=!1,this.setCurrentOption(v))}if(!this._isTypeable&&(t.key.length===1||t.key==="Backspace")){let l=this.getAllOptions();if(t.metaKey||t.ctrlKey||t.altKey)return;if(!this.open){if(t.key==="Backspace")return;this.show().then()}t.stopPropagation(),t.preventDefault(),clearTimeout(this.typeToSelectTimeout),this.typeToSelectTimeout=window.setTimeout(()=>this.typeToSelectString="",1e3),t.key==="Backspace"?this.typeToSelectString=this.typeToSelectString.slice(0,-1):this.typeToSelectString+=t.key.toLowerCase();for(let d of l)if(d.getTextLabel().toLowerCase().startsWith(this.typeToSelectString)){this.setCurrentOption(d);break}}}};this.handleDocumentMouseDown=t=>{let r=t.composedPath();this&&!r.includes(this)&&this.hide().then()}}get value(){return this._value}set value(t){if(this.multiple){if(!Array.isArray(t))if(t.trimStart().startsWith("["))try{let r=JSON.parse(t);t=Array.isArray(r)?r:t.split(" ")}catch{typeof t=="string"&&(t=t.split(" "))}else t=t.split(" ")}else t=Array.isArray(t)?t.join(" "):t;this._value!==t&&(this.valueHasChanged=!0,this._value=t,this.hasUpdated&&this.updateDependencies())}get validity(){return this.valueInput?.validity}get validationMessage(){return this.valueInput?.validationMessage}connectedCallback(){if(super.connectedCallback(),this.updateComplete.then(()=>this.handleDefaultSlotChange()),this.open=!1,this.cacheKey){let t=JSON.parse(localStorage.getItem("zn-linked-select-cache")||"{}");t[this.cacheKey]&&(this.value=t[this.cacheKey])}}disconnectedCallback(){super.disconnectedCallback(),this._fetchAbortController?.abort(),this._fetchAbortController=null,this._searchDebounceTimer!==null&&(clearTimeout(this._searchDebounceTimer),this._searchDebounceTimer=null)}updateHasInputPrefix(){let t=this.prefixSlot?.assignedElements({flatten:!0})||[];this.inputPrefix=t.length>0}addOpenListeners(){let t=this.getRootNode();t.addEventListener("focusin",this.handleDocumentFocusIn),t.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown),"CloseWatcher"in window&&(this.closeWatcher?.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>{this.open&&(this.hide().then(),this.displayInput.focus({preventScroll:!0}))})}removeOpenListeners(){let t=this.getRootNode();t.removeEventListener("focusin",this.handleDocumentFocusIn),t.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown),this.closeWatcher?.destroy()}handleFocus(){this.hasFocus=!0,this.displayInput.setSelectionRange(0,0),this.emit("zn-focus")}handleBlur(){this.hasFocus=!1,this.emit("zn-blur")}handleLabelClick(){this.displayInput.focus()}handleComboboxMouseDown(t){let r=t.composedPath(),n=r.some(l=>l instanceof Element&&l.tagName.toLowerCase()==="zn-icon"),a=r.some(l=>l instanceof Element&&l.classList.contains("select__expand-icon")),s=r.some(l=>l instanceof Element&&l.classList.contains("select__prefix"));if(!((this.disabled||this._fetchLoading||this._fetchError||n)&&!a||s)){if(this._isTypeable&&this.open&&!a){t.preventDefault(),this.displayInput.focus({preventScroll:!0});return}t.preventDefault(),this.displayInput.focus({preventScroll:!0}),this.open=!this.open}}handleComboboxKeyDown(t){if(t.key==="Tab")return;t.composedPath().some(a=>a instanceof Element&&a.classList?.contains("select__prefix"))||(t.stopPropagation(),this.handleDocumentKeyDown(t))}handleClearClick(t){t.stopPropagation(),this.value.length>0&&(this.valueHasChanged=!0,this._isTypeable&&(this.clearSearch(),this.displayInput.value=""),this.setSelectedOptions([]),this.displayInput.focus({preventScroll:!0}),this.updateComplete.then(()=>{this.emit("zn-clear"),this.emit("zn-input"),this.emit("zn-change"),this.triggerSubmit&&this.formControlController.submit()}))}handleClearMouseDown(t){t.stopPropagation(),t.preventDefault()}get _isRemoteSearch(){return this.search&&!!this.dataUri}get _isTypeable(){return this.search||this.freeText}handleSearchInput(){if(this._isTypeable)if(this._addOptionActive=!1,this._searchDisplayValue=this.displayInput.value,this._searchQuery=this._searchDisplayValue.toLowerCase(),this.open||this.show().then(),this._isRemoteSearch){if(this._searchDebounceTimer!==null&&(clearTimeout(this._searchDebounceTimer),this._searchDebounceTimer=null),!this._searchQuery){this.filterOptions();return}if(this._lastRemoteExhaustive&&this._lastRemoteQuery!==null&&this._searchQuery.startsWith(this._lastRemoteQuery)){this.filterOptions();return}this._noResultsVisible=!1,this._searchDebounceTimer=window.setTimeout(()=>{this._searchDebounceTimer=null,this.fetchOptions(this._searchQuery).then()},this.searchDebounce)}else this.filterOptions()}filterOptions(){let t=this.getAllOptions(),r=this._searchQuery;if(!r){t.forEach(n=>{n.hidden=!1}),this.getAllOptGroups().forEach(n=>{n.hidden=!1}),this._noResultsVisible=!1;return}if(t.forEach(n=>{if(n.selected&&n.hidden)return;let a=n.getTextLabel().toLowerCase(),s=n.value.toLowerCase(),l=a.includes(r)||s.includes(r);n.hidden=!l}),this.getAllOptGroups().forEach(n=>n.updateVisibility()),this._noResultsVisible=t.filter(n=>!n.selected).every(n=>n.hidden),this.currentOption&&this.currentOption.hidden){let n=t.find(a=>!a.hidden&&!a.disabled);n&&this.setCurrentOption(n)}}clearSearch(){this._searchQuery="",this._searchDisplayValue="",this._noResultsVisible=!1,this._addOptionActive=!1,this._searchDebounceTimer!==null&&(clearTimeout(this._searchDebounceTimer),this._searchDebounceTimer=null),this._searchLoading=!1,this.getAllOptions().forEach(r=>{r.hidden=!1}),this.getAllOptGroups().forEach(r=>{r.hidden=!1})}commitFreeText(t=!0){if(!this.freeText)return!1;let r=(this.displayInput?.value??"").trim();if(!r)return!1;this.valueHasChanged=!0;let n=r.toLowerCase(),s=this.getAllOptions().find(l=>l.value.toLowerCase()===n||l.getTextLabel().toLowerCase()===n)??this._createFreeTextOption(r);return this.multiple?this.toggleOptionSelection(s,!0):this.setSelectedOptions(s),this.clearSearch(),this.updateComplete.then(()=>{this.emit("zn-input"),this.emit("zn-change")}),t&&(this.multiple?(this.displayInput.value="",this.displayInput.focus({preventScroll:!0})):(this.hide().then(),this.displayInput.focus({preventScroll:!0}))),!0}get _freeTextAddValue(){if(!this.freeText||!this.open)return null;let t=this._searchDisplayValue.trim();if(!t)return null;let r=t.toLowerCase();return this.getAllOptions().some(a=>a.value.toLowerCase()===r||a.getTextLabel().toLowerCase()===r)?null:t}handleAddOptionMouseDown(t){t.preventDefault()}_materialiseFreeTextValues(t){if(!this.freeText)return;let r=new Set(this.getAllOptions().map(n=>n.value));t.forEach(n=>{n===""||r.has(n)||(this._createFreeTextOption(n),r.add(n))})}_createFreeTextOption(t){let r=document.createElement("zn-option");return r.value=t,r.textContent=t,r.setAttribute("data-free-text",""),this.appendChild(r),r}handleOptionClick(t){let r=t.target;if(r.closest(".select__add-option")){this.commitFreeText();return}let n=r.closest("zn-option"),a=this.value;if(n&&!n.disabled){if(this.valueHasChanged=!0,this.multiple){if(this.maxOptions>0&&this.selectedOptions.length>=this.maxOptions&&!n.selected)return;this.toggleOptionSelection(n)}else this.setSelectedOptions(n);this._isTypeable&&(this.clearSearch(),this.multiple&&(this.displayInput.value="")),this.updateComplete.then(()=>{this.multiple&&this._isTypeable&&this.open&&(this.displayInput.value=""),this.displayInput.focus({preventScroll:!0})}),this.value!==a&&this.updateComplete.then(()=>{this.emit("zn-input"),this.emit("zn-change")}),this.multiple||(this.hide().then(),this.displayInput.focus({preventScroll:!0})),this.triggerSubmit&&this.formControlController.submit()}}handleDefaultSlotChange(){customElements.get("zn-option")||customElements.whenDefined("zn-option").then(()=>this.handleDefaultSlotChange());let t=this.getAllOptions(),r=this.valueHasChanged?this.value:this.defaultValue,n=Array.isArray(r)?r:[r],a=[];if(t.forEach(s=>a.push(s.value)),this._materialiseFreeTextValues(n),this.setSelectedOptions(this.getAllOptions().filter(s=>n.includes(s.value))),!this.valueHasChanged){let s=t.filter(l=>l.hasAttribute("selected"));s.length&&(this.multiple?this.setSelectedOptions(s):this.setSelectedOptions(s[0]),(!this.defaultValue||this.defaultValue.length===0)&&(this.defaultValue=this.value))}this.selectFirst&&this.selectedOptions.length===0&&t.length>0&&(this.setSelectedOptions(t[0]),this.valueHasChanged=!0,this.emit("zn-input"),this.emit("zn-change"))}handleTagRemove(t,r){t.stopPropagation(),t.stopImmediatePropagation(),this.disabled||(this.valueHasChanged=!0,this.toggleOptionSelection(r,!1),this.updateComplete.then(()=>{this.emit("zn-input"),this.emit("zn-change"),this.triggerSubmit&&this.formControlController.submit()}))}getAllOptions(){let t=this.shadowRoot?[...this.shadowRoot.querySelectorAll(".select__listbox zn-option")]:[],r=[...this.querySelectorAll("zn-option")];return[...t,...r]}getAllOptGroups(){let t=this.shadowRoot?[...this.shadowRoot.querySelectorAll(".select__listbox zn-opt-group")]:[],r=[...this.querySelectorAll("zn-opt-group")];return[...t,...r]}getVisibleOptions(){return this.getAllOptions().filter(t=>!t.hidden)}getFirstOption(){return this.querySelector("zn-option")}setCurrentOption(t){this.getAllOptions().forEach(n=>{n.current=!1,n.tabIndex=-1}),t&&(this.currentOption=t,t.current=!0,t.tabIndex=0,this._isTypeable&&this.open&&this.shadowRoot?.activeElement===this.displayInput||t.focus())}setSelectedOptions(t){let r=this.getAllOptions(),n=Array.isArray(t)?t:[t];r.forEach(a=>a.selected=!1),n.length&&n.forEach(a=>a.selected=!0),this.selectionChanged()}toggleOptionSelection(t,r){r===!0||r===!1?t.selected=r:t.selected=!t.selected,this.selectionChanged()}selectionChanged(){this.selectedOptions=this.getAllOptions().filter(r=>r.selected),this.querySelectorAll("[data-free-text]").forEach(r=>{r.selected||r.remove()}),this._isRemoteSearch&&this.multiple&&(this._selectedRemoteItems=this.selectedOptions.map(r=>({key:r.value,value:r.getTextLabel()})));let t=this.valueHasChanged;if(this.multiple)this.getAllOptions().filter(r=>!r.multiple).forEach(r=>{r.multiple=!0}),this.value=this.selectedOptions.map(r=>r.value),this.value.length===0?this.displayLabel="":this.displayLabel=this.localize.term("numOptionsSelected",this.selectedOptions.length);else{this.getAllOptions().filter(n=>n.multiple).forEach(n=>{n.multiple=!1});let r=this.selectedOptions[0];this.value=r?.value??"",this.displayLabel=r?.getTextLabel()??""}this.valueHasChanged=t,this.updateComplete.then(()=>{this.formControlController.updateValidity()})}get tags(){return this.selectedOptions.map((t,r)=>{if(r<this.maxOptionsVisible||this.maxOptionsVisible<=0){let n=this.getTag(t,r);return u`
|
|
1046
1046
|
<div @zn-remove=${a=>this.handleTagRemove(a,t)}>
|
|
1047
|
-
${typeof n=="string"?
|
|
1047
|
+
${typeof n=="string"?Xe(n):n}
|
|
1048
1048
|
</div>`}else if(r===this.maxOptionsVisible)return u`
|
|
1049
1049
|
<zn-chip>+${this.selectedOptions.length-r}</zn-chip>`;return u``})}_renderSelectedRemoteItems(){if(!this._isRemoteSearch||!this.multiple||this._selectedRemoteItems.length===0)return V;let t=new Set;for(let r of this._fetchedOptions)if(r.group!==void 0)for(let n of r.options)t.add(n.key);else t.add(r.key);return this._selectedRemoteItems.filter(r=>!t.has(r.key)).map(r=>u`
|
|
1050
1050
|
<zn-option value=${r.key} hidden>${r.value}</zn-option>`)}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t)}firstUpdated(t){if(super.firstUpdated(t),this.distinct!==""){let r=document.querySelector(`zn-select[id="${this.distinct}"]`);r&&(r.addEventListener("zn-change",()=>{let n=Array.isArray(r.value)?r.value:[r.value];this.getAllOptions().map(s=>s).forEach(s=>{n.includes(s.value)?s.style.display="none":s.style.display=""})}),r.dispatchEvent(new Event("zn-input")))}this.conditionalController.setup(),this.dataUri&&!this.searchOnly&&this.fetchOptions().then(),this.updateHasInputPrefix(),this.updateDependencies()}handleDisabledChange(){this.disabled?(this.open=!1,this.handleOpenChange().then(),this._fetchAbortController?.abort(),this._fetchAbortController=null,this._fetchLoading=!1,this._fetchError=""):this.dataUri&&!this.searchOnly&&this.fetchOptions().then()}handleSrcChange(){this.dataUri&&!this.searchOnly?this.fetchOptions().then():(this._fetchedOptions=[],this._fetchLoading=!1,this._fetchError="",this.handleDefaultSlotChange())}_handleFetchError(t){this._fetchError=t,this._fetchLoading=!1,this._fetchAbortController=null,this.emit("zn-error",{detail:{status:400}})}_buildCacheKey(t){let r=this.cacheKey||this.dataUri;return t?`zn-select-search:${r}:${t}`:`zn-select-search:${r}`}_readCache(t){if(!this.cacheKey)return null;try{let r=localStorage.getItem(this._buildCacheKey(t));if(r)return JSON.parse(r)}catch{}return null}_writeCache(t,r){if(this.cacheKey)try{localStorage.setItem(this._buildCacheKey(t),JSON.stringify(r))}catch{}}_parseOptions(t){let r;if(Array.isArray(t))t.length>0&&t.some(a=>a&&typeof a=="object"&&"group"in a)?r=t.map(a=>"group"in a&&Array.isArray(a.options)?{group:String(a.group),options:a.options}:a):r=t;else if(t&&typeof t=="object")r=Object.entries(t).map(([n,a])=>({key:n,value:String(a)}));else return null;if(this.maxResults>0){let n=0,a=[];for(let s of r){if(n>=this.maxResults)break;if(s.group!==void 0){let l=this.maxResults-n,d=s.options.slice(0,l);d.length>0&&(a.push({group:s.group,options:d}),n+=d.length)}else a.push(s),n++}r=a}return r}async fetchOptions(t){if(!this.dataUri||this.disabled)return;let r=!!t;if(this.cacheKey){let n=this._readCache(t);if(n){this._fetchedOptions=n,this._searchLoading=!1,this._fetchLoading=!1,this._totalResultCount=0,this._noResultsVisible=n.length===0&&r,this.emit("zn-load"),this.updateComplete.then(()=>this.handleDefaultSlotChange());return}}this._fetchAbortController?.abort(),this._fetchAbortController=new AbortController,r?this._searchLoading=!0:this._fetchLoading=!0,this._fetchError="";try{let n=this.dataUri;if(t){let h=n.includes("?")?"&":"?";n=`${n}${h}${encodeURIComponent(this.searchParam)}=${encodeURIComponent(t)}`}let a=await fetch(n,{signal:this._fetchAbortController.signal,credentials:"same-origin",headers:{"x-kx-fetch-style":"zn-select-options","x-kx-context-data":this.contextData||""}});if(!a.ok){this._searchLoading=!1,this._handleFetchError(a.statusText||`HTTP ${a.status}`);return}let s=await a.json(),l=Array.isArray(s)?s.reduce((h,m)=>{if(m&&typeof m=="object"&&"group"in m){let f=m;return h+(Array.isArray(f.options)?f.options.length:0)}return h+1},0):s&&typeof s=="object"?Object.keys(s).length:0,d=this._parseOptions(s);if(!d){this._searchLoading=!1,this._handleFetchError("Expected JSON array or object of options");return}this._fetchedOptions=d,this._fetchLoading=!1,this._searchLoading=!1,this._fetchAbortController=null,this._noResultsVisible=d.length===0&&r,this._totalResultCount=this.maxResults>0&&l>this.maxResults?l:0,this._lastRemoteQuery=t??"",this._lastRemoteExhaustive=this.maxResults>0?l<this.maxResults:!0,this._writeCache(t,d),this.emit("zn-load"),this.updateComplete.then(()=>{this.handleDefaultSlotChange()})}catch(n){if(n instanceof DOMException&&n.name==="AbortError")return;this._searchLoading=!1,this._handleFetchError(n instanceof Error?n.message:"Failed to load options")}}attributeChangedCallback(t,r,n){if(super.attributeChangedCallback(t,r,n),t==="value"){let a=this.valueHasChanged;this.value=this.defaultValue,this.valueHasChanged=a}}handleValueChange(){if(!this.valueHasChanged){let n=this.valueHasChanged;this.value=this.defaultValue,this.valueHasChanged=n}let t=this.getAllOptions(),r=Array.isArray(this.value)?this.value:[this.value];this.setSelectedOptions(t.filter(n=>r.includes(n.value))),this.updateDependencies()}async handleOpenChange(){if(this.open&&!this.disabled){this.setCurrentOption(null),this._isTypeable&&(this.clearSearch(),this.displayInput.value="",this.displayInput.readOnly=!1),this.emit("zn-show"),this.addOpenListeners(),await Kh(this),this.listbox.hidden=!1,this.popup.active=!0,requestAnimationFrame(()=>{this.setCurrentOption(this.currentOption)}),this._isTypeable&&requestAnimationFrame(()=>{this.displayInput.focus({preventScroll:!0})});let{keyframes:t,options:r}=pn(this,"select.show",{dir:this.localize.dir()});await cn(this.popup.popup,t,r),this.currentOption&&jb(this.currentOption,this.listbox,"vertical","auto"),this.emit("zn-after-show")}else{this.emit("zn-hide"),this.removeOpenListeners(),this._isTypeable&&(this.freeText&&this._searchDisplayValue.trim()&&this.commitFreeText(!1),this.clearSearch(),this.displayInput.readOnly=!0,this.displayInput.value=this.multiple?"":this.displayLabel),await Kh(this);let{keyframes:t,options:r}=pn(this,"select.hide",{dir:this.localize.dir()});await cn(this.popup.popup,t,r),this.listbox.hidden=!0,this.popup.active=!1,this.emit("zn-after-hide")}}async show(){if(this.open||this.disabled){this.open=!1;return}return this.open=!0,mo(this,"zn-after-show")}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.open=!1,mo(this,"zn-after-hide")}checkValidity(){return this.valueInput?this.valueInput.checkValidity():!1}getForm(){return this.formControlController.getForm()}reportValidity(){return this.valueInput?this.valueInput.reportValidity():!1}setCustomValidity(t){this.valueInput.setCustomValidity(t),this.formControlController.updateValidity()}focus(t){this.displayInput.focus(t)}blur(){this.displayInput.blur()}updateDependencies(){let t=this.getRootNode();if(!t?.querySelectorAll)return;t.querySelectorAll("[data-disable-on]").forEach(n=>{let a=n.getAttribute("data-disable-on");if(!a)return;let s=null;try{s=t.querySelector(a)}catch{}if(!s){let l=a.startsWith("#")?a:`#${a}`;try{s=t.querySelector(l)}catch{}}s===this&&this.updateDependencyState(n)})}updateDependencyState(t){let r=t.getAttribute("data-disable-value");if(r!==null){let n=r.split(",").map(s=>s.trim()),a;Array.isArray(this.value)?a=this.value.some(s=>n.includes(s)):a=n.includes(String(this.value)),this.toggleDisabled(t,a)}}toggleDisabled(t,r){let n=()=>{"defaultValue"in t&&typeof t.defaultValue<"u"&&(t.value=t.defaultValue)};t.disabled=r,r&&n()}render(){let t=this.hasSlotController.test("label"),r=this.hasSlotController.test("label-tooltip"),n=this.hasSlotController.test("context-note"),a=this.hasSlotController.test("help-text"),s=this.label?!0:t,l=this.labelTooltip?!0:r,d=this.contextNote?!0:n,h=this.helpText?!0:a,m=this.clearable&&!this.disabled&&this.value.length>0,f=this.placeholder&&this.value.length===0,b=this._fetchLoading||!!this._fetchError,g=this.disabled||b;return u`
|
|
@@ -1209,7 +1209,7 @@ import{a as En,b as E_,c as pr,d as c,e as B}from"./chunks/zn.UBLZO6CI.js";var b
|
|
|
1209
1209
|
<slot name="help-text">${this.helpText}</slot>
|
|
1210
1210
|
</div>
|
|
1211
1211
|
</div>
|
|
1212
|
-
`}};Z.styles=E(mv),Z.dependencies={"zn-icon":ct,"zn-opt-group":Yh,"zn-option":
|
|
1212
|
+
`}};Z.styles=E(mv),Z.dependencies={"zn-icon":ct,"zn-opt-group":Yh,"zn-option":Ne,"zn-popup":sl,"zn-tag":ll},c([F(".select")],Z.prototype,"popup",2),c([F(".select__combobox")],Z.prototype,"combobox",2),c([F(".select__display-input")],Z.prototype,"displayInput",2),c([F(".select__value-input")],Z.prototype,"valueInput",2),c([F(".select__listbox")],Z.prototype,"listbox",2),c([F('slot[name="prefix"]')],Z.prototype,"prefixSlot",2),c([O()],Z.prototype,"hasFocus",2),c([O()],Z.prototype,"displayLabel",2),c([O()],Z.prototype,"currentOption",2),c([O()],Z.prototype,"selectedOptions",2),c([O()],Z.prototype,"valueHasChanged",2),c([O()],Z.prototype,"inputPrefix",2),c([O()],Z.prototype,"_searchDisplayValue",2),c([O()],Z.prototype,"_noResultsVisible",2),c([O()],Z.prototype,"_addOptionActive",2),c([O()],Z.prototype,"_fetchedOptions",2),c([O()],Z.prototype,"_fetchLoading",2),c([O()],Z.prototype,"_fetchError",2),c([O()],Z.prototype,"_searchLoading",2),c([O()],Z.prototype,"_totalResultCount",2),c([p()],Z.prototype,"name",2),c([p({type:Boolean,attribute:"non-removable"})],Z.prototype,"nonRemovable",2),c([O()],Z.prototype,"value",1),c([p({attribute:"value",converter:{fromAttribute:t=>{if(!t||Array.isArray(t))return t;if(t.trimStart().startsWith("["))try{let r=JSON.parse(t);if(Array.isArray(r))return r}catch{}return t.includes(" ")?t.split(" "):t},toAttribute:t=>Array.isArray(t)&&t.some(r=>r.includes(" "))?JSON.stringify(t):Array.isArray(t)?t.join(" "):t}})],Z.prototype,"defaultValue",2),c([p({reflect:!0})],Z.prototype,"size",2),c([p()],Z.prototype,"placeholder",2),c([p({type:Boolean,reflect:!0})],Z.prototype,"multiple",2),c([p({attribute:"max-options",type:Number})],Z.prototype,"maxOptions",2),c([p({attribute:"max-options-visible",type:Number})],Z.prototype,"maxOptionsVisible",2),c([p({type:Boolean,reflect:!0})],Z.prototype,"disabled",2),c([p({type:Boolean})],Z.prototype,"clearable",2),c([p({type:Boolean,reflect:!0})],Z.prototype,"open",2),c([p({type:Boolean})],Z.prototype,"hoist",2),c([p({type:Boolean,reflect:!0})],Z.prototype,"pill",2),c([p({type:Boolean,reflect:!0})],Z.prototype,"search",2),c([p({type:Boolean,reflect:!0,attribute:"free-text"})],Z.prototype,"freeText",2),c([p()],Z.prototype,"label",2),c([p({attribute:"label-tooltip"})],Z.prototype,"labelTooltip",2),c([p({attribute:"context-note"})],Z.prototype,"contextNote",2),c([p({reflect:!0})],Z.prototype,"placement",2),c([p({attribute:"help-text"})],Z.prototype,"helpText",2),c([p({reflect:!0})],Z.prototype,"form",2),c([p({type:Boolean,reflect:!0})],Z.prototype,"required",2),c([p({attribute:"cache-key"})],Z.prototype,"cacheKey",2),c([p({type:Boolean,attribute:"trigger-submit"})],Z.prototype,"triggerSubmit",2),c([p()],Z.prototype,"getTag",2),c([p({attribute:"select-first",type:Boolean})],Z.prototype,"selectFirst",2),c([p()],Z.prototype,"distinct",2),c([p()],Z.prototype,"conditional",2),c([p({attribute:"data-uri"})],Z.prototype,"dataUri",2),c([p({attribute:"context-data"})],Z.prototype,"contextData",2),c([p({attribute:"max-results",type:Number})],Z.prototype,"maxResults",2),c([p({attribute:"search-debounce",type:Number})],Z.prototype,"searchDebounce",2),c([p({attribute:"search-param"})],Z.prototype,"searchParam",2),c([p({attribute:"search-only",type:Boolean})],Z.prototype,"searchOnly",2),c([K("disabled",{waitUntilFirstUpdate:!0})],Z.prototype,"handleDisabledChange",1),c([K(["dataUri","contextData"],{waitUntilFirstUpdate:!0})],Z.prototype,"handleSrcChange",1),c([K(["defaultValue","value"],{waitUntilFirstUpdate:!0})],Z.prototype,"handleValueChange",1),c([K("open",{waitUntilFirstUpdate:!0})],Z.prototype,"handleOpenChange",1);dn("select.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}});dn("select.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});var le=Z;Z.define("zn-select");var fv=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:contents}.defined-label__dropdown{width:100%}.defined-label__panel{display:flex;flex-direction:column;min-width:260px;max-height:275px;overflow-y:auto;overscroll-behavior:none;background-color:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:var(--zn-border-radius);box-shadow:0 4px 8px -4px rgba(33,33,33,0.1)}.defined-label__row{display:flex;flex-direction:column;gap:var(--zn-spacing-x-small);padding:var(--zn-spacing-small)}.defined-label__row+.defined-label__row{border-top:1px solid rgb(var(--zn-border-color))}.defined-label__row-label{font-size:var(--zn-font-size-small);color:rgb(var(--zn-text-muted))}.defined-label__row-controls{display:flex;align-items:center;gap:var(--zn-spacing-x-small)}.defined-label__row-controls .defined-label__value{flex-grow:1}.defined-label__empty{padding:var(--zn-spacing-small);font-size:var(--zn-font-size-small);color:rgb(var(--zn-text-muted));text-align:center}`;var Re=class extends C{constructor(){super(...arguments);this.formControlController=new ot(this,{value:t=>t.value+(t.inputValue?`:${t.inputValue}`:"")});this.value="";this.inputValue="";this.inputSize="medium";this.name="label";this.disabled=!1;this.allowCustom=!1;this.predefinedLabels=[]}get validationMessage(){return this.input.validationMessage}get validity(){return this.input?.validity}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity()}firstUpdated(t){super.firstUpdated(t),this.formControlController.updateValidity()}getFilteredLabels(){let t=this.value.toLowerCase();return this.predefinedLabels.map(r=>typeof r=="string"?{name:r}:r).filter(r=>!!r?.name).filter(r=>!t||r.name.toLowerCase().includes(t))}handleChange(){this.dropdown.open||this.dropdown.show().then(t=>t),this.dropdown.open&&this.input.value===""&&this.dropdown.hide().then(t=>t),typeof this.input.value=="string"&&(this.input.value=this.input.value.toLowerCase()),this.value=this.input.value}handleInput(){this.handleChange(),this.formControlController.updateValidity()}handleClick(t){(this.input.value===""||this.dropdown.open&&this.input.value!=="")&&t.stopImmediatePropagation()}handleInputValueChange(t){let r=t.target;this.inputValue=r.value.toLowerCase()}handleFormSubmit(t,r){let a=t.currentTarget.closest(".defined-label__row")?.querySelector(".defined-label__value");this.value=r,this.inputValue=a?String(a.value??"").toLowerCase():"";let s=this.formControlController.getForm();s&&s.reportValidity()&&(document.dispatchEvent(new CustomEvent("zn-register-element",{detail:{element:s}})),s.requestSubmit())}renderValueControl(t){return t.options&&t.options.length>0?u`
|
|
1213
1213
|
<zn-select
|
|
1214
1214
|
part="input-value"
|
|
1215
1215
|
class="defined-label__value"
|
|
@@ -1274,7 +1274,7 @@ import{a as En,b as E_,c as pr,d as c,e as B}from"./chunks/zn.UBLZO6CI.js";var b
|
|
|
1274
1274
|
@zn-input="${this.handleInputValueChange}"></zn-input>`):V}
|
|
1275
1275
|
</div>
|
|
1276
1276
|
</zn-dropdown>
|
|
1277
|
-
`}};
|
|
1277
|
+
`}};Re.styles=E(fv),Re.dependencies={"zn-button":Ct,"zn-dropdown":nr,"zn-input":ke,"zn-option":Ne,"zn-select":le},c([F(".defined-label__input")],Re.prototype,"input",2),c([F(".defined-label__dropdown")],Re.prototype,"dropdown",2),c([p()],Re.prototype,"value",2),c([p()],Re.prototype,"inputValue",2),c([p({attribute:"input-size",reflect:!0})],Re.prototype,"inputSize",2),c([p()],Re.prototype,"name",2),c([p()],Re.prototype,"title",2),c([p({type:Boolean})],Re.prototype,"disabled",2),c([p({attribute:"allow-custom",type:Boolean})],Re.prototype,"allowCustom",2),c([p({type:Array,attribute:"predefined-labels"})],Re.prototype,"predefinedLabels",2),c([K("value",{waitUntilFirstUpdate:!0})],Re.prototype,"handleValueChange",1);var C3=Re;Re.define("zn-defined-label");var gv=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}.note{width:100%;height:100%;display:flex;flex-direction:column;overflow:hidden;flex-wrap:nowrap;padding:var(--zn-spacing-x-small) var(--zn-spacing-small);gap:var(--zn-spacing-3x-small);border-left:3px solid transparent}.note__header{display:flex;justify-content:space-between}.note__header__caption{font-weight:var(--zn-font-weight-semibold);font-size:var(--zn-font-size-medium);color:rgb(var(--zn-text-heading))}.note__header__date{font-size:var(--zn-font-size-small)}.note__header__end{display:flex;gap:var(--zn-spacing-small)}.note__body-container{position:relative;max-width:var(--zn-container-md)}.note__body{display:block}.note__toggle{margin-top:var(--zn-spacing-2x-small)}.note__toggle__btn{background:none;border:none;color:var(--zn-color-primary-500,currentColor);font:inherit;cursor:pointer;padding:0}.note__body--clamped{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:var(--note-collapse-lines,0);overflow:hidden;text-overflow:ellipsis}.note--red .note__header__caption{color:hsl(from var(--zn-color-red-600) h s 40%)}.note--red{border-left:3px solid var(--zn-color-red-600);background-color:hsla(from var(--zn-color-red-600) h s l/0.02)}.note--blue .note__header__caption{color:hsl(from var(--zn-color-blue-500) h s 40%)}.note--blue{border-left:3px solid var(--zn-color-blue-500);background-color:hsla(from var(--zn-color-blue-500) h s l/0.02)}.note--orange .note__header__caption{color:hsl(from var(--zn-color-orange-500) h s 40%)}.note--orange{border-left:3px solid var(--zn-color-orange-500);background-color:hsla(from var(--zn-color-orange-500) h s l/0.02)}.note--yellow .note__header__caption{color:hsl(from var(--zn-color-yellow-400) h s 40%)}.note--yellow{border-left:3px solid var(--zn-color-yellow-400);background-color:hsla(from var(--zn-color-yellow-400) h s l/0.02)}.note--indigo .note__header__caption{color:hsl(from var(--zn-color-indigo-400) h s 40%)}.note--indigo{border-left:3px solid var(--zn-color-indigo-400);background-color:hsla(from var(--zn-color-indigo-400) h s l/0.02)}.note--violet .note__header__caption{color:hsl(from var(--zn-color-violet-600) h s 40%)}.note--violet{border-left:3px solid var(--zn-color-violet-600);background-color:hsla(from var(--zn-color-violet-600) h s l/0.02)}.note--green .note__header__caption{color:hsl(from var(--zn-color-green-500) h s 40%)}.note--green{border-left:3px solid var(--zn-color-green-500);background-color:hsla(from var(--zn-color-green-500) h s l/0.02)}.note--pink .note__header__caption{color:hsl(from var(--zn-color-pink-400) h s 40%)}.note--pink{border-left:3px solid var(--zn-color-pink-400);background-color:hsla(from var(--zn-color-pink-400) h s l/0.02)}.note--gray .note__header__caption{color:hsl(from var(--zn-color-gray-500) h s 40%)}.note--gray{border-left:3px solid var(--zn-color-gray-500);background-color:hsla(from var(--zn-color-gray-500) h s l/0.02)}.note__footer{display:flex;flex-direction:row;flex-wrap:wrap;gap:var(--zn-spacing-x-small)}`;var go=class extends C{constructor(){super(...arguments);this.caption="";this.date="";this.body="";this.hasSlotController=new Q(this,"caption","date","[default]","snippet","footer");this.expanded=!1}_toggleExpand(){this.expanded=!this.expanded}render(){let t=this.hasSlotController.test("snippet")&&this.hasSlotController.test("[default]");return u`
|
|
1278
1278
|
<div class="${D({note:!0,"note--red":this.color==="red","note--blue":this.color==="blue","note--orange":this.color==="orange","note--yellow":this.color==="yellow","note--indigo":this.color==="indigo","note--violet":this.color==="violet","note--green":this.color==="green","note--pink":this.color==="pink","note--gray":this.color==="gray"})}">
|
|
1279
1279
|
<div class="note__header">
|
|
1280
1280
|
<slot name="caption" class="note__header__caption">${this.caption}</slot>
|
|
@@ -1304,7 +1304,7 @@ import{a as En,b as E_,c as pr,d as c,e as B}from"./chunks/zn.UBLZO6CI.js";var b
|
|
|
1304
1304
|
</div>`:""}
|
|
1305
1305
|
<slot name="footer" class="note__footer"></slot>
|
|
1306
1306
|
</div>
|
|
1307
|
-
`}};go.styles=E(gv),c([p({reflect:!0})],go.prototype,"color",2),c([p({reflect:!0})],go.prototype,"caption",2),c([p({reflect:!0})],go.prototype,"date",2),c([p({type:HTMLElement,reflect:!0})],go.prototype,"body",2),c([O()],go.prototype,"expanded",2);var S3=go;go.define("zn-note");var bv=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}.tile{position:relative;display:flex;align-items:center;justify-content:space-between;min-height:48px;-moz-column-gap:var(--zn-spacing-large);column-gap:var(--zn-spacing-large);font-size:var(--zn-text-table-content-font-size);line-height:var(--zn-text-table-content-line-height);font-weight:var(--zn-text-table-content-font-weight);color:var(--zn-text-table-content-color)}.tile--has-image,.tile--has-caption,.tile--has-description,.tile--has-properties,.tile--has-actions{padding-inline:var(--zn-base-gap)}.tile--has-description.tile--has-caption{padding-block:var(--zn-spacing-small)}.tile--has-image{padding:var(--zn-spacing-small)}.tile--has-href{cursor:pointer}.tile--has-href:hover{background-color:var(--zn-color-neutral-100)}.tile--flush{padding:0}.tile--flush-x{padding-inline:0}.tile--flush-y{padding-block:0}a{color:inherit;text-decoration:none;cursor:pointer}::slotted(zn-icon){display:flex;justify-content:center;align-items:center}.tile__link{display:flex;align-items:center;-moz-column-gap:var(--zn-spacing-small);column-gap:var(--zn-spacing-small);min-width:0}.tile__left{display:flex;align-items:center;-moz-column-gap:var(--zn-spacing-small);column-gap:var(--zn-spacing-small);min-width:0}.tile__image{display:flex;align-items:center;flex-shrink:0}.tile__content{display:flex;flex-direction:column;justify-content:center;min-width:0}.tile--inline .tile__content{flex-direction:row;align-items:center;-moz-column-gap:var(--zn-spacing-x-small);column-gap:var(--zn-spacing-x-small)}.tile__caption{margin:0;font-weight:600;color:rgb(var(--zn-text-heading));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tile--plain .tile__caption{font-weight:var(--zn-text-table-content-font-weight);color:var(--zn-text-table-content-color)}.tile__description{margin:var(--zn-spacing-3x-small) 0 0;font-weight:var(--zn-text-table-content-font-weight);color:var(--zn-text-table-content-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tile--inline .tile__description{margin:0}.tile__right{display:flex;align-items:center;justify-content:flex-end;-moz-column-gap:var(--zn-spacing-large);column-gap:var(--zn-spacing-large);min-width:0}.tile__properties{display:flex;flex-direction:row;align-items:center;-moz-column-gap:var(--zn-spacing-large);column-gap:var(--zn-spacing-large);min-width:0;overflow:hidden}.tile__properties ::slotted(*){white-space:nowrap}@container (max-width:359px){.tile__properties{display:none}}.tile__actions{display:flex;align-items:center;-moz-column-gap:var(--zn-spacing-small);column-gap:var(--zn-spacing-small);flex-shrink:0}:host([grouped]){display:grid;grid-column:1/-1;grid-template-columns:subgrid;align-items:center}:host([grouped]) .tile{display:grid;grid-column:1/-1;grid-template-columns:subgrid;align-items:center;justify-items:end;min-height:48px}:host([grouped]) .tile__link,:host([grouped]) .tile__right,:host([grouped]) .tile__properties,:host([grouped]) .tile__actions{display:contents}:host([grouped]) .tile__left{grid-column:1;justify-self:stretch;min-width:0;overflow:hidden}`;var
|
|
1307
|
+
`}};go.styles=E(gv),c([p({reflect:!0})],go.prototype,"color",2),c([p({reflect:!0})],go.prototype,"caption",2),c([p({reflect:!0})],go.prototype,"date",2),c([p({type:HTMLElement,reflect:!0})],go.prototype,"body",2),c([O()],go.prototype,"expanded",2);var S3=go;go.define("zn-note");var bv=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}.tile{position:relative;display:flex;align-items:center;justify-content:space-between;min-height:48px;-moz-column-gap:var(--zn-spacing-large);column-gap:var(--zn-spacing-large);font-size:var(--zn-text-table-content-font-size);line-height:var(--zn-text-table-content-line-height);font-weight:var(--zn-text-table-content-font-weight);color:var(--zn-text-table-content-color)}.tile--has-image,.tile--has-caption,.tile--has-description,.tile--has-properties,.tile--has-actions{padding-inline:var(--zn-base-gap)}.tile--has-description.tile--has-caption{padding-block:var(--zn-spacing-small)}.tile--has-image{padding:var(--zn-spacing-small)}.tile--has-href{cursor:pointer}.tile--has-href:hover{background-color:var(--zn-color-neutral-100)}.tile--flush{padding:0}.tile--flush-x{padding-inline:0}.tile--flush-y{padding-block:0}a{color:inherit;text-decoration:none;cursor:pointer}::slotted(zn-icon){display:flex;justify-content:center;align-items:center}.tile__link{display:flex;align-items:center;-moz-column-gap:var(--zn-spacing-small);column-gap:var(--zn-spacing-small);min-width:0}.tile__left{display:flex;align-items:center;-moz-column-gap:var(--zn-spacing-small);column-gap:var(--zn-spacing-small);min-width:0}.tile__image{display:flex;align-items:center;flex-shrink:0}.tile__content{display:flex;flex-direction:column;justify-content:center;min-width:0}.tile--inline .tile__content{flex-direction:row;align-items:center;-moz-column-gap:var(--zn-spacing-x-small);column-gap:var(--zn-spacing-x-small)}.tile__caption{margin:0;font-weight:600;color:rgb(var(--zn-text-heading));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tile--plain .tile__caption{font-weight:var(--zn-text-table-content-font-weight);color:var(--zn-text-table-content-color)}.tile__description{margin:var(--zn-spacing-3x-small) 0 0;font-weight:var(--zn-text-table-content-font-weight);color:var(--zn-text-table-content-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tile--inline .tile__description{margin:0}.tile__right{display:flex;align-items:center;justify-content:flex-end;-moz-column-gap:var(--zn-spacing-large);column-gap:var(--zn-spacing-large);min-width:0}.tile__properties{display:flex;flex-direction:row;align-items:center;-moz-column-gap:var(--zn-spacing-large);column-gap:var(--zn-spacing-large);min-width:0;overflow:hidden}.tile__properties ::slotted(*){white-space:nowrap}@container (max-width:359px){.tile__properties{display:none}}.tile__actions{display:flex;align-items:center;-moz-column-gap:var(--zn-spacing-small);column-gap:var(--zn-spacing-small);flex-shrink:0}:host([grouped]){display:grid;grid-column:1/-1;grid-template-columns:subgrid;align-items:center}:host([grouped]) .tile{display:grid;grid-column:1/-1;grid-template-columns:subgrid;align-items:center;justify-items:end;min-height:48px}:host([grouped]) .tile__link,:host([grouped]) .tile__right,:host([grouped]) .tile__properties,:host([grouped]) .tile__actions{display:contents}:host([grouped]) .tile__left{grid-column:1;justify-self:stretch;min-width:0;overflow:hidden}`;var Oe=class extends C{constructor(){super(...arguments);this.hasSlotController=new Q(this,"[default]","properties","actions","image")}_isLink(){return this.href||this.dataUri}_handleActionsClick(t){this._isLink()&&(t.preventDefault(),t.stopPropagation())}render(){let t=this._isLink(),r=t?An`a`:An`div`,n=this.caption&&this.caption.length>0,a=this.description&&this.description.length>0,s=this.hasSlotController.test("properties"),l=this.hasSlotController.test("actions"),d=this.hasSlotController.test("image");return se`
|
|
1308
1308
|
<${r}
|
|
1309
1309
|
href="${H(this.href)}"
|
|
1310
1310
|
data-uri="${H(this.dataUri)}"
|
|
@@ -1337,7 +1337,7 @@ import{a as En,b as E_,c as pr,d as c,e as B}from"./chunks/zn.UBLZO6CI.js";var b
|
|
|
1337
1337
|
<slot name="actions" part="actions" class="tile__actions"
|
|
1338
1338
|
@click=${this._handleActionsClick}></slot>`:""}
|
|
1339
1339
|
</div>`}
|
|
1340
|
-
</${r}>`}};
|
|
1340
|
+
</${r}>`}};Oe.styles=E(bv),c([p({attribute:"caption"})],Oe.prototype,"caption",2),c([p({attribute:"description"})],Oe.prototype,"description",2),c([p({attribute:"href"})],Oe.prototype,"href",2),c([p({attribute:"data-target"})],Oe.prototype,"dataTarget",2),c([p({attribute:"gaid"})],Oe.prototype,"gaid",2),c([p({attribute:"data-uri"})],Oe.prototype,"dataUri",2),c([p({type:Boolean})],Oe.prototype,"flush",2),c([p({attribute:"flush-x",type:Boolean})],Oe.prototype,"flushX",2),c([p({attribute:"flush-y",type:Boolean})],Oe.prototype,"flushY",2),c([p({type:Boolean})],Oe.prototype,"inline",2),c([p({type:Boolean})],Oe.prototype,"plain",2),c([p({type:Boolean,reflect:!0})],Oe.prototype,"grouped",2);var E3=Oe;Oe.define("zn-tile");var vv=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;width:100%}.tile-group{display:grid;width:100%;grid-template-columns:minmax(min(100%,var(--zn-tile-caption-min-width,7.5rem)),1fr) repeat(var(--zn-tile-cols,1),auto);align-items:center;-moz-column-gap:var(--zn-spacing-large);column-gap:var(--zn-spacing-large);row-gap:0}slot{display:contents}:host([divide]) ::slotted(zn-tile:not(:first-child)){border-top:1px solid rgb(var(--zn-border-color))}`;var ci=class extends C{constructor(){super(...arguments);this.divide=!1;this._mutationObserver=null;this._handleSlotChange=()=>this._sync()}connectedCallback(){super.connectedCallback(),this._mutationObserver=new MutationObserver(()=>this._sync()),this._mutationObserver.observe(this,{childList:!0,subtree:!0})}disconnectedCallback(){super.disconnectedCallback(),this._mutationObserver?.disconnect(),this._mutationObserver=null}_sync(){let t=Array.from(this.querySelectorAll(":scope > zn-tile")),r=0;for(let n of t){n.setAttribute("grouped","");let a=n.querySelectorAll(':scope > [slot="properties"], :scope > [slot="actions"]').length;r=Math.max(r,a)}this.style.setProperty("--zn-tile-cols",String(Math.max(1,r)))}render(){return u`
|
|
1341
1341
|
<div part="base" class="tile-group">
|
|
1342
1342
|
<slot @slotchange=${this._handleSlotChange}></slot>
|
|
1343
1343
|
</div>`}};ci.styles=E(vv),c([p({attribute:"divide",type:Boolean,reflect:!0})],ci.prototype,"divide",2);var T3=ci;ci.define("zn-tile-group");var xv=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:flex;min-width:0;max-width:240px}.tile__property{display:flex;align-items:center;flex-direction:row;min-width:0;width:100%}.tile__property .tile__property_container{display:flex;flex-direction:column;overflow:hidden;min-width:0}.tile__property .tile__icon{margin-right:15px;flex-shrink:0}.tile__property .tile__caption{display:block;font-weight:500;margin:0;font-size:14px;color:rgb(var(--zn-text-heading));text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.tile__property .tile__description{display:block;font-weight:400;margin:var(--zn-spacing-2x-small) 0 0;font-size:var(--zn-font-size-medium);color:rgb(var(--zn-text-color));text-overflow:ellipsis;overflow:hidden;white-space:nowrap}`;var hn=class extends C{render(){return u`
|
|
@@ -1410,7 +1410,7 @@ import{a as En,b as E_,c as pr,d as c,e as B}from"./chunks/zn.UBLZO6CI.js";var b
|
|
|
1410
1410
|
gaid=${this.acceptGaid}
|
|
1411
1411
|
no-hover>
|
|
1412
1412
|
</zn-button>
|
|
1413
|
-
</slot>`}};Ut.styles=E(yv),c([p({type:Boolean,reflect:!0})],Ut.prototype,"available",2),c([p({type:Boolean,reflect:!0})],Ut.prototype,"incoming",2),c([p({reflect:!0})],Ut.prototype,"variant",2),c([p()],Ut.prototype,"header",2),c([p()],Ut.prototype,"icon",2),c([p({reflect:!0})],Ut.prototype,"color",2),c([p()],Ut.prototype,"title",2),c([p()],Ut.prototype,"subtitle",2),c([p({type:Number})],Ut.prototype,"progress",2),c([p({attribute:"progress-color"})],Ut.prototype,"progressColor",2),c([p({attribute:"item-id"})],Ut.prototype,"itemId",2),c([p({attribute:"accept-uri"})],Ut.prototype,"acceptUri",2),c([p({type:Number,attribute:"reserved-until"})],Ut.prototype,"reservedUntil",2),c([p({type:Number,attribute:"auto-accept-delay"})],Ut.prototype,"autoAcceptDelay",2),c([p({type:Boolean,reflect:!0})],Ut.prototype,"rejectable",2),c([p({attribute:"accept-icon"})],Ut.prototype,"acceptIcon",2),c([p({attribute:"accept-gaid"})],Ut.prototype,"acceptGaid",2),c([p({attribute:"reject-icon"})],Ut.prototype,"rejectIcon",2),c([p({attribute:"reject-label"})],Ut.prototype,"rejectLabel",2);var A3=Ut;Ut.define("zn-channel-tile");function Xh(i){let o=i.theme==="dark"?"rgb(161, 161, 170)":"rgb(113, 113, 122)",t=i.textColor??o,r=i.enableAnimations!==!1&&i.enableAnimations!==0,n=typeof i.enableAnimations=="number"?i.enableAnimations:1500;return{animation:r,animationDuration:n,animationEasing:"cubicOut",...i.colors?{color:i.colors}:{},textStyle:{color:t},tooltip:{trigger:"axis",appendTo:"body",valueFormatter:i.yAxisAppend?a=>`${a}${i.yAxisAppend}`:void 0},legend:{top:0,right:0,icon:"circle",textStyle:{color:t}},grid:{left:40,right:20,top:40,bottom:30}}}function L3(i){return i.length===0||i.every(o=>!o.data||o.data.length===0)}function Qh(i){let o=L3(i.data)?{min:0,max:6}:{},t=i.scale?{scale:!0,...typeof i.scale=="number"?{boundaryGap:[`${i.scale}%`,`${i.scale}%`]}:{}}:{};return{type:"value",...i.borderColor?{splitLine:{lineStyle:{color:i.borderColor}}}:{},...o,...t,axisLabel:i.yAxisAppend?{formatter:n=>`${n}${i.yAxisAppend}`}:{}}}function Jh(i,o=!1){let t=i.borderColor?{axisLine:{lineStyle:{color:i.borderColor}}}:{};return i.xAxisType==="datetime"?{type:"time",...t}:i.xAxisType==="numeric"?{type:"value",...t}:{type:"category",data:i.categories,...o?{boundaryGap:!1}:{},...t}}function q3(i){return i.map(o=>o&&typeof o=="object"&&!Array.isArray(o)&&"x"in o&&"y"in o?[o.x,o.y]:o)}function Zh(i,o,t=()=>({})){return i.data.map(r=>({type:o,name:r.name,data:q3(r.data),...r.color?{itemStyle:{color:r.color}}:{},...i.stacked?{stack:"total"}:{},...i.enableAnimations!==!1&&i.enableAnimations!==0&&o==="bar"?{animationDelay:n=>n*50}:{},...t(r)}))}function tu(i){return{...Xh(i),xAxis:Jh(i),yAxis:Qh(i),series:Zh(i,"bar")}}function zv(i){return{...Xh(i),xAxis:Jh(i,!0),yAxis:Qh(i),series:Zh(i,"line",()=>({symbolSize:i.datapointSize,smooth:i.smooth}))}}function wv(i){return{...Xh(i),xAxis:Jh(i,!0),yAxis:Qh(i),series:Zh(i,"line",()=>({symbolSize:i.datapointSize,smooth:i.smooth,areaStyle:{opacity:.1}}))}}function M3(i){let o=new Set,t=[];for(let r of i)o.has(r.source)||(o.add(r.source),t.push({name:r.source})),o.has(r.target)||(o.add(r.target),t.push({name:r.target}));return t}function _v(i){let o=i.data[0]??{name:"",data:[]},t=o.data??[],n=o.nodes??M3(t),a=i.theme==="dark"?"rgb(161, 161, 170)":"rgb(113, 113, 122)",s=i.textColor??a,l=i.enableAnimations!==!1&&i.enableAnimations!==0,d=typeof i.enableAnimations=="number"?i.enableAnimations:1500;return{animation:l,animationDuration:d,animationEasing:"cubicOut",...i.colors?{color:i.colors}:{},textStyle:{color:s},tooltip:{trigger:"item",appendTo:"body"},series:[{type:"sankey",name:o.name,data:n,links:t,label:{color:s,textBorderWidth:0},lineStyle:{color:"source",opacity:i.theme==="dark"?.4:.3},emphasis:{focus:"adjacency"}}]}}var kv;function rd(){return kv??(kv=(async()=>{let[i,o,t,r]=await Promise.all([import("./chunks/zn.AI3T35DX.js"),import("./chunks/zn.EHO4QQOL.js"),import("./chunks/zn.6RARZYEJ.js"),import("./chunks/zn.S4ZVBYAS.js")]);return i.use([o.BarChart,o.LineChart,o.SankeyChart,t.GridComponent,t.TooltipComponent,t.LegendComponent,t.TitleComponent,t.DataZoomComponent,r.CanvasRenderer]),i})()),kv}var Cv=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:inline-block;width:100%}.chart{position:relative}`;var ce=class extends C{constructor(){super(...arguments);this.type="bar";this.data=[];this.categories=[];this.datapointSize=1;this.stacked=!1;this.live=!1;this.dataUrl="";this.liveInterval=1e3;this.height=300;this.enableAnimations=!1;this.smooth=!1;this.scale=!1;this.resizeObserver=new Zt(this,{target:null,skipInitial:!0,callback:()=>this.chart?.resize()})}firstUpdated(t){this.initPromise=this.initChart().catch(()=>{}),super.firstUpdated(t)}async getUpdateComplete(){let t=await super.getUpdateComplete();return await this.initPromise,t}getTheme(){return this.getAttribute("t")==="dark"?"dark":"light"}getTextColor(){let t=getComputedStyle(this),r=t.getPropertyValue("--zn-text").trim();if(!r)return;let n=t.getPropertyValue("--zn-text-opacity").trim()||"1";return`rgba(${r}, ${n})`}getBorderColor(){let t=getComputedStyle(this).getPropertyValue("--zn-border-color").trim();return t?`rgb(${t})`:void 0}buildOption(){let t={type:this.type,data:this.data??[],categories:Array.isArray(this.categories)?this.categories:[],xAxisType:this.xAxis,yAxisAppend:this.yAxisAppend,stacked:this.stacked,enableAnimations:this.enableAnimations,datapointSize:this.datapointSize,colors:this.colors,theme:this.getTheme(),smooth:this.smooth,scale:this.scale,textColor:this.getTextColor(),borderColor:this.getBorderColor()};switch(this.type){case"bar":return tu(t);case"line":return zv(t);case"area":return wv(t);case"sankey":return _v(t);default:return tu(t)}}async initChart(){let t=this.shadowRoot?.getElementById("chart");if(!t)return;t.style.height=`${this.height}px`;let r=await rd();!this.isConnected||this.chart||(this.echarts=r,this.chart=r.init(t),this.chart.setOption(this.buildOption()),this.syncGroup&&(this.chart.group=this.syncGroup,r.connect(this.syncGroup)),this.resizeObserver.observe(t),this.live&&this.dataUrl&&this.startLive())}startLive(){this.liveTimer=window.setInterval(async()=>{try{let r=await(await fetch(this.dataUrl)).json();this.data=r,this.chart?.setOption({...this.buildOption()})}catch{}},this.liveInterval)}reinit(){this.chart?.dispose(),this.chart=void 0,this.initPromise=this.initChart().catch(()=>{})}attributeChangedCallback(t,r,n){if(super.attributeChangedCallback(t,r,n),!!this.chart){if(t==="t"){this.reinit();return}if(t==="type"){this.reinit();return}if(t==="height"){let a=this.shadowRoot?.getElementById("chart");a&&(a.style.height=`${this.height}px`),this.chart.resize();return}if(t==="sync-group"){n?(this.chart.group=n,this.echarts?.connect(n)):this.chart.group="";return}this.chart.setOption({...this.buildOption()})}}disconnectedCallback(){super.disconnectedCallback(),this.liveTimer&&clearInterval(this.liveTimer),this.chart?.dispose(),this.chart=void 0}render(){return u`<div class="chart"><div id="chart"></div></div>`}};ce.styles=E(Cv),c([p()],ce.prototype,"type",2),c([p({type:Array})],ce.prototype,"data",2),c([p({type:Array})],ce.prototype,"categories",2),c([p({attribute:"xaxis"})],ce.prototype,"xAxis",2),c([p({type:Number,attribute:"d-size"})],ce.prototype,"datapointSize",2),c([p({type:Boolean})],ce.prototype,"stacked",2),c([p({type:Boolean})],ce.prototype,"live",2),c([p({attribute:"data-url"})],ce.prototype,"dataUrl",2),c([p({attribute:"live-interval",type:Number})],ce.prototype,"liveInterval",2),c([p({type:Number,reflect:!0})],ce.prototype,"height",2),c([p({attribute:"enable-animations",converter:{fromAttribute:t=>{if(t===null)return!1;if(t===""||t==="true")return!0;let r=parseFloat(t);return Number.isNaN(r)?!0:r}}})],ce.prototype,"enableAnimations",2),c([p({attribute:"y-axis-append"})],ce.prototype,"yAxisAppend",2),c([p({type:Array})],ce.prototype,"colors",2),c([p({attribute:"sync-group"})],ce.prototype,"syncGroup",2),c([p({type:Boolean})],ce.prototype,"smooth",2),c([p({converter:{fromAttribute:t=>{if(t===null)return!1;if(t===""||t==="true")return!0;let r=parseFloat(t);return Number.isNaN(r)?!0:r}}})],ce.prototype,"scale",2);var I3=ce;ce.define("zn-chart");var Sv=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host>div,zn-simplechart>div{width:115px;height:50px;cursor:pointer}`;var D3=["Jun 2016","Jul 2016","Aug 2016","Sep 2016","Oct 2016","Nov 2016","Dec 2016","Jan 2017","Feb 2017","Mar 2017","Apr 2017","May 2017"],N3=[56.4,39.8,66.8,66.4,40.6,55.2,77.4,69.8,57.8,76,110.8,142.6],un=class extends C{constructor(){super(...arguments);this.enableAnimations=!1;this.resizeObserver=new Zt(this,{target:null,skipInitial:!0,callback:()=>this.chart?.resize()})}firstUpdated(){this.initPromise=this.initChart().catch(()=>{})}async getUpdateComplete(){let t=await super.getUpdateComplete();return await this.initPromise,t}async initChart(){let t=this.shadowRoot?.getElementById("chart");if(!t)return;let r=await rd();if(!this.isConnected||this.chart)return;this.chart=r.init(t);let n=this.datasets?.[0]?.data??N3,a=this.labels??D3,s=this.enableAnimations!==!1&&this.enableAnimations!==0,l=typeof this.enableAnimations=="number"?this.enableAnimations:1500;this.chart.setOption({animation:s,animationDuration:l,animationEasing:"cubicOut",tooltip:{trigger:"axis",appendTo:"body",backgroundColor:"rgba(0,0,0,0.7)",borderWidth:0,textStyle:{color:"#fff"}},xAxis:{type:"category",data:a,show:!1},yAxis:{type:"value",show:!1},grid:{left:0,right:0,top:0,bottom:0},series:[{type:"bar",data:n,barWidth:7,itemStyle:{color:"#29C1BC",borderRadius:10},emphasis:{itemStyle:{color:"#19837f"}}}]}),this.resizeObserver.observe(t)}disconnectedCallback(){super.disconnectedCallback(),this.chart?.dispose()}render(){return u`<div id="chart"></div>`}};un.styles=E(Sv),c([p({attribute:"datasets",type:Array})],un.prototype,"datasets",2),c([p({attribute:"labels",type:Array})],un.prototype,"labels",2),c([p({attribute:"enable-animations",converter:{fromAttribute:t=>{if(t===null)return!1;if(t===""||t==="true")return!0;let r=parseFloat(t);return Number.isNaN(r)?!0:r}}})],un.prototype,"enableAnimations",2);var R3=un;un.define("zn-simple-chart");var Ev=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}.header{flex-grow:1}.header .caption{justify-content:space-between;gap:var(--zn-base-gap);max-width:100%}.header__caption{font-weight:var(--zn-text-h1-font-weight);font-size:var(--zn-text-h1-font-size);color:rgba(var(--zn-text-panel-title),100%);line-height:var(--zn-icon-size,20px);margin:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:flex;gap:var(--zn-spacing-x-small);align-items:center;text-wrap:auto}.caption__back{display:flex;justify-content:center;align-items:center;color:inherit}:host([transparent])>div{background-color:transparent}:host([with-closer]) .content{padding-right:40px}:host([navigation])>div h1{padding-bottom:0}:host #nav-container{gap:0;border-bottom:1px solid rgb(var(--zn-border-color));margin:0 3px}.alt-overlay{display:none}:host(.alt-pressed) .alt-overlay:empty{display:none !important}:host(.alt-pressed) .alt-overlay{display:flex;gap:10px;align-items:flex-end;position:absolute;left:0;top:10px;padding:6px 15px;background:rgba(var(--zn-panel),0.95);z-index:10}:host(.alt-pressed) .alt-overlay a{display:flex}:host(.alt-pressed) .alt-overlay zn-icon:hover{color:rgb(var(--zn-primary));cursor:pointer}:host([transparent]) .header{margin:0}.header{display:flex;flex-direction:column;margin:0;overflow:hidden}.header .content{display:flex;flex-wrap:wrap;width:100%;max-width:100%;height:-moz-fit-content;height:fit-content;gap:10px;margin:0 auto;padding:var(--zn-base-gap)}.header__left{display:flex;justify-content:center;flex-direction:column;gap:1px;flex-shrink:1;max-width:100%}.header__right{flex-grow:1;flex-shrink:1;overflow-x:clip;overflow-y:visible;min-width:20px}.header .navless{min-height:10px}.header .content{position:relative;gap:10px}.header .breadcrumb{display:inline-flex;align-items:center;gap:var(--zn-spacing-2x-small);font:inherit;color:inherit}.header .breadcrumb::slotted(a){font:inherit;color:inherit;text-decoration:inherit}.header .breadcrumb::slotted(a:hover){color:rgb(var(--zn-primary))}.header .breadcrumb::slotted(a)::after{content:">";margin-left:var(--zn-spacing-2x-small);color:rgb(var(--zn-text-muted));font-weight:var(--zn-font-weight-normal)}.header .caption{flex-grow:1;display:flex;align-items:center;gap:10px;max-width:100%;line-height:var(--zn-icon-size,20px)}.header .caption a{display:flex;align-items:center;color:inherit;text-decoration:none}.header .caption a zn-icon{cursor:pointer}.header .caption a zn-icon:hover{color:rgb(var(--zn-primary))}.header h1{flex-grow:1;overflow:hidden;text-overflow:ellipsis;color:rgb(var(--zn-text-page-title));margin:0;font-size:var(--zn-font-size-medium);font-weight:var(--zn-font-weight-medium)}@media screen and (min-width:var(--zn-container-lg)){.header h1{font-size:var(--zn-font-size-large)}}.header h1:empty{display:none}.header slot{display:flex;align-items:center;flex-wrap:wrap;gap:var(--zn-spacing-small);word-break:break-word}.header slot[name=nav]{flex-basis:100%}.header slot[name=actions]{justify-content:end;flex-wrap:nowrap;height:var(--zn-icon-size,20px)}.header slot[name=actions]::slotted(zn-button-menu){flex-grow:1;flex-shrink:1}.header .actions{display:flex}:host([baseless]) .header{border-bottom:none !important}`;var He=class extends C{constructor(){super(...arguments);this.hasSlotController=new Q(this,"[default]","nav","breadcrumb");this.transparent=!1;this.navigation=[];this.hideBreadcrumb=!1;this.handleAltPress=()=>{this.classList.toggle("alt-pressed",!0)};this.handleAltUp=()=>{this.classList.toggle("alt-pressed",!1)}}connectedCallback(){super.connectedCallback(),window.addEventListener("alt-press",this.handleAltPress),window.addEventListener("alt-up",this.handleAltUp)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("alt-press",this.handleAltPress),window.removeEventListener("alt-up",this.handleAltUp)}firstUpdated(t){super.firstUpdated(t),this.navbar=this.querySelector("zn-navbar"),this.updateNav()}updateNav(){if(!this.navbar&&this.navigation&&this.navigation.length>0){this.navbar=document.createElement("zn-navbar");let t=this.shadowRoot?.querySelector("#nav-container");t&&t.appendChild(this.navbar)}this.navbar&&(this.navbar.navigation=this.navigation,this.navbar.setAttribute("baseless",""))}render(){let t=this.hasSlotController.test("[default]"),r=this.hasSlotController.test("nav"),n=this.navigation&&this.navigation.length>0||r,a=this.previousPath,s=this.entityId,l=this.fullLocation,d=!this.hideBreadcrumb&&this.hasSlotController.test("breadcrumb"),h=u`
|
|
1413
|
+
</slot>`}};Ut.styles=E(yv),c([p({type:Boolean,reflect:!0})],Ut.prototype,"available",2),c([p({type:Boolean,reflect:!0})],Ut.prototype,"incoming",2),c([p({reflect:!0})],Ut.prototype,"variant",2),c([p()],Ut.prototype,"header",2),c([p()],Ut.prototype,"icon",2),c([p({reflect:!0})],Ut.prototype,"color",2),c([p()],Ut.prototype,"title",2),c([p()],Ut.prototype,"subtitle",2),c([p({type:Number})],Ut.prototype,"progress",2),c([p({attribute:"progress-color"})],Ut.prototype,"progressColor",2),c([p({attribute:"item-id"})],Ut.prototype,"itemId",2),c([p({attribute:"accept-uri"})],Ut.prototype,"acceptUri",2),c([p({type:Number,attribute:"reserved-until"})],Ut.prototype,"reservedUntil",2),c([p({type:Number,attribute:"auto-accept-delay"})],Ut.prototype,"autoAcceptDelay",2),c([p({type:Boolean,reflect:!0})],Ut.prototype,"rejectable",2),c([p({attribute:"accept-icon"})],Ut.prototype,"acceptIcon",2),c([p({attribute:"accept-gaid"})],Ut.prototype,"acceptGaid",2),c([p({attribute:"reject-icon"})],Ut.prototype,"rejectIcon",2),c([p({attribute:"reject-label"})],Ut.prototype,"rejectLabel",2);var A3=Ut;Ut.define("zn-channel-tile");function Xh(i){let o=i.theme==="dark"?"rgb(161, 161, 170)":"rgb(113, 113, 122)",t=i.textColor??o,r=i.enableAnimations!==!1&&i.enableAnimations!==0,n=typeof i.enableAnimations=="number"?i.enableAnimations:1500;return{animation:r,animationDuration:n,animationEasing:"cubicOut",...i.colors?{color:i.colors}:{},textStyle:{color:t},tooltip:{trigger:"axis",appendTo:"body",valueFormatter:i.yAxisAppend?a=>`${a}${i.yAxisAppend}`:void 0},legend:{top:0,right:0,icon:"circle",textStyle:{color:t}},grid:{left:40,right:20,top:40,bottom:30}}}function L3(i){return i.length===0||i.every(o=>!o.data||o.data.length===0)}function Qh(i){let o=L3(i.data)?{min:0,max:6}:{},t=i.scale?{scale:!0,...typeof i.scale=="number"?{boundaryGap:[`${i.scale}%`,`${i.scale}%`]}:{}}:{};return{type:"value",...i.borderColor?{splitLine:{lineStyle:{color:i.borderColor}}}:{},...o,...t,axisLabel:i.yAxisAppend?{formatter:n=>`${n}${i.yAxisAppend}`}:{}}}function Jh(i,o=!1){let t=i.borderColor?{axisLine:{lineStyle:{color:i.borderColor}}}:{};return i.xAxisType==="datetime"?{type:"time",...t}:i.xAxisType==="numeric"?{type:"value",...t}:{type:"category",data:i.categories,...o?{boundaryGap:!1}:{},...t}}function q3(i){return i.map(o=>o&&typeof o=="object"&&!Array.isArray(o)&&"x"in o&&"y"in o?[o.x,o.y]:o)}function Zh(i,o,t=()=>({})){return i.data.map(r=>({type:o,name:r.name,data:q3(r.data),...r.color?{itemStyle:{color:r.color}}:{},...i.stacked?{stack:"total"}:{},...i.enableAnimations!==!1&&i.enableAnimations!==0&&o==="bar"?{animationDelay:n=>n*50}:{},...t(r)}))}function tu(i){return{...Xh(i),xAxis:Jh(i),yAxis:Qh(i),series:Zh(i,"bar")}}function zv(i){return{...Xh(i),xAxis:Jh(i,!0),yAxis:Qh(i),series:Zh(i,"line",()=>({symbolSize:i.datapointSize,smooth:i.smooth}))}}function wv(i){return{...Xh(i),xAxis:Jh(i,!0),yAxis:Qh(i),series:Zh(i,"line",()=>({symbolSize:i.datapointSize,smooth:i.smooth,areaStyle:{opacity:.1}}))}}function M3(i){let o=new Set,t=[];for(let r of i)o.has(r.source)||(o.add(r.source),t.push({name:r.source})),o.has(r.target)||(o.add(r.target),t.push({name:r.target}));return t}function _v(i){let o=i.data[0]??{name:"",data:[]},t=o.data??[],n=o.nodes??M3(t),a=i.theme==="dark"?"rgb(161, 161, 170)":"rgb(113, 113, 122)",s=i.textColor??a,l=i.enableAnimations!==!1&&i.enableAnimations!==0,d=typeof i.enableAnimations=="number"?i.enableAnimations:1500;return{animation:l,animationDuration:d,animationEasing:"cubicOut",...i.colors?{color:i.colors}:{},textStyle:{color:s},tooltip:{trigger:"item",appendTo:"body"},series:[{type:"sankey",name:o.name,data:n,links:t,label:{color:s,textBorderWidth:0},lineStyle:{color:"source",opacity:i.theme==="dark"?.4:.3},emphasis:{focus:"adjacency"}}]}}var kv;function rd(){return kv??(kv=(async()=>{let[i,o,t,r]=await Promise.all([import("./chunks/zn.AI3T35DX.js"),import("./chunks/zn.EHO4QQOL.js"),import("./chunks/zn.6RARZYEJ.js"),import("./chunks/zn.S4ZVBYAS.js")]);return i.use([o.BarChart,o.LineChart,o.SankeyChart,t.GridComponent,t.TooltipComponent,t.LegendComponent,t.TitleComponent,t.DataZoomComponent,r.CanvasRenderer]),i})()),kv}var Cv=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:inline-block;width:100%}.chart{position:relative}`;var ce=class extends C{constructor(){super(...arguments);this.type="bar";this.data=[];this.categories=[];this.datapointSize=1;this.stacked=!1;this.live=!1;this.dataUrl="";this.liveInterval=1e3;this.height=300;this.enableAnimations=!1;this.smooth=!1;this.scale=!1;this.resizeObserver=new Zt(this,{target:null,skipInitial:!0,callback:()=>this.chart?.resize()})}firstUpdated(t){this.initPromise=this.initChart().catch(()=>{}),super.firstUpdated(t)}async getUpdateComplete(){let t=await super.getUpdateComplete();return await this.initPromise,t}getTheme(){return this.getAttribute("t")==="dark"?"dark":"light"}getTextColor(){let t=getComputedStyle(this),r=t.getPropertyValue("--zn-text").trim();if(!r)return;let n=t.getPropertyValue("--zn-text-opacity").trim()||"1";return`rgba(${r}, ${n})`}getBorderColor(){let t=getComputedStyle(this).getPropertyValue("--zn-border-color").trim();return t?`rgb(${t})`:void 0}buildOption(){let t={type:this.type,data:this.data??[],categories:Array.isArray(this.categories)?this.categories:[],xAxisType:this.xAxis,yAxisAppend:this.yAxisAppend,stacked:this.stacked,enableAnimations:this.enableAnimations,datapointSize:this.datapointSize,colors:this.colors,theme:this.getTheme(),smooth:this.smooth,scale:this.scale,textColor:this.getTextColor(),borderColor:this.getBorderColor()};switch(this.type){case"bar":return tu(t);case"line":return zv(t);case"area":return wv(t);case"sankey":return _v(t);default:return tu(t)}}async initChart(){let t=this.shadowRoot?.getElementById("chart");if(!t)return;t.style.height=`${this.height}px`;let r=await rd();!this.isConnected||this.chart||(this.echarts=r,this.chart=r.init(t),this.chart.setOption(this.buildOption()),this.syncGroup&&(this.chart.group=this.syncGroup,r.connect(this.syncGroup)),this.resizeObserver.observe(t),this.live&&this.dataUrl&&this.startLive())}startLive(){this.liveTimer=window.setInterval(async()=>{try{let r=await(await fetch(this.dataUrl)).json();this.data=r,this.chart?.setOption({...this.buildOption()})}catch{}},this.liveInterval)}reinit(){this.chart?.dispose(),this.chart=void 0,this.initPromise=this.initChart().catch(()=>{})}attributeChangedCallback(t,r,n){if(super.attributeChangedCallback(t,r,n),!!this.chart){if(t==="t"){this.reinit();return}if(t==="type"){this.reinit();return}if(t==="height"){let a=this.shadowRoot?.getElementById("chart");a&&(a.style.height=`${this.height}px`),this.chart.resize();return}if(t==="sync-group"){n?(this.chart.group=n,this.echarts?.connect(n)):this.chart.group="";return}this.chart.setOption({...this.buildOption()})}}disconnectedCallback(){super.disconnectedCallback(),this.liveTimer&&clearInterval(this.liveTimer),this.chart?.dispose(),this.chart=void 0}render(){return u`<div class="chart"><div id="chart"></div></div>`}};ce.styles=E(Cv),c([p()],ce.prototype,"type",2),c([p({type:Array})],ce.prototype,"data",2),c([p({type:Array})],ce.prototype,"categories",2),c([p({attribute:"xaxis"})],ce.prototype,"xAxis",2),c([p({type:Number,attribute:"d-size"})],ce.prototype,"datapointSize",2),c([p({type:Boolean})],ce.prototype,"stacked",2),c([p({type:Boolean})],ce.prototype,"live",2),c([p({attribute:"data-url"})],ce.prototype,"dataUrl",2),c([p({attribute:"live-interval",type:Number})],ce.prototype,"liveInterval",2),c([p({type:Number,reflect:!0})],ce.prototype,"height",2),c([p({attribute:"enable-animations",converter:{fromAttribute:t=>{if(t===null)return!1;if(t===""||t==="true")return!0;let r=parseFloat(t);return Number.isNaN(r)?!0:r}}})],ce.prototype,"enableAnimations",2),c([p({attribute:"y-axis-append"})],ce.prototype,"yAxisAppend",2),c([p({type:Array})],ce.prototype,"colors",2),c([p({attribute:"sync-group"})],ce.prototype,"syncGroup",2),c([p({type:Boolean})],ce.prototype,"smooth",2),c([p({converter:{fromAttribute:t=>{if(t===null)return!1;if(t===""||t==="true")return!0;let r=parseFloat(t);return Number.isNaN(r)?!0:r}}})],ce.prototype,"scale",2);var I3=ce;ce.define("zn-chart");var Sv=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host>div,zn-simplechart>div{width:115px;height:50px;cursor:pointer}`;var D3=["Jun 2016","Jul 2016","Aug 2016","Sep 2016","Oct 2016","Nov 2016","Dec 2016","Jan 2017","Feb 2017","Mar 2017","Apr 2017","May 2017"],N3=[56.4,39.8,66.8,66.4,40.6,55.2,77.4,69.8,57.8,76,110.8,142.6],un=class extends C{constructor(){super(...arguments);this.enableAnimations=!1;this.resizeObserver=new Zt(this,{target:null,skipInitial:!0,callback:()=>this.chart?.resize()})}firstUpdated(){this.initPromise=this.initChart().catch(()=>{})}async getUpdateComplete(){let t=await super.getUpdateComplete();return await this.initPromise,t}async initChart(){let t=this.shadowRoot?.getElementById("chart");if(!t)return;let r=await rd();if(!this.isConnected||this.chart)return;this.chart=r.init(t);let n=this.datasets?.[0]?.data??N3,a=this.labels??D3,s=this.enableAnimations!==!1&&this.enableAnimations!==0,l=typeof this.enableAnimations=="number"?this.enableAnimations:1500;this.chart.setOption({animation:s,animationDuration:l,animationEasing:"cubicOut",tooltip:{trigger:"axis",appendTo:"body",backgroundColor:"rgba(0,0,0,0.7)",borderWidth:0,textStyle:{color:"#fff"}},xAxis:{type:"category",data:a,show:!1},yAxis:{type:"value",show:!1},grid:{left:0,right:0,top:0,bottom:0},series:[{type:"bar",data:n,barWidth:7,itemStyle:{color:"#29C1BC",borderRadius:10},emphasis:{itemStyle:{color:"#19837f"}}}]}),this.resizeObserver.observe(t)}disconnectedCallback(){super.disconnectedCallback(),this.chart?.dispose()}render(){return u`<div id="chart"></div>`}};un.styles=E(Sv),c([p({attribute:"datasets",type:Array})],un.prototype,"datasets",2),c([p({attribute:"labels",type:Array})],un.prototype,"labels",2),c([p({attribute:"enable-animations",converter:{fromAttribute:t=>{if(t===null)return!1;if(t===""||t==="true")return!0;let r=parseFloat(t);return Number.isNaN(r)?!0:r}}})],un.prototype,"enableAnimations",2);var R3=un;un.define("zn-simple-chart");var Ev=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}.header{flex-grow:1}.header .caption{justify-content:space-between;gap:var(--zn-base-gap);max-width:100%}.header__caption{font-weight:var(--zn-text-h1-font-weight);font-size:var(--zn-text-h1-font-size);color:rgba(var(--zn-text-panel-title),100%);line-height:var(--zn-icon-size,20px);margin:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:flex;gap:var(--zn-spacing-x-small);align-items:center;text-wrap:auto}.caption__back{display:flex;justify-content:center;align-items:center;color:inherit}:host([transparent])>div{background-color:transparent}:host([with-closer]) .content{padding-right:40px}:host([navigation])>div h1{padding-bottom:0}:host #nav-container{gap:0;border-bottom:1px solid rgb(var(--zn-border-color));margin:0 3px}.alt-overlay{display:none}:host(.alt-pressed) .alt-overlay:empty{display:none !important}:host(.alt-pressed) .alt-overlay{display:flex;gap:10px;align-items:flex-end;position:absolute;left:0;top:10px;padding:6px 15px;background:rgba(var(--zn-panel),0.95);z-index:10}:host(.alt-pressed) .alt-overlay a{display:flex}:host(.alt-pressed) .alt-overlay zn-icon:hover{color:rgb(var(--zn-primary));cursor:pointer}:host([transparent]) .header{margin:0}.header{display:flex;flex-direction:column;margin:0;overflow:hidden}.header .content{display:flex;flex-wrap:wrap;width:100%;max-width:100%;height:-moz-fit-content;height:fit-content;gap:10px;margin:0 auto;padding:var(--zn-base-gap)}.header__left{display:flex;justify-content:center;flex-direction:column;gap:1px;flex-shrink:1;max-width:100%}.header__right{flex-grow:1;flex-shrink:1;overflow-x:clip;overflow-y:visible;min-width:20px}.header .navless{min-height:10px}.header .content{position:relative;gap:10px}.header .breadcrumb{display:inline-flex;align-items:center;gap:var(--zn-spacing-2x-small);font:inherit;color:inherit}.header .breadcrumb::slotted(a){font:inherit;color:inherit;text-decoration:inherit}.header .breadcrumb::slotted(a:hover){color:rgb(var(--zn-primary))}.header .breadcrumb::slotted(a)::after{content:">";margin-left:var(--zn-spacing-2x-small);color:rgb(var(--zn-text-muted));font-weight:var(--zn-font-weight-normal)}.header .caption{flex-grow:1;display:flex;align-items:center;gap:10px;max-width:100%;line-height:var(--zn-icon-size,20px)}.header .caption a{display:flex;align-items:center;color:inherit;text-decoration:none}.header .caption a zn-icon{cursor:pointer}.header .caption a zn-icon:hover{color:rgb(var(--zn-primary))}.header h1{flex-grow:1;overflow:hidden;text-overflow:ellipsis;color:rgb(var(--zn-text-page-title));margin:0;font-size:var(--zn-font-size-medium);font-weight:var(--zn-font-weight-medium)}@media screen and (min-width:var(--zn-container-lg)){.header h1{font-size:var(--zn-font-size-large)}}.header h1:empty{display:none}.header slot{display:flex;align-items:center;flex-wrap:wrap;gap:var(--zn-spacing-small);word-break:break-word}.header slot[name=nav]{flex-basis:100%}.header slot[name=actions]{justify-content:end;flex-wrap:nowrap;height:var(--zn-icon-size,20px)}.header slot[name=actions]::slotted(zn-button-menu){flex-grow:1;flex-shrink:1}.header .actions{display:flex}:host([baseless]) .header{border-bottom:none !important}`;var Pe=class extends C{constructor(){super(...arguments);this.hasSlotController=new Q(this,"[default]","nav","breadcrumb");this.transparent=!1;this.navigation=[];this.hideBreadcrumb=!1;this.handleAltPress=()=>{this.classList.toggle("alt-pressed",!0)};this.handleAltUp=()=>{this.classList.toggle("alt-pressed",!1)}}connectedCallback(){super.connectedCallback(),window.addEventListener("alt-press",this.handleAltPress),window.addEventListener("alt-up",this.handleAltUp)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("alt-press",this.handleAltPress),window.removeEventListener("alt-up",this.handleAltUp)}firstUpdated(t){super.firstUpdated(t),this.navbar=this.querySelector("zn-navbar"),this.updateNav()}updateNav(){if(!this.navbar&&this.navigation&&this.navigation.length>0){this.navbar=document.createElement("zn-navbar");let t=this.shadowRoot?.querySelector("#nav-container");t&&t.appendChild(this.navbar)}this.navbar&&(this.navbar.navigation=this.navigation,this.navbar.setAttribute("baseless",""))}render(){let t=this.hasSlotController.test("[default]"),r=this.hasSlotController.test("nav"),n=this.navigation&&this.navigation.length>0||r,a=this.previousPath,s=this.entityId,l=this.fullLocation,d=!this.hideBreadcrumb&&this.hasSlotController.test("breadcrumb"),h=u`
|
|
1414
1414
|
<div class="${D({header:!0,"header--transparent":this.transparent,"header--full-width":this.fullWidth,"header--has-nav":n,"header--has-breadcrumb":d,"header--has-previous":a,"header--has-entity-id":s,"header--has-full-location":l})}" part="base">
|
|
1415
1415
|
|
|
1416
1416
|
${l||s?u`
|
|
@@ -1467,7 +1467,7 @@ import{a as En,b as E_,c as pr,d as c,e as B}from"./chunks/zn.UBLZO6CI.js";var b
|
|
|
1467
1467
|
:host {
|
|
1468
1468
|
--max-width: 100%;
|
|
1469
1469
|
}
|
|
1470
|
-
</style>${h}`:h}};He.styles=E(Ev),c([p({attribute:"full-location"})],He.prototype,"fullLocation",2),c([p({attribute:"entity-id"})],He.prototype,"entityId",2),c([p({attribute:"entity-id-show",type:Boolean})],He.prototype,"entityIdShow",2),c([p({type:Boolean})],He.prototype,"transparent",2),c([p()],He.prototype,"caption",2),c([p()],He.prototype,"icon",2),c([p({type:Array})],He.prototype,"navigation",2),c([p({attribute:"full-width",type:Boolean})],He.prototype,"fullWidth",2),c([p({attribute:"previous-path"})],He.prototype,"previousPath",2),c([p({attribute:"previous-target"})],He.prototype,"previousTarget",2),c([p({attribute:"hide-breadcrumb",type:Boolean})],He.prototype,"hideBreadcrumb",2),c([K("navigation",{waitUntilFirstUpdate:!0})],He.prototype,"updateNav",1);var eu=He;He.define("zn-header");var Tv=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}@container (width > 1024px){:host{--zn-gutter:16px}}@container (width > 1400px){:host{--zn-gutter:24px}}@container (width > 1500px){:host{--zn-gutter:32px}}:host{display:block;--navbar-active-colour:var(--zn-active-nav-background,var(--zn-page-content-background,var(--zn-page-surface-background,var(--zn-body))))}:host ul.navbar{padding:0;margin-inline:var(--zn-spacing-small)}:host ul.navbar--color-body{background-color:rgb(var(--zn-color-body))}:host([gutter]) ul.navbar{margin:0 calc(var(--zn-gutter,0) + var(--zn-base-gap,0))}:host([hover]){position:absolute;transform:translateY(-100%)}:host([hover]) ul.navbar{position:relative}:host([hover]) ul.navbar li{z-index:2}:host([hover]) ul.navbar::after{z-index:1;content:"";position:absolute;inset:0;border-radius:6px 6px 0 0;background-color:rgb(var(--zn-body))}:host([hover]) ul.navbar::before{z-index:1;content:"";position:absolute;top:-2px;right:-2px;left:-2px;bottom:0;border-radius:10px;backdrop-filter:blur(2px) opacity(0.8)}:host([icon-only]) ul.navbar li{padding:0;width:36px;min-width:36px;justify-content:center}:host([icon-only]) ul.navbar li:hover:not(.active):not(.zn-tb-active):not(.more)::after{display:none}.navbar__container{display:flex;flex-direction:row;position:relative;justify-content:space-between}.navbar{margin:0}:host:not([stacked]) .navbar{margin:0 0 0 calc(var(--zn-gutter,0) + var(--zn-base-gap,0));padding-left:0}:host:not([stacked]) .navbar--flush{padding:0}ul.navbar li{padding-top:0;font-size:var(--zn-text-tab-link-font-size);line-height:var(--zn-text-tab-link-line-height);font-weight:var(--zn-text-tab-link-font-weight);white-space:nowrap;color:var(--zn-text-tab-link-color)}ul.navbar li a{text-decoration:none;color:inherit}:host-context(zn-page) ul.navbar li:not(.active):not(.zn-tb-active){background:var(--navbar-page-inactive-tab-background,transparent);backdrop-filter:var(--navbar-page-inactive-tab-filter,none)}:host([baseless]) .navbar__container{border-bottom:none}:host([stacked]){width:unset;height:100%;margin:0 0}:host([stacked]) .navbar__container{border-bottom:none;height:100%}:host([stacked]) ul.navbar.navbar--no-pad li{padding:0 !important}:host([stacked]) ul.navbar{padding:0;margin:0;flex-direction:column;gap:0}:host([stacked]) ul.navbar li{border-bottom:1px solid rgb(var(--zn-border-color));padding:var(--zn-base-px)}:host([stacked]) ul.navbar li.active:before,:host([stacked]) ul.navbar li.zn-tb-active:before{display:none}:host([stacked]) ul.navbar li.zn-tb-active{background-color:rgb(var(--zn-color-navigation))}:host([stacked]) ul.navbar li:hover:before{left:0;right:0}:host([stacked][slot=left]) ul.navbar--border{border-right:1px solid rgb(var(--zn-border-color))}:host([stacked][slot=right]) ul.navbar--border{border-left:1px solid rgb(var(--zn-border-color))}:host([panel]){background:rgb(var(--zn-panel))}:host([icon-bar]) ul.navbar{display:flex;flex-direction:row;gap:5px;padding:5px;border-radius:10px;margin:0;background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));flex-basis:100%;min-height:50px}:host([icon-bar]) ul.navbar li{flex-direction:column;border-radius:6px;flex-basis:100%;padding:5px 10px}:host([icon-bar]) ul.navbar li:before{display:none !important}:host([icon-bar]) ul.navbar li.active,:host([icon-bar]) ul.navbar li.zn-tb-active{background:rgba(0,0,0,0.03);color:rgb(var(--zn-primary))}:host([icon-bar]) ul.navbar li:hover{color:rgb(var(--zn-primary))}:host([icon-bar]) .navbar__container{border-bottom:0}.navbar__container--stacked.navbar__container--icon-bar{display:inline}ul.navbar.navbar--stacked.navbar--icon-bar{flex-direction:column;padding:0;gap:0}ul.navbar.navbar--stacked.navbar--icon-bar li{border-radius:0;align-items:flex-start;padding:8px}:host(:not([stacked]):not([icon-bar])) ul.navbar{height:40px;align-self:end}:host(:not([stacked]):not([icon-bar]):not([icon-only])) ul.navbar{min-width:200px}:host([icon-only]:not([stacked]):not([icon-bar])) ul.navbar{height:36px}:host([pad]) ul.navbar{padding:var(--zn-spacing-medium) var(--zn-spacing-medium) 0}:host(:not([stacked])) ul.navbar>li{border-right-width:1px;border-top-width:1px}:host(:not([stacked])) ul.navbar>li:first-of-type{border-left-width:1px;border-top-left-radius:6px}:host(:not([stacked])) ul.navbar>li:last-of-type{border-top-right-radius:6px}:host(:not([stacked])) ul.navbar>li.active,:host(:not([stacked])) ul.navbar>li.zn-tb-active{color:var(--zn-text-tab-link-active-color)}:host(:not([stacked])) ul.navbar:not(.has-hidden)>li.last-visible{border-top-right-radius:6px}:host(:not([stacked])) ul.navbar.has-hidden>li.more{border-top-right-radius:6px}:host(:not([stacked])) ul.navbar.more-only>li.more{border-left-width:1px;border-top-left-radius:6px}:host{display:block;width:100%}:host .navbar__container{border-bottom:1px solid rgb(var(--zn-border-color))}:host ul.navbar{display:flex;flex-basis:fit-content;gap:0;list-style:none}:host ul.navbar li.more{display:none}:host ul.navbar.has-hidden li.more{display:flex}:host ul.navbar li.hidden{visibility:hidden;position:absolute;pointer-events:none}:host ul.navbar li .closer{display:none}:host ul.navbar li{-webkit-user-select:none;-moz-user-select:none;user-select:none;font-weight:var(--zn-text-tab-link-font-weight);padding:0 calc(var(--zn-base-px,8px) * 2);background:rgb(var(--zn-color-tab));transition:background-color 100ms ease-in-out;position:relative}:host ul.navbar li:hover{background:rgba(var(--zn-color-tab),0.5)}:host ul.navbar li:hover::after{content:"";position:absolute;inset:0;border-radius:inherit;background:rgb(var(--navbar-active-colour));z-index:-1}:host ul.navbar li{display:flex;align-items:center;justify-content:center;gap:3px;cursor:pointer}:host ul.navbar li zn-icon,:host ul.navbar li zn-tooltip{pointer-events:none}:host ul.navbar li#dropdown-item{flex-grow:1;justify-content:flex-start;padding:0}:host ul.navbar li#dropdown-item zn-dropdown{height:100%}:host ul.navbar li#dropdown-item zn-dropdown zn-button{height:100%}:host ul.navbar li::before{content:"";left:50%;right:50%;bottom:-1px;position:absolute;background-color:rgb(var(--navbar-active-colour));transition:all 300ms ease-in-out;height:1px}:host ul.navbar li:hover:before:not(#dropdown-item){left:-2px;right:-2px}:host ul.navbar li.active,:host ul.navbar li.zn-tb-active{background:rgb(var(--navbar-active-colour));font-size:var(--zn-text-tab-link-active-font-size);line-height:var(--zn-text-tab-link-active-line-height);font-weight:var(--zn-text-tab-link-active-font-weight);color:var(--zn-text-tab-link-active-color)}:host ul.navbar li.active::before,:host ul.navbar li.zn-tb-active::before{left:0;right:0}:host ul.navbar li[closable] .closer{display:block;margin-left:10px;pointer-events:all;opacity:0.8}:host ul.navbar li[closable] .closer:hover{opacity:1}:host([small]){width:unset}:host([small]) ul.navbar{padding:0;gap:0;border-radius:5px}:host([small]) ul.navbar li{border-left:1px solid rgb(var(--zn-border-color));border-radius:0}:host([small]) ul.navbar li:first-of-type{border-left:none}button[popovertarget]{display:flex;justify-content:center;align-items:center}:host([highlight]){margin:0 0}:host([highlight]) .navbar__container{border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(var(--zn-border-color));height:40px}:host([highlight]):host([dropdown]) li{border-bottom:0}:host([highlight]) ul.navbar{gap:0;overflow:initial}:host([highlight]) ul.navbar li{padding-left:var(--zn-spacing-medium);padding-right:var(--zn-spacing-medium);padding-top:var(--zn-spacing-small);position:relative}:host([highlight]) ul.navbar li:hover::before,:host([highlight]) ul.navbar li::before:not(.active):not(#dropdown-item){display:none}:host([highlight]) ul.navbar li.active{border-right:1px solid rgb(var(--zn-border-color))}:host([highlight]) ul.navbar li.active::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:1px;background-color:rgb(var(--navbar-active-colour))}:host([highlight]) .active{background-color:rgb(var(--navbar-active-colour))}:host([dropdown]) ul.navbar li{border-bottom:1px solid rgb(var(--zn-border-color));border-right:1px solid rgb(var(--zn-border-color));border-right:1px solid rgb(var(--zn-border-color));border-left:0}:host([dropdown]) ul.navbar li.active{border-bottom:0}:host([dropdown]) ul.navbar li:before{display:none}:host([dropdown]) ul.navbar li#dropdown-item{border-right:0}.expandables{flex-grow:0;flex-shrink:0;margin:0;display:flex;gap:var(--zn-spacing-x-small);padding-right:calc(var(--zn-gutter,0) + var(--zn-base-gap,0))}.expandables:empty{display:none}:host ul.navbar li.more{padding:0;width:40px;min-width:40px}:host ul.navbar li.more zn-dropdown,:host ul.navbar li.more zn-button[slot=trigger]{height:100%;width:100%}:host ul.navbar li.more zn-button[slot=trigger] zn-icon{transition:transform 200ms ease-in-out;--icon-color:var(--zn-text-tab-link-color)}:host ul.navbar li.more zn-dropdown[open] zn-button[slot=trigger] zn-icon{transform:rotate(90deg);--icon-color:var(--zn-text-tab-link-active-color)}:host ul.navbar li.more:has(zn-dropdown[open]){background:rgb(var(--zn-panel))}:host ul.navbar li.more:has(zn-dropdown[open])::after{content:"";position:absolute;inset:auto 0 -1px 0;height:1px;border-radius:0;background:rgb(var(--zn-panel));z-index:1}:host ul.navbar li.more zn-button::part(base){height:100%;padding-left:0;padding-right:0;outline:none}:host ul.navbar li.more zn-button::part(base):hover{background-color:transparent}:host ul.navbar li.more ul#extended-menu{--navbar-more-trigger-width:40px;box-shadow:0 4px 8px -4px rgba(33,33,33,0.1);border:1px solid rgb(var(--zn-border-color));border-top:0;border-radius:0 0 var(--zn-border-radius) var(--zn-border-radius);overflow:hidden;position:relative;inset-inline-end:-1px}:host ul.navbar li.more ul#extended-menu::before{content:"";position:absolute;inset:0 calc(var(--navbar-more-trigger-width) - 2px) auto 0;height:1px;background:rgb(var(--zn-border-color));z-index:2}:host ul.navbar li.more ul#extended-menu{background:rgb(var(--zn-panel));display:flex;flex-direction:column;height:auto;width:-moz-fit-content;width:fit-content;min-width:var(--zn-size-spanel);margin:-1px 0 0;padding:1px}:host ul.navbar li.more ul#extended-menu li{justify-content:left;background:rgb(var(--zn-panel));font-size:var(--zn-text-menu-link-font-size);line-height:var(--zn-text-menu-link-line-height);font-weight:var(--zn-text-menu-link-font-weight);color:var(--zn-text-menu-link-color);padding:var(--zn-spacing-small) var(--zn-spacing-medium)}:host ul.navbar li.more ul#extended-menu li:hover{background:linear-gradient(rgba(0,0,0,0.06),rgba(0,0,0,0.06)),rgb(var(--zn-panel))}:host ul.navbar li.more ul#extended-menu li.active,:host ul.navbar li.more ul#extended-menu li.zn-tb-active{font-weight:var(--zn-text-tab-link-font-weight);color:var(--zn-text-tab-link-color)}:host ul.navbar li.more ul#extended-menu li.active::before,:host ul.navbar li.more ul#extended-menu li.zn-tb-active::before{left:0;right:0}`;var O3=200,Ot=class extends C{constructor(){super();this.navigation=[];this.flush=!1;this.gutter=!1;this.dropdown=[];this.manualAddItems=!1;this.isolated=!1;this.storeKey="";this.storeTtl=0;this._preItems=[];this._postItems=[];this._expanding=[];this._openedTabs=[];this._itemsObserver=new Lt(this,{target:null,config:{childList:!0},callback:()=>this._updateVisibility()});this._navItems=null;this._expandable=null;this._extendedMenu=null;this._cloneSources=new WeakMap;this._lightDomClones=new WeakMap;this._navItemsGap=0;this._expandableMargin=0;this._totalItemWidth=0;this._resizeFrame=null;this._expandingActionObserver=new Lt(this,{target:null,config:{attributes:!0,attributeFilter:["open","method","basis"]},callback:()=>this._scheduleResize()});this._scheduleResize=()=>{this._resizeFrame!==null&&cancelAnimationFrame(this._resizeFrame),this._resizeFrame=requestAnimationFrame(()=>{this._resizeFrame=null,this.handleResize()})};this._updateVisibility=()=>{if(this._expanding.length>0){this.style.display="";return}let t=this.itemCount();t===0||t<2&&this.hideOne?this.style.display="none":this.style.display=""};this.handleResize=()=>{if(this._extendedMenu===null||this.iconBar||this.stacked)return;let t=this._resolveAvailableWidth(),r=this._getExpandableWidth(t);if(this._totalItemWidth=this._measureTotalItemWidth(),this._totalItemWidth===0)return;let n=(this._navItems?.querySelectorAll("li.hidden").length||0)>0,a=this._navItems?this._getHorizontalSpacing(this._navItems):0,l=Math.max(t-r,O3)-a;if(!n&&this._totalItemWidth<=l){this._navItems?.classList.toggle("has-hidden",!1),this._syncLastVisibleItem();return}let d=this._getMoreItemWidth(),h=l-d,m=0,f=!1,b=this._navItems?.querySelectorAll(":scope > li")||[];this._extendedMenu.innerHTML="";for(let g of b){if(g.classList.contains("more")||!(g instanceof HTMLElement))continue;let v=this._getItemWidth(g);if(f||v+m>h){let x=g.cloneNode(!0);x.classList.remove("hidden"),this._cloneSources.set(x,g),x.addEventListener("click",()=>{g.click(),(this.shadowRoot?.querySelector("#extended-dropdown")||null)?.hide()}),this._extendedMenu?.appendChild(x),g.classList.add("hidden"),n=!0,f=!0}else g.classList.remove("hidden"),m+=v}this._navItems?.classList.toggle("has-hidden",n&&f),this._syncLastVisibleItem()};this._syncExtendedActive=()=>{let t=this._extendedMenu?.querySelectorAll(":scope > li")||[];for(let r of t){let n=this._cloneSources.get(r);n&&(r.classList.toggle("active",n.classList.contains("active")),r.classList.toggle("zn-tb-active",n.classList.contains("zn-tb-active")))}};this.handleClick=t=>{let r=t.composedPath(),n=this.isolated?"data-tab":"tab",a=r.find(s=>s instanceof HTMLElement&&s.tagName==="LI"&&(s.hasAttribute(n)||s.hasAttribute("tab-uri")));a&&(t.stopPropagation(),this.emit("zn-select",{detail:{item:a}}))};this._resizeController=new Zt(this,{callback:()=>this._scheduleResize()}),new Lt(this,{config:{childList:!0},callback:t=>this._adoptNewLightItems(t)})}appendItem(t){this._appended=[...this._appended||[],t]}_cloneLightItem(t){let r=this._lightDomClones.get(t);if(r)return r;let n=t.cloneNode(!0);return this._cloneSources.set(n,t),this._lightDomClones.set(t,n),n.addEventListener("click",()=>t.click()),n}_syncLightDomItems(){let t=[],r=[];Array.from(this.children).forEach(n=>{if(!(n instanceof HTMLElement)||n.tagName!=="LI")return;let a=this._cloneLightItem(n);n.hasAttribute("suffix")?r.push(a):t.push(a)}),this._preItems=t,this._postItems=r}addExpandingAction(t){this._expanding.includes(t)||(this._expanding=[...this._expanding,t]),t.parentElement!==this&&this.appendChild(t),this.requestUpdate(),this._updateVisibility(),this._observeExpandingAction(t),this._scheduleResize()}_observeExpandingAction(t){this._expandingActionObserver.observe(t),this._resizeController.observe(t)}_adoptNewLightItems(t){for(let r of t)for(let n of Array.from(r.addedNodes))n instanceof Element&&n.tagName==="ZN-EXPANDING-ACTION"&&this.addExpandingAction(n);t.some(r=>Array.from(r.addedNodes).some(n=>n instanceof HTMLLIElement)||Array.from(r.removedNodes).some(n=>n instanceof HTMLLIElement))&&(this._syncLightDomItems(),this.requestUpdate())}connectedCallback(){super.connectedCallback(),this._syncLightDomItems(),this._expanding=Array.from(this.querySelectorAll("zn-expanding-action")),this.masterId||(this.masterId=this.storeKey||Math.floor(Math.random()*1e6).toString()),this.storeKey&&this.storeTtl===0&&(this.storeTtl=300),this._store=new hr(this.localStorage?window.localStorage:window.sessionStorage,"znnav:",this.storeTtl)}itemCount(){return(this._navItems?.querySelectorAll(":scope > li:not(.more):not(#dropdown-item)")||[]).length}_resolveAvailableWidth(){let t=this.parentElement,r=this.offsetWidth||t?.offsetWidth||0;for(;r===0&&t?.parentElement;)t=t.parentElement,r=t.offsetWidth||0;return r}_measureTotalItemWidth(){let t=this._navItems?.querySelectorAll(":scope > li")||[],r=0;for(let n of t)n.classList.contains("more")||!(n instanceof HTMLElement)||(r+=this._getItemWidth(n));return r}_getItemWidth(t){return(t.getBoundingClientRect().width||t.offsetWidth||0)+this._navItemsGap+5}_getHorizontalSpacing(t){let r=getComputedStyle(t);return(parseFloat(r.paddingLeft)||0)+(parseFloat(r.paddingRight)||0)}_getMoreItemWidth(){let t=this._navItems?.querySelector(":scope > li.more");if(!t||!this._navItems)return 0;let r=this._getItemWidth(t);if(r>0)return r;let n=this._navItems.classList.contains("has-hidden");return this._navItems.classList.add("has-hidden"),r=this._getItemWidth(t),this._navItems.classList.toggle("has-hidden",n),r}_syncLastVisibleItem(){let t=this._navItems?.querySelectorAll(":scope > li")||[],r=null;for(let n of t)n.classList.remove("last-visible"),!(n.classList.contains("more")||n.classList.contains("hidden")||n.id==="dropdown-item")&&(r=n);r?.classList.add("last-visible"),this._navItems?.classList.toggle("more-only",!r&&this._navItems.classList.contains("has-hidden"))}_getExpandableWidth(t){let r=this._expandableMargin+(this._expandable?.getBoundingClientRect().width||this._expandable?.offsetWidth||0),n=0;for(let a of this._expanding){if(!(a instanceof HTMLElement))continue;let s=a.method||a.getAttribute("method")||"drop",l=!!(a.open||a.hasAttribute("open"));if(s!=="fill"||!l)continue;let h=a.shadowRoot?.querySelector(".expanding-action--fill")?.getBoundingClientRect().width||0;n=Math.max(n,h,Math.min(t,800))}return Math.max(r,n)}addItem(t,r=!0){let n=t.getAttribute("tab-uri");if(typeof n!="string"||this._openedTabs.includes(n))return;this._openedTabs.push(n);let a=this.shadowRoot?.querySelector("ul"),s=this.shadowRoot?.querySelector('[id="dropdown-item"]');r&&s&&(s.querySelector("zn-dropdown")?.hide(),this._saveTabToStorage({uri:n,title:t.innerText})),s?a?.insertBefore(t,s):a?.appendChild(t),this._updateVisibility()}firstUpdated(t){if(super.firstUpdated(t),this._extendedMenu=this.shadowRoot?.querySelector("#extended-menu")||null,this.shadowRoot?.querySelector("#extended-dropdown")?.addEventListener("zn-show",this._syncExtendedActive),this._expandable=this.shadowRoot?.querySelector(".navbar__container > div.expandables")||null,this._expandable){let r=getComputedStyle(this._expandable);this._expandableMargin=(parseFloat(r.marginLeft)||0)+(parseFloat(r.marginRight)||0),this._resizeController.observe(this._expandable)}if(this._navItems=this.shadowRoot?.querySelector(".navbar__container > ul")||null,this._navItems){let r=getComputedStyle(this._navItems);this._navItemsGap=parseFloat(r.columnGap)||0,this._resizeController.observe(this._navItems),this._navItems.addEventListener("click",n=>{let a=n.target.closest("li[tab-uri]");if(a&&this.storeKey){let s=a.getAttribute("tab-uri");s&&this._store.set(this.storeKey+":active",s)}})}if(this._loadStoredTabs(),this._navItems&&this._itemsObserver.observe(this._navItems),this._expanding.forEach(r=>this._observeExpandingAction(r)),this._updateVisibility(),setTimeout(()=>{this.handleResize()},100),this.dropdown.length>0){let r=this.shadowRoot?.querySelector("zn-menu");r&&r.addEventListener("zn-menu-select",n=>{if(this.manualAddItems)return;if(n.detail.element.hasAttribute("data-path")){let s=document.createElement("li");s.setAttribute("tab-uri",n.detail.element.getAttribute("data-path")),s.innerText=n.detail.value,this.addItem(s,!0),setTimeout(()=>{s.click()},300)}})}}_loadStoredTabs(){if(!this.storeKey||!this._store)return;let t=this._store.get(this.storeKey),r=this._store.get(this.storeKey+":active");if(t)try{let n=JSON.parse(t);Array.isArray(n)&&n.forEach(a=>{if(a.uri&&a.title){let s=document.createElement("li");s.setAttribute("tab-uri",a.uri),s.innerText=a.title,this.addItem(s,!1),r&&a.uri===r&&setTimeout(()=>{s.click()},100)}})}catch(n){console.warn("ZnNavbar: Failed to load stored tabs",n)}}_saveTabToStorage(t){if(!(!this.storeKey||!this._store))try{let r=this._store.get(this.storeKey),n=[];r&&(n=JSON.parse(r)),n.some(a=>a.uri===t.uri)||(n.push(t),this._store.set(this.storeKey,JSON.stringify(n)))}catch(r){console.warn("ZnNavbar: Failed to save tab",r)}}updated(t){super.updated(t),(t.has("hideOne")||t.has("navigation")||t.has("_appended"))&&this._updateVisibility()}render(){return this.navigation||(this.navigation=[]),u`
|
|
1470
|
+
</style>${h}`:h}};Pe.styles=E(Ev),c([p({attribute:"full-location"})],Pe.prototype,"fullLocation",2),c([p({attribute:"entity-id"})],Pe.prototype,"entityId",2),c([p({attribute:"entity-id-show",type:Boolean})],Pe.prototype,"entityIdShow",2),c([p({type:Boolean})],Pe.prototype,"transparent",2),c([p()],Pe.prototype,"caption",2),c([p()],Pe.prototype,"icon",2),c([p({type:Array})],Pe.prototype,"navigation",2),c([p({attribute:"full-width",type:Boolean})],Pe.prototype,"fullWidth",2),c([p({attribute:"previous-path"})],Pe.prototype,"previousPath",2),c([p({attribute:"previous-target"})],Pe.prototype,"previousTarget",2),c([p({attribute:"hide-breadcrumb",type:Boolean})],Pe.prototype,"hideBreadcrumb",2),c([K("navigation",{waitUntilFirstUpdate:!0})],Pe.prototype,"updateNav",1);var eu=Pe;Pe.define("zn-header");var Tv=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}@container (width > 1024px){:host{--zn-gutter:16px}}@container (width > 1400px){:host{--zn-gutter:24px}}@container (width > 1500px){:host{--zn-gutter:32px}}:host{display:block;--navbar-active-colour:var(--zn-active-nav-background,var(--zn-page-content-background,var(--zn-page-surface-background,var(--zn-body))))}:host ul.navbar{padding:0;margin-inline:var(--zn-spacing-small)}:host ul.navbar--color-body{background-color:rgb(var(--zn-color-body))}:host([gutter]) ul.navbar{margin:0 calc(var(--zn-gutter,0) + var(--zn-base-gap,0))}:host([hover]){position:absolute;transform:translateY(-100%)}:host([hover]) ul.navbar{position:relative}:host([hover]) ul.navbar li{z-index:2}:host([hover]) ul.navbar::after{z-index:1;content:"";position:absolute;inset:0;border-radius:6px 6px 0 0;background-color:rgb(var(--zn-body))}:host([hover]) ul.navbar::before{z-index:1;content:"";position:absolute;top:-2px;right:-2px;left:-2px;bottom:0;border-radius:10px;backdrop-filter:blur(2px) opacity(0.8)}:host([icon-only]) ul.navbar li{padding:0;width:36px;min-width:36px;justify-content:center}:host([icon-only]) ul.navbar li:hover:not(.active):not(.zn-tb-active):not(.more)::after{display:none}.navbar__container{display:flex;flex-direction:row;position:relative;justify-content:space-between}.navbar{margin:0}:host:not([stacked]) .navbar{margin:0 0 0 calc(var(--zn-gutter,0) + var(--zn-base-gap,0));padding-left:0}:host:not([stacked]) .navbar--flush{padding:0}ul.navbar li{padding-top:0;font-size:var(--zn-text-tab-link-font-size);line-height:var(--zn-text-tab-link-line-height);font-weight:var(--zn-text-tab-link-font-weight);white-space:nowrap;color:var(--zn-text-tab-link-color)}ul.navbar li a{text-decoration:none;color:inherit}:host-context(zn-page) ul.navbar li:not(.active):not(.zn-tb-active){background:var(--navbar-page-inactive-tab-background,transparent);backdrop-filter:var(--navbar-page-inactive-tab-filter,none)}:host([baseless]) .navbar__container{border-bottom:none}:host([stacked]){width:unset;height:100%;margin:0 0}:host([stacked]) .navbar__container{border-bottom:none;height:100%}:host([stacked]) ul.navbar.navbar--no-pad li{padding:0 !important}:host([stacked]) ul.navbar{padding:0;margin:0;flex-direction:column;gap:0}:host([stacked]) ul.navbar li{border-bottom:1px solid rgb(var(--zn-border-color));padding:var(--zn-base-px)}:host([stacked]) ul.navbar li.active:before,:host([stacked]) ul.navbar li.zn-tb-active:before{display:none}:host([stacked]) ul.navbar li.zn-tb-active{background-color:rgb(var(--zn-color-navigation))}:host([stacked]) ul.navbar li:hover:before{left:0;right:0}:host([stacked][slot=left]) ul.navbar--border{border-right:1px solid rgb(var(--zn-border-color))}:host([stacked][slot=right]) ul.navbar--border{border-left:1px solid rgb(var(--zn-border-color))}:host([panel]){background:rgb(var(--zn-panel))}:host([icon-bar]) ul.navbar{display:flex;flex-direction:row;gap:5px;padding:5px;border-radius:10px;margin:0;background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));flex-basis:100%;min-height:50px}:host([icon-bar]) ul.navbar li{flex-direction:column;border-radius:6px;flex-basis:100%;padding:5px 10px}:host([icon-bar]) ul.navbar li:before{display:none !important}:host([icon-bar]) ul.navbar li.active,:host([icon-bar]) ul.navbar li.zn-tb-active{background:rgba(0,0,0,0.03);color:rgb(var(--zn-primary))}:host([icon-bar]) ul.navbar li:hover{color:rgb(var(--zn-primary))}:host([icon-bar]) .navbar__container{border-bottom:0}.navbar__container--stacked.navbar__container--icon-bar{display:inline}ul.navbar.navbar--stacked.navbar--icon-bar{flex-direction:column;padding:0;gap:0}ul.navbar.navbar--stacked.navbar--icon-bar li{border-radius:0;align-items:flex-start;padding:8px}:host(:not([stacked]):not([icon-bar])) ul.navbar{height:40px;align-self:end}:host(:not([stacked]):not([icon-bar]):not([icon-only])) ul.navbar{min-width:200px}:host([icon-only]:not([stacked]):not([icon-bar])) ul.navbar{height:36px}:host([pad]) ul.navbar{padding:var(--zn-spacing-medium) var(--zn-spacing-medium) 0}:host(:not([stacked])) ul.navbar>li{border-right-width:1px;border-top-width:1px}:host(:not([stacked])) ul.navbar>li:first-of-type{border-left-width:1px;border-top-left-radius:6px}:host(:not([stacked])) ul.navbar>li:last-of-type{border-top-right-radius:6px}:host(:not([stacked])) ul.navbar>li.active,:host(:not([stacked])) ul.navbar>li.zn-tb-active{color:var(--zn-text-tab-link-active-color)}:host(:not([stacked])) ul.navbar:not(.has-hidden)>li.last-visible{border-top-right-radius:6px}:host(:not([stacked])) ul.navbar.has-hidden>li.more{border-top-right-radius:6px}:host(:not([stacked])) ul.navbar.more-only>li.more{border-left-width:1px;border-top-left-radius:6px}:host{display:block;width:100%}:host .navbar__container{border-bottom:1px solid rgb(var(--zn-border-color))}:host ul.navbar{display:flex;flex-basis:fit-content;gap:0;list-style:none}:host ul.navbar li.more{display:none}:host ul.navbar.has-hidden li.more{display:flex}:host ul.navbar li.hidden{visibility:hidden;position:absolute;pointer-events:none}:host ul.navbar li .closer{display:none}:host ul.navbar li{-webkit-user-select:none;-moz-user-select:none;user-select:none;font-weight:var(--zn-text-tab-link-font-weight);padding:0 calc(var(--zn-base-px,8px) * 2);background:rgb(var(--zn-color-tab));transition:background-color 100ms ease-in-out;position:relative}:host ul.navbar li:hover{background:rgba(var(--zn-color-tab),0.5)}:host ul.navbar li:hover::after{content:"";position:absolute;inset:0;border-radius:inherit;background:rgb(var(--navbar-active-colour));z-index:-1}:host ul.navbar li{display:flex;align-items:center;justify-content:center;gap:3px;cursor:pointer}:host ul.navbar li zn-icon,:host ul.navbar li zn-tooltip{pointer-events:none}:host ul.navbar li#dropdown-item{flex-grow:1;justify-content:flex-start;padding:0}:host ul.navbar li#dropdown-item zn-dropdown{height:100%}:host ul.navbar li#dropdown-item zn-dropdown zn-button{height:100%}:host ul.navbar li::before{content:"";left:50%;right:50%;bottom:-1px;position:absolute;background-color:rgb(var(--navbar-active-colour));transition:all 300ms ease-in-out;height:1px}:host ul.navbar li:hover:before:not(#dropdown-item){left:-2px;right:-2px}:host ul.navbar li.active,:host ul.navbar li.zn-tb-active{background:rgb(var(--navbar-active-colour));font-size:var(--zn-text-tab-link-active-font-size);line-height:var(--zn-text-tab-link-active-line-height);font-weight:var(--zn-text-tab-link-active-font-weight);color:var(--zn-text-tab-link-active-color)}:host ul.navbar li.active::before,:host ul.navbar li.zn-tb-active::before{left:0;right:0}:host ul.navbar li[closable] .closer{display:block;margin-left:10px;pointer-events:all;opacity:0.8}:host ul.navbar li[closable] .closer:hover{opacity:1}:host([small]){width:unset}:host([small]) ul.navbar{padding:0;gap:0;border-radius:5px}:host([small]) ul.navbar li{border-left:1px solid rgb(var(--zn-border-color));border-radius:0}:host([small]) ul.navbar li:first-of-type{border-left:none}button[popovertarget]{display:flex;justify-content:center;align-items:center}:host([highlight]){margin:0 0}:host([highlight]) .navbar__container{border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(var(--zn-border-color));height:40px}:host([highlight]):host([dropdown]) li{border-bottom:0}:host([highlight]) ul.navbar{gap:0;overflow:initial}:host([highlight]) ul.navbar li{padding-left:var(--zn-spacing-medium);padding-right:var(--zn-spacing-medium);padding-top:var(--zn-spacing-small);position:relative}:host([highlight]) ul.navbar li:hover::before,:host([highlight]) ul.navbar li::before:not(.active):not(#dropdown-item){display:none}:host([highlight]) ul.navbar li.active{border-right:1px solid rgb(var(--zn-border-color))}:host([highlight]) ul.navbar li.active::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:1px;background-color:rgb(var(--navbar-active-colour))}:host([highlight]) .active{background-color:rgb(var(--navbar-active-colour))}:host([dropdown]) ul.navbar li{border-bottom:1px solid rgb(var(--zn-border-color));border-right:1px solid rgb(var(--zn-border-color));border-right:1px solid rgb(var(--zn-border-color));border-left:0}:host([dropdown]) ul.navbar li.active{border-bottom:0}:host([dropdown]) ul.navbar li:before{display:none}:host([dropdown]) ul.navbar li#dropdown-item{border-right:0}.expandables{flex-grow:0;flex-shrink:0;margin:0;display:flex;gap:var(--zn-spacing-x-small);padding-right:calc(var(--zn-gutter,0) + var(--zn-base-gap,0))}.expandables:empty{display:none}:host ul.navbar li.more{padding:0;width:40px;min-width:40px}:host ul.navbar li.more zn-dropdown,:host ul.navbar li.more zn-button[slot=trigger]{height:100%;width:100%}:host ul.navbar li.more zn-button[slot=trigger] zn-icon{transition:transform 200ms ease-in-out;--icon-color:var(--zn-text-tab-link-color)}:host ul.navbar li.more zn-dropdown[open] zn-button[slot=trigger] zn-icon{transform:rotate(90deg);--icon-color:var(--zn-text-tab-link-active-color)}:host ul.navbar li.more:has(zn-dropdown[open]){background:rgb(var(--zn-panel))}:host ul.navbar li.more:has(zn-dropdown[open])::after{content:"";position:absolute;inset:auto 0 -1px 0;height:1px;border-radius:0;background:rgb(var(--zn-panel));z-index:1}:host ul.navbar li.more zn-button::part(base){height:100%;padding-left:0;padding-right:0;outline:none}:host ul.navbar li.more zn-button::part(base):hover{background-color:transparent}:host ul.navbar li.more ul#extended-menu{--navbar-more-trigger-width:40px;box-shadow:0 4px 8px -4px rgba(33,33,33,0.1);border:1px solid rgb(var(--zn-border-color));border-top:0;border-radius:0 0 var(--zn-border-radius) var(--zn-border-radius);overflow:hidden;position:relative;inset-inline-end:-1px}:host ul.navbar li.more ul#extended-menu::before{content:"";position:absolute;inset:0 calc(var(--navbar-more-trigger-width) - 2px) auto 0;height:1px;background:rgb(var(--zn-border-color));z-index:2}:host ul.navbar li.more ul#extended-menu{background:rgb(var(--zn-panel));display:flex;flex-direction:column;height:auto;width:-moz-fit-content;width:fit-content;min-width:var(--zn-size-spanel);margin:-1px 0 0;padding:1px}:host ul.navbar li.more ul#extended-menu li{justify-content:left;background:rgb(var(--zn-panel));font-size:var(--zn-text-menu-link-font-size);line-height:var(--zn-text-menu-link-line-height);font-weight:var(--zn-text-menu-link-font-weight);color:var(--zn-text-menu-link-color);padding:var(--zn-spacing-small) var(--zn-spacing-medium)}:host ul.navbar li.more ul#extended-menu li:hover{background:linear-gradient(rgba(0,0,0,0.06),rgba(0,0,0,0.06)),rgb(var(--zn-panel))}:host ul.navbar li.more ul#extended-menu li.active,:host ul.navbar li.more ul#extended-menu li.zn-tb-active{font-weight:var(--zn-text-tab-link-font-weight);color:var(--zn-text-tab-link-color)}:host ul.navbar li.more ul#extended-menu li.active::before,:host ul.navbar li.more ul#extended-menu li.zn-tb-active::before{left:0;right:0}`;var O3=200,Ot=class extends C{constructor(){super();this.navigation=[];this.flush=!1;this.gutter=!1;this.dropdown=[];this.manualAddItems=!1;this.isolated=!1;this.storeKey="";this.storeTtl=0;this._preItems=[];this._postItems=[];this._expanding=[];this._openedTabs=[];this._itemsObserver=new Lt(this,{target:null,config:{childList:!0},callback:()=>this._updateVisibility()});this._navItems=null;this._expandable=null;this._extendedMenu=null;this._cloneSources=new WeakMap;this._lightDomClones=new WeakMap;this._navItemsGap=0;this._expandableMargin=0;this._totalItemWidth=0;this._resizeFrame=null;this._expandingActionObserver=new Lt(this,{target:null,config:{attributes:!0,attributeFilter:["open","method","basis"]},callback:()=>this._scheduleResize()});this._scheduleResize=()=>{this._resizeFrame!==null&&cancelAnimationFrame(this._resizeFrame),this._resizeFrame=requestAnimationFrame(()=>{this._resizeFrame=null,this.handleResize()})};this._updateVisibility=()=>{if(this._expanding.length>0){this.style.display="";return}let t=this.itemCount();t===0||t<2&&this.hideOne?this.style.display="none":this.style.display=""};this.handleResize=()=>{if(this._extendedMenu===null||this.iconBar||this.stacked)return;let t=this._resolveAvailableWidth(),r=this._getExpandableWidth(t);if(this._totalItemWidth=this._measureTotalItemWidth(),this._totalItemWidth===0)return;let n=(this._navItems?.querySelectorAll("li.hidden").length||0)>0,a=this._navItems?this._getHorizontalSpacing(this._navItems):0,l=Math.max(t-r,O3)-a;if(!n&&this._totalItemWidth<=l){this._navItems?.classList.toggle("has-hidden",!1),this._syncLastVisibleItem();return}let d=this._getMoreItemWidth(),h=l-d,m=0,f=!1,b=this._navItems?.querySelectorAll(":scope > li")||[];this._extendedMenu.innerHTML="";for(let g of b){if(g.classList.contains("more")||!(g instanceof HTMLElement))continue;let v=this._getItemWidth(g);if(f||v+m>h){let x=g.cloneNode(!0);x.classList.remove("hidden"),this._cloneSources.set(x,g),x.addEventListener("click",()=>{g.click(),(this.shadowRoot?.querySelector("#extended-dropdown")||null)?.hide()}),this._extendedMenu?.appendChild(x),g.classList.add("hidden"),n=!0,f=!0}else g.classList.remove("hidden"),m+=v}this._navItems?.classList.toggle("has-hidden",n&&f),this._syncLastVisibleItem()};this._syncExtendedActive=()=>{let t=this._extendedMenu?.querySelectorAll(":scope > li")||[];for(let r of t){let n=this._cloneSources.get(r);n&&(r.classList.toggle("active",n.classList.contains("active")),r.classList.toggle("zn-tb-active",n.classList.contains("zn-tb-active")))}};this.handleClick=t=>{let r=t.composedPath(),n=this.isolated?"data-tab":"tab",a=r.find(s=>s instanceof HTMLElement&&s.tagName==="LI"&&(s.hasAttribute(n)||s.hasAttribute("tab-uri")));a&&(t.stopPropagation(),this.emit("zn-select",{detail:{item:a}}))};this._resizeController=new Zt(this,{callback:()=>this._scheduleResize()}),new Lt(this,{config:{childList:!0},callback:t=>this._adoptNewLightItems(t)})}appendItem(t){this._appended=[...this._appended||[],t]}_cloneLightItem(t){let r=this._lightDomClones.get(t);if(r)return r;let n=t.cloneNode(!0);return this._cloneSources.set(n,t),this._lightDomClones.set(t,n),n.addEventListener("click",()=>t.click()),n}_syncLightDomItems(){let t=[],r=[];Array.from(this.children).forEach(n=>{if(!(n instanceof HTMLElement)||n.tagName!=="LI")return;let a=this._cloneLightItem(n);n.hasAttribute("suffix")?r.push(a):t.push(a)}),this._preItems=t,this._postItems=r}addExpandingAction(t){this._expanding.includes(t)||(this._expanding=[...this._expanding,t]),t.parentElement!==this&&this.appendChild(t),this.requestUpdate(),this._updateVisibility(),this._observeExpandingAction(t),this._scheduleResize()}_observeExpandingAction(t){this._expandingActionObserver.observe(t),this._resizeController.observe(t)}_adoptNewLightItems(t){for(let r of t)for(let n of Array.from(r.addedNodes))n instanceof Element&&n.tagName==="ZN-EXPANDING-ACTION"&&this.addExpandingAction(n);t.some(r=>Array.from(r.addedNodes).some(n=>n instanceof HTMLLIElement)||Array.from(r.removedNodes).some(n=>n instanceof HTMLLIElement))&&(this._syncLightDomItems(),this.requestUpdate())}connectedCallback(){super.connectedCallback(),this._syncLightDomItems(),this._expanding=Array.from(this.querySelectorAll("zn-expanding-action")),this.masterId||(this.masterId=this.storeKey||Math.floor(Math.random()*1e6).toString()),this.storeKey&&this.storeTtl===0&&(this.storeTtl=300),this._store=new hr(this.localStorage?window.localStorage:window.sessionStorage,"znnav:",this.storeTtl)}itemCount(){return(this._navItems?.querySelectorAll(":scope > li:not(.more):not(#dropdown-item)")||[]).length}_resolveAvailableWidth(){let t=this.parentElement,r=this.offsetWidth||t?.offsetWidth||0;for(;r===0&&t?.parentElement;)t=t.parentElement,r=t.offsetWidth||0;return r}_measureTotalItemWidth(){let t=this._navItems?.querySelectorAll(":scope > li")||[],r=0;for(let n of t)n.classList.contains("more")||!(n instanceof HTMLElement)||(r+=this._getItemWidth(n));return r}_getItemWidth(t){return(t.getBoundingClientRect().width||t.offsetWidth||0)+this._navItemsGap+5}_getHorizontalSpacing(t){let r=getComputedStyle(t);return(parseFloat(r.paddingLeft)||0)+(parseFloat(r.paddingRight)||0)}_getMoreItemWidth(){let t=this._navItems?.querySelector(":scope > li.more");if(!t||!this._navItems)return 0;let r=this._getItemWidth(t);if(r>0)return r;let n=this._navItems.classList.contains("has-hidden");return this._navItems.classList.add("has-hidden"),r=this._getItemWidth(t),this._navItems.classList.toggle("has-hidden",n),r}_syncLastVisibleItem(){let t=this._navItems?.querySelectorAll(":scope > li")||[],r=null;for(let n of t)n.classList.remove("last-visible"),!(n.classList.contains("more")||n.classList.contains("hidden")||n.id==="dropdown-item")&&(r=n);r?.classList.add("last-visible"),this._navItems?.classList.toggle("more-only",!r&&this._navItems.classList.contains("has-hidden"))}_getExpandableWidth(t){let r=this._expandableMargin+(this._expandable?.getBoundingClientRect().width||this._expandable?.offsetWidth||0),n=0;for(let a of this._expanding){if(!(a instanceof HTMLElement))continue;let s=a.method||a.getAttribute("method")||"drop",l=!!(a.open||a.hasAttribute("open"));if(s!=="fill"||!l)continue;let h=a.shadowRoot?.querySelector(".expanding-action--fill")?.getBoundingClientRect().width||0;n=Math.max(n,h,Math.min(t,800))}return Math.max(r,n)}addItem(t,r=!0){let n=t.getAttribute("tab-uri");if(typeof n!="string"||this._openedTabs.includes(n))return;this._openedTabs.push(n);let a=this.shadowRoot?.querySelector("ul"),s=this.shadowRoot?.querySelector('[id="dropdown-item"]');r&&s&&(s.querySelector("zn-dropdown")?.hide(),this._saveTabToStorage({uri:n,title:t.innerText})),s?a?.insertBefore(t,s):a?.appendChild(t),this._updateVisibility()}firstUpdated(t){if(super.firstUpdated(t),this._extendedMenu=this.shadowRoot?.querySelector("#extended-menu")||null,this.shadowRoot?.querySelector("#extended-dropdown")?.addEventListener("zn-show",this._syncExtendedActive),this._expandable=this.shadowRoot?.querySelector(".navbar__container > div.expandables")||null,this._expandable){let r=getComputedStyle(this._expandable);this._expandableMargin=(parseFloat(r.marginLeft)||0)+(parseFloat(r.marginRight)||0),this._resizeController.observe(this._expandable)}if(this._navItems=this.shadowRoot?.querySelector(".navbar__container > ul")||null,this._navItems){let r=getComputedStyle(this._navItems);this._navItemsGap=parseFloat(r.columnGap)||0,this._resizeController.observe(this._navItems),this._navItems.addEventListener("click",n=>{let a=n.target.closest("li[tab-uri]");if(a&&this.storeKey){let s=a.getAttribute("tab-uri");s&&this._store.set(this.storeKey+":active",s)}})}if(this._loadStoredTabs(),this._navItems&&this._itemsObserver.observe(this._navItems),this._expanding.forEach(r=>this._observeExpandingAction(r)),this._updateVisibility(),setTimeout(()=>{this.handleResize()},100),this.dropdown.length>0){let r=this.shadowRoot?.querySelector("zn-menu");r&&r.addEventListener("zn-menu-select",n=>{if(this.manualAddItems)return;if(n.detail.element.hasAttribute("data-path")){let s=document.createElement("li");s.setAttribute("tab-uri",n.detail.element.getAttribute("data-path")),s.innerText=n.detail.value,this.addItem(s,!0),setTimeout(()=>{s.click()},300)}})}}_loadStoredTabs(){if(!this.storeKey||!this._store)return;let t=this._store.get(this.storeKey),r=this._store.get(this.storeKey+":active");if(t)try{let n=JSON.parse(t);Array.isArray(n)&&n.forEach(a=>{if(a.uri&&a.title){let s=document.createElement("li");s.setAttribute("tab-uri",a.uri),s.innerText=a.title,this.addItem(s,!1),r&&a.uri===r&&setTimeout(()=>{s.click()},100)}})}catch(n){console.warn("ZnNavbar: Failed to load stored tabs",n)}}_saveTabToStorage(t){if(!(!this.storeKey||!this._store))try{let r=this._store.get(this.storeKey),n=[];r&&(n=JSON.parse(r)),n.some(a=>a.uri===t.uri)||(n.push(t),this._store.set(this.storeKey,JSON.stringify(n)))}catch(r){console.warn("ZnNavbar: Failed to save tab",r)}}updated(t){super.updated(t),(t.has("hideOne")||t.has("navigation")||t.has("_appended"))&&this._updateVisibility()}render(){return this.navigation||(this.navigation=[]),u`
|
|
1471
1471
|
<div part="container" class="${D({navbar__container:!0,"navbar__container--stacked":this.stacked,"navbar__container--icon-bar":this.iconBar})}">
|
|
1472
1472
|
<ul @click="${this.handleClick}" part="navbar" class="${D({navbar:!0,"navbar--slim":this.slim,"navbar--border":this.border,"navbar--flush":this.flush,"navbar--no-pad":this.noPad,"navbar--stacked":this.stacked,"navbar--icon-bar":this.iconBar,[`navbar--color-${this.color}`]:!!this.color})}">
|
|
1473
1473
|
${this._preItems}
|
|
@@ -1510,7 +1510,7 @@ import{a as En,b as E_,c as pr,d as c,e as B}from"./chunks/zn.UBLZO6CI.js";var b
|
|
|
1510
1510
|
`:""}
|
|
1511
1511
|
</div>
|
|
1512
1512
|
<slot name="bottom" part="bottom"></slot>`}};Ot.styles=E(Tv),Ot.dependencies={"zn-dropdown":nr},c([p({attribute:"navigation",type:Array})],Ot.prototype,"navigation",2),c([p({attribute:"full-width",type:Boolean,reflect:!0})],Ot.prototype,"fullWidth",2),c([p({attribute:"icon-bar",type:Boolean,reflect:!0})],Ot.prototype,"iconBar",2),c([p({attribute:"slim",type:Boolean,reflect:!0})],Ot.prototype,"slim",2),c([p({attribute:"border",type:Boolean,reflect:!0})],Ot.prototype,"border",2),c([p({attribute:"hide-one",type:Boolean,reflect:!0})],Ot.prototype,"hideOne",2),c([p({attribute:"flush",type:Boolean,reflect:!0})],Ot.prototype,"flush",2),c([p({attribute:"gutter",type:Boolean,reflect:!0})],Ot.prototype,"gutter",2),c([p({type:Boolean})],Ot.prototype,"stacked",2),c([p({type:Array})],Ot.prototype,"dropdown",2),c([p({attribute:"no-pad",type:Boolean})],Ot.prototype,"noPad",2),c([p({attribute:"manual-add-items",type:Boolean})],Ot.prototype,"manualAddItems",2),c([p({type:Boolean})],Ot.prototype,"isolated",2),c([p({reflect:!0})],Ot.prototype,"color",2),c([p({attribute:"master-id",reflect:!0})],Ot.prototype,"masterId",2),c([p({attribute:"store-key",type:String})],Ot.prototype,"storeKey",2),c([p({attribute:"store-ttl",type:Number,reflect:!0})],Ot.prototype,"storeTtl",2),c([p({attribute:"local-storage",type:Boolean,reflect:!0})],Ot.prototype,"localStorage",2),c([p()],Ot.prototype,"_appended",2);var aa=Ot;Ot.define("zn-navbar");function od(i){function o(pt,nt){return pt<<nt|pt>>>32-nt}function t(pt,nt){let xt,R,y,k,z;return y=pt&2147483648,k=nt&2147483648,xt=pt&1073741824,R=nt&1073741824,z=(pt&1073741823)+(nt&1073741823),xt&&R?z^2147483648^y^k:xt||R?z?z^3221225472^y^k:z^1073741824^y^k:z^y^k}function r(pt,nt,xt){return pt&nt|~pt&xt}function n(pt,nt,xt){return pt&xt|nt&~xt}function a(pt,nt,xt){return pt^nt^xt}function s(pt,nt,xt){return nt^(pt|~xt)}function l(pt,nt,xt,R,y,k,z){return pt=t(pt,t(t(r(nt,xt,R),y),z)),t(o(pt,k),nt)}function d(pt,nt,xt,R,y,k,z){return pt=t(pt,t(t(n(nt,xt,R),y),z)),t(o(pt,k),nt)}function h(pt,nt,xt,R,y,k,z){return pt=t(pt,t(t(a(nt,xt,R),y),z)),t(o(pt,k),nt)}function m(pt,nt,xt,R,y,k,z){return pt=t(pt,t(t(s(nt,xt,R),y),z)),t(o(pt,k),nt)}function f(pt){for(var nt,xt=pt.length,R=xt+8,y=(R-R%64)/64,k=(y+1)*16,z=Array(k-1),M=0,q=0;q<xt;)nt=(q-q%4)/4,M=q%4*8,z[nt]=z[nt]|pt.charCodeAt(q)<<M,q++;return nt=(q-q%4)/4,M=q%4*8,z[nt]=z[nt]|128<<M,z[k-2]=xt<<3,z[k-1]=xt>>>29,z}function b(pt){var nt="",xt="",R,y;for(y=0;y<=3;y++)R=pt>>>y*8&255,xt="0"+R.toString(16),nt=nt+xt.substr(xt.length-2,2);return nt}function g(pt){pt=pt.replace(/\r\n/g,`
|
|
1513
|
-
`);let nt="";for(let xt=0;xt<pt.length;xt++){let R=pt.charCodeAt(xt);R<128?nt+=String.fromCharCode(R):R>127&&R<2048?(nt+=String.fromCharCode(R>>6|192),nt+=String.fromCharCode(R&63|128)):(nt+=String.fromCharCode(R>>12|224),nt+=String.fromCharCode(R>>6&63|128),nt+=String.fromCharCode(R&63|128))}return nt}let v,x,_,$,N,G,I,w,T,L,W=7,tt=12,dt=17,gt=22,_t=5,Nt=9,ze=14,Ke=20,cr=4,$e=11,Ye=16,we=23,ti=6,$a=10,ut=15,qo=21;for(i=g(i),v=f(i),I=1732584193,w=4023233417,T=2562383102,L=271733878,x=0;x<v.length;x+=16)_=I,$=w,N=T,G=L,I=l(I,w,T,L,v[x+0],W,3614090360),L=l(L,I,w,T,v[x+1],tt,3905402710),T=l(T,L,I,w,v[x+2],dt,606105819),w=l(w,T,L,I,v[x+3],gt,3250441966),I=l(I,w,T,L,v[x+4],W,4118548399),L=l(L,I,w,T,v[x+5],tt,1200080426),T=l(T,L,I,w,v[x+6],dt,2821735955),w=l(w,T,L,I,v[x+7],gt,4249261313),I=l(I,w,T,L,v[x+8],W,1770035416),L=l(L,I,w,T,v[x+9],tt,2336552879),T=l(T,L,I,w,v[x+10],dt,4294925233),w=l(w,T,L,I,v[x+11],gt,2304563134),I=l(I,w,T,L,v[x+12],W,1804603682),L=l(L,I,w,T,v[x+13],tt,4254626195),T=l(T,L,I,w,v[x+14],dt,2792965006),w=l(w,T,L,I,v[x+15],gt,1236535329),I=d(I,w,T,L,v[x+1],_t,4129170786),L=d(L,I,w,T,v[x+6],Nt,3225465664),T=d(T,L,I,w,v[x+11],ze,643717713),w=d(w,T,L,I,v[x+0],Ke,3921069994),I=d(I,w,T,L,v[x+5],_t,3593408605),L=d(L,I,w,T,v[x+10],Nt,38016083),T=d(T,L,I,w,v[x+15],ze,3634488961),w=d(w,T,L,I,v[x+4],Ke,3889429448),I=d(I,w,T,L,v[x+9],_t,568446438),L=d(L,I,w,T,v[x+14],Nt,3275163606),T=d(T,L,I,w,v[x+3],ze,4107603335),w=d(w,T,L,I,v[x+8],Ke,1163531501),I=d(I,w,T,L,v[x+13],_t,2850285829),L=d(L,I,w,T,v[x+2],Nt,4243563512),T=d(T,L,I,w,v[x+7],ze,1735328473),w=d(w,T,L,I,v[x+12],Ke,2368359562),I=h(I,w,T,L,v[x+5],cr,4294588738),L=h(L,I,w,T,v[x+8],$e,2272392833),T=h(T,L,I,w,v[x+11],Ye,1839030562),w=h(w,T,L,I,v[x+14],we,4259657740),I=h(I,w,T,L,v[x+1],cr,2763975236),L=h(L,I,w,T,v[x+4],$e,1272893353),T=h(T,L,I,w,v[x+7],Ye,4139469664),w=h(w,T,L,I,v[x+10],we,3200236656),I=h(I,w,T,L,v[x+13],cr,681279174),L=h(L,I,w,T,v[x+0],$e,3936430074),T=h(T,L,I,w,v[x+3],Ye,3572445317),w=h(w,T,L,I,v[x+6],we,76029189),I=h(I,w,T,L,v[x+9],cr,3654602809),L=h(L,I,w,T,v[x+12],$e,3873151461),T=h(T,L,I,w,v[x+15],Ye,530742520),w=h(w,T,L,I,v[x+2],we,3299628645),I=m(I,w,T,L,v[x+0],ti,4096336452),L=m(L,I,w,T,v[x+7],$a,1126891415),T=m(T,L,I,w,v[x+14],ut,2878612391),w=m(w,T,L,I,v[x+5],qo,4237533241),I=m(I,w,T,L,v[x+12],ti,1700485571),L=m(L,I,w,T,v[x+3],$a,2399980690),T=m(T,L,I,w,v[x+10],ut,4293915773),w=m(w,T,L,I,v[x+1],qo,2240044497),I=m(I,w,T,L,v[x+8],ti,1873313359),L=m(L,I,w,T,v[x+15],$a,4264355552),T=m(T,L,I,w,v[x+6],ut,2734768916),w=m(w,T,L,I,v[x+13],qo,1309151649),I=m(I,w,T,L,v[x+4],ti,4149444226),L=m(L,I,w,T,v[x+11],$a,3174756917),T=m(T,L,I,w,v[x+2],ut,718787259),w=m(w,T,L,I,v[x+9],qo,3951481745),I=t(I,_),w=t(w,$),T=t(T,N),L=t(L,G);var Mo=b(I)+b(w)+b(T)+b(L);return Mo.toLowerCase()}var $v=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}.expanding-action--fill{padding-inline:var(--zn-spacing-medium);padding-bottom:var(--zn-spacing-2x-small);position:absolute;top:0;left:auto;right:0;bottom:0;background-color:rgb(var(--zn-panel));width:0;transition:width var(--zn-transition-slow) cubic-bezier(0.62,0.16,0.13,1.01),opacity var(--zn-transition-slow) cubic-bezier(0.62,0.16,0.13,1.01),display var(--zn-transition-slow) ease-in-out allow-discrete}@starting-style {.expanding-action--fill.expanding-action--open{width:0}}.expanding-action--fill.expanding-action--open{display:flex;flex-direction:row;align-items:center;gap:10px;height:100%;width:min(100%,800px);overflow:hidden;z-index:100;max-width:800px}.expanding-action--fill.expanding-action--open::before{content:"";position:absolute;left:calc(var(--zn-spacing-medium) * -1);right:calc(var(--zn-spacing-medium) * -1);bottom:6px;background-color:rgb(var(--zn-primary));height:2px}.expanding-action--fill.expanding-action--open>zn-icon{display:block;color:rgb(var(--zn-primary))}.expanding-action--fill.expanding-action--closed{display:none;opacity:0}@starting-style {.expanding-action--fill .expanding-action__content{opacity:0}}.expanding-action--fill .expanding-action__content{opacity:1;width:100%;display:flex;flex-direction:column;justify-content:center;padding:0}.expanding-action--drop,.expanding-action--drop .expanding-action__dropdown,.expanding-action--drop .expanding-action__dropdown zn-button[slot=trigger]{height:100%}.expanding-action--drop .expanding-action__frame ::-webkit-scrollbar{width:5px;height:5px}.expanding-action--drop .expanding-action__frame{}.expanding-action--drop .expanding-action__frame ::-webkit-scrollbar-track{background:transparent}.expanding-action--drop .expanding-action__frame{}.expanding-action--drop .expanding-action__frame ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}.expanding-action--drop .expanding-action__frame{}.expanding-action--drop .expanding-action__frame ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}.expanding-action--drop .expanding-action__frame{--expanding-action-trigger-width:36px;position:relative;display:flex;flex-direction:column;min-width:300px;width:var(--expanding-action-basis,var(--zn-container-smp,320px));max-width:80vw;max-height:var(--expanding-action-max-height,var(--auto-size-available-height,80vh));background-color:rgb(var(--zn-panel));box-shadow:0 8px 16px -6px rgba(33,33,33,0.18);border:solid 1px rgb(var(--zn-border-color));border-radius:var(--zn-border-radius) 0 var(--zn-border-radius) var(--zn-border-radius);padding:0;height:100%}.expanding-action--drop .expanding-action__frame::before{content:"";position:absolute;top:-1px;left:calc(100% - var(--expanding-action-trigger-width) + 2px);right:0;z-index:1;height:2px;background:rgb(var(--zn-panel))}.expanding-action--drop .expanding-action__content{flex:1 1 auto;min-height:0;overflow-y:auto;border-radius:inherit}:host([data-trigger-side=left]) .expanding-action--drop .expanding-action__frame{border-radius:0 var(--zn-border-radius) var(--zn-border-radius) var(--zn-border-radius)}:host([data-trigger-side=left]) .expanding-action--drop .expanding-action__frame::before{left:0;right:calc(100% - var(--expanding-action-trigger-width) + 2px)}:host([open]) .expanding-action__dropdown zn-button[slot=trigger]{position:relative;z-index:calc(var(--zn-z-index-dropdown) + 1)}:host([open]) .expanding-action__dropdown zn-button[slot=trigger]::before{content:"";position:absolute;inset:0;z-index:-1;height:41px;background:rgb(var(--zn-panel));border:solid 1px rgb(var(--zn-border-color));border-bottom-color:rgb(var(--zn-panel));border-radius:var(--zn-border-radius) var(--zn-border-radius) 0 0}:host([open]) .expanding-action__dropdown zn-button[slot=trigger]::part(base):hover,:host([open]) .expanding-action__dropdown zn-button[slot=trigger]::part(base):active{background:transparent}`;var Fe=class extends C{constructor(){super();this.method="drop";this.prefetch=!1;this.basis="300";this.open=!1;this.fetchStyle="";this.noPrefetch=!1;this._knownUri=new Map;this._actions=[];this._preload=!0;this._metaObserved=!1;this._countObserver=new Lt(this,{target:null,config:{subtree:!0,attributes:!0,attributeFilter:["content"],childList:!0},callback:()=>{let r=Rt("app-content",this,"")[0]?.shadowRoot?.querySelector('meta[name="count"]');if(!r)return;let n=r.getAttribute("content"),a=this.shadowRoot?.querySelector(".expanding-action__dropdown zn-button");n&&a&&a.setAttribute("notification",n)}});this._colorObserver=new Lt(this,{target:null,config:{subtree:!0,attributes:!0,attributeFilter:["content"],childList:!0},callback:()=>{let r=Rt("app-content",this,"")[0]?.shadowRoot?.querySelector('meta[name="color"]');if(!r)return;let n=r.getAttribute("content");n&&(this.color=n)}});this.handleIconClicked=()=>{this.open=!this.open};this.handleIconCloseClicked=()=>{this.open=!1};this._updateTriggerSide=()=>{let t=this.shadowRoot?.querySelector('.expanding-action__dropdown zn-button[slot="trigger"]'),r=this.shadowRoot?.querySelector("#content");if(!t||!r)return;let n=t.getBoundingClientRect(),a=r.getBoundingClientRect();if(a.width===0)return;let s=(n.left+n.right)/2,l=(a.left+a.right)/2;this.setAttribute("data-trigger-side",s>l?"right":"left")};this._panels=new Map}async connectedCallback(){super.connectedCallback(),this.masterId||(this.masterId=Math.floor(Math.random()*1e6).toString()),this._preload=!this.noPrefetch,await this.updateComplete,this._panel=this.shadowRoot?.querySelector("#content")}firstUpdated(t){super.firstUpdated(t),setTimeout(()=>{this._registerActions()},10),this.contextUri&&setTimeout(()=>{this.fetchContextHeaders().then(r=>r)},10)}_observeMetaData(){if(this._metaObserved)return;let r=Rt("app-content",this,"")[0]?.shadowRoot;r&&(this._countObserver.observe(r),this._colorObserver.observe(r),this._metaObserved=!0)}_registerActions(){Rt("[action-uri]",this,"zn-expanding-action").forEach(t=>{t.getAttribute("action-uri")===""&&(t.setAttribute("action",""),t.removeAttribute("action-uri")),this._addAction(t)})}_addAction(t){this._actions.includes(t)||(this._actions.push(t),this._preload&&t.addEventListener("mouseover",this.fetchUri.bind(this,t)),t.addEventListener("click",this._handleClick.bind(this)))}_uriToId(t){return"action-"+od(t).substr(0,8)+"-"+this.masterId}_handleClick(t){let r=t.relatedTarget??t.target;r&&this.clickAction(r)}_createUriPanel(t,r,n){if(t.hasAttribute("action")||t.setAttribute("action",n),this._knownUri.has(r)||this._knownUri.set(r,n),this._panels.has(n)&&this._panels.get(n)!==void 0)return this._panels.get(n)[0];let a=document.createElement("div");return a.setAttribute("id",n),this.fetchStyle!==""&&a.setAttribute("data-fetch-style",this.fetchStyle),a.setAttribute("data-self-uri",r),a.setAttribute("data-fetch-style","expanding-action"),a.textContent="Loading ...",this._panel instanceof HTMLElement&&(this._panel.appendChild(a),this._panels.set(n,[a])),document.dispatchEvent(new CustomEvent("zn-new-element",{detail:{element:a,source:t}})),a}fetchUri(t){if(!t.hasAttribute("action")&&t.hasAttribute("action-uri")){let r=t.getAttribute("action-uri")??"";this._createUriPanel(t,r,this._uriToId(r)),this._observeMetaData()}}async fetchContextHeaders(){try{let t=await fetch(this.contextUri,{credentials:"same-origin",method:"head",headers:{"x-requested-with":"XMLHttpRequest"}}),r=t.headers.get("x-kubex-count");r&&(this.count=r);let n=t.headers.get("x-kubex-color");n&&(this.color=n)}catch{}}clickAction(t){this.fetchUri(t)}_observePlacement(){let r=this.shadowRoot?.querySelector(".expanding-action__dropdown")?.shadowRoot?.querySelector(".dropdown");if(!r){requestAnimationFrame(()=>this._observePlacement());return}this._updateTriggerSide(),!this._placementObserver&&(this._placementObserver=new MutationObserver(this._updateTriggerSide),this._placementObserver.observe(r,{attributes:!0,attributeFilter:["data-current-placement"]}))}disconnectedCallback(){super.disconnectedCallback(),this._placementObserver?.disconnect(),this._placementObserver=void 0}render(){return u`
|
|
1513
|
+
`);let nt="";for(let xt=0;xt<pt.length;xt++){let R=pt.charCodeAt(xt);R<128?nt+=String.fromCharCode(R):R>127&&R<2048?(nt+=String.fromCharCode(R>>6|192),nt+=String.fromCharCode(R&63|128)):(nt+=String.fromCharCode(R>>12|224),nt+=String.fromCharCode(R>>6&63|128),nt+=String.fromCharCode(R&63|128))}return nt}let v,x,_,$,N,G,I,w,T,L,W=7,tt=12,dt=17,gt=22,_t=5,Nt=9,ze=14,We=20,cr=4,$e=11,Ke=16,we=23,ti=6,$a=10,ut=15,qo=21;for(i=g(i),v=f(i),I=1732584193,w=4023233417,T=2562383102,L=271733878,x=0;x<v.length;x+=16)_=I,$=w,N=T,G=L,I=l(I,w,T,L,v[x+0],W,3614090360),L=l(L,I,w,T,v[x+1],tt,3905402710),T=l(T,L,I,w,v[x+2],dt,606105819),w=l(w,T,L,I,v[x+3],gt,3250441966),I=l(I,w,T,L,v[x+4],W,4118548399),L=l(L,I,w,T,v[x+5],tt,1200080426),T=l(T,L,I,w,v[x+6],dt,2821735955),w=l(w,T,L,I,v[x+7],gt,4249261313),I=l(I,w,T,L,v[x+8],W,1770035416),L=l(L,I,w,T,v[x+9],tt,2336552879),T=l(T,L,I,w,v[x+10],dt,4294925233),w=l(w,T,L,I,v[x+11],gt,2304563134),I=l(I,w,T,L,v[x+12],W,1804603682),L=l(L,I,w,T,v[x+13],tt,4254626195),T=l(T,L,I,w,v[x+14],dt,2792965006),w=l(w,T,L,I,v[x+15],gt,1236535329),I=d(I,w,T,L,v[x+1],_t,4129170786),L=d(L,I,w,T,v[x+6],Nt,3225465664),T=d(T,L,I,w,v[x+11],ze,643717713),w=d(w,T,L,I,v[x+0],We,3921069994),I=d(I,w,T,L,v[x+5],_t,3593408605),L=d(L,I,w,T,v[x+10],Nt,38016083),T=d(T,L,I,w,v[x+15],ze,3634488961),w=d(w,T,L,I,v[x+4],We,3889429448),I=d(I,w,T,L,v[x+9],_t,568446438),L=d(L,I,w,T,v[x+14],Nt,3275163606),T=d(T,L,I,w,v[x+3],ze,4107603335),w=d(w,T,L,I,v[x+8],We,1163531501),I=d(I,w,T,L,v[x+13],_t,2850285829),L=d(L,I,w,T,v[x+2],Nt,4243563512),T=d(T,L,I,w,v[x+7],ze,1735328473),w=d(w,T,L,I,v[x+12],We,2368359562),I=h(I,w,T,L,v[x+5],cr,4294588738),L=h(L,I,w,T,v[x+8],$e,2272392833),T=h(T,L,I,w,v[x+11],Ke,1839030562),w=h(w,T,L,I,v[x+14],we,4259657740),I=h(I,w,T,L,v[x+1],cr,2763975236),L=h(L,I,w,T,v[x+4],$e,1272893353),T=h(T,L,I,w,v[x+7],Ke,4139469664),w=h(w,T,L,I,v[x+10],we,3200236656),I=h(I,w,T,L,v[x+13],cr,681279174),L=h(L,I,w,T,v[x+0],$e,3936430074),T=h(T,L,I,w,v[x+3],Ke,3572445317),w=h(w,T,L,I,v[x+6],we,76029189),I=h(I,w,T,L,v[x+9],cr,3654602809),L=h(L,I,w,T,v[x+12],$e,3873151461),T=h(T,L,I,w,v[x+15],Ke,530742520),w=h(w,T,L,I,v[x+2],we,3299628645),I=m(I,w,T,L,v[x+0],ti,4096336452),L=m(L,I,w,T,v[x+7],$a,1126891415),T=m(T,L,I,w,v[x+14],ut,2878612391),w=m(w,T,L,I,v[x+5],qo,4237533241),I=m(I,w,T,L,v[x+12],ti,1700485571),L=m(L,I,w,T,v[x+3],$a,2399980690),T=m(T,L,I,w,v[x+10],ut,4293915773),w=m(w,T,L,I,v[x+1],qo,2240044497),I=m(I,w,T,L,v[x+8],ti,1873313359),L=m(L,I,w,T,v[x+15],$a,4264355552),T=m(T,L,I,w,v[x+6],ut,2734768916),w=m(w,T,L,I,v[x+13],qo,1309151649),I=m(I,w,T,L,v[x+4],ti,4149444226),L=m(L,I,w,T,v[x+11],$a,3174756917),T=m(T,L,I,w,v[x+2],ut,718787259),w=m(w,T,L,I,v[x+9],qo,3951481745),I=t(I,_),w=t(w,$),T=t(T,N),L=t(L,G);var Mo=b(I)+b(w)+b(T)+b(L);return Mo.toLowerCase()}var $v=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}.expanding-action--fill{padding-inline:var(--zn-spacing-medium);padding-bottom:var(--zn-spacing-2x-small);position:absolute;top:0;left:auto;right:0;bottom:0;background-color:rgb(var(--zn-panel));width:0;transition:width var(--zn-transition-slow) cubic-bezier(0.62,0.16,0.13,1.01),opacity var(--zn-transition-slow) cubic-bezier(0.62,0.16,0.13,1.01),display var(--zn-transition-slow) ease-in-out allow-discrete}@starting-style {.expanding-action--fill.expanding-action--open{width:0}}.expanding-action--fill.expanding-action--open{display:flex;flex-direction:row;align-items:center;gap:10px;height:100%;width:min(100%,800px);overflow:hidden;z-index:100;max-width:800px}.expanding-action--fill.expanding-action--open::before{content:"";position:absolute;left:calc(var(--zn-spacing-medium) * -1);right:calc(var(--zn-spacing-medium) * -1);bottom:6px;background-color:rgb(var(--zn-primary));height:2px}.expanding-action--fill.expanding-action--open>zn-icon{display:block;color:rgb(var(--zn-primary))}.expanding-action--fill.expanding-action--closed{display:none;opacity:0}@starting-style {.expanding-action--fill .expanding-action__content{opacity:0}}.expanding-action--fill .expanding-action__content{opacity:1;width:100%;display:flex;flex-direction:column;justify-content:center;padding:0}.expanding-action--drop,.expanding-action--drop .expanding-action__dropdown,.expanding-action--drop .expanding-action__dropdown zn-button[slot=trigger]{height:100%}.expanding-action--drop .expanding-action__frame ::-webkit-scrollbar{width:5px;height:5px}.expanding-action--drop .expanding-action__frame{}.expanding-action--drop .expanding-action__frame ::-webkit-scrollbar-track{background:transparent}.expanding-action--drop .expanding-action__frame{}.expanding-action--drop .expanding-action__frame ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}.expanding-action--drop .expanding-action__frame{}.expanding-action--drop .expanding-action__frame ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}.expanding-action--drop .expanding-action__frame{--expanding-action-trigger-width:36px;position:relative;display:flex;flex-direction:column;min-width:300px;width:var(--expanding-action-basis,var(--zn-container-smp,320px));max-width:80vw;max-height:var(--expanding-action-max-height,var(--auto-size-available-height,80vh));background-color:rgb(var(--zn-panel));box-shadow:0 8px 16px -6px rgba(33,33,33,0.18);border:solid 1px rgb(var(--zn-border-color));border-radius:var(--zn-border-radius) 0 var(--zn-border-radius) var(--zn-border-radius);padding:0;height:100%}.expanding-action--drop .expanding-action__frame::before{content:"";position:absolute;top:-1px;left:calc(100% - var(--expanding-action-trigger-width) + 2px);right:0;z-index:1;height:2px;background:rgb(var(--zn-panel))}.expanding-action--drop .expanding-action__content{flex:1 1 auto;min-height:0;overflow-y:auto;border-radius:inherit}:host([data-trigger-side=left]) .expanding-action--drop .expanding-action__frame{border-radius:0 var(--zn-border-radius) var(--zn-border-radius) var(--zn-border-radius)}:host([data-trigger-side=left]) .expanding-action--drop .expanding-action__frame::before{left:0;right:calc(100% - var(--expanding-action-trigger-width) + 2px)}:host([open]) .expanding-action__dropdown zn-button[slot=trigger]{position:relative;z-index:calc(var(--zn-z-index-dropdown) + 1)}:host([open]) .expanding-action__dropdown zn-button[slot=trigger]::before{content:"";position:absolute;inset:0;z-index:-1;height:41px;background:rgb(var(--zn-panel));border:solid 1px rgb(var(--zn-border-color));border-bottom-color:rgb(var(--zn-panel));border-radius:var(--zn-border-radius) var(--zn-border-radius) 0 0}:host([open]) .expanding-action__dropdown zn-button[slot=trigger]::part(base):hover,:host([open]) .expanding-action__dropdown zn-button[slot=trigger]::part(base):active{background:transparent}`;var He=class extends C{constructor(){super();this.method="drop";this.prefetch=!1;this.basis="300";this.open=!1;this.fetchStyle="";this.noPrefetch=!1;this._knownUri=new Map;this._actions=[];this._preload=!0;this._metaObserved=!1;this._countObserver=new Lt(this,{target:null,config:{subtree:!0,attributes:!0,attributeFilter:["content"],childList:!0},callback:()=>{let r=Rt("app-content",this,"")[0]?.shadowRoot?.querySelector('meta[name="count"]');if(!r)return;let n=r.getAttribute("content"),a=this.shadowRoot?.querySelector(".expanding-action__dropdown zn-button");n&&a&&a.setAttribute("notification",n)}});this._colorObserver=new Lt(this,{target:null,config:{subtree:!0,attributes:!0,attributeFilter:["content"],childList:!0},callback:()=>{let r=Rt("app-content",this,"")[0]?.shadowRoot?.querySelector('meta[name="color"]');if(!r)return;let n=r.getAttribute("content");n&&(this.color=n)}});this.handleIconClicked=()=>{this.open=!this.open};this.handleIconCloseClicked=()=>{this.open=!1};this._updateTriggerSide=()=>{let t=this.shadowRoot?.querySelector('.expanding-action__dropdown zn-button[slot="trigger"]'),r=this.shadowRoot?.querySelector("#content");if(!t||!r)return;let n=t.getBoundingClientRect(),a=r.getBoundingClientRect();if(a.width===0)return;let s=(n.left+n.right)/2,l=(a.left+a.right)/2;this.setAttribute("data-trigger-side",s>l?"right":"left")};this._panels=new Map}async connectedCallback(){super.connectedCallback(),this.masterId||(this.masterId=Math.floor(Math.random()*1e6).toString()),this._preload=!this.noPrefetch,await this.updateComplete,this._panel=this.shadowRoot?.querySelector("#content")}firstUpdated(t){super.firstUpdated(t),setTimeout(()=>{this._registerActions()},10),this.contextUri&&setTimeout(()=>{this.fetchContextHeaders().then(r=>r)},10)}_observeMetaData(){if(this._metaObserved)return;let r=Rt("app-content",this,"")[0]?.shadowRoot;r&&(this._countObserver.observe(r),this._colorObserver.observe(r),this._metaObserved=!0)}_registerActions(){Rt("[action-uri]",this,"zn-expanding-action").forEach(t=>{t.getAttribute("action-uri")===""&&(t.setAttribute("action",""),t.removeAttribute("action-uri")),this._addAction(t)})}_addAction(t){this._actions.includes(t)||(this._actions.push(t),this._preload&&t.addEventListener("mouseover",this.fetchUri.bind(this,t)),t.addEventListener("click",this._handleClick.bind(this)))}_uriToId(t){return"action-"+od(t).substr(0,8)+"-"+this.masterId}_handleClick(t){let r=t.relatedTarget??t.target;r&&this.clickAction(r)}_createUriPanel(t,r,n){if(t.hasAttribute("action")||t.setAttribute("action",n),this._knownUri.has(r)||this._knownUri.set(r,n),this._panels.has(n)&&this._panels.get(n)!==void 0)return this._panels.get(n)[0];let a=document.createElement("div");return a.setAttribute("id",n),this.fetchStyle!==""&&a.setAttribute("data-fetch-style",this.fetchStyle),a.setAttribute("data-self-uri",r),a.setAttribute("data-fetch-style","expanding-action"),a.textContent="Loading ...",this._panel instanceof HTMLElement&&(this._panel.appendChild(a),this._panels.set(n,[a])),document.dispatchEvent(new CustomEvent("zn-new-element",{detail:{element:a,source:t}})),a}fetchUri(t){if(!t.hasAttribute("action")&&t.hasAttribute("action-uri")){let r=t.getAttribute("action-uri")??"";this._createUriPanel(t,r,this._uriToId(r)),this._observeMetaData()}}async fetchContextHeaders(){try{let t=await fetch(this.contextUri,{credentials:"same-origin",method:"head",headers:{"x-requested-with":"XMLHttpRequest"}}),r=t.headers.get("x-kubex-count");r&&(this.count=r);let n=t.headers.get("x-kubex-color");n&&(this.color=n)}catch{}}clickAction(t){this.fetchUri(t)}_observePlacement(){let r=this.shadowRoot?.querySelector(".expanding-action__dropdown")?.shadowRoot?.querySelector(".dropdown");if(!r){requestAnimationFrame(()=>this._observePlacement());return}this._updateTriggerSide(),!this._placementObserver&&(this._placementObserver=new MutationObserver(this._updateTriggerSide),this._placementObserver.observe(r,{attributes:!0,attributeFilter:["data-current-placement"]}))}disconnectedCallback(){super.disconnectedCallback(),this._placementObserver?.disconnect(),this._placementObserver=void 0}render(){return u`
|
|
1514
1514
|
${this.method==="fill"?u`
|
|
1515
1515
|
<zn-button class="expanding-action__button"
|
|
1516
1516
|
@click="${this.handleIconClicked}"
|
|
@@ -1554,7 +1554,7 @@ import{a as En,b as E_,c as pr,d as c,e as B}from"./chunks/zn.UBLZO6CI.js";var b
|
|
|
1554
1554
|
@click="${this.handleIconCloseClicked}"
|
|
1555
1555
|
icon="close"
|
|
1556
1556
|
icon-size="20">
|
|
1557
|
-
</zn-button>`}};Fe.styles=E($v),c([p()],Fe.prototype,"icon",2),c([p()],Fe.prototype,"method",2),c([p({attribute:"context-uri",reflect:!0})],Fe.prototype,"contextUri",2),c([p({reflect:!0})],Fe.prototype,"count",2),c([p({reflect:!0})],Fe.prototype,"color",2),c([p({type:Boolean})],Fe.prototype,"prefetch",2),c([p()],Fe.prototype,"basis",2),c([p({attribute:"max-height"})],Fe.prototype,"maxHeight",2),c([p({reflect:!0,type:Boolean})],Fe.prototype,"open",2),c([p({attribute:"master-id",reflect:!0})],Fe.prototype,"masterId",2),c([p({attribute:"fetch-style",type:String,reflect:!0})],Fe.prototype,"fetchStyle",2),c([p({attribute:"no-prefetch",type:Boolean,reflect:!0})],Fe.prototype,"noPrefetch",2);var ru=Fe;Fe.define("zn-expanding-action");var Av=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:contents;height:100%}`;var Uo=class extends C{constructor(){super(...arguments);this.selected=!1}render(){return u`<slot></slot>`}};Uo.styles=E(Av),c([p()],Uo.prototype,"caption",2),c([p({type:Number})],Uo.prototype,"priority",2),c([p()],Uo.prototype,"uri",2),c([p({type:Boolean,reflect:!0})],Uo.prototype,"selected",2);var ou=Uo;Uo.define("zn-tab");var id="zntab:",P3=["reload","back_forward"],H3="__znTabsVisit",qv="__znTabs",nu=new Set,Lv=0;function iu(){try{return window.sessionStorage}catch{return null}}function ul(){return window.location.pathname+window.location.search}function F3(){return window.performance?.getEntriesByType("navigation")?.[0]?.type??""}function ad(i){return`${i}@${ul()}`}function Mv(){return id+ad(H3)}function au(){return iu()?.getItem(Mv())??""}function B3(){let i=iu();i===null||au()!==""||(Lv+=1,i.setItem(Mv(),`${Date.now()}-${Lv}`))}function sd(){let i=iu();if(i===null)return;let o=`@${ul()}`;for(let t=i.length-1;t>=0;t--){let r=i.key(t);r!==null&&r.startsWith(id)&&!r.endsWith(o)&&i.removeItem(r)}}P3.includes(F3())&&nu.add(ul());sd();window.addEventListener("popstate",()=>{nu.add(ul()),sd()},{passive:!0});function Iv(){return nu.has(ul())}function nd(i){return i!==null&&typeof i=="object"?i:null}function Dv(){let i=nd(window.history.state),o=i===null?null:nd(i[qv]),t=o===null?null:nd(o.tabs);return o===null||t===null||typeof o.visit!="string"?null:{visit:o.visit,tabs:t}}function su(i){if(!i)return null;let o=au(),t=Dv();if(o===""||t===null||t.visit!==o)return null;let r=t.tabs[i];return typeof r=="string"?r:null}function Nv(i,o,t){B3();let r=au();if(!i||r==="")return;let n=Dv(),a=n!==null&&n.visit===r?n.tabs:{};if(!t&&a[i]===o)return;let s={...nd(window.history.state),[qv]:{visit:r,tabs:{...a,[i]:o}}};t?window.history.pushState(s,"",window.location.href):window.history.replaceState(s,"")}function Rv(i,o){Nv(i,o,!0)}function Ov(i,o){Nv(i,o,!1)}var Pv=S`@charset "UTF-8";@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:root,[t=light],.theme-light{color-scheme:light;--zn-color-gray-100:hsl(240,13%,95%);--zn-color-gray-300:hsl(260,21%,89%);--zn-color-gray-400:hsl(251,17%,76%);--zn-color-gray-500:hsl(254,17%,66%);--zn-color-gray-800:hsl(259,13%,42%);--zn-color-gray-900:hsl(262,12%,35%);--zn-color-red-500:hsl(0 84.2% 60.2%);--zn-color-red-600:hsl(0 72.2% 50.6%);--zn-color-orange-500:hsl(24.6 95% 53.1%);--zn-color-amber-400:hsl(43.3 96.4% 56.3%);--zn-color-yellow-400:hsl(51,100%,53%);--zn-color-green-500:hsl(142.1 70.6% 45.3%);--zn-color-blue-500:hsl(217.2 91.2% 59.8%);--zn-color-indigo-400:hsl(234.5 89.5% 73.9%);--zn-color-indigo-500:hsl(238.7 83.5% 66.7%);--zn-color-violet-500:hsl(258.3 89.5% 66.3%);--zn-color-violet-600:hsl(262.1 83.3% 57.8%);--zn-color-purple-50:hsl(249,100%,97%);--zn-color-purple-100:hsl(245,100%,95%);--zn-color-purple-200:hsl(244,100%,92%);--zn-color-purple-600:hsl(256,91%,59%);--zn-color-pink-400:hsl(328.6 85.5% 70.2%);--zn-color-pink-500:hsl(330.4 81.2% 60.4%);--zn-color-primary-50:var(--zn-color-purple-50);--zn-color-primary-100:var(--zn-color-purple-100);--zn-color-primary-200:var(--zn-color-purple-200);--zn-color-primary-300:hsl(246,100%,85%);--zn-color-primary-400:hsl(249,100%,76%);--zn-color-primary-500:hsl(252,98%,66%);--zn-color-primary-600:var(--zn-color-purple-600);--zn-color-primary-700:hsl(257,76%,50%);--zn-color-primary-800:hsl(257,76%,42%);--zn-color-primary-900:hsl(257,73%,35%);--zn-color-success-50:hsl(138.5 76.5% 96.7%);--zn-color-success-200:rgb(var(--zn-green));--zn-color-success-300:hsl(141.7 76.6% 73.1%);--zn-color-success-400:hsl(141.9 69.2% 58%);--zn-color-success-500:var(--zn-color-green-500);--zn-color-success-600:hsl(142.1 76.2% 36.3%);--zn-color-success-700:hsl(142.4 71.8% 29.2%);--zn-color-warning-50:hsl(48 100% 96.1%);--zn-color-warning-400:var(--zn-color-amber-400);--zn-color-warning-500:hsl(37.7 92.1% 50.2%);--zn-color-warning-600:hsl(32.1 94.6% 43.7%);--zn-color-danger-50:hsl(0 85.7% 97.3%);--zn-color-danger-100:rgb(var(--zn-red));--zn-color-danger-200:rgb(var(--zn-red));--zn-color-danger-300:hsl(0 93.5% 81.8%);--zn-color-danger-500:var(--zn-color-red-500);--zn-color-danger-600:var(--zn-color-red-600);--zn-color-danger-700:rgb(var(--zn-red));--zn-color-danger-800:hsl(0 70% 35.3%);--zn-color-neutral-50:hsl(255,33%,98%);--zn-color-neutral-100:var(--zn-color-gray-100);--zn-color-neutral-200:hsl(255,12%,94%);--zn-color-neutral-300:var(--zn-color-gray-300);--zn-color-neutral-400:var(--zn-color-gray-400);--zn-color-neutral-500:var(--zn-color-gray-500);--zn-color-neutral-600:hsl(258,15%,58%);--zn-color-neutral-700:hsl(259,13%,54%);--zn-color-neutral-800:var(--zn-color-gray-800);--zn-color-neutral-900:var(--zn-color-gray-900);--zn-color-neutral-0:hsl(0,0%,100%);--zn-color-neutral-1000:hsl(0,0%,0%);--zn-border-radius:6px;--zn-border-radius-small:2px;--zn-border-radius-x-large:var(--zn-border-radius);--zn-border-radius-circle:50%;--zn-border-radius-pill:9999px;--zn-shadow-x-small:0 1px 4px rgba(0,0,0,0.10);--zn-shadow-small:0 3px 9px rgba(0,0,0,0.15);--zn-shadow-medium:0 6px 18px rgba(0,0,0,0.15);--zn-shadow-large:0 6px 20px rgba(0,0,0,0.15);--zn-shadow-x-large:0 6px 20px rgba(0,0,0,0.25);--zn-container:var(--zn-container-hd);--zn-container-default:100%;--zn-container-sm:360px;--zn-container-smp:480px;--zn-container-ph:600px;--zn-container-md:768px;--zn-container-lg:1100px;--zn-container-hd:1400px;--zn-container-3k:1960px;--zn-container-4k:2560px;--zn-transition-x-slow:1000ms;--zn-transition-slow:500ms;--zn-transition-medium:250ms;--zn-transition-fast:150ms;--zn-transition-x-fast:50ms;--zn-gap:var(--zn-base-gap,var(--zn-spacing-medium,4px));--zn-font-mono:'Roboto Mono',SFMono-Regular,Consolas,'Liberation Mono',Menlo,monospace;--zn-font-sans:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol';--zn-font-serif:'Roboto Slab',Georgia,'Times New Roman',serif;--zn-font-size-2x-small:0.625rem;--zn-font-size-x-small:0.75rem;--zn-font-size-small:0.929rem;--zn-font-size-medium:1rem;--zn-font-size-large:1.15rem;--zn-font-size-x-large:1.25rem;--zn-font-size-2x-large:2.25rem;--zn-font-size-3x-large:3rem;--zn-font-size-4x-large:4.5rem;--zn-font-weight-light:300;--zn-font-weight-normal:400;--zn-font-weight-medium:500;--zn-font-weight-semibold:600;--zn-font-weight-bold:700;--zn-letter-spacing-normal:normal;--zn-letter-spacing-loose:0.5px;--zn-line-height-denser:1;--zn-line-height-dense:1.5;--zn-line-height-normal:2;--zn-line-height-loose:2.5;--zn-line-height-looser:3;--zn-focus-ring-color:var(--zn-color-primary-600);--zn-focus-ring-style:solid;--zn-focus-ring-width-x-small:1px;--zn-focus-ring-width:3px;--zn-focus-ring:var(--zn-focus-ring-style) var(--zn-focus-ring-width) var(--zn-focus-ring-color);--zn-focus-ring-offset:1px;--zn-input-height-x-small:24px;--zn-input-height-small:30px;--zn-input-height-medium:36px;--zn-input-height-large:40px;--zn-input-background-color:var(--zn-color-neutral-50);--zn-input-background-color-hover:var(--zn-color-neutral-100);--zn-input-background-color-focus:var(--zn-color-neutral-100);--zn-input-background-color-disabled:var(--zn-color-neutral-400);--zn-input-border-color:var(--zn-color-neutral-300);--zn-input-border-color-hover:var(--zn-color-neutral-400);--zn-input-border-color-focus:var(--zn-color-primary-500);--zn-input-border-color-disabled:var(--zn-color-neutral-300);--zn-input-border-width:1px;--zn-input-required-content:'*';--zn-input-required-content-offset:-2px;--zn-input-required-content-color:var(--zn-input-label-color);--zn-input-border-radius-x-small:var(--zn-border-radius);--zn-input-border-radius-small:var(--zn-border-radius);--zn-input-border-radius-medium:var(--zn-border-radius);--zn-input-border-radius-large:var(--zn-border-radius);--zn-input-font-family:var(--zn-font-sans);--zn-input-font-weight:var(--zn-text-input-content-font-weight);--zn-input-font-size-x-small:var(--zn-font-size-x-small);--zn-input-font-size-small:var(--zn-font-size-small);--zn-input-font-size-medium:var(--zn-text-input-content-font-size);--zn-input-font-size-large:var(--zn-font-size-large);--zn-input-line-height:var(--zn-text-input-content-line-height);--zn-input-letter-spacing:var(--zn-letter-spacing-normal);--zn-input-color:var(--zn-text-input-content-color);--zn-input-color-hover:var(--zn-color-neutral-800);--zn-input-color-focus:var(--zn-color-neutral-700);--zn-input-color-disabled:var(--zn-color-neutral-800);--zn-input-icon-color:var(--zn-color-neutral-500);--zn-input-icon-color-hover:var(--zn-color-neutral-600);--zn-input-icon-color-focus:var(--zn-color-neutral-600);--zn-input-placeholder-color:var(--zn-text-input-placeholder-color);--zn-input-placeholder-color-disabled:var(--zn-color-neutral-600);--zn-input-spacing-small:var(--zn-spacing-small);--zn-input-spacing-medium:var(--zn-spacing-medium);--zn-input-spacing-large:var(--zn-spacing-large);--zn-input-focus-ring-color:hsl(256 91% 59%/40%);--zn-input-focus-ring-offset:0;--zn-input-label-font-size-small:var(--zn-font-size-small);--zn-input-label-font-size-medium:var(--zn-text-input-label-font-size);--zn-input-label-font-size-large:var(--zn-font-size-large);--zn-input-label-font-weight:var(--zn-text-input-label-font-weight);--zn-input-label-line-height:var(--zn-text-input-label-line-height);--zn-input-label-color:var(--zn-text-input-label-color);--zn-input-help-text-font-size-small:var(--zn-font-size-x-small);--zn-input-help-text-font-size-medium:var(--zn-font-size-small);--zn-input-help-text-font-size-large:var(--zn-font-size-medium);--zn-input-help-text-color:var(--zn-color-neutral-500);--zn-toggle-size-small:0.875rem;--zn-toggle-size-medium:1.125rem;--zn-toggle-size-large:1.375rem;--zn-overlay-background-color:hsl(none 0% 0%/0.7);--zn-panel-background-color:var(--zn-color-neutral-0);--zn-panel-border-color:var(--zn-color-neutral-200);--zn-panel-border-width:1px;--zn-tooltip-border-radius:var(--zn-border-radius);--zn-tooltip-background-color:var(--zn-color-neutral-900);--zn-tooltip-color:var(--zn-color-neutral-0);--zn-tooltip-font-family:var(--zn-font-sans);--zn-tooltip-font-weight:var(--zn-font-weight-normal);--zn-tooltip-font-size:var(--zn-font-size-small);--zn-tooltip-line-height:var(--zn-line-height-dense);--zn-tooltip-padding:var(--zn-spacing-x-small) var(--zn-spacing-small);--zn-tooltip-arrow-size:6px;--zn-z-index-page-nav:500;--zn-z-index-drawer:700;--zn-z-index-dialog:800;--zn-z-index-dropdown:900;--zn-z-index-toast:950;--zn-z-index-tooltip:1000;--zn-z-index-editor-action:1000000;--zn-table-header-background-color:252,251,254}[t=dark],.theme-dark{color-scheme:dark;--zn-color-gray-50:hsl(258,15%,23%);--zn-color-gray-100:hsl(262,12%,35%);--zn-color-gray-200:hsl(259,13%,42%);--zn-color-gray-300:hsl(259,13%,54%);--zn-color-gray-400:hsl(258,15%,58%);--zn-color-gray-500:hsl(254,17%,66%);--zn-color-gray-600:hsl(251,17%,76%);--zn-color-gray-700:hsl(260,21%,89%);--zn-color-gray-800:hsl(255,12%,94%);--zn-color-gray-900:hsl(240,13%,95%);--zn-color-gray-950:hsl(255,33%,98%);--zn-color-red-50:hsl(0 56% 23.9%);--zn-color-red-100:hsl(0.6 60% 33.9%);--zn-color-red-200:hsl(0.9 67.2% 37.1%);--zn-color-red-300:hsl(1.1 71.3% 43.7%);--zn-color-red-400:hsl(1 76% 52.5%);--zn-color-red-500:hsl(0.7 89.6% 57.2%);--zn-color-red-600:hsl(0 98.6% 67.9%);--zn-color-red-700:hsl(0 100% 72.3%);--zn-color-red-800:hsl(0 100% 85.6%);--zn-color-red-900:hsl(0 100% 90.3%);--zn-color-red-950:hsl(0 100% 95.9%);--zn-color-orange-50:hsl(15 64.2% 23.3%);--zn-color-orange-100:hsl(15.1 70.9% 31.1%);--zn-color-orange-200:hsl(15.3 75.7% 35.5%);--zn-color-orange-300:hsl(17.1 83.5% 42.7%);--zn-color-orange-400:hsl(20.1 88% 50.8%);--zn-color-orange-500:hsl(24.3 100% 50.5%);--zn-color-orange-600:hsl(27.2 100% 57.7%);--zn-color-orange-700:hsl(31.3 100% 68.7%);--zn-color-orange-800:hsl(33.8 100% 79.3%);--zn-color-orange-900:hsl(38.9 100% 87.7%);--zn-color-orange-950:hsl(46.2 100% 95%);--zn-color-amber-50:hsl(21.9 66.3% 21.1%);--zn-color-amber-100:hsl(21.5 73.6% 29.7%);--zn-color-amber-200:hsl(22.3 77.6% 33.3%);--zn-color-amber-300:hsl(25.4 84.2% 39.6%);--zn-color-amber-400:hsl(31.4 87.4% 46.7%);--zn-color-amber-500:hsl(37 96.6% 48.3%);--zn-color-amber-600:hsl(43.3 100% 53.4%);--zn-color-amber-700:hsl(46.5 100% 61.1%);--zn-color-amber-800:hsl(49.3 100% 73%);--zn-color-amber-900:hsl(51.8 100% 85%);--zn-color-amber-950:hsl(60 100% 94.6%);--zn-color-yellow-50:hsl(34,86%,14%);--zn-color-yellow-100:hsl(36,74%,26%);--zn-color-yellow-200:hsl(40,82%,29%);--zn-color-yellow-300:hsl(43,94%,33%);--zn-color-yellow-400:hsl(48,98%,40%);--zn-color-yellow-500:hsl(53,95%,47%);--zn-color-yellow-600:hsl(51,100%,53%);--zn-color-yellow-700:hsl(54,100%,63%);--zn-color-yellow-800:hsl(61,100%,77%);--zn-color-yellow-900:hsl(63,100%,88%);--zn-color-yellow-950:hsl(63,92%,95%);--zn-color-lime-50:hsl(86.5 54.4% 18%);--zn-color-lime-100:hsl(87.6 56.8% 23.3%);--zn-color-lime-200:hsl(85.8 63.2% 24.5%);--zn-color-lime-300:hsl(86.1 72% 29.4%);--zn-color-lime-400:hsl(85.5 76.8% 37.3%);--zn-color-lime-500:hsl(84.3 74.2% 42.1%);--zn-color-lime-600:hsl(82.8 81.5% 52.6%);--zn-color-lime-700:hsl(82 89.9% 64%);--zn-color-lime-800:hsl(80.9 97.9% 76.6%);--zn-color-lime-900:hsl(77.9 100% 85.8%);--zn-color-lime-950:hsl(69.5 100% 93.8%);--zn-color-green-50:hsl(144.3 53.6% 16%);--zn-color-green-100:hsl(143.2 55.4% 23.5%);--zn-color-green-200:hsl(141.5 58.2% 26.3%);--zn-color-green-300:hsl(140.8 64.2% 31.8%);--zn-color-green-400:hsl(140.3 68% 39.2%);--zn-color-green-500:hsl(141.1 64.9% 43%);--zn-color-green-600:hsl(141.6 72.4% 55.2%);--zn-color-green-700:hsl(141.7 82.7% 70.1%);--zn-color-green-800:hsl(141 90.9% 82.1%);--zn-color-green-900:hsl(142 100% 89.1%);--zn-color-green-950:hsl(144 100% 95.5%);--zn-color-emerald-50:hsl(164.3 75% 13.5%);--zn-color-emerald-100:hsl(163.5 72.6% 20.1%);--zn-color-emerald-200:hsl(162.1 73.7% 22.4%);--zn-color-emerald-300:hsl(161.3 77.3% 27.6%);--zn-color-emerald-400:hsl(159.6 77.1% 34.3%);--zn-color-emerald-500:hsl(159.1 73.5% 37.9%);--zn-color-emerald-600:hsl(157.8 66.8% 48.9%);--zn-color-emerald-700:hsl(156.2 76.1% 63.8%);--zn-color-emerald-800:hsl(152.4 84.4% 77.4%);--zn-color-emerald-900:hsl(149.3 100% 87%);--zn-color-emerald-950:hsl(158.6 100% 94.8%);--zn-color-teal-50:hsl(176.5 51.5% 15.4%);--zn-color-teal-100:hsl(175.9 54.7% 22.3%);--zn-color-teal-200:hsl(175.9 60.7% 23.9%);--zn-color-teal-300:hsl(174.5 67.3% 28.8%);--zn-color-teal-400:hsl(174.4 71.9% 34.9%);--zn-color-teal-500:hsl(173.1 71% 38.3%);--zn-color-teal-600:hsl(172.3 68.2% 48.1%);--zn-color-teal-700:hsl(170.5 81.3% 61.5%);--zn-color-teal-800:hsl(168.4 92.1% 75.2%);--zn-color-teal-900:hsl(168.3 100% 86%);--zn-color-teal-950:hsl(180 100% 95.5%);--zn-color-cyan-50:hsl(197.1 53.8% 20.3%);--zn-color-cyan-100:hsl(196.8 57.3% 27.2%);--zn-color-cyan-200:hsl(195.3 62.7% 29.4%);--zn-color-cyan-300:hsl(193.5 71.3% 34.1%);--zn-color-cyan-400:hsl(192.5 76.8% 40.6%);--zn-color-cyan-500:hsl(189.4 78.6% 42.6%);--zn-color-cyan-600:hsl(188.2 89.1% 51.7%);--zn-color-cyan-700:hsl(187 98.6% 66.2%);--zn-color-cyan-800:hsl(184.9 100% 78.3%);--zn-color-cyan-900:hsl(180 100% 86.6%);--zn-color-cyan-950:hsl(180 100% 94.8%);--zn-color-sky-50:hsl(203 63.8% 20.9%);--zn-color-sky-100:hsl(203.4 70.4% 28%);--zn-color-sky-200:hsl(202.7 75.8% 30.8%);--zn-color-sky-300:hsl(203.1 80.4% 36.1%);--zn-color-sky-400:hsl(202.1 80.5% 44.3%);--zn-color-sky-500:hsl(199.7 85.9% 47.7%);--zn-color-sky-600:hsl(198.7 97.9% 57.2%);--zn-color-sky-700:hsl(198.7 100% 70.5%);--zn-color-sky-800:hsl(198.8 100% 82.5%);--zn-color-sky-900:hsl(198.5 100% 89.9%);--zn-color-sky-950:hsl(186 100% 95.5%);--zn-color-blue-50:hsl(227.1 49.5% 22.7%);--zn-color-blue-100:hsl(225.8 58.9% 36.8%);--zn-color-blue-200:hsl(227.7 64.4% 42.9%);--zn-color-blue-300:hsl(226.1 72.7% 51.2%);--zn-color-blue-400:hsl(222.6 86.5% 56.3%);--zn-color-blue-500:hsl(217.8 95.8% 57.4%);--zn-color-blue-600:hsl(213.3 100% 65%);--zn-color-blue-700:hsl(210.9 100% 74.8%);--zn-color-blue-800:hsl(211.5 100% 83.4%);--zn-color-blue-900:hsl(211 100% 88.9%);--zn-color-blue-950:hsl(201.8 100% 95.3%);--zn-color-indigo-50:hsl(243.5 40.8% 27%);--zn-color-indigo-100:hsl(242.9 45.7% 37.6%);--zn-color-indigo-200:hsl(244.7 52.7% 43.1%);--zn-color-indigo-300:hsl(245.3 60.5% 52.4%);--zn-color-indigo-400:hsl(244.1 79.2% 60.4%);--zn-color-indigo-500:hsl(239.6 88.7% 63.8%);--zn-color-indigo-600:hsl(234.5 96.7% 70.9%);--zn-color-indigo-700:hsl(229.4 100% 78.3%);--zn-color-indigo-800:hsl(227.1 100% 85%);--zn-color-indigo-900:hsl(223.8 100% 89.9%);--zn-color-indigo-950:hsl(220 100% 95.1%);--zn-color-violet-50:hsl(265.1 57.3% 25.4%);--zn-color-violet-100:hsl(263.5 63.8% 39.4%);--zn-color-violet-200:hsl(263.4 66.2% 44.1%);--zn-color-violet-300:hsl(263.7 72.8% 52.4%);--zn-color-violet-400:hsl(262.5 87.3% 59.8%);--zn-color-violet-500:hsl(258.3 95.1% 63.2%);--zn-color-violet-600:hsl(255.1 100% 67.2%);--zn-color-violet-700:hsl(253 100% 81.5%);--zn-color-violet-800:hsl(251.7 100% 87.9%);--zn-color-violet-900:hsl(254.1 100% 91.7%);--zn-color-violet-950:hsl(257.1 100% 96.1%);--zn-color-purple-50:hsl(255,79%,23%);--zn-color-purple-100:hsl(257,73%,35%);--zn-color-purple-200:hsl(257,76%,42%);--zn-color-purple-300:hsl(257,76%,50%);--zn-color-purple-400:hsl(256,91%,59%);--zn-color-purple-500:hsl(252,98%,66%);--zn-color-purple-600:hsl(249,100%,76%);--zn-color-purple-700:hsl(246,100%,85%);--zn-color-purple-800:hsl(244,100%,92%);--zn-color-purple-900:hsl(245,100%,95%);--zn-color-purple-950:hsl(249,100%,97%);--zn-color-fuchsia-50:hsl(297.1 51.2% 18.6%);--zn-color-fuchsia-100:hsl(296.7 59.5% 31.5%);--zn-color-fuchsia-200:hsl(295.4 65.4% 35.1%);--zn-color-fuchsia-300:hsl(294.6 67.4% 42.2%);--zn-color-fuchsia-400:hsl(293.3 68.7% 51.2%);--zn-color-fuchsia-500:hsl(292.1 88.4% 57.7%);--zn-color-fuchsia-600:hsl(292 98.5% 59.5%);--zn-color-fuchsia-700:hsl(292.4 100% 79.5%);--zn-color-fuchsia-800:hsl(292.9 100% 86.8%);--zn-color-fuchsia-900:hsl(300 100% 91.5%);--zn-color-fuchsia-950:hsl(300 100% 96.3%);--zn-color-pink-50:hsl(336.2 59.6% 20%);--zn-color-pink-100:hsl(336.8 63.9% 34%);--zn-color-pink-200:hsl(336.8 68.7% 37.6%);--zn-color-pink-300:hsl(336.1 71.8% 44.5%);--zn-color-pink-400:hsl(333.9 74.9% 53.1%);--zn-color-pink-500:hsl(330.7 86.3% 57.7%);--zn-color-pink-600:hsl(328.6 91.5% 67.2%);--zn-color-pink-700:hsl(327.4 97.6% 78.7%);--zn-color-pink-800:hsl(325.1 100% 86.6%);--zn-color-pink-900:hsl(322.1 100% 91.3%);--zn-color-pink-950:hsl(315 100% 95.9%);--zn-color-rose-50:hsl(342.3 62.9% 21.5%);--zn-color-rose-100:hsl(342.8 68.9% 34.2%);--zn-color-rose-200:hsl(344.8 72.6% 37.3%);--zn-color-rose-300:hsl(346.9 75.8% 43.7%);--zn-color-rose-400:hsl(348.2 80.1% 52.7%);--zn-color-rose-500:hsl(350.4 94.8% 57.5%);--zn-color-rose-600:hsl(351.2 100% 58.1%);--zn-color-rose-700:hsl(352.3 100% 78.1%);--zn-color-rose-800:hsl(352 100% 86.2%);--zn-color-rose-900:hsl(354.5 100% 90.7%);--zn-color-rose-950:hsl(353.3 100% 95.7%);--zn-color-neutral-0:hsl(0,0%,0%);--zn-color-neutral-1000:hsl(0,0%,100%);--zn-shadow-x-small:0 1px 4px rgba(0,0,0,0.18);--zn-shadow-small:0 3px 9px rgba(0,0,0,0.24);--zn-shadow-medium:0 6px 18px rgba(0,0,0,0.24);--zn-shadow-large:0 6px 20px rgba(0,0,0,0.24);--zn-shadow-x-large:0 6px 20px rgba(0,0,0,0.34);--zn-input-background-color:rgb(var(--zn-color-body));--zn-input-background-color-hover:rgb(var(--zn-color-body));--zn-input-background-color-focus:hsl(252,15%,13%);--zn-input-background-color-disabled:hsl(280,6%,9%);--zn-input-border-color:rgb(var(--zn-color-border));--zn-input-border-color-hover:rgb(var(--zn-color-border-active));--zn-input-border-color-focus:var(--zn-color-primary-500);--zn-input-border-color-disabled:hsl(280,6%,9%);--zn-focus-ring-color:var(--zn-color-primary-700);--zn-overlay-background-color:hsl(0 0% 0%/43%);--zn-panel-background-color:rgb(var(--zn-panel));--zn-tooltip-background-color:var(--zn-color-neutral-800);--zn-table-header-background-color:27,27,30}[t=aura],.theme-aura{color-scheme:light;--zn-color-primary-50:hsl(258,100%,97%);--zn-color-primary-100:hsl(256,95%,94%);--zn-color-primary-200:hsl(255,90%,90%);--zn-color-primary-300:hsl(255,88%,83%);--zn-color-primary-400:hsl(256,85%,75%);--zn-color-primary-500:hsl(255,82%,68%);--zn-color-primary-600:hsl(256,78%,62%);--zn-color-primary-700:hsl(257,70%,54%);--zn-color-primary-800:hsl(258,68%,46%);--zn-color-primary-900:hsl(259,66%,38%);--zn-shadow-x-small:0 1px 4px rgba(60,44,110,0.08);--zn-shadow-small:0 3px 9px rgba(60,44,110,0.12);--zn-shadow-medium:0 6px 18px rgba(60,44,110,0.12);--zn-shadow-large:0 6px 20px rgba(60,44,110,0.14);--zn-shadow-x-large:0 6px 20px rgba(60,44,110,0.22);--zn-border-color:218,212,246;--zn-input-focus-ring-color:hsl(255 82% 68%/40%)}:root{--zn-spacing-unit:8px;--zn-spacing-3x-small:2px;--zn-spacing-2x-small:4px;--zn-spacing-x-small:8px;--zn-spacing-small:16px;--zn-spacing-medium:24px;--zn-spacing-large:32px;--zn-spacing-x-large:40px;--zn-spacing-2x-large:48px;--zn-spacing-3x-large:56px;--zn-spacing-4x-large:72px;--zn-spacing-narrow-bar:45px;--zn-spacing-bar:60px;--zn-spacing-tile:80px;--zn-spacing-sidenav:320px;--zn-spacing-small-panel:200px;--zn-spacing-medium-panel:320px;--zn-spacing-panel:360px;--zn-spacing-lside:460px}:root{--zn-text-color:rgb(var(--zn-color-text));--zn-text-color-muted:rgb(var(--zn-color-muted-text));--zn-text-paragraph-font-size:14px;--zn-text-paragraph-line-height:21px;--zn-text-paragraph-spacing:21px;--zn-text-paragraph-font-weight:var(--zn-font-weight-normal);--zn-text-paragraph-color:var(--zn-text-color);--zn-text-paragraph-transform:none;--zn-text-table-content-font-size:14px;--zn-text-table-content-line-height:16px;--zn-text-table-content-spacing:15px;--zn-text-table-content-font-weight:var(--zn-font-weight-normal);--zn-text-table-content-color:var(--zn-text-color);--zn-text-table-content-transform:none;--zn-text-chat-font-size:16px;--zn-text-chat-line-height:24px;--zn-text-chat-spacing:15px;--zn-text-chat-font-weight:var(--zn-font-weight-normal);--zn-text-chat-color:var(--zn-text-color);--zn-text-chat-transform:none;--zn-text-h1-font-size:16px;--zn-text-h1-line-height:16px;--zn-text-h1-spacing:18px;--zn-text-h1-font-weight:var(--zn-font-weight-semibold);--zn-text-h1-color:var(--zn-text-color);--zn-text-h1-transform:none;--zn-text-h2-font-size:14px;--zn-text-h2-line-height:16px;--zn-text-h2-spacing:15px;--zn-text-h2-font-weight:var(--zn-font-weight-semibold);--zn-text-h2-color:var(--zn-text-color);--zn-text-h2-transform:none;--zn-text-h3-font-size:11px;--zn-text-h3-line-height:16px;--zn-text-h3-spacing:15px;--zn-text-h3-font-weight:var(--zn-font-weight-semibold);--zn-text-h3-color:var(--zn-text-color);--zn-text-h3-transform:none;--zn-text-heading-section-font-size:14px;--zn-text-heading-section-line-height:16px;--zn-text-heading-section-spacing:15px;--zn-text-heading-section-font-weight:var(--zn-font-weight-semibold);--zn-text-heading-section-color:var(--zn-text-color);--zn-text-heading-section-transform:none;--zn-text-subheading-font-size:14px;--zn-text-subheading-line-height:16px;--zn-text-subheading-spacing:15px;--zn-text-subheading-font-weight:var(--zn-font-weight-normal);--zn-text-subheading-color:var(--zn-text-color-muted);--zn-text-subheading-transform:none;--zn-text-subheading-small-font-size:13px;--zn-text-subheading-small-line-height:16px;--zn-text-subheading-small-spacing:15px;--zn-text-subheading-small-font-weight:var(--zn-font-weight-normal);--zn-text-subheading-small-color:var(--zn-text-color-muted);--zn-text-subheading-small-transform:none;--zn-text-input-placeholder-font-size:14px;--zn-text-input-placeholder-line-height:24px;--zn-text-input-placeholder-spacing:18px;--zn-text-input-placeholder-font-weight:var(--zn-font-weight-normal);--zn-text-input-placeholder-color:var(--zn-text-color-muted);--zn-text-input-placeholder-transform:none;--zn-text-input-content-font-size:14px;--zn-text-input-content-line-height:24px;--zn-text-input-content-spacing:18px;--zn-text-input-content-font-weight:var(--zn-font-weight-normal);--zn-text-input-content-color:var(--zn-text-color);--zn-text-input-content-transform:none;--zn-text-input-label-font-size:14px;--zn-text-input-label-line-height:16px;--zn-text-input-label-spacing:15px;--zn-text-input-label-font-weight:var(--zn-font-weight-semibold);--zn-text-input-label-color:var(--zn-text-color);--zn-text-input-label-transform:none;--zn-text-chart-minor-font-size:14px;--zn-text-chart-minor-line-height:16px;--zn-text-chart-minor-spacing:15px;--zn-text-chart-minor-font-weight:var(--zn-font-weight-semibold);--zn-text-chart-minor-color:var(--zn-text-color-muted);--zn-text-chart-minor-transform:none;--zn-text-chart-major-font-size:21px;--zn-text-chart-major-line-height:24px;--zn-text-chart-major-spacing:18px;--zn-text-chart-major-font-weight:var(--zn-font-weight-normal);--zn-text-chart-major-color:var(--zn-text-color);--zn-text-chart-major-transform:none;--zn-text-button-label-font-size:13px;--zn-text-button-label-line-height:16px;--zn-text-button-label-spacing:18px;--zn-text-button-label-font-weight:var(--zn-font-weight-semibold);--zn-text-button-label-color:var(--zn-text-color);--zn-text-button-label-transform:uppercase;--zn-text-chip-font-size:10px;--zn-text-chip-line-height:16px;--zn-text-chip-spacing:15px;--zn-text-chip-font-weight:var(--zn-font-weight-semibold);--zn-text-chip-color:var(--zn-text-color);--zn-text-chip-transform:uppercase;--zn-text-navbar-link-font-size:16px;--zn-text-navbar-link-line-height:16px;--zn-text-navbar-link-spacing:18px;--zn-text-navbar-link-font-weight:var(--zn-font-weight-semibold);--zn-text-navbar-link-color:var(--zn-text-color-muted);--zn-text-navbar-link-transform:none;--zn-text-tab-link-font-size:14px;--zn-text-tab-link-line-height:16px;--zn-text-tab-link-spacing:15px;--zn-text-tab-link-font-weight:var(--zn-font-weight-semibold);--zn-text-tab-link-color:var(--zn-text-color-muted);--zn-text-tab-link-transform:none;--zn-text-tab-link-active-font-size:14px;--zn-text-tab-link-active-line-height:16px;--zn-text-tab-link-active-spacing:15px;--zn-text-tab-link-active-font-weight:var(--zn-font-weight-semibold);--zn-text-tab-link-active-color:var(--zn-text-color);--zn-text-tab-link-active-transform:none;--zn-text-menu-link-font-size:14px;--zn-text-menu-link-line-height:16px;--zn-text-menu-link-spacing:15px;--zn-text-menu-link-font-weight:var(--zn-font-weight-normal);--zn-text-menu-link-color:var(--zn-text-color-muted);--zn-text-menu-link-transform:none;--zn-text-notification-font-size:9px;--zn-text-notification-line-height:11px;--zn-text-notification-spacing:0;--zn-text-notification-font-weight:var(--zn-font-weight-semibold);--zn-text-notification-color:#fff;--zn-text-notification-transform:none}@supports (scrollbar-gutter:stable){.zn-scroll-lock{scrollbar-gutter:stable !important;overflow:hidden !important}}@supports not (scrollbar-gutter:stable){.zn-scroll-lock{padding-right:var(--zn-scroll-lock-size) !important;overflow:hidden !important}}.zn-toast-stack{position:fixed;bottom:0;inset-inline-end:0;z-index:var(--zn-z-index-toast);width:28rem;max-width:100%;max-height:100%;overflow:auto}.zn-toast-stack zn-alert{margin:var(--zn-spacing-medium)}.zn-toast-stack zn-alert::part(base){box-shadow:var(--zn-shadow-large)}@media screen and (min-width:768px){.zn-toast-stack zn-alert{margin:var(--zn-spacing-large)}}.zn-gutter{margin:0 var(--zn-gutter)}.zn-gap{gap:var(--zn-gap,0);padding:var(--zn-base-gap,0);display:flex;flex-wrap:wrap}.zn-gap-in{gap:var(--zn-gap,0);display:flex;flex-wrap:wrap}.zn-gap-in-sm{--zn-gap:var(--zn-spacing-small,0);gap:var(--zn-gap,0)}.zn-gap-md{gap:24px}.zn-gap-inner{gap:var(--zn-gap,0)}.zn-gap-ism{gap:var(--zn-gap,0);--zn-gap:16px}.zn-gap-ixs{gap:var(--zn-gap,0);--zn-gap:8px}.zn-max-hide{max-height:100%;overflow:hidden}.zn-hide-empty:empty{display:none}.zn-nopoint{pointer-events:none}.form-spacing{display:grid;grid-template-columns:1fr;gap:var(--zn-spacing-medium) var(--zn-spacing-small)}@media (min-width:768px){.form-spacing{grid-template-columns:repeat(6,1fr)}}.form-spacing~.form-spacing{margin-top:var(--zn-base-gap)}.form-actions{display:flex;justify-content:flex-end;align-items:center;gap:var(--zn-spacing-small)}zn-form-group~zn-form-group{margin-top:var(--zn-base-gap);padding-top:var(--zn-base-gap);border-top:1px solid rgb(var(--zn-border-color))}.form-spacing>*{grid-column:span 6/span 6}@media (min-width:768px){.form-spacing>*[span="1"]{grid-column:span 1/span 1}}@media (min-width:768px){.form-spacing>*[span="2"]{grid-column:span 2/span 2}}@media (min-width:768px){.form-spacing>*[span="3"]{grid-column:span 3/span 3}}@media (min-width:768px){.form-spacing>*[span="4"]{grid-column:span 4/span 4}}@media (min-width:768px){.form-spacing>*[span="5"]{grid-column:span 5/span 5}}:root{--zn-base-px:8px;--zn-base-gap:calc(var(--zn-base-px) * 2);--zn-gutter:2px;--zn-default-margin:0 auto 0 0;--zn-icon-size:20px;--zn-button-gutter:2px;--zn-font-family-sans:'Inter',sans-serif;--zn-font-family-serif:'Roboto Slab',serif;--zn-font-family-mono:'Roboto Mono',monospace}:root,[t=light],.theme-light{--zn-backdrop-color:rgba(0,0,0,0.5);--zn-color-text:33,33,33;--zn-color-muted-text:125,119,146;--zn-color-base:255,255,255;--zn-color-body:248,247,252;--zn-color-navigation:var(--zn-color-base);--zn-color-navigation-hightlight:248,249,252;--zn-color-border:219,217,236;--zn-color-border-active:209,207,226;--zn-color-tab:236,235,249;--zn-color-panel:255,255,255;--zn-color-primary:105,54,245;--zn-color-info:53,104,195;--zn-color-success:98,177,121;--zn-color-warning:241,168,80;--zn-color-error:236,68,91;--zn-color-disabled:181,181,181}[t=dark],.theme-dark{--zn-backdrop-color:rgba(0,0,0,0.85);--zn-color-text:215,215,215;--zn-color-muted-text:145,145,145;--zn-color-base:0,0,0;--zn-color-body:23,23,23;--zn-color-navigation:var(--zn-color-base);--zn-color-navigation-hightlight:10,10,10;--zn-color-border:38,38,38;--zn-color-border-active:80,80,80;--zn-color-tab:5,5,5;--zn-color-panel:30,30,30;--zn-color-primary:105,54,245;--zn-color-info:53,104,195;--zn-color-success:98,177,121;--zn-color-warning:241,168,80;--zn-color-error:236,68,91;--zn-color-disabled:181,181,181}@media (min-width:1200px){:root{--zn-base-gap:calc(var(--zn-base-px) * 3)}}@media (min-width:2500px){:root{--zn-default-margin:0 auto}}:root{--zn-primary:var(--zn-color-primary);--zn-red:237,84,109;--zn-blue:100,117,242;--zn-green:43,192,145;--zn-orange:255,136,0;--zn-yellow:255,193,7;--zn-indigo:63,81,181;--zn-violet:156,39,176;--zn-pink:255,108,156;--zn-grey:158,158,158;--zn-accent:71,214,214;--zn-size-bar:60px;--zn-size-tile:80px;--zn-size-sidenav:320px;--zn-size-spanel:170px;--zn-size-mpanel:320px;--zn-size-panel:360px;--zn-size-lside:460px;--zn-bg-opacity:1;--zn-text-opacity:1;--base:255,255,255;--inverse-base:0,0,0}.zn-mono{font-family:var(--zn-font-family-mono),monospace}.zn-muted{color:var(--zn-color-muted-text)}.zn-size-xs{font-size:var(--zn-font-size-x-small)}.zn-size-s{font-size:var(--zn-font-size-small)}.zn-size-l{font-size:var(--zn-font-size-large)}.zn-size-xl{font-size:var(--zn-font-size-x-large)}:root,[t=light],.theme-light,[t=dark],.theme-dark{--zn-body:var(--zn-color-body);--zn-text:var(--zn-color-text);--zn-text-heading:var(--zn-color-text);--zn-text-page-title:var(--zn-color-text);--zn-text-panel-title:var(--zn-color-text);--zn-panel:var(--zn-color-panel);--zn-border-color:var(--zn-color-border);--zn-input-bg:var(--zn-color-body)}[t=light],.theme-light{--zn-panel-opacity:1;--zn-shadow:236,235,249;--zn-panel-secondary:246 246 246;--zn-panel-highlight:248,249,252;--zn-panel-highlight-opacity:1;--zn-input-bg-accent:237,235,245;--zn-bright-bg:255,255,255;--zn-light-text:123,112,151;--zn-dark-text:56,39,104;--zn-purple-text:104,54,245}[t=light] .zn-primary,.theme-light .zn-primary{color:rgb(var(--zn-color-primary))}[t=dark],.theme-dark{--zn-shadow:10,10,10;--zn-panel-secondary:27,27,30;--zn-panel-opacity:1;--zn-panel-highlight:25,27,32;--zn-panel-highlight-opacity:0.1;--zn-input-bg-accent:72,84,102;--zn-bright-bg:225,225,225;--zn-light-text:173,163,192;--zn-dark-text:201,201,201;--zn-purple-text:129,140,249;--zn-accent:15,165,234;--zn-primary:137,103,239;--base:0,0,0;--inverse-base:255,255,255}[t=dark] .zn-primary,.theme-dark .zn-primary{color:#8967ef !important}.ml-px{margin-left:2px}.mr-px{margin-right:2px}.mt-px{margin-top:2px}.mb-px{margin-bottom:2px}.mx-px{margin-left:2px;margin-right:2px}.my-px{margin-top:2px;margin-bottom:2px}.m-px{margin:2px}.ml-xxs{margin-left:4px}.mr-xxs{margin-right:4px}.mt-xxs{margin-top:4px}.mb-xxs{margin-bottom:4px}.mx-xxs{margin-left:4px;margin-right:4px}.my-xxs{margin-top:4px;margin-bottom:4px}.m-xxs{margin:4px}.ml-xs{margin-left:8px}.mr-xs{margin-right:8px}.mt-xs{margin-top:8px}.mb-xs{margin-bottom:8px}.mx-xs{margin-left:8px;margin-right:8px}.my-xs{margin-top:8px;margin-bottom:8px}.m-xs{margin:8px}.ml-sm{margin-left:16px}.mr-sm{margin-right:16px}.mt-sm{margin-top:16px}.mb-sm{margin-bottom:16px}.mx-sm{margin-left:16px;margin-right:16px}.my-sm{margin-top:16px;margin-bottom:16px}.m-sm{margin:16px}.ml-md{margin-left:24px}.mr-md{margin-right:24px}.mt-md{margin-top:24px}.mb-md{margin-bottom:24px}.mx-md{margin-left:24px;margin-right:24px}.my-md{margin-top:24px;margin-bottom:24px}.m-md{margin:24px}.ml-lg{margin-left:32px}.mr-lg{margin-right:32px}.mt-lg{margin-top:32px}.mb-lg{margin-bottom:32px}.mx-lg{margin-left:32px;margin-right:32px}.my-lg{margin-top:32px;margin-bottom:32px}.m-lg{margin:32px}.ml-xl{margin-left:40px}.mr-xl{margin-right:40px}.mt-xl{margin-top:40px}.mb-xl{margin-bottom:40px}.mx-xl{margin-left:40px;margin-right:40px}.my-xl{margin-top:40px;margin-bottom:40px}.m-xl{margin:40px}.zn-red{color:rgb(var(--zn-red))}.zn-blue{color:rgb(var(--zn-blue))}.zn-green{color:rgb(var(--zn-green))}.zn-orange{color:rgb(var(--zn-orange))}.zn-yellow{color:rgb(var(--zn-yellow))}.zn-indigo{color:rgb(var(--zn-indigo))}.zn-violet{color:rgb(var(--zn-violet))}.zn-pink{color:rgb(var(--zn-pink))}.zn-grey{color:rgb(var(--zn-grey))}.zn-primary{color:rgb(var(--zn-primary))}.zn-accent{color:rgb(var(--zn-accent))}.zn-info{color:rgb(var(--zn-color-info))}.zn-warning{color:rgb(var(--zn-color-warning))}.zn-error{color:rgb(var(--zn-color-error))}.zn-success{color:rgb(var(--zn-color-success))}ul.gap li{margin:5px 0}ul.circle,ul.decimal,ul.disc,ul.square{padding:5px 0 5px 15px}ul.circle{list-style-type:circle}ul.decimal{list-style-type:decimal}ul.disc{list-style-type:disc}ul.square{list-style-type:square}[t=aura],.theme-aura{--zn-backdrop-color:rgba(30,27,60,0.45);--zn-color-text:42,32,89;--zn-color-muted-text:128,118,158;--zn-color-base:255,255,255;--zn-color-body:250,248,255;--zn-color-navigation:var(--zn-color-base);--zn-color-navigation-hightlight:245,242,255;--zn-color-border:228,222,246;--zn-color-border-active:214,206,240;--zn-color-tab:240,235,252;--zn-color-panel:255,255,255;--zn-color-primary:139,110,245;--zn-color-info:53,104,195;--zn-color-success:98,177,121;--zn-color-warning:241,168,80;--zn-color-error:236,68,91;--zn-color-disabled:181,181,181;--zn-panel-opacity:1;--zn-shadow:232,226,250;--zn-panel-secondary:248 246 255;--zn-panel-highlight:245,242,255;--zn-panel-highlight-opacity:1;--zn-input-bg-accent:240,236,252;--zn-bright-bg:255,255,255;--zn-light-text:130,120,160;--zn-dark-text:60,44,110;--zn-purple-text:124,92,246;--zn-accent:200,130,230;--navbar-page-inactive-tab-background:rgba(255,255,255,0.5);--navbar-page-inactive-tab-filter:blur(2px)}[t=aura] .zn-primary,.theme-aura .zn-primary{color:rgb(var(--zn-color-primary))}:host,html,body{color:rgba(var(--zn-text),var(--zn-text-opacity));font-family:var(--zn-font-family-sans);font-feature-settings:normal;font-variation-settings:normal;font-size:var(--zn-text-paragraph-font-size);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);-moz-tab-size:4;-o-tab-size:4;tab-size:4;margin:0}html,body{background-color:rgba(var(--zn-body),var(--zn-bg-opacity));container-type:size;min-height:100%;height:100%}.inline-container{container-type:inline-size}.app-container{container-type:normal;display:flex;flex:1;flex-direction:column;position:relative;max-height:100%;height:100%;width:100%;max-width:100%}.inline-app-container,.app-container.inline-app-container,[inline-container] .app-container{display:block;height:auto;flex:unset}hr{height:0;border:none;border-top:1px solid rgb(var(--zn-border-color))}code,kbd,samp,pre,.mono{font-family:var(--zn-font-family-mono);font-size:1em}small{font-size:80%}.hidden{display:none !important}.visibility-hidden{visibility:hidden}p{font-size:var(--zn-text-paragraph-font-size);line-height:var(--zn-text-paragraph-line-height);font-weight:var(--zn-text-paragraph-font-weight)}h1,h2,h3,h4,h5,h6{color:rgb(var(--zn-text-heading))}h1{font-size:var(--zn-text-h1-font-size);line-height:var(--zn-text-h1-line-height);font-weight:var(--zn-text-h1-font-weight)}h2{font-size:var(--zn-text-h2-font-size);line-height:var(--zn-text-h2-line-height);font-weight:var(--zn-text-h2-font-weight)}h3,h4,h5,h6{font-size:var(--zn-text-h3-font-size);line-height:var(--zn-text-h3-line-height);font-weight:var(--zn-text-h3-font-weight)}kbd{font-family:monospace;background-color:#eee;color:#333;border:1px solid rgb(var(--zn-border-color));border-radius:3px;box-shadow:0 1px 1px rgba(0,0,0,0.2),0 1px 0 0 rgba(255,255,255,0.5) inset;display:inline-block;font-size:13px;line-height:20px;padding:1px 6px;white-space:nowrap;min-width:15px;color:rgba(0,0,0,0.5)}[t=dark] kbd{background-color:rgb(25,25,25);box-shadow:0 1px 1px rgba(0,0,0,0.2),0 1px 0 0 rgba(110,110,110,0.5) inset;color:#eee}[tab]{cursor:pointer}.zn-link:hover{--zn-text:rgb(var(--zn-primary));--icon-color:rgb(var(--zn-primary));--zn-text-heading:rgb(var(--zn-primary));--property-color:rgb(var(--zn-primary));opacity:1}.grow{flex-grow:1}.no-grow{flex-grow:0}.shrink{flex-shrink:1}.no-shrink{flex-shrink:0}.block{display:block}.flex{display:flex}.flex-wrap{display:flex;flex-wrap:wrap}.flex-col{display:flex;flex-direction:column}.flex-mid{display:flex;align-items:center}.flex-jc{justify-content:center}.flex-between{display:flex;justify-content:space-between}.flex-end{display:flex;justify-content:flex-end}.flex-bottom{display:flex;align-items:flex-end}.equal{flex-basis:50%}.m-auto{margin:auto}.mt-auto{margin-top:auto}.zn-pad{padding:var(--zn-base-gap,0)}.zn-pad-y,.zn-py{padding-top:16px;padding-bottom:16px}.zn-pad-x,.zn-px{padding-left:16px;padding-right:16px}.zn-pr{padding-right:16px}.zn-pl{padding-left:16px}.zn-pt{padding-top:16px}.zn-pb{padding-bottom:16px}.zn-margin{margin:16px}.zn-mx{margin-left:16px;margin-right:16px}.zn-my{margin-top:16px;margin-bottom:16px}.zn-mt{margin-top:16px}.zn-mb{margin-bottom:16px}.zn-ml{margin-left:16px}.zn-mr{margin-right:16px}.zn-mxa{margin-left:auto;margin-right:auto}.zn-mya{margin-top:auto;margin-bottom:auto}.zn-mta{margin-top:auto}.zn-mba{margin-bottom:auto}.zn-mla{margin-left:auto}.zn-mra{margin-right:auto}.rotate-45{transform:rotate(45deg)}.rotate-90{transform:rotate(90deg)}.rotate-180{transform:rotate(180deg)}@keyframes act-vanish{from{transform:scale(1);opacity:1;max-height:100%}to{transform:scale(0.8);opacity:0;max-height:0}}.act-vanish{animation:ease-in act-vanish 600ms forwards;transform-origin:top center;background-color:rgba(var(--zn-color-error),0.3);display:block;overflow:hidden}.h-full{height:100%}.w-full{width:100%}.zn-panel-bg{--zn-page-surface-background:var(--zn-panel);background-color:rgba(var(--zn-panel),var(--zn-panel-opacity))}.zn-panel{background-color:rgba(var(--zn-panel),var(--zn-panel-opacity));border:1px solid rgb(var(--zn-border-color));border-radius:var(--zn-border-radius);--zn-page-surface-background:var(--zn-panel)}.zn-container{display:flex;flex-direction:column;flex-grow:1;max-height:100%;overflow:hidden}.tar{text-align:right}.tal{text-align:left}.tac{text-align:center}.zn-empty-hide:empty{display:none}.ml-auto{margin-left:auto}.zn-b-dash{border-style:dashed}.zn-b-dotted{border-style:dotted}.zn-border{border-style:solid;border-width:1px !important}.zn-bt{border-top-style:solid;border-top-width:1px !important}.zn-bb{border-bottom-style:solid;border-bottom-width:1px !important}.zn-bl{border-left-style:solid;border-left-width:1px !important}.zn-br{border-right-style:solid;border-right-width:1px !important}.unifi-action{display:flex;gap:10px;padding:10px 0;align-items:center}.zn-panel-bar{border-bottom:1px solid rgb(var(--zn-border-color));background-color:rgba(var(--zn-panel),0.9);padding:var(--zn-base-px);gap:var(--zn-base-px);display:flex;flex-wrap:wrap;align-items:center;z-index:1}.zn-panel-bar--pill{border-radius:var(--zn-border-radius);border:1px solid rgb(var(--zn-border-color))}.zn-panel-bar--large{padding:var(--zn-base-px) calc(var(--zn-base-gap) + var(--zn-gutter));gap:var(--zn-base-px);height:50px}.scroll-container{overflow:auto;flex-grow:1;position:relative;display:flex;flex-direction:column;max-height:100%}.zn-divide{display:flex;flex-direction:column}.zn-divide>*:not(:first-child){border-top:1px solid rgb(var(--zn-border-color))}.zn-divide>div:empty+div:not(:first-child){border-top:0}.zn-divide-y{display:flex;flex-direction:row}.zn-divide-y>*:not(:first-child):not(:empty){border-left:1px solid rgb(var(--zn-border-color))}.zn-c-pad{--zn-pad-spacing:var(--zn-spacing-large)}.zn-c-pad-x>*{padding-left:var(--zn-pad-spacing);padding-right:var(--zn-pad-spacing)}.zn-c-pad-y>*:not(:first-child){padding-top:var(--zn-pad-spacing)}.zn-c-pad-y>*:not(:last-child){padding-bottom:var(--zn-pad-spacing)}.zn-nav.zn-transparent{background:transparent}.zn-nav{background:rgba(var(--zn-panel),var(--zn-panel-opacity));border-right:1px solid rgb(var(--zn-border-color));max-width:320px;height:100%;padding-top:5px}.zn-nav ul{list-style:none;padding-bottom:10px;margin:0;display:flex;flex-direction:column;position:relative}.zn-nav ul:after{content:"";height:1px;left:18px;right:18px;bottom:0;position:absolute;background:rgb(var(--zn-border-color))}.zn-nav ul li a{text-decoration:none;color:rgb(var(--zn-text));display:block;font-weight:500;cursor:pointer}.zn-nav ul li a:hover,.zn-nav ul li a.zn-tb-active{background:rgb(var(--zn-body))}.zn-nav ul li a.zn-tb-active{color:rgb(var(--zn-purple-text))}.zn-nav ul:last-child:after{display:none}.zn-nav strong,.zn-nav li a{padding:10px 20px}.zn-nav strong{display:block;margin-top:10px;font-size:13px;letter-spacing:0.93px;color:rgb(var(--zn-text-heading));font-weight:600;padding-bottom:5px;text-transform:uppercase}@keyframes shimmer-text-sweep{0%{background-position:100% center}100%{background-position:0% center}}@media (prefers-reduced-motion:no-preference){.shimmer-text{--shimmer-base:rgb(var(--zn-text));--shimmer-highlight:rgb(var(--zn-text-heading));--shimmer-core:0.5ch;--shimmer-spread:1.5ch;--shimmer-duration:1.5s;display:inline-block;width:-moz-fit-content;width:fit-content;max-width:100%;background-image:linear-gradient(90deg,transparent calc(50% - var(--shimmer-spread)),var(--shimmer-highlight) calc(50% - var(--shimmer-core)),var(--shimmer-highlight) calc(50% + var(--shimmer-core)),transparent calc(50% + var(--shimmer-spread))),linear-gradient(var(--shimmer-base),var(--shimmer-base));background-size:250% 100%,auto;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent !important;color:transparent !important;animation:var(--shimmer-duration) linear infinite shimmer-text-sweep}.shimmer-text.zn-error{--shimmer-base:rgb(var(--zn-color-error));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-error)) 55%,white)}.shimmer-text.zn-success{--shimmer-base:rgb(var(--zn-color-success));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-success)) 55%,white)}.shimmer-text.zn-info{--shimmer-base:rgb(var(--zn-color-info));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-info)) 55%,white)}.shimmer-text.zn-warning{--shimmer-base:rgb(var(--zn-color-warning));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-warning)) 55%,white)}.shimmer-text.zn-primary{--shimmer-base:rgb(var(--zn-primary));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-primary)) 55%,white)}.shimmer-text.zn-accent{--shimmer-base:rgb(var(--zn-accent));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-accent)) 55%,white)}}@media (prefers-reduced-motion:reduce){.shimmer-text{color:rgb(var(--zn-text))}.shimmer-text.zn-error{color:rgb(var(--zn-color-error)) !important}.shimmer-text.zn-success{color:rgb(var(--zn-color-success)) !important}.shimmer-text.zn-info{color:rgb(var(--zn-color-info)) !important}.shimmer-text.zn-warning{color:rgb(var(--zn-color-warning)) !important}.shimmer-text.zn-primary{color:rgb(var(--zn-primary)) !important}.shimmer-text.zn-accent{color:rgb(var(--zn-accent)) !important}}*,*::before,*::after{box-sizing:border-box}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}a{color:inherit;text-decoration:inherit}strong{font-weight:bolder}b{font-weight:600}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:inline-block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}button,.zn-button{border-radius:var(--zn-border-radius);display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:-moz-fit-content;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(255,255,255,0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}button:hover:not([disabled]),.zn-button:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=date],input[type=datetime-local],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],input[type=file],input[list],textarea,select{display:block;width:100%;border-radius:5px;border-style:solid;border-width:1px !important;border-color:rgb(var(--zn-border-color));background-color:rgb(var(--zn-input-bg));outline:none}input[type=date]:focus,input[type=datetime-local]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus,input[type=file]:focus,input[list]:focus,textarea:focus,select:focus{border-color:rgb(var(--zn-primary));box-shadow:0 0 0 3px rgba(var(--zn-primary),0.3)}input[type=date]::-moz-placeholder, input[type=datetime-local]::-moz-placeholder, input[type=email]::-moz-placeholder, input[type=month]::-moz-placeholder, input[type=number]::-moz-placeholder, input[type=password]::-moz-placeholder, input[type=search]::-moz-placeholder, input[type=tel]::-moz-placeholder, input[type=text]::-moz-placeholder, input[type=time]::-moz-placeholder, input[type=url]::-moz-placeholder, input[type=week]::-moz-placeholder, input[type=file]::-moz-placeholder, input[list]::-moz-placeholder, textarea::-moz-placeholder, select::-moz-placeholder{font-weight:400;color:rgba(var(--zn-text),0.6)}input[type=date]::placeholder,input[type=datetime-local]::placeholder,input[type=email]::placeholder,input[type=month]::placeholder,input[type=number]::placeholder,input[type=password]::placeholder,input[type=search]::placeholder,input[type=tel]::placeholder,input[type=text]::placeholder,input[type=time]::placeholder,input[type=url]::placeholder,input[type=week]::placeholder,input[type=file]::placeholder,input[list]::placeholder,textarea::placeholder,select::placeholder{font-weight:400;color:rgba(var(--zn-text),0.6)}@media (min-width:360px){input[type=date],input[type=datetime-local],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],input[type=file],input[list],textarea,select{padding:8px}}label{font-weight:600;font-size:rgb(var(--zn-font-size-medium));line-height:var(--zn-spacing-medium);color:rgb(var(--zn-text-heading));display:block;margin-bottom:4px;margin-top:16px}input[type=checkbox],input[type=radio]{border-radius:5px}input[type=radio]{border-radius:50%}input[type=range]{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:10px;background-color:rgb(var(--zn-border-color));height:8px;accent-color:rgb(var(--zn-primary));width:100%;max-width:768px}fieldset{border-color:rgba(var(--zn-primary),20%);border-width:2px;padding:0 16px 16px}select option{padding:4px}select>option:checked{background-color:rgba(var(--zn-primary),20%);border-radius:5px}fieldset>legend{padding:4px}input[type=button],input[type=submit],button[type=submit]:not(.button),button[type=button]:not(.button){border-radius:var(--zn-border-radius);display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:-moz-fit-content;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(255,255,255,0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}input[type=button]:hover:not([disabled]),input[type=submit]:hover:not([disabled]),button[type=submit]:not(.button):hover:not([disabled]),button[type=button]:not(.button):hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=button],input[type=submit],button[type=submit]:not(.button),button[type=button]:not(.button){width:auto}div+button{margin-top:16px}input[type=file]::-webkit-file-upload-button{border-radius:var(--zn-border-radius);display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(255,255,255,0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}input[type=file]::-webkit-file-upload-button:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=file]::-webkit-file-upload-button{margin-right:8px}input::-webkit-calendar-picker-indicator{cursor:pointer;padding:8px}input[list]::-webkit-calendar-picker-indicator{padding:8px 4px}.input--with-icon{position:relative}.input--with-icon zn-icon{padding:14px;position:absolute;top:50%;pointer-events:none;transform:translateY(-50%);left:8px;background-color:rgb(var(--zn-primary));color:rgb(var(--zn-text));border-radius:50%}.input--with-icon input{padding-left:40px}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-background-clip:text;-webkit-text-fill-color:rgb(var(--zn-text));-webkit-transition:background-color 5000s ease-in-out 0s;transition:background-color 5000s ease-in-out 0s;box-shadow:inset 0 0 20px 20px rgba(35,35,35,0.1607843137)}select{height:43px}.no-border{border:none !important}table:not(.remarkd-table){border-collapse:separate !important;border-spacing:0;width:100%;max-width:100%;table-layout:auto;text-align:left;font-family:var(--zn-font-sans);font-size:var(--zn-text-table-content-font-size);font-weight:var(--zn-text-table-content-font-weight);line-height:var(--zn-text-table-content-line-height);color:var(--zn-text-table-content-color);text-transform:var(--zn-text-table-content-transform)}table:not(.remarkd-table) thead{font-weight:var(--zn-font-weight-medium)}table:not(.remarkd-table) thead tr th{background-color:rgb(var(--zn-table-header-background-color))}table:not(.remarkd-table) tbody a{cursor:pointer;color:rgb(var(--zn-primary))}table:not(.remarkd-table) tbody tr td{border-top:1px solid rgb(var(--zn-border-color)) !important}table:not(.remarkd-table) tbody tr:first-of-type td{border-top:0 !important}table:not(.remarkd-table) th,table:not(.remarkd-table) td{padding:var(--zn-spacing-small) var(--zn-spacing-medium);min-width:90px;white-space:nowrap}table:not(.remarkd-table) td>span{white-space:normal}table:not(.remarkd-table) th{font-family:var(--zn-font-sans);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);color:var(--zn-text-button-label-color);text-transform:var(--zn-text-button-label-transform);text-transform:capitalize;border-bottom:1px solid rgb(var(--zn-border-color))}.zn-table-fixed{table-layout:fixed}.opacity-100{opacity:1}.opacity-90{opacity:0.9}.opacity-80{opacity:0.8}.opacity-60{opacity:0.6}.opacity-50{opacity:0.5}.opacity-40{opacity:0.4}.opacity-10{opacity:0.1}.air-datepicker-cell.-year-.-other-decade-,.air-datepicker-cell.-day-.-other-month-{color:var(--adp-color-other-month)}.air-datepicker-cell.-year-.-other-decade-:hover,.air-datepicker-cell.-day-.-other-month-:hover{color:var(--adp-color-other-month-hover)}.-disabled-.-focus-.air-datepicker-cell.-year-.-other-decade-,.-disabled-.-focus-.air-datepicker-cell.-day-.-other-month-{color:var(--adp-color-other-month)}.-selected-.air-datepicker-cell.-year-.-other-decade-,.-selected-.air-datepicker-cell.-day-.-other-month-{color:#fff;background:var(--adp-background-color-selected-other-month)}.-selected-.-focus-.air-datepicker-cell.-year-.-other-decade-,.-selected-.-focus-.air-datepicker-cell.-day-.-other-month-{background:var(--adp-background-color-selected-other-month-focused)}.-in-range-.air-datepicker-cell.-year-.-other-decade-,.-in-range-.air-datepicker-cell.-day-.-other-month-{background-color:var(--adp-background-color-in-range);color:var(--adp-color)}.-in-range-.-focus-.air-datepicker-cell.-year-.-other-decade-,.-in-range-.-focus-.air-datepicker-cell.-day-.-other-month-{background-color:var(--adp-background-color-in-range-focused)}.air-datepicker-cell.-year-.-other-decade-:empty,.air-datepicker-cell.-day-.-other-month-:empty{background:none;border:none}.air-datepicker-cell{border-radius:var(--adp-cell-border-radius);box-sizing:border-box;cursor:pointer;display:flex;position:relative;align-items:center;justify-content:center;z-index:1}.air-datepicker-cell.-focus-{background:var(--adp-cell-background-color-hover)}.air-datepicker-cell.-current-{color:var(--adp-color-current-date)}.air-datepicker-cell.-current-.-focus-{color:var(--adp-color)}.air-datepicker-cell.-current-.-in-range-{color:var(--adp-color-current-date)}.air-datepicker-cell.-disabled-{cursor:default;color:var(--adp-color-disabled)}.air-datepicker-cell.-disabled-.-focus-{color:var(--adp-color-disabled)}.air-datepicker-cell.-disabled-.-in-range-{color:var(--adp-color-disabled-in-range)}.air-datepicker-cell.-disabled-.-current-.-focus-{color:var(--adp-color-disabled)}.air-datepicker-cell.-in-range-{background:var(--adp-cell-background-color-in-range);border-radius:0}.air-datepicker-cell.-in-range-:hover,.air-datepicker-cell.-in-range-.-focus-{background:var(--adp-cell-background-color-in-range-hover)}.air-datepicker-cell.-range-from-{border:1px solid var(--adp-cell-border-color-in-range);background-color:var(--adp-cell-background-color-in-range);border-radius:var(--adp-cell-border-radius) 0 0 var(--adp-cell-border-radius)}.air-datepicker-cell.-range-to-{border:1px solid var(--adp-cell-border-color-in-range);background-color:var(--adp-cell-background-color-in-range);border-radius:0 var(--adp-cell-border-radius) var(--adp-cell-border-radius) 0}.air-datepicker-cell.-range-to-.-range-from-{border-radius:var(--adp-cell-border-radius)}.air-datepicker-cell.-selected-{color:#fff;border:none;background:var(--adp-cell-background-color-selected)}.air-datepicker-cell.-selected-.-current-{color:#fff;background:var(--adp-cell-background-color-selected)}.air-datepicker-cell.-selected-.-focus-{background:var(--adp-cell-background-color-selected-hover)}.air-datepicker-body{transition:all var(--adp-transition-duration) var(--adp-transition-ease)}.air-datepicker-body.-hidden-{display:none}.air-datepicker-body--day-names{display:grid;grid-template-columns:repeat(7,var(--adp-day-cell-width));margin:8px 0 3px}.air-datepicker-body--day-name{color:var(--adp-day-name-color);display:flex;align-items:center;justify-content:center;flex:1;text-align:center;text-transform:uppercase;font-size:0.8em}.air-datepicker-body--day-name.-clickable-{cursor:pointer}.air-datepicker-body--day-name.-clickable-:hover{color:var(--adp-day-name-color-hover)}.air-datepicker-body--cells{display:grid}.air-datepicker-body--cells.-days-{grid-template-columns:repeat(7,var(--adp-day-cell-width));grid-auto-rows:var(--adp-day-cell-height)}.air-datepicker-body--cells.-months-{grid-template-columns:repeat(3,1fr);grid-auto-rows:var(--adp-month-cell-height)}.air-datepicker-body--cells.-years-{grid-template-columns:repeat(4,1fr);grid-auto-rows:var(--adp-year-cell-height)}.air-datepicker-nav{display:flex;justify-content:space-between;border-bottom:1px solid var(--adp-border-color-inner);min-height:var(--adp-nav-height);padding:var(--adp-padding);box-sizing:content-box}.-only-timepicker- .air-datepicker-nav{display:none}.air-datepicker-nav--title,.air-datepicker-nav--action{display:flex;cursor:pointer;align-items:center;justify-content:center}.air-datepicker-nav--action{width:var(--adp-nav-action-size);border-radius:var(--adp-border-radius);-webkit-user-select:none;-moz-user-select:none;user-select:none}.air-datepicker-nav--action:hover{background:var(--adp-background-color-hover)}.air-datepicker-nav--action:active{background:var(--adp-background-color-active)}.air-datepicker-nav--action.-disabled-{visibility:hidden}.air-datepicker-nav--action svg{width:32px;height:32px}.air-datepicker-nav--action path{fill:none;stroke:var(--adp-nav-arrow-color);stroke-width:2px}.air-datepicker-nav--title{border-radius:var(--adp-border-radius);padding:0 8px}.air-datepicker-nav--title i{font-style:normal;color:var(--adp-nav-color-secondary);margin-left:0.3em}.air-datepicker-nav--title:hover{background:var(--adp-background-color-hover)}.air-datepicker-nav--title:active{background:var(--adp-background-color-active)}.air-datepicker-nav--title.-disabled-{cursor:default;background:none}.air-datepicker-buttons{display:grid;grid-auto-columns:1fr;grid-auto-flow:column}.air-datepicker-button{display:inline-flex;color:var(--adp-btn-color);border-radius:var(--adp-btn-border-radius);cursor:pointer;height:var(--adp-btn-height);border:none;background:rgba(255,255,255,0)}.air-datepicker-button:hover{color:var(--adp-btn-color-hover);background:var(--adp-btn-background-color-hover)}.air-datepicker-button:focus{color:var(--adp-btn-color-hover);background:var(--adp-btn-background-color-hover);outline:none}.air-datepicker-button:active{background:var(--adp-btn-background-color-active)}.air-datepicker-button span{outline:none;display:flex;align-items:center;justify-content:center;width:100%;height:100%}.air-datepicker-time{display:grid;grid-template-columns:max-content 1fr;grid-column-gap:12px;align-items:center;position:relative;padding:0 var(--adp-time-padding-inner)}.-only-timepicker- .air-datepicker-time{border-top:none}.air-datepicker-time--current{display:flex;align-items:center;flex:1;font-size:14px;text-align:center}.air-datepicker-time--current-colon{margin:0 2px 3px;line-height:1}.air-datepicker-time--current-hours,.air-datepicker-time--current-minutes{line-height:1;font-size:19px;font-family:"Century Gothic",CenturyGothic,AppleGothic,sans-serif;position:relative;z-index:1}.air-datepicker-time--current-hours:after,.air-datepicker-time--current-minutes:after{content:"";background:var(--adp-background-color-hover);border-radius:var(--adp-border-radius);position:absolute;left:-2px;top:-3px;right:-2px;bottom:-2px;z-index:-1;opacity:0}.air-datepicker-time--current-hours.-focus-:after,.air-datepicker-time--current-minutes.-focus-:after{opacity:1}.air-datepicker-time--current-ampm{text-transform:uppercase;align-self:flex-end;color:var(--adp-time-day-period-color);margin-left:6px;font-size:11px;margin-bottom:1px}.air-datepicker-time--row{display:flex;align-items:center;font-size:11px;height:17px;background:linear-gradient(to right,var(--adp-time-track-color),var(--adp-time-track-color)) left 50%/100% var(--adp-time-track-height) no-repeat}.air-datepicker-time--row:first-child{margin-bottom:4px}.air-datepicker-time--row input[type=range]{background:none;cursor:pointer;flex:1;height:100%;width:100%;padding:0;margin:0;-webkit-appearance:none}.air-datepicker-time--row input[type=range]::-webkit-slider-thumb{-webkit-appearance:none}.air-datepicker-time--row input[type=range]::-ms-tooltip{display:none}.air-datepicker-time--row input[type=range]:hover::-webkit-slider-thumb{border-color:var(--adp-time-track-color-hover)}.air-datepicker-time--row input[type=range]:hover::-moz-range-thumb{border-color:var(--adp-time-track-color-hover)}.air-datepicker-time--row input[type=range]:hover::-ms-thumb{border-color:var(--adp-time-track-color-hover)}.air-datepicker-time--row input[type=range]:focus{outline:none}.air-datepicker-time--row input[type=range]:focus::-webkit-slider-thumb{background:var(--adp-cell-background-color-selected);border-color:var(--adp-cell-background-color-selected)}.air-datepicker-time--row input[type=range]:focus::-moz-range-thumb{background:var(--adp-cell-background-color-selected);border-color:var(--adp-cell-background-color-selected)}.air-datepicker-time--row input[type=range]:focus::-ms-thumb{background:var(--adp-cell-background-color-selected);border-color:var(--adp-cell-background-color-selected)}.air-datepicker-time--row input[type=range]::-webkit-slider-thumb{box-sizing:border-box;height:12px;width:12px;border-radius:3px;border:1px solid var(--adp-time-track-color);background:#fff;cursor:pointer;-webkit-transition:background var(--adp-transition-duration);transition:background var(--adp-transition-duration)}.air-datepicker-time--row input[type=range]::-moz-range-thumb{box-sizing:border-box;height:12px;width:12px;border-radius:3px;border:1px solid var(--adp-time-track-color);background:#fff;cursor:pointer;-moz-transition:background var(--adp-transition-duration);transition:background var(--adp-transition-duration)}.air-datepicker-time--row input[type=range]::-ms-thumb{box-sizing:border-box;height:12px;width:12px;border-radius:3px;border:1px solid var(--adp-time-track-color);background:#fff;cursor:pointer;-ms-transition:background var(--adp-transition-duration);transition:background var(--adp-transition-duration)}.air-datepicker-time--row input[type=range]::-webkit-slider-thumb{margin-top:calc(var(--adp-time-thumb-size) / 2 * -1)}.air-datepicker-time--row input[type=range]::-webkit-slider-runnable-track{border:none;height:var(--adp-time-track-height);cursor:pointer;color:rgba(0,0,0,0);background:rgba(0,0,0,0)}.air-datepicker-time--row input[type=range]::-moz-range-track{border:none;height:var(--adp-time-track-height);cursor:pointer;color:rgba(0,0,0,0);background:rgba(0,0,0,0)}.air-datepicker-time--row input[type=range]::-ms-track{border:none;height:var(--adp-time-track-height);cursor:pointer;color:rgba(0,0,0,0);background:rgba(0,0,0,0)}.air-datepicker-time--row input[type=range]::-ms-fill-lower{background:rgba(0,0,0,0)}.air-datepicker-time--row input[type=range]::-ms-fill-upper{background:rgba(0,0,0,0)}.air-datepicker{--adp-font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--adp-font-size:14px;--adp-width:246px;--adp-z-index:100;--adp-padding:4px;--adp-grid-areas:"nav" "body" "timepicker" "buttons";--adp-transition-duration:.3s;--adp-transition-ease:ease-out;--adp-transition-offset:8px;--adp-background-color:#fff;--adp-background-color-hover:#f0f0f0;--adp-background-color-active:#eaeaea;--adp-background-color-in-range:rgba(92,196,239,.1);--adp-background-color-in-range-focused:rgba(92,196,239,.2);--adp-background-color-selected-other-month-focused:#8ad5f4;--adp-background-color-selected-other-month:#a2ddf6;--adp-color:#4a4a4a;--adp-color-secondary:#9c9c9c;--adp-accent-color:#4eb5e6;--adp-color-current-date:var(--adp-accent-color);--adp-color-other-month:#dedede;--adp-color-disabled:#aeaeae;--adp-color-disabled-in-range:#939393;--adp-color-other-month-hover:#c5c5c5;--adp-border-color:#dbdbdb;--adp-border-color-inner:#efefef;--adp-border-radius:4px;--adp-border-color-inline:#d7d7d7;--adp-nav-height:32px;--adp-nav-arrow-color:var(--adp-color-secondary);--adp-nav-action-size:32px;--adp-nav-color-secondary:var(--adp-color-secondary);--adp-day-name-color:#ff9a19;--adp-day-name-color-hover:#8ad5f4;--adp-day-cell-width:1fr;--adp-day-cell-height:32px;--adp-month-cell-height:42px;--adp-year-cell-height:56px;--adp-pointer-size:10px;--adp-poiner-border-radius:2px;--adp-pointer-offset:14px;--adp-cell-border-radius:4px;--adp-cell-background-color-hover:var(--adp-background-color-hover);--adp-cell-background-color-selected:#5cc4ef;--adp-cell-background-color-selected-hover:#45bced;--adp-cell-background-color-in-range:rgba(92,196,239,0.1);--adp-cell-background-color-in-range-hover:rgba(92,196,239,0.2);--adp-cell-border-color-in-range:var(--adp-cell-background-color-selected);--adp-btn-height:32px;--adp-btn-color:var(--adp-accent-color);--adp-btn-color-hover:var(--adp-color);--adp-btn-border-radius:var(--adp-border-radius);--adp-btn-background-color-hover:var(--adp-background-color-hover);--adp-btn-background-color-active:var(--adp-background-color-active);--adp-time-track-height:1px;--adp-time-track-color:#dedede;--adp-time-track-color-hover:#b1b1b1;--adp-time-thumb-size:12px;--adp-time-padding-inner:10px;--adp-time-day-period-color:var(--adp-color-secondary);--adp-mobile-font-size:16px;--adp-mobile-nav-height:40px;--adp-mobile-width:320px;--adp-mobile-day-cell-height:38px;--adp-mobile-month-cell-height:48px;--adp-mobile-year-cell-height:64px}.air-datepicker-overlay{--adp-overlay-background-color:rgba(0,0,0,.3);--adp-overlay-transition-duration:.3s;--adp-overlay-transition-ease:ease-out;--adp-overlay-z-index:99}.air-datepicker{background:var(--adp-background-color);border:1px solid var(--adp-border-color);box-shadow:0 4px 12px rgba(0,0,0,0.15);border-radius:var(--adp-border-radius);box-sizing:content-box;display:grid;grid-template-columns:1fr;grid-template-rows:repeat(4,max-content);grid-template-areas:var(--adp-grid-areas);font-family:var(--adp-font-family),sans-serif;font-size:var(--adp-font-size);color:var(--adp-color);width:var(--adp-width);position:absolute;transition:opacity var(--adp-transition-duration) var(--adp-transition-ease),transform var(--adp-transition-duration) var(--adp-transition-ease);z-index:var(--adp-z-index)}.air-datepicker:not(.-custom-position-){opacity:0}.air-datepicker.-from-top-{transform:translateY(calc(var(--adp-transition-offset) * -1))}.air-datepicker.-from-right-{transform:translateX(var(--adp-transition-offset))}.air-datepicker.-from-bottom-{transform:translateY(var(--adp-transition-offset))}.air-datepicker.-from-left-{transform:translateX(calc(var(--adp-transition-offset) * -1))}.air-datepicker.-active-:not(.-custom-position-){transform:translate(0,0);opacity:1}.air-datepicker.-active-.-custom-position-{transition:none}.air-datepicker.-inline-{border-color:var(--adp-border-color-inline);box-shadow:none;position:static;left:auto;right:auto;opacity:1;transform:none}.air-datepicker.-inline- .air-datepicker--pointer{display:none}.air-datepicker.-is-mobile-{--adp-font-size:var(--adp-mobile-font-size);--adp-day-cell-height:var(--adp-mobile-day-cell-height);--adp-month-cell-height:var(--adp-mobile-month-cell-height);--adp-year-cell-height:var(--adp-mobile-year-cell-height);--adp-nav-height:var(--adp-mobile-nav-height);--adp-nav-action-size:var(--adp-mobile-nav-height);position:fixed;width:var(--adp-mobile-width);border:none}.air-datepicker.-is-mobile- *{-webkit-tap-highlight-color:rgba(0,0,0,0)}.air-datepicker.-is-mobile- .air-datepicker--pointer{display:none}.air-datepicker.-is-mobile-:not(.-custom-position-){transform:translate(-50%,calc(-50% + var(--adp-transition-offset)))}.air-datepicker.-is-mobile-.-active-:not(.-custom-position-){transform:translate(-50%,-50%)}.air-datepicker.-custom-position-{transition:none}.air-datepicker-global-container{position:absolute;left:0;top:0}.air-datepicker--pointer{--pointer-half-size:calc(var(--adp-pointer-size) / 2);position:absolute;width:var(--adp-pointer-size);height:var(--adp-pointer-size);z-index:-1}.air-datepicker--pointer:after{content:"";position:absolute;background:#fff;border-top:1px solid var(--adp-border-color-inline);border-right:1px solid var(--adp-border-color-inline);border-top-right-radius:var(--adp-poiner-border-radius);width:var(--adp-pointer-size);height:var(--adp-pointer-size);box-sizing:border-box}.-top-left- .air-datepicker--pointer,.-top-center- .air-datepicker--pointer,.-top-right- .air-datepicker--pointer,[data-popper-placement^=top] .air-datepicker--pointer{top:calc(100% - var(--pointer-half-size) + 1px)}.-top-left- .air-datepicker--pointer:after,.-top-center- .air-datepicker--pointer:after,.-top-right- .air-datepicker--pointer:after,[data-popper-placement^=top] .air-datepicker--pointer:after{transform:rotate(135deg)}.-right-top- .air-datepicker--pointer,.-right-center- .air-datepicker--pointer,.-right-bottom- .air-datepicker--pointer,[data-popper-placement^=right] .air-datepicker--pointer{right:calc(100% - var(--pointer-half-size) + 1px)}.-right-top- .air-datepicker--pointer:after,.-right-center- .air-datepicker--pointer:after,.-right-bottom- .air-datepicker--pointer:after,[data-popper-placement^=right] .air-datepicker--pointer:after{transform:rotate(225deg)}.-bottom-left- .air-datepicker--pointer,.-bottom-center- .air-datepicker--pointer,.-bottom-right- .air-datepicker--pointer,[data-popper-placement^=bottom] .air-datepicker--pointer{bottom:calc(100% - var(--pointer-half-size) + 1px)}.-bottom-left- .air-datepicker--pointer:after,.-bottom-center- .air-datepicker--pointer:after,.-bottom-right- .air-datepicker--pointer:after,[data-popper-placement^=bottom] .air-datepicker--pointer:after{transform:rotate(315deg)}.-left-top- .air-datepicker--pointer,.-left-center- .air-datepicker--pointer,.-left-bottom- .air-datepicker--pointer,[data-popper-placement^=left] .air-datepicker--pointer{left:calc(100% - var(--pointer-half-size) + 1px)}.-left-top- .air-datepicker--pointer:after,.-left-center- .air-datepicker--pointer:after,.-left-bottom- .air-datepicker--pointer:after,[data-popper-placement^=left] .air-datepicker--pointer:after{transform:rotate(45deg)}.-top-left- .air-datepicker--pointer,.-bottom-left- .air-datepicker--pointer{left:var(--adp-pointer-offset)}.-top-right- .air-datepicker--pointer,.-bottom-right- .air-datepicker--pointer{right:var(--adp-pointer-offset)}.-top-center- .air-datepicker--pointer,.-bottom-center- .air-datepicker--pointer{left:calc(50% - var(--adp-pointer-size) / 2)}.-left-top- .air-datepicker--pointer,.-right-top- .air-datepicker--pointer{top:var(--adp-pointer-offset)}.-left-bottom- .air-datepicker--pointer,.-right-bottom- .air-datepicker--pointer{bottom:var(--adp-pointer-offset)}.-left-center- .air-datepicker--pointer,.-right-center- .air-datepicker--pointer{top:calc(50% - var(--adp-pointer-size) / 2)}.air-datepicker--navigation{grid-area:nav}.air-datepicker--content{box-sizing:content-box;padding:var(--adp-padding);grid-area:body}.-only-timepicker- .air-datepicker--content{display:none}.air-datepicker--time{grid-area:timepicker}.air-datepicker--buttons{grid-area:buttons}.air-datepicker--buttons,.air-datepicker--time{padding:var(--adp-padding);border-top:1px solid var(--adp-border-color-inner)}.air-datepicker-overlay{position:fixed;background:var(--adp-overlay-background-color);left:0;top:0;width:0;height:0;opacity:0;transition:opacity var(--adp-overlay-transition-duration) var(--adp-overlay-transition-ease),left 0s,height 0s,width 0s;transition-delay:0s,var(--adp-overlay-transition-duration),var(--adp-overlay-transition-duration),var(--adp-overlay-transition-duration);z-index:var(--adp-overlay-z-index)}.air-datepicker-overlay.-active-{opacity:1;width:100%;height:100%;transition:opacity var(--adp-overlay-transition-duration) var(--adp-overlay-transition-ease),height 0s,width 0s}.air-datepicker{--adp-color:rgba(var(--zn-text),var(--zn-text-opacity));--adp-nav-color-secondary:rgb(var(--zn-purple-text));--adp-day-name-color:var(--zn-color-primary-600);--adp-day-name-color-hover:var(--zn-color-primary-700);--adp-cell-background-color-selected:var(--zn-color-primary-600);--adp-cell-background-color-selected-hover:var(--zn-color-primary-700);--adp-color-current-date:var(--zn-color-primary-600);--adp-background-color:var(--zn-input-background-color);--adp-background-color-hover:var(--zn-input-background-color-hover);--adp-background-color-active:var(--zn-input-background-color-hover);--adp-background-color-selected-other-month:var(--zn-color-primary-300);--adp-background-color-in-range:var(--zn-color-primary-100);--adp-border-color:rgb(var(--zn-border-color));--adp-border-color-inline:rgb(var(--zn-border-color));--adp-border-color-inner:rgb(var(--zn-border-color));--adp-cell-background-color-in-range:var(--zn-color-primary-100);--adp-cell-background-color-in-range-hover:var(--zn-color-primary-200)}.air-datepicker--pointer:after{background-color:var(--zn-input-background-color)}.air-datepicker-global-container{z-index:1000000}.air-datepicker-button{border:none;padding:var(--zn-spacing-2x-small) var(--zn-spacing-x-small);border-radius:var(--adp-border-radius);font-family:var(--adp-font-family),sans-serif;font-size:var(--zn-font-size-medium);font-weight:var(--zn-font-weight-normal);cursor:pointer;color:rgba(var(--zn-text),var(--zn-text-opacity))}.air-datepicker-button:hover{background-color:var(--zn-input-background-color-hover) !important}.zn-cloak:has(:not(:defined)){animation:2s step-end zn-cloak}@keyframes zn-cloak{from{opacity:0}to{opacity:1}}:host ::-webkit-scrollbar{width:5px;height:5px}:host{}:host ::-webkit-scrollbar-track{background:transparent}:host{}:host ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}:host{}:host ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}:host{display:contents}#mid,#content{flex:1;display:flex;flex-direction:column;overflow:hidden}.tabs{flex:1;display:flex;flex-direction:column;overflow:hidden;height:100%;min-height:100%;max-height:100%;width:100%}h1,h2{padding:0;margin:0}#mid{container-type:inline-size;flex-direction:row}#content{flex:1;max-height:100%;min-height:15px;padding:var(--zn-base-gap,0)}#content ::-webkit-scrollbar{width:5px;height:5px}#content{}#content ::-webkit-scrollbar-track{background:transparent}#content{}#content ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}#content{}#content ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}#content{display:flex;align-items:normal;overflow:auto}#content>::slotted(div),#content>div{max-height:100%}:host([no-scroll]) #content{overflow:hidden}:host([no-scroll]) #content>div{max-height:100%}:host([no-scroll]) #content>::slotted(div){max-height:100%}:host([flush]) #content{padding:0}:host([flush-x]) #content{padding-left:0;padding-right:0}#content.contents-slot slot{display:contents}#content ::slotted([selected]),#content>[selected]{flex-grow:1}#content ::slotted(:not([selected])),#content>:not([selected]):not(slot){display:none !important}:host #header~slot[name=top]::slotted(zn-navbar){padding-top:0}:host #header:not(:empty){display:flex;align-items:center;padding:var(--zn-spacing-medium);gap:var(--zn-spacing-medium)}:host #header:not(:empty) #actions ::slotted(*:not(.zn-tb-active)){display:none}:host #header:not(:empty) #actions{display:flex;overflow:visible}:host #header:not(:empty) h1,:host #header:not(:empty) h2{flex-grow:1}:host h2{font-weight:var(--zn-font-weight-bold);flex-grow:1;font-size:var(--zn-font-size-medium);color:rgba(var(--zn-text-panel-title),100%);padding:0;margin:0}::slotted(div[ref-tab]:not(.zn-tb-active)){display:none}`;var ld="zn-tabs, zn-page, zn-page-nav",Dt=class extends C{constructor(){super();this.defaultUri="";this._current="";this._splitMin=60;this.primaryCaption="Navigation";this.secondaryCaption="Content";this.noPrefetch=!1;this.noCache=!1;this.storeTtl=0;this.padded=!1;this.fetchStyle="";this.fullWidth=!1;this.paddedRight=!1;this.preload=!0;this._activeClicks=0;this._activeTab=null;this._tabs=[];this._actions=[];this._knownUri=new Map;this._defaultTab="";this.hasSlotController=new Q(this,"[default]","bottom","right","left","top","actions");this._domObserver=new Lt(this,{target:null,config:{childList:!0,subtree:!0},callback:t=>{t.forEach(r=>{r.type==="childList"&&(r.addedNodes.length>0&&this._registerTabs(),r.removedNodes.length>0&&r.removedNodes.forEach(n=>{let a=n instanceof HTMLElement?n.id:"";a&&this.removeTabAndPanel(a)}))})}});this._monitorObserver=new Lt(this,{target:null,config:{childList:!0,subtree:!0},callback:t=>{t.forEach(r=>{r.type==="childList"&&r.addedNodes.forEach(n=>{if(n instanceof HTMLElement&&n.id===this.monitor){this.reRegisterTabs();let a=this.getStoredTab();a!==null&&this.restoreStoredTab(a)}})})}});this.handlePopState=()=>{let t=this.getTabStoreKey();if(t===null)return;let r=su(t);r!==null&&this.restoreStoredTab(r)};this.reRegisterTabs=()=>{this._registerTabs()};this._registerTabs=()=>{Rt("[tab]",this,ld).forEach(t=>{this._addTab(t)}),Rt("[tab-uri]",this,ld).forEach(t=>{t.getAttribute("tab-uri")===""&&(t.setAttribute("tab",""),t.removeAttribute("tab-uri")),this._addTab(t)}),Rt("[ref-tab-uri]",this,ld).forEach(t=>{t.hasAttribute("ref-tab")||(t.setAttribute("ref-tab",this._uriToId(t.getAttribute("ref-tab-uri"))),t.removeAttribute("ref-tab-uri"),this._actions.push(t))})};this._panels=new Map}async connectedCallback(){super.connectedCallback(),this.masterId||(this.masterId=this.storeKey||Math.floor(Math.random()*1e6).toString()),this.preload=!this.noPrefetch&&!this.noCache,await this.updateComplete,this._panel=this.shadowRoot?.querySelector("#content"),this.observerDom(),this._registerTabs(),this.storeKey&&this.storeTtl===0&&(this.storeTtl=300);let t=this.defaultUri?this._uriToId(this.defaultUri):"";this._store=new hr(this.localStorage?window.localStorage:window.sessionStorage,id,this.storeTtl),Array.from(this.children).forEach(r=>{r.slot===""&&this._panels.set(r.getAttribute("id")||t,[r])}),this.observerDom(),this.monitorDom(),window.addEventListener("popstate",this.handlePopState,{passive:!0})}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("popstate",this.handlePopState),setTimeout(()=>{this.isConnected||sd()})}monitorDom(){this.monitor&&this._monitorObserver.observe(this)}getTabStoreKey(){return this.storeKey||null}getStoredTab(){let t=this.getTabStoreKey();if(t===null||!this._store)return null;if(this.localStorage)return this._store.get(t);let r=this._store.get(ad(t));if(r===null)return null;let n=su(t);return n!==null?n:Iv()?r:null}storeActiveTab(t){let r=this.getTabStoreKey();if(r===null||!this._store)return;let n=this.getUriForTabId(t)??t;this._store.set(this.localStorage?r:ad(r),n),this.localStorage||Ov(r,n)}restoreStoredTab(t){let r=this._tabs.find(n=>n.getAttribute("tab-uri")===t);if(r){this.clickTab(r,!1);return}this._prepareTab(t),this.setActiveTab(t,!0,!1)}activateDefaultTab(){if(!this._panels.has(this._defaultTab)&&this._tabs.length>0&&this._tabs[0].getAttribute("tab-uri")){this.clickTab(this._tabs[0],!1);return}this.setActiveTab(this._defaultTab,!0,!1)}pushTabHistory(t){let r=this.getTabStoreKey();r===null||this.localStorage||Rv(r,this.getUriForTabId(t)??t)}getUriForTabId(t){for(let[r,n]of this._knownUri)if(n===t)return r;return null}_addPanel(t){this._panels.has(t.getAttribute("id"))||this._panels.set(t.getAttribute("id"),[t])}_addTab(t){this._tabs.includes(t)||(this._tabs.push(t),this.preload&&t.addEventListener("mouseover",this.fetchUriTab.bind(this,t)),t.addEventListener("click",this._handleClick.bind(this)))}firstUpdated(t){super.firstUpdated(t),setTimeout(()=>{this._registerTabs(),this._defaultTab=this._current||"";let r=this.getStoredTab();if(r!==null){this.restoreStoredTab(r);return}this.activateDefaultTab()},10),this.addEventListener("zn-menu-select",()=>{setTimeout(this.reRegisterTabs,200)},{passive:!0})}switchTab(t){let r=this._panels.size;if(r<2)return;let a=Array.from(this._panels.keys()).indexOf(this._current)+t;a<0?a=r-1:a>=r&&(a=0);let s=Array.from(this._panels.keys())[a];this.setActiveTab(s,!0,!1,null,!0)}nextTab(){this.switchTab(1)}previousTab(){this.switchTab(-1)}_prepareTab(t){for(let r of this._tabs)if(r.getAttribute("tab")===t)return;for(let r of Rt("[tab-uri]",this,ld)){let n=r.getAttribute("tab-uri"),a=this._uriToId(n);a===t&&this._createUriPanel(r,n,a)}}_uriToId(t){return"tab-"+od(t).substr(0,8)+"-"+this.masterId}_createUriPanel(t,r,n){if(t.hasAttribute("tab")||(t.setAttribute("tab",n),this._setTabEleActive(t,this._current===n)),this._knownUri.has(r)||this._knownUri.set(r,n),this._panels.has(n)&&this._panels.get(n)!==void 0)return this._panels.get(n)[0];let a=document.createElement("div");return a.setAttribute("id",n),this.fetchStyle!==""?a.setAttribute("data-fetch-style",this.fetchStyle):t.hasAttribute("data-fetch-style")&&a.setAttribute("data-fetch-style",t.getAttribute("data-fetch-style")??""),a.setAttribute("data-self-uri",r),a.textContent="Loading ...",this._panel instanceof HTMLElement&&(this._panel.appendChild(a),this._panels.set(n,[a])),document.dispatchEvent(new CustomEvent("zn-new-element",{detail:{element:a,source:t}})),a}_handleClick(t){let r=t.relatedTarget??t.target;r&&("startViewTransition"in document?document.startViewTransition(()=>this.clickTab(r,t.altKey,!0)):this.clickTab(r,t.altKey,!0))}fetchUriTab(t){if(!t.hasAttribute("tab")&&t.hasAttribute("tab-uri")){let r=t.getAttribute("tab-uri")??"";this._createUriPanel(t,r,this._uriToId(r)),t.setAttribute("tab-id",this._uriToId(r))}}clickTab(t,r,n=!1){let a=t.getAttribute("tab-uri"),s=!!a&&this._panels.has(this._uriToId(a));if(this.fetchUriTab(t),t.hasAttribute("tab")){let l=r||this.noCache&&s;setTimeout(()=>{this.setActiveTab(t.getAttribute("tab")||"",!0,l,this.getRefTab(t),n)},10)}}getRefTab(t){let r=t;for(;r;){if(r===this)return null;if(r.hasAttribute("ref-tab"))return r.getAttribute("ref-tab");r=r?.parentElement||r?.getRootNode()?.host}return null}setActiveTab(t,r,n,a=null,s=!1){let l=this._current,d=!1;this._tabs.forEach(h=>{h.hasAttribute("tab-uri")&&this._knownUri.has(h.getAttribute("tab-uri"))&&h.setAttribute("tab",this._knownUri.get(h.getAttribute("tab-uri")));let m=t===h.getAttribute("tab");!m&&a&&!this.getRefTab(h)&&(m=a===h.getAttribute("tab")),d=d||m,this._setTabEleActive(h,m)}),!d&&this._tabs.length>0&&this._setTabEleActive(this._tabs[0],!0),this._actions.forEach(h=>this._setTabEleActive(h,h.getAttribute("ref-tab")===(a||t))),this.selectTab(t,n),s&&this._current===t&&l!==t&&this.pushTabHistory(t),r&&this.storeActiveTab(t)}_setTabEleActive(t,r){r&&(this._activeTab=t),t.classList.toggle("zn-tb-active",r),t.classList.toggle("active",r)}selectTab(t,r){if(t&&!this._panels.has(t))return!1;this._current===t?(this._activeClicks++,this._activeClicks>2&&(r=!0,this._activeClicks=0)):this._activeClicks=0;let a=!0;return this._panels.forEach((l,d)=>{let h=d===t;l.forEach(m=>{if(h&&m.parentNode!==this&&(a=!1),m.toggleAttribute("selected",h),h&&r){let f="",b="";this._activeTab&&this._activeTab.hasAttribute("tab-uri")&&(f=this._activeTab.getAttribute("tab-uri"),b=this._activeTab.getAttribute("gaid")),document.dispatchEvent(new CustomEvent("zn-refresh-element",{detail:{element:m,uri:f,gaid:b}}))}})}),this._panel&&this._panel.classList.toggle("contents-slot",!a),this._current=t,!0}getActiveTab(){return this._panels.get(this._current)||[]}observerDom(){this._domObserver.observe(this)}removeTabAndPanel(t){this._current===t&&this.setActiveTab("",!0,!1);for(let r of this._tabs)if(r.getAttribute("tab")===t){if(r.hasAttribute("tab-uri")){let n=r.getAttribute("tab-uri");this._knownUri.has(n)&&this._knownUri.delete(n)}r.parentElement?.removeChild(r),this._tabs.splice(this._tabs.indexOf(r),1)}if(this._panels.has(t)){let r=this._panels.get(t);r instanceof HTMLElement?r.remove():r instanceof Array&&r.forEach(n=>{n instanceof HTMLElement&&n.remove()}),this._panels.delete(t)}}render(){let t=this.hasSlotController.test("actions"),r=this.caption&&this.caption.length>0,n=this.description&&this.description.length>0,a=r||t||n;if(this._split>0){let s=this.storeKey;s&&(s+="-split");let l="secondary";return this.querySelectorAll('[slot="right"]').length>0&&(l="primary"),u`
|
|
1557
|
+
</zn-button>`}};He.styles=E($v),c([p()],He.prototype,"icon",2),c([p()],He.prototype,"method",2),c([p({attribute:"context-uri",reflect:!0})],He.prototype,"contextUri",2),c([p({reflect:!0})],He.prototype,"count",2),c([p({reflect:!0})],He.prototype,"color",2),c([p({type:Boolean})],He.prototype,"prefetch",2),c([p()],He.prototype,"basis",2),c([p({attribute:"max-height"})],He.prototype,"maxHeight",2),c([p({reflect:!0,type:Boolean})],He.prototype,"open",2),c([p({attribute:"master-id",reflect:!0})],He.prototype,"masterId",2),c([p({attribute:"fetch-style",type:String,reflect:!0})],He.prototype,"fetchStyle",2),c([p({attribute:"no-prefetch",type:Boolean,reflect:!0})],He.prototype,"noPrefetch",2);var ru=He;He.define("zn-expanding-action");var Av=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:contents;height:100%}`;var Uo=class extends C{constructor(){super(...arguments);this.selected=!1}render(){return u`<slot></slot>`}};Uo.styles=E(Av),c([p()],Uo.prototype,"caption",2),c([p({type:Number})],Uo.prototype,"priority",2),c([p()],Uo.prototype,"uri",2),c([p({type:Boolean,reflect:!0})],Uo.prototype,"selected",2);var ou=Uo;Uo.define("zn-tab");var id="zntab:",P3=["reload","back_forward"],H3="__znTabsVisit",qv="__znTabs",nu=new Set,Lv=0;function iu(){try{return window.sessionStorage}catch{return null}}function ul(){return window.location.pathname+window.location.search}function F3(){return window.performance?.getEntriesByType("navigation")?.[0]?.type??""}function ad(i){return`${i}@${ul()}`}function Mv(){return id+ad(H3)}function au(){return iu()?.getItem(Mv())??""}function B3(){let i=iu();i===null||au()!==""||(Lv+=1,i.setItem(Mv(),`${Date.now()}-${Lv}`))}function sd(){let i=iu();if(i===null)return;let o=`@${ul()}`;for(let t=i.length-1;t>=0;t--){let r=i.key(t);r!==null&&r.startsWith(id)&&!r.endsWith(o)&&i.removeItem(r)}}P3.includes(F3())&&nu.add(ul());sd();window.addEventListener("popstate",()=>{nu.add(ul()),sd()},{passive:!0});function Iv(){return nu.has(ul())}function nd(i){return i!==null&&typeof i=="object"?i:null}function Dv(){let i=nd(window.history.state),o=i===null?null:nd(i[qv]),t=o===null?null:nd(o.tabs);return o===null||t===null||typeof o.visit!="string"?null:{visit:o.visit,tabs:t}}function su(i){if(!i)return null;let o=au(),t=Dv();if(o===""||t===null||t.visit!==o)return null;let r=t.tabs[i];return typeof r=="string"?r:null}function Nv(i,o,t){B3();let r=au();if(!i||r==="")return;let n=Dv(),a=n!==null&&n.visit===r?n.tabs:{};if(!t&&a[i]===o)return;let s={...nd(window.history.state),[qv]:{visit:r,tabs:{...a,[i]:o}}};t?window.history.pushState(s,"",window.location.href):window.history.replaceState(s,"")}function Rv(i,o){Nv(i,o,!0)}function Ov(i,o){Nv(i,o,!1)}var Pv=S`@charset "UTF-8";@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:root,[t=light],.theme-light{color-scheme:light;--zn-color-gray-100:hsl(240,13%,95%);--zn-color-gray-300:hsl(260,21%,89%);--zn-color-gray-400:hsl(251,17%,76%);--zn-color-gray-500:hsl(254,17%,66%);--zn-color-gray-800:hsl(259,13%,42%);--zn-color-gray-900:hsl(262,12%,35%);--zn-color-red-500:hsl(0 84.2% 60.2%);--zn-color-red-600:hsl(0 72.2% 50.6%);--zn-color-orange-500:hsl(24.6 95% 53.1%);--zn-color-amber-400:hsl(43.3 96.4% 56.3%);--zn-color-yellow-400:hsl(51,100%,53%);--zn-color-green-500:hsl(142.1 70.6% 45.3%);--zn-color-blue-500:hsl(217.2 91.2% 59.8%);--zn-color-indigo-400:hsl(234.5 89.5% 73.9%);--zn-color-indigo-500:hsl(238.7 83.5% 66.7%);--zn-color-violet-500:hsl(258.3 89.5% 66.3%);--zn-color-violet-600:hsl(262.1 83.3% 57.8%);--zn-color-purple-50:hsl(249,100%,97%);--zn-color-purple-100:hsl(245,100%,95%);--zn-color-purple-200:hsl(244,100%,92%);--zn-color-purple-600:hsl(256,91%,59%);--zn-color-pink-400:hsl(328.6 85.5% 70.2%);--zn-color-pink-500:hsl(330.4 81.2% 60.4%);--zn-color-primary-50:var(--zn-color-purple-50);--zn-color-primary-100:var(--zn-color-purple-100);--zn-color-primary-200:var(--zn-color-purple-200);--zn-color-primary-300:hsl(246,100%,85%);--zn-color-primary-400:hsl(249,100%,76%);--zn-color-primary-500:hsl(252,98%,66%);--zn-color-primary-600:var(--zn-color-purple-600);--zn-color-primary-700:hsl(257,76%,50%);--zn-color-primary-800:hsl(257,76%,42%);--zn-color-primary-900:hsl(257,73%,35%);--zn-color-success-50:hsl(138.5 76.5% 96.7%);--zn-color-success-200:rgb(var(--zn-green));--zn-color-success-300:hsl(141.7 76.6% 73.1%);--zn-color-success-400:hsl(141.9 69.2% 58%);--zn-color-success-500:var(--zn-color-green-500);--zn-color-success-600:hsl(142.1 76.2% 36.3%);--zn-color-success-700:hsl(142.4 71.8% 29.2%);--zn-color-warning-50:hsl(48 100% 96.1%);--zn-color-warning-400:var(--zn-color-amber-400);--zn-color-warning-500:hsl(37.7 92.1% 50.2%);--zn-color-warning-600:hsl(32.1 94.6% 43.7%);--zn-color-danger-50:hsl(0 85.7% 97.3%);--zn-color-danger-100:rgb(var(--zn-red));--zn-color-danger-200:rgb(var(--zn-red));--zn-color-danger-300:hsl(0 93.5% 81.8%);--zn-color-danger-500:var(--zn-color-red-500);--zn-color-danger-600:var(--zn-color-red-600);--zn-color-danger-700:rgb(var(--zn-red));--zn-color-danger-800:hsl(0 70% 35.3%);--zn-color-neutral-50:hsl(255,33%,98%);--zn-color-neutral-100:var(--zn-color-gray-100);--zn-color-neutral-200:hsl(255,12%,94%);--zn-color-neutral-300:var(--zn-color-gray-300);--zn-color-neutral-400:var(--zn-color-gray-400);--zn-color-neutral-500:var(--zn-color-gray-500);--zn-color-neutral-600:hsl(258,15%,58%);--zn-color-neutral-700:hsl(259,13%,54%);--zn-color-neutral-800:var(--zn-color-gray-800);--zn-color-neutral-900:var(--zn-color-gray-900);--zn-color-neutral-0:hsl(0,0%,100%);--zn-color-neutral-1000:hsl(0,0%,0%);--zn-border-radius:6px;--zn-border-radius-small:2px;--zn-border-radius-x-large:var(--zn-border-radius);--zn-border-radius-circle:50%;--zn-border-radius-pill:9999px;--zn-shadow-x-small:0 1px 4px rgba(0,0,0,0.10);--zn-shadow-small:0 3px 9px rgba(0,0,0,0.15);--zn-shadow-medium:0 6px 18px rgba(0,0,0,0.15);--zn-shadow-large:0 6px 20px rgba(0,0,0,0.15);--zn-shadow-x-large:0 6px 20px rgba(0,0,0,0.25);--zn-container:var(--zn-container-hd);--zn-container-default:100%;--zn-container-sm:360px;--zn-container-smp:480px;--zn-container-ph:600px;--zn-container-md:768px;--zn-container-lg:1100px;--zn-container-hd:1400px;--zn-container-3k:1960px;--zn-container-4k:2560px;--zn-transition-x-slow:1000ms;--zn-transition-slow:500ms;--zn-transition-medium:250ms;--zn-transition-fast:150ms;--zn-transition-x-fast:50ms;--zn-gap:var(--zn-base-gap,var(--zn-spacing-medium,4px));--zn-font-mono:'Roboto Mono',SFMono-Regular,Consolas,'Liberation Mono',Menlo,monospace;--zn-font-sans:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol';--zn-font-serif:'Roboto Slab',Georgia,'Times New Roman',serif;--zn-font-size-2x-small:0.625rem;--zn-font-size-x-small:0.75rem;--zn-font-size-small:0.929rem;--zn-font-size-medium:1rem;--zn-font-size-large:1.15rem;--zn-font-size-x-large:1.25rem;--zn-font-size-2x-large:2.25rem;--zn-font-size-3x-large:3rem;--zn-font-size-4x-large:4.5rem;--zn-font-weight-light:300;--zn-font-weight-normal:400;--zn-font-weight-medium:500;--zn-font-weight-semibold:600;--zn-font-weight-bold:700;--zn-letter-spacing-normal:normal;--zn-letter-spacing-loose:0.5px;--zn-line-height-denser:1;--zn-line-height-dense:1.5;--zn-line-height-normal:2;--zn-line-height-loose:2.5;--zn-line-height-looser:3;--zn-focus-ring-color:var(--zn-color-primary-600);--zn-focus-ring-style:solid;--zn-focus-ring-width-x-small:1px;--zn-focus-ring-width:3px;--zn-focus-ring:var(--zn-focus-ring-style) var(--zn-focus-ring-width) var(--zn-focus-ring-color);--zn-focus-ring-offset:1px;--zn-input-height-x-small:24px;--zn-input-height-small:30px;--zn-input-height-medium:36px;--zn-input-height-large:40px;--zn-input-background-color:var(--zn-color-neutral-50);--zn-input-background-color-hover:var(--zn-color-neutral-100);--zn-input-background-color-focus:var(--zn-color-neutral-100);--zn-input-background-color-disabled:var(--zn-color-neutral-400);--zn-input-border-color:var(--zn-color-neutral-300);--zn-input-border-color-hover:var(--zn-color-neutral-400);--zn-input-border-color-focus:var(--zn-color-primary-500);--zn-input-border-color-disabled:var(--zn-color-neutral-300);--zn-input-border-width:1px;--zn-input-required-content:'*';--zn-input-required-content-offset:-2px;--zn-input-required-content-color:var(--zn-input-label-color);--zn-input-border-radius-x-small:var(--zn-border-radius);--zn-input-border-radius-small:var(--zn-border-radius);--zn-input-border-radius-medium:var(--zn-border-radius);--zn-input-border-radius-large:var(--zn-border-radius);--zn-input-font-family:var(--zn-font-sans);--zn-input-font-weight:var(--zn-text-input-content-font-weight);--zn-input-font-size-x-small:var(--zn-font-size-x-small);--zn-input-font-size-small:var(--zn-font-size-small);--zn-input-font-size-medium:var(--zn-text-input-content-font-size);--zn-input-font-size-large:var(--zn-font-size-large);--zn-input-line-height:var(--zn-text-input-content-line-height);--zn-input-letter-spacing:var(--zn-letter-spacing-normal);--zn-input-color:var(--zn-text-input-content-color);--zn-input-color-hover:var(--zn-color-neutral-800);--zn-input-color-focus:var(--zn-color-neutral-700);--zn-input-color-disabled:var(--zn-color-neutral-800);--zn-input-icon-color:var(--zn-color-neutral-500);--zn-input-icon-color-hover:var(--zn-color-neutral-600);--zn-input-icon-color-focus:var(--zn-color-neutral-600);--zn-input-placeholder-color:var(--zn-text-input-placeholder-color);--zn-input-placeholder-color-disabled:var(--zn-color-neutral-600);--zn-input-spacing-small:var(--zn-spacing-small);--zn-input-spacing-medium:var(--zn-spacing-medium);--zn-input-spacing-large:var(--zn-spacing-large);--zn-input-focus-ring-color:hsl(256 91% 59%/40%);--zn-input-focus-ring-offset:0;--zn-input-label-font-size-small:var(--zn-font-size-small);--zn-input-label-font-size-medium:var(--zn-text-input-label-font-size);--zn-input-label-font-size-large:var(--zn-font-size-large);--zn-input-label-font-weight:var(--zn-text-input-label-font-weight);--zn-input-label-line-height:var(--zn-text-input-label-line-height);--zn-input-label-color:var(--zn-text-input-label-color);--zn-input-help-text-font-size-small:var(--zn-font-size-x-small);--zn-input-help-text-font-size-medium:var(--zn-font-size-small);--zn-input-help-text-font-size-large:var(--zn-font-size-medium);--zn-input-help-text-color:var(--zn-color-neutral-500);--zn-toggle-size-small:0.875rem;--zn-toggle-size-medium:1.125rem;--zn-toggle-size-large:1.375rem;--zn-overlay-background-color:hsl(none 0% 0%/0.7);--zn-panel-background-color:var(--zn-color-neutral-0);--zn-panel-border-color:var(--zn-color-neutral-200);--zn-panel-border-width:1px;--zn-tooltip-border-radius:var(--zn-border-radius);--zn-tooltip-background-color:var(--zn-color-neutral-900);--zn-tooltip-color:var(--zn-color-neutral-0);--zn-tooltip-font-family:var(--zn-font-sans);--zn-tooltip-font-weight:var(--zn-font-weight-normal);--zn-tooltip-font-size:var(--zn-font-size-small);--zn-tooltip-line-height:var(--zn-line-height-dense);--zn-tooltip-padding:var(--zn-spacing-x-small) var(--zn-spacing-small);--zn-tooltip-arrow-size:6px;--zn-z-index-page-nav:500;--zn-z-index-drawer:700;--zn-z-index-dialog:800;--zn-z-index-dropdown:900;--zn-z-index-toast:950;--zn-z-index-tooltip:1000;--zn-z-index-editor-action:1000000;--zn-table-header-background-color:252,251,254}[t=dark],.theme-dark{color-scheme:dark;--zn-color-gray-50:hsl(258,15%,23%);--zn-color-gray-100:hsl(262,12%,35%);--zn-color-gray-200:hsl(259,13%,42%);--zn-color-gray-300:hsl(259,13%,54%);--zn-color-gray-400:hsl(258,15%,58%);--zn-color-gray-500:hsl(254,17%,66%);--zn-color-gray-600:hsl(251,17%,76%);--zn-color-gray-700:hsl(260,21%,89%);--zn-color-gray-800:hsl(255,12%,94%);--zn-color-gray-900:hsl(240,13%,95%);--zn-color-gray-950:hsl(255,33%,98%);--zn-color-red-50:hsl(0 56% 23.9%);--zn-color-red-100:hsl(0.6 60% 33.9%);--zn-color-red-200:hsl(0.9 67.2% 37.1%);--zn-color-red-300:hsl(1.1 71.3% 43.7%);--zn-color-red-400:hsl(1 76% 52.5%);--zn-color-red-500:hsl(0.7 89.6% 57.2%);--zn-color-red-600:hsl(0 98.6% 67.9%);--zn-color-red-700:hsl(0 100% 72.3%);--zn-color-red-800:hsl(0 100% 85.6%);--zn-color-red-900:hsl(0 100% 90.3%);--zn-color-red-950:hsl(0 100% 95.9%);--zn-color-orange-50:hsl(15 64.2% 23.3%);--zn-color-orange-100:hsl(15.1 70.9% 31.1%);--zn-color-orange-200:hsl(15.3 75.7% 35.5%);--zn-color-orange-300:hsl(17.1 83.5% 42.7%);--zn-color-orange-400:hsl(20.1 88% 50.8%);--zn-color-orange-500:hsl(24.3 100% 50.5%);--zn-color-orange-600:hsl(27.2 100% 57.7%);--zn-color-orange-700:hsl(31.3 100% 68.7%);--zn-color-orange-800:hsl(33.8 100% 79.3%);--zn-color-orange-900:hsl(38.9 100% 87.7%);--zn-color-orange-950:hsl(46.2 100% 95%);--zn-color-amber-50:hsl(21.9 66.3% 21.1%);--zn-color-amber-100:hsl(21.5 73.6% 29.7%);--zn-color-amber-200:hsl(22.3 77.6% 33.3%);--zn-color-amber-300:hsl(25.4 84.2% 39.6%);--zn-color-amber-400:hsl(31.4 87.4% 46.7%);--zn-color-amber-500:hsl(37 96.6% 48.3%);--zn-color-amber-600:hsl(43.3 100% 53.4%);--zn-color-amber-700:hsl(46.5 100% 61.1%);--zn-color-amber-800:hsl(49.3 100% 73%);--zn-color-amber-900:hsl(51.8 100% 85%);--zn-color-amber-950:hsl(60 100% 94.6%);--zn-color-yellow-50:hsl(34,86%,14%);--zn-color-yellow-100:hsl(36,74%,26%);--zn-color-yellow-200:hsl(40,82%,29%);--zn-color-yellow-300:hsl(43,94%,33%);--zn-color-yellow-400:hsl(48,98%,40%);--zn-color-yellow-500:hsl(53,95%,47%);--zn-color-yellow-600:hsl(51,100%,53%);--zn-color-yellow-700:hsl(54,100%,63%);--zn-color-yellow-800:hsl(61,100%,77%);--zn-color-yellow-900:hsl(63,100%,88%);--zn-color-yellow-950:hsl(63,92%,95%);--zn-color-lime-50:hsl(86.5 54.4% 18%);--zn-color-lime-100:hsl(87.6 56.8% 23.3%);--zn-color-lime-200:hsl(85.8 63.2% 24.5%);--zn-color-lime-300:hsl(86.1 72% 29.4%);--zn-color-lime-400:hsl(85.5 76.8% 37.3%);--zn-color-lime-500:hsl(84.3 74.2% 42.1%);--zn-color-lime-600:hsl(82.8 81.5% 52.6%);--zn-color-lime-700:hsl(82 89.9% 64%);--zn-color-lime-800:hsl(80.9 97.9% 76.6%);--zn-color-lime-900:hsl(77.9 100% 85.8%);--zn-color-lime-950:hsl(69.5 100% 93.8%);--zn-color-green-50:hsl(144.3 53.6% 16%);--zn-color-green-100:hsl(143.2 55.4% 23.5%);--zn-color-green-200:hsl(141.5 58.2% 26.3%);--zn-color-green-300:hsl(140.8 64.2% 31.8%);--zn-color-green-400:hsl(140.3 68% 39.2%);--zn-color-green-500:hsl(141.1 64.9% 43%);--zn-color-green-600:hsl(141.6 72.4% 55.2%);--zn-color-green-700:hsl(141.7 82.7% 70.1%);--zn-color-green-800:hsl(141 90.9% 82.1%);--zn-color-green-900:hsl(142 100% 89.1%);--zn-color-green-950:hsl(144 100% 95.5%);--zn-color-emerald-50:hsl(164.3 75% 13.5%);--zn-color-emerald-100:hsl(163.5 72.6% 20.1%);--zn-color-emerald-200:hsl(162.1 73.7% 22.4%);--zn-color-emerald-300:hsl(161.3 77.3% 27.6%);--zn-color-emerald-400:hsl(159.6 77.1% 34.3%);--zn-color-emerald-500:hsl(159.1 73.5% 37.9%);--zn-color-emerald-600:hsl(157.8 66.8% 48.9%);--zn-color-emerald-700:hsl(156.2 76.1% 63.8%);--zn-color-emerald-800:hsl(152.4 84.4% 77.4%);--zn-color-emerald-900:hsl(149.3 100% 87%);--zn-color-emerald-950:hsl(158.6 100% 94.8%);--zn-color-teal-50:hsl(176.5 51.5% 15.4%);--zn-color-teal-100:hsl(175.9 54.7% 22.3%);--zn-color-teal-200:hsl(175.9 60.7% 23.9%);--zn-color-teal-300:hsl(174.5 67.3% 28.8%);--zn-color-teal-400:hsl(174.4 71.9% 34.9%);--zn-color-teal-500:hsl(173.1 71% 38.3%);--zn-color-teal-600:hsl(172.3 68.2% 48.1%);--zn-color-teal-700:hsl(170.5 81.3% 61.5%);--zn-color-teal-800:hsl(168.4 92.1% 75.2%);--zn-color-teal-900:hsl(168.3 100% 86%);--zn-color-teal-950:hsl(180 100% 95.5%);--zn-color-cyan-50:hsl(197.1 53.8% 20.3%);--zn-color-cyan-100:hsl(196.8 57.3% 27.2%);--zn-color-cyan-200:hsl(195.3 62.7% 29.4%);--zn-color-cyan-300:hsl(193.5 71.3% 34.1%);--zn-color-cyan-400:hsl(192.5 76.8% 40.6%);--zn-color-cyan-500:hsl(189.4 78.6% 42.6%);--zn-color-cyan-600:hsl(188.2 89.1% 51.7%);--zn-color-cyan-700:hsl(187 98.6% 66.2%);--zn-color-cyan-800:hsl(184.9 100% 78.3%);--zn-color-cyan-900:hsl(180 100% 86.6%);--zn-color-cyan-950:hsl(180 100% 94.8%);--zn-color-sky-50:hsl(203 63.8% 20.9%);--zn-color-sky-100:hsl(203.4 70.4% 28%);--zn-color-sky-200:hsl(202.7 75.8% 30.8%);--zn-color-sky-300:hsl(203.1 80.4% 36.1%);--zn-color-sky-400:hsl(202.1 80.5% 44.3%);--zn-color-sky-500:hsl(199.7 85.9% 47.7%);--zn-color-sky-600:hsl(198.7 97.9% 57.2%);--zn-color-sky-700:hsl(198.7 100% 70.5%);--zn-color-sky-800:hsl(198.8 100% 82.5%);--zn-color-sky-900:hsl(198.5 100% 89.9%);--zn-color-sky-950:hsl(186 100% 95.5%);--zn-color-blue-50:hsl(227.1 49.5% 22.7%);--zn-color-blue-100:hsl(225.8 58.9% 36.8%);--zn-color-blue-200:hsl(227.7 64.4% 42.9%);--zn-color-blue-300:hsl(226.1 72.7% 51.2%);--zn-color-blue-400:hsl(222.6 86.5% 56.3%);--zn-color-blue-500:hsl(217.8 95.8% 57.4%);--zn-color-blue-600:hsl(213.3 100% 65%);--zn-color-blue-700:hsl(210.9 100% 74.8%);--zn-color-blue-800:hsl(211.5 100% 83.4%);--zn-color-blue-900:hsl(211 100% 88.9%);--zn-color-blue-950:hsl(201.8 100% 95.3%);--zn-color-indigo-50:hsl(243.5 40.8% 27%);--zn-color-indigo-100:hsl(242.9 45.7% 37.6%);--zn-color-indigo-200:hsl(244.7 52.7% 43.1%);--zn-color-indigo-300:hsl(245.3 60.5% 52.4%);--zn-color-indigo-400:hsl(244.1 79.2% 60.4%);--zn-color-indigo-500:hsl(239.6 88.7% 63.8%);--zn-color-indigo-600:hsl(234.5 96.7% 70.9%);--zn-color-indigo-700:hsl(229.4 100% 78.3%);--zn-color-indigo-800:hsl(227.1 100% 85%);--zn-color-indigo-900:hsl(223.8 100% 89.9%);--zn-color-indigo-950:hsl(220 100% 95.1%);--zn-color-violet-50:hsl(265.1 57.3% 25.4%);--zn-color-violet-100:hsl(263.5 63.8% 39.4%);--zn-color-violet-200:hsl(263.4 66.2% 44.1%);--zn-color-violet-300:hsl(263.7 72.8% 52.4%);--zn-color-violet-400:hsl(262.5 87.3% 59.8%);--zn-color-violet-500:hsl(258.3 95.1% 63.2%);--zn-color-violet-600:hsl(255.1 100% 67.2%);--zn-color-violet-700:hsl(253 100% 81.5%);--zn-color-violet-800:hsl(251.7 100% 87.9%);--zn-color-violet-900:hsl(254.1 100% 91.7%);--zn-color-violet-950:hsl(257.1 100% 96.1%);--zn-color-purple-50:hsl(255,79%,23%);--zn-color-purple-100:hsl(257,73%,35%);--zn-color-purple-200:hsl(257,76%,42%);--zn-color-purple-300:hsl(257,76%,50%);--zn-color-purple-400:hsl(256,91%,59%);--zn-color-purple-500:hsl(252,98%,66%);--zn-color-purple-600:hsl(249,100%,76%);--zn-color-purple-700:hsl(246,100%,85%);--zn-color-purple-800:hsl(244,100%,92%);--zn-color-purple-900:hsl(245,100%,95%);--zn-color-purple-950:hsl(249,100%,97%);--zn-color-fuchsia-50:hsl(297.1 51.2% 18.6%);--zn-color-fuchsia-100:hsl(296.7 59.5% 31.5%);--zn-color-fuchsia-200:hsl(295.4 65.4% 35.1%);--zn-color-fuchsia-300:hsl(294.6 67.4% 42.2%);--zn-color-fuchsia-400:hsl(293.3 68.7% 51.2%);--zn-color-fuchsia-500:hsl(292.1 88.4% 57.7%);--zn-color-fuchsia-600:hsl(292 98.5% 59.5%);--zn-color-fuchsia-700:hsl(292.4 100% 79.5%);--zn-color-fuchsia-800:hsl(292.9 100% 86.8%);--zn-color-fuchsia-900:hsl(300 100% 91.5%);--zn-color-fuchsia-950:hsl(300 100% 96.3%);--zn-color-pink-50:hsl(336.2 59.6% 20%);--zn-color-pink-100:hsl(336.8 63.9% 34%);--zn-color-pink-200:hsl(336.8 68.7% 37.6%);--zn-color-pink-300:hsl(336.1 71.8% 44.5%);--zn-color-pink-400:hsl(333.9 74.9% 53.1%);--zn-color-pink-500:hsl(330.7 86.3% 57.7%);--zn-color-pink-600:hsl(328.6 91.5% 67.2%);--zn-color-pink-700:hsl(327.4 97.6% 78.7%);--zn-color-pink-800:hsl(325.1 100% 86.6%);--zn-color-pink-900:hsl(322.1 100% 91.3%);--zn-color-pink-950:hsl(315 100% 95.9%);--zn-color-rose-50:hsl(342.3 62.9% 21.5%);--zn-color-rose-100:hsl(342.8 68.9% 34.2%);--zn-color-rose-200:hsl(344.8 72.6% 37.3%);--zn-color-rose-300:hsl(346.9 75.8% 43.7%);--zn-color-rose-400:hsl(348.2 80.1% 52.7%);--zn-color-rose-500:hsl(350.4 94.8% 57.5%);--zn-color-rose-600:hsl(351.2 100% 58.1%);--zn-color-rose-700:hsl(352.3 100% 78.1%);--zn-color-rose-800:hsl(352 100% 86.2%);--zn-color-rose-900:hsl(354.5 100% 90.7%);--zn-color-rose-950:hsl(353.3 100% 95.7%);--zn-color-neutral-0:hsl(0,0%,0%);--zn-color-neutral-1000:hsl(0,0%,100%);--zn-shadow-x-small:0 1px 4px rgba(0,0,0,0.18);--zn-shadow-small:0 3px 9px rgba(0,0,0,0.24);--zn-shadow-medium:0 6px 18px rgba(0,0,0,0.24);--zn-shadow-large:0 6px 20px rgba(0,0,0,0.24);--zn-shadow-x-large:0 6px 20px rgba(0,0,0,0.34);--zn-input-background-color:rgb(var(--zn-color-body));--zn-input-background-color-hover:rgb(var(--zn-color-body));--zn-input-background-color-focus:hsl(252,15%,13%);--zn-input-background-color-disabled:hsl(280,6%,9%);--zn-input-border-color:rgb(var(--zn-color-border));--zn-input-border-color-hover:rgb(var(--zn-color-border-active));--zn-input-border-color-focus:var(--zn-color-primary-500);--zn-input-border-color-disabled:hsl(280,6%,9%);--zn-focus-ring-color:var(--zn-color-primary-700);--zn-overlay-background-color:hsl(0 0% 0%/43%);--zn-panel-background-color:rgb(var(--zn-panel));--zn-tooltip-background-color:var(--zn-color-neutral-800);--zn-table-header-background-color:27,27,30}[t=aura],.theme-aura{color-scheme:light;--zn-color-primary-50:hsl(258,100%,97%);--zn-color-primary-100:hsl(256,95%,94%);--zn-color-primary-200:hsl(255,90%,90%);--zn-color-primary-300:hsl(255,88%,83%);--zn-color-primary-400:hsl(256,85%,75%);--zn-color-primary-500:hsl(255,82%,68%);--zn-color-primary-600:hsl(256,78%,62%);--zn-color-primary-700:hsl(257,70%,54%);--zn-color-primary-800:hsl(258,68%,46%);--zn-color-primary-900:hsl(259,66%,38%);--zn-shadow-x-small:0 1px 4px rgba(60,44,110,0.08);--zn-shadow-small:0 3px 9px rgba(60,44,110,0.12);--zn-shadow-medium:0 6px 18px rgba(60,44,110,0.12);--zn-shadow-large:0 6px 20px rgba(60,44,110,0.14);--zn-shadow-x-large:0 6px 20px rgba(60,44,110,0.22);--zn-border-color:218,212,246;--zn-input-focus-ring-color:hsl(255 82% 68%/40%)}:root{--zn-spacing-unit:8px;--zn-spacing-3x-small:2px;--zn-spacing-2x-small:4px;--zn-spacing-x-small:8px;--zn-spacing-small:16px;--zn-spacing-medium:24px;--zn-spacing-large:32px;--zn-spacing-x-large:40px;--zn-spacing-2x-large:48px;--zn-spacing-3x-large:56px;--zn-spacing-4x-large:72px;--zn-spacing-narrow-bar:45px;--zn-spacing-bar:60px;--zn-spacing-tile:80px;--zn-spacing-sidenav:320px;--zn-spacing-small-panel:200px;--zn-spacing-medium-panel:320px;--zn-spacing-panel:360px;--zn-spacing-lside:460px}:root{--zn-text-color:rgb(var(--zn-color-text));--zn-text-color-muted:rgb(var(--zn-color-muted-text));--zn-text-paragraph-font-size:14px;--zn-text-paragraph-line-height:21px;--zn-text-paragraph-spacing:21px;--zn-text-paragraph-font-weight:var(--zn-font-weight-normal);--zn-text-paragraph-color:var(--zn-text-color);--zn-text-paragraph-transform:none;--zn-text-table-content-font-size:14px;--zn-text-table-content-line-height:16px;--zn-text-table-content-spacing:15px;--zn-text-table-content-font-weight:var(--zn-font-weight-normal);--zn-text-table-content-color:var(--zn-text-color);--zn-text-table-content-transform:none;--zn-text-chat-font-size:16px;--zn-text-chat-line-height:24px;--zn-text-chat-spacing:15px;--zn-text-chat-font-weight:var(--zn-font-weight-normal);--zn-text-chat-color:var(--zn-text-color);--zn-text-chat-transform:none;--zn-text-h1-font-size:16px;--zn-text-h1-line-height:16px;--zn-text-h1-spacing:18px;--zn-text-h1-font-weight:var(--zn-font-weight-semibold);--zn-text-h1-color:var(--zn-text-color);--zn-text-h1-transform:none;--zn-text-h2-font-size:14px;--zn-text-h2-line-height:16px;--zn-text-h2-spacing:15px;--zn-text-h2-font-weight:var(--zn-font-weight-semibold);--zn-text-h2-color:var(--zn-text-color);--zn-text-h2-transform:none;--zn-text-h3-font-size:11px;--zn-text-h3-line-height:16px;--zn-text-h3-spacing:15px;--zn-text-h3-font-weight:var(--zn-font-weight-semibold);--zn-text-h3-color:var(--zn-text-color);--zn-text-h3-transform:none;--zn-text-heading-section-font-size:14px;--zn-text-heading-section-line-height:16px;--zn-text-heading-section-spacing:15px;--zn-text-heading-section-font-weight:var(--zn-font-weight-semibold);--zn-text-heading-section-color:var(--zn-text-color);--zn-text-heading-section-transform:none;--zn-text-subheading-font-size:14px;--zn-text-subheading-line-height:16px;--zn-text-subheading-spacing:15px;--zn-text-subheading-font-weight:var(--zn-font-weight-normal);--zn-text-subheading-color:var(--zn-text-color-muted);--zn-text-subheading-transform:none;--zn-text-subheading-small-font-size:13px;--zn-text-subheading-small-line-height:16px;--zn-text-subheading-small-spacing:15px;--zn-text-subheading-small-font-weight:var(--zn-font-weight-normal);--zn-text-subheading-small-color:var(--zn-text-color-muted);--zn-text-subheading-small-transform:none;--zn-text-input-placeholder-font-size:14px;--zn-text-input-placeholder-line-height:24px;--zn-text-input-placeholder-spacing:18px;--zn-text-input-placeholder-font-weight:var(--zn-font-weight-normal);--zn-text-input-placeholder-color:var(--zn-text-color-muted);--zn-text-input-placeholder-transform:none;--zn-text-input-content-font-size:14px;--zn-text-input-content-line-height:24px;--zn-text-input-content-spacing:18px;--zn-text-input-content-font-weight:var(--zn-font-weight-normal);--zn-text-input-content-color:var(--zn-text-color);--zn-text-input-content-transform:none;--zn-text-input-label-font-size:14px;--zn-text-input-label-line-height:16px;--zn-text-input-label-spacing:15px;--zn-text-input-label-font-weight:var(--zn-font-weight-semibold);--zn-text-input-label-color:var(--zn-text-color);--zn-text-input-label-transform:none;--zn-text-chart-minor-font-size:14px;--zn-text-chart-minor-line-height:16px;--zn-text-chart-minor-spacing:15px;--zn-text-chart-minor-font-weight:var(--zn-font-weight-semibold);--zn-text-chart-minor-color:var(--zn-text-color-muted);--zn-text-chart-minor-transform:none;--zn-text-chart-major-font-size:21px;--zn-text-chart-major-line-height:24px;--zn-text-chart-major-spacing:18px;--zn-text-chart-major-font-weight:var(--zn-font-weight-normal);--zn-text-chart-major-color:var(--zn-text-color);--zn-text-chart-major-transform:none;--zn-text-button-label-font-size:13px;--zn-text-button-label-line-height:16px;--zn-text-button-label-spacing:18px;--zn-text-button-label-font-weight:var(--zn-font-weight-semibold);--zn-text-button-label-color:var(--zn-text-color);--zn-text-button-label-transform:uppercase;--zn-text-chip-font-size:10px;--zn-text-chip-line-height:16px;--zn-text-chip-spacing:15px;--zn-text-chip-font-weight:var(--zn-font-weight-semibold);--zn-text-chip-color:var(--zn-text-color);--zn-text-chip-transform:uppercase;--zn-text-navbar-link-font-size:16px;--zn-text-navbar-link-line-height:16px;--zn-text-navbar-link-spacing:18px;--zn-text-navbar-link-font-weight:var(--zn-font-weight-semibold);--zn-text-navbar-link-color:var(--zn-text-color-muted);--zn-text-navbar-link-transform:none;--zn-text-tab-link-font-size:14px;--zn-text-tab-link-line-height:16px;--zn-text-tab-link-spacing:15px;--zn-text-tab-link-font-weight:var(--zn-font-weight-semibold);--zn-text-tab-link-color:var(--zn-text-color-muted);--zn-text-tab-link-transform:none;--zn-text-tab-link-active-font-size:14px;--zn-text-tab-link-active-line-height:16px;--zn-text-tab-link-active-spacing:15px;--zn-text-tab-link-active-font-weight:var(--zn-font-weight-semibold);--zn-text-tab-link-active-color:var(--zn-text-color);--zn-text-tab-link-active-transform:none;--zn-text-menu-link-font-size:14px;--zn-text-menu-link-line-height:16px;--zn-text-menu-link-spacing:15px;--zn-text-menu-link-font-weight:var(--zn-font-weight-normal);--zn-text-menu-link-color:var(--zn-text-color-muted);--zn-text-menu-link-transform:none;--zn-text-notification-font-size:9px;--zn-text-notification-line-height:11px;--zn-text-notification-spacing:0;--zn-text-notification-font-weight:var(--zn-font-weight-semibold);--zn-text-notification-color:#fff;--zn-text-notification-transform:none}@supports (scrollbar-gutter:stable){.zn-scroll-lock{scrollbar-gutter:stable !important;overflow:hidden !important}}@supports not (scrollbar-gutter:stable){.zn-scroll-lock{padding-right:var(--zn-scroll-lock-size) !important;overflow:hidden !important}}.zn-toast-stack{position:fixed;bottom:0;inset-inline-end:0;z-index:var(--zn-z-index-toast);width:28rem;max-width:100%;max-height:100%;overflow:auto}.zn-toast-stack zn-alert{margin:var(--zn-spacing-medium)}.zn-toast-stack zn-alert::part(base){box-shadow:var(--zn-shadow-large)}@media screen and (min-width:768px){.zn-toast-stack zn-alert{margin:var(--zn-spacing-large)}}.zn-gutter{margin:0 var(--zn-gutter)}.zn-gap{gap:var(--zn-gap,0);padding:var(--zn-base-gap,0);display:flex;flex-wrap:wrap}.zn-gap-in{gap:var(--zn-gap,0);display:flex;flex-wrap:wrap}.zn-gap-in-sm{--zn-gap:var(--zn-spacing-small,0);gap:var(--zn-gap,0)}.zn-gap-md{gap:24px}.zn-gap-inner{gap:var(--zn-gap,0)}.zn-gap-ism{gap:var(--zn-gap,0);--zn-gap:16px}.zn-gap-ixs{gap:var(--zn-gap,0);--zn-gap:8px}.zn-max-hide{max-height:100%;overflow:hidden}.zn-hide-empty:empty{display:none}.zn-nopoint{pointer-events:none}.form-spacing{display:grid;grid-template-columns:1fr;gap:var(--zn-spacing-medium) var(--zn-spacing-small)}@media (min-width:768px){.form-spacing{grid-template-columns:repeat(6,1fr)}}.form-spacing~.form-spacing{margin-top:var(--zn-base-gap)}.form-actions{display:flex;justify-content:flex-end;align-items:center;gap:var(--zn-spacing-small)}zn-form-group~zn-form-group{margin-top:var(--zn-base-gap);padding-top:var(--zn-base-gap);border-top:1px solid rgb(var(--zn-border-color))}.form-spacing>*{grid-column:span 6/span 6}@media (min-width:768px){.form-spacing>*[span="1"]{grid-column:span 1/span 1}}@media (min-width:768px){.form-spacing>*[span="2"]{grid-column:span 2/span 2}}@media (min-width:768px){.form-spacing>*[span="3"]{grid-column:span 3/span 3}}@media (min-width:768px){.form-spacing>*[span="4"]{grid-column:span 4/span 4}}@media (min-width:768px){.form-spacing>*[span="5"]{grid-column:span 5/span 5}}:root{--zn-base-px:8px;--zn-base-gap:calc(var(--zn-base-px) * 2);--zn-gutter:2px;--zn-default-margin:0 auto 0 0;--zn-icon-size:20px;--zn-button-gutter:2px;--zn-font-family-sans:'Inter',sans-serif;--zn-font-family-serif:'Roboto Slab',serif;--zn-font-family-mono:'Roboto Mono',monospace}:root,[t=light],.theme-light{--zn-backdrop-color:rgba(0,0,0,0.5);--zn-color-text:33,33,33;--zn-color-muted-text:125,119,146;--zn-color-base:255,255,255;--zn-color-body:248,247,252;--zn-color-navigation:var(--zn-color-base);--zn-color-navigation-hightlight:248,249,252;--zn-color-border:219,217,236;--zn-color-border-active:209,207,226;--zn-color-tab:236,235,249;--zn-color-panel:255,255,255;--zn-color-primary:105,54,245;--zn-color-info:53,104,195;--zn-color-success:98,177,121;--zn-color-warning:241,168,80;--zn-color-error:236,68,91;--zn-color-disabled:181,181,181}[t=dark],.theme-dark{--zn-backdrop-color:rgba(0,0,0,0.85);--zn-color-text:215,215,215;--zn-color-muted-text:145,145,145;--zn-color-base:0,0,0;--zn-color-body:23,23,23;--zn-color-navigation:var(--zn-color-base);--zn-color-navigation-hightlight:10,10,10;--zn-color-border:38,38,38;--zn-color-border-active:80,80,80;--zn-color-tab:5,5,5;--zn-color-panel:30,30,30;--zn-color-primary:105,54,245;--zn-color-info:53,104,195;--zn-color-success:98,177,121;--zn-color-warning:241,168,80;--zn-color-error:236,68,91;--zn-color-disabled:181,181,181}@media (min-width:1200px){:root{--zn-base-gap:calc(var(--zn-base-px) * 3)}}@media (min-width:2500px){:root{--zn-default-margin:0 auto}}:root{--zn-primary:var(--zn-color-primary);--zn-red:237,84,109;--zn-blue:100,117,242;--zn-green:43,192,145;--zn-orange:255,136,0;--zn-yellow:255,193,7;--zn-indigo:63,81,181;--zn-violet:156,39,176;--zn-pink:255,108,156;--zn-grey:158,158,158;--zn-accent:71,214,214;--zn-size-bar:60px;--zn-size-tile:80px;--zn-size-sidenav:320px;--zn-size-spanel:170px;--zn-size-mpanel:320px;--zn-size-panel:360px;--zn-size-lside:460px;--zn-bg-opacity:1;--zn-text-opacity:1;--base:255,255,255;--inverse-base:0,0,0}.zn-mono{font-family:var(--zn-font-family-mono),monospace}.zn-muted{color:var(--zn-color-muted-text)}.zn-size-xs{font-size:var(--zn-font-size-x-small)}.zn-size-s{font-size:var(--zn-font-size-small)}.zn-size-l{font-size:var(--zn-font-size-large)}.zn-size-xl{font-size:var(--zn-font-size-x-large)}:root,[t=light],.theme-light,[t=dark],.theme-dark{--zn-body:var(--zn-color-body);--zn-text:var(--zn-color-text);--zn-text-heading:var(--zn-color-text);--zn-text-page-title:var(--zn-color-text);--zn-text-panel-title:var(--zn-color-text);--zn-panel:var(--zn-color-panel);--zn-border-color:var(--zn-color-border);--zn-input-bg:var(--zn-color-body)}[t=light],.theme-light{--zn-panel-opacity:1;--zn-shadow:236,235,249;--zn-panel-secondary:246 246 246;--zn-panel-highlight:248,249,252;--zn-panel-highlight-opacity:1;--zn-input-bg-accent:237,235,245;--zn-bright-bg:255,255,255;--zn-light-text:123,112,151;--zn-dark-text:56,39,104;--zn-purple-text:104,54,245}[t=light] .zn-primary,.theme-light .zn-primary{color:rgb(var(--zn-color-primary))}[t=dark],.theme-dark{--zn-shadow:10,10,10;--zn-panel-secondary:27,27,30;--zn-panel-opacity:1;--zn-panel-highlight:25,27,32;--zn-panel-highlight-opacity:0.1;--zn-input-bg-accent:72,84,102;--zn-bright-bg:225,225,225;--zn-light-text:173,163,192;--zn-dark-text:201,201,201;--zn-purple-text:129,140,249;--zn-accent:15,165,234;--zn-primary:137,103,239;--base:0,0,0;--inverse-base:255,255,255}[t=dark] .zn-primary,.theme-dark .zn-primary{color:#8967ef !important}.ml-px{margin-left:2px}.mr-px{margin-right:2px}.mt-px{margin-top:2px}.mb-px{margin-bottom:2px}.mx-px{margin-left:2px;margin-right:2px}.my-px{margin-top:2px;margin-bottom:2px}.m-px{margin:2px}.ml-xxs{margin-left:4px}.mr-xxs{margin-right:4px}.mt-xxs{margin-top:4px}.mb-xxs{margin-bottom:4px}.mx-xxs{margin-left:4px;margin-right:4px}.my-xxs{margin-top:4px;margin-bottom:4px}.m-xxs{margin:4px}.ml-xs{margin-left:8px}.mr-xs{margin-right:8px}.mt-xs{margin-top:8px}.mb-xs{margin-bottom:8px}.mx-xs{margin-left:8px;margin-right:8px}.my-xs{margin-top:8px;margin-bottom:8px}.m-xs{margin:8px}.ml-sm{margin-left:16px}.mr-sm{margin-right:16px}.mt-sm{margin-top:16px}.mb-sm{margin-bottom:16px}.mx-sm{margin-left:16px;margin-right:16px}.my-sm{margin-top:16px;margin-bottom:16px}.m-sm{margin:16px}.ml-md{margin-left:24px}.mr-md{margin-right:24px}.mt-md{margin-top:24px}.mb-md{margin-bottom:24px}.mx-md{margin-left:24px;margin-right:24px}.my-md{margin-top:24px;margin-bottom:24px}.m-md{margin:24px}.ml-lg{margin-left:32px}.mr-lg{margin-right:32px}.mt-lg{margin-top:32px}.mb-lg{margin-bottom:32px}.mx-lg{margin-left:32px;margin-right:32px}.my-lg{margin-top:32px;margin-bottom:32px}.m-lg{margin:32px}.ml-xl{margin-left:40px}.mr-xl{margin-right:40px}.mt-xl{margin-top:40px}.mb-xl{margin-bottom:40px}.mx-xl{margin-left:40px;margin-right:40px}.my-xl{margin-top:40px;margin-bottom:40px}.m-xl{margin:40px}.zn-red{color:rgb(var(--zn-red))}.zn-blue{color:rgb(var(--zn-blue))}.zn-green{color:rgb(var(--zn-green))}.zn-orange{color:rgb(var(--zn-orange))}.zn-yellow{color:rgb(var(--zn-yellow))}.zn-indigo{color:rgb(var(--zn-indigo))}.zn-violet{color:rgb(var(--zn-violet))}.zn-pink{color:rgb(var(--zn-pink))}.zn-grey{color:rgb(var(--zn-grey))}.zn-primary{color:rgb(var(--zn-primary))}.zn-accent{color:rgb(var(--zn-accent))}.zn-info{color:rgb(var(--zn-color-info))}.zn-warning{color:rgb(var(--zn-color-warning))}.zn-error{color:rgb(var(--zn-color-error))}.zn-success{color:rgb(var(--zn-color-success))}ul.gap li{margin:5px 0}ul.circle,ul.decimal,ul.disc,ul.square{padding:5px 0 5px 15px}ul.circle{list-style-type:circle}ul.decimal{list-style-type:decimal}ul.disc{list-style-type:disc}ul.square{list-style-type:square}[t=aura],.theme-aura{--zn-backdrop-color:rgba(30,27,60,0.45);--zn-color-text:42,32,89;--zn-color-muted-text:128,118,158;--zn-color-base:255,255,255;--zn-color-body:250,248,255;--zn-color-navigation:var(--zn-color-base);--zn-color-navigation-hightlight:245,242,255;--zn-color-border:228,222,246;--zn-color-border-active:214,206,240;--zn-color-tab:240,235,252;--zn-color-panel:255,255,255;--zn-color-primary:139,110,245;--zn-color-info:53,104,195;--zn-color-success:98,177,121;--zn-color-warning:241,168,80;--zn-color-error:236,68,91;--zn-color-disabled:181,181,181;--zn-panel-opacity:1;--zn-shadow:232,226,250;--zn-panel-secondary:248 246 255;--zn-panel-highlight:245,242,255;--zn-panel-highlight-opacity:1;--zn-input-bg-accent:240,236,252;--zn-bright-bg:255,255,255;--zn-light-text:130,120,160;--zn-dark-text:60,44,110;--zn-purple-text:124,92,246;--zn-accent:200,130,230;--navbar-page-inactive-tab-background:rgba(255,255,255,0.5);--navbar-page-inactive-tab-filter:blur(2px)}[t=aura] .zn-primary,.theme-aura .zn-primary{color:rgb(var(--zn-color-primary))}:host,html,body{color:rgba(var(--zn-text),var(--zn-text-opacity));font-family:var(--zn-font-family-sans);font-feature-settings:normal;font-variation-settings:normal;font-size:var(--zn-text-paragraph-font-size);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);-moz-tab-size:4;-o-tab-size:4;tab-size:4;margin:0}html,body{background-color:rgba(var(--zn-body),var(--zn-bg-opacity));container-type:size;min-height:100%;height:100%}.inline-container{container-type:inline-size}.app-container{container-type:normal;display:flex;flex:1;flex-direction:column;position:relative;max-height:100%;height:100%;width:100%;max-width:100%}.inline-app-container,.app-container.inline-app-container,[inline-container] .app-container{display:block;height:auto;flex:unset}hr{height:0;border:none;border-top:1px solid rgb(var(--zn-border-color))}code,kbd,samp,pre,.mono{font-family:var(--zn-font-family-mono);font-size:1em}small{font-size:80%}.hidden{display:none !important}.visibility-hidden{visibility:hidden}p{font-size:var(--zn-text-paragraph-font-size);line-height:var(--zn-text-paragraph-line-height);font-weight:var(--zn-text-paragraph-font-weight)}h1,h2,h3,h4,h5,h6{color:rgb(var(--zn-text-heading))}h1{font-size:var(--zn-text-h1-font-size);line-height:var(--zn-text-h1-line-height);font-weight:var(--zn-text-h1-font-weight)}h2{font-size:var(--zn-text-h2-font-size);line-height:var(--zn-text-h2-line-height);font-weight:var(--zn-text-h2-font-weight)}h3,h4,h5,h6{font-size:var(--zn-text-h3-font-size);line-height:var(--zn-text-h3-line-height);font-weight:var(--zn-text-h3-font-weight)}kbd{font-family:monospace;background-color:#eee;color:#333;border:1px solid rgb(var(--zn-border-color));border-radius:3px;box-shadow:0 1px 1px rgba(0,0,0,0.2),0 1px 0 0 rgba(255,255,255,0.5) inset;display:inline-block;font-size:13px;line-height:20px;padding:1px 6px;white-space:nowrap;min-width:15px;color:rgba(0,0,0,0.5)}[t=dark] kbd{background-color:rgb(25,25,25);box-shadow:0 1px 1px rgba(0,0,0,0.2),0 1px 0 0 rgba(110,110,110,0.5) inset;color:#eee}[tab]{cursor:pointer}.zn-link:hover{--zn-text:rgb(var(--zn-primary));--icon-color:rgb(var(--zn-primary));--zn-text-heading:rgb(var(--zn-primary));--property-color:rgb(var(--zn-primary));opacity:1}.grow{flex-grow:1}.no-grow{flex-grow:0}.shrink{flex-shrink:1}.no-shrink{flex-shrink:0}.block{display:block}.flex{display:flex}.flex-wrap{display:flex;flex-wrap:wrap}.flex-col{display:flex;flex-direction:column}.flex-mid{display:flex;align-items:center}.flex-jc{justify-content:center}.flex-between{display:flex;justify-content:space-between}.flex-end{display:flex;justify-content:flex-end}.flex-bottom{display:flex;align-items:flex-end}.equal{flex-basis:50%}.m-auto{margin:auto}.mt-auto{margin-top:auto}.zn-pad{padding:var(--zn-base-gap,0)}.zn-pad-y,.zn-py{padding-top:16px;padding-bottom:16px}.zn-pad-x,.zn-px{padding-left:16px;padding-right:16px}.zn-pr{padding-right:16px}.zn-pl{padding-left:16px}.zn-pt{padding-top:16px}.zn-pb{padding-bottom:16px}.zn-margin{margin:16px}.zn-mx{margin-left:16px;margin-right:16px}.zn-my{margin-top:16px;margin-bottom:16px}.zn-mt{margin-top:16px}.zn-mb{margin-bottom:16px}.zn-ml{margin-left:16px}.zn-mr{margin-right:16px}.zn-mxa{margin-left:auto;margin-right:auto}.zn-mya{margin-top:auto;margin-bottom:auto}.zn-mta{margin-top:auto}.zn-mba{margin-bottom:auto}.zn-mla{margin-left:auto}.zn-mra{margin-right:auto}.rotate-45{transform:rotate(45deg)}.rotate-90{transform:rotate(90deg)}.rotate-180{transform:rotate(180deg)}@keyframes act-vanish{from{transform:scale(1);opacity:1;max-height:100%}to{transform:scale(0.8);opacity:0;max-height:0}}.act-vanish{animation:ease-in act-vanish 600ms forwards;transform-origin:top center;background-color:rgba(var(--zn-color-error),0.3);display:block;overflow:hidden}.h-full{height:100%}.w-full{width:100%}.zn-panel-bg{--zn-page-surface-background:var(--zn-panel);background-color:rgba(var(--zn-panel),var(--zn-panel-opacity))}.zn-panel{background-color:rgba(var(--zn-panel),var(--zn-panel-opacity));border:1px solid rgb(var(--zn-border-color));border-radius:var(--zn-border-radius);--zn-page-surface-background:var(--zn-panel)}.zn-container{display:flex;flex-direction:column;flex-grow:1;max-height:100%;overflow:hidden}.tar{text-align:right}.tal{text-align:left}.tac{text-align:center}.zn-empty-hide:empty{display:none}.ml-auto{margin-left:auto}.zn-b-dash{border-style:dashed}.zn-b-dotted{border-style:dotted}.zn-border{border-style:solid;border-width:1px !important}.zn-bt{border-top-style:solid;border-top-width:1px !important}.zn-bb{border-bottom-style:solid;border-bottom-width:1px !important}.zn-bl{border-left-style:solid;border-left-width:1px !important}.zn-br{border-right-style:solid;border-right-width:1px !important}.unifi-action{display:flex;gap:10px;padding:10px 0;align-items:center}.zn-panel-bar{border-bottom:1px solid rgb(var(--zn-border-color));background-color:rgba(var(--zn-panel),0.9);padding:var(--zn-base-px);gap:var(--zn-base-px);display:flex;flex-wrap:wrap;align-items:center;z-index:1}.zn-panel-bar--pill{border-radius:var(--zn-border-radius);border:1px solid rgb(var(--zn-border-color))}.zn-panel-bar--large{padding:var(--zn-base-px) calc(var(--zn-base-gap) + var(--zn-gutter));gap:var(--zn-base-px);height:50px}.scroll-container{overflow:auto;flex-grow:1;position:relative;display:flex;flex-direction:column;max-height:100%}.zn-divide{display:flex;flex-direction:column}.zn-divide>*:not(:first-child){border-top:1px solid rgb(var(--zn-border-color))}.zn-divide>div:empty+div:not(:first-child){border-top:0}.zn-divide-y{display:flex;flex-direction:row}.zn-divide-y>*:not(:first-child):not(:empty){border-left:1px solid rgb(var(--zn-border-color))}.zn-c-pad{--zn-pad-spacing:var(--zn-spacing-large)}.zn-c-pad-x>*{padding-left:var(--zn-pad-spacing);padding-right:var(--zn-pad-spacing)}.zn-c-pad-y>*:not(:first-child){padding-top:var(--zn-pad-spacing)}.zn-c-pad-y>*:not(:last-child){padding-bottom:var(--zn-pad-spacing)}.zn-nav.zn-transparent{background:transparent}.zn-nav{background:rgba(var(--zn-panel),var(--zn-panel-opacity));border-right:1px solid rgb(var(--zn-border-color));max-width:320px;height:100%;padding-top:5px}.zn-nav ul{list-style:none;padding-bottom:10px;margin:0;display:flex;flex-direction:column;position:relative}.zn-nav ul:after{content:"";height:1px;left:18px;right:18px;bottom:0;position:absolute;background:rgb(var(--zn-border-color))}.zn-nav ul li a{text-decoration:none;color:rgb(var(--zn-text));display:block;font-weight:500;cursor:pointer}.zn-nav ul li a:hover,.zn-nav ul li a.zn-tb-active{background:rgb(var(--zn-body))}.zn-nav ul li a.zn-tb-active{color:rgb(var(--zn-purple-text))}.zn-nav ul:last-child:after{display:none}.zn-nav strong,.zn-nav li a{padding:10px 20px}.zn-nav strong{display:block;margin-top:10px;font-size:13px;letter-spacing:0.93px;color:rgb(var(--zn-text-heading));font-weight:600;padding-bottom:5px;text-transform:uppercase}@keyframes shimmer-text-sweep{0%{background-position:100% center}100%{background-position:0% center}}@media (prefers-reduced-motion:no-preference){.shimmer-text{--shimmer-base:rgb(var(--zn-text));--shimmer-highlight:rgb(var(--zn-text-heading));--shimmer-core:0.5ch;--shimmer-spread:1.5ch;--shimmer-duration:1.5s;display:inline-block;width:-moz-fit-content;width:fit-content;max-width:100%;background-image:linear-gradient(90deg,transparent calc(50% - var(--shimmer-spread)),var(--shimmer-highlight) calc(50% - var(--shimmer-core)),var(--shimmer-highlight) calc(50% + var(--shimmer-core)),transparent calc(50% + var(--shimmer-spread))),linear-gradient(var(--shimmer-base),var(--shimmer-base));background-size:250% 100%,auto;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent !important;color:transparent !important;animation:var(--shimmer-duration) linear infinite shimmer-text-sweep}.shimmer-text.zn-error{--shimmer-base:rgb(var(--zn-color-error));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-error)) 55%,white)}.shimmer-text.zn-success{--shimmer-base:rgb(var(--zn-color-success));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-success)) 55%,white)}.shimmer-text.zn-info{--shimmer-base:rgb(var(--zn-color-info));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-info)) 55%,white)}.shimmer-text.zn-warning{--shimmer-base:rgb(var(--zn-color-warning));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-warning)) 55%,white)}.shimmer-text.zn-primary{--shimmer-base:rgb(var(--zn-primary));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-primary)) 55%,white)}.shimmer-text.zn-accent{--shimmer-base:rgb(var(--zn-accent));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-accent)) 55%,white)}}@media (prefers-reduced-motion:reduce){.shimmer-text{color:rgb(var(--zn-text))}.shimmer-text.zn-error{color:rgb(var(--zn-color-error)) !important}.shimmer-text.zn-success{color:rgb(var(--zn-color-success)) !important}.shimmer-text.zn-info{color:rgb(var(--zn-color-info)) !important}.shimmer-text.zn-warning{color:rgb(var(--zn-color-warning)) !important}.shimmer-text.zn-primary{color:rgb(var(--zn-primary)) !important}.shimmer-text.zn-accent{color:rgb(var(--zn-accent)) !important}}*,*::before,*::after{box-sizing:border-box}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}a{color:inherit;text-decoration:inherit}strong{font-weight:bolder}b{font-weight:600}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:inline-block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}button,.zn-button{border-radius:var(--zn-border-radius);display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:-moz-fit-content;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(255,255,255,0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}button:hover:not([disabled]),.zn-button:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=date],input[type=datetime-local],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],input[type=file],input[list],textarea,select{display:block;width:100%;border-radius:5px;border-style:solid;border-width:1px !important;border-color:rgb(var(--zn-border-color));background-color:rgb(var(--zn-input-bg));outline:none}input[type=date]:focus,input[type=datetime-local]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus,input[type=file]:focus,input[list]:focus,textarea:focus,select:focus{border-color:rgb(var(--zn-primary));box-shadow:0 0 0 3px rgba(var(--zn-primary),0.3)}input[type=date]::-moz-placeholder, input[type=datetime-local]::-moz-placeholder, input[type=email]::-moz-placeholder, input[type=month]::-moz-placeholder, input[type=number]::-moz-placeholder, input[type=password]::-moz-placeholder, input[type=search]::-moz-placeholder, input[type=tel]::-moz-placeholder, input[type=text]::-moz-placeholder, input[type=time]::-moz-placeholder, input[type=url]::-moz-placeholder, input[type=week]::-moz-placeholder, input[type=file]::-moz-placeholder, input[list]::-moz-placeholder, textarea::-moz-placeholder, select::-moz-placeholder{font-weight:400;color:rgba(var(--zn-text),0.6)}input[type=date]::placeholder,input[type=datetime-local]::placeholder,input[type=email]::placeholder,input[type=month]::placeholder,input[type=number]::placeholder,input[type=password]::placeholder,input[type=search]::placeholder,input[type=tel]::placeholder,input[type=text]::placeholder,input[type=time]::placeholder,input[type=url]::placeholder,input[type=week]::placeholder,input[type=file]::placeholder,input[list]::placeholder,textarea::placeholder,select::placeholder{font-weight:400;color:rgba(var(--zn-text),0.6)}@media (min-width:360px){input[type=date],input[type=datetime-local],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],input[type=file],input[list],textarea,select{padding:8px}}label{font-weight:600;font-size:rgb(var(--zn-font-size-medium));line-height:var(--zn-spacing-medium);color:rgb(var(--zn-text-heading));display:block;margin-bottom:4px;margin-top:16px}input[type=checkbox],input[type=radio]{border-radius:5px}input[type=radio]{border-radius:50%}input[type=range]{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:10px;background-color:rgb(var(--zn-border-color));height:8px;accent-color:rgb(var(--zn-primary));width:100%;max-width:768px}fieldset{border-color:rgba(var(--zn-primary),20%);border-width:2px;padding:0 16px 16px}select option{padding:4px}select>option:checked{background-color:rgba(var(--zn-primary),20%);border-radius:5px}fieldset>legend{padding:4px}input[type=button],input[type=submit],button[type=submit]:not(.button),button[type=button]:not(.button){border-radius:var(--zn-border-radius);display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:-moz-fit-content;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(255,255,255,0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}input[type=button]:hover:not([disabled]),input[type=submit]:hover:not([disabled]),button[type=submit]:not(.button):hover:not([disabled]),button[type=button]:not(.button):hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=button],input[type=submit],button[type=submit]:not(.button),button[type=button]:not(.button){width:auto}div+button{margin-top:16px}input[type=file]::-webkit-file-upload-button{border-radius:var(--zn-border-radius);display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(255,255,255,0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}input[type=file]::-webkit-file-upload-button:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=file]::-webkit-file-upload-button{margin-right:8px}input::-webkit-calendar-picker-indicator{cursor:pointer;padding:8px}input[list]::-webkit-calendar-picker-indicator{padding:8px 4px}.input--with-icon{position:relative}.input--with-icon zn-icon{padding:14px;position:absolute;top:50%;pointer-events:none;transform:translateY(-50%);left:8px;background-color:rgb(var(--zn-primary));color:rgb(var(--zn-text));border-radius:50%}.input--with-icon input{padding-left:40px}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-background-clip:text;-webkit-text-fill-color:rgb(var(--zn-text));-webkit-transition:background-color 5000s ease-in-out 0s;transition:background-color 5000s ease-in-out 0s;box-shadow:inset 0 0 20px 20px rgba(35,35,35,0.1607843137)}select{height:43px}.no-border{border:none !important}table:not(.remarkd-table){border-collapse:separate !important;border-spacing:0;width:100%;max-width:100%;table-layout:auto;text-align:left;font-family:var(--zn-font-sans);font-size:var(--zn-text-table-content-font-size);font-weight:var(--zn-text-table-content-font-weight);line-height:var(--zn-text-table-content-line-height);color:var(--zn-text-table-content-color);text-transform:var(--zn-text-table-content-transform)}table:not(.remarkd-table) thead{font-weight:var(--zn-font-weight-medium)}table:not(.remarkd-table) thead tr th{background-color:rgb(var(--zn-table-header-background-color))}table:not(.remarkd-table) tbody a{cursor:pointer;color:rgb(var(--zn-primary))}table:not(.remarkd-table) tbody tr td{border-top:1px solid rgb(var(--zn-border-color)) !important}table:not(.remarkd-table) tbody tr:first-of-type td{border-top:0 !important}table:not(.remarkd-table) th,table:not(.remarkd-table) td{padding:var(--zn-spacing-small) var(--zn-spacing-medium);min-width:90px;white-space:nowrap}table:not(.remarkd-table) td>span{white-space:normal}table:not(.remarkd-table) th{font-family:var(--zn-font-sans);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);color:var(--zn-text-button-label-color);text-transform:var(--zn-text-button-label-transform);text-transform:capitalize;border-bottom:1px solid rgb(var(--zn-border-color))}.zn-table-fixed{table-layout:fixed}.opacity-100{opacity:1}.opacity-90{opacity:0.9}.opacity-80{opacity:0.8}.opacity-60{opacity:0.6}.opacity-50{opacity:0.5}.opacity-40{opacity:0.4}.opacity-10{opacity:0.1}.air-datepicker-cell.-year-.-other-decade-,.air-datepicker-cell.-day-.-other-month-{color:var(--adp-color-other-month)}.air-datepicker-cell.-year-.-other-decade-:hover,.air-datepicker-cell.-day-.-other-month-:hover{color:var(--adp-color-other-month-hover)}.-disabled-.-focus-.air-datepicker-cell.-year-.-other-decade-,.-disabled-.-focus-.air-datepicker-cell.-day-.-other-month-{color:var(--adp-color-other-month)}.-selected-.air-datepicker-cell.-year-.-other-decade-,.-selected-.air-datepicker-cell.-day-.-other-month-{color:#fff;background:var(--adp-background-color-selected-other-month)}.-selected-.-focus-.air-datepicker-cell.-year-.-other-decade-,.-selected-.-focus-.air-datepicker-cell.-day-.-other-month-{background:var(--adp-background-color-selected-other-month-focused)}.-in-range-.air-datepicker-cell.-year-.-other-decade-,.-in-range-.air-datepicker-cell.-day-.-other-month-{background-color:var(--adp-background-color-in-range);color:var(--adp-color)}.-in-range-.-focus-.air-datepicker-cell.-year-.-other-decade-,.-in-range-.-focus-.air-datepicker-cell.-day-.-other-month-{background-color:var(--adp-background-color-in-range-focused)}.air-datepicker-cell.-year-.-other-decade-:empty,.air-datepicker-cell.-day-.-other-month-:empty{background:none;border:none}.air-datepicker-cell{border-radius:var(--adp-cell-border-radius);box-sizing:border-box;cursor:pointer;display:flex;position:relative;align-items:center;justify-content:center;z-index:1}.air-datepicker-cell.-focus-{background:var(--adp-cell-background-color-hover)}.air-datepicker-cell.-current-{color:var(--adp-color-current-date)}.air-datepicker-cell.-current-.-focus-{color:var(--adp-color)}.air-datepicker-cell.-current-.-in-range-{color:var(--adp-color-current-date)}.air-datepicker-cell.-disabled-{cursor:default;color:var(--adp-color-disabled)}.air-datepicker-cell.-disabled-.-focus-{color:var(--adp-color-disabled)}.air-datepicker-cell.-disabled-.-in-range-{color:var(--adp-color-disabled-in-range)}.air-datepicker-cell.-disabled-.-current-.-focus-{color:var(--adp-color-disabled)}.air-datepicker-cell.-in-range-{background:var(--adp-cell-background-color-in-range);border-radius:0}.air-datepicker-cell.-in-range-:hover,.air-datepicker-cell.-in-range-.-focus-{background:var(--adp-cell-background-color-in-range-hover)}.air-datepicker-cell.-range-from-{border:1px solid var(--adp-cell-border-color-in-range);background-color:var(--adp-cell-background-color-in-range);border-radius:var(--adp-cell-border-radius) 0 0 var(--adp-cell-border-radius)}.air-datepicker-cell.-range-to-{border:1px solid var(--adp-cell-border-color-in-range);background-color:var(--adp-cell-background-color-in-range);border-radius:0 var(--adp-cell-border-radius) var(--adp-cell-border-radius) 0}.air-datepicker-cell.-range-to-.-range-from-{border-radius:var(--adp-cell-border-radius)}.air-datepicker-cell.-selected-{color:#fff;border:none;background:var(--adp-cell-background-color-selected)}.air-datepicker-cell.-selected-.-current-{color:#fff;background:var(--adp-cell-background-color-selected)}.air-datepicker-cell.-selected-.-focus-{background:var(--adp-cell-background-color-selected-hover)}.air-datepicker-body{transition:all var(--adp-transition-duration) var(--adp-transition-ease)}.air-datepicker-body.-hidden-{display:none}.air-datepicker-body--day-names{display:grid;grid-template-columns:repeat(7,var(--adp-day-cell-width));margin:8px 0 3px}.air-datepicker-body--day-name{color:var(--adp-day-name-color);display:flex;align-items:center;justify-content:center;flex:1;text-align:center;text-transform:uppercase;font-size:0.8em}.air-datepicker-body--day-name.-clickable-{cursor:pointer}.air-datepicker-body--day-name.-clickable-:hover{color:var(--adp-day-name-color-hover)}.air-datepicker-body--cells{display:grid}.air-datepicker-body--cells.-days-{grid-template-columns:repeat(7,var(--adp-day-cell-width));grid-auto-rows:var(--adp-day-cell-height)}.air-datepicker-body--cells.-months-{grid-template-columns:repeat(3,1fr);grid-auto-rows:var(--adp-month-cell-height)}.air-datepicker-body--cells.-years-{grid-template-columns:repeat(4,1fr);grid-auto-rows:var(--adp-year-cell-height)}.air-datepicker-nav{display:flex;justify-content:space-between;border-bottom:1px solid var(--adp-border-color-inner);min-height:var(--adp-nav-height);padding:var(--adp-padding);box-sizing:content-box}.-only-timepicker- .air-datepicker-nav{display:none}.air-datepicker-nav--title,.air-datepicker-nav--action{display:flex;cursor:pointer;align-items:center;justify-content:center}.air-datepicker-nav--action{width:var(--adp-nav-action-size);border-radius:var(--adp-border-radius);-webkit-user-select:none;-moz-user-select:none;user-select:none}.air-datepicker-nav--action:hover{background:var(--adp-background-color-hover)}.air-datepicker-nav--action:active{background:var(--adp-background-color-active)}.air-datepicker-nav--action.-disabled-{visibility:hidden}.air-datepicker-nav--action svg{width:32px;height:32px}.air-datepicker-nav--action path{fill:none;stroke:var(--adp-nav-arrow-color);stroke-width:2px}.air-datepicker-nav--title{border-radius:var(--adp-border-radius);padding:0 8px}.air-datepicker-nav--title i{font-style:normal;color:var(--adp-nav-color-secondary);margin-left:0.3em}.air-datepicker-nav--title:hover{background:var(--adp-background-color-hover)}.air-datepicker-nav--title:active{background:var(--adp-background-color-active)}.air-datepicker-nav--title.-disabled-{cursor:default;background:none}.air-datepicker-buttons{display:grid;grid-auto-columns:1fr;grid-auto-flow:column}.air-datepicker-button{display:inline-flex;color:var(--adp-btn-color);border-radius:var(--adp-btn-border-radius);cursor:pointer;height:var(--adp-btn-height);border:none;background:rgba(255,255,255,0)}.air-datepicker-button:hover{color:var(--adp-btn-color-hover);background:var(--adp-btn-background-color-hover)}.air-datepicker-button:focus{color:var(--adp-btn-color-hover);background:var(--adp-btn-background-color-hover);outline:none}.air-datepicker-button:active{background:var(--adp-btn-background-color-active)}.air-datepicker-button span{outline:none;display:flex;align-items:center;justify-content:center;width:100%;height:100%}.air-datepicker-time{display:grid;grid-template-columns:max-content 1fr;grid-column-gap:12px;align-items:center;position:relative;padding:0 var(--adp-time-padding-inner)}.-only-timepicker- .air-datepicker-time{border-top:none}.air-datepicker-time--current{display:flex;align-items:center;flex:1;font-size:14px;text-align:center}.air-datepicker-time--current-colon{margin:0 2px 3px;line-height:1}.air-datepicker-time--current-hours,.air-datepicker-time--current-minutes{line-height:1;font-size:19px;font-family:"Century Gothic",CenturyGothic,AppleGothic,sans-serif;position:relative;z-index:1}.air-datepicker-time--current-hours:after,.air-datepicker-time--current-minutes:after{content:"";background:var(--adp-background-color-hover);border-radius:var(--adp-border-radius);position:absolute;left:-2px;top:-3px;right:-2px;bottom:-2px;z-index:-1;opacity:0}.air-datepicker-time--current-hours.-focus-:after,.air-datepicker-time--current-minutes.-focus-:after{opacity:1}.air-datepicker-time--current-ampm{text-transform:uppercase;align-self:flex-end;color:var(--adp-time-day-period-color);margin-left:6px;font-size:11px;margin-bottom:1px}.air-datepicker-time--row{display:flex;align-items:center;font-size:11px;height:17px;background:linear-gradient(to right,var(--adp-time-track-color),var(--adp-time-track-color)) left 50%/100% var(--adp-time-track-height) no-repeat}.air-datepicker-time--row:first-child{margin-bottom:4px}.air-datepicker-time--row input[type=range]{background:none;cursor:pointer;flex:1;height:100%;width:100%;padding:0;margin:0;-webkit-appearance:none}.air-datepicker-time--row input[type=range]::-webkit-slider-thumb{-webkit-appearance:none}.air-datepicker-time--row input[type=range]::-ms-tooltip{display:none}.air-datepicker-time--row input[type=range]:hover::-webkit-slider-thumb{border-color:var(--adp-time-track-color-hover)}.air-datepicker-time--row input[type=range]:hover::-moz-range-thumb{border-color:var(--adp-time-track-color-hover)}.air-datepicker-time--row input[type=range]:hover::-ms-thumb{border-color:var(--adp-time-track-color-hover)}.air-datepicker-time--row input[type=range]:focus{outline:none}.air-datepicker-time--row input[type=range]:focus::-webkit-slider-thumb{background:var(--adp-cell-background-color-selected);border-color:var(--adp-cell-background-color-selected)}.air-datepicker-time--row input[type=range]:focus::-moz-range-thumb{background:var(--adp-cell-background-color-selected);border-color:var(--adp-cell-background-color-selected)}.air-datepicker-time--row input[type=range]:focus::-ms-thumb{background:var(--adp-cell-background-color-selected);border-color:var(--adp-cell-background-color-selected)}.air-datepicker-time--row input[type=range]::-webkit-slider-thumb{box-sizing:border-box;height:12px;width:12px;border-radius:3px;border:1px solid var(--adp-time-track-color);background:#fff;cursor:pointer;-webkit-transition:background var(--adp-transition-duration);transition:background var(--adp-transition-duration)}.air-datepicker-time--row input[type=range]::-moz-range-thumb{box-sizing:border-box;height:12px;width:12px;border-radius:3px;border:1px solid var(--adp-time-track-color);background:#fff;cursor:pointer;-moz-transition:background var(--adp-transition-duration);transition:background var(--adp-transition-duration)}.air-datepicker-time--row input[type=range]::-ms-thumb{box-sizing:border-box;height:12px;width:12px;border-radius:3px;border:1px solid var(--adp-time-track-color);background:#fff;cursor:pointer;-ms-transition:background var(--adp-transition-duration);transition:background var(--adp-transition-duration)}.air-datepicker-time--row input[type=range]::-webkit-slider-thumb{margin-top:calc(var(--adp-time-thumb-size) / 2 * -1)}.air-datepicker-time--row input[type=range]::-webkit-slider-runnable-track{border:none;height:var(--adp-time-track-height);cursor:pointer;color:rgba(0,0,0,0);background:rgba(0,0,0,0)}.air-datepicker-time--row input[type=range]::-moz-range-track{border:none;height:var(--adp-time-track-height);cursor:pointer;color:rgba(0,0,0,0);background:rgba(0,0,0,0)}.air-datepicker-time--row input[type=range]::-ms-track{border:none;height:var(--adp-time-track-height);cursor:pointer;color:rgba(0,0,0,0);background:rgba(0,0,0,0)}.air-datepicker-time--row input[type=range]::-ms-fill-lower{background:rgba(0,0,0,0)}.air-datepicker-time--row input[type=range]::-ms-fill-upper{background:rgba(0,0,0,0)}.air-datepicker{--adp-font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--adp-font-size:14px;--adp-width:246px;--adp-z-index:100;--adp-padding:4px;--adp-grid-areas:"nav" "body" "timepicker" "buttons";--adp-transition-duration:.3s;--adp-transition-ease:ease-out;--adp-transition-offset:8px;--adp-background-color:#fff;--adp-background-color-hover:#f0f0f0;--adp-background-color-active:#eaeaea;--adp-background-color-in-range:rgba(92,196,239,.1);--adp-background-color-in-range-focused:rgba(92,196,239,.2);--adp-background-color-selected-other-month-focused:#8ad5f4;--adp-background-color-selected-other-month:#a2ddf6;--adp-color:#4a4a4a;--adp-color-secondary:#9c9c9c;--adp-accent-color:#4eb5e6;--adp-color-current-date:var(--adp-accent-color);--adp-color-other-month:#dedede;--adp-color-disabled:#aeaeae;--adp-color-disabled-in-range:#939393;--adp-color-other-month-hover:#c5c5c5;--adp-border-color:#dbdbdb;--adp-border-color-inner:#efefef;--adp-border-radius:4px;--adp-border-color-inline:#d7d7d7;--adp-nav-height:32px;--adp-nav-arrow-color:var(--adp-color-secondary);--adp-nav-action-size:32px;--adp-nav-color-secondary:var(--adp-color-secondary);--adp-day-name-color:#ff9a19;--adp-day-name-color-hover:#8ad5f4;--adp-day-cell-width:1fr;--adp-day-cell-height:32px;--adp-month-cell-height:42px;--adp-year-cell-height:56px;--adp-pointer-size:10px;--adp-poiner-border-radius:2px;--adp-pointer-offset:14px;--adp-cell-border-radius:4px;--adp-cell-background-color-hover:var(--adp-background-color-hover);--adp-cell-background-color-selected:#5cc4ef;--adp-cell-background-color-selected-hover:#45bced;--adp-cell-background-color-in-range:rgba(92,196,239,0.1);--adp-cell-background-color-in-range-hover:rgba(92,196,239,0.2);--adp-cell-border-color-in-range:var(--adp-cell-background-color-selected);--adp-btn-height:32px;--adp-btn-color:var(--adp-accent-color);--adp-btn-color-hover:var(--adp-color);--adp-btn-border-radius:var(--adp-border-radius);--adp-btn-background-color-hover:var(--adp-background-color-hover);--adp-btn-background-color-active:var(--adp-background-color-active);--adp-time-track-height:1px;--adp-time-track-color:#dedede;--adp-time-track-color-hover:#b1b1b1;--adp-time-thumb-size:12px;--adp-time-padding-inner:10px;--adp-time-day-period-color:var(--adp-color-secondary);--adp-mobile-font-size:16px;--adp-mobile-nav-height:40px;--adp-mobile-width:320px;--adp-mobile-day-cell-height:38px;--adp-mobile-month-cell-height:48px;--adp-mobile-year-cell-height:64px}.air-datepicker-overlay{--adp-overlay-background-color:rgba(0,0,0,.3);--adp-overlay-transition-duration:.3s;--adp-overlay-transition-ease:ease-out;--adp-overlay-z-index:99}.air-datepicker{background:var(--adp-background-color);border:1px solid var(--adp-border-color);box-shadow:0 4px 12px rgba(0,0,0,0.15);border-radius:var(--adp-border-radius);box-sizing:content-box;display:grid;grid-template-columns:1fr;grid-template-rows:repeat(4,max-content);grid-template-areas:var(--adp-grid-areas);font-family:var(--adp-font-family),sans-serif;font-size:var(--adp-font-size);color:var(--adp-color);width:var(--adp-width);position:absolute;transition:opacity var(--adp-transition-duration) var(--adp-transition-ease),transform var(--adp-transition-duration) var(--adp-transition-ease);z-index:var(--adp-z-index)}.air-datepicker:not(.-custom-position-){opacity:0}.air-datepicker.-from-top-{transform:translateY(calc(var(--adp-transition-offset) * -1))}.air-datepicker.-from-right-{transform:translateX(var(--adp-transition-offset))}.air-datepicker.-from-bottom-{transform:translateY(var(--adp-transition-offset))}.air-datepicker.-from-left-{transform:translateX(calc(var(--adp-transition-offset) * -1))}.air-datepicker.-active-:not(.-custom-position-){transform:translate(0,0);opacity:1}.air-datepicker.-active-.-custom-position-{transition:none}.air-datepicker.-inline-{border-color:var(--adp-border-color-inline);box-shadow:none;position:static;left:auto;right:auto;opacity:1;transform:none}.air-datepicker.-inline- .air-datepicker--pointer{display:none}.air-datepicker.-is-mobile-{--adp-font-size:var(--adp-mobile-font-size);--adp-day-cell-height:var(--adp-mobile-day-cell-height);--adp-month-cell-height:var(--adp-mobile-month-cell-height);--adp-year-cell-height:var(--adp-mobile-year-cell-height);--adp-nav-height:var(--adp-mobile-nav-height);--adp-nav-action-size:var(--adp-mobile-nav-height);position:fixed;width:var(--adp-mobile-width);border:none}.air-datepicker.-is-mobile- *{-webkit-tap-highlight-color:rgba(0,0,0,0)}.air-datepicker.-is-mobile- .air-datepicker--pointer{display:none}.air-datepicker.-is-mobile-:not(.-custom-position-){transform:translate(-50%,calc(-50% + var(--adp-transition-offset)))}.air-datepicker.-is-mobile-.-active-:not(.-custom-position-){transform:translate(-50%,-50%)}.air-datepicker.-custom-position-{transition:none}.air-datepicker-global-container{position:absolute;left:0;top:0}.air-datepicker--pointer{--pointer-half-size:calc(var(--adp-pointer-size) / 2);position:absolute;width:var(--adp-pointer-size);height:var(--adp-pointer-size);z-index:-1}.air-datepicker--pointer:after{content:"";position:absolute;background:#fff;border-top:1px solid var(--adp-border-color-inline);border-right:1px solid var(--adp-border-color-inline);border-top-right-radius:var(--adp-poiner-border-radius);width:var(--adp-pointer-size);height:var(--adp-pointer-size);box-sizing:border-box}.-top-left- .air-datepicker--pointer,.-top-center- .air-datepicker--pointer,.-top-right- .air-datepicker--pointer,[data-popper-placement^=top] .air-datepicker--pointer{top:calc(100% - var(--pointer-half-size) + 1px)}.-top-left- .air-datepicker--pointer:after,.-top-center- .air-datepicker--pointer:after,.-top-right- .air-datepicker--pointer:after,[data-popper-placement^=top] .air-datepicker--pointer:after{transform:rotate(135deg)}.-right-top- .air-datepicker--pointer,.-right-center- .air-datepicker--pointer,.-right-bottom- .air-datepicker--pointer,[data-popper-placement^=right] .air-datepicker--pointer{right:calc(100% - var(--pointer-half-size) + 1px)}.-right-top- .air-datepicker--pointer:after,.-right-center- .air-datepicker--pointer:after,.-right-bottom- .air-datepicker--pointer:after,[data-popper-placement^=right] .air-datepicker--pointer:after{transform:rotate(225deg)}.-bottom-left- .air-datepicker--pointer,.-bottom-center- .air-datepicker--pointer,.-bottom-right- .air-datepicker--pointer,[data-popper-placement^=bottom] .air-datepicker--pointer{bottom:calc(100% - var(--pointer-half-size) + 1px)}.-bottom-left- .air-datepicker--pointer:after,.-bottom-center- .air-datepicker--pointer:after,.-bottom-right- .air-datepicker--pointer:after,[data-popper-placement^=bottom] .air-datepicker--pointer:after{transform:rotate(315deg)}.-left-top- .air-datepicker--pointer,.-left-center- .air-datepicker--pointer,.-left-bottom- .air-datepicker--pointer,[data-popper-placement^=left] .air-datepicker--pointer{left:calc(100% - var(--pointer-half-size) + 1px)}.-left-top- .air-datepicker--pointer:after,.-left-center- .air-datepicker--pointer:after,.-left-bottom- .air-datepicker--pointer:after,[data-popper-placement^=left] .air-datepicker--pointer:after{transform:rotate(45deg)}.-top-left- .air-datepicker--pointer,.-bottom-left- .air-datepicker--pointer{left:var(--adp-pointer-offset)}.-top-right- .air-datepicker--pointer,.-bottom-right- .air-datepicker--pointer{right:var(--adp-pointer-offset)}.-top-center- .air-datepicker--pointer,.-bottom-center- .air-datepicker--pointer{left:calc(50% - var(--adp-pointer-size) / 2)}.-left-top- .air-datepicker--pointer,.-right-top- .air-datepicker--pointer{top:var(--adp-pointer-offset)}.-left-bottom- .air-datepicker--pointer,.-right-bottom- .air-datepicker--pointer{bottom:var(--adp-pointer-offset)}.-left-center- .air-datepicker--pointer,.-right-center- .air-datepicker--pointer{top:calc(50% - var(--adp-pointer-size) / 2)}.air-datepicker--navigation{grid-area:nav}.air-datepicker--content{box-sizing:content-box;padding:var(--adp-padding);grid-area:body}.-only-timepicker- .air-datepicker--content{display:none}.air-datepicker--time{grid-area:timepicker}.air-datepicker--buttons{grid-area:buttons}.air-datepicker--buttons,.air-datepicker--time{padding:var(--adp-padding);border-top:1px solid var(--adp-border-color-inner)}.air-datepicker-overlay{position:fixed;background:var(--adp-overlay-background-color);left:0;top:0;width:0;height:0;opacity:0;transition:opacity var(--adp-overlay-transition-duration) var(--adp-overlay-transition-ease),left 0s,height 0s,width 0s;transition-delay:0s,var(--adp-overlay-transition-duration),var(--adp-overlay-transition-duration),var(--adp-overlay-transition-duration);z-index:var(--adp-overlay-z-index)}.air-datepicker-overlay.-active-{opacity:1;width:100%;height:100%;transition:opacity var(--adp-overlay-transition-duration) var(--adp-overlay-transition-ease),height 0s,width 0s}.air-datepicker{--adp-color:rgba(var(--zn-text),var(--zn-text-opacity));--adp-nav-color-secondary:rgb(var(--zn-purple-text));--adp-day-name-color:var(--zn-color-primary-600);--adp-day-name-color-hover:var(--zn-color-primary-700);--adp-cell-background-color-selected:var(--zn-color-primary-600);--adp-cell-background-color-selected-hover:var(--zn-color-primary-700);--adp-color-current-date:var(--zn-color-primary-600);--adp-background-color:var(--zn-input-background-color);--adp-background-color-hover:var(--zn-input-background-color-hover);--adp-background-color-active:var(--zn-input-background-color-hover);--adp-background-color-selected-other-month:var(--zn-color-primary-300);--adp-background-color-in-range:var(--zn-color-primary-100);--adp-border-color:rgb(var(--zn-border-color));--adp-border-color-inline:rgb(var(--zn-border-color));--adp-border-color-inner:rgb(var(--zn-border-color));--adp-cell-background-color-in-range:var(--zn-color-primary-100);--adp-cell-background-color-in-range-hover:var(--zn-color-primary-200)}.air-datepicker--pointer:after{background-color:var(--zn-input-background-color)}.air-datepicker-global-container{z-index:1000000}.air-datepicker-button{border:none;padding:var(--zn-spacing-2x-small) var(--zn-spacing-x-small);border-radius:var(--adp-border-radius);font-family:var(--adp-font-family),sans-serif;font-size:var(--zn-font-size-medium);font-weight:var(--zn-font-weight-normal);cursor:pointer;color:rgba(var(--zn-text),var(--zn-text-opacity))}.air-datepicker-button:hover{background-color:var(--zn-input-background-color-hover) !important}.zn-cloak:has(:not(:defined)){animation:2s step-end zn-cloak}@keyframes zn-cloak{from{opacity:0}to{opacity:1}}:host ::-webkit-scrollbar{width:5px;height:5px}:host{}:host ::-webkit-scrollbar-track{background:transparent}:host{}:host ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}:host{}:host ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}:host{display:contents}#mid,#content{flex:1;display:flex;flex-direction:column;overflow:hidden}.tabs{flex:1;display:flex;flex-direction:column;overflow:hidden;height:100%;min-height:100%;max-height:100%;width:100%}h1,h2{padding:0;margin:0}#mid{container-type:inline-size;flex-direction:row}#content{flex:1;max-height:100%;min-height:15px;padding:var(--zn-base-gap,0)}#content ::-webkit-scrollbar{width:5px;height:5px}#content{}#content ::-webkit-scrollbar-track{background:transparent}#content{}#content ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}#content{}#content ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}#content{display:flex;align-items:normal;overflow:auto}#content>::slotted(div),#content>div{max-height:100%}:host([no-scroll]) #content{overflow:hidden}:host([no-scroll]) #content>div{max-height:100%}:host([no-scroll]) #content>::slotted(div){max-height:100%}:host([flush]) #content{padding:0}:host([flush-x]) #content{padding-left:0;padding-right:0}#content.contents-slot slot{display:contents}#content ::slotted([selected]),#content>[selected]{flex-grow:1}#content ::slotted(:not([selected])),#content>:not([selected]):not(slot){display:none !important}:host #header~slot[name=top]::slotted(zn-navbar){padding-top:0}:host #header:not(:empty){display:flex;align-items:center;padding:var(--zn-spacing-medium);gap:var(--zn-spacing-medium)}:host #header:not(:empty) #actions ::slotted(*:not(.zn-tb-active)){display:none}:host #header:not(:empty) #actions{display:flex;overflow:visible}:host #header:not(:empty) h1,:host #header:not(:empty) h2{flex-grow:1}:host h2{font-weight:var(--zn-font-weight-bold);flex-grow:1;font-size:var(--zn-font-size-medium);color:rgba(var(--zn-text-panel-title),100%);padding:0;margin:0}::slotted(div[ref-tab]:not(.zn-tb-active)){display:none}`;var ld="zn-tabs, zn-page, zn-page-nav",Dt=class extends C{constructor(){super();this.defaultUri="";this._current="";this._splitMin=60;this.primaryCaption="Navigation";this.secondaryCaption="Content";this.noPrefetch=!1;this.noCache=!1;this.storeTtl=0;this.padded=!1;this.fetchStyle="";this.fullWidth=!1;this.paddedRight=!1;this.preload=!0;this._activeClicks=0;this._activeTab=null;this._tabs=[];this._actions=[];this._knownUri=new Map;this._defaultTab="";this.hasSlotController=new Q(this,"[default]","bottom","right","left","top","actions");this._domObserver=new Lt(this,{target:null,config:{childList:!0,subtree:!0},callback:t=>{t.forEach(r=>{r.type==="childList"&&(r.addedNodes.length>0&&this._registerTabs(),r.removedNodes.length>0&&r.removedNodes.forEach(n=>{let a=n instanceof HTMLElement?n.id:"";a&&this.removeTabAndPanel(a)}))})}});this._monitorObserver=new Lt(this,{target:null,config:{childList:!0,subtree:!0},callback:t=>{t.forEach(r=>{r.type==="childList"&&r.addedNodes.forEach(n=>{if(n instanceof HTMLElement&&n.id===this.monitor){this.reRegisterTabs();let a=this.getStoredTab();a!==null&&this.restoreStoredTab(a)}})})}});this.handlePopState=()=>{let t=this.getTabStoreKey();if(t===null)return;let r=su(t);r!==null&&this.restoreStoredTab(r)};this.reRegisterTabs=()=>{this._registerTabs()};this._registerTabs=()=>{Rt("[tab]",this,ld).forEach(t=>{this._addTab(t)}),Rt("[tab-uri]",this,ld).forEach(t=>{t.getAttribute("tab-uri")===""&&(t.setAttribute("tab",""),t.removeAttribute("tab-uri")),this._addTab(t)}),Rt("[ref-tab-uri]",this,ld).forEach(t=>{t.hasAttribute("ref-tab")||(t.setAttribute("ref-tab",this._uriToId(t.getAttribute("ref-tab-uri"))),t.removeAttribute("ref-tab-uri"),this._actions.push(t))})};this._panels=new Map}async connectedCallback(){super.connectedCallback(),this.masterId||(this.masterId=this.storeKey||Math.floor(Math.random()*1e6).toString()),this.preload=!this.noPrefetch&&!this.noCache,await this.updateComplete,this._panel=this.shadowRoot?.querySelector("#content"),this.observerDom(),this._registerTabs(),this.storeKey&&this.storeTtl===0&&(this.storeTtl=300);let t=this.defaultUri?this._uriToId(this.defaultUri):"";this._store=new hr(this.localStorage?window.localStorage:window.sessionStorage,id,this.storeTtl),Array.from(this.children).forEach(r=>{r.slot===""&&this._panels.set(r.getAttribute("id")||t,[r])}),this.observerDom(),this.monitorDom(),window.addEventListener("popstate",this.handlePopState,{passive:!0})}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("popstate",this.handlePopState),setTimeout(()=>{this.isConnected||sd()})}monitorDom(){this.monitor&&this._monitorObserver.observe(this)}getTabStoreKey(){return this.storeKey||null}getStoredTab(){let t=this.getTabStoreKey();if(t===null||!this._store)return null;if(this.localStorage)return this._store.get(t);let r=this._store.get(ad(t));if(r===null)return null;let n=su(t);return n!==null?n:Iv()?r:null}storeActiveTab(t){let r=this.getTabStoreKey();if(r===null||!this._store)return;let n=this.getUriForTabId(t)??t;this._store.set(this.localStorage?r:ad(r),n),this.localStorage||Ov(r,n)}restoreStoredTab(t){let r=this._tabs.find(n=>n.getAttribute("tab-uri")===t);if(r){this.clickTab(r,!1);return}this._prepareTab(t),this.setActiveTab(t,!0,!1)}activateDefaultTab(){if(!this._panels.has(this._defaultTab)&&this._tabs.length>0&&this._tabs[0].getAttribute("tab-uri")){this.clickTab(this._tabs[0],!1);return}this.setActiveTab(this._defaultTab,!0,!1)}pushTabHistory(t){let r=this.getTabStoreKey();r===null||this.localStorage||Rv(r,this.getUriForTabId(t)??t)}getUriForTabId(t){for(let[r,n]of this._knownUri)if(n===t)return r;return null}_addPanel(t){this._panels.has(t.getAttribute("id"))||this._panels.set(t.getAttribute("id"),[t])}_addTab(t){this._tabs.includes(t)||(this._tabs.push(t),this.preload&&t.addEventListener("mouseover",this.fetchUriTab.bind(this,t)),t.addEventListener("click",this._handleClick.bind(this)))}firstUpdated(t){super.firstUpdated(t),setTimeout(()=>{this._registerTabs(),this._defaultTab=this._current||"";let r=this.getStoredTab();if(r!==null){this.restoreStoredTab(r);return}this.activateDefaultTab()},10),this.addEventListener("zn-menu-select",()=>{setTimeout(this.reRegisterTabs,200)},{passive:!0})}switchTab(t){let r=this._panels.size;if(r<2)return;let a=Array.from(this._panels.keys()).indexOf(this._current)+t;a<0?a=r-1:a>=r&&(a=0);let s=Array.from(this._panels.keys())[a];this.setActiveTab(s,!0,!1,null,!0)}nextTab(){this.switchTab(1)}previousTab(){this.switchTab(-1)}_prepareTab(t){for(let r of this._tabs)if(r.getAttribute("tab")===t)return;for(let r of Rt("[tab-uri]",this,ld)){let n=r.getAttribute("tab-uri"),a=this._uriToId(n);a===t&&this._createUriPanel(r,n,a)}}_uriToId(t){return"tab-"+od(t).substr(0,8)+"-"+this.masterId}_createUriPanel(t,r,n){if(t.hasAttribute("tab")||(t.setAttribute("tab",n),this._setTabEleActive(t,this._current===n)),this._knownUri.has(r)||this._knownUri.set(r,n),this._panels.has(n)&&this._panels.get(n)!==void 0)return this._panels.get(n)[0];let a=document.createElement("div");return a.setAttribute("id",n),this.fetchStyle!==""?a.setAttribute("data-fetch-style",this.fetchStyle):t.hasAttribute("data-fetch-style")&&a.setAttribute("data-fetch-style",t.getAttribute("data-fetch-style")??""),a.setAttribute("data-self-uri",r),a.textContent="Loading ...",this._panel instanceof HTMLElement&&(this._panel.appendChild(a),this._panels.set(n,[a])),document.dispatchEvent(new CustomEvent("zn-new-element",{detail:{element:a,source:t}})),a}_handleClick(t){let r=t.relatedTarget??t.target;r&&("startViewTransition"in document?document.startViewTransition(()=>this.clickTab(r,t.altKey,!0)):this.clickTab(r,t.altKey,!0))}fetchUriTab(t){if(!t.hasAttribute("tab")&&t.hasAttribute("tab-uri")){let r=t.getAttribute("tab-uri")??"";this._createUriPanel(t,r,this._uriToId(r)),t.setAttribute("tab-id",this._uriToId(r))}}clickTab(t,r,n=!1){let a=t.getAttribute("tab-uri"),s=!!a&&this._panels.has(this._uriToId(a));if(this.fetchUriTab(t),t.hasAttribute("tab")){let l=r||this.noCache&&s;setTimeout(()=>{this.setActiveTab(t.getAttribute("tab")||"",!0,l,this.getRefTab(t),n)},10)}}getRefTab(t){let r=t;for(;r;){if(r===this)return null;if(r.hasAttribute("ref-tab"))return r.getAttribute("ref-tab");r=r?.parentElement||r?.getRootNode()?.host}return null}setActiveTab(t,r,n,a=null,s=!1){let l=this._current,d=!1;this._tabs.forEach(h=>{h.hasAttribute("tab-uri")&&this._knownUri.has(h.getAttribute("tab-uri"))&&h.setAttribute("tab",this._knownUri.get(h.getAttribute("tab-uri")));let m=t===h.getAttribute("tab");!m&&a&&!this.getRefTab(h)&&(m=a===h.getAttribute("tab")),d=d||m,this._setTabEleActive(h,m)}),!d&&this._tabs.length>0&&this._setTabEleActive(this._tabs[0],!0),this._actions.forEach(h=>this._setTabEleActive(h,h.getAttribute("ref-tab")===(a||t))),this.selectTab(t,n),s&&this._current===t&&l!==t&&this.pushTabHistory(t),r&&this.storeActiveTab(t)}_setTabEleActive(t,r){r&&(this._activeTab=t),t.classList.toggle("zn-tb-active",r),t.classList.toggle("active",r)}selectTab(t,r){if(t&&!this._panels.has(t))return!1;this._current===t?(this._activeClicks++,this._activeClicks>2&&(r=!0,this._activeClicks=0)):this._activeClicks=0;let a=!0;return this._panels.forEach((l,d)=>{let h=d===t;l.forEach(m=>{if(h&&m.parentNode!==this&&(a=!1),m.toggleAttribute("selected",h),h&&r){let f="",b="";this._activeTab&&this._activeTab.hasAttribute("tab-uri")&&(f=this._activeTab.getAttribute("tab-uri"),b=this._activeTab.getAttribute("gaid")),document.dispatchEvent(new CustomEvent("zn-refresh-element",{detail:{element:m,uri:f,gaid:b}}))}})}),this._panel&&this._panel.classList.toggle("contents-slot",!a),this._current=t,!0}getActiveTab(){return this._panels.get(this._current)||[]}observerDom(){this._domObserver.observe(this)}removeTabAndPanel(t){this._current===t&&this.setActiveTab("",!0,!1);for(let r of this._tabs)if(r.getAttribute("tab")===t){if(r.hasAttribute("tab-uri")){let n=r.getAttribute("tab-uri");this._knownUri.has(n)&&this._knownUri.delete(n)}r.parentElement?.removeChild(r),this._tabs.splice(this._tabs.indexOf(r),1)}if(this._panels.has(t)){let r=this._panels.get(t);r instanceof HTMLElement?r.remove():r instanceof Array&&r.forEach(n=>{n instanceof HTMLElement&&n.remove()}),this._panels.delete(t)}}render(){let t=this.hasSlotController.test("actions"),r=this.caption&&this.caption.length>0,n=this.description&&this.description.length>0,a=r||t||n;if(this._split>0){let s=this.storeKey;s&&(s+="-split");let l="secondary";return this.querySelectorAll('[slot="right"]').length>0&&(l="primary"),u`
|
|
1558
1558
|
<slot name="top"></slot>
|
|
1559
1559
|
<div id="mid">
|
|
1560
1560
|
<zn-split-pane
|
|
@@ -1887,7 +1887,7 @@ import{a as En,b as E_,c as pr,d as c,e as B}from"./chunks/zn.UBLZO6CI.js";var b
|
|
|
1887
1887
|
</zn-dialog>
|
|
1888
1888
|
`:V}
|
|
1889
1889
|
|
|
1890
|
-
</div>`}};zt.styles=E(Fv),zt.dependencies={"zn-icon":ct,"zn-button":Ct,"zn-dialog":ia,"zn-input":ke,"zn-select":le,"zn-option":Re},zt.freeInputLibraries=new Set(["gravatar","libravatar","avatar"]),c([p()],zt.prototype,"name",2),c([p()],zt.prototype,"icon",2),c([p()],zt.prototype,"label",2),c([p()],zt.prototype,"library",2),c([p()],zt.prototype,"color",2),c([p({type:Boolean,attribute:"no-color"})],zt.prototype,"noColor",2),c([p({type:Boolean,attribute:"no-library"})],zt.prototype,"noLibrary",2),c([p({attribute:"help-text"})],zt.prototype,"helpText",2),c([p({type:Boolean,reflect:!0})],zt.prototype,"disabled",2),c([p({type:Boolean,reflect:!0})],zt.prototype,"required",2),c([p({type:Boolean,attribute:"trigger-submit"})],zt.prototype,"triggerSubmit",2),c([p({type:Boolean,attribute:"allow-upload"})],zt.prototype,"allowUpload",2),c([p()],zt.prototype,"accept",2),c([p({reflect:!0})],zt.prototype,"form",2),c([ee()],zt.prototype,"defaultValue",2),c([O()],zt.prototype,"_dialogOpen",2),c([O()],zt.prototype,"_searchQuery",2),c([O()],zt.prototype,"_iconList",2),c([O()],zt.prototype,"_filteredIcons",2),c([O()],zt.prototype,"_pendingIcon",2),c([O()],zt.prototype,"_pendingLibrary",2),c([O()],zt.prototype,"_pendingColor",2),c([O()],zt.prototype,"_pendingFile",2),c([O()],zt.prototype,"_pendingFileUrl",2),c([O()],zt.prototype,"_mode",2),c([O()],zt.prototype,"_file",2),c([O()],zt.prototype,"_fileUrl",2),c([F("zn-dialog")],zt.prototype,"_dialog",2),c([F(".icon-picker__file-input")],zt.prototype,"_fileInput",2);var Ka=zt;var U3=Ka;Ka.define("zn-icon-picker");var Bv=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}button,.zn-button{border-radius:var(--zn-border-radius);display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:-moz-fit-content;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(255,255,255,0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}button:hover:not([disabled]),.zn-button:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=date],input[type=datetime-local],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],input[type=file],input[list],textarea,select{display:block;width:100%;border-radius:5px;border-style:solid;border-width:1px !important;border-color:rgb(var(--zn-border-color));background-color:rgb(var(--zn-input-bg));outline:none}input[type=date]:focus,input[type=datetime-local]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus,input[type=file]:focus,input[list]:focus,textarea:focus,select:focus{border-color:rgb(var(--zn-primary));box-shadow:0 0 0 3px rgba(var(--zn-primary),0.3)}input[type=date]::-moz-placeholder, input[type=datetime-local]::-moz-placeholder, input[type=email]::-moz-placeholder, input[type=month]::-moz-placeholder, input[type=number]::-moz-placeholder, input[type=password]::-moz-placeholder, input[type=search]::-moz-placeholder, input[type=tel]::-moz-placeholder, input[type=text]::-moz-placeholder, input[type=time]::-moz-placeholder, input[type=url]::-moz-placeholder, input[type=week]::-moz-placeholder, input[type=file]::-moz-placeholder, input[list]::-moz-placeholder, textarea::-moz-placeholder, select::-moz-placeholder{font-weight:400;color:rgba(var(--zn-text),0.6)}input[type=date]::placeholder,input[type=datetime-local]::placeholder,input[type=email]::placeholder,input[type=month]::placeholder,input[type=number]::placeholder,input[type=password]::placeholder,input[type=search]::placeholder,input[type=tel]::placeholder,input[type=text]::placeholder,input[type=time]::placeholder,input[type=url]::placeholder,input[type=week]::placeholder,input[type=file]::placeholder,input[list]::placeholder,textarea::placeholder,select::placeholder{font-weight:400;color:rgba(var(--zn-text),0.6)}@media (min-width:360px){input[type=date],input[type=datetime-local],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],input[type=file],input[list],textarea,select{padding:8px}}label{font-weight:600;font-size:rgb(var(--zn-font-size-medium));line-height:var(--zn-spacing-medium);color:rgb(var(--zn-text-heading));display:block;margin-bottom:4px;margin-top:16px}input[type=checkbox],input[type=radio]{border-radius:5px}input[type=radio]{border-radius:50%}input[type=range]{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:10px;background-color:rgb(var(--zn-border-color));height:8px;accent-color:rgb(var(--zn-primary));width:100%;max-width:768px}fieldset{border-color:rgba(var(--zn-primary),20%);border-width:2px;padding:0 16px 16px}select option{padding:4px}select>option:checked{background-color:rgba(var(--zn-primary),20%);border-radius:5px}fieldset>legend{padding:4px}input[type=button],input[type=submit],button[type=submit]:not(.button),button[type=button]:not(.button){border-radius:var(--zn-border-radius);display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:-moz-fit-content;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(255,255,255,0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}input[type=button]:hover:not([disabled]),input[type=submit]:hover:not([disabled]),button[type=submit]:not(.button):hover:not([disabled]),button[type=button]:not(.button):hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=button],input[type=submit],button[type=submit]:not(.button),button[type=button]:not(.button){width:auto}div+button{margin-top:16px}input[type=file]::-webkit-file-upload-button{border-radius:var(--zn-border-radius);display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(255,255,255,0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}input[type=file]::-webkit-file-upload-button:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=file]::-webkit-file-upload-button{margin-right:8px}input::-webkit-calendar-picker-indicator{cursor:pointer;padding:8px}input[list]::-webkit-calendar-picker-indicator{padding:8px 4px}.input--with-icon{position:relative}.input--with-icon zn-icon{padding:14px;position:absolute;top:50%;pointer-events:none;transform:translateY(-50%);left:8px;background-color:rgb(var(--zn-primary));color:rgb(var(--zn-text));border-radius:50%}.input--with-icon input{padding-left:40px}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-background-clip:text;-webkit-text-fill-color:rgb(var(--zn-text));-webkit-transition:background-color 5000s ease-in-out 0s;transition:background-color 5000s ease-in-out 0s;box-shadow:inset 0 0 20px 20px rgba(35,35,35,0.1607843137)}select{height:43px}.no-border{border:none !important}:host{display:block;container-type:inline-size;width:100%}.ai{display:flex;width:100%;flex-direction:row;gap:10px}.ai:not(.ai--editing) .ai__input::part(base),.ai:not(.ai--editing) .ai__input::part(combobox),.ai:not(.ai--editing) .ai__input::part(textarea){background-color:transparent;border-color:transparent;box-shadow:none;opacity:1;cursor:initial}.ai:not(.ai--editing) .ai__input::part(input){line-height:var(--zn-line-height-looser)}.ai:not(.ai--editing) .ai__input::part(display-input){color:rgb(var(--zn-text))}.ai:not(.ai--editing) .ai__input::part(input),.ai:not(.ai--editing) .ai__input::part(combobox),.ai:not(.ai--editing) .ai__input::part(textarea){padding:0;color:rgb(var(--zn-text));text-decoration:underline;text-decoration-style:dashed;text-decoration-color:rgb(var(--zn-primary),0.5);text-underline-offset:3px}.ai:not(.ai--editing) .ai__input::part(textarea){padding-top:8px;box-shadow:none;text-decoration:none}.ai:not(.ai--editing) .ai__input::part(expand-icon){display:none}.ai:not(.ai--editing) .ai__input::part(form-control-help-text){display:none}.ai:not(.ai--editing):hover .button--edit{display:inline-block}.ai__input::part(form-control-input){margin:0}.ai__input{height:unset;opacity:1}.ai__input[dir=rtl]::part(input),.ai__input[dir=rtl]::part(textarea),.ai__input[dir=rtl]::part(combobox){text-align:left}.ai:not(.ai--editing) .ai__input::part(input)::-webkit-inner-spin-button,.ai:not(.ai--editing) .ai__input::part(input)::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.ai--padded{padding:var(--zn-spacing-large)}.ai--inline{display:flex;flex-direction:row;align-items:start;gap:5px}@container (min-width:480px){.ai--inline{align-items:center}}.ai--inline .ai__input{width:100%}.ai--inline .ai__left{width:100%;display:flex;flex-direction:row;justify-content:flex-end}@container (max-width:479px){.ai--inline .ai__left{justify-content:flex-start;flex-direction:column}}.ai--editing .ai__right{display:flex !important}.ai__left{display:flex;flex-direction:column;gap:5px;width:100%}.ai--masked:not(.ai--editing) .ai__input{display:none}.ai__reveal{line-height:var(--zn-line-height-looser);color:rgb(var(--zn-text))}.ai__reveal::part(base){width:100%;text-decoration:underline;text-decoration-style:dashed;text-decoration-color:rgb(var(--zn-primary),0.5);text-underline-offset:3px}.ai:not(.ai--disabled) .ai__left{cursor:pointer}.ai__description{font-size:12px;font-weight:500;line-height:18px;color:rgb(var(--zn-text))}.ai__right{font-size:12px;color:rgb(var(--zn-primary));font-weight:500;cursor:pointer;flex-direction:row;gap:10px;align-items:center;justify-content:flex-end}.ai__right .button--edit{display:none}.ai--disabled:not(.ai--editing) .ai__input::part(input),.ai--disabled:not(.ai--editing) .ai__input::part(combobox),.ai--disabled:not(.ai--editing) .ai__input::part(textarea){text-decoration:none;caret-color:transparent;border-radius:0}.ai--disabled:not(.ai--editing) .ai__reveal::part(base){text-decoration:none}.ai--disabled:not(.ai--editing) .ai__input::part(display-input){cursor:text}.ai--disabled:not(.ai--editing) .ai__right{display:none !important}zn-textarea::part(textarea){resize:none}`;var ht=class extends C{constructor(){super(...arguments);this.formControlController=new ot(this,{defaultValue:t=>t.defaultValue,value:t=>{if(t.multiple){let r=typeof t.value=="string"?t.value.split(" ").filter(n=>n!==""):t.value;return r.length>0?r:""}return t.value}});this.hasSlotController=new Q(this,"help-text","[default]");this.conditionalController=new Ga(this);this.value="";this.displayValue="";this.clearOnEdit=!1;this.conditional="";this.size="medium";this.inputType="text";this.options={};this.iconPosition="none";this.helpText="";this.dir="auto";this.mouseEventHandler=t=>{this.isEditing&&!this.contains(t.target)&&((Array.isArray(this.value)?JSON.stringify(this.value)!==JSON.stringify(this._editStartValue):this.value!==this._editStartValue)||(this.isEditing=!1,this.value=this._valueBeforeEdit,this.input.blur()))};this.escKeyHandler=t=>{t.key==="Escape"&&this.isEditing&&(this.isEditing=!1,this.value=this._valueBeforeEdit,this.input.blur())};this.submitKeyHandler=t=>{t.key==="Enter"&&this.isEditing&&!t.shiftKey&&(this.isEditing=!1,this.emit("zn-submit",{detail:{value:this.value,element:this}}),this.formControlController.submit(),this.input.blur())};this.captureMouseDown=t=>{this.disabled&&!this.isEditing&&t.stopPropagation()};this.captureKeyDown=t=>{this.disabled&&!this.isEditing&&(t.stopPropagation(),t.preventDefault())};this.handleEditClick=t=>{t.preventDefault(),t.stopPropagation(),!this.disabled&&(this.isEditing||(this._valueBeforeEdit=this.value,this.clearOnEdit&&(this.value=this.multiple?[]:""),this._editStartValue=this.value),this.isEditing=!0)};this.handleSubmitClick=t=>{t.preventDefault(),this.isEditing=!1,this.emit("zn-submit",{detail:{value:this.value,element:this}}),this.formControlController.submit()};this.handleCancelClick=t=>{t.preventDefault(),this.isEditing=!1,this.value=this._valueBeforeEdit};this.handleBlur=()=>{this.hasFocus=!1};this.handleInput=t=>{this.disabled||!this.isEditing||(this.value=t.target.value,this.emit("zn-input"))};this.handleSlotChange=async()=>{await this.updateComplete,this.input instanceof le&&this.moveSlottedOptionsToSelect()}}get validity(){return this.input?.validity}get validationMessage(){return this.input.validationMessage}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t)}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.escKeyHandler),document.addEventListener("keydown",this.submitKeyHandler),document.addEventListener("click",this.mouseEventHandler),this.addEventListener("mousedown",this.captureMouseDown,{capture:!0}),this.addEventListener("keydown",this.captureKeyDown,{capture:!0})}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.escKeyHandler),document.removeEventListener("keydown",this.submitKeyHandler),document.removeEventListener("click",this.mouseEventHandler),this.removeEventListener("mousedown",this.captureMouseDown,!0),this.removeEventListener("keydown",this.captureKeyDown,!0)}async firstUpdated(){await this.updateComplete,this.input.addEventListener("onclick",this.handleEditClick),this.conditionalController.setup()}willUpdate(t){(t.has("value")||t.has("multiple"))&&(this.multiple&&typeof this.value=="string"?this.value=this.value.split(" ").filter(r=>r!==""):!this.multiple&&Array.isArray(this.value)&&(this.value=this.value.join(" ")))}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity()}async handleIsEditingChange(){await this.updateComplete,this.input instanceof le&&!this.isEditing&&await this.input.hide(),this.conditionalController.check()}moveSlottedOptionsToSelect(){if(!(this.input instanceof le))return;Array.from(this.querySelectorAll("zn-option")).forEach(r=>{this.input.appendChild(r)})}render(){let t=this.editText,r=this.hasSlotController.test("help-text"),n=this.helpText?!0:r;Object.keys(this.options).length>0&&(this.inputType="select"),this.selectProvider&&(this.inputType="data-select"),this.freeText&&!this.selectProvider&&(this.inputType="select");let a;switch(this.inputType){case"select":a=this._getSelectInput();break;case"data-select":a=this._getDataSelectInput();break;case"number":a=this._getNumberInput();break;case"textarea":a=this._getTextAreaInput();break;default:a=this._getTextInput()}return u`
|
|
1890
|
+
</div>`}};zt.styles=E(Fv),zt.dependencies={"zn-icon":ct,"zn-button":Ct,"zn-dialog":ia,"zn-input":ke,"zn-select":le,"zn-option":Ne},zt.freeInputLibraries=new Set(["gravatar","libravatar","avatar"]),c([p()],zt.prototype,"name",2),c([p()],zt.prototype,"icon",2),c([p()],zt.prototype,"label",2),c([p()],zt.prototype,"library",2),c([p()],zt.prototype,"color",2),c([p({type:Boolean,attribute:"no-color"})],zt.prototype,"noColor",2),c([p({type:Boolean,attribute:"no-library"})],zt.prototype,"noLibrary",2),c([p({attribute:"help-text"})],zt.prototype,"helpText",2),c([p({type:Boolean,reflect:!0})],zt.prototype,"disabled",2),c([p({type:Boolean,reflect:!0})],zt.prototype,"required",2),c([p({type:Boolean,attribute:"trigger-submit"})],zt.prototype,"triggerSubmit",2),c([p({type:Boolean,attribute:"allow-upload"})],zt.prototype,"allowUpload",2),c([p()],zt.prototype,"accept",2),c([p({reflect:!0})],zt.prototype,"form",2),c([ee()],zt.prototype,"defaultValue",2),c([O()],zt.prototype,"_dialogOpen",2),c([O()],zt.prototype,"_searchQuery",2),c([O()],zt.prototype,"_iconList",2),c([O()],zt.prototype,"_filteredIcons",2),c([O()],zt.prototype,"_pendingIcon",2),c([O()],zt.prototype,"_pendingLibrary",2),c([O()],zt.prototype,"_pendingColor",2),c([O()],zt.prototype,"_pendingFile",2),c([O()],zt.prototype,"_pendingFileUrl",2),c([O()],zt.prototype,"_mode",2),c([O()],zt.prototype,"_file",2),c([O()],zt.prototype,"_fileUrl",2),c([F("zn-dialog")],zt.prototype,"_dialog",2),c([F(".icon-picker__file-input")],zt.prototype,"_fileInput",2);var Ka=zt;var U3=Ka;Ka.define("zn-icon-picker");var Bv=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}button,.zn-button{border-radius:var(--zn-border-radius);display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:-moz-fit-content;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(255,255,255,0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}button:hover:not([disabled]),.zn-button:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=date],input[type=datetime-local],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],input[type=file],input[list],textarea,select{display:block;width:100%;border-radius:5px;border-style:solid;border-width:1px !important;border-color:rgb(var(--zn-border-color));background-color:rgb(var(--zn-input-bg));outline:none}input[type=date]:focus,input[type=datetime-local]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus,input[type=file]:focus,input[list]:focus,textarea:focus,select:focus{border-color:rgb(var(--zn-primary));box-shadow:0 0 0 3px rgba(var(--zn-primary),0.3)}input[type=date]::-moz-placeholder, input[type=datetime-local]::-moz-placeholder, input[type=email]::-moz-placeholder, input[type=month]::-moz-placeholder, input[type=number]::-moz-placeholder, input[type=password]::-moz-placeholder, input[type=search]::-moz-placeholder, input[type=tel]::-moz-placeholder, input[type=text]::-moz-placeholder, input[type=time]::-moz-placeholder, input[type=url]::-moz-placeholder, input[type=week]::-moz-placeholder, input[type=file]::-moz-placeholder, input[list]::-moz-placeholder, textarea::-moz-placeholder, select::-moz-placeholder{font-weight:400;color:rgba(var(--zn-text),0.6)}input[type=date]::placeholder,input[type=datetime-local]::placeholder,input[type=email]::placeholder,input[type=month]::placeholder,input[type=number]::placeholder,input[type=password]::placeholder,input[type=search]::placeholder,input[type=tel]::placeholder,input[type=text]::placeholder,input[type=time]::placeholder,input[type=url]::placeholder,input[type=week]::placeholder,input[type=file]::placeholder,input[list]::placeholder,textarea::placeholder,select::placeholder{font-weight:400;color:rgba(var(--zn-text),0.6)}@media (min-width:360px){input[type=date],input[type=datetime-local],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],input[type=file],input[list],textarea,select{padding:8px}}label{font-weight:600;font-size:rgb(var(--zn-font-size-medium));line-height:var(--zn-spacing-medium);color:rgb(var(--zn-text-heading));display:block;margin-bottom:4px;margin-top:16px}input[type=checkbox],input[type=radio]{border-radius:5px}input[type=radio]{border-radius:50%}input[type=range]{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:10px;background-color:rgb(var(--zn-border-color));height:8px;accent-color:rgb(var(--zn-primary));width:100%;max-width:768px}fieldset{border-color:rgba(var(--zn-primary),20%);border-width:2px;padding:0 16px 16px}select option{padding:4px}select>option:checked{background-color:rgba(var(--zn-primary),20%);border-radius:5px}fieldset>legend{padding:4px}input[type=button],input[type=submit],button[type=submit]:not(.button),button[type=button]:not(.button){border-radius:var(--zn-border-radius);display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:-moz-fit-content;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(255,255,255,0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}input[type=button]:hover:not([disabled]),input[type=submit]:hover:not([disabled]),button[type=submit]:not(.button):hover:not([disabled]),button[type=button]:not(.button):hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=button],input[type=submit],button[type=submit]:not(.button),button[type=button]:not(.button){width:auto}div+button{margin-top:16px}input[type=file]::-webkit-file-upload-button{border-radius:var(--zn-border-radius);display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(255,255,255,0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}input[type=file]::-webkit-file-upload-button:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=file]::-webkit-file-upload-button{margin-right:8px}input::-webkit-calendar-picker-indicator{cursor:pointer;padding:8px}input[list]::-webkit-calendar-picker-indicator{padding:8px 4px}.input--with-icon{position:relative}.input--with-icon zn-icon{padding:14px;position:absolute;top:50%;pointer-events:none;transform:translateY(-50%);left:8px;background-color:rgb(var(--zn-primary));color:rgb(var(--zn-text));border-radius:50%}.input--with-icon input{padding-left:40px}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-background-clip:text;-webkit-text-fill-color:rgb(var(--zn-text));-webkit-transition:background-color 5000s ease-in-out 0s;transition:background-color 5000s ease-in-out 0s;box-shadow:inset 0 0 20px 20px rgba(35,35,35,0.1607843137)}select{height:43px}.no-border{border:none !important}:host{display:block;container-type:inline-size;width:100%}.ai{display:flex;width:100%;flex-direction:row;gap:10px}.ai:not(.ai--editing) .ai__input::part(base),.ai:not(.ai--editing) .ai__input::part(combobox),.ai:not(.ai--editing) .ai__input::part(textarea){background-color:transparent;border-color:transparent;box-shadow:none;opacity:1;cursor:initial}.ai:not(.ai--editing) .ai__input::part(input){line-height:var(--zn-line-height-looser)}.ai:not(.ai--editing) .ai__input::part(display-input){color:rgb(var(--zn-text))}.ai:not(.ai--editing) .ai__input::part(input),.ai:not(.ai--editing) .ai__input::part(combobox),.ai:not(.ai--editing) .ai__input::part(textarea){padding:0;color:rgb(var(--zn-text));text-decoration:underline;text-decoration-style:dashed;text-decoration-color:rgb(var(--zn-primary),0.5);text-underline-offset:3px}.ai:not(.ai--editing) .ai__input::part(textarea){padding-top:8px;box-shadow:none;text-decoration:none}.ai:not(.ai--editing) .ai__input::part(expand-icon){display:none}.ai:not(.ai--editing) .ai__input::part(form-control-help-text){display:none}.ai:not(.ai--editing):hover .button--edit{display:inline-block}.ai__input::part(form-control-input){margin:0}.ai__input{height:unset;opacity:1}.ai__input[dir=rtl]::part(input),.ai__input[dir=rtl]::part(textarea),.ai__input[dir=rtl]::part(combobox){text-align:left}.ai:not(.ai--editing) .ai__input::part(input)::-webkit-inner-spin-button,.ai:not(.ai--editing) .ai__input::part(input)::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.ai--padded{padding:var(--zn-spacing-large)}.ai--inline{display:flex;flex-direction:row;align-items:start;gap:5px}@container (min-width:480px){.ai--inline{align-items:center}}.ai--inline .ai__input{width:100%}.ai--inline .ai__left{width:100%;display:flex;flex-direction:row;justify-content:flex-end}@container (max-width:479px){.ai--inline .ai__left{justify-content:flex-start;flex-direction:column}}.ai--editing .ai__right{display:flex !important}.ai__left{display:flex;flex-direction:column;gap:5px;width:100%}.ai--masked:not(.ai--editing) .ai__input{display:none}.ai__reveal{line-height:var(--zn-line-height-looser);color:rgb(var(--zn-text))}.ai__reveal::part(base){width:100%;text-decoration:underline;text-decoration-style:dashed;text-decoration-color:rgb(var(--zn-primary),0.5);text-underline-offset:3px}.ai:not(.ai--disabled) .ai__left{cursor:pointer}.ai__description{font-size:12px;font-weight:500;line-height:18px;color:rgb(var(--zn-text))}.ai__right{font-size:12px;color:rgb(var(--zn-primary));font-weight:500;cursor:pointer;flex-direction:row;gap:10px;align-items:center;justify-content:flex-end}.ai__right .button--edit{display:none}.ai--disabled:not(.ai--editing) .ai__input::part(input),.ai--disabled:not(.ai--editing) .ai__input::part(combobox),.ai--disabled:not(.ai--editing) .ai__input::part(textarea){text-decoration:none;caret-color:transparent;border-radius:0}.ai--disabled:not(.ai--editing) .ai__reveal::part(base){text-decoration:none}.ai--disabled:not(.ai--editing) .ai__input::part(display-input){cursor:text}.ai--disabled:not(.ai--editing) .ai__right{display:none !important}zn-textarea::part(textarea){resize:none}`;var ht=class extends C{constructor(){super(...arguments);this.formControlController=new ot(this,{defaultValue:t=>t.defaultValue,value:t=>{if(t.multiple){let r=typeof t.value=="string"?t.value.split(" ").filter(n=>n!==""):t.value;return r.length>0?r:""}return t.value}});this.hasSlotController=new Q(this,"help-text","[default]");this.conditionalController=new Ga(this);this.value="";this.displayValue="";this.clearOnEdit=!1;this.conditional="";this.size="medium";this.inputType="text";this.options={};this.iconPosition="none";this.helpText="";this.dir="auto";this.mouseEventHandler=t=>{this.isEditing&&!this.contains(t.target)&&((Array.isArray(this.value)?JSON.stringify(this.value)!==JSON.stringify(this._editStartValue):this.value!==this._editStartValue)||(this.isEditing=!1,this.value=this._valueBeforeEdit,this.input.blur()))};this.escKeyHandler=t=>{t.key==="Escape"&&this.isEditing&&(this.isEditing=!1,this.value=this._valueBeforeEdit,this.input.blur())};this.submitKeyHandler=t=>{t.key==="Enter"&&this.isEditing&&!t.shiftKey&&(this.isEditing=!1,this.emit("zn-submit",{detail:{value:this.value,element:this}}),this.formControlController.submit(),this.input.blur())};this.captureMouseDown=t=>{this.disabled&&!this.isEditing&&t.stopPropagation()};this.captureKeyDown=t=>{this.disabled&&!this.isEditing&&(t.stopPropagation(),t.preventDefault())};this.handleEditClick=t=>{t.preventDefault(),t.stopPropagation(),!this.disabled&&(this.isEditing||(this._valueBeforeEdit=this.value,this.clearOnEdit&&(this.value=this.multiple?[]:""),this._editStartValue=this.value),this.isEditing=!0)};this.handleSubmitClick=t=>{t.preventDefault(),this.isEditing=!1,this.emit("zn-submit",{detail:{value:this.value,element:this}}),this.formControlController.submit()};this.handleCancelClick=t=>{t.preventDefault(),this.isEditing=!1,this.value=this._valueBeforeEdit};this.handleBlur=()=>{this.hasFocus=!1};this.handleInput=t=>{this.disabled||!this.isEditing||(this.value=t.target.value,this.emit("zn-input"))};this.handleSlotChange=async()=>{await this.updateComplete,this.input instanceof le&&this.moveSlottedOptionsToSelect()}}get validity(){return this.input?.validity}get validationMessage(){return this.input.validationMessage}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t)}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.escKeyHandler),document.addEventListener("keydown",this.submitKeyHandler),document.addEventListener("click",this.mouseEventHandler),this.addEventListener("mousedown",this.captureMouseDown,{capture:!0}),this.addEventListener("keydown",this.captureKeyDown,{capture:!0})}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.escKeyHandler),document.removeEventListener("keydown",this.submitKeyHandler),document.removeEventListener("click",this.mouseEventHandler),this.removeEventListener("mousedown",this.captureMouseDown,!0),this.removeEventListener("keydown",this.captureKeyDown,!0)}async firstUpdated(){await this.updateComplete,this.input.addEventListener("onclick",this.handleEditClick),this.conditionalController.setup()}willUpdate(t){(t.has("value")||t.has("multiple"))&&(this.multiple&&typeof this.value=="string"?this.value=this.value.split(" ").filter(r=>r!==""):!this.multiple&&Array.isArray(this.value)&&(this.value=this.value.join(" ")))}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity()}async handleIsEditingChange(){await this.updateComplete,this.input instanceof le&&!this.isEditing&&await this.input.hide(),this.conditionalController.check()}moveSlottedOptionsToSelect(){if(!(this.input instanceof le))return;Array.from(this.querySelectorAll("zn-option")).forEach(r=>{this.input.appendChild(r)})}render(){let t=this.editText,r=this.hasSlotController.test("help-text"),n=this.helpText?!0:r;Object.keys(this.options).length>0&&(this.inputType="select"),this.selectProvider&&(this.inputType="data-select"),this.freeText&&!this.selectProvider&&(this.inputType="select");let a;switch(this.inputType){case"select":a=this._getSelectInput();break;case"data-select":a=this._getDataSelectInput();break;case"number":a=this._getNumberInput();break;case"textarea":a=this._getTextAreaInput();break;default:a=this._getTextInput()}return u`
|
|
1891
1891
|
<div class="${D({ai:!0,"ai--editing":this.isEditing,"ai--focused":this.hasFocus,"ai--disabled":this.disabled,"ai--inline":this.inline,"ai--padded":this.padded,"ai--masked":!!this.displayValue})}" dir="ltr">
|
|
1892
1892
|
|
|
1893
1893
|
<div class="ai__left" @click="${this.disabled?void 0:this.handleEditClick}">
|
|
@@ -2110,7 +2110,7 @@ import{a as En,b as E_,c as pr,d as c,e as B}from"./chunks/zn.UBLZO6CI.js";var b
|
|
|
2110
2110
|
<div class="capd"><span class="caption">${m}</span><span class="summary">${f}</span></div>
|
|
2111
2111
|
</div>
|
|
2112
2112
|
</td>`),r.hasOwnProperty("data")&&r.data!=null&&r.data.forEach((G,I)=>{let w=this.columnDisplay[I+1],T="";w!=""&&w!=null&&(T="hidden "+w+":table-cell"),G=this.columnContent(G),a.push(u`
|
|
2113
|
-
<td class="${T}">${typeof G=="string"?
|
|
2113
|
+
<td class="${T}">${typeof G=="string"?Xe(G):G}</td>`)}),t.push(u`
|
|
2114
2114
|
<tr .id=${H(v)} class="${D({"table-row":!0,"table-row--nested":_,"table-row--error":x==="error","table-row--info":x==="info","table-row--warning":x==="warning","table-row--success":x==="success"})}">${a}
|
|
2115
2115
|
</tr>`)}),u`
|
|
2116
2116
|
<tbody>${t}</tbody>`}columnContent(t){if(typeof t!="object"||t===null)return this.boolIcons&&(t.toString()==="true"||t.toString()==="false")?u`
|
|
@@ -2309,7 +2309,7 @@ import{a as En,b as E_,c as pr,d as c,e as B}from"./chunks/zn.UBLZO6CI.js";var b
|
|
|
2309
2309
|
<zn-input type="text"
|
|
2310
2310
|
class="query-builder__value"
|
|
2311
2311
|
@zn-input="${n=>this._updateValue(t,n)}">
|
|
2312
|
-
</zn-input>`;return de(r)}_updateOperatorValue(t,r){let n=this._selectedRules.get(t);if(!n)return;let a=r.target;this._previousOperator=n.operator,n.operator=a.value,this._selectedRules.set(t,n),this._handleChange()}_updateDateValue(t,r,n="legacy"){let a=this._selectedRules.get(t);if(!a)return;let s=r.target,l=a.operator,d,h;switch(n){case"legacy":if(l==="eq"||l==="neq")h=(s.timestamp/1e3).toString();else{let m=l==="before"?-1:1;h=(Math.floor((Date.now()-s.timestamp)/1e3/60)*m).toString()}break;case"timestamp":h=s.timestamp.toString();break;case"iso":d=new Date(s.timestamp),h=new Date(d.getTime()-d.getTimezoneOffset()*6e4).toISOString();break}a.value=h,this._selectedRules.set(t,a),this._handleChange()}_updateValue(t,r){let n=this._selectedRules.get(t);if(!n)return;let a=r.target;n.value=a.value,this._selectedRules.set(t,n),this._handleChange()}updateInValue(t,r){let n=this._selectedRules.get(t);if(!n)return;let a=r.target;n.value=a.value,this._selectedRules.set(t,n),this._handleChange()}_changeRule(t,r){let n=this._getRulePosition(t),a=r.target;a.popup.active=!1,a?.parentElement?.remove(),this._removeRule(t,r),this._addRule(r,"",n)}_getRulePosition(t){let r=this.container.querySelectorAll(".query-builder__row"),n=-1;return r.forEach((a,s)=>{a.id===t&&(n=s)}),n}_removeRule(t,r){this._selectedRules.delete(t),r.target?.closest(".query-builder__row")?.remove(),this._handleChange()}clear(){this._selectedRules.clear(),this.value="",this.container.querySelectorAll(".query-builder__row").forEach(r=>{r.remove()}),this.requestUpdate(),this._formController.updateValidity()}reset(){this.clear(),this.showValues.forEach(t=>{this._addRule(null,t)}),this._handleChange(),this._formController.updateValidity()}checkValidity(){return this.input.checkValidity()}getForm(){return this._formController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this._formController.updateValidity()}};mr.styles=E(e0),mr.dependencies={"zn-button":Ct,"zn-input":ke,"zn-option":
|
|
2312
|
+
</zn-input>`;return de(r)}_updateOperatorValue(t,r){let n=this._selectedRules.get(t);if(!n)return;let a=r.target;this._previousOperator=n.operator,n.operator=a.value,this._selectedRules.set(t,n),this._handleChange()}_updateDateValue(t,r,n="legacy"){let a=this._selectedRules.get(t);if(!a)return;let s=r.target,l=a.operator,d,h;switch(n){case"legacy":if(l==="eq"||l==="neq")h=(s.timestamp/1e3).toString();else{let m=l==="before"?-1:1;h=(Math.floor((Date.now()-s.timestamp)/1e3/60)*m).toString()}break;case"timestamp":h=s.timestamp.toString();break;case"iso":d=new Date(s.timestamp),h=new Date(d.getTime()-d.getTimezoneOffset()*6e4).toISOString();break}a.value=h,this._selectedRules.set(t,a),this._handleChange()}_updateValue(t,r){let n=this._selectedRules.get(t);if(!n)return;let a=r.target;n.value=a.value,this._selectedRules.set(t,n),this._handleChange()}updateInValue(t,r){let n=this._selectedRules.get(t);if(!n)return;let a=r.target;n.value=a.value,this._selectedRules.set(t,n),this._handleChange()}_changeRule(t,r){let n=this._getRulePosition(t),a=r.target;a.popup.active=!1,a?.parentElement?.remove(),this._removeRule(t,r),this._addRule(r,"",n)}_getRulePosition(t){let r=this.container.querySelectorAll(".query-builder__row"),n=-1;return r.forEach((a,s)=>{a.id===t&&(n=s)}),n}_removeRule(t,r){this._selectedRules.delete(t),r.target?.closest(".query-builder__row")?.remove(),this._handleChange()}clear(){this._selectedRules.clear(),this.value="",this.container.querySelectorAll(".query-builder__row").forEach(r=>{r.remove()}),this.requestUpdate(),this._formController.updateValidity()}reset(){this.clear(),this.showValues.forEach(t=>{this._addRule(null,t)}),this._handleChange(),this._formController.updateValidity()}checkValidity(){return this.input.checkValidity()}getForm(){return this._formController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this._formController.updateValidity()}};mr.styles=E(e0),mr.dependencies={"zn-button":Ct,"zn-input":ke,"zn-option":Ne,"zn-select":le},c([F(".query-builder")],mr.prototype,"container",2),c([F(".add-rule")],mr.prototype,"addRule",2),c([F("input#main-input")],mr.prototype,"input",2),c([p({type:Array})],mr.prototype,"filters",2),c([p({type:Boolean})],mr.prototype,"dropdown",2),c([p()],mr.prototype,"name",2),c([p()],mr.prototype,"value",2),c([p({attribute:"show-values",converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],mr.prototype,"showValues",2);var a5=mr;mr.define("zn-query-builder");var r0=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:ost{display:contents}.progress-tile{display:flex;width:100%;align-items:center;flex-direction:row;gap:12px;margin-bottom:20px}.progress-tile zn-icon{display:flex;flex-shrink:0;overflow:hidden}.progress-tile__content{display:flex;flex-direction:column;flex-grow:1}.progress-tile__header{display:flex;justify-content:space-between}.progress-tile__header .header__caption{display:flex;flex-direction:row;align-items:center;gap:var(--zn-spacing-x-small);margin-bottom:var(--zn-spacing-2x-small)}.progress-tile__header .header__caption p{font-size:14px;font-weight:400;margin:0;color:rgb(var(--zn-text))}.progress-tile__header .header__wait-time{display:flex;flex-direction:row;gap:3px;font-size:12px;font-weight:400;color:rgb(var(--zn-primary))}.progress-tile__header .header__wait-time p{margin:0}.progress-tile__progress-bars{flex-grow:1;background:rgba(0,0,0,0.02)}.progress-tile__progress-bars__first,.progress-tile__progress-bars__second{height:4px;background-color:rgba(var(--zn-border-color));transition:width 0.3s}.progress-tile__progress-bars__second{background-color:rgb(var(--zn-color-success))}.progress-tile__total-time{min-width:40px;text-align:end;font-size:14px;font-weight:400;color:rgb(var(--zn-text-heading))}.progress-tile--with-hours .progress-tile__total-time{min-width:60px}.progress-tile--ended .progress-tile__progress-bars__first{background-color:rgb(var(--zn-primary))}.progress-tile--ended .progress-tile__progress-bars__second{display:none}.progress-tile--warning .progress-tile__progress-bars__second{background-color:rgb(var(--zn-color-warning))}.progress-tile--warning .header__wait-time{color:rgb(var(--zn-color-warning))}.progress-tile--danger .progress-tile__progress-bars__second{background-color:rgb(var(--zn-color-error))}.progress-tile--danger .header__wait-time{color:rgb(var(--zn-color-error))}`;var fr=class extends C{constructor(){super(...arguments);this.maxWaitTime=300}connectedCallback(){super.connectedCallback(),this.status!=="Ended"&&(this._timerInterval=setInterval(()=>this.requestUpdate(),1e3))}disconnectedCallback(){super.disconnectedCallback(),this._timerInterval&&clearInterval(this._timerInterval)}getHumanReadableTime(t){t=Math.round(t);let r=Math.floor(t/3600),n=Math.floor(t%3600/60),a=t%60;return r>=24?"1 Day+":r?`${r.toString().padStart(2,"0")}:${n.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}`:`${n.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}`}render(){let t=new Date().getTime()/1e3,r=t-this.startTime,n=t-this.maxTime;this.waitingAgentResponse&&(this.waitTime+=1);let a=r/n*100;a=a>100?100:a;let s=this.waitTime/this.maxWaitTime*100;s=s>100?100:s;let l=this.getHumanReadableTime(r),d=this.getHumanReadableTime(this.waitTime),h=this.waitingAgentResponse?"Waiting for Agent":this.status,m=l.match(/:/g)?.length===2||d.match(/:/g)?.length===2;return u`
|
|
2313
2313
|
<div class="${D({"progress-tile":!0,"progress-tile--with-hours":m,"progress-tile--ended":this.status==="Ended","progress-tile--waiting-agent":this.waitingAgentResponse,"progress-tile--interacting":this.status==="Interacting","progress-tile--warn":this.waitTime>60&&this.waitTime<this.maxWaitTime/2,"progress-tile--danger":this.waitTime>=this.maxWaitTime})}">
|
|
2314
2314
|
<zn-icon size="36" src="${this.avatar}"></zn-icon>
|
|
2315
2315
|
<div class="progress-tile__content">
|
|
@@ -2561,7 +2561,7 @@ import{a as En,b as E_,c as pr,d as c,e as B}from"./chunks/zn.UBLZO6CI.js";var b
|
|
|
2561
2561
|
<zn-input type="text"
|
|
2562
2562
|
class="query-builder__value"
|
|
2563
2563
|
@zn-input="${a=>this._updateValue(t,a)}">
|
|
2564
|
-
</zn-input>`;return de(n)}_updateValue(t,r){let n=this._selectedRules.get(t);if(!n)return;let a=r.target;n.value=a.value,this._selectedRules.set(t,n),this._handleChange()}_getRulePosition(t){let r=this.container.querySelectorAll(".query-builder__row"),n=-1;return r.forEach((a,s)=>{a.id===t&&(n=s)}),n}_changeRule(t,r){let n=this._getRulePosition(t),a=r.target;a.popup.active=!1,a?.parentElement?.remove(),this._removeRule(t,r),this._addRule(r,"",n)}_removeRule(t,r){this._selectedRules.delete(t),r.target?.closest(".query-builder__row")?.remove(),this._handleChange()}checkValidity(){return this.input.checkValidity()}getForm(){return this._formController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this._formController.updateValidity()}};Fr.styles=E(i0),Fr.dependencies={"zn-button":Ct,"zn-input":ke,"zn-option":
|
|
2564
|
+
</zn-input>`;return de(n)}_updateValue(t,r){let n=this._selectedRules.get(t);if(!n)return;let a=r.target;n.value=a.value,this._selectedRules.set(t,n),this._handleChange()}_getRulePosition(t){let r=this.container.querySelectorAll(".query-builder__row"),n=-1;return r.forEach((a,s)=>{a.id===t&&(n=s)}),n}_changeRule(t,r){let n=this._getRulePosition(t),a=r.target;a.popup.active=!1,a?.parentElement?.remove(),this._removeRule(t,r),this._addRule(r,"",n)}_removeRule(t,r){this._selectedRules.delete(t),r.target?.closest(".query-builder__row")?.remove(),this._handleChange()}checkValidity(){return this.input.checkValidity()}getForm(){return this._formController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this._formController.updateValidity()}};Fr.styles=E(i0),Fr.dependencies={"zn-button":Ct,"zn-input":ke,"zn-option":Ne,"zn-select":le},c([F(".bulk-actions")],Fr.prototype,"container",2),c([F(".add-rule")],Fr.prototype,"addRule",2),c([F("input#main-input")],Fr.prototype,"input",2),c([p()],Fr.prototype,"name",2),c([p()],Fr.prototype,"value",2),c([p({type:Array})],Fr.prototype,"actions",2);var d5=Fr;Fr.define("zn-bulk-actions");var p5=()=>{let i="attachment",o=new Date().getTime();return`${i}_${o}`},ml=class{constructor(o,t){this._attachmentContainer=document.createElement("div");this._quill=o,this._options=t,typeof this._options.upload!="function"&&console.warn("[Quill Attachment Module] No upload function provided"),typeof this._options.onFileUploaded!="function"&&console.warn("[Quill Attachment Module] No file uploaded function provided"),this._quill.getModule("toolbar").addHandler("attachment",this._selectLocalImage.bind(this)),this._createAttachmentContainer()}_selectLocalImage(){this._fileHolder=document.createElement("input"),this._fileHolder.setAttribute("type","file"),this._fileHolder.setAttribute("accept","*/*"),this._fileHolder.onchange=this._fileChanged.bind(this),this._fileHolder.click()}_fileChanged(){if(!this._fileHolder?.files||this._fileHolder.files.length<0)return;let o=this._fileHolder.files[0];this.addAttachment(o)}addAttachment(o,t){let r=p5(),n=a=>{this._insertAttachment({dataUrl:a,file:o,id:r})};if(t)n(t);else{let a=new FileReader;a.addEventListener("load",()=>{let s=a.result;n(s)},!1),a.readAsDataURL(o)}typeof this._options.upload=="function"&&this._options.upload(o).then(async({path:a,url:s})=>{await this._uploadAttachment(o,s),this._updateAttachment(r,s,a)}).catch(a=>{console.warn(a.message)})}_createAttachmentContainer(){let o=this._attachmentContainer;o.id="attachment-container",o.style.display="flex",o.style.flexWrap="wrap",o.style.gap="10px",o.style.position="absolute",o.style.bottom="0",o.style.left="0",o.style.right="0",o.style.padding="10px",this._quill.container.appendChild(o)}_insertAttachment({dataUrl:o,file:t,id:r}){this._attachmentContainer.appendChild(this._createAttachment(o,t,r))}_updateAttachment(o,t,r){let n=this._quill.container.querySelector(`#${o}`);if(!n)return;n.setAttribute("href",t);let a=n.querySelector(".attachment-name");a&&(r?a.textContent=r:a.textContent="Error uploading file"),this._options.onFileUploaded&&this._options.onFileUploaded(n,{url:t});let s=this._options.attachmentInput;if(s&&r){let l=s.value,d=l?JSON.parse(l):[];d.push(r),s.value=JSON.stringify(d)}}_createAttachment(o,t,r){let n=document.createElement("a");n.setAttribute("href",o),n.setAttribute("id",r),n.setAttribute("download",t.name),n.style.padding="10px",n.style.backgroundColor="white",n.style.border="1px solid #ccc",n.style.borderRadius="5px",n.style.display="flex",n.style.alignItems="center",n.style.gap="5px";let a=document.createElement("p");a.classList.add("attachment-name"),a.textContent="Uploading...",n.appendChild(a);let s=document.createElement("button");return s.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 30 30"><path d="M7 4a.995.995 0 0 0-.707.293l-2 2a.999.999 0 0 0 0 1.414L11.586 15l-7.293 7.293a.999.999 0 0 0 0 1.414l2 2a.999.999 0 0 0 1.414 0L15 18.414l7.293 7.293a.999.999 0 0 0 1.414 0l2-2a.999.999 0 0 0 0-1.414L18.414 15l7.293-7.293a.999.999 0 0 0 0-1.414l-2-2a.999.999 0 0 0-1.414 0L15 11.586 7.707 4.293A.996.996 0 0 0 7 4z"/></svg>',s.onclick=l=>{l.preventDefault(),l.stopImmediatePropagation(),this._removeAttachment(r)},n.appendChild(s),n}reset(){this._attachmentContainer.replaceChildren();let o=this._options.attachmentInput;o&&(o.value="")}_removeAttachment(o){let t=this._quill.container.querySelector(`#${o}`);t&&t.remove();let r=this._options.attachmentInput;if(r){let n=r.value,a=t?.querySelector(".attachment-name"),s=n?JSON.parse(n):[],l=s.indexOf(a?.textContent?a.textContent:"");l>-1&&(s.splice(l,1),r.value=JSON.stringify(s))}}_uploadAttachment(o,t){return new Promise((r,n)=>{let a=new XMLHttpRequest;a.open("PUT",t,!0),a.setRequestHeader("Content-Type",o.type),a.onload=()=>{a.status>=200&&a.status<300?r():n(new Error(`[Quill Attachment Module] Failed to upload file. Status: ${a.status}`))},a.onerror=()=>{n(new Error("[Quill Attachment Module] Error occurred while uploading file."))},a.send(o)})}};var a0=S`:host{position:absolute;z-index:var(--zn-z-index-editor-action);display:none;background:var(--zn-panel-background-color);border:1px solid var(--zn-border-color);border-radius:8px;box-shadow:var(--zn-shadow-medium);padding:6px 0;max-height:220px;overflow-y:auto;min-width:360px}:host([open]){display:block}.header{padding:4px 6px;font-size:var(--zn-font-size-x-small);opacity:0.6}.item{display:flex;align-items:center;gap:8px;padding:8px;width:100%;border:none;background:transparent;cursor:pointer;font:inherit}.item[aria-selected=true],.item:hover{background:var(--zn-input-background-color-hover)}.label{opacity:0.7}.empty{padding:8px;opacity:0.7}`;var Dn=class extends C{constructor(){super(...arguments);this.open=!1;this.query="";this.results=[];this._activeIndex=-1;this._onClickItem=t=>{let r=t.currentTarget;if(!r)return;let n=parseInt(r.dataset.index||"-1",10);if(Number.isNaN(n))return;this.setActiveIndex(n);let a=this.results?.[n];a&&this.dispatchEvent(new CustomEvent("zn-format-select",{bubbles:!0,composed:!0,detail:{icon:a.icon,label:a.label,format:a.format,value:a.value,key:a.key}}))}}show(){this.open=!0}hide(){this.open=!1,this._activeIndex=-1}setPosition(t,r){this.style.left=`${Math.max(0,t)}px`,this.style.top=`${r}px`}setActiveIndex(t){let r=this.results?.length??0;if(!r){this._activeIndex=-1;return}t<0&&(t=r-1),t>=r&&(t=0),this._activeIndex=t,this.requestUpdate(),requestAnimationFrame(()=>{Array.from(this.renderRoot.querySelectorAll("[data-toolbar-option]"))[this._activeIndex]?.scrollIntoView?.({block:"nearest"})})}getActiveIndex(){return this._activeIndex}willUpdate(t){t.has("results")&&(this._activeIndex=this.results?.length?0:-1)}render(){return u`
|
|
2565
2565
|
<div class="header">${this.query?`Search: ${this.query}`:"Options"}</div>
|
|
2566
2566
|
${Array.isArray(this.results)&&this.results.length>0?this.results.slice(0,20).map((t,r)=>u`
|
|
2567
2567
|
<button
|
|
@@ -2578,12 +2578,12 @@ import{a as En,b as E_,c as pr,d as c,e as B}from"./chunks/zn.UBLZO6CI.js";var b
|
|
|
2578
2578
|
</button>
|
|
2579
2579
|
`):u`
|
|
2580
2580
|
<div class="empty">${this.query?"No results":"Type something"}</div>`}
|
|
2581
|
-
`}};Dn.styles=E(a0),c([p({type:Boolean,reflect:!0})],Dn.prototype,"open",2),c([p({type:String})],Dn.prototype,"query",2),c([p({type:Array})],Dn.prototype,"results",2),c([O()],Dn.prototype,"_activeIndex",2);Dn.define("zn-context-menu");var nw=pr(Br(),1);var T6=typeof global=="object"&&global&&global.Object===Object&&global,Id=T6;var $6=typeof self=="object"&&self&&self.Object===Object&&self,A6=Id||$6||Function("return this")(),qe=A6;var L6=qe.Symbol,zo=L6;var V1=Object.prototype,q6=V1.hasOwnProperty,M6=V1.toString,kl=zo?zo.toStringTag:void 0;function I6(i){var o=q6.call(i,kl),t=i[kl];try{i[kl]=void 0;var r=!0}catch{}var n=M6.call(i);return r&&(o?i[kl]=t:delete i[kl]),n}var U1=I6;var D6=Object.prototype,N6=D6.toString;function R6(i){return N6.call(i)}var j1=R6;var O6="[object Null]",P6="[object Undefined]",G1=zo?zo.toStringTag:void 0;function H6(i){return i==null?i===void 0?P6:O6:G1&&G1 in Object(i)?U1(i):j1(i)}var Ko=H6;function F6(i){return i!=null&&typeof i=="object"}var sr=F6;var B6=Array.isArray,wo=B6;function V6(i){var o=typeof i;return i!=null&&(o=="object"||o=="function")}var gr=V6;function U6(i){return i}var Dd=U6;var j6="[object AsyncFunction]",G6="[object Function]",W6="[object GeneratorFunction]",K6="[object Proxy]";function Y6(i){if(!gr(i))return!1;var o=Ko(i);return o==G6||o==W6||o==j6||o==K6}var rs=Y6;var X6=qe["__core-js_shared__"],Nd=X6;var W1=(function(){var i=/[^.]+$/.exec(Nd&&Nd.keys&&Nd.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})();function Q6(i){return!!W1&&W1 in i}var K1=Q6;var J6=Function.prototype,Z6=J6.toString;function t9(i){if(i!=null){try{return Z6.call(i)}catch{}try{return i+""}catch{}}return""}var Vn=t9;var e9=/[\\^$.*+?()[\]{}|]/g,r9=/^\[object .+?Constructor\]$/,o9=Function.prototype,n9=Object.prototype,i9=o9.toString,a9=n9.hasOwnProperty,s9=RegExp("^"+i9.call(a9).replace(e9,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function l9(i){if(!gr(i)||K1(i))return!1;var o=rs(i)?s9:r9;return o.test(Vn(i))}var Y1=l9;function c9(i,o){return i?.[o]}var X1=c9;function d9(i,o){var t=X1(i,o);return Y1(t)?t:void 0}var Vr=d9;var p9=Vr(qe,"WeakMap"),Rd=p9;var Q1=Object.create,h9=(function(){function i(){}return function(o){if(!gr(o))return{};if(Q1)return Q1(o);i.prototype=o;var t=new i;return i.prototype=void 0,t}})(),J1=h9;function u9(i,o,t){switch(t.length){case 0:return i.call(o);case 1:return i.call(o,t[0]);case 2:return i.call(o,t[0],t[1]);case 3:return i.call(o,t[0],t[1],t[2])}return i.apply(o,t)}var Z1=u9;function m9(i,o){var t=-1,r=i.length;for(o||(o=Array(r));++t<r;)o[t]=i[t];return o}var Od=m9;var f9=800,g9=16,b9=Date.now;function v9(i){var o=0,t=0;return function(){var r=b9(),n=g9-(r-t);if(t=r,n>0){if(++o>=f9)return arguments[0]}else o=0;return i.apply(void 0,arguments)}}var tx=v9;function x9(i){return function(){return i}}var ex=x9;var y9=(function(){try{var i=Vr(Object,"defineProperty");return i({},"",{}),i}catch{}})(),os=y9;var z9=os?function(i,o){return os(i,"toString",{configurable:!0,enumerable:!1,value:ex(o),writable:!0})}:Dd,rx=z9;var w9=tx(rx),ox=w9;function _9(i,o){for(var t=-1,r=i==null?0:i.length;++t<r&&o(i[t],t,i)!==!1;);return i}var nx=_9;var k9=9007199254740991,C9=/^(?:0|[1-9]\d*)$/;function S9(i,o){var t=typeof i;return o=o??k9,!!o&&(t=="number"||t!="symbol"&&C9.test(i))&&i>-1&&i%1==0&&i<o}var Pd=S9;function E9(i,o,t){o=="__proto__"&&os?os(i,o,{configurable:!0,enumerable:!0,value:t,writable:!0}):i[o]=t}var ns=E9;function T9(i,o){return i===o||i!==i&&o!==o}var gn=T9;var $9=Object.prototype,A9=$9.hasOwnProperty;function L9(i,o,t){var r=i[o];(!(A9.call(i,o)&&gn(r,t))||t===void 0&&!(o in i))&&ns(i,o,t)}var Hd=L9;function q9(i,o,t,r){var n=!t;t||(t={});for(var a=-1,s=o.length;++a<s;){var l=o[a],d=r?r(t[l],i[l],l,t,i):void 0;d===void 0&&(d=i[l]),n?ns(t,l,d):Hd(t,l,d)}return t}var bn=q9;var ix=Math.max;function M9(i,o,t){return o=ix(o===void 0?i.length-1:o,0),function(){for(var r=arguments,n=-1,a=ix(r.length-o,0),s=Array(a);++n<a;)s[n]=r[o+n];n=-1;for(var l=Array(o+1);++n<o;)l[n]=r[n];return l[o]=t(s),Z1(i,this,l)}}var ax=M9;function I9(i,o){return ox(ax(i,o,Dd),i+"")}var sx=I9;var D9=9007199254740991;function N9(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=D9}var Fd=N9;function R9(i){return i!=null&&Fd(i.length)&&!rs(i)}var gi=R9;function O9(i,o,t){if(!gr(t))return!1;var r=typeof o;return(r=="number"?gi(t)&&Pd(o,t.length):r=="string"&&o in t)?gn(t[o],i):!1}var lx=O9;function P9(i){return sx(function(o,t){var r=-1,n=t.length,a=n>1?t[n-1]:void 0,s=n>2?t[2]:void 0;for(a=i.length>3&&typeof a=="function"?(n--,a):void 0,s&&lx(t[0],t[1],s)&&(a=n<3?void 0:a,n=1),o=Object(o);++r<n;){var l=t[r];l&&i(o,l,r,a)}return o})}var cx=P9;var H9=Object.prototype;function F9(i){var o=i&&i.constructor,t=typeof o=="function"&&o.prototype||H9;return i===t}var is=F9;function B9(i,o){for(var t=-1,r=Array(i);++t<i;)r[t]=o(t);return r}var dx=B9;var V9="[object Arguments]";function U9(i){return sr(i)&&Ko(i)==V9}var Gu=U9;var px=Object.prototype,j9=px.hasOwnProperty,G9=px.propertyIsEnumerable,W9=Gu((function(){return arguments})())?Gu:function(i){return sr(i)&&j9.call(i,"callee")&&!G9.call(i,"callee")},Cl=W9;function K9(){return!1}var hx=K9;var fx=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ux=fx&&typeof module=="object"&&module&&!module.nodeType&&module,Y9=ux&&ux.exports===fx,mx=Y9?qe.Buffer:void 0,X9=mx?mx.isBuffer:void 0,Q9=X9||hx,Un=Q9;var J9="[object Arguments]",Z9="[object Array]",t7="[object Boolean]",e7="[object Date]",r7="[object Error]",o7="[object Function]",n7="[object Map]",i7="[object Number]",a7="[object Object]",s7="[object RegExp]",l7="[object Set]",c7="[object String]",d7="[object WeakMap]",p7="[object ArrayBuffer]",h7="[object DataView]",u7="[object Float32Array]",m7="[object Float64Array]",f7="[object Int8Array]",g7="[object Int16Array]",b7="[object Int32Array]",v7="[object Uint8Array]",x7="[object Uint8ClampedArray]",y7="[object Uint16Array]",z7="[object Uint32Array]",Qt={};Qt[u7]=Qt[m7]=Qt[f7]=Qt[g7]=Qt[b7]=Qt[v7]=Qt[x7]=Qt[y7]=Qt[z7]=!0;Qt[J9]=Qt[Z9]=Qt[p7]=Qt[t7]=Qt[h7]=Qt[e7]=Qt[r7]=Qt[o7]=Qt[n7]=Qt[i7]=Qt[a7]=Qt[s7]=Qt[l7]=Qt[c7]=Qt[d7]=!1;function w7(i){return sr(i)&&Fd(i.length)&&!!Qt[Ko(i)]}var gx=w7;function _7(i){return function(o){return i(o)}}var as=_7;var bx=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Sl=bx&&typeof module=="object"&&module&&!module.nodeType&&module,k7=Sl&&Sl.exports===bx,Wu=k7&&Id.process,C7=(function(){try{var i=Sl&&Sl.require&&Sl.require("util").types;return i||Wu&&Wu.binding&&Wu.binding("util")}catch{}})(),jn=C7;var vx=jn&&jn.isTypedArray,S7=vx?as(vx):gx,ss=S7;var E7=Object.prototype,T7=E7.hasOwnProperty;function $7(i,o){var t=wo(i),r=!t&&Cl(i),n=!t&&!r&&Un(i),a=!t&&!r&&!n&&ss(i),s=t||r||n||a,l=s?dx(i.length,String):[],d=l.length;for(var h in i)(o||T7.call(i,h))&&!(s&&(h=="length"||n&&(h=="offset"||h=="parent")||a&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||Pd(h,d)))&&l.push(h);return l}var Bd=$7;function A7(i,o){return function(t){return i(o(t))}}var Vd=A7;var L7=Vd(Object.keys,Object),xx=L7;var q7=Object.prototype,M7=q7.hasOwnProperty;function I7(i){if(!is(i))return xx(i);var o=[];for(var t in Object(i))M7.call(i,t)&&t!="constructor"&&o.push(t);return o}var yx=I7;function D7(i){return gi(i)?Bd(i):yx(i)}var ls=D7;function N7(i){var o=[];if(i!=null)for(var t in Object(i))o.push(t);return o}var zx=N7;var R7=Object.prototype,O7=R7.hasOwnProperty;function P7(i){if(!gr(i))return zx(i);var o=is(i),t=[];for(var r in i)r=="constructor"&&(o||!O7.call(i,r))||t.push(r);return t}var wx=P7;function H7(i){return gi(i)?Bd(i,!0):wx(i)}var vn=H7;var F7=Vr(Object,"create"),Gn=F7;function B7(){this.__data__=Gn?Gn(null):{},this.size=0}var _x=B7;function V7(i){var o=this.has(i)&&delete this.__data__[i];return this.size-=o?1:0,o}var kx=V7;var U7="__lodash_hash_undefined__",j7=Object.prototype,G7=j7.hasOwnProperty;function W7(i){var o=this.__data__;if(Gn){var t=o[i];return t===U7?void 0:t}return G7.call(o,i)?o[i]:void 0}var Cx=W7;var K7=Object.prototype,Y7=K7.hasOwnProperty;function X7(i){var o=this.__data__;return Gn?o[i]!==void 0:Y7.call(o,i)}var Sx=X7;var Q7="__lodash_hash_undefined__";function J7(i,o){var t=this.__data__;return this.size+=this.has(i)?0:1,t[i]=Gn&&o===void 0?Q7:o,this}var Ex=J7;function cs(i){var o=-1,t=i==null?0:i.length;for(this.clear();++o<t;){var r=i[o];this.set(r[0],r[1])}}cs.prototype.clear=_x;cs.prototype.delete=kx;cs.prototype.get=Cx;cs.prototype.has=Sx;cs.prototype.set=Ex;var Ku=cs;function Z7(){this.__data__=[],this.size=0}var Tx=Z7;function tC(i,o){for(var t=i.length;t--;)if(gn(i[t][0],o))return t;return-1}var bi=tC;var eC=Array.prototype,rC=eC.splice;function oC(i){var o=this.__data__,t=bi(o,i);if(t<0)return!1;var r=o.length-1;return t==r?o.pop():rC.call(o,t,1),--this.size,!0}var $x=oC;function nC(i){var o=this.__data__,t=bi(o,i);return t<0?void 0:o[t][1]}var Ax=nC;function iC(i){return bi(this.__data__,i)>-1}var Lx=iC;function aC(i,o){var t=this.__data__,r=bi(t,i);return r<0?(++this.size,t.push([i,o])):t[r][1]=o,this}var qx=aC;function ds(i){var o=-1,t=i==null?0:i.length;for(this.clear();++o<t;){var r=i[o];this.set(r[0],r[1])}}ds.prototype.clear=Tx;ds.prototype.delete=$x;ds.prototype.get=Ax;ds.prototype.has=Lx;ds.prototype.set=qx;var vi=ds;var sC=Vr(qe,"Map"),xi=sC;function lC(){this.size=0,this.__data__={hash:new Ku,map:new(xi||vi),string:new Ku}}var Mx=lC;function cC(i){var o=typeof i;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?i!=="__proto__":i===null}var Ix=cC;function dC(i,o){var t=i.__data__;return Ix(o)?t[typeof o=="string"?"string":"hash"]:t.map}var yi=dC;function pC(i){var o=yi(this,i).delete(i);return this.size-=o?1:0,o}var Dx=pC;function hC(i){return yi(this,i).get(i)}var Nx=hC;function uC(i){return yi(this,i).has(i)}var Rx=uC;function mC(i,o){var t=yi(this,i),r=t.size;return t.set(i,o),this.size+=t.size==r?0:1,this}var Ox=mC;function ps(i){var o=-1,t=i==null?0:i.length;for(this.clear();++o<t;){var r=i[o];this.set(r[0],r[1])}}ps.prototype.clear=Mx;ps.prototype.delete=Dx;ps.prototype.get=Nx;ps.prototype.has=Rx;ps.prototype.set=Ox;var Ud=ps;function fC(i,o){for(var t=-1,r=o.length,n=i.length;++t<r;)i[n+t]=o[t];return i}var jd=fC;var gC=Vd(Object.getPrototypeOf,Object),hs=gC;var bC="[object Object]",vC=Function.prototype,xC=Object.prototype,Px=vC.toString,yC=xC.hasOwnProperty,zC=Px.call(Object);function wC(i){if(!sr(i)||Ko(i)!=bC)return!1;var o=hs(i);if(o===null)return!0;var t=yC.call(o,"constructor")&&o.constructor;return typeof t=="function"&&t instanceof t&&Px.call(t)==zC}var Hx=wC;function _C(){this.__data__=new vi,this.size=0}var Fx=_C;function kC(i){var o=this.__data__,t=o.delete(i);return this.size=o.size,t}var Bx=kC;function CC(i){return this.__data__.get(i)}var Vx=CC;function SC(i){return this.__data__.has(i)}var Ux=SC;var EC=200;function TC(i,o){var t=this.__data__;if(t instanceof vi){var r=t.__data__;if(!xi||r.length<EC-1)return r.push([i,o]),this.size=++t.size,this;t=this.__data__=new Ud(r)}return t.set(i,o),this.size=t.size,this}var jx=TC;function us(i){var o=this.__data__=new vi(i);this.size=o.size}us.prototype.clear=Fx;us.prototype.delete=Bx;us.prototype.get=Vx;us.prototype.has=Ux;us.prototype.set=jx;var zi=us;function $C(i,o){return i&&bn(o,ls(o),i)}var Gx=$C;function AC(i,o){return i&&bn(o,vn(o),i)}var Wx=AC;var Qx=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Kx=Qx&&typeof module=="object"&&module&&!module.nodeType&&module,LC=Kx&&Kx.exports===Qx,Yx=LC?qe.Buffer:void 0,Xx=Yx?Yx.allocUnsafe:void 0;function qC(i,o){if(o)return i.slice();var t=i.length,r=Xx?Xx(t):new i.constructor(t);return i.copy(r),r}var Gd=qC;function MC(i,o){for(var t=-1,r=i==null?0:i.length,n=0,a=[];++t<r;){var s=i[t];o(s,t,i)&&(a[n++]=s)}return a}var Jx=MC;function IC(){return[]}var Wd=IC;var DC=Object.prototype,NC=DC.propertyIsEnumerable,Zx=Object.getOwnPropertySymbols,RC=Zx?function(i){return i==null?[]:(i=Object(i),Jx(Zx(i),function(o){return NC.call(i,o)}))}:Wd,ms=RC;function OC(i,o){return bn(i,ms(i),o)}var ty=OC;var PC=Object.getOwnPropertySymbols,HC=PC?function(i){for(var o=[];i;)jd(o,ms(i)),i=hs(i);return o}:Wd,Kd=HC;function FC(i,o){return bn(i,Kd(i),o)}var ey=FC;function BC(i,o,t){var r=o(i);return wo(i)?r:jd(r,t(i))}var Yd=BC;function VC(i){return Yd(i,ls,ms)}var El=VC;function UC(i){return Yd(i,vn,Kd)}var ry=UC;var jC=Vr(qe,"DataView"),Xd=jC;var GC=Vr(qe,"Promise"),Qd=GC;var WC=Vr(qe,"Set"),Jd=WC;var oy="[object Map]",KC="[object Object]",ny="[object Promise]",iy="[object Set]",ay="[object WeakMap]",sy="[object DataView]",YC=Vn(Xd),XC=Vn(xi),QC=Vn(Qd),JC=Vn(Jd),ZC=Vn(Rd),fa=Ko;(Xd&&fa(new Xd(new ArrayBuffer(1)))!=sy||xi&&fa(new xi)!=oy||Qd&&fa(Qd.resolve())!=ny||Jd&&fa(new Jd)!=iy||Rd&&fa(new Rd)!=ay)&&(fa=function(i){var o=Ko(i),t=o==KC?i.constructor:void 0,r=t?Vn(t):"";if(r)switch(r){case YC:return sy;case XC:return oy;case QC:return ny;case JC:return iy;case ZC:return ay}return o});var Wn=fa;var tS=Object.prototype,eS=tS.hasOwnProperty;function rS(i){var o=i.length,t=new i.constructor(o);return o&&typeof i[0]=="string"&&eS.call(i,"index")&&(t.index=i.index,t.input=i.input),t}var ly=rS;var oS=qe.Uint8Array,fs=oS;function nS(i){var o=new i.constructor(i.byteLength);return new fs(o).set(new fs(i)),o}var gs=nS;function iS(i,o){var t=o?gs(i.buffer):i.buffer;return new i.constructor(t,i.byteOffset,i.byteLength)}var cy=iS;var aS=/\w*$/;function sS(i){var o=new i.constructor(i.source,aS.exec(i));return o.lastIndex=i.lastIndex,o}var dy=sS;var py=zo?zo.prototype:void 0,hy=py?py.valueOf:void 0;function lS(i){return hy?Object(hy.call(i)):{}}var uy=lS;function cS(i,o){var t=o?gs(i.buffer):i.buffer;return new i.constructor(t,i.byteOffset,i.length)}var Zd=cS;var dS="[object Boolean]",pS="[object Date]",hS="[object Map]",uS="[object Number]",mS="[object RegExp]",fS="[object Set]",gS="[object String]",bS="[object Symbol]",vS="[object ArrayBuffer]",xS="[object DataView]",yS="[object Float32Array]",zS="[object Float64Array]",wS="[object Int8Array]",_S="[object Int16Array]",kS="[object Int32Array]",CS="[object Uint8Array]",SS="[object Uint8ClampedArray]",ES="[object Uint16Array]",TS="[object Uint32Array]";function $S(i,o,t){var r=i.constructor;switch(o){case vS:return gs(i);case dS:case pS:return new r(+i);case xS:return cy(i,t);case yS:case zS:case wS:case _S:case kS:case CS:case SS:case ES:case TS:return Zd(i,t);case hS:return new r;case uS:case gS:return new r(i);case mS:return dy(i);case fS:return new r;case bS:return uy(i)}}var my=$S;function AS(i){return typeof i.constructor=="function"&&!is(i)?J1(hs(i)):{}}var tp=AS;var LS="[object Map]";function qS(i){return sr(i)&&Wn(i)==LS}var fy=qS;var gy=jn&&jn.isMap,MS=gy?as(gy):fy,by=MS;var IS="[object Set]";function DS(i){return sr(i)&&Wn(i)==IS}var vy=DS;var xy=jn&&jn.isSet,NS=xy?as(xy):vy,yy=NS;var RS=1,OS=2,PS=4,zy="[object Arguments]",HS="[object Array]",FS="[object Boolean]",BS="[object Date]",VS="[object Error]",wy="[object Function]",US="[object GeneratorFunction]",jS="[object Map]",GS="[object Number]",_y="[object Object]",WS="[object RegExp]",KS="[object Set]",YS="[object String]",XS="[object Symbol]",QS="[object WeakMap]",JS="[object ArrayBuffer]",ZS="[object DataView]",tE="[object Float32Array]",eE="[object Float64Array]",rE="[object Int8Array]",oE="[object Int16Array]",nE="[object Int32Array]",iE="[object Uint8Array]",aE="[object Uint8ClampedArray]",sE="[object Uint16Array]",lE="[object Uint32Array]",Gt={};Gt[zy]=Gt[HS]=Gt[JS]=Gt[ZS]=Gt[FS]=Gt[BS]=Gt[tE]=Gt[eE]=Gt[rE]=Gt[oE]=Gt[nE]=Gt[jS]=Gt[GS]=Gt[_y]=Gt[WS]=Gt[KS]=Gt[YS]=Gt[XS]=Gt[iE]=Gt[aE]=Gt[sE]=Gt[lE]=!0;Gt[VS]=Gt[wy]=Gt[QS]=!1;function ep(i,o,t,r,n,a){var s,l=o&RS,d=o&OS,h=o&PS;if(t&&(s=n?t(i,r,n,a):t(i)),s!==void 0)return s;if(!gr(i))return i;var m=wo(i);if(m){if(s=ly(i),!l)return Od(i,s)}else{var f=Wn(i),b=f==wy||f==US;if(Un(i))return Gd(i,l);if(f==_y||f==zy||b&&!n){if(s=d||b?{}:tp(i),!l)return d?ey(i,Wx(s,i)):ty(i,Gx(s,i))}else{if(!Gt[f])return n?i:{};s=my(i,f,l)}}a||(a=new zi);var g=a.get(i);if(g)return g;a.set(i,s),yy(i)?i.forEach(function(_){s.add(ep(_,o,t,_,i,a))}):by(i)&&i.forEach(function(_,$){s.set($,ep(_,o,t,$,i,a))});var v=h?d?ry:El:d?vn:ls,x=m?void 0:v(i);return nx(x||i,function(_,$){x&&($=_,_=i[$]),Hd(s,$,ep(_,o,t,$,i,a))}),s}var ky=ep;var cE=1,dE=4;function pE(i){return ky(i,cE|dE)}var xn=pE;var hE="__lodash_hash_undefined__";function uE(i){return this.__data__.set(i,hE),this}var Cy=uE;function mE(i){return this.__data__.has(i)}var Sy=mE;function rp(i){var o=-1,t=i==null?0:i.length;for(this.__data__=new Ud;++o<t;)this.add(i[o])}rp.prototype.add=rp.prototype.push=Cy;rp.prototype.has=Sy;var Ey=rp;function fE(i,o){for(var t=-1,r=i==null?0:i.length;++t<r;)if(o(i[t],t,i))return!0;return!1}var Ty=fE;function gE(i,o){return i.has(o)}var $y=gE;var bE=1,vE=2;function xE(i,o,t,r,n,a){var s=t&bE,l=i.length,d=o.length;if(l!=d&&!(s&&d>l))return!1;var h=a.get(i),m=a.get(o);if(h&&m)return h==o&&m==i;var f=-1,b=!0,g=t&vE?new Ey:void 0;for(a.set(i,o),a.set(o,i);++f<l;){var v=i[f],x=o[f];if(r)var _=s?r(x,v,f,o,i,a):r(v,x,f,i,o,a);if(_!==void 0){if(_)continue;b=!1;break}if(g){if(!Ty(o,function($,N){if(!$y(g,N)&&(v===$||n(v,$,t,r,a)))return g.push(N)})){b=!1;break}}else if(!(v===x||n(v,x,t,r,a))){b=!1;break}}return a.delete(i),a.delete(o),b}var op=xE;function yE(i){var o=-1,t=Array(i.size);return i.forEach(function(r,n){t[++o]=[n,r]}),t}var Ay=yE;function zE(i){var o=-1,t=Array(i.size);return i.forEach(function(r){t[++o]=r}),t}var Ly=zE;var wE=1,_E=2,kE="[object Boolean]",CE="[object Date]",SE="[object Error]",EE="[object Map]",TE="[object Number]",$E="[object RegExp]",AE="[object Set]",LE="[object String]",qE="[object Symbol]",ME="[object ArrayBuffer]",IE="[object DataView]",qy=zo?zo.prototype:void 0,Yu=qy?qy.valueOf:void 0;function DE(i,o,t,r,n,a,s){switch(t){case IE:if(i.byteLength!=o.byteLength||i.byteOffset!=o.byteOffset)return!1;i=i.buffer,o=o.buffer;case ME:return!(i.byteLength!=o.byteLength||!a(new fs(i),new fs(o)));case kE:case CE:case TE:return gn(+i,+o);case SE:return i.name==o.name&&i.message==o.message;case $E:case LE:return i==o+"";case EE:var l=Ay;case AE:var d=r&wE;if(l||(l=Ly),i.size!=o.size&&!d)return!1;var h=s.get(i);if(h)return h==o;r|=_E,s.set(i,o);var m=op(l(i),l(o),r,n,a,s);return s.delete(i),m;case qE:if(Yu)return Yu.call(i)==Yu.call(o)}return!1}var My=DE;var NE=1,RE=Object.prototype,OE=RE.hasOwnProperty;function PE(i,o,t,r,n,a){var s=t&NE,l=El(i),d=l.length,h=El(o),m=h.length;if(d!=m&&!s)return!1;for(var f=d;f--;){var b=l[f];if(!(s?b in o:OE.call(o,b)))return!1}var g=a.get(i),v=a.get(o);if(g&&v)return g==o&&v==i;var x=!0;a.set(i,o),a.set(o,i);for(var _=s;++f<d;){b=l[f];var $=i[b],N=o[b];if(r)var G=s?r(N,$,b,o,i,a):r($,N,b,i,o,a);if(!(G===void 0?$===N||n($,N,t,r,a):G)){x=!1;break}_||(_=b=="constructor")}if(x&&!_){var I=i.constructor,w=o.constructor;I!=w&&"constructor"in i&&"constructor"in o&&!(typeof I=="function"&&I instanceof I&&typeof w=="function"&&w instanceof w)&&(x=!1)}return a.delete(i),a.delete(o),x}var Iy=PE;var HE=1,Dy="[object Arguments]",Ny="[object Array]",np="[object Object]",FE=Object.prototype,Ry=FE.hasOwnProperty;function BE(i,o,t,r,n,a){var s=wo(i),l=wo(o),d=s?Ny:Wn(i),h=l?Ny:Wn(o);d=d==Dy?np:d,h=h==Dy?np:h;var m=d==np,f=h==np,b=d==h;if(b&&Un(i)){if(!Un(o))return!1;s=!0,m=!1}if(b&&!m)return a||(a=new zi),s||ss(i)?op(i,o,t,r,n,a):My(i,o,d,t,r,n,a);if(!(t&HE)){var g=m&&Ry.call(i,"__wrapped__"),v=f&&Ry.call(o,"__wrapped__");if(g||v){var x=g?i.value():i,_=v?o.value():o;return a||(a=new zi),n(x,_,t,r,a)}}return b?(a||(a=new zi),Iy(i,o,t,r,n,a)):!1}var Oy=BE;function Py(i,o,t,r,n){return i===o?!0:i==null||o==null||!sr(i)&&!sr(o)?i!==i&&o!==o:Oy(i,o,t,r,Py,n)}var Hy=Py;function VE(i){return function(o,t,r){for(var n=-1,a=Object(o),s=r(o),l=s.length;l--;){var d=s[i?l:++n];if(t(a[d],d,a)===!1)break}return o}}var Fy=VE;var UE=Fy(),By=UE;function jE(i,o,t){(t!==void 0&&!gn(i[o],t)||t===void 0&&!(o in i))&&ns(i,o,t)}var Tl=jE;function GE(i){return sr(i)&&gi(i)}var Vy=GE;function WE(i,o){if(!(o==="constructor"&&typeof i[o]=="function")&&o!="__proto__")return i[o]}var $l=WE;function KE(i){return bn(i,vn(i))}var Uy=KE;function YE(i,o,t,r,n,a,s){var l=$l(i,t),d=$l(o,t),h=s.get(d);if(h){Tl(i,t,h);return}var m=a?a(l,d,t+"",i,o,s):void 0,f=m===void 0;if(f){var b=wo(d),g=!b&&Un(d),v=!b&&!g&&ss(d);m=d,b||g||v?wo(l)?m=l:Vy(l)?m=Od(l):g?(f=!1,m=Gd(d,!0)):v?(f=!1,m=Zd(d,!0)):m=[]:Hx(d)||Cl(d)?(m=l,Cl(l)?m=Uy(l):(!gr(l)||rs(l))&&(m=tp(d))):f=!1}f&&(s.set(d,m),n(m,d,r,a,s),s.delete(d)),Tl(i,t,m)}var jy=YE;function Gy(i,o,t,r,n){i!==o&&By(o,function(a,s){if(n||(n=new zi),gr(a))jy(i,o,s,t,Gy,r,n);else{var l=r?r($l(i,s),a,s+"",i,o,n):void 0;l===void 0&&(l=a),Tl(i,s,l)}},vn)}var Wy=Gy;function XE(i,o){return Hy(i,o)}var ga=XE;var QE=cx(function(i,o,t){Wy(i,o,t)}),Ur=QE;var ql={};E_(ql,{Attributor:()=>$r,AttributorStore:()=>Al,BlockBlot:()=>ba,ClassAttributor:()=>Me,ContainerBlot:()=>zs,EmbedBlot:()=>pe,InlineBlot:()=>ip,LeafBlot:()=>Ie,ParentBlot:()=>jr,Registry:()=>ki,Scope:()=>X,ScrollBlot:()=>Ll,StyleAttributor:()=>Gr,TextBlot:()=>ws});var X=(i=>(i[i.TYPE=3]="TYPE",i[i.LEVEL=12]="LEVEL",i[i.ATTRIBUTE=13]="ATTRIBUTE",i[i.BLOT=14]="BLOT",i[i.INLINE=7]="INLINE",i[i.BLOCK=11]="BLOCK",i[i.BLOCK_BLOT=10]="BLOCK_BLOT",i[i.INLINE_BLOT=6]="INLINE_BLOT",i[i.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",i[i.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",i[i.ANY=15]="ANY",i))(X||{}),$r=class{constructor(o,t,r={}){this.attrName=o,this.keyName=t;let n=X.TYPE&X.ATTRIBUTE;this.scope=r.scope!=null?r.scope&X.LEVEL|n:X.ATTRIBUTE,r.whitelist!=null&&(this.whitelist=r.whitelist)}static keys(o){return Array.from(o.attributes).map(t=>t.name)}add(o,t){return this.canAdd(o,t)?(o.setAttribute(this.keyName,t),!0):!1}canAdd(o,t){return this.whitelist==null?!0:typeof t=="string"?this.whitelist.indexOf(t.replace(/["']/g,""))>-1:this.whitelist.indexOf(t)>-1}remove(o){o.removeAttribute(this.keyName)}value(o){let t=o.getAttribute(this.keyName);return this.canAdd(o,t)&&t?t:""}},_i=class extends Error{constructor(o){o="[Parchment] "+o,super(o),this.message=o,this.name=this.constructor.name}},Xy=class Qu{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(o,t=!1){if(o==null)return null;if(this.blots.has(o))return this.blots.get(o)||null;if(t){let r=null;try{r=o.parentNode}catch{return null}return this.find(r,t)}return null}create(o,t,r){let n=this.query(t);if(n==null)throw new _i(`Unable to create ${t} blot`);let a=n,s=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:a.create(r),l=new a(o,s,r);return Qu.blots.set(l.domNode,l),l}find(o,t=!1){return Qu.find(o,t)}query(o,t=X.ANY){let r;return typeof o=="string"?r=this.types[o]||this.attributes[o]:o instanceof Text||o.nodeType===Node.TEXT_NODE?r=this.types.text:typeof o=="number"?o&X.LEVEL&X.BLOCK?r=this.types.block:o&X.LEVEL&X.INLINE&&(r=this.types.inline):o instanceof Element&&((o.getAttribute("class")||"").split(/\s+/).some(n=>(r=this.classes[n],!!r)),r=r||this.tags[o.tagName]),r==null?null:"scope"in r&&t&X.LEVEL&r.scope&&t&X.TYPE&r.scope?r:null}register(...o){return o.map(t=>{let r="blotName"in t,n="attrName"in t;if(!r&&!n)throw new _i("Invalid definition");if(r&&t.blotName==="abstract")throw new _i("Cannot register abstract class");let a=r?t.blotName:n?t.attrName:void 0;return this.types[a]=t,n?typeof t.keyName=="string"&&(this.attributes[t.keyName]=t):r&&(t.className&&(this.classes[t.className]=t),t.tagName&&(Array.isArray(t.tagName)?t.tagName=t.tagName.map(s=>s.toUpperCase()):t.tagName=t.tagName.toUpperCase(),(Array.isArray(t.tagName)?t.tagName:[t.tagName]).forEach(s=>{(this.tags[s]==null||t.className==null)&&(this.tags[s]=t)}))),t})}};Xy.blots=new WeakMap;var ki=Xy;function Ky(i,o){return(i.getAttribute("class")||"").split(/\s+/).filter(t=>t.indexOf(`${o}-`)===0)}var Ju=class extends $r{static keys(o){return(o.getAttribute("class")||"").split(/\s+/).map(t=>t.split("-").slice(0,-1).join("-"))}add(o,t){return this.canAdd(o,t)?(this.remove(o),o.classList.add(`${this.keyName}-${t}`),!0):!1}remove(o){Ky(o,this.keyName).forEach(t=>{o.classList.remove(t)}),o.classList.length===0&&o.removeAttribute("class")}value(o){let t=(Ky(o,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(o,t)?t:""}},Me=Ju;function Xu(i){let o=i.split("-"),t=o.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("");return o[0]+t}var Zu=class extends $r{static keys(o){return(o.getAttribute("style")||"").split(";").map(t=>t.split(":")[0].trim())}add(o,t){return this.canAdd(o,t)?(o.style[Xu(this.keyName)]=t,!0):!1}remove(o){o.style[Xu(this.keyName)]="",o.getAttribute("style")||o.removeAttribute("style")}value(o){let t=o.style[Xu(this.keyName)];return this.canAdd(o,t)?t:""}},Gr=Zu,tm=class{constructor(o){this.attributes={},this.domNode=o,this.build()}attribute(o,t){t?o.add(this.domNode,t)&&(o.value(this.domNode)!=null?this.attributes[o.attrName]=o:delete this.attributes[o.attrName]):(o.remove(this.domNode),delete this.attributes[o.attrName])}build(){this.attributes={};let o=ki.find(this.domNode);if(o==null)return;let t=$r.keys(this.domNode),r=Me.keys(this.domNode),n=Gr.keys(this.domNode);t.concat(r).concat(n).forEach(a=>{let s=o.scroll.query(a,X.ATTRIBUTE);s instanceof $r&&(this.attributes[s.attrName]=s)})}copy(o){Object.keys(this.attributes).forEach(t=>{let r=this.attributes[t].value(this.domNode);o.format(t,r)})}move(o){this.copy(o),Object.keys(this.attributes).forEach(t=>{this.attributes[t].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((o,t)=>(o[t]=this.attributes[t].value(this.domNode),o),{})}},Al=tm,Qy=class{constructor(o,t){this.scroll=o,this.domNode=t,ki.blots.set(t,this),this.prev=null,this.next=null}static create(o){if(this.tagName==null)throw new _i("Blot definition missing tagName");let t,r;return Array.isArray(this.tagName)?(typeof o=="string"?(r=o.toUpperCase(),parseInt(r,10).toString()===r&&(r=parseInt(r,10))):typeof o=="number"&&(r=o),typeof r=="number"?t=document.createElement(this.tagName[r-1]):r&&this.tagName.indexOf(r)>-1?t=document.createElement(r):t=document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t}get statics(){return this.constructor}attach(){}clone(){let o=this.domNode.cloneNode(!1);return this.scroll.create(o)}detach(){this.parent!=null&&this.parent.removeChild(this),ki.blots.delete(this.domNode)}deleteAt(o,t){this.isolate(o,t).remove()}formatAt(o,t,r,n){let a=this.isolate(o,t);if(this.scroll.query(r,X.BLOT)!=null&&n)a.wrap(r,n);else if(this.scroll.query(r,X.ATTRIBUTE)!=null){let s=this.scroll.create(this.statics.scope);a.wrap(s),s.format(r,n)}}insertAt(o,t,r){let n=r==null?this.scroll.create("text",t):this.scroll.create(t,r),a=this.split(o);this.parent.insertBefore(n,a||void 0)}isolate(o,t){let r=this.split(o);if(r==null)throw new Error("Attempt to isolate at end");return r.split(t),r}length(){return 1}offset(o=this.parent){return this.parent==null||this===o?0:this.parent.children.offset(this)+this.parent.offset(o)}optimize(o){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(o,t){let r=typeof o=="string"?this.scroll.create(o,t):o;return this.parent!=null&&(this.parent.insertBefore(r,this.next||void 0),this.remove()),r}split(o,t){return o===0?this:this.next}update(o,t){}wrap(o,t){let r=typeof o=="string"?this.scroll.create(o,t):o;if(this.parent!=null&&this.parent.insertBefore(r,this.next||void 0),typeof r.appendChild!="function")throw new _i(`Cannot wrap ${o}`);return r.appendChild(this),r}};Qy.blotName="abstract";var Jy=Qy,Zy=class extends Jy{static value(o){return!0}index(o,t){return this.domNode===o||this.domNode.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1}position(o,t){let r=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return o>0&&(r+=1),[this.parent.domNode,r]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};Zy.scope=X.INLINE_BLOT;var JE=Zy,Ie=JE,em=class{constructor(){this.head=null,this.tail=null,this.length=0}append(...o){if(this.insertBefore(o[0],null),o.length>1){let t=o.slice(1);this.append(...t)}}at(o){let t=this.iterator(),r=t();for(;r&&o>0;)o-=1,r=t();return r}contains(o){let t=this.iterator(),r=t();for(;r;){if(r===o)return!0;r=t()}return!1}indexOf(o){let t=this.iterator(),r=t(),n=0;for(;r;){if(r===o)return n;n+=1,r=t()}return-1}insertBefore(o,t){o!=null&&(this.remove(o),o.next=t,t!=null?(o.prev=t.prev,t.prev!=null&&(t.prev.next=o),t.prev=o,t===this.head&&(this.head=o)):this.tail!=null?(this.tail.next=o,o.prev=this.tail,this.tail=o):(o.prev=null,this.head=this.tail=o),this.length+=1)}offset(o){let t=0,r=this.head;for(;r!=null;){if(r===o)return t;t+=r.length(),r=r.next}return-1}remove(o){this.contains(o)&&(o.prev!=null&&(o.prev.next=o.next),o.next!=null&&(o.next.prev=o.prev),o===this.head&&(this.head=o.next),o===this.tail&&(this.tail=o.prev),this.length-=1)}iterator(o=this.head){return()=>{let t=o;return o!=null&&(o=o.next),t}}find(o,t=!1){let r=this.iterator(),n=r();for(;n;){let a=n.length();if(o<a||t&&o===a&&(n.next==null||n.next.length()!==0))return[n,o];o-=a,n=r()}return[null,0]}forEach(o){let t=this.iterator(),r=t();for(;r;)o(r),r=t()}forEachAt(o,t,r){if(t<=0)return;let[n,a]=this.find(o),s=o-a,l=this.iterator(n),d=l();for(;d&&s<o+t;){let h=d.length();o>s?r(d,o-s,Math.min(t,s+h-o)):r(d,0,Math.min(h,o+t-s)),s+=h,d=l()}}map(o){return this.reduce((t,r)=>(t.push(o(r)),t),[])}reduce(o,t){let r=this.iterator(),n=r();for(;n;)t=o(t,n),n=r();return t}};function Yy(i,o){let t=o.find(i);if(t)return t;try{return o.create(i)}catch{let r=o.create(X.INLINE);return Array.from(i.childNodes).forEach(n=>{r.domNode.appendChild(n)}),i.parentNode&&i.parentNode.replaceChild(r.domNode,i),r.attach(),r}}var tz=class wi extends Jy{constructor(o,t){super(o,t),this.uiNode=null,this.build()}appendChild(o){this.insertBefore(o)}attach(){super.attach(),this.children.forEach(o=>{o.attach()})}attachUI(o){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=o,wi.uiClass&&this.uiNode.classList.add(wi.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new em,Array.from(this.domNode.childNodes).filter(o=>o!==this.uiNode).reverse().forEach(o=>{try{let t=Yy(o,this.scroll);this.insertBefore(t,this.children.head||void 0)}catch(t){if(t instanceof _i)return;throw t}})}deleteAt(o,t){if(o===0&&t===this.length())return this.remove();this.children.forEachAt(o,t,(r,n,a)=>{r.deleteAt(n,a)})}descendant(o,t=0){let[r,n]=this.children.find(t);return o.blotName==null&&o(r)||o.blotName!=null&&r instanceof o?[r,n]:r instanceof wi?r.descendant(o,n):[null,-1]}descendants(o,t=0,r=Number.MAX_VALUE){let n=[],a=r;return this.children.forEachAt(t,r,(s,l,d)=>{(o.blotName==null&&o(s)||o.blotName!=null&&s instanceof o)&&n.push(s),s instanceof wi&&(n=n.concat(s.descendants(o,l,a))),a-=d}),n}detach(){this.children.forEach(o=>{o.detach()}),super.detach()}enforceAllowedChildren(){let o=!1;this.children.forEach(t=>{o||this.statics.allowedChildren.some(r=>t instanceof r)||(t.statics.scope===X.BLOCK_BLOT?(t.next!=null&&this.splitAfter(t),t.prev!=null&&this.splitAfter(t.prev),t.parent.unwrap(),o=!0):t instanceof wi?t.unwrap():t.remove())})}formatAt(o,t,r,n){this.children.forEachAt(o,t,(a,s,l)=>{a.formatAt(s,l,r,n)})}insertAt(o,t,r){let[n,a]=this.children.find(o);if(n)n.insertAt(a,t,r);else{let s=r==null?this.scroll.create("text",t):this.scroll.create(t,r);this.appendChild(s)}}insertBefore(o,t){o.parent!=null&&o.parent.children.remove(o);let r=null;this.children.insertBefore(o,t||null),o.parent=this,t!=null&&(r=t.domNode),(this.domNode.parentNode!==o.domNode||this.domNode.nextSibling!==r)&&this.domNode.insertBefore(o.domNode,r),o.attach()}length(){return this.children.reduce((o,t)=>o+t.length(),0)}moveChildren(o,t){this.children.forEach(r=>{o.insertBefore(r,t)})}optimize(o){if(super.optimize(o),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){let t=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(t)}else this.remove()}path(o,t=!1){let[r,n]=this.children.find(o,t),a=[[this,o]];return r instanceof wi?a.concat(r.path(n,t)):(r!=null&&a.push([r,n]),a)}removeChild(o){this.children.remove(o)}replaceWith(o,t){let r=typeof o=="string"?this.scroll.create(o,t):o;return r instanceof wi&&this.moveChildren(r),super.replaceWith(r)}split(o,t=!1){if(!t){if(o===0)return this;if(o===this.length())return this.next}let r=this.clone();return this.parent&&this.parent.insertBefore(r,this.next||void 0),this.children.forEachAt(o,this.length(),(n,a,s)=>{let l=n.split(a,t);l!=null&&r.appendChild(l)}),r}splitAfter(o){let t=this.clone();for(;o.next!=null;)t.appendChild(o.next);return this.parent&&this.parent.insertBefore(t,this.next||void 0),t}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(o,t){let r=[],n=[];o.forEach(a=>{a.target===this.domNode&&a.type==="childList"&&(r.push(...a.addedNodes),n.push(...a.removedNodes))}),n.forEach(a=>{if(a.parentNode!=null&&a.tagName!=="IFRAME"&&document.body.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;let s=this.scroll.find(a);s!=null&&(s.domNode.parentNode==null||s.domNode.parentNode===this.domNode)&&s.detach()}),r.filter(a=>a.parentNode===this.domNode&&a!==this.uiNode).sort((a,s)=>a===s?0:a.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(a=>{let s=null;a.nextSibling!=null&&(s=this.scroll.find(a.nextSibling));let l=Yy(a,this.scroll);(l.next!==s||l.next==null)&&(l.parent!=null&&l.parent.removeChild(this),this.insertBefore(l,s||void 0))}),this.enforceAllowedChildren()}};tz.uiClass="";var ZE=tz,jr=ZE;function tT(i,o){if(Object.keys(i).length!==Object.keys(o).length)return!1;for(let t in i)if(i[t]!==o[t])return!1;return!0}var bs=class vs extends jr{static create(o){return super.create(o)}static formats(o,t){let r=t.query(vs.blotName);if(!(r!=null&&o.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return o.tagName.toLowerCase()}}constructor(o,t){super(o,t),this.attributes=new Al(this.domNode)}format(o,t){if(o===this.statics.blotName&&!t)this.children.forEach(r=>{r instanceof vs||(r=r.wrap(vs.blotName,!0)),this.attributes.copy(r)}),this.unwrap();else{let r=this.scroll.query(o,X.INLINE);if(r==null)return;r instanceof $r?this.attributes.attribute(r,t):t&&(o!==this.statics.blotName||this.formats()[o]!==t)&&this.replaceWith(o,t)}}formats(){let o=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(o[this.statics.blotName]=t),o}formatAt(o,t,r,n){this.formats()[r]!=null||this.scroll.query(r,X.ATTRIBUTE)?this.isolate(o,t).format(r,n):super.formatAt(o,t,r,n)}optimize(o){super.optimize(o);let t=this.formats();if(Object.keys(t).length===0)return this.unwrap();let r=this.next;r instanceof vs&&r.prev===this&&tT(t,r.formats())&&(r.moveChildren(this),r.remove())}replaceWith(o,t){let r=super.replaceWith(o,t);return this.attributes.copy(r),r}update(o,t){super.update(o,t),o.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}wrap(o,t){let r=super.wrap(o,t);return r instanceof vs&&this.attributes.move(r),r}};bs.allowedChildren=[bs,Ie],bs.blotName="inline",bs.scope=X.INLINE_BLOT,bs.tagName="SPAN";var eT=bs,ip=eT,xs=class rm extends jr{static create(o){return super.create(o)}static formats(o,t){let r=t.query(rm.blotName);if(!(r!=null&&o.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return o.tagName.toLowerCase()}}constructor(o,t){super(o,t),this.attributes=new Al(this.domNode)}format(o,t){let r=this.scroll.query(o,X.BLOCK);r!=null&&(r instanceof $r?this.attributes.attribute(r,t):o===this.statics.blotName&&!t?this.replaceWith(rm.blotName):t&&(o!==this.statics.blotName||this.formats()[o]!==t)&&this.replaceWith(o,t))}formats(){let o=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(o[this.statics.blotName]=t),o}formatAt(o,t,r,n){this.scroll.query(r,X.BLOCK)!=null?this.format(r,n):super.formatAt(o,t,r,n)}insertAt(o,t,r){if(r==null||this.scroll.query(t,X.INLINE)!=null)super.insertAt(o,t,r);else{let n=this.split(o);if(n!=null){let a=this.scroll.create(t,r);n.parent.insertBefore(a,n)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(o,t){let r=super.replaceWith(o,t);return this.attributes.copy(r),r}update(o,t){super.update(o,t),o.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}};xs.blotName="block",xs.scope=X.BLOCK_BLOT,xs.tagName="P",xs.allowedChildren=[ip,xs,Ie];var rT=xs,ba=rT,om=class extends jr{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(o,t){super.deleteAt(o,t),this.enforceAllowedChildren()}formatAt(o,t,r,n){super.formatAt(o,t,r,n),this.enforceAllowedChildren()}insertAt(o,t,r){super.insertAt(o,t,r),this.enforceAllowedChildren()}optimize(o){super.optimize(o),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};om.blotName="container",om.scope=X.BLOCK_BLOT;var oT=om,zs=oT,nm=class extends Ie{static formats(o,t){}format(o,t){super.formatAt(0,this.length(),o,t)}formatAt(o,t,r,n){o===0&&t===this.length()?this.format(r,n):super.formatAt(o,t,r,n)}formats(){return this.statics.formats(this.domNode,this.scroll)}},pe=nm,nT={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},iT=100,ys=class extends jr{constructor(o,t){super(null,t),this.registry=o,this.scroll=this,this.build(),this.observer=new MutationObserver(r=>{this.update(r)}),this.observer.observe(this.domNode,nT),this.attach()}create(o,t){return this.registry.create(this,o,t)}find(o,t=!1){let r=this.registry.find(o,t);return r?r.scroll===this?r:t?this.find(r.scroll.domNode.parentNode,!0):null:null}query(o,t=X.ANY){return this.registry.query(o,t)}register(...o){return this.registry.register(...o)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(o,t){this.update(),o===0&&t===this.length()?this.children.forEach(r=>{r.remove()}):super.deleteAt(o,t)}formatAt(o,t,r,n){this.update(),super.formatAt(o,t,r,n)}insertAt(o,t,r){this.update(),super.insertAt(o,t,r)}optimize(o=[],t={}){super.optimize(t);let r=t.mutationsMap||new WeakMap,n=Array.from(this.observer.takeRecords());for(;n.length>0;)o.push(n.pop());let a=(d,h=!0)=>{d==null||d===this||d.domNode.parentNode!=null&&(r.has(d.domNode)||r.set(d.domNode,[]),h&&a(d.parent))},s=d=>{r.has(d.domNode)&&(d instanceof jr&&d.children.forEach(s),r.delete(d.domNode),d.optimize(t))},l=o;for(let d=0;l.length>0;d+=1){if(d>=iT)throw new Error("[Parchment] Maximum optimize iterations reached");for(l.forEach(h=>{let m=this.find(h.target,!0);m!=null&&(m.domNode===h.target&&(h.type==="childList"?(a(this.find(h.previousSibling,!1)),Array.from(h.addedNodes).forEach(f=>{let b=this.find(f,!1);a(b,!1),b instanceof jr&&b.children.forEach(g=>{a(g,!1)})})):h.type==="attributes"&&a(m.prev)),a(m))}),this.children.forEach(s),l=Array.from(this.observer.takeRecords()),n=l.slice();n.length>0;)o.push(n.pop())}}update(o,t={}){o=o||this.observer.takeRecords();let r=new WeakMap;o.map(n=>{let a=this.find(n.target,!0);return a==null?null:r.has(a.domNode)?(r.get(a.domNode).push(n),null):(r.set(a.domNode,[n]),a)}).forEach(n=>{n!=null&&n!==this&&r.has(n.domNode)&&n.update(r.get(n.domNode)||[],t)}),t.mutationsMap=r,r.has(this.domNode)&&super.update(r.get(this.domNode),t),this.optimize(o,t)}};ys.blotName="scroll",ys.defaultChild=ba,ys.allowedChildren=[ba,zs],ys.scope=X.BLOCK_BLOT,ys.tagName="DIV";var aT=ys,Ll=aT,im=class ez extends Ie{static create(o){return document.createTextNode(o)}static value(o){return o.data}constructor(o,t){super(o,t),this.text=this.statics.value(this.domNode)}deleteAt(o,t){this.domNode.data=this.text=this.text.slice(0,o)+this.text.slice(o+t)}index(o,t){return this.domNode===o?t:-1}insertAt(o,t,r){r==null?(this.text=this.text.slice(0,o)+t+this.text.slice(o),this.domNode.data=this.text):super.insertAt(o,t,r)}length(){return this.text.length}optimize(o){super.optimize(o),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof ez&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(o,t=!1){return[this.domNode,o]}split(o,t=!1){if(!t){if(o===0)return this;if(o===this.length())return this.next}let r=this.scroll.create(this.domNode.splitText(o));return this.parent.insertBefore(r,this.next||void 0),this.text=this.statics.value(this.domNode),r}update(o,t){o.some(r=>r.type==="characterData"&&r.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};im.blotName="text",im.scope=X.INLINE_BLOT;var sT=im,ws=sT;var Si=pr(Br(),1);var he=pr(Br(),1);var sm=pr(Br(),1);var Ml=class extends pe{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}};Ml.blotName="break";Ml.tagName="BR";var br=Ml;var Se=class extends ws{},lT={"&":"&","<":"<",">":">",'"':""","'":"'"};function va(i){return i.replace(/[&<>"']/g,o=>lT[o])}var yn=class yn extends ip{static compare(o,t){let r=yn.order.indexOf(o),n=yn.order.indexOf(t);return r>=0||n>=0?r-n:o===t?0:o<t?-1:1}formatAt(o,t,r,n){if(yn.compare(this.statics.blotName,r)<0&&this.scroll.query(r,X.BLOT)){let a=this.isolate(o,t);n&&a.wrap(r,n)}else super.formatAt(o,t,r,n)}optimize(o){if(super.optimize(o),this.parent instanceof yn&&yn.compare(this.statics.blotName,this.parent.statics.blotName)>0){let t=this.parent.isolate(this.offset(),this.length());this.moveChildren(t),t.wrap(this)}}};B(yn,"allowedChildren",[yn,br,pe,Se]),B(yn,"order",["cursor","inline","link","underline","strike","italic","bold","script","code"]);var am=yn,vr=am;var rz=1,Ft=class extends ba{constructor(){super(...arguments);B(this,"cache",{})}delta(){return this.cache.delta==null&&(this.cache.delta=lm(this)),this.cache.delta}deleteAt(t,r){super.deleteAt(t,r),this.cache={}}formatAt(t,r,n,a){r<=0||(this.scroll.query(n,X.BLOCK)?t+r===this.length()&&this.format(n,a):super.formatAt(t,Math.min(r,this.length()-t-1),n,a),this.cache={})}insertAt(t,r,n){if(n!=null){super.insertAt(t,r,n),this.cache={};return}if(r.length===0)return;let a=r.split(`
|
|
2582
|
-
`),s=a.shift();s.length>0&&(t<this.length()-1||this.children.tail==null?super.insertAt(Math.min(t,this.length()-1),s):this.children.tail.insertAt(this.children.tail.length(),s),this.cache={});let l=this;a.reduce((d,h)=>(l=l.split(d,!0),l.insertAt(0,h),h.length),t+s.length)}insertBefore(t,r){let{head:n}=this.children;super.insertBefore(t,r),n instanceof br&&n.remove(),this.cache={}}length(){return this.cache.length==null&&(this.cache.length=super.length()+rz),this.cache.length}moveChildren(t,r){super.moveChildren(t,r),this.cache={}}optimize(t){super.optimize(t),this.cache={}}path(t){return super.path(t,!0)}removeChild(t){super.removeChild(t),this.cache={}}split(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(r&&(t===0||t>=this.length()-rz)){let a=this.clone();return t===0?(this.parent.insertBefore(a,this),this):(this.parent.insertBefore(a,this.next),a)}let n=super.split(t,r);return this.cache={},n}};Ft.blotName="block";Ft.tagName="P";Ft.defaultChild=br;Ft.allowedChildren=[br,vr,pe,Se];var
|
|
2583
|
-
`),a=n.pop(),s=n.map(d=>{let h=this.scroll.create(Ft.blotName);return h.insertAt(0,d),h}),l=this.split(o);s.forEach(d=>{this.parent.insertBefore(d,l)}),a&&this.parent.insertBefore(this.scroll.create("text",a),l)}};
|
|
2584
|
-
`,Wr(i))}function Wr(i){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return i==null||("formats"in i&&typeof i.formats=="function"&&(o={...o,...i.formats()},t&&delete o["code-token"]),i.parent==null||i.parent.statics.blotName==="scroll"||i.parent.statics.scope!==i.statics.scope)?o:Wr(i.parent,o,t)}var _o=class _o extends pe{static value(){}constructor(o,t,r){super(o,t),this.selection=r,this.textNode=document.createTextNode(_o.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){this.parent!=null&&this.parent.removeChild(this)}format(o,t){if(this.savedLength!==0){super.format(o,t);return}let r=this,n=0;for(;r!=null&&r.statics.scope!==X.BLOCK_BLOT;)n+=r.offset(r.parent),r=r.parent;r!=null&&(this.savedLength=_o.CONTENTS.length,r.optimize(),r.formatAt(n,_o.CONTENTS.length,o,t),this.savedLength=0)}index(o,t){return o===this.textNode?0:super.index(o,t)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||this.parent==null)return null;let o=this.selection.getNativeRange();for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);let t=this.prev instanceof Se?this.prev:null,r=t?t.length():0,n=this.next instanceof Se?this.next:null,a=n?n.text:"",{textNode:s}=this,l=s.data.split(_o.CONTENTS).join("");s.data=_o.CONTENTS;let d;if(t)d=t,(l||n)&&(t.insertAt(t.length(),l+a),n&&n.remove());else if(n)d=n,n.insertAt(0,l);else{let h=document.createTextNode(l);d=this.scroll.create(h),this.parent.insertBefore(d,this)}if(this.remove(),o){let h=(b,g)=>t&&b===t.domNode?g:b===s?r+g-1:n&&b===n.domNode?r+l.length+g:null,m=h(o.start.node,o.start.offset),f=h(o.end.node,o.end.offset);if(m!==null&&f!==null)return{startNode:d.domNode,startOffset:m,endNode:d.domNode,endOffset:f}}return null}update(o,t){if(o.some(r=>r.type==="characterData"&&r.target===this.textNode)){let r=this.restore();r&&(t.range=r)}}optimize(o){super.optimize(o);let{parent:t}=this;for(;t;){if(t.domNode.tagName==="A"){this.savedLength=_o.CONTENTS.length,t.isolate(this.offset(t),this.length()).unwrap(),this.savedLength=0;break}t=t.parent}}value(){return""}};B(_o,"blotName","cursor"),B(_o,"className","ql-cursor"),B(_o,"tagName","span"),B(_o,"CONTENTS","\uFEFF");var cm=_o,Ci=cm;var pm=pr(nz(),1);var Dl=new WeakMap;var hm=["error","warn","log","info"],um="warn";function iz(i){if(um&&hm.indexOf(i)<=hm.indexOf(um)){for(var o=arguments.length,t=new Array(o>1?o-1:0),r=1;r<o;r++)t[r-1]=arguments[r];console[i](...t)}}function mm(i){return hm.reduce((o,t)=>(o[t]=iz.bind(console,t,i),o),{})}mm.level=i=>{um=i};iz.level=mm.level;var ao=mm;var fm=ao("quill:events"),pT=["selectionchange","mousedown","mouseup","click"];pT.forEach(i=>{document.addEventListener(i,function(){for(var o=arguments.length,t=new Array(o),r=0;r<o;r++)t[r]=arguments[r];Array.from(document.querySelectorAll(".ql-container")).forEach(n=>{let a=Dl.get(n);a&&a.emitter&&a.emitter.handleDOM(...t)})})});var Nl=class extends pm.default{constructor(){super(),this.domListeners={},this.on("error",fm.error)}emit(){for(var o=arguments.length,t=new Array(o),r=0;r<o;r++)t[r]=arguments[r];return fm.log.call(fm,...t),super.emit(...t)}handleDOM(o){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];(this.domListeners[o.type]||[]).forEach(a=>{let{node:s,handler:l}=a;(o.target===s||s.contains(o.target))&&l(o,...r)})}listenDOM(o,t,r){this.domListeners[o]||(this.domListeners[o]=[]),this.domListeners[o].push({node:t,handler:r})}};B(Nl,"events",{EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_BLOT_MOUNT:"scroll-blot-mount",SCROLL_BLOT_UNMOUNT:"scroll-blot-unmount",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SCROLL_EMBED_UPDATE:"scroll-embed-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change",COMPOSITION_BEFORE_START:"composition-before-start",COMPOSITION_START:"composition-start",COMPOSITION_BEFORE_END:"composition-before-end",COMPOSITION_END:"composition-end"}),B(Nl,"sources",{API:"api",SILENT:"silent",USER:"user"});var J=Nl;var gm=ao("quill:selection"),Lr=class{constructor(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.index=o,this.length=t}},vm=class{constructor(o,t){this.emitter=t,this.scroll=o,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=this.scroll.create("cursor",this),this.savedRange=new Lr(0,0),this.lastRange=this.savedRange,this.lastNative=null,this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,()=>{!this.mouseDown&&!this.composing&&setTimeout(this.update.bind(this,J.sources.USER),1)}),this.emitter.on(J.events.SCROLL_BEFORE_UPDATE,()=>{if(!this.hasFocus())return;let r=this.getNativeRange();r!=null&&r.start.node!==this.cursor.textNode&&this.emitter.once(J.events.SCROLL_UPDATE,(n,a)=>{try{this.root.contains(r.start.node)&&this.root.contains(r.end.node)&&this.setNativeRange(r.start.node,r.start.offset,r.end.node,r.end.offset);let s=a.some(l=>l.type==="characterData"||l.type==="childList"||l.type==="attributes"&&l.target===this.root);this.update(s?J.sources.SILENT:n)}catch{}})}),this.emitter.on(J.events.SCROLL_OPTIMIZE,(r,n)=>{if(n.range){let{startNode:a,startOffset:s,endNode:l,endOffset:d}=n.range;this.setNativeRange(a,s,l,d),this.update(J.sources.SILENT)}}),this.update(J.sources.SILENT)}handleComposition(){this.emitter.on(J.events.COMPOSITION_BEFORE_START,()=>{this.composing=!0}),this.emitter.on(J.events.COMPOSITION_END,()=>{if(this.composing=!1,this.cursor.parent){let o=this.cursor.restore();if(!o)return;setTimeout(()=>{this.setNativeRange(o.startNode,o.startOffset,o.endNode,o.endOffset)},1)}})}handleDragging(){this.emitter.listenDOM("mousedown",document.body,()=>{this.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,()=>{this.mouseDown=!1,this.update(J.sources.USER)})}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(o,t){this.scroll.update();let r=this.getNativeRange();if(!(r==null||!r.native.collapsed||this.scroll.query(o,X.BLOCK))){if(r.start.node!==this.cursor.textNode){let n=this.scroll.find(r.start.node,!1);if(n==null)return;if(n instanceof Ie){let a=n.split(r.start.offset);n.parent.insertBefore(this.cursor,a)}else n.insertBefore(this.cursor,r.start.node);this.cursor.attach()}this.cursor.format(o,t),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=this.scroll.length();o=Math.min(o,r-1),t=Math.min(o+t,r-1)-o;let n,[a,s]=this.scroll.leaf(o);if(a==null)return null;if(t>0&&s===a.length()){let[m]=this.scroll.leaf(o+1);if(m){let[f]=this.scroll.line(o),[b]=this.scroll.line(o+1);f===b&&(a=m,s=0)}}[n,s]=a.position(s,!0);let l=document.createRange();if(t>0)return l.setStart(n,s),[a,s]=this.scroll.leaf(o+t),a==null?null:([n,s]=a.position(s,!0),l.setEnd(n,s),l.getBoundingClientRect());let d="left",h;if(n instanceof Text){if(!n.data.length)return null;s<n.data.length?(l.setStart(n,s),l.setEnd(n,s+1)):(l.setStart(n,s-1),l.setEnd(n,s),d="right"),h=l.getBoundingClientRect()}else{if(!(a.domNode instanceof Element))return null;h=a.domNode.getBoundingClientRect(),s>0&&(d="right")}return{bottom:h.top+h.height,height:h.height,left:h[d],right:h[d],top:h.top,width:0}}getNativeRange(){let o=document.getSelection();if(o==null||o.rangeCount<=0)return null;let t=o.getRangeAt(0);if(t==null)return null;let r=this.normalizeNative(t);return gm.info("getNativeRange",r),r}getRange(){let o=this.scroll.domNode;if("isConnected"in o&&!o.isConnected)return[null,null];let t=this.getNativeRange();return t==null?[null,null]:[this.normalizedToRange(t),t]}hasFocus(){return document.activeElement===this.root||document.activeElement!=null&&bm(this.root,document.activeElement)}normalizedToRange(o){let t=[[o.start.node,o.start.offset]];o.native.collapsed||t.push([o.end.node,o.end.offset]);let r=t.map(s=>{let[l,d]=s,h=this.scroll.find(l,!0),m=h.offset(this.scroll);return d===0?m:h instanceof Ie?m+h.index(l,d):m+h.length()}),n=Math.min(Math.max(...r),this.scroll.length()-1),a=Math.min(n,...r);return new Lr(a,n-a)}normalizeNative(o){if(!bm(this.root,o.startContainer)||!o.collapsed&&!bm(this.root,o.endContainer))return null;let t={start:{node:o.startContainer,offset:o.startOffset},end:{node:o.endContainer,offset:o.endOffset},native:o};return[t.start,t.end].forEach(r=>{let{node:n,offset:a}=r;for(;!(n instanceof Text)&&n.childNodes.length>0;)if(n.childNodes.length>a)n=n.childNodes[a],a=0;else if(n.childNodes.length===a)n=n.lastChild,n instanceof Text?a=n.data.length:n.childNodes.length>0?a=n.childNodes.length:a=n.childNodes.length+1;else break;r.node=n,r.offset=a}),t}rangeToNative(o){let t=this.scroll.length(),r=(n,a)=>{n=Math.min(t-1,n);let[s,l]=this.scroll.leaf(n);return s?s.position(l,a):[null,-1]};return[...r(o.index,!1),...r(o.index+o.length,!0)]}setNativeRange(o,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:o,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:t,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(gm.info("setNativeRange",o,t,r,n),o!=null&&(this.root.parentNode==null||o.parentNode==null||r.parentNode==null))return;let s=document.getSelection();if(s!=null)if(o!=null){this.hasFocus()||this.root.focus({preventScroll:!0});let{native:l}=this.getNativeRange()||{};if(l==null||a||o!==l.startContainer||t!==l.startOffset||r!==l.endContainer||n!==l.endOffset){o instanceof Element&&o.tagName==="BR"&&(t=Array.from(o.parentNode.childNodes).indexOf(o),o=o.parentNode),r instanceof Element&&r.tagName==="BR"&&(n=Array.from(r.parentNode.childNodes).indexOf(r),r=r.parentNode);let d=document.createRange();d.setStart(o,t),d.setEnd(r,n),s.removeAllRanges(),s.addRange(d)}}else s.removeAllRanges(),this.root.blur()}setRange(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:J.sources.API;if(typeof t=="string"&&(r=t,t=!1),gm.info("setRange",o),o!=null){let n=this.rangeToNative(o);this.setNativeRange(...n,t)}else this.setNativeRange(null);this.update(r)}update(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:J.sources.USER,t=this.lastRange,[r,n]=this.getRange();if(this.lastRange=r,this.lastNative=n,this.lastRange!=null&&(this.savedRange=this.lastRange),!ga(t,this.lastRange)){if(!this.composing&&n!=null&&n.native.collapsed&&n.start.node!==this.cursor.textNode){let s=this.cursor.restore();s&&this.setNativeRange(s.startNode,s.startOffset,s.endNode,s.endOffset)}let a=[J.events.SELECTION_CHANGE,xn(this.lastRange),xn(t),o];this.emitter.emit(J.events.EDITOR_CHANGE,...a),o!==J.sources.SILENT&&this.emitter.emit(...a)}}};function bm(i,o){try{o.parentNode}catch{return!1}return i.contains(o)}var az=vm;var hT=/^[ -~]*$/,ym=class{constructor(o){this.scroll=o,this.delta=this.getDelta()}applyDelta(o){this.scroll.update();let t=this.scroll.length();this.scroll.batchStart();let r=sz(o),n=new he.default;return mT(r.ops.slice()).reduce((s,l)=>{let d=he.Op.length(l),h=l.attributes||{},m=!1,f=!1;if(l.insert!=null){if(n.retain(d),typeof l.insert=="string"){let v=l.insert;f=!v.endsWith(`
|
|
2585
|
-
`)&&(t<=s||!!this.scroll.descendant(
|
|
2586
|
-
`&&(m=!0):_ instanceof pe&&_.statics.scope===X.INLINE_BLOT&&(m=!0)}if(this.scroll.insertAt(s,v,l.insert[v]),x){let[_]=this.scroll.descendant(
|
|
2581
|
+
`}};Dn.styles=E(a0),c([p({type:Boolean,reflect:!0})],Dn.prototype,"open",2),c([p({type:String})],Dn.prototype,"query",2),c([p({type:Array})],Dn.prototype,"results",2),c([O()],Dn.prototype,"_activeIndex",2);Dn.define("zn-context-menu");var nw=pr(Br(),1);var T6=typeof global=="object"&&global&&global.Object===Object&&global,Id=T6;var $6=typeof self=="object"&&self&&self.Object===Object&&self,A6=Id||$6||Function("return this")(),Le=A6;var L6=Le.Symbol,zo=L6;var V1=Object.prototype,q6=V1.hasOwnProperty,M6=V1.toString,kl=zo?zo.toStringTag:void 0;function I6(i){var o=q6.call(i,kl),t=i[kl];try{i[kl]=void 0;var r=!0}catch{}var n=M6.call(i);return r&&(o?i[kl]=t:delete i[kl]),n}var U1=I6;var D6=Object.prototype,N6=D6.toString;function R6(i){return N6.call(i)}var j1=R6;var O6="[object Null]",P6="[object Undefined]",G1=zo?zo.toStringTag:void 0;function H6(i){return i==null?i===void 0?P6:O6:G1&&G1 in Object(i)?U1(i):j1(i)}var Ko=H6;function F6(i){return i!=null&&typeof i=="object"}var sr=F6;var B6=Array.isArray,wo=B6;function V6(i){var o=typeof i;return i!=null&&(o=="object"||o=="function")}var gr=V6;function U6(i){return i}var Dd=U6;var j6="[object AsyncFunction]",G6="[object Function]",W6="[object GeneratorFunction]",K6="[object Proxy]";function Y6(i){if(!gr(i))return!1;var o=Ko(i);return o==G6||o==W6||o==j6||o==K6}var rs=Y6;var X6=Le["__core-js_shared__"],Nd=X6;var W1=(function(){var i=/[^.]+$/.exec(Nd&&Nd.keys&&Nd.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})();function Q6(i){return!!W1&&W1 in i}var K1=Q6;var J6=Function.prototype,Z6=J6.toString;function t9(i){if(i!=null){try{return Z6.call(i)}catch{}try{return i+""}catch{}}return""}var Vn=t9;var e9=/[\\^$.*+?()[\]{}|]/g,r9=/^\[object .+?Constructor\]$/,o9=Function.prototype,n9=Object.prototype,i9=o9.toString,a9=n9.hasOwnProperty,s9=RegExp("^"+i9.call(a9).replace(e9,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function l9(i){if(!gr(i)||K1(i))return!1;var o=rs(i)?s9:r9;return o.test(Vn(i))}var Y1=l9;function c9(i,o){return i?.[o]}var X1=c9;function d9(i,o){var t=X1(i,o);return Y1(t)?t:void 0}var Vr=d9;var p9=Vr(Le,"WeakMap"),Rd=p9;var Q1=Object.create,h9=(function(){function i(){}return function(o){if(!gr(o))return{};if(Q1)return Q1(o);i.prototype=o;var t=new i;return i.prototype=void 0,t}})(),J1=h9;function u9(i,o,t){switch(t.length){case 0:return i.call(o);case 1:return i.call(o,t[0]);case 2:return i.call(o,t[0],t[1]);case 3:return i.call(o,t[0],t[1],t[2])}return i.apply(o,t)}var Z1=u9;function m9(i,o){var t=-1,r=i.length;for(o||(o=Array(r));++t<r;)o[t]=i[t];return o}var Od=m9;var f9=800,g9=16,b9=Date.now;function v9(i){var o=0,t=0;return function(){var r=b9(),n=g9-(r-t);if(t=r,n>0){if(++o>=f9)return arguments[0]}else o=0;return i.apply(void 0,arguments)}}var tx=v9;function x9(i){return function(){return i}}var ex=x9;var y9=(function(){try{var i=Vr(Object,"defineProperty");return i({},"",{}),i}catch{}})(),os=y9;var z9=os?function(i,o){return os(i,"toString",{configurable:!0,enumerable:!1,value:ex(o),writable:!0})}:Dd,rx=z9;var w9=tx(rx),ox=w9;function _9(i,o){for(var t=-1,r=i==null?0:i.length;++t<r&&o(i[t],t,i)!==!1;);return i}var nx=_9;var k9=9007199254740991,C9=/^(?:0|[1-9]\d*)$/;function S9(i,o){var t=typeof i;return o=o??k9,!!o&&(t=="number"||t!="symbol"&&C9.test(i))&&i>-1&&i%1==0&&i<o}var Pd=S9;function E9(i,o,t){o=="__proto__"&&os?os(i,o,{configurable:!0,enumerable:!0,value:t,writable:!0}):i[o]=t}var ns=E9;function T9(i,o){return i===o||i!==i&&o!==o}var gn=T9;var $9=Object.prototype,A9=$9.hasOwnProperty;function L9(i,o,t){var r=i[o];(!(A9.call(i,o)&&gn(r,t))||t===void 0&&!(o in i))&&ns(i,o,t)}var Hd=L9;function q9(i,o,t,r){var n=!t;t||(t={});for(var a=-1,s=o.length;++a<s;){var l=o[a],d=r?r(t[l],i[l],l,t,i):void 0;d===void 0&&(d=i[l]),n?ns(t,l,d):Hd(t,l,d)}return t}var bn=q9;var ix=Math.max;function M9(i,o,t){return o=ix(o===void 0?i.length-1:o,0),function(){for(var r=arguments,n=-1,a=ix(r.length-o,0),s=Array(a);++n<a;)s[n]=r[o+n];n=-1;for(var l=Array(o+1);++n<o;)l[n]=r[n];return l[o]=t(s),Z1(i,this,l)}}var ax=M9;function I9(i,o){return ox(ax(i,o,Dd),i+"")}var sx=I9;var D9=9007199254740991;function N9(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=D9}var Fd=N9;function R9(i){return i!=null&&Fd(i.length)&&!rs(i)}var gi=R9;function O9(i,o,t){if(!gr(t))return!1;var r=typeof o;return(r=="number"?gi(t)&&Pd(o,t.length):r=="string"&&o in t)?gn(t[o],i):!1}var lx=O9;function P9(i){return sx(function(o,t){var r=-1,n=t.length,a=n>1?t[n-1]:void 0,s=n>2?t[2]:void 0;for(a=i.length>3&&typeof a=="function"?(n--,a):void 0,s&&lx(t[0],t[1],s)&&(a=n<3?void 0:a,n=1),o=Object(o);++r<n;){var l=t[r];l&&i(o,l,r,a)}return o})}var cx=P9;var H9=Object.prototype;function F9(i){var o=i&&i.constructor,t=typeof o=="function"&&o.prototype||H9;return i===t}var is=F9;function B9(i,o){for(var t=-1,r=Array(i);++t<i;)r[t]=o(t);return r}var dx=B9;var V9="[object Arguments]";function U9(i){return sr(i)&&Ko(i)==V9}var Gu=U9;var px=Object.prototype,j9=px.hasOwnProperty,G9=px.propertyIsEnumerable,W9=Gu((function(){return arguments})())?Gu:function(i){return sr(i)&&j9.call(i,"callee")&&!G9.call(i,"callee")},Cl=W9;function K9(){return!1}var hx=K9;var fx=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ux=fx&&typeof module=="object"&&module&&!module.nodeType&&module,Y9=ux&&ux.exports===fx,mx=Y9?Le.Buffer:void 0,X9=mx?mx.isBuffer:void 0,Q9=X9||hx,Un=Q9;var J9="[object Arguments]",Z9="[object Array]",t7="[object Boolean]",e7="[object Date]",r7="[object Error]",o7="[object Function]",n7="[object Map]",i7="[object Number]",a7="[object Object]",s7="[object RegExp]",l7="[object Set]",c7="[object String]",d7="[object WeakMap]",p7="[object ArrayBuffer]",h7="[object DataView]",u7="[object Float32Array]",m7="[object Float64Array]",f7="[object Int8Array]",g7="[object Int16Array]",b7="[object Int32Array]",v7="[object Uint8Array]",x7="[object Uint8ClampedArray]",y7="[object Uint16Array]",z7="[object Uint32Array]",Qt={};Qt[u7]=Qt[m7]=Qt[f7]=Qt[g7]=Qt[b7]=Qt[v7]=Qt[x7]=Qt[y7]=Qt[z7]=!0;Qt[J9]=Qt[Z9]=Qt[p7]=Qt[t7]=Qt[h7]=Qt[e7]=Qt[r7]=Qt[o7]=Qt[n7]=Qt[i7]=Qt[a7]=Qt[s7]=Qt[l7]=Qt[c7]=Qt[d7]=!1;function w7(i){return sr(i)&&Fd(i.length)&&!!Qt[Ko(i)]}var gx=w7;function _7(i){return function(o){return i(o)}}var as=_7;var bx=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Sl=bx&&typeof module=="object"&&module&&!module.nodeType&&module,k7=Sl&&Sl.exports===bx,Wu=k7&&Id.process,C7=(function(){try{var i=Sl&&Sl.require&&Sl.require("util").types;return i||Wu&&Wu.binding&&Wu.binding("util")}catch{}})(),jn=C7;var vx=jn&&jn.isTypedArray,S7=vx?as(vx):gx,ss=S7;var E7=Object.prototype,T7=E7.hasOwnProperty;function $7(i,o){var t=wo(i),r=!t&&Cl(i),n=!t&&!r&&Un(i),a=!t&&!r&&!n&&ss(i),s=t||r||n||a,l=s?dx(i.length,String):[],d=l.length;for(var h in i)(o||T7.call(i,h))&&!(s&&(h=="length"||n&&(h=="offset"||h=="parent")||a&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||Pd(h,d)))&&l.push(h);return l}var Bd=$7;function A7(i,o){return function(t){return i(o(t))}}var Vd=A7;var L7=Vd(Object.keys,Object),xx=L7;var q7=Object.prototype,M7=q7.hasOwnProperty;function I7(i){if(!is(i))return xx(i);var o=[];for(var t in Object(i))M7.call(i,t)&&t!="constructor"&&o.push(t);return o}var yx=I7;function D7(i){return gi(i)?Bd(i):yx(i)}var ls=D7;function N7(i){var o=[];if(i!=null)for(var t in Object(i))o.push(t);return o}var zx=N7;var R7=Object.prototype,O7=R7.hasOwnProperty;function P7(i){if(!gr(i))return zx(i);var o=is(i),t=[];for(var r in i)r=="constructor"&&(o||!O7.call(i,r))||t.push(r);return t}var wx=P7;function H7(i){return gi(i)?Bd(i,!0):wx(i)}var vn=H7;var F7=Vr(Object,"create"),Gn=F7;function B7(){this.__data__=Gn?Gn(null):{},this.size=0}var _x=B7;function V7(i){var o=this.has(i)&&delete this.__data__[i];return this.size-=o?1:0,o}var kx=V7;var U7="__lodash_hash_undefined__",j7=Object.prototype,G7=j7.hasOwnProperty;function W7(i){var o=this.__data__;if(Gn){var t=o[i];return t===U7?void 0:t}return G7.call(o,i)?o[i]:void 0}var Cx=W7;var K7=Object.prototype,Y7=K7.hasOwnProperty;function X7(i){var o=this.__data__;return Gn?o[i]!==void 0:Y7.call(o,i)}var Sx=X7;var Q7="__lodash_hash_undefined__";function J7(i,o){var t=this.__data__;return this.size+=this.has(i)?0:1,t[i]=Gn&&o===void 0?Q7:o,this}var Ex=J7;function cs(i){var o=-1,t=i==null?0:i.length;for(this.clear();++o<t;){var r=i[o];this.set(r[0],r[1])}}cs.prototype.clear=_x;cs.prototype.delete=kx;cs.prototype.get=Cx;cs.prototype.has=Sx;cs.prototype.set=Ex;var Ku=cs;function Z7(){this.__data__=[],this.size=0}var Tx=Z7;function tC(i,o){for(var t=i.length;t--;)if(gn(i[t][0],o))return t;return-1}var bi=tC;var eC=Array.prototype,rC=eC.splice;function oC(i){var o=this.__data__,t=bi(o,i);if(t<0)return!1;var r=o.length-1;return t==r?o.pop():rC.call(o,t,1),--this.size,!0}var $x=oC;function nC(i){var o=this.__data__,t=bi(o,i);return t<0?void 0:o[t][1]}var Ax=nC;function iC(i){return bi(this.__data__,i)>-1}var Lx=iC;function aC(i,o){var t=this.__data__,r=bi(t,i);return r<0?(++this.size,t.push([i,o])):t[r][1]=o,this}var qx=aC;function ds(i){var o=-1,t=i==null?0:i.length;for(this.clear();++o<t;){var r=i[o];this.set(r[0],r[1])}}ds.prototype.clear=Tx;ds.prototype.delete=$x;ds.prototype.get=Ax;ds.prototype.has=Lx;ds.prototype.set=qx;var vi=ds;var sC=Vr(Le,"Map"),xi=sC;function lC(){this.size=0,this.__data__={hash:new Ku,map:new(xi||vi),string:new Ku}}var Mx=lC;function cC(i){var o=typeof i;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?i!=="__proto__":i===null}var Ix=cC;function dC(i,o){var t=i.__data__;return Ix(o)?t[typeof o=="string"?"string":"hash"]:t.map}var yi=dC;function pC(i){var o=yi(this,i).delete(i);return this.size-=o?1:0,o}var Dx=pC;function hC(i){return yi(this,i).get(i)}var Nx=hC;function uC(i){return yi(this,i).has(i)}var Rx=uC;function mC(i,o){var t=yi(this,i),r=t.size;return t.set(i,o),this.size+=t.size==r?0:1,this}var Ox=mC;function ps(i){var o=-1,t=i==null?0:i.length;for(this.clear();++o<t;){var r=i[o];this.set(r[0],r[1])}}ps.prototype.clear=Mx;ps.prototype.delete=Dx;ps.prototype.get=Nx;ps.prototype.has=Rx;ps.prototype.set=Ox;var Ud=ps;function fC(i,o){for(var t=-1,r=o.length,n=i.length;++t<r;)i[n+t]=o[t];return i}var jd=fC;var gC=Vd(Object.getPrototypeOf,Object),hs=gC;var bC="[object Object]",vC=Function.prototype,xC=Object.prototype,Px=vC.toString,yC=xC.hasOwnProperty,zC=Px.call(Object);function wC(i){if(!sr(i)||Ko(i)!=bC)return!1;var o=hs(i);if(o===null)return!0;var t=yC.call(o,"constructor")&&o.constructor;return typeof t=="function"&&t instanceof t&&Px.call(t)==zC}var Hx=wC;function _C(){this.__data__=new vi,this.size=0}var Fx=_C;function kC(i){var o=this.__data__,t=o.delete(i);return this.size=o.size,t}var Bx=kC;function CC(i){return this.__data__.get(i)}var Vx=CC;function SC(i){return this.__data__.has(i)}var Ux=SC;var EC=200;function TC(i,o){var t=this.__data__;if(t instanceof vi){var r=t.__data__;if(!xi||r.length<EC-1)return r.push([i,o]),this.size=++t.size,this;t=this.__data__=new Ud(r)}return t.set(i,o),this.size=t.size,this}var jx=TC;function us(i){var o=this.__data__=new vi(i);this.size=o.size}us.prototype.clear=Fx;us.prototype.delete=Bx;us.prototype.get=Vx;us.prototype.has=Ux;us.prototype.set=jx;var zi=us;function $C(i,o){return i&&bn(o,ls(o),i)}var Gx=$C;function AC(i,o){return i&&bn(o,vn(o),i)}var Wx=AC;var Qx=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Kx=Qx&&typeof module=="object"&&module&&!module.nodeType&&module,LC=Kx&&Kx.exports===Qx,Yx=LC?Le.Buffer:void 0,Xx=Yx?Yx.allocUnsafe:void 0;function qC(i,o){if(o)return i.slice();var t=i.length,r=Xx?Xx(t):new i.constructor(t);return i.copy(r),r}var Gd=qC;function MC(i,o){for(var t=-1,r=i==null?0:i.length,n=0,a=[];++t<r;){var s=i[t];o(s,t,i)&&(a[n++]=s)}return a}var Jx=MC;function IC(){return[]}var Wd=IC;var DC=Object.prototype,NC=DC.propertyIsEnumerable,Zx=Object.getOwnPropertySymbols,RC=Zx?function(i){return i==null?[]:(i=Object(i),Jx(Zx(i),function(o){return NC.call(i,o)}))}:Wd,ms=RC;function OC(i,o){return bn(i,ms(i),o)}var ty=OC;var PC=Object.getOwnPropertySymbols,HC=PC?function(i){for(var o=[];i;)jd(o,ms(i)),i=hs(i);return o}:Wd,Kd=HC;function FC(i,o){return bn(i,Kd(i),o)}var ey=FC;function BC(i,o,t){var r=o(i);return wo(i)?r:jd(r,t(i))}var Yd=BC;function VC(i){return Yd(i,ls,ms)}var El=VC;function UC(i){return Yd(i,vn,Kd)}var ry=UC;var jC=Vr(Le,"DataView"),Xd=jC;var GC=Vr(Le,"Promise"),Qd=GC;var WC=Vr(Le,"Set"),Jd=WC;var oy="[object Map]",KC="[object Object]",ny="[object Promise]",iy="[object Set]",ay="[object WeakMap]",sy="[object DataView]",YC=Vn(Xd),XC=Vn(xi),QC=Vn(Qd),JC=Vn(Jd),ZC=Vn(Rd),fa=Ko;(Xd&&fa(new Xd(new ArrayBuffer(1)))!=sy||xi&&fa(new xi)!=oy||Qd&&fa(Qd.resolve())!=ny||Jd&&fa(new Jd)!=iy||Rd&&fa(new Rd)!=ay)&&(fa=function(i){var o=Ko(i),t=o==KC?i.constructor:void 0,r=t?Vn(t):"";if(r)switch(r){case YC:return sy;case XC:return oy;case QC:return ny;case JC:return iy;case ZC:return ay}return o});var Wn=fa;var tS=Object.prototype,eS=tS.hasOwnProperty;function rS(i){var o=i.length,t=new i.constructor(o);return o&&typeof i[0]=="string"&&eS.call(i,"index")&&(t.index=i.index,t.input=i.input),t}var ly=rS;var oS=Le.Uint8Array,fs=oS;function nS(i){var o=new i.constructor(i.byteLength);return new fs(o).set(new fs(i)),o}var gs=nS;function iS(i,o){var t=o?gs(i.buffer):i.buffer;return new i.constructor(t,i.byteOffset,i.byteLength)}var cy=iS;var aS=/\w*$/;function sS(i){var o=new i.constructor(i.source,aS.exec(i));return o.lastIndex=i.lastIndex,o}var dy=sS;var py=zo?zo.prototype:void 0,hy=py?py.valueOf:void 0;function lS(i){return hy?Object(hy.call(i)):{}}var uy=lS;function cS(i,o){var t=o?gs(i.buffer):i.buffer;return new i.constructor(t,i.byteOffset,i.length)}var Zd=cS;var dS="[object Boolean]",pS="[object Date]",hS="[object Map]",uS="[object Number]",mS="[object RegExp]",fS="[object Set]",gS="[object String]",bS="[object Symbol]",vS="[object ArrayBuffer]",xS="[object DataView]",yS="[object Float32Array]",zS="[object Float64Array]",wS="[object Int8Array]",_S="[object Int16Array]",kS="[object Int32Array]",CS="[object Uint8Array]",SS="[object Uint8ClampedArray]",ES="[object Uint16Array]",TS="[object Uint32Array]";function $S(i,o,t){var r=i.constructor;switch(o){case vS:return gs(i);case dS:case pS:return new r(+i);case xS:return cy(i,t);case yS:case zS:case wS:case _S:case kS:case CS:case SS:case ES:case TS:return Zd(i,t);case hS:return new r;case uS:case gS:return new r(i);case mS:return dy(i);case fS:return new r;case bS:return uy(i)}}var my=$S;function AS(i){return typeof i.constructor=="function"&&!is(i)?J1(hs(i)):{}}var tp=AS;var LS="[object Map]";function qS(i){return sr(i)&&Wn(i)==LS}var fy=qS;var gy=jn&&jn.isMap,MS=gy?as(gy):fy,by=MS;var IS="[object Set]";function DS(i){return sr(i)&&Wn(i)==IS}var vy=DS;var xy=jn&&jn.isSet,NS=xy?as(xy):vy,yy=NS;var RS=1,OS=2,PS=4,zy="[object Arguments]",HS="[object Array]",FS="[object Boolean]",BS="[object Date]",VS="[object Error]",wy="[object Function]",US="[object GeneratorFunction]",jS="[object Map]",GS="[object Number]",_y="[object Object]",WS="[object RegExp]",KS="[object Set]",YS="[object String]",XS="[object Symbol]",QS="[object WeakMap]",JS="[object ArrayBuffer]",ZS="[object DataView]",tE="[object Float32Array]",eE="[object Float64Array]",rE="[object Int8Array]",oE="[object Int16Array]",nE="[object Int32Array]",iE="[object Uint8Array]",aE="[object Uint8ClampedArray]",sE="[object Uint16Array]",lE="[object Uint32Array]",Gt={};Gt[zy]=Gt[HS]=Gt[JS]=Gt[ZS]=Gt[FS]=Gt[BS]=Gt[tE]=Gt[eE]=Gt[rE]=Gt[oE]=Gt[nE]=Gt[jS]=Gt[GS]=Gt[_y]=Gt[WS]=Gt[KS]=Gt[YS]=Gt[XS]=Gt[iE]=Gt[aE]=Gt[sE]=Gt[lE]=!0;Gt[VS]=Gt[wy]=Gt[QS]=!1;function ep(i,o,t,r,n,a){var s,l=o&RS,d=o&OS,h=o&PS;if(t&&(s=n?t(i,r,n,a):t(i)),s!==void 0)return s;if(!gr(i))return i;var m=wo(i);if(m){if(s=ly(i),!l)return Od(i,s)}else{var f=Wn(i),b=f==wy||f==US;if(Un(i))return Gd(i,l);if(f==_y||f==zy||b&&!n){if(s=d||b?{}:tp(i),!l)return d?ey(i,Wx(s,i)):ty(i,Gx(s,i))}else{if(!Gt[f])return n?i:{};s=my(i,f,l)}}a||(a=new zi);var g=a.get(i);if(g)return g;a.set(i,s),yy(i)?i.forEach(function(_){s.add(ep(_,o,t,_,i,a))}):by(i)&&i.forEach(function(_,$){s.set($,ep(_,o,t,$,i,a))});var v=h?d?ry:El:d?vn:ls,x=m?void 0:v(i);return nx(x||i,function(_,$){x&&($=_,_=i[$]),Hd(s,$,ep(_,o,t,$,i,a))}),s}var ky=ep;var cE=1,dE=4;function pE(i){return ky(i,cE|dE)}var xn=pE;var hE="__lodash_hash_undefined__";function uE(i){return this.__data__.set(i,hE),this}var Cy=uE;function mE(i){return this.__data__.has(i)}var Sy=mE;function rp(i){var o=-1,t=i==null?0:i.length;for(this.__data__=new Ud;++o<t;)this.add(i[o])}rp.prototype.add=rp.prototype.push=Cy;rp.prototype.has=Sy;var Ey=rp;function fE(i,o){for(var t=-1,r=i==null?0:i.length;++t<r;)if(o(i[t],t,i))return!0;return!1}var Ty=fE;function gE(i,o){return i.has(o)}var $y=gE;var bE=1,vE=2;function xE(i,o,t,r,n,a){var s=t&bE,l=i.length,d=o.length;if(l!=d&&!(s&&d>l))return!1;var h=a.get(i),m=a.get(o);if(h&&m)return h==o&&m==i;var f=-1,b=!0,g=t&vE?new Ey:void 0;for(a.set(i,o),a.set(o,i);++f<l;){var v=i[f],x=o[f];if(r)var _=s?r(x,v,f,o,i,a):r(v,x,f,i,o,a);if(_!==void 0){if(_)continue;b=!1;break}if(g){if(!Ty(o,function($,N){if(!$y(g,N)&&(v===$||n(v,$,t,r,a)))return g.push(N)})){b=!1;break}}else if(!(v===x||n(v,x,t,r,a))){b=!1;break}}return a.delete(i),a.delete(o),b}var op=xE;function yE(i){var o=-1,t=Array(i.size);return i.forEach(function(r,n){t[++o]=[n,r]}),t}var Ay=yE;function zE(i){var o=-1,t=Array(i.size);return i.forEach(function(r){t[++o]=r}),t}var Ly=zE;var wE=1,_E=2,kE="[object Boolean]",CE="[object Date]",SE="[object Error]",EE="[object Map]",TE="[object Number]",$E="[object RegExp]",AE="[object Set]",LE="[object String]",qE="[object Symbol]",ME="[object ArrayBuffer]",IE="[object DataView]",qy=zo?zo.prototype:void 0,Yu=qy?qy.valueOf:void 0;function DE(i,o,t,r,n,a,s){switch(t){case IE:if(i.byteLength!=o.byteLength||i.byteOffset!=o.byteOffset)return!1;i=i.buffer,o=o.buffer;case ME:return!(i.byteLength!=o.byteLength||!a(new fs(i),new fs(o)));case kE:case CE:case TE:return gn(+i,+o);case SE:return i.name==o.name&&i.message==o.message;case $E:case LE:return i==o+"";case EE:var l=Ay;case AE:var d=r&wE;if(l||(l=Ly),i.size!=o.size&&!d)return!1;var h=s.get(i);if(h)return h==o;r|=_E,s.set(i,o);var m=op(l(i),l(o),r,n,a,s);return s.delete(i),m;case qE:if(Yu)return Yu.call(i)==Yu.call(o)}return!1}var My=DE;var NE=1,RE=Object.prototype,OE=RE.hasOwnProperty;function PE(i,o,t,r,n,a){var s=t&NE,l=El(i),d=l.length,h=El(o),m=h.length;if(d!=m&&!s)return!1;for(var f=d;f--;){var b=l[f];if(!(s?b in o:OE.call(o,b)))return!1}var g=a.get(i),v=a.get(o);if(g&&v)return g==o&&v==i;var x=!0;a.set(i,o),a.set(o,i);for(var _=s;++f<d;){b=l[f];var $=i[b],N=o[b];if(r)var G=s?r(N,$,b,o,i,a):r($,N,b,i,o,a);if(!(G===void 0?$===N||n($,N,t,r,a):G)){x=!1;break}_||(_=b=="constructor")}if(x&&!_){var I=i.constructor,w=o.constructor;I!=w&&"constructor"in i&&"constructor"in o&&!(typeof I=="function"&&I instanceof I&&typeof w=="function"&&w instanceof w)&&(x=!1)}return a.delete(i),a.delete(o),x}var Iy=PE;var HE=1,Dy="[object Arguments]",Ny="[object Array]",np="[object Object]",FE=Object.prototype,Ry=FE.hasOwnProperty;function BE(i,o,t,r,n,a){var s=wo(i),l=wo(o),d=s?Ny:Wn(i),h=l?Ny:Wn(o);d=d==Dy?np:d,h=h==Dy?np:h;var m=d==np,f=h==np,b=d==h;if(b&&Un(i)){if(!Un(o))return!1;s=!0,m=!1}if(b&&!m)return a||(a=new zi),s||ss(i)?op(i,o,t,r,n,a):My(i,o,d,t,r,n,a);if(!(t&HE)){var g=m&&Ry.call(i,"__wrapped__"),v=f&&Ry.call(o,"__wrapped__");if(g||v){var x=g?i.value():i,_=v?o.value():o;return a||(a=new zi),n(x,_,t,r,a)}}return b?(a||(a=new zi),Iy(i,o,t,r,n,a)):!1}var Oy=BE;function Py(i,o,t,r,n){return i===o?!0:i==null||o==null||!sr(i)&&!sr(o)?i!==i&&o!==o:Oy(i,o,t,r,Py,n)}var Hy=Py;function VE(i){return function(o,t,r){for(var n=-1,a=Object(o),s=r(o),l=s.length;l--;){var d=s[i?l:++n];if(t(a[d],d,a)===!1)break}return o}}var Fy=VE;var UE=Fy(),By=UE;function jE(i,o,t){(t!==void 0&&!gn(i[o],t)||t===void 0&&!(o in i))&&ns(i,o,t)}var Tl=jE;function GE(i){return sr(i)&&gi(i)}var Vy=GE;function WE(i,o){if(!(o==="constructor"&&typeof i[o]=="function")&&o!="__proto__")return i[o]}var $l=WE;function KE(i){return bn(i,vn(i))}var Uy=KE;function YE(i,o,t,r,n,a,s){var l=$l(i,t),d=$l(o,t),h=s.get(d);if(h){Tl(i,t,h);return}var m=a?a(l,d,t+"",i,o,s):void 0,f=m===void 0;if(f){var b=wo(d),g=!b&&Un(d),v=!b&&!g&&ss(d);m=d,b||g||v?wo(l)?m=l:Vy(l)?m=Od(l):g?(f=!1,m=Gd(d,!0)):v?(f=!1,m=Zd(d,!0)):m=[]:Hx(d)||Cl(d)?(m=l,Cl(l)?m=Uy(l):(!gr(l)||rs(l))&&(m=tp(d))):f=!1}f&&(s.set(d,m),n(m,d,r,a,s),s.delete(d)),Tl(i,t,m)}var jy=YE;function Gy(i,o,t,r,n){i!==o&&By(o,function(a,s){if(n||(n=new zi),gr(a))jy(i,o,s,t,Gy,r,n);else{var l=r?r($l(i,s),a,s+"",i,o,n):void 0;l===void 0&&(l=a),Tl(i,s,l)}},vn)}var Wy=Gy;function XE(i,o){return Hy(i,o)}var ga=XE;var QE=cx(function(i,o,t){Wy(i,o,t)}),Ur=QE;var ql={};E_(ql,{Attributor:()=>$r,AttributorStore:()=>Al,BlockBlot:()=>ba,ClassAttributor:()=>qe,ContainerBlot:()=>zs,EmbedBlot:()=>pe,InlineBlot:()=>ip,LeafBlot:()=>Me,ParentBlot:()=>jr,Registry:()=>ki,Scope:()=>X,ScrollBlot:()=>Ll,StyleAttributor:()=>Gr,TextBlot:()=>ws});var X=(i=>(i[i.TYPE=3]="TYPE",i[i.LEVEL=12]="LEVEL",i[i.ATTRIBUTE=13]="ATTRIBUTE",i[i.BLOT=14]="BLOT",i[i.INLINE=7]="INLINE",i[i.BLOCK=11]="BLOCK",i[i.BLOCK_BLOT=10]="BLOCK_BLOT",i[i.INLINE_BLOT=6]="INLINE_BLOT",i[i.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",i[i.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",i[i.ANY=15]="ANY",i))(X||{}),$r=class{constructor(o,t,r={}){this.attrName=o,this.keyName=t;let n=X.TYPE&X.ATTRIBUTE;this.scope=r.scope!=null?r.scope&X.LEVEL|n:X.ATTRIBUTE,r.whitelist!=null&&(this.whitelist=r.whitelist)}static keys(o){return Array.from(o.attributes).map(t=>t.name)}add(o,t){return this.canAdd(o,t)?(o.setAttribute(this.keyName,t),!0):!1}canAdd(o,t){return this.whitelist==null?!0:typeof t=="string"?this.whitelist.indexOf(t.replace(/["']/g,""))>-1:this.whitelist.indexOf(t)>-1}remove(o){o.removeAttribute(this.keyName)}value(o){let t=o.getAttribute(this.keyName);return this.canAdd(o,t)&&t?t:""}},_i=class extends Error{constructor(o){o="[Parchment] "+o,super(o),this.message=o,this.name=this.constructor.name}},Xy=class Qu{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(o,t=!1){if(o==null)return null;if(this.blots.has(o))return this.blots.get(o)||null;if(t){let r=null;try{r=o.parentNode}catch{return null}return this.find(r,t)}return null}create(o,t,r){let n=this.query(t);if(n==null)throw new _i(`Unable to create ${t} blot`);let a=n,s=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:a.create(r),l=new a(o,s,r);return Qu.blots.set(l.domNode,l),l}find(o,t=!1){return Qu.find(o,t)}query(o,t=X.ANY){let r;return typeof o=="string"?r=this.types[o]||this.attributes[o]:o instanceof Text||o.nodeType===Node.TEXT_NODE?r=this.types.text:typeof o=="number"?o&X.LEVEL&X.BLOCK?r=this.types.block:o&X.LEVEL&X.INLINE&&(r=this.types.inline):o instanceof Element&&((o.getAttribute("class")||"").split(/\s+/).some(n=>(r=this.classes[n],!!r)),r=r||this.tags[o.tagName]),r==null?null:"scope"in r&&t&X.LEVEL&r.scope&&t&X.TYPE&r.scope?r:null}register(...o){return o.map(t=>{let r="blotName"in t,n="attrName"in t;if(!r&&!n)throw new _i("Invalid definition");if(r&&t.blotName==="abstract")throw new _i("Cannot register abstract class");let a=r?t.blotName:n?t.attrName:void 0;return this.types[a]=t,n?typeof t.keyName=="string"&&(this.attributes[t.keyName]=t):r&&(t.className&&(this.classes[t.className]=t),t.tagName&&(Array.isArray(t.tagName)?t.tagName=t.tagName.map(s=>s.toUpperCase()):t.tagName=t.tagName.toUpperCase(),(Array.isArray(t.tagName)?t.tagName:[t.tagName]).forEach(s=>{(this.tags[s]==null||t.className==null)&&(this.tags[s]=t)}))),t})}};Xy.blots=new WeakMap;var ki=Xy;function Ky(i,o){return(i.getAttribute("class")||"").split(/\s+/).filter(t=>t.indexOf(`${o}-`)===0)}var Ju=class extends $r{static keys(o){return(o.getAttribute("class")||"").split(/\s+/).map(t=>t.split("-").slice(0,-1).join("-"))}add(o,t){return this.canAdd(o,t)?(this.remove(o),o.classList.add(`${this.keyName}-${t}`),!0):!1}remove(o){Ky(o,this.keyName).forEach(t=>{o.classList.remove(t)}),o.classList.length===0&&o.removeAttribute("class")}value(o){let t=(Ky(o,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(o,t)?t:""}},qe=Ju;function Xu(i){let o=i.split("-"),t=o.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("");return o[0]+t}var Zu=class extends $r{static keys(o){return(o.getAttribute("style")||"").split(";").map(t=>t.split(":")[0].trim())}add(o,t){return this.canAdd(o,t)?(o.style[Xu(this.keyName)]=t,!0):!1}remove(o){o.style[Xu(this.keyName)]="",o.getAttribute("style")||o.removeAttribute("style")}value(o){let t=o.style[Xu(this.keyName)];return this.canAdd(o,t)?t:""}},Gr=Zu,tm=class{constructor(o){this.attributes={},this.domNode=o,this.build()}attribute(o,t){t?o.add(this.domNode,t)&&(o.value(this.domNode)!=null?this.attributes[o.attrName]=o:delete this.attributes[o.attrName]):(o.remove(this.domNode),delete this.attributes[o.attrName])}build(){this.attributes={};let o=ki.find(this.domNode);if(o==null)return;let t=$r.keys(this.domNode),r=qe.keys(this.domNode),n=Gr.keys(this.domNode);t.concat(r).concat(n).forEach(a=>{let s=o.scroll.query(a,X.ATTRIBUTE);s instanceof $r&&(this.attributes[s.attrName]=s)})}copy(o){Object.keys(this.attributes).forEach(t=>{let r=this.attributes[t].value(this.domNode);o.format(t,r)})}move(o){this.copy(o),Object.keys(this.attributes).forEach(t=>{this.attributes[t].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((o,t)=>(o[t]=this.attributes[t].value(this.domNode),o),{})}},Al=tm,Qy=class{constructor(o,t){this.scroll=o,this.domNode=t,ki.blots.set(t,this),this.prev=null,this.next=null}static create(o){if(this.tagName==null)throw new _i("Blot definition missing tagName");let t,r;return Array.isArray(this.tagName)?(typeof o=="string"?(r=o.toUpperCase(),parseInt(r,10).toString()===r&&(r=parseInt(r,10))):typeof o=="number"&&(r=o),typeof r=="number"?t=document.createElement(this.tagName[r-1]):r&&this.tagName.indexOf(r)>-1?t=document.createElement(r):t=document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t}get statics(){return this.constructor}attach(){}clone(){let o=this.domNode.cloneNode(!1);return this.scroll.create(o)}detach(){this.parent!=null&&this.parent.removeChild(this),ki.blots.delete(this.domNode)}deleteAt(o,t){this.isolate(o,t).remove()}formatAt(o,t,r,n){let a=this.isolate(o,t);if(this.scroll.query(r,X.BLOT)!=null&&n)a.wrap(r,n);else if(this.scroll.query(r,X.ATTRIBUTE)!=null){let s=this.scroll.create(this.statics.scope);a.wrap(s),s.format(r,n)}}insertAt(o,t,r){let n=r==null?this.scroll.create("text",t):this.scroll.create(t,r),a=this.split(o);this.parent.insertBefore(n,a||void 0)}isolate(o,t){let r=this.split(o);if(r==null)throw new Error("Attempt to isolate at end");return r.split(t),r}length(){return 1}offset(o=this.parent){return this.parent==null||this===o?0:this.parent.children.offset(this)+this.parent.offset(o)}optimize(o){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(o,t){let r=typeof o=="string"?this.scroll.create(o,t):o;return this.parent!=null&&(this.parent.insertBefore(r,this.next||void 0),this.remove()),r}split(o,t){return o===0?this:this.next}update(o,t){}wrap(o,t){let r=typeof o=="string"?this.scroll.create(o,t):o;if(this.parent!=null&&this.parent.insertBefore(r,this.next||void 0),typeof r.appendChild!="function")throw new _i(`Cannot wrap ${o}`);return r.appendChild(this),r}};Qy.blotName="abstract";var Jy=Qy,Zy=class extends Jy{static value(o){return!0}index(o,t){return this.domNode===o||this.domNode.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1}position(o,t){let r=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return o>0&&(r+=1),[this.parent.domNode,r]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};Zy.scope=X.INLINE_BLOT;var JE=Zy,Me=JE,em=class{constructor(){this.head=null,this.tail=null,this.length=0}append(...o){if(this.insertBefore(o[0],null),o.length>1){let t=o.slice(1);this.append(...t)}}at(o){let t=this.iterator(),r=t();for(;r&&o>0;)o-=1,r=t();return r}contains(o){let t=this.iterator(),r=t();for(;r;){if(r===o)return!0;r=t()}return!1}indexOf(o){let t=this.iterator(),r=t(),n=0;for(;r;){if(r===o)return n;n+=1,r=t()}return-1}insertBefore(o,t){o!=null&&(this.remove(o),o.next=t,t!=null?(o.prev=t.prev,t.prev!=null&&(t.prev.next=o),t.prev=o,t===this.head&&(this.head=o)):this.tail!=null?(this.tail.next=o,o.prev=this.tail,this.tail=o):(o.prev=null,this.head=this.tail=o),this.length+=1)}offset(o){let t=0,r=this.head;for(;r!=null;){if(r===o)return t;t+=r.length(),r=r.next}return-1}remove(o){this.contains(o)&&(o.prev!=null&&(o.prev.next=o.next),o.next!=null&&(o.next.prev=o.prev),o===this.head&&(this.head=o.next),o===this.tail&&(this.tail=o.prev),this.length-=1)}iterator(o=this.head){return()=>{let t=o;return o!=null&&(o=o.next),t}}find(o,t=!1){let r=this.iterator(),n=r();for(;n;){let a=n.length();if(o<a||t&&o===a&&(n.next==null||n.next.length()!==0))return[n,o];o-=a,n=r()}return[null,0]}forEach(o){let t=this.iterator(),r=t();for(;r;)o(r),r=t()}forEachAt(o,t,r){if(t<=0)return;let[n,a]=this.find(o),s=o-a,l=this.iterator(n),d=l();for(;d&&s<o+t;){let h=d.length();o>s?r(d,o-s,Math.min(t,s+h-o)):r(d,0,Math.min(h,o+t-s)),s+=h,d=l()}}map(o){return this.reduce((t,r)=>(t.push(o(r)),t),[])}reduce(o,t){let r=this.iterator(),n=r();for(;n;)t=o(t,n),n=r();return t}};function Yy(i,o){let t=o.find(i);if(t)return t;try{return o.create(i)}catch{let r=o.create(X.INLINE);return Array.from(i.childNodes).forEach(n=>{r.domNode.appendChild(n)}),i.parentNode&&i.parentNode.replaceChild(r.domNode,i),r.attach(),r}}var tz=class wi extends Jy{constructor(o,t){super(o,t),this.uiNode=null,this.build()}appendChild(o){this.insertBefore(o)}attach(){super.attach(),this.children.forEach(o=>{o.attach()})}attachUI(o){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=o,wi.uiClass&&this.uiNode.classList.add(wi.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new em,Array.from(this.domNode.childNodes).filter(o=>o!==this.uiNode).reverse().forEach(o=>{try{let t=Yy(o,this.scroll);this.insertBefore(t,this.children.head||void 0)}catch(t){if(t instanceof _i)return;throw t}})}deleteAt(o,t){if(o===0&&t===this.length())return this.remove();this.children.forEachAt(o,t,(r,n,a)=>{r.deleteAt(n,a)})}descendant(o,t=0){let[r,n]=this.children.find(t);return o.blotName==null&&o(r)||o.blotName!=null&&r instanceof o?[r,n]:r instanceof wi?r.descendant(o,n):[null,-1]}descendants(o,t=0,r=Number.MAX_VALUE){let n=[],a=r;return this.children.forEachAt(t,r,(s,l,d)=>{(o.blotName==null&&o(s)||o.blotName!=null&&s instanceof o)&&n.push(s),s instanceof wi&&(n=n.concat(s.descendants(o,l,a))),a-=d}),n}detach(){this.children.forEach(o=>{o.detach()}),super.detach()}enforceAllowedChildren(){let o=!1;this.children.forEach(t=>{o||this.statics.allowedChildren.some(r=>t instanceof r)||(t.statics.scope===X.BLOCK_BLOT?(t.next!=null&&this.splitAfter(t),t.prev!=null&&this.splitAfter(t.prev),t.parent.unwrap(),o=!0):t instanceof wi?t.unwrap():t.remove())})}formatAt(o,t,r,n){this.children.forEachAt(o,t,(a,s,l)=>{a.formatAt(s,l,r,n)})}insertAt(o,t,r){let[n,a]=this.children.find(o);if(n)n.insertAt(a,t,r);else{let s=r==null?this.scroll.create("text",t):this.scroll.create(t,r);this.appendChild(s)}}insertBefore(o,t){o.parent!=null&&o.parent.children.remove(o);let r=null;this.children.insertBefore(o,t||null),o.parent=this,t!=null&&(r=t.domNode),(this.domNode.parentNode!==o.domNode||this.domNode.nextSibling!==r)&&this.domNode.insertBefore(o.domNode,r),o.attach()}length(){return this.children.reduce((o,t)=>o+t.length(),0)}moveChildren(o,t){this.children.forEach(r=>{o.insertBefore(r,t)})}optimize(o){if(super.optimize(o),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){let t=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(t)}else this.remove()}path(o,t=!1){let[r,n]=this.children.find(o,t),a=[[this,o]];return r instanceof wi?a.concat(r.path(n,t)):(r!=null&&a.push([r,n]),a)}removeChild(o){this.children.remove(o)}replaceWith(o,t){let r=typeof o=="string"?this.scroll.create(o,t):o;return r instanceof wi&&this.moveChildren(r),super.replaceWith(r)}split(o,t=!1){if(!t){if(o===0)return this;if(o===this.length())return this.next}let r=this.clone();return this.parent&&this.parent.insertBefore(r,this.next||void 0),this.children.forEachAt(o,this.length(),(n,a,s)=>{let l=n.split(a,t);l!=null&&r.appendChild(l)}),r}splitAfter(o){let t=this.clone();for(;o.next!=null;)t.appendChild(o.next);return this.parent&&this.parent.insertBefore(t,this.next||void 0),t}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(o,t){let r=[],n=[];o.forEach(a=>{a.target===this.domNode&&a.type==="childList"&&(r.push(...a.addedNodes),n.push(...a.removedNodes))}),n.forEach(a=>{if(a.parentNode!=null&&a.tagName!=="IFRAME"&&document.body.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;let s=this.scroll.find(a);s!=null&&(s.domNode.parentNode==null||s.domNode.parentNode===this.domNode)&&s.detach()}),r.filter(a=>a.parentNode===this.domNode&&a!==this.uiNode).sort((a,s)=>a===s?0:a.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(a=>{let s=null;a.nextSibling!=null&&(s=this.scroll.find(a.nextSibling));let l=Yy(a,this.scroll);(l.next!==s||l.next==null)&&(l.parent!=null&&l.parent.removeChild(this),this.insertBefore(l,s||void 0))}),this.enforceAllowedChildren()}};tz.uiClass="";var ZE=tz,jr=ZE;function tT(i,o){if(Object.keys(i).length!==Object.keys(o).length)return!1;for(let t in i)if(i[t]!==o[t])return!1;return!0}var bs=class vs extends jr{static create(o){return super.create(o)}static formats(o,t){let r=t.query(vs.blotName);if(!(r!=null&&o.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return o.tagName.toLowerCase()}}constructor(o,t){super(o,t),this.attributes=new Al(this.domNode)}format(o,t){if(o===this.statics.blotName&&!t)this.children.forEach(r=>{r instanceof vs||(r=r.wrap(vs.blotName,!0)),this.attributes.copy(r)}),this.unwrap();else{let r=this.scroll.query(o,X.INLINE);if(r==null)return;r instanceof $r?this.attributes.attribute(r,t):t&&(o!==this.statics.blotName||this.formats()[o]!==t)&&this.replaceWith(o,t)}}formats(){let o=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(o[this.statics.blotName]=t),o}formatAt(o,t,r,n){this.formats()[r]!=null||this.scroll.query(r,X.ATTRIBUTE)?this.isolate(o,t).format(r,n):super.formatAt(o,t,r,n)}optimize(o){super.optimize(o);let t=this.formats();if(Object.keys(t).length===0)return this.unwrap();let r=this.next;r instanceof vs&&r.prev===this&&tT(t,r.formats())&&(r.moveChildren(this),r.remove())}replaceWith(o,t){let r=super.replaceWith(o,t);return this.attributes.copy(r),r}update(o,t){super.update(o,t),o.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}wrap(o,t){let r=super.wrap(o,t);return r instanceof vs&&this.attributes.move(r),r}};bs.allowedChildren=[bs,Me],bs.blotName="inline",bs.scope=X.INLINE_BLOT,bs.tagName="SPAN";var eT=bs,ip=eT,xs=class rm extends jr{static create(o){return super.create(o)}static formats(o,t){let r=t.query(rm.blotName);if(!(r!=null&&o.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return o.tagName.toLowerCase()}}constructor(o,t){super(o,t),this.attributes=new Al(this.domNode)}format(o,t){let r=this.scroll.query(o,X.BLOCK);r!=null&&(r instanceof $r?this.attributes.attribute(r,t):o===this.statics.blotName&&!t?this.replaceWith(rm.blotName):t&&(o!==this.statics.blotName||this.formats()[o]!==t)&&this.replaceWith(o,t))}formats(){let o=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(o[this.statics.blotName]=t),o}formatAt(o,t,r,n){this.scroll.query(r,X.BLOCK)!=null?this.format(r,n):super.formatAt(o,t,r,n)}insertAt(o,t,r){if(r==null||this.scroll.query(t,X.INLINE)!=null)super.insertAt(o,t,r);else{let n=this.split(o);if(n!=null){let a=this.scroll.create(t,r);n.parent.insertBefore(a,n)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(o,t){let r=super.replaceWith(o,t);return this.attributes.copy(r),r}update(o,t){super.update(o,t),o.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}};xs.blotName="block",xs.scope=X.BLOCK_BLOT,xs.tagName="P",xs.allowedChildren=[ip,xs,Me];var rT=xs,ba=rT,om=class extends jr{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(o,t){super.deleteAt(o,t),this.enforceAllowedChildren()}formatAt(o,t,r,n){super.formatAt(o,t,r,n),this.enforceAllowedChildren()}insertAt(o,t,r){super.insertAt(o,t,r),this.enforceAllowedChildren()}optimize(o){super.optimize(o),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};om.blotName="container",om.scope=X.BLOCK_BLOT;var oT=om,zs=oT,nm=class extends Me{static formats(o,t){}format(o,t){super.formatAt(0,this.length(),o,t)}formatAt(o,t,r,n){o===0&&t===this.length()?this.format(r,n):super.formatAt(o,t,r,n)}formats(){return this.statics.formats(this.domNode,this.scroll)}},pe=nm,nT={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},iT=100,ys=class extends jr{constructor(o,t){super(null,t),this.registry=o,this.scroll=this,this.build(),this.observer=new MutationObserver(r=>{this.update(r)}),this.observer.observe(this.domNode,nT),this.attach()}create(o,t){return this.registry.create(this,o,t)}find(o,t=!1){let r=this.registry.find(o,t);return r?r.scroll===this?r:t?this.find(r.scroll.domNode.parentNode,!0):null:null}query(o,t=X.ANY){return this.registry.query(o,t)}register(...o){return this.registry.register(...o)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(o,t){this.update(),o===0&&t===this.length()?this.children.forEach(r=>{r.remove()}):super.deleteAt(o,t)}formatAt(o,t,r,n){this.update(),super.formatAt(o,t,r,n)}insertAt(o,t,r){this.update(),super.insertAt(o,t,r)}optimize(o=[],t={}){super.optimize(t);let r=t.mutationsMap||new WeakMap,n=Array.from(this.observer.takeRecords());for(;n.length>0;)o.push(n.pop());let a=(d,h=!0)=>{d==null||d===this||d.domNode.parentNode!=null&&(r.has(d.domNode)||r.set(d.domNode,[]),h&&a(d.parent))},s=d=>{r.has(d.domNode)&&(d instanceof jr&&d.children.forEach(s),r.delete(d.domNode),d.optimize(t))},l=o;for(let d=0;l.length>0;d+=1){if(d>=iT)throw new Error("[Parchment] Maximum optimize iterations reached");for(l.forEach(h=>{let m=this.find(h.target,!0);m!=null&&(m.domNode===h.target&&(h.type==="childList"?(a(this.find(h.previousSibling,!1)),Array.from(h.addedNodes).forEach(f=>{let b=this.find(f,!1);a(b,!1),b instanceof jr&&b.children.forEach(g=>{a(g,!1)})})):h.type==="attributes"&&a(m.prev)),a(m))}),this.children.forEach(s),l=Array.from(this.observer.takeRecords()),n=l.slice();n.length>0;)o.push(n.pop())}}update(o,t={}){o=o||this.observer.takeRecords();let r=new WeakMap;o.map(n=>{let a=this.find(n.target,!0);return a==null?null:r.has(a.domNode)?(r.get(a.domNode).push(n),null):(r.set(a.domNode,[n]),a)}).forEach(n=>{n!=null&&n!==this&&r.has(n.domNode)&&n.update(r.get(n.domNode)||[],t)}),t.mutationsMap=r,r.has(this.domNode)&&super.update(r.get(this.domNode),t),this.optimize(o,t)}};ys.blotName="scroll",ys.defaultChild=ba,ys.allowedChildren=[ba,zs],ys.scope=X.BLOCK_BLOT,ys.tagName="DIV";var aT=ys,Ll=aT,im=class ez extends Me{static create(o){return document.createTextNode(o)}static value(o){return o.data}constructor(o,t){super(o,t),this.text=this.statics.value(this.domNode)}deleteAt(o,t){this.domNode.data=this.text=this.text.slice(0,o)+this.text.slice(o+t)}index(o,t){return this.domNode===o?t:-1}insertAt(o,t,r){r==null?(this.text=this.text.slice(0,o)+t+this.text.slice(o),this.domNode.data=this.text):super.insertAt(o,t,r)}length(){return this.text.length}optimize(o){super.optimize(o),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof ez&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(o,t=!1){return[this.domNode,o]}split(o,t=!1){if(!t){if(o===0)return this;if(o===this.length())return this.next}let r=this.scroll.create(this.domNode.splitText(o));return this.parent.insertBefore(r,this.next||void 0),this.text=this.statics.value(this.domNode),r}update(o,t){o.some(r=>r.type==="characterData"&&r.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};im.blotName="text",im.scope=X.INLINE_BLOT;var sT=im,ws=sT;var Si=pr(Br(),1);var he=pr(Br(),1);var sm=pr(Br(),1);var Ml=class extends pe{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}};Ml.blotName="break";Ml.tagName="BR";var br=Ml;var Se=class extends ws{},lT={"&":"&","<":"<",">":">",'"':""","'":"'"};function va(i){return i.replace(/[&<>"']/g,o=>lT[o])}var yn=class yn extends ip{static compare(o,t){let r=yn.order.indexOf(o),n=yn.order.indexOf(t);return r>=0||n>=0?r-n:o===t?0:o<t?-1:1}formatAt(o,t,r,n){if(yn.compare(this.statics.blotName,r)<0&&this.scroll.query(r,X.BLOT)){let a=this.isolate(o,t);n&&a.wrap(r,n)}else super.formatAt(o,t,r,n)}optimize(o){if(super.optimize(o),this.parent instanceof yn&&yn.compare(this.statics.blotName,this.parent.statics.blotName)>0){let t=this.parent.isolate(this.offset(),this.length());this.moveChildren(t),t.wrap(this)}}};B(yn,"allowedChildren",[yn,br,pe,Se]),B(yn,"order",["cursor","inline","link","underline","strike","italic","bold","script","code"]);var am=yn,vr=am;var rz=1,Ft=class extends ba{constructor(){super(...arguments);B(this,"cache",{})}delta(){return this.cache.delta==null&&(this.cache.delta=lm(this)),this.cache.delta}deleteAt(t,r){super.deleteAt(t,r),this.cache={}}formatAt(t,r,n,a){r<=0||(this.scroll.query(n,X.BLOCK)?t+r===this.length()&&this.format(n,a):super.formatAt(t,Math.min(r,this.length()-t-1),n,a),this.cache={})}insertAt(t,r,n){if(n!=null){super.insertAt(t,r,n),this.cache={};return}if(r.length===0)return;let a=r.split(`
|
|
2582
|
+
`),s=a.shift();s.length>0&&(t<this.length()-1||this.children.tail==null?super.insertAt(Math.min(t,this.length()-1),s):this.children.tail.insertAt(this.children.tail.length(),s),this.cache={});let l=this;a.reduce((d,h)=>(l=l.split(d,!0),l.insertAt(0,h),h.length),t+s.length)}insertBefore(t,r){let{head:n}=this.children;super.insertBefore(t,r),n instanceof br&&n.remove(),this.cache={}}length(){return this.cache.length==null&&(this.cache.length=super.length()+rz),this.cache.length}moveChildren(t,r){super.moveChildren(t,r),this.cache={}}optimize(t){super.optimize(t),this.cache={}}path(t){return super.path(t,!0)}removeChild(t){super.removeChild(t),this.cache={}}split(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(r&&(t===0||t>=this.length()-rz)){let a=this.clone();return t===0?(this.parent.insertBefore(a,this),this):(this.parent.insertBefore(a,this.next),a)}let n=super.split(t,r);return this.cache={},n}};Ft.blotName="block";Ft.tagName="P";Ft.defaultChild=br;Ft.allowedChildren=[br,vr,pe,Se];var Be=class extends pe{attach(){super.attach(),this.attributes=new Al(this.domNode)}delta(){return new sm.default().insert(this.value(),{...this.formats(),...this.attributes.values()})}format(o,t){let r=this.scroll.query(o,X.BLOCK_ATTRIBUTE);r!=null&&this.attributes.attribute(r,t)}formatAt(o,t,r,n){this.format(r,n)}insertAt(o,t,r){if(r!=null){super.insertAt(o,t,r);return}let n=t.split(`
|
|
2583
|
+
`),a=n.pop(),s=n.map(d=>{let h=this.scroll.create(Ft.blotName);return h.insertAt(0,d),h}),l=this.split(o);s.forEach(d=>{this.parent.insertBefore(d,l)}),a&&this.parent.insertBefore(this.scroll.create("text",a),l)}};Be.scope=X.BLOCK_BLOT;function lm(i){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return i.descendants(Me).reduce((t,r)=>r.length()===0?t:t.insert(r.value(),Wr(r,{},o)),new sm.default).insert(`
|
|
2584
|
+
`,Wr(i))}function Wr(i){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return i==null||("formats"in i&&typeof i.formats=="function"&&(o={...o,...i.formats()},t&&delete o["code-token"]),i.parent==null||i.parent.statics.blotName==="scroll"||i.parent.statics.scope!==i.statics.scope)?o:Wr(i.parent,o,t)}var _o=class _o extends pe{static value(){}constructor(o,t,r){super(o,t),this.selection=r,this.textNode=document.createTextNode(_o.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){this.parent!=null&&this.parent.removeChild(this)}format(o,t){if(this.savedLength!==0){super.format(o,t);return}let r=this,n=0;for(;r!=null&&r.statics.scope!==X.BLOCK_BLOT;)n+=r.offset(r.parent),r=r.parent;r!=null&&(this.savedLength=_o.CONTENTS.length,r.optimize(),r.formatAt(n,_o.CONTENTS.length,o,t),this.savedLength=0)}index(o,t){return o===this.textNode?0:super.index(o,t)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||this.parent==null)return null;let o=this.selection.getNativeRange();for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);let t=this.prev instanceof Se?this.prev:null,r=t?t.length():0,n=this.next instanceof Se?this.next:null,a=n?n.text:"",{textNode:s}=this,l=s.data.split(_o.CONTENTS).join("");s.data=_o.CONTENTS;let d;if(t)d=t,(l||n)&&(t.insertAt(t.length(),l+a),n&&n.remove());else if(n)d=n,n.insertAt(0,l);else{let h=document.createTextNode(l);d=this.scroll.create(h),this.parent.insertBefore(d,this)}if(this.remove(),o){let h=(b,g)=>t&&b===t.domNode?g:b===s?r+g-1:n&&b===n.domNode?r+l.length+g:null,m=h(o.start.node,o.start.offset),f=h(o.end.node,o.end.offset);if(m!==null&&f!==null)return{startNode:d.domNode,startOffset:m,endNode:d.domNode,endOffset:f}}return null}update(o,t){if(o.some(r=>r.type==="characterData"&&r.target===this.textNode)){let r=this.restore();r&&(t.range=r)}}optimize(o){super.optimize(o);let{parent:t}=this;for(;t;){if(t.domNode.tagName==="A"){this.savedLength=_o.CONTENTS.length,t.isolate(this.offset(t),this.length()).unwrap(),this.savedLength=0;break}t=t.parent}}value(){return""}};B(_o,"blotName","cursor"),B(_o,"className","ql-cursor"),B(_o,"tagName","span"),B(_o,"CONTENTS","\uFEFF");var cm=_o,Ci=cm;var pm=pr(nz(),1);var Dl=new WeakMap;var hm=["error","warn","log","info"],um="warn";function iz(i){if(um&&hm.indexOf(i)<=hm.indexOf(um)){for(var o=arguments.length,t=new Array(o>1?o-1:0),r=1;r<o;r++)t[r-1]=arguments[r];console[i](...t)}}function mm(i){return hm.reduce((o,t)=>(o[t]=iz.bind(console,t,i),o),{})}mm.level=i=>{um=i};iz.level=mm.level;var ao=mm;var fm=ao("quill:events"),pT=["selectionchange","mousedown","mouseup","click"];pT.forEach(i=>{document.addEventListener(i,function(){for(var o=arguments.length,t=new Array(o),r=0;r<o;r++)t[r]=arguments[r];Array.from(document.querySelectorAll(".ql-container")).forEach(n=>{let a=Dl.get(n);a&&a.emitter&&a.emitter.handleDOM(...t)})})});var Nl=class extends pm.default{constructor(){super(),this.domListeners={},this.on("error",fm.error)}emit(){for(var o=arguments.length,t=new Array(o),r=0;r<o;r++)t[r]=arguments[r];return fm.log.call(fm,...t),super.emit(...t)}handleDOM(o){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];(this.domListeners[o.type]||[]).forEach(a=>{let{node:s,handler:l}=a;(o.target===s||s.contains(o.target))&&l(o,...r)})}listenDOM(o,t,r){this.domListeners[o]||(this.domListeners[o]=[]),this.domListeners[o].push({node:t,handler:r})}};B(Nl,"events",{EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_BLOT_MOUNT:"scroll-blot-mount",SCROLL_BLOT_UNMOUNT:"scroll-blot-unmount",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SCROLL_EMBED_UPDATE:"scroll-embed-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change",COMPOSITION_BEFORE_START:"composition-before-start",COMPOSITION_START:"composition-start",COMPOSITION_BEFORE_END:"composition-before-end",COMPOSITION_END:"composition-end"}),B(Nl,"sources",{API:"api",SILENT:"silent",USER:"user"});var J=Nl;var gm=ao("quill:selection"),Lr=class{constructor(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.index=o,this.length=t}},vm=class{constructor(o,t){this.emitter=t,this.scroll=o,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=this.scroll.create("cursor",this),this.savedRange=new Lr(0,0),this.lastRange=this.savedRange,this.lastNative=null,this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,()=>{!this.mouseDown&&!this.composing&&setTimeout(this.update.bind(this,J.sources.USER),1)}),this.emitter.on(J.events.SCROLL_BEFORE_UPDATE,()=>{if(!this.hasFocus())return;let r=this.getNativeRange();r!=null&&r.start.node!==this.cursor.textNode&&this.emitter.once(J.events.SCROLL_UPDATE,(n,a)=>{try{this.root.contains(r.start.node)&&this.root.contains(r.end.node)&&this.setNativeRange(r.start.node,r.start.offset,r.end.node,r.end.offset);let s=a.some(l=>l.type==="characterData"||l.type==="childList"||l.type==="attributes"&&l.target===this.root);this.update(s?J.sources.SILENT:n)}catch{}})}),this.emitter.on(J.events.SCROLL_OPTIMIZE,(r,n)=>{if(n.range){let{startNode:a,startOffset:s,endNode:l,endOffset:d}=n.range;this.setNativeRange(a,s,l,d),this.update(J.sources.SILENT)}}),this.update(J.sources.SILENT)}handleComposition(){this.emitter.on(J.events.COMPOSITION_BEFORE_START,()=>{this.composing=!0}),this.emitter.on(J.events.COMPOSITION_END,()=>{if(this.composing=!1,this.cursor.parent){let o=this.cursor.restore();if(!o)return;setTimeout(()=>{this.setNativeRange(o.startNode,o.startOffset,o.endNode,o.endOffset)},1)}})}handleDragging(){this.emitter.listenDOM("mousedown",document.body,()=>{this.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,()=>{this.mouseDown=!1,this.update(J.sources.USER)})}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(o,t){this.scroll.update();let r=this.getNativeRange();if(!(r==null||!r.native.collapsed||this.scroll.query(o,X.BLOCK))){if(r.start.node!==this.cursor.textNode){let n=this.scroll.find(r.start.node,!1);if(n==null)return;if(n instanceof Me){let a=n.split(r.start.offset);n.parent.insertBefore(this.cursor,a)}else n.insertBefore(this.cursor,r.start.node);this.cursor.attach()}this.cursor.format(o,t),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=this.scroll.length();o=Math.min(o,r-1),t=Math.min(o+t,r-1)-o;let n,[a,s]=this.scroll.leaf(o);if(a==null)return null;if(t>0&&s===a.length()){let[m]=this.scroll.leaf(o+1);if(m){let[f]=this.scroll.line(o),[b]=this.scroll.line(o+1);f===b&&(a=m,s=0)}}[n,s]=a.position(s,!0);let l=document.createRange();if(t>0)return l.setStart(n,s),[a,s]=this.scroll.leaf(o+t),a==null?null:([n,s]=a.position(s,!0),l.setEnd(n,s),l.getBoundingClientRect());let d="left",h;if(n instanceof Text){if(!n.data.length)return null;s<n.data.length?(l.setStart(n,s),l.setEnd(n,s+1)):(l.setStart(n,s-1),l.setEnd(n,s),d="right"),h=l.getBoundingClientRect()}else{if(!(a.domNode instanceof Element))return null;h=a.domNode.getBoundingClientRect(),s>0&&(d="right")}return{bottom:h.top+h.height,height:h.height,left:h[d],right:h[d],top:h.top,width:0}}getNativeRange(){let o=document.getSelection();if(o==null||o.rangeCount<=0)return null;let t=o.getRangeAt(0);if(t==null)return null;let r=this.normalizeNative(t);return gm.info("getNativeRange",r),r}getRange(){let o=this.scroll.domNode;if("isConnected"in o&&!o.isConnected)return[null,null];let t=this.getNativeRange();return t==null?[null,null]:[this.normalizedToRange(t),t]}hasFocus(){return document.activeElement===this.root||document.activeElement!=null&&bm(this.root,document.activeElement)}normalizedToRange(o){let t=[[o.start.node,o.start.offset]];o.native.collapsed||t.push([o.end.node,o.end.offset]);let r=t.map(s=>{let[l,d]=s,h=this.scroll.find(l,!0),m=h.offset(this.scroll);return d===0?m:h instanceof Me?m+h.index(l,d):m+h.length()}),n=Math.min(Math.max(...r),this.scroll.length()-1),a=Math.min(n,...r);return new Lr(a,n-a)}normalizeNative(o){if(!bm(this.root,o.startContainer)||!o.collapsed&&!bm(this.root,o.endContainer))return null;let t={start:{node:o.startContainer,offset:o.startOffset},end:{node:o.endContainer,offset:o.endOffset},native:o};return[t.start,t.end].forEach(r=>{let{node:n,offset:a}=r;for(;!(n instanceof Text)&&n.childNodes.length>0;)if(n.childNodes.length>a)n=n.childNodes[a],a=0;else if(n.childNodes.length===a)n=n.lastChild,n instanceof Text?a=n.data.length:n.childNodes.length>0?a=n.childNodes.length:a=n.childNodes.length+1;else break;r.node=n,r.offset=a}),t}rangeToNative(o){let t=this.scroll.length(),r=(n,a)=>{n=Math.min(t-1,n);let[s,l]=this.scroll.leaf(n);return s?s.position(l,a):[null,-1]};return[...r(o.index,!1),...r(o.index+o.length,!0)]}setNativeRange(o,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:o,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:t,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(gm.info("setNativeRange",o,t,r,n),o!=null&&(this.root.parentNode==null||o.parentNode==null||r.parentNode==null))return;let s=document.getSelection();if(s!=null)if(o!=null){this.hasFocus()||this.root.focus({preventScroll:!0});let{native:l}=this.getNativeRange()||{};if(l==null||a||o!==l.startContainer||t!==l.startOffset||r!==l.endContainer||n!==l.endOffset){o instanceof Element&&o.tagName==="BR"&&(t=Array.from(o.parentNode.childNodes).indexOf(o),o=o.parentNode),r instanceof Element&&r.tagName==="BR"&&(n=Array.from(r.parentNode.childNodes).indexOf(r),r=r.parentNode);let d=document.createRange();d.setStart(o,t),d.setEnd(r,n),s.removeAllRanges(),s.addRange(d)}}else s.removeAllRanges(),this.root.blur()}setRange(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:J.sources.API;if(typeof t=="string"&&(r=t,t=!1),gm.info("setRange",o),o!=null){let n=this.rangeToNative(o);this.setNativeRange(...n,t)}else this.setNativeRange(null);this.update(r)}update(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:J.sources.USER,t=this.lastRange,[r,n]=this.getRange();if(this.lastRange=r,this.lastNative=n,this.lastRange!=null&&(this.savedRange=this.lastRange),!ga(t,this.lastRange)){if(!this.composing&&n!=null&&n.native.collapsed&&n.start.node!==this.cursor.textNode){let s=this.cursor.restore();s&&this.setNativeRange(s.startNode,s.startOffset,s.endNode,s.endOffset)}let a=[J.events.SELECTION_CHANGE,xn(this.lastRange),xn(t),o];this.emitter.emit(J.events.EDITOR_CHANGE,...a),o!==J.sources.SILENT&&this.emitter.emit(...a)}}};function bm(i,o){try{o.parentNode}catch{return!1}return i.contains(o)}var az=vm;var hT=/^[ -~]*$/,ym=class{constructor(o){this.scroll=o,this.delta=this.getDelta()}applyDelta(o){this.scroll.update();let t=this.scroll.length();this.scroll.batchStart();let r=sz(o),n=new he.default;return mT(r.ops.slice()).reduce((s,l)=>{let d=he.Op.length(l),h=l.attributes||{},m=!1,f=!1;if(l.insert!=null){if(n.retain(d),typeof l.insert=="string"){let v=l.insert;f=!v.endsWith(`
|
|
2585
|
+
`)&&(t<=s||!!this.scroll.descendant(Be,s)[0]),this.scroll.insertAt(s,v);let[x,_]=this.scroll.line(s),$=Ur({},Wr(x));if(x instanceof Ft){let[N]=x.descendant(Me,_);N&&($=Ur($,Wr(N)))}h=he.AttributeMap.diff($,h)||{}}else if(typeof l.insert=="object"){let v=Object.keys(l.insert)[0];if(v==null)return s;let x=this.scroll.query(v,X.INLINE)!=null;if(x)(t<=s||this.scroll.descendant(Be,s)[0])&&(f=!0);else if(s>0){let[_,$]=this.scroll.descendant(Me,s-1);_ instanceof Se?_.value()[$]!==`
|
|
2586
|
+
`&&(m=!0):_ instanceof pe&&_.statics.scope===X.INLINE_BLOT&&(m=!0)}if(this.scroll.insertAt(s,v,l.insert[v]),x){let[_]=this.scroll.descendant(Me,s);if(_){let $=Ur({},Wr(_));h=he.AttributeMap.diff($,h)||{}}}}t+=d}else if(n.push(l),l.retain!==null&&typeof l.retain=="object"){let v=Object.keys(l.retain)[0];if(v==null)return s;this.scroll.updateEmbedAt(s,v,l.retain[v])}Object.keys(h).forEach(v=>{this.scroll.formatAt(s,d,v,h[v])});let b=m?1:0,g=f?1:0;return t+=b+g,n.retain(b),n.delete(g),s+d+b+g},0),n.reduce((s,l)=>typeof l.delete=="number"?(this.scroll.deleteAt(s,l.delete),s):s+he.Op.length(l),0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(r)}deleteText(o,t){return this.scroll.deleteAt(o,t),this.update(new he.default().retain(o).delete(t))}formatLine(o,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.scroll.update(),Object.keys(r).forEach(a=>{this.scroll.lines(o,Math.max(t,1)).forEach(s=>{s.format(a,r[a])})}),this.scroll.optimize();let n=new he.default().retain(o).retain(t,xn(r));return this.update(n)}formatText(o,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Object.keys(r).forEach(a=>{this.scroll.formatAt(o,t,a,r[a])});let n=new he.default().retain(o).retain(t,xn(r));return this.update(n)}getContents(o,t){return this.delta.slice(o,o+t)}getDelta(){return this.scroll.lines().reduce((o,t)=>o.concat(t.delta()),new he.default)}getFormat(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=[],n=[];t===0?this.scroll.path(o).forEach(l=>{let[d]=l;d instanceof Ft?r.push(d):d instanceof Me&&n.push(d)}):(r=this.scroll.lines(o,t),n=this.scroll.descendants(Me,o,t));let[a,s]=[r,n].map(l=>{let d=l.shift();if(d==null)return{};let h=Wr(d);for(;Object.keys(h).length>0;){let m=l.shift();if(m==null)return h;h=uT(Wr(m),h)}return h});return{...a,...s}}getHTML(o,t){let[r,n]=this.scroll.line(o);if(r){let a=r.length();return r.length()>=n+t&&!(n===0&&t===a)?Rl(r,n,t,!0):Rl(this.scroll,o,t,!0)}return""}getText(o,t){return this.getContents(o,t).filter(r=>typeof r.insert=="string").map(r=>r.insert).join("")}insertContents(o,t){let r=sz(t),n=new he.default().retain(o).concat(r);return this.scroll.insertContents(o,r),this.update(n)}insertEmbed(o,t,r){return this.scroll.insertAt(o,t,r),this.update(new he.default().retain(o).insert({[t]:r}))}insertText(o,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return t=t.replace(/\r\n/g,`
|
|
2587
2587
|
`).replace(/\r/g,`
|
|
2588
2588
|
`),this.scroll.insertAt(o,t),Object.keys(r).forEach(n=>{this.scroll.formatAt(o,t.length,n,r[n])}),this.update(new he.default().retain(o).insert(t,xn(r)))}isBlank(){if(this.scroll.children.length===0)return!0;if(this.scroll.children.length>1)return!1;let o=this.scroll.children.head;if(o?.statics.blotName!==Ft.blotName)return!1;let t=o;return t.children.length>1?!1:t.children.head instanceof br}removeFormat(o,t){let r=this.getText(o,t),[n,a]=this.scroll.line(o+t),s=0,l=new he.default;n!=null&&(s=n.length()-a,l=n.delta().slice(a,a+s-1).insert(`
|
|
2589
2589
|
`));let h=this.getContents(o,t+s).diff(new he.default().insert(r).concat(l)),m=new he.default().retain(o).concat(h);return this.applyDelta(m)}update(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,n=this.delta;if(t.length===1&&t[0].type==="characterData"&&t[0].target.data.match(hT)&&this.scroll.find(t[0].target)){let a=this.scroll.find(t[0].target),s=Wr(a),l=a.offset(this.scroll),d=t[0].oldValue.replace(Ci.CONTENTS,""),h=new he.default().insert(d),m=new he.default().insert(a.value()),f=r&&{oldRange:lz(r.oldRange,-l),newRange:lz(r.newRange,-l)};o=new he.default().retain(l).concat(h.diff(m,f)).reduce((g,v)=>v.insert?g.insert(v.insert,s):g.push(v),new he.default),this.delta=n.compose(o)}else this.delta=this.getDelta(),(!o||!ga(n.compose(o),this.delta))&&(o=n.diff(this.delta,r));return o}};function _s(i,o,t){if(i.length===0){let[g]=xm(t.pop());return o<=0?`</li></${g}>`:`</li></${g}>${_s([],o-1,t)}`}let[{child:r,offset:n,length:a,indent:s,type:l},...d]=i,[h,m]=xm(l);if(s>o)return t.push(l),s===o+1?`<${h}><li${m}>${Rl(r,n,a)}${_s(d,s,t)}`:`<${h}><li>${_s(i,o+1,t)}`;let f=t[t.length-1];if(s===o&&l===f)return`</li><li${m}>${Rl(r,n,a)}${_s(d,s,t)}`;let[b]=xm(t.pop());return`</li></${b}>${_s(i,o-1,t)}`}function Rl(i,o,t){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if("html"in i&&typeof i.html=="function")return i.html(o,t);if(i instanceof Se)return va(i.value().slice(o,o+t)).replaceAll(" "," ");if(i instanceof jr){if(i.statics.blotName==="list-container"){let h=[];return i.children.forEachAt(o,t,(m,f,b)=>{let g="formats"in m&&typeof m.formats=="function"?m.formats():{};h.push({child:m,offset:f,length:b,indent:g.indent||0,type:g.list})}),_s(h,-1,[])}let n=[];if(i.children.forEachAt(o,t,(h,m,f)=>{n.push(Rl(h,m,f))}),r||i.statics.blotName==="list")return n.join("");let{outerHTML:a,innerHTML:s}=i.domNode,[l,d]=a.split(`>${s}<`);return l==="<table"?`<table style="border: 1px solid #000;">${n.join("")}<${d}`:`${l}>${n.join("")}<${d}`}return i.domNode instanceof Element?i.domNode.outerHTML:""}function uT(i,o){return Object.keys(o).reduce((t,r)=>{if(i[r]==null)return t;let n=o[r];return n===i[r]?t[r]=n:Array.isArray(n)?n.indexOf(i[r])<0?t[r]=n.concat([i[r]]):t[r]=n:t[r]=[n,i[r]],t},{})}function xm(i){let o=i==="ordered"?"ol":"ul";switch(i){case"checked":return[o,' data-list="checked"'];case"unchecked":return[o,' data-list="unchecked"'];default:return[o,""]}}function sz(i){return i.reduce((o,t)=>{if(typeof t.insert=="string"){let r=t.insert.replace(/\r\n/g,`
|
|
@@ -2591,21 +2591,21 @@ import{a as En,b as E_,c as pr,d as c,e as B}from"./chunks/zn.UBLZO6CI.js";var b
|
|
|
2591
2591
|
`);return o.insert(r,t.attributes)}return o.push(t)},new he.default)}function lz(i,o){let{index:t,length:r}=i;return new Lr(t+o,r)}function mT(i){let o=[];return i.forEach(t=>{typeof t.insert=="string"?t.insert.split(`
|
|
2592
2592
|
`).forEach((n,a)=>{a&&o.push({insert:`
|
|
2593
2593
|
`,attributes:t.attributes}),n&&o.push({insert:n,attributes:t.attributes})}):o.push(t)}),o}var cz=ym;var sp=class{constructor(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.quill=o,this.options=t}};B(sp,"DEFAULTS",{});var re=sp;var lp="\uFEFF",zm=class extends pe{constructor(o,t){super(o,t),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable","false"),Array.from(this.domNode.childNodes).forEach(r=>{this.contentNode.appendChild(r)}),this.leftGuard=document.createTextNode(lp),this.rightGuard=document.createTextNode(lp),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(o,t){return o===this.leftGuard?0:o===this.rightGuard?1:super.index(o,t)}restore(o){let t=null,r,n=o.data.split(lp).join("");if(o===this.leftGuard)if(this.prev instanceof Se){let a=this.prev.length();this.prev.insertAt(a,n),t={startNode:this.prev.domNode,startOffset:a+n.length}}else r=document.createTextNode(n),this.parent.insertBefore(this.scroll.create(r),this),t={startNode:r,startOffset:n.length};else o===this.rightGuard&&(this.next instanceof Se?(this.next.insertAt(0,n),t={startNode:this.next.domNode,startOffset:n.length}):(r=document.createTextNode(n),this.parent.insertBefore(this.scroll.create(r),this.next),t={startNode:r,startOffset:n.length}));return o.data=lp,t}update(o,t){o.forEach(r=>{if(r.type==="characterData"&&(r.target===this.leftGuard||r.target===this.rightGuard)){let n=this.restore(r.target);n&&(t.range=n)}})}},ks=zm;var wm=class{constructor(o,t){B(this,"isComposing",!1);this.scroll=o,this.emitter=t,this.setupListeners()}setupListeners(){this.scroll.domNode.addEventListener("compositionstart",o=>{this.isComposing||this.handleCompositionStart(o)}),this.scroll.domNode.addEventListener("compositionend",o=>{this.isComposing&&queueMicrotask(()=>{this.handleCompositionEnd(o)})})}handleCompositionStart(o){let t=o.target instanceof Node?this.scroll.find(o.target,!0):null;t&&!(t instanceof ks)&&(this.emitter.emit(J.events.COMPOSITION_BEFORE_START,o),this.scroll.batchStart(),this.emitter.emit(J.events.COMPOSITION_START,o),this.isComposing=!0)}handleCompositionEnd(o){this.emitter.emit(J.events.COMPOSITION_BEFORE_END,o),this.scroll.batchEnd(),this.emitter.emit(J.events.COMPOSITION_END,o),this.isComposing=!1}},dz=wm;var Ol=class Ol{constructor(o,t){B(this,"modules",{});this.quill=o,this.options=t}init(){Object.keys(this.options.modules).forEach(o=>{this.modules[o]==null&&this.addModule(o)})}addModule(o){let t=this.quill.constructor.import(`modules/${o}`);return this.modules[o]=new t(this.quill,this.options.modules[o]||{}),this.modules[o]}};B(Ol,"DEFAULTS",{modules:{}}),B(Ol,"themes",{default:Ol});var _m=Ol,Cs=_m;var fT=i=>i.parentElement||i.getRootNode().host||null,gT=i=>{let o=i.getBoundingClientRect(),t="offsetWidth"in i&&Math.abs(o.width)/i.offsetWidth||1,r="offsetHeight"in i&&Math.abs(o.height)/i.offsetHeight||1;return{top:o.top,right:o.left+i.clientWidth*t,bottom:o.top+i.clientHeight*r,left:o.left}},cp=i=>{let o=parseInt(i,10);return Number.isNaN(o)?0:o},pz=(i,o,t,r,n,a)=>i<t&&o>r?0:i<t?-(t-i+n):o>r?o-i>r-t?i+n-t:o-r+a:0,bT=(i,o)=>{let t=i.ownerDocument,r=o,n=i;for(;n;){let a=n===t.body,s=a?{top:0,right:window.visualViewport?.width??t.documentElement.clientWidth,bottom:window.visualViewport?.height??t.documentElement.clientHeight,left:0}:gT(n),l=getComputedStyle(n),d=pz(r.left,r.right,s.left,s.right,cp(l.scrollPaddingLeft),cp(l.scrollPaddingRight)),h=pz(r.top,r.bottom,s.top,s.bottom,cp(l.scrollPaddingTop),cp(l.scrollPaddingBottom));if(d||h)if(a)t.defaultView?.scrollBy(d,h);else{let{scrollLeft:m,scrollTop:f}=n;h&&(n.scrollTop+=h),d&&(n.scrollLeft+=d);let b=n.scrollLeft-m,g=n.scrollTop-f;r={left:r.left-b,top:r.top-g,right:r.right-b,bottom:r.bottom-g}}n=a||l.position==="fixed"?null:fT(n)}},hz=bT;var vT=100,xT=["block","break","cursor","inline","scroll","text"],yT=(i,o,t)=>{let r=new ki;return xT.forEach(n=>{let a=o.query(n);a&&r.register(a)}),i.forEach(n=>{let a=o.query(n);a||t.error(`Cannot register "${n}" specified in "formats" config. Are you sure it was registered?`);let s=0;for(;a;)if(r.register(a),a="blotName"in a?a.requiredContainer??null:null,s+=1,s>vT){t.error(`Cycle detected in registering blot requiredContainer: "${n}"`);break}}),r},uz=yT;var Ss=ao("quill"),dp=new ki;jr.uiClass="ql-ui";var Xo=class Xo{static debug(o){o===!0&&(o="log"),ao.level(o)}static find(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Dl.get(o)||dp.find(o,t)}static import(o){return this.imports[o]==null&&Ss.error(`Cannot import ${o}. Are you sure it was registered?`),this.imports[o]}static register(){if(typeof(arguments.length<=0?void 0:arguments[0])!="string"){let o=arguments.length<=0?void 0:arguments[0],t=!!(!(arguments.length<=1)&&arguments[1]),r="attrName"in o?o.attrName:o.blotName;typeof r=="string"?this.register(`formats/${r}`,o,t):Object.keys(o).forEach(n=>{this.register(n,o[n],t)})}else{let o=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],r=!!(!(arguments.length<=2)&&arguments[2]);this.imports[o]!=null&&!r&&Ss.warn(`Overwriting ${o} with`,t),this.imports[o]=t,(o.startsWith("blots/")||o.startsWith("formats/"))&&t&&typeof t!="boolean"&&t.blotName!=="abstract"&&dp.register(t),typeof t.register=="function"&&t.register(dp)}}constructor(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.options=zT(o,t),this.container=this.options.container,this.container==null){Ss.error("Invalid Quill container",o);return}this.options.debug&&Xo.debug(this.options.debug);let r=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",Dl.set(this.container,this),this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.emitter=new J;let n=Ll.blotName,a=this.options.registry.query(n);if(!a||!("blotName"in a))throw new Error(`Cannot initialize Quill without "${n}" blot`);if(this.scroll=new a(this.options.registry,this.root,{emitter:this.emitter}),this.editor=new cz(this.scroll),this.selection=new az(this.scroll,this.emitter),this.composition=new dz(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.uploader=this.theme.addModule("uploader"),this.theme.addModule("input"),this.theme.addModule("uiNode"),this.theme.init(),this.emitter.on(J.events.EDITOR_CHANGE,s=>{s===J.events.TEXT_CHANGE&&this.root.classList.toggle("ql-blank",this.editor.isBlank())}),this.emitter.on(J.events.SCROLL_UPDATE,(s,l)=>{let d=this.selection.lastRange,[h]=this.selection.getRange(),m=d&&h?{oldRange:d,newRange:h}:void 0;Yo.call(this,()=>this.editor.update(null,l,m),s)}),this.emitter.on(J.events.SCROLL_EMBED_UPDATE,(s,l)=>{let d=this.selection.lastRange,[h]=this.selection.getRange(),m=d&&h?{oldRange:d,newRange:h}:void 0;Yo.call(this,()=>{let f=new Si.default().retain(s.offset(this)).retain({[s.statics.blotName]:l});return this.editor.update(f,[],m)},Xo.sources.USER)}),r){let s=this.clipboard.convert({html:`${r}<p><br></p>`,text:`
|
|
2594
|
-
`});this.setContents(s)}this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable(),this.allowReadOnlyEdits=!1}addContainer(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof o=="string"){let r=o;o=document.createElement("div"),o.classList.add(r)}return this.container.insertBefore(o,t),o}blur(){this.selection.setRange(null)}deleteText(o,t,r){return[o,t,,r]=Kn(o,t,r),Yo.call(this,()=>this.editor.deleteText(o,t),r,o,-1*t)}disable(){this.enable(!1)}editReadOnly(o){this.allowReadOnlyEdits=!0;let t=o();return this.allowReadOnlyEdits=!1,t}enable(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(o),this.container.classList.toggle("ql-disabled",!o)}focus(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.selection.focus(),o.preventScroll||this.scrollSelectionIntoView()}format(o,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:J.sources.API;return Yo.call(this,()=>{let n=this.getSelection(!0),a=new Si.default;if(n==null)return a;if(this.scroll.query(o,X.BLOCK))a=this.editor.formatLine(n.index,n.length,{[o]:t});else{if(n.length===0)return this.selection.format(o,t),a;a=this.editor.formatText(n.index,n.length,{[o]:t})}return this.setSelection(n,J.sources.SILENT),a},r)}formatLine(o,t,r,n,a){let s;return[o,t,s,a]=Kn(o,t,r,n,a),Yo.call(this,()=>this.editor.formatLine(o,t,s),a,o,0)}formatText(o,t,r,n,a){let s;return[o,t,s,a]=Kn(o,t,r,n,a),Yo.call(this,()=>this.editor.formatText(o,t,s),a,o,0)}getBounds(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=null;if(typeof o=="number"?r=this.selection.getBounds(o,t):r=this.selection.getBounds(o.index,o.length),!r)return null;let n=this.container.getBoundingClientRect();return{bottom:r.bottom-n.top,height:r.height,left:r.left-n.left,right:r.right-n.left,top:r.top-n.top,width:r.width}}getContents(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-o;return[o,t]=Kn(o,t),this.editor.getContents(o,t)}getFormat(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof o=="number"?this.editor.getFormat(o,t):this.editor.getFormat(o.index,o.length)}getIndex(o){return o.offset(this.scroll)}getLength(){return this.scroll.length()}getLeaf(o){return this.scroll.leaf(o)}getLine(o){return this.scroll.line(o)}getLines(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof o!="number"?this.scroll.lines(o.index,o.length):this.scroll.lines(o,t)}getModule(o){return this.theme.modules[o]}getSelection(){return arguments.length>0&&arguments[0]!==void 0&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}getSemanticHTML(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return typeof o=="number"&&(t=t??this.getLength()-o),[o,t]=Kn(o,t),this.editor.getHTML(o,t)}getText(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return typeof o=="number"&&(t=t??this.getLength()-o),[o,t]=Kn(o,t),this.editor.getText(o,t)}hasFocus(){return this.selection.hasFocus()}insertEmbed(o,t,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Xo.sources.API;return Yo.call(this,()=>this.editor.insertEmbed(o,t,r),n,o)}insertText(o,t,r,n,a){let s;return[o,,s,a]=Kn(o,0,r,n,a),Yo.call(this,()=>this.editor.insertText(o,t,s),a,o,t.length)}isEnabled(){return this.scroll.isEnabled()}off(){return this.emitter.off(...arguments)}on(){return this.emitter.on(...arguments)}once(){return this.emitter.once(...arguments)}removeFormat(o,t,r){return[o,t,,r]=Kn(o,t,r),Yo.call(this,()=>this.editor.removeFormat(o,t),r,o)}scrollRectIntoView(o){hz(this.root,o)}scrollIntoView(){console.warn("Quill#scrollIntoView() has been deprecated and will be removed in the near future. Please use Quill#scrollSelectionIntoView() instead."),this.scrollSelectionIntoView()}scrollSelectionIntoView(){let o=this.selection.lastRange,t=o&&this.selection.getBounds(o.index,o.length);t&&this.scrollRectIntoView(t)}setContents(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:J.sources.API;return Yo.call(this,()=>{o=new Si.default(o);let r=this.getLength(),n=this.editor.deleteText(0,r),a=this.editor.insertContents(0,o),s=this.editor.deleteText(this.getLength()-1,1);return n.compose(a).compose(s)},t)}setSelection(o,t,r){o==null?this.selection.setRange(null,t||Xo.sources.API):([o,t,,r]=Kn(o,t,r),this.selection.setRange(new Lr(Math.max(0,o),t),r),r!==J.sources.SILENT&&this.scrollSelectionIntoView())}setText(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:J.sources.API,r=new Si.default().insert(o);return this.setContents(r,t)}update(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:J.sources.USER,t=this.scroll.update(o);return this.selection.update(o),t}updateContents(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:J.sources.API;return Yo.call(this,()=>(o=new Si.default(o),this.editor.applyDelta(o)),t,!0)}};B(Xo,"DEFAULTS",{bounds:null,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0},placeholder:"",readOnly:!1,registry:dp,theme:"default"}),B(Xo,"events",J.events),B(Xo,"sources",J.sources),B(Xo,"version","2.0.3"),B(Xo,"imports",{delta:Si.default,parchment:ql,"core/module":re,"core/theme":Cs});var j=Xo;function mz(i){return typeof i=="string"?document.querySelector(i):i}function km(i){return Object.entries(i??{}).reduce((o,t)=>{let[r,n]=t;return{...o,[r]:n===!0?{}:n}},{})}function fz(i){return Object.fromEntries(Object.entries(i).filter(o=>o[1]!==void 0))}function zT(i,o){let t=mz(i);if(!t)throw new Error("Invalid Quill container");let n=!o.theme||o.theme===j.DEFAULTS.theme?Cs:j.import(`themes/${o.theme}`);if(!n)throw new Error(`Invalid theme ${o.theme}. Did you register it?`);let{modules:a,...s}=j.DEFAULTS,{modules:l,...d}=n.DEFAULTS,h=km(o.modules);h!=null&&h.toolbar&&h.toolbar.constructor!==Object&&(h={...h,toolbar:{container:h.toolbar}});let m=Ur({},km(a),km(l),h),f={...s,...fz(d),...fz(o)},b=o.registry;return b?o.formats&&Ss.warn('Ignoring "formats" option because "registry" is specified'):b=o.formats?uz(o.formats,f.registry,Ss):f.registry,{...f,registry:b,container:t,theme:n,modules:Object.entries(m).reduce((g,v)=>{let[x,_]=v;if(!_)return g;let $=j.import(`modules/${x}`);return $==null?(Ss.error(`Cannot load ${x} module. Are you sure you registered it?`),g):{...g,[x]:Ur({},$.DEFAULTS||{},_)}},{}),bounds:mz(f.bounds)}}function Yo(i,o,t,r){if(!this.isEnabled()&&o===J.sources.USER&&!this.allowReadOnlyEdits)return new Si.default;let n=t==null?null:this.getSelection(),a=this.editor.delta,s=i();if(n!=null&&(t===!0&&(t=n.index),r==null?n=gz(n,s,o):r!==0&&(n=gz(n,t,r,o)),this.setSelection(n,J.sources.SILENT)),s.length()>0){let l=[J.events.TEXT_CHANGE,s,a,o];this.emitter.emit(J.events.EDITOR_CHANGE,...l),o!==J.sources.SILENT&&this.emitter.emit(...l)}return s}function Kn(i,o,t,r,n){let a={};return typeof i.index=="number"&&typeof i.length=="number"?typeof o!="number"?(n=r,r=t,t=o,o=i.length,i=i.index):(o=i.length,i=i.index):typeof o!="number"&&(n=r,r=t,t=o,o=0),typeof t=="object"?(a=t,n=r):typeof t=="string"&&(r!=null?a[t]=r:n=t),n=n||J.sources.API,[i,o,a,n]}function gz(i,o,t,r){let n=typeof t=="number"?t:0;if(i==null)return null;let a,s;return o&&typeof o.transformPosition=="function"?[a,s]=[i.index,i.index+i.length].map(l=>o.transformPosition(l,r!==J.sources.USER)):[a,s]=[i.index,i.index+i.length].map(l=>l<o||l===o&&r===J.sources.USER?l:n>=0?l+n:Math.max(o,l+n)),new Lr(a,s-a)}var Cm=class extends zs{},ko=Cm;var Co=pr(Br(),1);function bz(i){return i instanceof Ft||i instanceof
|
|
2594
|
+
`});this.setContents(s)}this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable(),this.allowReadOnlyEdits=!1}addContainer(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof o=="string"){let r=o;o=document.createElement("div"),o.classList.add(r)}return this.container.insertBefore(o,t),o}blur(){this.selection.setRange(null)}deleteText(o,t,r){return[o,t,,r]=Kn(o,t,r),Yo.call(this,()=>this.editor.deleteText(o,t),r,o,-1*t)}disable(){this.enable(!1)}editReadOnly(o){this.allowReadOnlyEdits=!0;let t=o();return this.allowReadOnlyEdits=!1,t}enable(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(o),this.container.classList.toggle("ql-disabled",!o)}focus(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.selection.focus(),o.preventScroll||this.scrollSelectionIntoView()}format(o,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:J.sources.API;return Yo.call(this,()=>{let n=this.getSelection(!0),a=new Si.default;if(n==null)return a;if(this.scroll.query(o,X.BLOCK))a=this.editor.formatLine(n.index,n.length,{[o]:t});else{if(n.length===0)return this.selection.format(o,t),a;a=this.editor.formatText(n.index,n.length,{[o]:t})}return this.setSelection(n,J.sources.SILENT),a},r)}formatLine(o,t,r,n,a){let s;return[o,t,s,a]=Kn(o,t,r,n,a),Yo.call(this,()=>this.editor.formatLine(o,t,s),a,o,0)}formatText(o,t,r,n,a){let s;return[o,t,s,a]=Kn(o,t,r,n,a),Yo.call(this,()=>this.editor.formatText(o,t,s),a,o,0)}getBounds(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=null;if(typeof o=="number"?r=this.selection.getBounds(o,t):r=this.selection.getBounds(o.index,o.length),!r)return null;let n=this.container.getBoundingClientRect();return{bottom:r.bottom-n.top,height:r.height,left:r.left-n.left,right:r.right-n.left,top:r.top-n.top,width:r.width}}getContents(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-o;return[o,t]=Kn(o,t),this.editor.getContents(o,t)}getFormat(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof o=="number"?this.editor.getFormat(o,t):this.editor.getFormat(o.index,o.length)}getIndex(o){return o.offset(this.scroll)}getLength(){return this.scroll.length()}getLeaf(o){return this.scroll.leaf(o)}getLine(o){return this.scroll.line(o)}getLines(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof o!="number"?this.scroll.lines(o.index,o.length):this.scroll.lines(o,t)}getModule(o){return this.theme.modules[o]}getSelection(){return arguments.length>0&&arguments[0]!==void 0&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}getSemanticHTML(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return typeof o=="number"&&(t=t??this.getLength()-o),[o,t]=Kn(o,t),this.editor.getHTML(o,t)}getText(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return typeof o=="number"&&(t=t??this.getLength()-o),[o,t]=Kn(o,t),this.editor.getText(o,t)}hasFocus(){return this.selection.hasFocus()}insertEmbed(o,t,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Xo.sources.API;return Yo.call(this,()=>this.editor.insertEmbed(o,t,r),n,o)}insertText(o,t,r,n,a){let s;return[o,,s,a]=Kn(o,0,r,n,a),Yo.call(this,()=>this.editor.insertText(o,t,s),a,o,t.length)}isEnabled(){return this.scroll.isEnabled()}off(){return this.emitter.off(...arguments)}on(){return this.emitter.on(...arguments)}once(){return this.emitter.once(...arguments)}removeFormat(o,t,r){return[o,t,,r]=Kn(o,t,r),Yo.call(this,()=>this.editor.removeFormat(o,t),r,o)}scrollRectIntoView(o){hz(this.root,o)}scrollIntoView(){console.warn("Quill#scrollIntoView() has been deprecated and will be removed in the near future. Please use Quill#scrollSelectionIntoView() instead."),this.scrollSelectionIntoView()}scrollSelectionIntoView(){let o=this.selection.lastRange,t=o&&this.selection.getBounds(o.index,o.length);t&&this.scrollRectIntoView(t)}setContents(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:J.sources.API;return Yo.call(this,()=>{o=new Si.default(o);let r=this.getLength(),n=this.editor.deleteText(0,r),a=this.editor.insertContents(0,o),s=this.editor.deleteText(this.getLength()-1,1);return n.compose(a).compose(s)},t)}setSelection(o,t,r){o==null?this.selection.setRange(null,t||Xo.sources.API):([o,t,,r]=Kn(o,t,r),this.selection.setRange(new Lr(Math.max(0,o),t),r),r!==J.sources.SILENT&&this.scrollSelectionIntoView())}setText(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:J.sources.API,r=new Si.default().insert(o);return this.setContents(r,t)}update(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:J.sources.USER,t=this.scroll.update(o);return this.selection.update(o),t}updateContents(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:J.sources.API;return Yo.call(this,()=>(o=new Si.default(o),this.editor.applyDelta(o)),t,!0)}};B(Xo,"DEFAULTS",{bounds:null,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0},placeholder:"",readOnly:!1,registry:dp,theme:"default"}),B(Xo,"events",J.events),B(Xo,"sources",J.sources),B(Xo,"version","2.0.3"),B(Xo,"imports",{delta:Si.default,parchment:ql,"core/module":re,"core/theme":Cs});var j=Xo;function mz(i){return typeof i=="string"?document.querySelector(i):i}function km(i){return Object.entries(i??{}).reduce((o,t)=>{let[r,n]=t;return{...o,[r]:n===!0?{}:n}},{})}function fz(i){return Object.fromEntries(Object.entries(i).filter(o=>o[1]!==void 0))}function zT(i,o){let t=mz(i);if(!t)throw new Error("Invalid Quill container");let n=!o.theme||o.theme===j.DEFAULTS.theme?Cs:j.import(`themes/${o.theme}`);if(!n)throw new Error(`Invalid theme ${o.theme}. Did you register it?`);let{modules:a,...s}=j.DEFAULTS,{modules:l,...d}=n.DEFAULTS,h=km(o.modules);h!=null&&h.toolbar&&h.toolbar.constructor!==Object&&(h={...h,toolbar:{container:h.toolbar}});let m=Ur({},km(a),km(l),h),f={...s,...fz(d),...fz(o)},b=o.registry;return b?o.formats&&Ss.warn('Ignoring "formats" option because "registry" is specified'):b=o.formats?uz(o.formats,f.registry,Ss):f.registry,{...f,registry:b,container:t,theme:n,modules:Object.entries(m).reduce((g,v)=>{let[x,_]=v;if(!_)return g;let $=j.import(`modules/${x}`);return $==null?(Ss.error(`Cannot load ${x} module. Are you sure you registered it?`),g):{...g,[x]:Ur({},$.DEFAULTS||{},_)}},{}),bounds:mz(f.bounds)}}function Yo(i,o,t,r){if(!this.isEnabled()&&o===J.sources.USER&&!this.allowReadOnlyEdits)return new Si.default;let n=t==null?null:this.getSelection(),a=this.editor.delta,s=i();if(n!=null&&(t===!0&&(t=n.index),r==null?n=gz(n,s,o):r!==0&&(n=gz(n,t,r,o)),this.setSelection(n,J.sources.SILENT)),s.length()>0){let l=[J.events.TEXT_CHANGE,s,a,o];this.emitter.emit(J.events.EDITOR_CHANGE,...l),o!==J.sources.SILENT&&this.emitter.emit(...l)}return s}function Kn(i,o,t,r,n){let a={};return typeof i.index=="number"&&typeof i.length=="number"?typeof o!="number"?(n=r,r=t,t=o,o=i.length,i=i.index):(o=i.length,i=i.index):typeof o!="number"&&(n=r,r=t,t=o,o=0),typeof t=="object"?(a=t,n=r):typeof t=="string"&&(r!=null?a[t]=r:n=t),n=n||J.sources.API,[i,o,a,n]}function gz(i,o,t,r){let n=typeof t=="number"?t:0;if(i==null)return null;let a,s;return o&&typeof o.transformPosition=="function"?[a,s]=[i.index,i.index+i.length].map(l=>o.transformPosition(l,r!==J.sources.USER)):[a,s]=[i.index,i.index+i.length].map(l=>l<o||l===o&&r===J.sources.USER?l:n>=0?l+n:Math.max(o,l+n)),new Lr(a,s-a)}var Cm=class extends zs{},ko=Cm;var Co=pr(Br(),1);function bz(i){return i instanceof Ft||i instanceof Be}function vz(i){return typeof i.updateContent=="function"}var Ei=class extends Ll{constructor(o,t,r){let{emitter:n}=r;super(o,t),this.emitter=n,this.batch=!1,this.optimize(),this.enable(),this.domNode.addEventListener("dragstart",a=>this.handleDragStart(a))}batchStart(){Array.isArray(this.batch)||(this.batch=[])}batchEnd(){if(!this.batch)return;let o=this.batch;this.batch=!1,this.update(o)}emitMount(o){this.emitter.emit(J.events.SCROLL_BLOT_MOUNT,o)}emitUnmount(o){this.emitter.emit(J.events.SCROLL_BLOT_UNMOUNT,o)}emitEmbedUpdate(o,t){this.emitter.emit(J.events.SCROLL_EMBED_UPDATE,o,t)}deleteAt(o,t){let[r,n]=this.line(o),[a]=this.line(o+t);if(super.deleteAt(o,t),a!=null&&r!==a&&n>0){if(r instanceof Be||a instanceof Be){this.optimize();return}let s=a.children.head instanceof br?null:a.children.head;r.moveChildren(a,s),r.remove()}this.optimize()}enable(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",o?"true":"false")}formatAt(o,t,r,n){super.formatAt(o,t,r,n),this.optimize()}insertAt(o,t,r){if(o>=this.length())if(r==null||this.scroll.query(t,X.BLOCK)==null){let n=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(n),r==null&&t.endsWith(`
|
|
2595
2595
|
`)?n.insertAt(0,t.slice(0,-1),r):n.insertAt(0,t,r)}else{let n=this.scroll.create(t,r);this.appendChild(n)}else super.insertAt(o,t,r);this.optimize()}insertBefore(o,t){if(o.statics.scope===X.INLINE_BLOT){let r=this.scroll.create(this.statics.defaultChild.blotName);r.appendChild(o),super.insertBefore(r,t)}else super.insertBefore(o,t)}insertContents(o,t){let r=this.deltaToRenderBlocks(t.concat(new Co.default().insert(`
|
|
2596
|
-
`))),n=r.pop();if(n==null)return;this.batchStart();let a=r.shift();if(a){let d=a.type==="block"&&(a.delta.length()===0||!this.descendant(
|
|
2597
|
-
`);let b=Wr(this.line(o)[0]),g=Co.AttributeMap.diff(b,a.attributes)||{};Object.keys(g).forEach(v=>{this.formatAt(f-1,1,v,g[v])}),o=f}let[s,l]=this.children.find(o);if(r.length&&(s&&(s=s.split(l),l=0),r.forEach(d=>{if(d.type==="block"){let h=this.createBlock(d.attributes,s||void 0);Sm(h,0,d.delta)}else{let h=this.create(d.key,d.value);this.insertBefore(h,s||void 0),Object.keys(d.attributes).forEach(m=>{h.format(m,d.attributes[m])})}})),n.type==="block"&&n.delta.length()){let d=s?s.offset(s.scroll)+l:this.length();Sm(this,d,n.delta)}this.batchEnd(),this.optimize()}isEnabled(){return this.domNode.getAttribute("contenteditable")==="true"}leaf(o){let t=this.path(o).pop();if(!t)return[null,-1];let[r,n]=t;return r instanceof
|
|
2598
|
-
`);s.slice(0,-1).forEach(d=>{r.insert(d,n.attributes),t.push({type:"block",delta:r,attributes:n.attributes??{}}),r=new Co.default});let l=s[s.length-1];l&&r.insert(l,n.attributes)}else{let s=Object.keys(a)[0];if(!s)return;this.query(s,X.INLINE)?r.push(n):(r.length()&&t.push({type:"block",delta:r,attributes:{}}),r=new Co.default,t.push({type:"blockEmbed",key:s,value:a[s],attributes:n.attributes??{}}))}}),r.length()&&t.push({type:"block",delta:r,attributes:{}}),t}createBlock(o,t){let r,n={};Object.entries(o).forEach(l=>{let[d,h]=l;this.query(d,X.BLOCK&X.BLOT)!=null?r=d:n[d]=h});let a=this.create(r||this.statics.defaultChild.blotName,r?o[r]:void 0);this.insertBefore(a,t||void 0);let s=a.length();return Object.entries(n).forEach(l=>{let[d,h]=l;a.formatAt(0,s,d,h)}),a}};B(Ei,"blotName","scroll"),B(Ei,"className","ql-editor"),B(Ei,"tagName","DIV"),B(Ei,"defaultChild",Ft),B(Ei,"allowedChildren",[Ft,
|
|
2596
|
+
`))),n=r.pop();if(n==null)return;this.batchStart();let a=r.shift();if(a){let d=a.type==="block"&&(a.delta.length()===0||!this.descendant(Be,o)[0]&&o<this.length()),h=a.type==="block"?a.delta:new Co.default().insert({[a.key]:a.value});Sm(this,o,h);let m=a.type==="block"?1:0,f=o+h.length()+m;d&&this.insertAt(f-1,`
|
|
2597
|
+
`);let b=Wr(this.line(o)[0]),g=Co.AttributeMap.diff(b,a.attributes)||{};Object.keys(g).forEach(v=>{this.formatAt(f-1,1,v,g[v])}),o=f}let[s,l]=this.children.find(o);if(r.length&&(s&&(s=s.split(l),l=0),r.forEach(d=>{if(d.type==="block"){let h=this.createBlock(d.attributes,s||void 0);Sm(h,0,d.delta)}else{let h=this.create(d.key,d.value);this.insertBefore(h,s||void 0),Object.keys(d.attributes).forEach(m=>{h.format(m,d.attributes[m])})}})),n.type==="block"&&n.delta.length()){let d=s?s.offset(s.scroll)+l:this.length();Sm(this,d,n.delta)}this.batchEnd(),this.optimize()}isEnabled(){return this.domNode.getAttribute("contenteditable")==="true"}leaf(o){let t=this.path(o).pop();if(!t)return[null,-1];let[r,n]=t;return r instanceof Me?[r,n]:[null,-1]}line(o){return o===this.length()?this.line(o-1):this.descendant(bz,o)}lines(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,r=(n,a,s)=>{let l=[],d=s;return n.children.forEachAt(a,s,(h,m,f)=>{bz(h)?l.push(h):h instanceof zs&&(l=l.concat(r(h,m,d))),d-=f}),l};return r(this,o,t)}optimize(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch||(super.optimize(o,t),o.length>0&&this.emitter.emit(J.events.SCROLL_OPTIMIZE,o,t))}path(o){return super.path(o).slice(1)}remove(){}update(o){if(this.batch){Array.isArray(o)&&(this.batch=this.batch.concat(o));return}let t=J.sources.USER;typeof o=="string"&&(t=o),Array.isArray(o)||(o=this.observer.takeRecords()),o=o.filter(r=>{let{target:n}=r,a=this.find(n,!0);return a&&!vz(a)}),o.length>0&&this.emitter.emit(J.events.SCROLL_BEFORE_UPDATE,t,o),super.update(o.concat([])),o.length>0&&this.emitter.emit(J.events.SCROLL_UPDATE,t,o)}updateEmbedAt(o,t,r){let[n]=this.descendant(a=>a instanceof Be,o);n&&n.statics.blotName===t&&vz(n)&&n.updateContent(r)}handleDragStart(o){o.preventDefault()}deltaToRenderBlocks(o){let t=[],r=new Co.default;return o.forEach(n=>{let a=n?.insert;if(a)if(typeof a=="string"){let s=a.split(`
|
|
2598
|
+
`);s.slice(0,-1).forEach(d=>{r.insert(d,n.attributes),t.push({type:"block",delta:r,attributes:n.attributes??{}}),r=new Co.default});let l=s[s.length-1];l&&r.insert(l,n.attributes)}else{let s=Object.keys(a)[0];if(!s)return;this.query(s,X.INLINE)?r.push(n):(r.length()&&t.push({type:"block",delta:r,attributes:{}}),r=new Co.default,t.push({type:"blockEmbed",key:s,value:a[s],attributes:n.attributes??{}}))}}),r.length()&&t.push({type:"block",delta:r,attributes:{}}),t}createBlock(o,t){let r,n={};Object.entries(o).forEach(l=>{let[d,h]=l;this.query(d,X.BLOCK&X.BLOT)!=null?r=d:n[d]=h});let a=this.create(r||this.statics.defaultChild.blotName,r?o[r]:void 0);this.insertBefore(a,t||void 0);let s=a.length();return Object.entries(n).forEach(l=>{let[d,h]=l;a.formatAt(0,s,d,h)}),a}};B(Ei,"blotName","scroll"),B(Ei,"className","ql-editor"),B(Ei,"tagName","DIV"),B(Ei,"defaultChild",Ft),B(Ei,"allowedChildren",[Ft,Be,ko]);function Sm(i,o,t){t.reduce((r,n)=>{let a=Co.Op.length(n),s=n.attributes||{};if(n.insert!=null){if(typeof n.insert=="string"){let l=n.insert;i.insertAt(r,l);let[d]=i.descendant(Me,r),h=Wr(d);s=Co.AttributeMap.diff(h,s)||{}}else if(typeof n.insert=="object"){let l=Object.keys(n.insert)[0];if(l==null)return r;if(i.insertAt(r,l,n.insert[l]),i.scroll.query(l,X.INLINE)!=null){let[h]=i.descendant(Me,r),m=Wr(h);s=Co.AttributeMap.diff(m,s)||{}}}}return Object.keys(s).forEach(l=>{i.formatAt(r,a,l,s[l])}),r+a},o)}var xz=Ei;var Kr=pr(Br(),1);var Em={scope:X.BLOCK,whitelist:["right","center","justify"]},yz=new $r("align","align",Em),Tm=new qe("align","ql-align",Em),pp=new Gr("align","text-align",Em);var Pl=class extends Gr{value(o){let t=super.value(o);return t.startsWith("rgb(")?(t=t.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),`#${t.split(",").map(n=>`00${parseInt(n,10).toString(16)}`.slice(-2)).join("")}`):t}},zz=new qe("color","ql-color",{scope:X.INLINE}),Hl=new Pl("color","color",{scope:X.INLINE});var wz=new qe("background","ql-bg",{scope:X.INLINE}),Fl=new Pl("background","background-color",{scope:X.INLINE});var zn=class extends ko{static create(o){let t=super.create(o);return t.setAttribute("spellcheck","false"),t}code(o,t){return this.children.map(r=>r.length()<=1?"":r.domNode.innerText).join(`
|
|
2599
2599
|
`).slice(o,o+t)}html(o,t){return`<pre>
|
|
2600
2600
|
${va(this.code(o,t))}
|
|
2601
|
-
</pre>`}},Ee=class extends Ft{static register(){j.register(zn)}};B(Ee,"TAB"," ");var Es=class extends vr{};Es.blotName="code";Es.tagName="CODE";Ee.blotName="code-block";Ee.className="ql-code-block";Ee.tagName="DIV";zn.blotName="code-block-container";zn.className="ql-code-block-container";zn.tagName="DIV";zn.allowedChildren=[Ee];Ee.allowedChildren=[Se,br,Ci];Ee.requiredContainer=zn;var $m={scope:X.BLOCK,whitelist:["rtl"]},hp=new $r("direction","dir",$m),Am=new
|
|
2601
|
+
</pre>`}},Ee=class extends Ft{static register(){j.register(zn)}};B(Ee,"TAB"," ");var Es=class extends vr{};Es.blotName="code";Es.tagName="CODE";Ee.blotName="code-block";Ee.className="ql-code-block";Ee.tagName="DIV";zn.blotName="code-block-container";zn.className="ql-code-block-container";zn.tagName="DIV";zn.allowedChildren=[Ee];Ee.allowedChildren=[Se,br,Ci];Ee.requiredContainer=zn;var $m={scope:X.BLOCK,whitelist:["rtl"]},hp=new $r("direction","dir",$m),Am=new qe("direction","ql-direction",$m),up=new Gr("direction","direction",$m);var _z={scope:X.INLINE,whitelist:["serif","monospace"]},qm=new qe("font","ql-font",_z),Lm=class extends Gr{value(o){return super.value(o).replace(/["']/g,"")}},mp=new Lm("font","font-family",_z);var Mm=new qe("size","ql-size",{scope:X.INLINE,whitelist:["small","large","huge"]}),fp=new Gr("size","font-size",{scope:X.INLINE,whitelist:["10px","18px","32px"]});var yr=pr(Br(),1);var wT=ao("quill:keyboard"),_T=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",Bl=class i extends re{static match(o,t){return["altKey","ctrlKey","metaKey","shiftKey"].some(r=>!!t[r]!==o[r]&&t[r]!==null)?!1:t.key===o.key||t.key===o.which}constructor(o,t){super(o,t),this.bindings={},Object.keys(this.options.bindings).forEach(r=>{this.options.bindings[r]&&this.addBinding(this.options.bindings[r])}),this.addBinding({key:"Enter",shiftKey:null},this.handleEnter),this.addBinding({key:"Enter",metaKey:null,ctrlKey:null,altKey:null},()=>{}),/Firefox/i.test(navigator.userAgent)?(this.addBinding({key:"Backspace"},{collapsed:!0},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0},this.handleDelete)):(this.addBinding({key:"Backspace"},{collapsed:!0,prefix:/^.?$/},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0,suffix:/^.?$/},this.handleDelete)),this.addBinding({key:"Backspace"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Delete"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Backspace",altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},this.handleBackspace),this.listen()}addBinding(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=CT(o);if(n==null){wT.warn("Attempted to add invalid keyboard binding",n);return}typeof t=="function"&&(t={handler:t}),typeof r=="function"&&(r={handler:r}),(Array.isArray(n.key)?n.key:[n.key]).forEach(s=>{let l={...n,key:s,...t,...r};this.bindings[l.key]=this.bindings[l.key]||[],this.bindings[l.key].push(l)})}listen(){this.quill.root.addEventListener("keydown",o=>{if(o.defaultPrevented||o.isComposing||o.keyCode===229&&(o.key==="Enter"||o.key==="Backspace"))return;let n=(this.bindings[o.key]||[]).concat(this.bindings[o.which]||[]).filter($=>i.match(o,$));if(n.length===0)return;let a=j.find(o.target,!0);if(a&&a.scroll!==this.quill.scroll)return;let s=this.quill.getSelection();if(s==null||!this.quill.hasFocus())return;let[l,d]=this.quill.getLine(s.index),[h,m]=this.quill.getLeaf(s.index),[f,b]=s.length===0?[h,m]:this.quill.getLeaf(s.index+s.length),g=h instanceof ws?h.value().slice(0,m):"",v=f instanceof ws?f.value().slice(b):"",x={collapsed:s.length===0,empty:s.length===0&&l.length()<=1,format:this.quill.getFormat(s),line:l,offset:d,prefix:g,suffix:v,event:o};n.some($=>{if($.collapsed!=null&&$.collapsed!==x.collapsed||$.empty!=null&&$.empty!==x.empty||$.offset!=null&&$.offset!==x.offset)return!1;if(Array.isArray($.format)){if($.format.every(N=>x.format[N]==null))return!1}else if(typeof $.format=="object"&&!Object.keys($.format).every(N=>$.format[N]===!0?x.format[N]!=null:$.format[N]===!1?x.format[N]==null:ga($.format[N],x.format[N])))return!1;return $.prefix!=null&&!$.prefix.test(x.prefix)||$.suffix!=null&&!$.suffix.test(x.suffix)?!1:$.handler.call(this,s,x,$)!==!0})&&o.preventDefault()})}handleBackspace(o,t){let r=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(t.prefix)?2:1;if(o.index===0||this.quill.getLength()<=1)return;let n={},[a]=this.quill.getLine(o.index),s=new yr.default().retain(o.index-r).delete(r);if(t.offset===0){let[l]=this.quill.getLine(o.index-1);if(l&&!(l.statics.blotName==="block"&&l.length()<=1)){let h=a.formats(),m=this.quill.getFormat(o.index-1,1);if(n=yr.AttributeMap.diff(h,m)||{},Object.keys(n).length>0){let f=new yr.default().retain(o.index+a.length()-2).retain(1,n);s=s.compose(f)}}}this.quill.updateContents(s,j.sources.USER),this.quill.focus()}handleDelete(o,t){let r=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(t.suffix)?2:1;if(o.index>=this.quill.getLength()-r)return;let n={},[a]=this.quill.getLine(o.index),s=new yr.default().retain(o.index).delete(r);if(t.offset>=a.length()-1){let[l]=this.quill.getLine(o.index+1);if(l){let d=a.formats(),h=this.quill.getFormat(o.index,1);n=yr.AttributeMap.diff(d,h)||{},Object.keys(n).length>0&&(s=s.retain(l.length()-1).retain(1,n))}}this.quill.updateContents(s,j.sources.USER),this.quill.focus()}handleDeleteRange(o){Vl({range:o,quill:this.quill}),this.quill.focus()}handleEnter(o,t){let r=Object.keys(t.format).reduce((a,s)=>(this.quill.scroll.query(s,X.BLOCK)&&!Array.isArray(t.format[s])&&(a[s]=t.format[s]),a),{}),n=new yr.default().retain(o.index).delete(o.length).insert(`
|
|
2602
2602
|
`,r);this.quill.updateContents(n,j.sources.USER),this.quill.setSelection(o.index+1,j.sources.SILENT),this.quill.focus()}},kT={bindings:{bold:Im("bold"),italic:Im("italic"),underline:Im("underline"),indent:{key:"Tab",format:["blockquote","indent","list"],handler(i,o){return o.collapsed&&o.offset!==0?!0:(this.quill.format("indent","+1",j.sources.USER),!1)}},outdent:{key:"Tab",shiftKey:!0,format:["blockquote","indent","list"],handler(i,o){return o.collapsed&&o.offset!==0?!0:(this.quill.format("indent","-1",j.sources.USER),!1)}},"outdent backspace":{key:"Backspace",collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler(i,o){o.format.indent!=null?this.quill.format("indent","-1",j.sources.USER):o.format.list!=null&&this.quill.format("list",!1,j.sources.USER)}},"indent code-block":kz(!0),"outdent code-block":kz(!1),"remove tab":{key:"Tab",shiftKey:!0,collapsed:!0,prefix:/\t$/,handler(i){this.quill.deleteText(i.index-1,1,j.sources.USER)}},tab:{key:"Tab",handler(i,o){if(o.format.table)return!0;this.quill.history.cutoff();let t=new yr.default().retain(i.index).delete(i.length).insert(" ");return this.quill.updateContents(t,j.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(i.index+1,j.sources.SILENT),!1}},"blockquote empty enter":{key:"Enter",collapsed:!0,format:["blockquote"],empty:!0,handler(){this.quill.format("blockquote",!1,j.sources.USER)}},"list empty enter":{key:"Enter",collapsed:!0,format:["list"],empty:!0,handler(i,o){let t={list:!1};o.format.indent&&(t.indent=!1),this.quill.formatLine(i.index,i.length,t,j.sources.USER)}},"checklist enter":{key:"Enter",collapsed:!0,format:{list:"checked"},handler(i){let[o,t]=this.quill.getLine(i.index),r={...o.formats(),list:"checked"},n=new yr.default().retain(i.index).insert(`
|
|
2603
2603
|
`,r).retain(o.length()-t-1).retain(1,{list:"unchecked"});this.quill.updateContents(n,j.sources.USER),this.quill.setSelection(i.index+1,j.sources.SILENT),this.quill.scrollSelectionIntoView()}},"header enter":{key:"Enter",collapsed:!0,format:["header"],suffix:/^$/,handler(i,o){let[t,r]=this.quill.getLine(i.index),n=new yr.default().retain(i.index).insert(`
|
|
2604
2604
|
`,o.format).retain(t.length()-r-1).retain(1,{header:null});this.quill.updateContents(n,j.sources.USER),this.quill.setSelection(i.index+1,j.sources.SILENT),this.quill.scrollSelectionIntoView()}},"table backspace":{key:"Backspace",format:["table"],collapsed:!0,offset:0,handler(){}},"table delete":{key:"Delete",format:["table"],collapsed:!0,suffix:/^$/,handler(){}},"table enter":{key:"Enter",shiftKey:null,format:["table"],handler(i){let o=this.quill.getModule("table");if(o){let[t,r,n,a]=o.getTable(i),s=ST(t,r,n,a);if(s==null)return;let l=t.offset();if(s<0){let d=new yr.default().retain(l).insert(`
|
|
2605
2605
|
`);this.quill.updateContents(d,j.sources.USER),this.quill.setSelection(i.index+1,i.length,j.sources.SILENT)}else if(s>0){l+=t.length();let d=new yr.default().retain(l).insert(`
|
|
2606
2606
|
`);this.quill.updateContents(d,j.sources.USER),this.quill.setSelection(l,j.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(i,o){let{event:t,line:r}=o,n=r.offset(this.quill.scroll);t.shiftKey?this.quill.setSelection(n-1,j.sources.USER):this.quill.setSelection(n+r.length(),j.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(i,o){if(this.quill.scroll.query("list")==null)return!0;let{length:t}=o.prefix,[r,n]=this.quill.getLine(i.index);if(n>t)return!0;let a;switch(o.prefix.trim()){case"[]":case"[ ]":a="unchecked";break;case"[x]":a="checked";break;case"-":case"*":a="bullet";break;default:a="ordered"}this.quill.insertText(i.index," ",j.sources.USER),this.quill.history.cutoff();let s=new yr.default().retain(i.index-n).delete(t+1).retain(r.length()-2-n).retain(1,{list:a});return this.quill.updateContents(s,j.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(i.index-t,j.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(i){let[o,t]=this.quill.getLine(i.index),r=2,n=o;for(;n!=null&&n.length()<=1&&n.formats()["code-block"];)if(n=n.prev,r-=1,r<=0){let a=new yr.default().retain(i.index+o.length()-t-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(a,j.sources.USER),this.quill.setSelection(i.index-1,j.sources.SILENT),!1}return!0}},"embed left":gp("ArrowLeft",!1),"embed left shift":gp("ArrowLeft",!0),"embed right":gp("ArrowRight",!1),"embed right shift":gp("ArrowRight",!0),"table down":Cz(!1),"table up":Cz(!0)}};Bl.DEFAULTS=kT;function kz(i){return{key:"Tab",shiftKey:!i,format:{"code-block":!0},handler(o,t){let{event:r}=t,n=this.quill.scroll.query("code-block"),{TAB:a}=n;if(o.length===0&&!r.shiftKey){this.quill.insertText(o.index,a,j.sources.USER),this.quill.setSelection(o.index+a.length,j.sources.SILENT);return}let s=o.length===0?this.quill.getLines(o.index,1):this.quill.getLines(o),{index:l,length:d}=o;s.forEach((h,m)=>{i?(h.insertAt(0,a),m===0?l+=a.length:d+=a.length):h.domNode.textContent.startsWith(a)&&(h.deleteAt(0,a.length),m===0?l-=a.length:d-=a.length)}),this.quill.update(j.sources.USER),this.quill.setSelection(l,d,j.sources.SILENT)}}}function gp(i,o){return{key:i,shiftKey:o,altKey:null,[i==="ArrowLeft"?"prefix":"suffix"]:/^$/,handler(r){let{index:n}=r;i==="ArrowRight"&&(n+=r.length+1);let[a]=this.quill.getLeaf(n);return a instanceof pe?(i==="ArrowLeft"?o?this.quill.setSelection(r.index-1,r.length+1,j.sources.USER):this.quill.setSelection(r.index-1,j.sources.USER):o?this.quill.setSelection(r.index,r.length+1,j.sources.USER):this.quill.setSelection(r.index+r.length+1,j.sources.USER),!1):!0}}}function Im(i){return{key:i[0],shortKey:!0,handler(o,t){this.quill.format(i,!t.format[i],j.sources.USER)}}}function Cz(i){return{key:i?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(o,t){let r=i?"prev":"next",n=t.line,a=n.parent[r];if(a!=null){if(a.statics.blotName==="table-row"){let s=a.children.head,l=n;for(;l.prev!=null;)l=l.prev,s=s.next;let d=s.offset(this.quill.scroll)+Math.min(t.offset,s.length()-1);this.quill.setSelection(d,0,j.sources.USER)}}else{let s=n.table()[r];s!=null&&(i?this.quill.setSelection(s.offset(this.quill.scroll)+s.length()-1,0,j.sources.USER):this.quill.setSelection(s.offset(this.quill.scroll),0,j.sources.USER))}return!1}}}function CT(i){if(typeof i=="string"||typeof i=="number")i={key:i};else if(typeof i=="object")i=xn(i);else return null;return i.shortKey&&(i[_T]=i.shortKey,delete i.shortKey),i}function Vl(i){let{quill:o,range:t}=i,r=o.getLines(t),n={};if(r.length>1){let a=r[0].formats(),s=r[r.length-1].formats();n=yr.AttributeMap.diff(s,a)||{}}o.deleteText(t,j.sources.USER),Object.keys(n).length>0&&o.formatLine(t.index,1,n,j.sources.USER),o.setSelection(t.index,j.sources.SILENT)}function ST(i,o,t,r){return o.prev==null&&o.next==null?t.prev==null&&t.next==null?r===0?-1:1:t.prev==null?-1:1:o.prev==null?-1:o.next==null?1:null}var ET=/font-weight:\s*normal/,TT=["P","OL","UL"],Sz=i=>i&&TT.includes(i.tagName),$T=i=>{Array.from(i.querySelectorAll("br")).filter(o=>Sz(o.previousElementSibling)&&Sz(o.nextElementSibling)).forEach(o=>{o.parentNode?.removeChild(o)})},AT=i=>{Array.from(i.querySelectorAll('b[style*="font-weight"]')).filter(o=>o.getAttribute("style")?.match(ET)).forEach(o=>{let t=i.createDocumentFragment();t.append(...o.childNodes),o.parentNode?.replaceChild(t,o)})};function Dm(i){i.querySelector('[id^="docs-internal-guid-"]')&&(AT(i),$T(i))}var LT=/\bmso-list:[^;]*ignore/i,qT=/\bmso-list:[^;]*\bl(\d+)/i,MT=/\bmso-list:[^;]*\blevel(\d+)/i,IT=(i,o)=>{let t=i.getAttribute("style"),r=t?.match(qT);if(!r)return null;let n=Number(r[1]),a=t?.match(MT),s=a?Number(a[1]):1,l=new RegExp(`@list l${n}:level${s}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,"i"),d=o.match(l),h=d&&d[1]==="bullet"?"bullet":"ordered";return{id:n,indent:s,type:h,element:i}},DT=i=>{let o=Array.from(i.querySelectorAll("[style*=mso-list]")),t=[],r=[];o.forEach(s=>{(s.getAttribute("style")||"").match(LT)?t.push(s):r.push(s)}),t.forEach(s=>s.parentNode?.removeChild(s));let n=i.documentElement.innerHTML,a=r.map(s=>IT(s,n)).filter(s=>s);for(;a.length;){let s=[],l=a.shift();for(;l;)s.push(l),l=a.length&&a[0]?.element===l.element.nextElementSibling&&a[0].id===l.id?a.shift():null;let d=document.createElement("ul");s.forEach(f=>{let b=document.createElement("li");b.setAttribute("data-list",f.type),f.indent>1&&b.setAttribute("class",`ql-indent-${f.indent-1}`),b.innerHTML=f.element.innerHTML,d.appendChild(b)});let h=s[0]?.element,{parentNode:m}=h??{};h&&m?.replaceChild(d,h),s.slice(1).forEach(f=>{let{element:b}=f;m?.removeChild(b)})}};function Nm(i){i.documentElement.getAttribute("xmlns:w")==="urn:schemas-microsoft-com:office:word"&&DT(i)}var NT=[Nm,Dm],RT=i=>{i.documentElement&&NT.forEach(o=>{o(i)})},Ez=RT;var OT=ao("quill:clipboard"),PT=[[Node.TEXT_NODE,QT],[Node.TEXT_NODE,$z],["br",UT],[Node.ELEMENT_NODE,$z],[Node.ELEMENT_NODE,VT],[Node.ELEMENT_NODE,BT],[Node.ELEMENT_NODE,YT],["li",WT],["ol, ul",KT],["pre",jT],["tr",XT],["b",Rm("bold")],["i",Rm("italic")],["strike",Rm("strike")],["style",GT]],HT=[yz,hp].reduce((i,o)=>(i[o.keyName]=o,i),{}),Tz=[pp,Fl,Hl,up,mp,fp].reduce((i,o)=>(i[o.keyName]=o,i),{}),Ul=class extends re{constructor(o,t){super(o,t),this.quill.root.addEventListener("copy",r=>this.onCaptureCopy(r,!1)),this.quill.root.addEventListener("cut",r=>this.onCaptureCopy(r,!0)),this.quill.root.addEventListener("paste",this.onCapturePaste.bind(this)),this.matchers=[],PT.concat(this.options.matchers??[]).forEach(r=>{let[n,a]=r;this.addMatcher(n,a)})}addMatcher(o,t){this.matchers.push([o,t])}convert(o){let{html:t,text:r}=o,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(n[Ee.blotName])return new Kr.default().insert(r||"",{[Ee.blotName]:n[Ee.blotName]});if(!t)return new Kr.default().insert(r||"",n);let a=this.convertHTML(t);return jl(a,`
|
|
2607
2607
|
`)&&(a.ops[a.ops.length-1].attributes==null||n.table)?a.compose(new Kr.default().retain(a.length()-1).delete(1)):a}normalizeHTML(o){Ez(o)}convertHTML(o){let t=new DOMParser().parseFromString(o,"text/html");this.normalizeHTML(t);let r=t.body,n=new WeakMap,[a,s]=this.prepareMatching(r,n);return vp(this.quill.scroll,r,a,s,n)}dangerouslyPasteHTML(o,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:j.sources.API;if(typeof o=="string"){let n=this.convert({html:o,text:""});this.quill.setContents(n,t),this.quill.setSelection(0,j.sources.SILENT)}else{let n=this.convert({html:t,text:""});this.quill.updateContents(new Kr.default().retain(o).concat(n),r),this.quill.setSelection(o+n.length(),j.sources.SILENT)}}onCaptureCopy(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(o.defaultPrevented)return;o.preventDefault();let[r]=this.quill.selection.getRange();if(r==null)return;let{html:n,text:a}=this.onCopy(r,t);o.clipboardData?.setData("text/plain",a),o.clipboardData?.setData("text/html",n),t&&Vl({range:r,quill:this.quill})}normalizeURIList(o){return o.split(/\r?\n/).filter(t=>t[0]!=="#").join(`
|
|
2608
|
-
`)}onCapturePaste(o){if(o.defaultPrevented||!this.quill.isEnabled())return;o.preventDefault();let t=this.quill.getSelection(!0);if(t==null)return;let r=o.clipboardData?.getData("text/html"),n=o.clipboardData?.getData("text/plain");if(!r&&!n){let s=o.clipboardData?.getData("text/uri-list");s&&(n=this.normalizeURIList(s))}let a=Array.from(o.clipboardData?.files||[]);if(!r&&a.length>0){this.quill.uploader.upload(t,a);return}if(r&&a.length>0){let s=new DOMParser().parseFromString(r,"text/html");if(s.body.childElementCount===1&&s.body.firstElementChild?.tagName==="IMG"){this.quill.uploader.upload(t,a);return}}this.onPaste(t,{html:r,text:n})}onCopy(o){let t=this.quill.getText(o);return{html:this.quill.getSemanticHTML(o),text:t}}onPaste(o,t){let{text:r,html:n}=t,a=this.quill.getFormat(o.index),s=this.convert({text:r,html:n},a);OT.log("onPaste",s,{text:r,html:n});let l=new Kr.default().retain(o.index).delete(o.length).concat(s);this.quill.updateContents(l,j.sources.USER),this.quill.setSelection(l.length()-o.length,j.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(o,t){let r=[],n=[];return this.matchers.forEach(a=>{let[s,l]=a;switch(s){case Node.TEXT_NODE:n.push(l);break;case Node.ELEMENT_NODE:r.push(l);break;default:Array.from(o.querySelectorAll(s)).forEach(d=>{t.has(d)?t.get(d)?.push(l):t.set(d,[l])});break}}),[r,n]}};B(Ul,"DEFAULTS",{matchers:[]});function xa(i,o,t,r){return r.query(o)?i.reduce((n,a)=>{if(!a.insert)return n;if(a.attributes&&a.attributes[o])return n.push(a);let s=t?{[o]:t}:{};return n.insert(a.insert,{...s,...a.attributes})},new Kr.default):i}function jl(i,o){let t="";for(let r=i.ops.length-1;r>=0&&t.length<o.length;--r){let n=i.ops[r];if(typeof n.insert!="string")break;t=n.insert+t}return t.slice(-1*o.length)===o}function Ti(i,o){if(!(i instanceof Element))return!1;let t=o.query(i);return t&&t.prototype instanceof pe?!1:["address","article","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","iframe","li","main","nav","ol","output","p","pre","section","table","td","tr","ul","video"].includes(i.tagName.toLowerCase())}function FT(i,o){return i.previousElementSibling&&i.nextElementSibling&&!Ti(i.previousElementSibling,o)&&!Ti(i.nextElementSibling,o)}var bp=new WeakMap;function Az(i){return i==null?!1:(bp.has(i)||(i.tagName==="PRE"?bp.set(i,!0):bp.set(i,Az(i.parentNode))),bp.get(i))}function vp(i,o,t,r,n){return o.nodeType===o.TEXT_NODE?r.reduce((a,s)=>s(o,a,i),new Kr.default):o.nodeType===o.ELEMENT_NODE?Array.from(o.childNodes||[]).reduce((a,s)=>{let l=vp(i,s,t,r,n);return s.nodeType===o.ELEMENT_NODE&&(l=t.reduce((d,h)=>h(s,d,i),l),l=(n.get(s)||[]).reduce((d,h)=>h(s,d,i),l)),a.concat(l)},new Kr.default):new Kr.default}function Rm(i){return(o,t,r)=>xa(t,i,!0,r)}function BT(i,o,t){let r=$r.keys(i),n=
|
|
2608
|
+
`)}onCapturePaste(o){if(o.defaultPrevented||!this.quill.isEnabled())return;o.preventDefault();let t=this.quill.getSelection(!0);if(t==null)return;let r=o.clipboardData?.getData("text/html"),n=o.clipboardData?.getData("text/plain");if(!r&&!n){let s=o.clipboardData?.getData("text/uri-list");s&&(n=this.normalizeURIList(s))}let a=Array.from(o.clipboardData?.files||[]);if(!r&&a.length>0){this.quill.uploader.upload(t,a);return}if(r&&a.length>0){let s=new DOMParser().parseFromString(r,"text/html");if(s.body.childElementCount===1&&s.body.firstElementChild?.tagName==="IMG"){this.quill.uploader.upload(t,a);return}}this.onPaste(t,{html:r,text:n})}onCopy(o){let t=this.quill.getText(o);return{html:this.quill.getSemanticHTML(o),text:t}}onPaste(o,t){let{text:r,html:n}=t,a=this.quill.getFormat(o.index),s=this.convert({text:r,html:n},a);OT.log("onPaste",s,{text:r,html:n});let l=new Kr.default().retain(o.index).delete(o.length).concat(s);this.quill.updateContents(l,j.sources.USER),this.quill.setSelection(l.length()-o.length,j.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(o,t){let r=[],n=[];return this.matchers.forEach(a=>{let[s,l]=a;switch(s){case Node.TEXT_NODE:n.push(l);break;case Node.ELEMENT_NODE:r.push(l);break;default:Array.from(o.querySelectorAll(s)).forEach(d=>{t.has(d)?t.get(d)?.push(l):t.set(d,[l])});break}}),[r,n]}};B(Ul,"DEFAULTS",{matchers:[]});function xa(i,o,t,r){return r.query(o)?i.reduce((n,a)=>{if(!a.insert)return n;if(a.attributes&&a.attributes[o])return n.push(a);let s=t?{[o]:t}:{};return n.insert(a.insert,{...s,...a.attributes})},new Kr.default):i}function jl(i,o){let t="";for(let r=i.ops.length-1;r>=0&&t.length<o.length;--r){let n=i.ops[r];if(typeof n.insert!="string")break;t=n.insert+t}return t.slice(-1*o.length)===o}function Ti(i,o){if(!(i instanceof Element))return!1;let t=o.query(i);return t&&t.prototype instanceof pe?!1:["address","article","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","iframe","li","main","nav","ol","output","p","pre","section","table","td","tr","ul","video"].includes(i.tagName.toLowerCase())}function FT(i,o){return i.previousElementSibling&&i.nextElementSibling&&!Ti(i.previousElementSibling,o)&&!Ti(i.nextElementSibling,o)}var bp=new WeakMap;function Az(i){return i==null?!1:(bp.has(i)||(i.tagName==="PRE"?bp.set(i,!0):bp.set(i,Az(i.parentNode))),bp.get(i))}function vp(i,o,t,r,n){return o.nodeType===o.TEXT_NODE?r.reduce((a,s)=>s(o,a,i),new Kr.default):o.nodeType===o.ELEMENT_NODE?Array.from(o.childNodes||[]).reduce((a,s)=>{let l=vp(i,s,t,r,n);return s.nodeType===o.ELEMENT_NODE&&(l=t.reduce((d,h)=>h(s,d,i),l),l=(n.get(s)||[]).reduce((d,h)=>h(s,d,i),l)),a.concat(l)},new Kr.default):new Kr.default}function Rm(i){return(o,t,r)=>xa(t,i,!0,r)}function BT(i,o,t){let r=$r.keys(i),n=qe.keys(i),a=Gr.keys(i),s={};return r.concat(n).concat(a).forEach(l=>{let d=t.query(l,X.ATTRIBUTE);d!=null&&(s[d.attrName]=d.value(i),s[d.attrName])||(d=HT[l],d!=null&&(d.attrName===l||d.keyName===l)&&(s[d.attrName]=d.value(i)||void 0),d=Tz[l],d!=null&&(d.attrName===l||d.keyName===l)&&(d=Tz[l],s[d.attrName]=d.value(i)||void 0))}),Object.entries(s).reduce((l,d)=>{let[h,m]=d;return xa(l,h,m,t)},o)}function VT(i,o,t){let r=t.query(i);if(r==null)return o;if(r.prototype instanceof pe){let n={},a=r.value(i);if(a!=null)return n[r.blotName]=a,new Kr.default().insert(n,r.formats(i,t))}else if(r.prototype instanceof ba&&!jl(o,`
|
|
2609
2609
|
`)&&o.insert(`
|
|
2610
2610
|
`),"blotName"in r&&"formats"in r&&typeof r.formats=="function")return xa(o,r.blotName,r.formats(i,t),t);return o}function UT(i,o){return jl(o,`
|
|
2611
2611
|
`)||o.insert(`
|
|
@@ -2613,10 +2613,10 @@ ${va(this.code(o,t))}
|
|
|
2613
2613
|
`))return o;let n=-1,a=i.parentNode;for(;a!=null;)["OL","UL"].includes(a.tagName)&&(n+=1),a=a.parentNode;return n<=0?o:o.reduce((s,l)=>l.insert?l.attributes&&typeof l.attributes.indent=="number"?s.push(l):s.insert(l.insert,{indent:n,...l.attributes||{}}):s,new Kr.default)}function KT(i,o,t){let r=i,n=r.tagName==="OL"?"ordered":"bullet",a=r.getAttribute("data-checked");return a&&(n=a==="true"?"checked":"unchecked"),xa(o,"list",n,t)}function $z(i,o,t){if(!jl(o,`
|
|
2614
2614
|
`)){if(Ti(i,t)&&(i.childNodes.length>0||i instanceof HTMLParagraphElement))return o.insert(`
|
|
2615
2615
|
`);if(o.length()>0&&i.nextSibling){let r=i.nextSibling;for(;r!=null;){if(Ti(r,t))return o.insert(`
|
|
2616
|
-
`);let n=t.query(r);if(n&&n.prototype instanceof
|
|
2616
|
+
`);let n=t.query(r);if(n&&n.prototype instanceof Be)return o.insert(`
|
|
2617
2617
|
`);r=r.firstChild}}}return o}function YT(i,o,t){let r={},n=i.style||{};return n.fontStyle==="italic"&&(r.italic=!0),n.textDecoration==="underline"&&(r.underline=!0),n.textDecoration==="line-through"&&(r.strike=!0),(n.fontWeight?.startsWith("bold")||parseInt(n.fontWeight,10)>=700)&&(r.bold=!0),o=Object.entries(r).reduce((a,s)=>{let[l,d]=s;return xa(a,l,d,t)},o),parseFloat(n.textIndent||0)>0?new Kr.default().insert(" ").concat(o):o}function XT(i,o,t){let r=i.parentElement?.tagName==="TABLE"?i.parentElement:i.parentElement?.parentElement;if(r!=null){let a=Array.from(r.querySelectorAll("tr")).indexOf(i)+1;return xa(o,"table",a,t)}return o}function QT(i,o,t){let r=i.data;if(i.parentElement?.tagName==="O:P")return o.insert(r.trim());if(!Az(i)){if(r.trim().length===0&&r.includes(`
|
|
2618
2618
|
`)&&!FT(i,t))return o;r=r.replace(/[^\S\u00a0]/g," "),r=r.replace(/ {2,}/g," "),(i.previousSibling==null&&i.parentElement!=null&&Ti(i.parentElement,t)||i.previousSibling instanceof Element&&Ti(i.previousSibling,t))&&(r=r.replace(/^ /,"")),(i.nextSibling==null&&i.parentElement!=null&&Ti(i.parentElement,t)||i.nextSibling instanceof Element&&Ti(i.nextSibling,t))&&(r=r.replace(/ $/,"")),r=r.replaceAll("\xA0"," ")}return o.insert(r)}var Gl=class extends re{constructor(t,r){super(t,r);B(this,"lastRecorded",0);B(this,"ignoreChange",!1);B(this,"stack",{undo:[],redo:[]});B(this,"currentRange",null);this.quill.on(j.events.EDITOR_CHANGE,(n,a,s,l)=>{n===j.events.SELECTION_CHANGE?a&&l!==j.sources.SILENT&&(this.currentRange=a):n===j.events.TEXT_CHANGE&&(this.ignoreChange||(!this.options.userOnly||l===j.sources.USER?this.record(a,s):this.transform(a)),this.currentRange=Om(this.currentRange,a))}),this.quill.keyboard.addBinding({key:"z",shortKey:!0},this.undo.bind(this)),this.quill.keyboard.addBinding({key:["z","Z"],shortKey:!0,shiftKey:!0},this.redo.bind(this)),/Win/i.test(navigator.platform)&&this.quill.keyboard.addBinding({key:"y",shortKey:!0},this.redo.bind(this)),this.quill.root.addEventListener("beforeinput",n=>{n.inputType==="historyUndo"?(this.undo(),n.preventDefault()):n.inputType==="historyRedo"&&(this.redo(),n.preventDefault())})}change(t,r){if(this.stack[t].length===0)return;let n=this.stack[t].pop();if(!n)return;let a=this.quill.getContents(),s=n.delta.invert(a);this.stack[r].push({delta:s,range:Om(n.range,s)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n.delta,j.sources.USER),this.ignoreChange=!1,this.restoreSelection(n)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(t,r){if(t.ops.length===0)return;this.stack.redo=[];let n=t.invert(r),a=this.currentRange,s=Date.now();if(this.lastRecorded+this.options.delay>s&&this.stack.undo.length>0){let l=this.stack.undo.pop();l&&(n=n.compose(l.delta),a=l.range)}else this.lastRecorded=s;n.length()!==0&&(this.stack.undo.push({delta:n,range:a}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change("redo","undo")}transform(t){Lz(this.stack.undo,t),Lz(this.stack.redo,t)}undo(){this.change("undo","redo")}restoreSelection(t){if(t.range)this.quill.setSelection(t.range,j.sources.USER);else{let r=ZT(this.quill.scroll,t.delta);this.quill.setSelection(r,j.sources.USER)}}};B(Gl,"DEFAULTS",{delay:1e3,maxStack:100,userOnly:!1});function Lz(i,o){let t=o;for(let r=i.length-1;r>=0;r-=1){let n=i[r];i[r]={delta:t.transform(n.delta,!0),range:n.range&&Om(n.range,t)},t=n.delta.transform(t),i[r].delta.length()===0&&i.splice(r,1)}}function JT(i,o){let t=o.ops[o.ops.length-1];return t==null?!1:t.insert!=null?typeof t.insert=="string"&&t.insert.endsWith(`
|
|
2619
|
-
`):t.attributes!=null?Object.keys(t.attributes).some(r=>i.query(r,X.BLOCK)!=null):!1}function ZT(i,o){let t=o.reduce((n,a)=>n+(a.delete||0),0),r=o.length()-t;return JT(i,o)&&(r-=1),r}function Om(i,o){if(!i)return i;let t=o.transformPosition(i.index),r=o.transformPosition(i.index+i.length);return{index:t,length:r-t}}var qz=pr(Br(),1);var xp=class extends re{constructor(o,t){super(o,t),o.root.addEventListener("drop",r=>{r.preventDefault();let n=null;if(document.caretRangeFromPoint)n=document.caretRangeFromPoint(r.clientX,r.clientY);else if(document.caretPositionFromPoint){let s=document.caretPositionFromPoint(r.clientX,r.clientY);n=document.createRange(),n.setStart(s.offsetNode,s.offset),n.setEnd(s.offsetNode,s.offset)}let a=n&&o.selection.normalizeNative(n);if(a){let s=o.selection.normalizedToRange(a);r.dataTransfer?.files&&this.upload(s,r.dataTransfer.files)}})}upload(o,t){let r=[];Array.from(t).forEach(n=>{n&&this.options.mimetypes?.includes(n.type)&&r.push(n)}),r.length>0&&this.options.handler.call(this,o,r)}};xp.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(i,o){if(!this.quill.scroll.query("image"))return;let t=o.map(r=>new Promise(n=>{let a=new FileReader;a.onload=()=>{n(a.result)},a.readAsDataURL(r)}));Promise.all(t).then(r=>{let n=r.reduce((a,s)=>a.insert({image:s}),new qz.default().retain(i.index).delete(i.length));this.quill.updateContents(n,J.sources.USER),this.quill.setSelection(i.index+r.length,J.sources.SILENT)})}};var Mz=xp;var $i=pr(Br(),1);var Iz=pr(Br(),1);var t$=["insertText","insertReplacementText"],Pm=class extends re{constructor(o,t){super(o,t),o.root.addEventListener("beforeinput",r=>{this.handleBeforeInput(r)}),/Android/i.test(navigator.userAgent)||o.on(j.events.COMPOSITION_BEFORE_START,()=>{this.handleCompositionStart()})}deleteRange(o){Vl({range:o,quill:this.quill})}replaceText(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(o.length===0)return!1;if(t){let r=this.quill.getFormat(o.index,1);this.deleteRange(o),this.quill.updateContents(new Iz.default().retain(o.index).insert(t,r),j.sources.USER)}else this.deleteRange(o);return this.quill.setSelection(o.index+t.length,0,j.sources.SILENT),!0}handleBeforeInput(o){if(this.quill.composition.isComposing||o.defaultPrevented||!t$.includes(o.inputType))return;let t=o.getTargetRanges?o.getTargetRanges()[0]:null;if(!t||t.collapsed===!0)return;let r=e$(o);if(r==null)return;let n=this.quill.selection.normalizeNative(t),a=n?this.quill.selection.normalizedToRange(n):null;a&&this.replaceText(a,r)&&o.preventDefault()}handleCompositionStart(){let o=this.quill.getSelection();o&&this.replaceText(o)}};function e$(i){return typeof i.data=="string"?i.data:i.dataTransfer?.types.includes("text/plain")?i.dataTransfer.getData("text/plain"):null}var Dz=Pm;var r$=/Mac/i.test(navigator.platform),o$=100,n$=i=>!!(i.key==="ArrowLeft"||i.key==="ArrowRight"||i.key==="ArrowUp"||i.key==="ArrowDown"||i.key==="Home"||r$&&i.key==="a"&&i.ctrlKey===!0),Hm=class extends re{constructor(t,r){super(t,r);B(this,"isListening",!1);B(this,"selectionChangeDeadline",0);this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(t,r){let{line:n,event:a}=r;if(!(n instanceof jr)||!n.uiNode)return!0;let s=getComputedStyle(n.domNode).direction==="rtl";return s&&a.key!=="ArrowRight"||!s&&a.key!=="ArrowLeft"?!0:(this.quill.setSelection(t.index-1,t.length+(a.shiftKey?1:0),j.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",t=>{!t.defaultPrevented&&n$(t)&&this.ensureListeningToSelectionChange()})}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+o$,this.isListening)return;this.isListening=!0;let t=()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()};document.addEventListener("selectionchange",t,{once:!0})}handleSelectionChange(){let t=document.getSelection();if(!t)return;let r=t.getRangeAt(0);if(r.collapsed!==!0||r.startOffset!==0)return;let n=this.quill.scroll.find(r.startContainer);if(!(n instanceof jr)||!n.uiNode)return;let a=document.createRange();a.setStartAfter(n.uiNode),a.setEndAfter(n.uiNode),t.removeAllRanges(),t.addRange(a)}},Nz=Hm;j.register({"blots/block":Ft,"blots/block/embed":Ve,"blots/break":br,"blots/container":ko,"blots/cursor":Ci,"blots/embed":ks,"blots/inline":vr,"blots/scroll":xz,"blots/text":Se,"modules/clipboard":Ul,"modules/history":Gl,"modules/keyboard":Bl,"modules/uploader":Mz,"modules/input":Dz,"modules/uiNode":Nz});var yp=j;var Fm=class extends Me{add(o,t){let r=0;if(t==="+1"||t==="-1"){let n=this.value(o)||0;r=t==="+1"?n+1:n-1}else typeof t=="number"&&(r=t);return r===0?(this.remove(o),!0):super.add(o,r.toString())}canAdd(o,t){return super.canAdd(o,t)||super.canAdd(o,parseInt(t,10))}value(o){return parseInt(super.value(o),10)||void 0}},i$=new Fm("indent","ql-indent",{scope:X.BLOCK,whitelist:[1,2,3,4,5,6,7,8]}),Rz=i$;var Wl=class extends Ft{};B(Wl,"blotName","blockquote"),B(Wl,"tagName","blockquote");var Oz=Wl;var Kl=class extends Ft{static formats(o){return this.tagName.indexOf(o.tagName)+1}};B(Kl,"blotName","header"),B(Kl,"tagName",["H1","H2","H3","H4","H5","H6"]);var Pz=Kl;var ya=class extends ko{};ya.blotName="list-container";ya.tagName="OL";var Ai=class extends Ft{static create(o){let t=super.create();return t.setAttribute("data-list",o),t}static formats(o){return o.getAttribute("data-list")||void 0}static register(){j.register(ya)}constructor(o,t){super(o,t);let r=t.ownerDocument.createElement("span"),n=a=>{if(!o.isEnabled())return;let s=this.statics.formats(t,o);s==="checked"?(this.format("list","unchecked"),a.preventDefault()):s==="unchecked"&&(this.format("list","checked"),a.preventDefault())};r.addEventListener("mousedown",n),r.addEventListener("touchstart",n),this.attachUI(r)}format(o,t){o===this.statics.blotName&&t?this.domNode.setAttribute("data-list",t):super.format(o,t)}};Ai.blotName="list";Ai.tagName="LI";ya.allowedChildren=[Ai];Ai.requiredContainer=ya;var Yl=class extends vr{static create(){return super.create()}static formats(){return!0}optimize(o){super.optimize(o),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}};B(Yl,"blotName","bold"),B(Yl,"tagName",["STRONG","B"]);var Ts=Yl;var Xl=class extends Ts{};B(Xl,"blotName","italic"),B(Xl,"tagName",["EM","I"]);var Hz=Xl;var so=class extends vr{static create(o){let t=super.create(o);return t.setAttribute("href",this.sanitize(o)),t.setAttribute("rel","noopener noreferrer"),t.setAttribute("target","_blank"),t}static formats(o){return o.getAttribute("href")}static sanitize(o){return Bm(o,this.PROTOCOL_WHITELIST)?o:this.SANITIZED_URL}format(o,t){o!==this.statics.blotName||!t?super.format(o,t):this.domNode.setAttribute("href",this.constructor.sanitize(t))}};B(so,"blotName","link"),B(so,"tagName","A"),B(so,"SANITIZED_URL","about:blank"),B(so,"PROTOCOL_WHITELIST",["http","https","mailto","tel","sms"]);function Bm(i,o){let t=document.createElement("a");t.href=i;let r=t.href.slice(0,t.href.indexOf(":"));return o.indexOf(r)>-1}var Ql=class extends vr{static create(o){return o==="super"?document.createElement("sup"):o==="sub"?document.createElement("sub"):super.create(o)}static formats(o){if(o.tagName==="SUB")return"sub";if(o.tagName==="SUP")return"super"}};B(Ql,"blotName","script"),B(Ql,"tagName",["SUB","SUP"]);var Fz=Ql;var Jl=class extends Ts{};B(Jl,"blotName","strike"),B(Jl,"tagName",["S","STRIKE"]);var Bz=Jl;var Zl=class extends vr{};B(Zl,"blotName","underline"),B(Zl,"tagName","U");var Vz=Zl;var $s=class extends ks{static create(o){if(window.katex==null)throw new Error("Formula module requires KaTeX.");let t=super.create(o);return typeof o=="string"&&(window.katex.render(o,t,{throwOnError:!1,errorColor:"#f00"}),t.setAttribute("data-value",o)),t}static value(o){return o.getAttribute("data-value")}html(){let{formula:o}=this.value();return`<span>${o}</span>`}};B($s,"blotName","formula"),B($s,"className","ql-formula"),B($s,"tagName","SPAN");var Uz=$s;var jz=["alt","height","width"],tc=class extends pe{static create(o){let t=super.create(o);return typeof o=="string"&&t.setAttribute("src",this.sanitize(o)),t}static formats(o){return jz.reduce((t,r)=>(o.hasAttribute(r)&&(t[r]=o.getAttribute(r)),t),{})}static match(o){return/\.(jpe?g|gif|png)$/.test(o)||/^data:image\/.+;base64/.test(o)}static sanitize(o){return Bm(o,["http","https","data"])?o:"//:0"}static value(o){return o.getAttribute("src")}format(o,t){jz.indexOf(o)>-1?t?this.domNode.setAttribute(o,t):this.domNode.removeAttribute(o):super.format(o,t)}};B(tc,"blotName","image"),B(tc,"tagName","IMG");var Gz=tc;var Wz=["height","width"],As=class extends Ve{static create(o){let t=super.create(o);return t.setAttribute("frameborder","0"),t.setAttribute("allowfullscreen","true"),t.setAttribute("src",this.sanitize(o)),t}static formats(o){return Wz.reduce((t,r)=>(o.hasAttribute(r)&&(t[r]=o.getAttribute(r)),t),{})}static sanitize(o){return so.sanitize(o)}static value(o){return o.getAttribute("src")}format(o,t){Wz.indexOf(o)>-1?t?this.domNode.setAttribute(o,t):this.domNode.removeAttribute(o):super.format(o,t)}html(){let{video:o}=this.value();return`<a href="${o}">${o}</a>`}};B(As,"blotName","video"),B(As,"className","ql-video"),B(As,"tagName","IFRAME");var Kz=As;var zp=pr(Br(),1);var ec=new Me("code-token","hljs",{scope:X.INLINE}),Yn=class i extends vr{static formats(o,t){for(;o!=null&&o!==t.domNode;){if(o.classList&&o.classList.contains(Ee.className))return super.formats(o,t);o=o.parentNode}}constructor(o,t,r){super(o,t,r),ec.add(this.domNode,r)}format(o,t){o!==i.blotName?super.format(o,t):t?ec.add(this.domNode,t):(ec.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}optimize(){super.optimize(...arguments),ec.value(this.domNode)||this.unwrap()}};Yn.blotName="code-token";Yn.className="ql-token";var Yr=class extends Ee{static create(o){let t=super.create(o);return typeof o=="string"&&t.setAttribute("data-language",o),t}static formats(o){return o.getAttribute("data-language")||"plain"}static register(){}format(o,t){o===this.statics.blotName&&t?this.domNode.setAttribute("data-language",t):super.format(o,t)}replaceWith(o,t){return this.formatAt(0,this.length(),Yn.blotName,!1),super.replaceWith(o,t)}},za=class extends zn{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(o,t){o===Yr.blotName&&(this.forceNext=!0,this.children.forEach(r=>{r.format(o,t)}))}formatAt(o,t,r,n){r===Yr.blotName&&(this.forceNext=!0),super.formatAt(o,t,r,n)}highlight(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.children.head==null)return;let n=`${Array.from(this.domNode.childNodes).filter(s=>s!==this.uiNode).map(s=>s.textContent).join(`
|
|
2619
|
+
`):t.attributes!=null?Object.keys(t.attributes).some(r=>i.query(r,X.BLOCK)!=null):!1}function ZT(i,o){let t=o.reduce((n,a)=>n+(a.delete||0),0),r=o.length()-t;return JT(i,o)&&(r-=1),r}function Om(i,o){if(!i)return i;let t=o.transformPosition(i.index),r=o.transformPosition(i.index+i.length);return{index:t,length:r-t}}var qz=pr(Br(),1);var xp=class extends re{constructor(o,t){super(o,t),o.root.addEventListener("drop",r=>{r.preventDefault();let n=null;if(document.caretRangeFromPoint)n=document.caretRangeFromPoint(r.clientX,r.clientY);else if(document.caretPositionFromPoint){let s=document.caretPositionFromPoint(r.clientX,r.clientY);n=document.createRange(),n.setStart(s.offsetNode,s.offset),n.setEnd(s.offsetNode,s.offset)}let a=n&&o.selection.normalizeNative(n);if(a){let s=o.selection.normalizedToRange(a);r.dataTransfer?.files&&this.upload(s,r.dataTransfer.files)}})}upload(o,t){let r=[];Array.from(t).forEach(n=>{n&&this.options.mimetypes?.includes(n.type)&&r.push(n)}),r.length>0&&this.options.handler.call(this,o,r)}};xp.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(i,o){if(!this.quill.scroll.query("image"))return;let t=o.map(r=>new Promise(n=>{let a=new FileReader;a.onload=()=>{n(a.result)},a.readAsDataURL(r)}));Promise.all(t).then(r=>{let n=r.reduce((a,s)=>a.insert({image:s}),new qz.default().retain(i.index).delete(i.length));this.quill.updateContents(n,J.sources.USER),this.quill.setSelection(i.index+r.length,J.sources.SILENT)})}};var Mz=xp;var $i=pr(Br(),1);var Iz=pr(Br(),1);var t$=["insertText","insertReplacementText"],Pm=class extends re{constructor(o,t){super(o,t),o.root.addEventListener("beforeinput",r=>{this.handleBeforeInput(r)}),/Android/i.test(navigator.userAgent)||o.on(j.events.COMPOSITION_BEFORE_START,()=>{this.handleCompositionStart()})}deleteRange(o){Vl({range:o,quill:this.quill})}replaceText(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(o.length===0)return!1;if(t){let r=this.quill.getFormat(o.index,1);this.deleteRange(o),this.quill.updateContents(new Iz.default().retain(o.index).insert(t,r),j.sources.USER)}else this.deleteRange(o);return this.quill.setSelection(o.index+t.length,0,j.sources.SILENT),!0}handleBeforeInput(o){if(this.quill.composition.isComposing||o.defaultPrevented||!t$.includes(o.inputType))return;let t=o.getTargetRanges?o.getTargetRanges()[0]:null;if(!t||t.collapsed===!0)return;let r=e$(o);if(r==null)return;let n=this.quill.selection.normalizeNative(t),a=n?this.quill.selection.normalizedToRange(n):null;a&&this.replaceText(a,r)&&o.preventDefault()}handleCompositionStart(){let o=this.quill.getSelection();o&&this.replaceText(o)}};function e$(i){return typeof i.data=="string"?i.data:i.dataTransfer?.types.includes("text/plain")?i.dataTransfer.getData("text/plain"):null}var Dz=Pm;var r$=/Mac/i.test(navigator.platform),o$=100,n$=i=>!!(i.key==="ArrowLeft"||i.key==="ArrowRight"||i.key==="ArrowUp"||i.key==="ArrowDown"||i.key==="Home"||r$&&i.key==="a"&&i.ctrlKey===!0),Hm=class extends re{constructor(t,r){super(t,r);B(this,"isListening",!1);B(this,"selectionChangeDeadline",0);this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(t,r){let{line:n,event:a}=r;if(!(n instanceof jr)||!n.uiNode)return!0;let s=getComputedStyle(n.domNode).direction==="rtl";return s&&a.key!=="ArrowRight"||!s&&a.key!=="ArrowLeft"?!0:(this.quill.setSelection(t.index-1,t.length+(a.shiftKey?1:0),j.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",t=>{!t.defaultPrevented&&n$(t)&&this.ensureListeningToSelectionChange()})}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+o$,this.isListening)return;this.isListening=!0;let t=()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()};document.addEventListener("selectionchange",t,{once:!0})}handleSelectionChange(){let t=document.getSelection();if(!t)return;let r=t.getRangeAt(0);if(r.collapsed!==!0||r.startOffset!==0)return;let n=this.quill.scroll.find(r.startContainer);if(!(n instanceof jr)||!n.uiNode)return;let a=document.createRange();a.setStartAfter(n.uiNode),a.setEndAfter(n.uiNode),t.removeAllRanges(),t.addRange(a)}},Nz=Hm;j.register({"blots/block":Ft,"blots/block/embed":Be,"blots/break":br,"blots/container":ko,"blots/cursor":Ci,"blots/embed":ks,"blots/inline":vr,"blots/scroll":xz,"blots/text":Se,"modules/clipboard":Ul,"modules/history":Gl,"modules/keyboard":Bl,"modules/uploader":Mz,"modules/input":Dz,"modules/uiNode":Nz});var yp=j;var Fm=class extends qe{add(o,t){let r=0;if(t==="+1"||t==="-1"){let n=this.value(o)||0;r=t==="+1"?n+1:n-1}else typeof t=="number"&&(r=t);return r===0?(this.remove(o),!0):super.add(o,r.toString())}canAdd(o,t){return super.canAdd(o,t)||super.canAdd(o,parseInt(t,10))}value(o){return parseInt(super.value(o),10)||void 0}},i$=new Fm("indent","ql-indent",{scope:X.BLOCK,whitelist:[1,2,3,4,5,6,7,8]}),Rz=i$;var Wl=class extends Ft{};B(Wl,"blotName","blockquote"),B(Wl,"tagName","blockquote");var Oz=Wl;var Kl=class extends Ft{static formats(o){return this.tagName.indexOf(o.tagName)+1}};B(Kl,"blotName","header"),B(Kl,"tagName",["H1","H2","H3","H4","H5","H6"]);var Pz=Kl;var ya=class extends ko{};ya.blotName="list-container";ya.tagName="OL";var Ai=class extends Ft{static create(o){let t=super.create();return t.setAttribute("data-list",o),t}static formats(o){return o.getAttribute("data-list")||void 0}static register(){j.register(ya)}constructor(o,t){super(o,t);let r=t.ownerDocument.createElement("span"),n=a=>{if(!o.isEnabled())return;let s=this.statics.formats(t,o);s==="checked"?(this.format("list","unchecked"),a.preventDefault()):s==="unchecked"&&(this.format("list","checked"),a.preventDefault())};r.addEventListener("mousedown",n),r.addEventListener("touchstart",n),this.attachUI(r)}format(o,t){o===this.statics.blotName&&t?this.domNode.setAttribute("data-list",t):super.format(o,t)}};Ai.blotName="list";Ai.tagName="LI";ya.allowedChildren=[Ai];Ai.requiredContainer=ya;var Yl=class extends vr{static create(){return super.create()}static formats(){return!0}optimize(o){super.optimize(o),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}};B(Yl,"blotName","bold"),B(Yl,"tagName",["STRONG","B"]);var Ts=Yl;var Xl=class extends Ts{};B(Xl,"blotName","italic"),B(Xl,"tagName",["EM","I"]);var Hz=Xl;var so=class extends vr{static create(o){let t=super.create(o);return t.setAttribute("href",this.sanitize(o)),t.setAttribute("rel","noopener noreferrer"),t.setAttribute("target","_blank"),t}static formats(o){return o.getAttribute("href")}static sanitize(o){return Bm(o,this.PROTOCOL_WHITELIST)?o:this.SANITIZED_URL}format(o,t){o!==this.statics.blotName||!t?super.format(o,t):this.domNode.setAttribute("href",this.constructor.sanitize(t))}};B(so,"blotName","link"),B(so,"tagName","A"),B(so,"SANITIZED_URL","about:blank"),B(so,"PROTOCOL_WHITELIST",["http","https","mailto","tel","sms"]);function Bm(i,o){let t=document.createElement("a");t.href=i;let r=t.href.slice(0,t.href.indexOf(":"));return o.indexOf(r)>-1}var Ql=class extends vr{static create(o){return o==="super"?document.createElement("sup"):o==="sub"?document.createElement("sub"):super.create(o)}static formats(o){if(o.tagName==="SUB")return"sub";if(o.tagName==="SUP")return"super"}};B(Ql,"blotName","script"),B(Ql,"tagName",["SUB","SUP"]);var Fz=Ql;var Jl=class extends Ts{};B(Jl,"blotName","strike"),B(Jl,"tagName",["S","STRIKE"]);var Bz=Jl;var Zl=class extends vr{};B(Zl,"blotName","underline"),B(Zl,"tagName","U");var Vz=Zl;var $s=class extends ks{static create(o){if(window.katex==null)throw new Error("Formula module requires KaTeX.");let t=super.create(o);return typeof o=="string"&&(window.katex.render(o,t,{throwOnError:!1,errorColor:"#f00"}),t.setAttribute("data-value",o)),t}static value(o){return o.getAttribute("data-value")}html(){let{formula:o}=this.value();return`<span>${o}</span>`}};B($s,"blotName","formula"),B($s,"className","ql-formula"),B($s,"tagName","SPAN");var Uz=$s;var jz=["alt","height","width"],tc=class extends pe{static create(o){let t=super.create(o);return typeof o=="string"&&t.setAttribute("src",this.sanitize(o)),t}static formats(o){return jz.reduce((t,r)=>(o.hasAttribute(r)&&(t[r]=o.getAttribute(r)),t),{})}static match(o){return/\.(jpe?g|gif|png)$/.test(o)||/^data:image\/.+;base64/.test(o)}static sanitize(o){return Bm(o,["http","https","data"])?o:"//:0"}static value(o){return o.getAttribute("src")}format(o,t){jz.indexOf(o)>-1?t?this.domNode.setAttribute(o,t):this.domNode.removeAttribute(o):super.format(o,t)}};B(tc,"blotName","image"),B(tc,"tagName","IMG");var Gz=tc;var Wz=["height","width"],As=class extends Be{static create(o){let t=super.create(o);return t.setAttribute("frameborder","0"),t.setAttribute("allowfullscreen","true"),t.setAttribute("src",this.sanitize(o)),t}static formats(o){return Wz.reduce((t,r)=>(o.hasAttribute(r)&&(t[r]=o.getAttribute(r)),t),{})}static sanitize(o){return so.sanitize(o)}static value(o){return o.getAttribute("src")}format(o,t){Wz.indexOf(o)>-1?t?this.domNode.setAttribute(o,t):this.domNode.removeAttribute(o):super.format(o,t)}html(){let{video:o}=this.value();return`<a href="${o}">${o}</a>`}};B(As,"blotName","video"),B(As,"className","ql-video"),B(As,"tagName","IFRAME");var Kz=As;var zp=pr(Br(),1);var ec=new qe("code-token","hljs",{scope:X.INLINE}),Yn=class i extends vr{static formats(o,t){for(;o!=null&&o!==t.domNode;){if(o.classList&&o.classList.contains(Ee.className))return super.formats(o,t);o=o.parentNode}}constructor(o,t,r){super(o,t,r),ec.add(this.domNode,r)}format(o,t){o!==i.blotName?super.format(o,t):t?ec.add(this.domNode,t):(ec.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}optimize(){super.optimize(...arguments),ec.value(this.domNode)||this.unwrap()}};Yn.blotName="code-token";Yn.className="ql-token";var Yr=class extends Ee{static create(o){let t=super.create(o);return typeof o=="string"&&t.setAttribute("data-language",o),t}static formats(o){return o.getAttribute("data-language")||"plain"}static register(){}format(o,t){o===this.statics.blotName&&t?this.domNode.setAttribute("data-language",t):super.format(o,t)}replaceWith(o,t){return this.formatAt(0,this.length(),Yn.blotName,!1),super.replaceWith(o,t)}},za=class extends zn{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(o,t){o===Yr.blotName&&(this.forceNext=!0,this.children.forEach(r=>{r.format(o,t)}))}formatAt(o,t,r,n){r===Yr.blotName&&(this.forceNext=!0),super.formatAt(o,t,r,n)}highlight(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.children.head==null)return;let n=`${Array.from(this.domNode.childNodes).filter(s=>s!==this.uiNode).map(s=>s.textContent).join(`
|
|
2620
2620
|
`)}
|
|
2621
2621
|
`,a=Yr.formats(this.children.head.domNode);if(t||this.forceNext||this.cachedText!==n){if(n.trim().length>0||this.cachedText==null){let s=this.children.reduce((d,h)=>d.concat(lm(h,!1)),new zp.default),l=o(n,a);s.diff(l).reduce((d,h)=>{let{retain:m,attributes:f}=h;return m?(f&&Object.keys(f).forEach(b=>{[Yr.blotName,Yn.blotName].includes(b)&&this.formatAt(d,m,b,f[b])}),d+m):d},0)}this.cachedText=n,this.forceNext=!1}}html(o,t){let[r]=this.children.find(o);return`<pre data-language="${r?Yr.formats(r.domNode):"plain"}">
|
|
2622
2622
|
${va(this.code(o,t))}
|
|
@@ -3431,7 +3431,7 @@ ${va(this.code(o,t))}
|
|
|
3431
3431
|
</div>
|
|
3432
3432
|
</label>
|
|
3433
3433
|
</div>
|
|
3434
|
-
`}};Wt.styles=E(Lw),Wt.dependencies={"zn-icon":ct},c([F('input[type="radio"]')],Wt.prototype,"input",2),c([O()],Wt.prototype,"hasFocus",2),c([p()],Wt.prototype,"title",2),c([p()],Wt.prototype,"name",2),c([p()],Wt.prototype,"value",2),c([p({reflect:!0})],Wt.prototype,"size",2),c([p({type:Boolean,reflect:!0})],Wt.prototype,"disabled",2),c([p({type:Boolean,reflect:!0})],Wt.prototype,"checked",2),c([p({type:Boolean,reflect:!0})],Wt.prototype,"contained",2),c([p({type:Boolean,reflect:!0})],Wt.prototype,"horizontal",2),c([ee("checked")],Wt.prototype,"defaultChecked",2),c([p({reflect:!0})],Wt.prototype,"form",2),c([p({type:Boolean,reflect:!0})],Wt.prototype,"required",2),c([p({attribute:"description"})],Wt.prototype,"description",2),c([p()],Wt.prototype,"label",2),c([p({attribute:"label-tooltip"})],Wt.prototype,"labelTooltip",2),c([K("disabled",{waitUntilFirstUpdate:!0})],Wt.prototype,"handleDisabledChange",1),c([K(["checked"],{waitUntilFirstUpdate:!0})],Wt.prototype,"handleStateChange",1);var lA=Wt;Wt.define("zn-radio");var qw=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{--symbol-color:rgb(var(--zn-border-color));--symbol-color-active:var(--zn-color-amber-400);--symbol-size:1.2rem;--symbol-spacing:4px;display:block}.rating{position:relative;display:inline-flex;border-radius:var(--zn-border-radius);vertical-align:middle}.rating:focus{outline:none}.rating:focus-visible{outline:rgb(var(--zn-primary));outline-offset:2px}.rating__symbols{display:inline-flex;position:relative;font-size:var(--symbol-size);line-height:0;color:var(--symbol-color);white-space:nowrap;cursor:pointer}.rating__symbols>*{padding:var(--symbol-spacing)}.rating__symbol--active,.rating__partial--filled{color:var(--symbol-color-active)}.rating__partial-symbol-container{position:relative}.rating__partial--filled{position:absolute;top:var(--symbol-spacing);left:var(--symbol-spacing)}.rating__symbol{transition:var(--zn-transition-fast) scale;pointer-events:none}.rating__symbol--hover{scale:1.2}.rating--disabled .rating__symbols,.rating--readonly .rating__symbols{cursor:default}.rating--disabled .rating__symbol--hover,.rating--readonly .rating__symbol--hover{scale:none}.rating--disabled{opacity:0.5}.rating--disabled .rating__symbols{cursor:not-allowed}.rating--small{--symbol-size:1rem;--symbol-spacing:2px}.rating--medium{--symbol-size:1.2rem}.rating--large{--symbol-size:1.5rem;--symbol-spacing:6px}`;var
|
|
3434
|
+
`}};Wt.styles=E(Lw),Wt.dependencies={"zn-icon":ct},c([F('input[type="radio"]')],Wt.prototype,"input",2),c([O()],Wt.prototype,"hasFocus",2),c([p()],Wt.prototype,"title",2),c([p()],Wt.prototype,"name",2),c([p()],Wt.prototype,"value",2),c([p({reflect:!0})],Wt.prototype,"size",2),c([p({type:Boolean,reflect:!0})],Wt.prototype,"disabled",2),c([p({type:Boolean,reflect:!0})],Wt.prototype,"checked",2),c([p({type:Boolean,reflect:!0})],Wt.prototype,"contained",2),c([p({type:Boolean,reflect:!0})],Wt.prototype,"horizontal",2),c([ee("checked")],Wt.prototype,"defaultChecked",2),c([p({reflect:!0})],Wt.prototype,"form",2),c([p({type:Boolean,reflect:!0})],Wt.prototype,"required",2),c([p({attribute:"description"})],Wt.prototype,"description",2),c([p()],Wt.prototype,"label",2),c([p({attribute:"label-tooltip"})],Wt.prototype,"labelTooltip",2),c([K("disabled",{waitUntilFirstUpdate:!0})],Wt.prototype,"handleDisabledChange",1),c([K(["checked"],{waitUntilFirstUpdate:!0})],Wt.prototype,"handleStateChange",1);var lA=Wt;Wt.define("zn-radio");var qw=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{--symbol-color:rgb(var(--zn-border-color));--symbol-color-active:var(--zn-color-amber-400);--symbol-size:1.2rem;--symbol-spacing:4px;display:block}.rating{position:relative;display:inline-flex;border-radius:var(--zn-border-radius);vertical-align:middle}.rating:focus{outline:none}.rating:focus-visible{outline:rgb(var(--zn-primary));outline-offset:2px}.rating__symbols{display:inline-flex;position:relative;font-size:var(--symbol-size);line-height:0;color:var(--symbol-color);white-space:nowrap;cursor:pointer}.rating__symbols>*{padding:var(--symbol-spacing)}.rating__symbol--active,.rating__partial--filled{color:var(--symbol-color-active)}.rating__partial-symbol-container{position:relative}.rating__partial--filled{position:absolute;top:var(--symbol-spacing);left:var(--symbol-spacing)}.rating__symbol{transition:var(--zn-transition-fast) scale;pointer-events:none}.rating__symbol--hover{scale:1.2}.rating--disabled .rating__symbols,.rating--readonly .rating__symbols{cursor:default}.rating--disabled .rating__symbol--hover,.rating--readonly .rating__symbol--hover{scale:none}.rating--disabled{opacity:0.5}.rating--disabled .rating__symbols{cursor:not-allowed}.rating--small{--symbol-size:1rem;--symbol-spacing:2px}.rating--medium{--symbol-size:1.2rem}.rating--large{--symbol-size:1.5rem;--symbol-spacing:6px}`;var Ve=class extends C{constructor(){super(...arguments);this.formControlController=new ot(this,{assumeInteractionOn:["zn-blur","zn-input"]});this.hoverValue=0;this.isHovering=!1;this.value=0;this.max=5;this.precision=1;this.readonly=!1;this.disabled=!1;this.size="medium";this.getSymbol=()=>'<zn-icon src="star" library="material"></zn-icon>'}get validity(){return ge}get validationMessage(){return""}checkValidity(){return!0}getForm(){return this.formControlController.getForm()}reportValidity(){return!0}setCustomValidity(){this.formControlController.updateValidity()}_roundToPrecision(t,r){let n=1/r;return Math.ceil(t*n)/n}_getValueFromXCoordinate(t){let{left:r,width:n}=this.rating.getBoundingClientRect(),a=this._roundToPrecision((t-r)/n*this.max,this.precision);return Math.min(Math.max(a,0),this.max)}_getValueFromMousePosition(t){return this._getValueFromXCoordinate(t.clientX)}_getValueFromTouchPosition(t){return this._getValueFromXCoordinate(t.touches[0].clientX)}_setValue(t){this.disabled||this.readonly||(this.value=t===this.value?0:t,this.isHovering=!1)}_handleClick(t){this.readonly||this.disabled||this._setValue(this._getValueFromMousePosition(t))}_handleMouseEnter(t){this.isHovering=!0,this.hoverValue=this._getValueFromMousePosition(t)}_handleMouseMove(t){this.hoverValue=this._getValueFromMousePosition(t)}_handleMouseLeave(){this.isHovering=!1}_handleTouchStart(t){this.isHovering=!0,this.hoverValue=this._getValueFromTouchPosition(t)}_handleTouchMove(t){this.hoverValue=this._getValueFromTouchPosition(t)}_handleTouchEnd(t){this.isHovering=!1,this._setValue(this._getValueFromTouchPosition(t)),t.preventDefault()}render(){let t=Array.from(Array(this.max).keys()),r=0;return this.disabled||this.readonly?r=this.value:r=this.isHovering?this.hoverValue:this.value,u`
|
|
3435
3435
|
<div
|
|
3436
3436
|
part="base"
|
|
3437
3437
|
class="${D({rating:!0,"rating--readonly":this.readonly,"rating--disabled":this.disabled,"rating--small":this.size==="small","rating--medium":this.size==="medium","rating--large":this.size==="large"})}"
|
|
@@ -3457,23 +3457,23 @@ ${va(this.code(o,t))}
|
|
|
3457
3457
|
role="presentation">
|
|
3458
3458
|
<div
|
|
3459
3459
|
style=${_r({clipPath:`inset(0 0 0 ${(r-n)*100}%)`})}>
|
|
3460
|
-
${
|
|
3460
|
+
${Xe(this.getSymbol(n+1))}
|
|
3461
3461
|
</div>
|
|
3462
3462
|
<div
|
|
3463
3463
|
class="rating__partial--filled"
|
|
3464
3464
|
style=${_r({clipPath:`inset(0 ${100-(r-n)*100}% 0 0)`})}>
|
|
3465
|
-
${
|
|
3465
|
+
${Xe(this.getSymbol(n+1))}
|
|
3466
3466
|
</div>
|
|
3467
3467
|
</span>
|
|
3468
3468
|
`:u`
|
|
3469
3469
|
<span
|
|
3470
3470
|
class=${D({rating__symbol:!0,"rating__symbol--hover":this.isHovering&&Math.ceil(r)===n+1,"rating__symbol--active":r>=n+1})}
|
|
3471
3471
|
role="presentation">
|
|
3472
|
-
${
|
|
3472
|
+
${Xe(this.getSymbol(n+1))}
|
|
3473
3473
|
</span>`)}
|
|
3474
3474
|
</span>
|
|
3475
3475
|
</div>
|
|
3476
|
-
`}};
|
|
3476
|
+
`}};Ve.styles=E(qw),c([F(".rating")],Ve.prototype,"rating",2),c([O()],Ve.prototype,"hoverValue",2),c([O()],Ve.prototype,"isHovering",2),c([p()],Ve.prototype,"label",2),c([p()],Ve.prototype,"name",2),c([p({type:Number})],Ve.prototype,"value",2),c([p({type:Number})],Ve.prototype,"max",2),c([p({type:Number})],Ve.prototype,"precision",2),c([p({type:Boolean})],Ve.prototype,"readonly",2),c([p({type:Boolean})],Ve.prototype,"disabled",2),c([p({})],Ve.prototype,"size",2),c([p()],Ve.prototype,"getSymbol",2);var cA=Ve;Ve.define("zn-rating");var Mw=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}.form-control-input{margin:var(--zn-spacing-2x-small) 3px 3px 0}.form-control-input--flush{margin:0}.form-control .form-control__label{display:none}.form-control .form-control__help-text{display:none}.form-control--has-label .form-control__label{display:inline-block;color:var(--zn-input-label-color);font-weight:var(--zn-input-label-font-weight);line-height:var(--zn-input-label-line-height);margin-bottom:var(--zn-spacing-x-small)}.form-control--has-label.form-control--medium .form-control__label{font-size:var(--zn-input-label-font-size-medium)}.form-control--has-label.form-control--large .form-control__label{font-size:var(--zn-input-label-font-size-large)}:host([required]) .form-control--has-label .form-control__label::after{content:var(--zn-input-required-content);margin-inline-start:var(--zn-input-required-content-offset);color:var(--zn-input-required-content-color)}.form-control--has-label.form-control--radio-group .form-control__label,.form-control--has-label.form-control--checkbox-group .form-control__label{margin-bottom:0}.form-control--has-label.form-control--has-label-tooltip .form-control__label{display:inline-flex;align-items:center;gap:var(--zn-spacing-2x-small)}.form-control--has-label.form-control--small .form-control__label{font-size:var(--zn-input-label-font-size-small)}.form-control--label-tooltip{color:var(--zn-color-neutral-700);font-size:var(--zn-font-size-small)}.form-control--label-tooltip zn-icon{--icon-color:var(--zn-color-neutral-700);--icon-size:var(--zn-font-size-small)}.form-control--has-label.form-control--has-context-note{display:flex;justify-content:space-between;flex-wrap:wrap}.form-control__label-context-note{color:var(--zn-input-help-text-color);font-size:var(--zn-font-size-small);margin-bottom:var(--zn-spacing-2x-small)}.form-control--has-label.form-control--has-context-note .form-control-input{width:100%}.form-control--has-help-text .form-control__help-text,.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{display:block;color:var(--zn-input-help-text-color);margin-top:var(--zn-spacing-x-small)}.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{margin-top:0.375rem}.radio--has-selected-content .radio__selected-content,.checkbox--has-selected-content .checkbox__selected-content{display:block;margin-top:var(--zn-spacing-small)}.form-control--has-help-text.form-control--small .form-control__help-text{font-size:var(--zn-input-help-text-font-size-small)}.form-control--has-help-text.form-control--medium .form-control__help-text,.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{font-size:var(--zn-input-help-text-font-size-medium)}.form-control--has-help-text.form-control--large .form-control__help-text{font-size:var(--zn-input-help-text-font-size-large)}.form-control--has-help-text.form-control--radio-group .form-control__help-text,.form-control--has-help-text.form-control--checkbox-group .form-control__help-text{margin-top:var(--zn-spacing-medium)}.form-control--has-help-text .switch .form-control__help-text{margin-top:var(--zn-spacing-3x-small)}.form-control--checkbox-contained-wrapper{height:100%}:host{display:block;line-height:var(--zn-line-height-dense)}:host([horizontal]) .form-control-input{display:flex;-moz-column-gap:var(--zn-spacing-2x-large);column-gap:var(--zn-spacing-2x-large)}:host([contained]) .form-control-input{margin-top:var(--zn-spacing-medium)}:host([horizontal][contained]) .form-control-input{margin-top:var(--zn-spacing-medium);display:grid;grid-template-columns:repeat(auto-fit,minmax(152px,1fr));gap:var(--zn-spacing-x-small)}::slotted(zn-radio){margin-top:var(--zn-spacing-medium)}::slotted(zn-radio[horizontal]),::slotted(zn-radio[contained]){margin-top:var(--zn-spacing-small)}::slotted(zn-radio[horizontal][contained]){margin-top:0;height:100%}.form-control{position:relative;border:none;padding:0;margin:0}.form-control__label{padding:0}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}`;var ue=class extends C{constructor(){super(...arguments);this.formControlController=new ot(this);this.hasSlotController=new Q(this,"help-text","label");this.customValidityMessage="";this.errorMessage="";this.defaultValue="";this.label="";this.labelTooltip="";this.helpText="";this.name="";this.value="";this.size="medium";this.horizontal=!1;this.contained=!1;this.form="";this.required=!1}get validity(){let t=this.required&&!this.value;return this.customValidityMessage!==""?Mc:t?Ic:ge}get validationMessage(){let t=this.required&&!this.value;return this.customValidityMessage!==""?this.customValidityMessage:t?this.validationInput.validationMessage:""}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value}firstUpdated(t){super.firstUpdated(t),this.formControlController.updateValidity()}getAllRadios(){return[...this.querySelectorAll("zn-radio")]}handleRadioClick(t){let r=t.target.closest("zn-radio"),n=this.getAllRadios();!r||r.disabled||(this.value=r.value,n.forEach(a=>a.checked=a===r))}handleKeyDown(t){if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(t.key))return;let r=this.getAllRadios().filter(l=>!l.disabled),n=r.find(l=>l.checked)??r[0],a=t.key===" "?0:["ArrowUp","ArrowLeft"].includes(t.key)?-1:1,s=r.indexOf(n)+a;s<0&&(s=r.length-1),s>r.length-1&&(s=0),this.getAllRadios().forEach(l=>{l.checked=!1}),this.value=r[s].value,r[s].checked=!0,r[s].shadowRoot.querySelector("button").focus(),t.preventDefault()}handleLabelClick(){this.focus()}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t)}async syncRadioElements(){let t=this.getAllRadios();await Promise.all(t.map(async r=>{await r.updateComplete,r.checked=r.value===this.value,r.size=this.size,r.horizontal=this.horizontal,r.contained=this.contained})),t.length>0&&!t.some(r=>r.checked)&&t[0].setAttribute("tabindex","0")}syncRadios(){if(customElements.get("zn-radio")){this.syncRadioElements();return}customElements.get("zn-radio")?this.syncRadioElements():customElements.whenDefined("zn-radio").then(()=>this.syncRadios())}updateCheckedRadio(){this.getAllRadios().forEach(r=>r.checked=r.value===this.value),this.formControlController.setValidity(this.validity?.valid)}handleSizeChange(){this.syncRadios()}handleValueChange(){this.hasUpdated&&this.updateCheckedRadio()}checkValidity(){let t=this.required&&!this.value,r=this.customValidityMessage!=="";return t||r?(this.formControlController.emitInvalidEvent(),!1):!0}getForm(){return this.formControlController.getForm()}reportValidity(){let t=this.validity?.valid;return this.errorMessage=this.customValidityMessage||t?"":this.validationInput.validationMessage,this.formControlController.setValidity(t),this.validationInput.hidden=!0,clearTimeout(this.validationTimeout),t||(this.validationInput.hidden=!1,this.validationInput.reportValidity(),this.validationTimeout=setTimeout(()=>this.validationInput.hidden=!0,1e4)),t}setCustomValidity(t=""){this.customValidityMessage=t,this.errorMessage=t,this.validationInput.setCustomValidity(t),this.formControlController.updateValidity()}focus(t){let r=this.getAllRadios(),n=r.find(l=>l.checked),a=r.find(l=>!l.disabled),s=n||a;s&&s.focus(t)}render(){let t=this.hasSlotController.test("label"),r=this.hasSlotController.test("label-tooltip"),n=this.hasSlotController.test("help-text"),a=this.label?!0:!!t,s=this.labelTooltip?!0:r,l=this.helpText?!0:!!n,d=u`
|
|
3477
3477
|
<slot @slotchange=${this.syncRadios} @click=${this.handleRadioClick} @keydown=${this.handleKeyDown}></slot>
|
|
3478
3478
|
`;return u`
|
|
3479
3479
|
<fieldset
|
|
@@ -3523,7 +3523,7 @@ ${va(this.code(o,t))}
|
|
|
3523
3523
|
<slot name="help-text">${this.helpText}</slot>
|
|
3524
3524
|
</div>
|
|
3525
3525
|
</fieldset>
|
|
3526
|
-
`}};ue.styles=E(Mw),c([F("slot:not([name])")],ue.prototype,"defaultSlot",2),c([F(".radio-group__validation-input")],ue.prototype,"validationInput",2),c([O()],ue.prototype,"errorMessage",2),c([O()],ue.prototype,"defaultValue",2),c([p()],ue.prototype,"label",2),c([p({attribute:"label-tooltip"})],ue.prototype,"labelTooltip",2),c([p({attribute:"help-text"})],ue.prototype,"helpText",2),c([p()],ue.prototype,"name",2),c([p({reflect:!0})],ue.prototype,"value",2),c([p({reflect:!0})],ue.prototype,"size",2),c([p({type:Boolean,reflect:!0})],ue.prototype,"horizontal",2),c([p({type:Boolean,reflect:!0})],ue.prototype,"contained",2),c([p({reflect:!0})],ue.prototype,"form",2),c([p({type:Boolean,reflect:!0})],ue.prototype,"required",2),c([K("size",{waitUntilFirstUpdate:!0})],ue.prototype,"handleSizeChange",1),c([K("value")],ue.prototype,"handleValueChange",1);var dA=ue;ue.define("zn-radio-group");var Iw=(i,o,t)=>{let r=new Map;for(let n=o;n<=t;n++)r.set(i[n],n);return r},Di=ae(class extends Xe{constructor(i){if(super(i),i.type!==rr.CHILD)throw Error("repeat() can only be used in text expressions")}dt(i,o,t){let r;t===void 0?t=o:o!==void 0&&(r=o);let n=[],a=[],s=0;for(let l of i)n[s]=r?r(l,s):s,a[s]=t(l,s),s++;return{values:a,keys:n}}render(i,o,t){return this.dt(i,o,t).values}update(i,[o,t,r]){let n=Og(i),{values:a,keys:s}=this.dt(o,t,r);if(!Array.isArray(n))return this.ut=s,a;let l=this.ut??(this.ut=[]),d=[],h,m,f=0,b=n.length-1,g=0,v=a.length-1;for(;f<=b&&g<=v;)if(n[f]===null)f++;else if(n[b]===null)b--;else if(l[f]===s[g])d[g]=ni(n[f],a[g]),f++,g++;else if(l[b]===s[v])d[v]=ni(n[b],a[v]),b--,v--;else if(l[f]===s[v])d[v]=ni(n[f],a[v]),Na(i,d[v+1],n[f]),f++,v--;else if(l[b]===s[g])d[g]=ni(n[b],a[g]),Na(i,n[f],n[b]),b--,g++;else if(h===void 0&&(h=Iw(s,g,v),m=Iw(l,f,b)),h.has(l[f]))if(h.has(l[b])){let x=m.get(s[g]),_=x!==void 0?n[x]:null;if(_===null){let $=Na(i,n[f]);ni($,a[g]),d[g]=$}else d[g]=ni(_,a[g]),Na(i,n[f],_),n[x]=null;g++}else Bc(n[b]),b--;else Bc(n[f]),f++;for(;g<=v;){let x=Na(i,d[v+1]);ni(x,a[g]),d[g++]=x}for(;f<=b;){let x=n[f++];x!==null&&Bc(x)}return this.ut=s,Ra(i,d),ie}});var Dw=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}.form-control-input{margin:var(--zn-spacing-2x-small) 3px 3px 0}.form-control-input--flush{margin:0}.form-control .form-control__label{display:none}.form-control .form-control__help-text{display:none}.form-control--has-label .form-control__label{display:inline-block;color:var(--zn-input-label-color);font-weight:var(--zn-input-label-font-weight);line-height:var(--zn-input-label-line-height);margin-bottom:var(--zn-spacing-x-small)}.form-control--has-label.form-control--medium .form-control__label{font-size:var(--zn-input-label-font-size-medium)}.form-control--has-label.form-control--large .form-control__label{font-size:var(--zn-input-label-font-size-large)}:host([required]) .form-control--has-label .form-control__label::after{content:var(--zn-input-required-content);margin-inline-start:var(--zn-input-required-content-offset);color:var(--zn-input-required-content-color)}.form-control--has-label.form-control--radio-group .form-control__label,.form-control--has-label.form-control--checkbox-group .form-control__label{margin-bottom:0}.form-control--has-label.form-control--has-label-tooltip .form-control__label{display:inline-flex;align-items:center;gap:var(--zn-spacing-2x-small)}.form-control--has-label.form-control--small .form-control__label{font-size:var(--zn-input-label-font-size-small)}.form-control--label-tooltip{color:var(--zn-color-neutral-700);font-size:var(--zn-font-size-small)}.form-control--label-tooltip zn-icon{--icon-color:var(--zn-color-neutral-700);--icon-size:var(--zn-font-size-small)}.form-control--has-label.form-control--has-context-note{display:flex;justify-content:space-between;flex-wrap:wrap}.form-control__label-context-note{color:var(--zn-input-help-text-color);font-size:var(--zn-font-size-small);margin-bottom:var(--zn-spacing-2x-small)}.form-control--has-label.form-control--has-context-note .form-control-input{width:100%}.form-control--has-help-text .form-control__help-text,.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{display:block;color:var(--zn-input-help-text-color);margin-top:var(--zn-spacing-x-small)}.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{margin-top:0.375rem}.radio--has-selected-content .radio__selected-content,.checkbox--has-selected-content .checkbox__selected-content{display:block;margin-top:var(--zn-spacing-small)}.form-control--has-help-text.form-control--small .form-control__help-text{font-size:var(--zn-input-help-text-font-size-small)}.form-control--has-help-text.form-control--medium .form-control__help-text,.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{font-size:var(--zn-input-help-text-font-size-medium)}.form-control--has-help-text.form-control--large .form-control__help-text{font-size:var(--zn-input-help-text-font-size-large)}.form-control--has-help-text.form-control--radio-group .form-control__help-text,.form-control--has-help-text.form-control--checkbox-group .form-control__help-text{margin-top:var(--zn-spacing-medium)}.form-control--has-help-text .switch .form-control__help-text{margin-top:var(--zn-spacing-3x-small)}.form-control--checkbox-contained-wrapper{height:100%}:host{display:block}.input__control{border:0;clip-path:inset(50%);height:1px;margin:0;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.form-control--droparea .input__control{left:50%}.form-control-input{position:relative}.button__wrapper{align-items:center;display:flex;gap:var(--zn-input-spacing-medium)}.form-control--small .button__wrapper{gap:var(--zn-input-spacing-small)}:host([size=large]) .button__wrapper{gap:var(--zn-input-spacing-large)}.input__value{display:inline-flex;justify-content:center;align-items:center;gap:var(--zn-spacing-small);color:var(--zn-input-color);font-size:var(--zn-input-label-font-size-medium)}.input__value.input__value--hidden{display:none}.input__delete{cursor:pointer;color:var(--zn-input-color);font-size:var(--zn-input-label-font-size-medium)}.input__delete:hover{color:var(--zn-color-primary-600)}.input__value--placeholder{color:var(--zn-input-help-text-color)}.form-control--small .input__value{font-size:var(--zn-input-label-font-size-small)}.form-control--large .input__value{font-size:var(--zn-input-label-font-size-large)}.form-control--user-dragging:not([disabled]) .button::part(base){background:none;border-color:var(--zn-color-primary-900);color:var(--zn-color-primary-900)}.droparea{--highlight-color:var(--zn-color-primary-600);position:relative;border:1px solid var(--zn-input-border-color);border-radius:var(--zn-border-radius);font:var(--zn-font-size-medium);min-height:180px;transition:var(--zn-transition-medium) background,var(--zn-transition-medium) border-color}.droparea:focus-visible{border-color:var(--zn-color-primary-600);outline:var(--zn-focus-ring);outline-offset:var(--zn-focus-ring-offset)}:host([disabled]) .droparea{--highlight-color:var(--zn-color-neutral-600)}:host([disabled]) .input__value{display:none}.droparea__background{align-items:center;display:flex;justify-content:center;gap:var(--zn-spacing-x-small);padding:var(--zn-spacing-large) var(--zn-spacing-medium);width:100%;height:100%;min-height:inherit;box-sizing:border-box}.droparea__clear{position:absolute;top:var(--zn-spacing-small);right:var(--zn-spacing-small);z-index:1}.droparea__upload{text-transform:uppercase;letter-spacing:0.02em}.droparea--has-preview .droparea__background{--zn-droparea-checker-size:12px;--zn-droparea-checker-a:var(--zn-color-neutral-50);--zn-droparea-checker-b:var(--zn-color-neutral-100);background-color:var(--zn-droparea-checker-a);background-image:linear-gradient(45deg,var(--zn-droparea-checker-b) 25%,transparent 25%),linear-gradient(-45deg,var(--zn-droparea-checker-b) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--zn-droparea-checker-b) 75%),linear-gradient(-45deg,transparent 75%,var(--zn-droparea-checker-b) 75%);background-size:var(--zn-droparea-checker-size) var(--zn-droparea-checker-size);background-position:0 0,0 calc(var(--zn-droparea-checker-size) / 2),calc(var(--zn-droparea-checker-size) / 2) calc(var(--zn-droparea-checker-size) / -2),calc(var(--zn-droparea-checker-size) / -2) 0;border-radius:calc(var(--zn-border-radius) - 1px)}.droparea__preview{display:block;position:relative;z-index:1;width:100%;height:150px;max-width:100%;-o-object-fit:contain;object-fit:contain;overflow:hidden;overflow-wrap:anywhere;word-break:break-word;text-align:center;font-size:var(--zn-input-help-text-font-size-medium);color:var(--zn-input-color)}.droparea__filename{color:var(--zn-input-color);font-size:var(--zn-input-label-font-size-medium);font-weight:var(--zn-font-weight-medium);word-break:break-all;text-align:center;padding:0 var(--zn-spacing-3x-large)}.file-wrapper{display:flex;flex-direction:row;flex-wrap:wrap}.form-control--small .droparea{font:var(--zn-font-size-small);min-height:140px}.form-control--small .droparea__preview{height:110px}.form-control--large .droparea{font:var(--zn-font-size-large);min-height:220px}.form-control--large .droparea__preview{height:190px}:host([disabled]) .droparea,:host([disabled]) .input__value{cursor:not-allowed;opacity:0.5}:host(:not([disabled])) .form-control--user-dragging .droparea{background:var(--zn-color-primary-50);border-color:var(--zn-color-primary-600);cursor:pointer}:host(:not([disabled])) .droparea:not(:focus-visible):hover{--highlight-color:var(--zn-color-primary-800);border-color:var(--zn-color-primary-700);cursor:pointer}:host(:not([disabled])) .droparea:hover .droparea__upload::part(base),:host(:not([disabled])) .droparea__upload:hover::part(base),:host(:not([disabled])) .form-control--user-dragging .droparea__upload::part(base){background:var(--zn-color-primary-50);border-color:var(--zn-color-primary-700);color:var(--zn-color-primary-800)}.droparea__upload::part(icon){pointer-events:none}:host([data-user-invalid]:not([disabled])) .droparea{border-color:var(--zn-color-error)}.clear-confirm__text{margin:0;color:var(--zn-input-color)}.form-control__link{display:inline-block;margin-top:var(--zn-spacing-x-small);font-size:var(--zn-input-help-text-font-size-medium);color:var(--zn-color-primary-700);word-break:break-all;text-decoration:none;max-width:100%}.form-control__link:hover{color:var(--zn-color-primary-800);text-decoration:underline}`;var ft=class extends C{constructor(){super(...arguments);this.formControlController=new ot(this,{assumeInteractionOn:["zn-change"],value:t=>t.uploadUrl?t.src?t.src:t.clearedByUser?"":void 0:t.files?.length?t.files:t.clearedByUser?"":void 0});this.clearedByUser=!1;this.hasSlotController=new Q(this,"help-text","label");this.localize=new Ze(this);this.userIsDragging=!1;this.fileObjectUrl=null;this.name="";this.defaultValue="";this.size="medium";this.label="";this.clearable=!1;this.helpText="";this.disabled=!1;this.droparea=!1;this.accept="";this.multiple=!1;this.webkitdirectory=!1;this.form="";this.required=!1;this.hideValue=!1;this.src="";this.triggerSubmit=!1;this.showLink=!1;this.uploadUrl="";this.uploading=!1;this.handleInvalid=t=>{this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t)};this.handleDragOver=t=>{t.preventDefault(),t.stopPropagation(),this.userIsDragging=!0};this.handleDragLeave=t=>{t.preventDefault(),t.stopPropagation(),this.userIsDragging=!1};this.handleDrop=async t=>{if(t.preventDefault(),t.stopPropagation(),!t.dataTransfer)return;let r=await this.handleTransferItems(t.dataTransfer.items);if(this.userIsDragging=!1,!r)return;if(!this.multiple&&!this.webkitdirectory&&r.length>1){this.emit("zn-error");return}if(this.hasSlotController.test("trigger"))this.handleFiles(r);else{let a=this.inputChosen,s=this.dropareaIcon;if(this.droparea&&s){let l=pn(s,"file.iconDrop",{dir:this.localize.dir()});cn(s,l.keyframes,l.options)}if(a){let l=pn(a,"file.text.disappear",{dir:this.localize.dir()});await cn(a,l.keyframes,l.options)}if(this.handleFiles(r),a){let l=pn(a,"file.text.appear",{dir:this.localize.dir()});await cn(a,l.keyframes,l.options)}}this.input.dispatchEvent(new Event("change"))};this.removeFile=t=>{t.preventDefault(),t.stopPropagation();let r=Array.from(this.files||[]),n=t.target.parentElement?.getAttribute("data-file-name"),a=r.findIndex(l=>l.name===n);a!==-1&&r.splice(a,1);let s=new DataTransfer;r.forEach(l=>s.items.add(l)),this.files=s.files,s.files.length||(this.clearedByUser=!0),this.input.dispatchEvent(new Event("change"))};this.handleClearClick=t=>{t.preventDefault(),t.stopPropagation(),this.clearConfirmDialog?.show()};this.confirmClear=()=>{let t=(this.files?.length??0)>0;this.input.value="",this.files=null,t||(this.src=""),this.clearedByUser=!0,this.clearConfirmDialog?.hide(),this.input.dispatchEvent(new Event("change")),this.emit("zn-clear")}}set files(t){this.input&&(this.input.files=t,t?.length&&(this.clearedByUser=!1),this.updatePreview())}get files(){return this.input?.files}set value(t){if(this.uploadUrl){this.src=t??"";return}this.input&&(this.input.value=t)}get value(){return this.uploadUrl?this.src??"":this.input?.value}get validity(){return this.input?.validity}get validationMessage(){return this.input.validationMessage}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity()}focus(t){if(this.droparea){this.dropareaWrapper?.focus(t);return}this.button?.focus(t)}blur(){if(this.droparea){this.dropareaWrapper?.blur();return}this.button?.blur()}handleFiles(t){if(!t){this.value="";return}this.files=t}async handleTransferItems(t){if(!t)return this.value="",new Promise((d,h)=>{h(new Error("No proper items found"))});let n=Array.from(t).map(d=>d.webkitGetAsEntry()).map(d=>this.getFilesFromEntry(d)),s=(await Promise.all(n)).flat(),l=new DataTransfer;return Array.from(s).forEach(d=>l.items.add(d)),l.files}async getFilesFromEntry(t){return t?t.isFile?new Promise((r,n)=>{t.file(a=>r([a]),n)}):t.isDirectory?new Promise((r,n)=>{t.createReader().readEntries(s=>{Promise.all(s.map(l=>this.getFilesFromEntry(l))).then(l=>{r(l.flat())}).catch(n)})}):[]:[]}handleClick(t){t.preventDefault(),this.input.click()}handleChange(t){t.preventDefault(),t.stopPropagation(),this.updatePreview();let r=this.files?.[0];if(this.uploadUrl&&r){this.uploadFile(r);return}this.emit("zn-input"),this.emit("zn-change"),this.triggerSubmit&&this.formControlController.submit()}async uploadFile(t){this.uploading=!0;try{let r=new FormData;r.append("file",t,t.name);let n=await fetch(this.uploadUrl,{method:"POST",body:r,credentials:"same-origin"});if(!n.ok)throw new Error(`upload failed with status ${n.status}`);let a=await n.json();if(!a.url)throw new Error("upload response missing url");this.src=a.url,this.input.value="",this.files=null,this.clearedByUser=!1,this.emit("zn-input"),this.emit("zn-change"),this.triggerSubmit&&this.formControlController.submit()}catch(r){console.warn("<zn-file> upload failed",r),this.input.value="",this.files=null,this.emit("zn-error")}finally{this.uploading=!1}}handleFocus(){this.emit("zn-focus")}handleBlur(){this.emit("zn-blur")}clear(){this.input&&(this.input.value=""),this.files=null,this.src="",this.updatePreview(),this.formControlController.updateValidity()}updatePreview(){this.fileObjectUrl&&(URL.revokeObjectURL(this.fileObjectUrl),this.fileObjectUrl=null);let t=this.files?.[0];t&&t.type.startsWith("image/")&&(this.fileObjectUrl=URL.createObjectURL(t))}get previewSrc(){return this.fileObjectUrl??this.src??""}disconnectedCallback(){super.disconnectedCallback(),this.fileObjectUrl&&(URL.revokeObjectURL(this.fileObjectUrl),this.fileObjectUrl=null)}renderFileValueWithDelete(){let t=Array.from(this.files||[]),r=this.clearable,n=this.localize.term("numFilesSelected",0,this.webkitdirectory);return u`
|
|
3526
|
+
`}};ue.styles=E(Mw),c([F("slot:not([name])")],ue.prototype,"defaultSlot",2),c([F(".radio-group__validation-input")],ue.prototype,"validationInput",2),c([O()],ue.prototype,"errorMessage",2),c([O()],ue.prototype,"defaultValue",2),c([p()],ue.prototype,"label",2),c([p({attribute:"label-tooltip"})],ue.prototype,"labelTooltip",2),c([p({attribute:"help-text"})],ue.prototype,"helpText",2),c([p()],ue.prototype,"name",2),c([p({reflect:!0})],ue.prototype,"value",2),c([p({reflect:!0})],ue.prototype,"size",2),c([p({type:Boolean,reflect:!0})],ue.prototype,"horizontal",2),c([p({type:Boolean,reflect:!0})],ue.prototype,"contained",2),c([p({reflect:!0})],ue.prototype,"form",2),c([p({type:Boolean,reflect:!0})],ue.prototype,"required",2),c([K("size",{waitUntilFirstUpdate:!0})],ue.prototype,"handleSizeChange",1),c([K("value")],ue.prototype,"handleValueChange",1);var dA=ue;ue.define("zn-radio-group");var Iw=(i,o,t)=>{let r=new Map;for(let n=o;n<=t;n++)r.set(i[n],n);return r},Di=ae(class extends Ye{constructor(i){if(super(i),i.type!==rr.CHILD)throw Error("repeat() can only be used in text expressions")}dt(i,o,t){let r;t===void 0?t=o:o!==void 0&&(r=o);let n=[],a=[],s=0;for(let l of i)n[s]=r?r(l,s):s,a[s]=t(l,s),s++;return{values:a,keys:n}}render(i,o,t){return this.dt(i,o,t).values}update(i,[o,t,r]){let n=Og(i),{values:a,keys:s}=this.dt(o,t,r);if(!Array.isArray(n))return this.ut=s,a;let l=this.ut??(this.ut=[]),d=[],h,m,f=0,b=n.length-1,g=0,v=a.length-1;for(;f<=b&&g<=v;)if(n[f]===null)f++;else if(n[b]===null)b--;else if(l[f]===s[g])d[g]=ni(n[f],a[g]),f++,g++;else if(l[b]===s[v])d[v]=ni(n[b],a[v]),b--,v--;else if(l[f]===s[v])d[v]=ni(n[f],a[v]),Na(i,d[v+1],n[f]),f++,v--;else if(l[b]===s[g])d[g]=ni(n[b],a[g]),Na(i,n[f],n[b]),b--,g++;else if(h===void 0&&(h=Iw(s,g,v),m=Iw(l,f,b)),h.has(l[f]))if(h.has(l[b])){let x=m.get(s[g]),_=x!==void 0?n[x]:null;if(_===null){let $=Na(i,n[f]);ni($,a[g]),d[g]=$}else d[g]=ni(_,a[g]),Na(i,n[f],_),n[x]=null;g++}else Bc(n[b]),b--;else Bc(n[f]),f++;for(;g<=v;){let x=Na(i,d[v+1]);ni(x,a[g]),d[g++]=x}for(;f<=b;){let x=n[f++];x!==null&&Bc(x)}return this.ut=s,Ra(i,d),ie}});var Dw=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}.form-control-input{margin:var(--zn-spacing-2x-small) 3px 3px 0}.form-control-input--flush{margin:0}.form-control .form-control__label{display:none}.form-control .form-control__help-text{display:none}.form-control--has-label .form-control__label{display:inline-block;color:var(--zn-input-label-color);font-weight:var(--zn-input-label-font-weight);line-height:var(--zn-input-label-line-height);margin-bottom:var(--zn-spacing-x-small)}.form-control--has-label.form-control--medium .form-control__label{font-size:var(--zn-input-label-font-size-medium)}.form-control--has-label.form-control--large .form-control__label{font-size:var(--zn-input-label-font-size-large)}:host([required]) .form-control--has-label .form-control__label::after{content:var(--zn-input-required-content);margin-inline-start:var(--zn-input-required-content-offset);color:var(--zn-input-required-content-color)}.form-control--has-label.form-control--radio-group .form-control__label,.form-control--has-label.form-control--checkbox-group .form-control__label{margin-bottom:0}.form-control--has-label.form-control--has-label-tooltip .form-control__label{display:inline-flex;align-items:center;gap:var(--zn-spacing-2x-small)}.form-control--has-label.form-control--small .form-control__label{font-size:var(--zn-input-label-font-size-small)}.form-control--label-tooltip{color:var(--zn-color-neutral-700);font-size:var(--zn-font-size-small)}.form-control--label-tooltip zn-icon{--icon-color:var(--zn-color-neutral-700);--icon-size:var(--zn-font-size-small)}.form-control--has-label.form-control--has-context-note{display:flex;justify-content:space-between;flex-wrap:wrap}.form-control__label-context-note{color:var(--zn-input-help-text-color);font-size:var(--zn-font-size-small);margin-bottom:var(--zn-spacing-2x-small)}.form-control--has-label.form-control--has-context-note .form-control-input{width:100%}.form-control--has-help-text .form-control__help-text,.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{display:block;color:var(--zn-input-help-text-color);margin-top:var(--zn-spacing-x-small)}.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{margin-top:0.375rem}.radio--has-selected-content .radio__selected-content,.checkbox--has-selected-content .checkbox__selected-content{display:block;margin-top:var(--zn-spacing-small)}.form-control--has-help-text.form-control--small .form-control__help-text{font-size:var(--zn-input-help-text-font-size-small)}.form-control--has-help-text.form-control--medium .form-control__help-text,.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{font-size:var(--zn-input-help-text-font-size-medium)}.form-control--has-help-text.form-control--large .form-control__help-text{font-size:var(--zn-input-help-text-font-size-large)}.form-control--has-help-text.form-control--radio-group .form-control__help-text,.form-control--has-help-text.form-control--checkbox-group .form-control__help-text{margin-top:var(--zn-spacing-medium)}.form-control--has-help-text .switch .form-control__help-text{margin-top:var(--zn-spacing-3x-small)}.form-control--checkbox-contained-wrapper{height:100%}:host{display:block}.input__control{border:0;clip-path:inset(50%);height:1px;margin:0;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.form-control--droparea .input__control{left:50%}.form-control-input{position:relative}.button__wrapper{align-items:center;display:flex;gap:var(--zn-input-spacing-medium)}.form-control--small .button__wrapper{gap:var(--zn-input-spacing-small)}:host([size=large]) .button__wrapper{gap:var(--zn-input-spacing-large)}.input__value{display:inline-flex;justify-content:center;align-items:center;gap:var(--zn-spacing-small);color:var(--zn-input-color);font-size:var(--zn-input-label-font-size-medium)}.input__value.input__value--hidden{display:none}.input__delete{cursor:pointer;color:var(--zn-input-color);font-size:var(--zn-input-label-font-size-medium)}.input__delete:hover{color:var(--zn-color-primary-600)}.input__value--placeholder{color:var(--zn-input-help-text-color)}.form-control--small .input__value{font-size:var(--zn-input-label-font-size-small)}.form-control--large .input__value{font-size:var(--zn-input-label-font-size-large)}.form-control--user-dragging:not([disabled]) .button::part(base){background:none;border-color:var(--zn-color-primary-900);color:var(--zn-color-primary-900)}.droparea{--highlight-color:var(--zn-color-primary-600);position:relative;border:1px solid var(--zn-input-border-color);border-radius:var(--zn-border-radius);font:var(--zn-font-size-medium);min-height:180px;transition:var(--zn-transition-medium) background,var(--zn-transition-medium) border-color}.droparea:focus-visible{border-color:var(--zn-color-primary-600);outline:var(--zn-focus-ring);outline-offset:var(--zn-focus-ring-offset)}:host([disabled]) .droparea{--highlight-color:var(--zn-color-neutral-600)}:host([disabled]) .input__value{display:none}.droparea__background{align-items:center;display:flex;justify-content:center;gap:var(--zn-spacing-x-small);padding:var(--zn-spacing-large) var(--zn-spacing-medium);width:100%;height:100%;min-height:inherit;box-sizing:border-box}.droparea__clear{position:absolute;top:var(--zn-spacing-small);right:var(--zn-spacing-small);z-index:1}.droparea__upload{text-transform:uppercase;letter-spacing:0.02em}.droparea--has-preview .droparea__background{--zn-droparea-checker-size:12px;--zn-droparea-checker-a:var(--zn-color-neutral-50);--zn-droparea-checker-b:var(--zn-color-neutral-100);background-color:var(--zn-droparea-checker-a);background-image:linear-gradient(45deg,var(--zn-droparea-checker-b) 25%,transparent 25%),linear-gradient(-45deg,var(--zn-droparea-checker-b) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--zn-droparea-checker-b) 75%),linear-gradient(-45deg,transparent 75%,var(--zn-droparea-checker-b) 75%);background-size:var(--zn-droparea-checker-size) var(--zn-droparea-checker-size);background-position:0 0,0 calc(var(--zn-droparea-checker-size) / 2),calc(var(--zn-droparea-checker-size) / 2) calc(var(--zn-droparea-checker-size) / -2),calc(var(--zn-droparea-checker-size) / -2) 0;border-radius:calc(var(--zn-border-radius) - 1px)}.droparea__preview{display:block;position:relative;z-index:1;width:100%;height:150px;max-width:100%;-o-object-fit:contain;object-fit:contain;overflow:hidden;overflow-wrap:anywhere;word-break:break-word;text-align:center;font-size:var(--zn-input-help-text-font-size-medium);color:var(--zn-input-color)}.droparea__filename{color:var(--zn-input-color);font-size:var(--zn-input-label-font-size-medium);font-weight:var(--zn-font-weight-medium);word-break:break-all;text-align:center;padding:0 var(--zn-spacing-3x-large)}.file-wrapper{display:flex;flex-direction:row;flex-wrap:wrap}.form-control--small .droparea{font:var(--zn-font-size-small);min-height:140px}.form-control--small .droparea__preview{height:110px}.form-control--large .droparea{font:var(--zn-font-size-large);min-height:220px}.form-control--large .droparea__preview{height:190px}:host([disabled]) .droparea,:host([disabled]) .input__value{cursor:not-allowed;opacity:0.5}:host(:not([disabled])) .form-control--user-dragging .droparea{background:var(--zn-color-primary-50);border-color:var(--zn-color-primary-600);cursor:pointer}:host(:not([disabled])) .droparea:not(:focus-visible):hover{--highlight-color:var(--zn-color-primary-800);border-color:var(--zn-color-primary-700);cursor:pointer}:host(:not([disabled])) .droparea:hover .droparea__upload::part(base),:host(:not([disabled])) .droparea__upload:hover::part(base),:host(:not([disabled])) .form-control--user-dragging .droparea__upload::part(base){background:var(--zn-color-primary-50);border-color:var(--zn-color-primary-700);color:var(--zn-color-primary-800)}.droparea__upload::part(icon){pointer-events:none}:host([data-user-invalid]:not([disabled])) .droparea{border-color:var(--zn-color-error)}.clear-confirm__text{margin:0;color:var(--zn-input-color)}.form-control__link{display:inline-block;margin-top:var(--zn-spacing-x-small);font-size:var(--zn-input-help-text-font-size-medium);color:var(--zn-color-primary-700);word-break:break-all;text-decoration:none;max-width:100%}.form-control__link:hover{color:var(--zn-color-primary-800);text-decoration:underline}`;var ft=class extends C{constructor(){super(...arguments);this.formControlController=new ot(this,{assumeInteractionOn:["zn-change"],value:t=>t.uploadUrl?t.src?t.src:t.clearedByUser?"":void 0:t.files?.length?t.files:t.clearedByUser?"":void 0});this.clearedByUser=!1;this.hasSlotController=new Q(this,"help-text","label");this.localize=new Ze(this);this.userIsDragging=!1;this.fileObjectUrl=null;this.name="";this.defaultValue="";this.size="medium";this.label="";this.clearable=!1;this.helpText="";this.disabled=!1;this.droparea=!1;this.accept="";this.multiple=!1;this.webkitdirectory=!1;this.form="";this.required=!1;this.hideValue=!1;this.src="";this.triggerSubmit=!1;this.showLink=!1;this.uploadUrl="";this.uploading=!1;this.handleInvalid=t=>{this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t)};this.handleDragOver=t=>{t.preventDefault(),t.stopPropagation(),this.userIsDragging=!0};this.handleDragLeave=t=>{t.preventDefault(),t.stopPropagation(),this.userIsDragging=!1};this.handleDrop=async t=>{if(t.preventDefault(),t.stopPropagation(),!t.dataTransfer)return;let r=await this.handleTransferItems(t.dataTransfer.items);if(this.userIsDragging=!1,!r)return;if(!this.multiple&&!this.webkitdirectory&&r.length>1){this.emit("zn-error");return}if(this.hasSlotController.test("trigger"))this.handleFiles(r);else{let a=this.inputChosen,s=this.dropareaIcon;if(this.droparea&&s){let l=pn(s,"file.iconDrop",{dir:this.localize.dir()});cn(s,l.keyframes,l.options)}if(a){let l=pn(a,"file.text.disappear",{dir:this.localize.dir()});await cn(a,l.keyframes,l.options)}if(this.handleFiles(r),a){let l=pn(a,"file.text.appear",{dir:this.localize.dir()});await cn(a,l.keyframes,l.options)}}this.input.dispatchEvent(new Event("change"))};this.removeFile=t=>{t.preventDefault(),t.stopPropagation();let r=Array.from(this.files||[]),n=t.target.parentElement?.getAttribute("data-file-name"),a=r.findIndex(l=>l.name===n);a!==-1&&r.splice(a,1);let s=new DataTransfer;r.forEach(l=>s.items.add(l)),this.files=s.files,s.files.length||(this.clearedByUser=!0),this.input.dispatchEvent(new Event("change"))};this.handleClearClick=t=>{t.preventDefault(),t.stopPropagation(),this.clearConfirmDialog?.show()};this.confirmClear=()=>{let t=(this.files?.length??0)>0;this.input.value="",this.files=null,t||(this.src=""),this.clearedByUser=!0,this.clearConfirmDialog?.hide(),this.input.dispatchEvent(new Event("change")),this.emit("zn-clear")}}set files(t){this.input&&(this.input.files=t,t?.length&&(this.clearedByUser=!1),this.updatePreview())}get files(){return this.input?.files}set value(t){if(this.uploadUrl){this.src=t??"";return}this.input&&(this.input.value=t)}get value(){return this.uploadUrl?this.src??"":this.input?.value}get validity(){return this.input?.validity}get validationMessage(){return this.input.validationMessage}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity()}focus(t){if(this.droparea){this.dropareaWrapper?.focus(t);return}this.button?.focus(t)}blur(){if(this.droparea){this.dropareaWrapper?.blur();return}this.button?.blur()}handleFiles(t){if(!t){this.value="";return}this.files=t}async handleTransferItems(t){if(!t)return this.value="",new Promise((d,h)=>{h(new Error("No proper items found"))});let n=Array.from(t).map(d=>d.webkitGetAsEntry()).map(d=>this.getFilesFromEntry(d)),s=(await Promise.all(n)).flat(),l=new DataTransfer;return Array.from(s).forEach(d=>l.items.add(d)),l.files}async getFilesFromEntry(t){return t?t.isFile?new Promise((r,n)=>{t.file(a=>r([a]),n)}):t.isDirectory?new Promise((r,n)=>{t.createReader().readEntries(s=>{Promise.all(s.map(l=>this.getFilesFromEntry(l))).then(l=>{r(l.flat())}).catch(n)})}):[]:[]}handleClick(t){t.preventDefault(),this.input.click()}handleChange(t){t.preventDefault(),t.stopPropagation(),this.updatePreview();let r=this.files?.[0];if(this.uploadUrl&&r){this.uploadFile(r);return}this.emit("zn-input"),this.emit("zn-change"),this.triggerSubmit&&this.formControlController.submit()}async uploadFile(t){this.uploading=!0;try{let r=new FormData;r.append("file",t,t.name);let n=await fetch(this.uploadUrl,{method:"POST",body:r,credentials:"same-origin"});if(!n.ok)throw new Error(`upload failed with status ${n.status}`);let a=await n.json();if(!a.url)throw new Error("upload response missing url");this.src=a.url,this.input.value="",this.files=null,this.clearedByUser=!1,this.emit("zn-input"),this.emit("zn-change"),this.triggerSubmit&&this.formControlController.submit()}catch(r){console.warn("<zn-file> upload failed",r),this.input.value="",this.files=null,this.emit("zn-error")}finally{this.uploading=!1}}handleFocus(){this.emit("zn-focus")}handleBlur(){this.emit("zn-blur")}clear(){this.input&&(this.input.value=""),this.files=null,this.src="",this.updatePreview(),this.formControlController.updateValidity()}updatePreview(){this.fileObjectUrl&&(URL.revokeObjectURL(this.fileObjectUrl),this.fileObjectUrl=null);let t=this.files?.[0];t&&t.type.startsWith("image/")&&(this.fileObjectUrl=URL.createObjectURL(t))}get previewSrc(){return this.fileObjectUrl??this.src??""}disconnectedCallback(){super.disconnectedCallback(),this.fileObjectUrl&&(URL.revokeObjectURL(this.fileObjectUrl),this.fileObjectUrl=null)}renderFileValueWithDelete(){let t=Array.from(this.files||[]),r=this.clearable,n=this.localize.term("numFilesSelected",0,this.webkitdirectory);return u`
|
|
3527
3527
|
${t?u`
|
|
3528
3528
|
<div class="file_wrapper">
|
|
3529
3529
|
${Di(t,a=>u`
|
|
@@ -3769,7 +3769,7 @@ ${va(this.code(o,t))}
|
|
|
3769
3769
|
slot="prefix">${a.prefix}</span>`:""}
|
|
3770
3770
|
${this.iconOnly?void 0:a.value}
|
|
3771
3771
|
</zn-option>`)}
|
|
3772
|
-
</zn-select>`}_updatePrefix(){if(!this.select||!this.shadowRoot)return;let t=this.shadowRoot.querySelector(".select__icon");if(!(this.iconPosition!=="none"||this.iconOnly)){t&&(t.innerHTML=""),this._updateIconEmptyState();return}this.iconPosition==="none"&&this.iconOnly&&(this.iconPosition="start");let n=this.select.selectedOptions;if(!n||n.length===0){t&&(t.innerHTML=""),this._updateIconEmptyState();return}if(!t)return;let s=n[0].querySelector('[slot="prefix"]');s?(t.innerHTML="",t.appendChild(s.cloneNode(!0))):t.innerHTML="",this._updateIconEmptyState()}_updateIconEmptyState(){if(!this.shadowRoot)return;let t=this.shadowRoot.querySelector(".select__icon");!t||t.innerHTML.trim()===""?this.setAttribute("icon-empty",""):this.removeAttribute("icon-empty")}getPlaceholder(t){return this.value?(Array.isArray(this.value)?this.value.length>0:this.value.length>0)?"":`Choose a ${t.getName}`:`Choose a ${t.getName}`}_observeSelectDisabled(){this.select&&(this._syncDisabledState(),this.selectObserver.observe(this.select))}_syncDisabledState(){this.select&&(this.disabled=this.select.disabled)}_normalizeValue(){this.multiple?typeof this.value=="string"&&(this.value===""?this.value=[]:this.value=this.value.split(",").map(t=>t.trim()).filter(t=>t!=="")):Array.isArray(this.value)&&(this.value=this.value.length>0?this.value[0]:"")}};$t.styles=E(Yw),$t.dependencies={"zn-select":le,"zn-option":
|
|
3772
|
+
</zn-select>`}_updatePrefix(){if(!this.select||!this.shadowRoot)return;let t=this.shadowRoot.querySelector(".select__icon");if(!(this.iconPosition!=="none"||this.iconOnly)){t&&(t.innerHTML=""),this._updateIconEmptyState();return}this.iconPosition==="none"&&this.iconOnly&&(this.iconPosition="start");let n=this.select.selectedOptions;if(!n||n.length===0){t&&(t.innerHTML=""),this._updateIconEmptyState();return}if(!t)return;let s=n[0].querySelector('[slot="prefix"]');s?(t.innerHTML="",t.appendChild(s.cloneNode(!0))):t.innerHTML="",this._updateIconEmptyState()}_updateIconEmptyState(){if(!this.shadowRoot)return;let t=this.shadowRoot.querySelector(".select__icon");!t||t.innerHTML.trim()===""?this.setAttribute("icon-empty",""):this.removeAttribute("icon-empty")}getPlaceholder(t){return this.value?(Array.isArray(this.value)?this.value.length>0:this.value.length>0)?"":`Choose a ${t.getName}`:`Choose a ${t.getName}`}_observeSelectDisabled(){this.select&&(this._syncDisabledState(),this.selectObserver.observe(this.select))}_syncDisabledState(){this.select&&(this.disabled=this.select.disabled)}_normalizeValue(){this.multiple?typeof this.value=="string"&&(this.value===""?this.value=[]:this.value=this.value.split(",").map(t=>t.trim()).filter(t=>t!=="")):Array.isArray(this.value)&&(this.value=this.value.length>0?this.value[0]:"")}};$t.styles=E(Yw),$t.dependencies={"zn-select":le,"zn-option":Ne},c([F("#select")],$t.prototype,"select",2),c([p()],$t.prototype,"name",2),c([p({converter:{fromAttribute:t=>t||"",toAttribute:t=>Array.isArray(t)?t.join(","):t||""}})],$t.prototype,"value",2),c([p()],$t.prototype,"provider",2),c([p({attribute:"icon-position"})],$t.prototype,"iconPosition",2),c([p({attribute:"filter",converter:{fromAttribute:t=>t.split(","),toAttribute:t=>t.join(",")}})],$t.prototype,"filter",2),c([p({reflect:!0})],$t.prototype,"size",2),c([p({type:Boolean})],$t.prototype,"clearable",2),c([p({type:Boolean,attribute:"allow-all"})],$t.prototype,"allowAll",2),c([p({type:Boolean,attribute:"allow-common"})],$t.prototype,"allowCommon",2),c([p()],$t.prototype,"label",2),c([p({attribute:"label-tooltip"})],$t.prototype,"labelTooltip",2),c([p({attribute:"context-note"})],$t.prototype,"contextNote",2),c([p({reflect:!0})],$t.prototype,"placement",2),c([p({attribute:"help-text"})],$t.prototype,"helpText",2),c([p({type:Boolean,reflect:!0})],$t.prototype,"required",2),c([p({type:Boolean,reflect:!0})],$t.prototype,"disabled",2),c([p({attribute:"icon-only",type:Boolean,reflect:!0})],$t.prototype,"iconOnly",2),c([p({type:Boolean})],$t.prototype,"multiple",2),c([p({attribute:"select-first",type:Boolean})],$t.prototype,"selectFirst",2),c([p()],$t.prototype,"distinct",2),c([p()],$t.prototype,"conditional",2),c([K("value",{waitUntilFirstUpdate:!0})],$t.prototype,"handleValueChange",1);var kA=$t;$t.define("zn-data-select");var Xw=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:inline-block}.color-swatch{width:var(--zn-spacing-small);height:var(--zn-spacing-small);display:block;border-radius:var(--zn-border-radius-circle);flex-shrink:0}.color-swatch--red{background-color:var(--zn-color-red-500)}.color-swatch--blue{background-color:var(--zn-color-blue-500)}.color-swatch--orange{background-color:var(--zn-color-orange-500)}.color-swatch--yellow{background-color:var(--zn-color-yellow-400)}.color-swatch--indigo{background-color:var(--zn-color-indigo-500)}.color-swatch--violet{background-color:var(--zn-color-violet-500)}.color-swatch--green{background-color:var(--zn-color-green-500)}.color-swatch--pink{background-color:var(--zn-color-pink-500)}.color-swatch--gray{background-color:var(--zn-color-gray-500)}.color-swatch--empty{border:1px dashed var(--zn-color-neutral-400)}zn-select::part(combobox){width:-moz-fit-content;width:fit-content;padding-inline-end:var(--zn-spacing-2x-small)}zn-select::part(display-input){width:0;min-width:0;color:transparent;caret-color:transparent}zn-select::part(listbox){min-width:-moz-max-content;min-width:max-content;max-height:300px;padding-block:0}.color-swatch[part=swatch]{margin-inline-start:var(--zn-spacing-x-small);margin-inline-end:0}zn-option .color-swatch{margin-inline-end:var(--zn-spacing-x-small)}zn-select::part(clear-button),zn-select::part(expand-icon){margin-inline-start:var(--zn-spacing-2x-small)}zn-select::part(clear-button){margin-inline-start:var(--zn-spacing-x-small)}`;var lr=class extends C{constructor(){super(...arguments);this.value="";this.label="";this.helpText="";this.disabled=!1;this.required=!1;this.clearable=!1;this.formControlController=new ot(this);this.handleInput=t=>{let r=t.target;this.value=r.value??""};this.handleClear=()=>{this.value=""}}get validity(){return this.select.validity}get validationMessage(){return this.select.validationMessage}checkValidity(){return this.select.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.select.reportValidity()}setCustomValidity(t){this.select.setCustomValidity(t)}handleValueChange(){this.formControlController.updateValidity()}render(){return u`
|
|
3773
3773
|
<zn-select id="select"
|
|
3774
3774
|
placement="bottom-start"
|
|
3775
3775
|
label="${this.label}"
|
|
@@ -3789,7 +3789,7 @@ ${va(this.code(o,t))}
|
|
|
3789
3789
|
<div slot="prefix" class="color-swatch color-swatch--${t.toLowerCase()}"></div>
|
|
3790
3790
|
${t}
|
|
3791
3791
|
</zn-option>`)}
|
|
3792
|
-
</zn-select>`}};lr.styles=E(Xw),lr.dependencies={"zn-select":le,"zn-option":
|
|
3792
|
+
</zn-select>`}};lr.styles=E(Xw),lr.dependencies={"zn-select":le,"zn-option":Ne},c([F("#select")],lr.prototype,"select",2),c([p()],lr.prototype,"name",2),c([p()],lr.prototype,"value",2),c([p()],lr.prototype,"label",2),c([p({attribute:"help-text"})],lr.prototype,"helpText",2),c([p({type:Boolean,reflect:!0})],lr.prototype,"disabled",2),c([p({type:Boolean,reflect:!0})],lr.prototype,"required",2),c([p({type:Boolean})],lr.prototype,"clearable",2),c([K("value",{waitUntilFirstUpdate:!0})],lr.prototype,"handleValueChange",1);var CA=lr;lr.define("zn-color-select");var Qw=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;max-width:100%;--menu-gap:var(--zn-spacing-x-small)}.button-menu--no-gap{--menu-gap:0}.button-menu{display:flex;flex-direction:row;justify-content:flex-end;margin:0;min-width:34px;max-width:var(--zn-max-width);gap:var(--menu-gap)}.button-menu--no-padding{padding:0}.button-menu__container{display:flex;flex-direction:row;gap:var(--menu-gap);margin:0;max-width:calc(100% - 34px)}.button-menu zn-button{min-width:34px;flex-shrink:0}`;var Mr=class extends C{constructor(){super(...arguments);this.limit=-1;this.maxLevel=2;this.iconSize=20;this._buttons=[];this._originalButtons=[];this._resizeRafId=0;this.resizeObserver=new Zt(this,{target:null,callback:()=>{this._resizeRafId||(this._resizeRafId=requestAnimationFrame(()=>{this._resizeRafId=0,this.containerWidth=this.offsetWidth}))}})}async firstUpdated(t){super.firstUpdated(t);let r=this.querySelectorAll("zn-button");for(let n of r)await n.updateComplete;this._originalButtons=Array.from(r).map(n=>({button:n,width:Math.max(n.offsetWidth,150)})),this.querySelectorAll("zn-button").forEach(n=>{n.remove()}),this.containerWidth=this.parentNode?this.parentNode.offsetWidth:0,this.maxWidth&&(this.containerWidth=Math.min(this.containerWidth,this.maxWidth))}watchContainerMaxWidth(){this.maxWidth&&(this.containerWidth=Math.min(this.containerWidth,this.maxWidth)),this.calculateVisibleButtons()}connectedCallback(){super.connectedCallback(),this.containerWidth=this.offsetWidth,this.parentNode&&this.resizeObserver.observe(this.parentNode)}calculateVisibleButtons(){let t=this.containerWidth,r=0,n=0,a=0,s=0,l=t;this._buttons=[...this._originalButtons],l-=50,this._buttons.sort((m,f)=>{let b=m.button.hasAttribute("primary")?1:m.button.hasAttribute("secondary")?2:3,g=f.button.hasAttribute("primary")?1:f.button.hasAttribute("secondary")?2:3;return b-g}),this._buttons.forEach(m=>{s++,m.button.hasAttribute("primary")?r++:m.button.hasAttribute("secondary")&&n++,l-m.width>0?(l-=m.width,a++):l=0}),this.maxLevel<2?this.limit=this.limit>0?Math.min(this.limit,r):r:this.maxLevel<3&&(this.limit=this.limit>0?Math.min(this.limit,r+n):r+n),this.limit>-1&&(a=Math.min(a,this.limit));let d=this.shadowRoot?.querySelector(".button-menu__container");d&&(d.innerHTML="");let h=this.shadowRoot?.querySelector("zn-menu");h&&(h.innerHTML=""),this._buttons.forEach((m,f)=>{f<a&&(this.shadowRoot?.querySelector(".button-menu__container")?.appendChild(m.button),(m.button.hasAttribute("primary")||m.button.hasAttribute("secondary"))&&m.button.setAttribute("text",""))}),this.calculateMenuButtons(s,a,this._buttons)}calculateMenuButtons(t,r,n){let a=this.shadowRoot?.querySelector("zn-menu"),s=this.shadowRoot?.querySelector("zn-dropdown");if(a&&s){let d=new Set,h={};s.toggleAttribute("hidden",n.length===0||n.length<=r),r!==n.length&&t>0&&(n.forEach((m,f)=>{if(f>=r){let b=document.createElement("zn-menu-item");b.textContent=this.getButtonLabel(m.button),b.setAttribute("id",m.button.id||`zn-button-menu-item-${f}`),b.setAttribute("role","menuitem");let g=m.button.attributes;for(let _ of Array.from(g))_.name!=="icon"&&_.name!=="category"&&b.setAttribute(_.name,_.value);let v=m.button.getAttribute("icon");if(v){let _=document.createElement("zn-icon");_.setAttribute("src",v);let $=m.button.getAttribute("icon-library");$&&_.setAttribute("library",$),_.setAttribute("size","18"),_.setAttribute("slot","prefix"),b.appendChild(_)}let x=m.button.getAttribute("category")||"default";d.add(x),h[x]||(h[x]=[]),h[x].push(b)}}),d.forEach(m=>{if(m==="default")h[m].forEach(f=>{a.appendChild(f)});else if(h[m].length===1){let f=h[m][0];a.appendChild(f)}else{let f=document.createElement("zn-menu-item");f.innerText=m.charAt(0).toUpperCase()+m.slice(1);let b=document.createElement("zn-menu");b.setAttribute("slot","submenu"),b.setAttribute("variant",a.variant),h[m].forEach(g=>{b.appendChild(g)}),f.appendChild(b),a.appendChild(f)}}))}Rt("zn-confirm",this,"").forEach(d=>{d.updateTriggers()})}getButtonLabel(t){let r=t.shadowRoot?.querySelector('slot[part="label"]');return((r?[...r.assignedNodes({flatten:!0})].map(s=>s.textContent??"").join("").trim():"")||t.content||t.getAttribute("content")||t.caption||t.getAttribute("caption")||t.tooltip||t.getAttribute("tooltip")||t.getAttribute("aria-label")||t.button?.innerText||t.textContent||"").trim()}render(){return u`
|
|
3793
3793
|
<div class="${D({"button-menu":!0,"button-menu--no-padding":this.noPadding,"button-menu--no-gap":this.noGap})}">
|
|
3794
3794
|
<div class="button-menu__container"></div>
|
|
3795
3795
|
<zn-dropdown placement="bottom-end">
|
|
@@ -3923,7 +3923,7 @@ ${va(this.code(o,t))}
|
|
|
3923
3923
|
<zn-button icon="keyboard_arrow_down"></zn-button>
|
|
3924
3924
|
</zn-button-group>
|
|
3925
3925
|
</div>
|
|
3926
|
-
`}checkValidity(){return this._isButton()&&this.button?this.button.checkValidity():!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this._isButton()&&this.button?this.button.reportValidity():!0}setCustomValidity(t){this._isButton()&&(this.button.setCustomValidity(t),this.formControlController.updateValidity())}get validity(){return this._isButton()&&this.button?this.button.validity:ge}get validationMessage(){return this._isButton()&&this.button?this.button.validationMessage:""}_isButton(){return this.type==="submit"||this.type==="button"||this.type==="reset"}};Ir.styles=E(o2),c([p()],Ir.prototype,"caption",2),c([p()],Ir.prototype,"href",2),c([p()],Ir.prototype,"name",2),c([p()],Ir.prototype,"value",2),c([ee()],Ir.prototype,"defaultValue",2),c([p()],Ir.prototype,"type",2),c([F("zn-dropdown")],Ir.prototype,"dropdown",2),c([F("zn-button#trigger-btn")],Ir.prototype,"button",2);var qA=Ir;Ir.define("zn-split-button");var n2=S`@charset "UTF-8";@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}.content-block{background-color:var(--zn-note-background,rgba(var(--zn-panel),var(--zn-panel-opacity)));border-bottom:1px solid rgb(var(--zn-border-color));padding-inline:calc(var(--zn-gutter,0) + var(--zn-base-gap,0))}.content-block-header{display:flex;align-items:center;gap:var(--zn-spacing-small);width:100%;max-width:100%;padding-block:var(--zn-spacing-small);position:relative}.content-block--collapsible .content-block-header{cursor:pointer}.content-block-header__icon{display:flex;align-items:center;flex-shrink:0}.content-block-header__main{display:flex;flex-direction:row;align-items:center;gap:var(--zn-spacing-small);min-width:0;flex-grow:1;overflow:hidden}.content-block-header__caption{font-weight:var(--zn-text-h1-font-weight);font-size:var(--zn-text-h1-font-size);color:rgba(var(--zn-text-panel-title),100%);line-height:var(--zn-icon-size,20px);margin:0;display:flex;align-items:center;gap:var(--zn-spacing-small);flex-shrink:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.content-block-header__subject{flex:1 1 auto;min-width:0;font-size:var(--zn-font-size-medium);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.content-block-header__subject--empty{opacity:0.5}.content-block-header__description{flex:1 1 auto;min-width:0;font-size:var(--zn-font-size-medium);color:rgb(var(--zn-text-muted));overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:none}.content-block-header__attachments{display:inline-flex;align-items:center;gap:var(--zn-spacing-2x-small);font-size:var(--zn-font-size-small);color:rgb(var(--zn-text-muted));flex-shrink:0;margin-left:auto}.content-block-header__actions{display:flex;align-items:center;gap:var(--zn-spacing-small);margin-left:auto;flex-shrink:0}.content-block__attachments{display:none;flex-direction:row;flex-wrap:wrap;align-items:center;gap:var(--zn-spacing-small);padding-block-end:var(--zn-spacing-small)}.content-block__attachments--visible{display:flex}.content-block__attachments ::slotted(zn-chat-message-attachment){min-width:0}.content-block--short zn-sp,.content-block--short .content-block__attachments{display:none}.content-block--short .content-block-header__description{display:block}@container (max-width:599px){.content-block--short .content-block-header__description{display:none}}.text-section{font-family:var(--zn-font-sans);font-size:var(--zn-text-paragraph-font-size);font-weight:var(--zn-text-paragraph-font-weight);line-height:var(--zn-text-paragraph-line-height);color:var(--zn-text-paragraph-color);text-transform:var(--zn-text-paragraph-transform)}.text-section a{font-size:var(--zn-font-size-small);opacity:0.8}.hidden{display:none}ol{counter-reset:list-0 0}@supports (counter-set:none){ol li,ul li{counter-set:list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0}}ol,ul{padding:0;margin:0}li[data-list=checked]>.ql-ui,li[data-list=unchecked]>.ql-ui{color:#777}li{list-style-type:none;position:relative}ul>li::before{content:"•"}ol>li{counter-increment:list-0}ol>li::before{content:counter(list-0) ". "}li[data-list=checked]::before{content:"☑"}li[data-list=unchecked]::before{content:"☐"}li[data-list=checked]::before,li[data-list=unchecked]::before{color:#777}ol li::before,ul li::before{display:inline-block;margin-left:-1.5em;margin-right:0.3em;text-align:right;white-space:nowrap;width:1.2em}li:has(>.ql-ui)::before{content:none;display:none}`;var
|
|
3926
|
+
`}checkValidity(){return this._isButton()&&this.button?this.button.checkValidity():!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this._isButton()&&this.button?this.button.reportValidity():!0}setCustomValidity(t){this._isButton()&&(this.button.setCustomValidity(t),this.formControlController.updateValidity())}get validity(){return this._isButton()&&this.button?this.button.validity:ge}get validationMessage(){return this._isButton()&&this.button?this.button.validationMessage:""}_isButton(){return this.type==="submit"||this.type==="button"||this.type==="reset"}};Ir.styles=E(o2),c([p()],Ir.prototype,"caption",2),c([p()],Ir.prototype,"href",2),c([p()],Ir.prototype,"name",2),c([p()],Ir.prototype,"value",2),c([ee()],Ir.prototype,"defaultValue",2),c([p()],Ir.prototype,"type",2),c([F("zn-dropdown")],Ir.prototype,"dropdown",2),c([F("zn-button#trigger-btn")],Ir.prototype,"button",2);var qA=Ir;Ir.define("zn-split-button");var n2=S`@charset "UTF-8";@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}.content-block{background-color:var(--zn-note-background,rgba(var(--zn-panel),var(--zn-panel-opacity)));border-bottom:1px solid rgb(var(--zn-border-color));padding-inline:calc(var(--zn-gutter,0) + var(--zn-base-gap,0))}.content-block-header{display:flex;align-items:center;gap:var(--zn-spacing-small);width:100%;max-width:100%;padding-block:var(--zn-spacing-small);position:relative}.content-block--collapsible .content-block-header{cursor:pointer}.content-block-header__icon{display:flex;align-items:center;flex-shrink:0}.content-block-header__main{display:flex;flex-direction:row;align-items:center;gap:var(--zn-spacing-small);min-width:0;flex-grow:1;overflow:hidden}.content-block-header__caption{font-weight:var(--zn-text-h1-font-weight);font-size:var(--zn-text-h1-font-size);color:rgba(var(--zn-text-panel-title),100%);line-height:var(--zn-icon-size,20px);margin:0;display:flex;align-items:center;gap:var(--zn-spacing-small);flex-shrink:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.content-block-header__subject{flex:1 1 auto;min-width:0;font-size:var(--zn-font-size-medium);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.content-block-header__subject--empty{opacity:0.5}.content-block-header__description{flex:1 1 auto;min-width:0;font-size:var(--zn-font-size-medium);color:rgb(var(--zn-text-muted));overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:none}.content-block-header__attachments{display:inline-flex;align-items:center;gap:var(--zn-spacing-2x-small);font-size:var(--zn-font-size-small);color:rgb(var(--zn-text-muted));flex-shrink:0;margin-left:auto}.content-block-header__actions{display:flex;align-items:center;gap:var(--zn-spacing-small);margin-left:auto;flex-shrink:0}.content-block__attachments{display:none;flex-direction:row;flex-wrap:wrap;align-items:center;gap:var(--zn-spacing-small);padding-block-end:var(--zn-spacing-small)}.content-block__attachments--visible{display:flex}.content-block__attachments ::slotted(zn-chat-message-attachment){min-width:0}.content-block--short zn-sp,.content-block--short .content-block__attachments{display:none}.content-block--short .content-block-header__description{display:block}@container (max-width:599px){.content-block--short .content-block-header__description{display:none}}.text-section{font-family:var(--zn-font-sans);font-size:var(--zn-text-paragraph-font-size);font-weight:var(--zn-text-paragraph-font-weight);line-height:var(--zn-text-paragraph-line-height);color:var(--zn-text-paragraph-color);text-transform:var(--zn-text-paragraph-transform)}.text-section a{font-size:var(--zn-font-size-small);opacity:0.8}.hidden{display:none}ol{counter-reset:list-0 0}@supports (counter-set:none){ol li,ul li{counter-set:list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0}}ol,ul{padding:0;margin:0}li[data-list=checked]>.ql-ui,li[data-list=unchecked]>.ql-ui{color:#777}li{list-style-type:none;position:relative}ul>li::before{content:"•"}ol>li{counter-increment:list-0}ol>li::before{content:counter(list-0) ". "}li[data-list=checked]::before{content:"☑"}li[data-list=unchecked]::before{content:"☐"}li[data-list=checked]::before,li[data-list=unchecked]::before{color:#777}ol li::before,ul li::before{display:inline-block;margin-left:-1.5em;margin-right:0.3em;text-align:right;white-space:nowrap;width:1.2em}li:has(>.ql-ui)::before{content:none;display:none}`;var Ue=class extends C{constructor(){super(...arguments);this.time="";this.sender="";this.avatar="";this.subject="";this.subjectPlaceholder="";this.outbound=!1;this.noCollapse=!1;this.short=!1;this.defaultDisplay="text";this.hasSlotController=new Q(this,"text","html");this.attachmentCount=0;this._textRows=[];this._footerObserver=new Lt(this,{target:null,config:{subtree:!0,childList:!0,attributes:!0,attributeFilter:["href","download","caption"]},callback:()=>this._debouncedReplace()});this._replaceDebounce=0}connectedCallback(){super.connectedCallback(),this.iframe.then(t=>{if(t.contentDocument){let r=this.htmlNodes[0];if(r){let n=r?.innerHTML??"";n=n.replace(/ /g," "),n=n.replace(/</g,"<"),n=n.replace(/>/g,">"),n=n.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"");let a="<style>body,html{background-color: #ffffff}img{max-width:100%; max-height: 500px;}</style>";t.srcdoc=a+n}}t.addEventListener("load",()=>{setTimeout(()=>this._resizeIframe(t),50)})})}disconnectedCallback(){this._replaceDebounce&&(clearTimeout(this._replaceDebounce),this._replaceDebounce=0),super.disconnectedCallback()}_collapseContent(t){this.noCollapse||t.composedPath().some(n=>n instanceof HTMLElement&&n.classList.contains("content-block-header__actions"))||(this.short=!this.short,this.requestUpdate(),this.updateComplete.then(()=>{this.short||this.iframe.then(n=>{n&&!n.classList.contains("hidden")&&this._resizeIframe(n)})}))}_toggleText(){let t=this.shadowRoot?.querySelector(".text-content");this.iframe.then(r=>{t&&(r.classList.add("hidden"),t.classList.remove("hidden"))})}_toggleHtml(){let t=this.shadowRoot?.querySelector(".text-content");this.iframe.then(r=>{t&&(r.classList.remove("hidden"),t.classList.add("hidden"),setTimeout(()=>this._resizeIframe(r),0))})}_resizeIframe(t){let r=n=>{let a=n.contentDocument;if(!a)return;n.style.height="auto";let s=a.body,l=a.documentElement,d=[s?.scrollHeight??0,l?.scrollHeight??0,s?.offsetHeight??0,l?.offsetHeight??0],h=Math.max(...d);h>0&&(n.style.height=`${h}px`)};t?r(t):this.iframe.then(n=>{n?.contentDocument&&requestAnimationFrame(()=>r(n))})}handleAttachmentsSlotChange(){this.syncAttachmentCount()}syncAttachmentCount(){let t=this.shadowRoot?.querySelector('slot[name="attachments"]');this.attachmentCount=t?.assignedElements().length??0}firstUpdated(t){super.firstUpdated(t),this.syncAttachmentCount(),Promise.resolve().then(()=>this.syncAttachmentCount());let r=this.shadowRoot?.querySelectorAll(".text-section");r&&r.length>0&&r.forEach(n=>{n.innerHTML=n.innerHTML.replace(/ /g," "),n.innerHTML=n.innerHTML.replace(/<!--[\s\S]*?-->/g,""),n.innerHTML=n.innerHTML.replace(/<\/p><br>/g,"</p>")})}render(){let t=this.getTextSections(),r=this.querySelector(':scope > [slot="footer"]')!==null,n=this.hasSlotController.test("text"),a=this.hasSlotController.test("html"),s=n&&a,l=a&&(!n||this.defaultDisplay==="html");return u`
|
|
3927
3927
|
<div class="${D({"content-block":!0,"content-block--outbound":this.outbound,"content-block--short":this.short,"content-block--collapsible":!this.noCollapse})}">
|
|
3928
3928
|
|
|
3929
3929
|
<div class="content-block-header" @click="${this._collapseContent}">
|
|
@@ -3976,7 +3976,7 @@ ${va(this.code(o,t))}
|
|
|
3976
3976
|
${d.type==="reply"?u`
|
|
3977
3977
|
<div class="toggle-reply" @click="${this.showReply}">...</div>`:""}
|
|
3978
3978
|
<div class=${D({"text-section":!0,"text-section--reply":d.type==="reply","text-section--text":d.type==="text",hidden:d.type==="reply"})}>
|
|
3979
|
-
${d.lines.map(h=>u`${
|
|
3979
|
+
${d.lines.map(h=>u`${h}<br>`)}
|
|
3980
3980
|
</div>
|
|
3981
3981
|
`)}
|
|
3982
3982
|
</div>
|
|
@@ -3992,8 +3992,9 @@ ${va(this.code(o,t))}
|
|
|
3992
3992
|
${r?u`
|
|
3993
3993
|
<slot slot="footer" name="footer" @slotchange="${this._handleSlotChange}"></slot>`:""}
|
|
3994
3994
|
</div>
|
|
3995
|
-
`}truncateText(){let t=this.querySelector('[slot="text"]');if(!t)return"";let r=t.innerText.replace(/<[^>]*>/g,"").trim();return r.length>32?r.substring(0,32)+"...":r}_handleSlotChange(t){let n=t.target.assignedElements({flatten:!0});!n||n.length===0||(n.forEach(a=>this._footerObserver.observe(a)),this._replaceImagePlaceholders(),setTimeout(()=>this._replaceImagePlaceholders(),50))}_debouncedReplace(){this._replaceDebounce&&clearTimeout(this._replaceDebounce),this._replaceDebounce=window.setTimeout(()=>this._replaceImagePlaceholders(),50)}_replaceImagePlaceholders(){let t=this.shadowRoot?.querySelector(".text-content");if(!t){this.updateComplete.then(()=>this._replaceImagePlaceholders());return}let r=this.querySelector(':scope > [slot="footer"]');if(!r)return;let n=Rt("a[href]",r,"");if(n.length===0)return;let a=t.innerHTML,s=new Set(["png","jpg","jpeg","gif","bmp","webp","svg","heic","tiff","tif","avif"]);n.forEach(l=>{let d=new Set,h=l.querySelector("zn-tile"),m=(h?.caption??h?.getAttribute?.("caption")??"").trim();m&&d.add(m);let f=(l.getAttribute("download")||"").trim();f&&d.add(f);let b=l.getAttribute("href")||"";d.forEach(g=>{let v=(g||"").trim();if(!v)return;let x=v.includes("/")?v.split("/").pop():v,_=x.toLowerCase(),$=_.includes(".")?_.split(".").pop():"";if($&&!s.has($))return;let N=x.replace(/"/g,""");a=a.replace(`[image: ${x}]`,()=>`<img src="${b}" alt="${N}" style="max-height: 500px; max-width: 100%">`)})}),t.innerHTML=a}getTextSections(){let t=this.querySelector('[slot="text"]'),r=[];if(t){let a=t.innerText.
|
|
3996
|
-
`)
|
|
3995
|
+
`}truncateText(){let t=this.querySelector('[slot="text"]');if(!t)return"";let r=t.innerText.replace(/<[^>]*>/g,"").trim();return r.length>32?r.substring(0,32)+"...":r}_handleSlotChange(t){let n=t.target.assignedElements({flatten:!0});!n||n.length===0||(n.forEach(a=>this._footerObserver.observe(a)),this._replaceImagePlaceholders(),setTimeout(()=>this._replaceImagePlaceholders(),50))}_debouncedReplace(){this._replaceDebounce&&clearTimeout(this._replaceDebounce),this._replaceDebounce=window.setTimeout(()=>this._replaceImagePlaceholders(),50)}_replaceImagePlaceholders(){let t=this.shadowRoot?.querySelector(".text-content");if(!t){this.updateComplete.then(()=>this._replaceImagePlaceholders());return}let r=this.querySelector(':scope > [slot="footer"]');if(!r)return;let n=Rt("a[href]",r,"");if(n.length===0)return;let a=t.innerHTML,s=new Set(["png","jpg","jpeg","gif","bmp","webp","svg","heic","tiff","tif","avif"]);n.forEach(l=>{let d=new Set,h=l.querySelector("zn-tile"),m=(h?.caption??h?.getAttribute?.("caption")??"").trim();m&&d.add(m);let f=(l.getAttribute("download")||"").trim();f&&d.add(f);let b=l.getAttribute("href")||"";d.forEach(g=>{let v=(g||"").trim();if(!v)return;let x=v.includes("/")?v.split("/").pop():v,_=x.toLowerCase(),$=_.includes(".")?_.split(".").pop():"";if($&&!s.has($))return;let N=x.replace(/"/g,""");a=a.replace(`[image: ${x}]`,()=>`<img src="${b}" alt="${N}" style="max-height: 500px; max-width: 100%">`)})}),t.innerHTML=a}getTextSections(){let t=this.querySelector('[slot="text"]'),r=[];if(t){let a=t.innerText.replace(/<br\s*\/?>/gi,`
|
|
3996
|
+
`).split(`
|
|
3997
|
+
`),s=null,l=!1,d="text",h=a.some(m=>m.startsWith(">"));a.forEach(m=>{let f=m;if((f.startsWith("On")&&f.endsWith("wrote:")||f.startsWith("From:"))&&!h&&(l=!0),f.startsWith("--")&&(l=!1),d=l||f.startsWith(">")?"reply":"text",f.startsWith("Sent from")&&(d="reply"),f.trim()===""&&s==="reply"&&(d="reply"),d==="reply"&&f.startsWith(">")&&(f=f.substring(1).trim()),s===d){if(r.length===0){r.push({lines:[f],type:d}),s=d;return}r[r.length-1].lines.push(f)}else r.push({lines:[f],type:d}),s=d})}return this._textRows=r,this._textRows}showReply(t){let n=t.target.nextElementSibling;n&&n.classList.toggle("hidden")}};Ue.styles=E(n2),c([p()],Ue.prototype,"time",2),c([p()],Ue.prototype,"sender",2),c([p()],Ue.prototype,"avatar",2),c([p()],Ue.prototype,"subject",2),c([p({attribute:"subject-placeholder"})],Ue.prototype,"subjectPlaceholder",2),c([p({type:Boolean,reflect:!0})],Ue.prototype,"outbound",2),c([p({type:Boolean,attribute:"no-collapse"})],Ue.prototype,"noCollapse",2),c([p({type:Boolean,reflect:!0})],Ue.prototype,"short",2),c([p({attribute:"default-display",reflect:!0})],Ue.prototype,"defaultDisplay",2),c([Sg({slot:"html",flatten:!0})],Ue.prototype,"htmlNodes",2),c([Cg("iframe")],Ue.prototype,"iframe",2),c([O()],Ue.prototype,"attachmentCount",2);var MA=Ue;Ue.define("zn-content-block");var i2=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}.filter-wrapper__submit{margin-top:var(--zn-spacing-medium)}`;var Ni=class extends C{constructor(){super(...arguments);this.button="Filter";this.hasSubmitButton=!1;this.handleSubmit=t=>{t.preventDefault();let r=this.closest("zn-data-table");if(r){let n=["zn-input","zn-select","zn-query-builder","zn-data-select","zn-datepicker","input","select","textarea"],a=Array.from(this.querySelectorAll(n.join(","))),s={};a.forEach(l=>{!l.value&&l.hasAttribute("omit-empty")||(s[l.name]=l.value)}),r.requestParams=s,r.refresh()}}}connectedCallback(){super.connectedCallback();let t=this.querySelector("zn-button[submit]");t&&(this.hasSubmitButton=!0,t.addEventListener("click",this.handleSubmit))}renderDefaultButton(){return u`
|
|
3997
3998
|
<zn-button part="search-button"
|
|
3998
3999
|
class="filter-wrapper__submit"
|
|
3999
4000
|
type="submit"
|
|
@@ -4074,7 +4075,7 @@ ${va(this.code(o,t))}
|
|
|
4074
4075
|
<zn-option value="${t.url}">${t.name}</zn-option>
|
|
4075
4076
|
`)}
|
|
4076
4077
|
</zn-select>
|
|
4077
|
-
`}};Ao.styles=E(c2),c([O()],Ao.prototype,"_isPlaying",2),c([p()],Ao.prototype,"value",2),c([p()],Ao.prototype,"label",2),c([p()],Ao.prototype,"placeholder",2),c([p({type:Object})],Ao.prototype,"files",2);var OA=Ao;Ao.define("zn-audio-select");var d2=ae(class extends
|
|
4078
|
+
`}};Ao.styles=E(c2),c([O()],Ao.prototype,"_isPlaying",2),c([p()],Ao.prototype,"value",2),c([p()],Ao.prototype,"label",2),c([p()],Ao.prototype,"placeholder",2),c([p({type:Object})],Ao.prototype,"files",2);var OA=Ao;Ao.define("zn-audio-select");var d2=ae(class extends Ye{constructor(){super(...arguments),this.key=V}render(i,o){return this.key=i,o}update(i,[o,t]){return o!==this.key&&(Ra(i),this.key=o),t}});var p2=S`.form-control-input{margin:var(--zn-spacing-2x-small) 3px 3px 0}.form-control-input--flush{margin:0}.form-control .form-control__label{display:none}.form-control .form-control__help-text{display:none}.form-control--has-label .form-control__label{display:inline-block;color:var(--zn-input-label-color);font-weight:var(--zn-input-label-font-weight);line-height:var(--zn-input-label-line-height);margin-bottom:var(--zn-spacing-x-small)}.form-control--has-label.form-control--medium .form-control__label{font-size:var(--zn-input-label-font-size-medium)}.form-control--has-label.form-control--large .form-control__label{font-size:var(--zn-input-label-font-size-large)}:host([required]) .form-control--has-label .form-control__label::after{content:var(--zn-input-required-content);margin-inline-start:var(--zn-input-required-content-offset);color:var(--zn-input-required-content-color)}.form-control--has-label.form-control--radio-group .form-control__label,.form-control--has-label.form-control--checkbox-group .form-control__label{margin-bottom:0}.form-control--has-label.form-control--has-label-tooltip .form-control__label{display:inline-flex;align-items:center;gap:var(--zn-spacing-2x-small)}.form-control--has-label.form-control--small .form-control__label{font-size:var(--zn-input-label-font-size-small)}.form-control--label-tooltip{color:var(--zn-color-neutral-700);font-size:var(--zn-font-size-small)}.form-control--label-tooltip zn-icon{--icon-color:var(--zn-color-neutral-700);--icon-size:var(--zn-font-size-small)}.form-control--has-label.form-control--has-context-note{display:flex;justify-content:space-between;flex-wrap:wrap}.form-control__label-context-note{color:var(--zn-input-help-text-color);font-size:var(--zn-font-size-small);margin-bottom:var(--zn-spacing-2x-small)}.form-control--has-label.form-control--has-context-note .form-control-input{width:100%}.form-control--has-help-text .form-control__help-text,.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{display:block;color:var(--zn-input-help-text-color);margin-top:var(--zn-spacing-x-small)}.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{margin-top:0.375rem}.radio--has-selected-content .radio__selected-content,.checkbox--has-selected-content .checkbox__selected-content{display:block;margin-top:var(--zn-spacing-small)}.form-control--has-help-text.form-control--small .form-control__help-text{font-size:var(--zn-input-help-text-font-size-small)}.form-control--has-help-text.form-control--medium .form-control__help-text,.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{font-size:var(--zn-input-help-text-font-size-medium)}.form-control--has-help-text.form-control--large .form-control__help-text{font-size:var(--zn-input-help-text-font-size-large)}.form-control--has-help-text.form-control--radio-group .form-control__help-text,.form-control--has-help-text.form-control--checkbox-group .form-control__help-text{margin-top:var(--zn-spacing-medium)}.form-control--has-help-text .switch .form-control__help-text{margin-top:var(--zn-spacing-3x-small)}.form-control--checkbox-contained-wrapper{height:100%}:host{display:block}.translations{padding:var(--zn-spacing-small) var(--zn-spacing-medium)}.translations__header{display:flex;align-items:center;justify-content:space-between;gap:var(--zn-spacing-small);margin-bottom:var(--zn-spacing-2x-small);min-height:var(--zn-input-height-small)}.translations__actions{display:flex;align-items:center;gap:var(--zn-spacing-x-small);margin-left:auto}.translations__body{display:block}.form-control__label{margin-bottom:0 !important;white-space:nowrap}.translations--flush,.translations--grouped{padding:0}.translations--grouped .translations__header{margin-bottom:0}`;var Te=class extends C{constructor(){super();this.formControlController=new ot(this);this.hasSlotController=new Q(this,"label","expand");this.name="";this.value='{"en":""}';this.label="";this.disabled=!1;this.required=!1;this.flush=!1;this.inputType="text";this.grouped=!1;this.languages={en:"EN"};this.values={};this._activeLanguage="en";this._overflowIndex=-1;this._lastObservedWidth=0;this._measureRafId=0;this.handleLanguageAdd=t=>{t.stopPropagation();let n=t.detail.element.getAttribute("data-path");n&&(this.values={...this.values,[n]:""},this._activeLanguage=n,this.updateValue())};this.handleOverflowSelect=t=>{t.stopPropagation();let n=t.detail.element.getAttribute("data-path");n&&this.switchLanguage(n)};this.switchLanguage=t=>{this._activeLanguage=t,this.requestUpdate()};this.handleValueUpdate=t=>{let r=t.target;if(this._activeLanguage){let n=r.value;n!==this.values[this._activeLanguage]&&(this.values={...this.values,[this._activeLanguage]:n},this.updateValue())}};this.handleKeyDown=t=>{if(t.key==="Enter"){if(t.target instanceof cd)return;!(t.altKey||t.ctrlKey||t.metaKey||t.shiftKey)&&!t.defaultPrevented&&!t.isComposing&&this.formControlController.submit()}};this.handleSubmit=()=>{this.formControlController.submit()};new Zt(this,{callback:t=>{let r=t[0]?.contentRect.width??0;Math.abs(r-this._lastObservedWidth)<1||(this._lastObservedWidth=r,this._overflowIndex!==-1?this._overflowIndex=-1:this._scheduleLangOverflow())}})}get validity(){return ge}get validationMessage(){return""}checkValidity(){return!0}getForm(){return this.formControlController.getForm()}reportValidity(){return!0}setCustomValidity(){}setActiveLanguage(t){this.addLanguageKey(t),this._activeLanguage=t,this.requestUpdate()}getActiveLanguage(){return this._activeLanguage}addLanguageKey(t){Object.prototype.hasOwnProperty.call(this.values,t)||(this.values={...this.values,[t]:""},this.updateValue())}getValueLanguages(){return Object.keys(this.values)}disconnectedCallback(){super.disconnectedCallback(),this._measureRafId&&(cancelAnimationFrame(this._measureRafId),this._measureRafId=0)}firstUpdated(){this.formControlController.updateValidity()}updated(t){super.updated(t),this._scheduleLangOverflow()}_scheduleLangOverflow(){this._measureRafId||(this._measureRafId=requestAnimationFrame(()=>{this._measureRafId=0,this._computeLangOverflow()}))}_computeLangOverflow(){let t=this.shadowRoot?.querySelector(".translations__language-group");if(!t)return;let r=Array.from(t.querySelectorAll("zn-button[data-lang-btn]"));if(r.length<2){this._overflowIndex!==-1&&(this._overflowIndex=-1);return}let n=r[0].getBoundingClientRect().top,a=-1;for(let l=1;l<r.length;l++)if(r[l].getBoundingClientRect().top>n+1){a=l;break}if(a===-1){let l=t.querySelector("[data-lang-overflow], [data-lang-add]");l&&l.getBoundingClientRect().top>n+1&&(a=r.length)}if(a===-1)return;let s=this._overflowIndex===-1?a:Math.max(1,Math.min(a,this._overflowIndex-1));s!==this._overflowIndex&&(this._overflowIndex=s)}willUpdate(t){let r=t.has("value"),n=t.has("values");if(r&&n){let a=this.value==='{"en":""}',s=Object.keys(this.values).length===0;a&&!s?r=!1:!a&&s?n=!1:this.hasAttribute("values")&&!this.hasAttribute("value")?r=!1:this.hasAttribute("value")&&!this.hasAttribute("values")&&(n=!1)}if(r)try{let a=JSON.parse(this.value||"{}");JSON.stringify(a)!==JSON.stringify(this.values)&&(this.values=a)}catch{}if(n&&(this.value=JSON.stringify(this.values),!this.grouped&&(!this._activeLanguage||!Object.prototype.hasOwnProperty.call(this.values,this._activeLanguage)&&this._activeLanguage!=="en"))){let a=Object.keys(this.values);a.length>0?this._activeLanguage=a[0]:this._activeLanguage="en"}}updateValue(){this.value=JSON.stringify(this.values),this.emit("zn-change"),this.emit("zn-input")}isRTLLanguage(t){return t.startsWith("ar")||t==="he"||t==="iw"}render(){let t=Object.entries(this.languages).filter(([x])=>x!=="en"&&!Object.prototype.hasOwnProperty.call(this.values,x)).map(([x,_])=>({title:_,type:"dropdown",path:x})),r=Object.keys(this.values);r.includes("en")||r.unshift("en");let n=this._overflowIndex===-1?r.length:this._overflowIndex,a=r.slice(0,n),s=r.slice(n),l=s.map(x=>({title:x.toUpperCase(),type:"dropdown",path:x,icon:x===this._activeLanguage?"check":""})),d=this.values[this._activeLanguage]??"",h=this.isRTLLanguage(this._activeLanguage),m=this.hasSlotController.test("label"),f=this.label?!0:m,b=this.hasSlotController.test("expand"),g=Object.keys(this.languages).length>1,v=!this.grouped&&(g||b);return u`
|
|
4078
4079
|
<div part="form-control"
|
|
4079
4080
|
class="${D({translations:!0,"translations--grouped":this.grouped,"translations--flush":this.flush,"form-control":!0,"form-control--medium":!0,"form-control--has-label":f})}"
|
|
4080
4081
|
@keydown="${this.handleKeyDown}">
|
|
@@ -4167,7 +4168,7 @@ ${va(this.code(o,t))}
|
|
|
4167
4168
|
</div>
|
|
4168
4169
|
`}
|
|
4169
4170
|
</div>
|
|
4170
|
-
`}};Zr.styles=E(u2),c([F('slot[name="keys"]')],Zr.prototype,"keysSlot",2),c([F("slot:not([name])")],Zr.prototype,"defaultSlot",2),c([p()],Zr.prototype,"position",2),c([p()],Zr.prototype,"target",2),c([p({attribute:"item-selector"})],Zr.prototype,"itemSelector",2),c([p({attribute:"filter-attribute"})],Zr.prototype,"filterAttribute",2),c([p({attribute:"no-scroll",type:Boolean})],Zr.prototype,"noScroll",2);var FA=Zr;Zr.define("zn-key-container");var m2=S`:host,html,body{color:rgba(var(--zn-text),var(--zn-text-opacity));font-family:var(--zn-font-family-sans);font-feature-settings:normal;font-variation-settings:normal;font-size:var(--zn-text-paragraph-font-size);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);-moz-tab-size:4;-o-tab-size:4;tab-size:4;margin:0}html,body{background-color:rgba(var(--zn-body),var(--zn-bg-opacity));container-type:size;min-height:100%;height:100%}.inline-container{container-type:inline-size}.app-container{container-type:normal;display:flex;flex:1;flex-direction:column;position:relative;max-height:100%;height:100%;width:100%;max-width:100%}.inline-app-container,.app-container.inline-app-container,[inline-container] .app-container{display:block;height:auto;flex:unset}hr{height:0;border:none;border-top:1px solid rgb(var(--zn-border-color))}code,kbd,samp,pre,.mono{font-family:var(--zn-font-family-mono);font-size:1em}small{font-size:80%}.hidden{display:none !important}.visibility-hidden{visibility:hidden}p{font-size:var(--zn-text-paragraph-font-size);line-height:var(--zn-text-paragraph-line-height);font-weight:var(--zn-text-paragraph-font-weight)}h1,h2,h3,h4,h5,h6{color:rgb(var(--zn-text-heading))}h1{font-size:var(--zn-text-h1-font-size);line-height:var(--zn-text-h1-line-height);font-weight:var(--zn-text-h1-font-weight)}h2{font-size:var(--zn-text-h2-font-size);line-height:var(--zn-text-h2-line-height);font-weight:var(--zn-text-h2-font-weight)}h3,h4,h5,h6{font-size:var(--zn-text-h3-font-size);line-height:var(--zn-text-h3-line-height);font-weight:var(--zn-text-h3-font-weight)}kbd{font-family:monospace;background-color:#eee;color:#333;border:1px solid rgb(var(--zn-border-color));border-radius:3px;box-shadow:0 1px 1px rgba(0,0,0,0.2),0 1px 0 0 rgba(255,255,255,0.5) inset;display:inline-block;font-size:13px;line-height:20px;padding:1px 6px;white-space:nowrap;min-width:15px;color:rgba(0,0,0,0.5)}[t=dark] kbd{background-color:rgb(25,25,25);box-shadow:0 1px 1px rgba(0,0,0,0.2),0 1px 0 0 rgba(110,110,110,0.5) inset;color:#eee}[tab]{cursor:pointer}.zn-link:hover{--zn-text:rgb(var(--zn-primary));--icon-color:rgb(var(--zn-primary));--zn-text-heading:rgb(var(--zn-primary));--property-color:rgb(var(--zn-primary));opacity:1}.grow{flex-grow:1}.no-grow{flex-grow:0}.shrink{flex-shrink:1}.no-shrink{flex-shrink:0}.block{display:block}.flex{display:flex}.flex-wrap{display:flex;flex-wrap:wrap}.flex-col{display:flex;flex-direction:column}.flex-mid{display:flex;align-items:center}.flex-jc{justify-content:center}.flex-between{display:flex;justify-content:space-between}.flex-end{display:flex;justify-content:flex-end}.flex-bottom{display:flex;align-items:flex-end}.equal{flex-basis:50%}.m-auto{margin:auto}.mt-auto{margin-top:auto}.zn-pad{padding:var(--zn-base-gap,0)}.zn-pad-y,.zn-py{padding-top:16px;padding-bottom:16px}.zn-pad-x,.zn-px{padding-left:16px;padding-right:16px}.zn-pr{padding-right:16px}.zn-pl{padding-left:16px}.zn-pt{padding-top:16px}.zn-pb{padding-bottom:16px}.zn-margin{margin:16px}.zn-mx{margin-left:16px;margin-right:16px}.zn-my{margin-top:16px;margin-bottom:16px}.zn-mt{margin-top:16px}.zn-mb{margin-bottom:16px}.zn-ml{margin-left:16px}.zn-mr{margin-right:16px}.zn-mxa{margin-left:auto;margin-right:auto}.zn-mya{margin-top:auto;margin-bottom:auto}.zn-mta{margin-top:auto}.zn-mba{margin-bottom:auto}.zn-mla{margin-left:auto}.zn-mra{margin-right:auto}.rotate-45{transform:rotate(45deg)}.rotate-90{transform:rotate(90deg)}.rotate-180{transform:rotate(180deg)}@keyframes act-vanish{from{transform:scale(1);opacity:1;max-height:100%}to{transform:scale(0.8);opacity:0;max-height:0}}.act-vanish{animation:ease-in act-vanish 600ms forwards;transform-origin:top center;background-color:rgba(var(--zn-color-error),0.3);display:block;overflow:hidden}.h-full{height:100%}.w-full{width:100%}.zn-panel-bg{--zn-page-surface-background:var(--zn-panel);background-color:rgba(var(--zn-panel),var(--zn-panel-opacity))}.zn-panel{background-color:rgba(var(--zn-panel),var(--zn-panel-opacity));border:1px solid rgb(var(--zn-border-color));border-radius:var(--zn-border-radius);--zn-page-surface-background:var(--zn-panel)}.zn-container{display:flex;flex-direction:column;flex-grow:1;max-height:100%;overflow:hidden}.tar{text-align:right}.tal{text-align:left}.tac{text-align:center}.zn-empty-hide:empty{display:none}.ml-auto{margin-left:auto}.zn-b-dash{border-style:dashed}.zn-b-dotted{border-style:dotted}.zn-border{border-style:solid;border-width:1px !important}.zn-bt{border-top-style:solid;border-top-width:1px !important}.zn-bb{border-bottom-style:solid;border-bottom-width:1px !important}.zn-bl{border-left-style:solid;border-left-width:1px !important}.zn-br{border-right-style:solid;border-right-width:1px !important}.unifi-action{display:flex;gap:10px;padding:10px 0;align-items:center}.zn-panel-bar{border-bottom:1px solid rgb(var(--zn-border-color));background-color:rgba(var(--zn-panel),0.9);padding:var(--zn-base-px);gap:var(--zn-base-px);display:flex;flex-wrap:wrap;align-items:center;z-index:1}.zn-panel-bar--pill{border-radius:var(--zn-border-radius);border:1px solid rgb(var(--zn-border-color))}.zn-panel-bar--large{padding:var(--zn-base-px) calc(var(--zn-base-gap) + var(--zn-gutter));gap:var(--zn-base-px);height:50px}.scroll-container{overflow:auto;flex-grow:1;position:relative;display:flex;flex-direction:column;max-height:100%}.zn-divide{display:flex;flex-direction:column}.zn-divide>*:not(:first-child){border-top:1px solid rgb(var(--zn-border-color))}.zn-divide>div:empty+div:not(:first-child){border-top:0}.zn-divide-y{display:flex;flex-direction:row}.zn-divide-y>*:not(:first-child):not(:empty){border-left:1px solid rgb(var(--zn-border-color))}.zn-c-pad{--zn-pad-spacing:var(--zn-spacing-large)}.zn-c-pad-x>*{padding-left:var(--zn-pad-spacing);padding-right:var(--zn-pad-spacing)}.zn-c-pad-y>*:not(:first-child){padding-top:var(--zn-pad-spacing)}.zn-c-pad-y>*:not(:last-child){padding-bottom:var(--zn-pad-spacing)}.zn-nav.zn-transparent{background:transparent}.zn-nav{background:rgba(var(--zn-panel),var(--zn-panel-opacity));border-right:1px solid rgb(var(--zn-border-color));max-width:320px;height:100%;padding-top:5px}.zn-nav ul{list-style:none;padding-bottom:10px;margin:0;display:flex;flex-direction:column;position:relative}.zn-nav ul:after{content:"";height:1px;left:18px;right:18px;bottom:0;position:absolute;background:rgb(var(--zn-border-color))}.zn-nav ul li a{text-decoration:none;color:rgb(var(--zn-text));display:block;font-weight:500;cursor:pointer}.zn-nav ul li a:hover,.zn-nav ul li a.zn-tb-active{background:rgb(var(--zn-body))}.zn-nav ul li a.zn-tb-active{color:rgb(var(--zn-purple-text))}.zn-nav ul:last-child:after{display:none}.zn-nav strong,.zn-nav li a{padding:10px 20px}.zn-nav strong{display:block;margin-top:10px;font-size:13px;letter-spacing:0.93px;color:rgb(var(--zn-text-heading));font-weight:600;padding-bottom:5px;text-transform:uppercase}@keyframes shimmer-text-sweep{0%{background-position:100% center}100%{background-position:0% center}}@media (prefers-reduced-motion:no-preference){.shimmer-text{--shimmer-base:rgb(var(--zn-text));--shimmer-highlight:rgb(var(--zn-text-heading));--shimmer-core:0.5ch;--shimmer-spread:1.5ch;--shimmer-duration:1.5s;display:inline-block;width:-moz-fit-content;width:fit-content;max-width:100%;background-image:linear-gradient(90deg,transparent calc(50% - var(--shimmer-spread)),var(--shimmer-highlight) calc(50% - var(--shimmer-core)),var(--shimmer-highlight) calc(50% + var(--shimmer-core)),transparent calc(50% + var(--shimmer-spread))),linear-gradient(var(--shimmer-base),var(--shimmer-base));background-size:250% 100%,auto;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent !important;color:transparent !important;animation:var(--shimmer-duration) linear infinite shimmer-text-sweep}.shimmer-text.zn-error{--shimmer-base:rgb(var(--zn-color-error));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-error)) 55%,white)}.shimmer-text.zn-success{--shimmer-base:rgb(var(--zn-color-success));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-success)) 55%,white)}.shimmer-text.zn-info{--shimmer-base:rgb(var(--zn-color-info));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-info)) 55%,white)}.shimmer-text.zn-warning{--shimmer-base:rgb(var(--zn-color-warning));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-warning)) 55%,white)}.shimmer-text.zn-primary{--shimmer-base:rgb(var(--zn-primary));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-primary)) 55%,white)}.shimmer-text.zn-accent{--shimmer-base:rgb(var(--zn-accent));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-accent)) 55%,white)}}@media (prefers-reduced-motion:reduce){.shimmer-text{color:rgb(var(--zn-text))}.shimmer-text.zn-error{color:rgb(var(--zn-color-error)) !important}.shimmer-text.zn-success{color:rgb(var(--zn-color-success)) !important}.shimmer-text.zn-info{color:rgb(var(--zn-color-info)) !important}.shimmer-text.zn-warning{color:rgb(var(--zn-color-warning)) !important}.shimmer-text.zn-primary{color:rgb(var(--zn-primary)) !important}.shimmer-text.zn-accent{color:rgb(var(--zn-accent)) !important}}*,*::before,*::after{box-sizing:border-box}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}a{color:inherit;text-decoration:inherit}strong{font-weight:bolder}b{font-weight:600}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:inline-block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}button,.zn-button{border-radius:var(--zn-border-radius);display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:-moz-fit-content;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(255,255,255,0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}button:hover:not([disabled]),.zn-button:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=date],input[type=datetime-local],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],input[type=file],input[list],textarea,select{display:block;width:100%;border-radius:5px;border-style:solid;border-width:1px !important;border-color:rgb(var(--zn-border-color));background-color:rgb(var(--zn-input-bg));outline:none}input[type=date]:focus,input[type=datetime-local]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus,input[type=file]:focus,input[list]:focus,textarea:focus,select:focus{border-color:rgb(var(--zn-primary));box-shadow:0 0 0 3px rgba(var(--zn-primary),0.3)}input[type=date]::-moz-placeholder, input[type=datetime-local]::-moz-placeholder, input[type=email]::-moz-placeholder, input[type=month]::-moz-placeholder, input[type=number]::-moz-placeholder, input[type=password]::-moz-placeholder, input[type=search]::-moz-placeholder, input[type=tel]::-moz-placeholder, input[type=text]::-moz-placeholder, input[type=time]::-moz-placeholder, input[type=url]::-moz-placeholder, input[type=week]::-moz-placeholder, input[type=file]::-moz-placeholder, input[list]::-moz-placeholder, textarea::-moz-placeholder, select::-moz-placeholder{font-weight:400;color:rgba(var(--zn-text),0.6)}input[type=date]::placeholder,input[type=datetime-local]::placeholder,input[type=email]::placeholder,input[type=month]::placeholder,input[type=number]::placeholder,input[type=password]::placeholder,input[type=search]::placeholder,input[type=tel]::placeholder,input[type=text]::placeholder,input[type=time]::placeholder,input[type=url]::placeholder,input[type=week]::placeholder,input[type=file]::placeholder,input[list]::placeholder,textarea::placeholder,select::placeholder{font-weight:400;color:rgba(var(--zn-text),0.6)}@media (min-width:360px){input[type=date],input[type=datetime-local],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],input[type=file],input[list],textarea,select{padding:8px}}label{font-weight:600;font-size:rgb(var(--zn-font-size-medium));line-height:var(--zn-spacing-medium);color:rgb(var(--zn-text-heading));display:block;margin-bottom:4px;margin-top:16px}input[type=checkbox],input[type=radio]{border-radius:5px}input[type=radio]{border-radius:50%}input[type=range]{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:10px;background-color:rgb(var(--zn-border-color));height:8px;accent-color:rgb(var(--zn-primary));width:100%;max-width:768px}fieldset{border-color:rgba(var(--zn-primary),20%);border-width:2px;padding:0 16px 16px}select option{padding:4px}select>option:checked{background-color:rgba(var(--zn-primary),20%);border-radius:5px}fieldset>legend{padding:4px}input[type=button],input[type=submit],button[type=submit]:not(.button),button[type=button]:not(.button){border-radius:var(--zn-border-radius);display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:-moz-fit-content;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(255,255,255,0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}input[type=button]:hover:not([disabled]),input[type=submit]:hover:not([disabled]),button[type=submit]:not(.button):hover:not([disabled]),button[type=button]:not(.button):hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=button],input[type=submit],button[type=submit]:not(.button),button[type=button]:not(.button){width:auto}div+button{margin-top:16px}input[type=file]::-webkit-file-upload-button{border-radius:var(--zn-border-radius);display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(255,255,255,0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}input[type=file]::-webkit-file-upload-button:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=file]::-webkit-file-upload-button{margin-right:8px}input::-webkit-calendar-picker-indicator{cursor:pointer;padding:8px}input[list]::-webkit-calendar-picker-indicator{padding:8px 4px}.input--with-icon{position:relative}.input--with-icon zn-icon{padding:14px;position:absolute;top:50%;pointer-events:none;transform:translateY(-50%);left:8px;background-color:rgb(var(--zn-primary));color:rgb(var(--zn-text));border-radius:50%}.input--with-icon input{padding-left:40px}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-background-clip:text;-webkit-text-fill-color:rgb(var(--zn-text));-webkit-transition:background-color 5000s ease-in-out 0s;transition:background-color 5000s ease-in-out 0s;box-shadow:inset 0 0 20px 20px rgba(35,35,35,0.1607843137)}select{height:43px}.no-border{border:none !important}table:not(.remarkd-table){border-collapse:separate !important;border-spacing:0;width:100%;max-width:100%;table-layout:auto;text-align:left;font-family:var(--zn-font-sans);font-size:var(--zn-text-table-content-font-size);font-weight:var(--zn-text-table-content-font-weight);line-height:var(--zn-text-table-content-line-height);color:var(--zn-text-table-content-color);text-transform:var(--zn-text-table-content-transform)}table:not(.remarkd-table) thead{font-weight:var(--zn-font-weight-medium)}table:not(.remarkd-table) thead tr th{background-color:rgb(var(--zn-table-header-background-color))}table:not(.remarkd-table) tbody a{cursor:pointer;color:rgb(var(--zn-primary))}table:not(.remarkd-table) tbody tr td{border-top:1px solid rgb(var(--zn-border-color)) !important}table:not(.remarkd-table) tbody tr:first-of-type td{border-top:0 !important}table:not(.remarkd-table) th,table:not(.remarkd-table) td{padding:var(--zn-spacing-small) var(--zn-spacing-medium);min-width:90px;white-space:nowrap}table:not(.remarkd-table) td>span{white-space:normal}table:not(.remarkd-table) th{font-family:var(--zn-font-sans);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);color:var(--zn-text-button-label-color);text-transform:var(--zn-text-button-label-transform);text-transform:capitalize;border-bottom:1px solid rgb(var(--zn-border-color))}.zn-table-fixed{table-layout:fixed}.opacity-100{opacity:1}.opacity-90{opacity:0.9}.opacity-80{opacity:0.8}.opacity-60{opacity:0.6}.opacity-50{opacity:0.5}.opacity-40{opacity:0.4}.opacity-10{opacity:0.1}:host{display:inline-block;cursor:pointer}:host([disabled]){cursor:wait}.animated-button{border-radius:var(--zn-border-radius);display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:-moz-fit-content;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(255,255,255,0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}.animated-button:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}.animated-button{position:relative;overflow:hidden;min-width:150px;min-height:40px;gap:8px;transition:transform var(--zn-transition-fast) ease,opacity var(--zn-transition-fast) ease;border:none;font-size:1rem;font-family:inherit;cursor:pointer}.animated-button:hover:not(:disabled){opacity:0.9}.animated-button:active:not(:disabled){transform:scale(0.98)}.animated-button:disabled{cursor:wait}.animated-button:focus-visible{outline:2px solid rgb(var(--zn-primary));outline-offset:2px}.animated-button__content{display:inline-flex;align-items:center;justify-content:center;gap:8px;position:relative;z-index:1}.animated-button__text{font-weight:600;line-height:1}.animated-button__icon{display:inline-flex;flex-shrink:0}.animated-button__spinner{display:inline-flex;flex-shrink:0;animation:spin 1s linear infinite}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.animated-button__shimmer{position:absolute;top:0;left:-100%;width:100%;height:100%;background:linear-gradient(90deg,rgba(255,255,255,0) 0%,rgba(255,255,255,0.3) 50%,rgba(255,255,255,0) 100%);animation:shimmer 1.5s infinite}@keyframes shimmer{0%{left:-100%}100%{left:100%}}.animated-button--idle{background-color:rgb(var(--zn-primary)) !important}.animated-button--processing{background-color:rgb(var(--zn-primary)) !important;cursor:wait}.animated-button--success{background-color:rgb(var(--zn-primary)) !important;cursor:default}.animated-button--success::before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgb(var(--zn-color-success));animation:successFill var(--zn-transition-slow) ease-out forwards;z-index:0}.animated-button--success .animated-button__content{z-index:1}.animated-button--success .animated-button__icon--success{opacity:0;animation:iconFadeIn 0.3s ease-out 0.4s forwards}.animated-button--success .animated-button__tick{stroke-dasharray:30;stroke-dashoffset:30;animation:tickSwoosh 0.5s ease-out 0.4s forwards}@keyframes successFill{0%{transform:translateY(100%)}100%{transform:translateY(0)}}@keyframes iconFadeIn{to{opacity:1}}@keyframes tickSwoosh{0%{stroke-dashoffset:30}100%{stroke-dashoffset:0}}.animated-button--failure{background-color:rgb(var(--zn-color-error)) !important;cursor:not-allowed}.animated-button--failure .animated-button__icon--failure{animation:failureShake var(--zn-transition-medium) ease-out}@keyframes failureShake{0%,100%{transform:translateX(0)}25%{transform:translateX(-4px)}75%{transform:translateX(4px)}}@media (prefers-reduced-motion:reduce){.animated-button{transition:none}.animated-button--success::before{animation:none;transform:translateY(0)}.animated-button__shimmer{animation:none;display:none}.animated-button__spinner{animation:none}.animated-button__icon--success{animation:none;opacity:1}.animated-button__tick{animation:none;stroke-dashoffset:0}.animated-button__icon--failure{animation:none}}`;var De=class extends C{constructor(){super(...arguments);this.currentState="idle";this.errorMessage="";this.idleText="Purchase";this.processingText="Purchasing";this.successText="Success";this.failureText="Failed";this.redirectUrl="";this.redirectDelay=1500;this.failureResetDelay=2e3;this.disabled=!1;this.name="";this.value=""}disconnectedCallback(){super.disconnectedCallback(),this.clearTimeouts()}clearTimeouts(){this.resetTimeout&&(clearTimeout(this.resetTimeout),this.resetTimeout=void 0),this.redirectTimeout&&(clearTimeout(this.redirectTimeout),this.redirectTimeout=void 0)}purchase(){this.currentState!=="idle"||this.disabled||this.handlePurchase()}setSuccess(){this.clearTimeouts(),this.currentState="success",this.scheduleRedirect()}setFailure(t=""){this.clearTimeouts(),this.errorMessage=t,this.currentState="failure",this.scheduleReset()}reset(){this.clearTimeouts(),this.currentState="idle",this.errorMessage=""}handlePurchase(){this.clearTimeouts(),this.currentState="processing",this.emit("zn-purchase",{cancelable:!0,detail:{value:this.value,setSuccess:()=>this.setSuccess(),setFailure:r=>this.setFailure(r)}}).defaultPrevented&&(this.currentState="idle")}scheduleRedirect(){this.redirectTimeout=window.setTimeout(()=>{this.redirectUrl&&(window.location.href=this.redirectUrl),this.emit("zn-redirect",{detail:{url:this.redirectUrl}})},this.redirectDelay)}scheduleReset(){this.resetTimeout=window.setTimeout(()=>{this.reset()},this.failureResetDelay)}handleClick(){this.currentState==="idle"&&!this.disabled&&this.handlePurchase()}render(){let t=this.disabled||this.currentState!=="idle",r=this.currentState==="processing",n=this.currentState==="success",a=this.currentState==="failure",s={"animated-button":!0,"animated-button--idle":this.currentState==="idle","animated-button--processing":this.currentState==="processing","animated-button--success":this.currentState==="success","animated-button--failure":this.currentState==="failure"},l=this.idleText;return this.currentState==="processing"&&(l=this.processingText),this.currentState==="success"&&(l=this.successText),this.currentState==="failure"&&(l=this.failureText),u`
|
|
4171
|
+
`}};Zr.styles=E(u2),c([F('slot[name="keys"]')],Zr.prototype,"keysSlot",2),c([F("slot:not([name])")],Zr.prototype,"defaultSlot",2),c([p()],Zr.prototype,"position",2),c([p()],Zr.prototype,"target",2),c([p({attribute:"item-selector"})],Zr.prototype,"itemSelector",2),c([p({attribute:"filter-attribute"})],Zr.prototype,"filterAttribute",2),c([p({attribute:"no-scroll",type:Boolean})],Zr.prototype,"noScroll",2);var FA=Zr;Zr.define("zn-key-container");var m2=S`:host,html,body{color:rgba(var(--zn-text),var(--zn-text-opacity));font-family:var(--zn-font-family-sans);font-feature-settings:normal;font-variation-settings:normal;font-size:var(--zn-text-paragraph-font-size);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);-moz-tab-size:4;-o-tab-size:4;tab-size:4;margin:0}html,body{background-color:rgba(var(--zn-body),var(--zn-bg-opacity));container-type:size;min-height:100%;height:100%}.inline-container{container-type:inline-size}.app-container{container-type:normal;display:flex;flex:1;flex-direction:column;position:relative;max-height:100%;height:100%;width:100%;max-width:100%}.inline-app-container,.app-container.inline-app-container,[inline-container] .app-container{display:block;height:auto;flex:unset}hr{height:0;border:none;border-top:1px solid rgb(var(--zn-border-color))}code,kbd,samp,pre,.mono{font-family:var(--zn-font-family-mono);font-size:1em}small{font-size:80%}.hidden{display:none !important}.visibility-hidden{visibility:hidden}p{font-size:var(--zn-text-paragraph-font-size);line-height:var(--zn-text-paragraph-line-height);font-weight:var(--zn-text-paragraph-font-weight)}h1,h2,h3,h4,h5,h6{color:rgb(var(--zn-text-heading))}h1{font-size:var(--zn-text-h1-font-size);line-height:var(--zn-text-h1-line-height);font-weight:var(--zn-text-h1-font-weight)}h2{font-size:var(--zn-text-h2-font-size);line-height:var(--zn-text-h2-line-height);font-weight:var(--zn-text-h2-font-weight)}h3,h4,h5,h6{font-size:var(--zn-text-h3-font-size);line-height:var(--zn-text-h3-line-height);font-weight:var(--zn-text-h3-font-weight)}kbd{font-family:monospace;background-color:#eee;color:#333;border:1px solid rgb(var(--zn-border-color));border-radius:3px;box-shadow:0 1px 1px rgba(0,0,0,0.2),0 1px 0 0 rgba(255,255,255,0.5) inset;display:inline-block;font-size:13px;line-height:20px;padding:1px 6px;white-space:nowrap;min-width:15px;color:rgba(0,0,0,0.5)}[t=dark] kbd{background-color:rgb(25,25,25);box-shadow:0 1px 1px rgba(0,0,0,0.2),0 1px 0 0 rgba(110,110,110,0.5) inset;color:#eee}[tab]{cursor:pointer}.zn-link:hover{--zn-text:rgb(var(--zn-primary));--icon-color:rgb(var(--zn-primary));--zn-text-heading:rgb(var(--zn-primary));--property-color:rgb(var(--zn-primary));opacity:1}.grow{flex-grow:1}.no-grow{flex-grow:0}.shrink{flex-shrink:1}.no-shrink{flex-shrink:0}.block{display:block}.flex{display:flex}.flex-wrap{display:flex;flex-wrap:wrap}.flex-col{display:flex;flex-direction:column}.flex-mid{display:flex;align-items:center}.flex-jc{justify-content:center}.flex-between{display:flex;justify-content:space-between}.flex-end{display:flex;justify-content:flex-end}.flex-bottom{display:flex;align-items:flex-end}.equal{flex-basis:50%}.m-auto{margin:auto}.mt-auto{margin-top:auto}.zn-pad{padding:var(--zn-base-gap,0)}.zn-pad-y,.zn-py{padding-top:16px;padding-bottom:16px}.zn-pad-x,.zn-px{padding-left:16px;padding-right:16px}.zn-pr{padding-right:16px}.zn-pl{padding-left:16px}.zn-pt{padding-top:16px}.zn-pb{padding-bottom:16px}.zn-margin{margin:16px}.zn-mx{margin-left:16px;margin-right:16px}.zn-my{margin-top:16px;margin-bottom:16px}.zn-mt{margin-top:16px}.zn-mb{margin-bottom:16px}.zn-ml{margin-left:16px}.zn-mr{margin-right:16px}.zn-mxa{margin-left:auto;margin-right:auto}.zn-mya{margin-top:auto;margin-bottom:auto}.zn-mta{margin-top:auto}.zn-mba{margin-bottom:auto}.zn-mla{margin-left:auto}.zn-mra{margin-right:auto}.rotate-45{transform:rotate(45deg)}.rotate-90{transform:rotate(90deg)}.rotate-180{transform:rotate(180deg)}@keyframes act-vanish{from{transform:scale(1);opacity:1;max-height:100%}to{transform:scale(0.8);opacity:0;max-height:0}}.act-vanish{animation:ease-in act-vanish 600ms forwards;transform-origin:top center;background-color:rgba(var(--zn-color-error),0.3);display:block;overflow:hidden}.h-full{height:100%}.w-full{width:100%}.zn-panel-bg{--zn-page-surface-background:var(--zn-panel);background-color:rgba(var(--zn-panel),var(--zn-panel-opacity))}.zn-panel{background-color:rgba(var(--zn-panel),var(--zn-panel-opacity));border:1px solid rgb(var(--zn-border-color));border-radius:var(--zn-border-radius);--zn-page-surface-background:var(--zn-panel)}.zn-container{display:flex;flex-direction:column;flex-grow:1;max-height:100%;overflow:hidden}.tar{text-align:right}.tal{text-align:left}.tac{text-align:center}.zn-empty-hide:empty{display:none}.ml-auto{margin-left:auto}.zn-b-dash{border-style:dashed}.zn-b-dotted{border-style:dotted}.zn-border{border-style:solid;border-width:1px !important}.zn-bt{border-top-style:solid;border-top-width:1px !important}.zn-bb{border-bottom-style:solid;border-bottom-width:1px !important}.zn-bl{border-left-style:solid;border-left-width:1px !important}.zn-br{border-right-style:solid;border-right-width:1px !important}.unifi-action{display:flex;gap:10px;padding:10px 0;align-items:center}.zn-panel-bar{border-bottom:1px solid rgb(var(--zn-border-color));background-color:rgba(var(--zn-panel),0.9);padding:var(--zn-base-px);gap:var(--zn-base-px);display:flex;flex-wrap:wrap;align-items:center;z-index:1}.zn-panel-bar--pill{border-radius:var(--zn-border-radius);border:1px solid rgb(var(--zn-border-color))}.zn-panel-bar--large{padding:var(--zn-base-px) calc(var(--zn-base-gap) + var(--zn-gutter));gap:var(--zn-base-px);height:50px}.scroll-container{overflow:auto;flex-grow:1;position:relative;display:flex;flex-direction:column;max-height:100%}.zn-divide{display:flex;flex-direction:column}.zn-divide>*:not(:first-child){border-top:1px solid rgb(var(--zn-border-color))}.zn-divide>div:empty+div:not(:first-child){border-top:0}.zn-divide-y{display:flex;flex-direction:row}.zn-divide-y>*:not(:first-child):not(:empty){border-left:1px solid rgb(var(--zn-border-color))}.zn-c-pad{--zn-pad-spacing:var(--zn-spacing-large)}.zn-c-pad-x>*{padding-left:var(--zn-pad-spacing);padding-right:var(--zn-pad-spacing)}.zn-c-pad-y>*:not(:first-child){padding-top:var(--zn-pad-spacing)}.zn-c-pad-y>*:not(:last-child){padding-bottom:var(--zn-pad-spacing)}.zn-nav.zn-transparent{background:transparent}.zn-nav{background:rgba(var(--zn-panel),var(--zn-panel-opacity));border-right:1px solid rgb(var(--zn-border-color));max-width:320px;height:100%;padding-top:5px}.zn-nav ul{list-style:none;padding-bottom:10px;margin:0;display:flex;flex-direction:column;position:relative}.zn-nav ul:after{content:"";height:1px;left:18px;right:18px;bottom:0;position:absolute;background:rgb(var(--zn-border-color))}.zn-nav ul li a{text-decoration:none;color:rgb(var(--zn-text));display:block;font-weight:500;cursor:pointer}.zn-nav ul li a:hover,.zn-nav ul li a.zn-tb-active{background:rgb(var(--zn-body))}.zn-nav ul li a.zn-tb-active{color:rgb(var(--zn-purple-text))}.zn-nav ul:last-child:after{display:none}.zn-nav strong,.zn-nav li a{padding:10px 20px}.zn-nav strong{display:block;margin-top:10px;font-size:13px;letter-spacing:0.93px;color:rgb(var(--zn-text-heading));font-weight:600;padding-bottom:5px;text-transform:uppercase}@keyframes shimmer-text-sweep{0%{background-position:100% center}100%{background-position:0% center}}@media (prefers-reduced-motion:no-preference){.shimmer-text{--shimmer-base:rgb(var(--zn-text));--shimmer-highlight:rgb(var(--zn-text-heading));--shimmer-core:0.5ch;--shimmer-spread:1.5ch;--shimmer-duration:1.5s;display:inline-block;width:-moz-fit-content;width:fit-content;max-width:100%;background-image:linear-gradient(90deg,transparent calc(50% - var(--shimmer-spread)),var(--shimmer-highlight) calc(50% - var(--shimmer-core)),var(--shimmer-highlight) calc(50% + var(--shimmer-core)),transparent calc(50% + var(--shimmer-spread))),linear-gradient(var(--shimmer-base),var(--shimmer-base));background-size:250% 100%,auto;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent !important;color:transparent !important;animation:var(--shimmer-duration) linear infinite shimmer-text-sweep}.shimmer-text.zn-error{--shimmer-base:rgb(var(--zn-color-error));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-error)) 55%,white)}.shimmer-text.zn-success{--shimmer-base:rgb(var(--zn-color-success));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-success)) 55%,white)}.shimmer-text.zn-info{--shimmer-base:rgb(var(--zn-color-info));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-info)) 55%,white)}.shimmer-text.zn-warning{--shimmer-base:rgb(var(--zn-color-warning));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-warning)) 55%,white)}.shimmer-text.zn-primary{--shimmer-base:rgb(var(--zn-primary));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-primary)) 55%,white)}.shimmer-text.zn-accent{--shimmer-base:rgb(var(--zn-accent));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-accent)) 55%,white)}}@media (prefers-reduced-motion:reduce){.shimmer-text{color:rgb(var(--zn-text))}.shimmer-text.zn-error{color:rgb(var(--zn-color-error)) !important}.shimmer-text.zn-success{color:rgb(var(--zn-color-success)) !important}.shimmer-text.zn-info{color:rgb(var(--zn-color-info)) !important}.shimmer-text.zn-warning{color:rgb(var(--zn-color-warning)) !important}.shimmer-text.zn-primary{color:rgb(var(--zn-primary)) !important}.shimmer-text.zn-accent{color:rgb(var(--zn-accent)) !important}}*,*::before,*::after{box-sizing:border-box}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}a{color:inherit;text-decoration:inherit}strong{font-weight:bolder}b{font-weight:600}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:inline-block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}button,.zn-button{border-radius:var(--zn-border-radius);display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:-moz-fit-content;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(255,255,255,0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}button:hover:not([disabled]),.zn-button:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=date],input[type=datetime-local],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],input[type=file],input[list],textarea,select{display:block;width:100%;border-radius:5px;border-style:solid;border-width:1px !important;border-color:rgb(var(--zn-border-color));background-color:rgb(var(--zn-input-bg));outline:none}input[type=date]:focus,input[type=datetime-local]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus,input[type=file]:focus,input[list]:focus,textarea:focus,select:focus{border-color:rgb(var(--zn-primary));box-shadow:0 0 0 3px rgba(var(--zn-primary),0.3)}input[type=date]::-moz-placeholder, input[type=datetime-local]::-moz-placeholder, input[type=email]::-moz-placeholder, input[type=month]::-moz-placeholder, input[type=number]::-moz-placeholder, input[type=password]::-moz-placeholder, input[type=search]::-moz-placeholder, input[type=tel]::-moz-placeholder, input[type=text]::-moz-placeholder, input[type=time]::-moz-placeholder, input[type=url]::-moz-placeholder, input[type=week]::-moz-placeholder, input[type=file]::-moz-placeholder, input[list]::-moz-placeholder, textarea::-moz-placeholder, select::-moz-placeholder{font-weight:400;color:rgba(var(--zn-text),0.6)}input[type=date]::placeholder,input[type=datetime-local]::placeholder,input[type=email]::placeholder,input[type=month]::placeholder,input[type=number]::placeholder,input[type=password]::placeholder,input[type=search]::placeholder,input[type=tel]::placeholder,input[type=text]::placeholder,input[type=time]::placeholder,input[type=url]::placeholder,input[type=week]::placeholder,input[type=file]::placeholder,input[list]::placeholder,textarea::placeholder,select::placeholder{font-weight:400;color:rgba(var(--zn-text),0.6)}@media (min-width:360px){input[type=date],input[type=datetime-local],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],input[type=file],input[list],textarea,select{padding:8px}}label{font-weight:600;font-size:rgb(var(--zn-font-size-medium));line-height:var(--zn-spacing-medium);color:rgb(var(--zn-text-heading));display:block;margin-bottom:4px;margin-top:16px}input[type=checkbox],input[type=radio]{border-radius:5px}input[type=radio]{border-radius:50%}input[type=range]{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:10px;background-color:rgb(var(--zn-border-color));height:8px;accent-color:rgb(var(--zn-primary));width:100%;max-width:768px}fieldset{border-color:rgba(var(--zn-primary),20%);border-width:2px;padding:0 16px 16px}select option{padding:4px}select>option:checked{background-color:rgba(var(--zn-primary),20%);border-radius:5px}fieldset>legend{padding:4px}input[type=button],input[type=submit],button[type=submit]:not(.button),button[type=button]:not(.button){border-radius:var(--zn-border-radius);display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:-moz-fit-content;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(255,255,255,0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}input[type=button]:hover:not([disabled]),input[type=submit]:hover:not([disabled]),button[type=submit]:not(.button):hover:not([disabled]),button[type=button]:not(.button):hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=button],input[type=submit],button[type=submit]:not(.button),button[type=button]:not(.button){width:auto}div+button{margin-top:16px}input[type=file]::-webkit-file-upload-button{border-radius:var(--zn-border-radius);display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(255,255,255,0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}input[type=file]::-webkit-file-upload-button:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=file]::-webkit-file-upload-button{margin-right:8px}input::-webkit-calendar-picker-indicator{cursor:pointer;padding:8px}input[list]::-webkit-calendar-picker-indicator{padding:8px 4px}.input--with-icon{position:relative}.input--with-icon zn-icon{padding:14px;position:absolute;top:50%;pointer-events:none;transform:translateY(-50%);left:8px;background-color:rgb(var(--zn-primary));color:rgb(var(--zn-text));border-radius:50%}.input--with-icon input{padding-left:40px}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-background-clip:text;-webkit-text-fill-color:rgb(var(--zn-text));-webkit-transition:background-color 5000s ease-in-out 0s;transition:background-color 5000s ease-in-out 0s;box-shadow:inset 0 0 20px 20px rgba(35,35,35,0.1607843137)}select{height:43px}.no-border{border:none !important}table:not(.remarkd-table){border-collapse:separate !important;border-spacing:0;width:100%;max-width:100%;table-layout:auto;text-align:left;font-family:var(--zn-font-sans);font-size:var(--zn-text-table-content-font-size);font-weight:var(--zn-text-table-content-font-weight);line-height:var(--zn-text-table-content-line-height);color:var(--zn-text-table-content-color);text-transform:var(--zn-text-table-content-transform)}table:not(.remarkd-table) thead{font-weight:var(--zn-font-weight-medium)}table:not(.remarkd-table) thead tr th{background-color:rgb(var(--zn-table-header-background-color))}table:not(.remarkd-table) tbody a{cursor:pointer;color:rgb(var(--zn-primary))}table:not(.remarkd-table) tbody tr td{border-top:1px solid rgb(var(--zn-border-color)) !important}table:not(.remarkd-table) tbody tr:first-of-type td{border-top:0 !important}table:not(.remarkd-table) th,table:not(.remarkd-table) td{padding:var(--zn-spacing-small) var(--zn-spacing-medium);min-width:90px;white-space:nowrap}table:not(.remarkd-table) td>span{white-space:normal}table:not(.remarkd-table) th{font-family:var(--zn-font-sans);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);color:var(--zn-text-button-label-color);text-transform:var(--zn-text-button-label-transform);text-transform:capitalize;border-bottom:1px solid rgb(var(--zn-border-color))}.zn-table-fixed{table-layout:fixed}.opacity-100{opacity:1}.opacity-90{opacity:0.9}.opacity-80{opacity:0.8}.opacity-60{opacity:0.6}.opacity-50{opacity:0.5}.opacity-40{opacity:0.4}.opacity-10{opacity:0.1}:host{display:inline-block;cursor:pointer}:host([disabled]){cursor:wait}.animated-button{border-radius:var(--zn-border-radius);display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:-moz-fit-content;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(255,255,255,0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}.animated-button:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}.animated-button{position:relative;overflow:hidden;min-width:150px;min-height:40px;gap:8px;transition:transform var(--zn-transition-fast) ease,opacity var(--zn-transition-fast) ease;border:none;font-size:1rem;font-family:inherit;cursor:pointer}.animated-button:hover:not(:disabled){opacity:0.9}.animated-button:active:not(:disabled){transform:scale(0.98)}.animated-button:disabled{cursor:wait}.animated-button:focus-visible{outline:2px solid rgb(var(--zn-primary));outline-offset:2px}.animated-button__content{display:inline-flex;align-items:center;justify-content:center;gap:8px;position:relative;z-index:1}.animated-button__text{font-weight:600;line-height:1}.animated-button__icon{display:inline-flex;flex-shrink:0}.animated-button__spinner{display:inline-flex;flex-shrink:0;animation:spin 1s linear infinite}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.animated-button__shimmer{position:absolute;top:0;left:-100%;width:100%;height:100%;background:linear-gradient(90deg,rgba(255,255,255,0) 0%,rgba(255,255,255,0.3) 50%,rgba(255,255,255,0) 100%);animation:shimmer 1.5s infinite}@keyframes shimmer{0%{left:-100%}100%{left:100%}}.animated-button--idle{background-color:rgb(var(--zn-primary)) !important}.animated-button--processing{background-color:rgb(var(--zn-primary)) !important;cursor:wait}.animated-button--success{background-color:rgb(var(--zn-primary)) !important;cursor:default}.animated-button--success::before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgb(var(--zn-color-success));animation:successFill var(--zn-transition-slow) ease-out forwards;z-index:0}.animated-button--success .animated-button__content{z-index:1}.animated-button--success .animated-button__icon--success{opacity:0;animation:iconFadeIn 0.3s ease-out 0.4s forwards}.animated-button--success .animated-button__tick{stroke-dasharray:30;stroke-dashoffset:30;animation:tickSwoosh 0.5s ease-out 0.4s forwards}@keyframes successFill{0%{transform:translateY(100%)}100%{transform:translateY(0)}}@keyframes iconFadeIn{to{opacity:1}}@keyframes tickSwoosh{0%{stroke-dashoffset:30}100%{stroke-dashoffset:0}}.animated-button--failure{background-color:rgb(var(--zn-color-error)) !important;cursor:not-allowed}.animated-button--failure .animated-button__icon--failure{animation:failureShake var(--zn-transition-medium) ease-out}@keyframes failureShake{0%,100%{transform:translateX(0)}25%{transform:translateX(-4px)}75%{transform:translateX(4px)}}@media (prefers-reduced-motion:reduce){.animated-button{transition:none}.animated-button--success::before{animation:none;transform:translateY(0)}.animated-button__shimmer{animation:none;display:none}.animated-button__spinner{animation:none}.animated-button__icon--success{animation:none;opacity:1}.animated-button__tick{animation:none;stroke-dashoffset:0}.animated-button__icon--failure{animation:none}}`;var Ie=class extends C{constructor(){super(...arguments);this.currentState="idle";this.errorMessage="";this.idleText="Purchase";this.processingText="Purchasing";this.successText="Success";this.failureText="Failed";this.redirectUrl="";this.redirectDelay=1500;this.failureResetDelay=2e3;this.disabled=!1;this.name="";this.value=""}disconnectedCallback(){super.disconnectedCallback(),this.clearTimeouts()}clearTimeouts(){this.resetTimeout&&(clearTimeout(this.resetTimeout),this.resetTimeout=void 0),this.redirectTimeout&&(clearTimeout(this.redirectTimeout),this.redirectTimeout=void 0)}purchase(){this.currentState!=="idle"||this.disabled||this.handlePurchase()}setSuccess(){this.clearTimeouts(),this.currentState="success",this.scheduleRedirect()}setFailure(t=""){this.clearTimeouts(),this.errorMessage=t,this.currentState="failure",this.scheduleReset()}reset(){this.clearTimeouts(),this.currentState="idle",this.errorMessage=""}handlePurchase(){this.clearTimeouts(),this.currentState="processing",this.emit("zn-purchase",{cancelable:!0,detail:{value:this.value,setSuccess:()=>this.setSuccess(),setFailure:r=>this.setFailure(r)}}).defaultPrevented&&(this.currentState="idle")}scheduleRedirect(){this.redirectTimeout=window.setTimeout(()=>{this.redirectUrl&&(window.location.href=this.redirectUrl),this.emit("zn-redirect",{detail:{url:this.redirectUrl}})},this.redirectDelay)}scheduleReset(){this.resetTimeout=window.setTimeout(()=>{this.reset()},this.failureResetDelay)}handleClick(){this.currentState==="idle"&&!this.disabled&&this.handlePurchase()}render(){let t=this.disabled||this.currentState!=="idle",r=this.currentState==="processing",n=this.currentState==="success",a=this.currentState==="failure",s={"animated-button":!0,"animated-button--idle":this.currentState==="idle","animated-button--processing":this.currentState==="processing","animated-button--success":this.currentState==="success","animated-button--failure":this.currentState==="failure"},l=this.idleText;return this.currentState==="processing"&&(l=this.processingText),this.currentState==="success"&&(l=this.successText),this.currentState==="failure"&&(l=this.failureText),u`
|
|
4171
4172
|
<button
|
|
4172
4173
|
class=${D(s)}
|
|
4173
4174
|
?disabled=${t}
|
|
@@ -4226,7 +4227,7 @@ ${va(this.code(o,t))}
|
|
|
4226
4227
|
</span>
|
|
4227
4228
|
`}
|
|
4228
4229
|
</button>
|
|
4229
|
-
`}};
|
|
4230
|
+
`}};Ie.styles=E(m2),Ie.dependencies={"zn-icon":ai},c([O()],Ie.prototype,"currentState",2),c([O()],Ie.prototype,"errorMessage",2),c([p({attribute:"idle-text"})],Ie.prototype,"idleText",2),c([p({attribute:"processing-text"})],Ie.prototype,"processingText",2),c([p({attribute:"success-text"})],Ie.prototype,"successText",2),c([p({attribute:"failure-text"})],Ie.prototype,"failureText",2),c([p({attribute:"redirect-url"})],Ie.prototype,"redirectUrl",2),c([p({type:Number,attribute:"redirect-delay"})],Ie.prototype,"redirectDelay",2),c([p({type:Number,attribute:"failure-reset-delay"})],Ie.prototype,"failureResetDelay",2),c([p({type:Boolean,reflect:!0})],Ie.prototype,"disabled",2),c([p()],Ie.prototype,"name",2),c([p()],Ie.prototype,"value",2);var BA=Ie;Ie.define("zn-animated-button");var f2=S`:host{display:block}.translation-group__languages{display:flex;align-items:center}`;var uo=class extends Yt{constructor(){super();this._slotController=new Q(this,"actions","footer");this.label="";this.languages={en:"EN"};this._activeLanguage="en";this._activatedLanguages=["en"];this._overflowIndex=-1;this._lastObservedWidth=0;this._measureRafId=0;this.handleSlotChange=()=>{this.syncChildren()};this.handleLanguageAdd=t=>{t.stopPropagation();let n=t.detail.element.getAttribute("data-path");n&&(this._activatedLanguages.includes(n)||(this._activatedLanguages=[...this._activatedLanguages,n]),this.getAllTranslations().forEach(a=>a.addLanguageKey(n)),this.switchLanguage(n))};this.handleOverflowSelect=t=>{t.stopPropagation();let n=t.detail.element.getAttribute("data-path");n&&this.switchLanguage(n)};new Zt(this,{callback:t=>{let r=t[0]?.contentRect.width??0;Math.abs(r-this._lastObservedWidth)<1||(this._lastObservedWidth=r,this._overflowIndex!==-1?this._overflowIndex=-1:this._scheduleLangOverflow())}})}disconnectedCallback(){super.disconnectedCallback(),this._measureRafId&&(cancelAnimationFrame(this._measureRafId),this._measureRafId=0)}firstUpdated(t){super.firstUpdated(t),this.syncChildren()}updated(t){super.updated(t),t.has("languages")&&this.syncChildLanguages(),this._scheduleLangOverflow()}_scheduleLangOverflow(){this._measureRafId||(this._measureRafId=requestAnimationFrame(()=>{this._measureRafId=0,this._computeLangOverflow()}))}_computeLangOverflow(){let t=this.shadowRoot?.querySelector(".translation-group__languages zn-button-group");if(!t)return;let r=Array.from(t.querySelectorAll("zn-button[data-lang-btn]"));if(r.length<2){this._overflowIndex!==-1&&(this._overflowIndex=-1);return}let n=r[0].getBoundingClientRect().top,a=-1;for(let l=1;l<r.length;l++)if(r[l].getBoundingClientRect().top>n+1){a=l;break}if(a===-1){let l=t.querySelector("[data-lang-overflow], [data-lang-add]");l&&l.getBoundingClientRect().top>n+1&&(a=r.length)}if(a===-1)return;let s=this._overflowIndex===-1?a:Math.max(1,Math.min(a,this._overflowIndex-1));s!==this._overflowIndex&&(this._overflowIndex=s)}getAllTranslations(){return[...this.querySelectorAll("zn-translations")]}syncChildren(){let t=this.getAllTranslations(),r=new Set(this._activatedLanguages);t.forEach(n=>{n.getValueLanguages().forEach(a=>r.add(a))}),this._activatedLanguages=[...r],t.forEach(n=>{n.grouped=!0,n.languages=this.languages;for(let a of this._activatedLanguages)n.addLanguageKey(a);n.setActiveLanguage(this._activeLanguage)})}syncChildLanguages(){this.getAllTranslations().forEach(t=>{t.languages=this.languages})}switchLanguage(t){this._activeLanguage=t,this.getAllTranslations().forEach(r=>r.setActiveLanguage(t)),this.emit("zn-language-change",{detail:{language:t}})}render(){let t=this._slotController.test("actions"),r=this._slotController.test("footer"),n=this.caption||this.label,a=Object.entries(this.languages).filter(([g])=>g!=="en"&&!this._activatedLanguages.includes(g)).map(([g,v])=>({title:v,type:"dropdown",path:g})),s=[...this._activatedLanguages];s.includes("en")||s.unshift("en");let l=this._overflowIndex===-1?s.length:this._overflowIndex,d=s.slice(0,l),h=s.slice(l),m=h.map(g=>({title:g.toUpperCase(),type:"dropdown",path:g,icon:g===this._activeLanguage?"check":""})),f=Object.keys(this.languages).length>1,b=n||f||t;return u`
|
|
4230
4231
|
<div class="${D({panel:!0,"panel--flush":this.flush,"panel--transparent":this.transparent,"panel--has-header":b,"panel--has-actions":f||t,"panel--has-footer":r})}">
|
|
4231
4232
|
|
|
4232
4233
|
<div class="panel__inner">
|
|
@@ -4427,7 +4428,7 @@ ${this.parser.parse(i)}</blockquote>
|
|
|
4427
4428
|
${i}</tr>
|
|
4428
4429
|
`}tablecell(i){let o=this.parser.parseInline(i.tokens),t=i.header?"th":"td";return(i.align?`<${t} align="${i.align}">`:`<${t}>`)+o+`</${t}>
|
|
4429
4430
|
`}strong({tokens:i}){return`<strong>${this.parser.parseInline(i)}</strong>`}em({tokens:i}){return`<em>${this.parser.parseInline(i)}</em>`}codespan({text:i}){return`<code>${Cn(i,!0)}</code>`}br(i){return"<br>"}del({tokens:i}){return`<del>${this.parser.parseInline(i)}</del>`}link({href:i,title:o,tokens:t}){let r=this.parser.parseInline(t),n=y2(i);if(n===null)return r;i=n;let a='<a href="'+i+'"';return o&&(a+=' title="'+Cn(o)+'"'),a+=">"+r+"</a>",a}image({href:i,title:o,text:t,tokens:r}){r&&(t=this.parser.parseInline(r,this.parser.textRenderer));let n=y2(i);if(n===null)return Cn(t);i=n;let a=`<img src="${i}" alt="${Cn(t)}"`;return o&&(a+=` title="${Cn(o)}"`),a+=">",a}text(i){return"tokens"in i&&i.tokens?this.parser.parseInline(i.tokens):"escaped"in i&&i.escaped?i.text:Cn(i.text)}},vf=class{strong({text:i}){return i}em({text:i}){return i}codespan({text:i}){return i}del({text:i}){return i}html({text:i}){return i}text({text:i}){return i}link({text:i}){return""+i}image({text:i}){return""+i}br(){return""}checkbox({raw:i}){return i}},Zo=class cf{constructor(o){B(this,"options");B(this,"renderer");B(this,"textRenderer");this.options=o||Sa,this.options.renderer=this.options.renderer||new Rp,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new vf}static parse(o,t){return new cf(t).parse(o)}static parseInline(o,t){return new cf(t).parseInline(o)}parse(o){this.renderer.parser=this;let t="";for(let r=0;r<o.length;r++){let n=o[r];if(this.options.extensions?.renderers?.[n.type]){let s=n,l=this.options.extensions.renderers[s.type].call({parser:this},s);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(s.type)){t+=l||"";continue}}let a=n;switch(a.type){case"space":{t+=this.renderer.space(a);break}case"hr":{t+=this.renderer.hr(a);break}case"heading":{t+=this.renderer.heading(a);break}case"code":{t+=this.renderer.code(a);break}case"table":{t+=this.renderer.table(a);break}case"blockquote":{t+=this.renderer.blockquote(a);break}case"list":{t+=this.renderer.list(a);break}case"checkbox":{t+=this.renderer.checkbox(a);break}case"html":{t+=this.renderer.html(a);break}case"def":{t+=this.renderer.def(a);break}case"paragraph":{t+=this.renderer.paragraph(a);break}case"text":{t+=this.renderer.text(a);break}default:{let s='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return t}parseInline(o,t=this.renderer){this.renderer.parser=this;let r="";for(let n=0;n<o.length;n++){let a=o[n];if(this.options.extensions?.renderers?.[a.type]){let l=this.options.extensions.renderers[a.type].call({parser:this},a);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){r+=l||"";continue}}let s=a;switch(s.type){case"escape":{r+=t.text(s);break}case"html":{r+=t.html(s);break}case"link":{r+=t.link(s);break}case"image":{r+=t.image(s);break}case"checkbox":{r+=t.checkbox(s);break}case"strong":{r+=t.strong(s);break}case"em":{r+=t.em(s);break}case"codespan":{r+=t.codespan(s);break}case"br":{r+=t.br(s);break}case"del":{r+=t.del(s);break}case"text":{r+=t.text(s);break}default:{let l='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return r}},Ip,hc=(Ip=class{constructor(i){B(this,"options");B(this,"block");this.options=i||Sa}preprocess(i){return i}postprocess(i){return i}processAllTokens(i){return i}emStrongMask(i){return i}provideLexer(i=this.block){return i?Jo.lex:Jo.lexInline}provideParser(i=this.block){return i?Zo.parse:Zo.parseInline}},B(Ip,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),B(Ip,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Ip),ML=class{constructor(...i){B(this,"defaults",df());B(this,"options",this.setOptions);B(this,"parse",this.parseMarkdown(!0));B(this,"parseInline",this.parseMarkdown(!1));B(this,"Parser",Zo);B(this,"Renderer",Rp);B(this,"TextRenderer",vf);B(this,"Lexer",Jo);B(this,"Tokenizer",Np);B(this,"Hooks",hc);this.use(...i)}walkTokens(i,o){let t=[];for(let r of i)switch(t=t.concat(o.call(this,r)),r.type){case"table":{let n=r;for(let a of n.header)t=t.concat(this.walkTokens(a.tokens,o));for(let a of n.rows)for(let s of a)t=t.concat(this.walkTokens(s.tokens,o));break}case"list":{let n=r;t=t.concat(this.walkTokens(n.items,o));break}default:{let n=r;this.defaults.extensions?.childTokens?.[n.type]?this.defaults.extensions.childTokens[n.type].forEach(a=>{let s=n[a].flat(1/0);t=t.concat(this.walkTokens(s,o))}):n.tokens&&(t=t.concat(this.walkTokens(n.tokens,o)))}}return t}use(...i){let o=this.defaults.extensions||{renderers:{},childTokens:{}};return i.forEach(t=>{let r={...t};if(r.async=this.defaults.async||r.async||!1,t.extensions&&(t.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let a=o.renderers[n.name];a?o.renderers[n.name]=function(...s){let l=n.renderer.apply(this,s);return l===!1&&(l=a.apply(this,s)),l}:o.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=o[n.level];a?a.unshift(n.tokenizer):o[n.level]=[n.tokenizer],n.start&&(n.level==="block"?o.startBlock?o.startBlock.push(n.start):o.startBlock=[n.start]:n.level==="inline"&&(o.startInline?o.startInline.push(n.start):o.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(o.childTokens[n.name]=n.childTokens)}),r.extensions=o),t.renderer){let n=this.defaults.renderer||new Rp(this.defaults);for(let a in t.renderer){if(!(a in n))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let s=a,l=t.renderer[s],d=n[s];n[s]=(...h)=>{let m=l.apply(n,h);return m===!1&&(m=d.apply(n,h)),m||""}}r.renderer=n}if(t.tokenizer){let n=this.defaults.tokenizer||new Np(this.defaults);for(let a in t.tokenizer){if(!(a in n))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let s=a,l=t.tokenizer[s],d=n[s];n[s]=(...h)=>{let m=l.apply(n,h);return m===!1&&(m=d.apply(n,h)),m}}r.tokenizer=n}if(t.hooks){let n=this.defaults.hooks||new hc;for(let a in t.hooks){if(!(a in n))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let s=a,l=t.hooks[s],d=n[s];hc.passThroughHooks.has(a)?n[s]=h=>{if(this.defaults.async&&hc.passThroughHooksRespectAsync.has(a))return(async()=>{let f=await l.call(n,h);return d.call(n,f)})();let m=l.call(n,h);return d.call(n,m)}:n[s]=(...h)=>{if(this.defaults.async)return(async()=>{let f=await l.apply(n,h);return f===!1&&(f=await d.apply(n,h)),f})();let m=l.apply(n,h);return m===!1&&(m=d.apply(n,h)),m}}r.hooks=n}if(t.walkTokens){let n=this.defaults.walkTokens,a=t.walkTokens;r.walkTokens=function(s){let l=[];return l.push(a.call(this,s)),n&&(l=l.concat(n.call(this,s))),l}}this.defaults={...this.defaults,...r}}),this}setOptions(i){return this.defaults={...this.defaults,...i},this}lexer(i,o){return Jo.lex(i,o??this.defaults)}parser(i,o){return Zo.parse(i,o??this.defaults)}parseMarkdown(i){return(o,t)=>{let r={...t},n={...this.defaults,...r},a=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&r.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof o>"u"||o===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof o!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(o)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=i),n.async)return(async()=>{let s=n.hooks?await n.hooks.preprocess(o):o,l=await(n.hooks?await n.hooks.provideLexer(i):i?Jo.lex:Jo.lexInline)(s,n),d=n.hooks?await n.hooks.processAllTokens(l):l;n.walkTokens&&await Promise.all(this.walkTokens(d,n.walkTokens));let h=await(n.hooks?await n.hooks.provideParser(i):i?Zo.parse:Zo.parseInline)(d,n);return n.hooks?await n.hooks.postprocess(h):h})().catch(a);try{n.hooks&&(o=n.hooks.preprocess(o));let s=(n.hooks?n.hooks.provideLexer(i):i?Jo.lex:Jo.lexInline)(o,n);n.hooks&&(s=n.hooks.processAllTokens(s)),n.walkTokens&&this.walkTokens(s,n.walkTokens);let l=(n.hooks?n.hooks.provideParser(i):i?Zo.parse:Zo.parseInline)(s,n);return n.hooks&&(l=n.hooks.postprocess(l)),l}catch(s){return a(s)}}}onError(i,o){return t=>{if(t.message+=`
|
|
4430
|
-
Please report this to https://github.com/markedjs/marked.`,i){let r="<p>An error occurred:</p><pre>"+Cn(t.message+"",!0)+"</pre>";return o?Promise.resolve(r):r}if(o)return Promise.reject(t);throw t}}},Ca=new ML;function qt(i,o){return Ca.parse(i,o)}qt.options=qt.setOptions=function(i){return Ca.setOptions(i),qt.defaults=Ca.defaults,k2(qt.defaults),qt};qt.getDefaults=df;qt.defaults=Sa;qt.use=function(...i){return Ca.use(...i),qt.defaults=Ca.defaults,k2(qt.defaults),qt};qt.walkTokens=function(i,o){return Ca.walkTokens(i,o)};qt.parseInline=Ca.parseInline;qt.Parser=Zo;qt.parser=Zo.parse;qt.Renderer=Rp;qt.TextRenderer=vf;qt.Lexer=Jo;qt.lexer=Jo.lex;qt.Tokenizer=Np;qt.Hooks=hc;qt.parse=qt;var
|
|
4431
|
+
Please report this to https://github.com/markedjs/marked.`,i){let r="<p>An error occurred:</p><pre>"+Cn(t.message+"",!0)+"</pre>";return o?Promise.resolve(r):r}if(o)return Promise.reject(t);throw t}}},Ca=new ML;function qt(i,o){return Ca.parse(i,o)}qt.options=qt.setOptions=function(i){return Ca.setOptions(i),qt.defaults=Ca.defaults,k2(qt.defaults),qt};qt.getDefaults=df;qt.defaults=Sa;qt.use=function(...i){return Ca.use(...i),qt.defaults=Ca.defaults,k2(qt.defaults),qt};qt.walkTokens=function(i,o){return Ca.walkTokens(i,o)};qt.parseInline=Ca.parseInline;qt.Parser=Zo;qt.parser=Zo.parse;qt.Renderer=Rp;qt.TextRenderer=vf;qt.Lexer=Jo;qt.lexer=Jo.lex;qt.Tokenizer=Np;qt.Hooks=hc;qt.parse=qt;var Rwt=qt.options,Owt=qt.setOptions,Pwt=qt.use,Hwt=qt.walkTokens,Fwt=qt.parseInline;var Bwt=Zo.parse,Vwt=Jo.lex;var I2=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}.panel{border:1px solid rgb(var(--zn-border-color));background-color:rgba(var(--zn-panel),var(--zn-panel-opacity));border-radius:var(--zn-border-radius)}.markdown-editor{display:flex;flex-direction:column;gap:var(--zn-spacing-small);width:100%;height:100%;min-height:0}:host([expanded]){position:absolute;top:10px;bottom:10px;left:var(--zn-sp-padding);right:var(--zn-sp-padding);z-index:var(--zn-z-index-editor-action,1000000)}:host([expanded]) .panel,:host([expanded]) .panel__inner,:host([expanded]) .panel__content,:host([expanded]) .panel__body{height:100%;max-height:100%}:host([expanded]) .markdown-editor{height:100%}.markdown-editor__label{font-size:var(--zn-input-label-font-size-medium);color:var(--zn-input-label-color);font-weight:var(--zn-font-weight-semibold)}.markdown-editor__toolbar{display:flex;align-items:end;gap:var(--zn-spacing-small);justify-content:flex-end;flex-wrap:wrap}.markdown-editor__markdown-link{display:inline-flex;align-items:center;gap:var(--zn-spacing-x-small);margin-right:auto;font-size:var(--zn-input-label-font-size-small);line-height:1;color:var(--zn-color-neutral-500,#656d76);text-decoration:none;cursor:pointer;transition:color 0.15s ease;padding-left:var(--zn-spacing-x-small)}.markdown-editor__markdown-link:hover{color:var(--zn-color-primary-600,#0969da)}.markdown-editor__markdown-link span{white-space:nowrap}.markdown-editor__view-toggle{display:inline-flex}.markdown-editor__body{display:flex;flex:1;min-height:0;gap:var(--zn-spacing-medium)}.markdown-editor__editor,.markdown-editor__preview-wrapper{flex:1;min-width:0;min-height:0;display:flex}.markdown-editor__editor[hidden],.markdown-editor__preview-wrapper[hidden]{display:none}.markdown-editor__editor zn-textarea{flex:1;width:100%}.markdown-editor__preview-wrapper{overflow:hidden}.markdown-editor__preview{flex:1;background:var(--zn-color-neutral-0,white);border:1px solid var(--zn-color-neutral-200);border-radius:var(--zn-border-radius);padding:var(--zn-spacing-x-large);overflow-y:auto;font-family:inherit;line-height:1.7;color:var(--zn-color-text,#222)}.markdown-editor__preview h1{font-size:1.8em;margin:0.8em 0 0.4em;border-bottom:1px solid var(--zn-color-neutral-200);padding-bottom:0.3em}.markdown-editor__preview h2{font-size:1.5em;margin:0.8em 0 0.4em;border-bottom:1px solid var(--zn-color-neutral-200);padding-bottom:0.2em}.markdown-editor__preview h3{font-size:1.25em;margin:0.7em 0 0.3em}.markdown-editor__preview h4,.markdown-editor__preview h5,.markdown-editor__preview h6{font-size:1.1em;margin:0.6em 0 0.3em}.markdown-editor__preview p{margin:0.6em 0}.markdown-editor__preview ul,.markdown-editor__preview ol{margin:0.6em 0;padding-left:2em;display:block}.markdown-editor__preview ul{list-style-type:disc}.markdown-editor__preview ol{list-style-type:decimal}.markdown-editor__preview ul ul{list-style-type:circle}.markdown-editor__preview ul ul ul{list-style-type:square}.markdown-editor__preview li{margin:0.2em 0;display:list-item}.markdown-editor__preview blockquote{border-left:4px solid var(--zn-color-neutral-300);margin:0.8em 0;padding:0.4em 1em;color:var(--zn-color-neutral-600,#555)}.markdown-editor__preview table{border-collapse:collapse;width:100%;margin:0.8em 0}.markdown-editor__preview th,.markdown-editor__preview td{border:1px solid var(--zn-color-neutral-300);padding:0.4em 0.8em;text-align:left}.markdown-editor__preview th{background:var(--zn-color-neutral-100);font-weight:bold}.markdown-editor__preview code{background:var(--zn-color-neutral-100);padding:0.15em 0.4em;border-radius:3px;font-size:0.9em}.markdown-editor__preview pre{background:var(--zn-color-neutral-100);padding:1em;border-radius:4px;overflow-x:auto}.markdown-editor__preview pre code{background:none;padding:0}.markdown-editor__preview hr{border:none;border-top:1px solid var(--zn-color-neutral-300);margin:1.5em 0}.markdown-editor__preview a{color:var(--zn-color-primary-600)}.markdown-editor__help-text{font-size:var(--zn-input-help-text-font-size-medium);color:var(--zn-input-help-text-color)}`;var IL=[{mode:"editor",icon:"edit_note",label:"Editor"},{mode:"split",icon:"vertical_split",label:"Split"},{mode:"preview",icon:"visibility",label:"Preview"}],Jt=class extends Yt{constructor(){super(...arguments);this.formControlController=new ot(this,{assumeInteractionOn:["zn-input","zn-change"]});this.markdownSlotController=new Q(this,"label","help-text","actions","footer");this.debounceTimer=null;this.name="";this.value="";this.defaultValue="";this.label="";this.helpText="";this.placeholder="Enter markdown content...";this.rows=20;this.viewMode="editor";this.storageKey="zn-markdown-editor-view-mode";this.required=!1;this.readonly=!1;this.disabled=!1;this.expanded=!1;this.handleInput=()=>{this.value=this.textarea.value,this.emit("zn-input"),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this.renderPreview(),150)};this.handleChange=()=>{this.value=this.textarea.value,this.emit("zn-change"),this.renderPreview()};this.handleViewToggle=t=>{let n=t.target.closest("[data-mode]")?.dataset.mode;!n||n===this.viewMode||(this.viewMode=n)};this.handleExpandToggle=()=>{this.expanded=!this.expanded}}get validity(){return this.textarea?.validity}get validationMessage(){return this.textarea?.validationMessage??""}checkValidity(){return this.textarea?.checkValidity()??!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this.textarea?.reportValidity()??!0}setCustomValidity(t){this.textarea?.setCustomValidity(t),this.formControlController.updateValidity()}focus(t){this.textarea?.focus(t)}blur(){this.textarea?.blur()}connectedCallback(){if(super.connectedCallback(),!this.hasAttribute("value")&&!this.value){let r=Array.from(this.childNodes).filter(s=>s.nodeType===Node.TEXT_NODE),a=r.map(s=>s.textContent??"").join("").replace(/\r\n/g,`
|
|
4431
4432
|
`).trim();a.length>0&&(this.value=a,this.defaultValue=a,r.forEach(s=>{(s.textContent??"").trim().length>0&&s.parentNode?.removeChild(s)}))}let t=this.readStoredViewMode();t&&(this.viewMode=t),this.addEventListener("toggle",this.handleExpandToggle)}disconnectedCallback(){super.disconnectedCallback(),this.debounceTimer&&clearTimeout(this.debounceTimer),this.removeEventListener("toggle",this.handleExpandToggle)}firstUpdated(t){super.firstUpdated(t),this.formControlController.updateValidity(),this.viewMode!=="editor"&&this.renderPreview()}readStoredViewMode(){if(!this.storageKey)return null;try{let t=localStorage.getItem(this.storageKey);if(t==="editor"||t==="split"||t==="preview")return t}catch{}return null}writeStoredViewMode(t){if(this.storageKey)try{localStorage.setItem(this.storageKey,t)}catch{}}renderPreview(){if(this.viewMode==="editor"||!this.previewEl)return;let t=qt.parse(this.value||"",{async:!1});this.previewEl.innerHTML=typeof t=="string"?t:""}async handleViewModeChange(){await this.updateComplete,this.writeStoredViewMode(this.viewMode),this.renderPreview(),this.dispatchEvent(new CustomEvent("zn-view-mode-change",{bubbles:!0,composed:!0,detail:{mode:this.viewMode}}))}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity(),this.renderPreview()}handleMarkedReady(){this.renderPreview()}render(){let t=this.markdownSlotController.test("label"),r=this.markdownSlotController.test("help-text"),n=this.markdownSlotController.test("actions"),a=this.markdownSlotController.test("footer"),s=!!this.label||t,l=!!this.helpText||r,d=!!this.caption||n,h=this.viewMode==="editor"||this.viewMode==="split",m=this.viewMode==="preview"||this.viewMode==="split";return u`
|
|
4432
4433
|
<div part="base" class=${D({panel:!0,"panel--flush":this.flush||this.tabbed,"panel--flush-x":this.flushX,"panel--flush-y":this.flushY,"panel--flush-footer":this.flushFooter,"panel--tabbed":this.tabbed,"panel--transparent":this.transparent,"panel--has-actions":n,"panel--has-footer":a,"panel--has-header":d,"panel--cosmic":this.cosmic,"panel--shadow":this.shadow})}>
|
|
4433
4434
|
|
|
@@ -4647,7 +4648,7 @@ ${n}`:""}</li></ol>`};return t(0)}parseTable(o,t){this.index++;let r=[],n=[];for
|
|
|
4647
4648
|
tooltip="Delete block"
|
|
4648
4649
|
@click=${()=>this.deleteBlock(r)}></zn-button>`}
|
|
4649
4650
|
<div part="rendered" class="remarkd-editor__rendered remarkd-rendered"
|
|
4650
|
-
@click=${n=>this.handleRenderedClick(n,r)}>${
|
|
4651
|
+
@click=${n=>this.handleRenderedClick(n,r)}>${Xe(D2(t))}
|
|
4651
4652
|
</div>
|
|
4652
4653
|
</div>`}render(){let t=!this.disabled&&!this.readonly;return u`
|
|
4653
4654
|
<div part="base"
|
|
@@ -4682,7 +4683,7 @@ ${n}`:""}</li></ol>`};return t(0)}parseTable(o,t){this.index++;let r=[],n=[];for
|
|
|
4682
4683
|
<zn-button type="button" icon-button="small" plain icon="x@lu"
|
|
4683
4684
|
tooltip="Cancel"
|
|
4684
4685
|
@click=${this.closeImagePicker}></zn-button>
|
|
4685
|
-
</div>`}};Vt.styles=E(F2),c([F(".remarkd-editor__validation")],Vt.prototype,"validationInput",2),c([O()],Vt.prototype,"blocks",2),c([O()],Vt.prototype,"editingIndex",2),c([O()],Vt.prototype,"slashMenuOpen",2),c([O()],Vt.prototype,"slashQuery",2),c([O()],Vt.prototype,"slashActiveIndex",2),c([O()],Vt.prototype,"imagePickerIndex",2),c([O()],Vt.prototype,"imageEdit",2),c([O()],Vt.prototype,"dropIndicator",2),c([O()],Vt.prototype,"dragIndex",2),c([O()],Vt.prototype,"editShell",2),c([p()],Vt.prototype,"name",2),c([p()],Vt.prototype,"value",2),c([ee()],Vt.prototype,"defaultValue",2),c([p()],Vt.prototype,"placeholder",2),c([p({attribute:"attachment-url"})],Vt.prototype,"attachmentUrl",2),c([p({type:Boolean,reflect:!0})],Vt.prototype,"required",2),c([p({type:Boolean,reflect:!0})],Vt.prototype,"readonly",2),c([p({type:Boolean,reflect:!0})],Vt.prototype,"disabled",2),c([K("value")],Vt.prototype,"handleValueChange",1);var UL=Vt;Vt.define("zn-remarkd-editor");var jL={},yf=ae(class extends
|
|
4686
|
+
</div>`}};Vt.styles=E(F2),c([F(".remarkd-editor__validation")],Vt.prototype,"validationInput",2),c([O()],Vt.prototype,"blocks",2),c([O()],Vt.prototype,"editingIndex",2),c([O()],Vt.prototype,"slashMenuOpen",2),c([O()],Vt.prototype,"slashQuery",2),c([O()],Vt.prototype,"slashActiveIndex",2),c([O()],Vt.prototype,"imagePickerIndex",2),c([O()],Vt.prototype,"imageEdit",2),c([O()],Vt.prototype,"dropIndicator",2),c([O()],Vt.prototype,"dragIndex",2),c([O()],Vt.prototype,"editShell",2),c([p()],Vt.prototype,"name",2),c([p()],Vt.prototype,"value",2),c([ee()],Vt.prototype,"defaultValue",2),c([p()],Vt.prototype,"placeholder",2),c([p({attribute:"attachment-url"})],Vt.prototype,"attachmentUrl",2),c([p({type:Boolean,reflect:!0})],Vt.prototype,"required",2),c([p({type:Boolean,reflect:!0})],Vt.prototype,"readonly",2),c([p({type:Boolean,reflect:!0})],Vt.prototype,"disabled",2),c([K("value")],Vt.prototype,"handleValueChange",1);var UL=Vt;Vt.define("zn-remarkd-editor");var jL={},yf=ae(class extends Ye{constructor(){super(...arguments),this.ot=jL}render(i,o){return o()}update(i,[o,t]){if(Array.isArray(o)){if(Array.isArray(this.ot)&&this.ot.length===o.length&&o.every((r,n)=>r===this.ot[n]))return ie}else if(this.ot===o)return ie;return this.ot=Array.isArray(o)?Array.from(o):o,this.render(o,t)}});var GL={eq:"Is Equal To",neq:"Is Not Equal To",gt:"Greater Than",gte:"Greater Than or Equal To",lt:"Less Than",lte:"Less Than or Equal To",is:"Is","is-not":"Is Not",in:"Is One Of","not-in":"Is Not One Of",contains:"Contains","not-contains":"Does Not Contain","starts-with":"Starts With","ends-with":"Ends With",empty:"Is Empty","not-empty":"Is Not Empty",within:"Within the Last",before:"Before the Last",between:"Between",matches:"Matches"};function zf(i){return i.label??GL[i.value]??i.value}var WL=[];function j2(i){let o=i.data?.conditions;return Array.isArray(o)?o:WL}var V2={id:"in"},Fp={id:"out"},Bp="__new__",Ds="application/x-zn-flow-type",Hp;function Vp(){return Hp||(Hp=new Image,Hp.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"),Hp}var ne=240,er=60,wf=ne+80,_f=40,KL=40,YL=40,U2=240,XL=20,QL=20,JL=20;function kf(i,o,t,r=!1){let n=i.y+er,a=n+_f;if(t&&t.y>=n){let s=r?n+JL:a,l=Math.round((n+t.y)/2-o/2);return Math.max(s,Math.min(l,t.y-QL-o))}return a+KL}function Cf(i){let o=i.length*7.2,t=Math.max(1,Math.ceil(o/(U2-36)));return{w:Math.min(U2,Math.round(36+o)),h:YL+(t-1)*XL}}var je=20;function Dr(i){return Math.round(i/je)*je}var G2=10,ZL=4,tq=20;function Sf(i,o){let t=i.m+o.m;return i.x<o.x+o.w+t&&o.x<i.x+i.w+t&&i.y<o.y+o.h+t&&o.y<i.y+i.h+t}function bc(i,o){let t=Ge(i,o(i.type)),r=i.x+ne/2;return t.map((n,a)=>Math.round(r+(t.length===1?0:(a-(t.length-1)/2)*wf)))}function gc(i,o,t,r){let n=[{x:i.x,y:i.y,w:ne,h:er,m:G2}],a=Ge(i,o(i.type)),s=bc(i,o);return a.forEach((l,d)=>{if(!l.label)return;let h=Cf(l.label),m=r.find(b=>b.source.node===i.id&&b.source.port===l.id),f=m?t.find(b=>b.id===m.target.node):void 0;n.push({x:s[d]-h.w/2,y:kf(i,h.h,f,a.length===1),w:h.w,h:h.h+tq,m:ZL})}),n}function W2(i,o,t,r,n){let a=gc(i,t,r,n);return gc(o,t,r,n).some(s=>a.some(l=>Sf(l,s)))}function Up(i,o,t,r){let n=gc(i,o,t,r).slice(1);return n.length?t.some(a=>a.id!==i.id&&gc(a,o,t,r).some(s=>n.some(l=>Sf(l,s)))):!1}function K2(i,o,t,r,n){let a={x:i.x,y:i.y,w:ne,h:er,m:G2};return gc(o,t,r,n).some(s=>Sf(a,s))}var Ef=200,Tf=120,Y2=120,X2=80;function Q2(i,o,t,r){return{x:i.x+ne*(t+1)/(r+1),y:i.y+(o==="in"?0:er)}}function J2(){return{nodes:[],connections:[],notes:[]}}function jp(i){return i?i.inputs??[V2]:[V2]}function $f(i){return i?i.outputs??[Fp]:[Fp]}function Pi(i,o){return i.inputs??jp(o)}function Ge(i,o){return i.outputs??$f(o)}function vc(i,o){return Pi(i,o)[0]?.id??null}function Z2(i,o){let t=new Set,r=n=>{for(let a of i.connections)a.source.node===n&&!t.has(a.target.node)&&(t.add(a.target.node),r(a.target.node))};return r(o),t}function Hi(i,o){let t=new Set(i.map(h=>h.id)),r=new Map(i.map(h=>[h.id,[]])),n=new Set;for(let h of o)!t.has(h.source.node)||!t.has(h.target.node)||(r.get(h.source.node).push(h),n.add(h.target.node));let a=new Set,s=new Set,l=new Set,d=h=>{s.add(h),l.add(h);for(let m of r.get(h)??[])l.has(m.target.node)?a.add(m):s.has(m.target.node)||d(m.target.node);l.delete(h)};return i.filter(h=>!n.has(h.id)).forEach(h=>d(h.id)),i.forEach(h=>{s.has(h.id)||d(h.id)}),a}var t_=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;font-size:0.8125rem}.editor{display:flex;flex-direction:column;gap:14px}.picker{display:flex;flex-direction:column;gap:10px;padding:12px;border:1px solid rgb(var(--zn-border-color));border-radius:8px;background:rgb(var(--zn-panel))}.picker__head{display:flex;align-items:center;justify-content:space-between;font-weight:600}.picker__back{flex:0 0 auto}.picker__list{display:flex;flex-direction:column}.picker__item{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;padding:10px 12px;margin-top:-1px;border:1px solid rgb(var(--zn-border-color));background:rgb(var(--zn-panel));color:rgb(var(--zn-text));font-size:0.8125rem;text-align:left;cursor:pointer}.picker__item:first-child{margin-top:0;border-top-left-radius:8px;border-top-right-radius:8px}.picker__item:last-child{border-bottom-left-radius:8px;border-bottom-right-radius:8px}.picker__item:hover{background:rgb(var(--zn-color-tab))}.picker__item-text{display:flex;flex-direction:column;gap:2px;min-width:0}.picker__item-label{font-weight:500}.picker__item-description{font-size:0.75rem;color:rgb(var(--zn-color-muted-text))}.picker__empty{margin:0;padding:10px 2px;font-size:0.75rem;color:rgb(var(--zn-color-muted-text))}.conditions{display:flex;flex-direction:column;align-items:flex-start;gap:12px}.group{display:flex;flex-direction:column;align-items:flex-start;gap:12px;width:100%;padding:14px;border:1px solid rgb(var(--zn-border-color));border-radius:8px;background:rgb(var(--zn-panel))}.and-rule{font-family:var(--zn-font-sans);font-size:var(--zn-text-paragraph-font-size);font-weight:var(--zn-text-paragraph-font-weight);line-height:var(--zn-text-paragraph-line-height);color:var(--zn-text-paragraph-color);text-transform:var(--zn-text-paragraph-transform);display:flex;align-items:center;gap:10px;width:100%;color:rgb(var(--zn-color-success))}.and-rule::after{content:"";flex:1;height:1px;background:color-mix(in srgb,rgb(var(--zn-color-success)) 50%,transparent)}.or-label{font-family:var(--zn-font-sans);font-size:var(--zn-text-paragraph-font-size);font-weight:var(--zn-text-paragraph-font-weight);line-height:var(--zn-text-paragraph-line-height);color:var(--zn-text-paragraph-color);text-transform:var(--zn-text-paragraph-transform);margin:2px 0;color:rgb(var(--zn-color-error))}.condition{display:flex;flex-direction:column;gap:10px;width:100%}.condition__head{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%}.condition__name{font-family:var(--zn-font-sans);font-size:var(--zn-text-heading-section-font-size);font-weight:var(--zn-text-heading-section-font-weight);line-height:var(--zn-text-heading-section-line-height);color:var(--zn-text-heading-section-color);text-transform:var(--zn-text-heading-section-transform)}.condition__remove{flex:0 0 auto}.condition__row{display:flex;align-items:center;flex-wrap:wrap;gap:6px}.condition__row-label,.condition__suffix{font-size:0.75rem;color:rgb(var(--zn-color-muted-text));white-space:nowrap}.control{min-width:0}.control--operator{flex:1 1 0;min-width:120px}.control--number{flex:0 0 auto;width:80px}.control--unit{flex:1 1 0}.control--value{flex:1 1 0;min-width:100px}zn-select.control::part(display-input){text-overflow:ellipsis}.actions{display:flex;align-items:center;gap:8px;margin-top:2px;padding-top:16px;border-top:1px solid rgb(var(--zn-border-color))}`;var Lo=class Lo extends C{constructor(){super(...arguments);this.filters=[];this.value=[];this._draft=[];this._picker=null;this._search="";this._valueJson="";this._save=()=>{this._emit("flow-conditions-save",{conditions:JSON.parse(JSON.stringify(this._draft))})};this._cancel=()=>{this._emit("flow-conditions-cancel")}}willUpdate(t){if(super.willUpdate(t),t.has("value")){let r=JSON.stringify(this.value??[]);r!==this._valueJson&&(this._valueJson=r,this._draft=JSON.parse(r),this._picker=null,this._search="")}}_emit(t,r){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:r}))}_cloneDraft(){return this._draft.map(t=>t.map(r=>({...r,values:{...r.values}})))}_addCondition(t){let r={};t.fields.forEach(s=>{r[s.id]={...s.operators?.length?{operator:s.operators[0].value}:{},...s.value!==void 0?{value:s.value}:{},...s.units?.length?{unit:s.units[0].value}:{}}});let n=this._cloneDraft(),a=Math.min(this._picker??0,n.length);a===n.length&&n.push([]),n[a].push({filter:t.id,values:r}),this._draft=n,this._picker=null,this._search=""}_removeCondition(t,r){let n=this._cloneDraft();n[t].splice(r,1),this._draft=n.filter(a=>a.length)}_setField(t,r,n,a){let s=this._cloneDraft(),l=s[t][r];l.values[n]={...l.values[n],...a},this._draft=s}_renderPicker(){let t=this._search.trim().toLowerCase(),r=this.filters.filter(n=>!t||n.label.toLowerCase().includes(t));return u`
|
|
4686
4687
|
<div part="picker" class="picker">
|
|
4687
4688
|
<div class="picker__head">
|
|
4688
4689
|
<span>Add Filters</span>
|
|
@@ -4801,7 +4802,7 @@ ${n}`:""}</li></ol>`};return t(0)}parseTable(o,t){this.index++;let r=[],n=[];for
|
|
|
4801
4802
|
<zn-button class="actions__cancel" icon="x@lu" @click="${this._cancel}" panel-bg>Cancel</zn-button>
|
|
4802
4803
|
</div>
|
|
4803
4804
|
</div>
|
|
4804
|
-
`}};Lo.styles=E(t_),Lo.dependencies={"zn-button":Ct,"zn-icon":ct,"zn-input":ke,"zn-option":
|
|
4805
|
+
`}};Lo.styles=E(t_),Lo.dependencies={"zn-button":Ct,"zn-icon":ct,"zn-input":ke,"zn-option":Ne,"zn-select":le},c([p({attribute:!1})],Lo.prototype,"filters",2),c([p({attribute:!1})],Lo.prototype,"value",2),c([O()],Lo.prototype,"_draft",2),c([O()],Lo.prototype,"_picker",2),c([O()],Lo.prototype,"_search",2);var Ns=Lo;var Af=Ns;Ns.define("zn-flow-branch-conditions");var e_=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{--node-accent:rgb(var(--zn-color-primary));--port-size:11px;position:absolute;top:0;left:0;display:block;-webkit-user-select:none;-moz-user-select:none;user-select:none;touch-action:none}:host([dragging]) .card{cursor:grabbing}.card{position:relative;display:flex;flex-direction:column;justify-content:center;width:100%;height:100%;padding:0 10px;background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:10px;box-shadow:0 1px 2px rgba(var(--zn-shadow),0.4);cursor:grab;transition:border-color 0.12s ease,box-shadow 0.12s ease}.card:hover{border-color:rgb(var(--zn-color-border-active))}.card.selected{border-color:var(--node-accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--node-accent) 35%,transparent)}.card.link-target{border-color:rgb(var(--zn-color-primary));box-shadow:0 0 0 3px color-mix(in srgb,rgb(var(--zn-color-primary)) 30%,transparent)}.card.error{border-color:rgb(var(--zn-color-error));background:color-mix(in srgb,rgb(var(--zn-color-error)) 6%,rgb(var(--zn-panel)))}.body{display:flex;align-items:center;gap:10px}.icon-tile{display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:36px;height:36px;border-radius:8px;color:var(--node-accent);background:color-mix(in srgb,var(--node-accent) 14%,transparent)}.text{display:flex;flex-direction:column;min-width:0;flex:1 1 auto}.text .title{font-size:0.8125rem;font-weight:600;color:rgb(var(--zn-text));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.text .subtitle{font-size:0.75rem;color:rgb(var(--zn-color-muted-text));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.menu{flex:0 0 auto}zn-menu-item.danger{color:rgb(var(--zn-color-error))}.ports{position:absolute;left:0;width:100%;height:0}.ports--in{top:0}.ports--out{bottom:0}.port{position:absolute;left:0;top:0;transform:translate(-50%,-50%);width:var(--port-size);height:var(--port-size);border-radius:50%;background:rgb(var(--zn-panel));border:2px solid var(--node-accent);box-sizing:border-box;pointer-events:none}.port--in{transition:transform 0.12s ease,background 0.12s ease,box-shadow 0.12s ease}:host([link-target]) .port--in{transform:translate(-50%,-50%) scale(1.4);background:rgb(var(--zn-color-primary));border-color:rgb(var(--zn-color-primary));box-shadow:0 0 0 4px color-mix(in srgb,rgb(var(--zn-color-primary)) 25%,transparent)}.port--out{pointer-events:auto;cursor:pointer;transition:transform 0.12s ease,background 0.12s ease,box-shadow 0.12s ease}.port--out:hover{transform:translate(-50%,-50%) scale(1.4);background:var(--node-accent);box-shadow:0 0 0 4px color-mix(in srgb,var(--node-accent) 25%,transparent)}.port-wrap{position:absolute}.port-label{position:absolute;top:calc(var(--port-size) / 2 + 3px);left:8px;font-size:0.625rem;font-weight:600;letter-spacing:0.02em;color:rgb(var(--zn-color-muted-text));white-space:nowrap;pointer-events:none}`;var to=class extends C{constructor(){super(...arguments);this.selected=!1;this.error=!1;this.dragging=!1;this.linkTarget=!1;this._onBodyPointerDown=t=>{if(t.button!==0)return;let r=t.target;r.closest(".port")||r.closest("zn-dropdown")||(t.stopPropagation(),this._emit("flow-node-select",{nodeId:this.node.id}),this._emit("flow-node-grab",{nodeId:this.node.id,clientX:t.clientX,clientY:t.clientY}))}}updated(t){super.updated(t),this.style.width=`${ne}px`,this.style.height=`${er}px`,this.style.setProperty("--node-accent",this.type?.color??"rgb(var(--zn-color-primary))")}get nodeTitle(){return this.node?.label??this.type?.label??this.node?.type??"Node"}get nodeSubtitle(){let t=this.node?.data?.subtitle??this.node?.data?.description;return typeof t=="string"?t:this.type?.description??""}_emit(t,r){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:r}))}_action(t){this._emit("flow-node-action",{nodeId:this.node.id,action:t})}_renderPorts(t,r){let n=t.length;return u`
|
|
4805
4806
|
<div class="ports ports--${r}">
|
|
4806
4807
|
${t.map((a,s)=>{let l=`${100*(s+1)/(n+1)}%`;return u`
|
|
4807
4808
|
<div class="port-wrap" style="left:${l}">
|
|
@@ -4810,7 +4811,7 @@ ${n}`:""}</li></ol>`};return t(0)}parseTable(o,t){this.index++;let r=[],n=[];for
|
|
|
4810
4811
|
</div>
|
|
4811
4812
|
`})}
|
|
4812
4813
|
</div>
|
|
4813
|
-
`}render(){if(!this.node)return u``;let t=Pi(this.node,this.type),r=
|
|
4814
|
+
`}render(){if(!this.node)return u``;let t=Pi(this.node,this.type),r=Ge(this.node,this.type);return u`
|
|
4814
4815
|
<div
|
|
4815
4816
|
part="base"
|
|
4816
4817
|
class="${D({card:!0,selected:this.selected,error:this.error,"link-target":this.linkTarget})}"
|
|
@@ -4850,7 +4851,7 @@ ${n}`:""}</li></ol>`};return t(0)}parseTable(o,t){this.index++;let r=[],n=[];for
|
|
|
4850
4851
|
</div>
|
|
4851
4852
|
</div>`:""}
|
|
4852
4853
|
</div>
|
|
4853
|
-
`}};to.styles=E(e_),to.dependencies={"zn-icon":ct,"zn-button":Ct,"zn-dropdown":nr,"zn-menu":Fo,"zn-menu-item":In},c([p({attribute:!1})],to.prototype,"node",2),c([p({attribute:!1})],to.prototype,"type",2),c([p({type:Boolean,reflect:!0})],to.prototype,"selected",2),c([p({type:Boolean,reflect:!0})],to.prototype,"error",2),c([p({type:Boolean,reflect:!0})],to.prototype,"dragging",2),c([p({type:Boolean,reflect:!0,attribute:"link-target"})],to.prototype,"linkTarget",2);var r_=to;to.define("zn-flow-node");var o_=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;position:relative;width:100%;height:100%;overflow:hidden}.viewport{position:absolute;inset:0;overflow:hidden;background-color:rgb(var(--zn-color-body));background-image:radial-gradient(rgb(var(--zn-color-border)) 1px,transparent 1px);background-size:20px 20px;cursor:grab;touch-action:none}.viewport.grabbing,.viewport.grabbing *{cursor:grabbing !important}.viewport.connecting,.viewport.connecting *{cursor:crosshair !important}.viewport.resizing,.viewport.resizing *{cursor:nwse-resize !important}.viewport.linking{cursor:crosshair}.viewport.step-dragging .add-point{color:rgb(var(--zn-panel));background:rgb(var(--zn-color-primary));border-style:solid;box-shadow:0 0 0 4px color-mix(in srgb,rgb(var(--zn-color-primary)) 22%,transparent)}.connections{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}.connections .wire{fill:none;stroke:rgb(var(--zn-color-primary));stroke-width:2}.connections .wire--stub{stroke:rgb(var(--zn-color-border-active));stroke-dasharray:4 4}.connections .wire--preview{stroke-dasharray:6 4}.connections .wire--loop{stroke:rgb(var(--zn-color-warning))}.connections marker path{fill:rgb(var(--zn-color-primary))}.connections marker#flow-arrow-loop path{fill:rgb(var(--zn-color-warning))}.add-point{position:absolute;top:0;left:0;display:flex;align-items:center;justify-content:center;width:24px;height:24px;margin:-12px;padding:0;border-radius:50%;color:rgb(var(--zn-color-primary));background:rgb(var(--zn-panel));border:1px dashed rgb(var(--zn-color-border-active));cursor:pointer;transition:background 0.12s ease,color 0.12s ease}.add-point:hover{color:rgb(var(--zn-panel));background:rgb(var(--zn-color-primary));border-style:solid}.add-point--target{color:rgb(var(--zn-panel));background:rgb(var(--zn-color-primary));border-style:solid;box-shadow:0 0 0 4px color-mix(in srgb,rgb(var(--zn-color-primary)) 25%,transparent)}.add-point--wire{width:20px;height:20px;margin:-10px}.layer{position:absolute;top:0;left:0;transform-origin:0 0;width:0;height:0}.node-pos{position:absolute;top:0;left:0}.branch-pill{display:flex;align-items:center;justify-content:center;width:-moz-max-content;width:max-content;max-width:240px;box-sizing:border-box;text-align:center;overflow-wrap:anywhere;overflow:hidden;padding:0 18px;border-radius:10px;font:inherit;font-size:0.8125rem;font-weight:600;line-height:20px;color:rgb(var(--zn-text));background:color-mix(in srgb,rgb(var(--zn-color-primary)) 8%,rgb(var(--zn-panel)));border:1px solid color-mix(in srgb,rgb(var(--zn-color-primary)) 45%,transparent);cursor:pointer;transition:border-color 0.12s ease,box-shadow 0.12s ease}.branch-pill:hover{border-color:rgb(var(--zn-color-primary));box-shadow:0 1px 3px rgba(var(--zn-shadow),0.4)}.branch-pill--selected{border-color:rgb(var(--zn-color-primary));background:color-mix(in srgb,rgb(var(--zn-color-primary)) 16%,rgb(var(--zn-panel)))}.branch-pill--loop{background:color-mix(in srgb,rgb(var(--zn-color-warning)) 10%,rgb(var(--zn-panel)));border-color:color-mix(in srgb,rgb(var(--zn-color-warning)) 55%,transparent)}.branch-pill--loop:hover{border-color:rgb(var(--zn-color-warning))}.branch-pill--loop.branch-pill--selected{border-color:rgb(var(--zn-color-warning));background:color-mix(in srgb,rgb(var(--zn-color-warning)) 18%,rgb(var(--zn-panel)))}.branch-pill-wrap{position:absolute;top:0;left:0;transform:translateX(-50%);display:flex;align-items:stretch}.branch-pill-wrap::after{content:"";position:absolute;left:100%;top:0;width:40px;height:100%}.branch-pill-wrap:hover .branch-pill-delete{opacity:1;transform:translate(0,-50%);pointer-events:auto;transition-delay:0.15s}.branch-pill-port{position:absolute;z-index:1;left:50%;bottom:0;transform:translate(-50%,50%);width:11px;height:11px;box-sizing:border-box;border-radius:50%;background:rgb(var(--zn-panel));border:2px solid rgb(var(--zn-color-primary));cursor:pointer;transition:transform 0.12s ease,box-shadow 0.12s ease}.branch-pill-port:hover{transform:translate(-50%,50%) scale(1.35);box-shadow:0 0 0 4px color-mix(in srgb,rgb(var(--zn-color-primary)) 20%,transparent)}.branch-pill-delete{position:absolute;z-index:1;left:calc(100% + 8px);top:50%;transform:translate(-10px,-50%);display:flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;border-radius:50%;background:rgb(var(--zn-color-error));color:white;cursor:pointer;opacity:0;pointer-events:none;transition:opacity 0.15s ease,transform 0.15s ease}.branch-pill-delete:hover{filter:brightness(1.1)}.drop-ghost{position:absolute;top:0;left:0;display:flex;align-items:center;gap:10px;padding:0 12px;border:2px dashed rgb(var(--zn-color-primary));border-radius:10px;background:color-mix(in srgb,rgb(var(--zn-color-primary)) 10%,rgb(var(--zn-panel)));opacity:0.9;pointer-events:none}.drop-ghost__icon{--node-accent:rgb(var(--zn-color-primary));display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:36px;height:36px;border-radius:8px;color:var(--node-accent);background:color-mix(in srgb,var(--node-accent) 16%,rgb(var(--zn-panel)))}.drop-ghost__label{font-size:0.8125rem;font-weight:600;color:rgb(var(--zn-text));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.toolbar{position:absolute;top:16px;display:flex;align-items:center;gap:2px;padding:3px;background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:8px;box-shadow:0 1px 3px rgba(var(--zn-shadow),0.4);z-index:2}.toolbar--history{left:16px}.toolbar--zoom{right:16px}.bin{position:absolute;right:16px;bottom:16px;z-index:2;display:flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:12px;color:rgb(var(--zn-color-muted-text));background:rgb(var(--zn-panel));border:1px dashed rgb(var(--zn-color-border-active));box-shadow:0 1px 3px rgba(var(--zn-shadow),0.4);transition:background 0.12s ease,color 0.12s ease,transform 0.12s ease}.bin--over{color:rgb(var(--zn-panel));background:rgb(var(--zn-color-error));border-style:solid;border-color:rgb(var(--zn-color-error));transform:scale(1.12)}.note{position:absolute;display:flex;flex-direction:column;background:#fef9c3;border:1px solid #fde68a;border-radius:4px;box-shadow:0 2px 6px rgba(0,0,0,0.12)}.note__resize{position:absolute;right:0;bottom:0;width:16px;height:16px;cursor:nwse-resize;background:linear-gradient(135deg,transparent 0 50%,#d9c64a 50% 60%,transparent 60% 70%,#d9c64a 70% 80%,transparent 80%)}.note__bar{display:flex;justify-content:flex-end;height:20px;cursor:grab}.note__close{width:20px;height:20px;padding:0;font-size:14px;line-height:1;color:#92400e;background:transparent;cursor:pointer}.note__text{flex:1;margin:0;padding:0 10px 10px;resize:none;border:none;outline:none;background:transparent;font:inherit;font-size:0.8125rem;color:#713f12}`;var Lf=.25,n_=2,i_=.15,qf=40,eq=20,Mf=20,a_=10,rq=8,Gp=40,oq=20,xc=Ds,me=class me extends C{constructor(){super(...arguments);this.nodes=[];this.connections=[];this.notes=[];this.selectedNodeId=null;this.errorNodes=new Set;this.movingNodeId=null;this.dragType=null;this.selectedBranch=null;this.zoom=1;this.panX=0;this.panY=0;this.drag=null;this._overBin=!1;this._dropGhost=null;this._linking=null;this._linkPos=null;this._linkTarget=null;this._linkClient=null;this._linkScrollRaf=null;this._dragMoved=!1;this._viewInitialised=!1;this._onWheel=t=>{if(t.composedPath().some(d=>d instanceof HTMLTextAreaElement))return;t.preventDefault(),this._viewInitialised=!0;let r=t.deltaMode===1?16:t.deltaMode===2?100:1,n=t.deltaX*r,a=t.deltaY*r;if(t.ctrlKey||t.metaKey){let d=Math.min(n_,Math.max(Lf,this.zoom*Math.exp(-a*.0015)));if(d===this.zoom)return;let h=this.getBoundingClientRect(),m=t.clientX-h.left,f=t.clientY-h.top,b=(m-this.panX)/this.zoom,g=(f-this.panY)/this.zoom;this.zoom=+d.toFixed(3),this.panX=Math.round(m-b*this.zoom),this.panY=Math.round(f-g*this.zoom);return}let s=t.shiftKey&&!n?a:n,l=t.shiftKey&&!n?0:a;this.panX-=Math.round(s),this.panY-=Math.round(l)};this._onBackgroundPointerDown=t=>{if(t.button===1){t.preventDefault(),this._viewInitialised=!0,this.drag={kind:"pan",ox:t.clientX,oy:t.clientY,px:this.panX,py:this.panY},this._setupWindow("grabbing");return}if(t.button===0){if(this._viewInitialised=!0,this._linking){let r=this._linking,n=this._linkTarget;if(this._cancelLink(),n){this._emit("flow-link-assign",{nodeId:r.nodeId,port:r.port,targetId:n});return}}this._emit("flow-node-select",{nodeId:null}),this.drag={kind:"pan",ox:t.clientX,oy:t.clientY,px:this.panX,py:this.panY},this._setupWindow("grabbing")}};this._onNodeGrab=t=>{if(this._linking){let a=this._linking;this._cancelLink(),a.nodeId!==t.detail.nodeId&&this._emit("flow-link-assign",{nodeId:a.nodeId,port:a.port,targetId:t.detail.nodeId});return}let r=this.nodes.find(a=>a.id===t.detail.nodeId);if(!r)return;let n=this.screenToCanvas(t.detail.clientX,t.detail.clientY);this.drag={kind:"node",id:r.id,offX:n.x-r.x,offY:n.y-r.y,startX:r.x,startY:r.y},this._dragMoved=!1,this._setupWindow("grabbing")};this._onNodeSelect=t=>{this._linking&&t.detail.nodeId&&t.stopPropagation()};this._onPortClick=t=>{let{nodeId:r}=t.detail;if(this._linking&&this._linking.nodeId!==r){let s=this._linking;this._cancelLink(),this._emit("flow-link-assign",{nodeId:s.nodeId,port:s.port,targetId:r});return}let n=this.nodes.find(s=>s.id===r);if(!n)return;let a=We(n,this._typeFor(n)).find(s=>!this.connections.some(l=>l.source.node===r&&l.source.port===s.id));this._startLink(r,a?.id??Bp)};this._onLinkPointerMove=t=>{this._linkClient={x:t.clientX,y:t.clientY},this._updateLinkFromClient(t.clientX,t.clientY)};this._linkEdgeScroll=()=>{if(this._linkScrollRaf=null,!!this._linking){if(this._linkClient){let t=this.getBoundingClientRect(),r=48,n=14,a=m=>Math.min(n,Math.ceil((r-m)/r*n)),{x:s,y:l}=this._linkClient,d=0,h=0;s<t.left+r?d=a(s-t.left):s>t.right-r&&(d=-a(t.right-s)),l<t.top+r?h=a(l-t.top):l>t.bottom-r&&(h=-a(t.bottom-l)),(d||h)&&(this.panX+=d,this.panY+=h,this._updateLinkFromClient(s,l))}this._linkScrollRaf=requestAnimationFrame(this._linkEdgeScroll)}};this._onLinkKeyDown=t=>{t.key==="Escape"&&this._cancelLink()};this._cancelLink=()=>{this._linking&&(this._linking=null,this._linkPos=null,this._linkTarget=null,this._linkClient=null,this._linkScrollRaf!==null&&(cancelAnimationFrame(this._linkScrollRaf),this._linkScrollRaf=null),window.removeEventListener("pointermove",this._onLinkPointerMove),window.removeEventListener("keydown",this._onLinkKeyDown),window.removeEventListener("blur",this._cancelLink))};this._onPointerMove=t=>{if(!this.drag)return;if(this.drag.kind==="pan"){this.panX=this.drag.px+(t.clientX-this.drag.ox),this.panY=this.drag.py+(t.clientY-this.drag.oy);return}let r=this.screenToCanvas(t.clientX,t.clientY);if(this.drag.kind==="node"){this._overBin=this._binHit(t.clientX,t.clientY);let n=this.nodes.find(a=>a.id===this.drag.id);if(n){let a={x:Dr(r.x-this.drag.offX),y:Dr(r.y-this.drag.offY)},s=new Set(this.connections.filter(h=>h.target.node===n.id&&h.source.node!==n.id).map(h=>h.source.node)),l=h=>{let m={...n,...h},f=this.nodes.map(g=>g.id===n.id?m:g),b=g=>this.registry?.get(g);return f.some(g=>g!==m&&W2(m,g,b,f,this.connections))?!1:![...s].some(g=>{let v=f.find(x=>x.id===g);return!!v&&Up(v,b,f,this.connections)})},d=l(a)?a:l({x:a.x,y:n.y})?{x:a.x,y:n.y}:l({x:n.x,y:a.y})?{x:n.x,y:a.y}:null;d&&(d.x!==n.x||d.y!==n.y)&&(this._dragMoved||this._beginMove(),n.x=d.x,n.y=d.y,this.requestUpdate())}}else if(this.drag.kind==="note"){let n=this.notes.find(a=>a.id===this.drag.id);n&&(this._dragMoved||this._beginMove(),n.x=Dr(r.x-this.drag.offX),n.y=Dr(r.y-this.drag.offY),this.requestUpdate())}else if(this.drag.kind==="note-resize"){let n=this.notes.find(a=>a.id===this.drag.id);n&&(this._dragMoved||this._beginMove(),n.width=Math.max(Y2,Dr(r.x-n.x)),n.height=Math.max(X2,Dr(r.y-n.y)),this.requestUpdate())}};this._onPointerUp=()=>{let t=this.drag,r=this._overBin;if(this.drag=null,this._overBin=!1,this._teardownWindow(),!!t){if(t.kind==="node"&&this._dragMoved&&r){let n=this.nodes.find(a=>a.id===t.id);n&&(n.x=t.startX,n.y=t.startY),this._emit("flow-node-action",{nodeId:t.id,action:"delete"});return}(t.kind==="node"||t.kind==="note"||t.kind==="note-resize")&&this._dragMoved&&this._emit("flow-change-commit")}};this._onViewportDragOver=t=>{if(!t.dataTransfer?.types.includes(xc))return;this._viewInitialised=!0,t.preventDefault();let r=t.composedPath().some(a=>a instanceof Element&&a.classList.contains("add-point"));t.dataTransfer.dropEffect=r?"copy":"move";let n=this.screenToCanvas(t.clientX,t.clientY);this._dropGhost={x:Dr(n.x-ne/2),y:Dr(n.y-er/2)}};this._onViewportDragLeave=t=>{let r=this.getBoundingClientRect();(t.clientX<r.left||t.clientX>r.right||t.clientY<r.top||t.clientY>r.bottom)&&(this._dropGhost=null)};this._clearDropGhost=()=>{this._dropGhost=null};this._onAddPointDragOver=t=>{t.dataTransfer?.types.includes(xc)&&(t.preventDefault(),t.dataTransfer.dropEffect="copy")};this._onBinDragOver=t=>{t.dataTransfer?.types.includes(xc)&&(t.preventDefault(),t.stopPropagation(),t.dataTransfer.dropEffect="move",this._overBin=!0,this._dropGhost=null)};this._onBinDragLeave=()=>{this._overBin=!1};this._onBinDrop=t=>{t.preventDefault(),t.stopPropagation(),this._overBin=!1,this._dropGhost=null}}connectedCallback(){super.connectedCallback(),this.addEventListener("flow-node-grab",this._onNodeGrab),this.addEventListener("flow-node-select",this._onNodeSelect),this.addEventListener("flow-port-click",this._onPortClick),this.addEventListener("wheel",this._onWheel,{passive:!1})}disconnectedCallback(){this.removeEventListener("flow-node-grab",this._onNodeGrab),this.removeEventListener("flow-node-select",this._onNodeSelect),this.removeEventListener("flow-port-click",this._onPortClick),this.removeEventListener("wheel",this._onWheel),this._cancelLink(),this._teardownWindow(),super.disconnectedCallback()}updated(t){if(super.updated(t),this.style.setProperty("--flow-zoom",String(this.zoom)),t.has("dragType")&&!this.dragType&&(this._dropGhost=null),!this._viewInitialised&&this.nodes.length){let r=this.getBoundingClientRect();r.width&&r.height&&(this._viewInitialised=!0,this._resetView())}}_emit(t,r){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:r}))}screenToCanvas(t,r){let n=this.getBoundingClientRect();return{x:(t-n.left-this.panX)/this.zoom,y:(r-n.top-this.panY)/this.zoom}}_typeFor(t){return this.registry?.get(t.type)}_setupWindow(t=""){window.addEventListener("pointermove",this._onPointerMove),window.addEventListener("pointerup",this._onPointerUp),t&&(document.body.style.cursor=t)}_teardownWindow(){window.removeEventListener("pointermove",this._onPointerMove),window.removeEventListener("pointerup",this._onPointerUp),document.body.style.cursor=""}_onBranchPortClick(t,r){if(this._linking){let n=this._linking;this._cancelLink(),n.nodeId!==t&&this._emit("flow-link-assign",{nodeId:n.nodeId,port:n.port,targetId:t});return}this._startLink(t,r)}_startLink(t,r){this._linking={nodeId:t,port:r},this._linkPos=null,this._linkClient=null,window.addEventListener("pointermove",this._onLinkPointerMove),window.addEventListener("keydown",this._onLinkKeyDown),window.addEventListener("blur",this._cancelLink),this._linkScrollRaf=requestAnimationFrame(this._linkEdgeScroll)}_updateLinkFromClient(t,r){let n=this.screenToCanvas(t,r);this._linkPos=n;let a=this._linking;if(!a)return;let s=12,l=this.nodes.find(d=>d.id!==a.nodeId&&n.x>=d.x-s&&n.x<=d.x+ne+s&&n.y>=d.y-s&&n.y<=d.y+er+s&&Pi(d,this._typeFor(d)).length>0);this._linkTarget=l?.id??null}_binHit(t,r){let n=this.shadowRoot?.querySelector(".bin")?.getBoundingClientRect();return!!n&&t>=n.left&&t<=n.right&&r>=n.top&&r<=n.bottom}_beginMove(){this._dragMoved=!0,this._emit("flow-interaction-start")}_outputLayout(t){let r=We(t,this._typeFor(t)),n=t.x+ne/2,a=t.y+er,s=a+_f,l=bc(t,h=>this.registry?.get(h)),d=r.map((h,m)=>{let f=this.connections.find($=>$.source.node===t.id&&$.source.port===h.id),b=f?this.nodes.find($=>$.id===f.target.node):void 0,g=l[m],v=h.label?Cf(h.label).h:0,x=h.label?kf(t,v,b,r.length===1):null,_=x===null?s:x+v;return{port:h,conn:f,child:b,x:g,pillTop:x,pillH:v,exitY:_}});return{cx:n,by:a,busY:s,branches:d}}_inputAnchor(t,r){let n=Pi(t,this._typeFor(t)),a=Math.max(n.findIndex(s=>s.id===r),0);return{x:Q2(t,"in",a,n.length).x,y:t.y}}_elbowMidOffsets(){let t=new Map;for(let n of this.nodes){let{branches:a}=this._outputLayout(n);for(let s of a){if(!s.conn||!s.child)continue;let{x:l,y:d}=this._inputAnchor(s.child,s.conn.target.port);if(l===s.x||d-Mf<s.exitY)continue;let h=Dr((s.exitY+d)/2),m=`${s.conn.target.node}:${s.conn.target.port}`,f=t.get(h)??new Map;t.set(h,f),f.set(m,[...f.get(m)??[],s.conn.id])}}let r=new Map;for(let n of t.values()){if(n.size<2)continue;let a=[...n.keys()].sort();a.forEach((s,l)=>{let d=(l-Math.floor((a.length-1)/2))*oq;n.get(s).forEach(h=>r.set(h,d))})}return r}_segmentBlocked(t,r,n){let l=Math.min(t.x,r.x),d=Math.max(t.x,r.x),h=Math.min(t.y,r.y),m=Math.max(t.y,r.y);return this.nodes.some(f=>!n.has(f.id)&&l<f.x+ne+8&&d>f.x-8&&h<f.y+er+8&&m>f.y-48)}_routeClear(t,r){for(let n=0;n<t.length-1;n++)if(this._segmentBlocked(t[n],t[n+1],r))return!1;return!0}_routePoints(t,r,n,a=0,s,l=!1){let{x:d,y:h}=this._inputAnchor(r,n),m=new Set(s?[r.id,s]:[r.id]);if(h-Mf>=t.y){let _=Math.round((t.y+h)/2)+a,$=h-t.y,N=Math.min(h-12,Math.ceil((t.y+$/4)/Ge)*Ge),G=Math.max(N,Math.floor((h-$/4)/Ge)*Ge),I=W=>Math.max(N,Math.min(G,W)),w=null;if(d===t.x){let W=[t,{x:d,y:h}];if(this._routeClear(W,m))return W;w=W}else for(let W=0;W<=20;W++)for(let tt of W===0?[_]:[_+W*Ge,_-W*Ge]){let dt=I(tt);if(dt!==tt&&W>0)continue;let gt=[t,{x:t.x,y:dt},{x:d,y:dt},{x:d,y:h}];if(w??(w=gt),this._routeClear(gt,m))return gt}let T=Math.floor($/2/10)*10,L=Math.max(10,Math.round($/4/10)*10);for(let W=0;W<=12;W++)for(let tt of W===0?[L]:[L+W*10,L-W*10]){if(tt<10||tt>T)continue;let dt=t.y+tt,gt=h-tt;if(!(gt<dt))for(let _t=1;_t<=14;_t++)for(let Nt of[1,-1]){let ze=t.x+Nt*_t*Ge,Ke=[t,{x:t.x,y:dt},{x:ze,y:dt},{x:ze,y:gt},{x:d,y:gt},{x:d,y:h}];if(this._routeClear(Ke,m))return Ke}}return w}let f=t.y+eq,b=h-Mf,g,v;if(l){let _=this.nodes.filter(w=>w.y+er>b-Ge&&w.y<f+Ge),$=Math.max(..._.map(w=>w.x+ne))+Gp,N=Math.min(..._.map(w=>w.x))-Gp,G=Math.abs($-t.x)+Math.abs($-d),I=Math.abs(t.x-N)+Math.abs(d-N);g=G<=I,v=g?$:N}else g=t.x>=r.x+ne/2,v=g?r.x+ne+Gp:r.x-Gp;let x=null;for(let _=0;_<=20;_++){let $=v+(g?1:-1)*_*Ge,N=[t,{x:t.x,y:f},{x:$,y:f},{x:$,y:b},{x:d,y:b},{x:d,y:h}];if(x??(x=N),this._routeClear(N,m))return N}return x}static _pathFrom(t){return t.map((r,n)=>`${n===0?"M":"L"} ${r.x} ${r.y}`).join(" ")}_addPoints(){if(!this.movingNodeId&&!this.dragType)return[];let t=[];for(let r of this.nodes){let{branches:n}=this._outputLayout(r);n.forEach(a=>{a.conn||t.push({nodeId:r.id,port:a.port.id,px:a.x,py:a.exitY+qf})})}return t}_wirePoints(){if(this.movingNodeId)return[];let t=this._elbowMidOffsets(),r=Hi(this.nodes,this.connections),n=[];for(let d of this.nodes){let{branches:h}=this._outputLayout(d);h.forEach(m=>{if(!m.conn||!m.child)return;let f=t.get(m.conn.id)??0,b=this._routePoints({x:m.x,y:m.exitY},m.child,m.conn.target.port,f,d.id,r.has(m.conn)),g=0,v=-1;for(let T=0;T<b.length-1;T++){let L=Math.abs(b[T+1].x-b[T].x)+Math.abs(b[T+1].y-b[T].y);L>v&&(v=L,g=T)}let x=b[g],_=b[g+1],$=Math.abs(_.x-x.x)+Math.abs(_.y-x.y),N=Math.sign(_.x-x.x),G=Math.sign(_.y-x.y),I=T=>({px:x.x+N*T,py:x.y+G*T}),w=Math.max(0,(g===b.length-2?$-rq:$)/2);n.push({connectionId:m.conn.id,at:I,d:w,len:$})})}let a=a_,s=(d,h)=>this.nodes.some(m=>d>m.x-a&&d<m.x+ne+a&&h>m.y-a&&h<m.y+er+a),l=[];for(let d of n){let h=f=>s(f.px,f.py)||l.some(b=>Math.hypot(b.px-f.px,b.py-f.py)<a_*2+6),m=d.at(d.d);if(h(m))t:for(let f=Ge/2;f<=d.len;f+=Ge/2)for(let b of[d.d-f,d.d+f]){if(b<0||b>d.len)continue;let g=d.at(b);if(!h(g)){m=g;break t}}l.push({connectionId:d.connectionId,...m})}return l}_screenFromCanvas(t,r){let n=this.getBoundingClientRect();return{clientX:n.left+this.panX+t*this.zoom,clientY:n.top+this.panY+r*this.zoom}}_onAddClick(t,r,n){if(t.stopPropagation(),this.movingNodeId){this._emit("flow-output-move-target",{nodeId:r,port:n});return}this._startLink(r,n)}_onWireAddClick(t,r,n,a){t.stopPropagation(),this._emit("flow-wire-pick",{connectionId:r,...this._screenFromCanvas(n,a)})}_onAddDrop(t,r,n){let a=t.dataTransfer?.getData(xc);a&&(t.preventDefault(),t.stopPropagation(),this._emit("flow-output-assign",{nodeId:r,port:n,type:a}))}_onWireDrop(t,r){let n=t.dataTransfer?.getData(xc);n&&(t.preventDefault(),t.stopPropagation(),this._emit("flow-wire-assign",{connectionId:r,type:n}))}_zoomBy(t){this._viewInitialised=!0,this.zoom=Math.min(n_,Math.max(Lf,+(this.zoom+t).toFixed(2)))}_contentBounds(){if(!this.nodes.length&&!this.notes.length)return null;let t=1/0,r=1/0,n=-1/0,a=-1/0;for(let s of this.nodes){t=Math.min(t,s.x),n=Math.max(n,s.x+ne),r=Math.min(r,s.y),a=Math.max(a,s.y+er);for(let l of this._outputLayout(s).branches)t=Math.min(t,l.x-70),n=Math.max(n,l.x+70),a=Math.max(a,l.exitY+qf+14)}for(let s of this.notes)t=Math.min(t,s.x),n=Math.max(n,s.x+(s.width??Ef)),r=Math.min(r,s.y),a=Math.max(a,s.y+(s.height??Tf));return{x:t,y:r,width:n-t,height:a-r}}_resetView(){let t=this.getBoundingClientRect(),r=this._contentBounds();if(!r||!t.width||!t.height){this.zoom=1,this.panX=0,this.panY=0;return}let n=60,a=Math.min(1,(t.width-n*2)/r.width,(t.height-n*2)/r.height);this.zoom=Math.max(Lf,+a.toFixed(2)),this.panX=Math.round((t.width-r.width*this.zoom)/2-r.x*this.zoom),this.panY=Math.round((t.height-r.height*this.zoom)/2-r.y*this.zoom)}_viewportCursorClass(){return this.drag?this.drag.kind==="note-resize"?"resizing":"grabbing":""}_renderConnections(){let t=`translate(${this.panX} ${this.panY}) scale(${this.zoom})`,r=this._elbowMidOffsets(),n=Hi(this.nodes,this.connections),a=[],s=!!(this.movingNodeId||this.dragType);for(let l of this.nodes){let{cx:d,by:h,busY:m,branches:f}=this._outputLayout(l),b=f.filter(_=>_.conn&&_.child||_.pillTop!==null||s);if(!b.length)continue;a.push(Io`<path class="wire" d="M ${d} ${h} L ${d} ${m}"></path>`);let g=[d,...b.map(_=>_.x)],v=Math.min(...g),x=Math.max(...g);x-v>.5&&a.push(Io`<path class="wire" d="M ${v} ${m} L ${x} ${m}"></path>`),b.forEach(_=>{if(_.pillTop!==null&&a.push(Io`<path class="wire" d="M ${_.x} ${Math.min(m,_.pillTop-10)} L ${_.x} ${_.pillTop}" marker-end="url(#flow-arrow)"></path>`),_.conn&&_.child){let $=r.get(_.conn.id)??0,N=n.has(_.conn),G=this._routePoints({x:_.x,y:_.exitY},_.child,_.conn.target.port,$,l.id,N);a.push(Io`<path
|
|
4854
|
+
`}};to.styles=E(e_),to.dependencies={"zn-icon":ct,"zn-button":Ct,"zn-dropdown":nr,"zn-menu":Fo,"zn-menu-item":In},c([p({attribute:!1})],to.prototype,"node",2),c([p({attribute:!1})],to.prototype,"type",2),c([p({type:Boolean,reflect:!0})],to.prototype,"selected",2),c([p({type:Boolean,reflect:!0})],to.prototype,"error",2),c([p({type:Boolean,reflect:!0})],to.prototype,"dragging",2),c([p({type:Boolean,reflect:!0,attribute:"link-target"})],to.prototype,"linkTarget",2);var r_=to;to.define("zn-flow-node");var o_=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;position:relative;width:100%;height:100%;overflow:hidden}.viewport{position:absolute;inset:0;overflow:hidden;background-color:rgb(var(--zn-color-body));background-image:radial-gradient(rgb(var(--zn-color-border)) 1px,transparent 1px);background-size:20px 20px;cursor:grab;touch-action:none}.viewport.grabbing,.viewport.grabbing *{cursor:grabbing !important}.viewport.connecting,.viewport.connecting *{cursor:crosshair !important}.viewport.resizing,.viewport.resizing *{cursor:nwse-resize !important}.viewport.linking{cursor:crosshair}.viewport.step-dragging .add-point{color:rgb(var(--zn-panel));background:rgb(var(--zn-color-primary));border-style:solid;box-shadow:0 0 0 4px color-mix(in srgb,rgb(var(--zn-color-primary)) 22%,transparent)}.connections{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}.connections .wire{fill:none;stroke:rgb(var(--zn-color-primary));stroke-width:2}.connections .wire--stub{stroke:rgb(var(--zn-color-border-active));stroke-dasharray:4 4}.connections .wire--preview{stroke-dasharray:6 4}.connections .wire--loop{stroke:rgb(var(--zn-color-warning))}.connections marker path{fill:rgb(var(--zn-color-primary))}.connections marker#flow-arrow-loop path{fill:rgb(var(--zn-color-warning))}.add-point{position:absolute;top:0;left:0;display:flex;align-items:center;justify-content:center;width:24px;height:24px;margin:-12px;padding:0;border-radius:50%;color:rgb(var(--zn-color-primary));background:rgb(var(--zn-panel));border:1px dashed rgb(var(--zn-color-border-active));cursor:pointer;transition:background 0.12s ease,color 0.12s ease}.add-point:hover{color:rgb(var(--zn-panel));background:rgb(var(--zn-color-primary));border-style:solid}.add-point--target{color:rgb(var(--zn-panel));background:rgb(var(--zn-color-primary));border-style:solid;box-shadow:0 0 0 4px color-mix(in srgb,rgb(var(--zn-color-primary)) 25%,transparent)}.add-point--wire{width:20px;height:20px;margin:-10px}.layer{position:absolute;top:0;left:0;transform-origin:0 0;width:0;height:0}.node-pos{position:absolute;top:0;left:0}.branch-pill{display:flex;align-items:center;justify-content:center;width:-moz-max-content;width:max-content;max-width:240px;box-sizing:border-box;text-align:center;overflow-wrap:anywhere;overflow:hidden;padding:0 18px;border-radius:10px;font:inherit;font-size:0.8125rem;font-weight:600;line-height:20px;color:rgb(var(--zn-text));background:color-mix(in srgb,rgb(var(--zn-color-primary)) 8%,rgb(var(--zn-panel)));border:1px solid color-mix(in srgb,rgb(var(--zn-color-primary)) 45%,transparent);cursor:pointer;transition:border-color 0.12s ease,box-shadow 0.12s ease}.branch-pill:hover{border-color:rgb(var(--zn-color-primary));box-shadow:0 1px 3px rgba(var(--zn-shadow),0.4)}.branch-pill--selected{border-color:rgb(var(--zn-color-primary));background:color-mix(in srgb,rgb(var(--zn-color-primary)) 16%,rgb(var(--zn-panel)))}.branch-pill--loop{background:color-mix(in srgb,rgb(var(--zn-color-warning)) 10%,rgb(var(--zn-panel)));border-color:color-mix(in srgb,rgb(var(--zn-color-warning)) 55%,transparent)}.branch-pill--loop:hover{border-color:rgb(var(--zn-color-warning))}.branch-pill--loop.branch-pill--selected{border-color:rgb(var(--zn-color-warning));background:color-mix(in srgb,rgb(var(--zn-color-warning)) 18%,rgb(var(--zn-panel)))}.branch-pill-wrap{position:absolute;top:0;left:0;transform:translateX(-50%);display:flex;align-items:stretch}.branch-pill-wrap::after{content:"";position:absolute;left:100%;top:0;width:40px;height:100%}.branch-pill-wrap:hover .branch-pill-delete{opacity:1;transform:translate(0,-50%);pointer-events:auto;transition-delay:0.15s}.branch-pill-port{position:absolute;z-index:1;left:50%;bottom:0;transform:translate(-50%,50%);width:11px;height:11px;box-sizing:border-box;border-radius:50%;background:rgb(var(--zn-panel));border:2px solid rgb(var(--zn-color-primary));cursor:pointer;transition:transform 0.12s ease,box-shadow 0.12s ease}.branch-pill-port:hover{transform:translate(-50%,50%) scale(1.35);box-shadow:0 0 0 4px color-mix(in srgb,rgb(var(--zn-color-primary)) 20%,transparent)}.branch-pill-delete{position:absolute;z-index:1;left:calc(100% + 8px);top:50%;transform:translate(-10px,-50%);display:flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;border-radius:50%;background:rgb(var(--zn-color-error));color:white;cursor:pointer;opacity:0;pointer-events:none;transition:opacity 0.15s ease,transform 0.15s ease}.branch-pill-delete:hover{filter:brightness(1.1)}.drop-ghost{position:absolute;top:0;left:0;display:flex;align-items:center;gap:10px;padding:0 12px;border:2px dashed rgb(var(--zn-color-primary));border-radius:10px;background:color-mix(in srgb,rgb(var(--zn-color-primary)) 10%,rgb(var(--zn-panel)));opacity:0.9;pointer-events:none}.drop-ghost__icon{--node-accent:rgb(var(--zn-color-primary));display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:36px;height:36px;border-radius:8px;color:var(--node-accent);background:color-mix(in srgb,var(--node-accent) 16%,rgb(var(--zn-panel)))}.drop-ghost__label{font-size:0.8125rem;font-weight:600;color:rgb(var(--zn-text));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.toolbar{position:absolute;top:16px;display:flex;align-items:center;gap:2px;padding:3px;background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:8px;box-shadow:0 1px 3px rgba(var(--zn-shadow),0.4);z-index:2}.toolbar--history{left:16px}.toolbar--zoom{right:16px}.bin{position:absolute;right:16px;bottom:16px;z-index:2;display:flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:12px;color:rgb(var(--zn-color-muted-text));background:rgb(var(--zn-panel));border:1px dashed rgb(var(--zn-color-border-active));box-shadow:0 1px 3px rgba(var(--zn-shadow),0.4);transition:background 0.12s ease,color 0.12s ease,transform 0.12s ease}.bin--over{color:rgb(var(--zn-panel));background:rgb(var(--zn-color-error));border-style:solid;border-color:rgb(var(--zn-color-error));transform:scale(1.12)}.note{position:absolute;display:flex;flex-direction:column;background:#fef9c3;border:1px solid #fde68a;border-radius:4px;box-shadow:0 2px 6px rgba(0,0,0,0.12)}.note__resize{position:absolute;right:0;bottom:0;width:16px;height:16px;cursor:nwse-resize;background:linear-gradient(135deg,transparent 0 50%,#d9c64a 50% 60%,transparent 60% 70%,#d9c64a 70% 80%,transparent 80%)}.note__bar{display:flex;justify-content:flex-end;height:20px;cursor:grab}.note__close{width:20px;height:20px;padding:0;font-size:14px;line-height:1;color:#92400e;background:transparent;cursor:pointer}.note__text{flex:1;margin:0;padding:0 10px 10px;resize:none;border:none;outline:none;background:transparent;font:inherit;font-size:0.8125rem;color:#713f12}`;var Lf=.25,n_=2,i_=.15,qf=40,eq=20,Mf=20,a_=10,rq=8,Gp=40,oq=20,xc=Ds,me=class me extends C{constructor(){super(...arguments);this.nodes=[];this.connections=[];this.notes=[];this.selectedNodeId=null;this.errorNodes=new Set;this.movingNodeId=null;this.dragType=null;this.selectedBranch=null;this.zoom=1;this.panX=0;this.panY=0;this.drag=null;this._overBin=!1;this._dropGhost=null;this._linking=null;this._linkPos=null;this._linkTarget=null;this._linkClient=null;this._linkScrollRaf=null;this._dragMoved=!1;this._viewInitialised=!1;this._onWheel=t=>{if(t.composedPath().some(d=>d instanceof HTMLTextAreaElement))return;t.preventDefault(),this._viewInitialised=!0;let r=t.deltaMode===1?16:t.deltaMode===2?100:1,n=t.deltaX*r,a=t.deltaY*r;if(t.ctrlKey||t.metaKey){let d=Math.min(n_,Math.max(Lf,this.zoom*Math.exp(-a*.0015)));if(d===this.zoom)return;let h=this.getBoundingClientRect(),m=t.clientX-h.left,f=t.clientY-h.top,b=(m-this.panX)/this.zoom,g=(f-this.panY)/this.zoom;this.zoom=+d.toFixed(3),this.panX=Math.round(m-b*this.zoom),this.panY=Math.round(f-g*this.zoom);return}let s=t.shiftKey&&!n?a:n,l=t.shiftKey&&!n?0:a;this.panX-=Math.round(s),this.panY-=Math.round(l)};this._onBackgroundPointerDown=t=>{if(t.button===1){t.preventDefault(),this._viewInitialised=!0,this.drag={kind:"pan",ox:t.clientX,oy:t.clientY,px:this.panX,py:this.panY},this._setupWindow("grabbing");return}if(t.button===0){if(this._viewInitialised=!0,this._linking){let r=this._linking,n=this._linkTarget;if(this._cancelLink(),n){this._emit("flow-link-assign",{nodeId:r.nodeId,port:r.port,targetId:n});return}}this._emit("flow-node-select",{nodeId:null}),this.drag={kind:"pan",ox:t.clientX,oy:t.clientY,px:this.panX,py:this.panY},this._setupWindow("grabbing")}};this._onNodeGrab=t=>{if(this._linking){let a=this._linking;this._cancelLink(),a.nodeId!==t.detail.nodeId&&this._emit("flow-link-assign",{nodeId:a.nodeId,port:a.port,targetId:t.detail.nodeId});return}let r=this.nodes.find(a=>a.id===t.detail.nodeId);if(!r)return;let n=this.screenToCanvas(t.detail.clientX,t.detail.clientY);this.drag={kind:"node",id:r.id,offX:n.x-r.x,offY:n.y-r.y,startX:r.x,startY:r.y},this._dragMoved=!1,this._setupWindow("grabbing")};this._onNodeSelect=t=>{this._linking&&t.detail.nodeId&&t.stopPropagation()};this._onPortClick=t=>{let{nodeId:r}=t.detail;if(this._linking&&this._linking.nodeId!==r){let s=this._linking;this._cancelLink(),this._emit("flow-link-assign",{nodeId:s.nodeId,port:s.port,targetId:r});return}let n=this.nodes.find(s=>s.id===r);if(!n)return;let a=Ge(n,this._typeFor(n)).find(s=>!this.connections.some(l=>l.source.node===r&&l.source.port===s.id));this._startLink(r,a?.id??Bp)};this._onLinkPointerMove=t=>{this._linkClient={x:t.clientX,y:t.clientY},this._updateLinkFromClient(t.clientX,t.clientY)};this._linkEdgeScroll=()=>{if(this._linkScrollRaf=null,!!this._linking){if(this._linkClient){let t=this.getBoundingClientRect(),r=48,n=14,a=m=>Math.min(n,Math.ceil((r-m)/r*n)),{x:s,y:l}=this._linkClient,d=0,h=0;s<t.left+r?d=a(s-t.left):s>t.right-r&&(d=-a(t.right-s)),l<t.top+r?h=a(l-t.top):l>t.bottom-r&&(h=-a(t.bottom-l)),(d||h)&&(this.panX+=d,this.panY+=h,this._updateLinkFromClient(s,l))}this._linkScrollRaf=requestAnimationFrame(this._linkEdgeScroll)}};this._onLinkKeyDown=t=>{t.key==="Escape"&&this._cancelLink()};this._cancelLink=()=>{this._linking&&(this._linking=null,this._linkPos=null,this._linkTarget=null,this._linkClient=null,this._linkScrollRaf!==null&&(cancelAnimationFrame(this._linkScrollRaf),this._linkScrollRaf=null),window.removeEventListener("pointermove",this._onLinkPointerMove),window.removeEventListener("keydown",this._onLinkKeyDown),window.removeEventListener("blur",this._cancelLink))};this._onPointerMove=t=>{if(!this.drag)return;if(this.drag.kind==="pan"){this.panX=this.drag.px+(t.clientX-this.drag.ox),this.panY=this.drag.py+(t.clientY-this.drag.oy);return}let r=this.screenToCanvas(t.clientX,t.clientY);if(this.drag.kind==="node"){this._overBin=this._binHit(t.clientX,t.clientY);let n=this.nodes.find(a=>a.id===this.drag.id);if(n){let a={x:Dr(r.x-this.drag.offX),y:Dr(r.y-this.drag.offY)},s=new Set(this.connections.filter(h=>h.target.node===n.id&&h.source.node!==n.id).map(h=>h.source.node)),l=h=>{let m={...n,...h},f=this.nodes.map(g=>g.id===n.id?m:g),b=g=>this.registry?.get(g);return f.some(g=>g!==m&&W2(m,g,b,f,this.connections))?!1:![...s].some(g=>{let v=f.find(x=>x.id===g);return!!v&&Up(v,b,f,this.connections)})},d=l(a)?a:l({x:a.x,y:n.y})?{x:a.x,y:n.y}:l({x:n.x,y:a.y})?{x:n.x,y:a.y}:null;d&&(d.x!==n.x||d.y!==n.y)&&(this._dragMoved||this._beginMove(),n.x=d.x,n.y=d.y,this.requestUpdate())}}else if(this.drag.kind==="note"){let n=this.notes.find(a=>a.id===this.drag.id);n&&(this._dragMoved||this._beginMove(),n.x=Dr(r.x-this.drag.offX),n.y=Dr(r.y-this.drag.offY),this.requestUpdate())}else if(this.drag.kind==="note-resize"){let n=this.notes.find(a=>a.id===this.drag.id);n&&(this._dragMoved||this._beginMove(),n.width=Math.max(Y2,Dr(r.x-n.x)),n.height=Math.max(X2,Dr(r.y-n.y)),this.requestUpdate())}};this._onPointerUp=()=>{let t=this.drag,r=this._overBin;if(this.drag=null,this._overBin=!1,this._teardownWindow(),!!t){if(t.kind==="node"&&this._dragMoved&&r){let n=this.nodes.find(a=>a.id===t.id);n&&(n.x=t.startX,n.y=t.startY),this._emit("flow-node-action",{nodeId:t.id,action:"delete"});return}(t.kind==="node"||t.kind==="note"||t.kind==="note-resize")&&this._dragMoved&&this._emit("flow-change-commit")}};this._onViewportDragOver=t=>{if(!t.dataTransfer?.types.includes(xc))return;this._viewInitialised=!0,t.preventDefault();let r=t.composedPath().some(a=>a instanceof Element&&a.classList.contains("add-point"));t.dataTransfer.dropEffect=r?"copy":"move";let n=this.screenToCanvas(t.clientX,t.clientY);this._dropGhost={x:Dr(n.x-ne/2),y:Dr(n.y-er/2)}};this._onViewportDragLeave=t=>{let r=this.getBoundingClientRect();(t.clientX<r.left||t.clientX>r.right||t.clientY<r.top||t.clientY>r.bottom)&&(this._dropGhost=null)};this._clearDropGhost=()=>{this._dropGhost=null};this._onAddPointDragOver=t=>{t.dataTransfer?.types.includes(xc)&&(t.preventDefault(),t.dataTransfer.dropEffect="copy")};this._onBinDragOver=t=>{t.dataTransfer?.types.includes(xc)&&(t.preventDefault(),t.stopPropagation(),t.dataTransfer.dropEffect="move",this._overBin=!0,this._dropGhost=null)};this._onBinDragLeave=()=>{this._overBin=!1};this._onBinDrop=t=>{t.preventDefault(),t.stopPropagation(),this._overBin=!1,this._dropGhost=null}}connectedCallback(){super.connectedCallback(),this.addEventListener("flow-node-grab",this._onNodeGrab),this.addEventListener("flow-node-select",this._onNodeSelect),this.addEventListener("flow-port-click",this._onPortClick),this.addEventListener("wheel",this._onWheel,{passive:!1})}disconnectedCallback(){this.removeEventListener("flow-node-grab",this._onNodeGrab),this.removeEventListener("flow-node-select",this._onNodeSelect),this.removeEventListener("flow-port-click",this._onPortClick),this.removeEventListener("wheel",this._onWheel),this._cancelLink(),this._teardownWindow(),super.disconnectedCallback()}updated(t){if(super.updated(t),this.style.setProperty("--flow-zoom",String(this.zoom)),t.has("dragType")&&!this.dragType&&(this._dropGhost=null),!this._viewInitialised&&this.nodes.length){let r=this.getBoundingClientRect();r.width&&r.height&&(this._viewInitialised=!0,this._resetView())}}_emit(t,r){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:r}))}screenToCanvas(t,r){let n=this.getBoundingClientRect();return{x:(t-n.left-this.panX)/this.zoom,y:(r-n.top-this.panY)/this.zoom}}_typeFor(t){return this.registry?.get(t.type)}_setupWindow(t=""){window.addEventListener("pointermove",this._onPointerMove),window.addEventListener("pointerup",this._onPointerUp),t&&(document.body.style.cursor=t)}_teardownWindow(){window.removeEventListener("pointermove",this._onPointerMove),window.removeEventListener("pointerup",this._onPointerUp),document.body.style.cursor=""}_onBranchPortClick(t,r){if(this._linking){let n=this._linking;this._cancelLink(),n.nodeId!==t&&this._emit("flow-link-assign",{nodeId:n.nodeId,port:n.port,targetId:t});return}this._startLink(t,r)}_startLink(t,r){this._linking={nodeId:t,port:r},this._linkPos=null,this._linkClient=null,window.addEventListener("pointermove",this._onLinkPointerMove),window.addEventListener("keydown",this._onLinkKeyDown),window.addEventListener("blur",this._cancelLink),this._linkScrollRaf=requestAnimationFrame(this._linkEdgeScroll)}_updateLinkFromClient(t,r){let n=this.screenToCanvas(t,r);this._linkPos=n;let a=this._linking;if(!a)return;let s=12,l=this.nodes.find(d=>d.id!==a.nodeId&&n.x>=d.x-s&&n.x<=d.x+ne+s&&n.y>=d.y-s&&n.y<=d.y+er+s&&Pi(d,this._typeFor(d)).length>0);this._linkTarget=l?.id??null}_binHit(t,r){let n=this.shadowRoot?.querySelector(".bin")?.getBoundingClientRect();return!!n&&t>=n.left&&t<=n.right&&r>=n.top&&r<=n.bottom}_beginMove(){this._dragMoved=!0,this._emit("flow-interaction-start")}_outputLayout(t){let r=Ge(t,this._typeFor(t)),n=t.x+ne/2,a=t.y+er,s=a+_f,l=bc(t,h=>this.registry?.get(h)),d=r.map((h,m)=>{let f=this.connections.find($=>$.source.node===t.id&&$.source.port===h.id),b=f?this.nodes.find($=>$.id===f.target.node):void 0,g=l[m],v=h.label?Cf(h.label).h:0,x=h.label?kf(t,v,b,r.length===1):null,_=x===null?s:x+v;return{port:h,conn:f,child:b,x:g,pillTop:x,pillH:v,exitY:_}});return{cx:n,by:a,busY:s,branches:d}}_inputAnchor(t,r){let n=Pi(t,this._typeFor(t)),a=Math.max(n.findIndex(s=>s.id===r),0);return{x:Q2(t,"in",a,n.length).x,y:t.y}}_elbowMidOffsets(){let t=new Map;for(let n of this.nodes){let{branches:a}=this._outputLayout(n);for(let s of a){if(!s.conn||!s.child)continue;let{x:l,y:d}=this._inputAnchor(s.child,s.conn.target.port);if(l===s.x||d-Mf<s.exitY)continue;let h=Dr((s.exitY+d)/2),m=`${s.conn.target.node}:${s.conn.target.port}`,f=t.get(h)??new Map;t.set(h,f),f.set(m,[...f.get(m)??[],s.conn.id])}}let r=new Map;for(let n of t.values()){if(n.size<2)continue;let a=[...n.keys()].sort();a.forEach((s,l)=>{let d=(l-Math.floor((a.length-1)/2))*oq;n.get(s).forEach(h=>r.set(h,d))})}return r}_segmentBlocked(t,r,n){let l=Math.min(t.x,r.x),d=Math.max(t.x,r.x),h=Math.min(t.y,r.y),m=Math.max(t.y,r.y);return this.nodes.some(f=>!n.has(f.id)&&l<f.x+ne+8&&d>f.x-8&&h<f.y+er+8&&m>f.y-48)}_routeClear(t,r){for(let n=0;n<t.length-1;n++)if(this._segmentBlocked(t[n],t[n+1],r))return!1;return!0}_routePoints(t,r,n,a=0,s,l=!1){let{x:d,y:h}=this._inputAnchor(r,n),m=new Set(s?[r.id,s]:[r.id]);if(h-Mf>=t.y){let _=Math.round((t.y+h)/2)+a,$=h-t.y,N=Math.min(h-12,Math.ceil((t.y+$/4)/je)*je),G=Math.max(N,Math.floor((h-$/4)/je)*je),I=W=>Math.max(N,Math.min(G,W)),w=null;if(d===t.x){let W=[t,{x:d,y:h}];if(this._routeClear(W,m))return W;w=W}else for(let W=0;W<=20;W++)for(let tt of W===0?[_]:[_+W*je,_-W*je]){let dt=I(tt);if(dt!==tt&&W>0)continue;let gt=[t,{x:t.x,y:dt},{x:d,y:dt},{x:d,y:h}];if(w??(w=gt),this._routeClear(gt,m))return gt}let T=Math.floor($/2/10)*10,L=Math.max(10,Math.round($/4/10)*10);for(let W=0;W<=12;W++)for(let tt of W===0?[L]:[L+W*10,L-W*10]){if(tt<10||tt>T)continue;let dt=t.y+tt,gt=h-tt;if(!(gt<dt))for(let _t=1;_t<=14;_t++)for(let Nt of[1,-1]){let ze=t.x+Nt*_t*je,We=[t,{x:t.x,y:dt},{x:ze,y:dt},{x:ze,y:gt},{x:d,y:gt},{x:d,y:h}];if(this._routeClear(We,m))return We}}return w}let f=t.y+eq,b=h-Mf,g,v;if(l){let _=this.nodes.filter(w=>w.y+er>b-je&&w.y<f+je),$=Math.max(..._.map(w=>w.x+ne))+Gp,N=Math.min(..._.map(w=>w.x))-Gp,G=Math.abs($-t.x)+Math.abs($-d),I=Math.abs(t.x-N)+Math.abs(d-N);g=G<=I,v=g?$:N}else g=t.x>=r.x+ne/2,v=g?r.x+ne+Gp:r.x-Gp;let x=null;for(let _=0;_<=20;_++){let $=v+(g?1:-1)*_*je,N=[t,{x:t.x,y:f},{x:$,y:f},{x:$,y:b},{x:d,y:b},{x:d,y:h}];if(x??(x=N),this._routeClear(N,m))return N}return x}static _pathFrom(t){return t.map((r,n)=>`${n===0?"M":"L"} ${r.x} ${r.y}`).join(" ")}_addPoints(){if(!this.movingNodeId&&!this.dragType)return[];let t=[];for(let r of this.nodes){let{branches:n}=this._outputLayout(r);n.forEach(a=>{a.conn||t.push({nodeId:r.id,port:a.port.id,px:a.x,py:a.exitY+qf})})}return t}_wirePoints(){if(this.movingNodeId)return[];let t=this._elbowMidOffsets(),r=Hi(this.nodes,this.connections),n=[];for(let d of this.nodes){let{branches:h}=this._outputLayout(d);h.forEach(m=>{if(!m.conn||!m.child)return;let f=t.get(m.conn.id)??0,b=this._routePoints({x:m.x,y:m.exitY},m.child,m.conn.target.port,f,d.id,r.has(m.conn)),g=0,v=-1;for(let T=0;T<b.length-1;T++){let L=Math.abs(b[T+1].x-b[T].x)+Math.abs(b[T+1].y-b[T].y);L>v&&(v=L,g=T)}let x=b[g],_=b[g+1],$=Math.abs(_.x-x.x)+Math.abs(_.y-x.y),N=Math.sign(_.x-x.x),G=Math.sign(_.y-x.y),I=T=>({px:x.x+N*T,py:x.y+G*T}),w=Math.max(0,(g===b.length-2?$-rq:$)/2);n.push({connectionId:m.conn.id,at:I,d:w,len:$})})}let a=a_,s=(d,h)=>this.nodes.some(m=>d>m.x-a&&d<m.x+ne+a&&h>m.y-a&&h<m.y+er+a),l=[];for(let d of n){let h=f=>s(f.px,f.py)||l.some(b=>Math.hypot(b.px-f.px,b.py-f.py)<a_*2+6),m=d.at(d.d);if(h(m))t:for(let f=je/2;f<=d.len;f+=je/2)for(let b of[d.d-f,d.d+f]){if(b<0||b>d.len)continue;let g=d.at(b);if(!h(g)){m=g;break t}}l.push({connectionId:d.connectionId,...m})}return l}_screenFromCanvas(t,r){let n=this.getBoundingClientRect();return{clientX:n.left+this.panX+t*this.zoom,clientY:n.top+this.panY+r*this.zoom}}_onAddClick(t,r,n){if(t.stopPropagation(),this.movingNodeId){this._emit("flow-output-move-target",{nodeId:r,port:n});return}this._startLink(r,n)}_onWireAddClick(t,r,n,a){t.stopPropagation(),this._emit("flow-wire-pick",{connectionId:r,...this._screenFromCanvas(n,a)})}_onAddDrop(t,r,n){let a=t.dataTransfer?.getData(xc);a&&(t.preventDefault(),t.stopPropagation(),this._emit("flow-output-assign",{nodeId:r,port:n,type:a}))}_onWireDrop(t,r){let n=t.dataTransfer?.getData(xc);n&&(t.preventDefault(),t.stopPropagation(),this._emit("flow-wire-assign",{connectionId:r,type:n}))}_zoomBy(t){this._viewInitialised=!0,this.zoom=Math.min(n_,Math.max(Lf,+(this.zoom+t).toFixed(2)))}_contentBounds(){if(!this.nodes.length&&!this.notes.length)return null;let t=1/0,r=1/0,n=-1/0,a=-1/0;for(let s of this.nodes){t=Math.min(t,s.x),n=Math.max(n,s.x+ne),r=Math.min(r,s.y),a=Math.max(a,s.y+er);for(let l of this._outputLayout(s).branches)t=Math.min(t,l.x-70),n=Math.max(n,l.x+70),a=Math.max(a,l.exitY+qf+14)}for(let s of this.notes)t=Math.min(t,s.x),n=Math.max(n,s.x+(s.width??Ef)),r=Math.min(r,s.y),a=Math.max(a,s.y+(s.height??Tf));return{x:t,y:r,width:n-t,height:a-r}}_resetView(){let t=this.getBoundingClientRect(),r=this._contentBounds();if(!r||!t.width||!t.height){this.zoom=1,this.panX=0,this.panY=0;return}let n=60,a=Math.min(1,(t.width-n*2)/r.width,(t.height-n*2)/r.height);this.zoom=Math.max(Lf,+a.toFixed(2)),this.panX=Math.round((t.width-r.width*this.zoom)/2-r.x*this.zoom),this.panY=Math.round((t.height-r.height*this.zoom)/2-r.y*this.zoom)}_viewportCursorClass(){return this.drag?this.drag.kind==="note-resize"?"resizing":"grabbing":""}_renderConnections(){let t=`translate(${this.panX} ${this.panY}) scale(${this.zoom})`,r=this._elbowMidOffsets(),n=Hi(this.nodes,this.connections),a=[],s=!!(this.movingNodeId||this.dragType);for(let l of this.nodes){let{cx:d,by:h,busY:m,branches:f}=this._outputLayout(l),b=f.filter(_=>_.conn&&_.child||_.pillTop!==null||s);if(!b.length)continue;a.push(Io`<path class="wire" d="M ${d} ${h} L ${d} ${m}"></path>`);let g=[d,...b.map(_=>_.x)],v=Math.min(...g),x=Math.max(...g);x-v>.5&&a.push(Io`<path class="wire" d="M ${v} ${m} L ${x} ${m}"></path>`),b.forEach(_=>{if(_.pillTop!==null&&a.push(Io`<path class="wire" d="M ${_.x} ${Math.min(m,_.pillTop-10)} L ${_.x} ${_.pillTop}" marker-end="url(#flow-arrow)"></path>`),_.conn&&_.child){let $=r.get(_.conn.id)??0,N=n.has(_.conn),G=this._routePoints({x:_.x,y:_.exitY},_.child,_.conn.target.port,$,l.id,N);a.push(Io`<path
|
|
4854
4855
|
class="wire ${N?"wire--loop":""}"
|
|
4855
4856
|
d="${me._pathFrom(G)}"
|
|
4856
4857
|
marker-end="url(#${N?"flow-arrow-loop":"flow-arrow"})"
|
|
@@ -5017,7 +5018,7 @@ ${n}`:""}</li></ol>`};return t(0)}parseTable(o,t){this.index++;let r=[],n=[];for
|
|
|
5017
5018
|
<zn-collapsible caption="${this.caption??""}" default="${this.collapsed?"closed":"open"}">
|
|
5018
5019
|
<slot></slot>
|
|
5019
5020
|
</zn-collapsible>
|
|
5020
|
-
`}};Sn.styles=E(l_),Sn.dependencies={"zn-collapsible":oa},c([p()],Sn.prototype,"caption",2),c([p({type:Boolean,reflect:!0})],Sn.prototype,"collapsed",2);var If=Sn;Sn.define("zn-flow-step-group");var Wp=class{constructor(){this.types=new Map}register(o){return this.types.set(o.type,o),this}registerAll(o){return o.forEach(t=>this.register(t)),this}get(o){return this.types.get(o)}has(o){return this.types.has(o)}all(){return Array.from(this.types.values())}byGroup(o){return this.all().filter(t=>t.group===o)}categories(o){let t=new Map;for(let r of this.byGroup(o)){let n=r.category??"",a=t.get(n)??[];a.push(r),t.set(n,a)}return t}clear(){this.types.clear()}};var c_=ne+80,Kp=220,Df=40,yc=i=>i.reduce((o,t)=>o+t,0)/i.length;function d_(i,o){let t=new Map,r=i.nodes;if(!r.length)return t;let n=new Map(r.map(w=>[w.id,w])),a=new Map(r.map(w=>[w.id,[]])),s=new Map(r.map(w=>[w.id,[]]));for(let w of i.connections)!n.has(w.source.node)||!n.has(w.target.node)||(a.get(w.target.node).push(w),s.get(w.source.node).push(w));let l=Hi(r,i.connections),d=new Map,h=w=>{let T=d.get(w);if(T!==void 0)return T;let L=a.get(w).filter(tt=>!l.has(tt)),W=L.length?Math.max(...L.map(tt=>h(tt.source.node)))+1:0;return d.set(w,W),W};r.forEach(w=>h(w.id)),r.forEach(w=>{if(a.get(w.id).some(W=>!l.has(W)))return;let T=s.get(w.id).filter(W=>!l.has(W));if(!T.length)return;let L=Math.min(...T.map(W=>d.get(W.target.node)))-1;L>d.get(w.id)&&d.set(w.id,L)});let m=Array.from({length:Math.max(...d.values())+1},()=>[]);r.forEach(w=>m[d.get(w.id)].push(w));let f=w=>{let T=n.get(w.source.node),L=We(T,o(T.type)),W=Math.max(L.length,1),tt=Math.max(L.findIndex(dt=>dt.id===w.source.port),0);return W===1?0:(tt-(W-1)/2)*wf},b=new Map,g=w=>{let T=a.get(w.id).filter(L=>!l.has(L)&&b.has(L.source.node));return T.length?yc(T.map(L=>{let W=n.get(L.source.node),tt=We(W,o(W.type)),dt=Math.max(tt.length,1),gt=Math.max(tt.findIndex(_t=>_t.id===L.source.port),0);return b.get(W.id)+(gt+1)/(dt+1)-.5})):null},v=w=>{let T=s.get(w.id).filter(L=>!l.has(L)&&b.has(L.target.node));return T.length?yc(T.map(L=>b.get(L.target.node))):null};m[0].sort((w,T)=>w.x-T.x).forEach((w,T)=>b.set(w.id,T));for(let w=1;w<m.length;w++)m[w].sort((T,L)=>(g(T)??0)-(g(L)??0)).forEach((T,L)=>b.set(T.id,L));for(let w=1;w<m.length;w++){let T=L=>g(L)??v(L)??0;m[w].sort((L,W)=>T(L)-T(W)).forEach((L,W)=>b.set(L.id,W))}let x=new Map,_=(w,T)=>{let L=w.map(gt=>T(gt)??x.get(gt.id)??0),W=-1/0,tt=L.map(gt=>W=Math.max(gt,W+c_)),dt=yc(tt.map((gt,_t)=>gt-L[_t]));w.forEach((gt,_t)=>x.set(gt.id,tt[_t]-dt))},$=w=>{let T=a.get(w.id).filter(L=>!l.has(L)&&x.has(L.source.node));return T.length?yc(T.map(L=>x.get(L.source.node)+f(L))):null},N=w=>{let T=s.get(w.id).filter(L=>!l.has(L)&&x.has(L.target.node));return T.length?yc(T.map(L=>x.get(L.target.node)-f(L))):null};m[0].forEach((w,T)=>x.set(w.id,T*c_));for(let w=1;w<m.length;w++)_(m[w],$);for(let w=m.length-2;w>=0;w--)_(m[w],N);for(let w=1;w<m.length;w++)_(m[w],$);let G=[...x.values()].filter(Number.isFinite),I=G.length?Math.min(...G):0;return r.forEach(w=>{let T=x.get(w.id);t.set(w.id,{x:Dr(Number.isFinite(T)?T-I+Df:Df),y:Df+d.get(w.id)*Kp})}),t}var p_=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host ::-webkit-scrollbar{width:5px;height:5px}:host{}:host ::-webkit-scrollbar-track{background:transparent}:host{}:host ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}:host{}:host ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}:host{display:block;width:100%;height:100%;min-height:480px;color:rgb(var(--zn-text))}.builder{--steps-width:343px;--side-width:500px;display:grid;grid-template-columns:var(--steps-width) minmax(0,1fr) var(--side-width);grid-template-rows:auto minmax(0,1fr);width:100%;height:100%;background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:8px;overflow:hidden;transition:grid-template-columns 0.2s ease}.builder--steps-collapsed{--steps-width:0px}.builder--steps-collapsed .steps{border-right:none}.builder--side-collapsed{--side-width:0px}.builder--side-collapsed .sidebar,.builder--side-collapsed .inspector{padding:0;border-left:none}.header{grid-row:1;grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 14px;border-bottom:1px solid rgb(var(--zn-border-color));background:rgb(var(--zn-panel))}.header[hidden]{display:none}.header__group{display:flex;align-items:center;gap:8px}.steps,.inspector,.sidebar{grid-row:2;display:flex;flex-direction:column;min-height:0;min-width:0;overflow:hidden;background:rgb(var(--zn-panel))}.canvas-cell{grid-row:2;position:relative;min-width:0;min-height:0}.panel-toggle{position:absolute;top:50%;z-index:6;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border-radius:50%;color:rgb(var(--zn-color-muted-text));background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));box-shadow:0 1px 3px rgba(var(--zn-shadow),0.4);cursor:pointer;transition:left 0.2s ease,right 0.2s ease,color 0.12s ease,border-color 0.12s ease}.panel-toggle:hover{color:rgb(var(--zn-text));border-color:rgb(var(--zn-color-border-active))}.panel-toggle--left{left:-12px}.panel-toggle--left.panel-toggle--tucked{left:8px}.panel-toggle--right{right:-12px}.panel-toggle--right.panel-toggle--tucked{right:8px}.steps{--zn-active-nav-background:var(--zn-panel);border-right:1px solid rgb(var(--zn-border-color))}.steps-content{flex:1;min-height:0;display:flex;flex-direction:column}.steps-panel{display:flex;flex-direction:column;min-height:0;height:100%}.steps-hint{margin:0;padding:12px var(--zn-base-gap);font-size:0.8125rem;line-height:1.4;color:rgb(var(--zn-color-muted-text))}.steps-scroll ::-webkit-scrollbar{width:5px;height:5px}.steps-scroll{}.steps-scroll ::-webkit-scrollbar-track{background:transparent}.steps-scroll{}.steps-scroll ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}.steps-scroll{}.steps-scroll ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}.steps-scroll{flex:1;min-height:0;overflow-y:auto;padding-bottom:16px}.steps-scroll zn-flow-step-group{display:block;border-top:1px solid rgb(var(--zn-border-color))}.steps-uncategorized{padding:8px var(--zn-base-gap)}.steps-empty{padding:16px var(--zn-base-gap);font-size:0.8125rem;color:rgb(var(--zn-color-muted-text))}.declarations{display:none}.title-block{padding:16px;border-bottom:1px solid rgb(var(--zn-border-color))}.title-block .heading{font-size:0.9375rem;font-weight:600}.title-block .subheading{margin-top:2px;font-size:0.75rem;color:rgb(var(--zn-color-muted-text))}.search{padding:12px 12px 8px}.step{display:flex;align-items:center;gap:10px;padding:8px 10px;margin-bottom:6px;background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:8px;font-size:0.8125rem;cursor:grab;transition:border-color 0.12s ease,box-shadow 0.12s ease}.step:hover{border-color:rgb(var(--zn-color-border-active));box-shadow:0 1px 3px rgba(var(--zn-shadow),0.4)}.step:active{cursor:grabbing}.step__icon{--node-accent:rgb(var(--zn-color-primary));display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:28px;height:28px;border-radius:6px;color:var(--node-accent);background:color-mix(in srgb,var(--node-accent) 14%,transparent)}.step__label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.inspector{border-left:1px solid rgb(var(--zn-border-color));animation:inspector-in 0.18s ease}.inspector-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;height:100%;padding:24px;text-align:center;color:rgb(var(--zn-color-muted-text));font-size:0.8125rem}.inspector-head{display:flex;align-items:center;gap:12px;padding:16px;border-bottom:1px solid rgb(var(--zn-border-color))}.inspector-head__icon{--node-accent:rgb(var(--zn-color-primary));display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:36px;height:36px;border-radius:8px;color:var(--node-accent);background:color-mix(in srgb,var(--node-accent) 14%,transparent)}.inspector-head__text{flex:1;min-width:0}.inspector-head__title-row{display:flex;align-items:center;gap:6px;min-width:0}.inspector-head__title-row .inspector-head__title{min-width:0}.inspector-head__title{font-size:0.875rem;font-weight:600}.inspector-head__title,.inspector-head__type{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.inspector-head__type{font-size:0.75rem;color:rgb(var(--zn-color-muted-text))}.inspector-body ::-webkit-scrollbar{width:5px;height:5px}.inspector-body{}.inspector-body ::-webkit-scrollbar-track{background:transparent}.inspector-body{}.inspector-body ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}.inspector-body{}.inspector-body ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}.inspector-body{display:flex;flex-direction:column;gap:14px;flex:1;min-height:0;overflow-y:auto;padding:16px}.inspector-hint{margin:0;font-size:0.75rem;color:rgb(var(--zn-color-muted-text))}.inspector-loop-tag{display:inline-flex;align-items:center;flex:0 0 auto;gap:3px;padding:2px 8px;border-radius:999px;font-size:0.6875rem;font-weight:600;line-height:1;color:rgb(var(--zn-color-warning));background:color-mix(in srgb,rgb(var(--zn-color-warning)) 14%,transparent)}.inspector-close{display:flex;align-items:center;justify-content:center;flex:0 0 auto;margin-left:auto;width:28px;height:28px;padding:0;border-radius:6px;color:rgb(var(--zn-color-muted-text));background:transparent;cursor:pointer}.inspector-close:hover{background:rgb(var(--zn-color-tab));color:rgb(var(--zn-text))}@keyframes inspector-in{from{transform:translateX(32px);opacity:0.3}to{transform:translateX(0);opacity:1}}.sidebar ::-webkit-scrollbar{width:5px;height:5px}.sidebar{}.sidebar ::-webkit-scrollbar-track{background:transparent}.sidebar{}.sidebar ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}.sidebar{}.sidebar ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}.sidebar{border-left:1px solid rgb(var(--zn-border-color));overflow-y:auto;padding:16px}.sidebar-section__head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;font-size:0.8125rem;font-weight:600}.sidebar-count{min-width:20px;padding:0 6px;font-size:0.75rem;line-height:18px;text-align:center;border-radius:9px;color:rgb(var(--zn-color-muted-text));background:rgb(var(--zn-color-tab))}.sidebar-empty{margin:0;font-size:0.75rem;color:rgb(var(--zn-color-muted-text))}.sidebar-error{display:flex;align-items:center;gap:8px;width:100%;margin-bottom:6px;padding:8px 10px;font-size:0.8125rem;text-align:left;color:rgb(var(--zn-color-error));background:color-mix(in srgb,rgb(var(--zn-color-error)) 7%,transparent);border:1px solid color-mix(in srgb,rgb(var(--zn-color-error)) 25%,transparent);border-radius:8px;cursor:pointer}.picker{position:fixed;z-index:21;width:220px;max-height:320px;overflow-y:auto;padding:6px;background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:8px;box-shadow:0 6px 24px rgba(var(--zn-shadow),0.5)}.picker ::-webkit-scrollbar{width:5px;height:5px}.picker{}.picker ::-webkit-scrollbar-track{background:transparent}.picker{}.picker ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}.picker{}.picker ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}.picker-backdrop{position:fixed;inset:0;z-index:20}.picker-group{padding:8px 8px 4px;font-size:0.6875rem;font-weight:600;text-transform:uppercase;letter-spacing:0.04em;color:rgb(var(--zn-color-muted-text))}.picker-item{display:flex;align-items:center;gap:10px;width:100%;padding:7px 8px;font-size:0.8125rem;text-align:left;background:transparent;border-radius:6px;cursor:pointer}.picker-item:hover{background:rgb(var(--zn-color-tab))}.picker-item__icon{--node-accent:rgb(var(--zn-color-primary));display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:26px;height:26px;border-radius:6px;color:var(--node-accent);background:color-mix(in srgb,var(--node-accent) 14%,transparent)}.picker-empty{margin:0;padding:10px;font-size:0.75rem;color:rgb(var(--zn-color-muted-text))}.save-status{position:absolute;left:16px;bottom:16px;z-index:5;display:flex;align-items:center;gap:6px;padding:5px 10px;font-size:0.75rem;color:rgb(var(--zn-color-muted-text));background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:8px;box-shadow:0 1px 3px rgba(var(--zn-shadow),0.4);pointer-events:none;transition:color 0.15s ease,border-color 0.15s ease}.save-status--saved{color:rgb(var(--zn-color-success));border-color:color-mix(in srgb,rgb(var(--zn-color-success)) 45%,transparent)}.restore-banner{position:absolute;top:16px;left:50%;transform:translateX(-50%);z-index:5;display:flex;align-items:center;flex-wrap:wrap;justify-content:center;gap:8px;width:-moz-max-content;width:max-content;max-width:calc(100% - 32px);padding:8px 12px;font-size:0.8125rem;color:rgb(var(--zn-text));background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:8px;box-shadow:0 2px 8px rgba(var(--zn-shadow),0.5)}.restore-banner span{flex:1 1 auto;min-width:min(160px,100%)}.restore-banner button{flex:0 0 auto;padding:3px 10px;font-size:0.75rem;font-weight:600;border-radius:6px;cursor:pointer}.restore-banner__restore{color:rgb(var(--zn-panel));background:rgb(var(--zn-color-primary))}.restore-banner__restore:hover{filter:brightness(1.1)}.restore-banner__dismiss{color:rgb(var(--zn-color-muted-text));background:transparent}.restore-banner__dismiss:hover{background:rgb(var(--zn-color-tab))}.move-banner{position:absolute;top:16px;left:50%;transform:translateX(-50%);z-index:5;display:flex;align-items:center;gap:8px;padding:8px 12px;font-size:0.8125rem;color:rgb(var(--zn-panel));background:rgb(var(--zn-color-primary));border-radius:8px;box-shadow:0 2px 8px rgba(var(--zn-shadow),0.5)}.move-banner button{padding:2px 8px;font-size:0.75rem;font-weight:600;color:rgb(var(--zn-panel));background:rgba(255,255,255,0.2);border-radius:6px;cursor:pointer}`;var nq=50,h_=Ds,iq=5,aq=1440*60*1e3;function u_(i){let o=Math.floor(i/1e3);if(o<10)return"just now";if(o<60)return`${o}s ago`;let t=Math.floor(o/60);if(t<60)return`${t}m ago`;let r=Math.floor(t/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}var m_=[{group:"entrypoint",label:"Entrypoint"},{group:"trigger",label:"Triggers"},{group:"action",label:"Actions"},{group:"rule",label:"Rules"}],vt=class vt extends C{constructor(){super(...arguments);this.nodeTypes=[];this.heading="";this.subheading="";this.errorNodes=[];this.autoSave=null;this.entrypointsHint="";this.triggersHint="";this.actionsHint="";this.rulesHint="";this.registry=new Wp;this._state=J2();this._selectedNodeId=null;this._selectedBranch=null;this._search="";this._activeGroup=null;this._hasSlot=new Q(this,"header-left","header-right");this._stepsCollapsed=!1;this._sideCollapsed=!1;this._movingNodeId=null;this._picker=null;this._draggingType=null;this._history=[];this._redo=[];this._seq=0;this._untangleRaf=null;this._untangleSettle=null;this._configRevision=0;this._autoSaveTimer=null;this._statusTimer=null;this._justSavedTimer=null;this._restoring=!1;this._lastSavedAt=null;this._justSaved=!1;this._statusNow=Date.now();this._restorePrompt=null;this._autoSaveTick=()=>{if(this._restorePrompt)return;let t=this.getState();if(!(!t.nodes.length&&!t.connections.length&&!t.notes.length))try{localStorage.setItem(this._autoSaveKey,JSON.stringify({savedAt:Date.now(),state:t})),this._lastSavedAt=Date.now(),this._justSaved=!0,this._justSavedTimer!==null&&clearTimeout(this._justSavedTimer),this._justSavedTimer=window.setTimeout(()=>this._justSaved=!1,2500)}catch{}};this._onKeyDown=t=>{t.key==="Escape"&&(this._movingNodeId||this._picker||this._selectedBranch)&&(this._movingNodeId=null,this._picker=null,this._selectedBranch=null)};this._registerSlottedTypes=()=>{let t=!1;this.querySelectorAll("zn-flow-step").forEach(r=>{let n=this._typeFromStep(r);n&&!this.registry.has(n.type)&&(this.registry.register(n),t=!0)}),t&&this.requestUpdate()};this.undo=()=>{let t=this._history.pop();t&&(this._cancelUntangle(),this._redo.push(this._clone(this._state)),this._state=t,this._configRevision++,this._syncSelection(),this._commit())};this.redo=()=>{let t=this._redo.pop();t&&(this._cancelUntangle(),this._history.push(this._clone(this._state)),this._state=t,this._configRevision++,this._syncSelection(),this._commit())};this.untangle=()=>{if(!this._state.nodes.length)return;this._cancelUntangle(),this._pushHistory();let t=d_(this._state,f=>this.registry.get(f)),r=this._state.nodes.map(f=>({n:f,from:{x:f.x,y:f.y},to:t.get(f.id)})).filter(f=>!!f.to),n=()=>{r.forEach(({n:f,to:b})=>{f.x=b.x,f.y=b.y})},a=()=>{this._untangleSettle=null,n(),this._commit()};if(this._untangleSettle=n,window.matchMedia("(prefers-reduced-motion: reduce)").matches){a();return}let s=500,l=f=>f<.5?4*f*f*f:1-Math.pow(-2*f+2,3)/2,d=this.shadowRoot?.querySelector("zn-flow-canvas"),h=performance.now(),m=f=>{let b=Math.min(1,(f-h)/s);if(b>=1){this._untangleRaf=null,a();return}let g=l(b);r.forEach(({n:v,from:x,to:_})=>{v.x=Math.round(x.x+(_.x-x.x)*g),v.y=Math.round(x.y+(_.y-x.y)*g)}),d?.requestUpdate(),this._untangleRaf=requestAnimationFrame(m)};this._untangleRaf=requestAnimationFrame(m)};this._commit=()=>{this._pruneConnections(),this._state={nodes:[...this._state.nodes],connections:[...this._state.connections],notes:[...this._state.notes]},this._restorePrompt=null,this.emit("zn-flow-change",{detail:{state:this.getState()}})};this._onBranchPick=t=>{this._select(null),this._sideCollapsed=!1,this._selectedBranch={nodeId:t.detail.nodeId,port:t.detail.port}};this._onBranchDelete=t=>{let r=this._state.nodes.find(a=>a.id===t.detail.nodeId);if(!r)return;this._pushHistory();let n=We(r,this.registry.get(r.type)).filter(a=>a.id!==t.detail.port);r.outputs=n.length?n:[{...Fp}],this._state.connections=this._state.connections.filter(a=>!(a.source.node===r.id&&a.source.port===t.detail.port)),this._selectedBranch?.nodeId===t.detail.nodeId&&this._selectedBranch.port===t.detail.port&&(this._selectedBranch=null),this._commit()};this._onSelect=t=>{if(t.detail.nodeId===null&&this._movingNodeId){this._movingNodeId=null;return}this._select(t.detail.nodeId)};this._onNodeAction=t=>{let{nodeId:r,action:n}=t.detail;n==="delete"?this._deleteNode(r):n==="duplicate"?this._duplicateNode(r):n==="move"&&(this._movingNodeId=r)};this._onInteractionStart=()=>{this._pushHistory()};this._onOutputAssign=t=>{this._addNodeAtOutput(t.detail.nodeId,t.detail.port,t.detail.type)};this._onLinkAssign=t=>{this._linkNodeAtOutput(t.detail.nodeId,t.detail.port,t.detail.targetId)};this._onWirePick=t=>{this._picker={x:t.detail.clientX,y:t.detail.clientY,target:{kind:"wire",connectionId:t.detail.connectionId}}};this._onWireAssign=t=>{this._insertNodeOnWire(t.detail.connectionId,t.detail.type)};this._onOutputMoveTarget=t=>{let r=this._movingNodeId;if(this._movingNodeId=null,!r)return;let n=t.detail.nodeId;if(n===r)return;let a=this._state.nodes.find(b=>b.id===n),s=this._state.nodes.find(b=>b.id===r);if(!a||!s)return;let l=vc(s,this.registry.get(s.type));if(l===null)return;this._pushHistory();let d=this._ensureOutput(a,t.detail.port);this._ensureBranchLabel(a,d),this._state.connections=this._state.connections.filter(b=>b.target.node!==r);let h={id:this._id("conn"),source:{node:n,port:d},target:{node:r,port:l}};this._state.connections.push(h);let m=this._positionBelowOutput(a,d),f=this._freePosition(m.x,m.y,r);s.x=f.x,s.y=f.y,this.emit("zn-flow-connect",{detail:{connection:h}}),this._commit()};this._onAddNote=()=>{this._pushHistory(),this._state.notes.push({id:this._id("note"),x:80,y:80,text:""}),this._commit()};this._onNoteChange=t=>{let r=this._state.notes.find(n=>n.id===t.detail.noteId);r&&(r.text=t.detail.text,this._commit())};this._onNoteDelete=t=>{this._pushHistory(),this._state.notes=this._state.notes.filter(r=>r.id!==t.detail.noteId),this._commit()};this._onDragEnd=()=>{this._draggingType=null};this._onStepDrag=t=>{this._draggingType=t.detail.type};this._onCanvasDragOver=t=>{t.preventDefault()};this._onCanvasDrop=t=>{let r=t.dataTransfer?.getData(h_);if(!r)return;t.preventDefault();let a=this.shadowRoot?.querySelector("zn-flow-canvas")?.screenToCanvas(t.clientX,t.clientY)??{x:t.clientX,y:t.clientY};this._addNode(r,a.x-ne/2,a.y-er/2)}}get _listeners(){return[["flow-node-select",this._onSelect],["flow-node-action",this._onNodeAction],["flow-interaction-start",this._onInteractionStart],["flow-change-commit",this._commit],["flow-output-assign",this._onOutputAssign],["flow-link-assign",this._onLinkAssign],["flow-output-move-target",this._onOutputMoveTarget],["flow-wire-pick",this._onWirePick],["flow-wire-assign",this._onWireAssign],["flow-branch-pick",this._onBranchPick],["flow-branch-delete",this._onBranchDelete],["flow-step-drag",this._onStepDrag],["flow-step-drag-end",this._onDragEnd],["flow-undo",this.undo],["flow-redo",this.redo],["flow-untangle",this.untangle],["flow-add-note",this._onAddNote],["flow-note-change",this._onNoteChange],["flow-note-delete",this._onNoteDelete]]}connectedCallback(){super.connectedCallback(),this._listeners.forEach(([t,r])=>this.addEventListener(t,r)),document.addEventListener("keydown",this._onKeyDown)}disconnectedCallback(){this._listeners.forEach(([t,r])=>this.removeEventListener(t,r)),document.removeEventListener("keydown",this._onKeyDown),this._cancelUntangle(),this._stopAutoSave(),this._justSavedTimer!==null&&(clearTimeout(this._justSavedTimer),this._justSavedTimer=null),super.disconnectedCallback()}get _autoSaveKey(){return`zn-flow-builder:${this.id||this.heading||"flow"}`}_stopAutoSave(){this._autoSaveTimer!==null&&(clearInterval(this._autoSaveTimer),this._autoSaveTimer=null),this._statusTimer!==null&&(clearInterval(this._statusTimer),this._statusTimer=null)}_restartAutoSave(){if(this._stopAutoSave(),this.autoSave===null)return;let t=this._readAutoSave();t&&(this._lastSavedAt=t.savedAt),this._autoSaveTimer=window.setInterval(this._autoSaveTick,this.autoSave*6e4),this._statusTimer=window.setInterval(()=>this._statusNow=Date.now(),3e4)}_readAutoSave(){try{let t=localStorage.getItem(this._autoSaveKey);if(!t)return null;let r=JSON.parse(t);return!r.state||Date.now()-r.savedAt>aq?(localStorage.removeItem(this._autoSaveKey),null):r}catch{return null}}restoreAutoSave(){let t=this._readAutoSave();if(!t)return!1;this._restoring=!0;try{this.setState(t.state)}finally{this._restoring=!1}return this._restorePrompt=null,!0}_offerRestoreIfNewer(){if(this.autoSave===null||this._restoring)return;let t=this._readAutoSave();this._restorePrompt=t&&JSON.stringify(t.state)!==JSON.stringify(this._state)?{savedAt:t.savedAt}:null}willUpdate(t){t.has("nodeTypes")&&this.nodeTypes?.length&&this.registry.registerAll(this.nodeTypes),t.has("autoSave")&&this._restartAutoSave(),super.willUpdate(t)}firstUpdated(t){super.firstUpdated(t),this._registerSlottedTypes()}static _parsePorts(t){if(t===null)return;let r=t.trim();if(r==="")return[];try{let n=JSON.parse(r);return Array.isArray(n)?n.map(a=>typeof a=="string"?{id:a}:a):void 0}catch{return}}static _parseFilterOptions(t){if(t===null)return;let r=t.trim();if(r!==""){if(r.startsWith("["))try{let n=JSON.parse(r);return Array.isArray(n)?n.map(a=>typeof a=="string"?{value:a}:a):void 0}catch{return}return r.split(",").map(n=>n.trim()).filter(Boolean).map(n=>({value:n}))}}static _nestedFilterOptions(t,r){let n=Array.from(t.querySelectorAll(`:scope > ${r}`));if(n.length)return n.map(a=>{let s=a.textContent?.trim()??"",l=a.getAttribute("value");return l!==null&&s?{value:l,label:s}:{value:l??s}})}static _filterFieldFromEl(t){let r=t.getAttribute("id");if(!r)return null;let n=t.getAttribute("value"),a=t.getAttribute("type");return{id:r,label:t.getAttribute("label")??void 0,type:a??void 0,operators:vt._nestedFilterOptions(t,"zn-flow-operator")??vt._parseFilterOptions(t.getAttribute("operators")),options:vt._nestedFilterOptions(t,"zn-flow-option")??vt._parseFilterOptions(t.getAttribute("options")),units:vt._nestedFilterOptions(t,"zn-flow-unit")??vt._parseFilterOptions(t.getAttribute("units")),suffix:t.getAttribute("suffix")??void 0,placeholder:t.getAttribute("placeholder")??void 0,value:n===null?void 0:a==="number"?Number(n):n}}static _parseBranchFilters(t){let r=s=>s?.map(l=>typeof l=="string"?{value:l}:l),n=t.getAttribute("branch-filters");if(n)try{let s=JSON.parse(n);if(Array.isArray(s))return s.map(l=>({...l,fields:(l.fields??[]).map(d=>({...d,...d.operators?{operators:r(d.operators)}:{},...d.options?{options:r(d.options)}:{},...d.units?{units:r(d.units)}:{}}))}))}catch{}let a=Array.from(t.querySelectorAll(":scope > zn-flow-filter")).map(s=>{let l=s.getAttribute("id")??s.getAttribute("label");return l?{id:l,label:s.getAttribute("label")??l,description:s.getAttribute("description")??void 0,fields:Array.from(s.querySelectorAll(":scope > zn-flow-filter-field")).map(d=>vt._filterFieldFromEl(d)).filter(d=>!!d)}:null}).filter(s=>!!s);return a.length?a:void 0}_typeFromStep(t){let r=t.getAttribute("type");if(!r)return null;let n=Array.from(t.childNodes).filter(a=>a.nodeType===Node.TEXT_NODE).map(a=>a.textContent??"").join("").trim();return{type:r,label:t.getAttribute("label")??(n||r),group:t.getAttribute("group")??"action",category:t.getAttribute("category")??void 0,icon:t.getAttribute("icon")??void 0,iconLibrary:t.getAttribute("icon-library")??void 0,color:t.getAttribute("color")??void 0,description:t.getAttribute("description")??void 0,inputs:vt._parsePorts(t.getAttribute("inputs")),outputs:vt._parsePorts(t.getAttribute("outputs")),branchFilters:vt._parseBranchFilters(t)}}registerNodeType(t){return this.registry.register(t),this.requestUpdate(),this}registerNodeTypes(t){return this.registry.registerAll(t),this.requestUpdate(),this}getState(){return this._clone(this._state)}setState(t){this._cancelUntangle(),this._state=t,this._history=[],this._redo=[],this._selectedNodeId=null,this._configRevision++,this._offerRestoreIfNewer()}get value(){return JSON.stringify(this._state)}set value(t){try{let r=JSON.parse(t);this.setState({nodes:r.nodes??[],connections:r.connections??[],notes:r.notes??[]})}catch{}}toJSON(){return this.getState()}_cancelUntangle(){this._untangleRaf!==null&&(cancelAnimationFrame(this._untangleRaf),this._untangleRaf=null),this._untangleSettle?.(),this._untangleSettle=null}_clone(t){return JSON.parse(JSON.stringify(t))}_pushHistory(){this._history.push(this._clone(this._state)),this._history.length>nq&&this._history.shift(),this._redo=[]}_pruneConnections(){let t=new Map(this._state.nodes.map(r=>[r.id,r]));this._state.connections=this._state.connections.filter(r=>{let n=t.get(r.source.node),a=t.get(r.target.node);if(!n||!a)return!1;let s=We(n,this.registry.get(n.type)).some(d=>d.id===r.source.port),l=Pi(a,this.registry.get(a.type)).some(d=>d.id===r.target.port);return s&&l})}_syncSelection(){this._selectedNodeId&&!this._state.nodes.some(t=>t.id===this._selectedNodeId)&&(this._selectedNodeId=null),this._selectedBranch&&!this._branchSelection()&&(this._selectedBranch=null)}_branchSelection(){if(!this._selectedBranch)return null;let t=this._state.nodes.find(n=>n.id===this._selectedBranch.nodeId);if(!t)return null;let r=We(t,this.registry.get(t.type)).find(n=>n.id===this._selectedBranch.port);return r?{node:t,port:r}:null}_id(t){return`${t}-${Date.now().toString(36)}-${++this._seq}`}_freePosition(t,r,n){let a=new Set(this._state.connections.filter(d=>n&&d.target.node===n&&d.source.node!==n).map(d=>d.source.node)),s=(d,h)=>{let m=n?this._state.nodes.map(b=>b.id===n?{...b,x:d,y:h}:b):this._state.nodes,f=b=>this.registry.get(b);return m.some(b=>b.id!==n&&K2({x:d,y:h},b,f,m,this._state.connections))?!0:[...a].some(b=>{let g=m.find(v=>v.id===b);return!!g&&Up(g,f,m,this._state.connections)})};if(t=Dr(t),r=Dr(r),!s(t,r))return{x:t,y:r};let l=Ge*2;for(let d=1;d<40;d++)for(let h=-d;h<=d;h++)for(let m=-d;m<=d;m++)if(Math.max(Math.abs(m),Math.abs(h))===d&&!s(t+m*l,r+h*l))return{x:t+m*l,y:r+h*l};return{x:t,y:r}}_addNode(t,r,n){let a=this.registry.get(t);if(!a)return;this._pushHistory();let s=this._freePosition(r,n),l={id:this._id("node"),type:t,x:s.x,y:s.y,data:{...a.defaultData??{}}};this._state.nodes.push(l),this._select(l.id),this._commit()}_deleteNode(t){this._pushHistory(),this._state.nodes=this._state.nodes.filter(r=>r.id!==t),this._state.connections=this._state.connections.filter(r=>r.source.node!==t&&r.target.node!==t),this._selectedNodeId===t&&this._select(null),this._commit()}_duplicateNode(t){let r=this._state.nodes.find(s=>s.id===t);if(!r)return;this._pushHistory();let n=this._freePosition(r.x+Ge*2,r.y+Ge*2),a={...this._clone({nodes:[r],connections:[],notes:[]}).nodes[0],id:this._id("node"),x:n.x,y:n.y};this._state.nodes.push(a),this._select(a.id),this._commit()}_positionBelowOutput(t,r){let n=We(t,this.registry.get(t.type)),a=Math.max(n.findIndex(l=>l.id===r),0),s=bc(t,l=>this.registry.get(l))[a];return{x:Math.round(s-ne/2),y:t.y+Kp}}_ensureOutput(t,r){if(r!==Bp)return r;let n=We(t,this.registry.get(t.type)).map(s=>({...s})),a=this._id("branch");return n.push({id:a,label:"Branch"}),t.outputs=n,a}_ensureBranchLabel(t,r){let n=We(t,this.registry.get(t.type)).map(s=>({...s})),a=n.find(s=>s.id===r);a&&!a.label&&(a.label="Branch",t.outputs=n)}_addNodeAtOutput(t,r,n){let a=this._state.nodes.find(b=>b.id===t),s=this.registry.get(n);if(!a||!s)return;let l=jp(s)[0]?.id;if(!l)return;this._pushHistory(),r=this._ensureOutput(a,r),this._ensureBranchLabel(a,r);let d=this._positionBelowOutput(a,r),h=this._freePosition(d.x,d.y),m={id:this._id("node"),type:n,x:h.x,y:h.y,data:{...s.defaultData??{}}},f={id:this._id("conn"),source:{node:t,port:r},target:{node:m.id,port:l}};this._state.nodes.push(m),this._state.connections.push(f),this.emit("zn-flow-connect",{detail:{connection:f}}),this._select(m.id),this._commit()}_linkNodeAtOutput(t,r,n){let a=this._state.nodes.find(h=>h.id===t),s=this._state.nodes.find(h=>h.id===n);if(!a||!s||t===n)return;let l=vc(s,this.registry.get(s.type));if(l===null)return;this._pushHistory(),r=this._ensureOutput(a,r),this._ensureBranchLabel(a,r);let d={id:this._id("conn"),source:{node:t,port:r},target:{node:n,port:l}};this._state.connections.push(d),this.emit("zn-flow-connect",{detail:{connection:d}}),this._select(null),this._selectedBranch={nodeId:t,port:r},this._commit()}_insertNodeOnWire(t,r){let n=this._state.connections.find(_=>_.id===t),a=this.registry.get(r);if(!n||!a)return;let s=this._state.nodes.find(_=>_.id===n.source.node),l=this._state.nodes.find(_=>_.id===n.target.node);if(!s||!l)return;let d=jp(a)[0]?.id;if(!d)return;this._pushHistory();let h=$f(a).map(_=>({..._}));h.length||h.push({id:this._id("branch")}),h[0].label||(h[0].label="Branch");let m=this._positionBelowOutput(s,n.source.port),f=m.y+Kp;if(l.y<f){let _=f-l.y,$=Z2(this._state,l.id);$.add(l.id),this._state.nodes.forEach(N=>{$.has(N.id)&&(N.y+=_)})}let b=this._freePosition(m.x,m.y),g={id:this._id("node"),type:r,x:b.x,y:b.y,outputs:h,data:{...a.defaultData??{}}},v=n.target.port;n.target={node:g.id,port:d};let x={id:this._id("conn"),source:{node:g.id,port:h[0].id},target:{node:l.id,port:v}};this._state.nodes.push(g),this._state.connections.push(x),this.emit("zn-flow-connect",{detail:{connection:x}}),this._select(g.id),this._commit()}_select(t){this._selectedBranch=null,t&&(this._sideCollapsed=!1),this._selectedNodeId!==t&&(this._selectedNodeId=t,this.emit("zn-flow-selection-change",{detail:{nodeId:t}}))}_onDragStart(t,r){t.dataTransfer&&(this._draggingType=r,t.dataTransfer.setData(h_,r),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage(Vp(),0,0))}_renderSteps(){return u`
|
|
5021
|
+
`}};Sn.styles=E(l_),Sn.dependencies={"zn-collapsible":oa},c([p()],Sn.prototype,"caption",2),c([p({type:Boolean,reflect:!0})],Sn.prototype,"collapsed",2);var If=Sn;Sn.define("zn-flow-step-group");var Wp=class{constructor(){this.types=new Map}register(o){return this.types.set(o.type,o),this}registerAll(o){return o.forEach(t=>this.register(t)),this}get(o){return this.types.get(o)}has(o){return this.types.has(o)}all(){return Array.from(this.types.values())}byGroup(o){return this.all().filter(t=>t.group===o)}categories(o){let t=new Map;for(let r of this.byGroup(o)){let n=r.category??"",a=t.get(n)??[];a.push(r),t.set(n,a)}return t}clear(){this.types.clear()}};var c_=ne+80,Kp=220,Df=40,yc=i=>i.reduce((o,t)=>o+t,0)/i.length;function d_(i,o){let t=new Map,r=i.nodes;if(!r.length)return t;let n=new Map(r.map(w=>[w.id,w])),a=new Map(r.map(w=>[w.id,[]])),s=new Map(r.map(w=>[w.id,[]]));for(let w of i.connections)!n.has(w.source.node)||!n.has(w.target.node)||(a.get(w.target.node).push(w),s.get(w.source.node).push(w));let l=Hi(r,i.connections),d=new Map,h=w=>{let T=d.get(w);if(T!==void 0)return T;let L=a.get(w).filter(tt=>!l.has(tt)),W=L.length?Math.max(...L.map(tt=>h(tt.source.node)))+1:0;return d.set(w,W),W};r.forEach(w=>h(w.id)),r.forEach(w=>{if(a.get(w.id).some(W=>!l.has(W)))return;let T=s.get(w.id).filter(W=>!l.has(W));if(!T.length)return;let L=Math.min(...T.map(W=>d.get(W.target.node)))-1;L>d.get(w.id)&&d.set(w.id,L)});let m=Array.from({length:Math.max(...d.values())+1},()=>[]);r.forEach(w=>m[d.get(w.id)].push(w));let f=w=>{let T=n.get(w.source.node),L=Ge(T,o(T.type)),W=Math.max(L.length,1),tt=Math.max(L.findIndex(dt=>dt.id===w.source.port),0);return W===1?0:(tt-(W-1)/2)*wf},b=new Map,g=w=>{let T=a.get(w.id).filter(L=>!l.has(L)&&b.has(L.source.node));return T.length?yc(T.map(L=>{let W=n.get(L.source.node),tt=Ge(W,o(W.type)),dt=Math.max(tt.length,1),gt=Math.max(tt.findIndex(_t=>_t.id===L.source.port),0);return b.get(W.id)+(gt+1)/(dt+1)-.5})):null},v=w=>{let T=s.get(w.id).filter(L=>!l.has(L)&&b.has(L.target.node));return T.length?yc(T.map(L=>b.get(L.target.node))):null};m[0].sort((w,T)=>w.x-T.x).forEach((w,T)=>b.set(w.id,T));for(let w=1;w<m.length;w++)m[w].sort((T,L)=>(g(T)??0)-(g(L)??0)).forEach((T,L)=>b.set(T.id,L));for(let w=1;w<m.length;w++){let T=L=>g(L)??v(L)??0;m[w].sort((L,W)=>T(L)-T(W)).forEach((L,W)=>b.set(L.id,W))}let x=new Map,_=(w,T)=>{let L=w.map(gt=>T(gt)??x.get(gt.id)??0),W=-1/0,tt=L.map(gt=>W=Math.max(gt,W+c_)),dt=yc(tt.map((gt,_t)=>gt-L[_t]));w.forEach((gt,_t)=>x.set(gt.id,tt[_t]-dt))},$=w=>{let T=a.get(w.id).filter(L=>!l.has(L)&&x.has(L.source.node));return T.length?yc(T.map(L=>x.get(L.source.node)+f(L))):null},N=w=>{let T=s.get(w.id).filter(L=>!l.has(L)&&x.has(L.target.node));return T.length?yc(T.map(L=>x.get(L.target.node)-f(L))):null};m[0].forEach((w,T)=>x.set(w.id,T*c_));for(let w=1;w<m.length;w++)_(m[w],$);for(let w=m.length-2;w>=0;w--)_(m[w],N);for(let w=1;w<m.length;w++)_(m[w],$);let G=[...x.values()].filter(Number.isFinite),I=G.length?Math.min(...G):0;return r.forEach(w=>{let T=x.get(w.id);t.set(w.id,{x:Dr(Number.isFinite(T)?T-I+Df:Df),y:Df+d.get(w.id)*Kp})}),t}var p_=S`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host ::-webkit-scrollbar{width:5px;height:5px}:host{}:host ::-webkit-scrollbar-track{background:transparent}:host{}:host ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}:host{}:host ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}:host{display:block;width:100%;height:100%;min-height:480px;color:rgb(var(--zn-text))}.builder{--steps-width:343px;--side-width:500px;display:grid;grid-template-columns:var(--steps-width) minmax(0,1fr) var(--side-width);grid-template-rows:auto minmax(0,1fr);width:100%;height:100%;background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:8px;overflow:hidden;transition:grid-template-columns 0.2s ease}.builder--steps-collapsed{--steps-width:0px}.builder--steps-collapsed .steps{border-right:none}.builder--side-collapsed{--side-width:0px}.builder--side-collapsed .sidebar,.builder--side-collapsed .inspector{padding:0;border-left:none}.header{grid-row:1;grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 14px;border-bottom:1px solid rgb(var(--zn-border-color));background:rgb(var(--zn-panel))}.header[hidden]{display:none}.header__group{display:flex;align-items:center;gap:8px}.steps,.inspector,.sidebar{grid-row:2;display:flex;flex-direction:column;min-height:0;min-width:0;overflow:hidden;background:rgb(var(--zn-panel))}.canvas-cell{grid-row:2;position:relative;min-width:0;min-height:0}.panel-toggle{position:absolute;top:50%;z-index:6;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border-radius:50%;color:rgb(var(--zn-color-muted-text));background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));box-shadow:0 1px 3px rgba(var(--zn-shadow),0.4);cursor:pointer;transition:left 0.2s ease,right 0.2s ease,color 0.12s ease,border-color 0.12s ease}.panel-toggle:hover{color:rgb(var(--zn-text));border-color:rgb(var(--zn-color-border-active))}.panel-toggle--left{left:-12px}.panel-toggle--left.panel-toggle--tucked{left:8px}.panel-toggle--right{right:-12px}.panel-toggle--right.panel-toggle--tucked{right:8px}.steps{--zn-active-nav-background:var(--zn-panel);border-right:1px solid rgb(var(--zn-border-color))}.steps-content{flex:1;min-height:0;display:flex;flex-direction:column}.steps-panel{display:flex;flex-direction:column;min-height:0;height:100%}.steps-hint{margin:0;padding:12px var(--zn-base-gap);font-size:0.8125rem;line-height:1.4;color:rgb(var(--zn-color-muted-text))}.steps-scroll ::-webkit-scrollbar{width:5px;height:5px}.steps-scroll{}.steps-scroll ::-webkit-scrollbar-track{background:transparent}.steps-scroll{}.steps-scroll ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}.steps-scroll{}.steps-scroll ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}.steps-scroll{flex:1;min-height:0;overflow-y:auto;padding-bottom:16px}.steps-scroll zn-flow-step-group{display:block;border-top:1px solid rgb(var(--zn-border-color))}.steps-uncategorized{padding:8px var(--zn-base-gap)}.steps-empty{padding:16px var(--zn-base-gap);font-size:0.8125rem;color:rgb(var(--zn-color-muted-text))}.declarations{display:none}.title-block{padding:16px;border-bottom:1px solid rgb(var(--zn-border-color))}.title-block .heading{font-size:0.9375rem;font-weight:600}.title-block .subheading{margin-top:2px;font-size:0.75rem;color:rgb(var(--zn-color-muted-text))}.search{padding:12px 12px 8px}.step{display:flex;align-items:center;gap:10px;padding:8px 10px;margin-bottom:6px;background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:8px;font-size:0.8125rem;cursor:grab;transition:border-color 0.12s ease,box-shadow 0.12s ease}.step:hover{border-color:rgb(var(--zn-color-border-active));box-shadow:0 1px 3px rgba(var(--zn-shadow),0.4)}.step:active{cursor:grabbing}.step__icon{--node-accent:rgb(var(--zn-color-primary));display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:28px;height:28px;border-radius:6px;color:var(--node-accent);background:color-mix(in srgb,var(--node-accent) 14%,transparent)}.step__label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.inspector{border-left:1px solid rgb(var(--zn-border-color));animation:inspector-in 0.18s ease}.inspector-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;height:100%;padding:24px;text-align:center;color:rgb(var(--zn-color-muted-text));font-size:0.8125rem}.inspector-head{display:flex;align-items:center;gap:12px;padding:16px;border-bottom:1px solid rgb(var(--zn-border-color))}.inspector-head__icon{--node-accent:rgb(var(--zn-color-primary));display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:36px;height:36px;border-radius:8px;color:var(--node-accent);background:color-mix(in srgb,var(--node-accent) 14%,transparent)}.inspector-head__text{flex:1;min-width:0}.inspector-head__title-row{display:flex;align-items:center;gap:6px;min-width:0}.inspector-head__title-row .inspector-head__title{min-width:0}.inspector-head__title{font-size:0.875rem;font-weight:600}.inspector-head__title,.inspector-head__type{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.inspector-head__type{font-size:0.75rem;color:rgb(var(--zn-color-muted-text))}.inspector-body ::-webkit-scrollbar{width:5px;height:5px}.inspector-body{}.inspector-body ::-webkit-scrollbar-track{background:transparent}.inspector-body{}.inspector-body ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}.inspector-body{}.inspector-body ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}.inspector-body{display:flex;flex-direction:column;gap:14px;flex:1;min-height:0;overflow-y:auto;padding:16px}.inspector-hint{margin:0;font-size:0.75rem;color:rgb(var(--zn-color-muted-text))}.inspector-loop-tag{display:inline-flex;align-items:center;flex:0 0 auto;gap:3px;padding:2px 8px;border-radius:999px;font-size:0.6875rem;font-weight:600;line-height:1;color:rgb(var(--zn-color-warning));background:color-mix(in srgb,rgb(var(--zn-color-warning)) 14%,transparent)}.inspector-close{display:flex;align-items:center;justify-content:center;flex:0 0 auto;margin-left:auto;width:28px;height:28px;padding:0;border-radius:6px;color:rgb(var(--zn-color-muted-text));background:transparent;cursor:pointer}.inspector-close:hover{background:rgb(var(--zn-color-tab));color:rgb(var(--zn-text))}@keyframes inspector-in{from{transform:translateX(32px);opacity:0.3}to{transform:translateX(0);opacity:1}}.sidebar ::-webkit-scrollbar{width:5px;height:5px}.sidebar{}.sidebar ::-webkit-scrollbar-track{background:transparent}.sidebar{}.sidebar ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}.sidebar{}.sidebar ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}.sidebar{border-left:1px solid rgb(var(--zn-border-color));overflow-y:auto;padding:16px}.sidebar-section__head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;font-size:0.8125rem;font-weight:600}.sidebar-count{min-width:20px;padding:0 6px;font-size:0.75rem;line-height:18px;text-align:center;border-radius:9px;color:rgb(var(--zn-color-muted-text));background:rgb(var(--zn-color-tab))}.sidebar-empty{margin:0;font-size:0.75rem;color:rgb(var(--zn-color-muted-text))}.sidebar-error{display:flex;align-items:center;gap:8px;width:100%;margin-bottom:6px;padding:8px 10px;font-size:0.8125rem;text-align:left;color:rgb(var(--zn-color-error));background:color-mix(in srgb,rgb(var(--zn-color-error)) 7%,transparent);border:1px solid color-mix(in srgb,rgb(var(--zn-color-error)) 25%,transparent);border-radius:8px;cursor:pointer}.picker{position:fixed;z-index:21;width:220px;max-height:320px;overflow-y:auto;padding:6px;background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:8px;box-shadow:0 6px 24px rgba(var(--zn-shadow),0.5)}.picker ::-webkit-scrollbar{width:5px;height:5px}.picker{}.picker ::-webkit-scrollbar-track{background:transparent}.picker{}.picker ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}.picker{}.picker ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}.picker-backdrop{position:fixed;inset:0;z-index:20}.picker-group{padding:8px 8px 4px;font-size:0.6875rem;font-weight:600;text-transform:uppercase;letter-spacing:0.04em;color:rgb(var(--zn-color-muted-text))}.picker-item{display:flex;align-items:center;gap:10px;width:100%;padding:7px 8px;font-size:0.8125rem;text-align:left;background:transparent;border-radius:6px;cursor:pointer}.picker-item:hover{background:rgb(var(--zn-color-tab))}.picker-item__icon{--node-accent:rgb(var(--zn-color-primary));display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:26px;height:26px;border-radius:6px;color:var(--node-accent);background:color-mix(in srgb,var(--node-accent) 14%,transparent)}.picker-empty{margin:0;padding:10px;font-size:0.75rem;color:rgb(var(--zn-color-muted-text))}.save-status{position:absolute;left:16px;bottom:16px;z-index:5;display:flex;align-items:center;gap:6px;padding:5px 10px;font-size:0.75rem;color:rgb(var(--zn-color-muted-text));background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:8px;box-shadow:0 1px 3px rgba(var(--zn-shadow),0.4);pointer-events:none;transition:color 0.15s ease,border-color 0.15s ease}.save-status--saved{color:rgb(var(--zn-color-success));border-color:color-mix(in srgb,rgb(var(--zn-color-success)) 45%,transparent)}.restore-banner{position:absolute;top:16px;left:50%;transform:translateX(-50%);z-index:5;display:flex;align-items:center;flex-wrap:wrap;justify-content:center;gap:8px;width:-moz-max-content;width:max-content;max-width:calc(100% - 32px);padding:8px 12px;font-size:0.8125rem;color:rgb(var(--zn-text));background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:8px;box-shadow:0 2px 8px rgba(var(--zn-shadow),0.5)}.restore-banner span{flex:1 1 auto;min-width:min(160px,100%)}.restore-banner button{flex:0 0 auto;padding:3px 10px;font-size:0.75rem;font-weight:600;border-radius:6px;cursor:pointer}.restore-banner__restore{color:rgb(var(--zn-panel));background:rgb(var(--zn-color-primary))}.restore-banner__restore:hover{filter:brightness(1.1)}.restore-banner__dismiss{color:rgb(var(--zn-color-muted-text));background:transparent}.restore-banner__dismiss:hover{background:rgb(var(--zn-color-tab))}.move-banner{position:absolute;top:16px;left:50%;transform:translateX(-50%);z-index:5;display:flex;align-items:center;gap:8px;padding:8px 12px;font-size:0.8125rem;color:rgb(var(--zn-panel));background:rgb(var(--zn-color-primary));border-radius:8px;box-shadow:0 2px 8px rgba(var(--zn-shadow),0.5)}.move-banner button{padding:2px 8px;font-size:0.75rem;font-weight:600;color:rgb(var(--zn-panel));background:rgba(255,255,255,0.2);border-radius:6px;cursor:pointer}`;var nq=50,h_=Ds,iq=5,aq=1440*60*1e3;function u_(i){let o=Math.floor(i/1e3);if(o<10)return"just now";if(o<60)return`${o}s ago`;let t=Math.floor(o/60);if(t<60)return`${t}m ago`;let r=Math.floor(t/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}var m_=[{group:"entrypoint",label:"Entrypoint"},{group:"trigger",label:"Triggers"},{group:"action",label:"Actions"},{group:"rule",label:"Rules"}],vt=class vt extends C{constructor(){super(...arguments);this.nodeTypes=[];this.heading="";this.subheading="";this.errorNodes=[];this.autoSave=null;this.entrypointsHint="";this.triggersHint="";this.actionsHint="";this.rulesHint="";this.registry=new Wp;this._state=J2();this._selectedNodeId=null;this._selectedBranch=null;this._search="";this._activeGroup=null;this._hasSlot=new Q(this,"header-left","header-right");this._stepsCollapsed=!1;this._sideCollapsed=!1;this._movingNodeId=null;this._picker=null;this._draggingType=null;this._history=[];this._redo=[];this._seq=0;this._untangleRaf=null;this._untangleSettle=null;this._configRevision=0;this._autoSaveTimer=null;this._statusTimer=null;this._justSavedTimer=null;this._restoring=!1;this._lastSavedAt=null;this._justSaved=!1;this._statusNow=Date.now();this._restorePrompt=null;this._autoSaveTick=()=>{if(this._restorePrompt)return;let t=this.getState();if(!(!t.nodes.length&&!t.connections.length&&!t.notes.length))try{localStorage.setItem(this._autoSaveKey,JSON.stringify({savedAt:Date.now(),state:t})),this._lastSavedAt=Date.now(),this._justSaved=!0,this._justSavedTimer!==null&&clearTimeout(this._justSavedTimer),this._justSavedTimer=window.setTimeout(()=>this._justSaved=!1,2500)}catch{}};this._onKeyDown=t=>{t.key==="Escape"&&(this._movingNodeId||this._picker||this._selectedBranch)&&(this._movingNodeId=null,this._picker=null,this._selectedBranch=null)};this._registerSlottedTypes=()=>{let t=!1;this.querySelectorAll("zn-flow-step").forEach(r=>{let n=this._typeFromStep(r);n&&!this.registry.has(n.type)&&(this.registry.register(n),t=!0)}),t&&this.requestUpdate()};this.undo=()=>{let t=this._history.pop();t&&(this._cancelUntangle(),this._redo.push(this._clone(this._state)),this._state=t,this._configRevision++,this._syncSelection(),this._commit())};this.redo=()=>{let t=this._redo.pop();t&&(this._cancelUntangle(),this._history.push(this._clone(this._state)),this._state=t,this._configRevision++,this._syncSelection(),this._commit())};this.untangle=()=>{if(!this._state.nodes.length)return;this._cancelUntangle(),this._pushHistory();let t=d_(this._state,f=>this.registry.get(f)),r=this._state.nodes.map(f=>({n:f,from:{x:f.x,y:f.y},to:t.get(f.id)})).filter(f=>!!f.to),n=()=>{r.forEach(({n:f,to:b})=>{f.x=b.x,f.y=b.y})},a=()=>{this._untangleSettle=null,n(),this._commit()};if(this._untangleSettle=n,window.matchMedia("(prefers-reduced-motion: reduce)").matches){a();return}let s=500,l=f=>f<.5?4*f*f*f:1-Math.pow(-2*f+2,3)/2,d=this.shadowRoot?.querySelector("zn-flow-canvas"),h=performance.now(),m=f=>{let b=Math.min(1,(f-h)/s);if(b>=1){this._untangleRaf=null,a();return}let g=l(b);r.forEach(({n:v,from:x,to:_})=>{v.x=Math.round(x.x+(_.x-x.x)*g),v.y=Math.round(x.y+(_.y-x.y)*g)}),d?.requestUpdate(),this._untangleRaf=requestAnimationFrame(m)};this._untangleRaf=requestAnimationFrame(m)};this._commit=()=>{this._pruneConnections(),this._state={nodes:[...this._state.nodes],connections:[...this._state.connections],notes:[...this._state.notes]},this._restorePrompt=null,this.emit("zn-flow-change",{detail:{state:this.getState()}})};this._onBranchPick=t=>{this._select(null),this._sideCollapsed=!1,this._selectedBranch={nodeId:t.detail.nodeId,port:t.detail.port}};this._onBranchDelete=t=>{let r=this._state.nodes.find(a=>a.id===t.detail.nodeId);if(!r)return;this._pushHistory();let n=Ge(r,this.registry.get(r.type)).filter(a=>a.id!==t.detail.port);r.outputs=n.length?n:[{...Fp}],this._state.connections=this._state.connections.filter(a=>!(a.source.node===r.id&&a.source.port===t.detail.port)),this._selectedBranch?.nodeId===t.detail.nodeId&&this._selectedBranch.port===t.detail.port&&(this._selectedBranch=null),this._commit()};this._onSelect=t=>{if(t.detail.nodeId===null&&this._movingNodeId){this._movingNodeId=null;return}this._select(t.detail.nodeId)};this._onNodeAction=t=>{let{nodeId:r,action:n}=t.detail;n==="delete"?this._deleteNode(r):n==="duplicate"?this._duplicateNode(r):n==="move"&&(this._movingNodeId=r)};this._onInteractionStart=()=>{this._pushHistory()};this._onOutputAssign=t=>{this._addNodeAtOutput(t.detail.nodeId,t.detail.port,t.detail.type)};this._onLinkAssign=t=>{this._linkNodeAtOutput(t.detail.nodeId,t.detail.port,t.detail.targetId)};this._onWirePick=t=>{this._picker={x:t.detail.clientX,y:t.detail.clientY,target:{kind:"wire",connectionId:t.detail.connectionId}}};this._onWireAssign=t=>{this._insertNodeOnWire(t.detail.connectionId,t.detail.type)};this._onOutputMoveTarget=t=>{let r=this._movingNodeId;if(this._movingNodeId=null,!r)return;let n=t.detail.nodeId;if(n===r)return;let a=this._state.nodes.find(b=>b.id===n),s=this._state.nodes.find(b=>b.id===r);if(!a||!s)return;let l=vc(s,this.registry.get(s.type));if(l===null)return;this._pushHistory();let d=this._ensureOutput(a,t.detail.port);this._ensureBranchLabel(a,d),this._state.connections=this._state.connections.filter(b=>b.target.node!==r);let h={id:this._id("conn"),source:{node:n,port:d},target:{node:r,port:l}};this._state.connections.push(h);let m=this._positionBelowOutput(a,d),f=this._freePosition(m.x,m.y,r);s.x=f.x,s.y=f.y,this.emit("zn-flow-connect",{detail:{connection:h}}),this._commit()};this._onAddNote=()=>{this._pushHistory(),this._state.notes.push({id:this._id("note"),x:80,y:80,text:""}),this._commit()};this._onNoteChange=t=>{let r=this._state.notes.find(n=>n.id===t.detail.noteId);r&&(r.text=t.detail.text,this._commit())};this._onNoteDelete=t=>{this._pushHistory(),this._state.notes=this._state.notes.filter(r=>r.id!==t.detail.noteId),this._commit()};this._onDragEnd=()=>{this._draggingType=null};this._onStepDrag=t=>{this._draggingType=t.detail.type};this._onCanvasDragOver=t=>{t.preventDefault()};this._onCanvasDrop=t=>{let r=t.dataTransfer?.getData(h_);if(!r)return;t.preventDefault();let a=this.shadowRoot?.querySelector("zn-flow-canvas")?.screenToCanvas(t.clientX,t.clientY)??{x:t.clientX,y:t.clientY};this._addNode(r,a.x-ne/2,a.y-er/2)}}get _listeners(){return[["flow-node-select",this._onSelect],["flow-node-action",this._onNodeAction],["flow-interaction-start",this._onInteractionStart],["flow-change-commit",this._commit],["flow-output-assign",this._onOutputAssign],["flow-link-assign",this._onLinkAssign],["flow-output-move-target",this._onOutputMoveTarget],["flow-wire-pick",this._onWirePick],["flow-wire-assign",this._onWireAssign],["flow-branch-pick",this._onBranchPick],["flow-branch-delete",this._onBranchDelete],["flow-step-drag",this._onStepDrag],["flow-step-drag-end",this._onDragEnd],["flow-undo",this.undo],["flow-redo",this.redo],["flow-untangle",this.untangle],["flow-add-note",this._onAddNote],["flow-note-change",this._onNoteChange],["flow-note-delete",this._onNoteDelete]]}connectedCallback(){super.connectedCallback(),this._listeners.forEach(([t,r])=>this.addEventListener(t,r)),document.addEventListener("keydown",this._onKeyDown)}disconnectedCallback(){this._listeners.forEach(([t,r])=>this.removeEventListener(t,r)),document.removeEventListener("keydown",this._onKeyDown),this._cancelUntangle(),this._stopAutoSave(),this._justSavedTimer!==null&&(clearTimeout(this._justSavedTimer),this._justSavedTimer=null),super.disconnectedCallback()}get _autoSaveKey(){return`zn-flow-builder:${this.id||this.heading||"flow"}`}_stopAutoSave(){this._autoSaveTimer!==null&&(clearInterval(this._autoSaveTimer),this._autoSaveTimer=null),this._statusTimer!==null&&(clearInterval(this._statusTimer),this._statusTimer=null)}_restartAutoSave(){if(this._stopAutoSave(),this.autoSave===null)return;let t=this._readAutoSave();t&&(this._lastSavedAt=t.savedAt),this._autoSaveTimer=window.setInterval(this._autoSaveTick,this.autoSave*6e4),this._statusTimer=window.setInterval(()=>this._statusNow=Date.now(),3e4)}_readAutoSave(){try{let t=localStorage.getItem(this._autoSaveKey);if(!t)return null;let r=JSON.parse(t);return!r.state||Date.now()-r.savedAt>aq?(localStorage.removeItem(this._autoSaveKey),null):r}catch{return null}}restoreAutoSave(){let t=this._readAutoSave();if(!t)return!1;this._restoring=!0;try{this.setState(t.state)}finally{this._restoring=!1}return this._restorePrompt=null,!0}_offerRestoreIfNewer(){if(this.autoSave===null||this._restoring)return;let t=this._readAutoSave();this._restorePrompt=t&&JSON.stringify(t.state)!==JSON.stringify(this._state)?{savedAt:t.savedAt}:null}willUpdate(t){t.has("nodeTypes")&&this.nodeTypes?.length&&this.registry.registerAll(this.nodeTypes),t.has("autoSave")&&this._restartAutoSave(),super.willUpdate(t)}firstUpdated(t){super.firstUpdated(t),this._registerSlottedTypes()}static _parsePorts(t){if(t===null)return;let r=t.trim();if(r==="")return[];try{let n=JSON.parse(r);return Array.isArray(n)?n.map(a=>typeof a=="string"?{id:a}:a):void 0}catch{return}}static _parseFilterOptions(t){if(t===null)return;let r=t.trim();if(r!==""){if(r.startsWith("["))try{let n=JSON.parse(r);return Array.isArray(n)?n.map(a=>typeof a=="string"?{value:a}:a):void 0}catch{return}return r.split(",").map(n=>n.trim()).filter(Boolean).map(n=>({value:n}))}}static _nestedFilterOptions(t,r){let n=Array.from(t.querySelectorAll(`:scope > ${r}`));if(n.length)return n.map(a=>{let s=a.textContent?.trim()??"",l=a.getAttribute("value");return l!==null&&s?{value:l,label:s}:{value:l??s}})}static _filterFieldFromEl(t){let r=t.getAttribute("id");if(!r)return null;let n=t.getAttribute("value"),a=t.getAttribute("type");return{id:r,label:t.getAttribute("label")??void 0,type:a??void 0,operators:vt._nestedFilterOptions(t,"zn-flow-operator")??vt._parseFilterOptions(t.getAttribute("operators")),options:vt._nestedFilterOptions(t,"zn-flow-option")??vt._parseFilterOptions(t.getAttribute("options")),units:vt._nestedFilterOptions(t,"zn-flow-unit")??vt._parseFilterOptions(t.getAttribute("units")),suffix:t.getAttribute("suffix")??void 0,placeholder:t.getAttribute("placeholder")??void 0,value:n===null?void 0:a==="number"?Number(n):n}}static _parseBranchFilters(t){let r=s=>s?.map(l=>typeof l=="string"?{value:l}:l),n=t.getAttribute("branch-filters");if(n)try{let s=JSON.parse(n);if(Array.isArray(s))return s.map(l=>({...l,fields:(l.fields??[]).map(d=>({...d,...d.operators?{operators:r(d.operators)}:{},...d.options?{options:r(d.options)}:{},...d.units?{units:r(d.units)}:{}}))}))}catch{}let a=Array.from(t.querySelectorAll(":scope > zn-flow-filter")).map(s=>{let l=s.getAttribute("id")??s.getAttribute("label");return l?{id:l,label:s.getAttribute("label")??l,description:s.getAttribute("description")??void 0,fields:Array.from(s.querySelectorAll(":scope > zn-flow-filter-field")).map(d=>vt._filterFieldFromEl(d)).filter(d=>!!d)}:null}).filter(s=>!!s);return a.length?a:void 0}_typeFromStep(t){let r=t.getAttribute("type");if(!r)return null;let n=Array.from(t.childNodes).filter(a=>a.nodeType===Node.TEXT_NODE).map(a=>a.textContent??"").join("").trim();return{type:r,label:t.getAttribute("label")??(n||r),group:t.getAttribute("group")??"action",category:t.getAttribute("category")??void 0,icon:t.getAttribute("icon")??void 0,iconLibrary:t.getAttribute("icon-library")??void 0,color:t.getAttribute("color")??void 0,description:t.getAttribute("description")??void 0,inputs:vt._parsePorts(t.getAttribute("inputs")),outputs:vt._parsePorts(t.getAttribute("outputs")),branchFilters:vt._parseBranchFilters(t)}}registerNodeType(t){return this.registry.register(t),this.requestUpdate(),this}registerNodeTypes(t){return this.registry.registerAll(t),this.requestUpdate(),this}getState(){return this._clone(this._state)}setState(t){this._cancelUntangle(),this._state=t,this._history=[],this._redo=[],this._selectedNodeId=null,this._configRevision++,this._offerRestoreIfNewer()}get value(){return JSON.stringify(this._state)}set value(t){try{let r=JSON.parse(t);this.setState({nodes:r.nodes??[],connections:r.connections??[],notes:r.notes??[]})}catch{}}toJSON(){return this.getState()}_cancelUntangle(){this._untangleRaf!==null&&(cancelAnimationFrame(this._untangleRaf),this._untangleRaf=null),this._untangleSettle?.(),this._untangleSettle=null}_clone(t){return JSON.parse(JSON.stringify(t))}_pushHistory(){this._history.push(this._clone(this._state)),this._history.length>nq&&this._history.shift(),this._redo=[]}_pruneConnections(){let t=new Map(this._state.nodes.map(r=>[r.id,r]));this._state.connections=this._state.connections.filter(r=>{let n=t.get(r.source.node),a=t.get(r.target.node);if(!n||!a)return!1;let s=Ge(n,this.registry.get(n.type)).some(d=>d.id===r.source.port),l=Pi(a,this.registry.get(a.type)).some(d=>d.id===r.target.port);return s&&l})}_syncSelection(){this._selectedNodeId&&!this._state.nodes.some(t=>t.id===this._selectedNodeId)&&(this._selectedNodeId=null),this._selectedBranch&&!this._branchSelection()&&(this._selectedBranch=null)}_branchSelection(){if(!this._selectedBranch)return null;let t=this._state.nodes.find(n=>n.id===this._selectedBranch.nodeId);if(!t)return null;let r=Ge(t,this.registry.get(t.type)).find(n=>n.id===this._selectedBranch.port);return r?{node:t,port:r}:null}_id(t){return`${t}-${Date.now().toString(36)}-${++this._seq}`}_freePosition(t,r,n){let a=new Set(this._state.connections.filter(d=>n&&d.target.node===n&&d.source.node!==n).map(d=>d.source.node)),s=(d,h)=>{let m=n?this._state.nodes.map(b=>b.id===n?{...b,x:d,y:h}:b):this._state.nodes,f=b=>this.registry.get(b);return m.some(b=>b.id!==n&&K2({x:d,y:h},b,f,m,this._state.connections))?!0:[...a].some(b=>{let g=m.find(v=>v.id===b);return!!g&&Up(g,f,m,this._state.connections)})};if(t=Dr(t),r=Dr(r),!s(t,r))return{x:t,y:r};let l=je*2;for(let d=1;d<40;d++)for(let h=-d;h<=d;h++)for(let m=-d;m<=d;m++)if(Math.max(Math.abs(m),Math.abs(h))===d&&!s(t+m*l,r+h*l))return{x:t+m*l,y:r+h*l};return{x:t,y:r}}_addNode(t,r,n){let a=this.registry.get(t);if(!a)return;this._pushHistory();let s=this._freePosition(r,n),l={id:this._id("node"),type:t,x:s.x,y:s.y,data:{...a.defaultData??{}}};this._state.nodes.push(l),this._select(l.id),this._commit()}_deleteNode(t){this._pushHistory(),this._state.nodes=this._state.nodes.filter(r=>r.id!==t),this._state.connections=this._state.connections.filter(r=>r.source.node!==t&&r.target.node!==t),this._selectedNodeId===t&&this._select(null),this._commit()}_duplicateNode(t){let r=this._state.nodes.find(s=>s.id===t);if(!r)return;this._pushHistory();let n=this._freePosition(r.x+je*2,r.y+je*2),a={...this._clone({nodes:[r],connections:[],notes:[]}).nodes[0],id:this._id("node"),x:n.x,y:n.y};this._state.nodes.push(a),this._select(a.id),this._commit()}_positionBelowOutput(t,r){let n=Ge(t,this.registry.get(t.type)),a=Math.max(n.findIndex(l=>l.id===r),0),s=bc(t,l=>this.registry.get(l))[a];return{x:Math.round(s-ne/2),y:t.y+Kp}}_ensureOutput(t,r){if(r!==Bp)return r;let n=Ge(t,this.registry.get(t.type)).map(s=>({...s})),a=this._id("branch");return n.push({id:a,label:"Branch"}),t.outputs=n,a}_ensureBranchLabel(t,r){let n=Ge(t,this.registry.get(t.type)).map(s=>({...s})),a=n.find(s=>s.id===r);a&&!a.label&&(a.label="Branch",t.outputs=n)}_addNodeAtOutput(t,r,n){let a=this._state.nodes.find(b=>b.id===t),s=this.registry.get(n);if(!a||!s)return;let l=jp(s)[0]?.id;if(!l)return;this._pushHistory(),r=this._ensureOutput(a,r),this._ensureBranchLabel(a,r);let d=this._positionBelowOutput(a,r),h=this._freePosition(d.x,d.y),m={id:this._id("node"),type:n,x:h.x,y:h.y,data:{...s.defaultData??{}}},f={id:this._id("conn"),source:{node:t,port:r},target:{node:m.id,port:l}};this._state.nodes.push(m),this._state.connections.push(f),this.emit("zn-flow-connect",{detail:{connection:f}}),this._select(m.id),this._commit()}_linkNodeAtOutput(t,r,n){let a=this._state.nodes.find(h=>h.id===t),s=this._state.nodes.find(h=>h.id===n);if(!a||!s||t===n)return;let l=vc(s,this.registry.get(s.type));if(l===null)return;this._pushHistory(),r=this._ensureOutput(a,r),this._ensureBranchLabel(a,r);let d={id:this._id("conn"),source:{node:t,port:r},target:{node:n,port:l}};this._state.connections.push(d),this.emit("zn-flow-connect",{detail:{connection:d}}),this._select(null),this._selectedBranch={nodeId:t,port:r},this._commit()}_insertNodeOnWire(t,r){let n=this._state.connections.find(_=>_.id===t),a=this.registry.get(r);if(!n||!a)return;let s=this._state.nodes.find(_=>_.id===n.source.node),l=this._state.nodes.find(_=>_.id===n.target.node);if(!s||!l)return;let d=jp(a)[0]?.id;if(!d)return;this._pushHistory();let h=$f(a).map(_=>({..._}));h.length||h.push({id:this._id("branch")}),h[0].label||(h[0].label="Branch");let m=this._positionBelowOutput(s,n.source.port),f=m.y+Kp;if(l.y<f){let _=f-l.y,$=Z2(this._state,l.id);$.add(l.id),this._state.nodes.forEach(N=>{$.has(N.id)&&(N.y+=_)})}let b=this._freePosition(m.x,m.y),g={id:this._id("node"),type:r,x:b.x,y:b.y,outputs:h,data:{...a.defaultData??{}}},v=n.target.port;n.target={node:g.id,port:d};let x={id:this._id("conn"),source:{node:g.id,port:h[0].id},target:{node:l.id,port:v}};this._state.nodes.push(g),this._state.connections.push(x),this.emit("zn-flow-connect",{detail:{connection:x}}),this._select(g.id),this._commit()}_select(t){this._selectedBranch=null,t&&(this._sideCollapsed=!1),this._selectedNodeId!==t&&(this._selectedNodeId=t,this.emit("zn-flow-selection-change",{detail:{nodeId:t}}))}_onDragStart(t,r){t.dataTransfer&&(this._draggingType=r,t.dataTransfer.setData(h_,r),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage(Vp(),0,0))}_renderSteps(){return u`
|
|
5021
5022
|
<aside part="steps" class="steps">
|
|
5022
5023
|
<div class="title-block">
|
|
5023
5024
|
<div class="heading">${this.heading||"Flow Builder"}</div>
|
|
@@ -5074,7 +5075,7 @@ ${n}`:""}</li></ol>`};return t(0)}parseTable(o,t){this.index++;let r=[],n=[];for
|
|
|
5074
5075
|
<div class="steps-uncategorized">${f}</div>`})}
|
|
5075
5076
|
</div>
|
|
5076
5077
|
</div>
|
|
5077
|
-
`}_renderInspector(t){let r=this.registry.get(t.type),n=r?.renderConfig,a=l=>{t.data={...t.data,...l},this._commit()},s=[t.id,this._configRevision,
|
|
5078
|
+
`}_renderInspector(t){let r=this.registry.get(t.type),n=r?.renderConfig,a=l=>{t.data={...t.data,...l},this._commit()},s=[t.id,this._configRevision,Ge(t,r).map(l=>l.id).join("|")];return u`
|
|
5078
5079
|
<aside part="inspector" class="inspector">
|
|
5079
5080
|
<div class="inspector-head">
|
|
5080
5081
|
<span
|
|
@@ -5103,7 +5104,7 @@ ${n}`:""}</li></ol>`};return t(0)}parseTable(o,t){this.index++;let r=[],n=[];for
|
|
|
5103
5104
|
`}
|
|
5104
5105
|
</div>
|
|
5105
5106
|
</aside>
|
|
5106
|
-
`}_updateBranch(t,r,n){let a=this.registry.get(t.type);t.outputs=
|
|
5107
|
+
`}_updateBranch(t,r,n){let a=this.registry.get(t.type);t.outputs=Ge(t,a).map(s=>s.id===r?{...s,...n,id:s.id}:s),this._commit()}_saveBranchConditions(t,r,n){this._pushHistory(),this._updateBranch(t,r.id,{data:{...r.data,conditions:n}}),this._selectedBranch=null}_renderBranchEditor(t,r){let n=this.registry.get(t.type),a=n?.renderBranchConfig,s=g=>this._updateBranch(t,r.id,g),l=[t.id,r.id,this._configRevision,JSON.stringify(r.data??null)],d=this._state.connections.find(g=>g.source.node===t.id&&g.source.port===r.id),h=!!d&&Hi(this._state.nodes,this._state.connections).has(d),m=h?"rgb(var(--zn-color-warning))":n?.color??"rgb(var(--zn-color-primary))",f=h?this._state.nodes.find(g=>g.id===d.target.node):void 0,b=f?f.label??this.registry.get(f.type)?.label??f.type:"";return u`
|
|
5107
5108
|
<aside part="inspector" class="inspector">
|
|
5108
5109
|
<div class="inspector-head">
|
|
5109
5110
|
<span
|
|
@@ -5613,4 +5614,4 @@ ${n}`:""}</li></ol>`};return t(0)}parseTable(o,t){this.index++;let r=[],n=[];for
|
|
|
5613
5614
|
@zn-error="${this._onFrameError}"></zn-preview-frame>
|
|
5614
5615
|
</div>
|
|
5615
5616
|
</div>
|
|
5616
|
-
</div>`}};Et.styles=E(k_),Et.dependencies={"zn-collapsible":oa,"zn-preview-frame":Ff,"zn-icon":ct,"zn-button":Ct,"zn-tabs":jo,"zn-navbar":aa,"zn-select":le,"zn-option":
|
|
5617
|
+
</div>`}};Et.styles=E(k_),Et.dependencies={"zn-collapsible":oa,"zn-preview-frame":Ff,"zn-icon":ct,"zn-button":Ct,"zn-tabs":jo,"zn-navbar":aa,"zn-select":le,"zn-option":Ne},c([p()],Et.prototype,"src",2),c([p({attribute:"frame-origin"})],Et.prototype,"frameOrigin",2),c([p({attribute:"data-uri"})],Et.prototype,"dataUri",2),c([p({reflect:!0})],Et.prototype,"mode",2),c([p({reflect:!0})],Et.prototype,"device",2),c([p({type:Number,attribute:"min-height"})],Et.prototype,"minHeight",2),c([p({type:Number})],Et.prototype,"debounce",2),c([p()],Et.prototype,"action",2),c([p({type:Number,attribute:"save-debounce"})],Et.prototype,"saveDebounce",2),c([p({type:Array})],Et.prototype,"sections",2),c([p({attribute:"section-layout"})],Et.prototype,"sectionLayout",2),c([p({type:Array})],Et.prototype,"sources",2),c([p({type:Boolean,reflect:!0,attribute:"controls-collapsed"})],Et.prototype,"controlsCollapsed",2),c([p({type:Boolean,reflect:!0})],Et.prototype,"standalone",2),c([p({attribute:"controls-caption"})],Et.prototype,"controlsCaption",2),c([p({attribute:"preview-caption"})],Et.prototype,"previewCaption",2),c([p({attribute:"submit-label"})],Et.prototype,"submitLabel",2),c([p({type:Boolean})],Et.prototype,"manual",2),c([F("zn-preview-frame")],Et.prototype,"frame",2),c([F("slot:not([name])")],Et.prototype,"controlsSlot",2),c([Ma(".editor__section-slot")],Et.prototype,"sectionSlots",2),c([O()],Et.prototype,"error",2),c([O()],Et.prototype,"_submitting",2),c([O()],Et.prototype,"_sourceIndex",2);var yq=Et;Et.define("zn-theme-editor");export{Dk as AbsoluteContainer,$A as ActionBar,Ih as Alert,BA as AnimatedButton,OA as AudioSelect,d5 as BulkActions,Ct as Button,na as ButtonGroup,SA as ButtonMenu,A3 as ChannelTile,I3 as Chart,u3 as ChatMessage,m3 as ChatMessageAttachment,rA as Checkbox,hA as CheckboxGroup,ll as Chip,oa as Collapsible,CA as ColorSelect,z3 as Cols,pl as Confirm,MA as ContentBlock,Dh as CopyButton,kA as DataSelect,y3 as DataTable,Oh as DataTableFilter,Bh as DataTableSearch,TA as DataTableSort,nA as Datepicker,C3 as DefinedLabel,ia as Dialog,nr as Dropdown,tA as Editor,To as EditorDialog,Km as EditorQuickAction,ac as EditorTool,Vh as EmptyState,ru as ExpandingAction,pA as File,NA as FilterContainer,IA as FilterWrapper,Af as FlowBranchConditions,sq as FlowBuilder,cq as FlowStep,If as FlowStepGroup,lq as FlowSteps,iA as FormGroup,eu as Header,Uh as HoverContainer,ct as Icon,U3 as IconPicker,cd as InlineEdit,ke as Input,aA as InputGroup,uA as Item,HA as Key,FA as KeyContainer,sA as LinkedSelect,DL as MarkdownEditor,Fo as Menu,In as MenuItem,aa as Navbar,S3 as Note,Yh as OptGroup,Ne as Option,c5 as OrderTable,V3 as Page,fq as PageBuilder,AA as PageNav,Rf as PagePaletteItem,Of as PageSectionCard,j3 as Pagination,X3 as Pane,K3 as Panel,sl as Popup,Ff as PreviewFrame,UA as PriorityList,l5 as ProgressBar,s5 as ProgressTile,a5 as QueryBuilder,lA as Radio,dA as RadioGroup,cA as Rating,UL as RemarkdEditor,RA as Reveal,n5 as ScrollContainer,le as Select,DA as SettingsContainer,Z3 as Sidebar,R3 as SimpleChart,jh as Skeleton,EA as Slideout,e5 as Sp,qA as SplitButton,J3 as SplitPane,o5 as Stat,LA as StatusIndicator,r5 as Stepper,Gh as Style,ou as Tab,Y3 as Table,jo as Tabs,cc as Textarea,yq as ThemeEditor,E3 as Tile,T3 as TileGroup,$3 as TileProperty,W3 as Timer,eA as Toggle,No as Tooltip,VA as TranslationGroup,PA as Translations,G3 as VerticalStepper,f3 as Well,C as ZincElement,X_ as clearFormStoreValues,b3 as deepQuery,v3 as deepQueryAll,Rt as deepQuerySelectorAll,de as litToHTML,dd as on};
|