@jackuait/blok 0.2.0 → 0.3.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -0
- package/dist/{blok-B0X1AdO9.mjs → blok-e-cML09O.mjs} +7784 -7656
- package/dist/blok.mjs +1 -1
- package/dist/blok.umd.js +29 -29
- package/dist/{index-BKqZbiWi.mjs → index-BeLqsXna.mjs} +3 -4
- package/package.json +10 -1
- package/types/api/styles.d.ts +0 -16
- package/types/configs/notifier.d.ts +0 -1
- package/types/index.d.ts +7 -0
- package/types/tools/header.d.ts +68 -0
- package/types/tools/index.d.ts +1 -0
package/dist/blok.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(Un,mt){typeof exports=="object"&&typeof module<"u"?module.exports=mt():typeof define=="function"&&define.amd?define(mt):(Un=typeof globalThis<"u"?globalThis:Un||self,Un.Blok=mt())})(this,(function(){"use strict";var Rr;var Un=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function mt(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var Ql,Gh;function jw(){if(Gh)return Ql;Gh=1;function l(){}return Ql=Object.assign(l,{default:l,register:l,revert:function(){},__esModule:!0}),Ql}jw(),typeof Element.prototype.scrollIntoViewIfNeeded>"u"&&(Element.prototype.scrollIntoViewIfNeeded=function(l){const e=l??!0,t=this.parentElement;if(!t)return;const o=window.getComputedStyle(t,null),i=parseInt(o.getPropertyValue("border-top-width")),a=parseInt(o.getPropertyValue("border-left-width")),u=this.offsetTop-t.offsetTop<t.scrollTop,f=this.offsetTop-t.offsetTop+this.clientHeight-i>t.scrollTop+t.clientHeight,p=this.offsetLeft-t.offsetLeft<t.scrollLeft,g=this.offsetLeft-t.offsetLeft+this.clientWidth-a>t.scrollLeft+t.clientWidth,v=u&&!f;(u||f)&&e&&(t.scrollTop=this.offsetTop-t.offsetTop-t.clientHeight/2-i+this.clientHeight/2),(p||g)&&e&&(t.scrollLeft=this.offsetLeft-t.offsetLeft-t.clientWidth/2-a+this.clientWidth/2),(u||f||p||g)&&!e&&this.scrollIntoView(v)});const qw=globalThis.setTimeout.bind(globalThis),Uw=globalThis.clearTimeout.bind(globalThis),Gi=new Map,Ww=l=>{const e=Number(l);return Number.isFinite(e)&&e>0?e:Date.now()};typeof window.requestIdleCallback>"u"&&(window.requestIdleCallback=function(l){const e=Date.now(),t={},o=qw(()=>{const a=t.value;typeof a=="number"&&Gi.delete(a),l({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-e))}})},1),i=Ww(o);return t.value=i,Gi.set(i,o),i}),typeof window.cancelIdleCallback>"u"&&(window.cancelIdleCallback=function(l){const e=Gi.get(l);e!==void 0&&(Gi.delete(l),Uw(e)),globalThis.clearTimeout(l)});const Kw="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let Vw=(l=21)=>{let e="",t=crypto.getRandomValues(new Uint8Array(l|=0));for(;l--;)e+=Kw[t[l]&63];return e};var Zl,Xh;function $w(){if(Xh)return Zl;Xh=1;var l="Expected a function";function e(t,o,i){if(typeof t!="function")throw new TypeError(l);return setTimeout(function(){t.apply(void 0,i)},o)}return Zl=e,Zl}var Jl,Yh;function Qh(){if(Yh)return Jl;Yh=1;function l(e){return e}return Jl=l,Jl}var ea,Zh;function Gw(){if(Zh)return ea;Zh=1;function l(e,t,o){switch(o.length){case 0:return e.call(t);case 1:return e.call(t,o[0]);case 2:return e.call(t,o[0],o[1]);case 3:return e.call(t,o[0],o[1],o[2])}return e.apply(t,o)}return ea=l,ea}var ta,Jh;function Xw(){if(Jh)return ta;Jh=1;var l=Gw(),e=Math.max;function t(o,i,a){return i=e(i===void 0?o.length-1:i,0),function(){for(var u=arguments,f=-1,p=e(u.length-i,0),g=Array(p);++f<p;)g[f]=u[i+f];f=-1;for(var v=Array(i+1);++f<i;)v[f]=u[f];return v[i]=a(g),l(o,this,v)}}return ta=t,ta}var na,ep;function Yw(){if(ep)return na;ep=1;function l(e){return function(){return e}}return na=l,na}var ra,tp;function np(){if(tp)return ra;tp=1;var l=typeof Un=="object"&&Un&&Un.Object===Object&&Un;return ra=l,ra}var oa,rp;function rn(){if(rp)return oa;rp=1;var l=np(),e=typeof self=="object"&&self&&self.Object===Object&&self,t=l||e||Function("return this")();return oa=t,oa}var ia,op;function Xi(){if(op)return ia;op=1;var l=rn(),e=l.Symbol;return ia=e,ia}var sa,ip;function Qw(){if(ip)return sa;ip=1;var l=Xi(),e=Object.prototype,t=e.hasOwnProperty,o=e.toString,i=l?l.toStringTag:void 0;function a(u){var f=t.call(u,i),p=u[i];try{u[i]=void 0;var g=!0}catch{}var v=o.call(u);return g&&(f?u[i]=p:delete u[i]),v}return sa=a,sa}var la,sp;function Zw(){if(sp)return la;sp=1;var l=Object.prototype,e=l.toString;function t(o){return e.call(o)}return la=t,la}var aa,lp;function En(){if(lp)return aa;lp=1;var l=Xi(),e=Qw(),t=Zw(),o="[object Null]",i="[object Undefined]",a=l?l.toStringTag:void 0;function u(f){return f==null?f===void 0?i:o:a&&a in Object(f)?e(f):t(f)}return aa=u,aa}var ca,ap;function gn(){if(ap)return ca;ap=1;function l(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}return ca=l,ca}var ua,cp;function Yi(){if(cp)return ua;cp=1;var l=En(),e=gn(),t="[object AsyncFunction]",o="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function u(f){if(!e(f))return!1;var p=l(f);return p==o||p==i||p==t||p==a}return ua=u,ua}var da,up;function Jw(){if(up)return da;up=1;var l=rn(),e=l["__core-js_shared__"];return da=e,da}var fa,dp;function e0(){if(dp)return fa;dp=1;var l=Jw(),e=(function(){var o=/[^.]+$/.exec(l&&l.keys&&l.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""})();function t(o){return!!e&&e in o}return fa=t,fa}var ha,fp;function hp(){if(fp)return ha;fp=1;var l=Function.prototype,e=l.toString;function t(o){if(o!=null){try{return e.call(o)}catch{}try{return o+""}catch{}}return""}return ha=t,ha}var pa,pp;function t0(){if(pp)return pa;pp=1;var l=Yi(),e=e0(),t=gn(),o=hp(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,u=Function.prototype,f=Object.prototype,p=u.toString,g=f.hasOwnProperty,v=RegExp("^"+p.call(g).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function y(w){if(!t(w)||e(w))return!1;var S=l(w)?v:a;return S.test(o(w))}return pa=y,pa}var ga,gp;function n0(){if(gp)return ga;gp=1;function l(e,t){return e?.[t]}return ga=l,ga}var ma,mp;function br(){if(mp)return ma;mp=1;var l=t0(),e=n0();function t(o,i){var a=e(o,i);return l(a)?a:void 0}return ma=t,ma}var va,vp;function yp(){if(vp)return va;vp=1;var l=br(),e=(function(){try{var t=l(Object,"defineProperty");return t({},"",{}),t}catch{}})();return va=e,va}var ya,bp;function r0(){if(bp)return ya;bp=1;var l=Yw(),e=yp(),t=Qh(),o=e?function(i,a){return e(i,"toString",{configurable:!0,enumerable:!1,value:l(a),writable:!0})}:t;return ya=o,ya}var ba,kp;function o0(){if(kp)return ba;kp=1;var l=800,e=16,t=Date.now;function o(i){var a=0,u=0;return function(){var f=t(),p=e-(f-u);if(u=f,p>0){if(++a>=l)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}return ba=o,ba}var ka,wp;function i0(){if(wp)return ka;wp=1;var l=r0(),e=o0(),t=e(l);return ka=t,ka}var wa,Tp;function Sp(){if(Tp)return wa;Tp=1;var l=Qh(),e=Xw(),t=i0();function o(i,a){return t(e(i,a,l),i+"")}return wa=o,wa}var Ta,xp;function s0(){if(xp)return Ta;xp=1;var l=/\s/;function e(t){for(var o=t.length;o--&&l.test(t.charAt(o)););return o}return Ta=e,Ta}var Sa,Cp;function l0(){if(Cp)return Sa;Cp=1;var l=s0(),e=/^\s+/;function t(o){return o&&o.slice(0,l(o)+1).replace(e,"")}return Sa=t,Sa}var xa,Ep;function mn(){if(Ep)return xa;Ep=1;function l(e){return e!=null&&typeof e=="object"}return xa=l,xa}var Ca,Bp;function a0(){if(Bp)return Ca;Bp=1;var l=En(),e=mn(),t="[object Symbol]";function o(i){return typeof i=="symbol"||e(i)&&l(i)==t}return Ca=o,Ca}var Ea,Ap;function Ip(){if(Ap)return Ea;Ap=1;var l=l0(),e=gn(),t=a0(),o=NaN,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,u=/^0o[0-7]+$/i,f=parseInt;function p(g){if(typeof g=="number")return g;if(t(g))return o;if(e(g)){var v=typeof g.valueOf=="function"?g.valueOf():g;g=e(v)?v+"":v}if(typeof g!="string")return g===0?g:+g;g=l(g);var y=a.test(g);return y||u.test(g)?f(g.slice(2),y?2:8):i.test(g)?o:+g}return Ea=p,Ea}var Ba,_p;function c0(){if(_p)return Ba;_p=1;var l=$w(),e=Sp(),t=Ip(),o=e(function(i,a,u){return l(i,t(a)||0,u)});return Ba=o,Ba}var u0=c0();const d0=mt(u0);var Aa,Np;function f0(){if(Np)return Aa;Np=1;var l=En(),e=mn(),t="[object Boolean]";function o(i){return i===!0||i===!1||e(i)&&l(i)==t}return Aa=o,Aa}var h0=f0();const p0=mt(h0);var Ia,Rp;function Qi(){if(Rp)return Ia;Rp=1;var l=Object.prototype;function e(t){var o=t&&t.constructor,i=typeof o=="function"&&o.prototype||l;return t===i}return Ia=e,Ia}var _a,Op;function Pp(){if(Op)return _a;Op=1;function l(e,t){return function(o){return e(t(o))}}return _a=l,_a}var Na,Lp;function g0(){if(Lp)return Na;Lp=1;var l=Pp(),e=l(Object.keys,Object);return Na=e,Na}var Ra,Dp;function Mp(){if(Dp)return Ra;Dp=1;var l=Qi(),e=g0(),t=Object.prototype,o=t.hasOwnProperty;function i(a){if(!l(a))return e(a);var u=[];for(var f in Object(a))o.call(a,f)&&f!="constructor"&&u.push(f);return u}return Ra=i,Ra}var Oa,Fp;function m0(){if(Fp)return Oa;Fp=1;var l=br(),e=rn(),t=l(e,"DataView");return Oa=t,Oa}var Pa,zp;function La(){if(zp)return Pa;zp=1;var l=br(),e=rn(),t=l(e,"Map");return Pa=t,Pa}var Da,Hp;function v0(){if(Hp)return Da;Hp=1;var l=br(),e=rn(),t=l(e,"Promise");return Da=t,Da}var Ma,jp;function y0(){if(jp)return Ma;jp=1;var l=br(),e=rn(),t=l(e,"Set");return Ma=t,Ma}var Fa,qp;function b0(){if(qp)return Fa;qp=1;var l=br(),e=rn(),t=l(e,"WeakMap");return Fa=t,Fa}var za,Up;function Ha(){if(Up)return za;Up=1;var l=m0(),e=La(),t=v0(),o=y0(),i=b0(),a=En(),u=hp(),f="[object Map]",p="[object Object]",g="[object Promise]",v="[object Set]",y="[object WeakMap]",w="[object DataView]",S=u(l),k=u(e),E=u(t),_=u(o),L=u(i),P=a;return(l&&P(new l(new ArrayBuffer(1)))!=w||e&&P(new e)!=f||t&&P(t.resolve())!=g||o&&P(new o)!=v||i&&P(new i)!=y)&&(P=function(K){var j=a(K),J=j==p?K.constructor:void 0,W=J?u(J):"";if(W)switch(W){case S:return w;case k:return f;case E:return g;case _:return v;case L:return y}return j}),za=P,za}var ja,Wp;function k0(){if(Wp)return ja;Wp=1;var l=En(),e=mn(),t="[object Arguments]";function o(i){return e(i)&&l(i)==t}return ja=o,ja}var qa,Kp;function Ua(){if(Kp)return qa;Kp=1;var l=k0(),e=mn(),t=Object.prototype,o=t.hasOwnProperty,i=t.propertyIsEnumerable,a=l((function(){return arguments})())?l:function(u){return e(u)&&o.call(u,"callee")&&!i.call(u,"callee")};return qa=a,qa}var Wa,Vp;function Gr(){if(Vp)return Wa;Vp=1;var l=Array.isArray;return Wa=l,Wa}var Ka,$p;function Gp(){if($p)return Ka;$p=1;var l=9007199254740991;function e(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=l}return Ka=e,Ka}var Va,Xp;function Xr(){if(Xp)return Va;Xp=1;var l=Yi(),e=Gp();function t(o){return o!=null&&e(o.length)&&!l(o)}return Va=t,Va}var Po={exports:{}},$a,Yp;function w0(){if(Yp)return $a;Yp=1;function l(){return!1}return $a=l,$a}Po.exports;var Qp;function Zi(){return Qp||(Qp=1,(function(l,e){var t=rn(),o=w0(),i=e&&!e.nodeType&&e,a=i&&!0&&l&&!l.nodeType&&l,u=a&&a.exports===i,f=u?t.Buffer:void 0,p=f?f.isBuffer:void 0,g=p||o;l.exports=g})(Po,Po.exports)),Po.exports}var Ga,Zp;function T0(){if(Zp)return Ga;Zp=1;var l=En(),e=Gp(),t=mn(),o="[object Arguments]",i="[object Array]",a="[object Boolean]",u="[object Date]",f="[object Error]",p="[object Function]",g="[object Map]",v="[object Number]",y="[object Object]",w="[object RegExp]",S="[object Set]",k="[object String]",E="[object WeakMap]",_="[object ArrayBuffer]",L="[object DataView]",P="[object Float32Array]",K="[object Float64Array]",j="[object Int8Array]",J="[object Int16Array]",W="[object Int32Array]",V="[object Uint8Array]",z="[object Uint8ClampedArray]",ae="[object Uint16Array]",ge="[object Uint32Array]",re={};re[P]=re[K]=re[j]=re[J]=re[W]=re[V]=re[z]=re[ae]=re[ge]=!0,re[o]=re[i]=re[_]=re[a]=re[L]=re[u]=re[f]=re[p]=re[g]=re[v]=re[y]=re[w]=re[S]=re[k]=re[E]=!1;function be(te){return t(te)&&e(te.length)&&!!re[l(te)]}return Ga=be,Ga}var Xa,Jp;function S0(){if(Jp)return Xa;Jp=1;function l(e){return function(t){return e(t)}}return Xa=l,Xa}var Lo={exports:{}};Lo.exports;var eg;function x0(){return eg||(eg=1,(function(l,e){var t=np(),o=e&&!e.nodeType&&e,i=o&&!0&&l&&!l.nodeType&&l,a=i&&i.exports===o,u=a&&t.process,f=(function(){try{var p=i&&i.require&&i.require("util").types;return p||u&&u.binding&&u.binding("util")}catch{}})();l.exports=f})(Lo,Lo.exports)),Lo.exports}var Ya,tg;function Ji(){if(tg)return Ya;tg=1;var l=T0(),e=S0(),t=x0(),o=t&&t.isTypedArray,i=o?e(o):l;return Ya=i,Ya}var Qa,ng;function C0(){if(ng)return Qa;ng=1;var l=Mp(),e=Ha(),t=Ua(),o=Gr(),i=Xr(),a=Zi(),u=Qi(),f=Ji(),p="[object Map]",g="[object Set]",v=Object.prototype,y=v.hasOwnProperty;function w(S){if(S==null)return!0;if(i(S)&&(o(S)||typeof S=="string"||typeof S.splice=="function"||a(S)||f(S)||t(S)))return!S.length;var k=e(S);if(k==p||k==g)return!S.size;if(u(S))return!l(S).length;for(var E in S)if(y.call(S,E))return!1;return!0}return Qa=w,Qa}var E0=C0();const B0=mt(E0);var Za,rg;function A0(){if(rg)return Za;rg=1;function l(){this.__data__=[],this.size=0}return Za=l,Za}var Ja,og;function Do(){if(og)return Ja;og=1;function l(e,t){return e===t||e!==e&&t!==t}return Ja=l,Ja}var ec,ig;function es(){if(ig)return ec;ig=1;var l=Do();function e(t,o){for(var i=t.length;i--;)if(l(t[i][0],o))return i;return-1}return ec=e,ec}var tc,sg;function I0(){if(sg)return tc;sg=1;var l=es(),e=Array.prototype,t=e.splice;function o(i){var a=this.__data__,u=l(a,i);if(u<0)return!1;var f=a.length-1;return u==f?a.pop():t.call(a,u,1),--this.size,!0}return tc=o,tc}var nc,lg;function _0(){if(lg)return nc;lg=1;var l=es();function e(t){var o=this.__data__,i=l(o,t);return i<0?void 0:o[i][1]}return nc=e,nc}var rc,ag;function N0(){if(ag)return rc;ag=1;var l=es();function e(t){return l(this.__data__,t)>-1}return rc=e,rc}var oc,cg;function R0(){if(cg)return oc;cg=1;var l=es();function e(t,o){var i=this.__data__,a=l(i,t);return a<0?(++this.size,i.push([t,o])):i[a][1]=o,this}return oc=e,oc}var ic,ug;function ts(){if(ug)return ic;ug=1;var l=A0(),e=I0(),t=_0(),o=N0(),i=R0();function a(u){var f=-1,p=u==null?0:u.length;for(this.clear();++f<p;){var g=u[f];this.set(g[0],g[1])}}return a.prototype.clear=l,a.prototype.delete=e,a.prototype.get=t,a.prototype.has=o,a.prototype.set=i,ic=a,ic}var sc,dg;function O0(){if(dg)return sc;dg=1;var l=ts();function e(){this.__data__=new l,this.size=0}return sc=e,sc}var lc,fg;function P0(){if(fg)return lc;fg=1;function l(e){var t=this.__data__,o=t.delete(e);return this.size=t.size,o}return lc=l,lc}var ac,hg;function L0(){if(hg)return ac;hg=1;function l(e){return this.__data__.get(e)}return ac=l,ac}var cc,pg;function D0(){if(pg)return cc;pg=1;function l(e){return this.__data__.has(e)}return cc=l,cc}var uc,gg;function ns(){if(gg)return uc;gg=1;var l=br(),e=l(Object,"create");return uc=e,uc}var dc,mg;function M0(){if(mg)return dc;mg=1;var l=ns();function e(){this.__data__=l?l(null):{},this.size=0}return dc=e,dc}var fc,vg;function F0(){if(vg)return fc;vg=1;function l(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}return fc=l,fc}var hc,yg;function z0(){if(yg)return hc;yg=1;var l=ns(),e="__lodash_hash_undefined__",t=Object.prototype,o=t.hasOwnProperty;function i(a){var u=this.__data__;if(l){var f=u[a];return f===e?void 0:f}return o.call(u,a)?u[a]:void 0}return hc=i,hc}var pc,bg;function H0(){if(bg)return pc;bg=1;var l=ns(),e=Object.prototype,t=e.hasOwnProperty;function o(i){var a=this.__data__;return l?a[i]!==void 0:t.call(a,i)}return pc=o,pc}var gc,kg;function j0(){if(kg)return gc;kg=1;var l=ns(),e="__lodash_hash_undefined__";function t(o,i){var a=this.__data__;return this.size+=this.has(o)?0:1,a[o]=l&&i===void 0?e:i,this}return gc=t,gc}var mc,wg;function q0(){if(wg)return mc;wg=1;var l=M0(),e=F0(),t=z0(),o=H0(),i=j0();function a(u){var f=-1,p=u==null?0:u.length;for(this.clear();++f<p;){var g=u[f];this.set(g[0],g[1])}}return a.prototype.clear=l,a.prototype.delete=e,a.prototype.get=t,a.prototype.has=o,a.prototype.set=i,mc=a,mc}var vc,Tg;function U0(){if(Tg)return vc;Tg=1;var l=q0(),e=ts(),t=La();function o(){this.size=0,this.__data__={hash:new l,map:new(t||e),string:new l}}return vc=o,vc}var yc,Sg;function W0(){if(Sg)return yc;Sg=1;function l(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}return yc=l,yc}var bc,xg;function rs(){if(xg)return bc;xg=1;var l=W0();function e(t,o){var i=t.__data__;return l(o)?i[typeof o=="string"?"string":"hash"]:i.map}return bc=e,bc}var kc,Cg;function K0(){if(Cg)return kc;Cg=1;var l=rs();function e(t){var o=l(this,t).delete(t);return this.size-=o?1:0,o}return kc=e,kc}var wc,Eg;function V0(){if(Eg)return wc;Eg=1;var l=rs();function e(t){return l(this,t).get(t)}return wc=e,wc}var Tc,Bg;function $0(){if(Bg)return Tc;Bg=1;var l=rs();function e(t){return l(this,t).has(t)}return Tc=e,Tc}var Sc,Ag;function G0(){if(Ag)return Sc;Ag=1;var l=rs();function e(t,o){var i=l(this,t),a=i.size;return i.set(t,o),this.size+=i.size==a?0:1,this}return Sc=e,Sc}var xc,Ig;function _g(){if(Ig)return xc;Ig=1;var l=U0(),e=K0(),t=V0(),o=$0(),i=G0();function a(u){var f=-1,p=u==null?0:u.length;for(this.clear();++f<p;){var g=u[f];this.set(g[0],g[1])}}return a.prototype.clear=l,a.prototype.delete=e,a.prototype.get=t,a.prototype.has=o,a.prototype.set=i,xc=a,xc}var Cc,Ng;function X0(){if(Ng)return Cc;Ng=1;var l=ts(),e=La(),t=_g(),o=200;function i(a,u){var f=this.__data__;if(f instanceof l){var p=f.__data__;if(!e||p.length<o-1)return p.push([a,u]),this.size=++f.size,this;f=this.__data__=new t(p)}return f.set(a,u),this.size=f.size,this}return Cc=i,Cc}var Ec,Rg;function Og(){if(Rg)return Ec;Rg=1;var l=ts(),e=O0(),t=P0(),o=L0(),i=D0(),a=X0();function u(f){var p=this.__data__=new l(f);this.size=p.size}return u.prototype.clear=e,u.prototype.delete=t,u.prototype.get=o,u.prototype.has=i,u.prototype.set=a,Ec=u,Ec}var Bc,Pg;function Y0(){if(Pg)return Bc;Pg=1;var l="__lodash_hash_undefined__";function e(t){return this.__data__.set(t,l),this}return Bc=e,Bc}var Ac,Lg;function Q0(){if(Lg)return Ac;Lg=1;function l(e){return this.__data__.has(e)}return Ac=l,Ac}var Ic,Dg;function Z0(){if(Dg)return Ic;Dg=1;var l=_g(),e=Y0(),t=Q0();function o(i){var a=-1,u=i==null?0:i.length;for(this.__data__=new l;++a<u;)this.add(i[a])}return o.prototype.add=o.prototype.push=e,o.prototype.has=t,Ic=o,Ic}var _c,Mg;function J0(){if(Mg)return _c;Mg=1;function l(e,t){for(var o=-1,i=e==null?0:e.length;++o<i;)if(t(e[o],o,e))return!0;return!1}return _c=l,_c}var Nc,Fg;function eT(){if(Fg)return Nc;Fg=1;function l(e,t){return e.has(t)}return Nc=l,Nc}var Rc,zg;function Hg(){if(zg)return Rc;zg=1;var l=Z0(),e=J0(),t=eT(),o=1,i=2;function a(u,f,p,g,v,y){var w=p&o,S=u.length,k=f.length;if(S!=k&&!(w&&k>S))return!1;var E=y.get(u),_=y.get(f);if(E&&_)return E==f&&_==u;var L=-1,P=!0,K=p&i?new l:void 0;for(y.set(u,f),y.set(f,u);++L<S;){var j=u[L],J=f[L];if(g)var W=w?g(J,j,L,f,u,y):g(j,J,L,u,f,y);if(W!==void 0){if(W)continue;P=!1;break}if(K){if(!e(f,function(V,z){if(!t(K,z)&&(j===V||v(j,V,p,g,y)))return K.push(z)})){P=!1;break}}else if(!(j===J||v(j,J,p,g,y))){P=!1;break}}return y.delete(u),y.delete(f),P}return Rc=a,Rc}var Oc,jg;function qg(){if(jg)return Oc;jg=1;var l=rn(),e=l.Uint8Array;return Oc=e,Oc}var Pc,Ug;function Wg(){if(Ug)return Pc;Ug=1;function l(e){var t=-1,o=Array(e.size);return e.forEach(function(i,a){o[++t]=[a,i]}),o}return Pc=l,Pc}var Lc,Kg;function Vg(){if(Kg)return Lc;Kg=1;function l(e){var t=-1,o=Array(e.size);return e.forEach(function(i){o[++t]=i}),o}return Lc=l,Lc}var Dc,$g;function tT(){if($g)return Dc;$g=1;var l=Xi(),e=qg(),t=Do(),o=Hg(),i=Wg(),a=Vg(),u=1,f=2,p="[object Boolean]",g="[object Date]",v="[object Error]",y="[object Map]",w="[object Number]",S="[object RegExp]",k="[object Set]",E="[object String]",_="[object Symbol]",L="[object ArrayBuffer]",P="[object DataView]",K=l?l.prototype:void 0,j=K?K.valueOf:void 0;function J(W,V,z,ae,ge,re,be){switch(z){case P:if(W.byteLength!=V.byteLength||W.byteOffset!=V.byteOffset)return!1;W=W.buffer,V=V.buffer;case L:return!(W.byteLength!=V.byteLength||!re(new e(W),new e(V)));case p:case g:case w:return t(+W,+V);case v:return W.name==V.name&&W.message==V.message;case S:case E:return W==V+"";case y:var te=i;case k:var ke=ae&u;if(te||(te=a),W.size!=V.size&&!ke)return!1;var Ne=be.get(W);if(Ne)return Ne==V;ae|=f,be.set(W,V);var Se=o(te(W),te(V),ae,ge,re,be);return be.delete(W),Se;case _:if(j)return j.call(W)==j.call(V)}return!1}return Dc=J,Dc}var Mc,Gg;function nT(){if(Gg)return Mc;Gg=1;function l(e,t){for(var o=-1,i=t.length,a=e.length;++o<i;)e[a+o]=t[o];return e}return Mc=l,Mc}var Fc,Xg;function rT(){if(Xg)return Fc;Xg=1;var l=nT(),e=Gr();function t(o,i,a){var u=i(o);return e(o)?u:l(u,a(o))}return Fc=t,Fc}var zc,Yg;function oT(){if(Yg)return zc;Yg=1;function l(e,t){for(var o=-1,i=e==null?0:e.length,a=0,u=[];++o<i;){var f=e[o];t(f,o,e)&&(u[a++]=f)}return u}return zc=l,zc}var Hc,Qg;function iT(){if(Qg)return Hc;Qg=1;function l(){return[]}return Hc=l,Hc}var jc,Zg;function sT(){if(Zg)return jc;Zg=1;var l=oT(),e=iT(),t=Object.prototype,o=t.propertyIsEnumerable,i=Object.getOwnPropertySymbols,a=i?function(u){return u==null?[]:(u=Object(u),l(i(u),function(f){return o.call(u,f)}))}:e;return jc=a,jc}var qc,Jg;function lT(){if(Jg)return qc;Jg=1;function l(e,t){for(var o=-1,i=Array(e);++o<e;)i[o]=t(o);return i}return qc=l,qc}var Uc,em;function tm(){if(em)return Uc;em=1;var l=9007199254740991,e=/^(?:0|[1-9]\d*)$/;function t(o,i){var a=typeof o;return i=i??l,!!i&&(a=="number"||a!="symbol"&&e.test(o))&&o>-1&&o%1==0&&o<i}return Uc=t,Uc}var Wc,nm;function rm(){if(nm)return Wc;nm=1;var l=lT(),e=Ua(),t=Gr(),o=Zi(),i=tm(),a=Ji(),u=Object.prototype,f=u.hasOwnProperty;function p(g,v){var y=t(g),w=!y&&e(g),S=!y&&!w&&o(g),k=!y&&!w&&!S&&a(g),E=y||w||S||k,_=E?l(g.length,String):[],L=_.length;for(var P in g)(v||f.call(g,P))&&!(E&&(P=="length"||S&&(P=="offset"||P=="parent")||k&&(P=="buffer"||P=="byteLength"||P=="byteOffset")||i(P,L)))&&_.push(P);return _}return Wc=p,Wc}var Kc,om;function im(){if(om)return Kc;om=1;var l=rm(),e=Mp(),t=Xr();function o(i){return t(i)?l(i):e(i)}return Kc=o,Kc}var Vc,sm;function aT(){if(sm)return Vc;sm=1;var l=rT(),e=sT(),t=im();function o(i){return l(i,t,e)}return Vc=o,Vc}var $c,lm;function cT(){if(lm)return $c;lm=1;var l=aT(),e=1,t=Object.prototype,o=t.hasOwnProperty;function i(a,u,f,p,g,v){var y=f&e,w=l(a),S=w.length,k=l(u),E=k.length;if(S!=E&&!y)return!1;for(var _=S;_--;){var L=w[_];if(!(y?L in u:o.call(u,L)))return!1}var P=v.get(a),K=v.get(u);if(P&&K)return P==u&&K==a;var j=!0;v.set(a,u),v.set(u,a);for(var J=y;++_<S;){L=w[_];var W=a[L],V=u[L];if(p)var z=y?p(V,W,L,u,a,v):p(W,V,L,a,u,v);if(!(z===void 0?W===V||g(W,V,f,p,v):z)){j=!1;break}J||(J=L=="constructor")}if(j&&!J){var ae=a.constructor,ge=u.constructor;ae!=ge&&"constructor"in a&&"constructor"in u&&!(typeof ae=="function"&&ae instanceof ae&&typeof ge=="function"&&ge instanceof ge)&&(j=!1)}return v.delete(a),v.delete(u),j}return $c=i,$c}var Gc,am;function uT(){if(am)return Gc;am=1;var l=Og(),e=Hg(),t=tT(),o=cT(),i=Ha(),a=Gr(),u=Zi(),f=Ji(),p=1,g="[object Arguments]",v="[object Array]",y="[object Object]",w=Object.prototype,S=w.hasOwnProperty;function k(E,_,L,P,K,j){var J=a(E),W=a(_),V=J?v:i(E),z=W?v:i(_);V=V==g?y:V,z=z==g?y:z;var ae=V==y,ge=z==y,re=V==z;if(re&&u(E)){if(!u(_))return!1;J=!0,ae=!1}if(re&&!ae)return j||(j=new l),J||f(E)?e(E,_,L,P,K,j):t(E,_,V,L,P,K,j);if(!(L&p)){var be=ae&&S.call(E,"__wrapped__"),te=ge&&S.call(_,"__wrapped__");if(be||te){var ke=be?E.value():E,Ne=te?_.value():_;return j||(j=new l),K(ke,Ne,L,P,j)}}return re?(j||(j=new l),o(E,_,L,P,K,j)):!1}return Gc=k,Gc}var Xc,cm;function dT(){if(cm)return Xc;cm=1;var l=uT(),e=mn();function t(o,i,a,u,f){return o===i?!0:o==null||i==null||!e(o)&&!e(i)?o!==o&&i!==i:l(o,i,a,u,t,f)}return Xc=t,Xc}var Yc,um;function fT(){if(um)return Yc;um=1;var l=dT();function e(t,o){return l(t,o)}return Yc=e,Yc}var hT=fT();const pT=mt(hT);var gT=Yi();const mT=mt(gT);var Qc,dm;function vT(){if(dm)return Qc;dm=1;var l=En(),e=mn(),t="[object Number]";function o(i){return typeof i=="number"||e(i)&&l(i)==t}return Qc=o,Qc}var yT=vT();const bT=mt(yT);var Zc,fm;function hm(){if(fm)return Zc;fm=1;var l=Pp(),e=l(Object.getPrototypeOf,Object);return Zc=e,Zc}var Jc,pm;function gm(){if(pm)return Jc;pm=1;var l=En(),e=hm(),t=mn(),o="[object Object]",i=Function.prototype,a=Object.prototype,u=i.toString,f=a.hasOwnProperty,p=u.call(Object);function g(v){if(!t(v)||l(v)!=o)return!1;var y=e(v);if(y===null)return!0;var w=f.call(y,"constructor")&&y.constructor;return typeof w=="function"&&w instanceof w&&u.call(w)==p}return Jc=g,Jc}var kT=gm();const wT=mt(kT);var eu,mm;function vm(){if(mm)return eu;mm=1;var l=En(),e=Gr(),t=mn(),o="[object String]";function i(a){return typeof a=="string"||!e(a)&&t(a)&&l(a)==o}return eu=i,eu}var TT=vm();const ST=mt(TT);var tu,ym;function xT(){if(ym)return tu;ym=1;function l(e){return e===void 0}return tu=l,tu}var CT=xT();const ET=mt(CT);var nu,bm;function ru(){if(bm)return nu;bm=1;var l=yp();function e(t,o,i){o=="__proto__"&&l?l(t,o,{configurable:!0,enumerable:!0,value:i,writable:!0}):t[o]=i}return nu=e,nu}var ou,km;function wm(){if(km)return ou;km=1;var l=ru(),e=Do();function t(o,i,a){(a!==void 0&&!e(o[i],a)||a===void 0&&!(i in o))&&l(o,i,a)}return ou=t,ou}var iu,Tm;function BT(){if(Tm)return iu;Tm=1;function l(e){return function(t,o,i){for(var a=-1,u=Object(t),f=i(t),p=f.length;p--;){var g=f[e?p:++a];if(o(u[g],g,u)===!1)break}return t}}return iu=l,iu}var su,Sm;function AT(){if(Sm)return su;Sm=1;var l=BT(),e=l();return su=e,su}var Mo={exports:{}};Mo.exports;var xm;function IT(){return xm||(xm=1,(function(l,e){var t=rn(),o=e&&!e.nodeType&&e,i=o&&!0&&l&&!l.nodeType&&l,a=i&&i.exports===o,u=a?t.Buffer:void 0,f=u?u.allocUnsafe:void 0;function p(g,v){if(v)return g.slice();var y=g.length,w=f?f(y):new g.constructor(y);return g.copy(w),w}l.exports=p})(Mo,Mo.exports)),Mo.exports}var lu,Cm;function _T(){if(Cm)return lu;Cm=1;var l=qg();function e(t){var o=new t.constructor(t.byteLength);return new l(o).set(new l(t)),o}return lu=e,lu}var au,Em;function NT(){if(Em)return au;Em=1;var l=_T();function e(t,o){var i=o?l(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.length)}return au=e,au}var cu,Bm;function Am(){if(Bm)return cu;Bm=1;function l(e,t){var o=-1,i=e.length;for(t||(t=Array(i));++o<i;)t[o]=e[o];return t}return cu=l,cu}var uu,Im;function RT(){if(Im)return uu;Im=1;var l=gn(),e=Object.create,t=(function(){function o(){}return function(i){if(!l(i))return{};if(e)return e(i);o.prototype=i;var a=new o;return o.prototype=void 0,a}})();return uu=t,uu}var du,_m;function OT(){if(_m)return du;_m=1;var l=RT(),e=hm(),t=Qi();function o(i){return typeof i.constructor=="function"&&!t(i)?l(e(i)):{}}return du=o,du}var fu,Nm;function PT(){if(Nm)return fu;Nm=1;var l=Xr(),e=mn();function t(o){return e(o)&&l(o)}return fu=t,fu}var hu,Rm;function Om(){if(Rm)return hu;Rm=1;function l(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}return hu=l,hu}var pu,Pm;function LT(){if(Pm)return pu;Pm=1;var l=ru(),e=Do(),t=Object.prototype,o=t.hasOwnProperty;function i(a,u,f){var p=a[u];(!(o.call(a,u)&&e(p,f))||f===void 0&&!(u in a))&&l(a,u,f)}return pu=i,pu}var gu,Lm;function DT(){if(Lm)return gu;Lm=1;var l=LT(),e=ru();function t(o,i,a,u){var f=!a;a||(a={});for(var p=-1,g=i.length;++p<g;){var v=i[p],y=u?u(a[v],o[v],v,a,o):void 0;y===void 0&&(y=o[v]),f?e(a,v,y):l(a,v,y)}return a}return gu=t,gu}var mu,Dm;function MT(){if(Dm)return mu;Dm=1;function l(e){var t=[];if(e!=null)for(var o in Object(e))t.push(o);return t}return mu=l,mu}var vu,Mm;function FT(){if(Mm)return vu;Mm=1;var l=gn(),e=Qi(),t=MT(),o=Object.prototype,i=o.hasOwnProperty;function a(u){if(!l(u))return t(u);var f=e(u),p=[];for(var g in u)g=="constructor"&&(f||!i.call(u,g))||p.push(g);return p}return vu=a,vu}var yu,Fm;function zm(){if(Fm)return yu;Fm=1;var l=rm(),e=FT(),t=Xr();function o(i){return t(i)?l(i,!0):e(i)}return yu=o,yu}var bu,Hm;function zT(){if(Hm)return bu;Hm=1;var l=DT(),e=zm();function t(o){return l(o,e(o))}return bu=t,bu}var ku,jm;function HT(){if(jm)return ku;jm=1;var l=wm(),e=IT(),t=NT(),o=Am(),i=OT(),a=Ua(),u=Gr(),f=PT(),p=Zi(),g=Yi(),v=gn(),y=gm(),w=Ji(),S=Om(),k=zT();function E(_,L,P,K,j,J,W){var V=S(_,P),z=S(L,P),ae=W.get(z);if(ae){l(_,P,ae);return}var ge=J?J(V,z,P+"",_,L,W):void 0,re=ge===void 0;if(re){var be=u(z),te=!be&&p(z),ke=!be&&!te&&w(z);ge=z,be||te||ke?u(V)?ge=V:f(V)?ge=o(V):te?(re=!1,ge=e(z,!0)):ke?(re=!1,ge=t(z,!0)):ge=[]:y(z)||a(z)?(ge=V,a(V)?ge=k(V):(!v(V)||g(V))&&(ge=i(z))):re=!1}re&&(W.set(z,ge),j(ge,z,K,J,W),W.delete(z)),l(_,P,ge)}return ku=E,ku}var wu,qm;function jT(){if(qm)return wu;qm=1;var l=Og(),e=wm(),t=AT(),o=HT(),i=gn(),a=zm(),u=Om();function f(p,g,v,y,w){p!==g&&t(g,function(S,k){if(w||(w=new l),i(S))o(p,g,k,v,f,y,w);else{var E=y?y(u(p,k),S,k+"",p,g,w):void 0;E===void 0&&(E=S),e(p,k,E)}},a)}return wu=f,wu}var Tu,Um;function qT(){if(Um)return Tu;Um=1;var l=Do(),e=Xr(),t=tm(),o=gn();function i(a,u,f){if(!o(f))return!1;var p=typeof u;return(p=="number"?e(f)&&t(u,f.length):p=="string"&&u in f)?l(f[u],a):!1}return Tu=i,Tu}var Su,Wm;function UT(){if(Wm)return Su;Wm=1;var l=Sp(),e=qT();function t(o){return l(function(i,a){var u=-1,f=a.length,p=f>1?a[f-1]:void 0,g=f>2?a[2]:void 0;for(p=o.length>3&&typeof p=="function"?(f--,p):void 0,g&&e(a[0],a[1],g)&&(p=f<3?void 0:p,f=1),i=Object(i);++u<f;){var v=a[u];v&&o(i,v,u,p)}return i})}return Su=t,Su}var xu,Km;function WT(){if(Km)return xu;Km=1;var l=jT(),e=UT(),t=e(function(o,i,a,u){l(o,i,a,u)});return xu=t,xu}var KT=WT();const VT=mt(KT);var Cu,Vm;function $T(){if(Vm)return Cu;Vm=1;var l=rn(),e=function(){return l.Date.now()};return Cu=e,Cu}var Eu,$m;function GT(){if($m)return Eu;$m=1;var l=gn(),e=$T(),t=Ip(),o="Expected a function",i=Math.max,a=Math.min;function u(f,p,g){var v,y,w,S,k,E,_=0,L=!1,P=!1,K=!0;if(typeof f!="function")throw new TypeError(o);p=t(p)||0,l(g)&&(L=!!g.leading,P="maxWait"in g,w=P?i(t(g.maxWait)||0,p):w,K="trailing"in g?!!g.trailing:K);function j(te){var ke=v,Ne=y;return v=y=void 0,_=te,S=f.apply(Ne,ke),S}function J(te){return _=te,k=setTimeout(z,p),L?j(te):S}function W(te){var ke=te-E,Ne=te-_,Se=p-ke;return P?a(Se,w-Ne):Se}function V(te){var ke=te-E,Ne=te-_;return E===void 0||ke>=p||ke<0||P&&Ne>=w}function z(){var te=e();if(V(te))return ae(te);k=setTimeout(z,W(te))}function ae(te){return k=void 0,K&&v?j(te):(v=y=void 0,S)}function ge(){k!==void 0&&clearTimeout(k),_=0,v=E=y=k=void 0}function re(){return k===void 0?S:ae(e())}function be(){var te=e(),ke=V(te);if(v=arguments,y=this,E=te,ke){if(k===void 0)return J(E);if(P)return clearTimeout(k),k=setTimeout(z,p),j(E)}return k===void 0&&(k=setTimeout(z,p)),S}return be.cancel=ge,be.flush=re,be}return Eu=u,Eu}var Bu,Gm;function XT(){if(Gm)return Bu;Gm=1;var l=GT(),e=gn(),t="Expected a function";function o(i,a,u){var f=!0,p=!0;if(typeof i!="function")throw new TypeError(t);return e(u)&&(f="leading"in u?!!u.leading:f,p="trailing"in u?!!u.trailing:p),l(i,a,{leading:f,maxWait:a,trailing:p})}return Bu=o,Bu}var YT=XT();const QT=mt(YT);var Au,Xm;function ZT(){if(Xm)return Au;Xm=1;function l(e){for(var t,o=[];!(t=e.next()).done;)o.push(t.value);return o}return Au=l,Au}var Iu,Ym;function JT(){if(Ym)return Iu;Ym=1;function l(e){return e.split("")}return Iu=l,Iu}var _u,Qm;function eS(){if(Qm)return _u;Qm=1;var l="\\ud800-\\udfff",e="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",o="\\u20d0-\\u20ff",i=e+t+o,a="\\ufe0e\\ufe0f",u="\\u200d",f=RegExp("["+u+l+i+a+"]");function p(g){return f.test(g)}return _u=p,_u}var Nu,Zm;function tS(){if(Zm)return Nu;Zm=1;var l="\\ud800-\\udfff",e="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",o="\\u20d0-\\u20ff",i=e+t+o,a="\\ufe0e\\ufe0f",u="["+l+"]",f="["+i+"]",p="\\ud83c[\\udffb-\\udfff]",g="(?:"+f+"|"+p+")",v="[^"+l+"]",y="(?:\\ud83c[\\udde6-\\uddff]){2}",w="[\\ud800-\\udbff][\\udc00-\\udfff]",S="\\u200d",k=g+"?",E="["+a+"]?",_="(?:"+S+"(?:"+[v,y,w].join("|")+")"+E+k+")*",L=E+k+_,P="(?:"+[v+f+"?",f,y,w,u].join("|")+")",K=RegExp(p+"(?="+p+")|"+P+L,"g");function j(J){return J.match(K)||[]}return Nu=j,Nu}var Ru,Jm;function nS(){if(Jm)return Ru;Jm=1;var l=JT(),e=eS(),t=tS();function o(i){return e(i)?t(i):l(i)}return Ru=o,Ru}var Ou,ev;function rS(){if(ev)return Ou;ev=1;function l(e,t){for(var o=-1,i=e==null?0:e.length,a=Array(i);++o<i;)a[o]=t(e[o],o,e);return a}return Ou=l,Ou}var Pu,tv;function oS(){if(tv)return Pu;tv=1;var l=rS();function e(t,o){return l(o,function(i){return t[i]})}return Pu=e,Pu}var Lu,nv;function iS(){if(nv)return Lu;nv=1;var l=oS(),e=im();function t(o){return o==null?[]:l(o,e(o))}return Lu=t,Lu}var Du,rv;function sS(){if(rv)return Du;rv=1;var l=Xi(),e=Am(),t=Ha(),o=Xr(),i=vm(),a=ZT(),u=Wg(),f=Vg(),p=nS(),g=iS(),v="[object Map]",y="[object Set]",w=l?l.iterator:void 0;function S(k){if(!k)return[];if(o(k))return i(k)?p(k):e(k);if(w&&k[w])return a(k[w]());var E=t(k),_=E==v?u:E==y?f:g;return _(k)}return Du=S,Du}var lS=sS();const aS=mt(lS);var ov=(l=>(l.VERBOSE="VERBOSE",l.INFO="INFO",l.WARN="WARN",l.ERROR="ERROR",l))(ov||{});const os=()=>"0.2.0",ie={BACKSPACE:8,TAB:9,ENTER:13,LEFT:37,UP:38,DOWN:40,RIGHT:39,DELETE:46},cS={LEFT:0},uS=1e8,dS=16,Wn=(()=>{try{return Function("return this")()}catch{return}})();Wn&&typeof Wn.window>"u"&&(Wn.window=Wn);const is=()=>{if(Wn?.window)return Wn.window},iv=()=>Wn?.navigator?Wn.navigator:is()?.navigator,Fo=(l,e,t="log",o,i="color: inherit")=>{const a=typeof console>"u"?void 0:console;if(!a||typeof a[t]!="function")return;const u=["info","log","warn","error"].includes(t),f=[];switch(Fo.logLevel){case"ERROR":if(t!=="error")return;break;case"WARN":if(!["error","warn"].includes(t))return;break;case"INFO":if(!u||l)return;break}o&&f.push(o);const p=`Blok ${os()}`,g=`line-height: 1em;
|
|
1
|
+
(function(Ue,Oe){typeof exports=="object"&&typeof module!="undefined"?module.exports=Oe():typeof define=="function"&&define.amd?define(Oe):(Ue=typeof globalThis!="undefined"?globalThis:Ue||self,Ue.Blok=Oe())})(this,(function(){"use strict";var _A=Object.defineProperty,NA=Object.defineProperties;var RA=Object.getOwnPropertyDescriptors;var Ja=Object.getOwnPropertySymbols;var e0=Object.prototype.hasOwnProperty,t0=Object.prototype.propertyIsEnumerable;var Jw=(Ue,Oe,ht)=>Oe in Ue?_A(Ue,Oe,{enumerable:!0,configurable:!0,writable:!0,value:ht}):Ue[Oe]=ht,be=(Ue,Oe)=>{for(var ht in Oe||(Oe={}))e0.call(Oe,ht)&&Jw(Ue,ht,Oe[ht]);if(Ja)for(var ht of Ja(Oe))t0.call(Oe,ht)&&Jw(Ue,ht,Oe[ht]);return Ue},It=(Ue,Oe)=>NA(Ue,RA(Oe));var n0=(Ue,Oe)=>{var ht={};for(var Xt in Ue)e0.call(Ue,Xt)&&Oe.indexOf(Xt)<0&&(ht[Xt]=Ue[Xt]);if(Ue!=null&&Ja)for(var Xt of Ja(Ue))Oe.indexOf(Xt)<0&&t0.call(Ue,Xt)&&(ht[Xt]=Ue[Xt]);return ht};var Dr;var Ue=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Oe(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var ht,Xt;function r0(){if(Xt)return ht;Xt=1;function a(){}return ht=Object.assign(a,{default:a,register:a,revert:function(){},__esModule:!0}),ht}r0(),typeof Element.prototype.scrollIntoViewIfNeeded=="undefined"&&(Element.prototype.scrollIntoViewIfNeeded=function(a){const e=a!=null?a:!0,t=this.parentElement;if(!t)return;const o=window.getComputedStyle(t,null),i=parseInt(o.getPropertyValue("border-top-width")),l=parseInt(o.getPropertyValue("border-left-width")),c=this.offsetTop-t.offsetTop<t.scrollTop,d=this.offsetTop-t.offsetTop+this.clientHeight-i>t.scrollTop+t.clientHeight,h=this.offsetLeft-t.offsetLeft<t.scrollLeft,g=this.offsetLeft-t.offsetLeft+this.clientWidth-l>t.scrollLeft+t.clientWidth,v=c&&!d;(c||d)&&e&&(t.scrollTop=this.offsetTop-t.offsetTop-t.clientHeight/2-i+this.clientHeight/2),(h||g)&&e&&(t.scrollLeft=this.offsetLeft-t.offsetLeft-t.clientWidth/2-l+this.clientWidth/2),(c||d||h||g)&&!e&&this.scrollIntoView(v)});const o0=globalThis.setTimeout.bind(globalThis),i0=globalThis.clearTimeout.bind(globalThis),Yi=new Map,s0=a=>{const e=Number(a);return Number.isFinite(e)&&e>0?e:Date.now()};typeof window.requestIdleCallback=="undefined"&&(window.requestIdleCallback=function(a){const e=Date.now(),t={},o=o0(()=>{const l=t.value;typeof l=="number"&&Yi.delete(l),a({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-e))}})},1),i=s0(o);return t.value=i,Yi.set(i,o),i}),typeof window.cancelIdleCallback=="undefined"&&(window.cancelIdleCallback=function(a){const e=Yi.get(a);e!==void 0&&(Yi.delete(a),i0(e)),globalThis.clearTimeout(a)});const a0="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let l0=(a=21)=>{let e="",t=crypto.getRandomValues(new Uint8Array(a|=0));for(;a--;)e+=a0[t[a]&63];return e};var el,ep;function c0(){if(ep)return el;ep=1;var a="Expected a function";function e(t,o,i){if(typeof t!="function")throw new TypeError(a);return setTimeout(function(){t.apply(void 0,i)},o)}return el=e,el}var tl,tp;function np(){if(tp)return tl;tp=1;function a(e){return e}return tl=a,tl}var nl,rp;function u0(){if(rp)return nl;rp=1;function a(e,t,o){switch(o.length){case 0:return e.call(t);case 1:return e.call(t,o[0]);case 2:return e.call(t,o[0],o[1]);case 3:return e.call(t,o[0],o[1],o[2])}return e.apply(t,o)}return nl=a,nl}var rl,op;function d0(){if(op)return rl;op=1;var a=u0(),e=Math.max;function t(o,i,l){return i=e(i===void 0?o.length-1:i,0),function(){for(var c=arguments,d=-1,h=e(c.length-i,0),g=Array(h);++d<h;)g[d]=c[i+d];d=-1;for(var v=Array(i+1);++d<i;)v[d]=c[d];return v[i]=l(g),a(o,this,v)}}return rl=t,rl}var ol,ip;function f0(){if(ip)return ol;ip=1;function a(e){return function(){return e}}return ol=a,ol}var il,sp;function ap(){if(sp)return il;sp=1;var a=typeof Ue=="object"&&Ue&&Ue.Object===Object&&Ue;return il=a,il}var sl,lp;function cn(){if(lp)return sl;lp=1;var a=ap(),e=typeof self=="object"&&self&&self.Object===Object&&self,t=a||e||Function("return this")();return sl=t,sl}var al,cp;function Qi(){if(cp)return al;cp=1;var a=cn(),e=a.Symbol;return al=e,al}var ll,up;function h0(){if(up)return ll;up=1;var a=Qi(),e=Object.prototype,t=e.hasOwnProperty,o=e.toString,i=a?a.toStringTag:void 0;function l(c){var d=t.call(c,i),h=c[i];try{c[i]=void 0;var g=!0}catch(y){}var v=o.call(c);return g&&(d?c[i]=h:delete c[i]),v}return ll=l,ll}var cl,dp;function p0(){if(dp)return cl;dp=1;var a=Object.prototype,e=a.toString;function t(o){return e.call(o)}return cl=t,cl}var ul,fp;function Nn(){if(fp)return ul;fp=1;var a=Qi(),e=h0(),t=p0(),o="[object Null]",i="[object Undefined]",l=a?a.toStringTag:void 0;function c(d){return d==null?d===void 0?i:o:l&&l in Object(d)?e(d):t(d)}return ul=c,ul}var dl,hp;function kn(){if(hp)return dl;hp=1;function a(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}return dl=a,dl}var fl,pp;function Zi(){if(pp)return fl;pp=1;var a=Nn(),e=kn(),t="[object AsyncFunction]",o="[object Function]",i="[object GeneratorFunction]",l="[object Proxy]";function c(d){if(!e(d))return!1;var h=a(d);return h==o||h==i||h==t||h==l}return fl=c,fl}var hl,gp;function g0(){if(gp)return hl;gp=1;var a=cn(),e=a["__core-js_shared__"];return hl=e,hl}var pl,mp;function m0(){if(mp)return pl;mp=1;var a=g0(),e=(function(){var o=/[^.]+$/.exec(a&&a.keys&&a.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""})();function t(o){return!!e&&e in o}return pl=t,pl}var gl,vp;function yp(){if(vp)return gl;vp=1;var a=Function.prototype,e=a.toString;function t(o){if(o!=null){try{return e.call(o)}catch(i){}try{return o+""}catch(i){}}return""}return gl=t,gl}var ml,bp;function v0(){if(bp)return ml;bp=1;var a=Zi(),e=m0(),t=kn(),o=yp(),i=/[\\^$.*+?()[\]{}|]/g,l=/^\[object .+?Constructor\]$/,c=Function.prototype,d=Object.prototype,h=c.toString,g=d.hasOwnProperty,v=RegExp("^"+h.call(g).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function y(b){if(!t(b)||e(b))return!1;var E=a(b)?v:l;return E.test(o(b))}return ml=y,ml}var vl,kp;function y0(){if(kp)return vl;kp=1;function a(e,t){return e==null?void 0:e[t]}return vl=a,vl}var yl,wp;function Tr(){if(wp)return yl;wp=1;var a=v0(),e=y0();function t(o,i){var l=e(o,i);return a(l)?l:void 0}return yl=t,yl}var bl,Tp;function xp(){if(Tp)return bl;Tp=1;var a=Tr(),e=(function(){try{var t=a(Object,"defineProperty");return t({},"",{}),t}catch(o){}})();return bl=e,bl}var kl,Ep;function b0(){if(Ep)return kl;Ep=1;var a=f0(),e=xp(),t=np(),o=e?function(i,l){return e(i,"toString",{configurable:!0,enumerable:!1,value:a(l),writable:!0})}:t;return kl=o,kl}var wl,Sp;function k0(){if(Sp)return wl;Sp=1;var a=800,e=16,t=Date.now;function o(i){var l=0,c=0;return function(){var d=t(),h=e-(d-c);if(c=d,h>0){if(++l>=a)return arguments[0]}else l=0;return i.apply(void 0,arguments)}}return wl=o,wl}var Tl,Cp;function w0(){if(Cp)return Tl;Cp=1;var a=b0(),e=k0(),t=e(a);return Tl=t,Tl}var xl,Bp;function Ap(){if(Bp)return xl;Bp=1;var a=np(),e=d0(),t=w0();function o(i,l){return t(e(i,l,a),i+"")}return xl=o,xl}var El,Ip;function T0(){if(Ip)return El;Ip=1;var a=/\s/;function e(t){for(var o=t.length;o--&&a.test(t.charAt(o)););return o}return El=e,El}var Sl,_p;function x0(){if(_p)return Sl;_p=1;var a=T0(),e=/^\s+/;function t(o){return o&&o.slice(0,a(o)+1).replace(e,"")}return Sl=t,Sl}var Cl,Np;function wn(){if(Np)return Cl;Np=1;function a(e){return e!=null&&typeof e=="object"}return Cl=a,Cl}var Bl,Rp;function E0(){if(Rp)return Bl;Rp=1;var a=Nn(),e=wn(),t="[object Symbol]";function o(i){return typeof i=="symbol"||e(i)&&a(i)==t}return Bl=o,Bl}var Al,Op;function Lp(){if(Op)return Al;Op=1;var a=x0(),e=kn(),t=E0(),o=NaN,i=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt;function h(g){if(typeof g=="number")return g;if(t(g))return o;if(e(g)){var v=typeof g.valueOf=="function"?g.valueOf():g;g=e(v)?v+"":v}if(typeof g!="string")return g===0?g:+g;g=a(g);var y=l.test(g);return y||c.test(g)?d(g.slice(2),y?2:8):i.test(g)?o:+g}return Al=h,Al}var Il,Dp;function S0(){if(Dp)return Il;Dp=1;var a=c0(),e=Ap(),t=Lp(),o=e(function(i,l,c){return a(i,t(l)||0,c)});return Il=o,Il}var C0=S0();const B0=Oe(C0);var _l,Pp;function A0(){if(Pp)return _l;Pp=1;var a=Nn(),e=wn(),t="[object Boolean]";function o(i){return i===!0||i===!1||e(i)&&a(i)==t}return _l=o,_l}var I0=A0();const _0=Oe(I0);var Nl,Mp;function Ji(){if(Mp)return Nl;Mp=1;var a=Object.prototype;function e(t){var o=t&&t.constructor,i=typeof o=="function"&&o.prototype||a;return t===i}return Nl=e,Nl}var Rl,Fp;function zp(){if(Fp)return Rl;Fp=1;function a(e,t){return function(o){return e(t(o))}}return Rl=a,Rl}var Ol,Hp;function N0(){if(Hp)return Ol;Hp=1;var a=zp(),e=a(Object.keys,Object);return Ol=e,Ol}var Ll,jp;function qp(){if(jp)return Ll;jp=1;var a=Ji(),e=N0(),t=Object.prototype,o=t.hasOwnProperty;function i(l){if(!a(l))return e(l);var c=[];for(var d in Object(l))o.call(l,d)&&d!="constructor"&&c.push(d);return c}return Ll=i,Ll}var Dl,Up;function R0(){if(Up)return Dl;Up=1;var a=Tr(),e=cn(),t=a(e,"DataView");return Dl=t,Dl}var Pl,Wp;function Ml(){if(Wp)return Pl;Wp=1;var a=Tr(),e=cn(),t=a(e,"Map");return Pl=t,Pl}var Fl,Kp;function O0(){if(Kp)return Fl;Kp=1;var a=Tr(),e=cn(),t=a(e,"Promise");return Fl=t,Fl}var zl,Vp;function L0(){if(Vp)return zl;Vp=1;var a=Tr(),e=cn(),t=a(e,"Set");return zl=t,zl}var Hl,$p;function D0(){if($p)return Hl;$p=1;var a=Tr(),e=cn(),t=a(e,"WeakMap");return Hl=t,Hl}var jl,Gp;function ql(){if(Gp)return jl;Gp=1;var a=R0(),e=Ml(),t=O0(),o=L0(),i=D0(),l=Nn(),c=yp(),d="[object Map]",h="[object Object]",g="[object Promise]",v="[object Set]",y="[object WeakMap]",b="[object DataView]",E=c(a),w=c(e),T=c(t),S=c(o),O=c(i),L=l;return(a&&L(new a(new ArrayBuffer(1)))!=b||e&&L(new e)!=d||t&&L(t.resolve())!=g||o&&L(new o)!=v||i&&L(new i)!=y)&&(L=function(U){var H=l(U),X=H==h?U.constructor:void 0,q=X?c(X):"";if(q)switch(q){case E:return b;case w:return d;case T:return g;case S:return v;case O:return y}return H}),jl=L,jl}var Ul,Xp;function P0(){if(Xp)return Ul;Xp=1;var a=Nn(),e=wn(),t="[object Arguments]";function o(i){return e(i)&&a(i)==t}return Ul=o,Ul}var Wl,Yp;function Kl(){if(Yp)return Wl;Yp=1;var a=P0(),e=wn(),t=Object.prototype,o=t.hasOwnProperty,i=t.propertyIsEnumerable,l=a((function(){return arguments})())?a:function(c){return e(c)&&o.call(c,"callee")&&!i.call(c,"callee")};return Wl=l,Wl}var Vl,Qp;function Yr(){if(Qp)return Vl;Qp=1;var a=Array.isArray;return Vl=a,Vl}var $l,Zp;function Jp(){if(Zp)return $l;Zp=1;var a=9007199254740991;function e(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=a}return $l=e,$l}var Gl,eg;function Qr(){if(eg)return Gl;eg=1;var a=Zi(),e=Jp();function t(o){return o!=null&&e(o.length)&&!a(o)}return Gl=t,Gl}var Fo={exports:{}},Xl,tg;function M0(){if(tg)return Xl;tg=1;function a(){return!1}return Xl=a,Xl}Fo.exports;var ng;function es(){return ng||(ng=1,(function(a,e){var t=cn(),o=M0(),i=e&&!e.nodeType&&e,l=i&&!0&&a&&!a.nodeType&&a,c=l&&l.exports===i,d=c?t.Buffer:void 0,h=d?d.isBuffer:void 0,g=h||o;a.exports=g})(Fo,Fo.exports)),Fo.exports}var Yl,rg;function F0(){if(rg)return Yl;rg=1;var a=Nn(),e=Jp(),t=wn(),o="[object Arguments]",i="[object Array]",l="[object Boolean]",c="[object Date]",d="[object Error]",h="[object Function]",g="[object Map]",v="[object Number]",y="[object Object]",b="[object RegExp]",E="[object Set]",w="[object String]",T="[object WeakMap]",S="[object ArrayBuffer]",O="[object DataView]",L="[object Float32Array]",U="[object Float64Array]",H="[object Int8Array]",X="[object Int16Array]",q="[object Int32Array]",W="[object Uint8Array]",F="[object Uint8ClampedArray]",ne="[object Uint16Array]",ce="[object Uint32Array]",Q={};Q[L]=Q[U]=Q[H]=Q[X]=Q[q]=Q[W]=Q[F]=Q[ne]=Q[ce]=!0,Q[o]=Q[i]=Q[S]=Q[l]=Q[O]=Q[c]=Q[d]=Q[h]=Q[g]=Q[v]=Q[y]=Q[b]=Q[E]=Q[w]=Q[T]=!1;function ye(Z){return t(Z)&&e(Z.length)&&!!Q[a(Z)]}return Yl=ye,Yl}var Ql,og;function z0(){if(og)return Ql;og=1;function a(e){return function(t){return e(t)}}return Ql=a,Ql}var zo={exports:{}};zo.exports;var ig;function H0(){return ig||(ig=1,(function(a,e){var t=ap(),o=e&&!e.nodeType&&e,i=o&&!0&&a&&!a.nodeType&&a,l=i&&i.exports===o,c=l&&t.process,d=(function(){try{var h=i&&i.require&&i.require("util").types;return h||c&&c.binding&&c.binding("util")}catch(g){}})();a.exports=d})(zo,zo.exports)),zo.exports}var Zl,sg;function ts(){if(sg)return Zl;sg=1;var a=F0(),e=z0(),t=H0(),o=t&&t.isTypedArray,i=o?e(o):a;return Zl=i,Zl}var Jl,ag;function j0(){if(ag)return Jl;ag=1;var a=qp(),e=ql(),t=Kl(),o=Yr(),i=Qr(),l=es(),c=Ji(),d=ts(),h="[object Map]",g="[object Set]",v=Object.prototype,y=v.hasOwnProperty;function b(E){if(E==null)return!0;if(i(E)&&(o(E)||typeof E=="string"||typeof E.splice=="function"||l(E)||d(E)||t(E)))return!E.length;var w=e(E);if(w==h||w==g)return!E.size;if(c(E))return!a(E).length;for(var T in E)if(y.call(E,T))return!1;return!0}return Jl=b,Jl}var q0=j0();const U0=Oe(q0);var ec,lg;function W0(){if(lg)return ec;lg=1;function a(){this.__data__=[],this.size=0}return ec=a,ec}var tc,cg;function Ho(){if(cg)return tc;cg=1;function a(e,t){return e===t||e!==e&&t!==t}return tc=a,tc}var nc,ug;function ns(){if(ug)return nc;ug=1;var a=Ho();function e(t,o){for(var i=t.length;i--;)if(a(t[i][0],o))return i;return-1}return nc=e,nc}var rc,dg;function K0(){if(dg)return rc;dg=1;var a=ns(),e=Array.prototype,t=e.splice;function o(i){var l=this.__data__,c=a(l,i);if(c<0)return!1;var d=l.length-1;return c==d?l.pop():t.call(l,c,1),--this.size,!0}return rc=o,rc}var oc,fg;function V0(){if(fg)return oc;fg=1;var a=ns();function e(t){var o=this.__data__,i=a(o,t);return i<0?void 0:o[i][1]}return oc=e,oc}var ic,hg;function $0(){if(hg)return ic;hg=1;var a=ns();function e(t){return a(this.__data__,t)>-1}return ic=e,ic}var sc,pg;function G0(){if(pg)return sc;pg=1;var a=ns();function e(t,o){var i=this.__data__,l=a(i,t);return l<0?(++this.size,i.push([t,o])):i[l][1]=o,this}return sc=e,sc}var ac,gg;function rs(){if(gg)return ac;gg=1;var a=W0(),e=K0(),t=V0(),o=$0(),i=G0();function l(c){var d=-1,h=c==null?0:c.length;for(this.clear();++d<h;){var g=c[d];this.set(g[0],g[1])}}return l.prototype.clear=a,l.prototype.delete=e,l.prototype.get=t,l.prototype.has=o,l.prototype.set=i,ac=l,ac}var lc,mg;function X0(){if(mg)return lc;mg=1;var a=rs();function e(){this.__data__=new a,this.size=0}return lc=e,lc}var cc,vg;function Y0(){if(vg)return cc;vg=1;function a(e){var t=this.__data__,o=t.delete(e);return this.size=t.size,o}return cc=a,cc}var uc,yg;function Q0(){if(yg)return uc;yg=1;function a(e){return this.__data__.get(e)}return uc=a,uc}var dc,bg;function Z0(){if(bg)return dc;bg=1;function a(e){return this.__data__.has(e)}return dc=a,dc}var fc,kg;function os(){if(kg)return fc;kg=1;var a=Tr(),e=a(Object,"create");return fc=e,fc}var hc,wg;function J0(){if(wg)return hc;wg=1;var a=os();function e(){this.__data__=a?a(null):{},this.size=0}return hc=e,hc}var pc,Tg;function eT(){if(Tg)return pc;Tg=1;function a(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}return pc=a,pc}var gc,xg;function tT(){if(xg)return gc;xg=1;var a=os(),e="__lodash_hash_undefined__",t=Object.prototype,o=t.hasOwnProperty;function i(l){var c=this.__data__;if(a){var d=c[l];return d===e?void 0:d}return o.call(c,l)?c[l]:void 0}return gc=i,gc}var mc,Eg;function nT(){if(Eg)return mc;Eg=1;var a=os(),e=Object.prototype,t=e.hasOwnProperty;function o(i){var l=this.__data__;return a?l[i]!==void 0:t.call(l,i)}return mc=o,mc}var vc,Sg;function rT(){if(Sg)return vc;Sg=1;var a=os(),e="__lodash_hash_undefined__";function t(o,i){var l=this.__data__;return this.size+=this.has(o)?0:1,l[o]=a&&i===void 0?e:i,this}return vc=t,vc}var yc,Cg;function oT(){if(Cg)return yc;Cg=1;var a=J0(),e=eT(),t=tT(),o=nT(),i=rT();function l(c){var d=-1,h=c==null?0:c.length;for(this.clear();++d<h;){var g=c[d];this.set(g[0],g[1])}}return l.prototype.clear=a,l.prototype.delete=e,l.prototype.get=t,l.prototype.has=o,l.prototype.set=i,yc=l,yc}var bc,Bg;function iT(){if(Bg)return bc;Bg=1;var a=oT(),e=rs(),t=Ml();function o(){this.size=0,this.__data__={hash:new a,map:new(t||e),string:new a}}return bc=o,bc}var kc,Ag;function sT(){if(Ag)return kc;Ag=1;function a(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}return kc=a,kc}var wc,Ig;function is(){if(Ig)return wc;Ig=1;var a=sT();function e(t,o){var i=t.__data__;return a(o)?i[typeof o=="string"?"string":"hash"]:i.map}return wc=e,wc}var Tc,_g;function aT(){if(_g)return Tc;_g=1;var a=is();function e(t){var o=a(this,t).delete(t);return this.size-=o?1:0,o}return Tc=e,Tc}var xc,Ng;function lT(){if(Ng)return xc;Ng=1;var a=is();function e(t){return a(this,t).get(t)}return xc=e,xc}var Ec,Rg;function cT(){if(Rg)return Ec;Rg=1;var a=is();function e(t){return a(this,t).has(t)}return Ec=e,Ec}var Sc,Og;function uT(){if(Og)return Sc;Og=1;var a=is();function e(t,o){var i=a(this,t),l=i.size;return i.set(t,o),this.size+=i.size==l?0:1,this}return Sc=e,Sc}var Cc,Lg;function Dg(){if(Lg)return Cc;Lg=1;var a=iT(),e=aT(),t=lT(),o=cT(),i=uT();function l(c){var d=-1,h=c==null?0:c.length;for(this.clear();++d<h;){var g=c[d];this.set(g[0],g[1])}}return l.prototype.clear=a,l.prototype.delete=e,l.prototype.get=t,l.prototype.has=o,l.prototype.set=i,Cc=l,Cc}var Bc,Pg;function dT(){if(Pg)return Bc;Pg=1;var a=rs(),e=Ml(),t=Dg(),o=200;function i(l,c){var d=this.__data__;if(d instanceof a){var h=d.__data__;if(!e||h.length<o-1)return h.push([l,c]),this.size=++d.size,this;d=this.__data__=new t(h)}return d.set(l,c),this.size=d.size,this}return Bc=i,Bc}var Ac,Mg;function Fg(){if(Mg)return Ac;Mg=1;var a=rs(),e=X0(),t=Y0(),o=Q0(),i=Z0(),l=dT();function c(d){var h=this.__data__=new a(d);this.size=h.size}return c.prototype.clear=e,c.prototype.delete=t,c.prototype.get=o,c.prototype.has=i,c.prototype.set=l,Ac=c,Ac}var Ic,zg;function fT(){if(zg)return Ic;zg=1;var a="__lodash_hash_undefined__";function e(t){return this.__data__.set(t,a),this}return Ic=e,Ic}var _c,Hg;function hT(){if(Hg)return _c;Hg=1;function a(e){return this.__data__.has(e)}return _c=a,_c}var Nc,jg;function pT(){if(jg)return Nc;jg=1;var a=Dg(),e=fT(),t=hT();function o(i){var l=-1,c=i==null?0:i.length;for(this.__data__=new a;++l<c;)this.add(i[l])}return o.prototype.add=o.prototype.push=e,o.prototype.has=t,Nc=o,Nc}var Rc,qg;function gT(){if(qg)return Rc;qg=1;function a(e,t){for(var o=-1,i=e==null?0:e.length;++o<i;)if(t(e[o],o,e))return!0;return!1}return Rc=a,Rc}var Oc,Ug;function mT(){if(Ug)return Oc;Ug=1;function a(e,t){return e.has(t)}return Oc=a,Oc}var Lc,Wg;function Kg(){if(Wg)return Lc;Wg=1;var a=pT(),e=gT(),t=mT(),o=1,i=2;function l(c,d,h,g,v,y){var b=h&o,E=c.length,w=d.length;if(E!=w&&!(b&&w>E))return!1;var T=y.get(c),S=y.get(d);if(T&&S)return T==d&&S==c;var O=-1,L=!0,U=h&i?new a:void 0;for(y.set(c,d),y.set(d,c);++O<E;){var H=c[O],X=d[O];if(g)var q=b?g(X,H,O,d,c,y):g(H,X,O,c,d,y);if(q!==void 0){if(q)continue;L=!1;break}if(U){if(!e(d,function(W,F){if(!t(U,F)&&(H===W||v(H,W,h,g,y)))return U.push(F)})){L=!1;break}}else if(!(H===X||v(H,X,h,g,y))){L=!1;break}}return y.delete(c),y.delete(d),L}return Lc=l,Lc}var Dc,Vg;function $g(){if(Vg)return Dc;Vg=1;var a=cn(),e=a.Uint8Array;return Dc=e,Dc}var Pc,Gg;function Xg(){if(Gg)return Pc;Gg=1;function a(e){var t=-1,o=Array(e.size);return e.forEach(function(i,l){o[++t]=[l,i]}),o}return Pc=a,Pc}var Mc,Yg;function Qg(){if(Yg)return Mc;Yg=1;function a(e){var t=-1,o=Array(e.size);return e.forEach(function(i){o[++t]=i}),o}return Mc=a,Mc}var Fc,Zg;function vT(){if(Zg)return Fc;Zg=1;var a=Qi(),e=$g(),t=Ho(),o=Kg(),i=Xg(),l=Qg(),c=1,d=2,h="[object Boolean]",g="[object Date]",v="[object Error]",y="[object Map]",b="[object Number]",E="[object RegExp]",w="[object Set]",T="[object String]",S="[object Symbol]",O="[object ArrayBuffer]",L="[object DataView]",U=a?a.prototype:void 0,H=U?U.valueOf:void 0;function X(q,W,F,ne,ce,Q,ye){switch(F){case L:if(q.byteLength!=W.byteLength||q.byteOffset!=W.byteOffset)return!1;q=q.buffer,W=W.buffer;case O:return!(q.byteLength!=W.byteLength||!Q(new e(q),new e(W)));case h:case g:case b:return t(+q,+W);case v:return q.name==W.name&&q.message==W.message;case E:case T:return q==W+"";case y:var Z=i;case w:var we=ne&c;if(Z||(Z=l),q.size!=W.size&&!we)return!1;var Re=ye.get(q);if(Re)return Re==W;ne|=d,ye.set(q,W);var xe=o(Z(q),Z(W),ne,ce,Q,ye);return ye.delete(q),xe;case S:if(H)return H.call(q)==H.call(W)}return!1}return Fc=X,Fc}var zc,Jg;function yT(){if(Jg)return zc;Jg=1;function a(e,t){for(var o=-1,i=t.length,l=e.length;++o<i;)e[l+o]=t[o];return e}return zc=a,zc}var Hc,em;function bT(){if(em)return Hc;em=1;var a=yT(),e=Yr();function t(o,i,l){var c=i(o);return e(o)?c:a(c,l(o))}return Hc=t,Hc}var jc,tm;function kT(){if(tm)return jc;tm=1;function a(e,t){for(var o=-1,i=e==null?0:e.length,l=0,c=[];++o<i;){var d=e[o];t(d,o,e)&&(c[l++]=d)}return c}return jc=a,jc}var qc,nm;function wT(){if(nm)return qc;nm=1;function a(){return[]}return qc=a,qc}var Uc,rm;function TT(){if(rm)return Uc;rm=1;var a=kT(),e=wT(),t=Object.prototype,o=t.propertyIsEnumerable,i=Object.getOwnPropertySymbols,l=i?function(c){return c==null?[]:(c=Object(c),a(i(c),function(d){return o.call(c,d)}))}:e;return Uc=l,Uc}var Wc,om;function xT(){if(om)return Wc;om=1;function a(e,t){for(var o=-1,i=Array(e);++o<e;)i[o]=t(o);return i}return Wc=a,Wc}var Kc,im;function sm(){if(im)return Kc;im=1;var a=9007199254740991,e=/^(?:0|[1-9]\d*)$/;function t(o,i){var l=typeof o;return i=i==null?a:i,!!i&&(l=="number"||l!="symbol"&&e.test(o))&&o>-1&&o%1==0&&o<i}return Kc=t,Kc}var Vc,am;function lm(){if(am)return Vc;am=1;var a=xT(),e=Kl(),t=Yr(),o=es(),i=sm(),l=ts(),c=Object.prototype,d=c.hasOwnProperty;function h(g,v){var y=t(g),b=!y&&e(g),E=!y&&!b&&o(g),w=!y&&!b&&!E&&l(g),T=y||b||E||w,S=T?a(g.length,String):[],O=S.length;for(var L in g)(v||d.call(g,L))&&!(T&&(L=="length"||E&&(L=="offset"||L=="parent")||w&&(L=="buffer"||L=="byteLength"||L=="byteOffset")||i(L,O)))&&S.push(L);return S}return Vc=h,Vc}var $c,cm;function um(){if(cm)return $c;cm=1;var a=lm(),e=qp(),t=Qr();function o(i){return t(i)?a(i):e(i)}return $c=o,$c}var Gc,dm;function ET(){if(dm)return Gc;dm=1;var a=bT(),e=TT(),t=um();function o(i){return a(i,t,e)}return Gc=o,Gc}var Xc,fm;function ST(){if(fm)return Xc;fm=1;var a=ET(),e=1,t=Object.prototype,o=t.hasOwnProperty;function i(l,c,d,h,g,v){var y=d&e,b=a(l),E=b.length,w=a(c),T=w.length;if(E!=T&&!y)return!1;for(var S=E;S--;){var O=b[S];if(!(y?O in c:o.call(c,O)))return!1}var L=v.get(l),U=v.get(c);if(L&&U)return L==c&&U==l;var H=!0;v.set(l,c),v.set(c,l);for(var X=y;++S<E;){O=b[S];var q=l[O],W=c[O];if(h)var F=y?h(W,q,O,c,l,v):h(q,W,O,l,c,v);if(!(F===void 0?q===W||g(q,W,d,h,v):F)){H=!1;break}X||(X=O=="constructor")}if(H&&!X){var ne=l.constructor,ce=c.constructor;ne!=ce&&"constructor"in l&&"constructor"in c&&!(typeof ne=="function"&&ne instanceof ne&&typeof ce=="function"&&ce instanceof ce)&&(H=!1)}return v.delete(l),v.delete(c),H}return Xc=i,Xc}var Yc,hm;function CT(){if(hm)return Yc;hm=1;var a=Fg(),e=Kg(),t=vT(),o=ST(),i=ql(),l=Yr(),c=es(),d=ts(),h=1,g="[object Arguments]",v="[object Array]",y="[object Object]",b=Object.prototype,E=b.hasOwnProperty;function w(T,S,O,L,U,H){var X=l(T),q=l(S),W=X?v:i(T),F=q?v:i(S);W=W==g?y:W,F=F==g?y:F;var ne=W==y,ce=F==y,Q=W==F;if(Q&&c(T)){if(!c(S))return!1;X=!0,ne=!1}if(Q&&!ne)return H||(H=new a),X||d(T)?e(T,S,O,L,U,H):t(T,S,W,O,L,U,H);if(!(O&h)){var ye=ne&&E.call(T,"__wrapped__"),Z=ce&&E.call(S,"__wrapped__");if(ye||Z){var we=ye?T.value():T,Re=Z?S.value():S;return H||(H=new a),U(we,Re,O,L,H)}}return Q?(H||(H=new a),o(T,S,O,L,U,H)):!1}return Yc=w,Yc}var Qc,pm;function BT(){if(pm)return Qc;pm=1;var a=CT(),e=wn();function t(o,i,l,c,d){return o===i?!0:o==null||i==null||!e(o)&&!e(i)?o!==o&&i!==i:a(o,i,l,c,t,d)}return Qc=t,Qc}var Zc,gm;function AT(){if(gm)return Zc;gm=1;var a=BT();function e(t,o){return a(t,o)}return Zc=e,Zc}var IT=AT();const _T=Oe(IT);var NT=Zi();const RT=Oe(NT);var Jc,mm;function OT(){if(mm)return Jc;mm=1;var a=Nn(),e=wn(),t="[object Number]";function o(i){return typeof i=="number"||e(i)&&a(i)==t}return Jc=o,Jc}var LT=OT();const DT=Oe(LT);var eu,vm;function ym(){if(vm)return eu;vm=1;var a=zp(),e=a(Object.getPrototypeOf,Object);return eu=e,eu}var tu,bm;function km(){if(bm)return tu;bm=1;var a=Nn(),e=ym(),t=wn(),o="[object Object]",i=Function.prototype,l=Object.prototype,c=i.toString,d=l.hasOwnProperty,h=c.call(Object);function g(v){if(!t(v)||a(v)!=o)return!1;var y=e(v);if(y===null)return!0;var b=d.call(y,"constructor")&&y.constructor;return typeof b=="function"&&b instanceof b&&c.call(b)==h}return tu=g,tu}var PT=km();const MT=Oe(PT);var nu,wm;function Tm(){if(wm)return nu;wm=1;var a=Nn(),e=Yr(),t=wn(),o="[object String]";function i(l){return typeof l=="string"||!e(l)&&t(l)&&a(l)==o}return nu=i,nu}var FT=Tm();const zT=Oe(FT);var ru,xm;function HT(){if(xm)return ru;xm=1;function a(e){return e===void 0}return ru=a,ru}var jT=HT();const qT=Oe(jT);var ou,Em;function iu(){if(Em)return ou;Em=1;var a=xp();function e(t,o,i){o=="__proto__"&&a?a(t,o,{configurable:!0,enumerable:!0,value:i,writable:!0}):t[o]=i}return ou=e,ou}var su,Sm;function Cm(){if(Sm)return su;Sm=1;var a=iu(),e=Ho();function t(o,i,l){(l!==void 0&&!e(o[i],l)||l===void 0&&!(i in o))&&a(o,i,l)}return su=t,su}var au,Bm;function UT(){if(Bm)return au;Bm=1;function a(e){return function(t,o,i){for(var l=-1,c=Object(t),d=i(t),h=d.length;h--;){var g=d[e?h:++l];if(o(c[g],g,c)===!1)break}return t}}return au=a,au}var lu,Am;function WT(){if(Am)return lu;Am=1;var a=UT(),e=a();return lu=e,lu}var jo={exports:{}};jo.exports;var Im;function KT(){return Im||(Im=1,(function(a,e){var t=cn(),o=e&&!e.nodeType&&e,i=o&&!0&&a&&!a.nodeType&&a,l=i&&i.exports===o,c=l?t.Buffer:void 0,d=c?c.allocUnsafe:void 0;function h(g,v){if(v)return g.slice();var y=g.length,b=d?d(y):new g.constructor(y);return g.copy(b),b}a.exports=h})(jo,jo.exports)),jo.exports}var cu,_m;function VT(){if(_m)return cu;_m=1;var a=$g();function e(t){var o=new t.constructor(t.byteLength);return new a(o).set(new a(t)),o}return cu=e,cu}var uu,Nm;function $T(){if(Nm)return uu;Nm=1;var a=VT();function e(t,o){var i=o?a(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.length)}return uu=e,uu}var du,Rm;function Om(){if(Rm)return du;Rm=1;function a(e,t){var o=-1,i=e.length;for(t||(t=Array(i));++o<i;)t[o]=e[o];return t}return du=a,du}var fu,Lm;function GT(){if(Lm)return fu;Lm=1;var a=kn(),e=Object.create,t=(function(){function o(){}return function(i){if(!a(i))return{};if(e)return e(i);o.prototype=i;var l=new o;return o.prototype=void 0,l}})();return fu=t,fu}var hu,Dm;function XT(){if(Dm)return hu;Dm=1;var a=GT(),e=ym(),t=Ji();function o(i){return typeof i.constructor=="function"&&!t(i)?a(e(i)):{}}return hu=o,hu}var pu,Pm;function YT(){if(Pm)return pu;Pm=1;var a=Qr(),e=wn();function t(o){return e(o)&&a(o)}return pu=t,pu}var gu,Mm;function Fm(){if(Mm)return gu;Mm=1;function a(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}return gu=a,gu}var mu,zm;function QT(){if(zm)return mu;zm=1;var a=iu(),e=Ho(),t=Object.prototype,o=t.hasOwnProperty;function i(l,c,d){var h=l[c];(!(o.call(l,c)&&e(h,d))||d===void 0&&!(c in l))&&a(l,c,d)}return mu=i,mu}var vu,Hm;function ZT(){if(Hm)return vu;Hm=1;var a=QT(),e=iu();function t(o,i,l,c){var d=!l;l||(l={});for(var h=-1,g=i.length;++h<g;){var v=i[h],y=c?c(l[v],o[v],v,l,o):void 0;y===void 0&&(y=o[v]),d?e(l,v,y):a(l,v,y)}return l}return vu=t,vu}var yu,jm;function JT(){if(jm)return yu;jm=1;function a(e){var t=[];if(e!=null)for(var o in Object(e))t.push(o);return t}return yu=a,yu}var bu,qm;function e1(){if(qm)return bu;qm=1;var a=kn(),e=Ji(),t=JT(),o=Object.prototype,i=o.hasOwnProperty;function l(c){if(!a(c))return t(c);var d=e(c),h=[];for(var g in c)g=="constructor"&&(d||!i.call(c,g))||h.push(g);return h}return bu=l,bu}var ku,Um;function Wm(){if(Um)return ku;Um=1;var a=lm(),e=e1(),t=Qr();function o(i){return t(i)?a(i,!0):e(i)}return ku=o,ku}var wu,Km;function t1(){if(Km)return wu;Km=1;var a=ZT(),e=Wm();function t(o){return a(o,e(o))}return wu=t,wu}var Tu,Vm;function n1(){if(Vm)return Tu;Vm=1;var a=Cm(),e=KT(),t=$T(),o=Om(),i=XT(),l=Kl(),c=Yr(),d=YT(),h=es(),g=Zi(),v=kn(),y=km(),b=ts(),E=Fm(),w=t1();function T(S,O,L,U,H,X,q){var W=E(S,L),F=E(O,L),ne=q.get(F);if(ne){a(S,L,ne);return}var ce=X?X(W,F,L+"",S,O,q):void 0,Q=ce===void 0;if(Q){var ye=c(F),Z=!ye&&h(F),we=!ye&&!Z&&b(F);ce=F,ye||Z||we?c(W)?ce=W:d(W)?ce=o(W):Z?(Q=!1,ce=e(F,!0)):we?(Q=!1,ce=t(F,!0)):ce=[]:y(F)||l(F)?(ce=W,l(W)?ce=w(W):(!v(W)||g(W))&&(ce=i(F))):Q=!1}Q&&(q.set(F,ce),H(ce,F,U,X,q),q.delete(F)),a(S,L,ce)}return Tu=T,Tu}var xu,$m;function r1(){if($m)return xu;$m=1;var a=Fg(),e=Cm(),t=WT(),o=n1(),i=kn(),l=Wm(),c=Fm();function d(h,g,v,y,b){h!==g&&t(g,function(E,w){if(b||(b=new a),i(E))o(h,g,w,v,d,y,b);else{var T=y?y(c(h,w),E,w+"",h,g,b):void 0;T===void 0&&(T=E),e(h,w,T)}},l)}return xu=d,xu}var Eu,Gm;function o1(){if(Gm)return Eu;Gm=1;var a=Ho(),e=Qr(),t=sm(),o=kn();function i(l,c,d){if(!o(d))return!1;var h=typeof c;return(h=="number"?e(d)&&t(c,d.length):h=="string"&&c in d)?a(d[c],l):!1}return Eu=i,Eu}var Su,Xm;function i1(){if(Xm)return Su;Xm=1;var a=Ap(),e=o1();function t(o){return a(function(i,l){var c=-1,d=l.length,h=d>1?l[d-1]:void 0,g=d>2?l[2]:void 0;for(h=o.length>3&&typeof h=="function"?(d--,h):void 0,g&&e(l[0],l[1],g)&&(h=d<3?void 0:h,d=1),i=Object(i);++c<d;){var v=l[c];v&&o(i,v,c,h)}return i})}return Su=t,Su}var Cu,Ym;function s1(){if(Ym)return Cu;Ym=1;var a=r1(),e=i1(),t=e(function(o,i,l,c){a(o,i,l,c)});return Cu=t,Cu}var a1=s1();const l1=Oe(a1);var Bu,Qm;function c1(){if(Qm)return Bu;Qm=1;var a=cn(),e=function(){return a.Date.now()};return Bu=e,Bu}var Au,Zm;function u1(){if(Zm)return Au;Zm=1;var a=kn(),e=c1(),t=Lp(),o="Expected a function",i=Math.max,l=Math.min;function c(d,h,g){var v,y,b,E,w,T,S=0,O=!1,L=!1,U=!0;if(typeof d!="function")throw new TypeError(o);h=t(h)||0,a(g)&&(O=!!g.leading,L="maxWait"in g,b=L?i(t(g.maxWait)||0,h):b,U="trailing"in g?!!g.trailing:U);function H(Z){var we=v,Re=y;return v=y=void 0,S=Z,E=d.apply(Re,we),E}function X(Z){return S=Z,w=setTimeout(F,h),O?H(Z):E}function q(Z){var we=Z-T,Re=Z-S,xe=h-we;return L?l(xe,b-Re):xe}function W(Z){var we=Z-T,Re=Z-S;return T===void 0||we>=h||we<0||L&&Re>=b}function F(){var Z=e();if(W(Z))return ne(Z);w=setTimeout(F,q(Z))}function ne(Z){return w=void 0,U&&v?H(Z):(v=y=void 0,E)}function ce(){w!==void 0&&clearTimeout(w),S=0,v=T=y=w=void 0}function Q(){return w===void 0?E:ne(e())}function ye(){var Z=e(),we=W(Z);if(v=arguments,y=this,T=Z,we){if(w===void 0)return X(T);if(L)return clearTimeout(w),w=setTimeout(F,h),H(T)}return w===void 0&&(w=setTimeout(F,h)),E}return ye.cancel=ce,ye.flush=Q,ye}return Au=c,Au}var Iu,Jm;function d1(){if(Jm)return Iu;Jm=1;var a=u1(),e=kn(),t="Expected a function";function o(i,l,c){var d=!0,h=!0;if(typeof i!="function")throw new TypeError(t);return e(c)&&(d="leading"in c?!!c.leading:d,h="trailing"in c?!!c.trailing:h),a(i,l,{leading:d,maxWait:l,trailing:h})}return Iu=o,Iu}var f1=d1();const h1=Oe(f1);var _u,ev;function p1(){if(ev)return _u;ev=1;function a(e){for(var t,o=[];!(t=e.next()).done;)o.push(t.value);return o}return _u=a,_u}var Nu,tv;function g1(){if(tv)return Nu;tv=1;function a(e){return e.split("")}return Nu=a,Nu}var Ru,nv;function m1(){if(nv)return Ru;nv=1;var a="\\ud800-\\udfff",e="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",o="\\u20d0-\\u20ff",i=e+t+o,l="\\ufe0e\\ufe0f",c="\\u200d",d=RegExp("["+c+a+i+l+"]");function h(g){return d.test(g)}return Ru=h,Ru}var Ou,rv;function v1(){if(rv)return Ou;rv=1;var a="\\ud800-\\udfff",e="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",o="\\u20d0-\\u20ff",i=e+t+o,l="\\ufe0e\\ufe0f",c="["+a+"]",d="["+i+"]",h="\\ud83c[\\udffb-\\udfff]",g="(?:"+d+"|"+h+")",v="[^"+a+"]",y="(?:\\ud83c[\\udde6-\\uddff]){2}",b="[\\ud800-\\udbff][\\udc00-\\udfff]",E="\\u200d",w=g+"?",T="["+l+"]?",S="(?:"+E+"(?:"+[v,y,b].join("|")+")"+T+w+")*",O=T+w+S,L="(?:"+[v+d+"?",d,y,b,c].join("|")+")",U=RegExp(h+"(?="+h+")|"+L+O,"g");function H(X){return X.match(U)||[]}return Ou=H,Ou}var Lu,ov;function y1(){if(ov)return Lu;ov=1;var a=g1(),e=m1(),t=v1();function o(i){return e(i)?t(i):a(i)}return Lu=o,Lu}var Du,iv;function b1(){if(iv)return Du;iv=1;function a(e,t){for(var o=-1,i=e==null?0:e.length,l=Array(i);++o<i;)l[o]=t(e[o],o,e);return l}return Du=a,Du}var Pu,sv;function k1(){if(sv)return Pu;sv=1;var a=b1();function e(t,o){return a(o,function(i){return t[i]})}return Pu=e,Pu}var Mu,av;function w1(){if(av)return Mu;av=1;var a=k1(),e=um();function t(o){return o==null?[]:a(o,e(o))}return Mu=t,Mu}var Fu,lv;function T1(){if(lv)return Fu;lv=1;var a=Qi(),e=Om(),t=ql(),o=Qr(),i=Tm(),l=p1(),c=Xg(),d=Qg(),h=y1(),g=w1(),v="[object Map]",y="[object Set]",b=a?a.iterator:void 0;function E(w){if(!w)return[];if(o(w))return i(w)?h(w):e(w);if(b&&w[b])return l(w[b]());var T=t(w),S=T==v?c:T==y?d:g;return S(w)}return Fu=E,Fu}var x1=T1();const E1=Oe(x1);var cv=(a=>(a.VERBOSE="VERBOSE",a.INFO="INFO",a.WARN="WARN",a.ERROR="ERROR",a))(cv||{});const ss=()=>"0.3.1-beta.0",ie={BACKSPACE:8,TAB:9,ENTER:13,LEFT:37,UP:38,DOWN:40,RIGHT:39,DELETE:46},S1={LEFT:0},C1=1e8,B1=16,Yt=(()=>{try{return Function("return this")()}catch(a){return}})();Yt&&typeof Yt.window=="undefined"&&(Yt.window=Yt);const as=()=>{if(Yt!=null&&Yt.window)return Yt.window},uv=()=>{if(Yt!=null&&Yt.navigator)return Yt.navigator;const a=as();return a==null?void 0:a.navigator},qo=(a,e,t="log",o,i="color: inherit")=>{const l=typeof console=="undefined"?void 0:console;if(!l||typeof l[t]!="function")return;const c=["info","log","warn","error"].includes(t),d=[];switch(qo.logLevel){case"ERROR":if(t!=="error")return;break;case"WARN":if(!["error","warn"].includes(t))return;break;case"INFO":if(!c||a)return;break}o&&d.push(o);const h=`Blok ${ss()}`,g=`line-height: 1em;
|
|
2
2
|
color: #006FEA;
|
|
3
3
|
display: inline-block;
|
|
4
4
|
font-size: 11px;
|
|
@@ -7,18 +7,18 @@
|
|
|
7
7
|
padding: 4px 9px;
|
|
8
8
|
border-radius: 30px;
|
|
9
9
|
border: 1px solid rgba(56, 138, 229, 0.16);
|
|
10
|
-
margin: 4px 5px 4px 0;`,v=l?u?(f.unshift(g,i),`%c${p}%c ${e}`):`( ${p} )${e}`:e,y=u?o!==void 0?[`${v} %o`,...f]:[v,...f]:[v];try{a[t](...y)}catch{}};Fo.logLevel="VERBOSE";const fS=l=>{Fo.logLevel=l},Ee=(l,e="log",t,o)=>{Fo(!1,l,e,t,o)},Vt=(l,e="log",t,o)=>{Fo(!0,l,e,t,o)},Oe=l=>mT(l),je=l=>wT(l),on=l=>ST(l),sv=l=>p0(l),lv=l=>bT(l),hS=function(l){return ET(l)},ot=l=>B0(l),av=l=>aS(l),ss=(l,e)=>function(...t){d0(()=>l.apply(this,t),e)},pS=l=>l.name.split(".").pop()??"",gS=l=>/^[-\w]+\/([-+\w]+|\*)$/.test(l),cv=(l,e,t)=>{const o={timeoutId:null};return function(...i){const a=()=>{o.timeoutId=null,l.apply(this,i)};o.timeoutId!==null&&clearTimeout(o.timeoutId),o.timeoutId=setTimeout(a,e)}},Mu=(l,e,t)=>QT(l,e,t),uv=()=>{const l={win:!1,mac:!1,x11:!1,linux:!1},t=iv()?.userAgent?.toLowerCase()??"",o=t?Object.keys(l).find(i=>t.indexOf(i)!==-1):void 0;return o!==void 0&&(l[o]=!0),l},ls=l=>l&&l.slice(0,1).toUpperCase()+l.slice(1),mS=(l,e)=>{if(Array.isArray(e))return e},zo=(l,...e)=>!je(l)||e.length===0?l:e.reduce((t,o)=>je(o)?VT(t,o,mS):t,l),dv=l=>{const e=uv(),t=l.replace(/shift/gi,"⇧").replace(/backspace/gi,"⌫").replace(/enter/gi,"⏎").replace(/up/gi,"↑").replace(/left/gi,"→").replace(/down/gi,"↓").replace(/right/gi,"←").replace(/escape/gi,"⎋").replace(/insert/gi,"Ins").replace(/delete/gi,"␡").replace(/\+/gi," + ");return e.mac?t.replace(/ctrl|cmd/gi,"⌘").replace(/alt/gi,"⌥"):t.replace(/cmd/gi,"Ctrl").replace(/windows/gi,"WIN")},vS=l=>{try{return new URL(l).href}catch{}const e=is();return l.substring(0,2)==="//"?e?`${e.location.protocol}${l}`:l:e?`${e.location.origin}${l}`:l},yS=()=>Vw(10),bS=l=>{const e=is();e&&e.open(l,"_blank")},kS=(l="")=>`${l}${Math.floor(Math.random()*uS).toString(dS)}`,fv=650,Kn=()=>{const l=is();return!l||typeof l.matchMedia!="function"?!1:l.matchMedia(`(max-width: ${fv}px)`).matches},Fu=(()=>{const l=iv();if(!l)return!1;const e=l.userAgent||"",o=l.userAgentData?.platform;return!!(/iP(ad|hone|od)/.test(e)||o!==void 0&&o!==""&&/iP(ad|hone|od)/.test(o)||((l.maxTouchPoints??0)>1?(o!==void 0&&o!==""?o:void 0)??l.platform:void 0)==="MacIntel")})(),wS=(l,e)=>pT(l,e);class R{static isSingleTag(e){return!!e.tagName&&["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"].includes(e.tagName)}static isLineBreakTag(e){return!!e&&["BR","WBR"].includes(e.tagName)}static make(e,t=null,o={}){const i=document.createElement(e);if(Array.isArray(t)){const a=t.filter(u=>u!==void 0&&u!=="").flatMap(u=>u.split(" ")).filter(u=>u!=="");i.classList.add(...a)}if(typeof t=="string"&&t!==""){const a=t.split(" ").filter(u=>u!=="");i.classList.add(...a)}for(const a in o){if(!Object.prototype.hasOwnProperty.call(o,a))continue;const u=o[a];if(u!=null){if(a in i){i[a]=u;continue}i.setAttribute(a,String(u))}}return i}static text(e){return document.createTextNode(e)}static append(e,t){Array.isArray(t)?t.forEach(o=>e.appendChild(o)):e.appendChild(t)}static prepend(e,t){Array.isArray(t)?[...t].reverse().forEach(i=>e.prepend(i)):e.prepend(t)}static find(e=document,t){return e.querySelector(t)}static get(e){return document.getElementById(e)}static findAll(e=document,t){return e.querySelectorAll(t)}static get allInputsSelector(){return"[contenteditable=true], textarea, input:not([type]), "+["text","password","email","number","search","tel","url"].map(t=>`input[type="${t}"]`).join(", ")}static findAllInputs(e){return av(e.querySelectorAll(R.allInputsSelector)).reduce((t,o)=>R.isNativeInput(o)||R.containsOnlyInlineElements(o)?[...t,o]:[...t,...R.getDeepestBlockElements(o)],[])}static getDeepestNode(e,t=!1){const o=t?"lastChild":"firstChild",i=t?"previousSibling":"nextSibling";if(e===null||e.nodeType!==Node.ELEMENT_NODE)return e;const a=e[o];if(a===null)return e;const u=a;if(!(R.isSingleTag(u)&&!R.isNativeInput(u)&&!R.isLineBreakTag(u)))return this.getDeepestNode(u,t);const p=u[i];if(p)return this.getDeepestNode(p,t);const g=u.parentNode?.[i];return g?this.getDeepestNode(g,t):u.parentNode}static isElement(e){return lv(e)?!1:e!=null&&e.nodeType!=null&&e.nodeType===Node.ELEMENT_NODE}static isFragment(e){return lv(e)?!1:e!=null&&e.nodeType!=null&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}static isContentEditable(e){return e.contentEditable==="true"}static isNativeInput(e){const t=["INPUT","TEXTAREA"];return e!=null&&typeof e.tagName=="string"?t.includes(e.tagName):!1}static canSetCaret(e){return R.isNativeInput(e)?!new Set(["file","checkbox","radio","hidden","submit","button","image","reset"]).has(e.type):R.isContentEditable(e)}static isNodeEmpty(e,t){if(this.isSingleTag(e)&&!this.isLineBreakTag(e))return!1;const o=this.isElement(e)&&this.isNativeInput(e)?e.value:e.textContent?.replace("","");return((t?o?.replace(new RegExp(t,"g"),""):o)?.length??0)===0}static isLeaf(e){return e?e.childNodes.length===0:!1}static isEmpty(e,t){const o=[e];for(;o.length>0;){const i=o.shift();if(i){if(this.isLeaf(i)&&!this.isNodeEmpty(i,t))return!1;i.childNodes&&o.push(...Array.from(i.childNodes))}}return!0}static isHTMLString(e){const t=R.make("div");return t.innerHTML=e,t.childElementCount>0}static getContentLength(e){return R.isNativeInput(e)?e.value.length:e.nodeType===Node.TEXT_NODE?e.length:e.textContent?.length??0}static get blockElements(){return["address","article","aside","blockquote","canvas","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","noscript","ol","output","p","pre","ruby","section","table","tbody","thead","tr","tfoot","ul","video"]}static containsOnlyInlineElements(e){const t=on(e)?(()=>{const i=document.createElement("div");return i.innerHTML=e,i})():e,o=i=>!R.blockElements.includes(i.tagName.toLowerCase())&&Array.from(i.children).every(o);return Array.from(t.children).every(o)}static getDeepestBlockElements(e){return R.containsOnlyInlineElements(e)?[e]:Array.from(e.children).reduce((t,o)=>[...t,...R.getDeepestBlockElements(o)],[])}static getHolder(e){if(!on(e))return e;const t=document.getElementById(e);if(t!==null)return t;throw new Error(`Element with id "${e}" not found`)}static isAnchor(e){return e.tagName.toLowerCase()==="a"}static offset(e){const t=e.getBoundingClientRect(),o=window.scrollX||document.documentElement.scrollLeft,i=window.scrollY||document.documentElement.scrollTop,a=t.top+i,u=t.left+o;return{top:a,left:u,bottom:a+t.height,right:u+t.width}}static getNodeByOffset(e,t){const o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null),i=(g,v,y,w)=>{if(!g&&y){const _=v-w,L=Math.max(t-_,0),P=Math.min(L,w);return{node:y,offset:P}}if(!g)return{node:null,offset:0};const k=(g.textContent??"").length;return v+k>=t?{node:g,offset:Math.min(t-v,k)}:i(o.nextNode(),v+k,g,k)},a=o.nextNode(),{node:u,offset:f}=i(a,0,null,0);if(!u)return{node:null,offset:0};const p=u.textContent;return!p||p.length===0?{node:null,offset:0}:{node:u,offset:f}}}const zu=l=>!/[^\t\n\r \u200B]/.test(l),TS=l=>{const e=window.getComputedStyle(l),t=parseFloat(e.fontSize),o=parseFloat(e.lineHeight)||t*1.2,i=parseFloat(e.paddingTop),a=parseFloat(e.borderTopWidth),u=parseFloat(e.marginTop),f=t*.8,p=(o-t)/2;return u+a+i+p+f},hv=l=>{l.setAttribute("data-blok-empty",R.isEmpty(l)?"true":"false")},pv={ui:{blockTunes:{toggler:{"Drag to move":"","Click to open the menu":""}},inlineToolbar:{converter:{"Convert to":""}},toolbar:{toolbox:{"Click to add below":"","Option-click to add above":"","Ctrl-click to add above":""}},popover:{Filter:"","Nothing found":"","Convert to":""}},toolNames:{Text:"",Link:"",Bold:"",Italic:""},tools:{link:{"Add a link":""},stub:{"The block can not be displayed correctly.":""}},blockTunes:{delete:{Delete:"","Click to delete":""},moveUp:{"Move up":""},moveDown:{"Move down":""}}},Qn=class Qn{static ui(e,t){return Qn._t(e,t)}static t(e,t){return Qn._t(e,t)}static setDictionary(e){Qn.currentDictionary=e}static _t(e,t){const o=Qn.getNamespace(e);return!o||!o[t]?t:o[t]}static getNamespace(e){return e.split(".").reduce((o,i)=>{if(!o||!Object.keys(o).length)return{};const a=o[i];return typeof a=="string"?{}:a},Qn.currentDictionary)}};Qn.currentDictionary=pv;let Ke=Qn;class Ho extends Error{}class jo{constructor(){this.subscribers={}}on(e,t){e in this.subscribers||(this.subscribers[e]=[]),this.subscribers[e].push(t)}once(e,t){e in this.subscribers||(this.subscribers[e]=[]);const o=i=>{const a=t(i),u=this.subscribers[e].indexOf(o);return u!==-1&&this.subscribers[e].splice(u,1),a};this.subscribers[e].push(o)}emit(e,t){ot(this.subscribers)||!this.subscribers[e]||this.subscribers[e].reduce((o,i)=>{const a=i(o);return a!==void 0?a:o},t)}off(e,t){const o=this.subscribers[e];if(o===void 0){console.warn(`EventDispatcher .off(): there is no subscribers for event "${e.toString()}". Probably, .off() called before .on()`);return}const i=o.indexOf(t);i!==-1&&o.splice(i,1)}destroy(){this.subscribers={}}}const Bn=function(e){return Object.setPrototypeOf(this,{get id(){return e.id},get name(){return e.name},get config(){return e.config},get holder(){return e.holder},get isEmpty(){return e.isEmpty},get selected(){return e.selected},set stretched(o){e.setStretchState(o)},get stretched(){return e.stretched},get focusable(){return e.focusable},call(o,i){return e.call(o,i)},save(){return e.save()},validate(o){return e.validate(o)},dispatchChange(){e.dispatchChange()},getActiveToolboxEntry(){return e.getActiveToolboxEntry()}}),Object.defineProperties(this,{id:{get(){return e.id},enumerable:!0,configurable:!0},name:{get(){return e.name},enumerable:!0,configurable:!0}}),this};class qo{constructor(){this.allListeners=[]}on(e,t,o,i=!1){if(this.findOne(e,t,o,i))return;const u=kS("l"),f={id:u,element:e,eventType:t,handler:o,options:i};return this.allListeners.push(f),e.addEventListener(t,o,i),u}off(e,t,o,i){const a=this.findAll(e,t,o,i);a.forEach((u,f)=>{const p=this.allListeners.indexOf(a[f]);p>-1&&(this.allListeners.splice(p,1),u.element.removeEventListener(u.eventType,u.handler,u.options))})}offById(e){const t=this.findById(e);if(!t)return;t.element.removeEventListener(t.eventType,t.handler,t.options);const o=this.allListeners.indexOf(t);o>-1&&this.allListeners.splice(o,1)}findOne(e,t,o,i){return this.findAll(e,t,o,i)[0]??null}findAll(e,t,o,i){return e?this.findByEventTarget(e).filter(u=>{const f=t===void 0||u.eventType===t,p=o===void 0||u.handler===o,g=this.areOptionsEqual(u.options,i);return f&&p&&g}):[]}removeAll(){this.allListeners.forEach(e=>{e.element.removeEventListener(e.eventType,e.handler,e.options)}),this.allListeners=[]}destroy(){this.removeAll()}findByEventTarget(e){return this.allListeners.filter(t=>t.element===e)}findByType(e){return this.allListeners.filter(t=>t.eventType===e)}findByHandler(e){return this.allListeners.filter(t=>t.handler===e)}findById(e){return this.allListeners.find(t=>t.id===e)}normalizeListenerOptions(e){return typeof e=="boolean"?{capture:e,once:!1,passive:!1}:e?{capture:e.capture??!1,once:e.once??!1,passive:e.passive??!1,signal:e.signal}:{capture:!1,once:!1,passive:!1}}areOptionsEqual(e,t){if(t===void 0)return!0;const o=this.normalizeListenerOptions(e),i=this.normalizeListenerOptions(t);return o.capture===i.capture&&o.once===i.once&&o.passive===i.passive&&o.signal===i.signal}}class Be{constructor({config:e,eventsDispatcher:t}){if(this.nodes={},this.listeners=new qo,this.readOnlyMutableListeners={on:(o,i,a,u=!1)=>{const f=this.listeners.on(o,i,a,u);f&&this.mutableListenerIds.push(f)},clearAll:()=>{for(const o of this.mutableListenerIds)this.listeners.offById(o);this.mutableListenerIds=[]}},this.mutableListenerIds=[],new.target===Be)throw new TypeError("Constructors for abstract class Module are not allowed.");this.config=e,this.eventsDispatcher=t,this.Blok={}}set state(e){this.Blok=e}removeAllNodes(){for(const e in this.nodes){const t=this.nodes[e];t instanceof HTMLElement&&t.remove()}}get isRtl(){return this.config.i18n?.direction==="rtl"}}const SS=(l,e)=>{const t=new Array(l.length+e.length);for(let o=0;o<l.length;o++)t[o]=l[o];for(let o=0;o<e.length;o++)t[l.length+o]=e[o];return t},xS=(l,e)=>({classGroupId:l,validator:e}),gv=(l=new Map,e=null,t)=>({nextPart:l,validators:e,classGroupId:t}),as="-",mv=[],CS="arbitrary..",ES=l=>{const e=AS(l),{conflictingClassGroups:t,conflictingClassGroupModifiers:o}=l;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return BS(u);const f=u.split(as),p=f[0]===""&&f.length>1?1:0;return vv(f,p,e)},getConflictingClassGroupIds:(u,f)=>{if(f){const p=o[u],g=t[u];return p?g?SS(g,p):p:g||mv}return t[u]||mv}}},vv=(l,e,t)=>{if(l.length-e===0)return t.classGroupId;const i=l[e],a=t.nextPart.get(i);if(a){const g=vv(l,e+1,a);if(g)return g}const u=t.validators;if(u===null)return;const f=e===0?l.join(as):l.slice(e).join(as),p=u.length;for(let g=0;g<p;g++){const v=u[g];if(v.validator(f))return v.classGroupId}},BS=l=>l.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=l.slice(1,-1),t=e.indexOf(":"),o=e.slice(0,t);return o?CS+o:void 0})(),AS=l=>{const{theme:e,classGroups:t}=l;return IS(t,e)},IS=(l,e)=>{const t=gv();for(const o in l){const i=l[o];Hu(i,t,o,e)}return t},Hu=(l,e,t,o)=>{const i=l.length;for(let a=0;a<i;a++){const u=l[a];_S(u,e,t,o)}},_S=(l,e,t,o)=>{if(typeof l=="string"){NS(l,e,t);return}if(typeof l=="function"){RS(l,e,t,o);return}OS(l,e,t,o)},NS=(l,e,t)=>{const o=l===""?e:yv(e,l);o.classGroupId=t},RS=(l,e,t,o)=>{if(PS(l)){Hu(l(o),e,t,o);return}e.validators===null&&(e.validators=[]),e.validators.push(xS(t,l))},OS=(l,e,t,o)=>{const i=Object.entries(l),a=i.length;for(let u=0;u<a;u++){const[f,p]=i[u];Hu(p,yv(e,f),t,o)}},yv=(l,e)=>{let t=l;const o=e.split(as),i=o.length;for(let a=0;a<i;a++){const u=o[a];let f=t.nextPart.get(u);f||(f=gv(),t.nextPart.set(u,f)),t=f}return t},PS=l=>"isThemeGetter"in l&&l.isThemeGetter===!0,LS=l=>{if(l<1)return{get:()=>{},set:()=>{}};let e=0,t=Object.create(null),o=Object.create(null);const i=(a,u)=>{t[a]=u,e++,e>l&&(e=0,o=t,t=Object.create(null))};return{get(a){let u=t[a];if(u!==void 0)return u;if((u=o[a])!==void 0)return i(a,u),u},set(a,u){a in t?t[a]=u:i(a,u)}}},ju="!",bv=":",DS=[],kv=(l,e,t,o,i)=>({modifiers:l,hasImportantModifier:e,baseClassName:t,maybePostfixModifierPosition:o,isExternal:i}),MS=l=>{const{prefix:e,experimentalParseClassName:t}=l;let o=i=>{const a=[];let u=0,f=0,p=0,g;const v=i.length;for(let E=0;E<v;E++){const _=i[E];if(u===0&&f===0){if(_===bv){a.push(i.slice(p,E)),p=E+1;continue}if(_==="/"){g=E;continue}}_==="["?u++:_==="]"?u--:_==="("?f++:_===")"&&f--}const y=a.length===0?i:i.slice(p);let w=y,S=!1;y.endsWith(ju)?(w=y.slice(0,-1),S=!0):y.startsWith(ju)&&(w=y.slice(1),S=!0);const k=g&&g>p?g-p:void 0;return kv(a,S,w,k)};if(e){const i=e+bv,a=o;o=u=>u.startsWith(i)?a(u.slice(i.length)):kv(DS,!1,u,void 0,!0)}if(t){const i=o;o=a=>t({className:a,parseClassName:i})}return o},FS=l=>{const e=new Map;return l.orderSensitiveModifiers.forEach((t,o)=>{e.set(t,1e6+o)}),t=>{const o=[];let i=[];for(let a=0;a<t.length;a++){const u=t[a],f=u[0]==="[",p=e.has(u);f||p?(i.length>0&&(i.sort(),o.push(...i),i=[]),o.push(u)):i.push(u)}return i.length>0&&(i.sort(),o.push(...i)),o}},zS=l=>({cache:LS(l.cacheSize),parseClassName:MS(l),sortModifiers:FS(l),...ES(l)}),HS=/\s+/,jS=(l,e)=>{const{parseClassName:t,getClassGroupId:o,getConflictingClassGroupIds:i,sortModifiers:a}=e,u=[],f=l.trim().split(HS);let p="";for(let g=f.length-1;g>=0;g-=1){const v=f[g],{isExternal:y,modifiers:w,hasImportantModifier:S,baseClassName:k,maybePostfixModifierPosition:E}=t(v);if(y){p=v+(p.length>0?" "+p:p);continue}let _=!!E,L=o(_?k.substring(0,E):k);if(!L){if(!_){p=v+(p.length>0?" "+p:p);continue}if(L=o(k),!L){p=v+(p.length>0?" "+p:p);continue}_=!1}const P=w.length===0?"":w.length===1?w[0]:a(w).join(":"),K=S?P+ju:P,j=K+L;if(u.indexOf(j)>-1)continue;u.push(j);const J=i(L,_);for(let W=0;W<J.length;++W){const V=J[W];u.push(K+V)}p=v+(p.length>0?" "+p:p)}return p},wv=(...l)=>{let e=0,t,o,i="";for(;e<l.length;)(t=l[e++])&&(o=Tv(t))&&(i&&(i+=" "),i+=o);return i},Tv=l=>{if(typeof l=="string")return l;let e,t="";for(let o=0;o<l.length;o++)l[o]&&(e=Tv(l[o]))&&(t&&(t+=" "),t+=e);return t},qS=(l,...e)=>{let t,o,i,a;const u=p=>{const g=e.reduce((v,y)=>y(v),l());return t=zS(g),o=t.cache.get,i=t.cache.set,a=f,f(p)},f=p=>{const g=o(p);if(g)return g;const v=jS(p,t);return i(p,v),v};return a=u,(...p)=>a(wv(...p))},US=[],ct=l=>{const e=t=>t[l]||US;return e.isThemeGetter=!0,e},Sv=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,xv=/^\((?:(\w[\w-]*):)?(.+)\)$/i,WS=/^\d+\/\d+$/,KS=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,VS=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,$S=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,GS=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,XS=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Yr=l=>WS.test(l),ye=l=>!!l&&!Number.isNaN(Number(l)),Vn=l=>!!l&&Number.isInteger(Number(l)),qu=l=>l.endsWith("%")&&ye(l.slice(0,-1)),An=l=>KS.test(l),YS=()=>!0,QS=l=>VS.test(l)&&!$S.test(l),Cv=()=>!1,ZS=l=>GS.test(l),JS=l=>XS.test(l),ex=l=>!Q(l)&&!Z(l),tx=l=>Qr(l,_v,Cv),Q=l=>Sv.test(l),kr=l=>Qr(l,Nv,QS),Uu=l=>Qr(l,sx,ye),Ev=l=>Qr(l,Av,Cv),nx=l=>Qr(l,Iv,JS),cs=l=>Qr(l,Rv,ZS),Z=l=>xv.test(l),Uo=l=>Zr(l,Nv),rx=l=>Zr(l,lx),Bv=l=>Zr(l,Av),ox=l=>Zr(l,_v),ix=l=>Zr(l,Iv),us=l=>Zr(l,Rv,!0),Qr=(l,e,t)=>{const o=Sv.exec(l);return o?o[1]?e(o[1]):t(o[2]):!1},Zr=(l,e,t=!1)=>{const o=xv.exec(l);return o?o[1]?e(o[1]):t:!1},Av=l=>l==="position"||l==="percentage",Iv=l=>l==="image"||l==="url",_v=l=>l==="length"||l==="size"||l==="bg-size",Nv=l=>l==="length",sx=l=>l==="number",lx=l=>l==="family-name",Rv=l=>l==="shadow",we=qS(()=>{const l=ct("color"),e=ct("font"),t=ct("text"),o=ct("font-weight"),i=ct("tracking"),a=ct("leading"),u=ct("breakpoint"),f=ct("container"),p=ct("spacing"),g=ct("radius"),v=ct("shadow"),y=ct("inset-shadow"),w=ct("text-shadow"),S=ct("drop-shadow"),k=ct("blur"),E=ct("perspective"),_=ct("aspect"),L=ct("ease"),P=ct("animate"),K=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],J=()=>[...j(),Z,Q],W=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto","contain","none"],z=()=>[Z,Q,p],ae=()=>[Yr,"full","auto",...z()],ge=()=>[Vn,"none","subgrid",Z,Q],re=()=>["auto",{span:["full",Vn,Z,Q]},Vn,Z,Q],be=()=>[Vn,"auto",Z,Q],te=()=>["auto","min","max","fr",Z,Q],ke=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Ne=()=>["start","end","center","stretch","center-safe","end-safe"],Se=()=>["auto",...z()],Ie=()=>[Yr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...z()],O=()=>[l,Z,Q],le=()=>[...j(),Bv,Ev,{position:[Z,Q]}],G=()=>["no-repeat",{repeat:["","x","y","space","round"]}],B=()=>["auto","cover","contain",ox,tx,{size:[Z,Q]}],D=()=>[qu,Uo,kr],se=()=>["","none","full",g,Z,Q],de=()=>["",ye,Uo,kr],xe=()=>["solid","dashed","dotted","double"],_e=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],me=()=>[ye,qu,Bv,Ev],Pe=()=>["","none",k,Z,Q],Fe=()=>["none",ye,Z,Q],ft=()=>["none",ye,Z,Q],Jn=()=>[ye,Z,Q],Pr=()=>[Yr,"full",...z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[An],breakpoint:[An],color:[YS],container:[An],"drop-shadow":[An],ease:["in","out","in-out"],font:[ex],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[An],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[An],shadow:[An],spacing:["px",ye],text:[An],"text-shadow":[An],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Yr,Q,Z,_]}],container:["container"],columns:[{columns:[ye,Q,Z,f]}],"break-after":[{"break-after":K()}],"break-before":[{"break-before":K()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:J()}],overflow:[{overflow:W()}],"overflow-x":[{"overflow-x":W()}],"overflow-y":[{"overflow-y":W()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ae()}],"inset-x":[{"inset-x":ae()}],"inset-y":[{"inset-y":ae()}],start:[{start:ae()}],end:[{end:ae()}],top:[{top:ae()}],right:[{right:ae()}],bottom:[{bottom:ae()}],left:[{left:ae()}],visibility:["visible","invisible","collapse"],z:[{z:[Vn,"auto",Z,Q]}],basis:[{basis:[Yr,"full","auto",f,...z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ye,Yr,"auto","initial","none",Q]}],grow:[{grow:["",ye,Z,Q]}],shrink:[{shrink:["",ye,Z,Q]}],order:[{order:[Vn,"first","last","none",Z,Q]}],"grid-cols":[{"grid-cols":ge()}],"col-start-end":[{col:re()}],"col-start":[{"col-start":be()}],"col-end":[{"col-end":be()}],"grid-rows":[{"grid-rows":ge()}],"row-start-end":[{row:re()}],"row-start":[{"row-start":be()}],"row-end":[{"row-end":be()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":te()}],"auto-rows":[{"auto-rows":te()}],gap:[{gap:z()}],"gap-x":[{"gap-x":z()}],"gap-y":[{"gap-y":z()}],"justify-content":[{justify:[...ke(),"normal"]}],"justify-items":[{"justify-items":[...Ne(),"normal"]}],"justify-self":[{"justify-self":["auto",...Ne()]}],"align-content":[{content:["normal",...ke()]}],"align-items":[{items:[...Ne(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Ne(),{baseline:["","last"]}]}],"place-content":[{"place-content":ke()}],"place-items":[{"place-items":[...Ne(),"baseline"]}],"place-self":[{"place-self":["auto",...Ne()]}],p:[{p:z()}],px:[{px:z()}],py:[{py:z()}],ps:[{ps:z()}],pe:[{pe:z()}],pt:[{pt:z()}],pr:[{pr:z()}],pb:[{pb:z()}],pl:[{pl:z()}],m:[{m:Se()}],mx:[{mx:Se()}],my:[{my:Se()}],ms:[{ms:Se()}],me:[{me:Se()}],mt:[{mt:Se()}],mr:[{mr:Se()}],mb:[{mb:Se()}],ml:[{ml:Se()}],"space-x":[{"space-x":z()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":z()}],"space-y-reverse":["space-y-reverse"],size:[{size:Ie()}],w:[{w:[f,"screen",...Ie()]}],"min-w":[{"min-w":[f,"screen","none",...Ie()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[u]},...Ie()]}],h:[{h:["screen","lh",...Ie()]}],"min-h":[{"min-h":["screen","lh","none",...Ie()]}],"max-h":[{"max-h":["screen","lh",...Ie()]}],"font-size":[{text:["base",t,Uo,kr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,Z,Uu]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",qu,Q]}],"font-family":[{font:[rx,Q,e]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Z,Q]}],"line-clamp":[{"line-clamp":[ye,"none",Z,Uu]}],leading:[{leading:[a,...z()]}],"list-image":[{"list-image":["none",Z,Q]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Z,Q]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...xe(),"wavy"]}],"text-decoration-thickness":[{decoration:[ye,"from-font","auto",Z,kr]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[ye,"auto",Z,Q]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Z,Q]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Z,Q]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:le()}],"bg-repeat":[{bg:G()}],"bg-size":[{bg:B()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Vn,Z,Q],radial:["",Z,Q],conic:[Vn,Z,Q]},ix,nx]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:D()}],"gradient-via-pos":[{via:D()}],"gradient-to-pos":[{to:D()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:se()}],"rounded-s":[{"rounded-s":se()}],"rounded-e":[{"rounded-e":se()}],"rounded-t":[{"rounded-t":se()}],"rounded-r":[{"rounded-r":se()}],"rounded-b":[{"rounded-b":se()}],"rounded-l":[{"rounded-l":se()}],"rounded-ss":[{"rounded-ss":se()}],"rounded-se":[{"rounded-se":se()}],"rounded-ee":[{"rounded-ee":se()}],"rounded-es":[{"rounded-es":se()}],"rounded-tl":[{"rounded-tl":se()}],"rounded-tr":[{"rounded-tr":se()}],"rounded-br":[{"rounded-br":se()}],"rounded-bl":[{"rounded-bl":se()}],"border-w":[{border:de()}],"border-w-x":[{"border-x":de()}],"border-w-y":[{"border-y":de()}],"border-w-s":[{"border-s":de()}],"border-w-e":[{"border-e":de()}],"border-w-t":[{"border-t":de()}],"border-w-r":[{"border-r":de()}],"border-w-b":[{"border-b":de()}],"border-w-l":[{"border-l":de()}],"divide-x":[{"divide-x":de()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":de()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...xe(),"hidden","none"]}],"divide-style":[{divide:[...xe(),"hidden","none"]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:[...xe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ye,Z,Q]}],"outline-w":[{outline:["",ye,Uo,kr]}],"outline-color":[{outline:O()}],shadow:[{shadow:["","none",v,us,cs]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":["none",y,us,cs]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:de()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[ye,kr]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":de()}],"inset-ring-color":[{"inset-ring":O()}],"text-shadow":[{"text-shadow":["none",w,us,cs]}],"text-shadow-color":[{"text-shadow":O()}],opacity:[{opacity:[ye,Z,Q]}],"mix-blend":[{"mix-blend":[..._e(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":_e()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ye]}],"mask-image-linear-from-pos":[{"mask-linear-from":me()}],"mask-image-linear-to-pos":[{"mask-linear-to":me()}],"mask-image-linear-from-color":[{"mask-linear-from":O()}],"mask-image-linear-to-color":[{"mask-linear-to":O()}],"mask-image-t-from-pos":[{"mask-t-from":me()}],"mask-image-t-to-pos":[{"mask-t-to":me()}],"mask-image-t-from-color":[{"mask-t-from":O()}],"mask-image-t-to-color":[{"mask-t-to":O()}],"mask-image-r-from-pos":[{"mask-r-from":me()}],"mask-image-r-to-pos":[{"mask-r-to":me()}],"mask-image-r-from-color":[{"mask-r-from":O()}],"mask-image-r-to-color":[{"mask-r-to":O()}],"mask-image-b-from-pos":[{"mask-b-from":me()}],"mask-image-b-to-pos":[{"mask-b-to":me()}],"mask-image-b-from-color":[{"mask-b-from":O()}],"mask-image-b-to-color":[{"mask-b-to":O()}],"mask-image-l-from-pos":[{"mask-l-from":me()}],"mask-image-l-to-pos":[{"mask-l-to":me()}],"mask-image-l-from-color":[{"mask-l-from":O()}],"mask-image-l-to-color":[{"mask-l-to":O()}],"mask-image-x-from-pos":[{"mask-x-from":me()}],"mask-image-x-to-pos":[{"mask-x-to":me()}],"mask-image-x-from-color":[{"mask-x-from":O()}],"mask-image-x-to-color":[{"mask-x-to":O()}],"mask-image-y-from-pos":[{"mask-y-from":me()}],"mask-image-y-to-pos":[{"mask-y-to":me()}],"mask-image-y-from-color":[{"mask-y-from":O()}],"mask-image-y-to-color":[{"mask-y-to":O()}],"mask-image-radial":[{"mask-radial":[Z,Q]}],"mask-image-radial-from-pos":[{"mask-radial-from":me()}],"mask-image-radial-to-pos":[{"mask-radial-to":me()}],"mask-image-radial-from-color":[{"mask-radial-from":O()}],"mask-image-radial-to-color":[{"mask-radial-to":O()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":j()}],"mask-image-conic-pos":[{"mask-conic":[ye]}],"mask-image-conic-from-pos":[{"mask-conic-from":me()}],"mask-image-conic-to-pos":[{"mask-conic-to":me()}],"mask-image-conic-from-color":[{"mask-conic-from":O()}],"mask-image-conic-to-color":[{"mask-conic-to":O()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:le()}],"mask-repeat":[{mask:G()}],"mask-size":[{mask:B()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Z,Q]}],filter:[{filter:["","none",Z,Q]}],blur:[{blur:Pe()}],brightness:[{brightness:[ye,Z,Q]}],contrast:[{contrast:[ye,Z,Q]}],"drop-shadow":[{"drop-shadow":["","none",S,us,cs]}],"drop-shadow-color":[{"drop-shadow":O()}],grayscale:[{grayscale:["",ye,Z,Q]}],"hue-rotate":[{"hue-rotate":[ye,Z,Q]}],invert:[{invert:["",ye,Z,Q]}],saturate:[{saturate:[ye,Z,Q]}],sepia:[{sepia:["",ye,Z,Q]}],"backdrop-filter":[{"backdrop-filter":["","none",Z,Q]}],"backdrop-blur":[{"backdrop-blur":Pe()}],"backdrop-brightness":[{"backdrop-brightness":[ye,Z,Q]}],"backdrop-contrast":[{"backdrop-contrast":[ye,Z,Q]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ye,Z,Q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ye,Z,Q]}],"backdrop-invert":[{"backdrop-invert":["",ye,Z,Q]}],"backdrop-opacity":[{"backdrop-opacity":[ye,Z,Q]}],"backdrop-saturate":[{"backdrop-saturate":[ye,Z,Q]}],"backdrop-sepia":[{"backdrop-sepia":["",ye,Z,Q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":z()}],"border-spacing-x":[{"border-spacing-x":z()}],"border-spacing-y":[{"border-spacing-y":z()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Z,Q]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ye,"initial",Z,Q]}],ease:[{ease:["linear","initial",L,Z,Q]}],delay:[{delay:[ye,Z,Q]}],animate:[{animate:["none",P,Z,Q]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,Z,Q]}],"perspective-origin":[{"perspective-origin":J()}],rotate:[{rotate:Fe()}],"rotate-x":[{"rotate-x":Fe()}],"rotate-y":[{"rotate-y":Fe()}],"rotate-z":[{"rotate-z":Fe()}],scale:[{scale:ft()}],"scale-x":[{"scale-x":ft()}],"scale-y":[{"scale-y":ft()}],"scale-z":[{"scale-z":ft()}],"scale-3d":["scale-3d"],skew:[{skew:Jn()}],"skew-x":[{"skew-x":Jn()}],"skew-y":[{"skew-y":Jn()}],transform:[{transform:[Z,Q,"","none","gpu","cpu"]}],"transform-origin":[{origin:J()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Pr()}],"translate-x":[{"translate-x":Pr()}],"translate-y":[{"translate-y":Pr()}],"translate-z":[{"translate-z":Pr()}],"translate-none":["translate-none"],accent:[{accent:O()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:O()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Z,Q]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Z,Q]}],fill:[{fill:["none",...O()]}],"stroke-w":[{stroke:[ye,Uo,kr,Uu]}],stroke:[{stroke:["none",...O()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}),vt=wv;class X{constructor(){this.instance=null,this.selection=null,this.savedSelectionRange=null,this.isFakeBackgroundEnabled=!1,this.fakeBackgroundElements=[]}static get CSS(){return{blokWrapper:"blok-editor",blokZone:"blok-editor__redactor"}}static get anchorNode(){const e=window.getSelection();return e?e.anchorNode:null}static get anchorElement(){const e=window.getSelection();if(!e)return null;const t=e.anchorNode;return t?R.isElement(t)?t:t.parentElement:null}static get anchorOffset(){const e=window.getSelection();return e?e.anchorOffset:null}static get isCollapsed(){const e=window.getSelection();return e?e.isCollapsed:null}static get isAtBlok(){return this.isSelectionAtBlok(X.get())}static isSelectionAtBlok(e){if(!e)return!1;const t=e.anchorNode||e.focusNode,o=t&&t.nodeType===Node.TEXT_NODE?t.parentNode:t,i=o&&o instanceof Element?o.closest(`.${X.CSS.blokZone}`):null;return i?i.nodeType===Node.ELEMENT_NODE:!1}static isRangeAtBlok(e){if(!e)return;const t=e.startContainer&&e.startContainer.nodeType===Node.TEXT_NODE?e.startContainer.parentNode:e.startContainer,o=t&&t instanceof Element?t.closest(`.${X.CSS.blokZone}`):null;return o?o.nodeType===Node.ELEMENT_NODE:!1}static get isSelectionExists(){return!!X.get()?.anchorNode}static get range(){return this.getRangeFromSelection(this.get())}static getRangeFromSelection(e){return e&&e.rangeCount?e.getRangeAt(0):null}static get rect(){const e=document.selection,t={x:0,y:0,width:0,height:0};if(e&&e.type!=="Control"){const f=e.createRange();return t.x=f.boundingLeft,t.y=f.boundingTop,t.width=f.boundingWidth,t.height=f.boundingHeight,t}const o=window.getSelection();if(!o)return Ee("Method window.getSelection returned null","warn"),t;if(o.rangeCount===null||isNaN(o.rangeCount))return Ee("Method SelectionUtils.rangeCount is not supported","warn"),t;if(o.rangeCount===0)return t;const i=o.getRangeAt(0).cloneRange(),a=i.getBoundingClientRect();if(a.x===0&&a.y===0){const u=document.createElement("span");u.appendChild(document.createTextNode("")),i.insertNode(u);const f=u.getBoundingClientRect(),p=u.parentNode;return p?.removeChild(u),p?.normalize(),f}return a}static get text(){return window.getSelection()?.toString()??""}static get(){return window.getSelection()}static setCursor(e,t=0){const o=document.createRange(),i=window.getSelection(),a=R.isNativeInput(e);if(a&&!R.canSetCaret(e))return e.getBoundingClientRect();if(a){const u=e;return u.focus(),u.selectionStart=t,u.selectionEnd=t,u.getBoundingClientRect()}return o.setStart(e,t),o.setEnd(e,t),i?(i.removeAllRanges(),i.addRange(o),o.getBoundingClientRect()):e.getBoundingClientRect()}static isRangeInsideContainer(e){const t=X.range;return t===null?!1:e.contains(t.startContainer)}static addFakeCursor(){const e=X.range;if(e===null)return;const t=R.make("span","blok-editor__fake-cursor");t.setAttribute("data-blok-mutation-free","true"),e.collapse(),e.insertNode(t)}static isFakeCursorInsideContainer(e){return R.find(e,".blok-editor__fake-cursor")!==null}static removeFakeCursor(e=document.body){const t=R.find(e,".blok-editor__fake-cursor");t&&t.remove()}removeFakeBackground(){if(!this.fakeBackgroundElements.length){this.isFakeBackgroundEnabled=!1;return}const e=this.fakeBackgroundElements[0],t=this.fakeBackgroundElements[this.fakeBackgroundElements.length-1],o=e.firstChild,i=t.lastChild;if(this.fakeBackgroundElements.forEach(a=>{this.unwrapFakeBackground(a)}),o&&i){const a=document.createRange();a.setStart(o,0),a.setEnd(i,i.textContent?.length||0),this.savedSelectionRange=a}this.fakeBackgroundElements=[],this.isFakeBackgroundEnabled=!1}setFakeBackground(){this.removeFakeBackground();const e=window.getSelection();if(!e||e.rangeCount===0)return;const t=e.getRangeAt(0);if(t.collapsed)return;const o=this.collectTextNodes(t);if(o.length===0)return;const i=t.startContainer,a=t.startOffset,u=t.endContainer,f=t.endOffset;if(this.fakeBackgroundElements=[],o.forEach(g=>{const v=document.createRange(),y=g===i,w=g===u,S=y?a:0,k=g.textContent?.length??0,E=w?f:k;if(S===E)return;v.setStart(g,S),v.setEnd(g,E);const _=this.wrapRangeWithFakeBackground(v);_&&this.fakeBackgroundElements.push(_)}),!this.fakeBackgroundElements.length)return;const p=document.createRange();p.setStartBefore(this.fakeBackgroundElements[0]),p.setEndAfter(this.fakeBackgroundElements[this.fakeBackgroundElements.length-1]),e.removeAllRanges(),e.addRange(p),this.isFakeBackgroundEnabled=!0}collectTextNodes(e){const t=[],{commonAncestorContainer:o}=e;if(o.nodeType===Node.TEXT_NODE)return t.push(o),t;const i=document.createTreeWalker(o,NodeFilter.SHOW_TEXT,{acceptNode:a=>e.intersectsNode(a)&&a.textContent&&a.textContent.length>0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT});for(;i.nextNode();)t.push(i.currentNode);return t}wrapRangeWithFakeBackground(e){if(e.collapsed)return null;const t=R.make("span","blok-editor__fake-background");t.setAttribute("data-blok-testid","fake-background"),t.setAttribute("data-blok-fake-background","true"),t.setAttribute("data-blok-mutation-free","true"),t.style.backgroundColor="#a8d6ff",t.style.color="inherit",t.style.display="inline",t.style.padding="0",t.style.margin="0";const o=e.extractContents();return o.childNodes.length===0?null:(t.appendChild(o),e.insertNode(t),t)}unwrapFakeBackground(e){const t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}}save(){this.savedSelectionRange=X.range}restore(){if(!this.savedSelectionRange)return;const e=window.getSelection();e&&(e.removeAllRanges(),e.addRange(this.savedSelectionRange))}clearSaved(){this.savedSelectionRange=null}collapseToEnd(){const e=window.getSelection();if(!e||!e.focusNode)return;const t=document.createRange();t.selectNodeContents(e.focusNode),t.collapse(!1),e.removeAllRanges(),e.addRange(t)}findParentTag(e,t,o=10){const i=window.getSelection();if(!i||!i.anchorNode||!i.focusNode)return null;const a=[i.anchorNode,i.focusNode],u=f=>{const p=(g,v)=>{if(v<=0||!g)return null;const y=g.nodeType===Node.ELEMENT_NODE&&g.tagName===e,w=!t||g.classList&&g.classList.contains(t);if(y&&w)return g;if(!g.parentNode)return null;const S=g.parentNode,k=!t||S.classList&&S.classList.contains(t);return S.tagName===e&&k?S:p(S,v-1)};return p(f,o)};for(const f of a){const p=u(f);if(p)return p}return null}expandToTag(e){const t=window.getSelection();if(!t)return;t.removeAllRanges();const o=document.createRange();o.selectNodeContents(e),t.addRange(o)}}const ax=(l,e)=>{const{type:t,target:o,addedNodes:i,removedNodes:a}=l;return l.type==="attributes"&&l.attributeName==="data-blok-empty"?!1:e.contains(o)?!0:t!=="childList"?!1:Array.from(i).some(p=>p===e)?!0:Array.from(a).some(p=>p===e)},Wu="redactor dom changed",Ov="block changed",Pv="fake cursor is about to be toggled",Lv="fake cursor have been set",Wo="blok mobile layout toggled",Ku="block-settings-opened",Vu="block-settings-closed",$u=(l,e)=>{if(!l.conversionConfig)return!1;const t=l.conversionConfig[e];return Oe(t)||on(t)},ds=(l,e)=>$u(l.tool,e),Dv=(l,e)=>Object.entries(l).some((([t,o])=>e[t]&&wS(e[t],o))),Mv=async(l,e)=>{const o=(await l.save()).data,i=e.find(a=>a.name===l.name);return i!==void 0&&!$u(i,"export")?[]:e.reduce((a,u)=>{if(!$u(u,"import")||u.toolbox===void 0)return a;const f=u.toolbox.filter(p=>{if(ot(p)||p.icon===void 0)return!1;const g=p.data!==void 0;return!(g&&Dv(p.data,o)||!g&&u.name===l.name)});return a.push({...u,toolbox:f}),a},[])},Fv=(l,e)=>l.mergeable?l.name===e.name?!0:ds(e,"export")&&ds(l,"import"):!1,cx=(l,e)=>{const t=e?.export;return Oe(t)?t(l):on(t)?l[t]:(t!==void 0&&Ee("Conversion «export» property must be a string or function. String means key of saved data object to export. Function should export processed string to export."),"")},zv=(l,e,t)=>{const o=e?.import;return Oe(o)?o(l,t):on(o)?{[o]:l}:(o!==void 0&&Ee("Conversion «import» property must be a string or function. String means key of tool data to import. Function accepts a imported string and return composed tool data."),{})};var tt=(l=>(l.Default="default",l.Separator="separator",l.Html="html",l))(tt||{}),In=(l=>(l.RENDERED="rendered",l.MOVED="moved",l.UPDATED="updated",l.REMOVED="removed",l.ON_PASTE="onPaste",l))(In||{});const Xe=class Xe extends jo{constructor({id:e=yS(),data:t,tool:o,readOnly:i,tunesData:a},u){super(),this.cachedInputs=[],this.lastSavedTunes={},this.toolRenderedElement=null,this.contentElement=null,this.tunesInstances=new Map,this.defaultTunesInstances=new Map,this.readyResolver=null,this.unavailableTunesData={},this.inputIndex=0,this.blokEventBus=null,this.redactorDomChangedCallback=()=>{},this.handleFocus=()=>{this.dropInputsCache(),this.updateCurrentInput()},this.didMutated=(p=void 0)=>{const g=p===void 0,v=p instanceof InputEvent;!g&&!v&&this.detectToolRootChange(p),(g||v?!0:!(p.length>0&&p.every(S=>{const{addedNodes:k,removedNodes:E,target:_}=S;return[...Array.from(k),...Array.from(E),_].every(P=>{const K=R.isElement(P)?P:P.parentElement??null;return K===null?!1:K.closest('[data-blok-mutation-free="true"]')!==null})})))&&(this.dropInputsCache(),this.updateCurrentInput(),this.toggleInputsEmptyMark(),this.call("updated"),this.emit("didMutated",this))},this.ready=new Promise(p=>{this.readyResolver=p}),this.name=o.name,this.id=e,this.settings=o.settings,this.config=this.settings,this.blokEventBus=u||null,this.blockAPI=new Bn(this),this.lastSavedData=t??{},this.lastSavedTunes=a??{},this.tool=o,this.toolInstance=o.create(t,this.blockAPI,i),this.tunes=o.tunes,this.composeTunes(a);const f=this.compose();if(f==null)throw new Error(`Tool "${this.name}" did not return a block holder element during render()`);this.holder=f,window.requestIdleCallback(()=>{this.watchBlockMutations(),this.addInputEvents(),this.toggleInputsEmptyMark()})}static get CSS(){return{wrapper:"blok-element",wrapperStretched:"is-stretched",content:"blok-element__content",selected:"is-selected"}}call(e,t){const o=this.toolInstance[e];if(Oe(o))try{o.call(this.toolInstance,t)}catch(i){const a=i instanceof Error?i.message:String(i);Ee(`Error during '${e}' call: ${a}`,"error")}}async mergeWith(e){if(!Oe(this.toolInstance.merge))throw new Error(`Block tool "${this.name}" does not support merging`);await this.toolInstance.merge(e)}async save(){const e=await this.extractToolData();if(e===void 0)return;const t={...this.unavailableTunesData};[...this.tunesInstances.entries(),...this.defaultTunesInstances.entries()].forEach(([a,u])=>{if(Oe(u.save))try{t[a]=u.save()}catch(f){Ee(`Tune ${u.constructor.name} save method throws an Error %o`,"warn",f)}});const o=window.performance.now();this.lastSavedData=e,this.lastSavedTunes={...t};const i=window.performance.now();return{id:this.id,tool:this.name,data:e,tunes:t,time:i-o}}async extractToolData(){try{const e=await this.toolInstance.save(this.pluginsContent);if(!this.isEmpty||e===void 0||e===null||typeof e!="object")return e;const t={...e},o=i=>{const a=t[i];if(typeof a!="string")return;const u=document.createElement("div");u.innerHTML=a,R.isEmpty(u)&&(t[i]="")};return o("text"),o("html"),t}catch(e){const t=e instanceof Error?e:new Error(String(e));Ee(`Saving process for ${this.name} tool failed due to the ${t}`,"log",t);return}}async validate(e){return this.toolInstance.validate instanceof Function?await this.toolInstance.validate(e):!0}getTunes(){const e=[],t=[],o=(u,f)=>{if(u){if(R.isElement(u)){f.push({type:tt.Html,element:u});return}if(Array.isArray(u)){f.push(...u);return}f.push(u)}},i=typeof this.toolInstance.renderSettings=="function"?this.toolInstance.renderSettings():[];return o(i,e),[...this.tunesInstances.values(),...this.defaultTunesInstances.values()].map(u=>u.render()).forEach(u=>{o(u,t)}),{toolTunes:e,commonTunes:t}}updateCurrentInput(){const e=X.anchorNode,t=document.activeElement,o=a=>{if(!a)return;const u=a instanceof HTMLElement?a:a.parentElement;if(u===null)return;const f=this.inputs.find(v=>v===u||v.contains(u));if(f!==void 0)return f;const p=u.closest(R.allInputsSelector);if(!(p instanceof HTMLElement))return;const g=this.inputs.find(v=>v===p);if(g!==void 0)return g};if(R.isNativeInput(t)){this.currentInput=t;return}const i=o(e)??(t instanceof HTMLElement?o(t):void 0);if(i!==void 0){this.currentInput=i;return}t instanceof HTMLElement&&this.inputs.includes(t)&&(this.currentInput=t)}dispatchChange(){this.didMutated()}destroy(){this.unwatchBlockMutations(),this.removeInputEvents(),super.destroy(),Oe(this.toolInstance.destroy)&&this.toolInstance.destroy()}async getActiveToolboxEntry(){const e=this.tool.toolbox;if(!e)return;if(e.length===1)return Promise.resolve(e[0]);const t=await this.data;return e.find(o=>Dv(o.data,t))}async exportDataAsString(){const e=await this.data;return cx(e,this.tool.conversionConfig)}get inputs(){if(this.cachedInputs.length!==0)return this.cachedInputs;const e=R.findAllInputs(this.holder);return this.inputIndex>e.length-1&&(this.inputIndex=e.length-1),this.cachedInputs=e,e}get currentInput(){return this.inputs[this.inputIndex]}set currentInput(e){if(e===void 0)return;const t=this.inputs.findIndex(o=>o===e||o.contains(e));t!==-1&&(this.inputIndex=t)}get firstInput(){return this.inputs[0]}get lastInput(){const e=this.inputs;return e[e.length-1]}get nextInput(){return this.inputs[this.inputIndex+1]}get previousInput(){return this.inputs[this.inputIndex-1]}get data(){return this.save().then(e=>e&&!ot(e.data)?e.data:{})}get preservedData(){return this.lastSavedData??{}}get preservedTunes(){return this.lastSavedTunes??{}}get sanitize(){return this.tool.sanitizeConfig}get mergeable(){return Oe(this.toolInstance.merge)}get focusable(){return this.inputs.length!==0}get isEmpty(){const e=R.isEmpty(this.pluginsContent,"/"),t=!this.hasMedia;return e&&t}get hasMedia(){const e=["img","iframe","video","audio","source","input","textarea","twitterwidget"];return!!this.holder.querySelector(e.join(","))}set selected(e){if(this.holder.classList.toggle(Xe.CSS.selected,e),this.contentElement){const i=this.stretched?Xe.styles.contentStretched:"";this.contentElement.className=e?we(Xe.CSS.content,Xe.styles.content,Xe.styles.contentSelected):we(Xe.CSS.content,Xe.styles.content,i)}e?this.holder.setAttribute("data-blok-selected","true"):this.holder.removeAttribute("data-blok-selected");const t=e===!0&&X.isRangeInsideContainer(this.holder),o=e===!1&&X.isFakeCursorInsideContainer(this.holder);!t&&!o||(this.blokEventBus?.emit(Pv,{state:e}),t&&X.addFakeCursor(),o&&X.removeFakeCursor(this.holder),this.blokEventBus?.emit(Lv,{state:e}))}get selected(){return this.holder.classList.contains(Xe.CSS.selected)}setStretchState(e){this.holder.classList.toggle(Xe.CSS.wrapperStretched,e),this.contentElement&&!this.selected&&(this.contentElement.className=e?we(Xe.CSS.content,Xe.styles.content,Xe.styles.contentStretched):we(Xe.CSS.content,Xe.styles.content))}set stretched(e){this.setStretchState(e)}get stretched(){return this.holder.classList.contains(Xe.CSS.wrapperStretched)}get pluginsContent(){if(this.toolRenderedElement===null)throw new Error("Block pluginsContent is not yet initialized");return this.toolRenderedElement}compose(){const e=R.make("div",we(Xe.CSS.wrapper,Xe.styles.wrapper)),t=R.make("div",we(Xe.CSS.content,Xe.styles.content));this.contentElement=t,t.setAttribute("data-blok-testid","block-content");const o=this.toolInstance.render();e.setAttribute("data-blok-testid","block-wrapper"),this.name&&!e.hasAttribute("data-blok-component")&&e.setAttribute("data-blok-component",this.name),e.setAttribute("data-blok-id",this.id),o instanceof Promise?o.then(a=>{this.toolRenderedElement=a,this.addToolDataAttributes(a,e),t.appendChild(a),this.readyResolver?.()}).catch(a=>{Ee("Tool render promise rejected: %o","error",a),this.readyResolver?.()}):(this.toolRenderedElement=o,this.addToolDataAttributes(o,e),t.appendChild(o),this.readyResolver?.());const i=[...this.tunesInstances.values(),...this.defaultTunesInstances.values()].reduce((a,u)=>{if(Oe(u.wrap))try{return u.wrap(a)}catch(f){return Ee(`Tune ${u.constructor.name} wrap method throws an Error %o`,"warn",f),a}return a},t);return e.appendChild(i),e}addToolDataAttributes(e,t){this.name&&!t.hasAttribute("data-blok-component")&&t.setAttribute("data-blok-component",this.name);const o="data-blok-placeholder",i=this.config?.placeholder,a=typeof i=="string"?i.trim():"",u=["empty:before:pointer-events-none","empty:before:text-gray-text","empty:before:cursor-text","empty:before:content-[attr(data-blok-placeholder)]","[&[data-blok-empty=true]]:before:pointer-events-none","[&[data-blok-empty=true]]:before:text-gray-text","[&[data-blok-empty=true]]:before:cursor-text","[&[data-blok-empty=true]]:before:content-[attr(data-blok-placeholder)]"];if(a.length>0){e.setAttribute(o,a),e.classList.add(...u);return}i===!1&&e.hasAttribute(o)&&e.removeAttribute(o)}composeTunes(e){Array.from(this.tunes.values()).forEach(t=>{(t.isInternal?this.defaultTunesInstances:this.tunesInstances).set(t.name,t.create(e[t.name],this.blockAPI))}),Object.entries(e).forEach(([t,o])=>{this.tunesInstances.has(t)||(this.unavailableTunesData[t]=o)})}addInputEvents(){this.inputs.forEach(e=>{e.addEventListener("focus",this.handleFocus),R.isNativeInput(e)&&e.addEventListener("input",this.didMutated)})}removeInputEvents(){this.inputs.forEach(e=>{e.removeEventListener("focus",this.handleFocus),R.isNativeInput(e)&&e.removeEventListener("input",this.didMutated)})}watchBlockMutations(){this.redactorDomChangedCallback=e=>{const{mutations:t}=e,o=this.toolRenderedElement;if(o===null)return;const i=t.filter(a=>ax(a,o));i.length>0&&this.didMutated(i)},this.blokEventBus?.on(Wu,this.redactorDomChangedCallback)}unwatchBlockMutations(){this.blokEventBus?.off(Wu,this.redactorDomChangedCallback)}refreshToolRootElement(){const e=this.holder.querySelector(`.${Xe.CSS.content}`);if(!e)return;const t=e.firstElementChild;t&&t!==this.toolRenderedElement&&(this.toolRenderedElement=t,this.dropInputsCache())}detectToolRootChange(e){const t=this.toolRenderedElement;t!==null&&e.forEach(o=>{if(Array.from(o.removedNodes).includes(t)){const a=o.addedNodes[o.addedNodes.length-1];this.toolRenderedElement=a}})}dropInputsCache(){this.cachedInputs=[]}toggleInputsEmptyMark(){this.inputs.forEach(hv)}};Xe.styles={wrapper:"relative opacity-100 animate-fade-in first:mt-0 [&_a]:cursor-pointer [&_a]:underline [&_a]:text-link [&_b]:font-bold [&_i]:italic",content:"relative mx-auto transition-colors duration-150 ease-out max-w-content",contentSelected:"bg-selection [&_[contenteditable]]:select-none [&_img]:opacity-55 [&_.blok-stub]:opacity-55",contentStretched:"max-w-none"};let vn=Xe;class ux extends Be{constructor(){super(...arguments),this.insert=(e,t={},o={},i,a,u,f)=>{const p=e??this.config.defaultBlock,g=this.Blok.BlockManager.insert({id:f,tool:p,data:t,index:i,needToFocus:a,replace:u});return new Bn(g)},this.composeBlockData=async e=>{const t=this.Blok.Tools.blockTools.get(e);if(t===void 0)throw new Error(`Block Tool with type "${e}" not found`);return new vn({tool:t,api:this.Blok.API,readOnly:!0,data:{},tunesData:{}}).data},this.update=async(e,t,o)=>{const{BlockManager:i}=this.Blok,a=i.getBlockById(e);if(a===void 0)throw new Error(`Block with id "${e}" not found`);const u=await i.update(a,t,o);return new Bn(u)},this.convert=async(e,t,o)=>{const{BlockManager:i,Tools:a}=this.Blok,u=i.getBlockById(e);if(!u)throw new Error(`Block with id "${e}" not found`);const f=a.blockTools.get(u.name),p=a.blockTools.get(t);if(!p)throw new Error(`Block Tool with type "${t}" not found`);const g=f?.conversionConfig?.export!==void 0,v=p.conversionConfig?.import!==void 0;if(g&&v){const y=await i.convert(u,t,o);return new Bn(y)}else{const y=[g?!1:ls(u.name),v?!1:ls(t)].filter(Boolean).join(" and ");throw new Error(`Conversion from "${u.name}" to "${t}" is not possible. ${y} tool(s) should provide a "conversionConfig"`)}},this.insertMany=(e,t=this.Blok.BlockManager.blocks.length-1)=>{this.validateIndex(t);const o=e.map(({id:i,type:a,data:u})=>this.Blok.BlockManager.composeBlock({id:i,tool:a||this.config.defaultBlock,data:u}));return this.Blok.BlockManager.insertMany(o,t),o.map(i=>new Bn(i))}}get methods(){return{clear:()=>this.clear(),render:e=>this.render(e),renderFromHTML:e=>this.renderFromHTML(e),delete:e=>this.delete(e),move:(e,t)=>this.move(e,t),getBlockByIndex:e=>this.getBlockByIndex(e),getById:e=>this.getById(e),getCurrentBlockIndex:()=>this.getCurrentBlockIndex(),getBlockIndex:e=>this.getBlockIndex(e),getBlocksCount:()=>this.getBlocksCount(),getBlockByElement:e=>this.getBlockByElement(e),insert:this.insert,insertMany:this.insertMany,update:this.update,composeBlockData:this.composeBlockData,convert:this.convert,stretchBlock:(e,t=!0)=>this.stretchBlock(e,t)}}getBlocksCount(){return this.Blok.BlockManager.blocks.length}getCurrentBlockIndex(){return this.Blok.BlockManager.currentBlockIndex}getBlockIndex(e){const t=this.Blok.BlockManager.getBlockById(e);if(!t){Vt("There is no block with id `"+e+"`","warn");return}return this.Blok.BlockManager.getBlockIndex(t)}getBlockByIndex(e){const t=this.Blok.BlockManager.getBlockByIndex(e);if(t===void 0){Vt("There is no block at index `"+e+"`","warn");return}return new Bn(t)}getById(e){const t=this.Blok.BlockManager.getBlockById(e);return t===void 0?(Vt("There is no block with id `"+e+"`","warn"),null):new Bn(t)}getBlockByElement(e){const t=this.Blok.BlockManager.getBlock(e);if(t===void 0){Vt("There is no block corresponding to element `"+e+"`","warn");return}return new Bn(t)}move(e,t){this.Blok.BlockManager.move(e,t)}delete(e=this.Blok.BlockManager.currentBlockIndex){const t=this.Blok.BlockManager.getBlockByIndex(e);if(t===void 0){Vt(`There is no block at index \`${e}\``,"warn");return}try{this.Blok.BlockManager.removeBlock(t)}catch(o){Vt(o,"warn");return}this.Blok.BlockManager.blocks.length===0&&this.Blok.BlockManager.insert(),this.Blok.BlockManager.currentBlock&&this.Blok.Caret.setToBlock(this.Blok.BlockManager.currentBlock,this.Blok.Caret.positions.END),this.Blok.Toolbar.close()}async clear(){await this.Blok.BlockManager.clear(!0),this.Blok.InlineToolbar.close()}async render(e){if(e===void 0||e.blocks===void 0)throw new Error("Incorrect data passed to the render() method");this.Blok.ModificationsObserver.disable(),await this.Blok.BlockManager.clear(),await this.Blok.Renderer.render(e.blocks),this.Blok.ModificationsObserver.enable()}async renderFromHTML(e){return await this.Blok.BlockManager.clear(),this.Blok.Paste.processText(e,!0)}stretchBlock(e,t=!0){const o=this.Blok.BlockManager.getBlockByIndex(e);o&&o.setStretchState(t)}validateIndex(e){if(typeof e!="number")throw new Error("Index should be a number");if(e<0)throw new Error("Index should be greater than or equal to 0");if(e===null)throw new Error("Index should be greater than or equal to 0")}}const dx=(l,e)=>typeof l=="number"?e.BlockManager.getBlockByIndex(l):typeof l=="string"?e.BlockManager.getBlockById(l):e.BlockManager.getBlockById(l.id);class fx extends Be{constructor(){super(...arguments),this.setToFirstBlock=(e=this.Blok.Caret.positions.DEFAULT,t=0)=>this.Blok.BlockManager.firstBlock?(this.Blok.Caret.setToBlock(this.Blok.BlockManager.firstBlock,e,t),!0):!1,this.setToLastBlock=(e=this.Blok.Caret.positions.DEFAULT,t=0)=>this.Blok.BlockManager.lastBlock?(this.Blok.Caret.setToBlock(this.Blok.BlockManager.lastBlock,e,t),!0):!1,this.setToPreviousBlock=(e=this.Blok.Caret.positions.DEFAULT,t=0)=>this.Blok.BlockManager.previousBlock?(this.Blok.Caret.setToBlock(this.Blok.BlockManager.previousBlock,e,t),!0):!1,this.setToNextBlock=(e=this.Blok.Caret.positions.DEFAULT,t=0)=>this.Blok.BlockManager.nextBlock?(this.Blok.Caret.setToBlock(this.Blok.BlockManager.nextBlock,e,t),!0):!1,this.setToBlock=(e,t=this.Blok.Caret.positions.DEFAULT,o=0)=>{const i=dx(e,this.Blok);return i===void 0?!1:(this.Blok.Caret.setToBlock(i,t,o),!0)},this.focus=(e=!1)=>e?this.setToLastBlock(this.Blok.Caret.positions.END):this.setToFirstBlock(this.Blok.Caret.positions.START)}get methods(){return{setToFirstBlock:this.setToFirstBlock,setToLastBlock:this.setToLastBlock,setToPreviousBlock:this.setToPreviousBlock,setToNextBlock:this.setToNextBlock,setToBlock:this.setToBlock,focus:this.focus}}}class hx extends Be{get methods(){return{emit:(e,t)=>this.emit(e,t),off:(e,t)=>this.off(e,t),on:(e,t)=>this.on(e,t)}}on(e,t){this.eventsDispatcher.on(e,t)}emit(e,t){this.eventsDispatcher.emit(e,t)}off(e,t){this.eventsDispatcher.off(e,t)}}class Gu extends Be{static getNamespace(e,t){return t?`blockTunes.${e}`:`tools.${e}`}get methods(){return{t:e=>(Vt("I18n.t() method can be accessed only from Tools","warn"),"")}}getMethodsForTool(e,t){return Object.assign(this.methods,{t:o=>Ke.t(Gu.getNamespace(e,t),o)})}}class px extends Be{get methods(){return{blocks:this.Blok.BlocksAPI.methods,caret:this.Blok.CaretAPI.methods,tools:this.Blok.ToolsAPI.methods,events:this.Blok.EventsAPI.methods,listeners:this.Blok.ListenersAPI.methods,notifier:this.Blok.NotifierAPI.methods,sanitizer:this.Blok.SanitizerAPI.methods,saver:this.Blok.SaverAPI.methods,selection:this.Blok.SelectionAPI.methods,styles:this.Blok.StylesAPI.classes,toolbar:this.Blok.ToolbarAPI.methods,inlineToolbar:this.Blok.InlineToolbarAPI.methods,tooltip:this.Blok.TooltipAPI.methods,i18n:this.Blok.I18nAPI.methods,readOnly:this.Blok.ReadOnlyAPI.methods,ui:this.Blok.UiAPI.methods}}getMethodsForTool(e,t){return Object.assign(this.methods,{i18n:this.Blok.I18nAPI.getMethodsForTool(e,t)})}}class gx extends Be{get methods(){return{close:()=>this.close(),open:()=>this.open()}}open(){this.Blok.InlineToolbar.tryToShow()}close(){this.Blok.InlineToolbar.close()}}class mx extends Be{get methods(){return{on:(e,t,o,i)=>this.on(e,t,o,i),off:(e,t,o,i)=>this.off(e,t,o,i),offById:e=>this.offById(e)}}on(e,t,o,i){return this.listeners.on(e,t,o,i)}off(e,t,o,i){this.listeners.off(e,t,o,i)}offById(e){this.listeners.offById(e)}}class vx{constructor(){this.notifierModule=null,this.loadingPromise=null}loadNotifierModule(){return this.notifierModule!==null?Promise.resolve(this.notifierModule):(this.loadingPromise===null&&(this.loadingPromise=Promise.resolve().then(()=>YC).then(e=>{const t=e?.default??e;if(!this.isNotifierModule(t))throw new Error('notifier module does not expose a "show" method.');return this.notifierModule=t,t}).catch(e=>{throw this.loadingPromise=null,e})),this.loadingPromise)}show(e){this.loadNotifierModule().then(t=>{t.show(e)}).catch(t=>{console.error("[Blok] Failed to display notification. Reason:",t)})}isNotifierModule(e){return typeof e=="object"&&e!==null&&"show"in e&&typeof e.show=="function"}}class yx extends Be{constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t}),this.notifier=new vx}get methods(){return{show:e=>this.show(e)}}show(e){return this.notifier.show(e)}}class bx extends Be{get methods(){const e=()=>this.isEnabled;return{toggle:t=>this.toggle(t),get isEnabled(){return e()}}}toggle(e){return this.Blok.ReadOnly.toggle(e)}get isEnabled(){return this.Blok.ReadOnly.isEnabled}}var fs={exports:{}},kx=fs.exports,Hv;function wx(){return Hv||(Hv=1,(function(l,e){(function(t,o){l.exports=o()})(kx,function(){function t(y){var w=y.tags,S=Object.keys(w),k=S.map(function(E){return typeof w[E]}).every(function(E){return E==="object"||E==="boolean"||E==="function"});if(!k)throw new Error("The configuration was invalid");this.config=y}var o=["P","LI","TD","TH","DIV","H1","H2","H3","H4","H5","H6","PRE"];function i(y){return o.indexOf(y.nodeName)!==-1}var a=["A","B","STRONG","I","EM","SUB","SUP","U","STRIKE"];function u(y){return a.indexOf(y.nodeName)!==-1}t.prototype.clean=function(y){const w=document.implementation.createHTMLDocument(),S=w.createElement("div");return S.innerHTML=y,this._sanitize(w,S),S.innerHTML},t.prototype._sanitize=function(y,w){var S=f(y,w),k=S.firstChild();if(k)do{if(k.nodeType===Node.TEXT_NODE)if(k.data.trim()===""&&(k.previousElementSibling&&i(k.previousElementSibling)||k.nextElementSibling&&i(k.nextElementSibling))){w.removeChild(k),this._sanitize(y,w);break}else continue;if(k.nodeType===Node.COMMENT_NODE){w.removeChild(k),this._sanitize(y,w);break}var E=u(k),_;E&&(_=Array.prototype.some.call(k.childNodes,i));var L=!!w.parentNode,P=i(w)&&i(k)&&L,K=k.nodeName.toLowerCase(),j=p(this.config,K,k),J=E&&_;if(J||g(k,j)||!this.config.keepNestedBlockElements&&P){if(!(k.nodeName==="SCRIPT"||k.nodeName==="STYLE"))for(;k.childNodes.length>0;)w.insertBefore(k.childNodes[0],k);w.removeChild(k),this._sanitize(y,w);break}for(var W=0;W<k.attributes.length;W+=1){var V=k.attributes[W];v(V,j,k)&&(k.removeAttribute(V.name),W=W-1)}this._sanitize(y,k)}while(k=S.nextSibling())};function f(y,w){return y.createTreeWalker(w,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_COMMENT,null,!1)}function p(y,w,S){return typeof y.tags[w]=="function"?y.tags[w](S):y.tags[w]}function g(y,w){return typeof w>"u"?!0:typeof w=="boolean"?!w:!1}function v(y,w,S){var k=y.name.toLowerCase();return w===!0?!1:typeof w[k]=="function"?!w[k](y.value,S):typeof w[k]>"u"||w[k]===!1?!0:typeof w[k]=="string"?w[k]!==y.value:!1}return t})})(fs)),fs.exports}var Tx=wx();const Sx=mt(Tx),xx=/^\s*(?:javascript\s*:|data\s*:\s*text\s*\/\s*html)/i,Cx=/\s*(?:href|src)\s*=\s*(?:"\s*(?:javascript\s*:|data\s*:\s*text\s*\/\s*html)[^"]*"|'\s*(?:javascript\s*:|data\s*:\s*text\s*\/\s*html)[^']*|(?:javascript\s*:|data\s*:\s*text\s*\/\s*html)[^ \t\r\n>]*)/gi,Xu=(l,e,t={})=>l.map(o=>{const a=(Oe(e)?e(o.tool):e)??{};return je(a)&&ot(a)&&ot(t)?o:{...o,data:Yu(o.data,a,t)}}),yn=(l,e={})=>{const t={tags:e};return new Sx(t).clean(l)},Yu=(l,e,t)=>Array.isArray(l)?Ex(l,e,t):je(l)?Bx(l,e,t):on(l)?Ax(l,e,t):l,Ex=(l,e,t)=>l.map(o=>Yu(o,e,t)),Bx=(l,e,t)=>{const o={},i=l;for(const a in l){if(!Object.prototype.hasOwnProperty.call(l,a))continue;const u=i[a],p=(je(e)?e:void 0)?.[a],g=p!==void 0&&Ix(p)?p:e;o[a]=Yu(u,g,t)}return o},Ax=(l,e,t)=>{const o=Lx(e,t);if(o){const i=yn(l,o);return Qu(qv(i,o))}if(!ot(t)){const i=yn(l,t);return Qu(qv(i,t))}return Qu(l)},Ix=l=>je(l)||sv(l)||Oe(l),_x=l=>l?xx.test(l):!1,Qu=l=>{if(!l||l.indexOf("<")===-1)return l;if(typeof document<"u"){const e=document.createElement("template");return e.innerHTML=l,e.content.querySelectorAll("[href],[src]").forEach(o=>{["href","src"].forEach(i=>{const a=o.getAttribute(i);_x(a)&&o.removeAttribute(i)})}),e.innerHTML}return l.replace(Cx,"")},Zu=l=>{if(ot(l))return{};const e={};for(const t in l)Object.prototype.hasOwnProperty.call(l,t)&&(e[t]=wr(l[t]));return e},jv=l=>function(t){const o=l.call(this,t);return o??{}},Nx=new Set(["class","id","title","role","dir","lang"]),Rx=l=>{const e=l.toLowerCase();return e.startsWith("data-")||e.startsWith("aria-")||Nx.has(e)},Ox=l=>{const e={};return Array.from(l.attributes).forEach(t=>{Rx(t.name)&&(e[t.name]=!0)}),e},wr=l=>l===!0?jv(Ox):l===!1?!1:Oe(l)?jv(l):on(l)?l:je(l)?zo({},l):l,Px=(l,e)=>{if(ot(l))return Zu(e);const t={};for(const o in l){if(!Object.prototype.hasOwnProperty.call(l,o))continue;const i=l[o],a=e?e[o]:void 0;if(Oe(a)){t[o]=wr(a);continue}if(Oe(i)){t[o]=wr(i);continue}if(je(i)&&je(a)){t[o]=zo({},a,i);continue}if(a!==void 0){t[o]=wr(a);continue}t[o]=wr(i)}return t},Lx=(l,e)=>je(l)&&!Oe(l)?Px(e,l):l===!1?{}:ot(e)?null:Zu(e),Ju=(l,...e)=>{if(ot(l))return Object.assign({},...e);const t=Zu(l);return e.forEach(o=>{if(o)for(const i in o){if(!Object.prototype.hasOwnProperty.call(o,i))continue;const a=o[i];if(!Object.prototype.hasOwnProperty.call(t,i))continue;const u=t[i];if(Oe(a)){t[i]=a;continue}if(!(a===!0&&Oe(u))){if(a===!0){const f=je(u)&&!Oe(u);t[i]=f?zo({},u):wr(a);continue}if(je(a)&&je(u)){t[i]=zo({},u,a);continue}t[i]=wr(a)}}}),t},qv=(l,e)=>{if(typeof document>"u"||!l||l.indexOf("<")===-1)return l;const t=Object.entries(e).filter(([,i])=>Oe(i));if(t.length===0)return l;const o=document.createElement("template");return o.innerHTML=l,t.forEach(([i,a])=>{o.content.querySelectorAll(i).forEach(f=>{const p=a(f);if(!(sv(p)||Oe(p)||p==null))for(const[g,v]of Object.entries(p)){if(v===!1){f.removeAttribute(g);continue}v!==!0&&on(v)&&f.setAttribute(g,v)}})}),o.innerHTML};class Dx extends Be{get methods(){return{clean:(e,t)=>this.clean(e,t)}}clean(e,t){return yn(e,t)}}class Mx extends Be{get methods(){return{save:()=>this.save()}}async save(){const e="Blok's content can not be saved in read-only mode";if(this.Blok.ReadOnly.isEnabled)throw Vt(e,"warn"),new Error(e);const t=await this.Blok.Saver.save();if(t!==void 0)return t;const o=this.Blok.Saver.getLastSaveError?.();if(o instanceof Error)throw o;const i=o!==void 0?String(o):"Blok's content can not be saved because collecting data failed";throw new Error(i)}}class Fx extends Be{constructor(){super(...arguments),this.selectionUtils=new X}get methods(){return{findParentTag:(e,t)=>this.findParentTag(e,t),expandToTag:e=>this.expandToTag(e),save:()=>this.selectionUtils.save(),restore:()=>this.selectionUtils.restore(),setFakeBackground:()=>this.selectionUtils.setFakeBackground(),removeFakeBackground:()=>this.selectionUtils.removeFakeBackground()}}findParentTag(e,t){return this.selectionUtils.findParentTag(e,t)}expandToTag(e){this.selectionUtils.expandToTag(e)}}class zx extends Be{get methods(){return{getBlockTools:()=>Array.from(this.Blok.Tools.blockTools.values())}}}class Hx extends Be{get classes(){return{block:"py-[theme(spacing.block-padding-vertical)] px-0 [&::-webkit-input-placeholder]:!leading-normal",inlineToolButton:"flex justify-center items-center border-0 rounded h-full p-0 w-7 bg-transparent cursor-pointer leading-normal text-black",inlineToolButtonActive:"bg-icon-active-bg text-icon-active-text",input:"w-full rounded-[3px] border border-line-gray px-3 py-2.5 outline-none shadow-input [&[data-blok-placeholder]]:before:!static [&[data-blok-placeholder]]:before:inline-block [&[data-blok-placeholder]]:before:w-0 [&[data-blok-placeholder]]:before:whitespace-nowrap [&[data-blok-placeholder]]:before:pointer-events-none",loader:"relative border border-line-gray before:absolute before:left-1/2 before:top-1/2 before:w-[18px] before:h-[18px] before:rounded-full before:content-[''] before:-ml-[11px] before:-mt-[11px] before:border-2 before:border-line-gray before:border-l-active-icon before:animate-rotation",button:"p-[13px] rounded-[3px] border border-line-gray text-[14.9px] bg-white text-center cursor-pointer text-gray-text shadow-button-base hover:bg-[#fbfcfe] hover:shadow-button-base-hover [&_svg]:h-5 [&_svg]:mr-[0.2em] [&_svg]:-mt-0.5",settingsButton:"inline-flex items-center justify-center rounded-[3px] cursor-pointer border-0 outline-none bg-transparent align-bottom text-inherit m-0 min-w-toolbox-btn min-h-toolbox-btn [&_svg]:w-auto [&_svg]:h-auto mobile:w-toolbox-btn-mobile mobile:h-toolbox-btn-mobile mobile:rounded-lg mobile:[&_svg]:w-icon-mobile mobile:[&_svg]:h-icon-mobile can-hover:hover:bg-bg-light",settingsButtonActive:"text-active-icon",settingsButtonFocused:"shadow-button-focused bg-item-focus-bg",settingsButtonFocusedAnimated:"animate-button-clicked"}}}class jx extends Be{get methods(){return{close:()=>this.close(),open:()=>this.open(),toggleBlockSettings:e=>this.toggleBlockSettings(e),toggleToolbox:e=>this.toggleToolbox(e)}}open(){this.Blok.Toolbar.moveAndOpen()}close(){this.Blok.Toolbar.close()}toggleBlockSettings(e){if(this.Blok.BlockManager.currentBlockIndex===-1){Vt("Could't toggle the Toolbar because there is no block selected ","warn");return}e??!this.Blok.BlockSettings.opened?(this.Blok.Toolbar.moveAndOpen(),this.Blok.BlockSettings.open()):this.Blok.BlockSettings.close()}toggleToolbox(e){if(this.Blok.BlockManager.currentBlockIndex===-1){Vt("Could't toggle the Toolbox because there is no block selected ","warn");return}e??!this.Blok.Toolbar.toolbox.opened?(this.Blok.Toolbar.moveAndOpen(),this.Blok.Toolbar.toolbox.open()):this.Blok.Toolbar.toolbox.close()}}const qx=180,Ux=400,Jr="data-blok-interface",Wx="blok",Kx="inline-toolbar",ed="tooltip",Uv="[data-blok-interface=blok]",Wv="[data-blok-interface=inline-toolbar]";typeof process<"u"&&process.platform?process.platform==="darwin"?"Meta":"Control":typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes("mac")?"Meta":"Control";const td=10,Vx="tooltip",$x="aria-hidden",Gx="false",Xx="true",Yx="visibility",Qx="visible",Zx="hidden",Zn=class Zn{constructor(){this.nodes={wrapper:null,content:null},this.showed=!1,this.offsetTop=td,this.offsetLeft=td,this.offsetRight=td,this.showingTimeout=null,this.hidingDelay=0,this.hidingTimeout=null,this.ariaObserver=null,this.handleWindowScroll=()=>{this.showed&&this.hide(!0)},this.prepare(),window.addEventListener("scroll",this.handleWindowScroll,{passive:!0})}get CSS(){return{tooltip:vt("absolute z-overlay top-0 left-0","bg-tooltip-bg opacity-0","select-none pointer-events-none","transition-[opacity,transform] duration-[50ms,70ms] ease-in","rounded-lg shadow-tooltip","will-change-[opacity,top,left]","before:content-[''] before:absolute before:inset-0 before:bg-tooltip-bg before:-z-10 before:rounded-lg","mobile:hidden").split(" "),tooltipContent:vt("px-2.5 py-1.5","text-tooltip-font text-xs text-center","tracking-[0.02em] leading-[1em]").split(" "),tooltipShown:["opacity-100","transform-none"],placement:{left:["-translate-x-[5px]"],bottom:["translate-y-[5px]"],right:["translate-x-[5px]"],top:["-translate-y-[5px]"]}}}static getInstance(){return Zn.instance||(Zn.instance=new Zn),Zn.instance}show(e,t,o={}){this.nodes.wrapper||this.prepare(),this.hidingTimeout&&(clearTimeout(this.hidingTimeout),this.hidingTimeout=null);const a=Object.assign({placement:"bottom",marginTop:0,marginLeft:0,marginRight:0,marginBottom:0,delay:70,hidingDelay:0},o);if(a.hidingDelay&&(this.hidingDelay=a.hidingDelay),!this.nodes.content||(this.nodes.content.innerHTML="",this.nodes.content.appendChild(this.createContentNode(t)),!this.nodes.wrapper))return;const u=Object.values(this.CSS.placement).flatMap(f=>Array.isArray(f)?f:[f]);switch(this.nodes.wrapper.classList.remove(...u),a.placement){case"top":this.placeTop(e,a);break;case"left":this.placeLeft(e,a);break;case"right":this.placeRight(e,a);break;case"bottom":default:this.placeBottom(e,a);break}if(a&&a.delay){this.showingTimeout=setTimeout(()=>{if(this.nodes.wrapper){const f=Array.isArray(this.CSS.tooltipShown)?this.CSS.tooltipShown:[this.CSS.tooltipShown];this.nodes.wrapper.classList.add(...f),this.updateTooltipVisibility()}this.showed=!0},a.delay);return}if(this.nodes.wrapper){const f=Array.isArray(this.CSS.tooltipShown)?this.CSS.tooltipShown:[this.CSS.tooltipShown];this.nodes.wrapper.classList.add(...f),this.updateTooltipVisibility()}this.showed=!0}createContentNode(e){if(typeof e=="string")return document.createTextNode(e);if(e instanceof Node)return e;throw Error("[Blok Tooltip] Wrong type of «content» passed. It should be an instance of Node or String. But "+typeof e+" given.")}hide(e=!1){const t=!!this.hidingDelay&&!e;if(t&&this.hidingTimeout&&clearTimeout(this.hidingTimeout),t){this.hidingTimeout=setTimeout(()=>{this.hide(!0)},this.hidingDelay);return}if(this.nodes.wrapper){const o=Array.isArray(this.CSS.tooltipShown)?this.CSS.tooltipShown:[this.CSS.tooltipShown];this.nodes.wrapper.classList.remove(...o),this.updateTooltipVisibility()}this.showed=!1,this.showingTimeout&&(clearTimeout(this.showingTimeout),this.showingTimeout=null)}onHover(e,t,o={}){e.addEventListener("mouseenter",()=>{this.show(e,t,o)}),e.addEventListener("mouseleave",()=>{this.hide()})}destroy(){this.ariaObserver?.disconnect(),this.ariaObserver=null,this.nodes.wrapper&&this.nodes.wrapper.remove(),window.removeEventListener("scroll",this.handleWindowScroll),Zn.instance=null}prepare(){this.nodes.wrapper=this.make("div",this.CSS.tooltip),this.nodes.wrapper.setAttribute(Jr,ed),this.nodes.wrapper.setAttribute("data-blok-testid","tooltip"),this.nodes.content=this.make("div",this.CSS.tooltipContent),this.nodes.content.setAttribute("data-blok-testid","tooltip-content"),this.nodes.wrapper&&this.nodes.content&&(this.append(this.nodes.wrapper,this.nodes.content),this.append(document.body,this.nodes.wrapper),this.ensureTooltipAttributes())}updateTooltipVisibility(){if(!this.nodes.wrapper)return;const e=Array.isArray(this.CSS.tooltipShown)?this.CSS.tooltipShown[0]:this.CSS.tooltipShown,t=this.nodes.wrapper.classList.contains(e);this.nodes.wrapper.style.setProperty(Yx,t?Qx:Zx),this.nodes.wrapper.setAttribute($x,t?Gx:Xx),this.nodes.wrapper.setAttribute("data-blok-shown",t?"true":"false")}watchTooltipVisibility(){this.nodes.wrapper&&(this.ariaObserver?.disconnect(),this.updateTooltipVisibility(),this.ariaObserver=new MutationObserver(()=>{this.updateTooltipVisibility()}),this.ariaObserver.observe(this.nodes.wrapper,{attributes:!0,attributeFilter:["class"]}))}ensureTooltipAttributes(){this.nodes.wrapper&&((!this.nodes.wrapper.hasAttribute(Jr)||this.nodes.wrapper.getAttribute(Jr)!==ed)&&this.nodes.wrapper.setAttribute(Jr,ed),this.nodes.wrapper.setAttribute("role",Vx),this.watchTooltipVisibility())}placeBottom(e,t){if(!this.nodes.wrapper)return;const o=e.getBoundingClientRect(),i=o.left+e.clientWidth/2-this.nodes.wrapper.offsetWidth/2,a=o.bottom+this.getScrollTop()+this.offsetTop+(t.marginTop??0);this.applyPlacement("bottom",i,a)}placeTop(e,t){if(!this.nodes.wrapper)return;const o=e.getBoundingClientRect(),i=o.left+e.clientWidth/2-this.nodes.wrapper.offsetWidth/2,a=o.top+this.getScrollTop()-this.nodes.wrapper.clientHeight-this.offsetTop;this.applyPlacement("top",i,a)}placeLeft(e,t){if(!this.nodes.wrapper)return;const o=e.getBoundingClientRect(),i=o.left-this.nodes.wrapper.offsetWidth-this.offsetLeft-(t.marginLeft??0),a=o.top+this.getScrollTop()+e.clientHeight/2-this.nodes.wrapper.offsetHeight/2;this.applyPlacement("left",i,a)}placeRight(e,t){if(!this.nodes.wrapper)return;const o=e.getBoundingClientRect(),i=o.right+this.offsetRight+(t.marginRight??0),a=o.top+this.getScrollTop()+e.clientHeight/2-this.nodes.wrapper.offsetHeight/2;this.applyPlacement("right",i,a)}applyPlacement(e,t,o){if(!this.nodes.wrapper)return;const i=Array.isArray(this.CSS.placement[e])?this.CSS.placement[e]:[this.CSS.placement[e]];this.nodes.wrapper.classList.add(...i),this.nodes.wrapper.setAttribute("data-blok-placement",e),this.nodes.wrapper.style.left=`${t}px`,this.nodes.wrapper.style.top=`${o}px`}getScrollTop(){return typeof window.scrollY=="number"?window.scrollY:document.documentElement?.scrollTop??document.body.scrollTop??0}make(e,t=null,o={}){const i=document.createElement(e);Array.isArray(t)&&i.classList.add(...t),typeof t=="string"&&i.classList.add(t);for(const a in o)Object.prototype.hasOwnProperty.call(o,a)&&(i[a]=o[a]);return i}append(e,t){Array.isArray(t)?t.forEach(o=>e.appendChild(o)):e.appendChild(t)}prepend(e,t){Array.isArray(t)?t.reverse().forEach(i=>e.prepend(i)):e.prepend(t)}};Zn.instance=null;let nd=Zn;const hs=()=>nd.getInstance(),Jx=(l,e,t)=>{hs().show(l,e,t??{})},Ko=(l=!1)=>{hs().hide(l)},ps=(l,e,t)=>{hs().onHover(l,e,t??{})},e1=()=>{hs().destroy()};class t1 extends Be{constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t})}get methods(){return{show:(e,t,o)=>this.show(e,t,o),hide:()=>this.hide(),onHover:(e,t,o)=>this.onHover(e,t,o)}}show(e,t,o){Jx(e,t,o)}hide(){Ko()}onHover(e,t,o){ps(e,t,o)}}class n1 extends Be{get methods(){return{nodes:this.blokNodes}}get blokNodes(){return{wrapper:this.Blok.UI.nodes.wrapper,redactor:this.Blok.UI.nodes.redactor}}}const Kv=(l,e)=>{const t={};return Object.entries(l).forEach(([o,i])=>{if(!je(i)){t[o]=i;return}const a=e?`${e}.${o}`:o;if(!Object.values(i).every(f=>on(f))){t[o]=Kv(i,a);return}t[o]=a}),t},it=Kv(pv),_r=class _r{constructor(e,t){this.cursor=-1,this.items=[],this.items=e??[],this.focusedCssClass=t}get currentItem(){return this.cursor===-1?null:this.items[this.cursor]}setCursor(e){e<this.items.length&&e>=-1&&(this.dropCursor(),this.cursor=e,this.items[this.cursor].classList.add(this.focusedCssClass),this.items[this.cursor].setAttribute("data-blok-focused","true"))}setItems(e){this.items=e}hasItems(){return this.items.length>0}next(){this.cursor=this.leafNodesAndReturnIndex(_r.directions.RIGHT)}previous(){this.cursor=this.leafNodesAndReturnIndex(_r.directions.LEFT)}dropCursor(){this.cursor!==-1&&(this.items[this.cursor].classList.remove(this.focusedCssClass),this.items[this.cursor].removeAttribute("data-blok-focused"),this.cursor=-1)}leafNodesAndReturnIndex(e){if(this.items.length===0)return this.cursor;const t=e===_r.directions.RIGHT?-1:0,o=this.cursor===-1?t:this.cursor;o!==-1&&(this.items[o].classList.remove(this.focusedCssClass),this.items[o].removeAttribute("data-blok-focused"));const i=e===_r.directions.RIGHT?(o+1)%this.items.length:(this.items.length+o-1)%this.items.length;return R.canSetCaret(this.items[i])&&ss(()=>X.setCursor(this.items[i]),50)(),this.items[i].classList.add(this.focusedCssClass),this.items[i].setAttribute("data-blok-focused","true"),i}};_r.directions={RIGHT:"right",LEFT:"left"};let Tr=_r;class $n{constructor(e){this.iterator=null,this.activated=!1,this.skipNextTabFocus=!1,this.flipCallbacks=[],this.onKeyDown=t=>{const o=t.target;if(this.shouldSkipTarget(o,t))return;const i=this.getKeyCode(t),a=i===ie.LEFT||i===ie.RIGHT||i===ie.UP||i===ie.DOWN;if(!(t.shiftKey&&a||!this.isEventReadyForHandling(t))&&!(i===ie.ENTER&&!this.iterator?.currentItem))switch(t.stopPropagation(),t.stopImmediatePropagation(),i!==null&&$n.usedKeys.includes(i)&&t.preventDefault(),i){case ie.TAB:this.handleTabPress(t);break;case ie.LEFT:case ie.UP:this.flipLeft();break;case ie.RIGHT:case ie.DOWN:this.flipRight();break;case ie.ENTER:this.handleEnterPress(t);break}},this.iterator=new Tr(e.items||[],e.focusedItemClass??""),this.activateCallback=e.activateCallback,this.allowedKeys=e.allowedKeys||$n.usedKeys,this.handleContentEditableTargets=e.handleContentEditableTargets??!1}get isActivated(){return this.activated}static get usedKeys(){return[ie.TAB,ie.LEFT,ie.RIGHT,ie.ENTER,ie.UP,ie.DOWN]}activate(e,t){this.activated=!0,e&&this.iterator?.setItems(e),t!==void 0&&this.iterator?.setCursor(t),document.addEventListener("keydown",this.onKeyDown,!0),window.addEventListener("keydown",this.onKeyDown,!0)}deactivate(){this.activated=!1,this.dropCursor(),this.skipNextTabFocus=!1,document.removeEventListener("keydown",this.onKeyDown,!0),window.removeEventListener("keydown",this.onKeyDown,!0)}focusFirst(){this.dropCursor(),this.flipRight()}focusItem(e){const t=this.iterator;if(t&&t.hasItems()){if(e<0){t.dropCursor();return}!t.currentItem&&e===0&&(this.skipNextTabFocus=!0),t.setCursor(e)}}flipLeft(){this.iterator?.previous(),this.flipCallback()}flipRight(){this.iterator?.next(),this.flipCallback()}hasFocus(){return!!this.iterator?.currentItem}onFlip(e){this.flipCallbacks.push(e)}removeOnFlip(e){this.flipCallbacks=this.flipCallbacks.filter(t=>t!==e)}dropCursor(){this.iterator?.dropCursor()}getKeyCode(e){return{Tab:ie.TAB,Enter:ie.ENTER,ArrowLeft:ie.LEFT,ArrowRight:ie.RIGHT,ArrowUp:ie.UP,ArrowDown:ie.DOWN}[e.key]??null}isEventReadyForHandling(e){const t=this.getKeyCode(e);return this.activated&&t!==null&&this.allowedKeys.includes(t)}setHandleContentEditableTargets(e){this.handleContentEditableTargets=e}handleTabPress(e){const o=e.shiftKey?Tr.directions.LEFT:Tr.directions.RIGHT;if(this.skipNextTabFocus){this.skipNextTabFocus=!1;return}switch(o){case Tr.directions.RIGHT:this.flipRight();break;case Tr.directions.LEFT:this.flipLeft();break}}handleExternalKeydown(e){this.onKeyDown(e)}handleEnterPress(e){this.activated&&(this.iterator?.currentItem&&(e.stopPropagation(),e.preventDefault(),this.iterator.currentItem.click()),Oe(this.activateCallback)&&this.iterator?.currentItem&&this.activateCallback(this.iterator.currentItem))}flipCallback(){this.iterator?.currentItem&&this.iterator.currentItem.scrollIntoViewIfNeeded?.(),this.flipCallbacks.forEach(e=>e())}shouldSkipTarget(e,t){if(!e)return!1;const o=e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement,i=e.getAttribute("data-blok-flipper-tab-target")==="true"&&t.key==="Tab",a=e.isContentEditable,u=e.closest('[data-blok-link-tool-input-opened="true"]')!==null,f=a&&!this.handleContentEditableTargets;return o&&!i||f||u}}var rd={exports:{}},Vo={},od={exports:{}},Te={};var Vv;function r1(){if(Vv)return Te;Vv=1;var l=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),y=Symbol.iterator;function w(B){return B===null||typeof B!="object"?null:(B=y&&B[y]||B["@@iterator"],typeof B=="function"?B:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,E={};function _(B,D,se){this.props=B,this.context=D,this.refs=E,this.updater=se||S}_.prototype.isReactComponent={},_.prototype.setState=function(B,D){if(typeof B!="object"&&typeof B!="function"&&B!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,B,D,"setState")},_.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function L(){}L.prototype=_.prototype;function P(B,D,se){this.props=B,this.context=D,this.refs=E,this.updater=se||S}var K=P.prototype=new L;K.constructor=P,k(K,_.prototype),K.isPureReactComponent=!0;var j=Array.isArray,J=Object.prototype.hasOwnProperty,W={current:null},V={key:!0,ref:!0,__self:!0,__source:!0};function z(B,D,se){var de,xe={},_e=null,me=null;if(D!=null)for(de in D.ref!==void 0&&(me=D.ref),D.key!==void 0&&(_e=""+D.key),D)J.call(D,de)&&!V.hasOwnProperty(de)&&(xe[de]=D[de]);var Pe=arguments.length-2;if(Pe===1)xe.children=se;else if(1<Pe){for(var Fe=Array(Pe),ft=0;ft<Pe;ft++)Fe[ft]=arguments[ft+2];xe.children=Fe}if(B&&B.defaultProps)for(de in Pe=B.defaultProps,Pe)xe[de]===void 0&&(xe[de]=Pe[de]);return{$$typeof:l,type:B,key:_e,ref:me,props:xe,_owner:W.current}}function ae(B,D){return{$$typeof:l,type:B.type,key:D,ref:B.ref,props:B.props,_owner:B._owner}}function ge(B){return typeof B=="object"&&B!==null&&B.$$typeof===l}function re(B){var D={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(se){return D[se]})}var be=/\/+/g;function te(B,D){return typeof B=="object"&&B!==null&&B.key!=null?re(""+B.key):D.toString(36)}function ke(B,D,se,de,xe){var _e=typeof B;(_e==="undefined"||_e==="boolean")&&(B=null);var me=!1;if(B===null)me=!0;else switch(_e){case"string":case"number":me=!0;break;case"object":switch(B.$$typeof){case l:case e:me=!0}}if(me)return me=B,xe=xe(me),B=de===""?"."+te(me,0):de,j(xe)?(se="",B!=null&&(se=B.replace(be,"$&/")+"/"),ke(xe,D,se,"",function(ft){return ft})):xe!=null&&(ge(xe)&&(xe=ae(xe,se+(!xe.key||me&&me.key===xe.key?"":(""+xe.key).replace(be,"$&/")+"/")+B)),D.push(xe)),1;if(me=0,de=de===""?".":de+":",j(B))for(var Pe=0;Pe<B.length;Pe++){_e=B[Pe];var Fe=de+te(_e,Pe);me+=ke(_e,D,se,Fe,xe)}else if(Fe=w(B),typeof Fe=="function")for(B=Fe.call(B),Pe=0;!(_e=B.next()).done;)_e=_e.value,Fe=de+te(_e,Pe++),me+=ke(_e,D,se,Fe,xe);else if(_e==="object")throw D=String(B),Error("Objects are not valid as a React child (found: "+(D==="[object Object]"?"object with keys {"+Object.keys(B).join(", ")+"}":D)+"). If you meant to render a collection of children, use an array instead.");return me}function Ne(B,D,se){if(B==null)return B;var de=[],xe=0;return ke(B,de,"","",function(_e){return D.call(se,_e,xe++)}),de}function Se(B){if(B._status===-1){var D=B._result;D=D(),D.then(function(se){(B._status===0||B._status===-1)&&(B._status=1,B._result=se)},function(se){(B._status===0||B._status===-1)&&(B._status=2,B._result=se)}),B._status===-1&&(B._status=0,B._result=D)}if(B._status===1)return B._result.default;throw B._result}var Ie={current:null},O={transition:null},le={ReactCurrentDispatcher:Ie,ReactCurrentBatchConfig:O,ReactCurrentOwner:W};function G(){throw Error("act(...) is not supported in production builds of React.")}return Te.Children={map:Ne,forEach:function(B,D,se){Ne(B,function(){D.apply(this,arguments)},se)},count:function(B){var D=0;return Ne(B,function(){D++}),D},toArray:function(B){return Ne(B,function(D){return D})||[]},only:function(B){if(!ge(B))throw Error("React.Children.only expected to receive a single React element child.");return B}},Te.Component=_,Te.Fragment=t,Te.Profiler=i,Te.PureComponent=P,Te.StrictMode=o,Te.Suspense=p,Te.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=le,Te.act=G,Te.cloneElement=function(B,D,se){if(B==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+B+".");var de=k({},B.props),xe=B.key,_e=B.ref,me=B._owner;if(D!=null){if(D.ref!==void 0&&(_e=D.ref,me=W.current),D.key!==void 0&&(xe=""+D.key),B.type&&B.type.defaultProps)var Pe=B.type.defaultProps;for(Fe in D)J.call(D,Fe)&&!V.hasOwnProperty(Fe)&&(de[Fe]=D[Fe]===void 0&&Pe!==void 0?Pe[Fe]:D[Fe])}var Fe=arguments.length-2;if(Fe===1)de.children=se;else if(1<Fe){Pe=Array(Fe);for(var ft=0;ft<Fe;ft++)Pe[ft]=arguments[ft+2];de.children=Pe}return{$$typeof:l,type:B.type,key:xe,ref:_e,props:de,_owner:me}},Te.createContext=function(B){return B={$$typeof:u,_currentValue:B,_currentValue2:B,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},B.Provider={$$typeof:a,_context:B},B.Consumer=B},Te.createElement=z,Te.createFactory=function(B){var D=z.bind(null,B);return D.type=B,D},Te.createRef=function(){return{current:null}},Te.forwardRef=function(B){return{$$typeof:f,render:B}},Te.isValidElement=ge,Te.lazy=function(B){return{$$typeof:v,_payload:{_status:-1,_result:B},_init:Se}},Te.memo=function(B,D){return{$$typeof:g,type:B,compare:D===void 0?null:D}},Te.startTransition=function(B){var D=O.transition;O.transition={};try{B()}finally{O.transition=D}},Te.unstable_act=G,Te.useCallback=function(B,D){return Ie.current.useCallback(B,D)},Te.useContext=function(B){return Ie.current.useContext(B)},Te.useDebugValue=function(){},Te.useDeferredValue=function(B){return Ie.current.useDeferredValue(B)},Te.useEffect=function(B,D){return Ie.current.useEffect(B,D)},Te.useId=function(){return Ie.current.useId()},Te.useImperativeHandle=function(B,D,se){return Ie.current.useImperativeHandle(B,D,se)},Te.useInsertionEffect=function(B,D){return Ie.current.useInsertionEffect(B,D)},Te.useLayoutEffect=function(B,D){return Ie.current.useLayoutEffect(B,D)},Te.useMemo=function(B,D){return Ie.current.useMemo(B,D)},Te.useReducer=function(B,D,se){return Ie.current.useReducer(B,D,se)},Te.useRef=function(B){return Ie.current.useRef(B)},Te.useState=function(B){return Ie.current.useState(B)},Te.useSyncExternalStore=function(B,D,se){return Ie.current.useSyncExternalStore(B,D,se)},Te.useTransition=function(){return Ie.current.useTransition()},Te.version="18.3.1",Te}var $v;function Gv(){return $v||($v=1,od.exports=r1()),od.exports}var Xv;function o1(){if(Xv)return Vo;Xv=1;var l=Gv(),e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,i=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function u(f,p,g){var v,y={},w=null,S=null;g!==void 0&&(w=""+g),p.key!==void 0&&(w=""+p.key),p.ref!==void 0&&(S=p.ref);for(v in p)o.call(p,v)&&!a.hasOwnProperty(v)&&(y[v]=p[v]);if(f&&f.defaultProps)for(v in p=f.defaultProps,p)y[v]===void 0&&(y[v]=p[v]);return{$$typeof:e,type:f,key:w,ref:S,props:y,_owner:i.current}}return Vo.Fragment=t,Vo.jsx=u,Vo.jsxs=u,Vo}var Yv;function i1(){return Yv||(Yv=1,rd.exports=o1()),rd.exports}var _n=i1(),gs={},id={exports:{}},Rt={},sd={exports:{}},ld={};var Qv;function s1(){return Qv||(Qv=1,(function(l){function e(O,le){var G=O.length;O.push(le);e:for(;0<G;){var B=G-1>>>1,D=O[B];if(0<i(D,le))O[B]=le,O[G]=D,G=B;else break e}}function t(O){return O.length===0?null:O[0]}function o(O){if(O.length===0)return null;var le=O[0],G=O.pop();if(G!==le){O[0]=G;e:for(var B=0,D=O.length,se=D>>>1;B<se;){var de=2*(B+1)-1,xe=O[de],_e=de+1,me=O[_e];if(0>i(xe,G))_e<D&&0>i(me,xe)?(O[B]=me,O[_e]=G,B=_e):(O[B]=xe,O[de]=G,B=de);else if(_e<D&&0>i(me,G))O[B]=me,O[_e]=G,B=_e;else break e}}return le}function i(O,le){var G=O.sortIndex-le.sortIndex;return G!==0?G:O.id-le.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;l.unstable_now=function(){return a.now()}}else{var u=Date,f=u.now();l.unstable_now=function(){return u.now()-f}}var p=[],g=[],v=1,y=null,w=3,S=!1,k=!1,E=!1,_=typeof setTimeout=="function"?setTimeout:null,L=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function K(O){for(var le=t(g);le!==null;){if(le.callback===null)o(g);else if(le.startTime<=O)o(g),le.sortIndex=le.expirationTime,e(p,le);else break;le=t(g)}}function j(O){if(E=!1,K(O),!k)if(t(p)!==null)k=!0,Se(J);else{var le=t(g);le!==null&&Ie(j,le.startTime-O)}}function J(O,le){k=!1,E&&(E=!1,L(z),z=-1),S=!0;var G=w;try{for(K(le),y=t(p);y!==null&&(!(y.expirationTime>le)||O&&!re());){var B=y.callback;if(typeof B=="function"){y.callback=null,w=y.priorityLevel;var D=B(y.expirationTime<=le);le=l.unstable_now(),typeof D=="function"?y.callback=D:y===t(p)&&o(p),K(le)}else o(p);y=t(p)}if(y!==null)var se=!0;else{var de=t(g);de!==null&&Ie(j,de.startTime-le),se=!1}return se}finally{y=null,w=G,S=!1}}var W=!1,V=null,z=-1,ae=5,ge=-1;function re(){return!(l.unstable_now()-ge<ae)}function be(){if(V!==null){var O=l.unstable_now();ge=O;var le=!0;try{le=V(!0,O)}finally{le?te():(W=!1,V=null)}}else W=!1}var te;if(typeof P=="function")te=function(){P(be)};else if(typeof MessageChannel<"u"){var ke=new MessageChannel,Ne=ke.port2;ke.port1.onmessage=be,te=function(){Ne.postMessage(null)}}else te=function(){_(be,0)};function Se(O){V=O,W||(W=!0,te())}function Ie(O,le){z=_(function(){O(l.unstable_now())},le)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(O){O.callback=null},l.unstable_continueExecution=function(){k||S||(k=!0,Se(J))},l.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ae=0<O?Math.floor(1e3/O):5},l.unstable_getCurrentPriorityLevel=function(){return w},l.unstable_getFirstCallbackNode=function(){return t(p)},l.unstable_next=function(O){switch(w){case 1:case 2:case 3:var le=3;break;default:le=w}var G=w;w=le;try{return O()}finally{w=G}},l.unstable_pauseExecution=function(){},l.unstable_requestPaint=function(){},l.unstable_runWithPriority=function(O,le){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var G=w;w=O;try{return le()}finally{w=G}},l.unstable_scheduleCallback=function(O,le,G){var B=l.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?B+G:B):G=B,O){case 1:var D=-1;break;case 2:D=250;break;case 5:D=1073741823;break;case 4:D=1e4;break;default:D=5e3}return D=G+D,O={id:v++,callback:le,priorityLevel:O,startTime:G,expirationTime:D,sortIndex:-1},G>B?(O.sortIndex=G,e(g,O),t(p)===null&&O===t(g)&&(E?(L(z),z=-1):E=!0,Ie(j,G-B))):(O.sortIndex=D,e(p,O),k||S||(k=!0,Se(J))),O},l.unstable_shouldYield=re,l.unstable_wrapCallback=function(O){var le=w;return function(){var G=w;w=le;try{return O.apply(this,arguments)}finally{w=G}}}})(ld)),ld}var Zv;function l1(){return Zv||(Zv=1,sd.exports=s1()),sd.exports}var Jv;function a1(){if(Jv)return Rt;Jv=1;var l=Gv(),e=l1();function t(n){for(var r="https://reactjs.org/docs/error-decoder.html?invariant="+n,s=1;s<arguments.length;s++)r+="&args[]="+encodeURIComponent(arguments[s]);return"Minified React error #"+n+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=new Set,i={};function a(n,r){u(n,r),u(n+"Capture",r)}function u(n,r){for(i[n]=r,n=0;n<r.length;n++)o.add(r[n])}var f=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,g=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,v={},y={};function w(n){return p.call(y,n)?!0:p.call(v,n)?!1:g.test(n)?y[n]=!0:(v[n]=!0,!1)}function S(n,r,s,c){if(s!==null&&s.type===0)return!1;switch(typeof r){case"function":case"symbol":return!0;case"boolean":return c?!1:s!==null?!s.acceptsBooleans:(n=n.toLowerCase().slice(0,5),n!=="data-"&&n!=="aria-");default:return!1}}function k(n,r,s,c){if(r===null||typeof r>"u"||S(n,r,s,c))return!0;if(c)return!1;if(s!==null)switch(s.type){case 3:return!r;case 4:return r===!1;case 5:return isNaN(r);case 6:return isNaN(r)||1>r}return!1}function E(n,r,s,c,d,h,m){this.acceptsBooleans=r===2||r===3||r===4,this.attributeName=c,this.attributeNamespace=d,this.mustUseProperty=s,this.propertyName=n,this.type=r,this.sanitizeURL=h,this.removeEmptyString=m}var _={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){_[n]=new E(n,0,!1,n,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var r=n[0];_[r]=new E(r,1,!1,n[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(n){_[n]=new E(n,2,!1,n.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){_[n]=new E(n,2,!1,n,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(n){_[n]=new E(n,3,!1,n.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(n){_[n]=new E(n,3,!0,n,null,!1,!1)}),["capture","download"].forEach(function(n){_[n]=new E(n,4,!1,n,null,!1,!1)}),["cols","rows","size","span"].forEach(function(n){_[n]=new E(n,6,!1,n,null,!1,!1)}),["rowSpan","start"].forEach(function(n){_[n]=new E(n,5,!1,n.toLowerCase(),null,!1,!1)});var L=/[\-:]([a-z])/g;function P(n){return n[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(n){var r=n.replace(L,P);_[r]=new E(r,1,!1,n,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(n){var r=n.replace(L,P);_[r]=new E(r,1,!1,n,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(n){var r=n.replace(L,P);_[r]=new E(r,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(n){_[n]=new E(n,1,!1,n.toLowerCase(),null,!1,!1)}),_.xlinkHref=new E("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(n){_[n]=new E(n,1,!1,n.toLowerCase(),null,!0,!0)});function K(n,r,s,c){var d=_.hasOwnProperty(r)?_[r]:null;(d!==null?d.type!==0:c||!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(k(r,s,d,c)&&(s=null),c||d===null?w(r)&&(s===null?n.removeAttribute(r):n.setAttribute(r,""+s)):d.mustUseProperty?n[d.propertyName]=s===null?d.type===3?!1:"":s:(r=d.attributeName,c=d.attributeNamespace,s===null?n.removeAttribute(r):(d=d.type,s=d===3||d===4&&s===!0?"":""+s,c?n.setAttributeNS(c,r,s):n.setAttribute(r,s))))}var j=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,J=Symbol.for("react.element"),W=Symbol.for("react.portal"),V=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),ae=Symbol.for("react.profiler"),ge=Symbol.for("react.provider"),re=Symbol.for("react.context"),be=Symbol.for("react.forward_ref"),te=Symbol.for("react.suspense"),ke=Symbol.for("react.suspense_list"),Ne=Symbol.for("react.memo"),Se=Symbol.for("react.lazy"),Ie=Symbol.for("react.offscreen"),O=Symbol.iterator;function le(n){return n===null||typeof n!="object"?null:(n=O&&n[O]||n["@@iterator"],typeof n=="function"?n:null)}var G=Object.assign,B;function D(n){if(B===void 0)try{throw Error()}catch(s){var r=s.stack.trim().match(/\n( *(at )?)/);B=r&&r[1]||""}return`
|
|
11
|
-
`+
|
|
12
|
-
`),
|
|
13
|
-
`),m=
|
|
14
|
-
`+d[m].replace(" at new "," at ");return n.displayName&&T.includes("<anonymous>")&&(T=T.replace("<anonymous>",n.displayName)),T}while(1<=m&&0<=b);break}}}finally{se=!1,Error.prepareStackTrace=s}return(n=n?n.displayName||n.name:"")?D(n):""}function xe(n){switch(n.tag){case 5:return D(n.type);case 16:return D("Lazy");case 13:return D("Suspense");case 19:return D("SuspenseList");case 0:case 2:case 15:return n=de(n.type,!1),n;case 11:return n=de(n.type.render,!1),n;case 1:return n=de(n.type,!0),n;default:return""}}function _e(n){if(n==null)return null;if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case V:return"Fragment";case W:return"Portal";case ae:return"Profiler";case z:return"StrictMode";case te:return"Suspense";case ke:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case re:return(n.displayName||"Context")+".Consumer";case ge:return(n._context.displayName||"Context")+".Provider";case be:var r=n.render;return n=n.displayName,n||(n=r.displayName||r.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case Ne:return r=n.displayName||null,r!==null?r:_e(n.type)||"Memo";case Se:r=n._payload,n=n._init;try{return _e(n(r))}catch{}}return null}function me(n){var r=n.type;switch(n.tag){case 24:return"Cache";case 9:return(r.displayName||"Context")+".Consumer";case 10:return(r._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return n=r.render,n=n.displayName||n.name||"",r.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 5:return r;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return _e(r);case 8:return r===z?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r}return null}function Pe(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Fe(n){var r=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function ft(n){var r=Fe(n)?"checked":"value",s=Object.getOwnPropertyDescriptor(n.constructor.prototype,r),c=""+n[r];if(!n.hasOwnProperty(r)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var d=s.get,h=s.set;return Object.defineProperty(n,r,{configurable:!0,get:function(){return d.call(this)},set:function(m){c=""+m,h.call(this,m)}}),Object.defineProperty(n,r,{enumerable:s.enumerable}),{getValue:function(){return c},setValue:function(m){c=""+m},stopTracking:function(){n._valueTracker=null,delete n[r]}}}}function Jn(n){n._valueTracker||(n._valueTracker=ft(n))}function Pr(n){if(!n)return!1;var r=n._valueTracker;if(!r)return!0;var s=r.getValue(),c="";return n&&(c=Fe(n)?n.checked?"true":"false":n.value),n=c,n!==s?(r.setValue(n),!0):!1}function qs(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}function ef(n,r){var s=r.checked;return G({},r,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:s??n._wrapperState.initialChecked})}function Gy(n,r){var s=r.defaultValue==null?"":r.defaultValue,c=r.checked!=null?r.checked:r.defaultChecked;s=Pe(r.value!=null?r.value:s),n._wrapperState={initialChecked:c,initialValue:s,controlled:r.type==="checkbox"||r.type==="radio"?r.checked!=null:r.value!=null}}function Xy(n,r){r=r.checked,r!=null&&K(n,"checked",r,!1)}function tf(n,r){Xy(n,r);var s=Pe(r.value),c=r.type;if(s!=null)c==="number"?(s===0&&n.value===""||n.value!=s)&&(n.value=""+s):n.value!==""+s&&(n.value=""+s);else if(c==="submit"||c==="reset"){n.removeAttribute("value");return}r.hasOwnProperty("value")?nf(n,r.type,s):r.hasOwnProperty("defaultValue")&&nf(n,r.type,Pe(r.defaultValue)),r.checked==null&&r.defaultChecked!=null&&(n.defaultChecked=!!r.defaultChecked)}function Yy(n,r,s){if(r.hasOwnProperty("value")||r.hasOwnProperty("defaultValue")){var c=r.type;if(!(c!=="submit"&&c!=="reset"||r.value!==void 0&&r.value!==null))return;r=""+n._wrapperState.initialValue,s||r===n.value||(n.value=r),n.defaultValue=r}s=n.name,s!==""&&(n.name=""),n.defaultChecked=!!n._wrapperState.initialChecked,s!==""&&(n.name=s)}function nf(n,r,s){(r!=="number"||qs(n.ownerDocument)!==n)&&(s==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+s&&(n.defaultValue=""+s))}var ci=Array.isArray;function ao(n,r,s,c){if(n=n.options,r){r={};for(var d=0;d<s.length;d++)r["$"+s[d]]=!0;for(s=0;s<n.length;s++)d=r.hasOwnProperty("$"+n[s].value),n[s].selected!==d&&(n[s].selected=d),d&&c&&(n[s].defaultSelected=!0)}else{for(s=""+Pe(s),r=null,d=0;d<n.length;d++){if(n[d].value===s){n[d].selected=!0,c&&(n[d].defaultSelected=!0);return}r!==null||n[d].disabled||(r=n[d])}r!==null&&(r.selected=!0)}}function rf(n,r){if(r.dangerouslySetInnerHTML!=null)throw Error(t(91));return G({},r,{value:void 0,defaultValue:void 0,children:""+n._wrapperState.initialValue})}function Qy(n,r){var s=r.value;if(s==null){if(s=r.children,r=r.defaultValue,s!=null){if(r!=null)throw Error(t(92));if(ci(s)){if(1<s.length)throw Error(t(93));s=s[0]}r=s}r==null&&(r=""),s=r}n._wrapperState={initialValue:Pe(s)}}function Zy(n,r){var s=Pe(r.value),c=Pe(r.defaultValue);s!=null&&(s=""+s,s!==n.value&&(n.value=s),r.defaultValue==null&&n.defaultValue!==s&&(n.defaultValue=s)),c!=null&&(n.defaultValue=""+c)}function Jy(n){var r=n.textContent;r===n._wrapperState.initialValue&&r!==""&&r!==null&&(n.value=r)}function eb(n){switch(n){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function of(n,r){return n==null||n==="http://www.w3.org/1999/xhtml"?eb(r):n==="http://www.w3.org/2000/svg"&&r==="foreignObject"?"http://www.w3.org/1999/xhtml":n}var Us,tb=(function(n){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(r,s,c,d){MSApp.execUnsafeLocalFunction(function(){return n(r,s,c,d)})}:n})(function(n,r){if(n.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in n)n.innerHTML=r;else{for(Us=Us||document.createElement("div"),Us.innerHTML="<svg>"+r.valueOf().toString()+"</svg>",r=Us.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;r.firstChild;)n.appendChild(r.firstChild)}});function ui(n,r){if(r){var s=n.firstChild;if(s&&s===n.lastChild&&s.nodeType===3){s.nodeValue=r;return}}n.textContent=r}var di={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},QC=["Webkit","ms","Moz","O"];Object.keys(di).forEach(function(n){QC.forEach(function(r){r=r+n.charAt(0).toUpperCase()+n.substring(1),di[r]=di[n]})});function nb(n,r,s){return r==null||typeof r=="boolean"||r===""?"":s||typeof r!="number"||r===0||di.hasOwnProperty(n)&&di[n]?(""+r).trim():r+"px"}function rb(n,r){n=n.style;for(var s in r)if(r.hasOwnProperty(s)){var c=s.indexOf("--")===0,d=nb(s,r[s],c);s==="float"&&(s="cssFloat"),c?n.setProperty(s,d):n[s]=d}}var ZC=G({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function sf(n,r){if(r){if(ZC[n]&&(r.children!=null||r.dangerouslySetInnerHTML!=null))throw Error(t(137,n));if(r.dangerouslySetInnerHTML!=null){if(r.children!=null)throw Error(t(60));if(typeof r.dangerouslySetInnerHTML!="object"||!("__html"in r.dangerouslySetInnerHTML))throw Error(t(61))}if(r.style!=null&&typeof r.style!="object")throw Error(t(62))}}function lf(n,r){if(n.indexOf("-")===-1)return typeof r.is=="string";switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var af=null;function cf(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var uf=null,co=null,uo=null;function ob(n){if(n=Oi(n)){if(typeof uf!="function")throw Error(t(280));var r=n.stateNode;r&&(r=fl(r),uf(n.stateNode,n.type,r))}}function ib(n){co?uo?uo.push(n):uo=[n]:co=n}function sb(){if(co){var n=co,r=uo;if(uo=co=null,ob(n),r)for(n=0;n<r.length;n++)ob(r[n])}}function lb(n,r){return n(r)}function ab(){}var df=!1;function cb(n,r,s){if(df)return n(r,s);df=!0;try{return lb(n,r,s)}finally{df=!1,(co!==null||uo!==null)&&(ab(),sb())}}function fi(n,r){var s=n.stateNode;if(s===null)return null;var c=fl(s);if(c===null)return null;s=c[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(n=n.type,c=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!c;break e;default:n=!1}if(n)return null;if(s&&typeof s!="function")throw Error(t(231,r,typeof s));return s}var ff=!1;if(f)try{var hi={};Object.defineProperty(hi,"passive",{get:function(){ff=!0}}),window.addEventListener("test",hi,hi),window.removeEventListener("test",hi,hi)}catch{ff=!1}function JC(n,r,s,c,d,h,m,b,T){var N=Array.prototype.slice.call(arguments,3);try{r.apply(s,N)}catch(F){this.onError(F)}}var pi=!1,Ws=null,Ks=!1,hf=null,eE={onError:function(n){pi=!0,Ws=n}};function tE(n,r,s,c,d,h,m,b,T){pi=!1,Ws=null,JC.apply(eE,arguments)}function nE(n,r,s,c,d,h,m,b,T){if(tE.apply(this,arguments),pi){if(pi){var N=Ws;pi=!1,Ws=null}else throw Error(t(198));Ks||(Ks=!0,hf=N)}}function Lr(n){var r=n,s=n;if(n.alternate)for(;r.return;)r=r.return;else{n=r;do r=n,(r.flags&4098)!==0&&(s=r.return),n=r.return;while(n)}return r.tag===3?s:null}function ub(n){if(n.tag===13){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function db(n){if(Lr(n)!==n)throw Error(t(188))}function rE(n){var r=n.alternate;if(!r){if(r=Lr(n),r===null)throw Error(t(188));return r!==n?null:n}for(var s=n,c=r;;){var d=s.return;if(d===null)break;var h=d.alternate;if(h===null){if(c=d.return,c!==null){s=c;continue}break}if(d.child===h.child){for(h=d.child;h;){if(h===s)return db(d),n;if(h===c)return db(d),r;h=h.sibling}throw Error(t(188))}if(s.return!==c.return)s=d,c=h;else{for(var m=!1,b=d.child;b;){if(b===s){m=!0,s=d,c=h;break}if(b===c){m=!0,c=d,s=h;break}b=b.sibling}if(!m){for(b=h.child;b;){if(b===s){m=!0,s=h,c=d;break}if(b===c){m=!0,c=h,s=d;break}b=b.sibling}if(!m)throw Error(t(189))}}if(s.alternate!==c)throw Error(t(190))}if(s.tag!==3)throw Error(t(188));return s.stateNode.current===s?n:r}function fb(n){return n=rE(n),n!==null?hb(n):null}function hb(n){if(n.tag===5||n.tag===6)return n;for(n=n.child;n!==null;){var r=hb(n);if(r!==null)return r;n=n.sibling}return null}var pb=e.unstable_scheduleCallback,gb=e.unstable_cancelCallback,oE=e.unstable_shouldYield,iE=e.unstable_requestPaint,nt=e.unstable_now,sE=e.unstable_getCurrentPriorityLevel,pf=e.unstable_ImmediatePriority,mb=e.unstable_UserBlockingPriority,Vs=e.unstable_NormalPriority,lE=e.unstable_LowPriority,vb=e.unstable_IdlePriority,$s=null,wn=null;function aE(n){if(wn&&typeof wn.onCommitFiberRoot=="function")try{wn.onCommitFiberRoot($s,n,void 0,(n.current.flags&128)===128)}catch{}}var an=Math.clz32?Math.clz32:dE,cE=Math.log,uE=Math.LN2;function dE(n){return n>>>=0,n===0?32:31-(cE(n)/uE|0)|0}var Gs=64,Xs=4194304;function gi(n){switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return n&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return n}}function Ys(n,r){var s=n.pendingLanes;if(s===0)return 0;var c=0,d=n.suspendedLanes,h=n.pingedLanes,m=s&268435455;if(m!==0){var b=m&~d;b!==0?c=gi(b):(h&=m,h!==0&&(c=gi(h)))}else m=s&~d,m!==0?c=gi(m):h!==0&&(c=gi(h));if(c===0)return 0;if(r!==0&&r!==c&&(r&d)===0&&(d=c&-c,h=r&-r,d>=h||d===16&&(h&4194240)!==0))return r;if((c&4)!==0&&(c|=s&16),r=n.entangledLanes,r!==0)for(n=n.entanglements,r&=c;0<r;)s=31-an(r),d=1<<s,c|=n[s],r&=~d;return c}function fE(n,r){switch(n){case 1:case 2:case 4:return r+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function hE(n,r){for(var s=n.suspendedLanes,c=n.pingedLanes,d=n.expirationTimes,h=n.pendingLanes;0<h;){var m=31-an(h),b=1<<m,T=d[m];T===-1?((b&s)===0||(b&c)!==0)&&(d[m]=fE(b,r)):T<=r&&(n.expiredLanes|=b),h&=~b}}function gf(n){return n=n.pendingLanes&-1073741825,n!==0?n:n&1073741824?1073741824:0}function yb(){var n=Gs;return Gs<<=1,(Gs&4194240)===0&&(Gs=64),n}function mf(n){for(var r=[],s=0;31>s;s++)r.push(n);return r}function mi(n,r,s){n.pendingLanes|=r,r!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,r=31-an(r),n[r]=s}function pE(n,r){var s=n.pendingLanes&~r;n.pendingLanes=r,n.suspendedLanes=0,n.pingedLanes=0,n.expiredLanes&=r,n.mutableReadLanes&=r,n.entangledLanes&=r,r=n.entanglements;var c=n.eventTimes;for(n=n.expirationTimes;0<s;){var d=31-an(s),h=1<<d;r[d]=0,c[d]=-1,n[d]=-1,s&=~h}}function vf(n,r){var s=n.entangledLanes|=r;for(n=n.entanglements;s;){var c=31-an(s),d=1<<c;d&r|n[c]&r&&(n[c]|=r),s&=~d}}var ze=0;function bb(n){return n&=-n,1<n?4<n?(n&268435455)!==0?16:536870912:4:1}var kb,yf,wb,Tb,Sb,bf=!1,Qs=[],er=null,tr=null,nr=null,vi=new Map,yi=new Map,rr=[],gE="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function xb(n,r){switch(n){case"focusin":case"focusout":er=null;break;case"dragenter":case"dragleave":tr=null;break;case"mouseover":case"mouseout":nr=null;break;case"pointerover":case"pointerout":vi.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":yi.delete(r.pointerId)}}function bi(n,r,s,c,d,h){return n===null||n.nativeEvent!==h?(n={blockedOn:r,domEventName:s,eventSystemFlags:c,nativeEvent:h,targetContainers:[d]},r!==null&&(r=Oi(r),r!==null&&yf(r)),n):(n.eventSystemFlags|=c,r=n.targetContainers,d!==null&&r.indexOf(d)===-1&&r.push(d),n)}function mE(n,r,s,c,d){switch(r){case"focusin":return er=bi(er,n,r,s,c,d),!0;case"dragenter":return tr=bi(tr,n,r,s,c,d),!0;case"mouseover":return nr=bi(nr,n,r,s,c,d),!0;case"pointerover":var h=d.pointerId;return vi.set(h,bi(vi.get(h)||null,n,r,s,c,d)),!0;case"gotpointercapture":return h=d.pointerId,yi.set(h,bi(yi.get(h)||null,n,r,s,c,d)),!0}return!1}function Cb(n){var r=Dr(n.target);if(r!==null){var s=Lr(r);if(s!==null){if(r=s.tag,r===13){if(r=ub(s),r!==null){n.blockedOn=r,Sb(n.priority,function(){wb(s)});return}}else if(r===3&&s.stateNode.current.memoizedState.isDehydrated){n.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}n.blockedOn=null}function Zs(n){if(n.blockedOn!==null)return!1;for(var r=n.targetContainers;0<r.length;){var s=wf(n.domEventName,n.eventSystemFlags,r[0],n.nativeEvent);if(s===null){s=n.nativeEvent;var c=new s.constructor(s.type,s);af=c,s.target.dispatchEvent(c),af=null}else return r=Oi(s),r!==null&&yf(r),n.blockedOn=s,!1;r.shift()}return!0}function Eb(n,r,s){Zs(n)&&s.delete(r)}function vE(){bf=!1,er!==null&&Zs(er)&&(er=null),tr!==null&&Zs(tr)&&(tr=null),nr!==null&&Zs(nr)&&(nr=null),vi.forEach(Eb),yi.forEach(Eb)}function ki(n,r){n.blockedOn===r&&(n.blockedOn=null,bf||(bf=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,vE)))}function wi(n){function r(d){return ki(d,n)}if(0<Qs.length){ki(Qs[0],n);for(var s=1;s<Qs.length;s++){var c=Qs[s];c.blockedOn===n&&(c.blockedOn=null)}}for(er!==null&&ki(er,n),tr!==null&&ki(tr,n),nr!==null&&ki(nr,n),vi.forEach(r),yi.forEach(r),s=0;s<rr.length;s++)c=rr[s],c.blockedOn===n&&(c.blockedOn=null);for(;0<rr.length&&(s=rr[0],s.blockedOn===null);)Cb(s),s.blockedOn===null&&rr.shift()}var fo=j.ReactCurrentBatchConfig,Js=!0;function yE(n,r,s,c){var d=ze,h=fo.transition;fo.transition=null;try{ze=1,kf(n,r,s,c)}finally{ze=d,fo.transition=h}}function bE(n,r,s,c){var d=ze,h=fo.transition;fo.transition=null;try{ze=4,kf(n,r,s,c)}finally{ze=d,fo.transition=h}}function kf(n,r,s,c){if(Js){var d=wf(n,r,s,c);if(d===null)Ff(n,r,c,el,s),xb(n,c);else if(mE(d,n,r,s,c))c.stopPropagation();else if(xb(n,c),r&4&&-1<gE.indexOf(n)){for(;d!==null;){var h=Oi(d);if(h!==null&&kb(h),h=wf(n,r,s,c),h===null&&Ff(n,r,c,el,s),h===d)break;d=h}d!==null&&c.stopPropagation()}else Ff(n,r,c,null,s)}}var el=null;function wf(n,r,s,c){if(el=null,n=cf(c),n=Dr(n),n!==null)if(r=Lr(n),r===null)n=null;else if(s=r.tag,s===13){if(n=ub(r),n!==null)return n;n=null}else if(s===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;n=null}else r!==n&&(n=null);return el=n,null}function Bb(n){switch(n){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(sE()){case pf:return 1;case mb:return 4;case Vs:case lE:return 16;case vb:return 536870912;default:return 16}default:return 16}}var or=null,Tf=null,tl=null;function Ab(){if(tl)return tl;var n,r=Tf,s=r.length,c,d="value"in or?or.value:or.textContent,h=d.length;for(n=0;n<s&&r[n]===d[n];n++);var m=s-n;for(c=1;c<=m&&r[s-c]===d[h-c];c++);return tl=d.slice(n,1<c?1-c:void 0)}function nl(n){var r=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&r===13&&(n=13)):n=r,n===10&&(n=13),32<=n||n===13?n:0}function rl(){return!0}function Ib(){return!1}function qt(n){function r(s,c,d,h,m){this._reactName=s,this._targetInst=d,this.type=c,this.nativeEvent=h,this.target=m,this.currentTarget=null;for(var b in n)n.hasOwnProperty(b)&&(s=n[b],this[b]=s?s(h):h[b]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?rl:Ib,this.isPropagationStopped=Ib,this}return G(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=rl)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=rl)},persist:function(){},isPersistent:rl}),r}var ho={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Sf=qt(ho),Ti=G({},ho,{view:0,detail:0}),kE=qt(Ti),xf,Cf,Si,ol=G({},Ti,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bf,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==Si&&(Si&&n.type==="mousemove"?(xf=n.screenX-Si.screenX,Cf=n.screenY-Si.screenY):Cf=xf=0,Si=n),xf)},movementY:function(n){return"movementY"in n?n.movementY:Cf}}),_b=qt(ol),wE=G({},ol,{dataTransfer:0}),TE=qt(wE),SE=G({},Ti,{relatedTarget:0}),Ef=qt(SE),xE=G({},ho,{animationName:0,elapsedTime:0,pseudoElement:0}),CE=qt(xE),EE=G({},ho,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),BE=qt(EE),AE=G({},ho,{data:0}),Nb=qt(AE),IE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_E={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},NE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function RE(n){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(n):(n=NE[n])?!!r[n]:!1}function Bf(){return RE}var OE=G({},Ti,{key:function(n){if(n.key){var r=IE[n.key]||n.key;if(r!=="Unidentified")return r}return n.type==="keypress"?(n=nl(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?_E[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bf,charCode:function(n){return n.type==="keypress"?nl(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?nl(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),PE=qt(OE),LE=G({},ol,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Rb=qt(LE),DE=G({},Ti,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bf}),ME=qt(DE),FE=G({},ho,{propertyName:0,elapsedTime:0,pseudoElement:0}),zE=qt(FE),HE=G({},ol,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),jE=qt(HE),qE=[9,13,27,32],Af=f&&"CompositionEvent"in window,xi=null;f&&"documentMode"in document&&(xi=document.documentMode);var UE=f&&"TextEvent"in window&&!xi,Ob=f&&(!Af||xi&&8<xi&&11>=xi),Pb=" ",Lb=!1;function Db(n,r){switch(n){case"keyup":return qE.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Mb(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var po=!1;function WE(n,r){switch(n){case"compositionend":return Mb(r);case"keypress":return r.which!==32?null:(Lb=!0,Pb);case"textInput":return n=r.data,n===Pb&&Lb?null:n;default:return null}}function KE(n,r){if(po)return n==="compositionend"||!Af&&Db(n,r)?(n=Ab(),tl=Tf=or=null,po=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return Ob&&r.locale!=="ko"?null:r.data;default:return null}}var VE={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Fb(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r==="input"?!!VE[n.type]:r==="textarea"}function zb(n,r,s,c){ib(c),r=cl(r,"onChange"),0<r.length&&(s=new Sf("onChange","change",null,s,c),n.push({event:s,listeners:r}))}var Ci=null,Ei=null;function $E(n){rk(n,0)}function il(n){var r=bo(n);if(Pr(r))return n}function GE(n,r){if(n==="change")return r}var Hb=!1;if(f){var If;if(f){var _f="oninput"in document;if(!_f){var jb=document.createElement("div");jb.setAttribute("oninput","return;"),_f=typeof jb.oninput=="function"}If=_f}else If=!1;Hb=If&&(!document.documentMode||9<document.documentMode)}function qb(){Ci&&(Ci.detachEvent("onpropertychange",Ub),Ei=Ci=null)}function Ub(n){if(n.propertyName==="value"&&il(Ei)){var r=[];zb(r,Ei,n,cf(n)),cb($E,r)}}function XE(n,r,s){n==="focusin"?(qb(),Ci=r,Ei=s,Ci.attachEvent("onpropertychange",Ub)):n==="focusout"&&qb()}function YE(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return il(Ei)}function QE(n,r){if(n==="click")return il(r)}function ZE(n,r){if(n==="input"||n==="change")return il(r)}function JE(n,r){return n===r&&(n!==0||1/n===1/r)||n!==n&&r!==r}var cn=typeof Object.is=="function"?Object.is:JE;function Bi(n,r){if(cn(n,r))return!0;if(typeof n!="object"||n===null||typeof r!="object"||r===null)return!1;var s=Object.keys(n),c=Object.keys(r);if(s.length!==c.length)return!1;for(c=0;c<s.length;c++){var d=s[c];if(!p.call(r,d)||!cn(n[d],r[d]))return!1}return!0}function Wb(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function Kb(n,r){var s=Wb(n);n=0;for(var c;s;){if(s.nodeType===3){if(c=n+s.textContent.length,n<=r&&c>=r)return{node:s,offset:r-n};n=c}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Wb(s)}}function Vb(n,r){return n&&r?n===r?!0:n&&n.nodeType===3?!1:r&&r.nodeType===3?Vb(n,r.parentNode):"contains"in n?n.contains(r):n.compareDocumentPosition?!!(n.compareDocumentPosition(r)&16):!1:!1}function $b(){for(var n=window,r=qs();r instanceof n.HTMLIFrameElement;){try{var s=typeof r.contentWindow.location.href=="string"}catch{s=!1}if(s)n=r.contentWindow;else break;r=qs(n.document)}return r}function Nf(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r&&(r==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||r==="textarea"||n.contentEditable==="true")}function eB(n){var r=$b(),s=n.focusedElem,c=n.selectionRange;if(r!==s&&s&&s.ownerDocument&&Vb(s.ownerDocument.documentElement,s)){if(c!==null&&Nf(s)){if(r=c.start,n=c.end,n===void 0&&(n=r),"selectionStart"in s)s.selectionStart=r,s.selectionEnd=Math.min(n,s.value.length);else if(n=(r=s.ownerDocument||document)&&r.defaultView||window,n.getSelection){n=n.getSelection();var d=s.textContent.length,h=Math.min(c.start,d);c=c.end===void 0?h:Math.min(c.end,d),!n.extend&&h>c&&(d=c,c=h,h=d),d=Kb(s,h);var m=Kb(s,c);d&&m&&(n.rangeCount!==1||n.anchorNode!==d.node||n.anchorOffset!==d.offset||n.focusNode!==m.node||n.focusOffset!==m.offset)&&(r=r.createRange(),r.setStart(d.node,d.offset),n.removeAllRanges(),h>c?(n.addRange(r),n.extend(m.node,m.offset)):(r.setEnd(m.node,m.offset),n.addRange(r)))}}for(r=[],n=s;n=n.parentNode;)n.nodeType===1&&r.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<r.length;s++)n=r[s],n.element.scrollLeft=n.left,n.element.scrollTop=n.top}}var tB=f&&"documentMode"in document&&11>=document.documentMode,go=null,Rf=null,Ai=null,Of=!1;function Gb(n,r,s){var c=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Of||go==null||go!==qs(c)||(c=go,"selectionStart"in c&&Nf(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Ai&&Bi(Ai,c)||(Ai=c,c=cl(Rf,"onSelect"),0<c.length&&(r=new Sf("onSelect","select",null,r,s),n.push({event:r,listeners:c}),r.target=go)))}function sl(n,r){var s={};return s[n.toLowerCase()]=r.toLowerCase(),s["Webkit"+n]="webkit"+r,s["Moz"+n]="moz"+r,s}var mo={animationend:sl("Animation","AnimationEnd"),animationiteration:sl("Animation","AnimationIteration"),animationstart:sl("Animation","AnimationStart"),transitionend:sl("Transition","TransitionEnd")},Pf={},Xb={};f&&(Xb=document.createElement("div").style,"AnimationEvent"in window||(delete mo.animationend.animation,delete mo.animationiteration.animation,delete mo.animationstart.animation),"TransitionEvent"in window||delete mo.transitionend.transition);function ll(n){if(Pf[n])return Pf[n];if(!mo[n])return n;var r=mo[n],s;for(s in r)if(r.hasOwnProperty(s)&&s in Xb)return Pf[n]=r[s];return n}var Yb=ll("animationend"),Qb=ll("animationiteration"),Zb=ll("animationstart"),Jb=ll("transitionend"),ek=new Map,tk="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function ir(n,r){ek.set(n,r),a(r,[n])}for(var Lf=0;Lf<tk.length;Lf++){var Df=tk[Lf],nB=Df.toLowerCase(),rB=Df[0].toUpperCase()+Df.slice(1);ir(nB,"on"+rB)}ir(Yb,"onAnimationEnd"),ir(Qb,"onAnimationIteration"),ir(Zb,"onAnimationStart"),ir("dblclick","onDoubleClick"),ir("focusin","onFocus"),ir("focusout","onBlur"),ir(Jb,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ii="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),oB=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ii));function nk(n,r,s){var c=n.type||"unknown-event";n.currentTarget=s,nE(c,r,void 0,n),n.currentTarget=null}function rk(n,r){r=(r&4)!==0;for(var s=0;s<n.length;s++){var c=n[s],d=c.event;c=c.listeners;e:{var h=void 0;if(r)for(var m=c.length-1;0<=m;m--){var b=c[m],T=b.instance,N=b.currentTarget;if(b=b.listener,T!==h&&d.isPropagationStopped())break e;nk(d,b,N),h=T}else for(m=0;m<c.length;m++){if(b=c[m],T=b.instance,N=b.currentTarget,b=b.listener,T!==h&&d.isPropagationStopped())break e;nk(d,b,N),h=T}}}if(Ks)throw n=hf,Ks=!1,hf=null,n}function Ue(n,r){var s=r[Wf];s===void 0&&(s=r[Wf]=new Set);var c=n+"__bubble";s.has(c)||(ok(r,n,2,!1),s.add(c))}function Mf(n,r,s){var c=0;r&&(c|=4),ok(s,n,c,r)}var al="_reactListening"+Math.random().toString(36).slice(2);function _i(n){if(!n[al]){n[al]=!0,o.forEach(function(s){s!=="selectionchange"&&(oB.has(s)||Mf(s,!1,n),Mf(s,!0,n))});var r=n.nodeType===9?n:n.ownerDocument;r===null||r[al]||(r[al]=!0,Mf("selectionchange",!1,r))}}function ok(n,r,s,c){switch(Bb(r)){case 1:var d=yE;break;case 4:d=bE;break;default:d=kf}s=d.bind(null,r,s,n),d=void 0,!ff||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(d=!0),c?d!==void 0?n.addEventListener(r,s,{capture:!0,passive:d}):n.addEventListener(r,s,!0):d!==void 0?n.addEventListener(r,s,{passive:d}):n.addEventListener(r,s,!1)}function Ff(n,r,s,c,d){var h=c;if((r&1)===0&&(r&2)===0&&c!==null)e:for(;;){if(c===null)return;var m=c.tag;if(m===3||m===4){var b=c.stateNode.containerInfo;if(b===d||b.nodeType===8&&b.parentNode===d)break;if(m===4)for(m=c.return;m!==null;){var T=m.tag;if((T===3||T===4)&&(T=m.stateNode.containerInfo,T===d||T.nodeType===8&&T.parentNode===d))return;m=m.return}for(;b!==null;){if(m=Dr(b),m===null)return;if(T=m.tag,T===5||T===6){c=h=m;continue e}b=b.parentNode}}c=c.return}cb(function(){var N=h,F=cf(s),H=[];e:{var M=ek.get(n);if(M!==void 0){var $=Sf,ee=n;switch(n){case"keypress":if(nl(s)===0)break e;case"keydown":case"keyup":$=PE;break;case"focusin":ee="focus",$=Ef;break;case"focusout":ee="blur",$=Ef;break;case"beforeblur":case"afterblur":$=Ef;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":$=_b;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":$=TE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":$=ME;break;case Yb:case Qb:case Zb:$=CE;break;case Jb:$=zE;break;case"scroll":$=kE;break;case"wheel":$=jE;break;case"copy":case"cut":case"paste":$=BE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":$=Rb}var ne=(r&4)!==0,rt=!ne&&n==="scroll",A=ne?M!==null?M+"Capture":null:M;ne=[];for(var x=N,I;x!==null;){I=x;var q=I.stateNode;if(I.tag===5&&q!==null&&(I=q,A!==null&&(q=fi(x,A),q!=null&&ne.push(Ni(x,q,I)))),rt)break;x=x.return}0<ne.length&&(M=new $(M,ee,null,s,F),H.push({event:M,listeners:ne}))}}if((r&7)===0){e:{if(M=n==="mouseover"||n==="pointerover",$=n==="mouseout"||n==="pointerout",M&&s!==af&&(ee=s.relatedTarget||s.fromElement)&&(Dr(ee)||ee[Ln]))break e;if(($||M)&&(M=F.window===F?F:(M=F.ownerDocument)?M.defaultView||M.parentWindow:window,$?(ee=s.relatedTarget||s.toElement,$=N,ee=ee?Dr(ee):null,ee!==null&&(rt=Lr(ee),ee!==rt||ee.tag!==5&&ee.tag!==6)&&(ee=null)):($=null,ee=N),$!==ee)){if(ne=_b,q="onMouseLeave",A="onMouseEnter",x="mouse",(n==="pointerout"||n==="pointerover")&&(ne=Rb,q="onPointerLeave",A="onPointerEnter",x="pointer"),rt=$==null?M:bo($),I=ee==null?M:bo(ee),M=new ne(q,x+"leave",$,s,F),M.target=rt,M.relatedTarget=I,q=null,Dr(F)===N&&(ne=new ne(A,x+"enter",ee,s,F),ne.target=I,ne.relatedTarget=rt,q=ne),rt=q,$&&ee)t:{for(ne=$,A=ee,x=0,I=ne;I;I=vo(I))x++;for(I=0,q=A;q;q=vo(q))I++;for(;0<x-I;)ne=vo(ne),x--;for(;0<I-x;)A=vo(A),I--;for(;x--;){if(ne===A||A!==null&&ne===A.alternate)break t;ne=vo(ne),A=vo(A)}ne=null}else ne=null;$!==null&&ik(H,M,$,ne,!1),ee!==null&&rt!==null&&ik(H,rt,ee,ne,!0)}}e:{if(M=N?bo(N):window,$=M.nodeName&&M.nodeName.toLowerCase(),$==="select"||$==="input"&&M.type==="file")var oe=GE;else if(Fb(M))if(Hb)oe=ZE;else{oe=YE;var ce=XE}else($=M.nodeName)&&$.toLowerCase()==="input"&&(M.type==="checkbox"||M.type==="radio")&&(oe=QE);if(oe&&(oe=oe(n,N))){zb(H,oe,s,F);break e}ce&&ce(n,M,N),n==="focusout"&&(ce=M._wrapperState)&&ce.controlled&&M.type==="number"&&nf(M,"number",M.value)}switch(ce=N?bo(N):window,n){case"focusin":(Fb(ce)||ce.contentEditable==="true")&&(go=ce,Rf=N,Ai=null);break;case"focusout":Ai=Rf=go=null;break;case"mousedown":Of=!0;break;case"contextmenu":case"mouseup":case"dragend":Of=!1,Gb(H,s,F);break;case"selectionchange":if(tB)break;case"keydown":case"keyup":Gb(H,s,F)}var ue;if(Af)e:{switch(n){case"compositionstart":var pe="onCompositionStart";break e;case"compositionend":pe="onCompositionEnd";break e;case"compositionupdate":pe="onCompositionUpdate";break e}pe=void 0}else po?Db(n,s)&&(pe="onCompositionEnd"):n==="keydown"&&s.keyCode===229&&(pe="onCompositionStart");pe&&(Ob&&s.locale!=="ko"&&(po||pe!=="onCompositionStart"?pe==="onCompositionEnd"&&po&&(ue=Ab()):(or=F,Tf="value"in or?or.value:or.textContent,po=!0)),ce=cl(N,pe),0<ce.length&&(pe=new Nb(pe,n,null,s,F),H.push({event:pe,listeners:ce}),ue?pe.data=ue:(ue=Mb(s),ue!==null&&(pe.data=ue)))),(ue=UE?WE(n,s):KE(n,s))&&(N=cl(N,"onBeforeInput"),0<N.length&&(F=new Nb("onBeforeInput","beforeinput",null,s,F),H.push({event:F,listeners:N}),F.data=ue))}rk(H,r)})}function Ni(n,r,s){return{instance:n,listener:r,currentTarget:s}}function cl(n,r){for(var s=r+"Capture",c=[];n!==null;){var d=n,h=d.stateNode;d.tag===5&&h!==null&&(d=h,h=fi(n,s),h!=null&&c.unshift(Ni(n,h,d)),h=fi(n,r),h!=null&&c.push(Ni(n,h,d))),n=n.return}return c}function vo(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5);return n||null}function ik(n,r,s,c,d){for(var h=r._reactName,m=[];s!==null&&s!==c;){var b=s,T=b.alternate,N=b.stateNode;if(T!==null&&T===c)break;b.tag===5&&N!==null&&(b=N,d?(T=fi(s,h),T!=null&&m.unshift(Ni(s,T,b))):d||(T=fi(s,h),T!=null&&m.push(Ni(s,T,b)))),s=s.return}m.length!==0&&n.push({event:r,listeners:m})}var iB=/\r\n?/g,sB=/\u0000|\uFFFD/g;function sk(n){return(typeof n=="string"?n:""+n).replace(iB,`
|
|
15
|
-
`).replace(sB,"")}function ul(n,r,s){if(r=sk(r),sk(n)!==r&&s)throw Error(t(425))}function dl(){}var zf=null,Hf=null;function jf(n,r){return n==="textarea"||n==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var qf=typeof setTimeout=="function"?setTimeout:void 0,lB=typeof clearTimeout=="function"?clearTimeout:void 0,lk=typeof Promise=="function"?Promise:void 0,aB=typeof queueMicrotask=="function"?queueMicrotask:typeof lk<"u"?function(n){return lk.resolve(null).then(n).catch(cB)}:qf;function cB(n){setTimeout(function(){throw n})}function Uf(n,r){var s=r,c=0;do{var d=s.nextSibling;if(n.removeChild(s),d&&d.nodeType===8)if(s=d.data,s==="/$"){if(c===0){n.removeChild(d),wi(r);return}c--}else s!=="$"&&s!=="$?"&&s!=="$!"||c++;s=d}while(s);wi(r)}function sr(n){for(;n!=null;n=n.nextSibling){var r=n.nodeType;if(r===1||r===3)break;if(r===8){if(r=n.data,r==="$"||r==="$!"||r==="$?")break;if(r==="/$")return null}}return n}function ak(n){n=n.previousSibling;for(var r=0;n;){if(n.nodeType===8){var s=n.data;if(s==="$"||s==="$!"||s==="$?"){if(r===0)return n;r--}else s==="/$"&&r++}n=n.previousSibling}return null}var yo=Math.random().toString(36).slice(2),Tn="__reactFiber$"+yo,Ri="__reactProps$"+yo,Ln="__reactContainer$"+yo,Wf="__reactEvents$"+yo,uB="__reactListeners$"+yo,dB="__reactHandles$"+yo;function Dr(n){var r=n[Tn];if(r)return r;for(var s=n.parentNode;s;){if(r=s[Ln]||s[Tn]){if(s=r.alternate,r.child!==null||s!==null&&s.child!==null)for(n=ak(n);n!==null;){if(s=n[Tn])return s;n=ak(n)}return r}n=s,s=n.parentNode}return null}function Oi(n){return n=n[Tn]||n[Ln],!n||n.tag!==5&&n.tag!==6&&n.tag!==13&&n.tag!==3?null:n}function bo(n){if(n.tag===5||n.tag===6)return n.stateNode;throw Error(t(33))}function fl(n){return n[Ri]||null}var Kf=[],ko=-1;function lr(n){return{current:n}}function We(n){0>ko||(n.current=Kf[ko],Kf[ko]=null,ko--)}function qe(n,r){ko++,Kf[ko]=n.current,n.current=r}var ar={},St=lr(ar),Lt=lr(!1),Mr=ar;function wo(n,r){var s=n.type.contextTypes;if(!s)return ar;var c=n.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===r)return c.__reactInternalMemoizedMaskedChildContext;var d={},h;for(h in s)d[h]=r[h];return c&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=r,n.__reactInternalMemoizedMaskedChildContext=d),d}function Dt(n){return n=n.childContextTypes,n!=null}function hl(){We(Lt),We(St)}function ck(n,r,s){if(St.current!==ar)throw Error(t(168));qe(St,r),qe(Lt,s)}function uk(n,r,s){var c=n.stateNode;if(r=r.childContextTypes,typeof c.getChildContext!="function")return s;c=c.getChildContext();for(var d in c)if(!(d in r))throw Error(t(108,me(n)||"Unknown",d));return G({},s,c)}function pl(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||ar,Mr=St.current,qe(St,n),qe(Lt,Lt.current),!0}function dk(n,r,s){var c=n.stateNode;if(!c)throw Error(t(169));s?(n=uk(n,r,Mr),c.__reactInternalMemoizedMergedChildContext=n,We(Lt),We(St),qe(St,n)):We(Lt),qe(Lt,s)}var Dn=null,gl=!1,Vf=!1;function fk(n){Dn===null?Dn=[n]:Dn.push(n)}function fB(n){gl=!0,fk(n)}function cr(){if(!Vf&&Dn!==null){Vf=!0;var n=0,r=ze;try{var s=Dn;for(ze=1;n<s.length;n++){var c=s[n];do c=c(!0);while(c!==null)}Dn=null,gl=!1}catch(d){throw Dn!==null&&(Dn=Dn.slice(n+1)),pb(pf,cr),d}finally{ze=r,Vf=!1}}return null}var To=[],So=0,ml=null,vl=0,Qt=[],Zt=0,Fr=null,Mn=1,Fn="";function zr(n,r){To[So++]=vl,To[So++]=ml,ml=n,vl=r}function hk(n,r,s){Qt[Zt++]=Mn,Qt[Zt++]=Fn,Qt[Zt++]=Fr,Fr=n;var c=Mn;n=Fn;var d=32-an(c)-1;c&=~(1<<d),s+=1;var h=32-an(r)+d;if(30<h){var m=d-d%5;h=(c&(1<<m)-1).toString(32),c>>=m,d-=m,Mn=1<<32-an(r)+d|s<<d|c,Fn=h+n}else Mn=1<<h|s<<d|c,Fn=n}function $f(n){n.return!==null&&(zr(n,1),hk(n,1,0))}function Gf(n){for(;n===ml;)ml=To[--So],To[So]=null,vl=To[--So],To[So]=null;for(;n===Fr;)Fr=Qt[--Zt],Qt[Zt]=null,Fn=Qt[--Zt],Qt[Zt]=null,Mn=Qt[--Zt],Qt[Zt]=null}var Ut=null,Wt=null,$e=!1,un=null;function pk(n,r){var s=nn(5,null,null,0);s.elementType="DELETED",s.stateNode=r,s.return=n,r=n.deletions,r===null?(n.deletions=[s],n.flags|=16):r.push(s)}function gk(n,r){switch(n.tag){case 5:var s=n.type;return r=r.nodeType!==1||s.toLowerCase()!==r.nodeName.toLowerCase()?null:r,r!==null?(n.stateNode=r,Ut=n,Wt=sr(r.firstChild),!0):!1;case 6:return r=n.pendingProps===""||r.nodeType!==3?null:r,r!==null?(n.stateNode=r,Ut=n,Wt=null,!0):!1;case 13:return r=r.nodeType!==8?null:r,r!==null?(s=Fr!==null?{id:Mn,overflow:Fn}:null,n.memoizedState={dehydrated:r,treeContext:s,retryLane:1073741824},s=nn(18,null,null,0),s.stateNode=r,s.return=n,n.child=s,Ut=n,Wt=null,!0):!1;default:return!1}}function Xf(n){return(n.mode&1)!==0&&(n.flags&128)===0}function Yf(n){if($e){var r=Wt;if(r){var s=r;if(!gk(n,r)){if(Xf(n))throw Error(t(418));r=sr(s.nextSibling);var c=Ut;r&&gk(n,r)?pk(c,s):(n.flags=n.flags&-4097|2,$e=!1,Ut=n)}}else{if(Xf(n))throw Error(t(418));n.flags=n.flags&-4097|2,$e=!1,Ut=n}}}function mk(n){for(n=n.return;n!==null&&n.tag!==5&&n.tag!==3&&n.tag!==13;)n=n.return;Ut=n}function yl(n){if(n!==Ut)return!1;if(!$e)return mk(n),$e=!0,!1;var r;if((r=n.tag!==3)&&!(r=n.tag!==5)&&(r=n.type,r=r!=="head"&&r!=="body"&&!jf(n.type,n.memoizedProps)),r&&(r=Wt)){if(Xf(n))throw vk(),Error(t(418));for(;r;)pk(n,r),r=sr(r.nextSibling)}if(mk(n),n.tag===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(t(317));e:{for(n=n.nextSibling,r=0;n;){if(n.nodeType===8){var s=n.data;if(s==="/$"){if(r===0){Wt=sr(n.nextSibling);break e}r--}else s!=="$"&&s!=="$!"&&s!=="$?"||r++}n=n.nextSibling}Wt=null}}else Wt=Ut?sr(n.stateNode.nextSibling):null;return!0}function vk(){for(var n=Wt;n;)n=sr(n.nextSibling)}function xo(){Wt=Ut=null,$e=!1}function Qf(n){un===null?un=[n]:un.push(n)}var hB=j.ReactCurrentBatchConfig;function Pi(n,r,s){if(n=s.ref,n!==null&&typeof n!="function"&&typeof n!="object"){if(s._owner){if(s=s._owner,s){if(s.tag!==1)throw Error(t(309));var c=s.stateNode}if(!c)throw Error(t(147,n));var d=c,h=""+n;return r!==null&&r.ref!==null&&typeof r.ref=="function"&&r.ref._stringRef===h?r.ref:(r=function(m){var b=d.refs;m===null?delete b[h]:b[h]=m},r._stringRef=h,r)}if(typeof n!="string")throw Error(t(284));if(!s._owner)throw Error(t(290,n))}return n}function bl(n,r){throw n=Object.prototype.toString.call(r),Error(t(31,n==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":n))}function yk(n){var r=n._init;return r(n._payload)}function bk(n){function r(A,x){if(n){var I=A.deletions;I===null?(A.deletions=[x],A.flags|=16):I.push(x)}}function s(A,x){if(!n)return null;for(;x!==null;)r(A,x),x=x.sibling;return null}function c(A,x){for(A=new Map;x!==null;)x.key!==null?A.set(x.key,x):A.set(x.index,x),x=x.sibling;return A}function d(A,x){return A=vr(A,x),A.index=0,A.sibling=null,A}function h(A,x,I){return A.index=I,n?(I=A.alternate,I!==null?(I=I.index,I<x?(A.flags|=2,x):I):(A.flags|=2,x)):(A.flags|=1048576,x)}function m(A){return n&&A.alternate===null&&(A.flags|=2),A}function b(A,x,I,q){return x===null||x.tag!==6?(x=qh(I,A.mode,q),x.return=A,x):(x=d(x,I),x.return=A,x)}function T(A,x,I,q){var oe=I.type;return oe===V?F(A,x,I.props.children,q,I.key):x!==null&&(x.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===Se&&yk(oe)===x.type)?(q=d(x,I.props),q.ref=Pi(A,x,I),q.return=A,q):(q=Ul(I.type,I.key,I.props,null,A.mode,q),q.ref=Pi(A,x,I),q.return=A,q)}function N(A,x,I,q){return x===null||x.tag!==4||x.stateNode.containerInfo!==I.containerInfo||x.stateNode.implementation!==I.implementation?(x=Uh(I,A.mode,q),x.return=A,x):(x=d(x,I.children||[]),x.return=A,x)}function F(A,x,I,q,oe){return x===null||x.tag!==7?(x=$r(I,A.mode,q,oe),x.return=A,x):(x=d(x,I),x.return=A,x)}function H(A,x,I){if(typeof x=="string"&&x!==""||typeof x=="number")return x=qh(""+x,A.mode,I),x.return=A,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case J:return I=Ul(x.type,x.key,x.props,null,A.mode,I),I.ref=Pi(A,null,x),I.return=A,I;case W:return x=Uh(x,A.mode,I),x.return=A,x;case Se:var q=x._init;return H(A,q(x._payload),I)}if(ci(x)||le(x))return x=$r(x,A.mode,I,null),x.return=A,x;bl(A,x)}return null}function M(A,x,I,q){var oe=x!==null?x.key:null;if(typeof I=="string"&&I!==""||typeof I=="number")return oe!==null?null:b(A,x,""+I,q);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case J:return I.key===oe?T(A,x,I,q):null;case W:return I.key===oe?N(A,x,I,q):null;case Se:return oe=I._init,M(A,x,oe(I._payload),q)}if(ci(I)||le(I))return oe!==null?null:F(A,x,I,q,null);bl(A,I)}return null}function $(A,x,I,q,oe){if(typeof q=="string"&&q!==""||typeof q=="number")return A=A.get(I)||null,b(x,A,""+q,oe);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case J:return A=A.get(q.key===null?I:q.key)||null,T(x,A,q,oe);case W:return A=A.get(q.key===null?I:q.key)||null,N(x,A,q,oe);case Se:var ce=q._init;return $(A,x,I,ce(q._payload),oe)}if(ci(q)||le(q))return A=A.get(I)||null,F(x,A,q,oe,null);bl(x,q)}return null}function ee(A,x,I,q){for(var oe=null,ce=null,ue=x,pe=x=0,gt=null;ue!==null&&pe<I.length;pe++){ue.index>pe?(gt=ue,ue=null):gt=ue.sibling;var Le=M(A,ue,I[pe],q);if(Le===null){ue===null&&(ue=gt);break}n&&ue&&Le.alternate===null&&r(A,ue),x=h(Le,x,pe),ce===null?oe=Le:ce.sibling=Le,ce=Le,ue=gt}if(pe===I.length)return s(A,ue),$e&&zr(A,pe),oe;if(ue===null){for(;pe<I.length;pe++)ue=H(A,I[pe],q),ue!==null&&(x=h(ue,x,pe),ce===null?oe=ue:ce.sibling=ue,ce=ue);return $e&&zr(A,pe),oe}for(ue=c(A,ue);pe<I.length;pe++)gt=$(ue,A,pe,I[pe],q),gt!==null&&(n&>.alternate!==null&&ue.delete(gt.key===null?pe:gt.key),x=h(gt,x,pe),ce===null?oe=gt:ce.sibling=gt,ce=gt);return n&&ue.forEach(function(yr){return r(A,yr)}),$e&&zr(A,pe),oe}function ne(A,x,I,q){var oe=le(I);if(typeof oe!="function")throw Error(t(150));if(I=oe.call(I),I==null)throw Error(t(151));for(var ce=oe=null,ue=x,pe=x=0,gt=null,Le=I.next();ue!==null&&!Le.done;pe++,Le=I.next()){ue.index>pe?(gt=ue,ue=null):gt=ue.sibling;var yr=M(A,ue,Le.value,q);if(yr===null){ue===null&&(ue=gt);break}n&&ue&&yr.alternate===null&&r(A,ue),x=h(yr,x,pe),ce===null?oe=yr:ce.sibling=yr,ce=yr,ue=gt}if(Le.done)return s(A,ue),$e&&zr(A,pe),oe;if(ue===null){for(;!Le.done;pe++,Le=I.next())Le=H(A,Le.value,q),Le!==null&&(x=h(Le,x,pe),ce===null?oe=Le:ce.sibling=Le,ce=Le);return $e&&zr(A,pe),oe}for(ue=c(A,ue);!Le.done;pe++,Le=I.next())Le=$(ue,A,pe,Le.value,q),Le!==null&&(n&&Le.alternate!==null&&ue.delete(Le.key===null?pe:Le.key),x=h(Le,x,pe),ce===null?oe=Le:ce.sibling=Le,ce=Le);return n&&ue.forEach(function(VB){return r(A,VB)}),$e&&zr(A,pe),oe}function rt(A,x,I,q){if(typeof I=="object"&&I!==null&&I.type===V&&I.key===null&&(I=I.props.children),typeof I=="object"&&I!==null){switch(I.$$typeof){case J:e:{for(var oe=I.key,ce=x;ce!==null;){if(ce.key===oe){if(oe=I.type,oe===V){if(ce.tag===7){s(A,ce.sibling),x=d(ce,I.props.children),x.return=A,A=x;break e}}else if(ce.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===Se&&yk(oe)===ce.type){s(A,ce.sibling),x=d(ce,I.props),x.ref=Pi(A,ce,I),x.return=A,A=x;break e}s(A,ce);break}else r(A,ce);ce=ce.sibling}I.type===V?(x=$r(I.props.children,A.mode,q,I.key),x.return=A,A=x):(q=Ul(I.type,I.key,I.props,null,A.mode,q),q.ref=Pi(A,x,I),q.return=A,A=q)}return m(A);case W:e:{for(ce=I.key;x!==null;){if(x.key===ce)if(x.tag===4&&x.stateNode.containerInfo===I.containerInfo&&x.stateNode.implementation===I.implementation){s(A,x.sibling),x=d(x,I.children||[]),x.return=A,A=x;break e}else{s(A,x);break}else r(A,x);x=x.sibling}x=Uh(I,A.mode,q),x.return=A,A=x}return m(A);case Se:return ce=I._init,rt(A,x,ce(I._payload),q)}if(ci(I))return ee(A,x,I,q);if(le(I))return ne(A,x,I,q);bl(A,I)}return typeof I=="string"&&I!==""||typeof I=="number"?(I=""+I,x!==null&&x.tag===6?(s(A,x.sibling),x=d(x,I),x.return=A,A=x):(s(A,x),x=qh(I,A.mode,q),x.return=A,A=x),m(A)):s(A,x)}return rt}var Co=bk(!0),kk=bk(!1),kl=lr(null),wl=null,Eo=null,Zf=null;function Jf(){Zf=Eo=wl=null}function eh(n){var r=kl.current;We(kl),n._currentValue=r}function th(n,r,s){for(;n!==null;){var c=n.alternate;if((n.childLanes&r)!==r?(n.childLanes|=r,c!==null&&(c.childLanes|=r)):c!==null&&(c.childLanes&r)!==r&&(c.childLanes|=r),n===s)break;n=n.return}}function Bo(n,r){wl=n,Zf=Eo=null,n=n.dependencies,n!==null&&n.firstContext!==null&&((n.lanes&r)!==0&&(Mt=!0),n.firstContext=null)}function Jt(n){var r=n._currentValue;if(Zf!==n)if(n={context:n,memoizedValue:r,next:null},Eo===null){if(wl===null)throw Error(t(308));Eo=n,wl.dependencies={lanes:0,firstContext:n}}else Eo=Eo.next=n;return r}var Hr=null;function nh(n){Hr===null?Hr=[n]:Hr.push(n)}function wk(n,r,s,c){var d=r.interleaved;return d===null?(s.next=s,nh(r)):(s.next=d.next,d.next=s),r.interleaved=s,zn(n,c)}function zn(n,r){n.lanes|=r;var s=n.alternate;for(s!==null&&(s.lanes|=r),s=n,n=n.return;n!==null;)n.childLanes|=r,s=n.alternate,s!==null&&(s.childLanes|=r),s=n,n=n.return;return s.tag===3?s.stateNode:null}var ur=!1;function rh(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Tk(n,r){n=n.updateQueue,r.updateQueue===n&&(r.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,effects:n.effects})}function Hn(n,r){return{eventTime:n,lane:r,tag:0,payload:null,callback:null,next:null}}function dr(n,r,s){var c=n.updateQueue;if(c===null)return null;if(c=c.shared,(Re&2)!==0){var d=c.pending;return d===null?r.next=r:(r.next=d.next,d.next=r),c.pending=r,zn(n,s)}return d=c.interleaved,d===null?(r.next=r,nh(c)):(r.next=d.next,d.next=r),c.interleaved=r,zn(n,s)}function Tl(n,r,s){if(r=r.updateQueue,r!==null&&(r=r.shared,(s&4194240)!==0)){var c=r.lanes;c&=n.pendingLanes,s|=c,r.lanes=s,vf(n,s)}}function Sk(n,r){var s=n.updateQueue,c=n.alternate;if(c!==null&&(c=c.updateQueue,s===c)){var d=null,h=null;if(s=s.firstBaseUpdate,s!==null){do{var m={eventTime:s.eventTime,lane:s.lane,tag:s.tag,payload:s.payload,callback:s.callback,next:null};h===null?d=h=m:h=h.next=m,s=s.next}while(s!==null);h===null?d=h=r:h=h.next=r}else d=h=r;s={baseState:c.baseState,firstBaseUpdate:d,lastBaseUpdate:h,shared:c.shared,effects:c.effects},n.updateQueue=s;return}n=s.lastBaseUpdate,n===null?s.firstBaseUpdate=r:n.next=r,s.lastBaseUpdate=r}function Sl(n,r,s,c){var d=n.updateQueue;ur=!1;var h=d.firstBaseUpdate,m=d.lastBaseUpdate,b=d.shared.pending;if(b!==null){d.shared.pending=null;var T=b,N=T.next;T.next=null,m===null?h=N:m.next=N,m=T;var F=n.alternate;F!==null&&(F=F.updateQueue,b=F.lastBaseUpdate,b!==m&&(b===null?F.firstBaseUpdate=N:b.next=N,F.lastBaseUpdate=T))}if(h!==null){var H=d.baseState;m=0,F=N=T=null,b=h;do{var M=b.lane,$=b.eventTime;if((c&M)===M){F!==null&&(F=F.next={eventTime:$,lane:0,tag:b.tag,payload:b.payload,callback:b.callback,next:null});e:{var ee=n,ne=b;switch(M=r,$=s,ne.tag){case 1:if(ee=ne.payload,typeof ee=="function"){H=ee.call($,H,M);break e}H=ee;break e;case 3:ee.flags=ee.flags&-65537|128;case 0:if(ee=ne.payload,M=typeof ee=="function"?ee.call($,H,M):ee,M==null)break e;H=G({},H,M);break e;case 2:ur=!0}}b.callback!==null&&b.lane!==0&&(n.flags|=64,M=d.effects,M===null?d.effects=[b]:M.push(b))}else $={eventTime:$,lane:M,tag:b.tag,payload:b.payload,callback:b.callback,next:null},F===null?(N=F=$,T=H):F=F.next=$,m|=M;if(b=b.next,b===null){if(b=d.shared.pending,b===null)break;M=b,b=M.next,M.next=null,d.lastBaseUpdate=M,d.shared.pending=null}}while(!0);if(F===null&&(T=H),d.baseState=T,d.firstBaseUpdate=N,d.lastBaseUpdate=F,r=d.shared.interleaved,r!==null){d=r;do m|=d.lane,d=d.next;while(d!==r)}else h===null&&(d.shared.lanes=0);Ur|=m,n.lanes=m,n.memoizedState=H}}function xk(n,r,s){if(n=r.effects,r.effects=null,n!==null)for(r=0;r<n.length;r++){var c=n[r],d=c.callback;if(d!==null){if(c.callback=null,c=s,typeof d!="function")throw Error(t(191,d));d.call(c)}}}var Li={},Sn=lr(Li),Di=lr(Li),Mi=lr(Li);function jr(n){if(n===Li)throw Error(t(174));return n}function oh(n,r){switch(qe(Mi,r),qe(Di,n),qe(Sn,Li),n=r.nodeType,n){case 9:case 11:r=(r=r.documentElement)?r.namespaceURI:of(null,"");break;default:n=n===8?r.parentNode:r,r=n.namespaceURI||null,n=n.tagName,r=of(r,n)}We(Sn),qe(Sn,r)}function Ao(){We(Sn),We(Di),We(Mi)}function Ck(n){jr(Mi.current);var r=jr(Sn.current),s=of(r,n.type);r!==s&&(qe(Di,n),qe(Sn,s))}function ih(n){Di.current===n&&(We(Sn),We(Di))}var Ye=lr(0);function xl(n){for(var r=n;r!==null;){if(r.tag===13){var s=r.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||s.data==="$?"||s.data==="$!"))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!==void 0){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var sh=[];function lh(){for(var n=0;n<sh.length;n++)sh[n]._workInProgressVersionPrimary=null;sh.length=0}var Cl=j.ReactCurrentDispatcher,ah=j.ReactCurrentBatchConfig,qr=0,Qe=null,ut=null,ht=null,El=!1,Fi=!1,zi=0,pB=0;function xt(){throw Error(t(321))}function ch(n,r){if(r===null)return!1;for(var s=0;s<r.length&&s<n.length;s++)if(!cn(n[s],r[s]))return!1;return!0}function uh(n,r,s,c,d,h){if(qr=h,Qe=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,Cl.current=n===null||n.memoizedState===null?yB:bB,n=s(c,d),Fi){h=0;do{if(Fi=!1,zi=0,25<=h)throw Error(t(301));h+=1,ht=ut=null,r.updateQueue=null,Cl.current=kB,n=s(c,d)}while(Fi)}if(Cl.current=Il,r=ut!==null&&ut.next!==null,qr=0,ht=ut=Qe=null,El=!1,r)throw Error(t(300));return n}function dh(){var n=zi!==0;return zi=0,n}function xn(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ht===null?Qe.memoizedState=ht=n:ht=ht.next=n,ht}function en(){if(ut===null){var n=Qe.alternate;n=n!==null?n.memoizedState:null}else n=ut.next;var r=ht===null?Qe.memoizedState:ht.next;if(r!==null)ht=r,ut=n;else{if(n===null)throw Error(t(310));ut=n,n={memoizedState:ut.memoizedState,baseState:ut.baseState,baseQueue:ut.baseQueue,queue:ut.queue,next:null},ht===null?Qe.memoizedState=ht=n:ht=ht.next=n}return ht}function Hi(n,r){return typeof r=="function"?r(n):r}function fh(n){var r=en(),s=r.queue;if(s===null)throw Error(t(311));s.lastRenderedReducer=n;var c=ut,d=c.baseQueue,h=s.pending;if(h!==null){if(d!==null){var m=d.next;d.next=h.next,h.next=m}c.baseQueue=d=h,s.pending=null}if(d!==null){h=d.next,c=c.baseState;var b=m=null,T=null,N=h;do{var F=N.lane;if((qr&F)===F)T!==null&&(T=T.next={lane:0,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null}),c=N.hasEagerState?N.eagerState:n(c,N.action);else{var H={lane:F,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null};T===null?(b=T=H,m=c):T=T.next=H,Qe.lanes|=F,Ur|=F}N=N.next}while(N!==null&&N!==h);T===null?m=c:T.next=b,cn(c,r.memoizedState)||(Mt=!0),r.memoizedState=c,r.baseState=m,r.baseQueue=T,s.lastRenderedState=c}if(n=s.interleaved,n!==null){d=n;do h=d.lane,Qe.lanes|=h,Ur|=h,d=d.next;while(d!==n)}else d===null&&(s.lanes=0);return[r.memoizedState,s.dispatch]}function hh(n){var r=en(),s=r.queue;if(s===null)throw Error(t(311));s.lastRenderedReducer=n;var c=s.dispatch,d=s.pending,h=r.memoizedState;if(d!==null){s.pending=null;var m=d=d.next;do h=n(h,m.action),m=m.next;while(m!==d);cn(h,r.memoizedState)||(Mt=!0),r.memoizedState=h,r.baseQueue===null&&(r.baseState=h),s.lastRenderedState=h}return[h,c]}function Ek(){}function Bk(n,r){var s=Qe,c=en(),d=r(),h=!cn(c.memoizedState,d);if(h&&(c.memoizedState=d,Mt=!0),c=c.queue,ph(_k.bind(null,s,c,n),[n]),c.getSnapshot!==r||h||ht!==null&&ht.memoizedState.tag&1){if(s.flags|=2048,ji(9,Ik.bind(null,s,c,d,r),void 0,null),pt===null)throw Error(t(349));(qr&30)!==0||Ak(s,r,d)}return d}function Ak(n,r,s){n.flags|=16384,n={getSnapshot:r,value:s},r=Qe.updateQueue,r===null?(r={lastEffect:null,stores:null},Qe.updateQueue=r,r.stores=[n]):(s=r.stores,s===null?r.stores=[n]:s.push(n))}function Ik(n,r,s,c){r.value=s,r.getSnapshot=c,Nk(r)&&Rk(n)}function _k(n,r,s){return s(function(){Nk(r)&&Rk(n)})}function Nk(n){var r=n.getSnapshot;n=n.value;try{var s=r();return!cn(n,s)}catch{return!0}}function Rk(n){var r=zn(n,1);r!==null&&pn(r,n,1,-1)}function Ok(n){var r=xn();return typeof n=="function"&&(n=n()),r.memoizedState=r.baseState=n,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Hi,lastRenderedState:n},r.queue=n,n=n.dispatch=vB.bind(null,Qe,n),[r.memoizedState,n]}function ji(n,r,s,c){return n={tag:n,create:r,destroy:s,deps:c,next:null},r=Qe.updateQueue,r===null?(r={lastEffect:null,stores:null},Qe.updateQueue=r,r.lastEffect=n.next=n):(s=r.lastEffect,s===null?r.lastEffect=n.next=n:(c=s.next,s.next=n,n.next=c,r.lastEffect=n)),n}function Pk(){return en().memoizedState}function Bl(n,r,s,c){var d=xn();Qe.flags|=n,d.memoizedState=ji(1|r,s,void 0,c===void 0?null:c)}function Al(n,r,s,c){var d=en();c=c===void 0?null:c;var h=void 0;if(ut!==null){var m=ut.memoizedState;if(h=m.destroy,c!==null&&ch(c,m.deps)){d.memoizedState=ji(r,s,h,c);return}}Qe.flags|=n,d.memoizedState=ji(1|r,s,h,c)}function Lk(n,r){return Bl(8390656,8,n,r)}function ph(n,r){return Al(2048,8,n,r)}function Dk(n,r){return Al(4,2,n,r)}function Mk(n,r){return Al(4,4,n,r)}function Fk(n,r){if(typeof r=="function")return n=n(),r(n),function(){r(null)};if(r!=null)return n=n(),r.current=n,function(){r.current=null}}function zk(n,r,s){return s=s!=null?s.concat([n]):null,Al(4,4,Fk.bind(null,r,n),s)}function gh(){}function Hk(n,r){var s=en();r=r===void 0?null:r;var c=s.memoizedState;return c!==null&&r!==null&&ch(r,c[1])?c[0]:(s.memoizedState=[n,r],n)}function jk(n,r){var s=en();r=r===void 0?null:r;var c=s.memoizedState;return c!==null&&r!==null&&ch(r,c[1])?c[0]:(n=n(),s.memoizedState=[n,r],n)}function qk(n,r,s){return(qr&21)===0?(n.baseState&&(n.baseState=!1,Mt=!0),n.memoizedState=s):(cn(s,r)||(s=yb(),Qe.lanes|=s,Ur|=s,n.baseState=!0),r)}function gB(n,r){var s=ze;ze=s!==0&&4>s?s:4,n(!0);var c=ah.transition;ah.transition={};try{n(!1),r()}finally{ze=s,ah.transition=c}}function Uk(){return en().memoizedState}function mB(n,r,s){var c=gr(n);if(s={lane:c,action:s,hasEagerState:!1,eagerState:null,next:null},Wk(n))Kk(r,s);else if(s=wk(n,r,s,c),s!==null){var d=Nt();pn(s,n,c,d),Vk(s,r,c)}}function vB(n,r,s){var c=gr(n),d={lane:c,action:s,hasEagerState:!1,eagerState:null,next:null};if(Wk(n))Kk(r,d);else{var h=n.alternate;if(n.lanes===0&&(h===null||h.lanes===0)&&(h=r.lastRenderedReducer,h!==null))try{var m=r.lastRenderedState,b=h(m,s);if(d.hasEagerState=!0,d.eagerState=b,cn(b,m)){var T=r.interleaved;T===null?(d.next=d,nh(r)):(d.next=T.next,T.next=d),r.interleaved=d;return}}catch{}finally{}s=wk(n,r,d,c),s!==null&&(d=Nt(),pn(s,n,c,d),Vk(s,r,c))}}function Wk(n){var r=n.alternate;return n===Qe||r!==null&&r===Qe}function Kk(n,r){Fi=El=!0;var s=n.pending;s===null?r.next=r:(r.next=s.next,s.next=r),n.pending=r}function Vk(n,r,s){if((s&4194240)!==0){var c=r.lanes;c&=n.pendingLanes,s|=c,r.lanes=s,vf(n,s)}}var Il={readContext:Jt,useCallback:xt,useContext:xt,useEffect:xt,useImperativeHandle:xt,useInsertionEffect:xt,useLayoutEffect:xt,useMemo:xt,useReducer:xt,useRef:xt,useState:xt,useDebugValue:xt,useDeferredValue:xt,useTransition:xt,useMutableSource:xt,useSyncExternalStore:xt,useId:xt,unstable_isNewReconciler:!1},yB={readContext:Jt,useCallback:function(n,r){return xn().memoizedState=[n,r===void 0?null:r],n},useContext:Jt,useEffect:Lk,useImperativeHandle:function(n,r,s){return s=s!=null?s.concat([n]):null,Bl(4194308,4,Fk.bind(null,r,n),s)},useLayoutEffect:function(n,r){return Bl(4194308,4,n,r)},useInsertionEffect:function(n,r){return Bl(4,2,n,r)},useMemo:function(n,r){var s=xn();return r=r===void 0?null:r,n=n(),s.memoizedState=[n,r],n},useReducer:function(n,r,s){var c=xn();return r=s!==void 0?s(r):r,c.memoizedState=c.baseState=r,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:r},c.queue=n,n=n.dispatch=mB.bind(null,Qe,n),[c.memoizedState,n]},useRef:function(n){var r=xn();return n={current:n},r.memoizedState=n},useState:Ok,useDebugValue:gh,useDeferredValue:function(n){return xn().memoizedState=n},useTransition:function(){var n=Ok(!1),r=n[0];return n=gB.bind(null,n[1]),xn().memoizedState=n,[r,n]},useMutableSource:function(){},useSyncExternalStore:function(n,r,s){var c=Qe,d=xn();if($e){if(s===void 0)throw Error(t(407));s=s()}else{if(s=r(),pt===null)throw Error(t(349));(qr&30)!==0||Ak(c,r,s)}d.memoizedState=s;var h={value:s,getSnapshot:r};return d.queue=h,Lk(_k.bind(null,c,h,n),[n]),c.flags|=2048,ji(9,Ik.bind(null,c,h,s,r),void 0,null),s},useId:function(){var n=xn(),r=pt.identifierPrefix;if($e){var s=Fn,c=Mn;s=(c&~(1<<32-an(c)-1)).toString(32)+s,r=":"+r+"R"+s,s=zi++,0<s&&(r+="H"+s.toString(32)),r+=":"}else s=pB++,r=":"+r+"r"+s.toString(32)+":";return n.memoizedState=r},unstable_isNewReconciler:!1},bB={readContext:Jt,useCallback:Hk,useContext:Jt,useEffect:ph,useImperativeHandle:zk,useInsertionEffect:Dk,useLayoutEffect:Mk,useMemo:jk,useReducer:fh,useRef:Pk,useState:function(){return fh(Hi)},useDebugValue:gh,useDeferredValue:function(n){var r=en();return qk(r,ut.memoizedState,n)},useTransition:function(){var n=fh(Hi)[0],r=en().memoizedState;return[n,r]},useMutableSource:Ek,useSyncExternalStore:Bk,useId:Uk,unstable_isNewReconciler:!1},kB={readContext:Jt,useCallback:Hk,useContext:Jt,useEffect:ph,useImperativeHandle:zk,useInsertionEffect:Dk,useLayoutEffect:Mk,useMemo:jk,useReducer:hh,useRef:Pk,useState:function(){return hh(Hi)},useDebugValue:gh,useDeferredValue:function(n){var r=en();return ut===null?r.memoizedState=n:qk(r,ut.memoizedState,n)},useTransition:function(){var n=hh(Hi)[0],r=en().memoizedState;return[n,r]},useMutableSource:Ek,useSyncExternalStore:Bk,useId:Uk,unstable_isNewReconciler:!1};function dn(n,r){if(n&&n.defaultProps){r=G({},r),n=n.defaultProps;for(var s in n)r[s]===void 0&&(r[s]=n[s]);return r}return r}function mh(n,r,s,c){r=n.memoizedState,s=s(c,r),s=s==null?r:G({},r,s),n.memoizedState=s,n.lanes===0&&(n.updateQueue.baseState=s)}var _l={isMounted:function(n){return(n=n._reactInternals)?Lr(n)===n:!1},enqueueSetState:function(n,r,s){n=n._reactInternals;var c=Nt(),d=gr(n),h=Hn(c,d);h.payload=r,s!=null&&(h.callback=s),r=dr(n,h,d),r!==null&&(pn(r,n,d,c),Tl(r,n,d))},enqueueReplaceState:function(n,r,s){n=n._reactInternals;var c=Nt(),d=gr(n),h=Hn(c,d);h.tag=1,h.payload=r,s!=null&&(h.callback=s),r=dr(n,h,d),r!==null&&(pn(r,n,d,c),Tl(r,n,d))},enqueueForceUpdate:function(n,r){n=n._reactInternals;var s=Nt(),c=gr(n),d=Hn(s,c);d.tag=2,r!=null&&(d.callback=r),r=dr(n,d,c),r!==null&&(pn(r,n,c,s),Tl(r,n,c))}};function $k(n,r,s,c,d,h,m){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(c,h,m):r.prototype&&r.prototype.isPureReactComponent?!Bi(s,c)||!Bi(d,h):!0}function Gk(n,r,s){var c=!1,d=ar,h=r.contextType;return typeof h=="object"&&h!==null?h=Jt(h):(d=Dt(r)?Mr:St.current,c=r.contextTypes,h=(c=c!=null)?wo(n,d):ar),r=new r(s,h),n.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=_l,n.stateNode=r,r._reactInternals=n,c&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=d,n.__reactInternalMemoizedMaskedChildContext=h),r}function Xk(n,r,s,c){n=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(s,c),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(s,c),r.state!==n&&_l.enqueueReplaceState(r,r.state,null)}function vh(n,r,s,c){var d=n.stateNode;d.props=s,d.state=n.memoizedState,d.refs={},rh(n);var h=r.contextType;typeof h=="object"&&h!==null?d.context=Jt(h):(h=Dt(r)?Mr:St.current,d.context=wo(n,h)),d.state=n.memoizedState,h=r.getDerivedStateFromProps,typeof h=="function"&&(mh(n,r,h,s),d.state=n.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(r=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),r!==d.state&&_l.enqueueReplaceState(d,d.state,null),Sl(n,s,d,c),d.state=n.memoizedState),typeof d.componentDidMount=="function"&&(n.flags|=4194308)}function Io(n,r){try{var s="",c=r;do s+=xe(c),c=c.return;while(c);var d=s}catch(h){d=`
|
|
16
|
-
Error generating stack: `+
|
|
17
|
-
`+h.stack}return{value:n,source:r,stack:d,digest:null}}function yh(n,r,s){return{value:n,source:null,stack:s??null,digest:r??null}}function bh(n,r){try{console.error(r.value)}catch(s){setTimeout(function(){throw s})}}var wB=typeof WeakMap=="function"?WeakMap:Map;function Yk(n,r,s){s=Hn(-1,s),s.tag=3,s.payload={element:null};var c=r.value;return s.callback=function(){Ml||(Ml=!0,Ph=c),bh(n,r)},s}function Qk(n,r,s){s=Hn(-1,s),s.tag=3;var c=n.type.getDerivedStateFromError;if(typeof c=="function"){var d=r.value;s.payload=function(){return c(d)},s.callback=function(){bh(n,r)}}var h=n.stateNode;return h!==null&&typeof h.componentDidCatch=="function"&&(s.callback=function(){bh(n,r),typeof c!="function"&&(hr===null?hr=new Set([this]):hr.add(this));var m=r.stack;this.componentDidCatch(r.value,{componentStack:m!==null?m:""})}),s}function Zk(n,r,s){var c=n.pingCache;if(c===null){c=n.pingCache=new wB;var d=new Set;c.set(r,d)}else d=c.get(r),d===void 0&&(d=new Set,c.set(r,d));d.has(s)||(d.add(s),n=LB.bind(null,n,r,s),r.then(n,n))}function Jk(n){do{var r;if((r=n.tag===13)&&(r=n.memoizedState,r=r!==null?r.dehydrated!==null:!0),r)return n;n=n.return}while(n!==null);return null}function ew(n,r,s,c,d){return(n.mode&1)===0?(n===r?n.flags|=65536:(n.flags|=128,s.flags|=131072,s.flags&=-52805,s.tag===1&&(s.alternate===null?s.tag=17:(r=Hn(-1,1),r.tag=2,dr(s,r,1))),s.lanes|=1),n):(n.flags|=65536,n.lanes=d,n)}var TB=j.ReactCurrentOwner,Mt=!1;function _t(n,r,s,c){r.child=n===null?kk(r,null,s,c):Co(r,n.child,s,c)}function tw(n,r,s,c,d){s=s.render;var h=r.ref;return Bo(r,d),c=uh(n,r,s,c,h,d),s=dh(),n!==null&&!Mt?(r.updateQueue=n.updateQueue,r.flags&=-2053,n.lanes&=~d,jn(n,r,d)):($e&&s&&$f(r),r.flags|=1,_t(n,r,c,d),r.child)}function nw(n,r,s,c,d){if(n===null){var h=s.type;return typeof h=="function"&&!jh(h)&&h.defaultProps===void 0&&s.compare===null&&s.defaultProps===void 0?(r.tag=15,r.type=h,rw(n,r,h,c,d)):(n=Ul(s.type,null,c,r,r.mode,d),n.ref=r.ref,n.return=r,r.child=n)}if(h=n.child,(n.lanes&d)===0){var m=h.memoizedProps;if(s=s.compare,s=s!==null?s:Bi,s(m,c)&&n.ref===r.ref)return jn(n,r,d)}return r.flags|=1,n=vr(h,c),n.ref=r.ref,n.return=r,r.child=n}function rw(n,r,s,c,d){if(n!==null){var h=n.memoizedProps;if(Bi(h,c)&&n.ref===r.ref)if(Mt=!1,r.pendingProps=c=h,(n.lanes&d)!==0)(n.flags&131072)!==0&&(Mt=!0);else return r.lanes=n.lanes,jn(n,r,d)}return kh(n,r,s,c,d)}function ow(n,r,s){var c=r.pendingProps,d=c.children,h=n!==null?n.memoizedState:null;if(c.mode==="hidden")if((r.mode&1)===0)r.memoizedState={baseLanes:0,cachePool:null,transitions:null},qe(No,Kt),Kt|=s;else{if((s&1073741824)===0)return n=h!==null?h.baseLanes|s:s,r.lanes=r.childLanes=1073741824,r.memoizedState={baseLanes:n,cachePool:null,transitions:null},r.updateQueue=null,qe(No,Kt),Kt|=n,null;r.memoizedState={baseLanes:0,cachePool:null,transitions:null},c=h!==null?h.baseLanes:s,qe(No,Kt),Kt|=c}else h!==null?(c=h.baseLanes|s,r.memoizedState=null):c=s,qe(No,Kt),Kt|=c;return _t(n,r,d,s),r.child}function iw(n,r){var s=r.ref;(n===null&&s!==null||n!==null&&n.ref!==s)&&(r.flags|=512,r.flags|=2097152)}function kh(n,r,s,c,d){var h=Dt(s)?Mr:St.current;return h=wo(r,h),Bo(r,d),s=uh(n,r,s,c,h,d),c=dh(),n!==null&&!Mt?(r.updateQueue=n.updateQueue,r.flags&=-2053,n.lanes&=~d,jn(n,r,d)):($e&&c&&$f(r),r.flags|=1,_t(n,r,s,d),r.child)}function sw(n,r,s,c,d){if(Dt(s)){var h=!0;pl(r)}else h=!1;if(Bo(r,d),r.stateNode===null)Rl(n,r),Gk(r,s,c),vh(r,s,c,d),c=!0;else if(n===null){var m=r.stateNode,b=r.memoizedProps;m.props=b;var T=m.context,N=s.contextType;typeof N=="object"&&N!==null?N=Jt(N):(N=Dt(s)?Mr:St.current,N=wo(r,N));var F=s.getDerivedStateFromProps,H=typeof F=="function"||typeof m.getSnapshotBeforeUpdate=="function";H||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(b!==c||T!==N)&&Xk(r,m,c,N),ur=!1;var M=r.memoizedState;m.state=M,Sl(r,c,m,d),T=r.memoizedState,b!==c||M!==T||Lt.current||ur?(typeof F=="function"&&(mh(r,s,F,c),T=r.memoizedState),(b=ur||$k(r,s,b,c,M,T,N))?(H||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(r.flags|=4194308)):(typeof m.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=c,r.memoizedState=T),m.props=c,m.state=T,m.context=N,c=b):(typeof m.componentDidMount=="function"&&(r.flags|=4194308),c=!1)}else{m=r.stateNode,Tk(n,r),b=r.memoizedProps,N=r.type===r.elementType?b:dn(r.type,b),m.props=N,H=r.pendingProps,M=m.context,T=s.contextType,typeof T=="object"&&T!==null?T=Jt(T):(T=Dt(s)?Mr:St.current,T=wo(r,T));var $=s.getDerivedStateFromProps;(F=typeof $=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(b!==H||M!==T)&&Xk(r,m,c,T),ur=!1,M=r.memoizedState,m.state=M,Sl(r,c,m,d);var ee=r.memoizedState;b!==H||M!==ee||Lt.current||ur?(typeof $=="function"&&(mh(r,s,$,c),ee=r.memoizedState),(N=ur||$k(r,s,N,c,M,ee,T)||!1)?(F||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(c,ee,T),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(c,ee,T)),typeof m.componentDidUpdate=="function"&&(r.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof m.componentDidUpdate!="function"||b===n.memoizedProps&&M===n.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||b===n.memoizedProps&&M===n.memoizedState||(r.flags|=1024),r.memoizedProps=c,r.memoizedState=ee),m.props=c,m.state=ee,m.context=T,c=N):(typeof m.componentDidUpdate!="function"||b===n.memoizedProps&&M===n.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||b===n.memoizedProps&&M===n.memoizedState||(r.flags|=1024),c=!1)}return wh(n,r,s,c,h,d)}function wh(n,r,s,c,d,h){iw(n,r);var m=(r.flags&128)!==0;if(!c&&!m)return d&&dk(r,s,!1),jn(n,r,h);c=r.stateNode,TB.current=r;var b=m&&typeof s.getDerivedStateFromError!="function"?null:c.render();return r.flags|=1,n!==null&&m?(r.child=Co(r,n.child,null,h),r.child=Co(r,null,b,h)):_t(n,r,b,h),r.memoizedState=c.state,d&&dk(r,s,!0),r.child}function lw(n){var r=n.stateNode;r.pendingContext?ck(n,r.pendingContext,r.pendingContext!==r.context):r.context&&ck(n,r.context,!1),oh(n,r.containerInfo)}function aw(n,r,s,c,d){return xo(),Qf(d),r.flags|=256,_t(n,r,s,c),r.child}var Th={dehydrated:null,treeContext:null,retryLane:0};function Sh(n){return{baseLanes:n,cachePool:null,transitions:null}}function cw(n,r,s){var c=r.pendingProps,d=Ye.current,h=!1,m=(r.flags&128)!==0,b;if((b=m)||(b=n!==null&&n.memoizedState===null?!1:(d&2)!==0),b?(h=!0,r.flags&=-129):(n===null||n.memoizedState!==null)&&(d|=1),qe(Ye,d&1),n===null)return Yf(r),n=r.memoizedState,n!==null&&(n=n.dehydrated,n!==null)?((r.mode&1)===0?r.lanes=1:n.data==="$!"?r.lanes=8:r.lanes=1073741824,null):(m=c.children,n=c.fallback,h?(c=r.mode,h=r.child,m={mode:"hidden",children:m},(c&1)===0&&h!==null?(h.childLanes=0,h.pendingProps=m):h=Wl(m,c,0,null),n=$r(n,c,s,null),h.return=r,n.return=r,h.sibling=n,r.child=h,r.child.memoizedState=Sh(s),r.memoizedState=Th,n):xh(r,m));if(d=n.memoizedState,d!==null&&(b=d.dehydrated,b!==null))return SB(n,r,m,c,b,d,s);if(h){h=c.fallback,m=r.mode,d=n.child,b=d.sibling;var T={mode:"hidden",children:c.children};return(m&1)===0&&r.child!==d?(c=r.child,c.childLanes=0,c.pendingProps=T,r.deletions=null):(c=vr(d,T),c.subtreeFlags=d.subtreeFlags&14680064),b!==null?h=vr(b,h):(h=$r(h,m,s,null),h.flags|=2),h.return=r,c.return=r,c.sibling=h,r.child=c,c=h,h=r.child,m=n.child.memoizedState,m=m===null?Sh(s):{baseLanes:m.baseLanes|s,cachePool:null,transitions:m.transitions},h.memoizedState=m,h.childLanes=n.childLanes&~s,r.memoizedState=Th,c}return h=n.child,n=h.sibling,c=vr(h,{mode:"visible",children:c.children}),(r.mode&1)===0&&(c.lanes=s),c.return=r,c.sibling=null,n!==null&&(s=r.deletions,s===null?(r.deletions=[n],r.flags|=16):s.push(n)),r.child=c,r.memoizedState=null,c}function xh(n,r){return r=Wl({mode:"visible",children:r},n.mode,0,null),r.return=n,n.child=r}function Nl(n,r,s,c){return c!==null&&Qf(c),Co(r,n.child,null,s),n=xh(r,r.pendingProps.children),n.flags|=2,r.memoizedState=null,n}function SB(n,r,s,c,d,h,m){if(s)return r.flags&256?(r.flags&=-257,c=yh(Error(t(422))),Nl(n,r,m,c)):r.memoizedState!==null?(r.child=n.child,r.flags|=128,null):(h=c.fallback,d=r.mode,c=Wl({mode:"visible",children:c.children},d,0,null),h=$r(h,d,m,null),h.flags|=2,c.return=r,h.return=r,c.sibling=h,r.child=c,(r.mode&1)!==0&&Co(r,n.child,null,m),r.child.memoizedState=Sh(m),r.memoizedState=Th,h);if((r.mode&1)===0)return Nl(n,r,m,null);if(d.data==="$!"){if(c=d.nextSibling&&d.nextSibling.dataset,c)var b=c.dgst;return c=b,h=Error(t(419)),c=yh(h,c,void 0),Nl(n,r,m,c)}if(b=(m&n.childLanes)!==0,Mt||b){if(c=pt,c!==null){switch(m&-m){case 4:d=2;break;case 16:d=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:d=32;break;case 536870912:d=268435456;break;default:d=0}d=(d&(c.suspendedLanes|m))!==0?0:d,d!==0&&d!==h.retryLane&&(h.retryLane=d,zn(n,d),pn(c,n,d,-1))}return Hh(),c=yh(Error(t(421))),Nl(n,r,m,c)}return d.data==="$?"?(r.flags|=128,r.child=n.child,r=DB.bind(null,n),d._reactRetry=r,null):(n=h.treeContext,Wt=sr(d.nextSibling),Ut=r,$e=!0,un=null,n!==null&&(Qt[Zt++]=Mn,Qt[Zt++]=Fn,Qt[Zt++]=Fr,Mn=n.id,Fn=n.overflow,Fr=r),r=xh(r,c.children),r.flags|=4096,r)}function uw(n,r,s){n.lanes|=r;var c=n.alternate;c!==null&&(c.lanes|=r),th(n.return,r,s)}function Ch(n,r,s,c,d){var h=n.memoizedState;h===null?n.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:c,tail:s,tailMode:d}:(h.isBackwards=r,h.rendering=null,h.renderingStartTime=0,h.last=c,h.tail=s,h.tailMode=d)}function dw(n,r,s){var c=r.pendingProps,d=c.revealOrder,h=c.tail;if(_t(n,r,c.children,s),c=Ye.current,(c&2)!==0)c=c&1|2,r.flags|=128;else{if(n!==null&&(n.flags&128)!==0)e:for(n=r.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&uw(n,s,r);else if(n.tag===19)uw(n,s,r);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===r)break e;for(;n.sibling===null;){if(n.return===null||n.return===r)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}c&=1}if(qe(Ye,c),(r.mode&1)===0)r.memoizedState=null;else switch(d){case"forwards":for(s=r.child,d=null;s!==null;)n=s.alternate,n!==null&&xl(n)===null&&(d=s),s=s.sibling;s=d,s===null?(d=r.child,r.child=null):(d=s.sibling,s.sibling=null),Ch(r,!1,d,s,h);break;case"backwards":for(s=null,d=r.child,r.child=null;d!==null;){if(n=d.alternate,n!==null&&xl(n)===null){r.child=d;break}n=d.sibling,d.sibling=s,s=d,d=n}Ch(r,!0,s,null,h);break;case"together":Ch(r,!1,null,null,void 0);break;default:r.memoizedState=null}return r.child}function Rl(n,r){(r.mode&1)===0&&n!==null&&(n.alternate=null,r.alternate=null,r.flags|=2)}function jn(n,r,s){if(n!==null&&(r.dependencies=n.dependencies),Ur|=r.lanes,(s&r.childLanes)===0)return null;if(n!==null&&r.child!==n.child)throw Error(t(153));if(r.child!==null){for(n=r.child,s=vr(n,n.pendingProps),r.child=s,s.return=r;n.sibling!==null;)n=n.sibling,s=s.sibling=vr(n,n.pendingProps),s.return=r;s.sibling=null}return r.child}function xB(n,r,s){switch(r.tag){case 3:lw(r),xo();break;case 5:Ck(r);break;case 1:Dt(r.type)&&pl(r);break;case 4:oh(r,r.stateNode.containerInfo);break;case 10:var c=r.type._context,d=r.memoizedProps.value;qe(kl,c._currentValue),c._currentValue=d;break;case 13:if(c=r.memoizedState,c!==null)return c.dehydrated!==null?(qe(Ye,Ye.current&1),r.flags|=128,null):(s&r.child.childLanes)!==0?cw(n,r,s):(qe(Ye,Ye.current&1),n=jn(n,r,s),n!==null?n.sibling:null);qe(Ye,Ye.current&1);break;case 19:if(c=(s&r.childLanes)!==0,(n.flags&128)!==0){if(c)return dw(n,r,s);r.flags|=128}if(d=r.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),qe(Ye,Ye.current),c)break;return null;case 22:case 23:return r.lanes=0,ow(n,r,s)}return jn(n,r,s)}var fw,Eh,hw,pw;fw=function(n,r){for(var s=r.child;s!==null;){if(s.tag===5||s.tag===6)n.appendChild(s.stateNode);else if(s.tag!==4&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return;s=s.return}s.sibling.return=s.return,s=s.sibling}},Eh=function(){},hw=function(n,r,s,c){var d=n.memoizedProps;if(d!==c){n=r.stateNode,jr(Sn.current);var h=null;switch(s){case"input":d=ef(n,d),c=ef(n,c),h=[];break;case"select":d=G({},d,{value:void 0}),c=G({},c,{value:void 0}),h=[];break;case"textarea":d=rf(n,d),c=rf(n,c),h=[];break;default:typeof d.onClick!="function"&&typeof c.onClick=="function"&&(n.onclick=dl)}sf(s,c);var m;s=null;for(N in d)if(!c.hasOwnProperty(N)&&d.hasOwnProperty(N)&&d[N]!=null)if(N==="style"){var b=d[N];for(m in b)b.hasOwnProperty(m)&&(s||(s={}),s[m]="")}else N!=="dangerouslySetInnerHTML"&&N!=="children"&&N!=="suppressContentEditableWarning"&&N!=="suppressHydrationWarning"&&N!=="autoFocus"&&(i.hasOwnProperty(N)?h||(h=[]):(h=h||[]).push(N,null));for(N in c){var T=c[N];if(b=d?.[N],c.hasOwnProperty(N)&&T!==b&&(T!=null||b!=null))if(N==="style")if(b){for(m in b)!b.hasOwnProperty(m)||T&&T.hasOwnProperty(m)||(s||(s={}),s[m]="");for(m in T)T.hasOwnProperty(m)&&b[m]!==T[m]&&(s||(s={}),s[m]=T[m])}else s||(h||(h=[]),h.push(N,s)),s=T;else N==="dangerouslySetInnerHTML"?(T=T?T.__html:void 0,b=b?b.__html:void 0,T!=null&&b!==T&&(h=h||[]).push(N,T)):N==="children"?typeof T!="string"&&typeof T!="number"||(h=h||[]).push(N,""+T):N!=="suppressContentEditableWarning"&&N!=="suppressHydrationWarning"&&(i.hasOwnProperty(N)?(T!=null&&N==="onScroll"&&Ue("scroll",n),h||b===T||(h=[])):(h=h||[]).push(N,T))}s&&(h=h||[]).push("style",s);var N=h;(r.updateQueue=N)&&(r.flags|=4)}},pw=function(n,r,s,c){s!==c&&(r.flags|=4)};function qi(n,r){if(!$e)switch(n.tailMode){case"hidden":r=n.tail;for(var s=null;r!==null;)r.alternate!==null&&(s=r),r=r.sibling;s===null?n.tail=null:s.sibling=null;break;case"collapsed":s=n.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?r||n.tail===null?n.tail=null:n.tail.sibling=null:c.sibling=null}}function Ct(n){var r=n.alternate!==null&&n.alternate.child===n.child,s=0,c=0;if(r)for(var d=n.child;d!==null;)s|=d.lanes|d.childLanes,c|=d.subtreeFlags&14680064,c|=d.flags&14680064,d.return=n,d=d.sibling;else for(d=n.child;d!==null;)s|=d.lanes|d.childLanes,c|=d.subtreeFlags,c|=d.flags,d.return=n,d=d.sibling;return n.subtreeFlags|=c,n.childLanes=s,r}function CB(n,r,s){var c=r.pendingProps;switch(Gf(r),r.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ct(r),null;case 1:return Dt(r.type)&&hl(),Ct(r),null;case 3:return c=r.stateNode,Ao(),We(Lt),We(St),lh(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(n===null||n.child===null)&&(yl(r)?r.flags|=4:n===null||n.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,un!==null&&(Mh(un),un=null))),Eh(n,r),Ct(r),null;case 5:ih(r);var d=jr(Mi.current);if(s=r.type,n!==null&&r.stateNode!=null)hw(n,r,s,c,d),n.ref!==r.ref&&(r.flags|=512,r.flags|=2097152);else{if(!c){if(r.stateNode===null)throw Error(t(166));return Ct(r),null}if(n=jr(Sn.current),yl(r)){c=r.stateNode,s=r.type;var h=r.memoizedProps;switch(c[Tn]=r,c[Ri]=h,n=(r.mode&1)!==0,s){case"dialog":Ue("cancel",c),Ue("close",c);break;case"iframe":case"object":case"embed":Ue("load",c);break;case"video":case"audio":for(d=0;d<Ii.length;d++)Ue(Ii[d],c);break;case"source":Ue("error",c);break;case"img":case"image":case"link":Ue("error",c),Ue("load",c);break;case"details":Ue("toggle",c);break;case"input":Gy(c,h),Ue("invalid",c);break;case"select":c._wrapperState={wasMultiple:!!h.multiple},Ue("invalid",c);break;case"textarea":Qy(c,h),Ue("invalid",c)}sf(s,h),d=null;for(var m in h)if(h.hasOwnProperty(m)){var b=h[m];m==="children"?typeof b=="string"?c.textContent!==b&&(h.suppressHydrationWarning!==!0&&ul(c.textContent,b,n),d=["children",b]):typeof b=="number"&&c.textContent!==""+b&&(h.suppressHydrationWarning!==!0&&ul(c.textContent,b,n),d=["children",""+b]):i.hasOwnProperty(m)&&b!=null&&m==="onScroll"&&Ue("scroll",c)}switch(s){case"input":Jn(c),Yy(c,h,!0);break;case"textarea":Jn(c),Jy(c);break;case"select":case"option":break;default:typeof h.onClick=="function"&&(c.onclick=dl)}c=d,r.updateQueue=c,c!==null&&(r.flags|=4)}else{m=d.nodeType===9?d:d.ownerDocument,n==="http://www.w3.org/1999/xhtml"&&(n=eb(s)),n==="http://www.w3.org/1999/xhtml"?s==="script"?(n=m.createElement("div"),n.innerHTML="<script><\/script>",n=n.removeChild(n.firstChild)):typeof c.is=="string"?n=m.createElement(s,{is:c.is}):(n=m.createElement(s),s==="select"&&(m=n,c.multiple?m.multiple=!0:c.size&&(m.size=c.size))):n=m.createElementNS(n,s),n[Tn]=r,n[Ri]=c,fw(n,r,!1,!1),r.stateNode=n;e:{switch(m=lf(s,c),s){case"dialog":Ue("cancel",n),Ue("close",n),d=c;break;case"iframe":case"object":case"embed":Ue("load",n),d=c;break;case"video":case"audio":for(d=0;d<Ii.length;d++)Ue(Ii[d],n);d=c;break;case"source":Ue("error",n),d=c;break;case"img":case"image":case"link":Ue("error",n),Ue("load",n),d=c;break;case"details":Ue("toggle",n),d=c;break;case"input":Gy(n,c),d=ef(n,c),Ue("invalid",n);break;case"option":d=c;break;case"select":n._wrapperState={wasMultiple:!!c.multiple},d=G({},c,{value:void 0}),Ue("invalid",n);break;case"textarea":Qy(n,c),d=rf(n,c),Ue("invalid",n);break;default:d=c}sf(s,d),b=d;for(h in b)if(b.hasOwnProperty(h)){var T=b[h];h==="style"?rb(n,T):h==="dangerouslySetInnerHTML"?(T=T?T.__html:void 0,T!=null&&tb(n,T)):h==="children"?typeof T=="string"?(s!=="textarea"||T!=="")&&ui(n,T):typeof T=="number"&&ui(n,""+T):h!=="suppressContentEditableWarning"&&h!=="suppressHydrationWarning"&&h!=="autoFocus"&&(i.hasOwnProperty(h)?T!=null&&h==="onScroll"&&Ue("scroll",n):T!=null&&K(n,h,T,m))}switch(s){case"input":Jn(n),Yy(n,c,!1);break;case"textarea":Jn(n),Jy(n);break;case"option":c.value!=null&&n.setAttribute("value",""+Pe(c.value));break;case"select":n.multiple=!!c.multiple,h=c.value,h!=null?ao(n,!!c.multiple,h,!1):c.defaultValue!=null&&ao(n,!!c.multiple,c.defaultValue,!0);break;default:typeof d.onClick=="function"&&(n.onclick=dl)}switch(s){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}}c&&(r.flags|=4)}r.ref!==null&&(r.flags|=512,r.flags|=2097152)}return Ct(r),null;case 6:if(n&&r.stateNode!=null)pw(n,r,n.memoizedProps,c);else{if(typeof c!="string"&&r.stateNode===null)throw Error(t(166));if(s=jr(Mi.current),jr(Sn.current),yl(r)){if(c=r.stateNode,s=r.memoizedProps,c[Tn]=r,(h=c.nodeValue!==s)&&(n=Ut,n!==null))switch(n.tag){case 3:ul(c.nodeValue,s,(n.mode&1)!==0);break;case 5:n.memoizedProps.suppressHydrationWarning!==!0&&ul(c.nodeValue,s,(n.mode&1)!==0)}h&&(r.flags|=4)}else c=(s.nodeType===9?s:s.ownerDocument).createTextNode(c),c[Tn]=r,r.stateNode=c}return Ct(r),null;case 13:if(We(Ye),c=r.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if($e&&Wt!==null&&(r.mode&1)!==0&&(r.flags&128)===0)vk(),xo(),r.flags|=98560,h=!1;else if(h=yl(r),c!==null&&c.dehydrated!==null){if(n===null){if(!h)throw Error(t(318));if(h=r.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(t(317));h[Tn]=r}else xo(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Ct(r),h=!1}else un!==null&&(Mh(un),un=null),h=!0;if(!h)return r.flags&65536?r:null}return(r.flags&128)!==0?(r.lanes=s,r):(c=c!==null,c!==(n!==null&&n.memoizedState!==null)&&c&&(r.child.flags|=8192,(r.mode&1)!==0&&(n===null||(Ye.current&1)!==0?dt===0&&(dt=3):Hh())),r.updateQueue!==null&&(r.flags|=4),Ct(r),null);case 4:return Ao(),Eh(n,r),n===null&&_i(r.stateNode.containerInfo),Ct(r),null;case 10:return eh(r.type._context),Ct(r),null;case 17:return Dt(r.type)&&hl(),Ct(r),null;case 19:if(We(Ye),h=r.memoizedState,h===null)return Ct(r),null;if(c=(r.flags&128)!==0,m=h.rendering,m===null)if(c)qi(h,!1);else{if(dt!==0||n!==null&&(n.flags&128)!==0)for(n=r.child;n!==null;){if(m=xl(n),m!==null){for(r.flags|=128,qi(h,!1),c=m.updateQueue,c!==null&&(r.updateQueue=c,r.flags|=4),r.subtreeFlags=0,c=s,s=r.child;s!==null;)h=s,n=c,h.flags&=14680066,m=h.alternate,m===null?(h.childLanes=0,h.lanes=n,h.child=null,h.subtreeFlags=0,h.memoizedProps=null,h.memoizedState=null,h.updateQueue=null,h.dependencies=null,h.stateNode=null):(h.childLanes=m.childLanes,h.lanes=m.lanes,h.child=m.child,h.subtreeFlags=0,h.deletions=null,h.memoizedProps=m.memoizedProps,h.memoizedState=m.memoizedState,h.updateQueue=m.updateQueue,h.type=m.type,n=m.dependencies,h.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),s=s.sibling;return qe(Ye,Ye.current&1|2),r.child}n=n.sibling}h.tail!==null&&nt()>Ro&&(r.flags|=128,c=!0,qi(h,!1),r.lanes=4194304)}else{if(!c)if(n=xl(m),n!==null){if(r.flags|=128,c=!0,s=n.updateQueue,s!==null&&(r.updateQueue=s,r.flags|=4),qi(h,!0),h.tail===null&&h.tailMode==="hidden"&&!m.alternate&&!$e)return Ct(r),null}else 2*nt()-h.renderingStartTime>Ro&&s!==1073741824&&(r.flags|=128,c=!0,qi(h,!1),r.lanes=4194304);h.isBackwards?(m.sibling=r.child,r.child=m):(s=h.last,s!==null?s.sibling=m:r.child=m,h.last=m)}return h.tail!==null?(r=h.tail,h.rendering=r,h.tail=r.sibling,h.renderingStartTime=nt(),r.sibling=null,s=Ye.current,qe(Ye,c?s&1|2:s&1),r):(Ct(r),null);case 22:case 23:return zh(),c=r.memoizedState!==null,n!==null&&n.memoizedState!==null!==c&&(r.flags|=8192),c&&(r.mode&1)!==0?(Kt&1073741824)!==0&&(Ct(r),r.subtreeFlags&6&&(r.flags|=8192)):Ct(r),null;case 24:return null;case 25:return null}throw Error(t(156,r.tag))}function EB(n,r){switch(Gf(r),r.tag){case 1:return Dt(r.type)&&hl(),n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 3:return Ao(),We(Lt),We(St),lh(),n=r.flags,(n&65536)!==0&&(n&128)===0?(r.flags=n&-65537|128,r):null;case 5:return ih(r),null;case 13:if(We(Ye),n=r.memoizedState,n!==null&&n.dehydrated!==null){if(r.alternate===null)throw Error(t(340));xo()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 19:return We(Ye),null;case 4:return Ao(),null;case 10:return eh(r.type._context),null;case 22:case 23:return zh(),null;case 24:return null;default:return null}}var Ol=!1,Et=!1,BB=typeof WeakSet=="function"?WeakSet:Set,Y=null;function _o(n,r){var s=n.ref;if(s!==null)if(typeof s=="function")try{s(null)}catch(c){et(n,r,c)}else s.current=null}function Bh(n,r,s){try{s()}catch(c){et(n,r,c)}}var gw=!1;function AB(n,r){if(zf=Js,n=$b(),Nf(n)){if("selectionStart"in n)var s={start:n.selectionStart,end:n.selectionEnd};else e:{s=(s=n.ownerDocument)&&s.defaultView||window;var c=s.getSelection&&s.getSelection();if(c&&c.rangeCount!==0){s=c.anchorNode;var d=c.anchorOffset,h=c.focusNode;c=c.focusOffset;try{s.nodeType,h.nodeType}catch{s=null;break e}var m=0,b=-1,T=-1,N=0,F=0,H=n,M=null;t:for(;;){for(var $;H!==s||d!==0&&H.nodeType!==3||(b=m+d),H!==h||c!==0&&H.nodeType!==3||(T=m+c),H.nodeType===3&&(m+=H.nodeValue.length),($=H.firstChild)!==null;)M=H,H=$;for(;;){if(H===n)break t;if(M===s&&++N===d&&(b=m),M===h&&++F===c&&(T=m),($=H.nextSibling)!==null)break;H=M,M=H.parentNode}H=$}s=b===-1||T===-1?null:{start:b,end:T}}else s=null}s=s||{start:0,end:0}}else s=null;for(Hf={focusedElem:n,selectionRange:s},Js=!1,Y=r;Y!==null;)if(r=Y,n=r.child,(r.subtreeFlags&1028)!==0&&n!==null)n.return=r,Y=n;else for(;Y!==null;){r=Y;try{var ee=r.alternate;if((r.flags&1024)!==0)switch(r.tag){case 0:case 11:case 15:break;case 1:if(ee!==null){var ne=ee.memoizedProps,rt=ee.memoizedState,A=r.stateNode,x=A.getSnapshotBeforeUpdate(r.elementType===r.type?ne:dn(r.type,ne),rt);A.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var I=r.stateNode.containerInfo;I.nodeType===1?I.textContent="":I.nodeType===9&&I.documentElement&&I.removeChild(I.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(t(163))}}catch(q){et(r,r.return,q)}if(n=r.sibling,n!==null){n.return=r.return,Y=n;break}Y=r.return}return ee=gw,gw=!1,ee}function Ui(n,r,s){var c=r.updateQueue;if(c=c!==null?c.lastEffect:null,c!==null){var d=c=c.next;do{if((d.tag&n)===n){var h=d.destroy;d.destroy=void 0,h!==void 0&&Bh(r,s,h)}d=d.next}while(d!==c)}}function Pl(n,r){if(r=r.updateQueue,r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&n)===n){var c=s.create;s.destroy=c()}s=s.next}while(s!==r)}}function Ah(n){var r=n.ref;if(r!==null){var s=n.stateNode;switch(n.tag){case 5:n=s;break;default:n=s}typeof r=="function"?r(n):r.current=n}}function mw(n){var r=n.alternate;r!==null&&(n.alternate=null,mw(r)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(r=n.stateNode,r!==null&&(delete r[Tn],delete r[Ri],delete r[Wf],delete r[uB],delete r[dB])),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}function vw(n){return n.tag===5||n.tag===3||n.tag===4}function yw(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||vw(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Ih(n,r,s){var c=n.tag;if(c===5||c===6)n=n.stateNode,r?s.nodeType===8?s.parentNode.insertBefore(n,r):s.insertBefore(n,r):(s.nodeType===8?(r=s.parentNode,r.insertBefore(n,s)):(r=s,r.appendChild(n)),s=s._reactRootContainer,s!=null||r.onclick!==null||(r.onclick=dl));else if(c!==4&&(n=n.child,n!==null))for(Ih(n,r,s),n=n.sibling;n!==null;)Ih(n,r,s),n=n.sibling}function _h(n,r,s){var c=n.tag;if(c===5||c===6)n=n.stateNode,r?s.insertBefore(n,r):s.appendChild(n);else if(c!==4&&(n=n.child,n!==null))for(_h(n,r,s),n=n.sibling;n!==null;)_h(n,r,s),n=n.sibling}var bt=null,fn=!1;function fr(n,r,s){for(s=s.child;s!==null;)bw(n,r,s),s=s.sibling}function bw(n,r,s){if(wn&&typeof wn.onCommitFiberUnmount=="function")try{wn.onCommitFiberUnmount($s,s)}catch{}switch(s.tag){case 5:Et||_o(s,r);case 6:var c=bt,d=fn;bt=null,fr(n,r,s),bt=c,fn=d,bt!==null&&(fn?(n=bt,s=s.stateNode,n.nodeType===8?n.parentNode.removeChild(s):n.removeChild(s)):bt.removeChild(s.stateNode));break;case 18:bt!==null&&(fn?(n=bt,s=s.stateNode,n.nodeType===8?Uf(n.parentNode,s):n.nodeType===1&&Uf(n,s),wi(n)):Uf(bt,s.stateNode));break;case 4:c=bt,d=fn,bt=s.stateNode.containerInfo,fn=!0,fr(n,r,s),bt=c,fn=d;break;case 0:case 11:case 14:case 15:if(!Et&&(c=s.updateQueue,c!==null&&(c=c.lastEffect,c!==null))){d=c=c.next;do{var h=d,m=h.destroy;h=h.tag,m!==void 0&&((h&2)!==0||(h&4)!==0)&&Bh(s,r,m),d=d.next}while(d!==c)}fr(n,r,s);break;case 1:if(!Et&&(_o(s,r),c=s.stateNode,typeof c.componentWillUnmount=="function"))try{c.props=s.memoizedProps,c.state=s.memoizedState,c.componentWillUnmount()}catch(b){et(s,r,b)}fr(n,r,s);break;case 21:fr(n,r,s);break;case 22:s.mode&1?(Et=(c=Et)||s.memoizedState!==null,fr(n,r,s),Et=c):fr(n,r,s);break;default:fr(n,r,s)}}function kw(n){var r=n.updateQueue;if(r!==null){n.updateQueue=null;var s=n.stateNode;s===null&&(s=n.stateNode=new BB),r.forEach(function(c){var d=MB.bind(null,n,c);s.has(c)||(s.add(c),c.then(d,d))})}}function hn(n,r){var s=r.deletions;if(s!==null)for(var c=0;c<s.length;c++){var d=s[c];try{var h=n,m=r,b=m;e:for(;b!==null;){switch(b.tag){case 5:bt=b.stateNode,fn=!1;break e;case 3:bt=b.stateNode.containerInfo,fn=!0;break e;case 4:bt=b.stateNode.containerInfo,fn=!0;break e}b=b.return}if(bt===null)throw Error(t(160));bw(h,m,d),bt=null,fn=!1;var T=d.alternate;T!==null&&(T.return=null),d.return=null}catch(N){et(d,r,N)}}if(r.subtreeFlags&12854)for(r=r.child;r!==null;)ww(r,n),r=r.sibling}function ww(n,r){var s=n.alternate,c=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:if(hn(r,n),Cn(n),c&4){try{Ui(3,n,n.return),Pl(3,n)}catch(ne){et(n,n.return,ne)}try{Ui(5,n,n.return)}catch(ne){et(n,n.return,ne)}}break;case 1:hn(r,n),Cn(n),c&512&&s!==null&&_o(s,s.return);break;case 5:if(hn(r,n),Cn(n),c&512&&s!==null&&_o(s,s.return),n.flags&32){var d=n.stateNode;try{ui(d,"")}catch(ne){et(n,n.return,ne)}}if(c&4&&(d=n.stateNode,d!=null)){var h=n.memoizedProps,m=s!==null?s.memoizedProps:h,b=n.type,T=n.updateQueue;if(n.updateQueue=null,T!==null)try{b==="input"&&h.type==="radio"&&h.name!=null&&Xy(d,h),lf(b,m);var N=lf(b,h);for(m=0;m<T.length;m+=2){var F=T[m],H=T[m+1];F==="style"?rb(d,H):F==="dangerouslySetInnerHTML"?tb(d,H):F==="children"?ui(d,H):K(d,F,H,N)}switch(b){case"input":tf(d,h);break;case"textarea":Zy(d,h);break;case"select":var M=d._wrapperState.wasMultiple;d._wrapperState.wasMultiple=!!h.multiple;var $=h.value;$!=null?ao(d,!!h.multiple,$,!1):M!==!!h.multiple&&(h.defaultValue!=null?ao(d,!!h.multiple,h.defaultValue,!0):ao(d,!!h.multiple,h.multiple?[]:"",!1))}d[Ri]=h}catch(ne){et(n,n.return,ne)}}break;case 6:if(hn(r,n),Cn(n),c&4){if(n.stateNode===null)throw Error(t(162));d=n.stateNode,h=n.memoizedProps;try{d.nodeValue=h}catch(ne){et(n,n.return,ne)}}break;case 3:if(hn(r,n),Cn(n),c&4&&s!==null&&s.memoizedState.isDehydrated)try{wi(r.containerInfo)}catch(ne){et(n,n.return,ne)}break;case 4:hn(r,n),Cn(n);break;case 13:hn(r,n),Cn(n),d=n.child,d.flags&8192&&(h=d.memoizedState!==null,d.stateNode.isHidden=h,!h||d.alternate!==null&&d.alternate.memoizedState!==null||(Oh=nt())),c&4&&kw(n);break;case 22:if(F=s!==null&&s.memoizedState!==null,n.mode&1?(Et=(N=Et)||F,hn(r,n),Et=N):hn(r,n),Cn(n),c&8192){if(N=n.memoizedState!==null,(n.stateNode.isHidden=N)&&!F&&(n.mode&1)!==0)for(Y=n,F=n.child;F!==null;){for(H=Y=F;Y!==null;){switch(M=Y,$=M.child,M.tag){case 0:case 11:case 14:case 15:Ui(4,M,M.return);break;case 1:_o(M,M.return);var ee=M.stateNode;if(typeof ee.componentWillUnmount=="function"){c=M,s=M.return;try{r=c,ee.props=r.memoizedProps,ee.state=r.memoizedState,ee.componentWillUnmount()}catch(ne){et(c,s,ne)}}break;case 5:_o(M,M.return);break;case 22:if(M.memoizedState!==null){xw(H);continue}}$!==null?($.return=M,Y=$):xw(H)}F=F.sibling}e:for(F=null,H=n;;){if(H.tag===5){if(F===null){F=H;try{d=H.stateNode,N?(h=d.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none"):(b=H.stateNode,T=H.memoizedProps.style,m=T!=null&&T.hasOwnProperty("display")?T.display:null,b.style.display=nb("display",m))}catch(ne){et(n,n.return,ne)}}}else if(H.tag===6){if(F===null)try{H.stateNode.nodeValue=N?"":H.memoizedProps}catch(ne){et(n,n.return,ne)}}else if((H.tag!==22&&H.tag!==23||H.memoizedState===null||H===n)&&H.child!==null){H.child.return=H,H=H.child;continue}if(H===n)break e;for(;H.sibling===null;){if(H.return===null||H.return===n)break e;F===H&&(F=null),H=H.return}F===H&&(F=null),H.sibling.return=H.return,H=H.sibling}}break;case 19:hn(r,n),Cn(n),c&4&&kw(n);break;case 21:break;default:hn(r,n),Cn(n)}}function Cn(n){var r=n.flags;if(r&2){try{e:{for(var s=n.return;s!==null;){if(vw(s)){var c=s;break e}s=s.return}throw Error(t(160))}switch(c.tag){case 5:var d=c.stateNode;c.flags&32&&(ui(d,""),c.flags&=-33);var h=yw(n);_h(n,h,d);break;case 3:case 4:var m=c.stateNode.containerInfo,b=yw(n);Ih(n,b,m);break;default:throw Error(t(161))}}catch(T){et(n,n.return,T)}n.flags&=-3}r&4096&&(n.flags&=-4097)}function IB(n,r,s){Y=n,Tw(n)}function Tw(n,r,s){for(var c=(n.mode&1)!==0;Y!==null;){var d=Y,h=d.child;if(d.tag===22&&c){var m=d.memoizedState!==null||Ol;if(!m){var b=d.alternate,T=b!==null&&b.memoizedState!==null||Et;b=Ol;var N=Et;if(Ol=m,(Et=T)&&!N)for(Y=d;Y!==null;)m=Y,T=m.child,m.tag===22&&m.memoizedState!==null?Cw(d):T!==null?(T.return=m,Y=T):Cw(d);for(;h!==null;)Y=h,Tw(h),h=h.sibling;Y=d,Ol=b,Et=N}Sw(n)}else(d.subtreeFlags&8772)!==0&&h!==null?(h.return=d,Y=h):Sw(n)}}function Sw(n){for(;Y!==null;){var r=Y;if((r.flags&8772)!==0){var s=r.alternate;try{if((r.flags&8772)!==0)switch(r.tag){case 0:case 11:case 15:Et||Pl(5,r);break;case 1:var c=r.stateNode;if(r.flags&4&&!Et)if(s===null)c.componentDidMount();else{var d=r.elementType===r.type?s.memoizedProps:dn(r.type,s.memoizedProps);c.componentDidUpdate(d,s.memoizedState,c.__reactInternalSnapshotBeforeUpdate)}var h=r.updateQueue;h!==null&&xk(r,h,c);break;case 3:var m=r.updateQueue;if(m!==null){if(s=null,r.child!==null)switch(r.child.tag){case 5:s=r.child.stateNode;break;case 1:s=r.child.stateNode}xk(r,m,s)}break;case 5:var b=r.stateNode;if(s===null&&r.flags&4){s=b;var T=r.memoizedProps;switch(r.type){case"button":case"input":case"select":case"textarea":T.autoFocus&&s.focus();break;case"img":T.src&&(s.src=T.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(r.memoizedState===null){var N=r.alternate;if(N!==null){var F=N.memoizedState;if(F!==null){var H=F.dehydrated;H!==null&&wi(H)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(t(163))}Et||r.flags&512&&Ah(r)}catch(M){et(r,r.return,M)}}if(r===n){Y=null;break}if(s=r.sibling,s!==null){s.return=r.return,Y=s;break}Y=r.return}}function xw(n){for(;Y!==null;){var r=Y;if(r===n){Y=null;break}var s=r.sibling;if(s!==null){s.return=r.return,Y=s;break}Y=r.return}}function Cw(n){for(;Y!==null;){var r=Y;try{switch(r.tag){case 0:case 11:case 15:var s=r.return;try{Pl(4,r)}catch(T){et(r,s,T)}break;case 1:var c=r.stateNode;if(typeof c.componentDidMount=="function"){var d=r.return;try{c.componentDidMount()}catch(T){et(r,d,T)}}var h=r.return;try{Ah(r)}catch(T){et(r,h,T)}break;case 5:var m=r.return;try{Ah(r)}catch(T){et(r,m,T)}}}catch(T){et(r,r.return,T)}if(r===n){Y=null;break}var b=r.sibling;if(b!==null){b.return=r.return,Y=b;break}Y=r.return}}var _B=Math.ceil,Ll=j.ReactCurrentDispatcher,Nh=j.ReactCurrentOwner,tn=j.ReactCurrentBatchConfig,Re=0,pt=null,at=null,kt=0,Kt=0,No=lr(0),dt=0,Wi=null,Ur=0,Dl=0,Rh=0,Ki=null,Ft=null,Oh=0,Ro=1/0,qn=null,Ml=!1,Ph=null,hr=null,Fl=!1,pr=null,zl=0,Vi=0,Lh=null,Hl=-1,jl=0;function Nt(){return(Re&6)!==0?nt():Hl!==-1?Hl:Hl=nt()}function gr(n){return(n.mode&1)===0?1:(Re&2)!==0&&kt!==0?kt&-kt:hB.transition!==null?(jl===0&&(jl=yb()),jl):(n=ze,n!==0||(n=window.event,n=n===void 0?16:Bb(n.type)),n)}function pn(n,r,s,c){if(50<Vi)throw Vi=0,Lh=null,Error(t(185));mi(n,s,c),((Re&2)===0||n!==pt)&&(n===pt&&((Re&2)===0&&(Dl|=s),dt===4&&mr(n,kt)),zt(n,c),s===1&&Re===0&&(r.mode&1)===0&&(Ro=nt()+500,gl&&cr()))}function zt(n,r){var s=n.callbackNode;hE(n,r);var c=Ys(n,n===pt?kt:0);if(c===0)s!==null&&gb(s),n.callbackNode=null,n.callbackPriority=0;else if(r=c&-c,n.callbackPriority!==r){if(s!=null&&gb(s),r===1)n.tag===0?fB(Bw.bind(null,n)):fk(Bw.bind(null,n)),aB(function(){(Re&6)===0&&cr()}),s=null;else{switch(bb(c)){case 1:s=pf;break;case 4:s=mb;break;case 16:s=Vs;break;case 536870912:s=vb;break;default:s=Vs}s=Lw(s,Ew.bind(null,n))}n.callbackPriority=r,n.callbackNode=s}}function Ew(n,r){if(Hl=-1,jl=0,(Re&6)!==0)throw Error(t(327));var s=n.callbackNode;if(Oo()&&n.callbackNode!==s)return null;var c=Ys(n,n===pt?kt:0);if(c===0)return null;if((c&30)!==0||(c&n.expiredLanes)!==0||r)r=ql(n,c);else{r=c;var d=Re;Re|=2;var h=Iw();(pt!==n||kt!==r)&&(qn=null,Ro=nt()+500,Kr(n,r));do try{OB();break}catch(b){Aw(n,b)}while(!0);Jf(),Ll.current=h,Re=d,at!==null?r=0:(pt=null,kt=0,r=dt)}if(r!==0){if(r===2&&(d=gf(n),d!==0&&(c=d,r=Dh(n,d))),r===1)throw s=Wi,Kr(n,0),mr(n,c),zt(n,nt()),s;if(r===6)mr(n,c);else{if(d=n.current.alternate,(c&30)===0&&!NB(d)&&(r=ql(n,c),r===2&&(h=gf(n),h!==0&&(c=h,r=Dh(n,h))),r===1))throw s=Wi,Kr(n,0),mr(n,c),zt(n,nt()),s;switch(n.finishedWork=d,n.finishedLanes=c,r){case 0:case 1:throw Error(t(345));case 2:Vr(n,Ft,qn);break;case 3:if(mr(n,c),(c&130023424)===c&&(r=Oh+500-nt(),10<r)){if(Ys(n,0)!==0)break;if(d=n.suspendedLanes,(d&c)!==c){Nt(),n.pingedLanes|=n.suspendedLanes&d;break}n.timeoutHandle=qf(Vr.bind(null,n,Ft,qn),r);break}Vr(n,Ft,qn);break;case 4:if(mr(n,c),(c&4194240)===c)break;for(r=n.eventTimes,d=-1;0<c;){var m=31-an(c);h=1<<m,m=r[m],m>d&&(d=m),c&=~h}if(c=d,c=nt()-c,c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3e3>c?3e3:4320>c?4320:1960*_B(c/1960))-c,10<c){n.timeoutHandle=qf(Vr.bind(null,n,Ft,qn),c);break}Vr(n,Ft,qn);break;case 5:Vr(n,Ft,qn);break;default:throw Error(t(329))}}}return zt(n,nt()),n.callbackNode===s?Ew.bind(null,n):null}function Dh(n,r){var s=Ki;return n.current.memoizedState.isDehydrated&&(Kr(n,r).flags|=256),n=ql(n,r),n!==2&&(r=Ft,Ft=s,r!==null&&Mh(r)),n}function Mh(n){Ft===null?Ft=n:Ft.push.apply(Ft,n)}function NB(n){for(var r=n;;){if(r.flags&16384){var s=r.updateQueue;if(s!==null&&(s=s.stores,s!==null))for(var c=0;c<s.length;c++){var d=s[c],h=d.getSnapshot;d=d.value;try{if(!cn(h(),d))return!1}catch{return!1}}}if(s=r.child,r.subtreeFlags&16384&&s!==null)s.return=r,r=s;else{if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function mr(n,r){for(r&=~Rh,r&=~Dl,n.suspendedLanes|=r,n.pingedLanes&=~r,n=n.expirationTimes;0<r;){var s=31-an(r),c=1<<s;n[s]=-1,r&=~c}}function Bw(n){if((Re&6)!==0)throw Error(t(327));Oo();var r=Ys(n,0);if((r&1)===0)return zt(n,nt()),null;var s=ql(n,r);if(n.tag!==0&&s===2){var c=gf(n);c!==0&&(r=c,s=Dh(n,c))}if(s===1)throw s=Wi,Kr(n,0),mr(n,r),zt(n,nt()),s;if(s===6)throw Error(t(345));return n.finishedWork=n.current.alternate,n.finishedLanes=r,Vr(n,Ft,qn),zt(n,nt()),null}function Fh(n,r){var s=Re;Re|=1;try{return n(r)}finally{Re=s,Re===0&&(Ro=nt()+500,gl&&cr())}}function Wr(n){pr!==null&&pr.tag===0&&(Re&6)===0&&Oo();var r=Re;Re|=1;var s=tn.transition,c=ze;try{if(tn.transition=null,ze=1,n)return n()}finally{ze=c,tn.transition=s,Re=r,(Re&6)===0&&cr()}}function zh(){Kt=No.current,We(No)}function Kr(n,r){n.finishedWork=null,n.finishedLanes=0;var s=n.timeoutHandle;if(s!==-1&&(n.timeoutHandle=-1,lB(s)),at!==null)for(s=at.return;s!==null;){var c=s;switch(Gf(c),c.tag){case 1:c=c.type.childContextTypes,c!=null&&hl();break;case 3:Ao(),We(Lt),We(St),lh();break;case 5:ih(c);break;case 4:Ao();break;case 13:We(Ye);break;case 19:We(Ye);break;case 10:eh(c.type._context);break;case 22:case 23:zh()}s=s.return}if(pt=n,at=n=vr(n.current,null),kt=Kt=r,dt=0,Wi=null,Rh=Dl=Ur=0,Ft=Ki=null,Hr!==null){for(r=0;r<Hr.length;r++)if(s=Hr[r],c=s.interleaved,c!==null){s.interleaved=null;var d=c.next,h=s.pending;if(h!==null){var m=h.next;h.next=d,c.next=m}s.pending=c}Hr=null}return n}function Aw(n,r){do{var s=at;try{if(Jf(),Cl.current=Il,El){for(var c=Qe.memoizedState;c!==null;){var d=c.queue;d!==null&&(d.pending=null),c=c.next}El=!1}if(qr=0,ht=ut=Qe=null,Fi=!1,zi=0,Nh.current=null,s===null||s.return===null){dt=1,Wi=r,at=null;break}e:{var h=n,m=s.return,b=s,T=r;if(r=kt,b.flags|=32768,T!==null&&typeof T=="object"&&typeof T.then=="function"){var N=T,F=b,H=F.tag;if((F.mode&1)===0&&(H===0||H===11||H===15)){var M=F.alternate;M?(F.updateQueue=M.updateQueue,F.memoizedState=M.memoizedState,F.lanes=M.lanes):(F.updateQueue=null,F.memoizedState=null)}var $=Jk(m);if($!==null){$.flags&=-257,ew($,m,b,h,r),$.mode&1&&Zk(h,N,r),r=$,T=N;var ee=r.updateQueue;if(ee===null){var ne=new Set;ne.add(T),r.updateQueue=ne}else ee.add(T);break e}else{if((r&1)===0){Zk(h,N,r),Hh();break e}T=Error(t(426))}}else if($e&&b.mode&1){var rt=Jk(m);if(rt!==null){(rt.flags&65536)===0&&(rt.flags|=256),ew(rt,m,b,h,r),Qf(Io(T,b));break e}}h=T=Io(T,b),dt!==4&&(dt=2),Ki===null?Ki=[h]:Ki.push(h),h=m;do{switch(h.tag){case 3:h.flags|=65536,r&=-r,h.lanes|=r;var A=Yk(h,T,r);Sk(h,A);break e;case 1:b=T;var x=h.type,I=h.stateNode;if((h.flags&128)===0&&(typeof x.getDerivedStateFromError=="function"||I!==null&&typeof I.componentDidCatch=="function"&&(hr===null||!hr.has(I)))){h.flags|=65536,r&=-r,h.lanes|=r;var q=Qk(h,b,r);Sk(h,q);break e}}h=h.return}while(h!==null)}Nw(s)}catch(oe){r=oe,at===s&&s!==null&&(at=s=s.return);continue}break}while(!0)}function Iw(){var n=Ll.current;return Ll.current=Il,n===null?Il:n}function Hh(){(dt===0||dt===3||dt===2)&&(dt=4),pt===null||(Ur&268435455)===0&&(Dl&268435455)===0||mr(pt,kt)}function ql(n,r){var s=Re;Re|=2;var c=Iw();(pt!==n||kt!==r)&&(qn=null,Kr(n,r));do try{RB();break}catch(d){Aw(n,d)}while(!0);if(Jf(),Re=s,Ll.current=c,at!==null)throw Error(t(261));return pt=null,kt=0,dt}function RB(){for(;at!==null;)_w(at)}function OB(){for(;at!==null&&!oE();)_w(at)}function _w(n){var r=Pw(n.alternate,n,Kt);n.memoizedProps=n.pendingProps,r===null?Nw(n):at=r,Nh.current=null}function Nw(n){var r=n;do{var s=r.alternate;if(n=r.return,(r.flags&32768)===0){if(s=CB(s,r,Kt),s!==null){at=s;return}}else{if(s=EB(s,r),s!==null){s.flags&=32767,at=s;return}if(n!==null)n.flags|=32768,n.subtreeFlags=0,n.deletions=null;else{dt=6,at=null;return}}if(r=r.sibling,r!==null){at=r;return}at=r=n}while(r!==null);dt===0&&(dt=5)}function Vr(n,r,s){var c=ze,d=tn.transition;try{tn.transition=null,ze=1,PB(n,r,s,c)}finally{tn.transition=d,ze=c}return null}function PB(n,r,s,c){do Oo();while(pr!==null);if((Re&6)!==0)throw Error(t(327));s=n.finishedWork;var d=n.finishedLanes;if(s===null)return null;if(n.finishedWork=null,n.finishedLanes=0,s===n.current)throw Error(t(177));n.callbackNode=null,n.callbackPriority=0;var h=s.lanes|s.childLanes;if(pE(n,h),n===pt&&(at=pt=null,kt=0),(s.subtreeFlags&2064)===0&&(s.flags&2064)===0||Fl||(Fl=!0,Lw(Vs,function(){return Oo(),null})),h=(s.flags&15990)!==0,(s.subtreeFlags&15990)!==0||h){h=tn.transition,tn.transition=null;var m=ze;ze=1;var b=Re;Re|=4,Nh.current=null,AB(n,s),ww(s,n),eB(Hf),Js=!!zf,Hf=zf=null,n.current=s,IB(s),iE(),Re=b,ze=m,tn.transition=h}else n.current=s;if(Fl&&(Fl=!1,pr=n,zl=d),h=n.pendingLanes,h===0&&(hr=null),aE(s.stateNode),zt(n,nt()),r!==null)for(c=n.onRecoverableError,s=0;s<r.length;s++)d=r[s],c(d.value,{componentStack:d.stack,digest:d.digest});if(Ml)throw Ml=!1,n=Ph,Ph=null,n;return(zl&1)!==0&&n.tag!==0&&Oo(),h=n.pendingLanes,(h&1)!==0?n===Lh?Vi++:(Vi=0,Lh=n):Vi=0,cr(),null}function Oo(){if(pr!==null){var n=bb(zl),r=tn.transition,s=ze;try{if(tn.transition=null,ze=16>n?16:n,pr===null)var c=!1;else{if(n=pr,pr=null,zl=0,(Re&6)!==0)throw Error(t(331));var d=Re;for(Re|=4,Y=n.current;Y!==null;){var h=Y,m=h.child;if((Y.flags&16)!==0){var b=h.deletions;if(b!==null){for(var T=0;T<b.length;T++){var N=b[T];for(Y=N;Y!==null;){var F=Y;switch(F.tag){case 0:case 11:case 15:Ui(8,F,h)}var H=F.child;if(H!==null)H.return=F,Y=H;else for(;Y!==null;){F=Y;var M=F.sibling,$=F.return;if(mw(F),F===N){Y=null;break}if(M!==null){M.return=$,Y=M;break}Y=$}}}var ee=h.alternate;if(ee!==null){var ne=ee.child;if(ne!==null){ee.child=null;do{var rt=ne.sibling;ne.sibling=null,ne=rt}while(ne!==null)}}Y=h}}if((h.subtreeFlags&2064)!==0&&m!==null)m.return=h,Y=m;else e:for(;Y!==null;){if(h=Y,(h.flags&2048)!==0)switch(h.tag){case 0:case 11:case 15:Ui(9,h,h.return)}var A=h.sibling;if(A!==null){A.return=h.return,Y=A;break e}Y=h.return}}var x=n.current;for(Y=x;Y!==null;){m=Y;var I=m.child;if((m.subtreeFlags&2064)!==0&&I!==null)I.return=m,Y=I;else e:for(m=x;Y!==null;){if(b=Y,(b.flags&2048)!==0)try{switch(b.tag){case 0:case 11:case 15:Pl(9,b)}}catch(oe){et(b,b.return,oe)}if(b===m){Y=null;break e}var q=b.sibling;if(q!==null){q.return=b.return,Y=q;break e}Y=b.return}}if(Re=d,cr(),wn&&typeof wn.onPostCommitFiberRoot=="function")try{wn.onPostCommitFiberRoot($s,n)}catch{}c=!0}return c}finally{ze=s,tn.transition=r}}return!1}function Rw(n,r,s){r=Io(s,r),r=Yk(n,r,1),n=dr(n,r,1),r=Nt(),n!==null&&(mi(n,1,r),zt(n,r))}function et(n,r,s){if(n.tag===3)Rw(n,n,s);else for(;r!==null;){if(r.tag===3){Rw(r,n,s);break}else if(r.tag===1){var c=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(hr===null||!hr.has(c))){n=Io(s,n),n=Qk(r,n,1),r=dr(r,n,1),n=Nt(),r!==null&&(mi(r,1,n),zt(r,n));break}}r=r.return}}function LB(n,r,s){var c=n.pingCache;c!==null&&c.delete(r),r=Nt(),n.pingedLanes|=n.suspendedLanes&s,pt===n&&(kt&s)===s&&(dt===4||dt===3&&(kt&130023424)===kt&&500>nt()-Oh?Kr(n,0):Rh|=s),zt(n,r)}function Ow(n,r){r===0&&((n.mode&1)===0?r=1:(r=Xs,Xs<<=1,(Xs&130023424)===0&&(Xs=4194304)));var s=Nt();n=zn(n,r),n!==null&&(mi(n,r,s),zt(n,s))}function DB(n){var r=n.memoizedState,s=0;r!==null&&(s=r.retryLane),Ow(n,s)}function MB(n,r){var s=0;switch(n.tag){case 13:var c=n.stateNode,d=n.memoizedState;d!==null&&(s=d.retryLane);break;case 19:c=n.stateNode;break;default:throw Error(t(314))}c!==null&&c.delete(r),Ow(n,s)}var Pw;Pw=function(n,r,s){if(n!==null)if(n.memoizedProps!==r.pendingProps||Lt.current)Mt=!0;else{if((n.lanes&s)===0&&(r.flags&128)===0)return Mt=!1,xB(n,r,s);Mt=(n.flags&131072)!==0}else Mt=!1,$e&&(r.flags&1048576)!==0&&hk(r,vl,r.index);switch(r.lanes=0,r.tag){case 2:var c=r.type;Rl(n,r),n=r.pendingProps;var d=wo(r,St.current);Bo(r,s),d=uh(null,r,c,n,d,s);var h=dh();return r.flags|=1,typeof d=="object"&&d!==null&&typeof d.render=="function"&&d.$$typeof===void 0?(r.tag=1,r.memoizedState=null,r.updateQueue=null,Dt(c)?(h=!0,pl(r)):h=!1,r.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,rh(r),d.updater=_l,r.stateNode=d,d._reactInternals=r,vh(r,c,n,s),r=wh(null,r,c,!0,h,s)):(r.tag=0,$e&&h&&$f(r),_t(null,r,d,s),r=r.child),r;case 16:c=r.elementType;e:{switch(Rl(n,r),n=r.pendingProps,d=c._init,c=d(c._payload),r.type=c,d=r.tag=zB(c),n=dn(c,n),d){case 0:r=kh(null,r,c,n,s);break e;case 1:r=sw(null,r,c,n,s);break e;case 11:r=tw(null,r,c,n,s);break e;case 14:r=nw(null,r,c,dn(c.type,n),s);break e}throw Error(t(306,c,""))}return r;case 0:return c=r.type,d=r.pendingProps,d=r.elementType===c?d:dn(c,d),kh(n,r,c,d,s);case 1:return c=r.type,d=r.pendingProps,d=r.elementType===c?d:dn(c,d),sw(n,r,c,d,s);case 3:e:{if(lw(r),n===null)throw Error(t(387));c=r.pendingProps,h=r.memoizedState,d=h.element,Tk(n,r),Sl(r,c,null,s);var m=r.memoizedState;if(c=m.element,h.isDehydrated)if(h={element:c,isDehydrated:!1,cache:m.cache,pendingSuspenseBoundaries:m.pendingSuspenseBoundaries,transitions:m.transitions},r.updateQueue.baseState=h,r.memoizedState=h,r.flags&256){d=Io(Error(t(423)),r),r=aw(n,r,c,s,d);break e}else if(c!==d){d=Io(Error(t(424)),r),r=aw(n,r,c,s,d);break e}else for(Wt=sr(r.stateNode.containerInfo.firstChild),Ut=r,$e=!0,un=null,s=kk(r,null,c,s),r.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(xo(),c===d){r=jn(n,r,s);break e}_t(n,r,c,s)}r=r.child}return r;case 5:return Ck(r),n===null&&Yf(r),c=r.type,d=r.pendingProps,h=n!==null?n.memoizedProps:null,m=d.children,jf(c,d)?m=null:h!==null&&jf(c,h)&&(r.flags|=32),iw(n,r),_t(n,r,m,s),r.child;case 6:return n===null&&Yf(r),null;case 13:return cw(n,r,s);case 4:return oh(r,r.stateNode.containerInfo),c=r.pendingProps,n===null?r.child=Co(r,null,c,s):_t(n,r,c,s),r.child;case 11:return c=r.type,d=r.pendingProps,d=r.elementType===c?d:dn(c,d),tw(n,r,c,d,s);case 7:return _t(n,r,r.pendingProps,s),r.child;case 8:return _t(n,r,r.pendingProps.children,s),r.child;case 12:return _t(n,r,r.pendingProps.children,s),r.child;case 10:e:{if(c=r.type._context,d=r.pendingProps,h=r.memoizedProps,m=d.value,qe(kl,c._currentValue),c._currentValue=m,h!==null)if(cn(h.value,m)){if(h.children===d.children&&!Lt.current){r=jn(n,r,s);break e}}else for(h=r.child,h!==null&&(h.return=r);h!==null;){var b=h.dependencies;if(b!==null){m=h.child;for(var T=b.firstContext;T!==null;){if(T.context===c){if(h.tag===1){T=Hn(-1,s&-s),T.tag=2;var N=h.updateQueue;if(N!==null){N=N.shared;var F=N.pending;F===null?T.next=T:(T.next=F.next,F.next=T),N.pending=T}}h.lanes|=s,T=h.alternate,T!==null&&(T.lanes|=s),th(h.return,s,r),b.lanes|=s;break}T=T.next}}else if(h.tag===10)m=h.type===r.type?null:h.child;else if(h.tag===18){if(m=h.return,m===null)throw Error(t(341));m.lanes|=s,b=m.alternate,b!==null&&(b.lanes|=s),th(m,s,r),m=h.sibling}else m=h.child;if(m!==null)m.return=h;else for(m=h;m!==null;){if(m===r){m=null;break}if(h=m.sibling,h!==null){h.return=m.return,m=h;break}m=m.return}h=m}_t(n,r,d.children,s),r=r.child}return r;case 9:return d=r.type,c=r.pendingProps.children,Bo(r,s),d=Jt(d),c=c(d),r.flags|=1,_t(n,r,c,s),r.child;case 14:return c=r.type,d=dn(c,r.pendingProps),d=dn(c.type,d),nw(n,r,c,d,s);case 15:return rw(n,r,r.type,r.pendingProps,s);case 17:return c=r.type,d=r.pendingProps,d=r.elementType===c?d:dn(c,d),Rl(n,r),r.tag=1,Dt(c)?(n=!0,pl(r)):n=!1,Bo(r,s),Gk(r,c,d),vh(r,c,d,s),wh(null,r,c,!0,n,s);case 19:return dw(n,r,s);case 22:return ow(n,r,s)}throw Error(t(156,r.tag))};function Lw(n,r){return pb(n,r)}function FB(n,r,s,c){this.tag=n,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function nn(n,r,s,c){return new FB(n,r,s,c)}function jh(n){return n=n.prototype,!(!n||!n.isReactComponent)}function zB(n){if(typeof n=="function")return jh(n)?1:0;if(n!=null){if(n=n.$$typeof,n===be)return 11;if(n===Ne)return 14}return 2}function vr(n,r){var s=n.alternate;return s===null?(s=nn(n.tag,r,n.key,n.mode),s.elementType=n.elementType,s.type=n.type,s.stateNode=n.stateNode,s.alternate=n,n.alternate=s):(s.pendingProps=r,s.type=n.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=n.flags&14680064,s.childLanes=n.childLanes,s.lanes=n.lanes,s.child=n.child,s.memoizedProps=n.memoizedProps,s.memoizedState=n.memoizedState,s.updateQueue=n.updateQueue,r=n.dependencies,s.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},s.sibling=n.sibling,s.index=n.index,s.ref=n.ref,s}function Ul(n,r,s,c,d,h){var m=2;if(c=n,typeof n=="function")jh(n)&&(m=1);else if(typeof n=="string")m=5;else e:switch(n){case V:return $r(s.children,d,h,r);case z:m=8,d|=8;break;case ae:return n=nn(12,s,r,d|2),n.elementType=ae,n.lanes=h,n;case te:return n=nn(13,s,r,d),n.elementType=te,n.lanes=h,n;case ke:return n=nn(19,s,r,d),n.elementType=ke,n.lanes=h,n;case Ie:return Wl(s,d,h,r);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case ge:m=10;break e;case re:m=9;break e;case be:m=11;break e;case Ne:m=14;break e;case Se:m=16,c=null;break e}throw Error(t(130,n==null?n:typeof n,""))}return r=nn(m,s,r,d),r.elementType=n,r.type=c,r.lanes=h,r}function $r(n,r,s,c){return n=nn(7,n,c,r),n.lanes=s,n}function Wl(n,r,s,c){return n=nn(22,n,c,r),n.elementType=Ie,n.lanes=s,n.stateNode={isHidden:!1},n}function qh(n,r,s){return n=nn(6,n,null,r),n.lanes=s,n}function Uh(n,r,s){return r=nn(4,n.children!==null?n.children:[],n.key,r),r.lanes=s,r.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},r}function HB(n,r,s,c,d){this.tag=r,this.containerInfo=n,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=mf(0),this.expirationTimes=mf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mf(0),this.identifierPrefix=c,this.onRecoverableError=d,this.mutableSourceEagerHydrationData=null}function Wh(n,r,s,c,d,h,m,b,T){return n=new HB(n,r,s,b,T),r===1?(r=1,h===!0&&(r|=8)):r=0,h=nn(3,null,null,r),n.current=h,h.stateNode=n,h.memoizedState={element:c,isDehydrated:s,cache:null,transitions:null,pendingSuspenseBoundaries:null},rh(h),n}function jB(n,r,s){var c=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:W,key:c==null?null:""+c,children:n,containerInfo:r,implementation:s}}function Dw(n){if(!n)return ar;n=n._reactInternals;e:{if(Lr(n)!==n||n.tag!==1)throw Error(t(170));var r=n;do{switch(r.tag){case 3:r=r.stateNode.context;break e;case 1:if(Dt(r.type)){r=r.stateNode.__reactInternalMemoizedMergedChildContext;break e}}r=r.return}while(r!==null);throw Error(t(171))}if(n.tag===1){var s=n.type;if(Dt(s))return uk(n,s,r)}return r}function Mw(n,r,s,c,d,h,m,b,T){return n=Wh(s,c,!0,n,d,h,m,b,T),n.context=Dw(null),s=n.current,c=Nt(),d=gr(s),h=Hn(c,d),h.callback=r??null,dr(s,h,d),n.current.lanes=d,mi(n,d,c),zt(n,c),n}function Kl(n,r,s,c){var d=r.current,h=Nt(),m=gr(d);return s=Dw(s),r.context===null?r.context=s:r.pendingContext=s,r=Hn(h,m),r.payload={element:n},c=c===void 0?null:c,c!==null&&(r.callback=c),n=dr(d,r,m),n!==null&&(pn(n,d,m,h),Tl(n,d,m)),m}function Vl(n){if(n=n.current,!n.child)return null;switch(n.child.tag){case 5:return n.child.stateNode;default:return n.child.stateNode}}function Fw(n,r){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var s=n.retryLane;n.retryLane=s!==0&&s<r?s:r}}function Kh(n,r){Fw(n,r),(n=n.alternate)&&Fw(n,r)}function qB(){return null}var zw=typeof reportError=="function"?reportError:function(n){console.error(n)};function Vh(n){this._internalRoot=n}$l.prototype.render=Vh.prototype.render=function(n){var r=this._internalRoot;if(r===null)throw Error(t(409));Kl(n,r,null,null)},$l.prototype.unmount=Vh.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var r=n.containerInfo;Wr(function(){Kl(null,n,null,null)}),r[Ln]=null}};function $l(n){this._internalRoot=n}$l.prototype.unstable_scheduleHydration=function(n){if(n){var r=Tb();n={blockedOn:null,target:n,priority:r};for(var s=0;s<rr.length&&r!==0&&r<rr[s].priority;s++);rr.splice(s,0,n),s===0&&Cb(n)}};function $h(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function Gl(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11&&(n.nodeType!==8||n.nodeValue!==" react-mount-point-unstable "))}function Hw(){}function UB(n,r,s,c,d){if(d){if(typeof c=="function"){var h=c;c=function(){var N=Vl(m);h.call(N)}}var m=Mw(r,c,n,0,null,!1,!1,"",Hw);return n._reactRootContainer=m,n[Ln]=m.current,_i(n.nodeType===8?n.parentNode:n),Wr(),m}for(;d=n.lastChild;)n.removeChild(d);if(typeof c=="function"){var b=c;c=function(){var N=Vl(T);b.call(N)}}var T=Wh(n,0,!1,null,null,!1,!1,"",Hw);return n._reactRootContainer=T,n[Ln]=T.current,_i(n.nodeType===8?n.parentNode:n),Wr(function(){Kl(r,T,s,c)}),T}function Xl(n,r,s,c,d){var h=s._reactRootContainer;if(h){var m=h;if(typeof d=="function"){var b=d;d=function(){var T=Vl(m);b.call(T)}}Kl(r,m,n,d)}else m=UB(s,r,n,d,c);return Vl(m)}kb=function(n){switch(n.tag){case 3:var r=n.stateNode;if(r.current.memoizedState.isDehydrated){var s=gi(r.pendingLanes);s!==0&&(vf(r,s|1),zt(r,nt()),(Re&6)===0&&(Ro=nt()+500,cr()))}break;case 13:Wr(function(){var c=zn(n,1);if(c!==null){var d=Nt();pn(c,n,1,d)}}),Kh(n,1)}},yf=function(n){if(n.tag===13){var r=zn(n,134217728);if(r!==null){var s=Nt();pn(r,n,134217728,s)}Kh(n,134217728)}},wb=function(n){if(n.tag===13){var r=gr(n),s=zn(n,r);if(s!==null){var c=Nt();pn(s,n,r,c)}Kh(n,r)}},Tb=function(){return ze},Sb=function(n,r){var s=ze;try{return ze=n,r()}finally{ze=s}},uf=function(n,r,s){switch(r){case"input":if(tf(n,s),r=s.name,s.type==="radio"&&r!=null){for(s=n;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll("input[name="+JSON.stringify(""+r)+'][type="radio"]'),r=0;r<s.length;r++){var c=s[r];if(c!==n&&c.form===n.form){var d=fl(c);if(!d)throw Error(t(90));Pr(c),tf(c,d)}}}break;case"textarea":Zy(n,s);break;case"select":r=s.value,r!=null&&ao(n,!!s.multiple,r,!1)}},lb=Fh,ab=Wr;var WB={usingClientEntryPoint:!1,Events:[Oi,bo,fl,ib,sb,Fh]},$i={findFiberByHostInstance:Dr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},KB={bundleType:$i.bundleType,version:$i.version,rendererPackageName:$i.rendererPackageName,rendererConfig:$i.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:j.ReactCurrentDispatcher,findHostInstanceByFiber:function(n){return n=fb(n),n===null?null:n.stateNode},findFiberByHostInstance:$i.findFiberByHostInstance||qB,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Yl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Yl.isDisabled&&Yl.supportsFiber)try{$s=Yl.inject(KB),wn=Yl}catch{}}return Rt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=WB,Rt.createPortal=function(n,r){var s=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!$h(r))throw Error(t(200));return jB(n,r,null,s)},Rt.createRoot=function(n,r){if(!$h(n))throw Error(t(299));var s=!1,c="",d=zw;return r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(c=r.identifierPrefix),r.onRecoverableError!==void 0&&(d=r.onRecoverableError)),r=Wh(n,1,!1,null,null,s,!1,c,d),n[Ln]=r.current,_i(n.nodeType===8?n.parentNode:n),new Vh(r)},Rt.findDOMNode=function(n){if(n==null)return null;if(n.nodeType===1)return n;var r=n._reactInternals;if(r===void 0)throw typeof n.render=="function"?Error(t(188)):(n=Object.keys(n).join(","),Error(t(268,n)));return n=fb(r),n=n===null?null:n.stateNode,n},Rt.flushSync=function(n){return Wr(n)},Rt.hydrate=function(n,r,s){if(!Gl(r))throw Error(t(200));return Xl(null,n,r,!0,s)},Rt.hydrateRoot=function(n,r,s){if(!$h(n))throw Error(t(405));var c=s!=null&&s.hydratedSources||null,d=!1,h="",m=zw;if(s!=null&&(s.unstable_strictMode===!0&&(d=!0),s.identifierPrefix!==void 0&&(h=s.identifierPrefix),s.onRecoverableError!==void 0&&(m=s.onRecoverableError)),r=Mw(r,null,n,1,s??null,d,!1,h,m),n[Ln]=r.current,_i(n),c)for(n=0;n<c.length;n++)s=c[n],d=s._getVersion,d=d(s._source),r.mutableSourceEagerHydrationData==null?r.mutableSourceEagerHydrationData=[s,d]:r.mutableSourceEagerHydrationData.push(s,d);return new $l(r)},Rt.render=function(n,r,s){if(!Gl(r))throw Error(t(200));return Xl(null,n,r,!1,s)},Rt.unmountComponentAtNode=function(n){if(!Gl(n))throw Error(t(40));return n._reactRootContainer?(Wr(function(){Xl(null,null,n,!1,function(){n._reactRootContainer=null,n[Ln]=null})}),!0):!1},Rt.unstable_batchedUpdates=Fh,Rt.unstable_renderSubtreeIntoContainer=function(n,r,s,c){if(!Gl(s))throw Error(t(200));if(n==null||n._reactInternals===void 0)throw Error(t(38));return Xl(n,r,s,!1,c)},Rt.version="18.3.1-next-f1338f8080-20240426",Rt}var ey;function ty(){if(ey)return id.exports;ey=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(e){console.error(e)}}return l(),id.exports=a1(),id.exports}var ny;function c1(){if(ny)return gs;ny=1;var l=ty();return gs.createRoot=l.createRoot,gs.hydrateRoot=l.hydrateRoot,gs}var u1=c1(),d1=ty();const $o={root:"",alignedStart:"text-start",alignedCenter:"text-center",title:"",description:"opacity-60 mt-[3px]"};class f1{constructor(e){const t=e.alignment==="center"?"center":"start";this.nodes={root:R.make("div",[$o.root,t==="center"?$o.alignedCenter:$o.alignedStart]),title:R.make("div",$o.title,{textContent:e.title})},this.nodes.root.setAttribute("data-alignment",t),this.nodes.root.appendChild(this.nodes.title),e.description!==void 0&&(this.nodes.description=R.make("div",$o.description,{textContent:e.description}),this.nodes.root.appendChild(this.nodes.description))}getElement(){return this.nodes.root}}class ad{constructor(e){this.params=e}get name(){if(this.params!==void 0&&"name"in this.params)return this.params.name}destroy(){Ko()}onChildrenOpen(){this.params!==void 0&&"children"in this.params&&typeof this.params.children?.onOpen=="function"&&this.params.children.onOpen()}onChildrenClose(){this.params!==void 0&&"children"in this.params&&typeof this.params.children?.onClose=="function"&&this.params.children.onClose()}handleClick(){this.params!==void 0&&"onActivate"in this.params&&this.params.onActivate?.(this.params)}addHint(e,t){const o=new f1(t);ps(e,o.getElement(),{placement:t.position,hidingDelay:100})}get children(){return this.params!==void 0&&"children"in this.params&&this.params.children?.items!==void 0?this.params.children.items:[]}get hasChildren(){return this.children.length>0}get isChildrenOpen(){return this.params!==void 0&&"children"in this.params&&this.params.children?.isOpen===!0}get isChevronHidden(){return this.params!==void 0&&"children"in this.params&&this.params.children?.hideChevron===!0}get isChildrenFlippable(){return!(this.params===void 0||!("children"in this.params)||this.params.children?.isFlippable===!1)}get isChildrenSearchable(){return this.params!==void 0&&"children"in this.params&&this.params.children?.searchable===!0}get closeOnActivate(){return this.params!==void 0&&"closeOnActivate"in this.params&&this.params.closeOnActivate}get isActive(){return this.params===void 0||!("isActive"in this.params)?!1:typeof this.params.isActive=="function"?this.params.isActive():this.params.isActive===!0}}const Bt={item:'flex items-center select-none border-none bg-transparent rounded-md p-[var(--item-padding)] text-text-primary mb-px can-hover:hover:cursor-pointer can-hover:hover:bg-item-hover-bg [&[data-blok-force-hover]]:cursor-pointer [&[data-blok-force-hover]]:bg-item-hover-bg [&[data-blok-focused="true"]]:bg-item-focus-bg [&[data-blok-popover-item-no-hover]]:hover:bg-transparent [&[data-blok-popover-item-no-hover]]:cursor-default',itemActive:"bg-icon-active-bg text-icon-active-text",itemDisabled:"cursor-default pointer-events-none text-text-secondary",itemFocused:"!bg-item-focus-bg",itemConfirmation:"!bg-item-confirm-bg !text-white",icon:"flex items-center justify-center w-[26px] h-[26px] [&_svg]:w-icon [&_svg]:h-icon",iconTool:"mr-2",title:"text-sm leading-5 font-medium overflow-hidden whitespace-nowrap text-ellipsis mr-auto",secondaryTitle:"text-xs whitespace-nowrap pr-1.5 opacity-60 tracking-[-0.1em] text-text-secondary",focused:"is-focused"},Go={item:"rounded p-1",icon:"w-auto h-auto [&_svg]:w-icon [&_svg]:h-icon mobile:[&_svg]:w-icon-mobile mobile:[&_svg]:h-icon-mobile",iconTool:"shadow-none bg-transparent !mr-0",chevronRight:"rotate-90"},ms={item:"rounded-md p-[3px] mobile:p-1",iconTool:"!mr-2",icon:"w-toolbox-btn h-toolbox-btn"},He={item:"data-blok-popover-item",icon:"data-blok-popover-item-icon",iconTool:"data-blok-tool",iconChevronRight:"data-blok-popover-item-icon-chevron-right",title:"data-blok-popover-item-title",secondaryTitle:"data-blok-popover-item-secondary-title",active:"data-blok-popover-item-active",hidden:"data-blok-hidden",confirmation:"data-blok-popover-item-confirmation",noHover:"data-blok-popover-item-no-hover",noFocus:"data-blok-popover-item-no-focus",focused:"data-blok-focused",wobble:"data-blok-popover-item-wobble",disabled:"data-blok-disabled"},h1=`
|
|
10
|
+
margin: 4px 5px 4px 0;`,v=a?c?(d.unshift(g,i),`%c${h}%c ${e}`):`( ${h} )${e}`:e,y=c?o!==void 0?[`${v} %o`,...d]:[v,...d]:[v];try{l[t](...y)}catch(b){}};qo.logLevel="VERBOSE";const A1=a=>{qo.logLevel=a},Ce=(a,e="log",t,o)=>{qo(!1,a,e,t,o)},Qt=(a,e="log",t,o)=>{qo(!0,a,e,t,o)},De=a=>RT(a),qe=a=>MT(a),un=a=>zT(a),dv=a=>_0(a),fv=a=>DT(a),I1=function(a){return qT(a)},ot=a=>U0(a),hv=a=>E1(a),ls=(a,e)=>function(...t){B0(()=>a.apply(this,t),e)},_1=a=>{var e;return(e=a.name.split(".").pop())!=null?e:""},N1=a=>/^[-\w]+\/([-+\w]+|\*)$/.test(a),pv=(a,e,t)=>{const o={timeoutId:null};return function(...i){const l=()=>{o.timeoutId=null,a.apply(this,i)};o.timeoutId!==null&&clearTimeout(o.timeoutId),o.timeoutId=setTimeout(l,e)}},zu=(a,e,t)=>h1(a,e,t),gv=()=>{var i,l;const a={win:!1,mac:!1,x11:!1,linux:!1},e=uv(),t=(l=(i=e==null?void 0:e.userAgent)==null?void 0:i.toLowerCase())!=null?l:"",o=t?Object.keys(a).find(c=>t.indexOf(c)!==-1):void 0;return o!==void 0&&(a[o]=!0),a},cs=a=>a&&a.slice(0,1).toUpperCase()+a.slice(1),R1=(a,e)=>{if(Array.isArray(e))return e},Uo=(a,...e)=>!qe(a)||e.length===0?a:e.reduce((t,o)=>qe(o)?l1(t,o,R1):t,a),mv=a=>{const e=gv(),t=a.replace(/shift/gi,"⇧").replace(/backspace/gi,"⌫").replace(/enter/gi,"⏎").replace(/up/gi,"↑").replace(/left/gi,"→").replace(/down/gi,"↓").replace(/right/gi,"←").replace(/escape/gi,"⎋").replace(/insert/gi,"Ins").replace(/delete/gi,"␡").replace(/\+/gi," + ");return e.mac?t.replace(/ctrl|cmd/gi,"⌘").replace(/alt/gi,"⌥"):t.replace(/cmd/gi,"Ctrl").replace(/windows/gi,"WIN")},O1=a=>{try{return new URL(a).href}catch(t){}const e=as();return a.substring(0,2)==="//"?e?`${e.location.protocol}${a}`:a:e?`${e.location.origin}${a}`:a},L1=()=>l0(10),D1=a=>{const e=as();e&&e.open(a,"_blank")},P1=(a="")=>`${a}${Math.floor(Math.random()*C1).toString(B1)}`,vv=650,Gn=()=>{const a=as();return!a||typeof a.matchMedia!="function"?!1:a.matchMedia(`(max-width: ${vv}px)`).matches},Hu=(()=>{var h;const a=uv();if(!a)return!1;const e=a.userAgent||"",t=a.userAgentData,o=t==null?void 0:t.platform;if(/iP(ad|hone|od)/.test(e)||o!==void 0&&o!==""&&/iP(ad|hone|od)/.test(o))return!0;const i=((h=a.maxTouchPoints)!=null?h:0)>1,l=()=>a.platform,c=o!==void 0&&o!==""?o:void 0;return(i?c!=null?c:l():void 0)==="MacIntel"})(),M1=(a,e)=>_T(a,e);class R{static isSingleTag(e){return!!e.tagName&&["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"].includes(e.tagName)}static isLineBreakTag(e){return!!e&&["BR","WBR"].includes(e.tagName)}static make(e,t=null,o={}){const i=document.createElement(e);if(Array.isArray(t)){const l=t.filter(c=>c!==void 0&&c!=="").flatMap(c=>c.split(" ")).filter(c=>c!=="");i.classList.add(...l)}if(typeof t=="string"&&t!==""){const l=t.split(" ").filter(c=>c!=="");i.classList.add(...l)}for(const l in o){if(!Object.prototype.hasOwnProperty.call(o,l))continue;const c=o[l];if(c!=null){if(l in i){i[l]=c;continue}i.setAttribute(l,String(c))}}return i}static text(e){return document.createTextNode(e)}static append(e,t){Array.isArray(t)?t.forEach(o=>e.appendChild(o)):e.appendChild(t)}static prepend(e,t){Array.isArray(t)?[...t].reverse().forEach(i=>e.prepend(i)):e.prepend(t)}static find(e=document,t){return e.querySelector(t)}static get(e){return document.getElementById(e)}static findAll(e=document,t){return e.querySelectorAll(t)}static get allInputsSelector(){return"[contenteditable=true], textarea, input:not([type]), "+["text","password","email","number","search","tel","url"].map(t=>`input[type="${t}"]`).join(", ")}static findAllInputs(e){return hv(e.querySelectorAll(R.allInputsSelector)).reduce((t,o)=>R.isNativeInput(o)||R.containsOnlyInlineElements(o)?[...t,o]:[...t,...R.getDeepestBlockElements(o)],[])}static getDeepestNode(e,t=!1){var v;const o=t?"lastChild":"firstChild",i=t?"previousSibling":"nextSibling";if(e===null||e.nodeType!==Node.ELEMENT_NODE)return e;const l=e[o];if(l===null)return e;const c=l;if(!(R.isSingleTag(c)&&!R.isNativeInput(c)&&!R.isLineBreakTag(c)))return this.getDeepestNode(c,t);const h=c[i];if(h)return this.getDeepestNode(h,t);const g=(v=c.parentNode)==null?void 0:v[i];return g?this.getDeepestNode(g,t):c.parentNode}static isElement(e){return fv(e)?!1:e!=null&&e.nodeType!=null&&e.nodeType===Node.ELEMENT_NODE}static isFragment(e){return fv(e)?!1:e!=null&&e.nodeType!=null&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}static isContentEditable(e){return e.contentEditable==="true"}static isNativeInput(e){const t=["INPUT","TEXTAREA"];return e!=null&&typeof e.tagName=="string"?t.includes(e.tagName):!1}static canSetCaret(e){return R.isNativeInput(e)?!new Set(["file","checkbox","radio","hidden","submit","button","image","reset"]).has(e.type):R.isContentEditable(e)}static isNodeEmpty(e,t){var l,c;if(this.isSingleTag(e)&&!this.isLineBreakTag(e))return!1;const o=this.isElement(e)&&this.isNativeInput(e)?e.value:(l=e.textContent)==null?void 0:l.replace("",""),i=t?o==null?void 0:o.replace(new RegExp(t,"g"),""):o;return((c=i==null?void 0:i.length)!=null?c:0)===0}static isLeaf(e){return e?e.childNodes.length===0:!1}static isEmpty(e,t){const o=[e];for(;o.length>0;){const i=o.shift();if(i){if(this.isLeaf(i)&&!this.isNodeEmpty(i,t))return!1;i.childNodes&&o.push(...Array.from(i.childNodes))}}return!0}static isHTMLString(e){const t=R.make("div");return t.innerHTML=e,t.childElementCount>0}static getContentLength(e){var t,o;return R.isNativeInput(e)?e.value.length:e.nodeType===Node.TEXT_NODE?e.length:(o=(t=e.textContent)==null?void 0:t.length)!=null?o:0}static get blockElements(){return["address","article","aside","blockquote","canvas","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","noscript","ol","output","p","pre","ruby","section","table","tbody","thead","tr","tfoot","ul","video"]}static containsOnlyInlineElements(e){const t=un(e)?(()=>{const i=document.createElement("div");return i.innerHTML=e,i})():e,o=i=>!R.blockElements.includes(i.tagName.toLowerCase())&&Array.from(i.children).every(o);return Array.from(t.children).every(o)}static getDeepestBlockElements(e){return R.containsOnlyInlineElements(e)?[e]:Array.from(e.children).reduce((t,o)=>[...t,...R.getDeepestBlockElements(o)],[])}static getHolder(e){if(!un(e))return e;const t=document.getElementById(e);if(t!==null)return t;throw new Error(`Element with id "${e}" not found`)}static isAnchor(e){return e.tagName.toLowerCase()==="a"}static offset(e){const t=e.getBoundingClientRect(),o=window.scrollX||document.documentElement.scrollLeft,i=window.scrollY||document.documentElement.scrollTop,l=t.top+i,c=t.left+o;return{top:l,left:c,bottom:l+t.height,right:c+t.width}}static getNodeByOffset(e,t){const o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null),i=(g,v,y,b)=>{var S;if(!g&&y){const O=v-b,L=Math.max(t-O,0),U=Math.min(L,b);return{node:y,offset:U}}if(!g)return{node:null,offset:0};const w=((S=g.textContent)!=null?S:"").length;return v+w>=t?{node:g,offset:Math.min(t-v,w)}:i(o.nextNode(),v+w,g,w)},l=o.nextNode(),{node:c,offset:d}=i(l,0,null,0);if(!c)return{node:null,offset:0};const h=c.textContent;return!h||h.length===0?{node:null,offset:0}:{node:c,offset:d}}}const ju=a=>!/[^\t\n\r \u200B]/.test(a),F1=a=>{const e=window.getComputedStyle(a),t=parseFloat(e.fontSize),o=parseFloat(e.lineHeight)||t*1.2,i=parseFloat(e.paddingTop),l=parseFloat(e.borderTopWidth),c=parseFloat(e.marginTop),d=t*.8,h=(o-t)/2;return c+l+i+h+d},yv=a=>{a.setAttribute("data-blok-empty",R.isEmpty(a)?"true":"false")},bv={ui:{blockTunes:{toggler:{"Drag to move":"","Click to open the menu":""}},inlineToolbar:{converter:{"Convert to":""}},toolbar:{toolbox:{"Click to add below":"","Option-click to add above":"","Ctrl-click to add above":""}},popover:{Filter:"","Nothing found":"","Convert to":""}},toolNames:{Text:"",Link:"",Bold:"",Italic:""},tools:{link:{"Add a link":""},stub:{"The block can not be displayed correctly.":""}},blockTunes:{delete:{Delete:"","Click to delete":""},moveUp:{"Move up":""},moveDown:{"Move down":""}}},er=class er{static ui(e,t){return er._t(e,t)}static t(e,t){return er._t(e,t)}static setDictionary(e){er.currentDictionary=e}static _t(e,t){const o=er.getNamespace(e);return!o||!o[t]?t:o[t]}static getNamespace(e){return e.split(".").reduce((o,i)=>{if(!o||!Object.keys(o).length)return{};const l=o[i];return typeof l=="string"?{}:l},er.currentDictionary)}};er.currentDictionary=bv;let $e=er;class Wo extends Error{}class Ko{constructor(){this.subscribers={}}on(e,t){e in this.subscribers||(this.subscribers[e]=[]),this.subscribers[e].push(t)}once(e,t){e in this.subscribers||(this.subscribers[e]=[]);const o=i=>{const l=t(i),c=this.subscribers[e].indexOf(o);return c!==-1&&this.subscribers[e].splice(c,1),l};this.subscribers[e].push(o)}emit(e,t){ot(this.subscribers)||!this.subscribers[e]||this.subscribers[e].reduce((o,i)=>{const l=i(o);return l!==void 0?l:o},t)}off(e,t){const o=this.subscribers[e];if(o===void 0){console.warn(`EventDispatcher .off(): there is no subscribers for event "${e.toString()}". Probably, .off() called before .on()`);return}const i=o.indexOf(t);i!==-1&&o.splice(i,1)}destroy(){this.subscribers={}}}const Rn=function(e){return Object.setPrototypeOf(this,{get id(){return e.id},get name(){return e.name},get config(){return e.config},get holder(){return e.holder},get isEmpty(){return e.isEmpty},get selected(){return e.selected},set stretched(o){e.setStretchState(o)},get stretched(){return e.stretched},get focusable(){return e.focusable},call(o,i){return e.call(o,i)},save(){return e.save()},validate(o){return e.validate(o)},dispatchChange(){e.dispatchChange()},getActiveToolboxEntry(){return e.getActiveToolboxEntry()}}),Object.defineProperties(this,{id:{get(){return e.id},enumerable:!0,configurable:!0},name:{get(){return e.name},enumerable:!0,configurable:!0}}),this};class Vo{constructor(){this.allListeners=[]}on(e,t,o,i=!1){if(this.findOne(e,t,o,i))return;const c=P1("l"),d={id:c,element:e,eventType:t,handler:o,options:i};return this.allListeners.push(d),e.addEventListener(t,o,i),c}off(e,t,o,i){const l=this.findAll(e,t,o,i);l.forEach((c,d)=>{const h=this.allListeners.indexOf(l[d]);h>-1&&(this.allListeners.splice(h,1),c.element.removeEventListener(c.eventType,c.handler,c.options))})}offById(e){const t=this.findById(e);if(!t)return;t.element.removeEventListener(t.eventType,t.handler,t.options);const o=this.allListeners.indexOf(t);o>-1&&this.allListeners.splice(o,1)}findOne(e,t,o,i){var c;return(c=this.findAll(e,t,o,i)[0])!=null?c:null}findAll(e,t,o,i){return e?this.findByEventTarget(e).filter(c=>{const d=t===void 0||c.eventType===t,h=o===void 0||c.handler===o,g=this.areOptionsEqual(c.options,i);return d&&h&&g}):[]}removeAll(){this.allListeners.forEach(e=>{e.element.removeEventListener(e.eventType,e.handler,e.options)}),this.allListeners=[]}destroy(){this.removeAll()}findByEventTarget(e){return this.allListeners.filter(t=>t.element===e)}findByType(e){return this.allListeners.filter(t=>t.eventType===e)}findByHandler(e){return this.allListeners.filter(t=>t.handler===e)}findById(e){return this.allListeners.find(t=>t.id===e)}normalizeListenerOptions(e){var t,o,i;return typeof e=="boolean"?{capture:e,once:!1,passive:!1}:e?{capture:(t=e.capture)!=null?t:!1,once:(o=e.once)!=null?o:!1,passive:(i=e.passive)!=null?i:!1,signal:e.signal}:{capture:!1,once:!1,passive:!1}}areOptionsEqual(e,t){if(t===void 0)return!0;const o=this.normalizeListenerOptions(e),i=this.normalizeListenerOptions(t);return o.capture===i.capture&&o.once===i.once&&o.passive===i.passive&&o.signal===i.signal}}class Be{constructor({config:e,eventsDispatcher:t}){if(this.nodes={},this.listeners=new Vo,this.readOnlyMutableListeners={on:(o,i,l,c=!1)=>{const d=this.listeners.on(o,i,l,c);d&&this.mutableListenerIds.push(d)},clearAll:()=>{for(const o of this.mutableListenerIds)this.listeners.offById(o);this.mutableListenerIds=[]}},this.mutableListenerIds=[],new.target===Be)throw new TypeError("Constructors for abstract class Module are not allowed.");this.config=e,this.eventsDispatcher=t,this.Blok={}}set state(e){this.Blok=e}removeAllNodes(){for(const e in this.nodes){const t=this.nodes[e];t instanceof HTMLElement&&t.remove()}}get isRtl(){var e;return((e=this.config.i18n)==null?void 0:e.direction)==="rtl"}}const z1=(a,e)=>{const t=new Array(a.length+e.length);for(let o=0;o<a.length;o++)t[o]=a[o];for(let o=0;o<e.length;o++)t[a.length+o]=e[o];return t},H1=(a,e)=>({classGroupId:a,validator:e}),kv=(a=new Map,e=null,t)=>({nextPart:a,validators:e,classGroupId:t}),us="-",wv=[],j1="arbitrary..",q1=a=>{const e=W1(a),{conflictingClassGroups:t,conflictingClassGroupModifiers:o}=a;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return U1(c);const d=c.split(us),h=d[0]===""&&d.length>1?1:0;return Tv(d,h,e)},getConflictingClassGroupIds:(c,d)=>{if(d){const h=o[c],g=t[c];return h?g?z1(g,h):h:g||wv}return t[c]||wv}}},Tv=(a,e,t)=>{if(a.length-e===0)return t.classGroupId;const i=a[e],l=t.nextPart.get(i);if(l){const g=Tv(a,e+1,l);if(g)return g}const c=t.validators;if(c===null)return;const d=e===0?a.join(us):a.slice(e).join(us),h=c.length;for(let g=0;g<h;g++){const v=c[g];if(v.validator(d))return v.classGroupId}},U1=a=>a.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=a.slice(1,-1),t=e.indexOf(":"),o=e.slice(0,t);return o?j1+o:void 0})(),W1=a=>{const{theme:e,classGroups:t}=a;return K1(t,e)},K1=(a,e)=>{const t=kv();for(const o in a){const i=a[o];qu(i,t,o,e)}return t},qu=(a,e,t,o)=>{const i=a.length;for(let l=0;l<i;l++){const c=a[l];V1(c,e,t,o)}},V1=(a,e,t,o)=>{if(typeof a=="string"){$1(a,e,t);return}if(typeof a=="function"){G1(a,e,t,o);return}X1(a,e,t,o)},$1=(a,e,t)=>{const o=a===""?e:xv(e,a);o.classGroupId=t},G1=(a,e,t,o)=>{if(Y1(a)){qu(a(o),e,t,o);return}e.validators===null&&(e.validators=[]),e.validators.push(H1(t,a))},X1=(a,e,t,o)=>{const i=Object.entries(a),l=i.length;for(let c=0;c<l;c++){const[d,h]=i[c];qu(h,xv(e,d),t,o)}},xv=(a,e)=>{let t=a;const o=e.split(us),i=o.length;for(let l=0;l<i;l++){const c=o[l];let d=t.nextPart.get(c);d||(d=kv(),t.nextPart.set(c,d)),t=d}return t},Y1=a=>"isThemeGetter"in a&&a.isThemeGetter===!0,Q1=a=>{if(a<1)return{get:()=>{},set:()=>{}};let e=0,t=Object.create(null),o=Object.create(null);const i=(l,c)=>{t[l]=c,e++,e>a&&(e=0,o=t,t=Object.create(null))};return{get(l){let c=t[l];if(c!==void 0)return c;if((c=o[l])!==void 0)return i(l,c),c},set(l,c){l in t?t[l]=c:i(l,c)}}},Uu="!",Ev=":",Z1=[],Sv=(a,e,t,o,i)=>({modifiers:a,hasImportantModifier:e,baseClassName:t,maybePostfixModifierPosition:o,isExternal:i}),J1=a=>{const{prefix:e,experimentalParseClassName:t}=a;let o=i=>{const l=[];let c=0,d=0,h=0,g;const v=i.length;for(let T=0;T<v;T++){const S=i[T];if(c===0&&d===0){if(S===Ev){l.push(i.slice(h,T)),h=T+1;continue}if(S==="/"){g=T;continue}}S==="["?c++:S==="]"?c--:S==="("?d++:S===")"&&d--}const y=l.length===0?i:i.slice(h);let b=y,E=!1;y.endsWith(Uu)?(b=y.slice(0,-1),E=!0):y.startsWith(Uu)&&(b=y.slice(1),E=!0);const w=g&&g>h?g-h:void 0;return Sv(l,E,b,w)};if(e){const i=e+Ev,l=o;o=c=>c.startsWith(i)?l(c.slice(i.length)):Sv(Z1,!1,c,void 0,!0)}if(t){const i=o;o=l=>t({className:l,parseClassName:i})}return o},ex=a=>{const e=new Map;return a.orderSensitiveModifiers.forEach((t,o)=>{e.set(t,1e6+o)}),t=>{const o=[];let i=[];for(let l=0;l<t.length;l++){const c=t[l],d=c[0]==="[",h=e.has(c);d||h?(i.length>0&&(i.sort(),o.push(...i),i=[]),o.push(c)):i.push(c)}return i.length>0&&(i.sort(),o.push(...i)),o}},tx=a=>be({cache:Q1(a.cacheSize),parseClassName:J1(a),sortModifiers:ex(a)},q1(a)),nx=/\s+/,rx=(a,e)=>{const{parseClassName:t,getClassGroupId:o,getConflictingClassGroupIds:i,sortModifiers:l}=e,c=[],d=a.trim().split(nx);let h="";for(let g=d.length-1;g>=0;g-=1){const v=d[g],{isExternal:y,modifiers:b,hasImportantModifier:E,baseClassName:w,maybePostfixModifierPosition:T}=t(v);if(y){h=v+(h.length>0?" "+h:h);continue}let S=!!T,O=o(S?w.substring(0,T):w);if(!O){if(!S){h=v+(h.length>0?" "+h:h);continue}if(O=o(w),!O){h=v+(h.length>0?" "+h:h);continue}S=!1}const L=b.length===0?"":b.length===1?b[0]:l(b).join(":"),U=E?L+Uu:L,H=U+O;if(c.indexOf(H)>-1)continue;c.push(H);const X=i(O,S);for(let q=0;q<X.length;++q){const W=X[q];c.push(U+W)}h=v+(h.length>0?" "+h:h)}return h},Cv=(...a)=>{let e=0,t,o,i="";for(;e<a.length;)(t=a[e++])&&(o=Bv(t))&&(i&&(i+=" "),i+=o);return i},Bv=a=>{if(typeof a=="string")return a;let e,t="";for(let o=0;o<a.length;o++)a[o]&&(e=Bv(a[o]))&&(t&&(t+=" "),t+=e);return t},ox=(a,...e)=>{let t,o,i,l;const c=h=>{const g=e.reduce((v,y)=>y(v),a());return t=tx(g),o=t.cache.get,i=t.cache.set,l=d,d(h)},d=h=>{const g=o(h);if(g)return g;const v=rx(h,t);return i(h,v),v};return l=c,(...h)=>l(Cv(...h))},ix=[],ut=a=>{const e=t=>t[a]||ix;return e.isThemeGetter=!0,e},Av=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Iv=/^\((?:(\w[\w-]*):)?(.+)\)$/i,sx=/^\d+\/\d+$/,ax=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lx=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,cx=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ux=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,dx=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Zr=a=>sx.test(a),ke=a=>!!a&&!Number.isNaN(Number(a)),Xn=a=>!!a&&Number.isInteger(Number(a)),Wu=a=>a.endsWith("%")&&ke(a.slice(0,-1)),On=a=>ax.test(a),fx=()=>!0,hx=a=>lx.test(a)&&!cx.test(a),_v=()=>!1,px=a=>ux.test(a),gx=a=>dx.test(a),mx=a=>!J(a)&&!ee(a),vx=a=>Jr(a,Dv,_v),J=a=>Av.test(a),xr=a=>Jr(a,Pv,hx),Ku=a=>Jr(a,Tx,ke),Nv=a=>Jr(a,Ov,_v),yx=a=>Jr(a,Lv,gx),ds=a=>Jr(a,Mv,px),ee=a=>Iv.test(a),$o=a=>eo(a,Pv),bx=a=>eo(a,xx),Rv=a=>eo(a,Ov),kx=a=>eo(a,Dv),wx=a=>eo(a,Lv),fs=a=>eo(a,Mv,!0),Jr=(a,e,t)=>{const o=Av.exec(a);return o?o[1]?e(o[1]):t(o[2]):!1},eo=(a,e,t=!1)=>{const o=Iv.exec(a);return o?o[1]?e(o[1]):t:!1},Ov=a=>a==="position"||a==="percentage",Lv=a=>a==="image"||a==="url",Dv=a=>a==="length"||a==="size"||a==="bg-size",Pv=a=>a==="length",Tx=a=>a==="number",xx=a=>a==="family-name",Mv=a=>a==="shadow",Ae=ox(()=>{const a=ut("color"),e=ut("font"),t=ut("text"),o=ut("font-weight"),i=ut("tracking"),l=ut("leading"),c=ut("breakpoint"),d=ut("container"),h=ut("spacing"),g=ut("radius"),v=ut("shadow"),y=ut("inset-shadow"),b=ut("text-shadow"),E=ut("drop-shadow"),w=ut("blur"),T=ut("perspective"),S=ut("aspect"),O=ut("ease"),L=ut("animate"),U=()=>["auto","avoid","all","avoid-page","page","left","right","column"],H=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],X=()=>[...H(),ee,J],q=()=>["auto","hidden","clip","visible","scroll"],W=()=>["auto","contain","none"],F=()=>[ee,J,h],ne=()=>[Zr,"full","auto",...F()],ce=()=>[Xn,"none","subgrid",ee,J],Q=()=>["auto",{span:["full",Xn,ee,J]},Xn,ee,J],ye=()=>[Xn,"auto",ee,J],Z=()=>["auto","min","max","fr",ee,J],we=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Re=()=>["start","end","center","stretch","center-safe","end-safe"],xe=()=>["auto",...F()],_e=()=>[Zr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...F()],D=()=>[a,ee,J],le=()=>[...H(),Rv,Nv,{position:[ee,J]}],G=()=>["no-repeat",{repeat:["","x","y","space","round"]}],A=()=>["auto","cover","contain",kx,vx,{size:[ee,J]}],P=()=>[Wu,$o,xr],ae=()=>["","none","full",g,ee,J],fe=()=>["",ke,$o,xr],Ee=()=>["solid","dashed","dotted","double"],Ne=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],me=()=>[ke,Wu,Rv,Nv],Pe=()=>["","none",w,ee,J],ze=()=>["none",ke,ee,J],pt=()=>["none",ke,ee,J],nr=()=>[ke,ee,J],Pr=()=>[Zr,"full",...F()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[On],breakpoint:[On],color:[fx],container:[On],"drop-shadow":[On],ease:["in","out","in-out"],font:[mx],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[On],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[On],shadow:[On],spacing:["px",ke],text:[On],"text-shadow":[On],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Zr,J,ee,S]}],container:["container"],columns:[{columns:[ke,J,ee,d]}],"break-after":[{"break-after":U()}],"break-before":[{"break-before":U()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:X()}],overflow:[{overflow:q()}],"overflow-x":[{"overflow-x":q()}],"overflow-y":[{"overflow-y":q()}],overscroll:[{overscroll:W()}],"overscroll-x":[{"overscroll-x":W()}],"overscroll-y":[{"overscroll-y":W()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ne()}],"inset-x":[{"inset-x":ne()}],"inset-y":[{"inset-y":ne()}],start:[{start:ne()}],end:[{end:ne()}],top:[{top:ne()}],right:[{right:ne()}],bottom:[{bottom:ne()}],left:[{left:ne()}],visibility:["visible","invisible","collapse"],z:[{z:[Xn,"auto",ee,J]}],basis:[{basis:[Zr,"full","auto",d,...F()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ke,Zr,"auto","initial","none",J]}],grow:[{grow:["",ke,ee,J]}],shrink:[{shrink:["",ke,ee,J]}],order:[{order:[Xn,"first","last","none",ee,J]}],"grid-cols":[{"grid-cols":ce()}],"col-start-end":[{col:Q()}],"col-start":[{"col-start":ye()}],"col-end":[{"col-end":ye()}],"grid-rows":[{"grid-rows":ce()}],"row-start-end":[{row:Q()}],"row-start":[{"row-start":ye()}],"row-end":[{"row-end":ye()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Z()}],"auto-rows":[{"auto-rows":Z()}],gap:[{gap:F()}],"gap-x":[{"gap-x":F()}],"gap-y":[{"gap-y":F()}],"justify-content":[{justify:[...we(),"normal"]}],"justify-items":[{"justify-items":[...Re(),"normal"]}],"justify-self":[{"justify-self":["auto",...Re()]}],"align-content":[{content:["normal",...we()]}],"align-items":[{items:[...Re(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Re(),{baseline:["","last"]}]}],"place-content":[{"place-content":we()}],"place-items":[{"place-items":[...Re(),"baseline"]}],"place-self":[{"place-self":["auto",...Re()]}],p:[{p:F()}],px:[{px:F()}],py:[{py:F()}],ps:[{ps:F()}],pe:[{pe:F()}],pt:[{pt:F()}],pr:[{pr:F()}],pb:[{pb:F()}],pl:[{pl:F()}],m:[{m:xe()}],mx:[{mx:xe()}],my:[{my:xe()}],ms:[{ms:xe()}],me:[{me:xe()}],mt:[{mt:xe()}],mr:[{mr:xe()}],mb:[{mb:xe()}],ml:[{ml:xe()}],"space-x":[{"space-x":F()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":F()}],"space-y-reverse":["space-y-reverse"],size:[{size:_e()}],w:[{w:[d,"screen",..._e()]}],"min-w":[{"min-w":[d,"screen","none",..._e()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[c]},..._e()]}],h:[{h:["screen","lh",..._e()]}],"min-h":[{"min-h":["screen","lh","none",..._e()]}],"max-h":[{"max-h":["screen","lh",..._e()]}],"font-size":[{text:["base",t,$o,xr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,ee,Ku]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Wu,J]}],"font-family":[{font:[bx,J,e]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,ee,J]}],"line-clamp":[{"line-clamp":[ke,"none",ee,Ku]}],leading:[{leading:[l,...F()]}],"list-image":[{"list-image":["none",ee,J]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ee,J]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:D()}],"text-color":[{text:D()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[ke,"from-font","auto",ee,xr]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[ke,"auto",ee,J]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:F()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ee,J]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ee,J]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:le()}],"bg-repeat":[{bg:G()}],"bg-size":[{bg:A()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Xn,ee,J],radial:["",ee,J],conic:[Xn,ee,J]},wx,yx]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:P()}],"gradient-via-pos":[{via:P()}],"gradient-to-pos":[{to:P()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],rounded:[{rounded:ae()}],"rounded-s":[{"rounded-s":ae()}],"rounded-e":[{"rounded-e":ae()}],"rounded-t":[{"rounded-t":ae()}],"rounded-r":[{"rounded-r":ae()}],"rounded-b":[{"rounded-b":ae()}],"rounded-l":[{"rounded-l":ae()}],"rounded-ss":[{"rounded-ss":ae()}],"rounded-se":[{"rounded-se":ae()}],"rounded-ee":[{"rounded-ee":ae()}],"rounded-es":[{"rounded-es":ae()}],"rounded-tl":[{"rounded-tl":ae()}],"rounded-tr":[{"rounded-tr":ae()}],"rounded-br":[{"rounded-br":ae()}],"rounded-bl":[{"rounded-bl":ae()}],"border-w":[{border:fe()}],"border-w-x":[{"border-x":fe()}],"border-w-y":[{"border-y":fe()}],"border-w-s":[{"border-s":fe()}],"border-w-e":[{"border-e":fe()}],"border-w-t":[{"border-t":fe()}],"border-w-r":[{"border-r":fe()}],"border-w-b":[{"border-b":fe()}],"border-w-l":[{"border-l":fe()}],"divide-x":[{"divide-x":fe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":fe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ee(),"hidden","none"]}],"divide-style":[{divide:[...Ee(),"hidden","none"]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}],"divide-color":[{divide:D()}],"outline-style":[{outline:[...Ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ke,ee,J]}],"outline-w":[{outline:["",ke,$o,xr]}],"outline-color":[{outline:D()}],shadow:[{shadow:["","none",v,fs,ds]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",y,fs,ds]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:fe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[ke,xr]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":fe()}],"inset-ring-color":[{"inset-ring":D()}],"text-shadow":[{"text-shadow":["none",b,fs,ds]}],"text-shadow-color":[{"text-shadow":D()}],opacity:[{opacity:[ke,ee,J]}],"mix-blend":[{"mix-blend":[...Ne(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ne()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ke]}],"mask-image-linear-from-pos":[{"mask-linear-from":me()}],"mask-image-linear-to-pos":[{"mask-linear-to":me()}],"mask-image-linear-from-color":[{"mask-linear-from":D()}],"mask-image-linear-to-color":[{"mask-linear-to":D()}],"mask-image-t-from-pos":[{"mask-t-from":me()}],"mask-image-t-to-pos":[{"mask-t-to":me()}],"mask-image-t-from-color":[{"mask-t-from":D()}],"mask-image-t-to-color":[{"mask-t-to":D()}],"mask-image-r-from-pos":[{"mask-r-from":me()}],"mask-image-r-to-pos":[{"mask-r-to":me()}],"mask-image-r-from-color":[{"mask-r-from":D()}],"mask-image-r-to-color":[{"mask-r-to":D()}],"mask-image-b-from-pos":[{"mask-b-from":me()}],"mask-image-b-to-pos":[{"mask-b-to":me()}],"mask-image-b-from-color":[{"mask-b-from":D()}],"mask-image-b-to-color":[{"mask-b-to":D()}],"mask-image-l-from-pos":[{"mask-l-from":me()}],"mask-image-l-to-pos":[{"mask-l-to":me()}],"mask-image-l-from-color":[{"mask-l-from":D()}],"mask-image-l-to-color":[{"mask-l-to":D()}],"mask-image-x-from-pos":[{"mask-x-from":me()}],"mask-image-x-to-pos":[{"mask-x-to":me()}],"mask-image-x-from-color":[{"mask-x-from":D()}],"mask-image-x-to-color":[{"mask-x-to":D()}],"mask-image-y-from-pos":[{"mask-y-from":me()}],"mask-image-y-to-pos":[{"mask-y-to":me()}],"mask-image-y-from-color":[{"mask-y-from":D()}],"mask-image-y-to-color":[{"mask-y-to":D()}],"mask-image-radial":[{"mask-radial":[ee,J]}],"mask-image-radial-from-pos":[{"mask-radial-from":me()}],"mask-image-radial-to-pos":[{"mask-radial-to":me()}],"mask-image-radial-from-color":[{"mask-radial-from":D()}],"mask-image-radial-to-color":[{"mask-radial-to":D()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":H()}],"mask-image-conic-pos":[{"mask-conic":[ke]}],"mask-image-conic-from-pos":[{"mask-conic-from":me()}],"mask-image-conic-to-pos":[{"mask-conic-to":me()}],"mask-image-conic-from-color":[{"mask-conic-from":D()}],"mask-image-conic-to-color":[{"mask-conic-to":D()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:le()}],"mask-repeat":[{mask:G()}],"mask-size":[{mask:A()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ee,J]}],filter:[{filter:["","none",ee,J]}],blur:[{blur:Pe()}],brightness:[{brightness:[ke,ee,J]}],contrast:[{contrast:[ke,ee,J]}],"drop-shadow":[{"drop-shadow":["","none",E,fs,ds]}],"drop-shadow-color":[{"drop-shadow":D()}],grayscale:[{grayscale:["",ke,ee,J]}],"hue-rotate":[{"hue-rotate":[ke,ee,J]}],invert:[{invert:["",ke,ee,J]}],saturate:[{saturate:[ke,ee,J]}],sepia:[{sepia:["",ke,ee,J]}],"backdrop-filter":[{"backdrop-filter":["","none",ee,J]}],"backdrop-blur":[{"backdrop-blur":Pe()}],"backdrop-brightness":[{"backdrop-brightness":[ke,ee,J]}],"backdrop-contrast":[{"backdrop-contrast":[ke,ee,J]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ke,ee,J]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ke,ee,J]}],"backdrop-invert":[{"backdrop-invert":["",ke,ee,J]}],"backdrop-opacity":[{"backdrop-opacity":[ke,ee,J]}],"backdrop-saturate":[{"backdrop-saturate":[ke,ee,J]}],"backdrop-sepia":[{"backdrop-sepia":["",ke,ee,J]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":F()}],"border-spacing-x":[{"border-spacing-x":F()}],"border-spacing-y":[{"border-spacing-y":F()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ee,J]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ke,"initial",ee,J]}],ease:[{ease:["linear","initial",O,ee,J]}],delay:[{delay:[ke,ee,J]}],animate:[{animate:["none",L,ee,J]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[T,ee,J]}],"perspective-origin":[{"perspective-origin":X()}],rotate:[{rotate:ze()}],"rotate-x":[{"rotate-x":ze()}],"rotate-y":[{"rotate-y":ze()}],"rotate-z":[{"rotate-z":ze()}],scale:[{scale:pt()}],"scale-x":[{"scale-x":pt()}],"scale-y":[{"scale-y":pt()}],"scale-z":[{"scale-z":pt()}],"scale-3d":["scale-3d"],skew:[{skew:nr()}],"skew-x":[{"skew-x":nr()}],"skew-y":[{"skew-y":nr()}],transform:[{transform:[ee,J,"","none","gpu","cpu"]}],"transform-origin":[{origin:X()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Pr()}],"translate-x":[{"translate-x":Pr()}],"translate-y":[{"translate-y":Pr()}],"translate-z":[{"translate-z":Pr()}],"translate-none":["translate-none"],accent:[{accent:D()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:D()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ee,J]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":F()}],"scroll-mx":[{"scroll-mx":F()}],"scroll-my":[{"scroll-my":F()}],"scroll-ms":[{"scroll-ms":F()}],"scroll-me":[{"scroll-me":F()}],"scroll-mt":[{"scroll-mt":F()}],"scroll-mr":[{"scroll-mr":F()}],"scroll-mb":[{"scroll-mb":F()}],"scroll-ml":[{"scroll-ml":F()}],"scroll-p":[{"scroll-p":F()}],"scroll-px":[{"scroll-px":F()}],"scroll-py":[{"scroll-py":F()}],"scroll-ps":[{"scroll-ps":F()}],"scroll-pe":[{"scroll-pe":F()}],"scroll-pt":[{"scroll-pt":F()}],"scroll-pr":[{"scroll-pr":F()}],"scroll-pb":[{"scroll-pb":F()}],"scroll-pl":[{"scroll-pl":F()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ee,J]}],fill:[{fill:["none",...D()]}],"stroke-w":[{stroke:[ke,$o,xr,Ku]}],stroke:[{stroke:["none",...D()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}),yt=Cv,Ex=180,Sx=400,to="data-blok-interface",Cx="blok",Bx="inline-toolbar",Vu="tooltip",Fv="[data-blok-interface=blok]",zv="[data-blok-interface=inline-toolbar]";typeof process!="undefined"&&process.platform?process.platform==="darwin"?"Meta":"Control":typeof navigator!="undefined"&&navigator.userAgent.toLowerCase().includes("mac")?"Meta":"Control";const Ax="data-blok-element",$u="[data-blok-element]",Ix="data-blok-element-content",Gu="[data-blok-element-content]",_x="data-blok-editor",qt="[data-blok-editor]",Nx="data-blok-redactor",Hv="[data-blok-redactor]",Rx="data-blok-narrow",Ox="data-blok-rtl",Lx="data-blok-fake-cursor",jv="[data-blok-fake-cursor]",Dx="data-blok-overlay",Px="data-blok-overlay-container",Mx="data-blok-overlay-rectangle",Fx="data-blok-toolbar",qv="[data-blok-toolbar]",zx="data-blok-settings-toggler",Hx="data-blok-drag-handle",jx="[data-blok-drag-handle]",Xu="data-blok-tool",qx="data-blok-stub",Ux="data-blok-stub-info",Wx="data-blok-stub-title",Kx="data-blok-stub-subtitle",Yu="data-blok-selected",Qu="data-blok-stretched",Vx="data-blok-empty",Uv="data-blok-dragging",Wv="data-blok-toolbox-opened";class se{constructor(){this.instance=null,this.selection=null,this.savedSelectionRange=null,this.isFakeBackgroundEnabled=!1,this.fakeBackgroundElements=[]}static get anchorNode(){const e=window.getSelection();return e?e.anchorNode:null}static get anchorElement(){const e=window.getSelection();if(!e)return null;const t=e.anchorNode;return t?R.isElement(t)?t:t.parentElement:null}static get anchorOffset(){const e=window.getSelection();return e?e.anchorOffset:null}static get isCollapsed(){const e=window.getSelection();return e?e.isCollapsed:null}static get isAtBlok(){return this.isSelectionAtBlok(se.get())}static isSelectionAtBlok(e){if(!e)return!1;const t=e.anchorNode||e.focusNode,o=t&&t.nodeType===Node.TEXT_NODE?t.parentNode:t,i=o&&o instanceof Element?o.closest(Hv):null;return i?i.nodeType===Node.ELEMENT_NODE:!1}static isRangeAtBlok(e){if(!e)return;const t=e.startContainer&&e.startContainer.nodeType===Node.TEXT_NODE?e.startContainer.parentNode:e.startContainer,o=t&&t instanceof Element?t.closest(Hv):null;return o?o.nodeType===Node.ELEMENT_NODE:!1}static get isSelectionExists(){const e=se.get();return!!(e!=null&&e.anchorNode)}static get range(){return this.getRangeFromSelection(this.get())}static getRangeFromSelection(e){return e&&e.rangeCount?e.getRangeAt(0):null}static get rect(){const e=document.selection,t={x:0,y:0,width:0,height:0};if(e&&e.type!=="Control"){const d=e.createRange();return t.x=d.boundingLeft,t.y=d.boundingTop,t.width=d.boundingWidth,t.height=d.boundingHeight,t}const o=window.getSelection();if(!o)return Ce("Method window.getSelection returned null","warn"),t;if(o.rangeCount===null||isNaN(o.rangeCount))return Ce("Method SelectionUtils.rangeCount is not supported","warn"),t;if(o.rangeCount===0)return t;const i=o.getRangeAt(0).cloneRange(),l=i.getBoundingClientRect();if(l.x===0&&l.y===0){const c=document.createElement("span");c.appendChild(document.createTextNode("")),i.insertNode(c);const d=c.getBoundingClientRect(),h=c.parentNode;return h==null||h.removeChild(c),h==null||h.normalize(),d}return l}static get text(){var t;const e=window.getSelection();return(t=e==null?void 0:e.toString())!=null?t:""}static get(){return window.getSelection()}static setCursor(e,t=0){const o=document.createRange(),i=window.getSelection(),l=R.isNativeInput(e);if(l&&!R.canSetCaret(e))return e.getBoundingClientRect();if(l){const c=e;return c.focus(),c.selectionStart=t,c.selectionEnd=t,c.getBoundingClientRect()}return o.setStart(e,t),o.setEnd(e,t),i?(i.removeAllRanges(),i.addRange(o),o.getBoundingClientRect()):e.getBoundingClientRect()}static isRangeInsideContainer(e){const t=se.range;return t===null?!1:e.contains(t.startContainer)}static addFakeCursor(){const e=se.range;if(e===null)return;const t=R.make("span");t.setAttribute(Lx,""),t.setAttribute("data-blok-mutation-free","true"),e.collapse(),e.insertNode(t)}static isFakeCursorInsideContainer(e){return R.find(e,jv)!==null}static removeFakeCursor(e=document.body){const t=R.find(e,jv);t&&t.remove()}removeFakeBackground(){var l;if(!this.fakeBackgroundElements.length){this.isFakeBackgroundEnabled=!1;return}const e=this.fakeBackgroundElements[0],t=this.fakeBackgroundElements[this.fakeBackgroundElements.length-1],o=e.firstChild,i=t.lastChild;if(this.fakeBackgroundElements.forEach(c=>{this.unwrapFakeBackground(c)}),o&&i){const c=document.createRange();c.setStart(o,0),c.setEnd(i,((l=i.textContent)==null?void 0:l.length)||0),this.savedSelectionRange=c}this.fakeBackgroundElements=[],this.isFakeBackgroundEnabled=!1}setFakeBackground(){this.removeFakeBackground();const e=window.getSelection();if(!e||e.rangeCount===0)return;const t=e.getRangeAt(0);if(t.collapsed)return;const o=this.collectTextNodes(t);if(o.length===0)return;const i=t.startContainer,l=t.startOffset,c=t.endContainer,d=t.endOffset;if(this.fakeBackgroundElements=[],o.forEach(g=>{var O,L;const v=document.createRange(),y=g===i,b=g===c,E=y?l:0,w=(L=(O=g.textContent)==null?void 0:O.length)!=null?L:0,T=b?d:w;if(E===T)return;v.setStart(g,E),v.setEnd(g,T);const S=this.wrapRangeWithFakeBackground(v);S&&this.fakeBackgroundElements.push(S)}),!this.fakeBackgroundElements.length)return;const h=document.createRange();h.setStartBefore(this.fakeBackgroundElements[0]),h.setEndAfter(this.fakeBackgroundElements[this.fakeBackgroundElements.length-1]),e.removeAllRanges(),e.addRange(h),this.isFakeBackgroundEnabled=!0}collectTextNodes(e){const t=[],{commonAncestorContainer:o}=e;if(o.nodeType===Node.TEXT_NODE)return t.push(o),t;const i=document.createTreeWalker(o,NodeFilter.SHOW_TEXT,{acceptNode:l=>e.intersectsNode(l)&&l.textContent&&l.textContent.length>0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT});for(;i.nextNode();)t.push(i.currentNode);return t}wrapRangeWithFakeBackground(e){if(e.collapsed)return null;const t=R.make("span");t.setAttribute("data-blok-testid","fake-background"),t.setAttribute("data-blok-fake-background","true"),t.setAttribute("data-blok-mutation-free","true"),t.style.backgroundColor="#a8d6ff",t.style.color="inherit",t.style.display="inline",t.style.padding="0",t.style.margin="0";const o=e.extractContents();return o.childNodes.length===0?null:(t.appendChild(o),e.insertNode(t),t)}unwrapFakeBackground(e){const t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}}save(){this.savedSelectionRange=se.range}restore(){if(!this.savedSelectionRange)return;const e=window.getSelection();e&&(e.removeAllRanges(),e.addRange(this.savedSelectionRange))}clearSaved(){this.savedSelectionRange=null}collapseToEnd(){const e=window.getSelection();if(!e||!e.focusNode)return;const t=document.createRange();t.selectNodeContents(e.focusNode),t.collapse(!1),e.removeAllRanges(),e.addRange(t)}findParentTag(e,t,o=10){const i=window.getSelection();if(!i||!i.anchorNode||!i.focusNode)return null;const l=[i.anchorNode,i.focusNode],c=d=>{const h=(g,v)=>{if(v<=0||!g)return null;const y=g.nodeType===Node.ELEMENT_NODE&&g.tagName===e,b=!t||g.classList&&g.classList.contains(t);if(y&&b)return g;if(!g.parentNode)return null;const E=g.parentNode,w=!t||E.classList&&E.classList.contains(t);return E.tagName===e&&w?E:h(E,v-1)};return h(d,o)};for(const d of l){const h=c(d);if(h)return h}return null}expandToTag(e){const t=window.getSelection();if(!t)return;t.removeAllRanges();const o=document.createRange();o.selectNodeContents(e),t.addRange(o)}}const $x=(a,e)=>{const{type:t,target:o,addedNodes:i,removedNodes:l}=a;return a.type==="attributes"&&a.attributeName==="data-blok-empty"?!1:e.contains(o)?!0:t!=="childList"?!1:Array.from(i).some(h=>h===e)?!0:Array.from(l).some(h=>h===e)},Zu="redactor dom changed",Kv="block changed",Vv="fake cursor is about to be toggled",$v="fake cursor have been set",Go="blok mobile layout toggled",Ju="block-settings-opened",ed="block-settings-closed",td=(a,e)=>{if(!a.conversionConfig)return!1;const t=a.conversionConfig[e];return De(t)||un(t)},hs=(a,e)=>td(a.tool,e),Gv=(a,e)=>Object.entries(a).some((([t,o])=>e[t]&&M1(e[t],o))),Xv=async(a,e)=>{const o=(await a.save()).data,i=e.find(l=>l.name===a.name);return i!==void 0&&!td(i,"export")?[]:e.reduce((l,c)=>{if(!td(c,"import")||c.toolbox===void 0)return l;const d=c.toolbox.filter(h=>{if(ot(h)||h.icon===void 0)return!1;const g=h.data!==void 0;return!(g&&Gv(h.data,o)||!g&&c.name===a.name)});return l.push(It(be({},c),{toolbox:d})),l},[])},Yv=(a,e)=>a.mergeable?a.name===e.name?!0:hs(e,"export")&&hs(a,"import"):!1,Gx=(a,e)=>{const t=e==null?void 0:e.export;return De(t)?t(a):un(t)?a[t]:(t!==void 0&&Ce("Conversion «export» property must be a string or function. String means key of saved data object to export. Function should export processed string to export."),"")},Qv=(a,e,t)=>{const o=e==null?void 0:e.import;return De(o)?o(a,t):un(o)?{[o]:a}:(o!==void 0&&Ce("Conversion «import» property must be a string or function. String means key of tool data to import. Function accepts a imported string and return composed tool data."),{})};var tt=(a=>(a.Default="default",a.Separator="separator",a.Html="html",a))(tt||{}),Ln=(a=>(a.RENDERED="rendered",a.MOVED="moved",a.UPDATED="updated",a.REMOVED="removed",a.ON_PASTE="onPaste",a))(Ln||{});const tn=class tn extends Ko{constructor({id:e=L1(),data:t,tool:o,readOnly:i,tunesData:l},c){super(),this.cachedInputs=[],this.lastSavedTunes={},this.toolRenderedElement=null,this.contentElement=null,this.tunesInstances=new Map,this.defaultTunesInstances=new Map,this.readyResolver=null,this.unavailableTunesData={},this.inputIndex=0,this.blokEventBus=null,this.redactorDomChangedCallback=()=>{},this.handleFocus=()=>{this.dropInputsCache(),this.updateCurrentInput()},this.didMutated=(h=void 0)=>{const g=h===void 0,v=h instanceof InputEvent;!g&&!v&&this.detectToolRootChange(h),(g||v?!0:!(h.length>0&&h.every(E=>{const{addedNodes:w,removedNodes:T,target:S}=E;return[...Array.from(w),...Array.from(T),S].every(L=>{var H;const U=R.isElement(L)?L:(H=L.parentElement)!=null?H:null;return U===null?!1:U.closest('[data-blok-mutation-free="true"]')!==null})})))&&(this.dropInputsCache(),this.updateCurrentInput(),this.toggleInputsEmptyMark(),this.call("updated"),this.emit("didMutated",this))},this.ready=new Promise(h=>{this.readyResolver=h}),this.name=o.name,this.id=e,this.settings=o.settings,this.config=this.settings,this.blokEventBus=c||null,this.blockAPI=new Rn(this),this.lastSavedData=t!=null?t:{},this.lastSavedTunes=l!=null?l:{},this.tool=o,this.toolInstance=o.create(t,this.blockAPI,i),this.tunes=o.tunes,this.composeTunes(l);const d=this.compose();if(d==null)throw new Error(`Tool "${this.name}" did not return a block holder element during render()`);this.holder=d,window.requestIdleCallback(()=>{this.watchBlockMutations(),this.addInputEvents(),this.toggleInputsEmptyMark()})}call(e,t){const o=this.toolInstance[e];if(De(o))try{o.call(this.toolInstance,t)}catch(i){const l=i instanceof Error?i.message:String(i);Ce(`Error during '${e}' call: ${l}`,"error")}}async mergeWith(e){if(!De(this.toolInstance.merge))throw new Error(`Block tool "${this.name}" does not support merging`);await this.toolInstance.merge(e)}async save(){const e=await this.extractToolData();if(e===void 0)return;const t=be({},this.unavailableTunesData);[...this.tunesInstances.entries(),...this.defaultTunesInstances.entries()].forEach(([l,c])=>{if(De(c.save))try{t[l]=c.save()}catch(d){Ce(`Tune ${c.constructor.name} save method throws an Error %o`,"warn",d)}});const o=window.performance.now();this.lastSavedData=e,this.lastSavedTunes=be({},t);const i=window.performance.now();return{id:this.id,tool:this.name,data:e,tunes:t,time:i-o}}async extractToolData(){try{const e=await this.toolInstance.save(this.pluginsContent);if(!this.isEmpty||e===void 0||e===null||typeof e!="object")return e;const t=be({},e),o=i=>{const l=t[i];if(typeof l!="string")return;const c=document.createElement("div");c.innerHTML=l,R.isEmpty(c)&&(t[i]="")};return o("text"),o("html"),t}catch(e){const t=e instanceof Error?e:new Error(String(e));Ce(`Saving process for ${this.name} tool failed due to the ${t}`,"log",t);return}}async validate(e){return this.toolInstance.validate instanceof Function?await this.toolInstance.validate(e):!0}getTunes(){const e=[],t=[],o=(c,d)=>{if(c){if(R.isElement(c)){d.push({type:tt.Html,element:c});return}if(Array.isArray(c)){d.push(...c);return}d.push(c)}},i=typeof this.toolInstance.renderSettings=="function"?this.toolInstance.renderSettings():[];return o(i,e),[...this.tunesInstances.values(),...this.defaultTunesInstances.values()].map(c=>c.render()).forEach(c=>{o(c,t)}),{toolTunes:e,commonTunes:t}}updateCurrentInput(){var l;const e=se.anchorNode,t=document.activeElement,o=c=>{if(!c)return;const d=c instanceof HTMLElement?c:c.parentElement;if(d===null)return;const h=this.inputs.find(y=>y===d||y.contains(d));if(h!==void 0)return h;const g=d.closest(R.allInputsSelector);if(!(g instanceof HTMLElement))return;const v=this.inputs.find(y=>y===g);if(v!==void 0)return v};if(R.isNativeInput(t)){this.currentInput=t;return}const i=(l=o(e))!=null?l:t instanceof HTMLElement?o(t):void 0;if(i!==void 0){this.currentInput=i;return}t instanceof HTMLElement&&this.inputs.includes(t)&&(this.currentInput=t)}dispatchChange(){this.didMutated()}destroy(){this.unwatchBlockMutations(),this.removeInputEvents(),super.destroy(),De(this.toolInstance.destroy)&&this.toolInstance.destroy()}async getActiveToolboxEntry(){const e=this.tool.toolbox;if(!e)return;if(e.length===1)return Promise.resolve(e[0]);const t=await this.data;return e.find(o=>Gv(o.data,t))}async exportDataAsString(){const e=await this.data;return Gx(e,this.tool.conversionConfig)}get inputs(){if(this.cachedInputs.length!==0)return this.cachedInputs;const e=R.findAllInputs(this.holder);return this.inputIndex>e.length-1&&(this.inputIndex=e.length-1),this.cachedInputs=e,e}get currentInput(){return this.inputs[this.inputIndex]}set currentInput(e){if(e===void 0)return;const t=this.inputs.findIndex(o=>o===e||o.contains(e));t!==-1&&(this.inputIndex=t)}get firstInput(){return this.inputs[0]}get lastInput(){const e=this.inputs;return e[e.length-1]}get nextInput(){return this.inputs[this.inputIndex+1]}get previousInput(){return this.inputs[this.inputIndex-1]}get data(){return this.save().then(e=>e&&!ot(e.data)?e.data:{})}get preservedData(){var e;return(e=this.lastSavedData)!=null?e:{}}get preservedTunes(){var e;return(e=this.lastSavedTunes)!=null?e:{}}get sanitize(){return this.tool.sanitizeConfig}get mergeable(){return De(this.toolInstance.merge)}get focusable(){return this.inputs.length!==0}get isEmpty(){const e=R.isEmpty(this.pluginsContent,"/"),t=!this.hasMedia;return e&&t}get hasMedia(){const e=["img","iframe","video","audio","source","input","textarea","twitterwidget"];return!!this.holder.querySelector(e.join(","))}set selected(e){var i,l;if(e?this.holder.setAttribute(Yu,"true"):this.holder.removeAttribute(Yu),this.contentElement){const c=this.stretched?tn.styles.contentStretched:"";this.contentElement.className=e?Ae(tn.styles.content,tn.styles.contentSelected):Ae(tn.styles.content,c)}const t=e===!0&&se.isRangeInsideContainer(this.holder),o=e===!1&&se.isFakeCursorInsideContainer(this.holder);!t&&!o||((i=this.blokEventBus)==null||i.emit(Vv,{state:e}),t&&se.addFakeCursor(),o&&se.removeFakeCursor(this.holder),(l=this.blokEventBus)==null||l.emit($v,{state:e}))}get selected(){return this.holder.getAttribute(Yu)==="true"}setStretchState(e){e?this.holder.setAttribute(Qu,"true"):this.holder.removeAttribute(Qu),this.contentElement&&!this.selected&&(this.contentElement.className=e?Ae(tn.styles.content,tn.styles.contentStretched):tn.styles.content)}set stretched(e){this.setStretchState(e)}get stretched(){return this.holder.getAttribute(Qu)==="true"}get pluginsContent(){if(this.toolRenderedElement===null)throw new Error("Block pluginsContent is not yet initialized");return this.toolRenderedElement}compose(){var l;const e=R.make("div",tn.styles.wrapper),t=R.make("div",tn.styles.content);this.contentElement=t,e.setAttribute(Ax,""),t.setAttribute(Ix,""),t.setAttribute("data-blok-testid","block-content");const o=this.toolInstance.render();e.setAttribute("data-blok-testid","block-wrapper"),this.name&&!e.hasAttribute("data-blok-component")&&e.setAttribute("data-blok-component",this.name),e.setAttribute("data-blok-id",this.id),o instanceof Promise?o.then(c=>{var d;this.toolRenderedElement=c,this.addToolDataAttributes(c,e),t.appendChild(c),(d=this.readyResolver)==null||d.call(this)}).catch(c=>{var d;Ce("Tool render promise rejected: %o","error",c),(d=this.readyResolver)==null||d.call(this)}):(this.toolRenderedElement=o,this.addToolDataAttributes(o,e),t.appendChild(o),(l=this.readyResolver)==null||l.call(this));const i=[...this.tunesInstances.values(),...this.defaultTunesInstances.values()].reduce((c,d)=>{if(De(d.wrap))try{return d.wrap(c)}catch(h){return Ce(`Tune ${d.constructor.name} wrap method throws an Error %o`,"warn",h),c}return c},t);return e.appendChild(i),e}addToolDataAttributes(e,t){var d;this.name&&!t.hasAttribute("data-blok-component")&&t.setAttribute("data-blok-component",this.name);const o="data-blok-placeholder",i=(d=this.config)==null?void 0:d.placeholder,l=typeof i=="string"?i.trim():"",c=["empty:before:pointer-events-none","empty:before:text-gray-text","empty:before:cursor-text","empty:before:content-[attr(data-blok-placeholder)]","[&[data-blok-empty=true]]:before:pointer-events-none","[&[data-blok-empty=true]]:before:text-gray-text","[&[data-blok-empty=true]]:before:cursor-text","[&[data-blok-empty=true]]:before:content-[attr(data-blok-placeholder)]"];if(l.length>0){e.setAttribute(o,l),e.classList.add(...c);return}i===!1&&e.hasAttribute(o)&&e.removeAttribute(o)}composeTunes(e){Array.from(this.tunes.values()).forEach(t=>{(t.isInternal?this.defaultTunesInstances:this.tunesInstances).set(t.name,t.create(e[t.name],this.blockAPI))}),Object.entries(e).forEach(([t,o])=>{this.tunesInstances.has(t)||(this.unavailableTunesData[t]=o)})}addInputEvents(){this.inputs.forEach(e=>{e.addEventListener("focus",this.handleFocus),R.isNativeInput(e)&&e.addEventListener("input",this.didMutated)})}removeInputEvents(){this.inputs.forEach(e=>{e.removeEventListener("focus",this.handleFocus),R.isNativeInput(e)&&e.removeEventListener("input",this.didMutated)})}watchBlockMutations(){var e;this.redactorDomChangedCallback=t=>{const{mutations:o}=t,i=this.toolRenderedElement;if(i===null)return;const l=o.filter(c=>$x(c,i));l.length>0&&this.didMutated(l)},(e=this.blokEventBus)==null||e.on(Zu,this.redactorDomChangedCallback)}unwatchBlockMutations(){var e;(e=this.blokEventBus)==null||e.off(Zu,this.redactorDomChangedCallback)}refreshToolRootElement(){const e=this.holder.querySelector(Gu);if(!e)return;const t=e.firstElementChild;t&&t!==this.toolRenderedElement&&(this.toolRenderedElement=t,this.dropInputsCache())}detectToolRootChange(e){const t=this.toolRenderedElement;t!==null&&e.forEach(o=>{if(Array.from(o.removedNodes).includes(t)){const l=o.addedNodes[o.addedNodes.length-1];this.toolRenderedElement=l}})}dropInputsCache(){this.cachedInputs=[]}toggleInputsEmptyMark(){this.inputs.forEach(yv)}};tn.styles={wrapper:"relative opacity-100 animate-fade-in first:mt-0 [&_a]:cursor-pointer [&_a]:underline [&_a]:text-link [&_b]:font-bold [&_i]:italic",content:"relative mx-auto transition-colors duration-150 ease-out max-w-content",contentSelected:"bg-selection [&_[contenteditable]]:select-none [&_img]:opacity-55 [&_[data-blok-tool=stub]]:opacity-55",contentStretched:"max-w-none"};let Xo=tn;class Xx extends Be{constructor(){super(...arguments),this.insert=(e,t={},o={},i,l,c,d)=>{const h=e!=null?e:this.config.defaultBlock,g=this.Blok.BlockManager.insert({id:d,tool:h,data:t,index:i,needToFocus:l,replace:c});return new Rn(g)},this.composeBlockData=async e=>{const t=this.Blok.Tools.blockTools.get(e);if(t===void 0)throw new Error(`Block Tool with type "${e}" not found`);return new Xo({tool:t,api:this.Blok.API,readOnly:!0,data:{},tunesData:{}}).data},this.update=async(e,t,o)=>{const{BlockManager:i}=this.Blok,l=i.getBlockById(e);if(l===void 0)throw new Error(`Block with id "${e}" not found`);const c=await i.update(l,t,o);return new Rn(c)},this.convert=async(e,t,o)=>{var y,b;const{BlockManager:i,Tools:l}=this.Blok,c=i.getBlockById(e);if(!c)throw new Error(`Block with id "${e}" not found`);const d=l.blockTools.get(c.name),h=l.blockTools.get(t);if(!h)throw new Error(`Block Tool with type "${t}" not found`);const g=((y=d==null?void 0:d.conversionConfig)==null?void 0:y.export)!==void 0,v=((b=h.conversionConfig)==null?void 0:b.import)!==void 0;if(g&&v){const E=await i.convert(c,t,o);return new Rn(E)}else{const E=[g?!1:cs(c.name),v?!1:cs(t)].filter(Boolean).join(" and ");throw new Error(`Conversion from "${c.name}" to "${t}" is not possible. ${E} tool(s) should provide a "conversionConfig"`)}},this.insertMany=(e,t=this.Blok.BlockManager.blocks.length-1)=>{this.validateIndex(t);const o=e.map(({id:i,type:l,data:c})=>this.Blok.BlockManager.composeBlock({id:i,tool:l||this.config.defaultBlock,data:c}));return this.Blok.BlockManager.insertMany(o,t),o.map(i=>new Rn(i))}}get methods(){return{clear:()=>this.clear(),render:e=>this.render(e),renderFromHTML:e=>this.renderFromHTML(e),delete:e=>this.delete(e),move:(e,t)=>this.move(e,t),getBlockByIndex:e=>this.getBlockByIndex(e),getById:e=>this.getById(e),getCurrentBlockIndex:()=>this.getCurrentBlockIndex(),getBlockIndex:e=>this.getBlockIndex(e),getBlocksCount:()=>this.getBlocksCount(),getBlockByElement:e=>this.getBlockByElement(e),insert:this.insert,insertMany:this.insertMany,update:this.update,composeBlockData:this.composeBlockData,convert:this.convert,stretchBlock:(e,t=!0)=>this.stretchBlock(e,t)}}getBlocksCount(){return this.Blok.BlockManager.blocks.length}getCurrentBlockIndex(){return this.Blok.BlockManager.currentBlockIndex}getBlockIndex(e){const t=this.Blok.BlockManager.getBlockById(e);if(!t){Qt("There is no block with id `"+e+"`","warn");return}return this.Blok.BlockManager.getBlockIndex(t)}getBlockByIndex(e){const t=this.Blok.BlockManager.getBlockByIndex(e);if(t===void 0){Qt("There is no block at index `"+e+"`","warn");return}return new Rn(t)}getById(e){const t=this.Blok.BlockManager.getBlockById(e);return t===void 0?(Qt("There is no block with id `"+e+"`","warn"),null):new Rn(t)}getBlockByElement(e){const t=this.Blok.BlockManager.getBlock(e);if(t===void 0){Qt("There is no block corresponding to element `"+e+"`","warn");return}return new Rn(t)}move(e,t){this.Blok.BlockManager.move(e,t)}delete(e=this.Blok.BlockManager.currentBlockIndex){const t=this.Blok.BlockManager.getBlockByIndex(e);if(t===void 0){Qt(`There is no block at index \`${e}\``,"warn");return}try{this.Blok.BlockManager.removeBlock(t)}catch(o){Qt(o,"warn");return}this.Blok.BlockManager.blocks.length===0&&this.Blok.BlockManager.insert(),this.Blok.BlockManager.currentBlock&&this.Blok.Caret.setToBlock(this.Blok.BlockManager.currentBlock,this.Blok.Caret.positions.END),this.Blok.Toolbar.close()}async clear(){await this.Blok.BlockManager.clear(!0),this.Blok.InlineToolbar.close()}async render(e){if(e===void 0||e.blocks===void 0)throw new Error("Incorrect data passed to the render() method");this.Blok.ModificationsObserver.disable(),await this.Blok.BlockManager.clear(),await this.Blok.Renderer.render(e.blocks),this.Blok.ModificationsObserver.enable()}async renderFromHTML(e){return await this.Blok.BlockManager.clear(),this.Blok.Paste.processText(e,!0)}stretchBlock(e,t=!0){const o=this.Blok.BlockManager.getBlockByIndex(e);o&&o.setStretchState(t)}validateIndex(e){if(typeof e!="number")throw new Error("Index should be a number");if(e<0)throw new Error("Index should be greater than or equal to 0");if(e===null)throw new Error("Index should be greater than or equal to 0")}}const Yx=(a,e)=>typeof a=="number"?e.BlockManager.getBlockByIndex(a):typeof a=="string"?e.BlockManager.getBlockById(a):e.BlockManager.getBlockById(a.id);class Qx extends Be{constructor(){super(...arguments),this.setToFirstBlock=(e=this.Blok.Caret.positions.DEFAULT,t=0)=>this.Blok.BlockManager.firstBlock?(this.Blok.Caret.setToBlock(this.Blok.BlockManager.firstBlock,e,t),!0):!1,this.setToLastBlock=(e=this.Blok.Caret.positions.DEFAULT,t=0)=>this.Blok.BlockManager.lastBlock?(this.Blok.Caret.setToBlock(this.Blok.BlockManager.lastBlock,e,t),!0):!1,this.setToPreviousBlock=(e=this.Blok.Caret.positions.DEFAULT,t=0)=>this.Blok.BlockManager.previousBlock?(this.Blok.Caret.setToBlock(this.Blok.BlockManager.previousBlock,e,t),!0):!1,this.setToNextBlock=(e=this.Blok.Caret.positions.DEFAULT,t=0)=>this.Blok.BlockManager.nextBlock?(this.Blok.Caret.setToBlock(this.Blok.BlockManager.nextBlock,e,t),!0):!1,this.setToBlock=(e,t=this.Blok.Caret.positions.DEFAULT,o=0)=>{const i=Yx(e,this.Blok);return i===void 0?!1:(this.Blok.Caret.setToBlock(i,t,o),!0)},this.focus=(e=!1)=>e?this.setToLastBlock(this.Blok.Caret.positions.END):this.setToFirstBlock(this.Blok.Caret.positions.START)}get methods(){return{setToFirstBlock:this.setToFirstBlock,setToLastBlock:this.setToLastBlock,setToPreviousBlock:this.setToPreviousBlock,setToNextBlock:this.setToNextBlock,setToBlock:this.setToBlock,focus:this.focus}}}class Zx extends Be{get methods(){return{emit:(e,t)=>this.emit(e,t),off:(e,t)=>this.off(e,t),on:(e,t)=>this.on(e,t)}}on(e,t){this.eventsDispatcher.on(e,t)}emit(e,t){this.eventsDispatcher.emit(e,t)}off(e,t){this.eventsDispatcher.off(e,t)}}class nd extends Be{static getNamespace(e,t){return t?`blockTunes.${e}`:`tools.${e}`}get methods(){return{t:e=>(Qt("I18n.t() method can be accessed only from Tools","warn"),"")}}getMethodsForTool(e,t){return Object.assign(this.methods,{t:o=>$e.t(nd.getNamespace(e,t),o)})}}class Jx extends Be{get methods(){return{blocks:this.Blok.BlocksAPI.methods,caret:this.Blok.CaretAPI.methods,tools:this.Blok.ToolsAPI.methods,events:this.Blok.EventsAPI.methods,listeners:this.Blok.ListenersAPI.methods,notifier:this.Blok.NotifierAPI.methods,sanitizer:this.Blok.SanitizerAPI.methods,saver:this.Blok.SaverAPI.methods,selection:this.Blok.SelectionAPI.methods,styles:this.Blok.StylesAPI.classes,toolbar:this.Blok.ToolbarAPI.methods,inlineToolbar:this.Blok.InlineToolbarAPI.methods,tooltip:this.Blok.TooltipAPI.methods,i18n:this.Blok.I18nAPI.methods,readOnly:this.Blok.ReadOnlyAPI.methods,ui:this.Blok.UiAPI.methods}}getMethodsForTool(e,t){return Object.assign(this.methods,{i18n:this.Blok.I18nAPI.getMethodsForTool(e,t)})}}class eE extends Be{get methods(){return{close:()=>this.close(),open:()=>this.open()}}open(){this.Blok.InlineToolbar.tryToShow()}close(){this.Blok.InlineToolbar.close()}}class tE extends Be{get methods(){return{on:(e,t,o,i)=>this.on(e,t,o,i),off:(e,t,o,i)=>this.off(e,t,o,i),offById:e=>this.offById(e)}}on(e,t,o,i){return this.listeners.on(e,t,o,i)}off(e,t,o,i){this.listeners.off(e,t,o,i)}offById(e){this.listeners.offById(e)}}class nE{constructor(){this.notifierModule=null,this.loadingPromise=null}loadNotifierModule(){return this.notifierModule!==null?Promise.resolve(this.notifierModule):(this.loadingPromise===null&&(this.loadingPromise=Promise.resolve().then(()=>OC).then(e=>{var o;const t=(o=e==null?void 0:e.default)!=null?o:e;if(!this.isNotifierModule(t))throw new Error('notifier module does not expose a "show" method.');return this.notifierModule=t,t}).catch(e=>{throw this.loadingPromise=null,e})),this.loadingPromise)}show(e){this.loadNotifierModule().then(t=>{t.show(e)}).catch(t=>{console.error("[Blok] Failed to display notification. Reason:",t)})}isNotifierModule(e){return typeof e=="object"&&e!==null&&"show"in e&&typeof e.show=="function"}}class rE extends Be{constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t}),this.notifier=new nE}get methods(){return{show:e=>this.show(e)}}show(e){return this.notifier.show(e)}}class oE extends Be{get methods(){const e=()=>this.isEnabled;return{toggle:t=>this.toggle(t),get isEnabled(){return e()}}}toggle(e){return this.Blok.ReadOnly.toggle(e)}get isEnabled(){return this.Blok.ReadOnly.isEnabled}}var ps={exports:{}},iE=ps.exports,Zv;function sE(){return Zv||(Zv=1,(function(a,e){(function(t,o){a.exports=o()})(iE,function(){function t(y){var b=y.tags,E=Object.keys(b),w=E.map(function(T){return typeof b[T]}).every(function(T){return T==="object"||T==="boolean"||T==="function"});if(!w)throw new Error("The configuration was invalid");this.config=y}var o=["P","LI","TD","TH","DIV","H1","H2","H3","H4","H5","H6","PRE"];function i(y){return o.indexOf(y.nodeName)!==-1}var l=["A","B","STRONG","I","EM","SUB","SUP","U","STRIKE"];function c(y){return l.indexOf(y.nodeName)!==-1}t.prototype.clean=function(y){const b=document.implementation.createHTMLDocument(),E=b.createElement("div");return E.innerHTML=y,this._sanitize(b,E),E.innerHTML},t.prototype._sanitize=function(y,b){var E=d(y,b),w=E.firstChild();if(w)do{if(w.nodeType===Node.TEXT_NODE)if(w.data.trim()===""&&(w.previousElementSibling&&i(w.previousElementSibling)||w.nextElementSibling&&i(w.nextElementSibling))){b.removeChild(w),this._sanitize(y,b);break}else continue;if(w.nodeType===Node.COMMENT_NODE){b.removeChild(w),this._sanitize(y,b);break}var T=c(w),S;T&&(S=Array.prototype.some.call(w.childNodes,i));var O=!!b.parentNode,L=i(b)&&i(w)&&O,U=w.nodeName.toLowerCase(),H=h(this.config,U,w),X=T&&S;if(X||g(w,H)||!this.config.keepNestedBlockElements&&L){if(!(w.nodeName==="SCRIPT"||w.nodeName==="STYLE"))for(;w.childNodes.length>0;)b.insertBefore(w.childNodes[0],w);b.removeChild(w),this._sanitize(y,b);break}for(var q=0;q<w.attributes.length;q+=1){var W=w.attributes[q];v(W,H,w)&&(w.removeAttribute(W.name),q=q-1)}this._sanitize(y,w)}while(w=E.nextSibling())};function d(y,b){return y.createTreeWalker(b,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_COMMENT,null,!1)}function h(y,b,E){return typeof y.tags[b]=="function"?y.tags[b](E):y.tags[b]}function g(y,b){return typeof b=="undefined"?!0:typeof b=="boolean"?!b:!1}function v(y,b,E){var w=y.name.toLowerCase();return b===!0?!1:typeof b[w]=="function"?!b[w](y.value,E):typeof b[w]=="undefined"||b[w]===!1?!0:typeof b[w]=="string"?b[w]!==y.value:!1}return t})})(ps)),ps.exports}var aE=sE();const lE=Oe(aE),cE=/^\s*(?:javascript\s*:|data\s*:\s*text\s*\/\s*html)/i,uE=/\s*(?:href|src)\s*=\s*(?:"\s*(?:javascript\s*:|data\s*:\s*text\s*\/\s*html)[^"]*"|'\s*(?:javascript\s*:|data\s*:\s*text\s*\/\s*html)[^']*|(?:javascript\s*:|data\s*:\s*text\s*\/\s*html)[^ \t\r\n>]*)/gi,rd=(a,e,t={})=>a.map(o=>{const i=De(e)?e(o.tool):e,l=i!=null?i:{};return qe(l)&&ot(l)&&ot(t)?o:It(be({},o),{data:od(o.data,l,t)})}),Tn=(a,e={})=>{const t={tags:e};return new lE(t).clean(a)},od=(a,e,t)=>Array.isArray(a)?dE(a,e,t):qe(a)?fE(a,e,t):un(a)?hE(a,e,t):a,dE=(a,e,t)=>a.map(o=>od(o,e,t)),fE=(a,e,t)=>{const o={},i=a;for(const l in a){if(!Object.prototype.hasOwnProperty.call(a,l))continue;const c=i[l],d=qe(e)?e:void 0,h=d==null?void 0:d[l],g=h!==void 0&&pE(h)?h:e;o[l]=od(c,g,t)}return o},hE=(a,e,t)=>{const o=kE(e,t);if(o){const i=Tn(a,o);return id(ey(i,o))}if(!ot(t)){const i=Tn(a,t);return id(ey(i,t))}return id(a)},pE=a=>qe(a)||dv(a)||De(a),gE=a=>a?cE.test(a):!1,id=a=>{if(!a||a.indexOf("<")===-1)return a;if(typeof document!="undefined"){const e=document.createElement("template");return e.innerHTML=a,e.content.querySelectorAll("[href],[src]").forEach(o=>{["href","src"].forEach(i=>{const l=o.getAttribute(i);gE(l)&&o.removeAttribute(i)})}),e.innerHTML}return a.replace(uE,"")},sd=a=>{if(ot(a))return{};const e={};for(const t in a)Object.prototype.hasOwnProperty.call(a,t)&&(e[t]=Er(a[t]));return e},Jv=a=>function(t){const o=a.call(this,t);return o==null?{}:o},mE=new Set(["class","id","title","role","dir","lang"]),vE=a=>{const e=a.toLowerCase();return e.startsWith("data-")||e.startsWith("aria-")||mE.has(e)},yE=a=>{const e={};return Array.from(a.attributes).forEach(t=>{vE(t.name)&&(e[t.name]=!0)}),e},Er=a=>a===!0?Jv(yE):a===!1?!1:De(a)?Jv(a):un(a)?a:qe(a)?Uo({},a):a,bE=(a,e)=>{if(ot(a))return sd(e);const t={};for(const o in a){if(!Object.prototype.hasOwnProperty.call(a,o))continue;const i=a[o],l=e?e[o]:void 0;if(De(l)){t[o]=Er(l);continue}if(De(i)){t[o]=Er(i);continue}if(qe(i)&&qe(l)){t[o]=Uo({},l,i);continue}if(l!==void 0){t[o]=Er(l);continue}t[o]=Er(i)}return t},kE=(a,e)=>qe(a)&&!De(a)?bE(e,a):a===!1?{}:ot(e)?null:sd(e),ad=(a,...e)=>{if(ot(a))return Object.assign({},...e);const t=sd(a);return e.forEach(o=>{if(o)for(const i in o){if(!Object.prototype.hasOwnProperty.call(o,i))continue;const l=o[i];if(!Object.prototype.hasOwnProperty.call(t,i))continue;const c=t[i];if(De(l)){t[i]=l;continue}if(!(l===!0&&De(c))){if(l===!0){const d=qe(c)&&!De(c);t[i]=d?Uo({},c):Er(l);continue}if(qe(l)&&qe(c)){t[i]=Uo({},c,l);continue}t[i]=Er(l)}}}),t},ey=(a,e)=>{if(typeof document=="undefined"||!a||a.indexOf("<")===-1)return a;const t=Object.entries(e).filter(([,i])=>De(i));if(t.length===0)return a;const o=document.createElement("template");return o.innerHTML=a,t.forEach(([i,l])=>{o.content.querySelectorAll(i).forEach(d=>{const h=l(d);if(!(dv(h)||De(h)||h==null))for(const[g,v]of Object.entries(h)){if(v===!1){d.removeAttribute(g);continue}v!==!0&&un(v)&&d.setAttribute(g,v)}})}),o.innerHTML};class wE extends Be{get methods(){return{clean:(e,t)=>this.clean(e,t)}}clean(e,t){return Tn(e,t)}}class TE extends Be{get methods(){return{save:()=>this.save()}}async save(){var l,c;const e="Blok's content can not be saved in read-only mode";if(this.Blok.ReadOnly.isEnabled)throw Qt(e,"warn"),new Error(e);const t=await this.Blok.Saver.save();if(t!==void 0)return t;const o=(c=(l=this.Blok.Saver).getLastSaveError)==null?void 0:c.call(l);if(o instanceof Error)throw o;const i=o!==void 0?String(o):"Blok's content can not be saved because collecting data failed";throw new Error(i)}}class xE extends Be{constructor(){super(...arguments),this.selectionUtils=new se}get methods(){return{findParentTag:(e,t)=>this.findParentTag(e,t),expandToTag:e=>this.expandToTag(e),save:()=>this.selectionUtils.save(),restore:()=>this.selectionUtils.restore(),setFakeBackground:()=>this.selectionUtils.setFakeBackground(),removeFakeBackground:()=>this.selectionUtils.removeFakeBackground()}}findParentTag(e,t){return this.selectionUtils.findParentTag(e,t)}expandToTag(e){this.selectionUtils.expandToTag(e)}}class EE extends Be{get methods(){return{getBlockTools:()=>Array.from(this.Blok.Tools.blockTools.values())}}}class SE extends Be{get classes(){return{block:"py-[theme(spacing.block-padding-vertical)] px-0 [&::-webkit-input-placeholder]:!leading-normal",inlineToolButton:"flex justify-center items-center border-0 rounded h-full p-0 w-7 bg-transparent cursor-pointer leading-normal text-black",inlineToolButtonActive:"bg-icon-active-bg text-icon-active-text",input:"w-full rounded-[3px] border border-line-gray px-3 py-2.5 outline-none shadow-input [&[data-blok-placeholder]]:before:!static [&[data-blok-placeholder]]:before:inline-block [&[data-blok-placeholder]]:before:w-0 [&[data-blok-placeholder]]:before:whitespace-nowrap [&[data-blok-placeholder]]:before:pointer-events-none",loader:"relative border border-line-gray before:absolute before:left-1/2 before:top-1/2 before:w-[18px] before:h-[18px] before:rounded-full before:content-[''] before:-ml-[11px] before:-mt-[11px] before:border-2 before:border-line-gray before:border-l-active-icon before:animate-rotation",button:"p-[13px] rounded-[3px] border border-line-gray text-[14.9px] bg-white text-center cursor-pointer text-gray-text shadow-button-base hover:bg-[#fbfcfe] hover:shadow-button-base-hover [&_svg]:h-5 [&_svg]:mr-[0.2em] [&_svg]:-mt-0.5",settingsButton:"inline-flex items-center justify-center rounded-[3px] cursor-pointer border-0 outline-none bg-transparent align-bottom text-inherit m-0 min-w-toolbox-btn min-h-toolbox-btn [&_svg]:w-auto [&_svg]:h-auto mobile:w-toolbox-btn-mobile mobile:h-toolbox-btn-mobile mobile:rounded-lg mobile:[&_svg]:w-icon-mobile mobile:[&_svg]:h-icon-mobile can-hover:hover:bg-bg-light",settingsButtonActive:"text-active-icon",settingsButtonFocused:"shadow-button-focused bg-item-focus-bg",settingsButtonFocusedAnimated:"animate-button-clicked"}}}class CE extends Be{get methods(){return{close:()=>this.close(),open:()=>this.open(),toggleBlockSettings:e=>this.toggleBlockSettings(e),toggleToolbox:e=>this.toggleToolbox(e)}}open(){this.Blok.Toolbar.moveAndOpen()}close(){this.Blok.Toolbar.close()}toggleBlockSettings(e){if(this.Blok.BlockManager.currentBlockIndex===-1){Qt("Could't toggle the Toolbar because there is no block selected ","warn");return}(e!=null?e:!this.Blok.BlockSettings.opened)?(this.Blok.Toolbar.moveAndOpen(),this.Blok.BlockSettings.open()):this.Blok.BlockSettings.close()}toggleToolbox(e){if(this.Blok.BlockManager.currentBlockIndex===-1){Qt("Could't toggle the Toolbox because there is no block selected ","warn");return}(e!=null?e:!this.Blok.Toolbar.toolbox.opened)?(this.Blok.Toolbar.moveAndOpen(),this.Blok.Toolbar.toolbox.open()):this.Blok.Toolbar.toolbox.close()}}const ld=10,BE="tooltip",AE="aria-hidden",IE="false",_E="true",NE="visibility",RE="visible",OE="hidden",tr=class tr{constructor(){this.nodes={wrapper:null,content:null},this.showed=!1,this.offsetTop=ld,this.offsetLeft=ld,this.offsetRight=ld,this.showingTimeout=null,this.hidingDelay=0,this.hidingTimeout=null,this.ariaObserver=null,this.handleWindowScroll=()=>{this.showed&&this.hide(!0)},this.prepare(),window.addEventListener("scroll",this.handleWindowScroll,{passive:!0})}get CSS(){return{tooltip:yt("absolute z-overlay top-0 left-0","bg-tooltip-bg opacity-0","select-none pointer-events-none","transition-[opacity,transform] duration-[50ms,70ms] ease-in","rounded-lg shadow-tooltip","will-change-[opacity,top,left]","before:content-[''] before:absolute before:inset-0 before:bg-tooltip-bg before:-z-10 before:rounded-lg","mobile:hidden").split(" "),tooltipContent:yt("px-2.5 py-1.5","text-tooltip-font text-xs text-center","tracking-[0.02em] leading-[1em]").split(" "),tooltipShown:["opacity-100","transform-none"],placement:{left:["-translate-x-[5px]"],bottom:["translate-y-[5px]"],right:["translate-x-[5px]"],top:["-translate-y-[5px]"]}}}static getInstance(){return tr.instance||(tr.instance=new tr),tr.instance}show(e,t,o={}){this.nodes.wrapper||this.prepare(),this.hidingTimeout&&(clearTimeout(this.hidingTimeout),this.hidingTimeout=null);const l=Object.assign({placement:"bottom",marginTop:0,marginLeft:0,marginRight:0,marginBottom:0,delay:70,hidingDelay:0},o);if(l.hidingDelay&&(this.hidingDelay=l.hidingDelay),!this.nodes.content||(this.nodes.content.innerHTML="",this.nodes.content.appendChild(this.createContentNode(t)),!this.nodes.wrapper))return;const c=Object.values(this.CSS.placement).flatMap(d=>Array.isArray(d)?d:[d]);switch(this.nodes.wrapper.classList.remove(...c),l.placement){case"top":this.placeTop(e,l);break;case"left":this.placeLeft(e,l);break;case"right":this.placeRight(e,l);break;case"bottom":default:this.placeBottom(e,l);break}if(l&&l.delay){this.showingTimeout=setTimeout(()=>{if(this.nodes.wrapper){const d=Array.isArray(this.CSS.tooltipShown)?this.CSS.tooltipShown:[this.CSS.tooltipShown];this.nodes.wrapper.classList.add(...d),this.updateTooltipVisibility()}this.showed=!0},l.delay);return}if(this.nodes.wrapper){const d=Array.isArray(this.CSS.tooltipShown)?this.CSS.tooltipShown:[this.CSS.tooltipShown];this.nodes.wrapper.classList.add(...d),this.updateTooltipVisibility()}this.showed=!0}createContentNode(e){if(typeof e=="string")return document.createTextNode(e);if(e instanceof Node)return e;throw Error("[Blok Tooltip] Wrong type of «content» passed. It should be an instance of Node or String. But "+typeof e+" given.")}hide(e=!1){const t=!!this.hidingDelay&&!e;if(t&&this.hidingTimeout&&clearTimeout(this.hidingTimeout),t){this.hidingTimeout=setTimeout(()=>{this.hide(!0)},this.hidingDelay);return}if(this.nodes.wrapper){const o=Array.isArray(this.CSS.tooltipShown)?this.CSS.tooltipShown:[this.CSS.tooltipShown];this.nodes.wrapper.classList.remove(...o),this.updateTooltipVisibility()}this.showed=!1,this.showingTimeout&&(clearTimeout(this.showingTimeout),this.showingTimeout=null)}onHover(e,t,o={}){e.addEventListener("mouseenter",()=>{this.show(e,t,o)}),e.addEventListener("mouseleave",()=>{this.hide()})}destroy(){var e;(e=this.ariaObserver)==null||e.disconnect(),this.ariaObserver=null,this.nodes.wrapper&&this.nodes.wrapper.remove(),window.removeEventListener("scroll",this.handleWindowScroll),tr.instance=null}prepare(){this.nodes.wrapper=this.make("div",this.CSS.tooltip),this.nodes.wrapper.setAttribute(to,Vu),this.nodes.wrapper.setAttribute("data-blok-testid","tooltip"),this.nodes.content=this.make("div",this.CSS.tooltipContent),this.nodes.content.setAttribute("data-blok-testid","tooltip-content"),this.nodes.wrapper&&this.nodes.content&&(this.append(this.nodes.wrapper,this.nodes.content),this.append(document.body,this.nodes.wrapper),this.ensureTooltipAttributes())}updateTooltipVisibility(){if(!this.nodes.wrapper)return;const e=Array.isArray(this.CSS.tooltipShown)?this.CSS.tooltipShown[0]:this.CSS.tooltipShown,t=this.nodes.wrapper.classList.contains(e);this.nodes.wrapper.style.setProperty(NE,t?RE:OE),this.nodes.wrapper.setAttribute(AE,t?IE:_E),this.nodes.wrapper.setAttribute("data-blok-shown",t?"true":"false")}watchTooltipVisibility(){var e;this.nodes.wrapper&&((e=this.ariaObserver)==null||e.disconnect(),this.updateTooltipVisibility(),this.ariaObserver=new MutationObserver(()=>{this.updateTooltipVisibility()}),this.ariaObserver.observe(this.nodes.wrapper,{attributes:!0,attributeFilter:["class"]}))}ensureTooltipAttributes(){this.nodes.wrapper&&((!this.nodes.wrapper.hasAttribute(to)||this.nodes.wrapper.getAttribute(to)!==Vu)&&this.nodes.wrapper.setAttribute(to,Vu),this.nodes.wrapper.setAttribute("role",BE),this.watchTooltipVisibility())}placeBottom(e,t){var c;if(!this.nodes.wrapper)return;const o=e.getBoundingClientRect(),i=o.left+e.clientWidth/2-this.nodes.wrapper.offsetWidth/2,l=o.bottom+this.getScrollTop()+this.offsetTop+((c=t.marginTop)!=null?c:0);this.applyPlacement("bottom",i,l)}placeTop(e,t){if(!this.nodes.wrapper)return;const o=e.getBoundingClientRect(),i=o.left+e.clientWidth/2-this.nodes.wrapper.offsetWidth/2,l=o.top+this.getScrollTop()-this.nodes.wrapper.clientHeight-this.offsetTop;this.applyPlacement("top",i,l)}placeLeft(e,t){var c;if(!this.nodes.wrapper)return;const o=e.getBoundingClientRect(),i=o.left-this.nodes.wrapper.offsetWidth-this.offsetLeft-((c=t.marginLeft)!=null?c:0),l=o.top+this.getScrollTop()+e.clientHeight/2-this.nodes.wrapper.offsetHeight/2;this.applyPlacement("left",i,l)}placeRight(e,t){var c;if(!this.nodes.wrapper)return;const o=e.getBoundingClientRect(),i=o.right+this.offsetRight+((c=t.marginRight)!=null?c:0),l=o.top+this.getScrollTop()+e.clientHeight/2-this.nodes.wrapper.offsetHeight/2;this.applyPlacement("right",i,l)}applyPlacement(e,t,o){if(!this.nodes.wrapper)return;const i=Array.isArray(this.CSS.placement[e])?this.CSS.placement[e]:[this.CSS.placement[e]];this.nodes.wrapper.classList.add(...i),this.nodes.wrapper.setAttribute("data-blok-placement",e),this.nodes.wrapper.style.left=`${t}px`,this.nodes.wrapper.style.top=`${o}px`}getScrollTop(){var e,t,o;return typeof window.scrollY=="number"?window.scrollY:(o=(t=(e=document.documentElement)==null?void 0:e.scrollTop)!=null?t:document.body.scrollTop)!=null?o:0}make(e,t=null,o={}){const i=document.createElement(e);Array.isArray(t)&&i.classList.add(...t),typeof t=="string"&&i.classList.add(t);for(const l in o)Object.prototype.hasOwnProperty.call(o,l)&&(i[l]=o[l]);return i}append(e,t){Array.isArray(t)?t.forEach(o=>e.appendChild(o)):e.appendChild(t)}prepend(e,t){Array.isArray(t)?t.reverse().forEach(i=>e.prepend(i)):e.prepend(t)}};tr.instance=null;let cd=tr;const gs=()=>cd.getInstance(),LE=(a,e,t)=>{gs().show(a,e,t!=null?t:{})},Yo=(a=!1)=>{gs().hide(a)},ms=(a,e,t)=>{gs().onHover(a,e,t!=null?t:{})},DE=()=>{gs().destroy()};class PE extends Be{constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t})}get methods(){return{show:(e,t,o)=>this.show(e,t,o),hide:()=>this.hide(),onHover:(e,t,o)=>this.onHover(e,t,o)}}show(e,t,o){LE(e,t,o)}hide(){Yo()}onHover(e,t,o){ms(e,t,o)}}class ME extends Be{get methods(){return{nodes:this.blokNodes}}get blokNodes(){return{wrapper:this.Blok.UI.nodes.wrapper,redactor:this.Blok.UI.nodes.redactor}}}const ty=(a,e)=>{const t={};return Object.entries(a).forEach(([o,i])=>{if(!qe(i)){t[o]=i;return}const l=e?`${e}.${o}`:o;if(!Object.values(i).every(d=>un(d))){t[o]=ty(i,l);return}t[o]=l}),t},it=ty(bv),Or=class Or{constructor(e,t){this.cursor=-1,this.items=[],this.items=e!=null?e:[],this.focusedCssClass=t}get currentItem(){return this.cursor===-1?null:this.items[this.cursor]}setCursor(e){e<this.items.length&&e>=-1&&(this.dropCursor(),this.cursor=e,this.items[this.cursor].classList.add(this.focusedCssClass),this.items[this.cursor].setAttribute("data-blok-focused","true"))}setItems(e){this.items=e}hasItems(){return this.items.length>0}next(){this.cursor=this.leafNodesAndReturnIndex(Or.directions.RIGHT)}previous(){this.cursor=this.leafNodesAndReturnIndex(Or.directions.LEFT)}dropCursor(){this.cursor!==-1&&(this.items[this.cursor].classList.remove(this.focusedCssClass),this.items[this.cursor].removeAttribute("data-blok-focused"),this.cursor=-1)}leafNodesAndReturnIndex(e){if(this.items.length===0)return this.cursor;const t=e===Or.directions.RIGHT?-1:0,o=this.cursor===-1?t:this.cursor;o!==-1&&(this.items[o].classList.remove(this.focusedCssClass),this.items[o].removeAttribute("data-blok-focused"));const i=e===Or.directions.RIGHT?(o+1)%this.items.length:(this.items.length+o-1)%this.items.length;return R.canSetCaret(this.items[i])&&ls(()=>se.setCursor(this.items[i]),50)(),this.items[i].classList.add(this.focusedCssClass),this.items[i].setAttribute("data-blok-focused","true"),i}};Or.directions={RIGHT:"right",LEFT:"left"};let Sr=Or;class Yn{constructor(e){var t,o;this.iterator=null,this.activated=!1,this.skipNextTabFocus=!1,this.flipCallbacks=[],this.onKeyDown=i=>{var g;const l=i.target;if(this.shouldSkipTarget(l,i))return;const c=this.getKeyCode(i),d=c===ie.LEFT||c===ie.RIGHT||c===ie.UP||c===ie.DOWN;if(!(i.shiftKey&&d||!this.isEventReadyForHandling(i))&&!(c===ie.ENTER&&!((g=this.iterator)!=null&&g.currentItem)))switch(i.stopPropagation(),i.stopImmediatePropagation(),c!==null&&Yn.usedKeys.includes(c)&&i.preventDefault(),c){case ie.TAB:this.handleTabPress(i);break;case ie.LEFT:case ie.UP:this.flipLeft();break;case ie.RIGHT:case ie.DOWN:this.flipRight();break;case ie.ENTER:this.handleEnterPress(i);break}},this.iterator=new Sr(e.items||[],(t=e.focusedItemClass)!=null?t:""),this.activateCallback=e.activateCallback,this.allowedKeys=e.allowedKeys||Yn.usedKeys,this.handleContentEditableTargets=(o=e.handleContentEditableTargets)!=null?o:!1}get isActivated(){return this.activated}static get usedKeys(){return[ie.TAB,ie.LEFT,ie.RIGHT,ie.ENTER,ie.UP,ie.DOWN]}activate(e,t){var o,i;this.activated=!0,e&&((o=this.iterator)==null||o.setItems(e)),t!==void 0&&((i=this.iterator)==null||i.setCursor(t)),document.addEventListener("keydown",this.onKeyDown,!0),window.addEventListener("keydown",this.onKeyDown,!0)}deactivate(){this.activated=!1,this.dropCursor(),this.skipNextTabFocus=!1,document.removeEventListener("keydown",this.onKeyDown,!0),window.removeEventListener("keydown",this.onKeyDown,!0)}focusFirst(){this.dropCursor(),this.flipRight()}focusItem(e){const t=this.iterator;if(t&&t.hasItems()){if(e<0){t.dropCursor();return}!t.currentItem&&e===0&&(this.skipNextTabFocus=!0),t.setCursor(e)}}flipLeft(){var e;(e=this.iterator)==null||e.previous(),this.flipCallback()}flipRight(){var e;(e=this.iterator)==null||e.next(),this.flipCallback()}hasFocus(){var e;return!!((e=this.iterator)!=null&&e.currentItem)}onFlip(e){this.flipCallbacks.push(e)}removeOnFlip(e){this.flipCallbacks=this.flipCallbacks.filter(t=>t!==e)}dropCursor(){var e;(e=this.iterator)==null||e.dropCursor()}getKeyCode(e){var o;return(o={Tab:ie.TAB,Enter:ie.ENTER,ArrowLeft:ie.LEFT,ArrowRight:ie.RIGHT,ArrowUp:ie.UP,ArrowDown:ie.DOWN}[e.key])!=null?o:null}isEventReadyForHandling(e){const t=this.getKeyCode(e);return this.activated&&t!==null&&this.allowedKeys.includes(t)}setHandleContentEditableTargets(e){this.handleContentEditableTargets=e}handleTabPress(e){const o=e.shiftKey?Sr.directions.LEFT:Sr.directions.RIGHT;if(this.skipNextTabFocus){this.skipNextTabFocus=!1;return}switch(o){case Sr.directions.RIGHT:this.flipRight();break;case Sr.directions.LEFT:this.flipLeft();break}}handleExternalKeydown(e){this.onKeyDown(e)}handleEnterPress(e){var t,o;this.activated&&((t=this.iterator)!=null&&t.currentItem&&(e.stopPropagation(),e.preventDefault(),this.iterator.currentItem.click()),De(this.activateCallback)&&((o=this.iterator)!=null&&o.currentItem)&&this.activateCallback(this.iterator.currentItem))}flipCallback(){var e,t,o;(e=this.iterator)!=null&&e.currentItem&&((o=(t=this.iterator.currentItem).scrollIntoViewIfNeeded)==null||o.call(t)),this.flipCallbacks.forEach(i=>i())}shouldSkipTarget(e,t){if(!e)return!1;const o=e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement,i=e.getAttribute("data-blok-flipper-tab-target")==="true"&&t.key==="Tab",l=e.isContentEditable,c=e.closest('[data-blok-link-tool-input-opened="true"]')!==null,d=l&&!this.handleContentEditableTargets;return o&&!i||d||c}}var ud={exports:{}},Qo={},dd={exports:{}},Te={};var ny;function FE(){if(ny)return Te;ny=1;var a=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),y=Symbol.iterator;function b(A){return A===null||typeof A!="object"?null:(A=y&&A[y]||A["@@iterator"],typeof A=="function"?A:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,T={};function S(A,P,ae){this.props=A,this.context=P,this.refs=T,this.updater=ae||E}S.prototype.isReactComponent={},S.prototype.setState=function(A,P){if(typeof A!="object"&&typeof A!="function"&&A!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,A,P,"setState")},S.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function O(){}O.prototype=S.prototype;function L(A,P,ae){this.props=A,this.context=P,this.refs=T,this.updater=ae||E}var U=L.prototype=new O;U.constructor=L,w(U,S.prototype),U.isPureReactComponent=!0;var H=Array.isArray,X=Object.prototype.hasOwnProperty,q={current:null},W={key:!0,ref:!0,__self:!0,__source:!0};function F(A,P,ae){var fe,Ee={},Ne=null,me=null;if(P!=null)for(fe in P.ref!==void 0&&(me=P.ref),P.key!==void 0&&(Ne=""+P.key),P)X.call(P,fe)&&!W.hasOwnProperty(fe)&&(Ee[fe]=P[fe]);var Pe=arguments.length-2;if(Pe===1)Ee.children=ae;else if(1<Pe){for(var ze=Array(Pe),pt=0;pt<Pe;pt++)ze[pt]=arguments[pt+2];Ee.children=ze}if(A&&A.defaultProps)for(fe in Pe=A.defaultProps,Pe)Ee[fe]===void 0&&(Ee[fe]=Pe[fe]);return{$$typeof:a,type:A,key:Ne,ref:me,props:Ee,_owner:q.current}}function ne(A,P){return{$$typeof:a,type:A.type,key:P,ref:A.ref,props:A.props,_owner:A._owner}}function ce(A){return typeof A=="object"&&A!==null&&A.$$typeof===a}function Q(A){var P={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(ae){return P[ae]})}var ye=/\/+/g;function Z(A,P){return typeof A=="object"&&A!==null&&A.key!=null?Q(""+A.key):P.toString(36)}function we(A,P,ae,fe,Ee){var Ne=typeof A;(Ne==="undefined"||Ne==="boolean")&&(A=null);var me=!1;if(A===null)me=!0;else switch(Ne){case"string":case"number":me=!0;break;case"object":switch(A.$$typeof){case a:case e:me=!0}}if(me)return me=A,Ee=Ee(me),A=fe===""?"."+Z(me,0):fe,H(Ee)?(ae="",A!=null&&(ae=A.replace(ye,"$&/")+"/"),we(Ee,P,ae,"",function(pt){return pt})):Ee!=null&&(ce(Ee)&&(Ee=ne(Ee,ae+(!Ee.key||me&&me.key===Ee.key?"":(""+Ee.key).replace(ye,"$&/")+"/")+A)),P.push(Ee)),1;if(me=0,fe=fe===""?".":fe+":",H(A))for(var Pe=0;Pe<A.length;Pe++){Ne=A[Pe];var ze=fe+Z(Ne,Pe);me+=we(Ne,P,ae,ze,Ee)}else if(ze=b(A),typeof ze=="function")for(A=ze.call(A),Pe=0;!(Ne=A.next()).done;)Ne=Ne.value,ze=fe+Z(Ne,Pe++),me+=we(Ne,P,ae,ze,Ee);else if(Ne==="object")throw P=String(A),Error("Objects are not valid as a React child (found: "+(P==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":P)+"). If you meant to render a collection of children, use an array instead.");return me}function Re(A,P,ae){if(A==null)return A;var fe=[],Ee=0;return we(A,fe,"","",function(Ne){return P.call(ae,Ne,Ee++)}),fe}function xe(A){if(A._status===-1){var P=A._result;P=P(),P.then(function(ae){(A._status===0||A._status===-1)&&(A._status=1,A._result=ae)},function(ae){(A._status===0||A._status===-1)&&(A._status=2,A._result=ae)}),A._status===-1&&(A._status=0,A._result=P)}if(A._status===1)return A._result.default;throw A._result}var _e={current:null},D={transition:null},le={ReactCurrentDispatcher:_e,ReactCurrentBatchConfig:D,ReactCurrentOwner:q};function G(){throw Error("act(...) is not supported in production builds of React.")}return Te.Children={map:Re,forEach:function(A,P,ae){Re(A,function(){P.apply(this,arguments)},ae)},count:function(A){var P=0;return Re(A,function(){P++}),P},toArray:function(A){return Re(A,function(P){return P})||[]},only:function(A){if(!ce(A))throw Error("React.Children.only expected to receive a single React element child.");return A}},Te.Component=S,Te.Fragment=t,Te.Profiler=i,Te.PureComponent=L,Te.StrictMode=o,Te.Suspense=h,Te.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=le,Te.act=G,Te.cloneElement=function(A,P,ae){if(A==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+A+".");var fe=w({},A.props),Ee=A.key,Ne=A.ref,me=A._owner;if(P!=null){if(P.ref!==void 0&&(Ne=P.ref,me=q.current),P.key!==void 0&&(Ee=""+P.key),A.type&&A.type.defaultProps)var Pe=A.type.defaultProps;for(ze in P)X.call(P,ze)&&!W.hasOwnProperty(ze)&&(fe[ze]=P[ze]===void 0&&Pe!==void 0?Pe[ze]:P[ze])}var ze=arguments.length-2;if(ze===1)fe.children=ae;else if(1<ze){Pe=Array(ze);for(var pt=0;pt<ze;pt++)Pe[pt]=arguments[pt+2];fe.children=Pe}return{$$typeof:a,type:A.type,key:Ee,ref:Ne,props:fe,_owner:me}},Te.createContext=function(A){return A={$$typeof:c,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},A.Provider={$$typeof:l,_context:A},A.Consumer=A},Te.createElement=F,Te.createFactory=function(A){var P=F.bind(null,A);return P.type=A,P},Te.createRef=function(){return{current:null}},Te.forwardRef=function(A){return{$$typeof:d,render:A}},Te.isValidElement=ce,Te.lazy=function(A){return{$$typeof:v,_payload:{_status:-1,_result:A},_init:xe}},Te.memo=function(A,P){return{$$typeof:g,type:A,compare:P===void 0?null:P}},Te.startTransition=function(A){var P=D.transition;D.transition={};try{A()}finally{D.transition=P}},Te.unstable_act=G,Te.useCallback=function(A,P){return _e.current.useCallback(A,P)},Te.useContext=function(A){return _e.current.useContext(A)},Te.useDebugValue=function(){},Te.useDeferredValue=function(A){return _e.current.useDeferredValue(A)},Te.useEffect=function(A,P){return _e.current.useEffect(A,P)},Te.useId=function(){return _e.current.useId()},Te.useImperativeHandle=function(A,P,ae){return _e.current.useImperativeHandle(A,P,ae)},Te.useInsertionEffect=function(A,P){return _e.current.useInsertionEffect(A,P)},Te.useLayoutEffect=function(A,P){return _e.current.useLayoutEffect(A,P)},Te.useMemo=function(A,P){return _e.current.useMemo(A,P)},Te.useReducer=function(A,P,ae){return _e.current.useReducer(A,P,ae)},Te.useRef=function(A){return _e.current.useRef(A)},Te.useState=function(A){return _e.current.useState(A)},Te.useSyncExternalStore=function(A,P,ae){return _e.current.useSyncExternalStore(A,P,ae)},Te.useTransition=function(){return _e.current.useTransition()},Te.version="18.3.1",Te}var ry;function oy(){return ry||(ry=1,dd.exports=FE()),dd.exports}var iy;function zE(){if(iy)return Qo;iy=1;var a=oy(),e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,i=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(d,h,g){var v,y={},b=null,E=null;g!==void 0&&(b=""+g),h.key!==void 0&&(b=""+h.key),h.ref!==void 0&&(E=h.ref);for(v in h)o.call(h,v)&&!l.hasOwnProperty(v)&&(y[v]=h[v]);if(d&&d.defaultProps)for(v in h=d.defaultProps,h)y[v]===void 0&&(y[v]=h[v]);return{$$typeof:e,type:d,key:b,ref:E,props:y,_owner:i.current}}return Qo.Fragment=t,Qo.jsx=c,Qo.jsxs=c,Qo}var sy;function HE(){return sy||(sy=1,ud.exports=zE()),ud.exports}var Dn=HE(),vs={},fd={exports:{}},Ot={},hd={exports:{}},pd={};var ay;function jE(){return ay||(ay=1,(function(a){function e(D,le){var G=D.length;D.push(le);e:for(;0<G;){var A=G-1>>>1,P=D[A];if(0<i(P,le))D[A]=le,D[G]=P,G=A;else break e}}function t(D){return D.length===0?null:D[0]}function o(D){if(D.length===0)return null;var le=D[0],G=D.pop();if(G!==le){D[0]=G;e:for(var A=0,P=D.length,ae=P>>>1;A<ae;){var fe=2*(A+1)-1,Ee=D[fe],Ne=fe+1,me=D[Ne];if(0>i(Ee,G))Ne<P&&0>i(me,Ee)?(D[A]=me,D[Ne]=G,A=Ne):(D[A]=Ee,D[fe]=G,A=fe);else if(Ne<P&&0>i(me,G))D[A]=me,D[Ne]=G,A=Ne;else break e}}return le}function i(D,le){var G=D.sortIndex-le.sortIndex;return G!==0?G:D.id-le.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;a.unstable_now=function(){return l.now()}}else{var c=Date,d=c.now();a.unstable_now=function(){return c.now()-d}}var h=[],g=[],v=1,y=null,b=3,E=!1,w=!1,T=!1,S=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function U(D){for(var le=t(g);le!==null;){if(le.callback===null)o(g);else if(le.startTime<=D)o(g),le.sortIndex=le.expirationTime,e(h,le);else break;le=t(g)}}function H(D){if(T=!1,U(D),!w)if(t(h)!==null)w=!0,xe(X);else{var le=t(g);le!==null&&_e(H,le.startTime-D)}}function X(D,le){w=!1,T&&(T=!1,O(F),F=-1),E=!0;var G=b;try{for(U(le),y=t(h);y!==null&&(!(y.expirationTime>le)||D&&!Q());){var A=y.callback;if(typeof A=="function"){y.callback=null,b=y.priorityLevel;var P=A(y.expirationTime<=le);le=a.unstable_now(),typeof P=="function"?y.callback=P:y===t(h)&&o(h),U(le)}else o(h);y=t(h)}if(y!==null)var ae=!0;else{var fe=t(g);fe!==null&&_e(H,fe.startTime-le),ae=!1}return ae}finally{y=null,b=G,E=!1}}var q=!1,W=null,F=-1,ne=5,ce=-1;function Q(){return!(a.unstable_now()-ce<ne)}function ye(){if(W!==null){var D=a.unstable_now();ce=D;var le=!0;try{le=W(!0,D)}finally{le?Z():(q=!1,W=null)}}else q=!1}var Z;if(typeof L=="function")Z=function(){L(ye)};else if(typeof MessageChannel!="undefined"){var we=new MessageChannel,Re=we.port2;we.port1.onmessage=ye,Z=function(){Re.postMessage(null)}}else Z=function(){S(ye,0)};function xe(D){W=D,q||(q=!0,Z())}function _e(D,le){F=S(function(){D(a.unstable_now())},le)}a.unstable_IdlePriority=5,a.unstable_ImmediatePriority=1,a.unstable_LowPriority=4,a.unstable_NormalPriority=3,a.unstable_Profiling=null,a.unstable_UserBlockingPriority=2,a.unstable_cancelCallback=function(D){D.callback=null},a.unstable_continueExecution=function(){w||E||(w=!0,xe(X))},a.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ne=0<D?Math.floor(1e3/D):5},a.unstable_getCurrentPriorityLevel=function(){return b},a.unstable_getFirstCallbackNode=function(){return t(h)},a.unstable_next=function(D){switch(b){case 1:case 2:case 3:var le=3;break;default:le=b}var G=b;b=le;try{return D()}finally{b=G}},a.unstable_pauseExecution=function(){},a.unstable_requestPaint=function(){},a.unstable_runWithPriority=function(D,le){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var G=b;b=D;try{return le()}finally{b=G}},a.unstable_scheduleCallback=function(D,le,G){var A=a.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?A+G:A):G=A,D){case 1:var P=-1;break;case 2:P=250;break;case 5:P=1073741823;break;case 4:P=1e4;break;default:P=5e3}return P=G+P,D={id:v++,callback:le,priorityLevel:D,startTime:G,expirationTime:P,sortIndex:-1},G>A?(D.sortIndex=G,e(g,D),t(h)===null&&D===t(g)&&(T?(O(F),F=-1):T=!0,_e(H,G-A))):(D.sortIndex=P,e(h,D),w||E||(w=!0,xe(X))),D},a.unstable_shouldYield=Q,a.unstable_wrapCallback=function(D){var le=b;return function(){var G=b;b=le;try{return D.apply(this,arguments)}finally{b=G}}}})(pd)),pd}var ly;function qE(){return ly||(ly=1,hd.exports=jE()),hd.exports}var cy;function UE(){if(cy)return Ot;cy=1;var a=oy(),e=qE();function t(n){for(var r="https://reactjs.org/docs/error-decoder.html?invariant="+n,s=1;s<arguments.length;s++)r+="&args[]="+encodeURIComponent(arguments[s]);return"Minified React error #"+n+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=new Set,i={};function l(n,r){c(n,r),c(n+"Capture",r)}function c(n,r){for(i[n]=r,n=0;n<r.length;n++)o.add(r[n])}var d=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),h=Object.prototype.hasOwnProperty,g=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,v={},y={};function b(n){return h.call(y,n)?!0:h.call(v,n)?!1:g.test(n)?y[n]=!0:(v[n]=!0,!1)}function E(n,r,s,u){if(s!==null&&s.type===0)return!1;switch(typeof r){case"function":case"symbol":return!0;case"boolean":return u?!1:s!==null?!s.acceptsBooleans:(n=n.toLowerCase().slice(0,5),n!=="data-"&&n!=="aria-");default:return!1}}function w(n,r,s,u){if(r===null||typeof r=="undefined"||E(n,r,s,u))return!0;if(u)return!1;if(s!==null)switch(s.type){case 3:return!r;case 4:return r===!1;case 5:return isNaN(r);case 6:return isNaN(r)||1>r}return!1}function T(n,r,s,u,f,p,m){this.acceptsBooleans=r===2||r===3||r===4,this.attributeName=u,this.attributeNamespace=f,this.mustUseProperty=s,this.propertyName=n,this.type=r,this.sanitizeURL=p,this.removeEmptyString=m}var S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){S[n]=new T(n,0,!1,n,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var r=n[0];S[r]=new T(r,1,!1,n[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(n){S[n]=new T(n,2,!1,n.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){S[n]=new T(n,2,!1,n,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(n){S[n]=new T(n,3,!1,n.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(n){S[n]=new T(n,3,!0,n,null,!1,!1)}),["capture","download"].forEach(function(n){S[n]=new T(n,4,!1,n,null,!1,!1)}),["cols","rows","size","span"].forEach(function(n){S[n]=new T(n,6,!1,n,null,!1,!1)}),["rowSpan","start"].forEach(function(n){S[n]=new T(n,5,!1,n.toLowerCase(),null,!1,!1)});var O=/[\-:]([a-z])/g;function L(n){return n[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(n){var r=n.replace(O,L);S[r]=new T(r,1,!1,n,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(n){var r=n.replace(O,L);S[r]=new T(r,1,!1,n,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(n){var r=n.replace(O,L);S[r]=new T(r,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(n){S[n]=new T(n,1,!1,n.toLowerCase(),null,!1,!1)}),S.xlinkHref=new T("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(n){S[n]=new T(n,1,!1,n.toLowerCase(),null,!0,!0)});function U(n,r,s,u){var f=S.hasOwnProperty(r)?S[r]:null;(f!==null?f.type!==0:u||!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(w(r,s,f,u)&&(s=null),u||f===null?b(r)&&(s===null?n.removeAttribute(r):n.setAttribute(r,""+s)):f.mustUseProperty?n[f.propertyName]=s===null?f.type===3?!1:"":s:(r=f.attributeName,u=f.attributeNamespace,s===null?n.removeAttribute(r):(f=f.type,s=f===3||f===4&&s===!0?"":""+s,u?n.setAttributeNS(u,r,s):n.setAttribute(r,s))))}var H=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,X=Symbol.for("react.element"),q=Symbol.for("react.portal"),W=Symbol.for("react.fragment"),F=Symbol.for("react.strict_mode"),ne=Symbol.for("react.profiler"),ce=Symbol.for("react.provider"),Q=Symbol.for("react.context"),ye=Symbol.for("react.forward_ref"),Z=Symbol.for("react.suspense"),we=Symbol.for("react.suspense_list"),Re=Symbol.for("react.memo"),xe=Symbol.for("react.lazy"),_e=Symbol.for("react.offscreen"),D=Symbol.iterator;function le(n){return n===null||typeof n!="object"?null:(n=D&&n[D]||n["@@iterator"],typeof n=="function"?n:null)}var G=Object.assign,A;function P(n){if(A===void 0)try{throw Error()}catch(s){var r=s.stack.trim().match(/\n( *(at )?)/);A=r&&r[1]||""}return`
|
|
11
|
+
`+A+n}var ae=!1;function fe(n,r){if(!n||ae)return"";ae=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(r)if(r=function(){throw Error()},Object.defineProperty(r.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(r,[])}catch(N){var u=N}Reflect.construct(n,[],r)}else{try{r.call()}catch(N){u=N}n.call(r.prototype)}else{try{throw Error()}catch(N){u=N}n()}}catch(N){if(N&&u&&typeof N.stack=="string"){for(var f=N.stack.split(`
|
|
12
|
+
`),p=u.stack.split(`
|
|
13
|
+
`),m=f.length-1,k=p.length-1;1<=m&&0<=k&&f[m]!==p[k];)k--;for(;1<=m&&0<=k;m--,k--)if(f[m]!==p[k]){if(m!==1||k!==1)do if(m--,k--,0>k||f[m]!==p[k]){var x=`
|
|
14
|
+
`+f[m].replace(" at new "," at ");return n.displayName&&x.includes("<anonymous>")&&(x=x.replace("<anonymous>",n.displayName)),x}while(1<=m&&0<=k);break}}}finally{ae=!1,Error.prepareStackTrace=s}return(n=n?n.displayName||n.name:"")?P(n):""}function Ee(n){switch(n.tag){case 5:return P(n.type);case 16:return P("Lazy");case 13:return P("Suspense");case 19:return P("SuspenseList");case 0:case 2:case 15:return n=fe(n.type,!1),n;case 11:return n=fe(n.type.render,!1),n;case 1:return n=fe(n.type,!0),n;default:return""}}function Ne(n){if(n==null)return null;if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case W:return"Fragment";case q:return"Portal";case ne:return"Profiler";case F:return"StrictMode";case Z:return"Suspense";case we:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case Q:return(n.displayName||"Context")+".Consumer";case ce:return(n._context.displayName||"Context")+".Provider";case ye:var r=n.render;return n=n.displayName,n||(n=r.displayName||r.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case Re:return r=n.displayName||null,r!==null?r:Ne(n.type)||"Memo";case xe:r=n._payload,n=n._init;try{return Ne(n(r))}catch(s){}}return null}function me(n){var r=n.type;switch(n.tag){case 24:return"Cache";case 9:return(r.displayName||"Context")+".Consumer";case 10:return(r._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return n=r.render,n=n.displayName||n.name||"",r.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 5:return r;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ne(r);case 8:return r===F?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r}return null}function Pe(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function ze(n){var r=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function pt(n){var r=ze(n)?"checked":"value",s=Object.getOwnPropertyDescriptor(n.constructor.prototype,r),u=""+n[r];if(!n.hasOwnProperty(r)&&typeof s!="undefined"&&typeof s.get=="function"&&typeof s.set=="function"){var f=s.get,p=s.set;return Object.defineProperty(n,r,{configurable:!0,get:function(){return f.call(this)},set:function(m){u=""+m,p.call(this,m)}}),Object.defineProperty(n,r,{enumerable:s.enumerable}),{getValue:function(){return u},setValue:function(m){u=""+m},stopTracking:function(){n._valueTracker=null,delete n[r]}}}}function nr(n){n._valueTracker||(n._valueTracker=pt(n))}function Pr(n){if(!n)return!1;var r=n._valueTracker;if(!r)return!0;var s=r.getValue(),u="";return n&&(u=ze(n)?n.checked?"true":"false":n.value),n=u,n!==s?(r.setValue(n),!0):!1}function Ws(n){if(n=n||(typeof document!="undefined"?document:void 0),typeof n=="undefined")return null;try{return n.activeElement||n.body}catch(r){return n.body}}function af(n,r){var s=r.checked;return G({},r,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:s!=null?s:n._wrapperState.initialChecked})}function sb(n,r){var s=r.defaultValue==null?"":r.defaultValue,u=r.checked!=null?r.checked:r.defaultChecked;s=Pe(r.value!=null?r.value:s),n._wrapperState={initialChecked:u,initialValue:s,controlled:r.type==="checkbox"||r.type==="radio"?r.checked!=null:r.value!=null}}function ab(n,r){r=r.checked,r!=null&&U(n,"checked",r,!1)}function lf(n,r){ab(n,r);var s=Pe(r.value),u=r.type;if(s!=null)u==="number"?(s===0&&n.value===""||n.value!=s)&&(n.value=""+s):n.value!==""+s&&(n.value=""+s);else if(u==="submit"||u==="reset"){n.removeAttribute("value");return}r.hasOwnProperty("value")?cf(n,r.type,s):r.hasOwnProperty("defaultValue")&&cf(n,r.type,Pe(r.defaultValue)),r.checked==null&&r.defaultChecked!=null&&(n.defaultChecked=!!r.defaultChecked)}function lb(n,r,s){if(r.hasOwnProperty("value")||r.hasOwnProperty("defaultValue")){var u=r.type;if(!(u!=="submit"&&u!=="reset"||r.value!==void 0&&r.value!==null))return;r=""+n._wrapperState.initialValue,s||r===n.value||(n.value=r),n.defaultValue=r}s=n.name,s!==""&&(n.name=""),n.defaultChecked=!!n._wrapperState.initialChecked,s!==""&&(n.name=s)}function cf(n,r,s){(r!=="number"||Ws(n.ownerDocument)!==n)&&(s==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+s&&(n.defaultValue=""+s))}var di=Array.isArray;function ho(n,r,s,u){if(n=n.options,r){r={};for(var f=0;f<s.length;f++)r["$"+s[f]]=!0;for(s=0;s<n.length;s++)f=r.hasOwnProperty("$"+n[s].value),n[s].selected!==f&&(n[s].selected=f),f&&u&&(n[s].defaultSelected=!0)}else{for(s=""+Pe(s),r=null,f=0;f<n.length;f++){if(n[f].value===s){n[f].selected=!0,u&&(n[f].defaultSelected=!0);return}r!==null||n[f].disabled||(r=n[f])}r!==null&&(r.selected=!0)}}function uf(n,r){if(r.dangerouslySetInnerHTML!=null)throw Error(t(91));return G({},r,{value:void 0,defaultValue:void 0,children:""+n._wrapperState.initialValue})}function cb(n,r){var s=r.value;if(s==null){if(s=r.children,r=r.defaultValue,s!=null){if(r!=null)throw Error(t(92));if(di(s)){if(1<s.length)throw Error(t(93));s=s[0]}r=s}r==null&&(r=""),s=r}n._wrapperState={initialValue:Pe(s)}}function ub(n,r){var s=Pe(r.value),u=Pe(r.defaultValue);s!=null&&(s=""+s,s!==n.value&&(n.value=s),r.defaultValue==null&&n.defaultValue!==s&&(n.defaultValue=s)),u!=null&&(n.defaultValue=""+u)}function db(n){var r=n.textContent;r===n._wrapperState.initialValue&&r!==""&&r!==null&&(n.value=r)}function fb(n){switch(n){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function df(n,r){return n==null||n==="http://www.w3.org/1999/xhtml"?fb(r):n==="http://www.w3.org/2000/svg"&&r==="foreignObject"?"http://www.w3.org/1999/xhtml":n}var Ks,hb=(function(n){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(r,s,u,f){MSApp.execUnsafeLocalFunction(function(){return n(r,s,u,f)})}:n})(function(n,r){if(n.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in n)n.innerHTML=r;else{for(Ks=Ks||document.createElement("div"),Ks.innerHTML="<svg>"+r.valueOf().toString()+"</svg>",r=Ks.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;r.firstChild;)n.appendChild(r.firstChild)}});function fi(n,r){if(r){var s=n.firstChild;if(s&&s===n.lastChild&&s.nodeType===3){s.nodeValue=r;return}}n.textContent=r}var hi={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},LC=["Webkit","ms","Moz","O"];Object.keys(hi).forEach(function(n){LC.forEach(function(r){r=r+n.charAt(0).toUpperCase()+n.substring(1),hi[r]=hi[n]})});function pb(n,r,s){return r==null||typeof r=="boolean"||r===""?"":s||typeof r!="number"||r===0||hi.hasOwnProperty(n)&&hi[n]?(""+r).trim():r+"px"}function gb(n,r){n=n.style;for(var s in r)if(r.hasOwnProperty(s)){var u=s.indexOf("--")===0,f=pb(s,r[s],u);s==="float"&&(s="cssFloat"),u?n.setProperty(s,f):n[s]=f}}var DC=G({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ff(n,r){if(r){if(DC[n]&&(r.children!=null||r.dangerouslySetInnerHTML!=null))throw Error(t(137,n));if(r.dangerouslySetInnerHTML!=null){if(r.children!=null)throw Error(t(60));if(typeof r.dangerouslySetInnerHTML!="object"||!("__html"in r.dangerouslySetInnerHTML))throw Error(t(61))}if(r.style!=null&&typeof r.style!="object")throw Error(t(62))}}function hf(n,r){if(n.indexOf("-")===-1)return typeof r.is=="string";switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var pf=null;function gf(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var mf=null,po=null,go=null;function mb(n){if(n=Di(n)){if(typeof mf!="function")throw Error(t(280));var r=n.stateNode;r&&(r=pa(r),mf(n.stateNode,n.type,r))}}function vb(n){po?go?go.push(n):go=[n]:po=n}function yb(){if(po){var n=po,r=go;if(go=po=null,mb(n),r)for(n=0;n<r.length;n++)mb(r[n])}}function bb(n,r){return n(r)}function kb(){}var vf=!1;function wb(n,r,s){if(vf)return n(r,s);vf=!0;try{return bb(n,r,s)}finally{vf=!1,(po!==null||go!==null)&&(kb(),yb())}}function pi(n,r){var s=n.stateNode;if(s===null)return null;var u=pa(s);if(u===null)return null;s=u[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(n=n.type,u=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!u;break e;default:n=!1}if(n)return null;if(s&&typeof s!="function")throw Error(t(231,r,typeof s));return s}var yf=!1;if(d)try{var gi={};Object.defineProperty(gi,"passive",{get:function(){yf=!0}}),window.addEventListener("test",gi,gi),window.removeEventListener("test",gi,gi)}catch(n){yf=!1}function PC(n,r,s,u,f,p,m,k,x){var N=Array.prototype.slice.call(arguments,3);try{r.apply(s,N)}catch(z){this.onError(z)}}var mi=!1,Vs=null,$s=!1,bf=null,MC={onError:function(n){mi=!0,Vs=n}};function FC(n,r,s,u,f,p,m,k,x){mi=!1,Vs=null,PC.apply(MC,arguments)}function zC(n,r,s,u,f,p,m,k,x){if(FC.apply(this,arguments),mi){if(mi){var N=Vs;mi=!1,Vs=null}else throw Error(t(198));$s||($s=!0,bf=N)}}function Mr(n){var r=n,s=n;if(n.alternate)for(;r.return;)r=r.return;else{n=r;do r=n,(r.flags&4098)!==0&&(s=r.return),n=r.return;while(n)}return r.tag===3?s:null}function Tb(n){if(n.tag===13){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function xb(n){if(Mr(n)!==n)throw Error(t(188))}function HC(n){var r=n.alternate;if(!r){if(r=Mr(n),r===null)throw Error(t(188));return r!==n?null:n}for(var s=n,u=r;;){var f=s.return;if(f===null)break;var p=f.alternate;if(p===null){if(u=f.return,u!==null){s=u;continue}break}if(f.child===p.child){for(p=f.child;p;){if(p===s)return xb(f),n;if(p===u)return xb(f),r;p=p.sibling}throw Error(t(188))}if(s.return!==u.return)s=f,u=p;else{for(var m=!1,k=f.child;k;){if(k===s){m=!0,s=f,u=p;break}if(k===u){m=!0,u=f,s=p;break}k=k.sibling}if(!m){for(k=p.child;k;){if(k===s){m=!0,s=p,u=f;break}if(k===u){m=!0,u=p,s=f;break}k=k.sibling}if(!m)throw Error(t(189))}}if(s.alternate!==u)throw Error(t(190))}if(s.tag!==3)throw Error(t(188));return s.stateNode.current===s?n:r}function Eb(n){return n=HC(n),n!==null?Sb(n):null}function Sb(n){if(n.tag===5||n.tag===6)return n;for(n=n.child;n!==null;){var r=Sb(n);if(r!==null)return r;n=n.sibling}return null}var Cb=e.unstable_scheduleCallback,Bb=e.unstable_cancelCallback,jC=e.unstable_shouldYield,qC=e.unstable_requestPaint,nt=e.unstable_now,UC=e.unstable_getCurrentPriorityLevel,kf=e.unstable_ImmediatePriority,Ab=e.unstable_UserBlockingPriority,Gs=e.unstable_NormalPriority,WC=e.unstable_LowPriority,Ib=e.unstable_IdlePriority,Xs=null,Cn=null;function KC(n){if(Cn&&typeof Cn.onCommitFiberRoot=="function")try{Cn.onCommitFiberRoot(Xs,n,void 0,(n.current.flags&128)===128)}catch(r){}}var hn=Math.clz32?Math.clz32:GC,VC=Math.log,$C=Math.LN2;function GC(n){return n>>>=0,n===0?32:31-(VC(n)/$C|0)|0}var Ys=64,Qs=4194304;function vi(n){switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return n&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return n}}function Zs(n,r){var s=n.pendingLanes;if(s===0)return 0;var u=0,f=n.suspendedLanes,p=n.pingedLanes,m=s&268435455;if(m!==0){var k=m&~f;k!==0?u=vi(k):(p&=m,p!==0&&(u=vi(p)))}else m=s&~f,m!==0?u=vi(m):p!==0&&(u=vi(p));if(u===0)return 0;if(r!==0&&r!==u&&(r&f)===0&&(f=u&-u,p=r&-r,f>=p||f===16&&(p&4194240)!==0))return r;if((u&4)!==0&&(u|=s&16),r=n.entangledLanes,r!==0)for(n=n.entanglements,r&=u;0<r;)s=31-hn(r),f=1<<s,u|=n[s],r&=~f;return u}function XC(n,r){switch(n){case 1:case 2:case 4:return r+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function YC(n,r){for(var s=n.suspendedLanes,u=n.pingedLanes,f=n.expirationTimes,p=n.pendingLanes;0<p;){var m=31-hn(p),k=1<<m,x=f[m];x===-1?((k&s)===0||(k&u)!==0)&&(f[m]=XC(k,r)):x<=r&&(n.expiredLanes|=k),p&=~k}}function wf(n){return n=n.pendingLanes&-1073741825,n!==0?n:n&1073741824?1073741824:0}function _b(){var n=Ys;return Ys<<=1,(Ys&4194240)===0&&(Ys=64),n}function Tf(n){for(var r=[],s=0;31>s;s++)r.push(n);return r}function yi(n,r,s){n.pendingLanes|=r,r!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,r=31-hn(r),n[r]=s}function QC(n,r){var s=n.pendingLanes&~r;n.pendingLanes=r,n.suspendedLanes=0,n.pingedLanes=0,n.expiredLanes&=r,n.mutableReadLanes&=r,n.entangledLanes&=r,r=n.entanglements;var u=n.eventTimes;for(n=n.expirationTimes;0<s;){var f=31-hn(s),p=1<<f;r[f]=0,u[f]=-1,n[f]=-1,s&=~p}}function xf(n,r){var s=n.entangledLanes|=r;for(n=n.entanglements;s;){var u=31-hn(s),f=1<<u;f&r|n[u]&r&&(n[u]|=r),s&=~f}}var He=0;function Nb(n){return n&=-n,1<n?4<n?(n&268435455)!==0?16:536870912:4:1}var Rb,Ef,Ob,Lb,Db,Sf=!1,Js=[],rr=null,or=null,ir=null,bi=new Map,ki=new Map,sr=[],ZC="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Pb(n,r){switch(n){case"focusin":case"focusout":rr=null;break;case"dragenter":case"dragleave":or=null;break;case"mouseover":case"mouseout":ir=null;break;case"pointerover":case"pointerout":bi.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":ki.delete(r.pointerId)}}function wi(n,r,s,u,f,p){return n===null||n.nativeEvent!==p?(n={blockedOn:r,domEventName:s,eventSystemFlags:u,nativeEvent:p,targetContainers:[f]},r!==null&&(r=Di(r),r!==null&&Ef(r)),n):(n.eventSystemFlags|=u,r=n.targetContainers,f!==null&&r.indexOf(f)===-1&&r.push(f),n)}function JC(n,r,s,u,f){switch(r){case"focusin":return rr=wi(rr,n,r,s,u,f),!0;case"dragenter":return or=wi(or,n,r,s,u,f),!0;case"mouseover":return ir=wi(ir,n,r,s,u,f),!0;case"pointerover":var p=f.pointerId;return bi.set(p,wi(bi.get(p)||null,n,r,s,u,f)),!0;case"gotpointercapture":return p=f.pointerId,ki.set(p,wi(ki.get(p)||null,n,r,s,u,f)),!0}return!1}function Mb(n){var r=Fr(n.target);if(r!==null){var s=Mr(r);if(s!==null){if(r=s.tag,r===13){if(r=Tb(s),r!==null){n.blockedOn=r,Db(n.priority,function(){Ob(s)});return}}else if(r===3&&s.stateNode.current.memoizedState.isDehydrated){n.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}n.blockedOn=null}function ea(n){if(n.blockedOn!==null)return!1;for(var r=n.targetContainers;0<r.length;){var s=Bf(n.domEventName,n.eventSystemFlags,r[0],n.nativeEvent);if(s===null){s=n.nativeEvent;var u=new s.constructor(s.type,s);pf=u,s.target.dispatchEvent(u),pf=null}else return r=Di(s),r!==null&&Ef(r),n.blockedOn=s,!1;r.shift()}return!0}function Fb(n,r,s){ea(n)&&s.delete(r)}function eB(){Sf=!1,rr!==null&&ea(rr)&&(rr=null),or!==null&&ea(or)&&(or=null),ir!==null&&ea(ir)&&(ir=null),bi.forEach(Fb),ki.forEach(Fb)}function Ti(n,r){n.blockedOn===r&&(n.blockedOn=null,Sf||(Sf=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,eB)))}function xi(n){function r(f){return Ti(f,n)}if(0<Js.length){Ti(Js[0],n);for(var s=1;s<Js.length;s++){var u=Js[s];u.blockedOn===n&&(u.blockedOn=null)}}for(rr!==null&&Ti(rr,n),or!==null&&Ti(or,n),ir!==null&&Ti(ir,n),bi.forEach(r),ki.forEach(r),s=0;s<sr.length;s++)u=sr[s],u.blockedOn===n&&(u.blockedOn=null);for(;0<sr.length&&(s=sr[0],s.blockedOn===null);)Mb(s),s.blockedOn===null&&sr.shift()}var mo=H.ReactCurrentBatchConfig,ta=!0;function tB(n,r,s,u){var f=He,p=mo.transition;mo.transition=null;try{He=1,Cf(n,r,s,u)}finally{He=f,mo.transition=p}}function nB(n,r,s,u){var f=He,p=mo.transition;mo.transition=null;try{He=4,Cf(n,r,s,u)}finally{He=f,mo.transition=p}}function Cf(n,r,s,u){if(ta){var f=Bf(n,r,s,u);if(f===null)Wf(n,r,u,na,s),Pb(n,u);else if(JC(f,n,r,s,u))u.stopPropagation();else if(Pb(n,u),r&4&&-1<ZC.indexOf(n)){for(;f!==null;){var p=Di(f);if(p!==null&&Rb(p),p=Bf(n,r,s,u),p===null&&Wf(n,r,u,na,s),p===f)break;f=p}f!==null&&u.stopPropagation()}else Wf(n,r,u,null,s)}}var na=null;function Bf(n,r,s,u){if(na=null,n=gf(u),n=Fr(n),n!==null)if(r=Mr(n),r===null)n=null;else if(s=r.tag,s===13){if(n=Tb(r),n!==null)return n;n=null}else if(s===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;n=null}else r!==n&&(n=null);return na=n,null}function zb(n){switch(n){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(UC()){case kf:return 1;case Ab:return 4;case Gs:case WC:return 16;case Ib:return 536870912;default:return 16}default:return 16}}var ar=null,Af=null,ra=null;function Hb(){if(ra)return ra;var n,r=Af,s=r.length,u,f="value"in ar?ar.value:ar.textContent,p=f.length;for(n=0;n<s&&r[n]===f[n];n++);var m=s-n;for(u=1;u<=m&&r[s-u]===f[p-u];u++);return ra=f.slice(n,1<u?1-u:void 0)}function oa(n){var r=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&r===13&&(n=13)):n=r,n===10&&(n=13),32<=n||n===13?n:0}function ia(){return!0}function jb(){return!1}function Kt(n){function r(s,u,f,p,m){this._reactName=s,this._targetInst=f,this.type=u,this.nativeEvent=p,this.target=m,this.currentTarget=null;for(var k in n)n.hasOwnProperty(k)&&(s=n[k],this[k]=s?s(p):p[k]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?ia:jb,this.isPropagationStopped=jb,this}return G(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=ia)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=ia)},persist:function(){},isPersistent:ia}),r}var vo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},If=Kt(vo),Ei=G({},vo,{view:0,detail:0}),rB=Kt(Ei),_f,Nf,Si,sa=G({},Ei,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Of,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==Si&&(Si&&n.type==="mousemove"?(_f=n.screenX-Si.screenX,Nf=n.screenY-Si.screenY):Nf=_f=0,Si=n),_f)},movementY:function(n){return"movementY"in n?n.movementY:Nf}}),qb=Kt(sa),oB=G({},sa,{dataTransfer:0}),iB=Kt(oB),sB=G({},Ei,{relatedTarget:0}),Rf=Kt(sB),aB=G({},vo,{animationName:0,elapsedTime:0,pseudoElement:0}),lB=Kt(aB),cB=G({},vo,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),uB=Kt(cB),dB=G({},vo,{data:0}),Ub=Kt(dB),fB={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},hB={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},pB={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function gB(n){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(n):(n=pB[n])?!!r[n]:!1}function Of(){return gB}var mB=G({},Ei,{key:function(n){if(n.key){var r=fB[n.key]||n.key;if(r!=="Unidentified")return r}return n.type==="keypress"?(n=oa(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?hB[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Of,charCode:function(n){return n.type==="keypress"?oa(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?oa(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),vB=Kt(mB),yB=G({},sa,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Wb=Kt(yB),bB=G({},Ei,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Of}),kB=Kt(bB),wB=G({},vo,{propertyName:0,elapsedTime:0,pseudoElement:0}),TB=Kt(wB),xB=G({},sa,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),EB=Kt(xB),SB=[9,13,27,32],Lf=d&&"CompositionEvent"in window,Ci=null;d&&"documentMode"in document&&(Ci=document.documentMode);var CB=d&&"TextEvent"in window&&!Ci,Kb=d&&(!Lf||Ci&&8<Ci&&11>=Ci),Vb=" ",$b=!1;function Gb(n,r){switch(n){case"keyup":return SB.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Xb(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var yo=!1;function BB(n,r){switch(n){case"compositionend":return Xb(r);case"keypress":return r.which!==32?null:($b=!0,Vb);case"textInput":return n=r.data,n===Vb&&$b?null:n;default:return null}}function AB(n,r){if(yo)return n==="compositionend"||!Lf&&Gb(n,r)?(n=Hb(),ra=Af=ar=null,yo=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return Kb&&r.locale!=="ko"?null:r.data;default:return null}}var IB={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Yb(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r==="input"?!!IB[n.type]:r==="textarea"}function Qb(n,r,s,u){vb(u),r=da(r,"onChange"),0<r.length&&(s=new If("onChange","change",null,s,u),n.push({event:s,listeners:r}))}var Bi=null,Ai=null;function _B(n){gk(n,0)}function aa(n){var r=xo(n);if(Pr(r))return n}function NB(n,r){if(n==="change")return r}var Zb=!1;if(d){var Df;if(d){var Pf="oninput"in document;if(!Pf){var Jb=document.createElement("div");Jb.setAttribute("oninput","return;"),Pf=typeof Jb.oninput=="function"}Df=Pf}else Df=!1;Zb=Df&&(!document.documentMode||9<document.documentMode)}function ek(){Bi&&(Bi.detachEvent("onpropertychange",tk),Ai=Bi=null)}function tk(n){if(n.propertyName==="value"&&aa(Ai)){var r=[];Qb(r,Ai,n,gf(n)),wb(_B,r)}}function RB(n,r,s){n==="focusin"?(ek(),Bi=r,Ai=s,Bi.attachEvent("onpropertychange",tk)):n==="focusout"&&ek()}function OB(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return aa(Ai)}function LB(n,r){if(n==="click")return aa(r)}function DB(n,r){if(n==="input"||n==="change")return aa(r)}function PB(n,r){return n===r&&(n!==0||1/n===1/r)||n!==n&&r!==r}var pn=typeof Object.is=="function"?Object.is:PB;function Ii(n,r){if(pn(n,r))return!0;if(typeof n!="object"||n===null||typeof r!="object"||r===null)return!1;var s=Object.keys(n),u=Object.keys(r);if(s.length!==u.length)return!1;for(u=0;u<s.length;u++){var f=s[u];if(!h.call(r,f)||!pn(n[f],r[f]))return!1}return!0}function nk(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function rk(n,r){var s=nk(n);n=0;for(var u;s;){if(s.nodeType===3){if(u=n+s.textContent.length,n<=r&&u>=r)return{node:s,offset:r-n};n=u}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=nk(s)}}function ok(n,r){return n&&r?n===r?!0:n&&n.nodeType===3?!1:r&&r.nodeType===3?ok(n,r.parentNode):"contains"in n?n.contains(r):n.compareDocumentPosition?!!(n.compareDocumentPosition(r)&16):!1:!1}function ik(){for(var n=window,r=Ws();r instanceof n.HTMLIFrameElement;){try{var s=typeof r.contentWindow.location.href=="string"}catch(u){s=!1}if(s)n=r.contentWindow;else break;r=Ws(n.document)}return r}function Mf(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r&&(r==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||r==="textarea"||n.contentEditable==="true")}function MB(n){var r=ik(),s=n.focusedElem,u=n.selectionRange;if(r!==s&&s&&s.ownerDocument&&ok(s.ownerDocument.documentElement,s)){if(u!==null&&Mf(s)){if(r=u.start,n=u.end,n===void 0&&(n=r),"selectionStart"in s)s.selectionStart=r,s.selectionEnd=Math.min(n,s.value.length);else if(n=(r=s.ownerDocument||document)&&r.defaultView||window,n.getSelection){n=n.getSelection();var f=s.textContent.length,p=Math.min(u.start,f);u=u.end===void 0?p:Math.min(u.end,f),!n.extend&&p>u&&(f=u,u=p,p=f),f=rk(s,p);var m=rk(s,u);f&&m&&(n.rangeCount!==1||n.anchorNode!==f.node||n.anchorOffset!==f.offset||n.focusNode!==m.node||n.focusOffset!==m.offset)&&(r=r.createRange(),r.setStart(f.node,f.offset),n.removeAllRanges(),p>u?(n.addRange(r),n.extend(m.node,m.offset)):(r.setEnd(m.node,m.offset),n.addRange(r)))}}for(r=[],n=s;n=n.parentNode;)n.nodeType===1&&r.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<r.length;s++)n=r[s],n.element.scrollLeft=n.left,n.element.scrollTop=n.top}}var FB=d&&"documentMode"in document&&11>=document.documentMode,bo=null,Ff=null,_i=null,zf=!1;function sk(n,r,s){var u=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;zf||bo==null||bo!==Ws(u)||(u=bo,"selectionStart"in u&&Mf(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),_i&&Ii(_i,u)||(_i=u,u=da(Ff,"onSelect"),0<u.length&&(r=new If("onSelect","select",null,r,s),n.push({event:r,listeners:u}),r.target=bo)))}function la(n,r){var s={};return s[n.toLowerCase()]=r.toLowerCase(),s["Webkit"+n]="webkit"+r,s["Moz"+n]="moz"+r,s}var ko={animationend:la("Animation","AnimationEnd"),animationiteration:la("Animation","AnimationIteration"),animationstart:la("Animation","AnimationStart"),transitionend:la("Transition","TransitionEnd")},Hf={},ak={};d&&(ak=document.createElement("div").style,"AnimationEvent"in window||(delete ko.animationend.animation,delete ko.animationiteration.animation,delete ko.animationstart.animation),"TransitionEvent"in window||delete ko.transitionend.transition);function ca(n){if(Hf[n])return Hf[n];if(!ko[n])return n;var r=ko[n],s;for(s in r)if(r.hasOwnProperty(s)&&s in ak)return Hf[n]=r[s];return n}var lk=ca("animationend"),ck=ca("animationiteration"),uk=ca("animationstart"),dk=ca("transitionend"),fk=new Map,hk="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function lr(n,r){fk.set(n,r),l(r,[n])}for(var jf=0;jf<hk.length;jf++){var qf=hk[jf],zB=qf.toLowerCase(),HB=qf[0].toUpperCase()+qf.slice(1);lr(zB,"on"+HB)}lr(lk,"onAnimationEnd"),lr(ck,"onAnimationIteration"),lr(uk,"onAnimationStart"),lr("dblclick","onDoubleClick"),lr("focusin","onFocus"),lr("focusout","onBlur"),lr(dk,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ni="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),jB=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ni));function pk(n,r,s){var u=n.type||"unknown-event";n.currentTarget=s,zC(u,r,void 0,n),n.currentTarget=null}function gk(n,r){r=(r&4)!==0;for(var s=0;s<n.length;s++){var u=n[s],f=u.event;u=u.listeners;e:{var p=void 0;if(r)for(var m=u.length-1;0<=m;m--){var k=u[m],x=k.instance,N=k.currentTarget;if(k=k.listener,x!==p&&f.isPropagationStopped())break e;pk(f,k,N),p=x}else for(m=0;m<u.length;m++){if(k=u[m],x=k.instance,N=k.currentTarget,k=k.listener,x!==p&&f.isPropagationStopped())break e;pk(f,k,N),p=x}}}if($s)throw n=bf,$s=!1,bf=null,n}function Ke(n,r){var s=r[Yf];s===void 0&&(s=r[Yf]=new Set);var u=n+"__bubble";s.has(u)||(mk(r,n,2,!1),s.add(u))}function Uf(n,r,s){var u=0;r&&(u|=4),mk(s,n,u,r)}var ua="_reactListening"+Math.random().toString(36).slice(2);function Ri(n){if(!n[ua]){n[ua]=!0,o.forEach(function(s){s!=="selectionchange"&&(jB.has(s)||Uf(s,!1,n),Uf(s,!0,n))});var r=n.nodeType===9?n:n.ownerDocument;r===null||r[ua]||(r[ua]=!0,Uf("selectionchange",!1,r))}}function mk(n,r,s,u){switch(zb(r)){case 1:var f=tB;break;case 4:f=nB;break;default:f=Cf}s=f.bind(null,r,s,n),f=void 0,!yf||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(f=!0),u?f!==void 0?n.addEventListener(r,s,{capture:!0,passive:f}):n.addEventListener(r,s,!0):f!==void 0?n.addEventListener(r,s,{passive:f}):n.addEventListener(r,s,!1)}function Wf(n,r,s,u,f){var p=u;if((r&1)===0&&(r&2)===0&&u!==null)e:for(;;){if(u===null)return;var m=u.tag;if(m===3||m===4){var k=u.stateNode.containerInfo;if(k===f||k.nodeType===8&&k.parentNode===f)break;if(m===4)for(m=u.return;m!==null;){var x=m.tag;if((x===3||x===4)&&(x=m.stateNode.containerInfo,x===f||x.nodeType===8&&x.parentNode===f))return;m=m.return}for(;k!==null;){if(m=Fr(k),m===null)return;if(x=m.tag,x===5||x===6){u=p=m;continue e}k=k.parentNode}}u=u.return}wb(function(){var N=p,z=gf(s),j=[];e:{var M=fk.get(n);if(M!==void 0){var $=If,te=n;switch(n){case"keypress":if(oa(s)===0)break e;case"keydown":case"keyup":$=vB;break;case"focusin":te="focus",$=Rf;break;case"focusout":te="blur",$=Rf;break;case"beforeblur":case"afterblur":$=Rf;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":$=qb;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":$=iB;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":$=kB;break;case lk:case ck:case uk:$=lB;break;case dk:$=TB;break;case"scroll":$=rB;break;case"wheel":$=EB;break;case"copy":case"cut":case"paste":$=uB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":$=Wb}var re=(r&4)!==0,rt=!re&&n==="scroll",I=re?M!==null?M+"Capture":null:M;re=[];for(var C=N,_;C!==null;){_=C;var K=_.stateNode;if(_.tag===5&&K!==null&&(_=K,I!==null&&(K=pi(C,I),K!=null&&re.push(Oi(C,K,_)))),rt)break;C=C.return}0<re.length&&(M=new $(M,te,null,s,z),j.push({event:M,listeners:re}))}}if((r&7)===0){e:{if(M=n==="mouseover"||n==="pointerover",$=n==="mouseout"||n==="pointerout",M&&s!==pf&&(te=s.relatedTarget||s.fromElement)&&(Fr(te)||te[Hn]))break e;if(($||M)&&(M=z.window===z?z:(M=z.ownerDocument)?M.defaultView||M.parentWindow:window,$?(te=s.relatedTarget||s.toElement,$=N,te=te?Fr(te):null,te!==null&&(rt=Mr(te),te!==rt||te.tag!==5&&te.tag!==6)&&(te=null)):($=null,te=N),$!==te)){if(re=qb,K="onMouseLeave",I="onMouseEnter",C="mouse",(n==="pointerout"||n==="pointerover")&&(re=Wb,K="onPointerLeave",I="onPointerEnter",C="pointer"),rt=$==null?M:xo($),_=te==null?M:xo(te),M=new re(K,C+"leave",$,s,z),M.target=rt,M.relatedTarget=_,K=null,Fr(z)===N&&(re=new re(I,C+"enter",te,s,z),re.target=_,re.relatedTarget=rt,K=re),rt=K,$&&te)t:{for(re=$,I=te,C=0,_=re;_;_=wo(_))C++;for(_=0,K=I;K;K=wo(K))_++;for(;0<C-_;)re=wo(re),C--;for(;0<_-C;)I=wo(I),_--;for(;C--;){if(re===I||I!==null&&re===I.alternate)break t;re=wo(re),I=wo(I)}re=null}else re=null;$!==null&&vk(j,M,$,re,!1),te!==null&&rt!==null&&vk(j,rt,te,re,!0)}}e:{if(M=N?xo(N):window,$=M.nodeName&&M.nodeName.toLowerCase(),$==="select"||$==="input"&&M.type==="file")var oe=NB;else if(Yb(M))if(Zb)oe=DB;else{oe=OB;var ue=RB}else($=M.nodeName)&&$.toLowerCase()==="input"&&(M.type==="checkbox"||M.type==="radio")&&(oe=LB);if(oe&&(oe=oe(n,N))){Qb(j,oe,s,z);break e}ue&&ue(n,M,N),n==="focusout"&&(ue=M._wrapperState)&&ue.controlled&&M.type==="number"&&cf(M,"number",M.value)}switch(ue=N?xo(N):window,n){case"focusin":(Yb(ue)||ue.contentEditable==="true")&&(bo=ue,Ff=N,_i=null);break;case"focusout":_i=Ff=bo=null;break;case"mousedown":zf=!0;break;case"contextmenu":case"mouseup":case"dragend":zf=!1,sk(j,s,z);break;case"selectionchange":if(FB)break;case"keydown":case"keyup":sk(j,s,z)}var de;if(Lf)e:{switch(n){case"compositionstart":var ge="onCompositionStart";break e;case"compositionend":ge="onCompositionEnd";break e;case"compositionupdate":ge="onCompositionUpdate";break e}ge=void 0}else yo?Gb(n,s)&&(ge="onCompositionEnd"):n==="keydown"&&s.keyCode===229&&(ge="onCompositionStart");ge&&(Kb&&s.locale!=="ko"&&(yo||ge!=="onCompositionStart"?ge==="onCompositionEnd"&&yo&&(de=Hb()):(ar=z,Af="value"in ar?ar.value:ar.textContent,yo=!0)),ue=da(N,ge),0<ue.length&&(ge=new Ub(ge,n,null,s,z),j.push({event:ge,listeners:ue}),de?ge.data=de:(de=Xb(s),de!==null&&(ge.data=de)))),(de=CB?BB(n,s):AB(n,s))&&(N=da(N,"onBeforeInput"),0<N.length&&(z=new Ub("onBeforeInput","beforeinput",null,s,z),j.push({event:z,listeners:N}),z.data=de))}gk(j,r)})}function Oi(n,r,s){return{instance:n,listener:r,currentTarget:s}}function da(n,r){for(var s=r+"Capture",u=[];n!==null;){var f=n,p=f.stateNode;f.tag===5&&p!==null&&(f=p,p=pi(n,s),p!=null&&u.unshift(Oi(n,p,f)),p=pi(n,r),p!=null&&u.push(Oi(n,p,f))),n=n.return}return u}function wo(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5);return n||null}function vk(n,r,s,u,f){for(var p=r._reactName,m=[];s!==null&&s!==u;){var k=s,x=k.alternate,N=k.stateNode;if(x!==null&&x===u)break;k.tag===5&&N!==null&&(k=N,f?(x=pi(s,p),x!=null&&m.unshift(Oi(s,x,k))):f||(x=pi(s,p),x!=null&&m.push(Oi(s,x,k)))),s=s.return}m.length!==0&&n.push({event:r,listeners:m})}var qB=/\r\n?/g,UB=/\u0000|\uFFFD/g;function yk(n){return(typeof n=="string"?n:""+n).replace(qB,`
|
|
15
|
+
`).replace(UB,"")}function fa(n,r,s){if(r=yk(r),yk(n)!==r&&s)throw Error(t(425))}function ha(){}var Kf=null,Vf=null;function $f(n,r){return n==="textarea"||n==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var Gf=typeof setTimeout=="function"?setTimeout:void 0,WB=typeof clearTimeout=="function"?clearTimeout:void 0,bk=typeof Promise=="function"?Promise:void 0,KB=typeof queueMicrotask=="function"?queueMicrotask:typeof bk!="undefined"?function(n){return bk.resolve(null).then(n).catch(VB)}:Gf;function VB(n){setTimeout(function(){throw n})}function Xf(n,r){var s=r,u=0;do{var f=s.nextSibling;if(n.removeChild(s),f&&f.nodeType===8)if(s=f.data,s==="/$"){if(u===0){n.removeChild(f),xi(r);return}u--}else s!=="$"&&s!=="$?"&&s!=="$!"||u++;s=f}while(s);xi(r)}function cr(n){for(;n!=null;n=n.nextSibling){var r=n.nodeType;if(r===1||r===3)break;if(r===8){if(r=n.data,r==="$"||r==="$!"||r==="$?")break;if(r==="/$")return null}}return n}function kk(n){n=n.previousSibling;for(var r=0;n;){if(n.nodeType===8){var s=n.data;if(s==="$"||s==="$!"||s==="$?"){if(r===0)return n;r--}else s==="/$"&&r++}n=n.previousSibling}return null}var To=Math.random().toString(36).slice(2),Bn="__reactFiber$"+To,Li="__reactProps$"+To,Hn="__reactContainer$"+To,Yf="__reactEvents$"+To,$B="__reactListeners$"+To,GB="__reactHandles$"+To;function Fr(n){var r=n[Bn];if(r)return r;for(var s=n.parentNode;s;){if(r=s[Hn]||s[Bn]){if(s=r.alternate,r.child!==null||s!==null&&s.child!==null)for(n=kk(n);n!==null;){if(s=n[Bn])return s;n=kk(n)}return r}n=s,s=n.parentNode}return null}function Di(n){return n=n[Bn]||n[Hn],!n||n.tag!==5&&n.tag!==6&&n.tag!==13&&n.tag!==3?null:n}function xo(n){if(n.tag===5||n.tag===6)return n.stateNode;throw Error(t(33))}function pa(n){return n[Li]||null}var Qf=[],Eo=-1;function ur(n){return{current:n}}function Ve(n){0>Eo||(n.current=Qf[Eo],Qf[Eo]=null,Eo--)}function We(n,r){Eo++,Qf[Eo]=n.current,n.current=r}var dr={},St=ur(dr),Mt=ur(!1),zr=dr;function So(n,r){var s=n.type.contextTypes;if(!s)return dr;var u=n.stateNode;if(u&&u.__reactInternalMemoizedUnmaskedChildContext===r)return u.__reactInternalMemoizedMaskedChildContext;var f={},p;for(p in s)f[p]=r[p];return u&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=r,n.__reactInternalMemoizedMaskedChildContext=f),f}function Ft(n){return n=n.childContextTypes,n!=null}function ga(){Ve(Mt),Ve(St)}function wk(n,r,s){if(St.current!==dr)throw Error(t(168));We(St,r),We(Mt,s)}function Tk(n,r,s){var u=n.stateNode;if(r=r.childContextTypes,typeof u.getChildContext!="function")return s;u=u.getChildContext();for(var f in u)if(!(f in r))throw Error(t(108,me(n)||"Unknown",f));return G({},s,u)}function ma(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||dr,zr=St.current,We(St,n),We(Mt,Mt.current),!0}function xk(n,r,s){var u=n.stateNode;if(!u)throw Error(t(169));s?(n=Tk(n,r,zr),u.__reactInternalMemoizedMergedChildContext=n,Ve(Mt),Ve(St),We(St,n)):Ve(Mt),We(Mt,s)}var jn=null,va=!1,Zf=!1;function Ek(n){jn===null?jn=[n]:jn.push(n)}function XB(n){va=!0,Ek(n)}function fr(){if(!Zf&&jn!==null){Zf=!0;var n=0,r=He;try{var s=jn;for(He=1;n<s.length;n++){var u=s[n];do u=u(!0);while(u!==null)}jn=null,va=!1}catch(f){throw jn!==null&&(jn=jn.slice(n+1)),Cb(kf,fr),f}finally{He=r,Zf=!1}}return null}var Co=[],Bo=0,ya=null,ba=0,nn=[],rn=0,Hr=null,qn=1,Un="";function jr(n,r){Co[Bo++]=ba,Co[Bo++]=ya,ya=n,ba=r}function Sk(n,r,s){nn[rn++]=qn,nn[rn++]=Un,nn[rn++]=Hr,Hr=n;var u=qn;n=Un;var f=32-hn(u)-1;u&=~(1<<f),s+=1;var p=32-hn(r)+f;if(30<p){var m=f-f%5;p=(u&(1<<m)-1).toString(32),u>>=m,f-=m,qn=1<<32-hn(r)+f|s<<f|u,Un=p+n}else qn=1<<p|s<<f|u,Un=n}function Jf(n){n.return!==null&&(jr(n,1),Sk(n,1,0))}function eh(n){for(;n===ya;)ya=Co[--Bo],Co[Bo]=null,ba=Co[--Bo],Co[Bo]=null;for(;n===Hr;)Hr=nn[--rn],nn[rn]=null,Un=nn[--rn],nn[rn]=null,qn=nn[--rn],nn[rn]=null}var Vt=null,$t=null,Xe=!1,gn=null;function Ck(n,r){var s=ln(5,null,null,0);s.elementType="DELETED",s.stateNode=r,s.return=n,r=n.deletions,r===null?(n.deletions=[s],n.flags|=16):r.push(s)}function Bk(n,r){switch(n.tag){case 5:var s=n.type;return r=r.nodeType!==1||s.toLowerCase()!==r.nodeName.toLowerCase()?null:r,r!==null?(n.stateNode=r,Vt=n,$t=cr(r.firstChild),!0):!1;case 6:return r=n.pendingProps===""||r.nodeType!==3?null:r,r!==null?(n.stateNode=r,Vt=n,$t=null,!0):!1;case 13:return r=r.nodeType!==8?null:r,r!==null?(s=Hr!==null?{id:qn,overflow:Un}:null,n.memoizedState={dehydrated:r,treeContext:s,retryLane:1073741824},s=ln(18,null,null,0),s.stateNode=r,s.return=n,n.child=s,Vt=n,$t=null,!0):!1;default:return!1}}function th(n){return(n.mode&1)!==0&&(n.flags&128)===0}function nh(n){if(Xe){var r=$t;if(r){var s=r;if(!Bk(n,r)){if(th(n))throw Error(t(418));r=cr(s.nextSibling);var u=Vt;r&&Bk(n,r)?Ck(u,s):(n.flags=n.flags&-4097|2,Xe=!1,Vt=n)}}else{if(th(n))throw Error(t(418));n.flags=n.flags&-4097|2,Xe=!1,Vt=n}}}function Ak(n){for(n=n.return;n!==null&&n.tag!==5&&n.tag!==3&&n.tag!==13;)n=n.return;Vt=n}function ka(n){if(n!==Vt)return!1;if(!Xe)return Ak(n),Xe=!0,!1;var r;if((r=n.tag!==3)&&!(r=n.tag!==5)&&(r=n.type,r=r!=="head"&&r!=="body"&&!$f(n.type,n.memoizedProps)),r&&(r=$t)){if(th(n))throw Ik(),Error(t(418));for(;r;)Ck(n,r),r=cr(r.nextSibling)}if(Ak(n),n.tag===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(t(317));e:{for(n=n.nextSibling,r=0;n;){if(n.nodeType===8){var s=n.data;if(s==="/$"){if(r===0){$t=cr(n.nextSibling);break e}r--}else s!=="$"&&s!=="$!"&&s!=="$?"||r++}n=n.nextSibling}$t=null}}else $t=Vt?cr(n.stateNode.nextSibling):null;return!0}function Ik(){for(var n=$t;n;)n=cr(n.nextSibling)}function Ao(){$t=Vt=null,Xe=!1}function rh(n){gn===null?gn=[n]:gn.push(n)}var YB=H.ReactCurrentBatchConfig;function Pi(n,r,s){if(n=s.ref,n!==null&&typeof n!="function"&&typeof n!="object"){if(s._owner){if(s=s._owner,s){if(s.tag!==1)throw Error(t(309));var u=s.stateNode}if(!u)throw Error(t(147,n));var f=u,p=""+n;return r!==null&&r.ref!==null&&typeof r.ref=="function"&&r.ref._stringRef===p?r.ref:(r=function(m){var k=f.refs;m===null?delete k[p]:k[p]=m},r._stringRef=p,r)}if(typeof n!="string")throw Error(t(284));if(!s._owner)throw Error(t(290,n))}return n}function wa(n,r){throw n=Object.prototype.toString.call(r),Error(t(31,n==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":n))}function _k(n){var r=n._init;return r(n._payload)}function Nk(n){function r(I,C){if(n){var _=I.deletions;_===null?(I.deletions=[C],I.flags|=16):_.push(C)}}function s(I,C){if(!n)return null;for(;C!==null;)r(I,C),C=C.sibling;return null}function u(I,C){for(I=new Map;C!==null;)C.key!==null?I.set(C.key,C):I.set(C.index,C),C=C.sibling;return I}function f(I,C){return I=kr(I,C),I.index=0,I.sibling=null,I}function p(I,C,_){return I.index=_,n?(_=I.alternate,_!==null?(_=_.index,_<C?(I.flags|=2,C):_):(I.flags|=2,C)):(I.flags|=1048576,C)}function m(I){return n&&I.alternate===null&&(I.flags|=2),I}function k(I,C,_,K){return C===null||C.tag!==6?(C=Gh(_,I.mode,K),C.return=I,C):(C=f(C,_),C.return=I,C)}function x(I,C,_,K){var oe=_.type;return oe===W?z(I,C,_.props.children,K,_.key):C!==null&&(C.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===xe&&_k(oe)===C.type)?(K=f(C,_.props),K.ref=Pi(I,C,_),K.return=I,K):(K=Ka(_.type,_.key,_.props,null,I.mode,K),K.ref=Pi(I,C,_),K.return=I,K)}function N(I,C,_,K){return C===null||C.tag!==4||C.stateNode.containerInfo!==_.containerInfo||C.stateNode.implementation!==_.implementation?(C=Xh(_,I.mode,K),C.return=I,C):(C=f(C,_.children||[]),C.return=I,C)}function z(I,C,_,K,oe){return C===null||C.tag!==7?(C=Xr(_,I.mode,K,oe),C.return=I,C):(C=f(C,_),C.return=I,C)}function j(I,C,_){if(typeof C=="string"&&C!==""||typeof C=="number")return C=Gh(""+C,I.mode,_),C.return=I,C;if(typeof C=="object"&&C!==null){switch(C.$$typeof){case X:return _=Ka(C.type,C.key,C.props,null,I.mode,_),_.ref=Pi(I,null,C),_.return=I,_;case q:return C=Xh(C,I.mode,_),C.return=I,C;case xe:var K=C._init;return j(I,K(C._payload),_)}if(di(C)||le(C))return C=Xr(C,I.mode,_,null),C.return=I,C;wa(I,C)}return null}function M(I,C,_,K){var oe=C!==null?C.key:null;if(typeof _=="string"&&_!==""||typeof _=="number")return oe!==null?null:k(I,C,""+_,K);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case X:return _.key===oe?x(I,C,_,K):null;case q:return _.key===oe?N(I,C,_,K):null;case xe:return oe=_._init,M(I,C,oe(_._payload),K)}if(di(_)||le(_))return oe!==null?null:z(I,C,_,K,null);wa(I,_)}return null}function $(I,C,_,K,oe){if(typeof K=="string"&&K!==""||typeof K=="number")return I=I.get(_)||null,k(C,I,""+K,oe);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case X:return I=I.get(K.key===null?_:K.key)||null,x(C,I,K,oe);case q:return I=I.get(K.key===null?_:K.key)||null,N(C,I,K,oe);case xe:var ue=K._init;return $(I,C,_,ue(K._payload),oe)}if(di(K)||le(K))return I=I.get(_)||null,z(C,I,K,oe,null);wa(C,K)}return null}function te(I,C,_,K){for(var oe=null,ue=null,de=C,ge=C=0,vt=null;de!==null&&ge<_.length;ge++){de.index>ge?(vt=de,de=null):vt=de.sibling;var Me=M(I,de,_[ge],K);if(Me===null){de===null&&(de=vt);break}n&&de&&Me.alternate===null&&r(I,de),C=p(Me,C,ge),ue===null?oe=Me:ue.sibling=Me,ue=Me,de=vt}if(ge===_.length)return s(I,de),Xe&&jr(I,ge),oe;if(de===null){for(;ge<_.length;ge++)de=j(I,_[ge],K),de!==null&&(C=p(de,C,ge),ue===null?oe=de:ue.sibling=de,ue=de);return Xe&&jr(I,ge),oe}for(de=u(I,de);ge<_.length;ge++)vt=$(de,I,ge,_[ge],K),vt!==null&&(n&&vt.alternate!==null&&de.delete(vt.key===null?ge:vt.key),C=p(vt,C,ge),ue===null?oe=vt:ue.sibling=vt,ue=vt);return n&&de.forEach(function(wr){return r(I,wr)}),Xe&&jr(I,ge),oe}function re(I,C,_,K){var oe=le(_);if(typeof oe!="function")throw Error(t(150));if(_=oe.call(_),_==null)throw Error(t(151));for(var ue=oe=null,de=C,ge=C=0,vt=null,Me=_.next();de!==null&&!Me.done;ge++,Me=_.next()){de.index>ge?(vt=de,de=null):vt=de.sibling;var wr=M(I,de,Me.value,K);if(wr===null){de===null&&(de=vt);break}n&&de&&wr.alternate===null&&r(I,de),C=p(wr,C,ge),ue===null?oe=wr:ue.sibling=wr,ue=wr,de=vt}if(Me.done)return s(I,de),Xe&&jr(I,ge),oe;if(de===null){for(;!Me.done;ge++,Me=_.next())Me=j(I,Me.value,K),Me!==null&&(C=p(Me,C,ge),ue===null?oe=Me:ue.sibling=Me,ue=Me);return Xe&&jr(I,ge),oe}for(de=u(I,de);!Me.done;ge++,Me=_.next())Me=$(de,I,ge,Me.value,K),Me!==null&&(n&&Me.alternate!==null&&de.delete(Me.key===null?ge:Me.key),C=p(Me,C,ge),ue===null?oe=Me:ue.sibling=Me,ue=Me);return n&&de.forEach(function(IA){return r(I,IA)}),Xe&&jr(I,ge),oe}function rt(I,C,_,K){if(typeof _=="object"&&_!==null&&_.type===W&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case X:e:{for(var oe=_.key,ue=C;ue!==null;){if(ue.key===oe){if(oe=_.type,oe===W){if(ue.tag===7){s(I,ue.sibling),C=f(ue,_.props.children),C.return=I,I=C;break e}}else if(ue.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===xe&&_k(oe)===ue.type){s(I,ue.sibling),C=f(ue,_.props),C.ref=Pi(I,ue,_),C.return=I,I=C;break e}s(I,ue);break}else r(I,ue);ue=ue.sibling}_.type===W?(C=Xr(_.props.children,I.mode,K,_.key),C.return=I,I=C):(K=Ka(_.type,_.key,_.props,null,I.mode,K),K.ref=Pi(I,C,_),K.return=I,I=K)}return m(I);case q:e:{for(ue=_.key;C!==null;){if(C.key===ue)if(C.tag===4&&C.stateNode.containerInfo===_.containerInfo&&C.stateNode.implementation===_.implementation){s(I,C.sibling),C=f(C,_.children||[]),C.return=I,I=C;break e}else{s(I,C);break}else r(I,C);C=C.sibling}C=Xh(_,I.mode,K),C.return=I,I=C}return m(I);case xe:return ue=_._init,rt(I,C,ue(_._payload),K)}if(di(_))return te(I,C,_,K);if(le(_))return re(I,C,_,K);wa(I,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,C!==null&&C.tag===6?(s(I,C.sibling),C=f(C,_),C.return=I,I=C):(s(I,C),C=Gh(_,I.mode,K),C.return=I,I=C),m(I)):s(I,C)}return rt}var Io=Nk(!0),Rk=Nk(!1),Ta=ur(null),xa=null,_o=null,oh=null;function ih(){oh=_o=xa=null}function sh(n){var r=Ta.current;Ve(Ta),n._currentValue=r}function ah(n,r,s){for(;n!==null;){var u=n.alternate;if((n.childLanes&r)!==r?(n.childLanes|=r,u!==null&&(u.childLanes|=r)):u!==null&&(u.childLanes&r)!==r&&(u.childLanes|=r),n===s)break;n=n.return}}function No(n,r){xa=n,oh=_o=null,n=n.dependencies,n!==null&&n.firstContext!==null&&((n.lanes&r)!==0&&(zt=!0),n.firstContext=null)}function on(n){var r=n._currentValue;if(oh!==n)if(n={context:n,memoizedValue:r,next:null},_o===null){if(xa===null)throw Error(t(308));_o=n,xa.dependencies={lanes:0,firstContext:n}}else _o=_o.next=n;return r}var qr=null;function lh(n){qr===null?qr=[n]:qr.push(n)}function Ok(n,r,s,u){var f=r.interleaved;return f===null?(s.next=s,lh(r)):(s.next=f.next,f.next=s),r.interleaved=s,Wn(n,u)}function Wn(n,r){n.lanes|=r;var s=n.alternate;for(s!==null&&(s.lanes|=r),s=n,n=n.return;n!==null;)n.childLanes|=r,s=n.alternate,s!==null&&(s.childLanes|=r),s=n,n=n.return;return s.tag===3?s.stateNode:null}var hr=!1;function ch(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Lk(n,r){n=n.updateQueue,r.updateQueue===n&&(r.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,effects:n.effects})}function Kn(n,r){return{eventTime:n,lane:r,tag:0,payload:null,callback:null,next:null}}function pr(n,r,s){var u=n.updateQueue;if(u===null)return null;if(u=u.shared,(Le&2)!==0){var f=u.pending;return f===null?r.next=r:(r.next=f.next,f.next=r),u.pending=r,Wn(n,s)}return f=u.interleaved,f===null?(r.next=r,lh(u)):(r.next=f.next,f.next=r),u.interleaved=r,Wn(n,s)}function Ea(n,r,s){if(r=r.updateQueue,r!==null&&(r=r.shared,(s&4194240)!==0)){var u=r.lanes;u&=n.pendingLanes,s|=u,r.lanes=s,xf(n,s)}}function Dk(n,r){var s=n.updateQueue,u=n.alternate;if(u!==null&&(u=u.updateQueue,s===u)){var f=null,p=null;if(s=s.firstBaseUpdate,s!==null){do{var m={eventTime:s.eventTime,lane:s.lane,tag:s.tag,payload:s.payload,callback:s.callback,next:null};p===null?f=p=m:p=p.next=m,s=s.next}while(s!==null);p===null?f=p=r:p=p.next=r}else f=p=r;s={baseState:u.baseState,firstBaseUpdate:f,lastBaseUpdate:p,shared:u.shared,effects:u.effects},n.updateQueue=s;return}n=s.lastBaseUpdate,n===null?s.firstBaseUpdate=r:n.next=r,s.lastBaseUpdate=r}function Sa(n,r,s,u){var f=n.updateQueue;hr=!1;var p=f.firstBaseUpdate,m=f.lastBaseUpdate,k=f.shared.pending;if(k!==null){f.shared.pending=null;var x=k,N=x.next;x.next=null,m===null?p=N:m.next=N,m=x;var z=n.alternate;z!==null&&(z=z.updateQueue,k=z.lastBaseUpdate,k!==m&&(k===null?z.firstBaseUpdate=N:k.next=N,z.lastBaseUpdate=x))}if(p!==null){var j=f.baseState;m=0,z=N=x=null,k=p;do{var M=k.lane,$=k.eventTime;if((u&M)===M){z!==null&&(z=z.next={eventTime:$,lane:0,tag:k.tag,payload:k.payload,callback:k.callback,next:null});e:{var te=n,re=k;switch(M=r,$=s,re.tag){case 1:if(te=re.payload,typeof te=="function"){j=te.call($,j,M);break e}j=te;break e;case 3:te.flags=te.flags&-65537|128;case 0:if(te=re.payload,M=typeof te=="function"?te.call($,j,M):te,M==null)break e;j=G({},j,M);break e;case 2:hr=!0}}k.callback!==null&&k.lane!==0&&(n.flags|=64,M=f.effects,M===null?f.effects=[k]:M.push(k))}else $={eventTime:$,lane:M,tag:k.tag,payload:k.payload,callback:k.callback,next:null},z===null?(N=z=$,x=j):z=z.next=$,m|=M;if(k=k.next,k===null){if(k=f.shared.pending,k===null)break;M=k,k=M.next,M.next=null,f.lastBaseUpdate=M,f.shared.pending=null}}while(!0);if(z===null&&(x=j),f.baseState=x,f.firstBaseUpdate=N,f.lastBaseUpdate=z,r=f.shared.interleaved,r!==null){f=r;do m|=f.lane,f=f.next;while(f!==r)}else p===null&&(f.shared.lanes=0);Kr|=m,n.lanes=m,n.memoizedState=j}}function Pk(n,r,s){if(n=r.effects,r.effects=null,n!==null)for(r=0;r<n.length;r++){var u=n[r],f=u.callback;if(f!==null){if(u.callback=null,u=s,typeof f!="function")throw Error(t(191,f));f.call(u)}}}var Mi={},An=ur(Mi),Fi=ur(Mi),zi=ur(Mi);function Ur(n){if(n===Mi)throw Error(t(174));return n}function uh(n,r){switch(We(zi,r),We(Fi,n),We(An,Mi),n=r.nodeType,n){case 9:case 11:r=(r=r.documentElement)?r.namespaceURI:df(null,"");break;default:n=n===8?r.parentNode:r,r=n.namespaceURI||null,n=n.tagName,r=df(r,n)}Ve(An),We(An,r)}function Ro(){Ve(An),Ve(Fi),Ve(zi)}function Mk(n){Ur(zi.current);var r=Ur(An.current),s=df(r,n.type);r!==s&&(We(Fi,n),We(An,s))}function dh(n){Fi.current===n&&(Ve(An),Ve(Fi))}var Qe=ur(0);function Ca(n){for(var r=n;r!==null;){if(r.tag===13){var s=r.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||s.data==="$?"||s.data==="$!"))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!==void 0){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var fh=[];function hh(){for(var n=0;n<fh.length;n++)fh[n]._workInProgressVersionPrimary=null;fh.length=0}var Ba=H.ReactCurrentDispatcher,ph=H.ReactCurrentBatchConfig,Wr=0,Ze=null,dt=null,gt=null,Aa=!1,Hi=!1,ji=0,QB=0;function Ct(){throw Error(t(321))}function gh(n,r){if(r===null)return!1;for(var s=0;s<r.length&&s<n.length;s++)if(!pn(n[s],r[s]))return!1;return!0}function mh(n,r,s,u,f,p){if(Wr=p,Ze=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,Ba.current=n===null||n.memoizedState===null?tA:nA,n=s(u,f),Hi){p=0;do{if(Hi=!1,ji=0,25<=p)throw Error(t(301));p+=1,gt=dt=null,r.updateQueue=null,Ba.current=rA,n=s(u,f)}while(Hi)}if(Ba.current=Na,r=dt!==null&&dt.next!==null,Wr=0,gt=dt=Ze=null,Aa=!1,r)throw Error(t(300));return n}function vh(){var n=ji!==0;return ji=0,n}function In(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return gt===null?Ze.memoizedState=gt=n:gt=gt.next=n,gt}function sn(){if(dt===null){var n=Ze.alternate;n=n!==null?n.memoizedState:null}else n=dt.next;var r=gt===null?Ze.memoizedState:gt.next;if(r!==null)gt=r,dt=n;else{if(n===null)throw Error(t(310));dt=n,n={memoizedState:dt.memoizedState,baseState:dt.baseState,baseQueue:dt.baseQueue,queue:dt.queue,next:null},gt===null?Ze.memoizedState=gt=n:gt=gt.next=n}return gt}function qi(n,r){return typeof r=="function"?r(n):r}function yh(n){var r=sn(),s=r.queue;if(s===null)throw Error(t(311));s.lastRenderedReducer=n;var u=dt,f=u.baseQueue,p=s.pending;if(p!==null){if(f!==null){var m=f.next;f.next=p.next,p.next=m}u.baseQueue=f=p,s.pending=null}if(f!==null){p=f.next,u=u.baseState;var k=m=null,x=null,N=p;do{var z=N.lane;if((Wr&z)===z)x!==null&&(x=x.next={lane:0,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null}),u=N.hasEagerState?N.eagerState:n(u,N.action);else{var j={lane:z,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null};x===null?(k=x=j,m=u):x=x.next=j,Ze.lanes|=z,Kr|=z}N=N.next}while(N!==null&&N!==p);x===null?m=u:x.next=k,pn(u,r.memoizedState)||(zt=!0),r.memoizedState=u,r.baseState=m,r.baseQueue=x,s.lastRenderedState=u}if(n=s.interleaved,n!==null){f=n;do p=f.lane,Ze.lanes|=p,Kr|=p,f=f.next;while(f!==n)}else f===null&&(s.lanes=0);return[r.memoizedState,s.dispatch]}function bh(n){var r=sn(),s=r.queue;if(s===null)throw Error(t(311));s.lastRenderedReducer=n;var u=s.dispatch,f=s.pending,p=r.memoizedState;if(f!==null){s.pending=null;var m=f=f.next;do p=n(p,m.action),m=m.next;while(m!==f);pn(p,r.memoizedState)||(zt=!0),r.memoizedState=p,r.baseQueue===null&&(r.baseState=p),s.lastRenderedState=p}return[p,u]}function Fk(){}function zk(n,r){var s=Ze,u=sn(),f=r(),p=!pn(u.memoizedState,f);if(p&&(u.memoizedState=f,zt=!0),u=u.queue,kh(qk.bind(null,s,u,n),[n]),u.getSnapshot!==r||p||gt!==null&>.memoizedState.tag&1){if(s.flags|=2048,Ui(9,jk.bind(null,s,u,f,r),void 0,null),mt===null)throw Error(t(349));(Wr&30)!==0||Hk(s,r,f)}return f}function Hk(n,r,s){n.flags|=16384,n={getSnapshot:r,value:s},r=Ze.updateQueue,r===null?(r={lastEffect:null,stores:null},Ze.updateQueue=r,r.stores=[n]):(s=r.stores,s===null?r.stores=[n]:s.push(n))}function jk(n,r,s,u){r.value=s,r.getSnapshot=u,Uk(r)&&Wk(n)}function qk(n,r,s){return s(function(){Uk(r)&&Wk(n)})}function Uk(n){var r=n.getSnapshot;n=n.value;try{var s=r();return!pn(n,s)}catch(u){return!0}}function Wk(n){var r=Wn(n,1);r!==null&&bn(r,n,1,-1)}function Kk(n){var r=In();return typeof n=="function"&&(n=n()),r.memoizedState=r.baseState=n,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:qi,lastRenderedState:n},r.queue=n,n=n.dispatch=eA.bind(null,Ze,n),[r.memoizedState,n]}function Ui(n,r,s,u){return n={tag:n,create:r,destroy:s,deps:u,next:null},r=Ze.updateQueue,r===null?(r={lastEffect:null,stores:null},Ze.updateQueue=r,r.lastEffect=n.next=n):(s=r.lastEffect,s===null?r.lastEffect=n.next=n:(u=s.next,s.next=n,n.next=u,r.lastEffect=n)),n}function Vk(){return sn().memoizedState}function Ia(n,r,s,u){var f=In();Ze.flags|=n,f.memoizedState=Ui(1|r,s,void 0,u===void 0?null:u)}function _a(n,r,s,u){var f=sn();u=u===void 0?null:u;var p=void 0;if(dt!==null){var m=dt.memoizedState;if(p=m.destroy,u!==null&&gh(u,m.deps)){f.memoizedState=Ui(r,s,p,u);return}}Ze.flags|=n,f.memoizedState=Ui(1|r,s,p,u)}function $k(n,r){return Ia(8390656,8,n,r)}function kh(n,r){return _a(2048,8,n,r)}function Gk(n,r){return _a(4,2,n,r)}function Xk(n,r){return _a(4,4,n,r)}function Yk(n,r){if(typeof r=="function")return n=n(),r(n),function(){r(null)};if(r!=null)return n=n(),r.current=n,function(){r.current=null}}function Qk(n,r,s){return s=s!=null?s.concat([n]):null,_a(4,4,Yk.bind(null,r,n),s)}function wh(){}function Zk(n,r){var s=sn();r=r===void 0?null:r;var u=s.memoizedState;return u!==null&&r!==null&&gh(r,u[1])?u[0]:(s.memoizedState=[n,r],n)}function Jk(n,r){var s=sn();r=r===void 0?null:r;var u=s.memoizedState;return u!==null&&r!==null&&gh(r,u[1])?u[0]:(n=n(),s.memoizedState=[n,r],n)}function ew(n,r,s){return(Wr&21)===0?(n.baseState&&(n.baseState=!1,zt=!0),n.memoizedState=s):(pn(s,r)||(s=_b(),Ze.lanes|=s,Kr|=s,n.baseState=!0),r)}function ZB(n,r){var s=He;He=s!==0&&4>s?s:4,n(!0);var u=ph.transition;ph.transition={};try{n(!1),r()}finally{He=s,ph.transition=u}}function tw(){return sn().memoizedState}function JB(n,r,s){var u=yr(n);if(s={lane:u,action:s,hasEagerState:!1,eagerState:null,next:null},nw(n))rw(r,s);else if(s=Ok(n,r,s,u),s!==null){var f=Rt();bn(s,n,u,f),ow(s,r,u)}}function eA(n,r,s){var u=yr(n),f={lane:u,action:s,hasEagerState:!1,eagerState:null,next:null};if(nw(n))rw(r,f);else{var p=n.alternate;if(n.lanes===0&&(p===null||p.lanes===0)&&(p=r.lastRenderedReducer,p!==null))try{var m=r.lastRenderedState,k=p(m,s);if(f.hasEagerState=!0,f.eagerState=k,pn(k,m)){var x=r.interleaved;x===null?(f.next=f,lh(r)):(f.next=x.next,x.next=f),r.interleaved=f;return}}catch(N){}finally{}s=Ok(n,r,f,u),s!==null&&(f=Rt(),bn(s,n,u,f),ow(s,r,u))}}function nw(n){var r=n.alternate;return n===Ze||r!==null&&r===Ze}function rw(n,r){Hi=Aa=!0;var s=n.pending;s===null?r.next=r:(r.next=s.next,s.next=r),n.pending=r}function ow(n,r,s){if((s&4194240)!==0){var u=r.lanes;u&=n.pendingLanes,s|=u,r.lanes=s,xf(n,s)}}var Na={readContext:on,useCallback:Ct,useContext:Ct,useEffect:Ct,useImperativeHandle:Ct,useInsertionEffect:Ct,useLayoutEffect:Ct,useMemo:Ct,useReducer:Ct,useRef:Ct,useState:Ct,useDebugValue:Ct,useDeferredValue:Ct,useTransition:Ct,useMutableSource:Ct,useSyncExternalStore:Ct,useId:Ct,unstable_isNewReconciler:!1},tA={readContext:on,useCallback:function(n,r){return In().memoizedState=[n,r===void 0?null:r],n},useContext:on,useEffect:$k,useImperativeHandle:function(n,r,s){return s=s!=null?s.concat([n]):null,Ia(4194308,4,Yk.bind(null,r,n),s)},useLayoutEffect:function(n,r){return Ia(4194308,4,n,r)},useInsertionEffect:function(n,r){return Ia(4,2,n,r)},useMemo:function(n,r){var s=In();return r=r===void 0?null:r,n=n(),s.memoizedState=[n,r],n},useReducer:function(n,r,s){var u=In();return r=s!==void 0?s(r):r,u.memoizedState=u.baseState=r,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:r},u.queue=n,n=n.dispatch=JB.bind(null,Ze,n),[u.memoizedState,n]},useRef:function(n){var r=In();return n={current:n},r.memoizedState=n},useState:Kk,useDebugValue:wh,useDeferredValue:function(n){return In().memoizedState=n},useTransition:function(){var n=Kk(!1),r=n[0];return n=ZB.bind(null,n[1]),In().memoizedState=n,[r,n]},useMutableSource:function(){},useSyncExternalStore:function(n,r,s){var u=Ze,f=In();if(Xe){if(s===void 0)throw Error(t(407));s=s()}else{if(s=r(),mt===null)throw Error(t(349));(Wr&30)!==0||Hk(u,r,s)}f.memoizedState=s;var p={value:s,getSnapshot:r};return f.queue=p,$k(qk.bind(null,u,p,n),[n]),u.flags|=2048,Ui(9,jk.bind(null,u,p,s,r),void 0,null),s},useId:function(){var n=In(),r=mt.identifierPrefix;if(Xe){var s=Un,u=qn;s=(u&~(1<<32-hn(u)-1)).toString(32)+s,r=":"+r+"R"+s,s=ji++,0<s&&(r+="H"+s.toString(32)),r+=":"}else s=QB++,r=":"+r+"r"+s.toString(32)+":";return n.memoizedState=r},unstable_isNewReconciler:!1},nA={readContext:on,useCallback:Zk,useContext:on,useEffect:kh,useImperativeHandle:Qk,useInsertionEffect:Gk,useLayoutEffect:Xk,useMemo:Jk,useReducer:yh,useRef:Vk,useState:function(){return yh(qi)},useDebugValue:wh,useDeferredValue:function(n){var r=sn();return ew(r,dt.memoizedState,n)},useTransition:function(){var n=yh(qi)[0],r=sn().memoizedState;return[n,r]},useMutableSource:Fk,useSyncExternalStore:zk,useId:tw,unstable_isNewReconciler:!1},rA={readContext:on,useCallback:Zk,useContext:on,useEffect:kh,useImperativeHandle:Qk,useInsertionEffect:Gk,useLayoutEffect:Xk,useMemo:Jk,useReducer:bh,useRef:Vk,useState:function(){return bh(qi)},useDebugValue:wh,useDeferredValue:function(n){var r=sn();return dt===null?r.memoizedState=n:ew(r,dt.memoizedState,n)},useTransition:function(){var n=bh(qi)[0],r=sn().memoizedState;return[n,r]},useMutableSource:Fk,useSyncExternalStore:zk,useId:tw,unstable_isNewReconciler:!1};function mn(n,r){if(n&&n.defaultProps){r=G({},r),n=n.defaultProps;for(var s in n)r[s]===void 0&&(r[s]=n[s]);return r}return r}function Th(n,r,s,u){r=n.memoizedState,s=s(u,r),s=s==null?r:G({},r,s),n.memoizedState=s,n.lanes===0&&(n.updateQueue.baseState=s)}var Ra={isMounted:function(n){return(n=n._reactInternals)?Mr(n)===n:!1},enqueueSetState:function(n,r,s){n=n._reactInternals;var u=Rt(),f=yr(n),p=Kn(u,f);p.payload=r,s!=null&&(p.callback=s),r=pr(n,p,f),r!==null&&(bn(r,n,f,u),Ea(r,n,f))},enqueueReplaceState:function(n,r,s){n=n._reactInternals;var u=Rt(),f=yr(n),p=Kn(u,f);p.tag=1,p.payload=r,s!=null&&(p.callback=s),r=pr(n,p,f),r!==null&&(bn(r,n,f,u),Ea(r,n,f))},enqueueForceUpdate:function(n,r){n=n._reactInternals;var s=Rt(),u=yr(n),f=Kn(s,u);f.tag=2,r!=null&&(f.callback=r),r=pr(n,f,u),r!==null&&(bn(r,n,u,s),Ea(r,n,u))}};function iw(n,r,s,u,f,p,m){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(u,p,m):r.prototype&&r.prototype.isPureReactComponent?!Ii(s,u)||!Ii(f,p):!0}function sw(n,r,s){var u=!1,f=dr,p=r.contextType;return typeof p=="object"&&p!==null?p=on(p):(f=Ft(r)?zr:St.current,u=r.contextTypes,p=(u=u!=null)?So(n,f):dr),r=new r(s,p),n.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=Ra,n.stateNode=r,r._reactInternals=n,u&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=f,n.__reactInternalMemoizedMaskedChildContext=p),r}function aw(n,r,s,u){n=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(s,u),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(s,u),r.state!==n&&Ra.enqueueReplaceState(r,r.state,null)}function xh(n,r,s,u){var f=n.stateNode;f.props=s,f.state=n.memoizedState,f.refs={},ch(n);var p=r.contextType;typeof p=="object"&&p!==null?f.context=on(p):(p=Ft(r)?zr:St.current,f.context=So(n,p)),f.state=n.memoizedState,p=r.getDerivedStateFromProps,typeof p=="function"&&(Th(n,r,p,s),f.state=n.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(r=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),r!==f.state&&Ra.enqueueReplaceState(f,f.state,null),Sa(n,s,f,u),f.state=n.memoizedState),typeof f.componentDidMount=="function"&&(n.flags|=4194308)}function Oo(n,r){try{var s="",u=r;do s+=Ee(u),u=u.return;while(u);var f=s}catch(p){f=`
|
|
16
|
+
Error generating stack: `+p.message+`
|
|
17
|
+
`+p.stack}return{value:n,source:r,stack:f,digest:null}}function Eh(n,r,s){return{value:n,source:null,stack:s!=null?s:null,digest:r!=null?r:null}}function Sh(n,r){try{console.error(r.value)}catch(s){setTimeout(function(){throw s})}}var oA=typeof WeakMap=="function"?WeakMap:Map;function lw(n,r,s){s=Kn(-1,s),s.tag=3,s.payload={element:null};var u=r.value;return s.callback=function(){za||(za=!0,Hh=u),Sh(n,r)},s}function cw(n,r,s){s=Kn(-1,s),s.tag=3;var u=n.type.getDerivedStateFromError;if(typeof u=="function"){var f=r.value;s.payload=function(){return u(f)},s.callback=function(){Sh(n,r)}}var p=n.stateNode;return p!==null&&typeof p.componentDidCatch=="function"&&(s.callback=function(){Sh(n,r),typeof u!="function"&&(mr===null?mr=new Set([this]):mr.add(this));var m=r.stack;this.componentDidCatch(r.value,{componentStack:m!==null?m:""})}),s}function uw(n,r,s){var u=n.pingCache;if(u===null){u=n.pingCache=new oA;var f=new Set;u.set(r,f)}else f=u.get(r),f===void 0&&(f=new Set,u.set(r,f));f.has(s)||(f.add(s),n=yA.bind(null,n,r,s),r.then(n,n))}function dw(n){do{var r;if((r=n.tag===13)&&(r=n.memoizedState,r=r!==null?r.dehydrated!==null:!0),r)return n;n=n.return}while(n!==null);return null}function fw(n,r,s,u,f){return(n.mode&1)===0?(n===r?n.flags|=65536:(n.flags|=128,s.flags|=131072,s.flags&=-52805,s.tag===1&&(s.alternate===null?s.tag=17:(r=Kn(-1,1),r.tag=2,pr(s,r,1))),s.lanes|=1),n):(n.flags|=65536,n.lanes=f,n)}var iA=H.ReactCurrentOwner,zt=!1;function Nt(n,r,s,u){r.child=n===null?Rk(r,null,s,u):Io(r,n.child,s,u)}function hw(n,r,s,u,f){s=s.render;var p=r.ref;return No(r,f),u=mh(n,r,s,u,p,f),s=vh(),n!==null&&!zt?(r.updateQueue=n.updateQueue,r.flags&=-2053,n.lanes&=~f,Vn(n,r,f)):(Xe&&s&&Jf(r),r.flags|=1,Nt(n,r,u,f),r.child)}function pw(n,r,s,u,f){if(n===null){var p=s.type;return typeof p=="function"&&!$h(p)&&p.defaultProps===void 0&&s.compare===null&&s.defaultProps===void 0?(r.tag=15,r.type=p,gw(n,r,p,u,f)):(n=Ka(s.type,null,u,r,r.mode,f),n.ref=r.ref,n.return=r,r.child=n)}if(p=n.child,(n.lanes&f)===0){var m=p.memoizedProps;if(s=s.compare,s=s!==null?s:Ii,s(m,u)&&n.ref===r.ref)return Vn(n,r,f)}return r.flags|=1,n=kr(p,u),n.ref=r.ref,n.return=r,r.child=n}function gw(n,r,s,u,f){if(n!==null){var p=n.memoizedProps;if(Ii(p,u)&&n.ref===r.ref)if(zt=!1,r.pendingProps=u=p,(n.lanes&f)!==0)(n.flags&131072)!==0&&(zt=!0);else return r.lanes=n.lanes,Vn(n,r,f)}return Ch(n,r,s,u,f)}function mw(n,r,s){var u=r.pendingProps,f=u.children,p=n!==null?n.memoizedState:null;if(u.mode==="hidden")if((r.mode&1)===0)r.memoizedState={baseLanes:0,cachePool:null,transitions:null},We(Do,Gt),Gt|=s;else{if((s&1073741824)===0)return n=p!==null?p.baseLanes|s:s,r.lanes=r.childLanes=1073741824,r.memoizedState={baseLanes:n,cachePool:null,transitions:null},r.updateQueue=null,We(Do,Gt),Gt|=n,null;r.memoizedState={baseLanes:0,cachePool:null,transitions:null},u=p!==null?p.baseLanes:s,We(Do,Gt),Gt|=u}else p!==null?(u=p.baseLanes|s,r.memoizedState=null):u=s,We(Do,Gt),Gt|=u;return Nt(n,r,f,s),r.child}function vw(n,r){var s=r.ref;(n===null&&s!==null||n!==null&&n.ref!==s)&&(r.flags|=512,r.flags|=2097152)}function Ch(n,r,s,u,f){var p=Ft(s)?zr:St.current;return p=So(r,p),No(r,f),s=mh(n,r,s,u,p,f),u=vh(),n!==null&&!zt?(r.updateQueue=n.updateQueue,r.flags&=-2053,n.lanes&=~f,Vn(n,r,f)):(Xe&&u&&Jf(r),r.flags|=1,Nt(n,r,s,f),r.child)}function yw(n,r,s,u,f){if(Ft(s)){var p=!0;ma(r)}else p=!1;if(No(r,f),r.stateNode===null)La(n,r),sw(r,s,u),xh(r,s,u,f),u=!0;else if(n===null){var m=r.stateNode,k=r.memoizedProps;m.props=k;var x=m.context,N=s.contextType;typeof N=="object"&&N!==null?N=on(N):(N=Ft(s)?zr:St.current,N=So(r,N));var z=s.getDerivedStateFromProps,j=typeof z=="function"||typeof m.getSnapshotBeforeUpdate=="function";j||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(k!==u||x!==N)&&aw(r,m,u,N),hr=!1;var M=r.memoizedState;m.state=M,Sa(r,u,m,f),x=r.memoizedState,k!==u||M!==x||Mt.current||hr?(typeof z=="function"&&(Th(r,s,z,u),x=r.memoizedState),(k=hr||iw(r,s,k,u,M,x,N))?(j||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(r.flags|=4194308)):(typeof m.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=u,r.memoizedState=x),m.props=u,m.state=x,m.context=N,u=k):(typeof m.componentDidMount=="function"&&(r.flags|=4194308),u=!1)}else{m=r.stateNode,Lk(n,r),k=r.memoizedProps,N=r.type===r.elementType?k:mn(r.type,k),m.props=N,j=r.pendingProps,M=m.context,x=s.contextType,typeof x=="object"&&x!==null?x=on(x):(x=Ft(s)?zr:St.current,x=So(r,x));var $=s.getDerivedStateFromProps;(z=typeof $=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(k!==j||M!==x)&&aw(r,m,u,x),hr=!1,M=r.memoizedState,m.state=M,Sa(r,u,m,f);var te=r.memoizedState;k!==j||M!==te||Mt.current||hr?(typeof $=="function"&&(Th(r,s,$,u),te=r.memoizedState),(N=hr||iw(r,s,N,u,M,te,x)||!1)?(z||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(u,te,x),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(u,te,x)),typeof m.componentDidUpdate=="function"&&(r.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof m.componentDidUpdate!="function"||k===n.memoizedProps&&M===n.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||k===n.memoizedProps&&M===n.memoizedState||(r.flags|=1024),r.memoizedProps=u,r.memoizedState=te),m.props=u,m.state=te,m.context=x,u=N):(typeof m.componentDidUpdate!="function"||k===n.memoizedProps&&M===n.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||k===n.memoizedProps&&M===n.memoizedState||(r.flags|=1024),u=!1)}return Bh(n,r,s,u,p,f)}function Bh(n,r,s,u,f,p){vw(n,r);var m=(r.flags&128)!==0;if(!u&&!m)return f&&xk(r,s,!1),Vn(n,r,p);u=r.stateNode,iA.current=r;var k=m&&typeof s.getDerivedStateFromError!="function"?null:u.render();return r.flags|=1,n!==null&&m?(r.child=Io(r,n.child,null,p),r.child=Io(r,null,k,p)):Nt(n,r,k,p),r.memoizedState=u.state,f&&xk(r,s,!0),r.child}function bw(n){var r=n.stateNode;r.pendingContext?wk(n,r.pendingContext,r.pendingContext!==r.context):r.context&&wk(n,r.context,!1),uh(n,r.containerInfo)}function kw(n,r,s,u,f){return Ao(),rh(f),r.flags|=256,Nt(n,r,s,u),r.child}var Ah={dehydrated:null,treeContext:null,retryLane:0};function Ih(n){return{baseLanes:n,cachePool:null,transitions:null}}function ww(n,r,s){var u=r.pendingProps,f=Qe.current,p=!1,m=(r.flags&128)!==0,k;if((k=m)||(k=n!==null&&n.memoizedState===null?!1:(f&2)!==0),k?(p=!0,r.flags&=-129):(n===null||n.memoizedState!==null)&&(f|=1),We(Qe,f&1),n===null)return nh(r),n=r.memoizedState,n!==null&&(n=n.dehydrated,n!==null)?((r.mode&1)===0?r.lanes=1:n.data==="$!"?r.lanes=8:r.lanes=1073741824,null):(m=u.children,n=u.fallback,p?(u=r.mode,p=r.child,m={mode:"hidden",children:m},(u&1)===0&&p!==null?(p.childLanes=0,p.pendingProps=m):p=Va(m,u,0,null),n=Xr(n,u,s,null),p.return=r,n.return=r,p.sibling=n,r.child=p,r.child.memoizedState=Ih(s),r.memoizedState=Ah,n):_h(r,m));if(f=n.memoizedState,f!==null&&(k=f.dehydrated,k!==null))return sA(n,r,m,u,k,f,s);if(p){p=u.fallback,m=r.mode,f=n.child,k=f.sibling;var x={mode:"hidden",children:u.children};return(m&1)===0&&r.child!==f?(u=r.child,u.childLanes=0,u.pendingProps=x,r.deletions=null):(u=kr(f,x),u.subtreeFlags=f.subtreeFlags&14680064),k!==null?p=kr(k,p):(p=Xr(p,m,s,null),p.flags|=2),p.return=r,u.return=r,u.sibling=p,r.child=u,u=p,p=r.child,m=n.child.memoizedState,m=m===null?Ih(s):{baseLanes:m.baseLanes|s,cachePool:null,transitions:m.transitions},p.memoizedState=m,p.childLanes=n.childLanes&~s,r.memoizedState=Ah,u}return p=n.child,n=p.sibling,u=kr(p,{mode:"visible",children:u.children}),(r.mode&1)===0&&(u.lanes=s),u.return=r,u.sibling=null,n!==null&&(s=r.deletions,s===null?(r.deletions=[n],r.flags|=16):s.push(n)),r.child=u,r.memoizedState=null,u}function _h(n,r){return r=Va({mode:"visible",children:r},n.mode,0,null),r.return=n,n.child=r}function Oa(n,r,s,u){return u!==null&&rh(u),Io(r,n.child,null,s),n=_h(r,r.pendingProps.children),n.flags|=2,r.memoizedState=null,n}function sA(n,r,s,u,f,p,m){if(s)return r.flags&256?(r.flags&=-257,u=Eh(Error(t(422))),Oa(n,r,m,u)):r.memoizedState!==null?(r.child=n.child,r.flags|=128,null):(p=u.fallback,f=r.mode,u=Va({mode:"visible",children:u.children},f,0,null),p=Xr(p,f,m,null),p.flags|=2,u.return=r,p.return=r,u.sibling=p,r.child=u,(r.mode&1)!==0&&Io(r,n.child,null,m),r.child.memoizedState=Ih(m),r.memoizedState=Ah,p);if((r.mode&1)===0)return Oa(n,r,m,null);if(f.data==="$!"){if(u=f.nextSibling&&f.nextSibling.dataset,u)var k=u.dgst;return u=k,p=Error(t(419)),u=Eh(p,u,void 0),Oa(n,r,m,u)}if(k=(m&n.childLanes)!==0,zt||k){if(u=mt,u!==null){switch(m&-m){case 4:f=2;break;case 16:f=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:f=32;break;case 536870912:f=268435456;break;default:f=0}f=(f&(u.suspendedLanes|m))!==0?0:f,f!==0&&f!==p.retryLane&&(p.retryLane=f,Wn(n,f),bn(u,n,f,-1))}return Vh(),u=Eh(Error(t(421))),Oa(n,r,m,u)}return f.data==="$?"?(r.flags|=128,r.child=n.child,r=bA.bind(null,n),f._reactRetry=r,null):(n=p.treeContext,$t=cr(f.nextSibling),Vt=r,Xe=!0,gn=null,n!==null&&(nn[rn++]=qn,nn[rn++]=Un,nn[rn++]=Hr,qn=n.id,Un=n.overflow,Hr=r),r=_h(r,u.children),r.flags|=4096,r)}function Tw(n,r,s){n.lanes|=r;var u=n.alternate;u!==null&&(u.lanes|=r),ah(n.return,r,s)}function Nh(n,r,s,u,f){var p=n.memoizedState;p===null?n.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:u,tail:s,tailMode:f}:(p.isBackwards=r,p.rendering=null,p.renderingStartTime=0,p.last=u,p.tail=s,p.tailMode=f)}function xw(n,r,s){var u=r.pendingProps,f=u.revealOrder,p=u.tail;if(Nt(n,r,u.children,s),u=Qe.current,(u&2)!==0)u=u&1|2,r.flags|=128;else{if(n!==null&&(n.flags&128)!==0)e:for(n=r.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Tw(n,s,r);else if(n.tag===19)Tw(n,s,r);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===r)break e;for(;n.sibling===null;){if(n.return===null||n.return===r)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}u&=1}if(We(Qe,u),(r.mode&1)===0)r.memoizedState=null;else switch(f){case"forwards":for(s=r.child,f=null;s!==null;)n=s.alternate,n!==null&&Ca(n)===null&&(f=s),s=s.sibling;s=f,s===null?(f=r.child,r.child=null):(f=s.sibling,s.sibling=null),Nh(r,!1,f,s,p);break;case"backwards":for(s=null,f=r.child,r.child=null;f!==null;){if(n=f.alternate,n!==null&&Ca(n)===null){r.child=f;break}n=f.sibling,f.sibling=s,s=f,f=n}Nh(r,!0,s,null,p);break;case"together":Nh(r,!1,null,null,void 0);break;default:r.memoizedState=null}return r.child}function La(n,r){(r.mode&1)===0&&n!==null&&(n.alternate=null,r.alternate=null,r.flags|=2)}function Vn(n,r,s){if(n!==null&&(r.dependencies=n.dependencies),Kr|=r.lanes,(s&r.childLanes)===0)return null;if(n!==null&&r.child!==n.child)throw Error(t(153));if(r.child!==null){for(n=r.child,s=kr(n,n.pendingProps),r.child=s,s.return=r;n.sibling!==null;)n=n.sibling,s=s.sibling=kr(n,n.pendingProps),s.return=r;s.sibling=null}return r.child}function aA(n,r,s){switch(r.tag){case 3:bw(r),Ao();break;case 5:Mk(r);break;case 1:Ft(r.type)&&ma(r);break;case 4:uh(r,r.stateNode.containerInfo);break;case 10:var u=r.type._context,f=r.memoizedProps.value;We(Ta,u._currentValue),u._currentValue=f;break;case 13:if(u=r.memoizedState,u!==null)return u.dehydrated!==null?(We(Qe,Qe.current&1),r.flags|=128,null):(s&r.child.childLanes)!==0?ww(n,r,s):(We(Qe,Qe.current&1),n=Vn(n,r,s),n!==null?n.sibling:null);We(Qe,Qe.current&1);break;case 19:if(u=(s&r.childLanes)!==0,(n.flags&128)!==0){if(u)return xw(n,r,s);r.flags|=128}if(f=r.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),We(Qe,Qe.current),u)break;return null;case 22:case 23:return r.lanes=0,mw(n,r,s)}return Vn(n,r,s)}var Ew,Rh,Sw,Cw;Ew=function(n,r){for(var s=r.child;s!==null;){if(s.tag===5||s.tag===6)n.appendChild(s.stateNode);else if(s.tag!==4&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return;s=s.return}s.sibling.return=s.return,s=s.sibling}},Rh=function(){},Sw=function(n,r,s,u){var f=n.memoizedProps;if(f!==u){n=r.stateNode,Ur(An.current);var p=null;switch(s){case"input":f=af(n,f),u=af(n,u),p=[];break;case"select":f=G({},f,{value:void 0}),u=G({},u,{value:void 0}),p=[];break;case"textarea":f=uf(n,f),u=uf(n,u),p=[];break;default:typeof f.onClick!="function"&&typeof u.onClick=="function"&&(n.onclick=ha)}ff(s,u);var m;s=null;for(N in f)if(!u.hasOwnProperty(N)&&f.hasOwnProperty(N)&&f[N]!=null)if(N==="style"){var k=f[N];for(m in k)k.hasOwnProperty(m)&&(s||(s={}),s[m]="")}else N!=="dangerouslySetInnerHTML"&&N!=="children"&&N!=="suppressContentEditableWarning"&&N!=="suppressHydrationWarning"&&N!=="autoFocus"&&(i.hasOwnProperty(N)?p||(p=[]):(p=p||[]).push(N,null));for(N in u){var x=u[N];if(k=f!=null?f[N]:void 0,u.hasOwnProperty(N)&&x!==k&&(x!=null||k!=null))if(N==="style")if(k){for(m in k)!k.hasOwnProperty(m)||x&&x.hasOwnProperty(m)||(s||(s={}),s[m]="");for(m in x)x.hasOwnProperty(m)&&k[m]!==x[m]&&(s||(s={}),s[m]=x[m])}else s||(p||(p=[]),p.push(N,s)),s=x;else N==="dangerouslySetInnerHTML"?(x=x?x.__html:void 0,k=k?k.__html:void 0,x!=null&&k!==x&&(p=p||[]).push(N,x)):N==="children"?typeof x!="string"&&typeof x!="number"||(p=p||[]).push(N,""+x):N!=="suppressContentEditableWarning"&&N!=="suppressHydrationWarning"&&(i.hasOwnProperty(N)?(x!=null&&N==="onScroll"&&Ke("scroll",n),p||k===x||(p=[])):(p=p||[]).push(N,x))}s&&(p=p||[]).push("style",s);var N=p;(r.updateQueue=N)&&(r.flags|=4)}},Cw=function(n,r,s,u){s!==u&&(r.flags|=4)};function Wi(n,r){if(!Xe)switch(n.tailMode){case"hidden":r=n.tail;for(var s=null;r!==null;)r.alternate!==null&&(s=r),r=r.sibling;s===null?n.tail=null:s.sibling=null;break;case"collapsed":s=n.tail;for(var u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?r||n.tail===null?n.tail=null:n.tail.sibling=null:u.sibling=null}}function Bt(n){var r=n.alternate!==null&&n.alternate.child===n.child,s=0,u=0;if(r)for(var f=n.child;f!==null;)s|=f.lanes|f.childLanes,u|=f.subtreeFlags&14680064,u|=f.flags&14680064,f.return=n,f=f.sibling;else for(f=n.child;f!==null;)s|=f.lanes|f.childLanes,u|=f.subtreeFlags,u|=f.flags,f.return=n,f=f.sibling;return n.subtreeFlags|=u,n.childLanes=s,r}function lA(n,r,s){var u=r.pendingProps;switch(eh(r),r.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Bt(r),null;case 1:return Ft(r.type)&&ga(),Bt(r),null;case 3:return u=r.stateNode,Ro(),Ve(Mt),Ve(St),hh(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(n===null||n.child===null)&&(ka(r)?r.flags|=4:n===null||n.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,gn!==null&&(Uh(gn),gn=null))),Rh(n,r),Bt(r),null;case 5:dh(r);var f=Ur(zi.current);if(s=r.type,n!==null&&r.stateNode!=null)Sw(n,r,s,u,f),n.ref!==r.ref&&(r.flags|=512,r.flags|=2097152);else{if(!u){if(r.stateNode===null)throw Error(t(166));return Bt(r),null}if(n=Ur(An.current),ka(r)){u=r.stateNode,s=r.type;var p=r.memoizedProps;switch(u[Bn]=r,u[Li]=p,n=(r.mode&1)!==0,s){case"dialog":Ke("cancel",u),Ke("close",u);break;case"iframe":case"object":case"embed":Ke("load",u);break;case"video":case"audio":for(f=0;f<Ni.length;f++)Ke(Ni[f],u);break;case"source":Ke("error",u);break;case"img":case"image":case"link":Ke("error",u),Ke("load",u);break;case"details":Ke("toggle",u);break;case"input":sb(u,p),Ke("invalid",u);break;case"select":u._wrapperState={wasMultiple:!!p.multiple},Ke("invalid",u);break;case"textarea":cb(u,p),Ke("invalid",u)}ff(s,p),f=null;for(var m in p)if(p.hasOwnProperty(m)){var k=p[m];m==="children"?typeof k=="string"?u.textContent!==k&&(p.suppressHydrationWarning!==!0&&fa(u.textContent,k,n),f=["children",k]):typeof k=="number"&&u.textContent!==""+k&&(p.suppressHydrationWarning!==!0&&fa(u.textContent,k,n),f=["children",""+k]):i.hasOwnProperty(m)&&k!=null&&m==="onScroll"&&Ke("scroll",u)}switch(s){case"input":nr(u),lb(u,p,!0);break;case"textarea":nr(u),db(u);break;case"select":case"option":break;default:typeof p.onClick=="function"&&(u.onclick=ha)}u=f,r.updateQueue=u,u!==null&&(r.flags|=4)}else{m=f.nodeType===9?f:f.ownerDocument,n==="http://www.w3.org/1999/xhtml"&&(n=fb(s)),n==="http://www.w3.org/1999/xhtml"?s==="script"?(n=m.createElement("div"),n.innerHTML="<script><\/script>",n=n.removeChild(n.firstChild)):typeof u.is=="string"?n=m.createElement(s,{is:u.is}):(n=m.createElement(s),s==="select"&&(m=n,u.multiple?m.multiple=!0:u.size&&(m.size=u.size))):n=m.createElementNS(n,s),n[Bn]=r,n[Li]=u,Ew(n,r,!1,!1),r.stateNode=n;e:{switch(m=hf(s,u),s){case"dialog":Ke("cancel",n),Ke("close",n),f=u;break;case"iframe":case"object":case"embed":Ke("load",n),f=u;break;case"video":case"audio":for(f=0;f<Ni.length;f++)Ke(Ni[f],n);f=u;break;case"source":Ke("error",n),f=u;break;case"img":case"image":case"link":Ke("error",n),Ke("load",n),f=u;break;case"details":Ke("toggle",n),f=u;break;case"input":sb(n,u),f=af(n,u),Ke("invalid",n);break;case"option":f=u;break;case"select":n._wrapperState={wasMultiple:!!u.multiple},f=G({},u,{value:void 0}),Ke("invalid",n);break;case"textarea":cb(n,u),f=uf(n,u),Ke("invalid",n);break;default:f=u}ff(s,f),k=f;for(p in k)if(k.hasOwnProperty(p)){var x=k[p];p==="style"?gb(n,x):p==="dangerouslySetInnerHTML"?(x=x?x.__html:void 0,x!=null&&hb(n,x)):p==="children"?typeof x=="string"?(s!=="textarea"||x!=="")&&fi(n,x):typeof x=="number"&&fi(n,""+x):p!=="suppressContentEditableWarning"&&p!=="suppressHydrationWarning"&&p!=="autoFocus"&&(i.hasOwnProperty(p)?x!=null&&p==="onScroll"&&Ke("scroll",n):x!=null&&U(n,p,x,m))}switch(s){case"input":nr(n),lb(n,u,!1);break;case"textarea":nr(n),db(n);break;case"option":u.value!=null&&n.setAttribute("value",""+Pe(u.value));break;case"select":n.multiple=!!u.multiple,p=u.value,p!=null?ho(n,!!u.multiple,p,!1):u.defaultValue!=null&&ho(n,!!u.multiple,u.defaultValue,!0);break;default:typeof f.onClick=="function"&&(n.onclick=ha)}switch(s){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}}u&&(r.flags|=4)}r.ref!==null&&(r.flags|=512,r.flags|=2097152)}return Bt(r),null;case 6:if(n&&r.stateNode!=null)Cw(n,r,n.memoizedProps,u);else{if(typeof u!="string"&&r.stateNode===null)throw Error(t(166));if(s=Ur(zi.current),Ur(An.current),ka(r)){if(u=r.stateNode,s=r.memoizedProps,u[Bn]=r,(p=u.nodeValue!==s)&&(n=Vt,n!==null))switch(n.tag){case 3:fa(u.nodeValue,s,(n.mode&1)!==0);break;case 5:n.memoizedProps.suppressHydrationWarning!==!0&&fa(u.nodeValue,s,(n.mode&1)!==0)}p&&(r.flags|=4)}else u=(s.nodeType===9?s:s.ownerDocument).createTextNode(u),u[Bn]=r,r.stateNode=u}return Bt(r),null;case 13:if(Ve(Qe),u=r.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(Xe&&$t!==null&&(r.mode&1)!==0&&(r.flags&128)===0)Ik(),Ao(),r.flags|=98560,p=!1;else if(p=ka(r),u!==null&&u.dehydrated!==null){if(n===null){if(!p)throw Error(t(318));if(p=r.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(t(317));p[Bn]=r}else Ao(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Bt(r),p=!1}else gn!==null&&(Uh(gn),gn=null),p=!0;if(!p)return r.flags&65536?r:null}return(r.flags&128)!==0?(r.lanes=s,r):(u=u!==null,u!==(n!==null&&n.memoizedState!==null)&&u&&(r.child.flags|=8192,(r.mode&1)!==0&&(n===null||(Qe.current&1)!==0?ft===0&&(ft=3):Vh())),r.updateQueue!==null&&(r.flags|=4),Bt(r),null);case 4:return Ro(),Rh(n,r),n===null&&Ri(r.stateNode.containerInfo),Bt(r),null;case 10:return sh(r.type._context),Bt(r),null;case 17:return Ft(r.type)&&ga(),Bt(r),null;case 19:if(Ve(Qe),p=r.memoizedState,p===null)return Bt(r),null;if(u=(r.flags&128)!==0,m=p.rendering,m===null)if(u)Wi(p,!1);else{if(ft!==0||n!==null&&(n.flags&128)!==0)for(n=r.child;n!==null;){if(m=Ca(n),m!==null){for(r.flags|=128,Wi(p,!1),u=m.updateQueue,u!==null&&(r.updateQueue=u,r.flags|=4),r.subtreeFlags=0,u=s,s=r.child;s!==null;)p=s,n=u,p.flags&=14680066,m=p.alternate,m===null?(p.childLanes=0,p.lanes=n,p.child=null,p.subtreeFlags=0,p.memoizedProps=null,p.memoizedState=null,p.updateQueue=null,p.dependencies=null,p.stateNode=null):(p.childLanes=m.childLanes,p.lanes=m.lanes,p.child=m.child,p.subtreeFlags=0,p.deletions=null,p.memoizedProps=m.memoizedProps,p.memoizedState=m.memoizedState,p.updateQueue=m.updateQueue,p.type=m.type,n=m.dependencies,p.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),s=s.sibling;return We(Qe,Qe.current&1|2),r.child}n=n.sibling}p.tail!==null&&nt()>Po&&(r.flags|=128,u=!0,Wi(p,!1),r.lanes=4194304)}else{if(!u)if(n=Ca(m),n!==null){if(r.flags|=128,u=!0,s=n.updateQueue,s!==null&&(r.updateQueue=s,r.flags|=4),Wi(p,!0),p.tail===null&&p.tailMode==="hidden"&&!m.alternate&&!Xe)return Bt(r),null}else 2*nt()-p.renderingStartTime>Po&&s!==1073741824&&(r.flags|=128,u=!0,Wi(p,!1),r.lanes=4194304);p.isBackwards?(m.sibling=r.child,r.child=m):(s=p.last,s!==null?s.sibling=m:r.child=m,p.last=m)}return p.tail!==null?(r=p.tail,p.rendering=r,p.tail=r.sibling,p.renderingStartTime=nt(),r.sibling=null,s=Qe.current,We(Qe,u?s&1|2:s&1),r):(Bt(r),null);case 22:case 23:return Kh(),u=r.memoizedState!==null,n!==null&&n.memoizedState!==null!==u&&(r.flags|=8192),u&&(r.mode&1)!==0?(Gt&1073741824)!==0&&(Bt(r),r.subtreeFlags&6&&(r.flags|=8192)):Bt(r),null;case 24:return null;case 25:return null}throw Error(t(156,r.tag))}function cA(n,r){switch(eh(r),r.tag){case 1:return Ft(r.type)&&ga(),n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 3:return Ro(),Ve(Mt),Ve(St),hh(),n=r.flags,(n&65536)!==0&&(n&128)===0?(r.flags=n&-65537|128,r):null;case 5:return dh(r),null;case 13:if(Ve(Qe),n=r.memoizedState,n!==null&&n.dehydrated!==null){if(r.alternate===null)throw Error(t(340));Ao()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 19:return Ve(Qe),null;case 4:return Ro(),null;case 10:return sh(r.type._context),null;case 22:case 23:return Kh(),null;case 24:return null;default:return null}}var Da=!1,At=!1,uA=typeof WeakSet=="function"?WeakSet:Set,Y=null;function Lo(n,r){var s=n.ref;if(s!==null)if(typeof s=="function")try{s(null)}catch(u){et(n,r,u)}else s.current=null}function Oh(n,r,s){try{s()}catch(u){et(n,r,u)}}var Bw=!1;function dA(n,r){if(Kf=ta,n=ik(),Mf(n)){if("selectionStart"in n)var s={start:n.selectionStart,end:n.selectionEnd};else e:{s=(s=n.ownerDocument)&&s.defaultView||window;var u=s.getSelection&&s.getSelection();if(u&&u.rangeCount!==0){s=u.anchorNode;var f=u.anchorOffset,p=u.focusNode;u=u.focusOffset;try{s.nodeType,p.nodeType}catch(K){s=null;break e}var m=0,k=-1,x=-1,N=0,z=0,j=n,M=null;t:for(;;){for(var $;j!==s||f!==0&&j.nodeType!==3||(k=m+f),j!==p||u!==0&&j.nodeType!==3||(x=m+u),j.nodeType===3&&(m+=j.nodeValue.length),($=j.firstChild)!==null;)M=j,j=$;for(;;){if(j===n)break t;if(M===s&&++N===f&&(k=m),M===p&&++z===u&&(x=m),($=j.nextSibling)!==null)break;j=M,M=j.parentNode}j=$}s=k===-1||x===-1?null:{start:k,end:x}}else s=null}s=s||{start:0,end:0}}else s=null;for(Vf={focusedElem:n,selectionRange:s},ta=!1,Y=r;Y!==null;)if(r=Y,n=r.child,(r.subtreeFlags&1028)!==0&&n!==null)n.return=r,Y=n;else for(;Y!==null;){r=Y;try{var te=r.alternate;if((r.flags&1024)!==0)switch(r.tag){case 0:case 11:case 15:break;case 1:if(te!==null){var re=te.memoizedProps,rt=te.memoizedState,I=r.stateNode,C=I.getSnapshotBeforeUpdate(r.elementType===r.type?re:mn(r.type,re),rt);I.__reactInternalSnapshotBeforeUpdate=C}break;case 3:var _=r.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(t(163))}}catch(K){et(r,r.return,K)}if(n=r.sibling,n!==null){n.return=r.return,Y=n;break}Y=r.return}return te=Bw,Bw=!1,te}function Ki(n,r,s){var u=r.updateQueue;if(u=u!==null?u.lastEffect:null,u!==null){var f=u=u.next;do{if((f.tag&n)===n){var p=f.destroy;f.destroy=void 0,p!==void 0&&Oh(r,s,p)}f=f.next}while(f!==u)}}function Pa(n,r){if(r=r.updateQueue,r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&n)===n){var u=s.create;s.destroy=u()}s=s.next}while(s!==r)}}function Lh(n){var r=n.ref;if(r!==null){var s=n.stateNode;switch(n.tag){case 5:n=s;break;default:n=s}typeof r=="function"?r(n):r.current=n}}function Aw(n){var r=n.alternate;r!==null&&(n.alternate=null,Aw(r)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(r=n.stateNode,r!==null&&(delete r[Bn],delete r[Li],delete r[Yf],delete r[$B],delete r[GB])),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}function Iw(n){return n.tag===5||n.tag===3||n.tag===4}function _w(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Iw(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Dh(n,r,s){var u=n.tag;if(u===5||u===6)n=n.stateNode,r?s.nodeType===8?s.parentNode.insertBefore(n,r):s.insertBefore(n,r):(s.nodeType===8?(r=s.parentNode,r.insertBefore(n,s)):(r=s,r.appendChild(n)),s=s._reactRootContainer,s!=null||r.onclick!==null||(r.onclick=ha));else if(u!==4&&(n=n.child,n!==null))for(Dh(n,r,s),n=n.sibling;n!==null;)Dh(n,r,s),n=n.sibling}function Ph(n,r,s){var u=n.tag;if(u===5||u===6)n=n.stateNode,r?s.insertBefore(n,r):s.appendChild(n);else if(u!==4&&(n=n.child,n!==null))for(Ph(n,r,s),n=n.sibling;n!==null;)Ph(n,r,s),n=n.sibling}var kt=null,vn=!1;function gr(n,r,s){for(s=s.child;s!==null;)Nw(n,r,s),s=s.sibling}function Nw(n,r,s){if(Cn&&typeof Cn.onCommitFiberUnmount=="function")try{Cn.onCommitFiberUnmount(Xs,s)}catch(k){}switch(s.tag){case 5:At||Lo(s,r);case 6:var u=kt,f=vn;kt=null,gr(n,r,s),kt=u,vn=f,kt!==null&&(vn?(n=kt,s=s.stateNode,n.nodeType===8?n.parentNode.removeChild(s):n.removeChild(s)):kt.removeChild(s.stateNode));break;case 18:kt!==null&&(vn?(n=kt,s=s.stateNode,n.nodeType===8?Xf(n.parentNode,s):n.nodeType===1&&Xf(n,s),xi(n)):Xf(kt,s.stateNode));break;case 4:u=kt,f=vn,kt=s.stateNode.containerInfo,vn=!0,gr(n,r,s),kt=u,vn=f;break;case 0:case 11:case 14:case 15:if(!At&&(u=s.updateQueue,u!==null&&(u=u.lastEffect,u!==null))){f=u=u.next;do{var p=f,m=p.destroy;p=p.tag,m!==void 0&&((p&2)!==0||(p&4)!==0)&&Oh(s,r,m),f=f.next}while(f!==u)}gr(n,r,s);break;case 1:if(!At&&(Lo(s,r),u=s.stateNode,typeof u.componentWillUnmount=="function"))try{u.props=s.memoizedProps,u.state=s.memoizedState,u.componentWillUnmount()}catch(k){et(s,r,k)}gr(n,r,s);break;case 21:gr(n,r,s);break;case 22:s.mode&1?(At=(u=At)||s.memoizedState!==null,gr(n,r,s),At=u):gr(n,r,s);break;default:gr(n,r,s)}}function Rw(n){var r=n.updateQueue;if(r!==null){n.updateQueue=null;var s=n.stateNode;s===null&&(s=n.stateNode=new uA),r.forEach(function(u){var f=kA.bind(null,n,u);s.has(u)||(s.add(u),u.then(f,f))})}}function yn(n,r){var s=r.deletions;if(s!==null)for(var u=0;u<s.length;u++){var f=s[u];try{var p=n,m=r,k=m;e:for(;k!==null;){switch(k.tag){case 5:kt=k.stateNode,vn=!1;break e;case 3:kt=k.stateNode.containerInfo,vn=!0;break e;case 4:kt=k.stateNode.containerInfo,vn=!0;break e}k=k.return}if(kt===null)throw Error(t(160));Nw(p,m,f),kt=null,vn=!1;var x=f.alternate;x!==null&&(x.return=null),f.return=null}catch(N){et(f,r,N)}}if(r.subtreeFlags&12854)for(r=r.child;r!==null;)Ow(r,n),r=r.sibling}function Ow(n,r){var s=n.alternate,u=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:if(yn(r,n),_n(n),u&4){try{Ki(3,n,n.return),Pa(3,n)}catch(re){et(n,n.return,re)}try{Ki(5,n,n.return)}catch(re){et(n,n.return,re)}}break;case 1:yn(r,n),_n(n),u&512&&s!==null&&Lo(s,s.return);break;case 5:if(yn(r,n),_n(n),u&512&&s!==null&&Lo(s,s.return),n.flags&32){var f=n.stateNode;try{fi(f,"")}catch(re){et(n,n.return,re)}}if(u&4&&(f=n.stateNode,f!=null)){var p=n.memoizedProps,m=s!==null?s.memoizedProps:p,k=n.type,x=n.updateQueue;if(n.updateQueue=null,x!==null)try{k==="input"&&p.type==="radio"&&p.name!=null&&ab(f,p),hf(k,m);var N=hf(k,p);for(m=0;m<x.length;m+=2){var z=x[m],j=x[m+1];z==="style"?gb(f,j):z==="dangerouslySetInnerHTML"?hb(f,j):z==="children"?fi(f,j):U(f,z,j,N)}switch(k){case"input":lf(f,p);break;case"textarea":ub(f,p);break;case"select":var M=f._wrapperState.wasMultiple;f._wrapperState.wasMultiple=!!p.multiple;var $=p.value;$!=null?ho(f,!!p.multiple,$,!1):M!==!!p.multiple&&(p.defaultValue!=null?ho(f,!!p.multiple,p.defaultValue,!0):ho(f,!!p.multiple,p.multiple?[]:"",!1))}f[Li]=p}catch(re){et(n,n.return,re)}}break;case 6:if(yn(r,n),_n(n),u&4){if(n.stateNode===null)throw Error(t(162));f=n.stateNode,p=n.memoizedProps;try{f.nodeValue=p}catch(re){et(n,n.return,re)}}break;case 3:if(yn(r,n),_n(n),u&4&&s!==null&&s.memoizedState.isDehydrated)try{xi(r.containerInfo)}catch(re){et(n,n.return,re)}break;case 4:yn(r,n),_n(n);break;case 13:yn(r,n),_n(n),f=n.child,f.flags&8192&&(p=f.memoizedState!==null,f.stateNode.isHidden=p,!p||f.alternate!==null&&f.alternate.memoizedState!==null||(zh=nt())),u&4&&Rw(n);break;case 22:if(z=s!==null&&s.memoizedState!==null,n.mode&1?(At=(N=At)||z,yn(r,n),At=N):yn(r,n),_n(n),u&8192){if(N=n.memoizedState!==null,(n.stateNode.isHidden=N)&&!z&&(n.mode&1)!==0)for(Y=n,z=n.child;z!==null;){for(j=Y=z;Y!==null;){switch(M=Y,$=M.child,M.tag){case 0:case 11:case 14:case 15:Ki(4,M,M.return);break;case 1:Lo(M,M.return);var te=M.stateNode;if(typeof te.componentWillUnmount=="function"){u=M,s=M.return;try{r=u,te.props=r.memoizedProps,te.state=r.memoizedState,te.componentWillUnmount()}catch(re){et(u,s,re)}}break;case 5:Lo(M,M.return);break;case 22:if(M.memoizedState!==null){Pw(j);continue}}$!==null?($.return=M,Y=$):Pw(j)}z=z.sibling}e:for(z=null,j=n;;){if(j.tag===5){if(z===null){z=j;try{f=j.stateNode,N?(p=f.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none"):(k=j.stateNode,x=j.memoizedProps.style,m=x!=null&&x.hasOwnProperty("display")?x.display:null,k.style.display=pb("display",m))}catch(re){et(n,n.return,re)}}}else if(j.tag===6){if(z===null)try{j.stateNode.nodeValue=N?"":j.memoizedProps}catch(re){et(n,n.return,re)}}else if((j.tag!==22&&j.tag!==23||j.memoizedState===null||j===n)&&j.child!==null){j.child.return=j,j=j.child;continue}if(j===n)break e;for(;j.sibling===null;){if(j.return===null||j.return===n)break e;z===j&&(z=null),j=j.return}z===j&&(z=null),j.sibling.return=j.return,j=j.sibling}}break;case 19:yn(r,n),_n(n),u&4&&Rw(n);break;case 21:break;default:yn(r,n),_n(n)}}function _n(n){var r=n.flags;if(r&2){try{e:{for(var s=n.return;s!==null;){if(Iw(s)){var u=s;break e}s=s.return}throw Error(t(160))}switch(u.tag){case 5:var f=u.stateNode;u.flags&32&&(fi(f,""),u.flags&=-33);var p=_w(n);Ph(n,p,f);break;case 3:case 4:var m=u.stateNode.containerInfo,k=_w(n);Dh(n,k,m);break;default:throw Error(t(161))}}catch(x){et(n,n.return,x)}n.flags&=-3}r&4096&&(n.flags&=-4097)}function fA(n,r,s){Y=n,Lw(n)}function Lw(n,r,s){for(var u=(n.mode&1)!==0;Y!==null;){var f=Y,p=f.child;if(f.tag===22&&u){var m=f.memoizedState!==null||Da;if(!m){var k=f.alternate,x=k!==null&&k.memoizedState!==null||At;k=Da;var N=At;if(Da=m,(At=x)&&!N)for(Y=f;Y!==null;)m=Y,x=m.child,m.tag===22&&m.memoizedState!==null?Mw(f):x!==null?(x.return=m,Y=x):Mw(f);for(;p!==null;)Y=p,Lw(p),p=p.sibling;Y=f,Da=k,At=N}Dw(n)}else(f.subtreeFlags&8772)!==0&&p!==null?(p.return=f,Y=p):Dw(n)}}function Dw(n){for(;Y!==null;){var r=Y;if((r.flags&8772)!==0){var s=r.alternate;try{if((r.flags&8772)!==0)switch(r.tag){case 0:case 11:case 15:At||Pa(5,r);break;case 1:var u=r.stateNode;if(r.flags&4&&!At)if(s===null)u.componentDidMount();else{var f=r.elementType===r.type?s.memoizedProps:mn(r.type,s.memoizedProps);u.componentDidUpdate(f,s.memoizedState,u.__reactInternalSnapshotBeforeUpdate)}var p=r.updateQueue;p!==null&&Pk(r,p,u);break;case 3:var m=r.updateQueue;if(m!==null){if(s=null,r.child!==null)switch(r.child.tag){case 5:s=r.child.stateNode;break;case 1:s=r.child.stateNode}Pk(r,m,s)}break;case 5:var k=r.stateNode;if(s===null&&r.flags&4){s=k;var x=r.memoizedProps;switch(r.type){case"button":case"input":case"select":case"textarea":x.autoFocus&&s.focus();break;case"img":x.src&&(s.src=x.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(r.memoizedState===null){var N=r.alternate;if(N!==null){var z=N.memoizedState;if(z!==null){var j=z.dehydrated;j!==null&&xi(j)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(t(163))}At||r.flags&512&&Lh(r)}catch(M){et(r,r.return,M)}}if(r===n){Y=null;break}if(s=r.sibling,s!==null){s.return=r.return,Y=s;break}Y=r.return}}function Pw(n){for(;Y!==null;){var r=Y;if(r===n){Y=null;break}var s=r.sibling;if(s!==null){s.return=r.return,Y=s;break}Y=r.return}}function Mw(n){for(;Y!==null;){var r=Y;try{switch(r.tag){case 0:case 11:case 15:var s=r.return;try{Pa(4,r)}catch(x){et(r,s,x)}break;case 1:var u=r.stateNode;if(typeof u.componentDidMount=="function"){var f=r.return;try{u.componentDidMount()}catch(x){et(r,f,x)}}var p=r.return;try{Lh(r)}catch(x){et(r,p,x)}break;case 5:var m=r.return;try{Lh(r)}catch(x){et(r,m,x)}}}catch(x){et(r,r.return,x)}if(r===n){Y=null;break}var k=r.sibling;if(k!==null){k.return=r.return,Y=k;break}Y=r.return}}var hA=Math.ceil,Ma=H.ReactCurrentDispatcher,Mh=H.ReactCurrentOwner,an=H.ReactCurrentBatchConfig,Le=0,mt=null,ct=null,wt=0,Gt=0,Do=ur(0),ft=0,Vi=null,Kr=0,Fa=0,Fh=0,$i=null,Ht=null,zh=0,Po=1/0,$n=null,za=!1,Hh=null,mr=null,Ha=!1,vr=null,ja=0,Gi=0,jh=null,qa=-1,Ua=0;function Rt(){return(Le&6)!==0?nt():qa!==-1?qa:qa=nt()}function yr(n){return(n.mode&1)===0?1:(Le&2)!==0&&wt!==0?wt&-wt:YB.transition!==null?(Ua===0&&(Ua=_b()),Ua):(n=He,n!==0||(n=window.event,n=n===void 0?16:zb(n.type)),n)}function bn(n,r,s,u){if(50<Gi)throw Gi=0,jh=null,Error(t(185));yi(n,s,u),((Le&2)===0||n!==mt)&&(n===mt&&((Le&2)===0&&(Fa|=s),ft===4&&br(n,wt)),jt(n,u),s===1&&Le===0&&(r.mode&1)===0&&(Po=nt()+500,va&&fr()))}function jt(n,r){var s=n.callbackNode;YC(n,r);var u=Zs(n,n===mt?wt:0);if(u===0)s!==null&&Bb(s),n.callbackNode=null,n.callbackPriority=0;else if(r=u&-u,n.callbackPriority!==r){if(s!=null&&Bb(s),r===1)n.tag===0?XB(zw.bind(null,n)):Ek(zw.bind(null,n)),KB(function(){(Le&6)===0&&fr()}),s=null;else{switch(Nb(u)){case 1:s=kf;break;case 4:s=Ab;break;case 16:s=Gs;break;case 536870912:s=Ib;break;default:s=Gs}s=$w(s,Fw.bind(null,n))}n.callbackPriority=r,n.callbackNode=s}}function Fw(n,r){if(qa=-1,Ua=0,(Le&6)!==0)throw Error(t(327));var s=n.callbackNode;if(Mo()&&n.callbackNode!==s)return null;var u=Zs(n,n===mt?wt:0);if(u===0)return null;if((u&30)!==0||(u&n.expiredLanes)!==0||r)r=Wa(n,u);else{r=u;var f=Le;Le|=2;var p=jw();(mt!==n||wt!==r)&&($n=null,Po=nt()+500,$r(n,r));do try{mA();break}catch(k){Hw(n,k)}while(!0);ih(),Ma.current=p,Le=f,ct!==null?r=0:(mt=null,wt=0,r=ft)}if(r!==0){if(r===2&&(f=wf(n),f!==0&&(u=f,r=qh(n,f))),r===1)throw s=Vi,$r(n,0),br(n,u),jt(n,nt()),s;if(r===6)br(n,u);else{if(f=n.current.alternate,(u&30)===0&&!pA(f)&&(r=Wa(n,u),r===2&&(p=wf(n),p!==0&&(u=p,r=qh(n,p))),r===1))throw s=Vi,$r(n,0),br(n,u),jt(n,nt()),s;switch(n.finishedWork=f,n.finishedLanes=u,r){case 0:case 1:throw Error(t(345));case 2:Gr(n,Ht,$n);break;case 3:if(br(n,u),(u&130023424)===u&&(r=zh+500-nt(),10<r)){if(Zs(n,0)!==0)break;if(f=n.suspendedLanes,(f&u)!==u){Rt(),n.pingedLanes|=n.suspendedLanes&f;break}n.timeoutHandle=Gf(Gr.bind(null,n,Ht,$n),r);break}Gr(n,Ht,$n);break;case 4:if(br(n,u),(u&4194240)===u)break;for(r=n.eventTimes,f=-1;0<u;){var m=31-hn(u);p=1<<m,m=r[m],m>f&&(f=m),u&=~p}if(u=f,u=nt()-u,u=(120>u?120:480>u?480:1080>u?1080:1920>u?1920:3e3>u?3e3:4320>u?4320:1960*hA(u/1960))-u,10<u){n.timeoutHandle=Gf(Gr.bind(null,n,Ht,$n),u);break}Gr(n,Ht,$n);break;case 5:Gr(n,Ht,$n);break;default:throw Error(t(329))}}}return jt(n,nt()),n.callbackNode===s?Fw.bind(null,n):null}function qh(n,r){var s=$i;return n.current.memoizedState.isDehydrated&&($r(n,r).flags|=256),n=Wa(n,r),n!==2&&(r=Ht,Ht=s,r!==null&&Uh(r)),n}function Uh(n){Ht===null?Ht=n:Ht.push.apply(Ht,n)}function pA(n){for(var r=n;;){if(r.flags&16384){var s=r.updateQueue;if(s!==null&&(s=s.stores,s!==null))for(var u=0;u<s.length;u++){var f=s[u],p=f.getSnapshot;f=f.value;try{if(!pn(p(),f))return!1}catch(m){return!1}}}if(s=r.child,r.subtreeFlags&16384&&s!==null)s.return=r,r=s;else{if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function br(n,r){for(r&=~Fh,r&=~Fa,n.suspendedLanes|=r,n.pingedLanes&=~r,n=n.expirationTimes;0<r;){var s=31-hn(r),u=1<<s;n[s]=-1,r&=~u}}function zw(n){if((Le&6)!==0)throw Error(t(327));Mo();var r=Zs(n,0);if((r&1)===0)return jt(n,nt()),null;var s=Wa(n,r);if(n.tag!==0&&s===2){var u=wf(n);u!==0&&(r=u,s=qh(n,u))}if(s===1)throw s=Vi,$r(n,0),br(n,r),jt(n,nt()),s;if(s===6)throw Error(t(345));return n.finishedWork=n.current.alternate,n.finishedLanes=r,Gr(n,Ht,$n),jt(n,nt()),null}function Wh(n,r){var s=Le;Le|=1;try{return n(r)}finally{Le=s,Le===0&&(Po=nt()+500,va&&fr())}}function Vr(n){vr!==null&&vr.tag===0&&(Le&6)===0&&Mo();var r=Le;Le|=1;var s=an.transition,u=He;try{if(an.transition=null,He=1,n)return n()}finally{He=u,an.transition=s,Le=r,(Le&6)===0&&fr()}}function Kh(){Gt=Do.current,Ve(Do)}function $r(n,r){n.finishedWork=null,n.finishedLanes=0;var s=n.timeoutHandle;if(s!==-1&&(n.timeoutHandle=-1,WB(s)),ct!==null)for(s=ct.return;s!==null;){var u=s;switch(eh(u),u.tag){case 1:u=u.type.childContextTypes,u!=null&&ga();break;case 3:Ro(),Ve(Mt),Ve(St),hh();break;case 5:dh(u);break;case 4:Ro();break;case 13:Ve(Qe);break;case 19:Ve(Qe);break;case 10:sh(u.type._context);break;case 22:case 23:Kh()}s=s.return}if(mt=n,ct=n=kr(n.current,null),wt=Gt=r,ft=0,Vi=null,Fh=Fa=Kr=0,Ht=$i=null,qr!==null){for(r=0;r<qr.length;r++)if(s=qr[r],u=s.interleaved,u!==null){s.interleaved=null;var f=u.next,p=s.pending;if(p!==null){var m=p.next;p.next=f,u.next=m}s.pending=u}qr=null}return n}function Hw(n,r){do{var s=ct;try{if(ih(),Ba.current=Na,Aa){for(var u=Ze.memoizedState;u!==null;){var f=u.queue;f!==null&&(f.pending=null),u=u.next}Aa=!1}if(Wr=0,gt=dt=Ze=null,Hi=!1,ji=0,Mh.current=null,s===null||s.return===null){ft=1,Vi=r,ct=null;break}e:{var p=n,m=s.return,k=s,x=r;if(r=wt,k.flags|=32768,x!==null&&typeof x=="object"&&typeof x.then=="function"){var N=x,z=k,j=z.tag;if((z.mode&1)===0&&(j===0||j===11||j===15)){var M=z.alternate;M?(z.updateQueue=M.updateQueue,z.memoizedState=M.memoizedState,z.lanes=M.lanes):(z.updateQueue=null,z.memoizedState=null)}var $=dw(m);if($!==null){$.flags&=-257,fw($,m,k,p,r),$.mode&1&&uw(p,N,r),r=$,x=N;var te=r.updateQueue;if(te===null){var re=new Set;re.add(x),r.updateQueue=re}else te.add(x);break e}else{if((r&1)===0){uw(p,N,r),Vh();break e}x=Error(t(426))}}else if(Xe&&k.mode&1){var rt=dw(m);if(rt!==null){(rt.flags&65536)===0&&(rt.flags|=256),fw(rt,m,k,p,r),rh(Oo(x,k));break e}}p=x=Oo(x,k),ft!==4&&(ft=2),$i===null?$i=[p]:$i.push(p),p=m;do{switch(p.tag){case 3:p.flags|=65536,r&=-r,p.lanes|=r;var I=lw(p,x,r);Dk(p,I);break e;case 1:k=x;var C=p.type,_=p.stateNode;if((p.flags&128)===0&&(typeof C.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(mr===null||!mr.has(_)))){p.flags|=65536,r&=-r,p.lanes|=r;var K=cw(p,k,r);Dk(p,K);break e}}p=p.return}while(p!==null)}Uw(s)}catch(oe){r=oe,ct===s&&s!==null&&(ct=s=s.return);continue}break}while(!0)}function jw(){var n=Ma.current;return Ma.current=Na,n===null?Na:n}function Vh(){(ft===0||ft===3||ft===2)&&(ft=4),mt===null||(Kr&268435455)===0&&(Fa&268435455)===0||br(mt,wt)}function Wa(n,r){var s=Le;Le|=2;var u=jw();(mt!==n||wt!==r)&&($n=null,$r(n,r));do try{gA();break}catch(f){Hw(n,f)}while(!0);if(ih(),Le=s,Ma.current=u,ct!==null)throw Error(t(261));return mt=null,wt=0,ft}function gA(){for(;ct!==null;)qw(ct)}function mA(){for(;ct!==null&&!jC();)qw(ct)}function qw(n){var r=Vw(n.alternate,n,Gt);n.memoizedProps=n.pendingProps,r===null?Uw(n):ct=r,Mh.current=null}function Uw(n){var r=n;do{var s=r.alternate;if(n=r.return,(r.flags&32768)===0){if(s=lA(s,r,Gt),s!==null){ct=s;return}}else{if(s=cA(s,r),s!==null){s.flags&=32767,ct=s;return}if(n!==null)n.flags|=32768,n.subtreeFlags=0,n.deletions=null;else{ft=6,ct=null;return}}if(r=r.sibling,r!==null){ct=r;return}ct=r=n}while(r!==null);ft===0&&(ft=5)}function Gr(n,r,s){var u=He,f=an.transition;try{an.transition=null,He=1,vA(n,r,s,u)}finally{an.transition=f,He=u}return null}function vA(n,r,s,u){do Mo();while(vr!==null);if((Le&6)!==0)throw Error(t(327));s=n.finishedWork;var f=n.finishedLanes;if(s===null)return null;if(n.finishedWork=null,n.finishedLanes=0,s===n.current)throw Error(t(177));n.callbackNode=null,n.callbackPriority=0;var p=s.lanes|s.childLanes;if(QC(n,p),n===mt&&(ct=mt=null,wt=0),(s.subtreeFlags&2064)===0&&(s.flags&2064)===0||Ha||(Ha=!0,$w(Gs,function(){return Mo(),null})),p=(s.flags&15990)!==0,(s.subtreeFlags&15990)!==0||p){p=an.transition,an.transition=null;var m=He;He=1;var k=Le;Le|=4,Mh.current=null,dA(n,s),Ow(s,n),MB(Vf),ta=!!Kf,Vf=Kf=null,n.current=s,fA(s),qC(),Le=k,He=m,an.transition=p}else n.current=s;if(Ha&&(Ha=!1,vr=n,ja=f),p=n.pendingLanes,p===0&&(mr=null),KC(s.stateNode),jt(n,nt()),r!==null)for(u=n.onRecoverableError,s=0;s<r.length;s++)f=r[s],u(f.value,{componentStack:f.stack,digest:f.digest});if(za)throw za=!1,n=Hh,Hh=null,n;return(ja&1)!==0&&n.tag!==0&&Mo(),p=n.pendingLanes,(p&1)!==0?n===jh?Gi++:(Gi=0,jh=n):Gi=0,fr(),null}function Mo(){if(vr!==null){var n=Nb(ja),r=an.transition,s=He;try{if(an.transition=null,He=16>n?16:n,vr===null)var u=!1;else{if(n=vr,vr=null,ja=0,(Le&6)!==0)throw Error(t(331));var f=Le;for(Le|=4,Y=n.current;Y!==null;){var p=Y,m=p.child;if((Y.flags&16)!==0){var k=p.deletions;if(k!==null){for(var x=0;x<k.length;x++){var N=k[x];for(Y=N;Y!==null;){var z=Y;switch(z.tag){case 0:case 11:case 15:Ki(8,z,p)}var j=z.child;if(j!==null)j.return=z,Y=j;else for(;Y!==null;){z=Y;var M=z.sibling,$=z.return;if(Aw(z),z===N){Y=null;break}if(M!==null){M.return=$,Y=M;break}Y=$}}}var te=p.alternate;if(te!==null){var re=te.child;if(re!==null){te.child=null;do{var rt=re.sibling;re.sibling=null,re=rt}while(re!==null)}}Y=p}}if((p.subtreeFlags&2064)!==0&&m!==null)m.return=p,Y=m;else e:for(;Y!==null;){if(p=Y,(p.flags&2048)!==0)switch(p.tag){case 0:case 11:case 15:Ki(9,p,p.return)}var I=p.sibling;if(I!==null){I.return=p.return,Y=I;break e}Y=p.return}}var C=n.current;for(Y=C;Y!==null;){m=Y;var _=m.child;if((m.subtreeFlags&2064)!==0&&_!==null)_.return=m,Y=_;else e:for(m=C;Y!==null;){if(k=Y,(k.flags&2048)!==0)try{switch(k.tag){case 0:case 11:case 15:Pa(9,k)}}catch(oe){et(k,k.return,oe)}if(k===m){Y=null;break e}var K=k.sibling;if(K!==null){K.return=k.return,Y=K;break e}Y=k.return}}if(Le=f,fr(),Cn&&typeof Cn.onPostCommitFiberRoot=="function")try{Cn.onPostCommitFiberRoot(Xs,n)}catch(oe){}u=!0}return u}finally{He=s,an.transition=r}}return!1}function Ww(n,r,s){r=Oo(s,r),r=lw(n,r,1),n=pr(n,r,1),r=Rt(),n!==null&&(yi(n,1,r),jt(n,r))}function et(n,r,s){if(n.tag===3)Ww(n,n,s);else for(;r!==null;){if(r.tag===3){Ww(r,n,s);break}else if(r.tag===1){var u=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(mr===null||!mr.has(u))){n=Oo(s,n),n=cw(r,n,1),r=pr(r,n,1),n=Rt(),r!==null&&(yi(r,1,n),jt(r,n));break}}r=r.return}}function yA(n,r,s){var u=n.pingCache;u!==null&&u.delete(r),r=Rt(),n.pingedLanes|=n.suspendedLanes&s,mt===n&&(wt&s)===s&&(ft===4||ft===3&&(wt&130023424)===wt&&500>nt()-zh?$r(n,0):Fh|=s),jt(n,r)}function Kw(n,r){r===0&&((n.mode&1)===0?r=1:(r=Qs,Qs<<=1,(Qs&130023424)===0&&(Qs=4194304)));var s=Rt();n=Wn(n,r),n!==null&&(yi(n,r,s),jt(n,s))}function bA(n){var r=n.memoizedState,s=0;r!==null&&(s=r.retryLane),Kw(n,s)}function kA(n,r){var s=0;switch(n.tag){case 13:var u=n.stateNode,f=n.memoizedState;f!==null&&(s=f.retryLane);break;case 19:u=n.stateNode;break;default:throw Error(t(314))}u!==null&&u.delete(r),Kw(n,s)}var Vw;Vw=function(n,r,s){if(n!==null)if(n.memoizedProps!==r.pendingProps||Mt.current)zt=!0;else{if((n.lanes&s)===0&&(r.flags&128)===0)return zt=!1,aA(n,r,s);zt=(n.flags&131072)!==0}else zt=!1,Xe&&(r.flags&1048576)!==0&&Sk(r,ba,r.index);switch(r.lanes=0,r.tag){case 2:var u=r.type;La(n,r),n=r.pendingProps;var f=So(r,St.current);No(r,s),f=mh(null,r,u,n,f,s);var p=vh();return r.flags|=1,typeof f=="object"&&f!==null&&typeof f.render=="function"&&f.$$typeof===void 0?(r.tag=1,r.memoizedState=null,r.updateQueue=null,Ft(u)?(p=!0,ma(r)):p=!1,r.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,ch(r),f.updater=Ra,r.stateNode=f,f._reactInternals=r,xh(r,u,n,s),r=Bh(null,r,u,!0,p,s)):(r.tag=0,Xe&&p&&Jf(r),Nt(null,r,f,s),r=r.child),r;case 16:u=r.elementType;e:{switch(La(n,r),n=r.pendingProps,f=u._init,u=f(u._payload),r.type=u,f=r.tag=TA(u),n=mn(u,n),f){case 0:r=Ch(null,r,u,n,s);break e;case 1:r=yw(null,r,u,n,s);break e;case 11:r=hw(null,r,u,n,s);break e;case 14:r=pw(null,r,u,mn(u.type,n),s);break e}throw Error(t(306,u,""))}return r;case 0:return u=r.type,f=r.pendingProps,f=r.elementType===u?f:mn(u,f),Ch(n,r,u,f,s);case 1:return u=r.type,f=r.pendingProps,f=r.elementType===u?f:mn(u,f),yw(n,r,u,f,s);case 3:e:{if(bw(r),n===null)throw Error(t(387));u=r.pendingProps,p=r.memoizedState,f=p.element,Lk(n,r),Sa(r,u,null,s);var m=r.memoizedState;if(u=m.element,p.isDehydrated)if(p={element:u,isDehydrated:!1,cache:m.cache,pendingSuspenseBoundaries:m.pendingSuspenseBoundaries,transitions:m.transitions},r.updateQueue.baseState=p,r.memoizedState=p,r.flags&256){f=Oo(Error(t(423)),r),r=kw(n,r,u,s,f);break e}else if(u!==f){f=Oo(Error(t(424)),r),r=kw(n,r,u,s,f);break e}else for($t=cr(r.stateNode.containerInfo.firstChild),Vt=r,Xe=!0,gn=null,s=Rk(r,null,u,s),r.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(Ao(),u===f){r=Vn(n,r,s);break e}Nt(n,r,u,s)}r=r.child}return r;case 5:return Mk(r),n===null&&nh(r),u=r.type,f=r.pendingProps,p=n!==null?n.memoizedProps:null,m=f.children,$f(u,f)?m=null:p!==null&&$f(u,p)&&(r.flags|=32),vw(n,r),Nt(n,r,m,s),r.child;case 6:return n===null&&nh(r),null;case 13:return ww(n,r,s);case 4:return uh(r,r.stateNode.containerInfo),u=r.pendingProps,n===null?r.child=Io(r,null,u,s):Nt(n,r,u,s),r.child;case 11:return u=r.type,f=r.pendingProps,f=r.elementType===u?f:mn(u,f),hw(n,r,u,f,s);case 7:return Nt(n,r,r.pendingProps,s),r.child;case 8:return Nt(n,r,r.pendingProps.children,s),r.child;case 12:return Nt(n,r,r.pendingProps.children,s),r.child;case 10:e:{if(u=r.type._context,f=r.pendingProps,p=r.memoizedProps,m=f.value,We(Ta,u._currentValue),u._currentValue=m,p!==null)if(pn(p.value,m)){if(p.children===f.children&&!Mt.current){r=Vn(n,r,s);break e}}else for(p=r.child,p!==null&&(p.return=r);p!==null;){var k=p.dependencies;if(k!==null){m=p.child;for(var x=k.firstContext;x!==null;){if(x.context===u){if(p.tag===1){x=Kn(-1,s&-s),x.tag=2;var N=p.updateQueue;if(N!==null){N=N.shared;var z=N.pending;z===null?x.next=x:(x.next=z.next,z.next=x),N.pending=x}}p.lanes|=s,x=p.alternate,x!==null&&(x.lanes|=s),ah(p.return,s,r),k.lanes|=s;break}x=x.next}}else if(p.tag===10)m=p.type===r.type?null:p.child;else if(p.tag===18){if(m=p.return,m===null)throw Error(t(341));m.lanes|=s,k=m.alternate,k!==null&&(k.lanes|=s),ah(m,s,r),m=p.sibling}else m=p.child;if(m!==null)m.return=p;else for(m=p;m!==null;){if(m===r){m=null;break}if(p=m.sibling,p!==null){p.return=m.return,m=p;break}m=m.return}p=m}Nt(n,r,f.children,s),r=r.child}return r;case 9:return f=r.type,u=r.pendingProps.children,No(r,s),f=on(f),u=u(f),r.flags|=1,Nt(n,r,u,s),r.child;case 14:return u=r.type,f=mn(u,r.pendingProps),f=mn(u.type,f),pw(n,r,u,f,s);case 15:return gw(n,r,r.type,r.pendingProps,s);case 17:return u=r.type,f=r.pendingProps,f=r.elementType===u?f:mn(u,f),La(n,r),r.tag=1,Ft(u)?(n=!0,ma(r)):n=!1,No(r,s),sw(r,u,f),xh(r,u,f,s),Bh(null,r,u,!0,n,s);case 19:return xw(n,r,s);case 22:return mw(n,r,s)}throw Error(t(156,r.tag))};function $w(n,r){return Cb(n,r)}function wA(n,r,s,u){this.tag=n,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ln(n,r,s,u){return new wA(n,r,s,u)}function $h(n){return n=n.prototype,!(!n||!n.isReactComponent)}function TA(n){if(typeof n=="function")return $h(n)?1:0;if(n!=null){if(n=n.$$typeof,n===ye)return 11;if(n===Re)return 14}return 2}function kr(n,r){var s=n.alternate;return s===null?(s=ln(n.tag,r,n.key,n.mode),s.elementType=n.elementType,s.type=n.type,s.stateNode=n.stateNode,s.alternate=n,n.alternate=s):(s.pendingProps=r,s.type=n.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=n.flags&14680064,s.childLanes=n.childLanes,s.lanes=n.lanes,s.child=n.child,s.memoizedProps=n.memoizedProps,s.memoizedState=n.memoizedState,s.updateQueue=n.updateQueue,r=n.dependencies,s.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},s.sibling=n.sibling,s.index=n.index,s.ref=n.ref,s}function Ka(n,r,s,u,f,p){var m=2;if(u=n,typeof n=="function")$h(n)&&(m=1);else if(typeof n=="string")m=5;else e:switch(n){case W:return Xr(s.children,f,p,r);case F:m=8,f|=8;break;case ne:return n=ln(12,s,r,f|2),n.elementType=ne,n.lanes=p,n;case Z:return n=ln(13,s,r,f),n.elementType=Z,n.lanes=p,n;case we:return n=ln(19,s,r,f),n.elementType=we,n.lanes=p,n;case _e:return Va(s,f,p,r);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case ce:m=10;break e;case Q:m=9;break e;case ye:m=11;break e;case Re:m=14;break e;case xe:m=16,u=null;break e}throw Error(t(130,n==null?n:typeof n,""))}return r=ln(m,s,r,f),r.elementType=n,r.type=u,r.lanes=p,r}function Xr(n,r,s,u){return n=ln(7,n,u,r),n.lanes=s,n}function Va(n,r,s,u){return n=ln(22,n,u,r),n.elementType=_e,n.lanes=s,n.stateNode={isHidden:!1},n}function Gh(n,r,s){return n=ln(6,n,null,r),n.lanes=s,n}function Xh(n,r,s){return r=ln(4,n.children!==null?n.children:[],n.key,r),r.lanes=s,r.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},r}function xA(n,r,s,u,f){this.tag=r,this.containerInfo=n,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Tf(0),this.expirationTimes=Tf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Tf(0),this.identifierPrefix=u,this.onRecoverableError=f,this.mutableSourceEagerHydrationData=null}function Yh(n,r,s,u,f,p,m,k,x){return n=new xA(n,r,s,k,x),r===1?(r=1,p===!0&&(r|=8)):r=0,p=ln(3,null,null,r),n.current=p,p.stateNode=n,p.memoizedState={element:u,isDehydrated:s,cache:null,transitions:null,pendingSuspenseBoundaries:null},ch(p),n}function EA(n,r,s){var u=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:q,key:u==null?null:""+u,children:n,containerInfo:r,implementation:s}}function Gw(n){if(!n)return dr;n=n._reactInternals;e:{if(Mr(n)!==n||n.tag!==1)throw Error(t(170));var r=n;do{switch(r.tag){case 3:r=r.stateNode.context;break e;case 1:if(Ft(r.type)){r=r.stateNode.__reactInternalMemoizedMergedChildContext;break e}}r=r.return}while(r!==null);throw Error(t(171))}if(n.tag===1){var s=n.type;if(Ft(s))return Tk(n,s,r)}return r}function Xw(n,r,s,u,f,p,m,k,x){return n=Yh(s,u,!0,n,f,p,m,k,x),n.context=Gw(null),s=n.current,u=Rt(),f=yr(s),p=Kn(u,f),p.callback=r!=null?r:null,pr(s,p,f),n.current.lanes=f,yi(n,f,u),jt(n,u),n}function $a(n,r,s,u){var f=r.current,p=Rt(),m=yr(f);return s=Gw(s),r.context===null?r.context=s:r.pendingContext=s,r=Kn(p,m),r.payload={element:n},u=u===void 0?null:u,u!==null&&(r.callback=u),n=pr(f,r,m),n!==null&&(bn(n,f,m,p),Ea(n,f,m)),m}function Ga(n){if(n=n.current,!n.child)return null;switch(n.child.tag){case 5:return n.child.stateNode;default:return n.child.stateNode}}function Yw(n,r){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var s=n.retryLane;n.retryLane=s!==0&&s<r?s:r}}function Qh(n,r){Yw(n,r),(n=n.alternate)&&Yw(n,r)}function SA(){return null}var Qw=typeof reportError=="function"?reportError:function(n){console.error(n)};function Zh(n){this._internalRoot=n}Xa.prototype.render=Zh.prototype.render=function(n){var r=this._internalRoot;if(r===null)throw Error(t(409));$a(n,r,null,null)},Xa.prototype.unmount=Zh.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var r=n.containerInfo;Vr(function(){$a(null,n,null,null)}),r[Hn]=null}};function Xa(n){this._internalRoot=n}Xa.prototype.unstable_scheduleHydration=function(n){if(n){var r=Lb();n={blockedOn:null,target:n,priority:r};for(var s=0;s<sr.length&&r!==0&&r<sr[s].priority;s++);sr.splice(s,0,n),s===0&&Mb(n)}};function Jh(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function Ya(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11&&(n.nodeType!==8||n.nodeValue!==" react-mount-point-unstable "))}function Zw(){}function CA(n,r,s,u,f){if(f){if(typeof u=="function"){var p=u;u=function(){var N=Ga(m);p.call(N)}}var m=Xw(r,u,n,0,null,!1,!1,"",Zw);return n._reactRootContainer=m,n[Hn]=m.current,Ri(n.nodeType===8?n.parentNode:n),Vr(),m}for(;f=n.lastChild;)n.removeChild(f);if(typeof u=="function"){var k=u;u=function(){var N=Ga(x);k.call(N)}}var x=Yh(n,0,!1,null,null,!1,!1,"",Zw);return n._reactRootContainer=x,n[Hn]=x.current,Ri(n.nodeType===8?n.parentNode:n),Vr(function(){$a(r,x,s,u)}),x}function Qa(n,r,s,u,f){var p=s._reactRootContainer;if(p){var m=p;if(typeof f=="function"){var k=f;f=function(){var x=Ga(m);k.call(x)}}$a(r,m,n,f)}else m=CA(s,r,n,f,u);return Ga(m)}Rb=function(n){switch(n.tag){case 3:var r=n.stateNode;if(r.current.memoizedState.isDehydrated){var s=vi(r.pendingLanes);s!==0&&(xf(r,s|1),jt(r,nt()),(Le&6)===0&&(Po=nt()+500,fr()))}break;case 13:Vr(function(){var u=Wn(n,1);if(u!==null){var f=Rt();bn(u,n,1,f)}}),Qh(n,1)}},Ef=function(n){if(n.tag===13){var r=Wn(n,134217728);if(r!==null){var s=Rt();bn(r,n,134217728,s)}Qh(n,134217728)}},Ob=function(n){if(n.tag===13){var r=yr(n),s=Wn(n,r);if(s!==null){var u=Rt();bn(s,n,r,u)}Qh(n,r)}},Lb=function(){return He},Db=function(n,r){var s=He;try{return He=n,r()}finally{He=s}},mf=function(n,r,s){switch(r){case"input":if(lf(n,s),r=s.name,s.type==="radio"&&r!=null){for(s=n;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll("input[name="+JSON.stringify(""+r)+'][type="radio"]'),r=0;r<s.length;r++){var u=s[r];if(u!==n&&u.form===n.form){var f=pa(u);if(!f)throw Error(t(90));Pr(u),lf(u,f)}}}break;case"textarea":ub(n,s);break;case"select":r=s.value,r!=null&&ho(n,!!s.multiple,r,!1)}},bb=Wh,kb=Vr;var BA={usingClientEntryPoint:!1,Events:[Di,xo,pa,vb,yb,Wh]},Xi={findFiberByHostInstance:Fr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},AA={bundleType:Xi.bundleType,version:Xi.version,rendererPackageName:Xi.rendererPackageName,rendererConfig:Xi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:H.ReactCurrentDispatcher,findHostInstanceByFiber:function(n){return n=Eb(n),n===null?null:n.stateNode},findFiberByHostInstance:Xi.findFiberByHostInstance||SA,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"){var Za=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Za.isDisabled&&Za.supportsFiber)try{Xs=Za.inject(AA),Cn=Za}catch(n){}}return Ot.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=BA,Ot.createPortal=function(n,r){var s=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Jh(r))throw Error(t(200));return EA(n,r,null,s)},Ot.createRoot=function(n,r){if(!Jh(n))throw Error(t(299));var s=!1,u="",f=Qw;return r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(u=r.identifierPrefix),r.onRecoverableError!==void 0&&(f=r.onRecoverableError)),r=Yh(n,1,!1,null,null,s,!1,u,f),n[Hn]=r.current,Ri(n.nodeType===8?n.parentNode:n),new Zh(r)},Ot.findDOMNode=function(n){if(n==null)return null;if(n.nodeType===1)return n;var r=n._reactInternals;if(r===void 0)throw typeof n.render=="function"?Error(t(188)):(n=Object.keys(n).join(","),Error(t(268,n)));return n=Eb(r),n=n===null?null:n.stateNode,n},Ot.flushSync=function(n){return Vr(n)},Ot.hydrate=function(n,r,s){if(!Ya(r))throw Error(t(200));return Qa(null,n,r,!0,s)},Ot.hydrateRoot=function(n,r,s){if(!Jh(n))throw Error(t(405));var u=s!=null&&s.hydratedSources||null,f=!1,p="",m=Qw;if(s!=null&&(s.unstable_strictMode===!0&&(f=!0),s.identifierPrefix!==void 0&&(p=s.identifierPrefix),s.onRecoverableError!==void 0&&(m=s.onRecoverableError)),r=Xw(r,null,n,1,s!=null?s:null,f,!1,p,m),n[Hn]=r.current,Ri(n),u)for(n=0;n<u.length;n++)s=u[n],f=s._getVersion,f=f(s._source),r.mutableSourceEagerHydrationData==null?r.mutableSourceEagerHydrationData=[s,f]:r.mutableSourceEagerHydrationData.push(s,f);return new Xa(r)},Ot.render=function(n,r,s){if(!Ya(r))throw Error(t(200));return Qa(null,n,r,!1,s)},Ot.unmountComponentAtNode=function(n){if(!Ya(n))throw Error(t(40));return n._reactRootContainer?(Vr(function(){Qa(null,null,n,!1,function(){n._reactRootContainer=null,n[Hn]=null})}),!0):!1},Ot.unstable_batchedUpdates=Wh,Ot.unstable_renderSubtreeIntoContainer=function(n,r,s,u){if(!Ya(s))throw Error(t(200));if(n==null||n._reactInternals===void 0)throw Error(t(38));return Qa(n,r,s,!1,u)},Ot.version="18.3.1-next-f1338f8080-20240426",Ot}var uy;function dy(){if(uy)return fd.exports;uy=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(e){console.error(e)}}return a(),fd.exports=UE(),fd.exports}var fy;function WE(){if(fy)return vs;fy=1;var a=dy();return vs.createRoot=a.createRoot,vs.hydrateRoot=a.hydrateRoot,vs}var KE=WE(),VE=dy();const Zo={root:"",alignedStart:"text-start",alignedCenter:"text-center",title:"",description:"opacity-60 mt-[3px]"};class $E{constructor(e){const t=e.alignment==="center"?"center":"start";this.nodes={root:R.make("div",[Zo.root,t==="center"?Zo.alignedCenter:Zo.alignedStart]),title:R.make("div",Zo.title,{textContent:e.title})},this.nodes.root.setAttribute("data-alignment",t),this.nodes.root.appendChild(this.nodes.title),e.description!==void 0&&(this.nodes.description=R.make("div",Zo.description,{textContent:e.description}),this.nodes.root.appendChild(this.nodes.description))}getElement(){return this.nodes.root}}class gd{constructor(e){this.params=e}get name(){if(this.params!==void 0&&"name"in this.params)return this.params.name}destroy(){Yo()}onChildrenOpen(){var e;this.params!==void 0&&"children"in this.params&&typeof((e=this.params.children)==null?void 0:e.onOpen)=="function"&&this.params.children.onOpen()}onChildrenClose(){var e;this.params!==void 0&&"children"in this.params&&typeof((e=this.params.children)==null?void 0:e.onClose)=="function"&&this.params.children.onClose()}handleClick(){var e,t;this.params!==void 0&&"onActivate"in this.params&&((t=(e=this.params).onActivate)==null||t.call(e,this.params))}addHint(e,t){const o=new $E(t);ms(e,o.getElement(),{placement:t.position,hidingDelay:100})}get children(){var e;return this.params!==void 0&&"children"in this.params&&((e=this.params.children)==null?void 0:e.items)!==void 0?this.params.children.items:[]}get hasChildren(){return this.children.length>0}get isChildrenOpen(){var e;return this.params!==void 0&&"children"in this.params&&((e=this.params.children)==null?void 0:e.isOpen)===!0}get isChevronHidden(){var e;return this.params!==void 0&&"children"in this.params&&((e=this.params.children)==null?void 0:e.hideChevron)===!0}get isChildrenFlippable(){var e;return!(this.params===void 0||!("children"in this.params)||((e=this.params.children)==null?void 0:e.isFlippable)===!1)}get isChildrenSearchable(){var e;return this.params!==void 0&&"children"in this.params&&((e=this.params.children)==null?void 0:e.searchable)===!0}get closeOnActivate(){return this.params!==void 0&&"closeOnActivate"in this.params&&this.params.closeOnActivate}get isActive(){return this.params===void 0||!("isActive"in this.params)?!1:typeof this.params.isActive=="function"?this.params.isActive():this.params.isActive===!0}}const xn={item:'flex items-center select-none border-none bg-transparent rounded-md p-[var(--item-padding)] text-text-primary mb-px can-hover:hover:cursor-pointer can-hover:hover:bg-item-hover-bg [&[data-blok-force-hover]]:cursor-pointer [&[data-blok-force-hover]]:bg-item-hover-bg [&[data-blok-focused="true"]]:bg-item-focus-bg [&[data-blok-popover-item-no-hover]]:hover:bg-transparent [&[data-blok-popover-item-no-hover]]:cursor-default',itemActive:"bg-icon-active-bg text-icon-active-text",itemDisabled:"cursor-default pointer-events-none text-text-secondary",icon:"flex items-center justify-center w-[26px] h-[26px] [&_svg]:w-icon [&_svg]:h-icon",focused:"is-focused"},hy={item:"rounded p-1"},py={item:"rounded-md p-[3px] mobile:p-1"},je={item:"data-blok-popover-item",icon:"data-blok-popover-item-icon",iconTool:"data-blok-tool",iconChevronRight:"data-blok-popover-item-icon-chevron-right",title:"data-blok-popover-item-title",secondaryTitle:"data-blok-popover-item-secondary-title",active:"data-blok-popover-item-active",hidden:"data-blok-hidden",confirmation:"data-blok-popover-item-confirmation",noHover:"data-blok-popover-item-no-hover",noFocus:"data-blok-popover-item-no-focus",focused:"data-blok-focused",wobble:"data-blok-popover-item-wobble",disabled:"data-blok-disabled"},GE=`
|
|
18
18
|
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
19
19
|
<path d="m4.5 15 11-11m0 11L4.5 4" stroke="currentColor" stroke-linecap="round"/>
|
|
20
20
|
</svg>
|
|
21
|
-
`,
|
|
21
|
+
`,XE=`
|
|
22
22
|
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
23
23
|
<path
|
|
24
24
|
d="M5.5 11h4.9231c.6528 0 1.2789-.3161 1.7405-.8787.4617-.56259.721-1.32565.721-2.1213 0-.79565-.2593-1.55871-.721-2.12132C11.702 5.31607 11.0759 5 10.4231 5H5.5v6Zm0 0h5.5385c.6528 0 1.2789.3161 1.7405.8787.4617.5626.721 1.3257.721 2.1213 0 .7956-.2593 1.5587-.721 2.1213-.4616.5626-1.0877.8787-1.7405.8787H5.5v-6Z"
|
|
@@ -28,7 +28,7 @@ Error generating stack: `+h.message+`
|
|
|
28
28
|
stroke-linejoin="round"
|
|
29
29
|
/>
|
|
30
30
|
</svg>
|
|
31
|
-
`,
|
|
31
|
+
`,YE=`
|
|
32
32
|
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
33
33
|
<path
|
|
34
34
|
d="M8.5 5h6m-10 12h6m1-12-4 12"
|
|
@@ -37,7 +37,7 @@ Error generating stack: `+h.message+`
|
|
|
37
37
|
stroke-linejoin="round"
|
|
38
38
|
/>
|
|
39
39
|
</svg>
|
|
40
|
-
`,
|
|
40
|
+
`,QE=`
|
|
41
41
|
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
42
42
|
<path
|
|
43
43
|
d="m9.98288 15.0959-.91628.9157c-.29867.3092-.65593.5559-1.05095.7255-.39502.1697-.81987.259-1.24978.2628-.4299.0037-.85625-.0782-1.25415-.241-.39791-.1628-.75941-.4032-1.06341-.7072-.304-.304-.54441-.6655-.70721-1.0634-.16279-.3979-.24471-.8243-.24098-1.2542.00374-.4299.09306-.8547.26274-1.2497.16969-.3951.41635-.7523.72558-1.051l.91499-.9163m8.24197.9156.9163-.9156c.6028-.60809.9402-1.43021.9383-2.28645-.0019-.85625-.3429-1.67688-.9483-2.28234-.6055-.60546-1.4261-.94643-2.2823-.9483-.8563-.00188-1.6784.3355-2.28652.9383l-.91628.91563M7.258 13.2413l4.5328-4.53278"
|
|
@@ -47,7 +47,7 @@ Error generating stack: `+h.message+`
|
|
|
47
47
|
stroke-linejoin="round"
|
|
48
48
|
/>
|
|
49
49
|
</svg>
|
|
50
|
-
`,
|
|
50
|
+
`,ZE=`
|
|
51
51
|
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
52
52
|
<path
|
|
53
53
|
d="M15.5 14.003h-3v-3.0004m-9-6.00078h3v3.0004m1.55478-3.80901A5.2170862 5.2170862 0 0 1 9.5 4.00014c1.1682.00058 2.3059.37321 3.2481 1.06388.9422.69067 1.64 1.66348 1.9923 2.77744.3523 1.11396.3407 2.31114-.033 3.41814-.3738 1.1069-1.0903 2.0661-2.0457 2.7384m-1.7165.8088c-.4703.1317-.9568.1967-1.4452.1931-1.16819-.0006-2.30585-.3733-3.24807-1.0639-.94222-.6907-1.64004-1.6635-1.99232-2.7775-.35229-1.1139-.34072-2.31114.03302-3.41808.37375-1.10694 1.09024-2.06608 2.04563-2.73841"
|
|
@@ -56,26 +56,26 @@ Error generating stack: `+h.message+`
|
|
|
56
56
|
stroke-linecap="round"
|
|
57
57
|
/>
|
|
58
58
|
</svg>
|
|
59
|
-
`,
|
|
59
|
+
`,JE=`
|
|
60
60
|
<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
61
61
|
<path
|
|
62
62
|
d="M8 6c0-.55228.44772-1 1-1s1 .44772 1 1-.44772 1-1 1-1-.44772-1-1Zm0 6c0-.5523.44772-1 1-1s1 .4477 1 1-.44772 1-1 1-1-.4477-1-1Zm0 6c0-.5523.44772-1 1-1s1 .4477 1 1-.44772 1-1 1-1-.4477-1-1Zm6-12c0-.55228.4477-1 1-1s1 .44772 1 1-.4477 1-1 1-1-.44772-1-1Zm0 6c0-.5523.4477-1 1-1s1 .4477 1 1-.4477 1-1 1-1-.4477-1-1Zm0 6c0-.5523.4477-1 1-1s1 .4477 1 1-.4477 1-1 1-1-.4477-1-1Z"
|
|
63
63
|
fill="currentColor"
|
|
64
64
|
/>
|
|
65
65
|
</svg>
|
|
66
|
-
`,
|
|
66
|
+
`,eS=`
|
|
67
67
|
<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
68
68
|
<path d="M4.5 11.0711h14.1421m-7.071 7.071V4" stroke="currentColor" stroke-linecap="round"/>
|
|
69
69
|
</svg>
|
|
70
|
-
`,
|
|
70
|
+
`,tS=`
|
|
71
71
|
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
72
72
|
<path d="m12.5 5-5 5 5 5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
73
73
|
</svg>
|
|
74
|
-
`,
|
|
74
|
+
`,nS=`
|
|
75
75
|
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
76
76
|
<path d="m7.5 15 5-5-5-5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
77
77
|
</svg>
|
|
78
|
-
`,
|
|
78
|
+
`,rS=`
|
|
79
79
|
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
80
80
|
<path
|
|
81
81
|
d="m17.5 17.5-5-5m1.6667-4.16667c0 .76605-.1509 1.52459-.4441 2.23237-.2931.7077-.7228 1.3507-1.2645 1.8924-.5417.5417-1.1847.9714-1.8924 1.2645-.70778.2932-1.46632.4441-2.23237.4441-.76604 0-1.52458-.1509-2.23232-.4441-.70773-.2931-1.35079-.7228-1.89247-1.2645-.54167-.5417-.97135-1.1847-1.2645-1.8924C2.65088 9.85792 2.5 9.09938 2.5 8.33333c0-1.54709.61458-3.03082 1.70854-4.12479C5.30251 3.11458 6.78624 2.5 8.33333 2.5c1.5471 0 3.03087.61458 4.12477 1.70854 1.094 1.09397 1.7086 2.5777 1.7086 4.12479Z"
|
|
@@ -84,7 +84,7 @@ Error generating stack: `+h.message+`
|
|
|
84
84
|
stroke-linejoin="round"
|
|
85
85
|
/>
|
|
86
86
|
</svg>
|
|
87
|
-
`,
|
|
87
|
+
`,oS=`
|
|
88
88
|
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
89
89
|
<path
|
|
90
90
|
d="M3.33334 10H10m-6.66666 5V5M10 15V5m4.1667 5 2.5-1.66667V15"
|
|
@@ -93,7 +93,7 @@ Error generating stack: `+h.message+`
|
|
|
93
93
|
stroke-linejoin="round"
|
|
94
94
|
/>
|
|
95
95
|
</svg>
|
|
96
|
-
`,
|
|
96
|
+
`,iS=`
|
|
97
97
|
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
98
98
|
<path
|
|
99
99
|
d="M3.33334 10H10m-6.66666 5V5M10 15V5m7.5 10h-3.3333c0-3.3333 3.3333-2.5 3.3333-5 0-1.25-1.6667-2.08333-3.3333-.83333"
|
|
@@ -102,7 +102,7 @@ Error generating stack: `+h.message+`
|
|
|
102
102
|
stroke-linejoin="round"
|
|
103
103
|
/>
|
|
104
104
|
</svg>
|
|
105
|
-
`,
|
|
105
|
+
`,sS=`
|
|
106
106
|
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
107
107
|
<path
|
|
108
108
|
d="M3.33334 10H10m-6.66666 5V5M10 15V5m4.5833 3.75C16 7.91667 17.5 8.75 17.5 10c0 .442-.1756.866-.4882 1.1785-.3125.3126-.7364.4882-1.1785.4882.4421 0 .866.1756 1.1785.4881.3126.3126.4882.7365.4882 1.1785 0 1.5-1.6667 2.5-3.3333 1.25"
|
|
@@ -111,7 +111,7 @@ Error generating stack: `+h.message+`
|
|
|
111
111
|
stroke-linejoin="round"
|
|
112
112
|
/>
|
|
113
113
|
</svg>
|
|
114
|
-
`,
|
|
114
|
+
`,aS=`
|
|
115
115
|
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
116
116
|
<path
|
|
117
117
|
d="M10 15V5M14.1667 8.33333V10.8333C14.1667 11.0543 14.2545 11.2663 14.4107 11.4226C14.567 11.5789 14.779 11.6667 15 11.6667H17.5M17.5 8.33333V15M3.33334 10H10M3.33334 15V5"
|
|
@@ -120,7 +120,7 @@ Error generating stack: `+h.message+`
|
|
|
120
120
|
stroke-linejoin="round"
|
|
121
121
|
/>
|
|
122
122
|
</svg>
|
|
123
|
-
`,
|
|
123
|
+
`,lS=`
|
|
124
124
|
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
125
125
|
<path
|
|
126
126
|
d="M3.33334 10H10M3.33334 15V5M10 15V5M17.5 8.33333H14.1667V10.8333H15.25C16.5 10.8333 17.5 11.75 17.5 12.9167C17.5 14.0833 16.5 15 15.25 15C14.8333 15 14.5 14.9167 14.1667 14.75"
|
|
@@ -129,7 +129,7 @@ Error generating stack: `+h.message+`
|
|
|
129
129
|
stroke-linejoin="round"
|
|
130
130
|
/>
|
|
131
131
|
</svg>
|
|
132
|
-
`,
|
|
132
|
+
`,cS=`
|
|
133
133
|
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
134
134
|
<path
|
|
135
135
|
d="M3.33334 10H10m-6.66666 5V5M10 15V5m4.1667 8.3333c0 .9205.7462 1.6667 1.6666 1.6667.9205 0 1.6667-.7462 1.6667-1.6667 0-.9204-.7462-1.6666-1.6667-1.6666-.9204 0-1.6666.7462-1.6666 1.6666Zm0 0c0-2.0833.8333-3.3333 2.5-4.99997"
|
|
@@ -138,7 +138,7 @@ Error generating stack: `+h.message+`
|
|
|
138
138
|
stroke-linejoin="round"
|
|
139
139
|
/>
|
|
140
140
|
</svg>
|
|
141
|
-
`,
|
|
141
|
+
`,uS=`
|
|
142
142
|
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
143
143
|
<path
|
|
144
144
|
d="M6.5 10h6.6667M6.5 15V5m6.6667 10V5"
|
|
@@ -147,7 +147,7 @@ Error generating stack: `+h.message+`
|
|
|
147
147
|
stroke-linejoin="round"
|
|
148
148
|
/>
|
|
149
149
|
</svg>
|
|
150
|
-
`,
|
|
150
|
+
`,dS=`
|
|
151
151
|
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
152
152
|
<path
|
|
153
153
|
d="M14.5 7.28571V6h-9v1.28571M10 6v9m0 0H8.71429M10 15h1.2857"
|
|
@@ -156,7 +156,7 @@ Error generating stack: `+h.message+`
|
|
|
156
156
|
stroke-linejoin="round"
|
|
157
157
|
/>
|
|
158
158
|
</svg>
|
|
159
|
-
`,
|
|
159
|
+
`,fS=`
|
|
160
160
|
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
161
161
|
<path
|
|
162
162
|
d="M18.5667 18H1.5l8.5333-16 8.5334 16Z"
|
|
@@ -168,6 +168,6 @@ Error generating stack: `+h.message+`
|
|
|
168
168
|
<rect x="9.75" y="14.25" width=".5" height=".5" rx=".25" fill="currentColor" stroke="currentColor" stroke-width=".5"/>
|
|
169
169
|
<rect x="9.75" y="8.25" width=".5" height="4.5" rx=".25" fill="currentColor" stroke="currentColor" stroke-width=".5"/>
|
|
170
170
|
</svg>
|
|
171
|
-
`,R1=({icon:l,title:e,secondaryLabel:t,isActive:o=!1,isDisabled:i=!1,hasChildren:a=!1,hideChevron:u=!1,wrapperTag:f="div",name:p,iconWithGap:g=!0,isInline:v=!1,isNestedInline:y=!1})=>{const w=we(Bt.item,v&&Go.item,y&&ms.item,o&&Bt.itemActive,i&&Bt.itemDisabled),S=we(Bt.icon,v&&Go.icon,y&&ms.icon,g&&Bt.iconTool,g&&v&&Go.iconTool,g&&y&&ms.iconTool),k=we(Bt.icon,v&&Go.chevronRight),E=a&&!u,_=_n.jsxs(_n.Fragment,{children:[l&&_n.jsx("div",{[He.icon]:"",...g&&{[He.iconTool]:""},className:S,"data-blok-testid":"popover-item-icon",dangerouslySetInnerHTML:{__html:l}}),e!==void 0&&_n.jsx("div",{[He.title]:"",className:Bt.title,"data-blok-testid":"popover-item-title",children:e}),t&&_n.jsx("div",{[He.secondaryTitle]:"",className:Bt.secondaryTitle,"data-blok-testid":"popover-item-secondary-title",children:t}),E&&_n.jsx("div",{[He.icon]:"",[He.iconChevronRight]:"",className:k,"data-blok-testid":"popover-item-chevron-right",dangerouslySetInnerHTML:{__html:w1}})]}),L={className:w,[He.item]:"","data-blok-testid":"popover-item",...p&&{"data-blok-item-name":p},...i&&{[He.disabled]:"true"},...o&&{[He.active]:"true"}};return f==="button"?_n.jsx("button",{type:"button",...L,children:_}):_n.jsx("div",{...L,children:_})},cd='[data-blok-testid="popover-item-icon"]',O1=l=>{const e=document.createElement("div"),t=u1.createRoot(e);d1.flushSync(()=>{t.render(l)});const o=e.firstElementChild;return t.unmount(),o};class Nn extends ad{constructor(e,t){super(e),this.params=e,this.nodes={root:null,icon:null},this.confirmationState=null,this.removeSpecialFocusBehavior=()=>{this.nodes.root?.removeAttribute(He.noFocus)},this.removeSpecialHoverBehavior=()=>{this.nodes.root?.removeAttribute(He.noHover)},this.onErrorAnimationEnd=()=>{this.nodes.icon?.removeAttribute(He.wobble),this.nodes.icon?.classList.remove("animate-wobble"),this.nodes.icon?.removeEventListener("animationend",this.onErrorAnimationEnd)},this.renderParams=t,this.nodes.root=this.make(e,t)}get isDisabled(){return this.params.isDisabled===!0}get toggle(){return this.params.toggle}get title(){return this.params.title||this.params.label}get isConfirmationStateEnabled(){return this.confirmationState!==null}get isFocused(){return this.nodes.root===null?!1:this.nodes.root.hasAttribute(He.focused)}getElement(){return this.nodes.root}handleClick(){if(this.isConfirmationStateEnabled&&this.confirmationState!==null){this.activateOrEnableConfirmationMode(this.confirmationState);return}this.activateOrEnableConfirmationMode(this.params)}toggleActive(e){if(this.nodes.root===null)return;(e!==void 0?e:!this.nodes.root.hasAttribute(He.active))?this.nodes.root.setAttribute(He.active,"true"):this.nodes.root.removeAttribute(He.active),this.updateRootClasses()}toggleHidden(e){e?this.nodes.root?.setAttribute(He.hidden,"true"):this.nodes.root?.removeAttribute(He.hidden),this.updateRootClasses()}reset(){this.isConfirmationStateEnabled&&this.disableConfirmationMode()}onFocus(){this.disableSpecialHoverAndFocusBehavior()}make(e,t){const o=e.title||e.label,i=O1(_n.jsx(R1,{icon:e.icon,title:o,secondaryLabel:e.secondaryLabel,isActive:this.isActive,isDisabled:e.isDisabled,hasChildren:this.hasChildren,hideChevron:this.isChevronHidden,wrapperTag:t?.wrapperTag,name:e.name,iconWithGap:t?.iconWithGap,isInline:t?.isInline,isNestedInline:t?.isNestedInline}));return this.nodes.icon=i.querySelector(cd),e.hint!==void 0&&t?.hint?.enabled!==!1&&this.addHint(i,{...e.hint,position:t?.hint?.position||"right",alignment:t?.hint?.alignment||"center"}),i}enableConfirmationMode(e){if(this.nodes.root===null)return;const t={...this.params,...e,confirmation:"confirmation"in e?e.confirmation:void 0},o=this.make(t,this.renderParams);this.nodes.root.innerHTML=o.innerHTML,this.nodes.root.setAttribute(He.confirmation,"true"),this.nodes.icon=this.nodes.root.querySelector(cd),this.confirmationState=e,this.enableSpecialHoverAndFocusBehavior(),this.updateRootClasses()}disableConfirmationMode(){if(this.nodes.root===null)return;const e=this.make(this.params,this.renderParams);this.nodes.root.innerHTML=e.innerHTML,this.nodes.root.removeAttribute(He.confirmation),this.nodes.icon=this.nodes.root.querySelector(cd),this.confirmationState=null,this.disableSpecialHoverAndFocusBehavior(),this.updateRootClasses()}enableSpecialHoverAndFocusBehavior(){this.nodes.root?.setAttribute(He.noHover,"true"),this.nodes.root?.setAttribute(He.noFocus,"true"),this.nodes.root?.addEventListener("mouseleave",this.removeSpecialHoverBehavior,{once:!0})}disableSpecialHoverAndFocusBehavior(){this.removeSpecialFocusBehavior(),this.removeSpecialHoverBehavior(),this.nodes.root?.removeEventListener("mouseleave",this.removeSpecialHoverBehavior)}activateOrEnableConfirmationMode(e){if(!("confirmation"in e)||e.confirmation===void 0)try{e.onActivate?.(e),this.disableConfirmationMode()}catch{this.animateError()}else this.enableConfirmationMode(e.confirmation)}animateError(){this.nodes.icon?.hasAttribute(He.wobble)||(this.nodes.icon?.setAttribute(He.wobble,"true"),this.nodes.icon?.classList.add("animate-wobble"),this.nodes.icon?.addEventListener("animationend",this.onErrorAnimationEnd))}updateRootClasses(){if(this.nodes.root===null)return;const e=this.nodes.root.hasAttribute(He.active),t=this.nodes.root.hasAttribute(He.hidden),o=this.nodes.root.hasAttribute(He.confirmation),i=this.nodes.root.hasAttribute(He.focused),a=this.renderParams?.isInline??!1,u=this.renderParams?.isNestedInline??!1;this.nodes.root.className=we(Bt.item,a&&Go.item,u&&ms.item,e&&Bt.itemActive,this.isDisabled&&Bt.itemDisabled,i&&Bt.itemFocused,o&&Bt.itemConfirmation,t&&"!hidden")}}const Sr={container:"py-1 px-[3px]",containerHidden:"hidden",line:"h-px w-full bg-popover-border"},vs={container:"px-1 py-0",line:"h-full w-px",nestedContainer:"py-1 px-[3px]",nestedLine:"w-full h-px"},ys={root:"data-blok-popover-item-separator",line:"data-blok-popover-item-separator-line",hidden:"data-blok-hidden"};class ry extends ad{constructor(e){super(),this.isInline=e?.isInline??!1,this.isNestedInline=e?.isNestedInline??!1;const t=this.getContainerClass(),o=this.getLineClass();this.nodes={root:R.make("div",t,{[ys.root]:""}),line:R.make("div",o,{[ys.line]:""})},this.nodes.root.setAttribute("data-blok-testid","popover-item-separator"),this.nodes.root.appendChild(this.nodes.line)}getElement(){return this.nodes.root}toggleHidden(e){e?(this.nodes.root?.setAttribute(ys.hidden,"true"),this.nodes.root.className=we(this.getContainerClass(),Sr.containerHidden)):(this.nodes.root?.removeAttribute(ys.hidden),this.nodes.root.className=this.getContainerClass())}getContainerClass(){return this.isNestedInline?we(Sr.container,vs.nestedContainer):this.isInline?we(Sr.container,vs.container):Sr.container}getLineClass(){return this.isNestedInline?we(Sr.line,vs.nestedLine):this.isInline?we(Sr.line,vs.line):Sr.line}}var $t=(l=>(l.Closed="closed",l.ClosedOnActivate="closed-on-activate",l))($t||{});const De={popover:"",popoverContainer:"absolute flex flex-col overflow-hidden box-border opacity-0 pointer-events-none p-0 border-none z-[4] max-h-0 min-w-[var(--width)] w-[var(--width)] rounded-lg shadow-[0_3px_15px_-3px_theme(colors.popover-shadow)] left-[var(--popover-left)] top-[var(--popover-top)] bg-popover-bg",popoverContainerMobile:"fixed max-w-none rounded-[10px] min-w-[calc(100%-var(--offset)*2)] inset-[auto_var(--offset)_calc(var(--offset)+env(safe-area-inset-bottom))_var(--offset)]",popoverContainerOpened:"opacity-100 pointer-events-auto p-1 max-h-[var(--max-height)] border border-popover-border animate-[panelShowing_100ms_ease]",popoverContainerOpenedMobile:"animate-[panelShowingMobile_250ms_ease]",popoverOverlay:"hidden bg-dark",popoverOverlayMobile:"fixed inset-0 block visible z-[3] opacity-50 transition-opacity duration-[120ms] ease-in will-change-[opacity]",search:"mb-1.5",items:"overflow-y-auto overscroll-contain",nothingFoundMessage:"hidden cursor-default text-sm leading-5 font-medium whitespace-nowrap overflow-hidden text-ellipsis text-gray-text p-[3px]",nothingFoundMessageDisplayed:"!block"},Gt={popover:"relative",popoverOpened:"inline-block",items:"flex",popoverContainer:"flex-row top-0 min-w-max w-max p-1 mobile:absolute",popoverContainerOpened:"animate-none",nestedLevel1Container:"left-0",nestedContainer:"h-fit p-1.5 flex-col",nestedItems:"block w-full"},Me={popover:"data-blok-popover",popoverContainer:"data-blok-popover-container",popoverItems:"data-blok-popover-items",popoverOverlay:"data-blok-popover-overlay",popoverInline:"data-blok-popover-inline",nested:"data-blok-nested",nestedLevel:"data-blok-nested-level",opened:"data-blok-popover-opened",openTop:"data-blok-popover-open-top",openLeft:"data-blok-popover-open-left",overlayHidden:"data-blok-overlay-hidden",nothingFoundDisplayed:"data-blok-nothing-found-displayed"},P1=l=>`level-${l}`;var Xt=(l=>(l.NestingLevel="--nesting-level",l.PopoverHeight="--popover-height",l.InlinePopoverWidth="--inline-popover-width",l.PopoverTop="--popover-top",l.PopoverLeft="--popover-left",l.TriggerItemLeft="--trigger-item-left",l.TriggerItemTop="--trigger-item-top",l))(Xt||{});const Xo={root:"",rootHidden:"hidden"},oy={root:"flex items-center"},ud={root:"data-blok-popover-item-html",hidden:"data-blok-hidden"};class Yo extends ad{constructor(e,t){super(e),this.isInline=t?.isInline??!1;const o=this.isInline?we(Xo.root,oy.root):Xo.root;this.nodes={root:R.make("div",o,{[ud.root]:""})},this.nodes.root.appendChild(e.element),this.nodes.root.setAttribute("data-blok-testid","popover-item-html"),e.name&&this.nodes.root.setAttribute("data-blok-item-name",e.name),e.hint!==void 0&&t?.hint?.enabled!==!1&&this.addHint(this.nodes.root,{...e.hint,position:t?.hint?.position||"right",alignment:t?.hint?.alignment||"center"})}getElement(){return this.nodes.root}toggleHidden(e){const t=this.isInline?we(Xo.root,oy.root):Xo.root;e?(this.nodes.root?.setAttribute(ud.hidden,"true"),this.nodes.root.className=we(t,Xo.rootHidden)):(this.nodes.root?.removeAttribute(ud.hidden),this.nodes.root.className=t)}getControls(){const e=this.nodes.root.querySelectorAll(`button, ${R.allInputsSelector}`);return Array.from(e)}}class iy extends jo{constructor(e,t={}){super(),this.params=e,this.itemsRenderParams=t,this.listeners=new qo,this.messages={nothingFound:"Nothing found",search:"Search"},this.items=this.buildItems(e.items),e.messages&&(this.messages={...this.messages,...e.messages}),this.nodes={},this.nodes.popoverContainer=R.make("div",[De.popoverContainer],{[Me.popoverContainer]:"","data-blok-testid":"popover-container"}),this.nodes.nothingFoundMessage=R.make("div",[De.nothingFoundMessage],{textContent:this.messages.nothingFound,"data-blok-testid":"popover-nothing-found"}),this.nodes.popoverContainer.appendChild(this.nodes.nothingFoundMessage),this.nodes.items=R.make("div",[De.items],{[Me.popoverItems]:"","data-blok-testid":"popover-items"}),this.items.forEach(o=>{const i=o.getElement();i!==null&&this.nodes.items.appendChild(i)}),this.nodes.popoverContainer.appendChild(this.nodes.items),this.listeners.on(this.nodes.popoverContainer,"click",o=>this.handleClick(o)),this.nodes.popover=R.make("div",[De.popover,this.params.class],{[Me.popover]:"","data-blok-testid":"popover"}),this.nodes.popover.style.setProperty("--width","200px"),this.nodes.popover.style.setProperty("--max-height","270px"),this.nodes.popover.style.setProperty("--item-padding","3px"),this.nodes.popover.style.setProperty("--item-height","calc(1.25rem + 2 * var(--item-padding))"),this.nodes.popover.style.setProperty("--popover-top","calc(100% + 0.5rem)"),this.nodes.popover.style.setProperty("--popover-left","0"),this.nodes.popover.style.setProperty("--nested-popover-overlap","0.25rem"),this.params.class&&this.nodes.popover.setAttribute("data-blok-popover-custom-class",this.params.class),this.nodes.popover.appendChild(this.nodes.popoverContainer)}get itemsDefault(){return this.items.filter(e=>e instanceof Nn)}getElement(){return this.nodes.popover}show(){!this.nodes.popover.isConnected&&!this.nodes.popover.parentNode&&document.body.appendChild(this.nodes.popover),this.nodes.popover.setAttribute(Me.opened,"true"),this.nodes.popoverContainer.className=we(De.popoverContainer,De.popoverContainerOpened),this.itemsDefault.forEach(e=>this.refreshItemActiveState(e)),this.search!==void 0&&this.search.focus()}hide(){this.nodes.popover.removeAttribute(Me.opened),this.nodes.popover.removeAttribute(Me.openTop),this.nodes.popover.removeAttribute(Me.openLeft),this.nodes.popoverContainer.className=De.popoverContainer,this.itemsDefault.forEach(e=>e.reset()),this.search!==void 0&&this.search.clear(),this.emit($t.Closed)}destroy(){this.items.forEach(e=>e.destroy()),this.nodes.popover.remove(),this.listeners.removeAll(),this.search?.destroy()}activateItemByName(e){const t=this.items.find(o=>o.name===e);t!==void 0&&this.handleItemClick(t)}buildItems(e){return e.map(t=>{switch(t.type){case tt.Separator:return new ry(this.itemsRenderParams[tt.Separator]);case tt.Html:return new Yo(t,this.itemsRenderParams[tt.Html]);default:return new Nn(t,this.itemsRenderParams[tt.Default])}})}getTargetItem(e){return this.items.filter(t=>t instanceof Nn||t instanceof Yo).find(t=>{const o=t.getElement();return o===null?!1:e.composedPath().includes(o)})}handleItemClick(e){if(!(e instanceof Nn&&e.isDisabled)){if(e.hasChildren){this.showNestedItems(e),this.callHandleClickIfPresent(e);return}this.itemsDefault.filter(t=>t!==e).forEach(t=>t.reset()),this.callHandleClickIfPresent(e),this.toggleItemActivenessIfNeeded(e),this.refreshItemActiveState(e),e.closeOnActivate===!0&&(this.hide(),this.emit($t.ClosedOnActivate))}}handleClick(e){const t=this.getTargetItem(e);t!==void 0&&this.handleItemClick(t)}toggleItemActivenessIfNeeded(e){if(!(e instanceof Nn)||(e.toggle===!0&&e.toggleActive(),typeof e.toggle!="string"))return;const t=this.itemsDefault.filter(o=>o.toggle===e.toggle);if(t.length===1){e.toggleActive();return}t.forEach(o=>{o.toggleActive(o===e)})}refreshItemActiveState(e){e instanceof Nn&&e.toggle===void 0&&e.toggleActive(e.isActive)}callHandleClickIfPresent(e){"handleClick"in e&&typeof e.handleClick=="function"&&e.handleClick()}hasNode(e){return this.nodes.popover.contains(e)}}var dd=(l=>(l.Search="search",l))(dd||{});const fd={wrapper:"bg-[#F8F8F8] border border-[rgba(226,226,229,0.20)] rounded p-0.5 grid grid-cols-[auto_auto_1fr] grid-rows-[auto]",icon:"w-toolbox-btn h-toolbox-btn flex items-center justify-center mr-2 [&_svg]:w-icon [&_svg]:h-icon [&_svg]:text-gray-text",input:"text-sm outline-none font-medium font-inherit border-0 bg-transparent m-0 p-0 leading-[22px] min-w-[calc(100%-theme('spacing.6')-10px)] placeholder:text-gray-text placeholder:font-medium"};class L1 extends jo{constructor({items:e,placeholder:t}){super(),this.searchQuery="",this.handleValueChange=()=>{this.applySearch(this.input.value)},this.listeners=new qo,this.items=e,this.wrapper=R.make("div",fd.wrapper),this.wrapper.setAttribute("data-blok-testid","popover-search-field");const o=R.make("div",fd.icon,{innerHTML:T1});this.input=R.make("input",fd.input,{type:"search",placeholder:t,tabIndex:-1}),this.input.setAttribute("data-blok-flipper-tab-target","true"),this.input.setAttribute("data-blok-testid","popover-search-input"),this.wrapper.appendChild(o),this.wrapper.appendChild(this.input),this.overrideValueProperty(),["input","keyup","search","change"].forEach(a=>{this.listeners.on(this.input,a,this.handleValueChange)})}getElement(){return this.wrapper}focus(){this.input.focus()}clear(){this.input.value=""}applySearch(e){this.searchQuery!==e&&(this.searchQuery=e,this.emit(dd.Search,{query:e,items:this.foundItems}))}overrideValueProperty(){const e=Object.getPrototypeOf(this.input),t=Object.getOwnPropertyDescriptor(e,"value");if(t?.set===void 0||t.get===void 0)return;const o=this.applySearch.bind(this);Object.defineProperty(this.input,"value",{configurable:t.configurable??!0,enumerable:t.enumerable??!1,get(){return t.get?.call(this)??""},set(i){t.set?.call(this,i),o(i)}})}destroy(){this.listeners.removeAll()}get foundItems(){return this.items.filter(e=>this.checkItem(e))}checkItem(e){const t=e.title?.toLowerCase()||"",o=this.searchQuery?.toLowerCase();return o!==void 0?t.includes(o):!1}}class xr extends iy{constructor(e,t){super(e,t),this.nestingLevel=0,this.nestedPopoverTriggerItem=null,this.previouslyHoveredItem=null,this.scopeElement=document.body,this.hide=()=>{super.hide(),this.destroyNestedPopoverIfExists(),this.flipper?.deactivate(),this.previouslyHoveredItem=null},this.onFlip=()=>{this.itemsDefault.find(i=>i.isFocused)?.onFocus()},this.onSearch=o=>{const i=o.query==="",a=o.items.length===0;this.items.forEach(f=>{const p=f instanceof Nn,g=f instanceof ry||f instanceof Yo,v=p?!o.items.includes(f):g&&(a||!i);f.toggleHidden(v)}),this.toggleNothingFoundMessage(a);const u=o.query===""?this.flippableElements:o.items.map(f=>f.getElement());this.flipper?.isActivated&&(this.flipper.deactivate(),this.flipper.activate(u))},e.trigger&&(this.trigger=e.trigger),e.nestingLevel!==void 0&&(this.nestingLevel=e.nestingLevel),this.nestingLevel>0&&this.nodes.popover.setAttribute(Me.nested,"true"),e.scopeElement!==void 0&&(this.scopeElement=e.scopeElement),this.nodes.popoverContainer!==null&&this.listeners.on(this.nodes.popoverContainer,"mouseover",o=>this.handleHover(o)),e.searchable&&this.addSearch(),e.flippable!==!1&&(e.flipper!==void 0?(e.flipper.deactivate(),e.flipper.removeOnFlip(this.onFlip),this.flipper=e.flipper):this.flipper=new $n({items:this.flippableElements,focusedItemClass:Bt.focused,allowedKeys:[ie.TAB,ie.UP,ie.DOWN,ie.ENTER]}),this.flipper.onFlip(this.onFlip))}hasFocus(){return this.flipper===void 0?!1:this.flipper.hasFocus()}get scrollTop(){return this.nodes.items===null?0:this.nodes.items.scrollTop}get offsetTop(){return this.nodes.popoverContainer===null?0:this.nodes.popoverContainer.offsetTop}show(){if(this.trigger){document.body.appendChild(this.nodes.popover);const{top:e,left:t}=this.calculatePosition();this.nodes.popover.style.position="absolute",this.nodes.popover.style.top=`${e}px`,this.nodes.popover.style.left=`${t}px`,this.nodes.popover.style.setProperty(Xt.PopoverTop,"0px"),this.nodes.popover.style.setProperty(Xt.PopoverLeft,"0px")}this.nodes.popover.style.setProperty(Xt.PopoverHeight,this.size.height+"px"),!this.trigger&&!this.shouldOpenBottom&&(this.nodes.popover.setAttribute(Me.openTop,"true"),this.nodes.popover.style.setProperty(Xt.PopoverTop,"calc(-1 * (0.5rem + var(--popover-height)))")),!this.trigger&&!this.shouldOpenRight&&(this.nodes.popover.setAttribute(Me.openLeft,"true"),this.nodes.popover.style.setProperty(Xt.PopoverLeft,"calc(-1 * var(--width) + 100%)")),super.show(),this.flipper?.activate(this.flippableElements)}calculatePosition(){if(!this.trigger)return{top:0,left:0};const e=this.trigger.getBoundingClientRect(),t=this.size,o=window.innerWidth,i=window.innerHeight,a=8,u=e.bottom+a+window.scrollY,p=e.bottom+a+t.height>i+window.scrollY&&e.top-a-t.height>window.scrollY?e.top-a-t.height+window.scrollY:u,g=e.left+window.scrollX,y=g+t.width>o+window.scrollX?Math.max(0,e.right-t.width+window.scrollX):g;return{top:p,left:y}}destroy(){this.hide(),super.destroy()}hasNode(e){return super.hasNode(e)?!0:this.nestedPopover!==void 0&&this.nestedPopover!==null?this.nestedPopover.hasNode(e):!1}showNestedItems(e){this.nestedPopover!==null&&this.nestedPopover!==void 0||(this.nestedPopoverTriggerItem=e,this.showNestedPopoverForItem(e))}handleHover(e){const t=this.getTargetItem(e);t!==void 0&&this.previouslyHoveredItem!==t&&(this.destroyNestedPopoverIfExists(),this.previouslyHoveredItem=t,t.hasChildren&&this.showNestedPopoverForItem(t))}setTriggerItemPosition(e,t){const o=t.getElement(),i=(o?o.offsetTop:0)-this.scrollTop,a=this.offsetTop+i;e.style.setProperty(Xt.TriggerItemTop,a+"px")}destroyNestedPopoverIfExists(){this.nestedPopover===void 0||this.nestedPopover===null||(this.nestedPopover.off($t.ClosedOnActivate,this.hide),this.nestedPopover.hide(),this.nestedPopover.destroy(),this.nestedPopover.getElement().remove(),this.nestedPopover=null,this.flipper?.activate(this.flippableElements),requestAnimationFrame(()=>{this.flipper?.focusFirst()}),this.nestedPopoverTriggerItem?.onChildrenClose())}showNestedPopoverForItem(e){this.nestedPopover=new xr({searchable:e.isChildrenSearchable,items:e.children,nestingLevel:this.nestingLevel+1,flippable:e.isChildrenFlippable,messages:this.messages}),e.onChildrenOpen(),this.nestedPopover.on($t.ClosedOnActivate,this.hide);const t=this.nestedPopover.getElement();return this.nodes.popover.appendChild(t),this.setTriggerItemPosition(t,e),t.style.setProperty(Xt.NestingLevel,this.nestedPopover.nestingLevel.toString()),this.applyNestedPopoverPositioning(t),this.nestedPopover.show(),this.flipper?.deactivate(),this.nestedPopover}applyNestedPopoverPositioning(e){const t=e.querySelector(`[${Me.popoverContainer}]`);if(!t)return;const o=this.nodes.popover.hasAttribute(Me.openTop),i=this.nodes.popover.hasAttribute(Me.openLeft);t.style.position="absolute",i?e.style.setProperty(Xt.PopoverLeft,"calc(-1 * (var(--nesting-level) + 1) * var(--width) + 100%)"):e.style.setProperty(Xt.PopoverLeft,"calc(var(--nesting-level) * (var(--width) - var(--nested-popover-overlap)))"),o?t.style.top="calc(var(--trigger-item-top) - var(--popover-height) + var(--item-height) + 0.5rem + var(--nested-popover-overlap))":t.style.top="calc(var(--trigger-item-top) - var(--nested-popover-overlap))"}get shouldOpenBottom(){if(this.nodes.popover===void 0||this.nodes.popover===null)return!1;const e=this.nodes.popoverContainer.getBoundingClientRect(),t=this.scopeElement.getBoundingClientRect(),o=this.size.height,i=e.top+o,a=e.top-o,u=Math.min(window.innerHeight,t.bottom);return a<t.top||i<=u}get shouldOpenRight(){if(this.nodes.popover===void 0||this.nodes.popover===null)return!1;const e=this.nodes.popover.getBoundingClientRect(),t=this.scopeElement.getBoundingClientRect(),o=this.size.width,i=e.right+o,a=e.left-o,u=Math.min(window.innerWidth,t.right);return a<t.left||i<=u}get size(){if(this._size)return this._size;const e={height:0,width:0};if(this.nodes.popover===null)return e;const t=this.nodes.popover.cloneNode(!0);t.style.visibility="hidden",t.style.position="absolute",t.style.top="-1000px",t.setAttribute(Me.opened,"true"),t.querySelector(`[${Me.nested}]`)?.remove(),document.body.appendChild(t);const o=t.querySelector(`[${Me.popoverContainer}]`);return e.height=o.offsetHeight,e.width=o.offsetWidth,t.remove(),this._size=e,e}get flippableElements(){return this.items.flatMap(t=>{if(!(t instanceof Nn))return t instanceof Yo?t.getControls():[];if(t.isDisabled)return[];const o=t.getElement();return o?[o]:[]}).filter(t=>t!=null)}addSearch(){this.search=new L1({items:this.itemsDefault,placeholder:this.messages.search}),this.search.on(dd.Search,this.onSearch);const e=this.search.getElement();e.classList.add(De.search),this.nodes.popoverContainer.insertBefore(e,this.nodes.popoverContainer.firstChild)}toggleNothingFoundMessage(e){this.nodes.nothingFoundMessage.classList.toggle(De.nothingFoundMessageDisplayed,e),e?this.nodes.nothingFoundMessage.setAttribute(Me.nothingFoundDisplayed,"true"):this.nodes.nothingFoundMessage.removeAttribute(Me.nothingFoundDisplayed)}}const D1="38px",M1="46px";class hd extends xr{constructor(e){const t=!Kn();super({...e},{[tt.Default]:{wrapperTag:"button",hint:{position:"top",alignment:"center",enabled:t},iconWithGap:!1,isInline:!0},[tt.Html]:{hint:{position:"top",alignment:"center",enabled:t},isInline:!0},[tt.Separator]:{isInline:!0}}),this.hide=()=>{this.nodes.popover.removeAttribute(Me.opened),this.nodes.popover.removeAttribute(Me.openTop),this.nodes.popover.removeAttribute(Me.openLeft),this.itemsDefault.forEach(o=>o.reset()),this.search!==void 0&&this.search.clear(),this.destroyNestedPopoverIfExists(),this.flipper?.deactivate(),this.nodes.popover.className=we(De.popover,Gt.popover),this.nodes.popoverContainer&&(this.nodes.popoverContainer.className=we(De.popoverContainer,Gt.popoverContainer),this.nodes.popoverContainer.style.height=""),this.emit($t.Closed)},this.nodes.popover.className=we(De.popover,Gt.popover),this.nodes.popoverContainer&&(this.nodes.popoverContainer.className=we(De.popoverContainer,Gt.popoverContainer)),this.nodes.items&&(this.nodes.items.className=we(De.items,Gt.items)),this.nodes.popover.style.setProperty("--height",D1),this.nodes.popover.style.setProperty("--height-mobile",M1),this.nodes.popover.setAttribute(Me.popoverInline,""),this.flipper?.setHandleContentEditableTargets(!0),this.items.forEach(o=>{!(o instanceof Nn)&&!(o instanceof Yo)||o.hasChildren&&o.isChildrenOpen&&this.showNestedItems(o)})}get offsetLeft(){return this.nodes.popoverContainer===null?0:this.nodes.popoverContainer.offsetLeft}show(){if(super.show(),this.nodes.popover.className=we(De.popover,Gt.popover,Gt.popoverOpened),this.nodes.popoverContainer){this.nodes.popoverContainer.className=we(De.popoverContainer,De.popoverContainerOpened,Gt.popoverContainer,Gt.popoverContainerOpened);const t=Kn()?"var(--height-mobile)":"var(--height)";this.nodes.popoverContainer.style.height=t}const e=this.nestingLevel===0?this.nodes.popoverContainer?.getBoundingClientRect():void 0;if(e!==void 0){const t=`${e.width}px`,o=`${e.height}px`;this.nodes.popover.style.setProperty(Xt.InlinePopoverWidth,t),this.nodes.popover.style.width=t,this.nodes.popover.style.height=o}requestAnimationFrame(()=>{this.flipper?.deactivate(),this.flipper?.activate(this.flippableElements)})}handleHover(){}setTriggerItemPosition(e,t){const o=t.getElement(),i=o?o.offsetLeft:0,a=this.offsetLeft+i;e.style.setProperty(Xt.TriggerItemLeft,a+"px")}showNestedItems(e){if(this.nestedPopoverTriggerItem===e){this.destroyNestedPopoverIfExists(),this.nestedPopoverTriggerItem=null;return}super.showNestedItems(e)}showNestedPopoverForItem(e){const t=super.showNestedPopoverForItem(e),o=t.getElement();t.flipper?.setHandleContentEditableTargets(!0);const i=o.querySelector(`[${Me.popoverContainer}]`);i&&(i.className=we(i.className,Gt.nestedContainer));const a=o.querySelector(`[${Me.popoverItems}]`);a&&(a.className=we(a.className,Gt.nestedItems));const u=f=>{if(!(f.key!=="Tab"||f.shiftKey)){if(this.nestedPopover!==t){document.removeEventListener("keydown",u,!0);return}f.preventDefault(),f.stopPropagation(),t.flipper?.activate(t.flippableElements),t.flipper?.focusFirst(),document.removeEventListener("keydown",u,!0)}};if(document.addEventListener("keydown",u,!0),t.on($t.Closed,()=>{document.removeEventListener("keydown",u,!0)}),o.setAttribute(Me.nestedLevel,P1(t.nestingLevel)),t.nestingLevel===1&&i){i.className=we(i.className,Gt.nestedLevel1Container);const f=Kn()?"calc(var(--height-mobile) + 3px)":"calc(var(--height) + 3px)";i.style.top=f}return t}handleItemClick(e){e!==this.nestedPopoverTriggerItem&&(this.nestedPopoverTriggerItem?.handleClick(),super.destroyNestedPopoverIfExists()),super.handleItemClick(e)}}const Je=class Je{constructor(){this.scrollPosition=null}lock(){Fu?this.lockHard():(document.body.classList.add(Je.CSS.scrollLocked,Je.CSS.overflowHidden),document.body.setAttribute(Je.DATA_ATTR.scrollLocked,"true"))}unlock(){Fu?this.unlockHard():(document.body.classList.remove(Je.CSS.scrollLocked,Je.CSS.overflowHidden),document.body.removeAttribute(Je.DATA_ATTR.scrollLocked))}lockHard(){this.scrollPosition=window.pageYOffset,document.documentElement.style.setProperty("--window-scroll-offset",`${this.scrollPosition}px`),document.body.classList.add(Je.CSS.scrollLocked,Je.CSS.scrollLockedHard,Je.CSS.overflowHidden,Je.CSS.fixed,Je.CSS.wFull),document.body.style.top="calc(-1 * var(--window-scroll-offset))",document.body.setAttribute(Je.DATA_ATTR.scrollLockedHard,"true")}unlockHard(){document.body.classList.remove(Je.CSS.scrollLocked,Je.CSS.scrollLockedHard,Je.CSS.overflowHidden,Je.CSS.fixed,Je.CSS.wFull),document.body.style.top="",document.body.removeAttribute(Je.DATA_ATTR.scrollLockedHard),this.scrollPosition!==null&&window.scrollTo(0,this.scrollPosition),this.scrollPosition=null}};Je.CSS={scrollLocked:"blok-scroll-locked",scrollLockedHard:"is-hard",overflowHidden:"overflow-hidden",fixed:"fixed",wFull:"w-full"},Je.DATA_ATTR={scrollLocked:"data-blok-scroll-locked",scrollLockedHard:"data-blok-scroll-locked-hard"};let pd=Je;const gd={root:"flex items-center mb-2 mt-1",text:"text-lg font-semibold text-text-primary",backButton:"border-0 bg-transparent w-9 h-9 text-text-primary cursor-pointer [&_svg]:block [&_svg]:w-7 [&_svg]:h-7"},md={root:"data-blok-popover-header",text:"data-blok-popover-header-text",backButton:"data-blok-popover-header-back-button"};class F1{constructor({text:e,onBackButtonClick:t}){this.listeners=new qo,this.text=e,this.onBackButtonClick=t,this.nodes={root:R.make("div",[gd.root],{"data-blok-testid":"popover-header",[md.root]:""}),backButton:R.make("button",[gd.backButton],{"data-blok-testid":"popover-header-back-button",[md.backButton]:""}),text:R.make("div",[gd.text],{"data-blok-testid":"popover-header-text",[md.text]:""})},this.nodes.backButton.innerHTML=k1,this.nodes.root.appendChild(this.nodes.backButton),this.listeners.on(this.nodes.backButton,"click",this.onBackButtonClick),this.nodes.text.innerText=this.text,this.nodes.root.appendChild(this.nodes.text)}getElement(){return this.nodes.root}destroy(){this.nodes.root.remove(),this.listeners.destroy()}}class z1{constructor(){this.history=[]}push(e){this.history.push(e)}pop(){return this.history.pop()}get currentTitle(){return this.history.length===0?"":this.history[this.history.length-1].title}get currentItems(){return this.history.length===0?[]:this.history[this.history.length-1].items}reset(){for(;this.history.length>1;)this.pop()}}class sy extends iy{constructor(e){super(e,{[tt.Default]:{hint:{enabled:!1}},[tt.Html]:{hint:{enabled:!1}}}),this.scrollLocker=new pd,this.history=new z1,this.isHidden=!0,this.nodes.overlay=R.make("div",[De.popoverOverlay],{[Me.popoverOverlay]:"",[Me.overlayHidden]:"","data-blok-testid":"popover-overlay"}),this.nodes.popover.insertBefore(this.nodes.overlay,this.nodes.popover.firstChild),this.listeners.on(this.nodes.overlay,"click",()=>{this.hide()}),this.history.push({items:e.items}),this.nodes.popoverContainer.style.setProperty("--offset","5px"),this.nodes.popoverContainer.className=we(De.popoverContainer,De.popoverContainerMobile)}show(){this.nodes.overlay.removeAttribute(Me.overlayHidden),this.nodes.overlay.className=we(De.popoverOverlay,De.popoverOverlayMobile),super.show(),this.nodes.popoverContainer.className=we(De.popoverContainer,De.popoverContainerMobile,De.popoverContainerOpened,De.popoverContainerOpenedMobile),this.scrollLocker.lock(),this.isHidden=!1}hide(){this.isHidden||(super.hide(),this.nodes.overlay.setAttribute(Me.overlayHidden,""),this.nodes.overlay.className=De.popoverOverlay,this.nodes.popoverContainer.className=we(De.popoverContainer,De.popoverContainerMobile),this.scrollLocker.unlock(),this.history.reset(),this.isHidden=!0)}destroy(){super.destroy(),this.scrollLocker.unlock()}showNestedItems(e){this.updateItemsAndHeader(e.children,e.title),this.history.push({title:e.title,items:e.children})}updateItemsAndHeader(e,t){this.header!==null&&this.header!==void 0&&(this.header.destroy(),this.header=null);const o=t!==void 0;o&&(this.header=new F1({text:t,onBackButtonClick:()=>{this.history.pop(),this.updateItemsAndHeader(this.history.currentItems,this.history.currentTitle)}}));const i=this.header?.getElement()??null;o&&i!==null&&this.nodes.popoverContainer.insertBefore(i,this.nodes.popoverContainer.firstChild),this.items.forEach(a=>a.getElement()?.remove()),this.items=this.buildItems(e),this.items.forEach(a=>{const u=a.getElement();u!==null&&this.nodes.items?.appendChild(u)})}}class H1 extends Be{constructor(){super(...arguments),this.opened=!1,this.selection=new X,this.popover=null,this.flipperInstance=new $n({focusedItemClass:Bt.focused,allowedKeys:[ie.TAB,ie.UP,ie.DOWN,ie.ENTER]}),this.flipperKeydownHandler=null,this.flipperKeydownSource=null,this.close=()=>{this.opened&&(this.opened=!1,X.isAtBlok||this.selection.restore(),this.selection.clearSaved(),this.detachFlipperKeydownListener(),!this.Blok.CrossBlockSelection.isCrossBlockSelectionStarted&&this.Blok.BlockManager.currentBlock&&this.Blok.BlockSelection.unselectBlock(this.Blok.BlockManager.currentBlock),this.eventsDispatcher.emit(this.events.closed),this.popover&&(this.popover.off($t.Closed,this.onPopoverClose),this.popover.destroy(),this.popover.getElement().remove(),this.popover=null))},this.onPopoverClose=()=>{this.close()}}get events(){return{opened:Ku,closed:Vu}}get CSS(){return{settings:"blok-settings"}}get flipper(){return this.flipperInstance}make(){this.nodes.wrapper=R.make("div",[this.CSS.settings]),this.nodes.wrapper.setAttribute("data-blok-testid","block-tunes-wrapper"),this.eventsDispatcher.on(Wo,this.close)}destroy(){this.detachFlipperKeydownListener(),this.removeAllNodes(),this.listeners.destroy(),this.eventsDispatcher.off(Wo,this.close)}async open(e,t){const o=e??this.Blok.BlockManager.currentBlock;if(o===void 0)return;this.opened=!0,this.selection.save(),this.Blok.BlockSelection.selectBlock(o),this.Blok.BlockSelection.clearCache();const{toolTunes:i,commonTunes:a}=o.getTunes();this.eventsDispatcher.emit(this.events.opened);const u=Kn()?sy:xr,f={searchable:!0,trigger:t||this.nodes.wrapper,items:await this.getTunesItems(o,a,i),scopeElement:this.Blok.API.methods.ui.nodes.redactor,messages:{nothingFound:Ke.ui(it.ui.popover,"Nothing found"),search:Ke.ui(it.ui.popover,"Filter")}};u===xr&&(f.flipper=this.flipperInstance),this.popover=new u(f),this.popover.getElement().setAttribute("data-blok-testid","block-tunes-popover"),this.popover.on($t.Closed,this.onPopoverClose),this.popover.show(),u===xr&&this.flipperInstance.focusItem(0),this.attachFlipperKeydownListener(o)}getElement(){return this.nodes.wrapper}contains(e){return!!(this.nodes.wrapper?.contains(e)||this.popover?.hasNode(e))}async getTunesItems(e,t,o){const i=[];o!==void 0&&o.length>0&&(i.push(...o),i.push({type:tt.Separator}));const a=Array.from(this.Blok.Tools.blockTools.values()),f=(await Mv(e,a)).reduce((p,g)=>(g.toolbox===void 0||g.toolbox.forEach(v=>{const y=v.title??g.name;p.push({icon:v.icon,title:Ke.t(it.toolNames,y),name:g.name,closeOnActivate:!0,onActivate:async()=>{const{BlockManager:w,Caret:S,Toolbar:k}=this.Blok,E=await w.convert(e,g.name,v.data);k.close(),S.setToBlock(E,S.positions.END)}})}),p),[]);return f.length>0&&(i.push({icon:v1,name:"convert-to",title:Ke.ui(it.ui.popover,"Convert to"),children:{searchable:!0,items:f}}),i.push({type:tt.Separator})),i.push(...t),i}attachFlipperKeydownListener(e){this.detachFlipperKeydownListener();const t=e?.pluginsContent;t instanceof HTMLElement&&(this.flipperInstance.setHandleContentEditableTargets(!0),this.flipperKeydownHandler=o=>{this.flipperInstance.handleExternalKeydown(o)},t.addEventListener("keydown",this.flipperKeydownHandler,!0),this.flipperKeydownSource=t)}detachFlipperKeydownListener(){this.flipperKeydownSource!==null&&this.flipperKeydownHandler!==null&&this.flipperKeydownSource.removeEventListener("keydown",this.flipperKeydownHandler,!0),this.flipperInstance.setHandleContentEditableTargets(!1),this.flipperKeydownSource=null,this.flipperKeydownHandler=null}}const ly={SHIFT:["SHIFT"],CMD:["CMD","CONTROL","COMMAND","WINDOWS","CTRL"],ALT:["ALT","OPTION"]},j1={0:"Digit0",1:"Digit1",2:"Digit2",3:"Digit3",4:"Digit4",5:"Digit5",6:"Digit6",7:"Digit7",8:"Digit8",9:"Digit9",A:"KeyA",B:"KeyB",C:"KeyC",D:"KeyD",E:"KeyE",F:"KeyF",G:"KeyG",H:"KeyH",I:"KeyI",J:"KeyJ",K:"KeyK",L:"KeyL",M:"KeyM",N:"KeyN",O:"KeyO",P:"KeyP",Q:"KeyQ",R:"KeyR",S:"KeyS",T:"KeyT",U:"KeyU",V:"KeyV",W:"KeyW",X:"KeyX",Y:"KeyY",Z:"KeyZ",BACKSPACE:"Backspace",ENTER:"Enter",ESCAPE:"Escape",LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown",INSERT:"Insert",DELETE:"Delete",".":"Period"},q1=l=>Object.keys(ly).find(t=>ly[t].includes(l));class U1{constructor(e){this.commands={SHIFT:!1,CMD:!1,ALT:!1},this.keys={},this.name=e.name,this.element=e.on,this.callback=e.callback,this.parseShortcutName(e.name),this.executeShortcut=t=>{this.execute(t)},this.element.addEventListener("keydown",this.executeShortcut,!1)}remove(){this.element.removeEventListener("keydown",this.executeShortcut)}parseShortcutName(e){const t=e.split("+");for(const o of t){const i=o.toUpperCase(),a=q1(i);a!==void 0?this.commands[a]=!0:this.keys[i]=!0}}checkModifiers(e){const t={CMD:e.ctrlKey||e.metaKey,SHIFT:e.shiftKey,ALT:e.altKey};return Object.keys(this.commands).every(i=>this.commands[i]===t[i])}checkKeys(e){return Object.keys(this.keys).every(o=>{const i=j1[o];return e.code===i})}execute(e){const t=this.checkModifiers(e),o=this.checkKeys(e);t&&o&&this.callback(e)}}let W1=class{constructor(){this.registeredShortcuts=new Map}add(e){if(this.findShortcut(e.on,e.name))throw Error(`Shortcut ${e.name} is already registered for ${e.on}. Please remove it before add a new handler.`);const o=new U1({name:e.name,on:e.on,callback:e.handler}),i=this.registeredShortcuts.get(e.on)||[];this.registeredShortcuts.set(e.on,[...i,o])}remove(e,t){const o=this.findShortcut(e,t);if(!o)return;o.remove();const i=this.registeredShortcuts.get(e);if(!i)return;const a=i.filter(u=>u!==o);if(a.length===0){this.registeredShortcuts.delete(e);return}this.registeredShortcuts.set(e,a)}findShortcut(e,t){return(this.registeredShortcuts.get(e)||[]).find(({name:i})=>i===t)}};const eo=new W1;var bs=(l=>(l.Opened="toolbox-opened",l.Closed="toolbox-closed",l.BlockAdded="toolbox-block-added",l))(bs||{});class vd extends jo{constructor({api:e,tools:t,i18nLabels:o,triggerElement:i}){super(),this.opened=!1,this.listeners=new qo,this.popover=null,this.handleMobileLayoutToggle=()=>{this.destroyPopover(),this.initPopover()},this.onPopoverClose=()=>{this.opened=!1,this.emit("toolbox-closed")},this.api=e,this.tools=t,this.i18nLabels=o,this.triggerElement=i,this.enableShortcuts(),this.nodes={toolbox:R.make("div",vd.CSS.toolbox)},this.nodes.toolbox.setAttribute("data-blok-testid","toolbox"),this.initPopover(),this.api.events.on(Wo,this.handleMobileLayoutToggle)}get isEmpty(){return this.toolsToBeDisplayed.length===0}static get CSS(){return{toolbox:"blok-toolbox"}}getElement(){return this.nodes.toolbox}contains(e){return!!(this.nodes.toolbox.contains(e)||this.popover?.getElement().contains(e))}hasFocus(){if(this.popover!==null)return"hasFocus"in this.popover?this.popover.hasFocus():void 0}destroy(){super.destroy(),this.nodes&&this.nodes.toolbox&&this.nodes.toolbox.remove(),this.removeAllShortcuts(),this.popover?.off($t.Closed,this.onPopoverClose),this.listeners.destroy(),this.api.events.off(Wo,this.handleMobileLayoutToggle)}async toolButtonActivated(e,t){await this.insertNewBlock(e,t)}open(){this.isEmpty||(this.popover?.show(),this.opened=!0,this.emit("toolbox-opened"))}close(){this.popover?.hide(),this.opened=!1,this.emit("toolbox-closed")}toggle(){this.opened?this.close():this.open()}initPopover(){const e=Kn()?sy:xr;this.popover=new e({scopeElement:this.api.ui.nodes.redactor,trigger:this.triggerElement||this.nodes.toolbox,searchable:!0,messages:{nothingFound:this.i18nLabels.nothingFound,search:this.i18nLabels.filter},items:this.toolboxItemsToBeDisplayed}),this.popover.on($t.Closed,this.onPopoverClose),this.popover.getElement().setAttribute("data-blok-testid","toolbox-popover")}destroyPopover(){this.popover!==null&&(this.popover.hide(),this.popover.off($t.Closed,this.onPopoverClose),this.popover.destroy(),this.popover=null),this.nodes.toolbox!==null&&(this.nodes.toolbox.innerHTML="")}get toolsToBeDisplayed(){if(this._toolsToBeDisplayed)return this._toolsToBeDisplayed;const e=[];return this.tools.forEach(t=>{t.toolbox&&e.push(t)}),this._toolsToBeDisplayed=e,e}get toolboxItemsToBeDisplayed(){if(this._toolboxItemsToBeDisplayed)return this._toolboxItemsToBeDisplayed;const e=(o,i,a=!0)=>({icon:o.icon,title:Ke.t(it.toolNames,o.title||ls(i.name)),name:i.name,onActivate:()=>{this.toolButtonActivated(i.name,o.data)},secondaryLabel:i.shortcut&&a?dv(i.shortcut):""}),t=this.toolsToBeDisplayed.reduce((o,i)=>{const{toolbox:a}=i;return a===void 0||(Array.isArray(a)?a:[a]).forEach((f,p)=>{o.push(e(f,i,p===0))}),o},[]);return this._toolboxItemsToBeDisplayed=t,t}enableShortcuts(){this.toolsToBeDisplayed.forEach(e=>{const t=e.shortcut;t&&this.enableShortcutForTool(e.name,t)})}enableShortcutForTool(e,t){eo.add({name:t,on:this.api.ui.nodes.redactor,handler:async o=>{o.preventDefault();const i=this.api.blocks.getCurrentBlockIndex(),a=this.api.blocks.getBlockByIndex(i);if(a)try{const u=await this.api.blocks.convert(a.id,e);this.api.caret.setToBlock(u,"end");return}catch{}await this.insertNewBlock(e)}})}removeAllShortcuts(){this.toolsToBeDisplayed.forEach(e=>{const t=e.shortcut;t&&eo.remove(this.api.ui.nodes.redactor,t)})}async insertNewBlock(e,t){const o=this.api.blocks.getCurrentBlockIndex(),i=this.api.blocks.getBlockByIndex(o);if(!i)return;const a=i.isEmpty?o:o+1,f=t!==void 0&&Object.keys(t).length>0?Object.assign(await this.api.blocks.composeBlockData(e),t):void 0,p=this.api.blocks.insert(e,f,void 0,a,void 0,i.isEmpty);this.api.caret.setToBlock(a),this.emit("toolbox-block-added",{block:p}),this.api.toolbar.close()}}const ay="block hovered",cy=1e3;class K1 extends Be{constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t}),this.hoveredBlock=null,this.toolboxInstance=null,this.settingsTogglerMouseDownPosition=null,this.onBlockSettingsOpen=()=>{this.nodes.settingsToggler?.classList.add(this.CSS.settingsTogglerOpened)},this.onBlockSettingsClose=()=>{this.nodes.settingsToggler?.classList.remove(this.CSS.settingsTogglerOpened)}}get CSS(){return{toolbar:vt("absolute left-0 right-0 top-0 transition-opacity duration-100 ease-linear will-change-[opacity,top]"),toolbarSelector:"blok-toolbar",toolbarOpened:"block",toolbarClosed:"hidden",content:vt("relative mx-auto max-w-content"),actions:vt("absolute flex opacity-0 pr-[5px]","right-full","mobile:right-auto","group-[.blok-editor--rtl]:right-auto group-[.blok-editor--rtl]:left-[calc(-1*theme(width.toolbox-btn))]","mobile:group-[.blok-editor--rtl]:ml-0 mobile:group-[.blok-editor--rtl]:mr-auto mobile:group-[.blok-editor--rtl]:pr-0 mobile:group-[.blok-editor--rtl]:pl-[10px]"),actionsOpened:"opacity-100",openedToolboxHolderModifier:"is-toolbox-opened",plusButton:vt("text-dark cursor-pointer w-toolbox-btn h-toolbox-btn rounded-[7px] inline-flex justify-center items-center select-none","shrink-0","[&_svg]:h-6 [&_svg]:w-6","can-hover:hover:bg-bg-light","mobile:bg-white mobile:border mobile:border-[#e8e8eb] mobile:shadow-overlay-pane mobile:rounded-[6px] mobile:z-[2]","mobile:w-toolbox-btn-mobile mobile:h-toolbox-btn-mobile","group-[.blok-editor--rtl]:right-[calc(-1*theme(width.toolbox-btn))] group-[.blok-editor--rtl]:left-auto","not-mobile:group-[.blok-editor--narrow]:left-[5px]","not-mobile:group-[.blok-editor--narrow.blok-editor--rtl]:left-0 not-mobile:group-[.blok-editor--narrow.blok-editor--rtl]:right-[5px]"),plusButtonShortcut:"mt-[5px] opacity-60",plusButtonShortcutKey:"text-white",settingsTogglerHandle:"blok-settings-toggler",settingsToggler:vt("blok-settings-toggler","text-dark cursor-pointer w-toolbox-btn h-toolbox-btn rounded-[7px] inline-flex justify-center items-center select-none","cursor-pointer select-none","[&_svg]:h-6 [&_svg]:w-6","active:cursor-grabbing","can-hover:hover:bg-bg-light can-hover:hover:cursor-grab","group-[.is-toolbox-opened]:can-hover:hover:cursor-pointer","mobile:bg-white mobile:border mobile:border-[#e8e8eb] mobile:shadow-overlay-pane mobile:rounded-[6px] mobile:z-[2]","mobile:w-toolbox-btn-mobile mobile:h-toolbox-btn-mobile","not-mobile:w-6"),settingsTogglerHidden:"hidden",settingsTogglerOpened:vt("can-hover:hover:cursor-pointer")}}get opened(){return this.nodes.wrapper?.classList.contains(this.CSS.toolbarOpened)??!1}contains(e){return!!(this.nodes.wrapper?.contains(e)||this.toolboxInstance?.contains(e)||this.Blok.BlockSettings.contains(e))}get toolbox(){return{opened:this.toolboxInstance?.opened,close:()=>{this.toolboxInstance?.close()},open:()=>{if(this.toolboxInstance===null){Ee("toolbox.open() called before initialization is finished","warn");return}this.hoveredBlock&&(this.Blok.BlockManager.currentBlock=this.hoveredBlock),this.toolboxInstance.open()},toggle:()=>{if(this.toolboxInstance===null){Ee("toolbox.toggle() called before initialization is finished","warn");return}this.toolboxInstance.toggle()},hasFocus:()=>this.toolboxInstance?.hasFocus()}}get blockActions(){return{hide:()=>{this.nodes.actions?.classList.remove(this.CSS.actionsOpened),this.nodes.actions?.removeAttribute("data-blok-opened")},show:()=>{this.nodes.actions?.classList.add(this.CSS.actionsOpened),this.nodes.actions?.setAttribute("data-blok-opened","true")}}}get blockTunesToggler(){return{hide:()=>this.nodes.settingsToggler?.classList.add(this.CSS.settingsTogglerHidden),show:()=>this.nodes.settingsToggler?.classList.remove(this.CSS.settingsTogglerHidden)}}toggleReadOnly(e){e?(this.destroy(),this.Blok.BlockSettings.destroy(),this.disableModuleBindings()):window.requestIdleCallback(async()=>{await this.drawUI(),this.enableModuleBindings()},{timeout:2e3})}moveAndOpen(e){if(this.toolboxInstance===null){Ee("Can't open Toolbar since Blok initialization is not finished yet","warn");return}this.toolboxInstance.opened&&this.toolboxInstance.close(),this.Blok.BlockSettings.opened&&this.Blok.BlockSettings.close();const t=e??this.Blok.BlockManager.currentBlock;if(!t)return;this.hoveredBlock=t;const{wrapper:o,plusButton:i}=this.nodes;if(!o||!i)return;const a=t.holder,{isMobile:u}=this.Blok.UI,f=20,p=t.firstInput,g=a.getBoundingClientRect(),v=p!==void 0?p.getBoundingClientRect():null,y=v!==null?v.top-g.top:null,w=(()=>{const E=parseInt(window.getComputedStyle(t.pluginsContent).paddingTop,10);if(u){const j=parseInt(window.getComputedStyle(i).height,10);return E-j}if(p===void 0||y===null||y>f)return E;const _=TS(p),L=parseInt(window.getComputedStyle(i).height,10);return _-L+8+y})();o.style.top=`${Math.floor(w)}px`,a.appendChild(o);const S=t.getTunes(),k=S.toolTunes.length>0||S.commonTunes.length>0;this.Blok.BlockManager.blocks.length===1&&t.isEmpty&&!k?this.blockTunesToggler.hide():this.blockTunesToggler.show(),this.open()}close(){this.Blok.ReadOnly.isEnabled||(this.nodes.wrapper?.classList.remove(this.CSS.toolbarOpened),this.nodes.wrapper?.classList.add(this.CSS.toolbarClosed),this.nodes.wrapper?.removeAttribute("data-blok-opened"),this.blockActions.hide(),this.toolboxInstance?.close(),this.Blok.BlockSettings.close(),this.reset())}reset(){this.nodes.wrapper&&(this.nodes.wrapper.style.top="unset",this.Blok.UI.nodes.wrapper.appendChild(this.nodes.wrapper))}open(e=!0){this.nodes.wrapper?.classList.remove(this.CSS.toolbarClosed),this.nodes.wrapper?.classList.add(this.CSS.toolbarOpened),this.nodes.wrapper?.setAttribute("data-blok-opened","true"),e?this.blockActions.show():this.blockActions.hide()}async make(){const e=R.make("div",[this.CSS.toolbar,this.CSS.toolbarSelector,this.CSS.toolbarClosed,"group-[.is-dragging]:pointer-events-none"]);this.nodes.wrapper=e,e.setAttribute("data-blok-testid","toolbar");const t=R.make("div",this.CSS.content),o=R.make("div",[this.CSS.actions,"not-mobile:group-[.blok-editor--narrow]:right-[calc(-1*theme(spacing.narrow-mode-right-padding)-5px)]","not-mobile:group-[.blok-editor--narrow.blok-editor--rtl]:right-auto","not-mobile:group-[.blok-editor--narrow.blok-editor--rtl]:left-[calc(-1*theme(spacing.narrow-mode-right-padding)-5px)]","not-mobile:group-[.blok-editor--narrow.blok-editor--rtl]:left-[-5px]"]);this.nodes.content=t,this.nodes.actions=o,o.setAttribute("data-blok-testid","toolbar-actions"),R.append(e,t),R.append(t,o);const i=R.make("div",this.CSS.plusButton,{innerHTML:b1});i.setAttribute("data-blok-testid","plus-button"),this.nodes.plusButton=i,R.append(o,i),this.readOnlyMutableListeners.on(i,"click",()=>{Ko(!0),this.plusButtonClicked()},!1);const a=R.make("div"),u=E=>{const _=document.createDocumentFragment(),L=E.indexOf(" ");if(L>0){const P=E.substring(0,L),K=E.substring(L);_.appendChild(R.make("span",this.CSS.plusButtonShortcutKey,{textContent:P})),_.appendChild(document.createTextNode(K))}else _.appendChild(document.createTextNode(E));return _};a.appendChild(u(Ke.ui(it.ui.toolbar.toolbox,"Click to add below"))),a.appendChild(R.make("br"));const p=uv().win?Ke.ui(it.ui.toolbar.toolbox,"Ctrl-click to add above"):Ke.ui(it.ui.toolbar.toolbox,"Option-click to add above");a.appendChild(u(p)),ps(i,a,{hidingDelay:400});const g=R.make("span",[this.CSS.settingsToggler,"group-[.is-dragging]:cursor-grabbing"],{innerHTML:y1});g.setAttribute("data-blok-testid","settings-toggler"),this.nodes.settingsToggler=g,R.append(o,g);const v=R.make("div"),y=E=>{const _=R.make("div"),[L,...P]=E.split(" "),K=R.make("span",null,{textContent:L});return K.style.color="white",_.appendChild(K),P.length>0&&_.appendChild(R.text(" "+P.join(" "))),_},w=Ke.ui(it.ui.blockTunes.toggler,"Drag to move"),S=Ke.ui(it.ui.blockTunes.toggler,"Click to open the menu");v.appendChild(y(w)),v.appendChild(y(S)),ps(g,v,{hidingDelay:400}),R.append(o,this.makeToolbox());const k=this.Blok.BlockSettings.getElement();if(!k)throw new Error("Block Settings element was not created");R.append(o,k),R.append(this.Blok.UI.nodes.wrapper,e)}makeToolbox(){this.toolboxInstance=new vd({api:this.Blok.API.methods,tools:this.Blok.Tools.blockTools,i18nLabels:{filter:Ke.ui(it.ui.popover,"Filter"),nothingFound:Ke.ui(it.ui.popover,"Nothing found")},triggerElement:this.nodes.plusButton}),this.toolboxInstance.on(bs.Opened,()=>{this.Blok.UI.nodes.wrapper.classList.add(this.CSS.openedToolboxHolderModifier),this.Blok.UI.nodes.wrapper.setAttribute("data-blok-toolbox-opened","true")}),this.toolboxInstance.on(bs.Closed,()=>{this.Blok.UI.nodes.wrapper.classList.remove(this.CSS.openedToolboxHolderModifier),this.Blok.UI.nodes.wrapper.removeAttribute("data-blok-toolbox-opened")}),this.toolboxInstance.on(bs.BlockAdded,({block:t})=>{const{BlockManager:o,Caret:i}=this.Blok,a=o.getBlockById(t.id);if(!a||a.inputs.length!==0)return;if(a===o.lastBlock){o.insertAtEnd(),i.setToBlock(o.lastBlock);return}const u=o.nextBlock;u&&i.setToBlock(u)});const e=this.toolboxInstance.getElement();if(e===null)throw new Error("Toolbox element was not created");return e}plusButtonClicked(){this.hoveredBlock&&(this.Blok.BlockManager.currentBlock=this.hoveredBlock),this.Blok.BlockSettings.opened&&this.Blok.BlockSettings.close(),this.toolboxInstance?.toggle()}enableModuleBindings(){const e=this.nodes.settingsToggler;e&&(this.readOnlyMutableListeners.on(e,"mousedown",t=>{t.stopPropagation(),Ko(!0);const o=t;this.settingsTogglerMouseDownPosition={x:o.clientX,y:o.clientY}},!0),this.readOnlyMutableListeners.on(e,"click",t=>{t.stopPropagation();const o=t,i=this.settingsTogglerMouseDownPosition;this.settingsTogglerMouseDownPosition=null,!(i!==null&&(Math.abs(o.clientX-i.x)>cy||Math.abs(o.clientY-i.y)>cy))&&(this.settingsTogglerClicked(),this.toolboxInstance?.opened&&this.toolboxInstance.close())},!0)),Kn()||this.eventsDispatcher.on(ay,t=>{const o=t.block;o instanceof vn&&(this.Blok.BlockSettings.opened||this.toolboxInstance?.opened||this.moveAndOpen(o))}),this.eventsDispatcher.on(Ku,this.onBlockSettingsOpen),this.eventsDispatcher.on(Vu,this.onBlockSettingsClose)}disableModuleBindings(){this.readOnlyMutableListeners.clearAll(),this.eventsDispatcher.off(Ku,this.onBlockSettingsOpen),this.eventsDispatcher.off(Vu,this.onBlockSettingsClose)}settingsTogglerClicked(){const e=this.hoveredBlock;e&&(this.Blok.BlockManager.currentBlock=e,this.Blok.BlockSettings.opened?this.Blok.BlockSettings.close():this.Blok.BlockSettings.open(e,this.nodes.settingsToggler))}async drawUI(){this.Blok.BlockSettings.make(),await this.make()}destroy(){this.removeAllNodes(),this.toolboxInstance&&this.toolboxInstance.destroy()}}var Cr=(l=>(l[l.Block=0]="Block",l[l.Inline=1]="Inline",l[l.Tune=2]="Tune",l))(Cr||{}),ks=(l=>(l.Shortcut="shortcut",l.Toolbox="toolbox",l.EnabledInlineTools="inlineToolbar",l.EnabledBlockTunes="tunes",l.Config="config",l))(ks||{}),uy=(l=>(l.Shortcut="shortcut",l.SanitizeConfig="sanitize",l))(uy||{}),to=(l=>(l.IsEnabledLineBreaks="enableLineBreaks",l.Toolbox="toolbox",l.ConversionConfig="conversionConfig",l.IsReadOnlySupported="isReadOnlySupported",l.PasteConfig="pasteConfig",l))(to||{}),dy=(l=>(l.IsInline="isInline",l.Title="title",l.IsReadOnlySupported="isReadOnlySupported",l))(dy||{}),yd=(l=>(l.IsTune="isTune",l))(yd||{});class bd{constructor({name:e,constructable:t,config:o,api:i,isDefault:a,isInternal:u=!1,defaultPlaceholder:f}){this.api=i,this.name=e,this.constructable=t,this.config=o,this.isDefault=a,this.isInternal=u,this.defaultPlaceholder=f}get settings(){const e=this.config.config??{};return this.isDefault&&!("placeholder"in e)&&this.defaultPlaceholder&&(e.placeholder=this.defaultPlaceholder),e}reset(){if(Oe(this.constructable.reset))return this.constructable.reset()}prepare(){const e=this.constructable.prepare;if(!Oe(e))return;const t={toolName:this.name,config:this.settings};return e.call(this.constructable,t)}get shortcut(){const e=this.constructable.shortcut;return this.config.shortcut||e}get sanitizeConfig(){return this.constructable.sanitize||{}}isInline(){return this.type===Cr.Inline}isBlock(){return this.type===Cr.Block}isTune(){return this.type===Cr.Tune}}const V1="absolute top-0 left-0 z-[3] opacity-100 visible transition-opacity duration-[250ms] ease-out will-change-[opacity,left,top] [&_[hidden]]:!hidden";class $1 extends Be{constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t}),this.opened=!1,this.popover=null,this.toolbarVerticalMargin=Kn()?20:6,this.initialized=!1,this.initializationScheduled=!1,this.tools=new Map,this.registeredShortcuts=new Map,this.shortcutsRegistered=!1,this.shortcutRegistrationScheduled=!1,this.listeners.on(document,"keydown",o=>{const i=o;i.shiftKey&&(i.key==="ArrowDown"||i.key==="ArrowUp")&&this.tryToShow()},!0),this.scheduleInitialization(),this.tryRegisterShortcuts()}set state(e){super.state=e,this.tryRegisterShortcuts()}initialize(){if(!this.initialized){if(!this.Blok?.UI?.nodes?.wrapper||this.Blok.Tools===void 0){this.scheduleInitialization();return}this.make(),this.tryRegisterShortcuts(),this.initialized=!0}}tryRegisterShortcuts(){if(this.shortcutsRegistered)return;if(this.Blok?.Tools===void 0){this.scheduleShortcutRegistration();return}this.registerInitialShortcuts()&&(this.shortcutsRegistered=!0)}scheduleShortcutRegistration(){if(this.shortcutsRegistered||this.shortcutRegistrationScheduled)return;this.shortcutRegistrationScheduled=!0;const e=()=>{this.shortcutRegistrationScheduled=!1,this.tryRegisterShortcuts()};typeof window<"u"&&typeof window.setTimeout=="function"?window.setTimeout(e,0):e()}scheduleInitialization(){if(this.initialized||this.initializationScheduled)return;this.initializationScheduled=!0;const e=()=>{this.initializationScheduled=!1,this.initialize()},t=()=>{window.setTimeout(e,0)};typeof window<"u"&&"requestIdleCallback"in window?window.requestIdleCallback(()=>{t()},{timeout:2e3}):t()}async tryToShow(e=!1){e&&this.close(),this.initialize(),this.allowedToShow()&&(await this.open(),this.Blok.Toolbar.close())}close(){if(!this.opened)return;for(const i of this.tools.values());this.tools=new Map,this.reset(),this.opened=!1;const e=this.popover??this.createFallbackPopover();e?.hide?.(),e?.destroy?.();const o=hd.mock?.results?.at(-1)?.value;o&&o!==e&&(o.hide?.(),o.destroy?.()),this.popover=null}containsNode(e){return this.nodes.wrapper===void 0?!1:this.nodes.wrapper.contains(e)}destroy(){this.removeAllNodes(),this.popover?.destroy(),this.popover=null}make(){this.nodes.wrapper=R.make("div"),this.nodes.wrapper.className=we(V1,this.isRtl?this.Blok.UI.CSS.blokRtlFix:""),this.nodes.wrapper.setAttribute(Jr,Kx),this.nodes.wrapper.setAttribute("data-blok-testid","inline-toolbar"),R.append(this.Blok.UI.nodes.wrapper,this.nodes.wrapper)}async open(){if(this.opened)return;this.initialize(),this.opened=!0,this.popover!==null&&this.popover.destroy(),this.createToolsInstances();const e=await this.getPopoverItems();this.popover=new hd({items:e,scopeElement:this.Blok.API?.methods?.ui?.nodes?.redactor??this.Blok.UI.nodes.redactor,messages:{nothingFound:Ke.ui(it.ui.popover,"Nothing found"),search:Ke.ui(it.ui.popover,"Filter")}});const t=this.popover.getElement?.(),o=this.popover.size?.width??t?.getBoundingClientRect().width??0;this.move(o),t&&this.nodes.wrapper?.append(t),this.popover.show?.()}move(e){const t=X.rect,o=this.Blok.UI.nodes.wrapper.getBoundingClientRect(),i={x:t.x-o.x,y:t.y+t.height-o.top+this.toolbarVerticalMargin};i.x+e+o.x>this.Blok.UI.contentRect.right&&(i.x=this.Blok.UI.contentRect.right-e-o.x),this.nodes.wrapper.style.left=Math.floor(i.x)+"px",this.nodes.wrapper.style.top=Math.floor(i.y)+"px"}reset(){this.nodes.wrapper!==void 0&&(this.nodes.wrapper.style.left="0",this.nodes.wrapper.style.top="0")}allowedToShow(){const e=["IMG","INPUT"],t=this.resolveSelection(),o=X.text;if(!t||!t.anchorNode||t.isCollapsed||o.length<1)return!1;const i=R.isElement(t.anchorNode)?t.anchorNode:t.anchorNode.parentElement;if(i===null||t!==null&&e.includes(i.tagName))return!1;const a=R.isElement(t.anchorNode)?t.anchorNode:t.anchorNode.parentElement,f=(a?this.Blok.BlockManager.getBlock(a):null)??this.Blok.BlockManager.currentBlock;if(f==null||this.getTools().some(k=>f.tool.inlineTools.has(k.name))===!1)return!1;const v="[contenteditable]";if(i.closest(v)!==null)return!0;const w=f.holder;return w&&(w.matches(v)?w:w.closest(v))?!0:this.Blok.ReadOnly.isEnabled?X.isSelectionAtBlok(t):!1}getTools(){const e=this.Blok.BlockManager.currentBlock??(()=>{const i=this.resolveSelection()?.anchorNode;if(!i)return null;const a=R.isElement(i)?i:i.parentElement;return a?this.Blok.BlockManager.getBlock(a):null})();return e?Array.from(e.tool.inlineTools.values()).filter(o=>!(this.Blok.ReadOnly.isEnabled&&o.isReadOnlySupported!==!0)):[]}createToolsInstances(){this.tools=new Map,this.getTools().forEach(t=>{const o=t.create();this.tools.set(t,o)})}async getPopoverItems(){const e=[],t=Array.from(this.tools.entries());for(const[o,[i,a]]of t.entries()){const u=await a.render(),f=this.getToolShortcut(i.name);this.tryEnableShortcut(i.name,f);const p=f!==void 0?dv(f):void 0,g=Ke.t(it.toolNames,i.title||ls(i.name));[u].flat().forEach(v=>{this.processPopoverItem(v,i.name,a,g,p,e,o)})}return e}tryEnableShortcut(e,t){if(t!==void 0)try{this.enableShortcuts(e,t)}catch{}}processPopoverItem(e,t,o,i,a,u,f){const p={name:t,hint:{title:i,description:a}};if(!R.isElement(e)){if(e.type===tt.Html){u.push({...p,...e,type:tt.Html});return}if(e.type===tt.Separator){u.push({type:tt.Separator});return}this.processDefaultItem(e,p,u,f)}}processDefaultItem(e,t,o,i){const a={...t,...e,type:tt.Default};o.push(a),"children"in a&&i===0&&o.push({type:tt.Separator})}getToolShortcut(e){const{Tools:t}=this.Blok,o=t.inlineTools.get(e),i=t.internal.inlineTools;return Array.from(i.keys()).includes(e)?this.inlineTools[e][uy.Shortcut]:o?.shortcut}enableShortcuts(e,t){const o=this.registeredShortcuts.get(e);o!==t&&(this.isShortcutTakenByAnotherTool(e,t)||(o!==void 0&&(eo.remove(document,o),this.registeredShortcuts.delete(e)),eo.add({name:t,handler:i=>{const{currentBlock:a}=this.Blok.BlockManager;a&&a.tool.enabledInlineTools!==!1&&(i.preventDefault(),this.activateToolByShortcut(e))},on:document}),this.registeredShortcuts.set(e,t)))}isShortcutTakenByAnotherTool(e,t){return Array.from(this.registeredShortcuts.entries()).some(([o,i])=>o!==e&&i===t)}async activateToolByShortcut(e){if(this.opened||await this.tryToShow(),this.popover){this.popover.activateItemByName(e);return}this.invokeToolActionDirectly(e)}invokeToolActionDirectly(e){const t=this.Blok.Tools.inlineTools.get(e);if(!t)return;const i=t.create().render(),a=Array.isArray(i)?i:[i];for(const u of a)if("onActivate"in u&&typeof u.onActivate=="function"){u.onActivate(u);return}}get inlineTools(){const e={};return Array.from(this.Blok.Tools.inlineTools.entries()).forEach(([t,o])=>{e[t]=o.create()}),e}registerInitialShortcuts(){const e=this.Blok.Tools?.inlineTools;return e?(Array.from(e.keys()).forEach(o=>{const i=this.getToolShortcut(o);this.tryEnableShortcut(o,i)}),!0):(this.scheduleShortcutRegistration(),!1)}createFallbackPopover(){try{const e=this.Blok.API?.methods?.ui?.nodes?.redactor??this.Blok.UI.nodes.redactor;return new hd({items:[],scopeElement:e,messages:{nothingFound:Ke.ui(it.ui.popover,"Nothing found"),search:Ke.ui(it.ui.popover,"Filter")}})}catch{return null}}resolveSelection(){const e=X.selection;if(e!==void 0)return e;const t=X.instance;return t!==void 0?t:X.get()}}const kd=" ",wd=new WeakSet,Td=()=>{const l=window.getSelection();if(l===null)return[null,0];const e=l.focusNode,t=l.focusOffset;if(e===null)return[null,0];if(e.nodeType===Node.TEXT_NODE||e.childNodes.length===0)return[e,t];const o=e.childNodes[t];if(o!==void 0)return[o,0];const i=e.childNodes[t-1]??null,a=i?.textContent??null;return[i,a!==null?a.length:0]},fy=l=>{if(!(l instanceof HTMLElement)||R.isSingleTag(l)||R.isNativeInput(l))return!1;if(l.childNodes.length===0)return!0;const e=l.textContent??"";return e.includes(kd)||!zu(e)?!1:Array.from(l.children).every(t=>fy(t))},hy=typeof window<"u"&&typeof window.MutationObserver<"u"?new window.MutationObserver(l=>{for(const e of l){const t=e.nextSibling;e.removedNodes.forEach(o=>{if(!(o instanceof Element)||!fy(o))return;const i=t instanceof Text?t:null;if(i===null||!i.isConnected||!(i.parentElement?.isContentEditable??!1))return;const u=i.textContent?.[0]??null;(u===kd||u===" ")&&wd.add(i)})}}):null,py=new WeakSet,gy=l=>{if(hy===null||py.has(l))return;const e=()=>{l.body!==null&&(hy.observe(l.body,{childList:!0,subtree:!0}),py.add(l))};l.readyState==="loading"?l.addEventListener("DOMContentLoaded",e,{once:!0}):e()};typeof window<"u"&&typeof window.document<"u"&&gy(window.document);const G1=l=>{gy(l.ownerDocument);const[e,t]=Td();if(e===null||!l.contains(e)||e.nodeType===Node.TEXT_NODE&&t<(e.textContent??"").length)return null;const o=document.createTreeWalker(l,NodeFilter.SHOW_TEXT);for(o.currentNode=e;;){const i=o.nextNode();if(i===null)return null;const a=i.textContent??"";if(a.length===0)continue;const u=a[0];if(!(u===kd||u===" ")||i===e)return null;const p=document.createRange();try{p.setStart(e,t),p.setEnd(i,0)}catch{return null}const g=p.cloneContents(),v=document.createElement("div");v.appendChild(g);const y=Array.from(v.querySelectorAll("*")).some(S=>{const k=S.textContent??"";return k.length===0||zu(k)}),w=wd.has(i);if(!(!y&&!w))return w&&wd.delete(i),{node:i,offset:0}}},my=(l,e,t,o)=>{const i=document.createRange();o==="left"?(i.selectNodeContents(l),i.setEnd(e,t)):(i.selectNodeContents(l),i.setStart(e,t));const a=i.cloneContents(),u=document.createElement("div");u.appendChild(a);const f=u.textContent||"";if(u.querySelectorAll("img, br, hr, input, area, base, col, embed, link, meta, param, source, track, wbr").length>0)return!1;const g=f.includes(" ")||u.innerHTML.includes(" ")||i.toString().includes(" "),v=e.nodeType===Node.TEXT_NODE&&(o==="left"?(e.textContent||"").slice(0,t):(e.textContent||"").slice(t)).includes(" ");if(g||v)return!1;u.style.position="absolute",u.style.visibility="hidden",u.style.height="auto",u.style.width="auto",u.style.whiteSpace=window.getComputedStyle(l).whiteSpace,document.body.appendChild(u);const y=u.getBoundingClientRect().width;return document.body.removeChild(u),!(y>0||!zu(f)||window.getComputedStyle(l).whiteSpace.startsWith("pre")&&f.length>0)},ws=l=>{const e=R.getDeepestNode(l);if(e===null||R.isEmpty(l))return!0;if(R.isNativeInput(e))return e.selectionEnd===0;if(R.isEmpty(l))return!0;const[t,o]=Td();if(t===null)return!1;const a=window.getSelection()?.focusNode??null;return a!==null&&a!==l&&!(a.nodeType===Node.TEXT_NODE&&a.parentNode===l)?!1:my(l,t,o,"left")},Ts=l=>{const e=R.getDeepestNode(l,!0);if(e===null)return!0;if(R.isNativeInput(e))return e.selectionEnd===e.value.length;const[t,o]=Td();return t===null?!1:my(l,t,o,"right")},X1=(l,e=!0)=>{if(R.isNativeInput(l)){l.focus();const y=e?0:l.value.length;l.setSelectionRange(y,y);return}const t=document.createRange(),o=window.getSelection();if(!o)return;const i=(y,w=!1)=>{const S=document.createTextNode("");w?y.insertBefore(S,y.firstChild):y.appendChild(S),t.setStart(S,0),t.setEnd(S,0)},a=(y,w)=>{if(y===null)return null;if(y.nodeType===Node.TEXT_NODE)return y;const S=w?y.firstChild:y.lastChild;return a(S,w)},u=l.childNodes,f=e?u[0]??null:u[u.length-1]??null,p=a(f,e);if(f===null){i(l),o.removeAllRanges(),o.addRange(t);return}if(p===null||p.nodeType!==Node.TEXT_NODE){i(l,e),o.removeAllRanges(),o.addRange(t);return}const g=p.textContent?.length??0,v=e?0:g;t.setStart(p,v),t.setEnd(p,v),o.removeAllRanges(),o.addRange(t)},vy={Backspace:ie.BACKSPACE,Delete:ie.DELETE,Enter:ie.ENTER,Tab:ie.TAB,ArrowDown:ie.DOWN,ArrowRight:ie.RIGHT,ArrowUp:ie.UP,ArrowLeft:ie.LEFT},Y1=new Set(["Enter","Process","Spacebar","Space","Dead"]),Ss='[contenteditable="true"], textarea, input';class Q1 extends Be{keydown(e){if(this.beforeKeydownProcessing(e),this.handleSelectedBlocksDeletion(e)||e.defaultPrevented)return;switch(this.getKeyCode(e)){case ie.BACKSPACE:this.backspace(e);break;case ie.DELETE:this.delete(e);break;case ie.ENTER:this.enter(e);break;case ie.DOWN:case ie.RIGHT:this.arrowRightAndDown(e);break;case ie.UP:case ie.LEFT:this.arrowLeftAndUp(e);break;case ie.TAB:this.tabPressed(e);break}e.key==="/"&&!e.ctrlKey&&!e.metaKey&&this.slashPressed(e),e.code==="Slash"&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),this.commandSlashPressed())}handleSelectedBlocksDeletion(e){const{BlockSelection:t,BlockManager:o,Caret:i,BlockSettings:a}=this.Blok;if(a.contains(e.target))return!1;const u=e.key==="Backspace"||e.key==="Delete",f=X.isSelectionExists,p=X.isCollapsed===!0;if(!(u&&t.anyBlockSelected&&(!f||p)))return!1;const v=o.removeSelectedBlocks();if(v!==void 0){const y=o.insertDefaultBlockAtIndex(v,!0);i.setToBlock(y,i.positions.START)}return t.clearSelection(e),e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation(),!0}beforeKeydownProcessing(e){!this.needToolbarClosing(e)||!this.isPrintableKeyEvent(e)||(this.Blok.Toolbar.close(),e.ctrlKey||e.metaKey||e.altKey||e.shiftKey)||this.Blok.BlockSelection.clearSelection(e)}keyup(e){e.shiftKey||this.Blok.UI.checkEmptiness()}handleCommandC(e){const{BlockSelection:t}=this.Blok;t.anyBlockSelected&&t.copySelectedBlocks(e)}handleCommandX(e){const{BlockSelection:t,BlockManager:o,Caret:i}=this.Blok;t.anyBlockSelected&&t.copySelectedBlocks(e).then(()=>{const a=o.removeSelectedBlocks();if(a!==void 0){const u=o.insertDefaultBlockAtIndex(a,!0);i.setToBlock(u,i.positions.START)}t.clearSelection(e)}).catch(()=>{})}tabPressed(e){const{InlineToolbar:t,Caret:o}=this.Blok;if(t.opened)return;(e.shiftKey?o.navigatePrevious(!0):o.navigateNext(!0))&&e.preventDefault()}commandSlashPressed(){this.Blok.BlockSelection.selectedBlocks.length>1||this.activateBlockSettings()}slashPressed(e){!this.Blok.UI.nodes.wrapper.contains(e.target)||!this.Blok.BlockManager.currentBlock?.isEmpty||(e.preventDefault(),this.Blok.Caret.insertContentAtCaretPosition("/"),this.activateToolbox())}enter(e){const{BlockManager:t,UI:o}=this.Blok,i=t.currentBlock;if(i===void 0||i.tool.isLineBreaksEnabled||o.someToolbarOpened&&o.someFlipperButtonFocused||e.shiftKey&&!Fu)return;const a=i.currentInput!==void 0&&ws(i.currentInput)&&!i.hasMedia?(this.Blok.BlockManager.insertDefaultBlockAtIndex(this.Blok.BlockManager.currentBlockIndex),i):i.currentInput&&Ts(i.currentInput)?this.Blok.BlockManager.insertDefaultBlockAtIndex(this.Blok.BlockManager.currentBlockIndex+1):this.Blok.BlockManager.split();this.Blok.Caret.setToBlock(a),this.Blok.Toolbar.moveAndOpen(a),e.preventDefault()}backspace(e){const{BlockManager:t,Caret:o}=this.Blok,{currentBlock:i,previousBlock:a}=t;if(i===void 0||!X.isCollapsed||!i.currentInput||!ws(i.currentInput))return;if(e.preventDefault(),this.Blok.Toolbar.close(),!(i.currentInput===i.firstInput)){o.navigatePrevious();return}if(a===null)return;if(a.isEmpty){t.removeBlock(a);return}if(i.isEmpty){t.removeBlock(i);const p=t.currentBlock;p&&o.setToBlock(p,o.positions.END);return}Fv(a,i)?this.mergeBlocks(a,i):o.setToBlock(a,o.positions.END)}delete(e){const{BlockManager:t,Caret:o}=this.Blok,{currentBlock:i,nextBlock:a}=t;if(i===void 0||!X.isCollapsed||!i.currentInput||!Ts(i.currentInput))return;if(e.preventDefault(),this.Blok.Toolbar.close(),!(i.currentInput===i.lastInput)){o.navigateNext();return}if(a===null)return;if(a.isEmpty){t.removeBlock(a);return}if(i.isEmpty){t.removeBlock(i),o.setToBlock(a,o.positions.START);return}Fv(i,a)?this.mergeBlocks(i,a):o.setToBlock(a,o.positions.START)}mergeBlocks(e,t){const{BlockManager:o,Toolbar:i}=this.Blok;e.lastInput!==void 0&&(X1(e.lastInput,!1),o.mergeBlocks(e,t).then(()=>{i.close()}).catch(()=>{}))}arrowRightAndDown(e){const t=this.getKeyCode(e);if(t===null)return;const o=$n.usedKeys.includes(t)&&(!e.shiftKey||t===ie.TAB);if(this.Blok.UI.someToolbarOpened&&o)return;e.shiftKey||this.Blok.Toolbar.close();const i=X.get();i?.anchorNode&&!this.Blok.BlockSelection.anyBlockSelected&&this.Blok.BlockManager.setCurrentBlockByChildNode(i.anchorNode);const{currentBlock:a}=this.Blok.BlockManager,u=e.target,f=document.activeElement instanceof HTMLElement?document.activeElement:null,p=[a?.inputs.find(L=>u!==null&&L.contains(u)),a?.inputs.find(L=>f!==null&&L.contains(f)),u?.closest(Ss),f?.closest(Ss)],g=a?.currentInput??p.find(L=>L instanceof HTMLElement),y=(g!==void 0?Ts(g):void 0)||this.Blok.BlockSelection.anyBlockSelected,w=e.shiftKey&&t===ie.DOWN;if(w&&y){this.Blok.CrossBlockSelection.toggleBlockSelectedState();return}w&&this.Blok.InlineToolbar.tryToShow();const k=t===ie.RIGHT&&!e.shiftKey&&!this.isRtl&&g instanceof HTMLElement?G1(g):null;if(k!==null){X.setCursor(k.node,k.offset),e.preventDefault();return}if(t===ie.DOWN||t===ie.RIGHT&&!this.isRtl?this.Blok.Caret.navigateNext():this.Blok.Caret.navigatePrevious()){e.preventDefault();return}ss(()=>{this.Blok.BlockManager.currentBlock&&this.Blok.BlockManager.currentBlock.updateCurrentInput()},20)(),this.Blok.BlockSelection.clearSelection(e)}arrowLeftAndUp(e){const t=this.Blok.UI.someToolbarOpened,o=this.getKeyCode(e);if(o===null||t&&$n.usedKeys.includes(o)&&(!e.shiftKey||o===ie.TAB))return;t&&this.Blok.UI.closeAllToolbars(),e.shiftKey||this.Blok.Toolbar.close();const i=window.getSelection();i?.anchorNode&&!this.Blok.BlockSelection.anyBlockSelected&&this.Blok.BlockManager.setCurrentBlockByChildNode(i.anchorNode);const{currentBlock:a}=this.Blok.BlockManager,u=e.target,f=document.activeElement instanceof HTMLElement?document.activeElement:null,p=[a?.inputs.find(E=>u!==null&&E.contains(u)),a?.inputs.find(E=>f!==null&&E.contains(f)),u?.closest(Ss),f?.closest(Ss)],g=a?.currentInput??p.find(E=>E instanceof HTMLElement),y=(g!==void 0?ws(g):void 0)||this.Blok.BlockSelection.anyBlockSelected,w=e.shiftKey&&o===ie.UP;if(w&&y){this.Blok.CrossBlockSelection.toggleBlockSelectedState(!1);return}if(w&&this.Blok.InlineToolbar.tryToShow(),o===ie.UP||o===ie.LEFT&&!this.isRtl?this.Blok.Caret.navigatePrevious():this.Blok.Caret.navigateNext()){e.preventDefault();return}ss(()=>{this.Blok.BlockManager.currentBlock&&this.Blok.BlockManager.currentBlock.updateCurrentInput()},20)(),this.Blok.BlockSelection.clearSelection(e)}needToolbarClosing(e){const t=this.getKeyCode(e),o=t===ie.ENTER,i=t===ie.TAB,a=o&&this.Blok.Toolbar.toolbox.opened,u=o&&this.Blok.BlockSettings.opened,f=o&&this.Blok.InlineToolbar.opened,p=i;return!(e.shiftKey||p||a||u||f)}activateToolbox(){this.Blok.Toolbar.opened||this.Blok.Toolbar.moveAndOpen(),this.Blok.Toolbar.toolbox.open()}activateBlockSettings(){this.Blok.Toolbar.opened||this.Blok.Toolbar.moveAndOpen(),this.Blok.BlockSettings.opened||Promise.resolve(this.Blok.BlockSettings.open()).catch(()=>{})}getKeyCode(e){const t=e.key&&vy[e.key];if(t!==void 0&&typeof t=="number")return t;const o=e.code&&vy[e.code];return o!==void 0&&typeof o=="number"?o:null}isPrintableKeyEvent(e){return e.key?e.key.length===1||Y1.has(e.key):!1}}class Sd{constructor(e){this.blocks=[],this.workingArea=e}get length(){return this.blocks.length}get array(){return this.blocks}get nodes(){return av(this.workingArea.children)}static set(e,t,o){return isNaN(Number(t))?(Reflect.set(e,t,o),!0):(e.insert(+t,o),!0)}static get(e,t){return isNaN(Number(t))?Reflect.get(e,t):e.get(+t)}push(e){this.blocks.push(e),this.insertToDOM(e)}move(e,t,o=!1){const i=this.blocks.splice(t,1)[0];if(!o){const u=e-1,f=Math.max(0,u),p=this.blocks[f],g=e>0?"afterend":"beforebegin";this.insertToDOM(i,g,p)}this.blocks.splice(e,0,i);const a=this.composeBlockEvent("move",{fromIndex:t,toIndex:e});i.call(In.MOVED,a)}insert(e,t,o=!1){if(!this.length){this.push(t);return}const i=e>this.length?this.length:e;o&&(this.blocks[i].holder.remove(),this.blocks[i].call(In.REMOVED));const a=o?1:0;if(this.blocks.splice(i,a,t),i>0){const f=this.blocks[i-1];this.insertToDOM(t,"afterend",f);return}const u=this.blocks[i+1];if(u!==void 0){this.insertToDOM(t,"beforebegin",u);return}this.insertToDOM(t)}replace(e,t){if(this.blocks[e]===void 0)throw Error("Incorrect index");this.blocks[e].holder.replaceWith(t.holder),this.blocks[e]=t}insertMany(e,t){const o=new DocumentFragment;for(const i of e)o.appendChild(i.holder);if(!this.length){this.blocks.push(...e),this.workingArea.appendChild(o),e.forEach(i=>i.call(In.RENDERED));return}if(t>0){const i=Math.min(t-1,this.length-1);this.blocks[i].holder.after(o)}t===0&&this.workingArea.prepend(o),this.blocks.splice(t,0,...e),e.forEach(i=>i.call(In.RENDERED))}remove(e){const t=isNaN(e)?this.length-1:e;this.blocks[t].holder.remove(),this.blocks[t].call(In.REMOVED),this.blocks.splice(t,1)}removeAll(){this.workingArea.innerHTML="",this.blocks.forEach(e=>e.call(In.REMOVED)),this.blocks.length=0}insertAfter(e,t){const o=this.blocks.indexOf(e);this.insert(o+1,t)}get(e){return this.blocks[e]}indexOf(e){return this.blocks.indexOf(e)}insertToDOM(e,t,o){t&&o!==void 0?o.holder.insertAdjacentElement(t,e.holder):this.workingArea.appendChild(e.holder),e.call(In.RENDERED)}composeBlockEvent(e,t){return new CustomEvent(e,{detail:t})}}function yy(l,e){var t=Object.keys(l);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(l);e&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(l,i).enumerable})),t.push.apply(t,o)}return t}function bn(l){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?yy(Object(t),!0).forEach(function(o){Z1(l,o,t[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(t)):yy(Object(t)).forEach(function(o){Object.defineProperty(l,o,Object.getOwnPropertyDescriptor(t,o))})}return l}function xs(l){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?xs=function(e){return typeof e}:xs=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xs(l)}function Z1(l,e,t){return e in l?Object.defineProperty(l,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):l[e]=t,l}function Rn(){return Rn=Object.assign||function(l){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(l[o]=t[o])}return l},Rn.apply(this,arguments)}function J1(l,e){if(l==null)return{};var t={},o=Object.keys(l),i,a;for(a=0;a<o.length;a++)i=o[a],!(e.indexOf(i)>=0)&&(t[i]=l[i]);return t}function eC(l,e){if(l==null)return{};var t=J1(l,e),o,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(l);for(i=0;i<a.length;i++)o=a[i],!(e.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(l,o)&&(t[o]=l[o])}return t}var tC="1.15.6";function On(l){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(l)}var Pn=On(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Qo=On(/Edge/i),by=On(/firefox/i),Zo=On(/safari/i)&&!On(/chrome/i)&&!On(/android/i),xd=On(/iP(ad|od|hone)/i),ky=On(/chrome/i)&&On(/android/i),wy={capture:!1,passive:!1};function Ae(l,e,t){l.addEventListener(e,t,!Pn&&wy)}function Ce(l,e,t){l.removeEventListener(e,t,!Pn&&wy)}function Cs(l,e){if(e){if(e[0]===">"&&(e=e.substring(1)),l)try{if(l.matches)return l.matches(e);if(l.msMatchesSelector)return l.msMatchesSelector(e);if(l.webkitMatchesSelector)return l.webkitMatchesSelector(e)}catch{return!1}return!1}}function Ty(l){return l.host&&l!==document&&l.host.nodeType?l.host:l.parentNode}function sn(l,e,t,o){if(l){t=t||document;do{if(e!=null&&(e[0]===">"?l.parentNode===t&&Cs(l,e):Cs(l,e))||o&&l===t)return l;if(l===t)break}while(l=Ty(l))}return null}var Sy=/\s+/g;function Ht(l,e,t){if(l&&e)if(l.classList)l.classList[t?"add":"remove"](e);else{var o=(" "+l.className+" ").replace(Sy," ").replace(" "+e+" "," ");l.className=(o+(t?" "+e:"")).replace(Sy," ")}}function fe(l,e,t){var o=l&&l.style;if(o){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(l,""):l.currentStyle&&(t=l.currentStyle),e===void 0?t:t[e];!(e in o)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),o[e]=t+(typeof t=="string"?"":"px")}}function no(l,e){var t="";if(typeof l=="string")t=l;else do{var o=fe(l,"transform");o&&o!=="none"&&(t=o+" "+t)}while(!e&&(l=l.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(t)}function xy(l,e,t){if(l){var o=l.getElementsByTagName(e),i=0,a=o.length;if(t)for(;i<a;i++)t(o[i],i);return o}return[]}function kn(){var l=document.scrollingElement;return l||document.documentElement}function st(l,e,t,o,i){if(!(!l.getBoundingClientRect&&l!==window)){var a,u,f,p,g,v,y;if(l!==window&&l.parentNode&&l!==kn()?(a=l.getBoundingClientRect(),u=a.top,f=a.left,p=a.bottom,g=a.right,v=a.height,y=a.width):(u=0,f=0,p=window.innerHeight,g=window.innerWidth,v=window.innerHeight,y=window.innerWidth),(e||t)&&l!==window&&(i=i||l.parentNode,!Pn))do if(i&&i.getBoundingClientRect&&(fe(i,"transform")!=="none"||t&&fe(i,"position")!=="static")){var w=i.getBoundingClientRect();u-=w.top+parseInt(fe(i,"border-top-width")),f-=w.left+parseInt(fe(i,"border-left-width")),p=u+a.height,g=f+a.width;break}while(i=i.parentNode);if(o&&l!==window){var S=no(i||l),k=S&&S.a,E=S&&S.d;S&&(u/=E,f/=k,y/=k,v/=E,p=u+v,g=f+y)}return{top:u,left:f,bottom:p,right:g,width:y,height:v}}}function Cy(l,e,t){for(var o=Gn(l,!0),i=st(l)[e];o;){var a=st(o)[t],u=void 0;if(u=i>=a,!u)return o;if(o===kn())break;o=Gn(o,!1)}return!1}function ro(l,e,t,o){for(var i=0,a=0,u=l.children;a<u.length;){if(u[a].style.display!=="none"&&u[a]!==he.ghost&&(o||u[a]!==he.dragged)&&sn(u[a],t.draggable,l,!1)){if(i===e)return u[a];i++}a++}return null}function Cd(l,e){for(var t=l.lastElementChild;t&&(t===he.ghost||fe(t,"display")==="none"||e&&!Cs(t,e));)t=t.previousElementSibling;return t||null}function Yt(l,e){var t=0;if(!l||!l.parentNode)return-1;for(;l=l.previousElementSibling;)l.nodeName.toUpperCase()!=="TEMPLATE"&&l!==he.clone&&(!e||Cs(l,e))&&t++;return t}function Ey(l){var e=0,t=0,o=kn();if(l)do{var i=no(l),a=i.a,u=i.d;e+=l.scrollLeft*a,t+=l.scrollTop*u}while(l!==o&&(l=l.parentNode));return[e,t]}function nC(l,e){for(var t in l)if(l.hasOwnProperty(t)){for(var o in e)if(e.hasOwnProperty(o)&&e[o]===l[t][o])return Number(t)}return-1}function Gn(l,e){if(!l||!l.getBoundingClientRect)return kn();var t=l,o=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var i=fe(t);if(t.clientWidth<t.scrollWidth&&(i.overflowX=="auto"||i.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(i.overflowY=="auto"||i.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return kn();if(o||e)return t;o=!0}}while(t=t.parentNode);return kn()}function rC(l,e){if(l&&e)for(var t in e)e.hasOwnProperty(t)&&(l[t]=e[t]);return l}function Ed(l,e){return Math.round(l.top)===Math.round(e.top)&&Math.round(l.left)===Math.round(e.left)&&Math.round(l.height)===Math.round(e.height)&&Math.round(l.width)===Math.round(e.width)}var Jo;function By(l,e){return function(){if(!Jo){var t=arguments,o=this;t.length===1?l.call(o,t[0]):l.apply(o,t),Jo=setTimeout(function(){Jo=void 0},e)}}}function oC(){clearTimeout(Jo),Jo=void 0}function Ay(l,e,t){l.scrollLeft+=e,l.scrollTop+=t}function Iy(l){var e=window.Polymer,t=window.jQuery||window.Zepto;return e&&e.dom?e.dom(l).cloneNode(!0):t?t(l).clone(!0)[0]:l.cloneNode(!0)}function _y(l,e,t){var o={};return Array.from(l.children).forEach(function(i){var a,u,f,p;if(!(!sn(i,e.draggable,l,!1)||i.animated||i===t)){var g=st(i);o.left=Math.min((a=o.left)!==null&&a!==void 0?a:1/0,g.left),o.top=Math.min((u=o.top)!==null&&u!==void 0?u:1/0,g.top),o.right=Math.max((f=o.right)!==null&&f!==void 0?f:-1/0,g.right),o.bottom=Math.max((p=o.bottom)!==null&&p!==void 0?p:-1/0,g.bottom)}}),o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}var Ot="Sortable"+new Date().getTime();function iC(){var l=[],e;return{captureAnimationState:function(){if(l=[],!!this.options.animation){var o=[].slice.call(this.el.children);o.forEach(function(i){if(!(fe(i,"display")==="none"||i===he.ghost)){l.push({target:i,rect:st(i)});var a=bn({},l[l.length-1].rect);if(i.thisAnimationDuration){var u=no(i,!0);u&&(a.top-=u.f,a.left-=u.e)}i.fromRect=a}})}},addAnimationState:function(o){l.push(o)},removeAnimationState:function(o){l.splice(nC(l,{target:o}),1)},animateAll:function(o){var i=this;if(!this.options.animation){clearTimeout(e),typeof o=="function"&&o();return}var a=!1,u=0;l.forEach(function(f){var p=0,g=f.target,v=g.fromRect,y=st(g),w=g.prevFromRect,S=g.prevToRect,k=f.rect,E=no(g,!0);E&&(y.top-=E.f,y.left-=E.e),g.toRect=y,g.thisAnimationDuration&&Ed(w,y)&&!Ed(v,y)&&(k.top-y.top)/(k.left-y.left)===(v.top-y.top)/(v.left-y.left)&&(p=lC(k,w,S,i.options)),Ed(y,v)||(g.prevFromRect=v,g.prevToRect=y,p||(p=i.options.animation),i.animate(g,k,y,p)),p&&(a=!0,u=Math.max(u,p),clearTimeout(g.animationResetTimer),g.animationResetTimer=setTimeout(function(){g.animationTime=0,g.prevFromRect=null,g.fromRect=null,g.prevToRect=null,g.thisAnimationDuration=null},p),g.thisAnimationDuration=p)}),clearTimeout(e),a?e=setTimeout(function(){typeof o=="function"&&o()},u):typeof o=="function"&&o(),l=[]},animate:function(o,i,a,u){if(u){fe(o,"transition",""),fe(o,"transform","");var f=no(this.el),p=f&&f.a,g=f&&f.d,v=(i.left-a.left)/(p||1),y=(i.top-a.top)/(g||1);o.animatingX=!!v,o.animatingY=!!y,fe(o,"transform","translate3d("+v+"px,"+y+"px,0)"),this.forRepaintDummy=sC(o),fe(o,"transition","transform "+u+"ms"+(this.options.easing?" "+this.options.easing:"")),fe(o,"transform","translate3d(0,0,0)"),typeof o.animated=="number"&&clearTimeout(o.animated),o.animated=setTimeout(function(){fe(o,"transition",""),fe(o,"transform",""),o.animated=!1,o.animatingX=!1,o.animatingY=!1},u)}}}}function sC(l){return l.offsetWidth}function lC(l,e,t,o){return Math.sqrt(Math.pow(e.top-l.top,2)+Math.pow(e.left-l.left,2))/Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))*o.animation}var oo=[],Bd={initializeByDefault:!0},ei={mount:function(e){for(var t in Bd)Bd.hasOwnProperty(t)&&!(t in e)&&(e[t]=Bd[t]);oo.forEach(function(o){if(o.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),oo.push(e)},pluginEvent:function(e,t,o){var i=this;this.eventCanceled=!1,o.cancel=function(){i.eventCanceled=!0};var a=e+"Global";oo.forEach(function(u){t[u.pluginName]&&(t[u.pluginName][a]&&t[u.pluginName][a](bn({sortable:t},o)),t.options[u.pluginName]&&t[u.pluginName][e]&&t[u.pluginName][e](bn({sortable:t},o)))})},initializePlugins:function(e,t,o,i){oo.forEach(function(f){var p=f.pluginName;if(!(!e.options[p]&&!f.initializeByDefault)){var g=new f(e,t,e.options);g.sortable=e,g.options=e.options,e[p]=g,Rn(o,g.defaults)}});for(var a in e.options)if(e.options.hasOwnProperty(a)){var u=this.modifyOption(e,a,e.options[a]);typeof u<"u"&&(e.options[a]=u)}},getEventProperties:function(e,t){var o={};return oo.forEach(function(i){typeof i.eventProperties=="function"&&Rn(o,i.eventProperties.call(t[i.pluginName],e))}),o},modifyOption:function(e,t,o){var i;return oo.forEach(function(a){e[a.pluginName]&&a.optionListeners&&typeof a.optionListeners[t]=="function"&&(i=a.optionListeners[t].call(e[a.pluginName],o))}),i}};function aC(l){var e=l.sortable,t=l.rootEl,o=l.name,i=l.targetEl,a=l.cloneEl,u=l.toEl,f=l.fromEl,p=l.oldIndex,g=l.newIndex,v=l.oldDraggableIndex,y=l.newDraggableIndex,w=l.originalEvent,S=l.putSortable,k=l.extraEventProperties;if(e=e||t&&t[Ot],!!e){var E,_=e.options,L="on"+o.charAt(0).toUpperCase()+o.substr(1);window.CustomEvent&&!Pn&&!Qo?E=new CustomEvent(o,{bubbles:!0,cancelable:!0}):(E=document.createEvent("Event"),E.initEvent(o,!0,!0)),E.to=u||t,E.from=f||t,E.item=i||t,E.clone=a,E.oldIndex=p,E.newIndex=g,E.oldDraggableIndex=v,E.newDraggableIndex=y,E.originalEvent=w,E.pullMode=S?S.lastPutMode:void 0;var P=bn(bn({},k),ei.getEventProperties(o,e));for(var K in P)E[K]=P[K];t&&t.dispatchEvent(E),_[L]&&_[L].call(e,E)}}var cC=["evt"],Pt=function(e,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=o.evt,a=eC(o,cC);ei.pluginEvent.bind(he)(e,t,bn({dragEl:U,parentEl:Ze,ghostEl:ve,rootEl:Ve,nextEl:Er,lastDownEl:Es,cloneEl:Ge,cloneHidden:Xn,dragStarted:ni,putSortable:yt,activeSortable:he.active,originalEvent:i,oldIndex:io,oldDraggableIndex:ti,newIndex:jt,newDraggableIndex:Yn,hideGhostForTarget:My,unhideGhostForTarget:Fy,cloneNowHidden:function(){Xn=!0},cloneNowShown:function(){Xn=!1},dispatchSortableEvent:function(f){At({sortable:t,name:f,originalEvent:i})}},a))};function At(l){aC(bn({putSortable:yt,cloneEl:Ge,targetEl:U,rootEl:Ve,oldIndex:io,oldDraggableIndex:ti,newIndex:jt,newDraggableIndex:Yn},l))}var U,Ze,ve,Ve,Er,Es,Ge,Xn,io,jt,ti,Yn,Bs,yt,so=!1,As=!1,Is=[],Br,ln,Ad,Id,Ny,Ry,ni,lo,ri,oi=!1,_s=!1,Ns,wt,_d=[],Nd=!1,Rs=[],Os=typeof document<"u",Ps=xd,Oy=Qo||Pn?"cssFloat":"float",uC=Os&&!ky&&!xd&&"draggable"in document.createElement("div"),Py=(function(){if(Os){if(Pn)return!1;var l=document.createElement("x");return l.style.cssText="pointer-events:auto",l.style.pointerEvents==="auto"}})(),Ly=function(e,t){var o=fe(e),i=parseInt(o.width)-parseInt(o.paddingLeft)-parseInt(o.paddingRight)-parseInt(o.borderLeftWidth)-parseInt(o.borderRightWidth),a=ro(e,0,t),u=ro(e,1,t),f=a&&fe(a),p=u&&fe(u),g=f&&parseInt(f.marginLeft)+parseInt(f.marginRight)+st(a).width,v=p&&parseInt(p.marginLeft)+parseInt(p.marginRight)+st(u).width;if(o.display==="flex")return o.flexDirection==="column"||o.flexDirection==="column-reverse"?"vertical":"horizontal";if(o.display==="grid")return o.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(a&&f.float&&f.float!=="none"){var y=f.float==="left"?"left":"right";return u&&(p.clear==="both"||p.clear===y)?"vertical":"horizontal"}return a&&(f.display==="block"||f.display==="flex"||f.display==="table"||f.display==="grid"||g>=i&&o[Oy]==="none"||u&&o[Oy]==="none"&&g+v>i)?"vertical":"horizontal"},dC=function(e,t,o){var i=o?e.left:e.top,a=o?e.right:e.bottom,u=o?e.width:e.height,f=o?t.left:t.top,p=o?t.right:t.bottom,g=o?t.width:t.height;return i===f||a===p||i+u/2===f+g/2},fC=function(e,t){var o;return Is.some(function(i){var a=i[Ot].options.emptyInsertThreshold;if(!(!a||Cd(i))){var u=st(i),f=e>=u.left-a&&e<=u.right+a,p=t>=u.top-a&&t<=u.bottom+a;if(f&&p)return o=i}}),o},Dy=function(e){function t(a,u){return function(f,p,g,v){var y=f.options.group.name&&p.options.group.name&&f.options.group.name===p.options.group.name;if(a==null&&(u||y))return!0;if(a==null||a===!1)return!1;if(u&&a==="clone")return a;if(typeof a=="function")return t(a(f,p,g,v),u)(f,p,g,v);var w=(u?f:p).options.group.name;return a===!0||typeof a=="string"&&a===w||a.join&&a.indexOf(w)>-1}}var o={},i=e.group;(!i||xs(i)!="object")&&(i={name:i}),o.name=i.name,o.checkPull=t(i.pull,!0),o.checkPut=t(i.put),o.revertClone=i.revertClone,e.group=o},My=function(){!Py&&ve&&fe(ve,"display","none")},Fy=function(){!Py&&ve&&fe(ve,"display","")};Os&&!ky&&document.addEventListener("click",function(l){if(As)return l.preventDefault(),l.stopPropagation&&l.stopPropagation(),l.stopImmediatePropagation&&l.stopImmediatePropagation(),As=!1,!1},!0);var Ar=function(e){if(U){e=e.touches?e.touches[0]:e;var t=fC(e.clientX,e.clientY);if(t){var o={};for(var i in e)e.hasOwnProperty(i)&&(o[i]=e[i]);o.target=o.rootEl=t,o.preventDefault=void 0,o.stopPropagation=void 0,t[Ot]._onDragOver(o)}}},hC=function(e){U&&U.parentNode[Ot]._isOutsideThisEl(e.target)};function he(l,e){if(!(l&&l.nodeType&&l.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(l));this.el=l,this.options=e=Rn({},e),l[Ot]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(l.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Ly(l,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(u,f){u.setData("Text",f.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:he.supportPointer!==!1&&"PointerEvent"in window&&(!Zo||xd),emptyInsertThreshold:5};ei.initializePlugins(this,l,t);for(var o in t)!(o in e)&&(e[o]=t[o]);Dy(e);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=e.forceFallback?!1:uC,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Ae(l,"pointerdown",this._onTapStart):(Ae(l,"mousedown",this._onTapStart),Ae(l,"touchstart",this._onTapStart)),this.nativeDraggable&&(Ae(l,"dragover",this),Ae(l,"dragenter",this)),Is.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Rn(this,iC())}he.prototype={constructor:he,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(lo=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,U):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,o=this.el,i=this.options,a=i.preventOnFilter,u=e.type,f=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,p=(f||e).target,g=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||p,v=i.filter;if(wC(o),!U&&!(/mousedown|pointerdown/.test(u)&&e.button!==0||i.disabled)&&!g.isContentEditable&&!(!this.nativeDraggable&&Zo&&p&&p.tagName.toUpperCase()==="SELECT")&&(p=sn(p,i.draggable,o,!1),!(p&&p.animated)&&Es!==p)){if(io=Yt(p),ti=Yt(p,i.draggable),typeof v=="function"){if(v.call(this,e,p,this)){At({sortable:t,rootEl:g,name:"filter",targetEl:p,toEl:o,fromEl:o}),Pt("filter",t,{evt:e}),a&&e.preventDefault();return}}else if(v&&(v=v.split(",").some(function(y){if(y=sn(g,y.trim(),o,!1),y)return At({sortable:t,rootEl:y,name:"filter",targetEl:p,fromEl:o,toEl:o}),Pt("filter",t,{evt:e}),!0}),v)){a&&e.preventDefault();return}i.handle&&!sn(g,i.handle,o,!1)||this._prepareDragStart(e,f,p)}}},_prepareDragStart:function(e,t,o){var i=this,a=i.el,u=i.options,f=a.ownerDocument,p;if(o&&!U&&o.parentNode===a){var g=st(o);if(Ve=a,U=o,Ze=U.parentNode,Er=U.nextSibling,Es=o,Bs=u.group,he.dragged=U,Br={target:U,clientX:(t||e).clientX,clientY:(t||e).clientY},Ny=Br.clientX-g.left,Ry=Br.clientY-g.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,U.style["will-change"]="all",p=function(){if(Pt("delayEnded",i,{evt:e}),he.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!by&&i.nativeDraggable&&(U.draggable=!0),i._triggerDragStart(e,t),At({sortable:i,name:"choose",originalEvent:e}),Ht(U,u.chosenClass,!0)},u.ignore.split(",").forEach(function(v){xy(U,v.trim(),Rd)}),Ae(f,"dragover",Ar),Ae(f,"mousemove",Ar),Ae(f,"touchmove",Ar),u.supportPointer?(Ae(f,"pointerup",i._onDrop),!this.nativeDraggable&&Ae(f,"pointercancel",i._onDrop)):(Ae(f,"mouseup",i._onDrop),Ae(f,"touchend",i._onDrop),Ae(f,"touchcancel",i._onDrop)),by&&this.nativeDraggable&&(this.options.touchStartThreshold=4,U.draggable=!0),Pt("delayStart",this,{evt:e}),u.delay&&(!u.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(Qo||Pn))){if(he.eventCanceled){this._onDrop();return}u.supportPointer?(Ae(f,"pointerup",i._disableDelayedDrag),Ae(f,"pointercancel",i._disableDelayedDrag)):(Ae(f,"mouseup",i._disableDelayedDrag),Ae(f,"touchend",i._disableDelayedDrag),Ae(f,"touchcancel",i._disableDelayedDrag)),Ae(f,"mousemove",i._delayedDragTouchMoveHandler),Ae(f,"touchmove",i._delayedDragTouchMoveHandler),u.supportPointer&&Ae(f,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(p,u.delay)}else p()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){U&&Rd(U),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;Ce(e,"mouseup",this._disableDelayedDrag),Ce(e,"touchend",this._disableDelayedDrag),Ce(e,"touchcancel",this._disableDelayedDrag),Ce(e,"pointerup",this._disableDelayedDrag),Ce(e,"pointercancel",this._disableDelayedDrag),Ce(e,"mousemove",this._delayedDragTouchMoveHandler),Ce(e,"touchmove",this._delayedDragTouchMoveHandler),Ce(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?Ae(document,"pointermove",this._onTouchMove):t?Ae(document,"touchmove",this._onTouchMove):Ae(document,"mousemove",this._onTouchMove):(Ae(U,"dragend",this),Ae(Ve,"dragstart",this._onDragStart));try{document.selection?Ds(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(so=!1,Ve&&U){Pt("dragStarted",this,{evt:t}),this.nativeDraggable&&Ae(document,"dragover",hC);var o=this.options;!e&&Ht(U,o.dragClass,!1),Ht(U,o.ghostClass,!0),he.active=this,e&&this._appendGhost(),At({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(ln){this._lastX=ln.clientX,this._lastY=ln.clientY,My();for(var e=document.elementFromPoint(ln.clientX,ln.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(ln.clientX,ln.clientY),e!==t);)t=e;if(U.parentNode[Ot]._isOutsideThisEl(e),t)do{if(t[Ot]){var o=void 0;if(o=t[Ot]._onDragOver({clientX:ln.clientX,clientY:ln.clientY,target:e,rootEl:t}),o&&!this.options.dragoverBubble)break}e=t}while(t=Ty(t));Fy()}},_onTouchMove:function(e){if(Br){var t=this.options,o=t.fallbackTolerance,i=t.fallbackOffset,a=e.touches?e.touches[0]:e,u=ve&&no(ve,!0),f=ve&&u&&u.a,p=ve&&u&&u.d,g=Ps&&wt&&Ey(wt),v=(a.clientX-Br.clientX+i.x)/(f||1)+(g?g[0]-_d[0]:0)/(f||1),y=(a.clientY-Br.clientY+i.y)/(p||1)+(g?g[1]-_d[1]:0)/(p||1);if(!he.active&&!so){if(o&&Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))<o)return;this._onDragStart(e,!0)}if(ve){u?(u.e+=v-(Ad||0),u.f+=y-(Id||0)):u={a:1,b:0,c:0,d:1,e:v,f:y};var w="matrix(".concat(u.a,",").concat(u.b,",").concat(u.c,",").concat(u.d,",").concat(u.e,",").concat(u.f,")");fe(ve,"webkitTransform",w),fe(ve,"mozTransform",w),fe(ve,"msTransform",w),fe(ve,"transform",w),Ad=v,Id=y,ln=a}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!ve){var e=this.options.fallbackOnBody?document.body:Ve,t=st(U,!0,Ps,!0,e),o=this.options;if(Ps){for(wt=e;fe(wt,"position")==="static"&&fe(wt,"transform")==="none"&&wt!==document;)wt=wt.parentNode;wt!==document.body&&wt!==document.documentElement?(wt===document&&(wt=kn()),t.top+=wt.scrollTop,t.left+=wt.scrollLeft):wt=kn(),_d=Ey(wt)}ve=U.cloneNode(!0),Ht(ve,o.ghostClass,!1),Ht(ve,o.fallbackClass,!0),Ht(ve,o.dragClass,!0),fe(ve,"transition",""),fe(ve,"transform",""),fe(ve,"box-sizing","border-box"),fe(ve,"margin",0),fe(ve,"top",t.top),fe(ve,"left",t.left),fe(ve,"width",t.width),fe(ve,"height",t.height),fe(ve,"opacity","0.8"),fe(ve,"position",Ps?"absolute":"fixed"),fe(ve,"zIndex","100000"),fe(ve,"pointerEvents","none"),he.ghost=ve,e.appendChild(ve),fe(ve,"transform-origin",Ny/parseInt(ve.style.width)*100+"% "+Ry/parseInt(ve.style.height)*100+"%")}},_onDragStart:function(e,t){var o=this,i=e.dataTransfer,a=o.options;if(Pt("dragStart",this,{evt:e}),he.eventCanceled){this._onDrop();return}Pt("setupClone",this),he.eventCanceled||(Ge=Iy(U),Ge.removeAttribute("id"),Ge.draggable=!1,Ge.style["will-change"]="",this._hideClone(),Ht(Ge,this.options.chosenClass,!1),he.clone=Ge),o.cloneId=Ds(function(){Pt("clone",o),!he.eventCanceled&&(o.options.removeCloneOnHide||Ve.insertBefore(Ge,U),o._hideClone(),At({sortable:o,name:"clone"}))}),!t&&Ht(U,a.dragClass,!0),t?(As=!0,o._loopId=setInterval(o._emulateDragOver,50)):(Ce(document,"mouseup",o._onDrop),Ce(document,"touchend",o._onDrop),Ce(document,"touchcancel",o._onDrop),i&&(i.effectAllowed="move",a.setData&&a.setData.call(o,i,U)),Ae(document,"drop",o),fe(U,"transform","translateZ(0)")),so=!0,o._dragStartId=Ds(o._dragStarted.bind(o,t,e)),Ae(document,"selectstart",o),ni=!0,window.getSelection().removeAllRanges(),Zo&&fe(document.body,"user-select","none")},_onDragOver:function(e){var t=this.el,o=e.target,i,a,u,f=this.options,p=f.group,g=he.active,v=Bs===p,y=f.sort,w=yt||g,S,k=this,E=!1;if(Nd)return;function _(O,le){Pt(O,k,bn({evt:e,isOwner:v,axis:S?"vertical":"horizontal",revert:u,dragRect:i,targetRect:a,canSort:y,fromSortable:w,target:o,completed:P,onMove:function(B,D){return Ls(Ve,t,U,i,B,st(B),e,D)},changed:K},le))}function L(){_("dragOverAnimationCapture"),k.captureAnimationState(),k!==w&&w.captureAnimationState()}function P(O){return _("dragOverCompleted",{insertion:O}),O&&(v?g._hideClone():g._showClone(k),k!==w&&(Ht(U,yt?yt.options.ghostClass:g.options.ghostClass,!1),Ht(U,f.ghostClass,!0)),yt!==k&&k!==he.active?yt=k:k===he.active&&yt&&(yt=null),w===k&&(k._ignoreWhileAnimating=o),k.animateAll(function(){_("dragOverAnimationComplete"),k._ignoreWhileAnimating=null}),k!==w&&(w.animateAll(),w._ignoreWhileAnimating=null)),(o===U&&!U.animated||o===t&&!o.animated)&&(lo=null),!f.dragoverBubble&&!e.rootEl&&o!==document&&(U.parentNode[Ot]._isOutsideThisEl(e.target),!O&&Ar(e)),!f.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),E=!0}function K(){jt=Yt(U),Yn=Yt(U,f.draggable),At({sortable:k,name:"change",toEl:t,newIndex:jt,newDraggableIndex:Yn,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),o=sn(o,f.draggable,t,!0),_("dragOver"),he.eventCanceled)return E;if(U.contains(e.target)||o.animated&&o.animatingX&&o.animatingY||k._ignoreWhileAnimating===o)return P(!1);if(As=!1,g&&!f.disabled&&(v?y||(u=Ze!==Ve):yt===this||(this.lastPutMode=Bs.checkPull(this,g,U,e))&&p.checkPut(this,g,U,e))){if(S=this._getDirection(e,o)==="vertical",i=st(U),_("dragOverValid"),he.eventCanceled)return E;if(u)return Ze=Ve,L(),this._hideClone(),_("revert"),he.eventCanceled||(Er?Ve.insertBefore(U,Er):Ve.appendChild(U)),P(!0);var j=Cd(t,f.draggable);if(!j||vC(e,S,this)&&!j.animated){if(j===U)return P(!1);if(j&&t===e.target&&(o=j),o&&(a=st(o)),Ls(Ve,t,U,i,o,a,e,!!o)!==!1)return L(),j&&j.nextSibling?t.insertBefore(U,j.nextSibling):t.appendChild(U),Ze=t,K(),P(!0)}else if(j&&mC(e,S,this)){var J=ro(t,0,f,!0);if(J===U)return P(!1);if(o=J,a=st(o),Ls(Ve,t,U,i,o,a,e,!1)!==!1)return L(),t.insertBefore(U,J),Ze=t,K(),P(!0)}else if(o.parentNode===t){a=st(o);var W=0,V,z=U.parentNode!==t,ae=!dC(U.animated&&U.toRect||i,o.animated&&o.toRect||a,S),ge=S?"top":"left",re=Cy(o,"top","top")||Cy(U,"top","top"),be=re?re.scrollTop:void 0;lo!==o&&(V=a[ge],oi=!1,_s=!ae&&f.invertSwap||z),W=yC(e,o,a,S,ae?1:f.swapThreshold,f.invertedSwapThreshold==null?f.swapThreshold:f.invertedSwapThreshold,_s,lo===o);var te;if(W!==0){var ke=Yt(U);do ke-=W,te=Ze.children[ke];while(te&&(fe(te,"display")==="none"||te===ve))}if(W===0||te===o)return P(!1);lo=o,ri=W;var Ne=o.nextElementSibling,Se=!1;Se=W===1;var Ie=Ls(Ve,t,U,i,o,a,e,Se);if(Ie!==!1)return(Ie===1||Ie===-1)&&(Se=Ie===1),Nd=!0,setTimeout(gC,30),L(),Se&&!Ne?t.appendChild(U):o.parentNode.insertBefore(U,Se?Ne:o),re&&Ay(re,0,be-re.scrollTop),Ze=U.parentNode,V!==void 0&&!_s&&(Ns=Math.abs(V-st(o)[ge])),K(),P(!0)}if(t.contains(U))return P(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Ce(document,"mousemove",this._onTouchMove),Ce(document,"touchmove",this._onTouchMove),Ce(document,"pointermove",this._onTouchMove),Ce(document,"dragover",Ar),Ce(document,"mousemove",Ar),Ce(document,"touchmove",Ar)},_offUpEvents:function(){var e=this.el.ownerDocument;Ce(e,"mouseup",this._onDrop),Ce(e,"touchend",this._onDrop),Ce(e,"pointerup",this._onDrop),Ce(e,"pointercancel",this._onDrop),Ce(e,"touchcancel",this._onDrop),Ce(document,"selectstart",this)},_onDrop:function(e){var t=this.el,o=this.options;if(jt=Yt(U),Yn=Yt(U,o.draggable),Pt("drop",this,{evt:e}),Ze=U&&U.parentNode,jt=Yt(U),Yn=Yt(U,o.draggable),he.eventCanceled){this._nulling();return}so=!1,_s=!1,oi=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Od(this.cloneId),Od(this._dragStartId),this.nativeDraggable&&(Ce(document,"drop",this),Ce(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Zo&&fe(document.body,"user-select",""),fe(U,"transform",""),e&&(ni&&(e.cancelable&&e.preventDefault(),!o.dropBubble&&e.stopPropagation()),ve&&ve.parentNode&&ve.parentNode.removeChild(ve),(Ve===Ze||yt&&yt.lastPutMode!=="clone")&&Ge&&Ge.parentNode&&Ge.parentNode.removeChild(Ge),U&&(this.nativeDraggable&&Ce(U,"dragend",this),Rd(U),U.style["will-change"]="",ni&&!so&&Ht(U,yt?yt.options.ghostClass:this.options.ghostClass,!1),Ht(U,this.options.chosenClass,!1),At({sortable:this,name:"unchoose",toEl:Ze,newIndex:null,newDraggableIndex:null,originalEvent:e}),Ve!==Ze?(jt>=0&&(At({rootEl:Ze,name:"add",toEl:Ze,fromEl:Ve,originalEvent:e}),At({sortable:this,name:"remove",toEl:Ze,originalEvent:e}),At({rootEl:Ze,name:"sort",toEl:Ze,fromEl:Ve,originalEvent:e}),At({sortable:this,name:"sort",toEl:Ze,originalEvent:e})),yt&&yt.save()):jt!==io&&jt>=0&&(At({sortable:this,name:"update",toEl:Ze,originalEvent:e}),At({sortable:this,name:"sort",toEl:Ze,originalEvent:e})),he.active&&((jt==null||jt===-1)&&(jt=io,Yn=ti),At({sortable:this,name:"end",toEl:Ze,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){Pt("nulling",this),Ve=U=Ze=ve=Er=Ge=Es=Xn=Br=ln=ni=jt=Yn=io=ti=lo=ri=yt=Bs=he.dragged=he.ghost=he.clone=he.active=null,Rs.forEach(function(e){e.checked=!0}),Rs.length=Ad=Id=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":U&&(this._onDragOver(e),pC(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,o=this.el.children,i=0,a=o.length,u=this.options;i<a;i++)t=o[i],sn(t,u.draggable,this.el,!1)&&e.push(t.getAttribute(u.dataIdAttr)||kC(t));return e},sort:function(e,t){var o={},i=this.el;this.toArray().forEach(function(a,u){var f=i.children[u];sn(f,this.options.draggable,i,!1)&&(o[a]=f)},this),t&&this.captureAnimationState(),e.forEach(function(a){o[a]&&(i.removeChild(o[a]),i.appendChild(o[a]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return sn(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var o=this.options;if(t===void 0)return o[e];var i=ei.modifyOption(this,e,t);typeof i<"u"?o[e]=i:o[e]=t,e==="group"&&Dy(o)},destroy:function(){Pt("destroy",this);var e=this.el;e[Ot]=null,Ce(e,"mousedown",this._onTapStart),Ce(e,"touchstart",this._onTapStart),Ce(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(Ce(e,"dragover",this),Ce(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Is.splice(Is.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Xn){if(Pt("hideClone",this),he.eventCanceled)return;fe(Ge,"display","none"),this.options.removeCloneOnHide&&Ge.parentNode&&Ge.parentNode.removeChild(Ge),Xn=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(Xn){if(Pt("showClone",this),he.eventCanceled)return;U.parentNode==Ve&&!this.options.group.revertClone?Ve.insertBefore(Ge,U):Er?Ve.insertBefore(Ge,Er):Ve.appendChild(Ge),this.options.group.revertClone&&this.animate(U,Ge),fe(Ge,"display",""),Xn=!1}}};function pC(l){l.dataTransfer&&(l.dataTransfer.dropEffect="move"),l.cancelable&&l.preventDefault()}function Ls(l,e,t,o,i,a,u,f){var p,g=l[Ot],v=g.options.onMove,y;return window.CustomEvent&&!Pn&&!Qo?p=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(p=document.createEvent("Event"),p.initEvent("move",!0,!0)),p.to=e,p.from=l,p.dragged=t,p.draggedRect=o,p.related=i||e,p.relatedRect=a||st(e),p.willInsertAfter=f,p.originalEvent=u,l.dispatchEvent(p),v&&(y=v.call(g,p,u)),y}function Rd(l){l.draggable=!1}function gC(){Nd=!1}function mC(l,e,t){var o=st(ro(t.el,0,t.options,!0)),i=_y(t.el,t.options,ve),a=10;return e?l.clientX<i.left-a||l.clientY<o.top&&l.clientX<o.right:l.clientY<i.top-a||l.clientY<o.bottom&&l.clientX<o.left}function vC(l,e,t){var o=st(Cd(t.el,t.options.draggable)),i=_y(t.el,t.options,ve),a=10;return e?l.clientX>i.right+a||l.clientY>o.bottom&&l.clientX>o.left:l.clientY>i.bottom+a||l.clientX>o.right&&l.clientY>o.top}function yC(l,e,t,o,i,a,u,f){var p=o?l.clientY:l.clientX,g=o?t.height:t.width,v=o?t.top:t.left,y=o?t.bottom:t.right,w=!1;if(!u){if(f&&Ns<g*i){if(!oi&&(ri===1?p>v+g*a/2:p<y-g*a/2)&&(oi=!0),oi)w=!0;else if(ri===1?p<v+Ns:p>y-Ns)return-ri}else if(p>v+g*(1-i)/2&&p<y-g*(1-i)/2)return bC(e)}return w=w||u,w&&(p<v+g*a/2||p>y-g*a/2)?p>v+g/2?1:-1:0}function bC(l){return Yt(U)<Yt(l)?1:-1}function kC(l){for(var e=l.tagName+l.className+l.src+l.href+l.textContent,t=e.length,o=0;t--;)o+=e.charCodeAt(t);return o.toString(36)}function wC(l){Rs.length=0;for(var e=l.getElementsByTagName("input"),t=e.length;t--;){var o=e[t];o.checked&&Rs.push(o)}}function Ds(l){return setTimeout(l,0)}function Od(l){return clearTimeout(l)}Os&&Ae(document,"touchmove",function(l){(he.active||so)&&l.cancelable&&l.preventDefault()}),he.utils={on:Ae,off:Ce,css:fe,find:xy,is:function(e,t){return!!sn(e,t,e,!1)},extend:rC,throttle:By,closest:sn,toggleClass:Ht,clone:Iy,index:Yt,nextTick:Ds,cancelNextTick:Od,detectDirection:Ly,getChild:ro,expando:Ot},he.get=function(l){return l[Ot]},he.mount=function(){for(var l=arguments.length,e=new Array(l),t=0;t<l;t++)e[t]=arguments[t];e[0].constructor===Array&&(e=e[0]),e.forEach(function(o){if(!o.prototype||!o.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(o));o.utils&&(he.utils=bn(bn({},he.utils),o.utils)),ei.mount(o)})},he.create=function(l,e){return new he(l,e)},he.version=tC;var lt=[],ii,Pd,Ld=!1,Dd,Md,Ms,si;function TC(){function l(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return l.prototype={dragStarted:function(t){var o=t.originalEvent;this.sortable.nativeDraggable?Ae(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Ae(document,"pointermove",this._handleFallbackAutoScroll):o.touches?Ae(document,"touchmove",this._handleFallbackAutoScroll):Ae(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var o=t.originalEvent;!this.options.dragOverBubble&&!o.rootEl&&this._handleAutoScroll(o)},drop:function(){this.sortable.nativeDraggable?Ce(document,"dragover",this._handleAutoScroll):(Ce(document,"pointermove",this._handleFallbackAutoScroll),Ce(document,"touchmove",this._handleFallbackAutoScroll),Ce(document,"mousemove",this._handleFallbackAutoScroll)),zy(),Fs(),oC()},nulling:function(){Ms=Pd=ii=Ld=si=Dd=Md=null,lt.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,o){var i=this,a=(t.touches?t.touches[0]:t).clientX,u=(t.touches?t.touches[0]:t).clientY,f=document.elementFromPoint(a,u);if(Ms=t,o||this.options.forceAutoScrollFallback||Qo||Pn||Zo){Fd(t,this.options,f,o);var p=Gn(f,!0);Ld&&(!si||a!==Dd||u!==Md)&&(si&&zy(),si=setInterval(function(){var g=Gn(document.elementFromPoint(a,u),!0);g!==p&&(p=g,Fs()),Fd(t,i.options,g,o)},10),Dd=a,Md=u)}else{if(!this.options.bubbleScroll||Gn(f,!0)===kn()){Fs();return}Fd(t,this.options,Gn(f,!1),!1)}}},Rn(l,{pluginName:"scroll",initializeByDefault:!0})}function Fs(){lt.forEach(function(l){clearInterval(l.pid)}),lt=[]}function zy(){clearInterval(si)}var Fd=By(function(l,e,t,o){if(e.scroll){var i=(l.touches?l.touches[0]:l).clientX,a=(l.touches?l.touches[0]:l).clientY,u=e.scrollSensitivity,f=e.scrollSpeed,p=kn(),g=!1,v;Pd!==t&&(Pd=t,Fs(),ii=e.scroll,v=e.scrollFn,ii===!0&&(ii=Gn(t,!0)));var y=0,w=ii;do{var S=w,k=st(S),E=k.top,_=k.bottom,L=k.left,P=k.right,K=k.width,j=k.height,J=void 0,W=void 0,V=S.scrollWidth,z=S.scrollHeight,ae=fe(S),ge=S.scrollLeft,re=S.scrollTop;S===p?(J=K<V&&(ae.overflowX==="auto"||ae.overflowX==="scroll"||ae.overflowX==="visible"),W=j<z&&(ae.overflowY==="auto"||ae.overflowY==="scroll"||ae.overflowY==="visible")):(J=K<V&&(ae.overflowX==="auto"||ae.overflowX==="scroll"),W=j<z&&(ae.overflowY==="auto"||ae.overflowY==="scroll"));var be=J&&(Math.abs(P-i)<=u&&ge+K<V)-(Math.abs(L-i)<=u&&!!ge),te=W&&(Math.abs(_-a)<=u&&re+j<z)-(Math.abs(E-a)<=u&&!!re);if(!lt[y])for(var ke=0;ke<=y;ke++)lt[ke]||(lt[ke]={});(lt[y].vx!=be||lt[y].vy!=te||lt[y].el!==S)&&(lt[y].el=S,lt[y].vx=be,lt[y].vy=te,clearInterval(lt[y].pid),(be!=0||te!=0)&&(g=!0,lt[y].pid=setInterval((function(){o&&this.layer===0&&he.active._onTouchMove(Ms);var Ne=lt[this.layer].vy?lt[this.layer].vy*f:0,Se=lt[this.layer].vx?lt[this.layer].vx*f:0;typeof v=="function"&&v.call(he.dragged.parentNode[Ot],Se,Ne,l,Ms,lt[this.layer].el)!=="continue"||Ay(lt[this.layer].el,Se,Ne)}).bind({layer:y}),24))),y++}while(e.bubbleScroll&&w!==p&&(w=Gn(w,!1)));Ld=g}},30),Hy=function(e){var t=e.originalEvent,o=e.putSortable,i=e.dragEl,a=e.activeSortable,u=e.dispatchSortableEvent,f=e.hideGhostForTarget,p=e.unhideGhostForTarget;if(t){var g=o||a;f();var v=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,y=document.elementFromPoint(v.clientX,v.clientY);p(),g&&!g.el.contains(y)&&(u("spill"),this.onSpill({dragEl:i,putSortable:o}))}};function zd(){}zd.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,o=e.putSortable;this.sortable.captureAnimationState(),o&&o.captureAnimationState();var i=ro(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(t,i):this.sortable.el.appendChild(t),this.sortable.animateAll(),o&&o.animateAll()},drop:Hy},Rn(zd,{pluginName:"revertOnSpill"});function Hd(){}Hd.prototype={onSpill:function(e){var t=e.dragEl,o=e.putSortable,i=o||this.sortable;i.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),i.animateAll()},drop:Hy},Rn(Hd,{pluginName:"removeOnSpill"}),he.mount(new TC),he.mount(Hd,zd);const jy="block-removed",SC="block-added",xC="block-moved",qy="block-changed";class Uy{constructor(){this.tail=Promise.resolve()}get completed(){return this.failure?Promise.reject(this.failure):this.tail}add(e){if(this.failure)return Promise.reject(this.failure);const t=this.tail.then(()=>e());return this.tail=t.catch(o=>{this.failure=o}),t}}class CC extends Be{constructor(){super(...arguments),this._currentBlockIndex=-1,this._blocks=null,this.sortable=null}get currentBlockIndex(){return this._currentBlockIndex}set currentBlockIndex(e){this._currentBlockIndex=e}get firstBlock(){return this.blocksStore[0]}get lastBlock(){return this.blocksStore[this.blocksStore.length-1]}get currentBlock(){return this.blocksStore[this.currentBlockIndex]}set currentBlock(e){if(e===void 0){this.unsetCurrentBlock();return}this.currentBlockIndex=this.getBlockIndex(e)}get nextBlock(){return this.currentBlockIndex===this.blocksStore.length-1?null:this.blocksStore[this.currentBlockIndex+1]??null}get nextContentfulBlock(){return this.blocks.slice(this.currentBlockIndex+1).find(t=>!!t.inputs.length)}get previousContentfulBlock(){return this.blocks.slice(0,this.currentBlockIndex).reverse().find(t=>!!t.inputs.length)}get previousBlock(){return this.currentBlockIndex===0?null:this.blocksStore[this.currentBlockIndex-1]??null}get blocks(){return this.blocksStore.array}get isBlokEmpty(){return this.blocks.every(e=>e.isEmpty)}prepare(){const e=new Sd(this.Blok.UI.nodes.redactor);this._blocks=new Proxy(e,{set:Sd.set,get:Sd.get}),this.listeners.on(document,"copy",t=>{this.Blok.BlockEvents.handleCommandC(t)}),this.sortable=new he(this.Blok.UI.nodes.redactor,{animation:150,forceFallback:!0,handle:`.${this.Blok.Toolbar.CSS.settingsTogglerHandle}`,onStart:()=>{this.Blok.UI.nodes.wrapper.classList.add(this.Blok.UI.CSS.blokDragging),Ko(!0)},onEnd:t=>{this.Blok.UI.nodes.wrapper.classList.remove(this.Blok.UI.CSS.blokDragging),!(t.newIndex===void 0||t.oldIndex===void 0)&&this.move(t.newIndex,t.oldIndex,!0)}})}toggleReadOnly(e){e?this.disableModuleBindings():this.enableModuleBindings()}composeBlock({tool:e,data:t={},id:o=void 0,tunes:i={}}){const a=this.Blok.ReadOnly.isEnabled,u=this.Blok.Tools.blockTools.get(e);if(u===void 0)throw new Error(`Could not compose Block. Tool «${e}» not found.`);const f=new vn({id:o,data:t,tool:u,api:this.Blok.API,readOnly:a,tunesData:i},this.eventsDispatcher);return a||window.requestIdleCallback(()=>{this.bindBlockEvents(f)},{timeout:2e3}),f}insert({id:e=void 0,tool:t,data:o,index:i,needToFocus:a=!0,replace:u=!1,tunes:f}={}){const p=i??this.currentBlockIndex+(u?0:1),g=t??this.config.defaultBlock;if(g===void 0)throw new Error("Could not insert Block. Tool name is not specified.");const v={tool:g};e!==void 0&&(v.id=e),o!==void 0&&(v.data=o),f!==void 0&&(v.tunes=f);const y=this.composeBlock(v),w=u?this.getBlockByIndex(p):void 0;if(u&&w===void 0)throw new Error(`Could not replace Block at index ${p}. Block not found.`);return u&&w!==void 0&&this.blockDidMutated(jy,w,{index:p}),this.blocksStore.insert(p,y,u),this.blockDidMutated(SC,y,{index:p}),a&&(this.currentBlockIndex=p),!a&&p<=this.currentBlockIndex&&this.currentBlockIndex++,y}insertMany(e,t=0){this.blocksStore.insertMany(e,t)}async update(e,t,o){if(!t&&!o)return e;const i=await e.data,a=this.composeBlock({id:e.id,tool:e.name,data:Object.assign({},i,t??{}),tunes:o??e.tunes}),u=this.getBlockIndex(e);return this.blocksStore.replace(u,a),this.blockDidMutated(qy,a,{index:u}),a}replace(e,t,o){const i=this.getBlockIndex(e);return this.insert({tool:t,data:o,index:i,replace:!0})}get blocksStore(){if(this._blocks===null)throw new Error("BlockManager: blocks store is not initialized. Call prepare() before accessing blocks.");return this._blocks}async paste(e,t,o=!1){const i=this.insert({tool:e,replace:o});try{await i.ready,i.call(In.ON_PASTE,t),i.refreshToolRootElement()}catch(a){Ee(`${e}: onPaste callback call is failed`,"error",a)}return i}insertDefaultBlockAtIndex(e,t=!1){const o=this.config.defaultBlock;if(o===void 0)throw new Error("Could not insert default Block. Default block tool is not defined in the configuration.");return this.insert({tool:o,index:e,needToFocus:t})}insertAtEnd(){return this.currentBlockIndex=this.blocks.length-1,this.insert()}async mergeBlocks(e,t){const o=async u=>{await e.mergeWith(u),await this.removeBlock(t),this.currentBlockIndex=this.blocksStore.indexOf(e)},i=e.name===t.name&&e.mergeable,a=i?await t.data:void 0;if(i&&ot(a)){console.error("Could not merge Block. Failed to extract original Block data.");return}if(i&&a!==void 0){const[u]=Xu([{data:a,tool:t.name}],e.tool.sanitizeConfig,this.config.sanitizer);await o(u.data);return}if(e.mergeable&&ds(t,"export")&&ds(e,"import")){const u=await t.exportDataAsString(),f=yn(u,e.tool.sanitizeConfig),p=zv(f,e.tool.conversionConfig);await o(p)}}removeBlock(e,t=!0){return new Promise(o=>{const i=this.blocksStore.indexOf(e);if(!this.validateIndex(i))throw new Error("Can't find a Block to remove");this.blocksStore.remove(i),e.destroy(),this.blockDidMutated(jy,e,{index:i}),this.currentBlockIndex>=i&&this.currentBlockIndex--;const a=this.blocks.length===0;a&&this.unsetCurrentBlock(),a&&t&&this.insert(),!a&&i===0&&(this.currentBlockIndex=0),o()})}removeSelectedBlocks(){const e=this.blocks.map((t,o)=>({block:t,index:o})).filter(({block:t})=>t.selected).sort((t,o)=>o.index-t.index);return e.forEach(({block:t})=>{this.removeBlock(t,!1)}),e.length>0?e[e.length-1].index:void 0}removeAllBlocks(){const e=i=>{i<0||(this.blocksStore.remove(i),e(i-1))};e(this.blocksStore.length-1),this.unsetCurrentBlock(),this.insert();const o=this.currentBlock?.firstInput;o!==void 0&&o.focus()}split(){const e=this.Blok.Caret.extractFragmentFromCaretPosition(),t=R.make("div");t.appendChild(e);const o={text:R.isEmpty(t)?"":t.innerHTML};return this.insert({data:o})}getBlockByIndex(e){const t=e===-1?this.blocksStore.length-1:e;return this.blocksStore[t]}getBlockIndex(e){return this.blocksStore.indexOf(e)}getBlockById(e){return this.blocksStore.array.find(t=>t.id===e)}getBlock(e){const t=R.isElement(e)?e:e.parentNode;if(!t)return;const o=this.blocksStore.nodes,i=t.closest(`.${vn.CSS.wrapper}`);if(!i)return;const a=o.indexOf(i);if(a>=0)return this.blocksStore[a]}setCurrentBlockByChildNode(e){const t=R.isElement(e)?e:e.parentNode;if(!t)return;const o=t.closest(`.${vn.CSS.wrapper}`);if(!o||!o.closest(`.${this.Blok.UI.CSS.blokWrapper}`)?.isEqualNode(this.Blok.UI.nodes.wrapper)||!(o instanceof HTMLElement))return;this.currentBlockIndex=this.blocksStore.nodes.indexOf(o);const u=this.currentBlock;return u?.updateCurrentInput(),u}getBlockByChildNode(e){if(!(e instanceof Node))return;const t=R.isElement(e)?e:e.parentNode;if(!t)return;const o=t.closest(`.${vn.CSS.wrapper}`);if(o)return this.blocks.find(i=>i.holder===o)}move(e,t=this.currentBlockIndex,o=!1){if(isNaN(e)||isNaN(t)){Ee("Warning during 'move' call: incorrect indices provided.","warn");return}if(!this.validateIndex(e)||!this.validateIndex(t)){Ee("Warning during 'move' call: indices cannot be lower than 0 or greater than the amount of blocks.","warn");return}this.blocksStore.move(e,t,o),this.currentBlockIndex=e;const i=this.currentBlock;if(i===void 0)throw new Error(`Could not move Block. Block at index ${e} is not available.`);this.blockDidMutated(xC,i,{fromIndex:t,toIndex:e})}async convert(e,t,o){const i=await e.save();if(!i||i.data===void 0)throw new Error("Could not convert Block. Failed to extract original Block data.");const a=this.Blok.Tools.blockTools.get(t);if(!a)throw new Error(`Could not convert Block. Tool «${t}» not found.`);const u=await e.exportDataAsString(),f=yn(u,Ju(this.config.sanitizer,a.sanitizeConfig)),p=zv(f,a.conversionConfig,a.settings),g=o?Object.assign(p,o):p;return this.replace(e,a.name,g)}unsetCurrentBlock(){this.currentBlockIndex=-1}async clear(e=!1){const t=new Uy;[...this.blocks].forEach(i=>{t.add(async()=>{await this.removeBlock(i,!1)})}),await t.completed,this.unsetCurrentBlock(),e&&this.insert(),this.Blok.UI.checkEmptiness()}async destroy(){this.sortable&&(this.sortable.destroy(),this.sortable=null),await Promise.all(this.blocks.map(e=>e.destroy()))}bindBlockEvents(e){const{BlockEvents:t}=this.Blok;this.readOnlyMutableListeners.on(e.holder,"keydown",o=>{o instanceof KeyboardEvent&&t.keydown(o)}),this.readOnlyMutableListeners.on(e.holder,"keyup",o=>{o instanceof KeyboardEvent&&t.keyup(o)}),e.on("didMutated",o=>this.blockDidMutated(qy,o,{index:this.getBlockIndex(o)}))}disableModuleBindings(){this.readOnlyMutableListeners.clearAll()}enableModuleBindings(){this.readOnlyMutableListeners.on(document,"cut",e=>{this.Blok.BlockEvents.handleCommandX(e)}),this.blocks.forEach(e=>{this.bindBlockEvents(e)})}validateIndex(e){return!(e<0||e>=this.blocksStore.length)}blockDidMutated(e,t,o){const i={target:new Bn(t),...o},a=new CustomEvent(e,{detail:{...i}});return Object.prototype.propertyIsEnumerable.call(a,"type")||Object.defineProperty(a,"type",{value:e,enumerable:!0,configurable:!0}),Object.prototype.propertyIsEnumerable.call(a,"detail")||Object.defineProperty(a,"detail",{value:i,enumerable:!0,configurable:!0}),this.eventsDispatcher.emit(Ov,{event:a}),t}}class EC extends Be{constructor(){super(...arguments),this.anyBlockSelectedCache=null,this.needToSelectAll=!1,this.nativeInputSelected=!1,this.readyToBlockSelection=!1,this.selection=new X}get sanitizerConfig(){const e={p:{},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},ol:{},ul:{},li:{},br:!0,img:{src:!0,width:!0,height:!0},a:{href:!0},b:{},i:{},u:{}};return Ju(this.config.sanitizer,e)}get allBlocksSelected(){const{BlockManager:e}=this.Blok;return e.blocks.every(t=>t.selected===!0)}set allBlocksSelected(e){const{BlockManager:t}=this.Blok;for(const o of t.blocks)o.selected=e;this.clearCache()}get anyBlockSelected(){const{BlockManager:e}=this.Blok;return this.anyBlockSelectedCache===null&&(this.anyBlockSelectedCache=e.blocks.some(t=>t.selected===!0)),this.anyBlockSelectedCache}get selectedBlocks(){return this.Blok.BlockManager.blocks.filter(e=>e.selected)}prepare(){this.selection=new X,eo.add({name:"CMD+A",handler:e=>{const{BlockManager:t,ReadOnly:o}=this.Blok;if(o.isEnabled){e.preventDefault(),this.selectAllBlocks();return}t.currentBlock&&this.handleCommandA(e)},on:this.Blok.UI.nodes.redactor})}toggleReadOnly(){X.get()?.removeAllRanges(),this.allBlocksSelected=!1}unSelectBlockByIndex(e){const{BlockManager:t}=this.Blok,o=typeof e=="number"?t.getBlockByIndex(e):t.currentBlock;o&&(o.selected=!1,this.clearCache())}clearSelection(e,t=!1){const{RectangleSelection:o}=this.Blok;this.needToSelectAll=!1,this.nativeInputSelected=!1,this.readyToBlockSelection=!1;const i=e&&e instanceof KeyboardEvent,a=e,u=i&&a.key&&a.key.length===1;if(this.anyBlockSelected&&i&&u&&!X.isSelectionExists&&this.replaceSelectedBlocksWithPrintableKey(e),this.Blok.CrossBlockSelection.clear(e),t&&this.selection.restore(),!this.anyBlockSelected||o.isRectActivated()){this.Blok.RectangleSelection.clearSelection();return}this.allBlocksSelected=!1}async copySelectedBlocks(e){e.preventDefault();const t=e.clipboardData;if(!t)return;const o=R.make("div"),i=[];this.selectedBlocks.forEach(f=>{const p=yn(f.holder.innerHTML,this.sanitizerConfig),g=R.make("div");g.innerHTML=p;const v=g.textContent??"";if(i.push(v),!Array.from(g.childNodes).some(S=>S.nodeType===Node.ELEMENT_NODE)&&v.trim().length>0){const S=R.make("p");S.innerHTML=g.innerHTML,o.appendChild(S)}else for(;g.firstChild;)o.appendChild(g.firstChild)});const a=i.join(`
|
|
171
|
+
`,hS=({icon:a,title:e,secondaryLabel:t,isActive:o=!1,isDisabled:i=!1,hasChildren:l=!1,hideChevron:c=!1,wrapperTag:d="div",name:h,iconWithGap:g=!0,isInline:v=!1,isNestedInline:y=!1})=>{const b=Ae(xn.item,v&&hy.item,y&&py.item,o&&xn.itemActive,i&&xn.itemDisabled),E=Ae(xn.icon,v&&"w-auto h-auto [&_svg]:w-icon [&_svg]:h-icon mobile:[&_svg]:w-icon-mobile mobile:[&_svg]:h-icon-mobile",y&&"w-toolbox-btn h-toolbox-btn",g&&"mr-2",g&&v&&"shadow-none bg-transparent !mr-0",g&&y&&"!mr-2"),w=Ae(xn.icon,v&&"rotate-90"),T=l&&!c,S=Dn.jsxs(Dn.Fragment,{children:[a&&Dn.jsx("div",It(be({[je.icon]:""},g&&{[je.iconTool]:""}),{className:E,"data-blok-testid":"popover-item-icon",dangerouslySetInnerHTML:{__html:a}})),e!==void 0&&Dn.jsx("div",{[je.title]:"",className:"mr-auto truncate text-sm font-medium leading-5","data-blok-testid":"popover-item-title",children:e}),t&&Dn.jsx("div",{[je.secondaryTitle]:"",className:"whitespace-nowrap pr-1.5 text-xs -tracking-widest text-text-secondary opacity-60","data-blok-testid":"popover-item-secondary-title",children:t}),T&&Dn.jsx("div",{[je.icon]:"",[je.iconChevronRight]:"",className:w,"data-blok-testid":"popover-item-chevron-right",dangerouslySetInnerHTML:{__html:nS}})]}),O=be(be(be({className:b,[je.item]:"","data-blok-testid":"popover-item"},h&&{"data-blok-item-name":h}),i&&{[je.disabled]:"true"}),o&&{[je.active]:"true"});return d==="button"?Dn.jsx("button",It(be({type:"button"},O),{children:S})):Dn.jsx("div",It(be({},O),{children:S}))},md='[data-blok-testid="popover-item-icon"]',pS=a=>{const e=document.createElement("div"),t=KE.createRoot(e);VE.flushSync(()=>{t.render(a)});const o=e.firstElementChild;return t.unmount(),o};class Pn extends gd{constructor(e,t){super(e),this.params=e,this.nodes={root:null,icon:null},this.confirmationState=null,this.removeSpecialFocusBehavior=()=>{var o;(o=this.nodes.root)==null||o.removeAttribute(je.noFocus)},this.removeSpecialHoverBehavior=()=>{var o;(o=this.nodes.root)==null||o.removeAttribute(je.noHover)},this.onErrorAnimationEnd=()=>{var o,i,l;(o=this.nodes.icon)==null||o.removeAttribute(je.wobble),(i=this.nodes.icon)==null||i.classList.remove("animate-wobble"),(l=this.nodes.icon)==null||l.removeEventListener("animationend",this.onErrorAnimationEnd)},this.renderParams=t,this.nodes.root=this.make(e,t)}get isDisabled(){return this.params.isDisabled===!0}get toggle(){return this.params.toggle}get title(){return this.params.title||this.params.label}get isConfirmationStateEnabled(){return this.confirmationState!==null}get isFocused(){return this.nodes.root===null?!1:this.nodes.root.hasAttribute(je.focused)}getElement(){return this.nodes.root}handleClick(){if(this.isConfirmationStateEnabled&&this.confirmationState!==null){this.activateOrEnableConfirmationMode(this.confirmationState);return}this.activateOrEnableConfirmationMode(this.params)}toggleActive(e){if(this.nodes.root===null)return;(e!==void 0?e:!this.nodes.root.hasAttribute(je.active))?this.nodes.root.setAttribute(je.active,"true"):this.nodes.root.removeAttribute(je.active),this.updateRootClasses()}toggleHidden(e){var t,o;e?(t=this.nodes.root)==null||t.setAttribute(je.hidden,"true"):(o=this.nodes.root)==null||o.removeAttribute(je.hidden),this.updateRootClasses()}reset(){this.isConfirmationStateEnabled&&this.disableConfirmationMode()}onFocus(){this.disableSpecialHoverAndFocusBehavior()}make(e,t){var l,c,d;const o=e.title||e.label,i=pS(Dn.jsx(hS,{icon:e.icon,title:o,secondaryLabel:e.secondaryLabel,isActive:this.isActive,isDisabled:e.isDisabled,hasChildren:this.hasChildren,hideChevron:this.isChevronHidden,wrapperTag:t==null?void 0:t.wrapperTag,name:e.name,iconWithGap:t==null?void 0:t.iconWithGap,isInline:t==null?void 0:t.isInline,isNestedInline:t==null?void 0:t.isNestedInline}));return this.nodes.icon=i.querySelector(md),e.hint!==void 0&&((l=t==null?void 0:t.hint)==null?void 0:l.enabled)!==!1&&this.addHint(i,It(be({},e.hint),{position:((c=t==null?void 0:t.hint)==null?void 0:c.position)||"right",alignment:((d=t==null?void 0:t.hint)==null?void 0:d.alignment)||"center"})),i}enableConfirmationMode(e){if(this.nodes.root===null)return;const t=It(be(be({},this.params),e),{confirmation:"confirmation"in e?e.confirmation:void 0}),o=this.make(t,this.renderParams);this.nodes.root.innerHTML=o.innerHTML,this.nodes.root.setAttribute(je.confirmation,"true"),this.nodes.icon=this.nodes.root.querySelector(md),this.confirmationState=e,this.enableSpecialHoverAndFocusBehavior(),this.updateRootClasses()}disableConfirmationMode(){if(this.nodes.root===null)return;const e=this.make(this.params,this.renderParams);this.nodes.root.innerHTML=e.innerHTML,this.nodes.root.removeAttribute(je.confirmation),this.nodes.icon=this.nodes.root.querySelector(md),this.confirmationState=null,this.disableSpecialHoverAndFocusBehavior(),this.updateRootClasses()}enableSpecialHoverAndFocusBehavior(){var e,t,o;(e=this.nodes.root)==null||e.setAttribute(je.noHover,"true"),(t=this.nodes.root)==null||t.setAttribute(je.noFocus,"true"),(o=this.nodes.root)==null||o.addEventListener("mouseleave",this.removeSpecialHoverBehavior,{once:!0})}disableSpecialHoverAndFocusBehavior(){var e;this.removeSpecialFocusBehavior(),this.removeSpecialHoverBehavior(),(e=this.nodes.root)==null||e.removeEventListener("mouseleave",this.removeSpecialHoverBehavior)}activateOrEnableConfirmationMode(e){var t;if(!("confirmation"in e)||e.confirmation===void 0)try{(t=e.onActivate)==null||t.call(e,e),this.disableConfirmationMode()}catch(o){this.animateError()}else this.enableConfirmationMode(e.confirmation)}animateError(){var e,t,o,i;(e=this.nodes.icon)!=null&&e.hasAttribute(je.wobble)||((t=this.nodes.icon)==null||t.setAttribute(je.wobble,"true"),(o=this.nodes.icon)==null||o.classList.add("animate-wobble"),(i=this.nodes.icon)==null||i.addEventListener("animationend",this.onErrorAnimationEnd))}updateRootClasses(){var d,h,g,v;if(this.nodes.root===null)return;const e=this.nodes.root.hasAttribute(je.active),t=this.nodes.root.hasAttribute(je.hidden),o=this.nodes.root.hasAttribute(je.confirmation),i=this.nodes.root.hasAttribute(je.focused),l=(h=(d=this.renderParams)==null?void 0:d.isInline)!=null?h:!1,c=(v=(g=this.renderParams)==null?void 0:g.isNestedInline)!=null?v:!1;this.nodes.root.className=Ae(xn.item,l&&hy.item,c&&py.item,e&&xn.itemActive,this.isDisabled&&xn.itemDisabled,i&&"!bg-item-focus-bg",o&&"!bg-item-confirm-bg !text-white",t&&"!hidden")}}const Cr={container:"py-1 px-[3px]",containerHidden:"hidden",line:"h-px w-full bg-popover-border"},ys={container:"px-1 py-0",line:"h-full w-px",nestedContainer:"py-1 px-[3px]",nestedLine:"w-full h-px"},bs={root:"data-blok-popover-item-separator",line:"data-blok-popover-item-separator-line",hidden:"data-blok-hidden"};class gy extends gd{constructor(e){var i,l;super(),this.isInline=(i=e==null?void 0:e.isInline)!=null?i:!1,this.isNestedInline=(l=e==null?void 0:e.isNestedInline)!=null?l:!1;const t=this.getContainerClass(),o=this.getLineClass();this.nodes={root:R.make("div",t,{[bs.root]:""}),line:R.make("div",o,{[bs.line]:""})},this.nodes.root.setAttribute("data-blok-testid","popover-item-separator"),this.nodes.root.appendChild(this.nodes.line)}getElement(){return this.nodes.root}toggleHidden(e){var t,o;e?((t=this.nodes.root)==null||t.setAttribute(bs.hidden,"true"),this.nodes.root.className=Ae(this.getContainerClass(),Cr.containerHidden)):((o=this.nodes.root)==null||o.removeAttribute(bs.hidden),this.nodes.root.className=this.getContainerClass())}getContainerClass(){return this.isNestedInline?Ae(Cr.container,ys.nestedContainer):this.isInline?Ae(Cr.container,ys.container):Cr.container}getLineClass(){return this.isNestedInline?Ae(Cr.line,ys.nestedLine):this.isInline?Ae(Cr.line,ys.line):Cr.line}}var Zt=(a=>(a.Closed="closed",a.ClosedOnActivate="closed-on-activate",a))(Zt||{});const st={popoverContainer:"absolute flex flex-col overflow-hidden box-border opacity-0 pointer-events-none p-0 border-none z-[4] max-h-0 min-w-[var(--width)] w-[var(--width)] rounded-lg shadow-[0_3px_15px_-3px_theme(colors.popover-shadow)] left-[var(--popover-left)] top-[var(--popover-top)] bg-popover-bg",popoverContainerMobile:"fixed max-w-none rounded-[10px] min-w-[calc(100%-var(--offset)*2)] inset-[auto_var(--offset)_calc(var(--offset)+env(safe-area-inset-bottom))_var(--offset)]",popoverContainerOpened:"opacity-100 pointer-events-auto p-1 max-h-[var(--max-height)] border border-popover-border animate-[panelShowing_100ms_ease]",popoverOverlay:"hidden bg-dark",items:"overflow-y-auto overscroll-contain"},no={popover:"relative",popoverContainer:"flex-row top-0 min-w-max w-max p-1 mobile:absolute"},Fe={popover:"data-blok-popover",popoverContainer:"data-blok-popover-container",popoverItems:"data-blok-popover-items",popoverOverlay:"data-blok-popover-overlay",popoverInline:"data-blok-popover-inline",nested:"data-blok-nested",nestedLevel:"data-blok-nested-level",opened:"data-blok-popover-opened",openTop:"data-blok-popover-open-top",openLeft:"data-blok-popover-open-left",overlayHidden:"data-blok-overlay-hidden",nothingFoundDisplayed:"data-blok-nothing-found-displayed"},gS=a=>`level-${a}`;var Jt=(a=>(a.NestingLevel="--nesting-level",a.PopoverHeight="--popover-height",a.InlinePopoverWidth="--inline-popover-width",a.PopoverTop="--popover-top",a.PopoverLeft="--popover-left",a.TriggerItemLeft="--trigger-item-left",a.TriggerItemTop="--trigger-item-top",a))(Jt||{});const Jo={root:"",rootHidden:"hidden"},my={root:"flex items-center"},vd={root:"data-blok-popover-item-html",hidden:"data-blok-hidden"};class ei extends gd{constructor(e,t){var i,l,c,d;super(e),this.isInline=(i=t==null?void 0:t.isInline)!=null?i:!1;const o=this.isInline?Ae(Jo.root,my.root):Jo.root;this.nodes={root:R.make("div",o,{[vd.root]:""})},this.nodes.root.appendChild(e.element),this.nodes.root.setAttribute("data-blok-testid","popover-item-html"),e.name&&this.nodes.root.setAttribute("data-blok-item-name",e.name),e.hint!==void 0&&((l=t==null?void 0:t.hint)==null?void 0:l.enabled)!==!1&&this.addHint(this.nodes.root,It(be({},e.hint),{position:((c=t==null?void 0:t.hint)==null?void 0:c.position)||"right",alignment:((d=t==null?void 0:t.hint)==null?void 0:d.alignment)||"center"}))}getElement(){return this.nodes.root}toggleHidden(e){var o,i;const t=this.isInline?Ae(Jo.root,my.root):Jo.root;e?((o=this.nodes.root)==null||o.setAttribute(vd.hidden,"true"),this.nodes.root.className=Ae(t,Jo.rootHidden)):((i=this.nodes.root)==null||i.removeAttribute(vd.hidden),this.nodes.root.className=t)}getControls(){const e=this.nodes.root.querySelectorAll(`button, ${R.allInputsSelector}`);return Array.from(e)}}class vy extends Ko{constructor(e,t={}){super(),this.params=e,this.itemsRenderParams=t,this.listeners=new Vo,this.messages={nothingFound:"Nothing found",search:"Search"},this.items=this.buildItems(e.items),e.messages&&(this.messages=be(be({},this.messages),e.messages)),this.nodes={},this.nodes.popoverContainer=R.make("div",[st.popoverContainer],{[Fe.popoverContainer]:"","data-blok-testid":"popover-container"}),this.nodes.nothingFoundMessage=R.make("div",["hidden cursor-default text-sm leading-5 font-medium whitespace-nowrap overflow-hidden text-ellipsis text-gray-text p-[3px]"],{textContent:this.messages.nothingFound,"data-blok-testid":"popover-nothing-found"}),this.nodes.popoverContainer.appendChild(this.nodes.nothingFoundMessage),this.nodes.items=R.make("div",[st.items],{[Fe.popoverItems]:"","data-blok-testid":"popover-items"}),this.items.forEach(o=>{const i=o.getElement();i!==null&&this.nodes.items.appendChild(i)}),this.nodes.popoverContainer.appendChild(this.nodes.items),this.listeners.on(this.nodes.popoverContainer,"click",o=>this.handleClick(o)),this.nodes.popover=R.make("div",[this.params.class],{[Fe.popover]:"","data-blok-testid":"popover"}),this.nodes.popover.style.setProperty("--width","200px"),this.nodes.popover.style.setProperty("--max-height","270px"),this.nodes.popover.style.setProperty("--item-padding","3px"),this.nodes.popover.style.setProperty("--item-height","calc(1.25rem + 2 * var(--item-padding))"),this.nodes.popover.style.setProperty("--popover-top","calc(100% + 0.5rem)"),this.nodes.popover.style.setProperty("--popover-left","0"),this.nodes.popover.style.setProperty("--nested-popover-overlap","0.25rem"),this.params.class&&this.nodes.popover.setAttribute("data-blok-popover-custom-class",this.params.class),this.nodes.popover.appendChild(this.nodes.popoverContainer)}get itemsDefault(){return this.items.filter(e=>e instanceof Pn)}getElement(){return this.nodes.popover}show(){!this.nodes.popover.isConnected&&!this.nodes.popover.parentNode&&document.body.appendChild(this.nodes.popover),this.nodes.popover.setAttribute(Fe.opened,"true"),this.nodes.popoverContainer.className=Ae(st.popoverContainer,st.popoverContainerOpened),this.itemsDefault.forEach(e=>this.refreshItemActiveState(e)),this.search!==void 0&&this.search.focus()}hide(){this.nodes.popover.removeAttribute(Fe.opened),this.nodes.popover.removeAttribute(Fe.openTop),this.nodes.popover.removeAttribute(Fe.openLeft),this.nodes.popoverContainer.className=st.popoverContainer,this.itemsDefault.forEach(e=>e.reset()),this.search!==void 0&&this.search.clear(),this.emit(Zt.Closed)}destroy(){var e;this.items.forEach(t=>t.destroy()),this.nodes.popover.remove(),this.listeners.removeAll(),(e=this.search)==null||e.destroy()}activateItemByName(e){const t=this.items.find(o=>o.name===e);t!==void 0&&this.handleItemClick(t)}buildItems(e){return e.map(t=>{switch(t.type){case tt.Separator:return new gy(this.itemsRenderParams[tt.Separator]);case tt.Html:return new ei(t,this.itemsRenderParams[tt.Html]);default:return new Pn(t,this.itemsRenderParams[tt.Default])}})}getTargetItem(e){return this.items.filter(t=>t instanceof Pn||t instanceof ei).find(t=>{const o=t.getElement();return o===null?!1:e.composedPath().includes(o)})}handleItemClick(e){if(!(e instanceof Pn&&e.isDisabled)){if(e.hasChildren){this.showNestedItems(e),this.callHandleClickIfPresent(e);return}this.itemsDefault.filter(t=>t!==e).forEach(t=>t.reset()),this.callHandleClickIfPresent(e),this.toggleItemActivenessIfNeeded(e),this.refreshItemActiveState(e),e.closeOnActivate===!0&&(this.hide(),this.emit(Zt.ClosedOnActivate))}}handleClick(e){const t=this.getTargetItem(e);t!==void 0&&this.handleItemClick(t)}toggleItemActivenessIfNeeded(e){if(!(e instanceof Pn)||(e.toggle===!0&&e.toggleActive(),typeof e.toggle!="string"))return;const t=this.itemsDefault.filter(o=>o.toggle===e.toggle);if(t.length===1){e.toggleActive();return}t.forEach(o=>{o.toggleActive(o===e)})}refreshItemActiveState(e){e instanceof Pn&&e.toggle===void 0&&e.toggleActive(e.isActive)}callHandleClickIfPresent(e){"handleClick"in e&&typeof e.handleClick=="function"&&e.handleClick()}hasNode(e){return this.nodes.popover.contains(e)}}var yd=(a=>(a.Search="search",a))(yd||{});const bd={wrapper:"bg-[#F8F8F8] border border-[rgba(226,226,229,0.20)] rounded p-0.5 grid grid-cols-[auto_auto_1fr] grid-rows-[auto]",icon:"w-toolbox-btn h-toolbox-btn flex items-center justify-center mr-2 [&_svg]:w-icon [&_svg]:h-icon [&_svg]:text-gray-text",input:"text-sm outline-none font-medium font-inherit border-0 bg-transparent m-0 p-0 leading-[22px] min-w-[calc(100%-theme('spacing.6')-10px)] placeholder:text-gray-text placeholder:font-medium"};class mS extends Ko{constructor({items:e,placeholder:t}){super(),this.searchQuery="",this.handleValueChange=()=>{this.applySearch(this.input.value)},this.listeners=new Vo,this.items=e,this.wrapper=R.make("div",bd.wrapper),this.wrapper.setAttribute("data-blok-testid","popover-search-field");const o=R.make("div",bd.icon,{innerHTML:rS});this.input=R.make("input",bd.input,{type:"search",placeholder:t,tabIndex:-1}),this.input.setAttribute("data-blok-flipper-tab-target","true"),this.input.setAttribute("data-blok-testid","popover-search-input"),this.wrapper.appendChild(o),this.wrapper.appendChild(this.input),this.overrideValueProperty(),["input","keyup","search","change"].forEach(l=>{this.listeners.on(this.input,l,this.handleValueChange)})}getElement(){return this.wrapper}focus(){this.input.focus()}clear(){this.input.value=""}applySearch(e){this.searchQuery!==e&&(this.searchQuery=e,this.emit(yd.Search,{query:e,items:this.foundItems}))}overrideValueProperty(){var i,l;const e=Object.getPrototypeOf(this.input),t=Object.getOwnPropertyDescriptor(e,"value");if((t==null?void 0:t.set)===void 0||t.get===void 0)return;const o=this.applySearch.bind(this);Object.defineProperty(this.input,"value",{configurable:(i=t.configurable)!=null?i:!0,enumerable:(l=t.enumerable)!=null?l:!1,get(){var c,d;return(d=(c=t.get)==null?void 0:c.call(this))!=null?d:""},set(c){var d;(d=t.set)==null||d.call(this,c),o(c)}})}destroy(){this.listeners.removeAll()}get foundItems(){return this.items.filter(e=>this.checkItem(e))}checkItem(e){var i,l;const t=((i=e.title)==null?void 0:i.toLowerCase())||"",o=(l=this.searchQuery)==null?void 0:l.toLowerCase();return o!==void 0?t.includes(o):!1}}class Br extends vy{constructor(e,t){super(e,t),this.nestingLevel=0,this.nestedPopoverTriggerItem=null,this.previouslyHoveredItem=null,this.scopeElement=document.body,this.hide=()=>{var o;super.hide(),this.destroyNestedPopoverIfExists(),(o=this.flipper)==null||o.deactivate(),this.previouslyHoveredItem=null},this.onFlip=()=>{const o=this.itemsDefault.find(i=>i.isFocused);o==null||o.onFocus()},this.onSearch=o=>{var d;const i=o.query==="",l=o.items.length===0;this.items.forEach(h=>{const g=h instanceof Pn,v=h instanceof gy||h instanceof ei,y=g?!o.items.includes(h):v&&(l||!i);h.toggleHidden(y)}),this.toggleNothingFoundMessage(l);const c=o.query===""?this.flippableElements:o.items.map(h=>h.getElement());(d=this.flipper)!=null&&d.isActivated&&(this.flipper.deactivate(),this.flipper.activate(c))},e.trigger&&(this.trigger=e.trigger),e.nestingLevel!==void 0&&(this.nestingLevel=e.nestingLevel),this.nestingLevel>0&&this.nodes.popover.setAttribute(Fe.nested,"true"),e.scopeElement!==void 0&&(this.scopeElement=e.scopeElement),this.nodes.popoverContainer!==null&&this.listeners.on(this.nodes.popoverContainer,"mouseover",o=>this.handleHover(o)),e.searchable&&this.addSearch(),e.flippable!==!1&&(e.flipper!==void 0?(e.flipper.deactivate(),e.flipper.removeOnFlip(this.onFlip),this.flipper=e.flipper):this.flipper=new Yn({items:this.flippableElements,focusedItemClass:xn.focused,allowedKeys:[ie.TAB,ie.UP,ie.DOWN,ie.ENTER]}),this.flipper.onFlip(this.onFlip))}hasFocus(){return this.flipper===void 0?!1:this.flipper.hasFocus()}get scrollTop(){return this.nodes.items===null?0:this.nodes.items.scrollTop}get offsetTop(){return this.nodes.popoverContainer===null?0:this.nodes.popoverContainer.offsetTop}show(){var e;if(this.trigger){document.body.appendChild(this.nodes.popover);const{top:t,left:o}=this.calculatePosition();this.nodes.popover.style.position="absolute",this.nodes.popover.style.top=`${t}px`,this.nodes.popover.style.left=`${o}px`,this.nodes.popover.style.setProperty(Jt.PopoverTop,"0px"),this.nodes.popover.style.setProperty(Jt.PopoverLeft,"0px")}this.nodes.popover.style.setProperty(Jt.PopoverHeight,this.size.height+"px"),!this.trigger&&!this.shouldOpenBottom&&(this.nodes.popover.setAttribute(Fe.openTop,"true"),this.nodes.popover.style.setProperty(Jt.PopoverTop,"calc(-1 * (0.5rem + var(--popover-height)))")),!this.trigger&&!this.shouldOpenRight&&(this.nodes.popover.setAttribute(Fe.openLeft,"true"),this.nodes.popover.style.setProperty(Jt.PopoverLeft,"calc(-1 * var(--width) + 100%)")),super.show(),(e=this.flipper)==null||e.activate(this.flippableElements)}calculatePosition(){if(!this.trigger)return{top:0,left:0};const e=this.trigger.getBoundingClientRect(),t=this.size,o=window.innerWidth,i=window.innerHeight,l=8,c=e.bottom+l+window.scrollY,h=e.bottom+l+t.height>i+window.scrollY&&e.top-l-t.height>window.scrollY?e.top-l-t.height+window.scrollY:c,g=e.left+window.scrollX,y=g+t.width>o+window.scrollX?Math.max(0,e.right-t.width+window.scrollX):g;return{top:h,left:y}}destroy(){this.hide(),super.destroy()}hasNode(e){return super.hasNode(e)?!0:this.nestedPopover!==void 0&&this.nestedPopover!==null?this.nestedPopover.hasNode(e):!1}showNestedItems(e){this.nestedPopover!==null&&this.nestedPopover!==void 0||(this.nestedPopoverTriggerItem=e,this.showNestedPopoverForItem(e))}handleHover(e){const t=this.getTargetItem(e);t!==void 0&&this.previouslyHoveredItem!==t&&(this.destroyNestedPopoverIfExists(),this.previouslyHoveredItem=t,t.hasChildren&&this.showNestedPopoverForItem(t))}setTriggerItemPosition(e,t){const o=t.getElement(),i=(o?o.offsetTop:0)-this.scrollTop,l=this.offsetTop+i;e.style.setProperty(Jt.TriggerItemTop,l+"px")}destroyNestedPopoverIfExists(){var e,t;this.nestedPopover===void 0||this.nestedPopover===null||(this.nestedPopover.off(Zt.ClosedOnActivate,this.hide),this.nestedPopover.hide(),this.nestedPopover.destroy(),this.nestedPopover.getElement().remove(),this.nestedPopover=null,(e=this.flipper)==null||e.activate(this.flippableElements),requestAnimationFrame(()=>{var o;(o=this.flipper)==null||o.focusFirst()}),(t=this.nestedPopoverTriggerItem)==null||t.onChildrenClose())}showNestedPopoverForItem(e){var o;this.nestedPopover=new Br({searchable:e.isChildrenSearchable,items:e.children,nestingLevel:this.nestingLevel+1,flippable:e.isChildrenFlippable,messages:this.messages}),e.onChildrenOpen(),this.nestedPopover.on(Zt.ClosedOnActivate,this.hide);const t=this.nestedPopover.getElement();return this.nodes.popover.appendChild(t),this.setTriggerItemPosition(t,e),t.style.setProperty(Jt.NestingLevel,this.nestedPopover.nestingLevel.toString()),this.applyNestedPopoverPositioning(t),this.nestedPopover.show(),(o=this.flipper)==null||o.deactivate(),this.nestedPopover}applyNestedPopoverPositioning(e){const t=e.querySelector(`[${Fe.popoverContainer}]`);if(!t)return;const o=this.nodes.popover.hasAttribute(Fe.openTop),i=this.nodes.popover.hasAttribute(Fe.openLeft);t.style.position="absolute",i?e.style.setProperty(Jt.PopoverLeft,"calc(-1 * (var(--nesting-level) + 1) * var(--width) + 100%)"):e.style.setProperty(Jt.PopoverLeft,"calc(var(--nesting-level) * (var(--width) - var(--nested-popover-overlap)))"),o?t.style.top="calc(var(--trigger-item-top) - var(--popover-height) + var(--item-height) + 0.5rem + var(--nested-popover-overlap))":t.style.top="calc(var(--trigger-item-top) - var(--nested-popover-overlap))"}get shouldOpenBottom(){if(this.nodes.popover===void 0||this.nodes.popover===null)return!1;const e=this.nodes.popoverContainer.getBoundingClientRect(),t=this.scopeElement.getBoundingClientRect(),o=this.size.height,i=e.top+o,l=e.top-o,c=Math.min(window.innerHeight,t.bottom);return l<t.top||i<=c}get shouldOpenRight(){if(this.nodes.popover===void 0||this.nodes.popover===null)return!1;const e=this.nodes.popover.getBoundingClientRect(),t=this.scopeElement.getBoundingClientRect(),o=this.size.width,i=e.right+o,l=e.left-o,c=Math.min(window.innerWidth,t.right);return l<t.left||i<=c}get size(){var i;if(this._size)return this._size;const e={height:0,width:0};if(this.nodes.popover===null)return e;const t=this.nodes.popover.cloneNode(!0);t.style.visibility="hidden",t.style.position="absolute",t.style.top="-1000px",t.setAttribute(Fe.opened,"true"),(i=t.querySelector(`[${Fe.nested}]`))==null||i.remove(),document.body.appendChild(t);const o=t.querySelector(`[${Fe.popoverContainer}]`);return e.height=o.offsetHeight,e.width=o.offsetWidth,t.remove(),this._size=e,e}get flippableElements(){return this.items.flatMap(t=>{if(!(t instanceof Pn))return t instanceof ei?t.getControls():[];if(t.isDisabled)return[];const o=t.getElement();return o?[o]:[]}).filter(t=>t!=null)}addSearch(){this.search=new mS({items:this.itemsDefault,placeholder:this.messages.search}),this.search.on(yd.Search,this.onSearch);const e=this.search.getElement();e.classList.add("mb-1.5"),this.nodes.popoverContainer.insertBefore(e,this.nodes.popoverContainer.firstChild)}toggleNothingFoundMessage(e){this.nodes.nothingFoundMessage.classList.toggle("!block",e),e?this.nodes.nothingFoundMessage.setAttribute(Fe.nothingFoundDisplayed,"true"):this.nodes.nothingFoundMessage.removeAttribute(Fe.nothingFoundDisplayed)}}const vS="38px",yS="46px";class kd extends Br{constructor(e){var o;const t=!Gn();super(be({},e),{[tt.Default]:{wrapperTag:"button",hint:{position:"top",alignment:"center",enabled:t},iconWithGap:!1,isInline:!0},[tt.Html]:{hint:{position:"top",alignment:"center",enabled:t},isInline:!0},[tt.Separator]:{isInline:!0}}),this.hide=()=>{var i;this.nodes.popover.removeAttribute(Fe.opened),this.nodes.popover.removeAttribute(Fe.openTop),this.nodes.popover.removeAttribute(Fe.openLeft),this.itemsDefault.forEach(l=>l.reset()),this.search!==void 0&&this.search.clear(),this.destroyNestedPopoverIfExists(),(i=this.flipper)==null||i.deactivate(),this.nodes.popover.className=Ae(no.popover),this.nodes.popoverContainer&&(this.nodes.popoverContainer.className=Ae(st.popoverContainer,no.popoverContainer),this.nodes.popoverContainer.style.height=""),this.emit(Zt.Closed)},this.nodes.popover.className=Ae(no.popover),this.nodes.popoverContainer&&(this.nodes.popoverContainer.className=Ae(st.popoverContainer,no.popoverContainer)),this.nodes.items&&(this.nodes.items.className=Ae(st.items,"flex")),this.nodes.popover.style.setProperty("--height",vS),this.nodes.popover.style.setProperty("--height-mobile",yS),this.nodes.popover.setAttribute(Fe.popoverInline,""),(o=this.flipper)==null||o.setHandleContentEditableTargets(!0),this.items.forEach(i=>{!(i instanceof Pn)&&!(i instanceof ei)||i.hasChildren&&i.isChildrenOpen&&this.showNestedItems(i)})}get offsetLeft(){return this.nodes.popoverContainer===null?0:this.nodes.popoverContainer.offsetLeft}show(){var t;if(super.show(),this.nodes.popover.className=Ae(no.popover,"inline-block"),this.nodes.popoverContainer){this.nodes.popoverContainer.className=Ae(st.popoverContainer,st.popoverContainerOpened,no.popoverContainer,"animate-none");const o=Gn()?"var(--height-mobile)":"var(--height)";this.nodes.popoverContainer.style.height=o}const e=this.nestingLevel===0?(t=this.nodes.popoverContainer)==null?void 0:t.getBoundingClientRect():void 0;if(e!==void 0){const o=`${e.width}px`,i=`${e.height}px`;this.nodes.popover.style.setProperty(Jt.InlinePopoverWidth,o),this.nodes.popover.style.width=o,this.nodes.popover.style.height=i}requestAnimationFrame(()=>{var o,i;(o=this.flipper)==null||o.deactivate(),(i=this.flipper)==null||i.activate(this.flippableElements)})}handleHover(){}setTriggerItemPosition(e,t){const o=t.getElement(),i=o?o.offsetLeft:0,l=this.offsetLeft+i;e.style.setProperty(Jt.TriggerItemLeft,l+"px")}showNestedItems(e){if(this.nestedPopoverTriggerItem===e){this.destroyNestedPopoverIfExists(),this.nestedPopoverTriggerItem=null;return}super.showNestedItems(e)}showNestedPopoverForItem(e){var d;const t=super.showNestedPopoverForItem(e),o=t.getElement();(d=t.flipper)==null||d.setHandleContentEditableTargets(!0);const i=o.querySelector(`[${Fe.popoverContainer}]`);i&&(i.className=Ae(i.className,"h-fit p-1.5 flex-col"));const l=o.querySelector(`[${Fe.popoverItems}]`);l&&(l.className=Ae(l.className,"block w-full"));const c=h=>{var g,v;if(!(h.key!=="Tab"||h.shiftKey)){if(this.nestedPopover!==t){document.removeEventListener("keydown",c,!0);return}h.preventDefault(),h.stopPropagation(),(g=t.flipper)==null||g.activate(t.flippableElements),(v=t.flipper)==null||v.focusFirst(),document.removeEventListener("keydown",c,!0)}};if(document.addEventListener("keydown",c,!0),t.on(Zt.Closed,()=>{document.removeEventListener("keydown",c,!0)}),o.setAttribute(Fe.nestedLevel,gS(t.nestingLevel)),t.nestingLevel===1&&i){i.className=Ae(i.className,"left-0");const h=Gn()?"calc(var(--height-mobile) + 3px)":"calc(var(--height) + 3px)";i.style.top=h}return t}handleItemClick(e){var t;e!==this.nestedPopoverTriggerItem&&((t=this.nestedPopoverTriggerItem)==null||t.handleClick(),super.destroyNestedPopoverIfExists()),super.handleItemClick(e)}}const Et=class Et{constructor(){this.scrollPosition=null}lock(){Hu?this.lockHard():(document.body.classList.add(Et.CSS.overflowHidden),document.body.setAttribute(Et.DATA_ATTR.scrollLocked,"true"))}unlock(){Hu?this.unlockHard():(document.body.classList.remove(Et.CSS.overflowHidden),document.body.removeAttribute(Et.DATA_ATTR.scrollLocked))}lockHard(){this.scrollPosition=window.pageYOffset,document.documentElement.style.setProperty("--window-scroll-offset",`${this.scrollPosition}px`),document.body.classList.add(Et.CSS.overflowHidden,Et.CSS.fixed,Et.CSS.wFull),document.body.style.top="calc(-1 * var(--window-scroll-offset))",document.body.setAttribute(Et.DATA_ATTR.scrollLockedHard,"true")}unlockHard(){document.body.classList.remove(Et.CSS.overflowHidden,Et.CSS.fixed,Et.CSS.wFull),document.body.style.top="",document.body.removeAttribute(Et.DATA_ATTR.scrollLockedHard),this.scrollPosition!==null&&window.scrollTo(0,this.scrollPosition),this.scrollPosition=null}};Et.CSS={overflowHidden:"overflow-hidden",fixed:"fixed",wFull:"w-full"},Et.DATA_ATTR={scrollLocked:"data-blok-scroll-locked",scrollLockedHard:"data-blok-scroll-locked-hard"};let wd=Et;const Td={root:"flex items-center mb-2 mt-1",text:"text-lg font-semibold text-text-primary",backButton:"border-0 bg-transparent w-9 h-9 text-text-primary cursor-pointer [&_svg]:block [&_svg]:w-7 [&_svg]:h-7"},xd={root:"data-blok-popover-header",text:"data-blok-popover-header-text",backButton:"data-blok-popover-header-back-button"};class bS{constructor({text:e,onBackButtonClick:t}){this.listeners=new Vo,this.text=e,this.onBackButtonClick=t,this.nodes={root:R.make("div",[Td.root],{"data-blok-testid":"popover-header",[xd.root]:""}),backButton:R.make("button",[Td.backButton],{"data-blok-testid":"popover-header-back-button",[xd.backButton]:""}),text:R.make("div",[Td.text],{"data-blok-testid":"popover-header-text",[xd.text]:""})},this.nodes.backButton.innerHTML=tS,this.nodes.root.appendChild(this.nodes.backButton),this.listeners.on(this.nodes.backButton,"click",this.onBackButtonClick),this.nodes.text.innerText=this.text,this.nodes.root.appendChild(this.nodes.text)}getElement(){return this.nodes.root}destroy(){this.nodes.root.remove(),this.listeners.destroy()}}class kS{constructor(){this.history=[]}push(e){this.history.push(e)}pop(){return this.history.pop()}get currentTitle(){return this.history.length===0?"":this.history[this.history.length-1].title}get currentItems(){return this.history.length===0?[]:this.history[this.history.length-1].items}reset(){for(;this.history.length>1;)this.pop()}}class yy extends vy{constructor(e){super(e,{[tt.Default]:{hint:{enabled:!1}},[tt.Html]:{hint:{enabled:!1}}}),this.scrollLocker=new wd,this.history=new kS,this.isHidden=!0,this.nodes.overlay=R.make("div",[st.popoverOverlay],{[Fe.popoverOverlay]:"",[Fe.overlayHidden]:"","data-blok-testid":"popover-overlay"}),this.nodes.popover.insertBefore(this.nodes.overlay,this.nodes.popover.firstChild),this.listeners.on(this.nodes.overlay,"click",()=>{this.hide()}),this.history.push({items:e.items}),this.nodes.popoverContainer.style.setProperty("--offset","5px"),this.nodes.popoverContainer.className=Ae(st.popoverContainer,st.popoverContainerMobile)}show(){this.nodes.overlay.removeAttribute(Fe.overlayHidden),this.nodes.overlay.className=Ae(st.popoverOverlay,"fixed inset-0 block visible z-[3] opacity-50 transition-opacity duration-[120ms] ease-in will-change-[opacity]"),super.show(),this.nodes.popoverContainer.className=Ae(st.popoverContainer,st.popoverContainerMobile,st.popoverContainerOpened,"animate-[panelShowingMobile_250ms_ease]"),this.scrollLocker.lock(),this.isHidden=!1}hide(){this.isHidden||(super.hide(),this.nodes.overlay.setAttribute(Fe.overlayHidden,""),this.nodes.overlay.className=st.popoverOverlay,this.nodes.popoverContainer.className=Ae(st.popoverContainer,st.popoverContainerMobile),this.scrollLocker.unlock(),this.history.reset(),this.isHidden=!0)}destroy(){super.destroy(),this.scrollLocker.unlock()}showNestedItems(e){this.updateItemsAndHeader(e.children,e.title),this.history.push({title:e.title,items:e.children})}updateItemsAndHeader(e,t){var l,c;this.header!==null&&this.header!==void 0&&(this.header.destroy(),this.header=null);const o=t!==void 0;o&&(this.header=new bS({text:t,onBackButtonClick:()=>{this.history.pop(),this.updateItemsAndHeader(this.history.currentItems,this.history.currentTitle)}}));const i=(c=(l=this.header)==null?void 0:l.getElement())!=null?c:null;o&&i!==null&&this.nodes.popoverContainer.insertBefore(i,this.nodes.popoverContainer.firstChild),this.items.forEach(d=>{var h;return(h=d.getElement())==null?void 0:h.remove()}),this.items=this.buildItems(e),this.items.forEach(d=>{var g;const h=d.getElement();h!==null&&((g=this.nodes.items)==null||g.appendChild(h))})}}class wS extends Be{constructor(){super(...arguments),this.opened=!1,this.selection=new se,this.popover=null,this.flipperInstance=new Yn({focusedItemClass:xn.focused,allowedKeys:[ie.TAB,ie.UP,ie.DOWN,ie.ENTER]}),this.flipperKeydownHandler=null,this.flipperKeydownSource=null,this.close=()=>{this.opened&&(this.opened=!1,se.isAtBlok||this.selection.restore(),this.selection.clearSaved(),this.detachFlipperKeydownListener(),!this.Blok.CrossBlockSelection.isCrossBlockSelectionStarted&&this.Blok.BlockManager.currentBlock&&this.Blok.BlockSelection.unselectBlock(this.Blok.BlockManager.currentBlock),this.eventsDispatcher.emit(this.events.closed),this.popover&&(this.popover.off(Zt.Closed,this.onPopoverClose),this.popover.destroy(),this.popover.getElement().remove(),this.popover=null))},this.onPopoverClose=()=>{this.close()}}get events(){return{opened:Ju,closed:ed}}get CSS(){return{settings:""}}get flipper(){return this.flipperInstance}make(){this.nodes.wrapper=R.make("div"),this.nodes.wrapper.setAttribute("data-blok-testid","block-tunes-wrapper"),this.eventsDispatcher.on(Go,this.close)}destroy(){this.detachFlipperKeydownListener(),this.removeAllNodes(),this.listeners.destroy(),this.eventsDispatcher.off(Go,this.close)}async open(e,t){const o=e!=null?e:this.Blok.BlockManager.currentBlock;if(o===void 0)return;this.opened=!0,this.selection.save(),this.Blok.BlockSelection.selectBlock(o),this.Blok.BlockSelection.clearCache();const{toolTunes:i,commonTunes:l}=o.getTunes();this.eventsDispatcher.emit(this.events.opened);const c=Gn()?yy:Br,d={searchable:!0,trigger:t||this.nodes.wrapper,items:await this.getTunesItems(o,l,i),scopeElement:this.Blok.API.methods.ui.nodes.redactor,messages:{nothingFound:$e.ui(it.ui.popover,"Nothing found"),search:$e.ui(it.ui.popover,"Filter")}};c===Br&&(d.flipper=this.flipperInstance),this.popover=new c(d),this.popover.getElement().setAttribute("data-blok-testid","block-tunes-popover"),this.popover.on(Zt.Closed,this.onPopoverClose),this.popover.show(),c===Br&&this.flipperInstance.focusItem(0),this.attachFlipperKeydownListener(o)}getElement(){return this.nodes.wrapper}contains(e){var t,o;return!!((t=this.nodes.wrapper)!=null&&t.contains(e)||(o=this.popover)!=null&&o.hasNode(e))}async getTunesItems(e,t,o){const i=[];o!==void 0&&o.length>0&&(i.push(...o),i.push({type:tt.Separator}));const l=Array.from(this.Blok.Tools.blockTools.values()),d=(await Xv(e,l)).reduce((h,g)=>(g.toolbox===void 0||g.toolbox.forEach(v=>{var b;const y=(b=v.title)!=null?b:g.name;h.push({icon:v.icon,title:$e.t(it.toolNames,y),name:g.name,closeOnActivate:!0,onActivate:async()=>{const{BlockManager:E,Caret:w,Toolbar:T}=this.Blok,S=await E.convert(e,g.name,v.data);T.close(),w.setToBlock(S,w.positions.END)}})}),h),[]);return d.length>0&&(i.push({icon:ZE,name:"convert-to",title:$e.ui(it.ui.popover,"Convert to"),children:{searchable:!0,items:d}}),i.push({type:tt.Separator})),i.push(...t),i}attachFlipperKeydownListener(e){this.detachFlipperKeydownListener();const t=e==null?void 0:e.pluginsContent;t instanceof HTMLElement&&(this.flipperInstance.setHandleContentEditableTargets(!0),this.flipperKeydownHandler=o=>{this.flipperInstance.handleExternalKeydown(o)},t.addEventListener("keydown",this.flipperKeydownHandler,!0),this.flipperKeydownSource=t)}detachFlipperKeydownListener(){this.flipperKeydownSource!==null&&this.flipperKeydownHandler!==null&&this.flipperKeydownSource.removeEventListener("keydown",this.flipperKeydownHandler,!0),this.flipperInstance.setHandleContentEditableTargets(!1),this.flipperKeydownSource=null,this.flipperKeydownHandler=null}}const by={SHIFT:["SHIFT"],CMD:["CMD","CONTROL","COMMAND","WINDOWS","CTRL"],ALT:["ALT","OPTION"]},TS={0:"Digit0",1:"Digit1",2:"Digit2",3:"Digit3",4:"Digit4",5:"Digit5",6:"Digit6",7:"Digit7",8:"Digit8",9:"Digit9",A:"KeyA",B:"KeyB",C:"KeyC",D:"KeyD",E:"KeyE",F:"KeyF",G:"KeyG",H:"KeyH",I:"KeyI",J:"KeyJ",K:"KeyK",L:"KeyL",M:"KeyM",N:"KeyN",O:"KeyO",P:"KeyP",Q:"KeyQ",R:"KeyR",S:"KeyS",T:"KeyT",U:"KeyU",V:"KeyV",W:"KeyW",X:"KeyX",Y:"KeyY",Z:"KeyZ",BACKSPACE:"Backspace",ENTER:"Enter",ESCAPE:"Escape",LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown",INSERT:"Insert",DELETE:"Delete",".":"Period"},xS=a=>Object.keys(by).find(t=>by[t].includes(a));class ES{constructor(e){this.commands={SHIFT:!1,CMD:!1,ALT:!1},this.keys={},this.name=e.name,this.element=e.on,this.callback=e.callback,this.parseShortcutName(e.name),this.executeShortcut=t=>{this.execute(t)},this.element.addEventListener("keydown",this.executeShortcut,!1)}remove(){this.element.removeEventListener("keydown",this.executeShortcut)}parseShortcutName(e){const t=e.split("+");for(const o of t){const i=o.toUpperCase(),l=xS(i);l!==void 0?this.commands[l]=!0:this.keys[i]=!0}}checkModifiers(e){const t={CMD:e.ctrlKey||e.metaKey,SHIFT:e.shiftKey,ALT:e.altKey};return Object.keys(this.commands).every(i=>this.commands[i]===t[i])}checkKeys(e){return Object.keys(this.keys).every(o=>{const i=TS[o];return e.code===i})}execute(e){const t=this.checkModifiers(e),o=this.checkKeys(e);t&&o&&this.callback(e)}}let SS=class{constructor(){this.registeredShortcuts=new Map}add(e){if(this.findShortcut(e.on,e.name))throw Error(`Shortcut ${e.name} is already registered for ${e.on}. Please remove it before add a new handler.`);const o=new ES({name:e.name,on:e.on,callback:e.handler}),i=this.registeredShortcuts.get(e.on)||[];this.registeredShortcuts.set(e.on,[...i,o])}remove(e,t){const o=this.findShortcut(e,t);if(!o)return;o.remove();const i=this.registeredShortcuts.get(e);if(!i)return;const l=i.filter(c=>c!==o);if(l.length===0){this.registeredShortcuts.delete(e);return}this.registeredShortcuts.set(e,l)}findShortcut(e,t){return(this.registeredShortcuts.get(e)||[]).find(({name:i})=>i===t)}};const ro=new SS;var ks=(a=>(a.Opened="toolbox-opened",a.Closed="toolbox-closed",a.BlockAdded="toolbox-block-added",a))(ks||{});class CS extends Ko{constructor({api:e,tools:t,i18nLabels:o,triggerElement:i}){super(),this.opened=!1,this.listeners=new Vo,this.popover=null,this.handleMobileLayoutToggle=()=>{this.destroyPopover(),this.initPopover()},this.onPopoverClose=()=>{this.opened=!1,this.emit("toolbox-closed")},this.api=e,this.tools=t,this.i18nLabels=o,this.triggerElement=i,this.enableShortcuts(),this.nodes={toolbox:R.make("div")},this.nodes.toolbox.setAttribute("data-blok-testid","toolbox"),this.initPopover(),this.api.events.on(Go,this.handleMobileLayoutToggle)}get isEmpty(){return this.toolsToBeDisplayed.length===0}static get CSS(){return{toolbox:""}}getElement(){return this.nodes.toolbox}contains(e){var t;return!!(this.nodes.toolbox.contains(e)||(t=this.popover)!=null&&t.getElement().contains(e))}hasFocus(){if(this.popover!==null)return"hasFocus"in this.popover?this.popover.hasFocus():void 0}destroy(){var e;super.destroy(),this.nodes&&this.nodes.toolbox&&this.nodes.toolbox.remove(),this.removeAllShortcuts(),(e=this.popover)==null||e.off(Zt.Closed,this.onPopoverClose),this.listeners.destroy(),this.api.events.off(Go,this.handleMobileLayoutToggle)}async toolButtonActivated(e,t){await this.insertNewBlock(e,t)}open(){var e;this.isEmpty||((e=this.popover)==null||e.show(),this.opened=!0,this.emit("toolbox-opened"))}close(){var e;(e=this.popover)==null||e.hide(),this.opened=!1,this.emit("toolbox-closed")}toggle(){this.opened?this.close():this.open()}initPopover(){const e=Gn()?yy:Br;this.popover=new e({scopeElement:this.api.ui.nodes.redactor,trigger:this.triggerElement||this.nodes.toolbox,searchable:!0,messages:{nothingFound:this.i18nLabels.nothingFound,search:this.i18nLabels.filter},items:this.toolboxItemsToBeDisplayed}),this.popover.on(Zt.Closed,this.onPopoverClose),this.popover.getElement().setAttribute("data-blok-testid","toolbox-popover")}destroyPopover(){this.popover!==null&&(this.popover.hide(),this.popover.off(Zt.Closed,this.onPopoverClose),this.popover.destroy(),this.popover=null),this.nodes.toolbox!==null&&(this.nodes.toolbox.innerHTML="")}get toolsToBeDisplayed(){if(this._toolsToBeDisplayed)return this._toolsToBeDisplayed;const e=[];return this.tools.forEach(t=>{t.toolbox&&e.push(t)}),this._toolsToBeDisplayed=e,e}get toolboxItemsToBeDisplayed(){if(this._toolboxItemsToBeDisplayed)return this._toolboxItemsToBeDisplayed;const e=(o,i,l=!0)=>({icon:o.icon,title:$e.t(it.toolNames,o.title||cs(i.name)),name:i.name,onActivate:()=>{this.toolButtonActivated(i.name,o.data)},secondaryLabel:i.shortcut&&l?mv(i.shortcut):""}),t=this.toolsToBeDisplayed.reduce((o,i)=>{const{toolbox:l}=i;return l===void 0||(Array.isArray(l)?l:[l]).forEach((d,h)=>{o.push(e(d,i,h===0))}),o},[]);return this._toolboxItemsToBeDisplayed=t,t}enableShortcuts(){this.toolsToBeDisplayed.forEach(e=>{const t=e.shortcut;t&&this.enableShortcutForTool(e.name,t)})}enableShortcutForTool(e,t){ro.add({name:t,on:this.api.ui.nodes.redactor,handler:async o=>{o.preventDefault();const i=this.api.blocks.getCurrentBlockIndex(),l=this.api.blocks.getBlockByIndex(i);if(l)try{const c=await this.api.blocks.convert(l.id,e);this.api.caret.setToBlock(c,"end");return}catch(c){}await this.insertNewBlock(e)}})}removeAllShortcuts(){this.toolsToBeDisplayed.forEach(e=>{const t=e.shortcut;t&&ro.remove(this.api.ui.nodes.redactor,t)})}async insertNewBlock(e,t){const o=this.api.blocks.getCurrentBlockIndex(),i=this.api.blocks.getBlockByIndex(o);if(!i)return;const l=i.isEmpty?o:o+1,d=t!==void 0&&Object.keys(t).length>0?Object.assign(await this.api.blocks.composeBlockData(e),t):void 0,h=this.api.blocks.insert(e,d,void 0,l,void 0,i.isEmpty);this.api.caret.setToBlock(l),this.emit("toolbox-block-added",{block:h}),this.api.toolbar.close()}}const ky="block hovered",wy=1e3;class BS extends Be{constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t}),this.hoveredBlock=null,this.toolboxInstance=null,this.settingsTogglerMouseDownPosition=null,this.onBlockSettingsOpen=()=>{var o;(o=this.nodes.settingsToggler)==null||o.classList.add(this.CSS.settingsTogglerOpened)},this.onBlockSettingsClose=()=>{var o;(o=this.nodes.settingsToggler)==null||o.classList.remove(this.CSS.settingsTogglerOpened)}}get CSS(){return{toolbar:yt("absolute left-0 right-0 top-0 transition-opacity duration-100 ease-linear will-change-[opacity,top]"),toolbarOpened:"block",toolbarClosed:"hidden",content:yt("relative mx-auto max-w-content"),actions:yt("absolute flex opacity-0 pr-[5px]","right-full","mobile:right-auto","group-data-[blok-rtl=true]:right-auto group-data-[blok-rtl=true]:left-[calc(-1*theme(width.toolbox-btn))]","mobile:group-data-[blok-rtl=true]:ml-0 mobile:group-data-[blok-rtl=true]:mr-auto mobile:group-data-[blok-rtl=true]:pr-0 mobile:group-data-[blok-rtl=true]:pl-[10px]"),actionsOpened:"opacity-100",plusButton:yt("text-dark cursor-pointer w-toolbox-btn h-toolbox-btn rounded-[7px] inline-flex justify-center items-center select-none","shrink-0","[&_svg]:h-6 [&_svg]:w-6","can-hover:hover:bg-bg-light","mobile:bg-white mobile:border mobile:border-[#e8e8eb] mobile:shadow-overlay-pane mobile:rounded-[6px] mobile:z-[2]","mobile:w-toolbox-btn-mobile mobile:h-toolbox-btn-mobile","group-data-[blok-rtl=true]:right-[calc(-1*theme(width.toolbox-btn))] group-data-[blok-rtl=true]:left-auto","not-mobile:group-data-[blok-narrow=true]:left-[5px]","not-mobile:group-data-[blok-narrow=true]:group-data-[blok-rtl=true]:left-0 not-mobile:group-data-[blok-narrow=true]:group-data-[blok-rtl=true]:right-[5px]"),plusButtonShortcutKey:"text-white",settingsToggler:yt("text-dark cursor-pointer w-toolbox-btn h-toolbox-btn rounded-[7px] inline-flex justify-center items-center select-none","cursor-pointer select-none","[&_svg]:h-6 [&_svg]:w-6","active:cursor-grabbing","can-hover:hover:bg-bg-light can-hover:hover:cursor-grab","group-data-[blok-toolbox-opened=true]:can-hover:hover:cursor-pointer","mobile:bg-white mobile:border mobile:border-[#e8e8eb] mobile:shadow-overlay-pane mobile:rounded-[6px] mobile:z-[2]","mobile:w-toolbox-btn-mobile mobile:h-toolbox-btn-mobile","not-mobile:w-6"),settingsTogglerHidden:"hidden",settingsTogglerOpened:yt("can-hover:hover:cursor-pointer")}}get opened(){var e,t;return(t=(e=this.nodes.wrapper)==null?void 0:e.classList.contains(this.CSS.toolbarOpened))!=null?t:!1}contains(e){var t,o;return!!((t=this.nodes.wrapper)!=null&&t.contains(e)||(o=this.toolboxInstance)!=null&&o.contains(e)||this.Blok.BlockSettings.contains(e))}get toolbox(){var e;return{opened:(e=this.toolboxInstance)==null?void 0:e.opened,close:()=>{var t;(t=this.toolboxInstance)==null||t.close()},open:()=>{if(this.toolboxInstance===null){Ce("toolbox.open() called before initialization is finished","warn");return}this.hoveredBlock&&(this.Blok.BlockManager.currentBlock=this.hoveredBlock),this.toolboxInstance.open()},toggle:()=>{if(this.toolboxInstance===null){Ce("toolbox.toggle() called before initialization is finished","warn");return}this.toolboxInstance.toggle()},hasFocus:()=>{var t;return(t=this.toolboxInstance)==null?void 0:t.hasFocus()}}}get blockActions(){return{hide:()=>{var e,t;(e=this.nodes.actions)==null||e.classList.remove(this.CSS.actionsOpened),(t=this.nodes.actions)==null||t.removeAttribute("data-blok-opened")},show:()=>{var e,t;(e=this.nodes.actions)==null||e.classList.add(this.CSS.actionsOpened),(t=this.nodes.actions)==null||t.setAttribute("data-blok-opened","true")}}}get blockTunesToggler(){return{hide:()=>{var e;return(e=this.nodes.settingsToggler)==null?void 0:e.classList.add(this.CSS.settingsTogglerHidden)},show:()=>{var e;return(e=this.nodes.settingsToggler)==null?void 0:e.classList.remove(this.CSS.settingsTogglerHidden)}}}toggleReadOnly(e){e?(this.destroy(),this.Blok.BlockSettings.destroy(),this.disableModuleBindings()):window.requestIdleCallback(async()=>{await this.drawUI(),this.enableModuleBindings()},{timeout:2e3})}moveAndOpen(e){if(this.toolboxInstance===null){Ce("Can't open Toolbar since Blok initialization is not finished yet","warn");return}this.toolboxInstance.opened&&this.toolboxInstance.close(),this.Blok.BlockSettings.opened&&this.Blok.BlockSettings.close();const t=e!=null?e:this.Blok.BlockManager.currentBlock;if(!t)return;this.hoveredBlock=t;const{wrapper:o,plusButton:i}=this.nodes;if(!o||!i)return;const l=t.holder,{isMobile:c}=this.Blok.UI,d=20,h=t.firstInput,g=l.getBoundingClientRect(),v=h!==void 0?h.getBoundingClientRect():null,y=v!==null?v.top-g.top:null,b=(()=>{const T=parseInt(window.getComputedStyle(t.pluginsContent).paddingTop,10);if(c){const H=parseInt(window.getComputedStyle(i).height,10);return T-H}if(h===void 0||y===null||y>d)return T;const S=F1(h),O=parseInt(window.getComputedStyle(i).height,10);return S-O+8+y})();o.style.top=`${Math.floor(b)}px`,l.appendChild(o);const E=t.getTunes(),w=E.toolTunes.length>0||E.commonTunes.length>0;this.Blok.BlockManager.blocks.length===1&&t.isEmpty&&!w?this.blockTunesToggler.hide():this.blockTunesToggler.show(),this.open()}close(){var e,t,o,i;this.Blok.ReadOnly.isEnabled||((e=this.nodes.wrapper)==null||e.classList.remove(this.CSS.toolbarOpened),(t=this.nodes.wrapper)==null||t.classList.add(this.CSS.toolbarClosed),(o=this.nodes.wrapper)==null||o.removeAttribute("data-blok-opened"),this.blockActions.hide(),(i=this.toolboxInstance)==null||i.close(),this.Blok.BlockSettings.close(),this.reset())}reset(){this.nodes.wrapper&&(this.nodes.wrapper.style.top="unset",this.Blok.UI.nodes.wrapper.appendChild(this.nodes.wrapper))}open(e=!0){var t,o,i;(t=this.nodes.wrapper)==null||t.classList.remove(this.CSS.toolbarClosed),(o=this.nodes.wrapper)==null||o.classList.add(this.CSS.toolbarOpened),(i=this.nodes.wrapper)==null||i.setAttribute("data-blok-opened","true"),e?this.blockActions.show():this.blockActions.hide()}async make(){const e=R.make("div",[this.CSS.toolbar,this.CSS.toolbarClosed,"group-data-[blok-dragging=true]:pointer-events-none"]);this.nodes.wrapper=e,e.setAttribute(Fx,""),e.setAttribute("data-blok-testid","toolbar");const t=R.make("div",this.CSS.content),o=R.make("div",[this.CSS.actions,"not-mobile:group-data-[blok-narrow=true]:right-[calc(-1*theme(spacing.narrow-mode-right-padding)-5px)]","not-mobile:group-data-[blok-narrow=true]:group-data-[blok-rtl=true]:right-auto","not-mobile:group-data-[blok-narrow=true]:group-data-[blok-rtl=true]:left-[calc(-1*theme(spacing.narrow-mode-right-padding)-5px)]","not-mobile:group-data-[blok-narrow=true]:group-data-[blok-rtl=true]:left-[-5px]"]);this.nodes.content=t,this.nodes.actions=o,o.setAttribute("data-blok-testid","toolbar-actions"),R.append(e,t),R.append(t,o);const i=R.make("div",this.CSS.plusButton,{innerHTML:eS});i.setAttribute("data-blok-testid","plus-button"),this.nodes.plusButton=i,R.append(o,i),this.readOnlyMutableListeners.on(i,"click",()=>{Yo(!0),this.plusButtonClicked()},!1);const l=R.make("div"),c=T=>{const S=document.createDocumentFragment(),O=T.indexOf(" ");if(O>0){const L=T.substring(0,O),U=T.substring(O);S.appendChild(R.make("span",this.CSS.plusButtonShortcutKey,{textContent:L})),S.appendChild(document.createTextNode(U))}else S.appendChild(document.createTextNode(T));return S};l.appendChild(c($e.ui(it.ui.toolbar.toolbox,"Click to add below"))),l.appendChild(R.make("br"));const h=gv().win?$e.ui(it.ui.toolbar.toolbox,"Ctrl-click to add above"):$e.ui(it.ui.toolbar.toolbox,"Option-click to add above");l.appendChild(c(h)),ms(i,l,{hidingDelay:400});const g=R.make("span",[this.CSS.settingsToggler,"group-data-[blok-dragging=true]:cursor-grabbing"],{innerHTML:JE});g.setAttribute(zx,""),g.setAttribute(Hx,""),g.setAttribute("data-blok-testid","settings-toggler"),this.nodes.settingsToggler=g,R.append(o,g);const v=R.make("div"),y=T=>{const S=R.make("div"),[O,...L]=T.split(" "),U=R.make("span",null,{textContent:O});return U.style.color="white",S.appendChild(U),L.length>0&&S.appendChild(R.text(" "+L.join(" "))),S},b=$e.ui(it.ui.blockTunes.toggler,"Drag to move"),E=$e.ui(it.ui.blockTunes.toggler,"Click to open the menu");v.appendChild(y(b)),v.appendChild(y(E)),ms(g,v,{hidingDelay:400}),R.append(o,this.makeToolbox());const w=this.Blok.BlockSettings.getElement();if(!w)throw new Error("Block Settings element was not created");R.append(o,w),R.append(this.Blok.UI.nodes.wrapper,e)}makeToolbox(){this.toolboxInstance=new CS({api:this.Blok.API.methods,tools:this.Blok.Tools.blockTools,i18nLabels:{filter:$e.ui(it.ui.popover,"Filter"),nothingFound:$e.ui(it.ui.popover,"Nothing found")},triggerElement:this.nodes.plusButton}),this.toolboxInstance.on(ks.Opened,()=>{this.Blok.UI.nodes.wrapper.classList.add(this.CSS.openedToolboxHolderModifier),this.Blok.UI.nodes.wrapper.setAttribute(Wv,"true")}),this.toolboxInstance.on(ks.Closed,()=>{this.Blok.UI.nodes.wrapper.classList.remove(this.CSS.openedToolboxHolderModifier),this.Blok.UI.nodes.wrapper.removeAttribute(Wv)}),this.toolboxInstance.on(ks.BlockAdded,({block:t})=>{const{BlockManager:o,Caret:i}=this.Blok,l=o.getBlockById(t.id);if(!l||l.inputs.length!==0)return;if(l===o.lastBlock){o.insertAtEnd(),i.setToBlock(o.lastBlock);return}const c=o.nextBlock;c&&i.setToBlock(c)});const e=this.toolboxInstance.getElement();if(e===null)throw new Error("Toolbox element was not created");return e}plusButtonClicked(){var e;this.hoveredBlock&&(this.Blok.BlockManager.currentBlock=this.hoveredBlock),this.Blok.BlockSettings.opened&&this.Blok.BlockSettings.close(),(e=this.toolboxInstance)==null||e.toggle()}enableModuleBindings(){const e=this.nodes.settingsToggler;e&&(this.readOnlyMutableListeners.on(e,"mousedown",t=>{t.stopPropagation(),Yo(!0);const o=t;this.settingsTogglerMouseDownPosition={x:o.clientX,y:o.clientY}},!0),this.readOnlyMutableListeners.on(e,"click",t=>{var c;t.stopPropagation();const o=t,i=this.settingsTogglerMouseDownPosition;this.settingsTogglerMouseDownPosition=null,!(i!==null&&(Math.abs(o.clientX-i.x)>wy||Math.abs(o.clientY-i.y)>wy))&&(this.settingsTogglerClicked(),(c=this.toolboxInstance)!=null&&c.opened&&this.toolboxInstance.close())},!0)),Gn()||this.eventsDispatcher.on(ky,t=>{var i;const o=t.block;o instanceof Xo&&(this.Blok.BlockSettings.opened||(i=this.toolboxInstance)!=null&&i.opened||this.moveAndOpen(o))}),this.eventsDispatcher.on(Ju,this.onBlockSettingsOpen),this.eventsDispatcher.on(ed,this.onBlockSettingsClose)}disableModuleBindings(){this.readOnlyMutableListeners.clearAll(),this.eventsDispatcher.off(Ju,this.onBlockSettingsOpen),this.eventsDispatcher.off(ed,this.onBlockSettingsClose)}settingsTogglerClicked(){const e=this.hoveredBlock;e&&(this.Blok.BlockManager.currentBlock=e,this.Blok.BlockSettings.opened?this.Blok.BlockSettings.close():this.Blok.BlockSettings.open(e,this.nodes.settingsToggler))}async drawUI(){this.Blok.BlockSettings.make(),await this.make()}destroy(){this.removeAllNodes(),this.toolboxInstance&&this.toolboxInstance.destroy()}}var Ar=(a=>(a[a.Block=0]="Block",a[a.Inline=1]="Inline",a[a.Tune=2]="Tune",a))(Ar||{}),ws=(a=>(a.Shortcut="shortcut",a.Toolbox="toolbox",a.EnabledInlineTools="inlineToolbar",a.EnabledBlockTunes="tunes",a.Config="config",a))(ws||{}),Ty=(a=>(a.Shortcut="shortcut",a.SanitizeConfig="sanitize",a))(Ty||{}),oo=(a=>(a.IsEnabledLineBreaks="enableLineBreaks",a.Toolbox="toolbox",a.ConversionConfig="conversionConfig",a.IsReadOnlySupported="isReadOnlySupported",a.PasteConfig="pasteConfig",a))(oo||{}),xy=(a=>(a.IsInline="isInline",a.Title="title",a.IsReadOnlySupported="isReadOnlySupported",a))(xy||{}),Ed=(a=>(a.IsTune="isTune",a))(Ed||{});class Sd{constructor({name:e,constructable:t,config:o,api:i,isDefault:l,isInternal:c=!1,defaultPlaceholder:d}){this.api=i,this.name=e,this.constructable=t,this.config=o,this.isDefault=l,this.isInternal=c,this.defaultPlaceholder=d}get settings(){var t;const e=(t=this.config.config)!=null?t:{};return this.isDefault&&!("placeholder"in e)&&this.defaultPlaceholder&&(e.placeholder=this.defaultPlaceholder),e}reset(){if(De(this.constructable.reset))return this.constructable.reset()}prepare(){const e=this.constructable.prepare;if(!De(e))return;const t={toolName:this.name,config:this.settings};return e.call(this.constructable,t)}get shortcut(){const e=this.constructable.shortcut;return this.config.shortcut||e}get sanitizeConfig(){return this.constructable.sanitize||{}}isInline(){return this.type===Ar.Inline}isBlock(){return this.type===Ar.Block}isTune(){return this.type===Ar.Tune}}const AS="absolute top-0 left-0 z-[3] opacity-100 visible transition-opacity duration-[250ms] ease-out will-change-[opacity,left,top] [&_[hidden]]:!hidden";class IS extends Be{constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t}),this.opened=!1,this.popover=null,this.toolbarVerticalMargin=Gn()?20:6,this.initialized=!1,this.initializationScheduled=!1,this.tools=new Map,this.registeredShortcuts=new Map,this.shortcutsRegistered=!1,this.shortcutRegistrationScheduled=!1,this.listeners.on(document,"keydown",o=>{const i=o;i.shiftKey&&(i.key==="ArrowDown"||i.key==="ArrowUp")&&this.tryToShow()},!0),this.scheduleInitialization(),this.tryRegisterShortcuts()}set state(e){super.state=e,this.tryRegisterShortcuts()}initialize(){var e,t,o;if(!this.initialized){if(!((o=(t=(e=this.Blok)==null?void 0:e.UI)==null?void 0:t.nodes)!=null&&o.wrapper)||this.Blok.Tools===void 0){this.scheduleInitialization();return}this.make(),this.tryRegisterShortcuts(),this.initialized=!0}}tryRegisterShortcuts(){var t;if(this.shortcutsRegistered)return;if(((t=this.Blok)==null?void 0:t.Tools)===void 0){this.scheduleShortcutRegistration();return}this.registerInitialShortcuts()&&(this.shortcutsRegistered=!0)}scheduleShortcutRegistration(){if(this.shortcutsRegistered||this.shortcutRegistrationScheduled)return;this.shortcutRegistrationScheduled=!0;const e=()=>{this.shortcutRegistrationScheduled=!1,this.tryRegisterShortcuts()};typeof window!="undefined"&&typeof window.setTimeout=="function"?window.setTimeout(e,0):e()}scheduleInitialization(){if(this.initialized||this.initializationScheduled)return;this.initializationScheduled=!0;const e=()=>{this.initializationScheduled=!1,this.initialize()},t=()=>{window.setTimeout(e,0)};typeof window!="undefined"&&"requestIdleCallback"in window?window.requestIdleCallback(()=>{t()},{timeout:2e3}):t()}async tryToShow(e=!1){e&&this.close(),this.initialize(),this.allowedToShow()&&(await this.open(),this.Blok.Toolbar.close())}close(){var i,l,c,d,h,g,v;if(!this.opened)return;for(const y of this.tools.values());this.tools=new Map,this.reset(),this.opened=!1;const e=(i=this.popover)!=null?i:this.createFallbackPopover();(l=e==null?void 0:e.hide)==null||l.call(e),(c=e==null?void 0:e.destroy)==null||c.call(e);const t=kd.mock,o=(h=(d=t==null?void 0:t.results)==null?void 0:d.at(-1))==null?void 0:h.value;o&&o!==e&&((g=o.hide)==null||g.call(o),(v=o.destroy)==null||v.call(o)),this.popover=null}containsNode(e){return this.nodes.wrapper===void 0?!1:this.nodes.wrapper.contains(e)}destroy(){var e;this.removeAllNodes(),(e=this.popover)==null||e.destroy(),this.popover=null}make(){this.nodes.wrapper=R.make("div"),this.nodes.wrapper.className=Ae(AS),this.nodes.wrapper.setAttribute(to,Bx),this.nodes.wrapper.setAttribute("data-blok-testid","inline-toolbar"),R.append(this.Blok.UI.nodes.wrapper,this.nodes.wrapper)}async open(){var i,l,c,d,h,g,v,y,b,E,w,T,S;if(this.opened)return;this.initialize(),this.opened=!0,this.popover!==null&&this.popover.destroy(),this.createToolsInstances();const e=await this.getPopoverItems();this.popover=new kd({items:e,scopeElement:(h=(d=(c=(l=(i=this.Blok.API)==null?void 0:i.methods)==null?void 0:l.ui)==null?void 0:c.nodes)==null?void 0:d.redactor)!=null?h:this.Blok.UI.nodes.redactor,messages:{nothingFound:$e.ui(it.ui.popover,"Nothing found"),search:$e.ui(it.ui.popover,"Filter")}});const t=(v=(g=this.popover).getElement)==null?void 0:v.call(g),o=(E=(b=(y=this.popover.size)==null?void 0:y.width)!=null?b:t==null?void 0:t.getBoundingClientRect().width)!=null?E:0;this.move(o),t&&((w=this.nodes.wrapper)==null||w.append(t)),(S=(T=this.popover).show)==null||S.call(T)}move(e){const t=se.rect,o=this.Blok.UI.nodes.wrapper.getBoundingClientRect(),i={x:t.x-o.x,y:t.y+t.height-o.top+this.toolbarVerticalMargin};i.x+e+o.x>this.Blok.UI.contentRect.right&&(i.x=this.Blok.UI.contentRect.right-e-o.x),this.nodes.wrapper.style.left=Math.floor(i.x)+"px",this.nodes.wrapper.style.top=Math.floor(i.y)+"px"}reset(){this.nodes.wrapper!==void 0&&(this.nodes.wrapper.style.left="0",this.nodes.wrapper.style.top="0")}allowedToShow(){const e=["IMG","INPUT"],t=this.resolveSelection(),o=se.text;if(!t||!t.anchorNode||t.isCollapsed||o.length<1)return!1;const i=R.isElement(t.anchorNode)?t.anchorNode:t.anchorNode.parentElement;if(i===null||t!==null&&e.includes(i.tagName))return!1;const l=R.isElement(t.anchorNode)?t.anchorNode:t.anchorNode.parentElement,c=l?this.Blok.BlockManager.getBlock(l):null,d=c!=null?c:this.Blok.BlockManager.currentBlock;if(d==null||this.getTools().some(w=>d.tool.inlineTools.has(w.name))===!1)return!1;const v="[contenteditable]";if(i.closest(v)!==null)return!0;const b=d.holder;return b&&(b.matches(v)?b:b.closest(v))?!0:this.Blok.ReadOnly.isEnabled?se.isSelectionAtBlok(t):!1}getTools(){var o;const e=(o=this.Blok.BlockManager.currentBlock)!=null?o:(()=>{const i=this.resolveSelection(),l=i==null?void 0:i.anchorNode;if(!l)return null;const c=R.isElement(l)?l:l.parentElement;return c?this.Blok.BlockManager.getBlock(c):null})();return e?Array.from(e.tool.inlineTools.values()).filter(i=>!(this.Blok.ReadOnly.isEnabled&&i.isReadOnlySupported!==!0)):[]}createToolsInstances(){this.tools=new Map,this.getTools().forEach(t=>{const o=t.create();this.tools.set(t,o)})}async getPopoverItems(){const e=[],t=Array.from(this.tools.entries());for(const[o,[i,l]]of t.entries()){const c=await l.render(),d=this.getToolShortcut(i.name);this.tryEnableShortcut(i.name,d);const h=d!==void 0?mv(d):void 0,g=$e.t(it.toolNames,i.title||cs(i.name));[c].flat().forEach(v=>{this.processPopoverItem(v,i.name,l,g,h,e,o)})}return e}tryEnableShortcut(e,t){if(t!==void 0)try{this.enableShortcuts(e,t)}catch(o){}}processPopoverItem(e,t,o,i,l,c,d){const h={name:t,hint:{title:i,description:l}};if(!R.isElement(e)){if(e.type===tt.Html){c.push(It(be(be({},h),e),{type:tt.Html}));return}if(e.type===tt.Separator){c.push({type:tt.Separator});return}this.processDefaultItem(e,h,c,d)}}processDefaultItem(e,t,o,i){const l=It(be(be({},t),e),{type:tt.Default});o.push(l),"children"in l&&i===0&&o.push({type:tt.Separator})}getToolShortcut(e){const{Tools:t}=this.Blok,o=t.inlineTools.get(e),i=t.internal.inlineTools;return Array.from(i.keys()).includes(e)?this.inlineTools[e][Ty.Shortcut]:o==null?void 0:o.shortcut}enableShortcuts(e,t){const o=this.registeredShortcuts.get(e);o!==t&&(this.isShortcutTakenByAnotherTool(e,t)||(o!==void 0&&(ro.remove(document,o),this.registeredShortcuts.delete(e)),ro.add({name:t,handler:i=>{const{currentBlock:l}=this.Blok.BlockManager;l&&l.tool.enabledInlineTools!==!1&&(i.preventDefault(),this.activateToolByShortcut(e))},on:document}),this.registeredShortcuts.set(e,t)))}isShortcutTakenByAnotherTool(e,t){return Array.from(this.registeredShortcuts.entries()).some(([o,i])=>o!==e&&i===t)}async activateToolByShortcut(e){if(this.opened||await this.tryToShow(),this.popover){this.popover.activateItemByName(e);return}this.invokeToolActionDirectly(e)}invokeToolActionDirectly(e){const t=this.Blok.Tools.inlineTools.get(e);if(!t)return;const i=t.create().render(),l=Array.isArray(i)?i:[i];for(const c of l)if("onActivate"in c&&typeof c.onActivate=="function"){c.onActivate(c);return}}get inlineTools(){const e={};return Array.from(this.Blok.Tools.inlineTools.entries()).forEach(([t,o])=>{e[t]=o.create()}),e}registerInitialShortcuts(){var o;const e=(o=this.Blok.Tools)==null?void 0:o.inlineTools;return e?(Array.from(e.keys()).forEach(i=>{const l=this.getToolShortcut(i);this.tryEnableShortcut(i,l)}),!0):(this.scheduleShortcutRegistration(),!1)}createFallbackPopover(){var e,t,o,i,l;try{const c=(l=(i=(o=(t=(e=this.Blok.API)==null?void 0:e.methods)==null?void 0:t.ui)==null?void 0:o.nodes)==null?void 0:i.redactor)!=null?l:this.Blok.UI.nodes.redactor;return new kd({items:[],scopeElement:c,messages:{nothingFound:$e.ui(it.ui.popover,"Nothing found"),search:$e.ui(it.ui.popover,"Filter")}})}catch(c){return null}}resolveSelection(){const e=se.selection;if(e!==void 0)return e;const t=se.instance;return t!==void 0?t:se.get()}}const Cd=" ",Bd=new WeakSet,Ad=()=>{var c,d;const a=window.getSelection();if(a===null)return[null,0];const e=a.focusNode,t=a.focusOffset;if(e===null)return[null,0];if(e.nodeType===Node.TEXT_NODE||e.childNodes.length===0)return[e,t];const o=e.childNodes[t];if(o!==void 0)return[o,0];const i=(c=e.childNodes[t-1])!=null?c:null,l=(d=i==null?void 0:i.textContent)!=null?d:null;return[i,l!==null?l.length:0]},Ey=a=>{var t;if(!(a instanceof HTMLElement)||R.isSingleTag(a)||R.isNativeInput(a))return!1;if(a.childNodes.length===0)return!0;const e=(t=a.textContent)!=null?t:"";return e.includes(Cd)||!ju(e)?!1:Array.from(a.children).every(o=>Ey(o))},Sy=typeof window!="undefined"&&typeof window.MutationObserver!="undefined"?new window.MutationObserver(a=>{for(const e of a){const t=e.nextSibling;e.removedNodes.forEach(o=>{var h,g,v;if(!(o instanceof Element)||!Ey(o))return;const i=t instanceof Text?t:null;if(i===null||!i.isConnected)return;const l=i.parentElement;if(!((h=l==null?void 0:l.isContentEditable)!=null&&h))return;const c=(v=(g=i.textContent)==null?void 0:g[0])!=null?v:null;(c===Cd||c===" ")&&Bd.add(i)})}}):null,Cy=new WeakSet,By=a=>{if(Sy===null||Cy.has(a))return;const e=()=>{a.body!==null&&(Sy.observe(a.body,{childList:!0,subtree:!0}),Cy.add(a))};a.readyState==="loading"?a.addEventListener("DOMContentLoaded",e,{once:!0}):e()};typeof window!="undefined"&&typeof window.document!="undefined"&&By(window.document);const _S=a=>{var i,l;By(a.ownerDocument);const[e,t]=Ad();if(e===null||!a.contains(e)||e.nodeType===Node.TEXT_NODE&&t<((i=e.textContent)!=null?i:"").length)return null;const o=document.createTreeWalker(a,NodeFilter.SHOW_TEXT);for(o.currentNode=e;;){const c=o.nextNode();if(c===null)return null;const d=(l=c.textContent)!=null?l:"";if(d.length===0)continue;const h=d[0];if(!(h===Cd||h===" ")||c===e)return null;const v=document.createRange();try{v.setStart(e,t),v.setEnd(c,0)}catch(T){return null}const y=v.cloneContents(),b=document.createElement("div");b.appendChild(y);const E=Array.from(b.querySelectorAll("*")).some(T=>{var O;const S=(O=T.textContent)!=null?O:"";return S.length===0||ju(S)}),w=Bd.has(c);if(!(!E&&!w))return w&&Bd.delete(c),{node:c,offset:0}}},Ay=(a,e,t,o)=>{const i=document.createRange();o==="left"?(i.selectNodeContents(a),i.setEnd(e,t)):(i.selectNodeContents(a),i.setStart(e,t));const l=i.cloneContents(),c=document.createElement("div");c.appendChild(l);const d=c.textContent||"";if(c.querySelectorAll("img, br, hr, input, area, base, col, embed, link, meta, param, source, track, wbr").length>0)return!1;const g=d.includes(" ")||c.innerHTML.includes(" ")||i.toString().includes(" "),v=e.nodeType===Node.TEXT_NODE&&(o==="left"?(e.textContent||"").slice(0,t):(e.textContent||"").slice(t)).includes(" ");if(g||v)return!1;c.style.position="absolute",c.style.visibility="hidden",c.style.height="auto",c.style.width="auto",c.style.whiteSpace=window.getComputedStyle(a).whiteSpace,document.body.appendChild(c);const y=c.getBoundingClientRect().width;return document.body.removeChild(c),!(y>0||!ju(d)||window.getComputedStyle(a).whiteSpace.startsWith("pre")&&d.length>0)},Ts=a=>{var c;const e=R.getDeepestNode(a);if(e===null||R.isEmpty(a))return!0;if(R.isNativeInput(e))return e.selectionEnd===0;if(R.isEmpty(a))return!0;const[t,o]=Ad();if(t===null)return!1;const i=window.getSelection(),l=(c=i==null?void 0:i.focusNode)!=null?c:null;return l!==null&&l!==a&&!(l.nodeType===Node.TEXT_NODE&&l.parentNode===a)?!1:Ay(a,t,o,"left")},xs=a=>{const e=R.getDeepestNode(a,!0);if(e===null)return!0;if(R.isNativeInput(e))return e.selectionEnd===e.value.length;const[t,o]=Ad();return t===null?!1:Ay(a,t,o,"right")},NS=(a,e=!0)=>{var y,b,E,w;if(R.isNativeInput(a)){a.focus();const T=e?0:a.value.length;a.setSelectionRange(T,T);return}const t=document.createRange(),o=window.getSelection();if(!o)return;const i=(T,S=!1)=>{const O=document.createTextNode("");S?T.insertBefore(O,T.firstChild):T.appendChild(O),t.setStart(O,0),t.setEnd(O,0)},l=(T,S)=>{if(T===null)return null;if(T.nodeType===Node.TEXT_NODE)return T;const O=S?T.firstChild:T.lastChild;return l(O,S)},c=a.childNodes,d=e?(y=c[0])!=null?y:null:(b=c[c.length-1])!=null?b:null,h=l(d,e);if(d===null){i(a),o.removeAllRanges(),o.addRange(t);return}if(h===null||h.nodeType!==Node.TEXT_NODE){i(a,e),o.removeAllRanges(),o.addRange(t);return}const g=(w=(E=h.textContent)==null?void 0:E.length)!=null?w:0,v=e?0:g;t.setStart(h,v),t.setEnd(h,v),o.removeAllRanges(),o.addRange(t)},Iy={Backspace:ie.BACKSPACE,Delete:ie.DELETE,Enter:ie.ENTER,Tab:ie.TAB,ArrowDown:ie.DOWN,ArrowRight:ie.RIGHT,ArrowUp:ie.UP,ArrowLeft:ie.LEFT},RS=new Set(["Enter","Process","Spacebar","Space","Dead"]),Es='[contenteditable="true"], textarea, input';class OS extends Be{keydown(e){if(this.beforeKeydownProcessing(e),this.handleSelectedBlocksDeletion(e)||e.defaultPrevented)return;switch(this.getKeyCode(e)){case ie.BACKSPACE:this.backspace(e);break;case ie.DELETE:this.delete(e);break;case ie.ENTER:this.enter(e);break;case ie.DOWN:case ie.RIGHT:this.arrowRightAndDown(e);break;case ie.UP:case ie.LEFT:this.arrowLeftAndUp(e);break;case ie.TAB:this.tabPressed(e);break}e.key==="/"&&!e.ctrlKey&&!e.metaKey&&this.slashPressed(e),e.code==="Slash"&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),this.commandSlashPressed())}handleSelectedBlocksDeletion(e){const{BlockSelection:t,BlockManager:o,Caret:i,BlockSettings:l}=this.Blok;if(l.contains(e.target))return!1;const c=e.key==="Backspace"||e.key==="Delete",d=se.isSelectionExists,h=se.isCollapsed===!0;if(!(c&&t.anyBlockSelected&&(!d||h)))return!1;const v=o.removeSelectedBlocks();if(v!==void 0){const y=o.insertDefaultBlockAtIndex(v,!0);i.setToBlock(y,i.positions.START)}return t.clearSelection(e),e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation(),!0}beforeKeydownProcessing(e){!this.needToolbarClosing(e)||!this.isPrintableKeyEvent(e)||(this.Blok.Toolbar.close(),e.ctrlKey||e.metaKey||e.altKey||e.shiftKey)||this.Blok.BlockSelection.clearSelection(e)}keyup(e){e.shiftKey||this.Blok.UI.checkEmptiness()}handleCommandC(e){const{BlockSelection:t}=this.Blok;t.anyBlockSelected&&t.copySelectedBlocks(e)}handleCommandX(e){const{BlockSelection:t,BlockManager:o,Caret:i}=this.Blok;t.anyBlockSelected&&t.copySelectedBlocks(e).then(()=>{const l=o.removeSelectedBlocks();if(l!==void 0){const c=o.insertDefaultBlockAtIndex(l,!0);i.setToBlock(c,i.positions.START)}t.clearSelection(e)}).catch(()=>{})}tabPressed(e){const{InlineToolbar:t,Caret:o}=this.Blok;if(t.opened)return;(e.shiftKey?o.navigatePrevious(!0):o.navigateNext(!0))&&e.preventDefault()}commandSlashPressed(){this.Blok.BlockSelection.selectedBlocks.length>1||this.activateBlockSettings()}slashPressed(e){if(!this.Blok.UI.nodes.wrapper.contains(e.target))return;const o=this.Blok.BlockManager.currentBlock;o!=null&&o.isEmpty&&(e.preventDefault(),this.Blok.Caret.insertContentAtCaretPosition("/"),this.activateToolbox())}enter(e){const{BlockManager:t,UI:o}=this.Blok,i=t.currentBlock;if(i===void 0||i.tool.isLineBreaksEnabled||o.someToolbarOpened&&o.someFlipperButtonFocused||e.shiftKey&&!Hu)return;const l=i.currentInput!==void 0&&Ts(i.currentInput)&&!i.hasMedia?(this.Blok.BlockManager.insertDefaultBlockAtIndex(this.Blok.BlockManager.currentBlockIndex),i):i.currentInput&&xs(i.currentInput)?this.Blok.BlockManager.insertDefaultBlockAtIndex(this.Blok.BlockManager.currentBlockIndex+1):this.Blok.BlockManager.split();this.Blok.Caret.setToBlock(l),this.Blok.Toolbar.moveAndOpen(l),e.preventDefault()}backspace(e){const{BlockManager:t,Caret:o}=this.Blok,{currentBlock:i,previousBlock:l}=t;if(i===void 0||!se.isCollapsed||!i.currentInput||!Ts(i.currentInput))return;if(e.preventDefault(),this.Blok.Toolbar.close(),!(i.currentInput===i.firstInput)){o.navigatePrevious();return}if(l===null)return;if(l.isEmpty){t.removeBlock(l);return}if(i.isEmpty){t.removeBlock(i);const h=t.currentBlock;h&&o.setToBlock(h,o.positions.END);return}Yv(l,i)?this.mergeBlocks(l,i):o.setToBlock(l,o.positions.END)}delete(e){const{BlockManager:t,Caret:o}=this.Blok,{currentBlock:i,nextBlock:l}=t;if(i===void 0||!se.isCollapsed||!i.currentInput||!xs(i.currentInput))return;if(e.preventDefault(),this.Blok.Toolbar.close(),!(i.currentInput===i.lastInput)){o.navigateNext();return}if(l===null)return;if(l.isEmpty){t.removeBlock(l);return}if(i.isEmpty){t.removeBlock(i),o.setToBlock(l,o.positions.START);return}Yv(i,l)?this.mergeBlocks(i,l):o.setToBlock(l,o.positions.START)}mergeBlocks(e,t){const{BlockManager:o,Toolbar:i}=this.Blok;e.lastInput!==void 0&&(NS(e.lastInput,!1),o.mergeBlocks(e,t).then(()=>{i.close()}).catch(()=>{}))}arrowRightAndDown(e){var O;const t=this.getKeyCode(e);if(t===null)return;const o=Yn.usedKeys.includes(t)&&(!e.shiftKey||t===ie.TAB);if(this.Blok.UI.someToolbarOpened&&o)return;e.shiftKey||this.Blok.Toolbar.close();const i=se.get();i!=null&&i.anchorNode&&!this.Blok.BlockSelection.anyBlockSelected&&this.Blok.BlockManager.setCurrentBlockByChildNode(i.anchorNode);const{currentBlock:l}=this.Blok.BlockManager,c=e.target,d=document.activeElement instanceof HTMLElement?document.activeElement:null,h=[l==null?void 0:l.inputs.find(L=>c!==null&&L.contains(c)),l==null?void 0:l.inputs.find(L=>d!==null&&L.contains(d)),c==null?void 0:c.closest(Es),d==null?void 0:d.closest(Es)],g=(O=l==null?void 0:l.currentInput)!=null?O:h.find(L=>L instanceof HTMLElement),y=(g!==void 0?xs(g):void 0)||this.Blok.BlockSelection.anyBlockSelected,b=e.shiftKey&&t===ie.DOWN;if(b&&y){this.Blok.CrossBlockSelection.toggleBlockSelectedState();return}b&&this.Blok.InlineToolbar.tryToShow();const w=t===ie.RIGHT&&!e.shiftKey&&!this.isRtl&&g instanceof HTMLElement?_S(g):null;if(w!==null){se.setCursor(w.node,w.offset),e.preventDefault();return}if(t===ie.DOWN||t===ie.RIGHT&&!this.isRtl?this.Blok.Caret.navigateNext():this.Blok.Caret.navigatePrevious()){e.preventDefault();return}ls(()=>{this.Blok.BlockManager.currentBlock&&this.Blok.BlockManager.currentBlock.updateCurrentInput()},20)(),this.Blok.BlockSelection.clearSelection(e)}arrowLeftAndUp(e){var T;const t=this.Blok.UI.someToolbarOpened,o=this.getKeyCode(e);if(o===null||t&&Yn.usedKeys.includes(o)&&(!e.shiftKey||o===ie.TAB))return;t&&this.Blok.UI.closeAllToolbars(),e.shiftKey||this.Blok.Toolbar.close();const i=window.getSelection();i!=null&&i.anchorNode&&!this.Blok.BlockSelection.anyBlockSelected&&this.Blok.BlockManager.setCurrentBlockByChildNode(i.anchorNode);const{currentBlock:l}=this.Blok.BlockManager,c=e.target,d=document.activeElement instanceof HTMLElement?document.activeElement:null,h=[l==null?void 0:l.inputs.find(S=>c!==null&&S.contains(c)),l==null?void 0:l.inputs.find(S=>d!==null&&S.contains(d)),c==null?void 0:c.closest(Es),d==null?void 0:d.closest(Es)],g=(T=l==null?void 0:l.currentInput)!=null?T:h.find(S=>S instanceof HTMLElement),y=(g!==void 0?Ts(g):void 0)||this.Blok.BlockSelection.anyBlockSelected,b=e.shiftKey&&o===ie.UP;if(b&&y){this.Blok.CrossBlockSelection.toggleBlockSelectedState(!1);return}if(b&&this.Blok.InlineToolbar.tryToShow(),o===ie.UP||o===ie.LEFT&&!this.isRtl?this.Blok.Caret.navigatePrevious():this.Blok.Caret.navigateNext()){e.preventDefault();return}ls(()=>{this.Blok.BlockManager.currentBlock&&this.Blok.BlockManager.currentBlock.updateCurrentInput()},20)(),this.Blok.BlockSelection.clearSelection(e)}needToolbarClosing(e){const t=this.getKeyCode(e),o=t===ie.ENTER,i=t===ie.TAB,l=o&&this.Blok.Toolbar.toolbox.opened,c=o&&this.Blok.BlockSettings.opened,d=o&&this.Blok.InlineToolbar.opened,h=i;return!(e.shiftKey||h||l||c||d)}activateToolbox(){this.Blok.Toolbar.opened||this.Blok.Toolbar.moveAndOpen(),this.Blok.Toolbar.toolbox.open()}activateBlockSettings(){this.Blok.Toolbar.opened||this.Blok.Toolbar.moveAndOpen(),this.Blok.BlockSettings.opened||Promise.resolve(this.Blok.BlockSettings.open()).catch(()=>{})}getKeyCode(e){const t=e.key&&Iy[e.key];if(t!==void 0&&typeof t=="number")return t;const o=e.code&&Iy[e.code];return o!==void 0&&typeof o=="number"?o:null}isPrintableKeyEvent(e){return e.key?e.key.length===1||RS.has(e.key):!1}}class Id{constructor(e){this.blocks=[],this.workingArea=e}get length(){return this.blocks.length}get array(){return this.blocks}get nodes(){return hv(this.workingArea.children)}static set(e,t,o){return isNaN(Number(t))?(Reflect.set(e,t,o),!0):(e.insert(+t,o),!0)}static get(e,t){return isNaN(Number(t))?Reflect.get(e,t):e.get(+t)}push(e){this.blocks.push(e),this.insertToDOM(e)}move(e,t,o=!1){const i=this.blocks.splice(t,1)[0];if(!o){const c=e-1,d=Math.max(0,c),h=this.blocks[d],g=e>0?"afterend":"beforebegin";this.insertToDOM(i,g,h)}this.blocks.splice(e,0,i);const l=this.composeBlockEvent("move",{fromIndex:t,toIndex:e});i.call(Ln.MOVED,l)}insert(e,t,o=!1){if(!this.length){this.push(t);return}const i=e>this.length?this.length:e;o&&(this.blocks[i].holder.remove(),this.blocks[i].call(Ln.REMOVED));const l=o?1:0;if(this.blocks.splice(i,l,t),i>0){const d=this.blocks[i-1];this.insertToDOM(t,"afterend",d);return}const c=this.blocks[i+1];if(c!==void 0){this.insertToDOM(t,"beforebegin",c);return}this.insertToDOM(t)}replace(e,t){if(this.blocks[e]===void 0)throw Error("Incorrect index");this.blocks[e].holder.replaceWith(t.holder),this.blocks[e]=t}insertMany(e,t){const o=new DocumentFragment;for(const i of e)o.appendChild(i.holder);if(!this.length){this.blocks.push(...e),this.workingArea.appendChild(o),e.forEach(i=>i.call(Ln.RENDERED));return}if(t>0){const i=Math.min(t-1,this.length-1);this.blocks[i].holder.after(o)}t===0&&this.workingArea.prepend(o),this.blocks.splice(t,0,...e),e.forEach(i=>i.call(Ln.RENDERED))}remove(e){const t=isNaN(e)?this.length-1:e;this.blocks[t].holder.remove(),this.blocks[t].call(Ln.REMOVED),this.blocks.splice(t,1)}removeAll(){this.workingArea.innerHTML="",this.blocks.forEach(e=>e.call(Ln.REMOVED)),this.blocks.length=0}insertAfter(e,t){const o=this.blocks.indexOf(e);this.insert(o+1,t)}get(e){return this.blocks[e]}indexOf(e){return this.blocks.indexOf(e)}insertToDOM(e,t,o){t&&o!==void 0?o.holder.insertAdjacentElement(t,e.holder):this.workingArea.appendChild(e.holder),e.call(Ln.RENDERED)}composeBlockEvent(e,t){return new CustomEvent(e,{detail:t})}}function _y(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(a);e&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(a,i).enumerable})),t.push.apply(t,o)}return t}function En(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?_y(Object(t),!0).forEach(function(o){LS(a,o,t[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):_y(Object(t)).forEach(function(o){Object.defineProperty(a,o,Object.getOwnPropertyDescriptor(t,o))})}return a}function Ss(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ss=function(e){return typeof e}:Ss=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ss(a)}function LS(a,e,t){return e in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function Mn(){return Mn=Object.assign||function(a){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(a[o]=t[o])}return a},Mn.apply(this,arguments)}function DS(a,e){if(a==null)return{};var t={},o=Object.keys(a),i,l;for(l=0;l<o.length;l++)i=o[l],!(e.indexOf(i)>=0)&&(t[i]=a[i]);return t}function PS(a,e){if(a==null)return{};var t=DS(a,e),o,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(a);for(i=0;i<l.length;i++)o=l[i],!(e.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(a,o)&&(t[o]=a[o])}return t}var MS="1.15.6";function Fn(a){if(typeof window!="undefined"&&window.navigator)return!!navigator.userAgent.match(a)}var zn=Fn(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),ti=Fn(/Edge/i),Ny=Fn(/firefox/i),ni=Fn(/safari/i)&&!Fn(/chrome/i)&&!Fn(/android/i),_d=Fn(/iP(ad|od|hone)/i),Ry=Fn(/chrome/i)&&Fn(/android/i),Oy={capture:!1,passive:!1};function Ie(a,e,t){a.addEventListener(e,t,!zn&&Oy)}function Se(a,e,t){a.removeEventListener(e,t,!zn&&Oy)}function Cs(a,e){if(e){if(e[0]===">"&&(e=e.substring(1)),a)try{if(a.matches)return a.matches(e);if(a.msMatchesSelector)return a.msMatchesSelector(e);if(a.webkitMatchesSelector)return a.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function Ly(a){return a.host&&a!==document&&a.host.nodeType?a.host:a.parentNode}function dn(a,e,t,o){if(a){t=t||document;do{if(e!=null&&(e[0]===">"?a.parentNode===t&&Cs(a,e):Cs(a,e))||o&&a===t)return a;if(a===t)break}while(a=Ly(a))}return null}var Dy=/\s+/g;function Ut(a,e,t){if(a&&e)if(a.classList)a.classList[t?"add":"remove"](e);else{var o=(" "+a.className+" ").replace(Dy," ").replace(" "+e+" "," ");a.className=(o+(t?" "+e:"")).replace(Dy," ")}}function he(a,e,t){var o=a&&a.style;if(o){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(a,""):a.currentStyle&&(t=a.currentStyle),e===void 0?t:t[e];!(e in o)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),o[e]=t+(typeof t=="string"?"":"px")}}function io(a,e){var t="";if(typeof a=="string")t=a;else do{var o=he(a,"transform");o&&o!=="none"&&(t=o+" "+t)}while(!e&&(a=a.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(t)}function Py(a,e,t){if(a){var o=a.getElementsByTagName(e),i=0,l=o.length;if(t)for(;i<l;i++)t(o[i],i);return o}return[]}function Sn(){var a=document.scrollingElement;return a||document.documentElement}function at(a,e,t,o,i){if(!(!a.getBoundingClientRect&&a!==window)){var l,c,d,h,g,v,y;if(a!==window&&a.parentNode&&a!==Sn()?(l=a.getBoundingClientRect(),c=l.top,d=l.left,h=l.bottom,g=l.right,v=l.height,y=l.width):(c=0,d=0,h=window.innerHeight,g=window.innerWidth,v=window.innerHeight,y=window.innerWidth),(e||t)&&a!==window&&(i=i||a.parentNode,!zn))do if(i&&i.getBoundingClientRect&&(he(i,"transform")!=="none"||t&&he(i,"position")!=="static")){var b=i.getBoundingClientRect();c-=b.top+parseInt(he(i,"border-top-width")),d-=b.left+parseInt(he(i,"border-left-width")),h=c+l.height,g=d+l.width;break}while(i=i.parentNode);if(o&&a!==window){var E=io(i||a),w=E&&E.a,T=E&&E.d;E&&(c/=T,d/=w,y/=w,v/=T,h=c+v,g=d+y)}return{top:c,left:d,bottom:h,right:g,width:y,height:v}}}function My(a,e,t){for(var o=Qn(a,!0),i=at(a)[e];o;){var l=at(o)[t],c=void 0;if(c=i>=l,!c)return o;if(o===Sn())break;o=Qn(o,!1)}return!1}function so(a,e,t,o){for(var i=0,l=0,c=a.children;l<c.length;){if(c[l].style.display!=="none"&&c[l]!==pe.ghost&&(o||c[l]!==pe.dragged)&&dn(c[l],t.draggable,a,!1)){if(i===e)return c[l];i++}l++}return null}function Nd(a,e){for(var t=a.lastElementChild;t&&(t===pe.ghost||he(t,"display")==="none"||e&&!Cs(t,e));)t=t.previousElementSibling;return t||null}function en(a,e){var t=0;if(!a||!a.parentNode)return-1;for(;a=a.previousElementSibling;)a.nodeName.toUpperCase()!=="TEMPLATE"&&a!==pe.clone&&(!e||Cs(a,e))&&t++;return t}function Fy(a){var e=0,t=0,o=Sn();if(a)do{var i=io(a),l=i.a,c=i.d;e+=a.scrollLeft*l,t+=a.scrollTop*c}while(a!==o&&(a=a.parentNode));return[e,t]}function FS(a,e){for(var t in a)if(a.hasOwnProperty(t)){for(var o in e)if(e.hasOwnProperty(o)&&e[o]===a[t][o])return Number(t)}return-1}function Qn(a,e){if(!a||!a.getBoundingClientRect)return Sn();var t=a,o=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var i=he(t);if(t.clientWidth<t.scrollWidth&&(i.overflowX=="auto"||i.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(i.overflowY=="auto"||i.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return Sn();if(o||e)return t;o=!0}}while(t=t.parentNode);return Sn()}function zS(a,e){if(a&&e)for(var t in e)e.hasOwnProperty(t)&&(a[t]=e[t]);return a}function Rd(a,e){return Math.round(a.top)===Math.round(e.top)&&Math.round(a.left)===Math.round(e.left)&&Math.round(a.height)===Math.round(e.height)&&Math.round(a.width)===Math.round(e.width)}var ri;function zy(a,e){return function(){if(!ri){var t=arguments,o=this;t.length===1?a.call(o,t[0]):a.apply(o,t),ri=setTimeout(function(){ri=void 0},e)}}}function HS(){clearTimeout(ri),ri=void 0}function Hy(a,e,t){a.scrollLeft+=e,a.scrollTop+=t}function jy(a){var e=window.Polymer,t=window.jQuery||window.Zepto;return e&&e.dom?e.dom(a).cloneNode(!0):t?t(a).clone(!0)[0]:a.cloneNode(!0)}function qy(a,e,t){var o={};return Array.from(a.children).forEach(function(i){var l,c,d,h;if(!(!dn(i,e.draggable,a,!1)||i.animated||i===t)){var g=at(i);o.left=Math.min((l=o.left)!==null&&l!==void 0?l:1/0,g.left),o.top=Math.min((c=o.top)!==null&&c!==void 0?c:1/0,g.top),o.right=Math.max((d=o.right)!==null&&d!==void 0?d:-1/0,g.right),o.bottom=Math.max((h=o.bottom)!==null&&h!==void 0?h:-1/0,g.bottom)}}),o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}var Lt="Sortable"+new Date().getTime();function jS(){var a=[],e;return{captureAnimationState:function(){if(a=[],!!this.options.animation){var o=[].slice.call(this.el.children);o.forEach(function(i){if(!(he(i,"display")==="none"||i===pe.ghost)){a.push({target:i,rect:at(i)});var l=En({},a[a.length-1].rect);if(i.thisAnimationDuration){var c=io(i,!0);c&&(l.top-=c.f,l.left-=c.e)}i.fromRect=l}})}},addAnimationState:function(o){a.push(o)},removeAnimationState:function(o){a.splice(FS(a,{target:o}),1)},animateAll:function(o){var i=this;if(!this.options.animation){clearTimeout(e),typeof o=="function"&&o();return}var l=!1,c=0;a.forEach(function(d){var h=0,g=d.target,v=g.fromRect,y=at(g),b=g.prevFromRect,E=g.prevToRect,w=d.rect,T=io(g,!0);T&&(y.top-=T.f,y.left-=T.e),g.toRect=y,g.thisAnimationDuration&&Rd(b,y)&&!Rd(v,y)&&(w.top-y.top)/(w.left-y.left)===(v.top-y.top)/(v.left-y.left)&&(h=US(w,b,E,i.options)),Rd(y,v)||(g.prevFromRect=v,g.prevToRect=y,h||(h=i.options.animation),i.animate(g,w,y,h)),h&&(l=!0,c=Math.max(c,h),clearTimeout(g.animationResetTimer),g.animationResetTimer=setTimeout(function(){g.animationTime=0,g.prevFromRect=null,g.fromRect=null,g.prevToRect=null,g.thisAnimationDuration=null},h),g.thisAnimationDuration=h)}),clearTimeout(e),l?e=setTimeout(function(){typeof o=="function"&&o()},c):typeof o=="function"&&o(),a=[]},animate:function(o,i,l,c){if(c){he(o,"transition",""),he(o,"transform","");var d=io(this.el),h=d&&d.a,g=d&&d.d,v=(i.left-l.left)/(h||1),y=(i.top-l.top)/(g||1);o.animatingX=!!v,o.animatingY=!!y,he(o,"transform","translate3d("+v+"px,"+y+"px,0)"),this.forRepaintDummy=qS(o),he(o,"transition","transform "+c+"ms"+(this.options.easing?" "+this.options.easing:"")),he(o,"transform","translate3d(0,0,0)"),typeof o.animated=="number"&&clearTimeout(o.animated),o.animated=setTimeout(function(){he(o,"transition",""),he(o,"transform",""),o.animated=!1,o.animatingX=!1,o.animatingY=!1},c)}}}}function qS(a){return a.offsetWidth}function US(a,e,t,o){return Math.sqrt(Math.pow(e.top-a.top,2)+Math.pow(e.left-a.left,2))/Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))*o.animation}var ao=[],Od={initializeByDefault:!0},oi={mount:function(e){for(var t in Od)Od.hasOwnProperty(t)&&!(t in e)&&(e[t]=Od[t]);ao.forEach(function(o){if(o.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),ao.push(e)},pluginEvent:function(e,t,o){var i=this;this.eventCanceled=!1,o.cancel=function(){i.eventCanceled=!0};var l=e+"Global";ao.forEach(function(c){t[c.pluginName]&&(t[c.pluginName][l]&&t[c.pluginName][l](En({sortable:t},o)),t.options[c.pluginName]&&t[c.pluginName][e]&&t[c.pluginName][e](En({sortable:t},o)))})},initializePlugins:function(e,t,o,i){ao.forEach(function(d){var h=d.pluginName;if(!(!e.options[h]&&!d.initializeByDefault)){var g=new d(e,t,e.options);g.sortable=e,g.options=e.options,e[h]=g,Mn(o,g.defaults)}});for(var l in e.options)if(e.options.hasOwnProperty(l)){var c=this.modifyOption(e,l,e.options[l]);typeof c!="undefined"&&(e.options[l]=c)}},getEventProperties:function(e,t){var o={};return ao.forEach(function(i){typeof i.eventProperties=="function"&&Mn(o,i.eventProperties.call(t[i.pluginName],e))}),o},modifyOption:function(e,t,o){var i;return ao.forEach(function(l){e[l.pluginName]&&l.optionListeners&&typeof l.optionListeners[t]=="function"&&(i=l.optionListeners[t].call(e[l.pluginName],o))}),i}};function WS(a){var e=a.sortable,t=a.rootEl,o=a.name,i=a.targetEl,l=a.cloneEl,c=a.toEl,d=a.fromEl,h=a.oldIndex,g=a.newIndex,v=a.oldDraggableIndex,y=a.newDraggableIndex,b=a.originalEvent,E=a.putSortable,w=a.extraEventProperties;if(e=e||t&&t[Lt],!!e){var T,S=e.options,O="on"+o.charAt(0).toUpperCase()+o.substr(1);window.CustomEvent&&!zn&&!ti?T=new CustomEvent(o,{bubbles:!0,cancelable:!0}):(T=document.createEvent("Event"),T.initEvent(o,!0,!0)),T.to=c||t,T.from=d||t,T.item=i||t,T.clone=l,T.oldIndex=h,T.newIndex=g,T.oldDraggableIndex=v,T.newDraggableIndex=y,T.originalEvent=b,T.pullMode=E?E.lastPutMode:void 0;var L=En(En({},w),oi.getEventProperties(o,e));for(var U in L)T[U]=L[U];t&&t.dispatchEvent(T),S[O]&&S[O].call(e,T)}}var KS=["evt"],Dt=function(e,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=o.evt,l=PS(o,KS);oi.pluginEvent.bind(pe)(e,t,En({dragEl:V,parentEl:Je,ghostEl:ve,rootEl:Ge,nextEl:Ir,lastDownEl:Bs,cloneEl:Ye,cloneHidden:Zn,dragStarted:si,putSortable:bt,activeSortable:pe.active,originalEvent:i,oldIndex:lo,oldDraggableIndex:ii,newIndex:Wt,newDraggableIndex:Jn,hideGhostForTarget:Xy,unhideGhostForTarget:Yy,cloneNowHidden:function(){Zn=!0},cloneNowShown:function(){Zn=!1},dispatchSortableEvent:function(d){_t({sortable:t,name:d,originalEvent:i})}},l))};function _t(a){WS(En({putSortable:bt,cloneEl:Ye,targetEl:V,rootEl:Ge,oldIndex:lo,oldDraggableIndex:ii,newIndex:Wt,newDraggableIndex:Jn},a))}var V,Je,ve,Ge,Ir,Bs,Ye,Zn,lo,Wt,ii,Jn,As,bt,co=!1,Is=!1,_s=[],_r,fn,Ld,Dd,Uy,Wy,si,uo,ai,li=!1,Ns=!1,Rs,Tt,Pd=[],Md=!1,Os=[],Ls=typeof document!="undefined",Ds=_d,Ky=ti||zn?"cssFloat":"float",VS=Ls&&!Ry&&!_d&&"draggable"in document.createElement("div"),Vy=(function(){if(Ls){if(zn)return!1;var a=document.createElement("x");return a.style.cssText="pointer-events:auto",a.style.pointerEvents==="auto"}})(),$y=function(e,t){var o=he(e),i=parseInt(o.width)-parseInt(o.paddingLeft)-parseInt(o.paddingRight)-parseInt(o.borderLeftWidth)-parseInt(o.borderRightWidth),l=so(e,0,t),c=so(e,1,t),d=l&&he(l),h=c&&he(c),g=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+at(l).width,v=h&&parseInt(h.marginLeft)+parseInt(h.marginRight)+at(c).width;if(o.display==="flex")return o.flexDirection==="column"||o.flexDirection==="column-reverse"?"vertical":"horizontal";if(o.display==="grid")return o.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(l&&d.float&&d.float!=="none"){var y=d.float==="left"?"left":"right";return c&&(h.clear==="both"||h.clear===y)?"vertical":"horizontal"}return l&&(d.display==="block"||d.display==="flex"||d.display==="table"||d.display==="grid"||g>=i&&o[Ky]==="none"||c&&o[Ky]==="none"&&g+v>i)?"vertical":"horizontal"},$S=function(e,t,o){var i=o?e.left:e.top,l=o?e.right:e.bottom,c=o?e.width:e.height,d=o?t.left:t.top,h=o?t.right:t.bottom,g=o?t.width:t.height;return i===d||l===h||i+c/2===d+g/2},GS=function(e,t){var o;return _s.some(function(i){var l=i[Lt].options.emptyInsertThreshold;if(!(!l||Nd(i))){var c=at(i),d=e>=c.left-l&&e<=c.right+l,h=t>=c.top-l&&t<=c.bottom+l;if(d&&h)return o=i}}),o},Gy=function(e){function t(l,c){return function(d,h,g,v){var y=d.options.group.name&&h.options.group.name&&d.options.group.name===h.options.group.name;if(l==null&&(c||y))return!0;if(l==null||l===!1)return!1;if(c&&l==="clone")return l;if(typeof l=="function")return t(l(d,h,g,v),c)(d,h,g,v);var b=(c?d:h).options.group.name;return l===!0||typeof l=="string"&&l===b||l.join&&l.indexOf(b)>-1}}var o={},i=e.group;(!i||Ss(i)!="object")&&(i={name:i}),o.name=i.name,o.checkPull=t(i.pull,!0),o.checkPut=t(i.put),o.revertClone=i.revertClone,e.group=o},Xy=function(){!Vy&&ve&&he(ve,"display","none")},Yy=function(){!Vy&&ve&&he(ve,"display","")};Ls&&!Ry&&document.addEventListener("click",function(a){if(Is)return a.preventDefault(),a.stopPropagation&&a.stopPropagation(),a.stopImmediatePropagation&&a.stopImmediatePropagation(),Is=!1,!1},!0);var Nr=function(e){if(V){e=e.touches?e.touches[0]:e;var t=GS(e.clientX,e.clientY);if(t){var o={};for(var i in e)e.hasOwnProperty(i)&&(o[i]=e[i]);o.target=o.rootEl=t,o.preventDefault=void 0,o.stopPropagation=void 0,t[Lt]._onDragOver(o)}}},XS=function(e){V&&V.parentNode[Lt]._isOutsideThisEl(e.target)};function pe(a,e){if(!(a&&a.nodeType&&a.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(a));this.el=a,this.options=e=Mn({},e),a[Lt]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(a.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return $y(a,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(c,d){c.setData("Text",d.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:pe.supportPointer!==!1&&"PointerEvent"in window&&(!ni||_d),emptyInsertThreshold:5};oi.initializePlugins(this,a,t);for(var o in t)!(o in e)&&(e[o]=t[o]);Gy(e);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=e.forceFallback?!1:VS,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Ie(a,"pointerdown",this._onTapStart):(Ie(a,"mousedown",this._onTapStart),Ie(a,"touchstart",this._onTapStart)),this.nativeDraggable&&(Ie(a,"dragover",this),Ie(a,"dragenter",this)),_s.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Mn(this,jS())}pe.prototype={constructor:pe,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(uo=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,V):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,o=this.el,i=this.options,l=i.preventOnFilter,c=e.type,d=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,h=(d||e).target,g=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||h,v=i.filter;if(rC(o),!V&&!(/mousedown|pointerdown/.test(c)&&e.button!==0||i.disabled)&&!g.isContentEditable&&!(!this.nativeDraggable&&ni&&h&&h.tagName.toUpperCase()==="SELECT")&&(h=dn(h,i.draggable,o,!1),!(h&&h.animated)&&Bs!==h)){if(lo=en(h),ii=en(h,i.draggable),typeof v=="function"){if(v.call(this,e,h,this)){_t({sortable:t,rootEl:g,name:"filter",targetEl:h,toEl:o,fromEl:o}),Dt("filter",t,{evt:e}),l&&e.preventDefault();return}}else if(v&&(v=v.split(",").some(function(y){if(y=dn(g,y.trim(),o,!1),y)return _t({sortable:t,rootEl:y,name:"filter",targetEl:h,fromEl:o,toEl:o}),Dt("filter",t,{evt:e}),!0}),v)){l&&e.preventDefault();return}i.handle&&!dn(g,i.handle,o,!1)||this._prepareDragStart(e,d,h)}}},_prepareDragStart:function(e,t,o){var i=this,l=i.el,c=i.options,d=l.ownerDocument,h;if(o&&!V&&o.parentNode===l){var g=at(o);if(Ge=l,V=o,Je=V.parentNode,Ir=V.nextSibling,Bs=o,As=c.group,pe.dragged=V,_r={target:V,clientX:(t||e).clientX,clientY:(t||e).clientY},Uy=_r.clientX-g.left,Wy=_r.clientY-g.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,V.style["will-change"]="all",h=function(){if(Dt("delayEnded",i,{evt:e}),pe.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!Ny&&i.nativeDraggable&&(V.draggable=!0),i._triggerDragStart(e,t),_t({sortable:i,name:"choose",originalEvent:e}),Ut(V,c.chosenClass,!0)},c.ignore.split(",").forEach(function(v){Py(V,v.trim(),Fd)}),Ie(d,"dragover",Nr),Ie(d,"mousemove",Nr),Ie(d,"touchmove",Nr),c.supportPointer?(Ie(d,"pointerup",i._onDrop),!this.nativeDraggable&&Ie(d,"pointercancel",i._onDrop)):(Ie(d,"mouseup",i._onDrop),Ie(d,"touchend",i._onDrop),Ie(d,"touchcancel",i._onDrop)),Ny&&this.nativeDraggable&&(this.options.touchStartThreshold=4,V.draggable=!0),Dt("delayStart",this,{evt:e}),c.delay&&(!c.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(ti||zn))){if(pe.eventCanceled){this._onDrop();return}c.supportPointer?(Ie(d,"pointerup",i._disableDelayedDrag),Ie(d,"pointercancel",i._disableDelayedDrag)):(Ie(d,"mouseup",i._disableDelayedDrag),Ie(d,"touchend",i._disableDelayedDrag),Ie(d,"touchcancel",i._disableDelayedDrag)),Ie(d,"mousemove",i._delayedDragTouchMoveHandler),Ie(d,"touchmove",i._delayedDragTouchMoveHandler),c.supportPointer&&Ie(d,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(h,c.delay)}else h()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){V&&Fd(V),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;Se(e,"mouseup",this._disableDelayedDrag),Se(e,"touchend",this._disableDelayedDrag),Se(e,"touchcancel",this._disableDelayedDrag),Se(e,"pointerup",this._disableDelayedDrag),Se(e,"pointercancel",this._disableDelayedDrag),Se(e,"mousemove",this._delayedDragTouchMoveHandler),Se(e,"touchmove",this._delayedDragTouchMoveHandler),Se(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?Ie(document,"pointermove",this._onTouchMove):t?Ie(document,"touchmove",this._onTouchMove):Ie(document,"mousemove",this._onTouchMove):(Ie(V,"dragend",this),Ie(Ge,"dragstart",this._onDragStart));try{document.selection?Ms(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(o){}},_dragStarted:function(e,t){if(co=!1,Ge&&V){Dt("dragStarted",this,{evt:t}),this.nativeDraggable&&Ie(document,"dragover",XS);var o=this.options;!e&&Ut(V,o.dragClass,!1),Ut(V,o.ghostClass,!0),pe.active=this,e&&this._appendGhost(),_t({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(fn){this._lastX=fn.clientX,this._lastY=fn.clientY,Xy();for(var e=document.elementFromPoint(fn.clientX,fn.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(fn.clientX,fn.clientY),e!==t);)t=e;if(V.parentNode[Lt]._isOutsideThisEl(e),t)do{if(t[Lt]){var o=void 0;if(o=t[Lt]._onDragOver({clientX:fn.clientX,clientY:fn.clientY,target:e,rootEl:t}),o&&!this.options.dragoverBubble)break}e=t}while(t=Ly(t));Yy()}},_onTouchMove:function(e){if(_r){var t=this.options,o=t.fallbackTolerance,i=t.fallbackOffset,l=e.touches?e.touches[0]:e,c=ve&&io(ve,!0),d=ve&&c&&c.a,h=ve&&c&&c.d,g=Ds&&Tt&&Fy(Tt),v=(l.clientX-_r.clientX+i.x)/(d||1)+(g?g[0]-Pd[0]:0)/(d||1),y=(l.clientY-_r.clientY+i.y)/(h||1)+(g?g[1]-Pd[1]:0)/(h||1);if(!pe.active&&!co){if(o&&Math.max(Math.abs(l.clientX-this._lastX),Math.abs(l.clientY-this._lastY))<o)return;this._onDragStart(e,!0)}if(ve){c?(c.e+=v-(Ld||0),c.f+=y-(Dd||0)):c={a:1,b:0,c:0,d:1,e:v,f:y};var b="matrix(".concat(c.a,",").concat(c.b,",").concat(c.c,",").concat(c.d,",").concat(c.e,",").concat(c.f,")");he(ve,"webkitTransform",b),he(ve,"mozTransform",b),he(ve,"msTransform",b),he(ve,"transform",b),Ld=v,Dd=y,fn=l}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!ve){var e=this.options.fallbackOnBody?document.body:Ge,t=at(V,!0,Ds,!0,e),o=this.options;if(Ds){for(Tt=e;he(Tt,"position")==="static"&&he(Tt,"transform")==="none"&&Tt!==document;)Tt=Tt.parentNode;Tt!==document.body&&Tt!==document.documentElement?(Tt===document&&(Tt=Sn()),t.top+=Tt.scrollTop,t.left+=Tt.scrollLeft):Tt=Sn(),Pd=Fy(Tt)}ve=V.cloneNode(!0),Ut(ve,o.ghostClass,!1),Ut(ve,o.fallbackClass,!0),Ut(ve,o.dragClass,!0),he(ve,"transition",""),he(ve,"transform",""),he(ve,"box-sizing","border-box"),he(ve,"margin",0),he(ve,"top",t.top),he(ve,"left",t.left),he(ve,"width",t.width),he(ve,"height",t.height),he(ve,"opacity","0.8"),he(ve,"position",Ds?"absolute":"fixed"),he(ve,"zIndex","100000"),he(ve,"pointerEvents","none"),pe.ghost=ve,e.appendChild(ve),he(ve,"transform-origin",Uy/parseInt(ve.style.width)*100+"% "+Wy/parseInt(ve.style.height)*100+"%")}},_onDragStart:function(e,t){var o=this,i=e.dataTransfer,l=o.options;if(Dt("dragStart",this,{evt:e}),pe.eventCanceled){this._onDrop();return}Dt("setupClone",this),pe.eventCanceled||(Ye=jy(V),Ye.removeAttribute("id"),Ye.draggable=!1,Ye.style["will-change"]="",this._hideClone(),Ut(Ye,this.options.chosenClass,!1),pe.clone=Ye),o.cloneId=Ms(function(){Dt("clone",o),!pe.eventCanceled&&(o.options.removeCloneOnHide||Ge.insertBefore(Ye,V),o._hideClone(),_t({sortable:o,name:"clone"}))}),!t&&Ut(V,l.dragClass,!0),t?(Is=!0,o._loopId=setInterval(o._emulateDragOver,50)):(Se(document,"mouseup",o._onDrop),Se(document,"touchend",o._onDrop),Se(document,"touchcancel",o._onDrop),i&&(i.effectAllowed="move",l.setData&&l.setData.call(o,i,V)),Ie(document,"drop",o),he(V,"transform","translateZ(0)")),co=!0,o._dragStartId=Ms(o._dragStarted.bind(o,t,e)),Ie(document,"selectstart",o),si=!0,window.getSelection().removeAllRanges(),ni&&he(document.body,"user-select","none")},_onDragOver:function(e){var t=this.el,o=e.target,i,l,c,d=this.options,h=d.group,g=pe.active,v=As===h,y=d.sort,b=bt||g,E,w=this,T=!1;if(Md)return;function S(D,le){Dt(D,w,En({evt:e,isOwner:v,axis:E?"vertical":"horizontal",revert:c,dragRect:i,targetRect:l,canSort:y,fromSortable:b,target:o,completed:L,onMove:function(A,P){return Ps(Ge,t,V,i,A,at(A),e,P)},changed:U},le))}function O(){S("dragOverAnimationCapture"),w.captureAnimationState(),w!==b&&b.captureAnimationState()}function L(D){return S("dragOverCompleted",{insertion:D}),D&&(v?g._hideClone():g._showClone(w),w!==b&&(Ut(V,bt?bt.options.ghostClass:g.options.ghostClass,!1),Ut(V,d.ghostClass,!0)),bt!==w&&w!==pe.active?bt=w:w===pe.active&&bt&&(bt=null),b===w&&(w._ignoreWhileAnimating=o),w.animateAll(function(){S("dragOverAnimationComplete"),w._ignoreWhileAnimating=null}),w!==b&&(b.animateAll(),b._ignoreWhileAnimating=null)),(o===V&&!V.animated||o===t&&!o.animated)&&(uo=null),!d.dragoverBubble&&!e.rootEl&&o!==document&&(V.parentNode[Lt]._isOutsideThisEl(e.target),!D&&Nr(e)),!d.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),T=!0}function U(){Wt=en(V),Jn=en(V,d.draggable),_t({sortable:w,name:"change",toEl:t,newIndex:Wt,newDraggableIndex:Jn,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),o=dn(o,d.draggable,t,!0),S("dragOver"),pe.eventCanceled)return T;if(V.contains(e.target)||o.animated&&o.animatingX&&o.animatingY||w._ignoreWhileAnimating===o)return L(!1);if(Is=!1,g&&!d.disabled&&(v?y||(c=Je!==Ge):bt===this||(this.lastPutMode=As.checkPull(this,g,V,e))&&h.checkPut(this,g,V,e))){if(E=this._getDirection(e,o)==="vertical",i=at(V),S("dragOverValid"),pe.eventCanceled)return T;if(c)return Je=Ge,O(),this._hideClone(),S("revert"),pe.eventCanceled||(Ir?Ge.insertBefore(V,Ir):Ge.appendChild(V)),L(!0);var H=Nd(t,d.draggable);if(!H||JS(e,E,this)&&!H.animated){if(H===V)return L(!1);if(H&&t===e.target&&(o=H),o&&(l=at(o)),Ps(Ge,t,V,i,o,l,e,!!o)!==!1)return O(),H&&H.nextSibling?t.insertBefore(V,H.nextSibling):t.appendChild(V),Je=t,U(),L(!0)}else if(H&&ZS(e,E,this)){var X=so(t,0,d,!0);if(X===V)return L(!1);if(o=X,l=at(o),Ps(Ge,t,V,i,o,l,e,!1)!==!1)return O(),t.insertBefore(V,X),Je=t,U(),L(!0)}else if(o.parentNode===t){l=at(o);var q=0,W,F=V.parentNode!==t,ne=!$S(V.animated&&V.toRect||i,o.animated&&o.toRect||l,E),ce=E?"top":"left",Q=My(o,"top","top")||My(V,"top","top"),ye=Q?Q.scrollTop:void 0;uo!==o&&(W=l[ce],li=!1,Ns=!ne&&d.invertSwap||F),q=eC(e,o,l,E,ne?1:d.swapThreshold,d.invertedSwapThreshold==null?d.swapThreshold:d.invertedSwapThreshold,Ns,uo===o);var Z;if(q!==0){var we=en(V);do we-=q,Z=Je.children[we];while(Z&&(he(Z,"display")==="none"||Z===ve))}if(q===0||Z===o)return L(!1);uo=o,ai=q;var Re=o.nextElementSibling,xe=!1;xe=q===1;var _e=Ps(Ge,t,V,i,o,l,e,xe);if(_e!==!1)return(_e===1||_e===-1)&&(xe=_e===1),Md=!0,setTimeout(QS,30),O(),xe&&!Re?t.appendChild(V):o.parentNode.insertBefore(V,xe?Re:o),Q&&Hy(Q,0,ye-Q.scrollTop),Je=V.parentNode,W!==void 0&&!Ns&&(Rs=Math.abs(W-at(o)[ce])),U(),L(!0)}if(t.contains(V))return L(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Se(document,"mousemove",this._onTouchMove),Se(document,"touchmove",this._onTouchMove),Se(document,"pointermove",this._onTouchMove),Se(document,"dragover",Nr),Se(document,"mousemove",Nr),Se(document,"touchmove",Nr)},_offUpEvents:function(){var e=this.el.ownerDocument;Se(e,"mouseup",this._onDrop),Se(e,"touchend",this._onDrop),Se(e,"pointerup",this._onDrop),Se(e,"pointercancel",this._onDrop),Se(e,"touchcancel",this._onDrop),Se(document,"selectstart",this)},_onDrop:function(e){var t=this.el,o=this.options;if(Wt=en(V),Jn=en(V,o.draggable),Dt("drop",this,{evt:e}),Je=V&&V.parentNode,Wt=en(V),Jn=en(V,o.draggable),pe.eventCanceled){this._nulling();return}co=!1,Ns=!1,li=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),zd(this.cloneId),zd(this._dragStartId),this.nativeDraggable&&(Se(document,"drop",this),Se(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),ni&&he(document.body,"user-select",""),he(V,"transform",""),e&&(si&&(e.cancelable&&e.preventDefault(),!o.dropBubble&&e.stopPropagation()),ve&&ve.parentNode&&ve.parentNode.removeChild(ve),(Ge===Je||bt&&bt.lastPutMode!=="clone")&&Ye&&Ye.parentNode&&Ye.parentNode.removeChild(Ye),V&&(this.nativeDraggable&&Se(V,"dragend",this),Fd(V),V.style["will-change"]="",si&&!co&&Ut(V,bt?bt.options.ghostClass:this.options.ghostClass,!1),Ut(V,this.options.chosenClass,!1),_t({sortable:this,name:"unchoose",toEl:Je,newIndex:null,newDraggableIndex:null,originalEvent:e}),Ge!==Je?(Wt>=0&&(_t({rootEl:Je,name:"add",toEl:Je,fromEl:Ge,originalEvent:e}),_t({sortable:this,name:"remove",toEl:Je,originalEvent:e}),_t({rootEl:Je,name:"sort",toEl:Je,fromEl:Ge,originalEvent:e}),_t({sortable:this,name:"sort",toEl:Je,originalEvent:e})),bt&&bt.save()):Wt!==lo&&Wt>=0&&(_t({sortable:this,name:"update",toEl:Je,originalEvent:e}),_t({sortable:this,name:"sort",toEl:Je,originalEvent:e})),pe.active&&((Wt==null||Wt===-1)&&(Wt=lo,Jn=ii),_t({sortable:this,name:"end",toEl:Je,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){Dt("nulling",this),Ge=V=Je=ve=Ir=Ye=Bs=Zn=_r=fn=si=Wt=Jn=lo=ii=uo=ai=bt=As=pe.dragged=pe.ghost=pe.clone=pe.active=null,Os.forEach(function(e){e.checked=!0}),Os.length=Ld=Dd=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":V&&(this._onDragOver(e),YS(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,o=this.el.children,i=0,l=o.length,c=this.options;i<l;i++)t=o[i],dn(t,c.draggable,this.el,!1)&&e.push(t.getAttribute(c.dataIdAttr)||nC(t));return e},sort:function(e,t){var o={},i=this.el;this.toArray().forEach(function(l,c){var d=i.children[c];dn(d,this.options.draggable,i,!1)&&(o[l]=d)},this),t&&this.captureAnimationState(),e.forEach(function(l){o[l]&&(i.removeChild(o[l]),i.appendChild(o[l]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return dn(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var o=this.options;if(t===void 0)return o[e];var i=oi.modifyOption(this,e,t);typeof i!="undefined"?o[e]=i:o[e]=t,e==="group"&&Gy(o)},destroy:function(){Dt("destroy",this);var e=this.el;e[Lt]=null,Se(e,"mousedown",this._onTapStart),Se(e,"touchstart",this._onTapStart),Se(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(Se(e,"dragover",this),Se(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),_s.splice(_s.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Zn){if(Dt("hideClone",this),pe.eventCanceled)return;he(Ye,"display","none"),this.options.removeCloneOnHide&&Ye.parentNode&&Ye.parentNode.removeChild(Ye),Zn=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(Zn){if(Dt("showClone",this),pe.eventCanceled)return;V.parentNode==Ge&&!this.options.group.revertClone?Ge.insertBefore(Ye,V):Ir?Ge.insertBefore(Ye,Ir):Ge.appendChild(Ye),this.options.group.revertClone&&this.animate(V,Ye),he(Ye,"display",""),Zn=!1}}};function YS(a){a.dataTransfer&&(a.dataTransfer.dropEffect="move"),a.cancelable&&a.preventDefault()}function Ps(a,e,t,o,i,l,c,d){var h,g=a[Lt],v=g.options.onMove,y;return window.CustomEvent&&!zn&&!ti?h=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(h=document.createEvent("Event"),h.initEvent("move",!0,!0)),h.to=e,h.from=a,h.dragged=t,h.draggedRect=o,h.related=i||e,h.relatedRect=l||at(e),h.willInsertAfter=d,h.originalEvent=c,a.dispatchEvent(h),v&&(y=v.call(g,h,c)),y}function Fd(a){a.draggable=!1}function QS(){Md=!1}function ZS(a,e,t){var o=at(so(t.el,0,t.options,!0)),i=qy(t.el,t.options,ve),l=10;return e?a.clientX<i.left-l||a.clientY<o.top&&a.clientX<o.right:a.clientY<i.top-l||a.clientY<o.bottom&&a.clientX<o.left}function JS(a,e,t){var o=at(Nd(t.el,t.options.draggable)),i=qy(t.el,t.options,ve),l=10;return e?a.clientX>i.right+l||a.clientY>o.bottom&&a.clientX>o.left:a.clientY>i.bottom+l||a.clientX>o.right&&a.clientY>o.top}function eC(a,e,t,o,i,l,c,d){var h=o?a.clientY:a.clientX,g=o?t.height:t.width,v=o?t.top:t.left,y=o?t.bottom:t.right,b=!1;if(!c){if(d&&Rs<g*i){if(!li&&(ai===1?h>v+g*l/2:h<y-g*l/2)&&(li=!0),li)b=!0;else if(ai===1?h<v+Rs:h>y-Rs)return-ai}else if(h>v+g*(1-i)/2&&h<y-g*(1-i)/2)return tC(e)}return b=b||c,b&&(h<v+g*l/2||h>y-g*l/2)?h>v+g/2?1:-1:0}function tC(a){return en(V)<en(a)?1:-1}function nC(a){for(var e=a.tagName+a.className+a.src+a.href+a.textContent,t=e.length,o=0;t--;)o+=e.charCodeAt(t);return o.toString(36)}function rC(a){Os.length=0;for(var e=a.getElementsByTagName("input"),t=e.length;t--;){var o=e[t];o.checked&&Os.push(o)}}function Ms(a){return setTimeout(a,0)}function zd(a){return clearTimeout(a)}Ls&&Ie(document,"touchmove",function(a){(pe.active||co)&&a.cancelable&&a.preventDefault()}),pe.utils={on:Ie,off:Se,css:he,find:Py,is:function(e,t){return!!dn(e,t,e,!1)},extend:zS,throttle:zy,closest:dn,toggleClass:Ut,clone:jy,index:en,nextTick:Ms,cancelNextTick:zd,detectDirection:$y,getChild:so,expando:Lt},pe.get=function(a){return a[Lt]},pe.mount=function(){for(var a=arguments.length,e=new Array(a),t=0;t<a;t++)e[t]=arguments[t];e[0].constructor===Array&&(e=e[0]),e.forEach(function(o){if(!o.prototype||!o.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(o));o.utils&&(pe.utils=En(En({},pe.utils),o.utils)),oi.mount(o)})},pe.create=function(a,e){return new pe(a,e)},pe.version=MS;var lt=[],ci,Hd,jd=!1,qd,Ud,Fs,ui;function oC(){function a(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return a.prototype={dragStarted:function(t){var o=t.originalEvent;this.sortable.nativeDraggable?Ie(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Ie(document,"pointermove",this._handleFallbackAutoScroll):o.touches?Ie(document,"touchmove",this._handleFallbackAutoScroll):Ie(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var o=t.originalEvent;!this.options.dragOverBubble&&!o.rootEl&&this._handleAutoScroll(o)},drop:function(){this.sortable.nativeDraggable?Se(document,"dragover",this._handleAutoScroll):(Se(document,"pointermove",this._handleFallbackAutoScroll),Se(document,"touchmove",this._handleFallbackAutoScroll),Se(document,"mousemove",this._handleFallbackAutoScroll)),Qy(),zs(),HS()},nulling:function(){Fs=Hd=ci=jd=ui=qd=Ud=null,lt.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,o){var i=this,l=(t.touches?t.touches[0]:t).clientX,c=(t.touches?t.touches[0]:t).clientY,d=document.elementFromPoint(l,c);if(Fs=t,o||this.options.forceAutoScrollFallback||ti||zn||ni){Wd(t,this.options,d,o);var h=Qn(d,!0);jd&&(!ui||l!==qd||c!==Ud)&&(ui&&Qy(),ui=setInterval(function(){var g=Qn(document.elementFromPoint(l,c),!0);g!==h&&(h=g,zs()),Wd(t,i.options,g,o)},10),qd=l,Ud=c)}else{if(!this.options.bubbleScroll||Qn(d,!0)===Sn()){zs();return}Wd(t,this.options,Qn(d,!1),!1)}}},Mn(a,{pluginName:"scroll",initializeByDefault:!0})}function zs(){lt.forEach(function(a){clearInterval(a.pid)}),lt=[]}function Qy(){clearInterval(ui)}var Wd=zy(function(a,e,t,o){if(e.scroll){var i=(a.touches?a.touches[0]:a).clientX,l=(a.touches?a.touches[0]:a).clientY,c=e.scrollSensitivity,d=e.scrollSpeed,h=Sn(),g=!1,v;Hd!==t&&(Hd=t,zs(),ci=e.scroll,v=e.scrollFn,ci===!0&&(ci=Qn(t,!0)));var y=0,b=ci;do{var E=b,w=at(E),T=w.top,S=w.bottom,O=w.left,L=w.right,U=w.width,H=w.height,X=void 0,q=void 0,W=E.scrollWidth,F=E.scrollHeight,ne=he(E),ce=E.scrollLeft,Q=E.scrollTop;E===h?(X=U<W&&(ne.overflowX==="auto"||ne.overflowX==="scroll"||ne.overflowX==="visible"),q=H<F&&(ne.overflowY==="auto"||ne.overflowY==="scroll"||ne.overflowY==="visible")):(X=U<W&&(ne.overflowX==="auto"||ne.overflowX==="scroll"),q=H<F&&(ne.overflowY==="auto"||ne.overflowY==="scroll"));var ye=X&&(Math.abs(L-i)<=c&&ce+U<W)-(Math.abs(O-i)<=c&&!!ce),Z=q&&(Math.abs(S-l)<=c&&Q+H<F)-(Math.abs(T-l)<=c&&!!Q);if(!lt[y])for(var we=0;we<=y;we++)lt[we]||(lt[we]={});(lt[y].vx!=ye||lt[y].vy!=Z||lt[y].el!==E)&&(lt[y].el=E,lt[y].vx=ye,lt[y].vy=Z,clearInterval(lt[y].pid),(ye!=0||Z!=0)&&(g=!0,lt[y].pid=setInterval(function(){o&&this.layer===0&&pe.active._onTouchMove(Fs);var Re=lt[this.layer].vy?lt[this.layer].vy*d:0,xe=lt[this.layer].vx?lt[this.layer].vx*d:0;typeof v=="function"&&v.call(pe.dragged.parentNode[Lt],xe,Re,a,Fs,lt[this.layer].el)!=="continue"||Hy(lt[this.layer].el,xe,Re)}.bind({layer:y}),24))),y++}while(e.bubbleScroll&&b!==h&&(b=Qn(b,!1)));jd=g}},30),Zy=function(e){var t=e.originalEvent,o=e.putSortable,i=e.dragEl,l=e.activeSortable,c=e.dispatchSortableEvent,d=e.hideGhostForTarget,h=e.unhideGhostForTarget;if(t){var g=o||l;d();var v=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,y=document.elementFromPoint(v.clientX,v.clientY);h(),g&&!g.el.contains(y)&&(c("spill"),this.onSpill({dragEl:i,putSortable:o}))}};function Kd(){}Kd.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,o=e.putSortable;this.sortable.captureAnimationState(),o&&o.captureAnimationState();var i=so(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(t,i):this.sortable.el.appendChild(t),this.sortable.animateAll(),o&&o.animateAll()},drop:Zy},Mn(Kd,{pluginName:"revertOnSpill"});function Vd(){}Vd.prototype={onSpill:function(e){var t=e.dragEl,o=e.putSortable,i=o||this.sortable;i.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),i.animateAll()},drop:Zy},Mn(Vd,{pluginName:"removeOnSpill"}),pe.mount(new oC),pe.mount(Vd,Kd);const Jy="block-removed",iC="block-added",sC="block-moved",eb="block-changed";class tb{constructor(){this.tail=Promise.resolve()}get completed(){return this.failure?Promise.reject(this.failure):this.tail}add(e){if(this.failure)return Promise.reject(this.failure);const t=this.tail.then(()=>e());return this.tail=t.catch(o=>{this.failure=o}),t}}class aC extends Be{constructor(){super(...arguments),this._currentBlockIndex=-1,this._blocks=null,this.sortable=null}get currentBlockIndex(){return this._currentBlockIndex}set currentBlockIndex(e){this._currentBlockIndex=e}get firstBlock(){return this.blocksStore[0]}get lastBlock(){return this.blocksStore[this.blocksStore.length-1]}get currentBlock(){return this.blocksStore[this.currentBlockIndex]}set currentBlock(e){if(e===void 0){this.unsetCurrentBlock();return}this.currentBlockIndex=this.getBlockIndex(e)}get nextBlock(){if(this.currentBlockIndex===this.blocksStore.length-1)return null;const t=this.blocksStore[this.currentBlockIndex+1];return t!=null?t:null}get nextContentfulBlock(){return this.blocks.slice(this.currentBlockIndex+1).find(t=>!!t.inputs.length)}get previousContentfulBlock(){return this.blocks.slice(0,this.currentBlockIndex).reverse().find(t=>!!t.inputs.length)}get previousBlock(){if(this.currentBlockIndex===0)return null;const t=this.blocksStore[this.currentBlockIndex-1];return t!=null?t:null}get blocks(){return this.blocksStore.array}get isBlokEmpty(){return this.blocks.every(e=>e.isEmpty)}prepare(){const e=new Id(this.Blok.UI.nodes.redactor);this._blocks=new Proxy(e,{set:Id.set,get:Id.get}),this.listeners.on(document,"copy",t=>{this.Blok.BlockEvents.handleCommandC(t)}),this.sortable=new pe(this.Blok.UI.nodes.redactor,{animation:150,forceFallback:!0,handle:jx,onStart:()=>{this.Blok.UI.nodes.wrapper.setAttribute(Uv,"true"),Yo(!0)},onEnd:t=>{this.Blok.UI.nodes.wrapper.removeAttribute(Uv),!(t.newIndex===void 0||t.oldIndex===void 0)&&this.move(t.newIndex,t.oldIndex,!0)}})}toggleReadOnly(e){e?this.disableModuleBindings():this.enableModuleBindings()}composeBlock({tool:e,data:t={},id:o=void 0,tunes:i={}}){const l=this.Blok.ReadOnly.isEnabled,c=this.Blok.Tools.blockTools.get(e);if(c===void 0)throw new Error(`Could not compose Block. Tool «${e}» not found.`);const d=new Xo({id:o,data:t,tool:c,api:this.Blok.API,readOnly:l,tunesData:i},this.eventsDispatcher);return l||window.requestIdleCallback(()=>{this.bindBlockEvents(d)},{timeout:2e3}),d}insert({id:e=void 0,tool:t,data:o,index:i,needToFocus:l=!0,replace:c=!1,tunes:d}={}){const h=i!=null?i:this.currentBlockIndex+(c?0:1),g=t!=null?t:this.config.defaultBlock;if(g===void 0)throw new Error("Could not insert Block. Tool name is not specified.");const v={tool:g};e!==void 0&&(v.id=e),o!==void 0&&(v.data=o),d!==void 0&&(v.tunes=d);const y=this.composeBlock(v),b=c?this.getBlockByIndex(h):void 0;if(c&&b===void 0)throw new Error(`Could not replace Block at index ${h}. Block not found.`);return c&&b!==void 0&&this.blockDidMutated(Jy,b,{index:h}),this.blocksStore.insert(h,y,c),this.blockDidMutated(iC,y,{index:h}),l&&(this.currentBlockIndex=h),!l&&h<=this.currentBlockIndex&&this.currentBlockIndex++,y}insertMany(e,t=0){this.blocksStore.insertMany(e,t)}async update(e,t,o){if(!t&&!o)return e;const i=await e.data,l=this.composeBlock({id:e.id,tool:e.name,data:Object.assign({},i,t!=null?t:{}),tunes:o!=null?o:e.tunes}),c=this.getBlockIndex(e);return this.blocksStore.replace(c,l),this.blockDidMutated(eb,l,{index:c}),l}replace(e,t,o){const i=this.getBlockIndex(e);return this.insert({tool:t,data:o,index:i,replace:!0})}get blocksStore(){if(this._blocks===null)throw new Error("BlockManager: blocks store is not initialized. Call prepare() before accessing blocks.");return this._blocks}async paste(e,t,o=!1){const i=this.insert({tool:e,replace:o});try{await i.ready,i.call(Ln.ON_PASTE,t),i.refreshToolRootElement()}catch(l){Ce(`${e}: onPaste callback call is failed`,"error",l)}return i}insertDefaultBlockAtIndex(e,t=!1){const o=this.config.defaultBlock;if(o===void 0)throw new Error("Could not insert default Block. Default block tool is not defined in the configuration.");return this.insert({tool:o,index:e,needToFocus:t})}insertAtEnd(){return this.currentBlockIndex=this.blocks.length-1,this.insert()}async mergeBlocks(e,t){const o=async c=>{await e.mergeWith(c),await this.removeBlock(t),this.currentBlockIndex=this.blocksStore.indexOf(e)},i=e.name===t.name&&e.mergeable,l=i?await t.data:void 0;if(i&&ot(l)){console.error("Could not merge Block. Failed to extract original Block data.");return}if(i&&l!==void 0){const[c]=rd([{data:l,tool:t.name}],e.tool.sanitizeConfig,this.config.sanitizer);await o(c.data);return}if(e.mergeable&&hs(t,"export")&&hs(e,"import")){const c=await t.exportDataAsString(),d=Tn(c,e.tool.sanitizeConfig),h=Qv(d,e.tool.conversionConfig);await o(h)}}removeBlock(e,t=!0){return new Promise(o=>{const i=this.blocksStore.indexOf(e);if(!this.validateIndex(i))throw new Error("Can't find a Block to remove");this.blocksStore.remove(i),e.destroy(),this.blockDidMutated(Jy,e,{index:i}),this.currentBlockIndex>=i&&this.currentBlockIndex--;const l=this.blocks.length===0;l&&this.unsetCurrentBlock(),l&&t&&this.insert(),!l&&i===0&&(this.currentBlockIndex=0),o()})}removeSelectedBlocks(){const e=this.blocks.map((t,o)=>({block:t,index:o})).filter(({block:t})=>t.selected).sort((t,o)=>o.index-t.index);return e.forEach(({block:t})=>{this.removeBlock(t,!1)}),e.length>0?e[e.length-1].index:void 0}removeAllBlocks(){const e=i=>{i<0||(this.blocksStore.remove(i),e(i-1))};e(this.blocksStore.length-1),this.unsetCurrentBlock(),this.insert();const t=this.currentBlock,o=t==null?void 0:t.firstInput;o!==void 0&&o.focus()}split(){const e=this.Blok.Caret.extractFragmentFromCaretPosition(),t=R.make("div");t.appendChild(e);const o={text:R.isEmpty(t)?"":t.innerHTML};return this.insert({data:o})}getBlockByIndex(e){const t=e===-1?this.blocksStore.length-1:e;return this.blocksStore[t]}getBlockIndex(e){return this.blocksStore.indexOf(e)}getBlockById(e){return this.blocksStore.array.find(t=>t.id===e)}getBlock(e){const t=R.isElement(e)?e:e.parentNode;if(!t)return;const o=this.blocksStore.nodes,i=t.closest($u);if(!i)return;const l=o.indexOf(i);if(l>=0)return this.blocksStore[l]}setCurrentBlockByChildNode(e){const t=R.isElement(e)?e:e.parentNode;if(!t)return;const o=t.closest($u);if(!o)return;const i=o.closest(qt);if(!(i==null?void 0:i.isEqualNode(this.Blok.UI.nodes.wrapper))||!(o instanceof HTMLElement))return;this.currentBlockIndex=this.blocksStore.nodes.indexOf(o);const c=this.currentBlock;return c==null||c.updateCurrentInput(),c}getBlockByChildNode(e){if(!(e instanceof Node))return;const t=R.isElement(e)?e:e.parentNode;if(!t)return;const o=t.closest($u);if(o)return this.blocks.find(i=>i.holder===o)}move(e,t=this.currentBlockIndex,o=!1){if(isNaN(e)||isNaN(t)){Ce("Warning during 'move' call: incorrect indices provided.","warn");return}if(!this.validateIndex(e)||!this.validateIndex(t)){Ce("Warning during 'move' call: indices cannot be lower than 0 or greater than the amount of blocks.","warn");return}this.blocksStore.move(e,t,o),this.currentBlockIndex=e;const i=this.currentBlock;if(i===void 0)throw new Error(`Could not move Block. Block at index ${e} is not available.`);this.blockDidMutated(sC,i,{fromIndex:t,toIndex:e})}async convert(e,t,o){const i=await e.save();if(!i||i.data===void 0)throw new Error("Could not convert Block. Failed to extract original Block data.");const l=this.Blok.Tools.blockTools.get(t);if(!l)throw new Error(`Could not convert Block. Tool «${t}» not found.`);const c=await e.exportDataAsString(),d=Tn(c,ad(this.config.sanitizer,l.sanitizeConfig)),h=Qv(d,l.conversionConfig,l.settings),g=o?Object.assign(h,o):h;return this.replace(e,l.name,g)}unsetCurrentBlock(){this.currentBlockIndex=-1}async clear(e=!1){const t=new tb;[...this.blocks].forEach(i=>{t.add(async()=>{await this.removeBlock(i,!1)})}),await t.completed,this.unsetCurrentBlock(),e&&this.insert(),this.Blok.UI.checkEmptiness()}async destroy(){this.sortable&&(this.sortable.destroy(),this.sortable=null),await Promise.all(this.blocks.map(e=>e.destroy()))}bindBlockEvents(e){const{BlockEvents:t}=this.Blok;this.readOnlyMutableListeners.on(e.holder,"keydown",o=>{o instanceof KeyboardEvent&&t.keydown(o)}),this.readOnlyMutableListeners.on(e.holder,"keyup",o=>{o instanceof KeyboardEvent&&t.keyup(o)}),e.on("didMutated",o=>this.blockDidMutated(eb,o,{index:this.getBlockIndex(o)}))}disableModuleBindings(){this.readOnlyMutableListeners.clearAll()}enableModuleBindings(){this.readOnlyMutableListeners.on(document,"cut",e=>{this.Blok.BlockEvents.handleCommandX(e)}),this.blocks.forEach(e=>{this.bindBlockEvents(e)})}validateIndex(e){return!(e<0||e>=this.blocksStore.length)}blockDidMutated(e,t,o){const i=be({target:new Rn(t)},o),l=new CustomEvent(e,{detail:be({},i)});return Object.prototype.propertyIsEnumerable.call(l,"type")||Object.defineProperty(l,"type",{value:e,enumerable:!0,configurable:!0}),Object.prototype.propertyIsEnumerable.call(l,"detail")||Object.defineProperty(l,"detail",{value:i,enumerable:!0,configurable:!0}),this.eventsDispatcher.emit(Kv,{event:l}),t}}class lC extends Be{constructor(){super(...arguments),this.anyBlockSelectedCache=null,this.needToSelectAll=!1,this.nativeInputSelected=!1,this.readyToBlockSelection=!1,this.selection=new se}get sanitizerConfig(){const e={p:{},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},ol:{},ul:{},li:{},br:!0,img:{src:!0,width:!0,height:!0},a:{href:!0},b:{},i:{},u:{}};return ad(this.config.sanitizer,e)}get allBlocksSelected(){const{BlockManager:e}=this.Blok;return e.blocks.every(t=>t.selected===!0)}set allBlocksSelected(e){const{BlockManager:t}=this.Blok;for(const o of t.blocks)o.selected=e;this.clearCache()}get anyBlockSelected(){const{BlockManager:e}=this.Blok;return this.anyBlockSelectedCache===null&&(this.anyBlockSelectedCache=e.blocks.some(t=>t.selected===!0)),this.anyBlockSelectedCache}get selectedBlocks(){return this.Blok.BlockManager.blocks.filter(e=>e.selected)}prepare(){this.selection=new se,ro.add({name:"CMD+A",handler:e=>{const{BlockManager:t,ReadOnly:o}=this.Blok;if(o.isEnabled){e.preventDefault(),this.selectAllBlocks();return}t.currentBlock&&this.handleCommandA(e)},on:this.Blok.UI.nodes.redactor})}toggleReadOnly(){const e=se.get();e==null||e.removeAllRanges(),this.allBlocksSelected=!1}unSelectBlockByIndex(e){const{BlockManager:t}=this.Blok,o=typeof e=="number"?t.getBlockByIndex(e):t.currentBlock;o&&(o.selected=!1,this.clearCache())}clearSelection(e,t=!1){const{RectangleSelection:o}=this.Blok;this.needToSelectAll=!1,this.nativeInputSelected=!1,this.readyToBlockSelection=!1;const i=e&&e instanceof KeyboardEvent,l=e,c=i&&l.key&&l.key.length===1;if(this.anyBlockSelected&&i&&c&&!se.isSelectionExists&&this.replaceSelectedBlocksWithPrintableKey(e),this.Blok.CrossBlockSelection.clear(e),t&&this.selection.restore(),!this.anyBlockSelected||o.isRectActivated()){this.Blok.RectangleSelection.clearSelection();return}this.allBlocksSelected=!1}async copySelectedBlocks(e){e.preventDefault();const t=e.clipboardData;if(!t)return;const o=R.make("div"),i=[];this.selectedBlocks.forEach(d=>{var E;const h=Tn(d.holder.innerHTML,this.sanitizerConfig),g=R.make("div");g.innerHTML=h;const v=(E=g.textContent)!=null?E:"";if(i.push(v),!Array.from(g.childNodes).some(w=>w.nodeType===Node.ELEMENT_NODE)&&v.trim().length>0){const w=R.make("p");w.innerHTML=g.innerHTML,o.appendChild(w)}else for(;g.firstChild;)o.appendChild(g.firstChild)});const l=i.join(`
|
|
172
172
|
|
|
173
|
-
`),u=o.innerHTML;t.setData("text/plain",a),t.setData("text/html",u);try{const f=await Promise.all(this.selectedBlocks.map(p=>p.save()));t.setData(this.Blok.Paste.MIME_TYPE,JSON.stringify(f))}catch{}}selectBlockByIndex(e){const{BlockManager:t}=this.Blok,o=t.getBlockByIndex(e);o!==void 0&&this.selectBlock(o)}selectBlock(e){this.selection.save(),X.get()?.removeAllRanges();const o=e;o.selected=!0,this.clearCache(),this.Blok.InlineToolbar.close()}unselectBlock(e){const t=e;t.selected=!1,this.clearCache()}clearCache(){this.anyBlockSelectedCache=null}destroy(){eo.remove(this.Blok.UI.nodes.redactor,"CMD+A")}handleCommandA(e){if(this.Blok.RectangleSelection.clearSelection(),R.isNativeInput(e.target)&&!this.readyToBlockSelection){this.readyToBlockSelection=!0;return}const t=this.Blok.BlockManager.getBlock(e.target);if(!t)return;const o=t.inputs;if(o.length>1&&!this.readyToBlockSelection){this.readyToBlockSelection=!0;return}if(o.length===1&&!this.needToSelectAll){this.needToSelectAll=!0;return}if(this.needToSelectAll){e.preventDefault(),this.selectAllBlocks(),this.needToSelectAll=!1,this.readyToBlockSelection=!1;return}this.readyToBlockSelection&&(e.preventDefault(),this.selectBlock(t),this.needToSelectAll=!0)}selectAllBlocks(){this.selection.save(),X.get()?.removeAllRanges(),this.allBlocksSelected=!0,this.Blok.InlineToolbar.close()}replaceSelectedBlocksWithPrintableKey(e){const{BlockManager:t,Caret:o}=this.Blok,i=t.removeSelectedBlocks();if(i===void 0)return;t.insertDefaultBlockAtIndex(i,!0);const a=t.currentBlock;a&&o.setToBlock(a),ss(()=>{const u=e.key;o.insertContentAtCaretPosition(u.length>1?"":u)},20)()}}const BC=127,Wy=l=>{for(const e of l){if(e.trim().length===0)continue;if(e>="0"&&e<="9"||e.toLowerCase()!==e.toUpperCase())return!1;const t=e.codePointAt(0);if(typeof t=="number"&&t>BC)return!1}return!0},Ky=l=>l.nodeType===Node.TEXT_NODE?[l]:l.hasChildNodes?.()?Array.from(l.childNodes).flatMap(e=>Ky(e)):[],AC=l=>{const e=Ky(l);if(e.length===0)return null;const t=e[e.length-1],o=[...e].reverse().find(i=>!Wy(i.textContent??""))??null;return o&&o!==t&&Wy(t.textContent??"")&&o.parentNode!==l?o:t};class jd extends Be{get positions(){return{START:"start",END:"end",DEFAULT:"default"}}static get CSS(){return{shadowCaret:"blok-shadow-caret"}}setToBlock(e,t=this.positions.DEFAULT,o=0){const{BlockManager:i,BlockSelection:a}=this.Blok;if(a.clearSelection(),!e.focusable){window.getSelection()?.removeAllRanges(),a.selectBlock(e),i.currentBlock=e;return}const f=t===this.positions.START?e.firstInput:t===this.positions.END?e.lastInput:e.currentInput;if(!f)return;const p=y=>{if(t===this.positions.START)return{node:R.getDeepestNode(y,!1),offset:0};if(t===this.positions.END)return this.resolveEndPositionNode(y);const{node:w,offset:S}=R.getNodeByOffset(y,o);return w?{node:w,offset:S}:{node:R.getDeepestNode(y,!1),offset:0}},{node:g,offset:v}=p(f);g&&(this.set(g,v),i.setCurrentBlockByChildNode(e.holder),i.currentBlock.currentInput=f)}resolveEndPositionNode(e){const t=R.getDeepestNode(e,!0);if(t instanceof HTMLElement&&R.isNativeInput(t))return{node:t,offset:R.getContentLength(t)};const o=AC(e);return o?{node:o,offset:R.getContentLength(o)}:t?{node:t,offset:R.getContentLength(t)}:{node:null,offset:0}}setToInput(e,t=this.positions.DEFAULT,o=0){const{currentBlock:i}=this.Blok.BlockManager,a=R.getDeepestNode(e);switch(t){case this.positions.START:this.set(a,0);break;case this.positions.END:a&&this.set(a,R.getContentLength(a));break;default:o&&this.set(a,o)}i&&(i.currentInput=e)}set(e,t=0){const{top:i,bottom:a}=X.setCursor(e,t),{innerHeight:u}=window;if(i<0){window.scrollBy(0,i-30);return}a>u&&window.scrollBy(0,a-u+30)}setToTheLastBlock(){const e=this.Blok.BlockManager.lastBlock;if(e)if(e.tool.isDefault&&e.isEmpty)this.setToBlock(e);else{const t=this.Blok.BlockManager.insertAtEnd();this.setToBlock(t)}}extractFragmentFromCaretPosition(){const e=X.get();if(!e||!e.rangeCount)return;const t=e.getRangeAt(0),o=this.Blok.BlockManager.currentBlock;if(!o)return;const i=o.currentInput;if(t.deleteContents(),!i)return;if(R.isNativeInput(i)){const u=i,f=document.createDocumentFragment(),p=u.selectionStart??0,g=u.value.substring(0,p),v=u.value.substring(p);return f.textContent=v,u.value=g,f}const a=t.cloneRange();return a.selectNodeContents(i),a.setStart(t.endContainer,t.endOffset),a.extractContents()}navigateNext(e=!1){const{BlockManager:t}=this.Blok,{currentBlock:o,nextBlock:i}=t;if(o===void 0)return!1;const{nextInput:a,currentInput:u}=o,f=u!==void 0?Ts(u):void 0,p=e||f||!o.focusable;if(a&&p)return this.setToInput(a,this.positions.START),!0;const v=i!==null?i:o.tool.isDefault||!p?null:t.insertAtEnd();return v!==null&&p?(this.setToBlock(v,this.positions.START),!0):!1}navigatePrevious(e=!1){const{currentBlock:t,previousBlock:o}=this.Blok.BlockManager;if(!t)return!1;const{previousInput:i,currentInput:a}=t,u=a!==void 0?ws(a):void 0,f=e||u||!t.focusable;return i&&f?(this.setToInput(i,this.positions.END),!0):o!==null&&f?(this.setToBlock(o,this.positions.END),!0):!1}createShadow(e){const t=document.createElement("span");t.classList.add(jd.CSS.shadowCaret),t.setAttribute("data-blok-testid","shadow-caret"),e.insertAdjacentElement("beforeend",t)}restoreCaret(e){const t=e.querySelector('[data-blok-testid="shadow-caret"]');if(!t)return;new X().expandToTag(t);const i=document.createRange();i.selectNode(t),i.extractContents()}insertContentAtCaretPosition(e){const t=document.createDocumentFragment(),o=document.createElement("div"),i=X.get(),a=X.range;if(!i||!a)return;o.innerHTML=e,Array.from(o.childNodes).forEach(g=>t.appendChild(g)),t.childNodes.length===0&&t.appendChild(new Text);const u=t.lastChild;a.deleteContents(),a.insertNode(t);const f=document.createRange(),p=u.nodeType===Node.TEXT_NODE?u:u.firstChild;p!==null&&p.textContent!==null&&f.setStart(p,p.textContent.length),i.removeAllRanges(),i.addRange(f)}}class IC extends Be{constructor(){super(...arguments),this.firstSelectedBlock=null,this.lastSelectedBlock=null,this.onMouseUp=()=>{this.listeners.off(document,"mouseover",this.onMouseOver),this.listeners.off(document,"mouseup",this.onMouseUp)},this.onMouseOver=e=>{const t=e,{BlockManager:o,BlockSelection:i}=this.Blok;if(t.relatedTarget===null&&t.target===null)return;const a=o.getBlockByChildNode(t.relatedTarget)||this.lastSelectedBlock,u=o.getBlockByChildNode(t.target);if(!(!a||!u)&&u!==a){if(this.firstSelectedBlock&&a===this.firstSelectedBlock){X.get()?.removeAllRanges(),a.selected=!0,u.selected=!0,i.clearCache();return}if(this.firstSelectedBlock&&u===this.firstSelectedBlock){a.selected=!1,u.selected=!1,i.clearCache();return}this.Blok.InlineToolbar.close(),this.toggleBlocksSelectedState(a,u),this.lastSelectedBlock=u}}}async prepare(){this.listeners.on(document,"mousedown",e=>{this.enableCrossBlockSelection(e)})}watchSelection(e){if(e.button!==cS.LEFT)return;const{BlockManager:t}=this.Blok,o=t.getBlock(e.target);o&&(this.firstSelectedBlock=o,this.lastSelectedBlock=o,this.listeners.on(document,"mouseover",this.onMouseOver),this.listeners.on(document,"mouseup",this.onMouseUp))}get isCrossBlockSelectionStarted(){return!!this.firstSelectedBlock&&!!this.lastSelectedBlock&&this.firstSelectedBlock!==this.lastSelectedBlock}toggleBlockSelectedState(e=!0){const{BlockManager:t,BlockSelection:o}=this.Blok,i=t.currentBlock;if(!this.lastSelectedBlock&&!i||(!this.lastSelectedBlock&&i&&(this.lastSelectedBlock=this.firstSelectedBlock=i),this.firstSelectedBlock===this.lastSelectedBlock&&this.firstSelectedBlock&&(this.firstSelectedBlock.selected=!0,o.clearCache(),X.get()?.removeAllRanges(),this.Blok.Toolbar.close()),!this.lastSelectedBlock))return;const a=t.blocks.indexOf(this.lastSelectedBlock)+(e?1:-1),u=t.blocks[a];u&&(this.lastSelectedBlock.selected!==u.selected?(u.selected=!0,o.clearCache(),this.Blok.Toolbar.close()):(this.lastSelectedBlock.selected=!1,o.clearCache(),this.Blok.Toolbar.close()),this.lastSelectedBlock=u,this.Blok.InlineToolbar.close(),u.holder.scrollIntoView({block:"nearest"}))}clear(e){const{BlockManager:t,BlockSelection:o,Caret:i}=this.Blok;if(!this.firstSelectedBlock||!this.lastSelectedBlock)return;const a=t.blocks.indexOf(this.firstSelectedBlock),u=t.blocks.indexOf(this.lastSelectedBlock);if(!o.anyBlockSelected||a===-1||u===-1){this.firstSelectedBlock=this.lastSelectedBlock=null;return}if(e&&e instanceof KeyboardEvent)switch(e.key){case"ArrowDown":case"ArrowRight":i.setToBlock(t.blocks[Math.max(a,u)],i.positions.END);break;case"ArrowUp":case"ArrowLeft":i.setToBlock(t.blocks[Math.min(a,u)],i.positions.START);break;default:i.setToBlock(t.blocks[Math.max(a,u)],i.positions.END)}this.firstSelectedBlock=this.lastSelectedBlock=null}enableCrossBlockSelection(e){const{UI:t}=this.Blok;X.isCollapsed||this.Blok.BlockSelection.clearSelection(e),t.nodes.redactor.contains(e.target)?this.watchSelection(e):this.Blok.BlockSelection.clearSelection(e)}toggleBlocksSelectedState(e,t){const{BlockManager:o,BlockSelection:i}=this.Blok,a=o.blocks.indexOf(e),u=o.blocks.indexOf(t),f=e.selected!==t.selected,p=Math.min(a,u),g=Math.max(a,u);for(const v of Array.from({length:g-p+1},(y,w)=>p+w)){const y=o.blocks[v];y!==this.firstSelectedBlock&&y!==(f?e:t)&&(o.blocks[v].selected=!o.blocks[v].selected,i.clearCache())}this.Blok.Toolbar.close()}}class _C extends Be{constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t}),this.disabled=!1,this.batchingTimeout=null,this.batchingOnChangeQueue=new Map,this.batchTime=Ux,this.mutationObserver=new MutationObserver(o=>{this.redactorChanged(o)}),this.eventsDispatcher.on(Ov,o=>{this.particularBlockChanged(o.event)}),this.eventsDispatcher.on(Pv,()=>{this.disable()}),this.eventsDispatcher.on(Lv,()=>{this.enable()})}enable(){this.mutationObserver.observe(this.Blok.UI.nodes.redactor,{childList:!0,subtree:!0,characterData:!0,attributes:!0}),this.disabled=!1}disable(){this.mutationObserver.disconnect(),this.disabled=!0}particularBlockChanged(e){this.disabled||!Oe(this.config.onChange)||(this.batchingOnChangeQueue.set(`block:${e.detail.target.id}:event:${e.type}`,e),this.batchingTimeout&&clearTimeout(this.batchingTimeout),this.batchingTimeout=setTimeout(()=>{const t=Array.from(this.batchingOnChangeQueue.values());if(t.length===0)return;const o=t.length===1?t[0]:t;this.config.onChange&&this.config.onChange(this.Blok.API.methods,o),this.batchingOnChangeQueue.clear()},this.batchTime))}redactorChanged(e){this.eventsDispatcher.emit(Wu,{mutations:e})}}const Vy=new Set(["table","thead","tbody","tfoot","tr","th","td","caption","colgroup","col","ul","ol","li","dl","dt","dd"]),zs=class zs extends Be{constructor(){super(...arguments),this.MIME_TYPE="application/x-blok",this.toolsTags={},this.tagsByTool={},this.toolsPatterns=[],this.toolsFiles={},this.exceptionList=[],this.handlePasteEventWrapper=e=>{this.handlePasteEvent(e)},this.processTool=e=>{try{if(e.pasteConfig===!1){this.exceptionList.push(e.name);return}if(!e.hasOnPasteHandler)return;this.getTagsConfig(e),this.getFilesConfig(e),this.getPatternsConfig(e)}catch(t){Ee(`Paste handling for «${e.name}» Tool hasn't been set up because of the error`,"warn",t)}},this.handlePasteEvent=async e=>{const{BlockManager:t,Toolbar:o}=this.Blok,i=t.setCurrentBlockByChildNode(e.target);!i||e.target&&this.isNativeBehaviour(e.target)&&e.clipboardData&&!e.clipboardData.types.includes("Files")||this.exceptionList.includes(i.name)||(e.preventDefault(),e.clipboardData&&await this.processDataTransfer(e.clipboardData),o.close())}}async prepare(){this.processTools()}shouldReplaceCurrentBlockForFile(e){const{BlockManager:t}=this.Blok,o=t.currentBlock;return o?e&&o.name===e?!0:!!o.tool.isDefault&&o.isEmpty:!1}getStructuralTagsSanitizeConfig(e){const t={},o=[e];for(;o.length>0;){const i=o.pop();if(!i)continue;const a=i.tagName.toLowerCase();Vy.has(a)&&(t[a]=t[a]??{}),o.push(...Array.from(i.children))}return t}toggleReadOnly(e){e?this.unsetCallback():this.setCallback()}containsFiles(e){if(Array.from(e.types).includes("Files")||e.files?.length)return!0;try{const o=e.types;if(typeof o?.contains=="function"&&o.contains("Files"))return!0}catch{}return!1}async processDataTransfer(e){const{Tools:t}=this.Blok;if(this.containsFiles(e)&&!ot(this.toolsFiles)){await this.processFiles(e.files);return}const i=e.getData(this.MIME_TYPE),a=e.getData("text/plain"),f=e.getData("text/html");if(i)try{this.insertBlokData(JSON.parse(i));return}catch{}const p=Object.fromEntries(Object.keys(this.toolsTags).map(k=>[k.toLowerCase(),this.toolsTags[k].sanitizationConfig??{}])),g=t.getAllInlineToolsSanitizeConfig(),v=Ju(this.config.sanitizer,p,g,{br:{}}),y=yn(f,v),w=R.isHTMLString(y);!y.trim()||y.trim()===a||!w?await this.processText(a):await this.processText(y,!0)}async processText(e,t=!1){const{Caret:o,BlockManager:i}=this.Blok,a=t?this.processHTML(e):this.processPlain(e);if(!a.length)return;if(a.length>1){const p=!!i.currentBlock?.tool.isDefault&&!!i.currentBlock?.isEmpty;for(const[g,v]of a.entries())await this.insertBlock(v,g===0&&p);i.currentBlock&&o.setToBlock(i.currentBlock,o.positions.END);return}const[u]=a;if(u.isBlock){await this.processSingleBlock(u);return}await this.processInlinePaste(u)}setCallback(){this.listeners.on(this.Blok.UI.nodes.holder,"paste",this.handlePasteEventWrapper)}unsetCallback(){this.listeners.off(this.Blok.UI.nodes.holder,"paste",this.handlePasteEventWrapper)}processTools(){const e=this.Blok.Tools.blockTools;Array.from(e.values()).forEach(this.processTool)}collectTagNames(e){return on(e)?[e]:je(e)?Object.keys(e):[]}getTagsConfig(e){if(e.pasteConfig===!1)return;const t=e.pasteConfig.tags||[],o=[];t.forEach(i=>{const a=this.collectTagNames(i);o.push(...a),a.forEach(u=>{if(Object.prototype.hasOwnProperty.call(this.toolsTags,u)){Ee(`Paste handler for «${e.name}» Tool on «${u}» tag is skipped because it is already used by «${this.toolsTags[u].tool.name}» Tool.`,"warn");return}const f=je(i)?i[u]:void 0;this.toolsTags[u.toUpperCase()]={tool:e,sanitizationConfig:f}})}),this.tagsByTool[e.name]=o.map(i=>i.toUpperCase())}getFilesConfig(e){if(e.pasteConfig===!1)return;const{files:t={}}=e.pasteConfig,{extensions:o,mimeTypes:i}=t;if(!o&&!i)return;const a=o==null?[]:Array.isArray(o)?o:(Ee(`«extensions» property of the paste config for «${e.name}» Tool should be an array`),[]),u=i==null?[]:Array.isArray(i)?i.filter(f=>gS(f)?!0:(Ee(`MIME type value «${f}» for the «${e.name}» Tool is not a valid MIME type`,"warn"),!1)):(Ee(`«mimeTypes» property of the paste config for «${e.name}» Tool should be an array`),[]);this.toolsFiles[e.name]={extensions:a,mimeTypes:u}}getPatternsConfig(e){e.pasteConfig===!1||!e.pasteConfig.patterns||ot(e.pasteConfig.patterns)||Object.entries(e.pasteConfig.patterns).forEach(([t,o])=>{o instanceof RegExp||Ee(`Pattern ${o} for «${e.name}» Tool is skipped because it should be a Regexp instance.`,"warn"),this.toolsPatterns.push({key:t,pattern:o,tool:e})})}isNativeBehaviour(e){return R.isNativeInput(e)}async processFiles(e){const{BlockManager:t}=this.Blok,i=(await Promise.all(Array.from(e).map(u=>this.processFile(u)))).filter(u=>u!=null);if(i.length===0)return;const a=this.shouldReplaceCurrentBlockForFile(i[0]?.type);for(const[u,f]of i.entries())await t.paste(f.type,f.event,u===0&&a)}async processFile(e){const t=pS(e),o=Object.entries(this.toolsFiles).find(([u,{mimeTypes:f,extensions:p}])=>{const[g,v]=e.type.split("/"),y=p.find(S=>S.toLowerCase()===t.toLowerCase()),w=f.find(S=>{const[k,E]=S.split("/");return k===g&&(E===v||E==="*")});return y!==void 0||w!==void 0});if(!o)return;const[i]=o;return{event:this.composePasteEvent("file",{file:e}),type:i}}processHTML(e){const{Tools:t}=this.Blok,o=R.make("DIV");return o.innerHTML=e,this.getNodes(o).map(a=>{const u=(()=>{switch(a.nodeType){case Node.DOCUMENT_FRAGMENT_NODE:{const _=R.make("div");return _.appendChild(a),{content:_,tool:t.defaultTool,isBlock:!1}}case Node.ELEMENT_NODE:{const _=a,L=this.toolsTags[_.tagName];return{content:_,tool:L?.tool??t.defaultTool,isBlock:!0}}default:return null}})();if(!u)return null;const{content:f,tool:p,isBlock:g}=u,y=(p.pasteConfig===!1?[]:p.pasteConfig?.tags||[]).reduce((_,L)=>{const P=this.collectTagNames(L),K={..._};return P.forEach(j=>{const J=je(L)?L[j]:null;K[j.toLowerCase()]=J??{}}),K},{}),w=this.getStructuralTagsSanitizeConfig(f),S=Object.assign({},w,y,p.baseSanitizeConfig),k=(()=>{if(f.tagName.toLowerCase()!=="table")return f.innerHTML=yn(f.innerHTML,S),f;const _=yn(f.outerHTML,S),P=R.make("div",void 0,{innerHTML:_}).firstChild;return!P||!(P instanceof HTMLElement)?null:P})();if(!k)return null;const E=this.composePasteEvent("tag",{data:k});return{content:k,isBlock:g,tool:p.name,event:E}}).filter(a=>{if(!a)return!1;const u=R.isEmpty(a.content),f=R.isSingleTag(a.content);return!u||f})}processPlain(e){const{defaultBlock:t}=this.config;if(!e)return[];const o=t;return e.split(/\r?\n/).filter(i=>i.trim()).map(i=>{const a=R.make("div");a.textContent=i;const u=this.composePasteEvent("tag",{data:a});return{content:a,tool:o,isBlock:!1,event:u}})}async processSingleBlock(e){const{Caret:t,BlockManager:o}=this.Blok,{currentBlock:i}=o;if(!i||e.tool!==i.name||!R.containsOnlyInlineElements(e.content.innerHTML)){await this.insertBlock(e,i?i.tool.isDefault&&i.isEmpty:!1);return}t.insertContentAtCaretPosition(e.content.innerHTML)}async processInlinePaste(e){const{BlockManager:t,Caret:o}=this.Blok,{content:i}=e,a=t.currentBlock?.tool.isDefault??!1,u=i.textContent,p=a&&u!==null&&u.length<zs.PATTERN_PROCESSING_MAX_LENGTH&&u!==null?await this.processPattern(u):void 0;if(p){const g=t.currentBlock&&t.currentBlock.tool.isDefault&&t.currentBlock.isEmpty,v=await t.paste(p.tool,p.event,g);o.setToBlock(v,o.positions.END);return}if(t.currentBlock&&t.currentBlock.currentInput){const g=t.currentBlock.tool.baseSanitizeConfig;o.insertContentAtCaretPosition(yn(i.innerHTML,g))}else await this.insertBlock(e)}async processPattern(e){const t=this.toolsPatterns.find(i=>{const a=i.pattern.exec(e);return a?e===a.shift():!1});return t?{event:this.composePasteEvent("pattern",{key:t.key,data:e}),tool:t.tool.name}:void 0}async insertBlock(e,t=!1){const{BlockManager:o,Caret:i}=this.Blok,{currentBlock:a}=o;if(t&&a&&a.isEmpty){const f=await o.paste(e.tool,e.event,!0);i.setToBlock(f,i.positions.END);return}const u=await o.paste(e.tool,e.event);i.setToBlock(u,i.positions.END)}insertBlokData(e){const{BlockManager:t,Caret:o,Tools:i}=this.Blok;Xu(e,u=>i.blockTools.get(u)?.sanitizeConfig??{},this.config.sanitizer).forEach(({tool:u,data:f},p)=>{const g=p===0&&!!t.currentBlock?.tool.isDefault&&!!t.currentBlock?.isEmpty,v=t.insert({tool:u,data:f,replace:g});o.setToBlock(v,o.positions.END)})}processElementNode(e,t,o){const i=Object.keys(this.toolsTags),a=e,f=this.toolsTags[a.tagName]?.tool,p=this.tagsByTool[f?.name??""]??[],g=i.includes(a.tagName),v=R.blockElements.includes(a.tagName.toLowerCase()),y=Vy.has(a.tagName.toLowerCase()),w=Array.from(a.children).some(({tagName:k})=>i.includes(k)&&!p.includes(k)),S=Array.from(a.children).some(({tagName:k})=>R.blockElements.includes(k.toLowerCase()));if(!v&&!g&&!w)return o.appendChild(a),[...t,o];if(g&&!w||v&&!S&&!w||y&&!w)return[...t,o,a]}getNodes(e){const t=Array.from(e.childNodes),o=(i,a)=>{if(R.isEmpty(a)&&!R.isSingleTag(a))return i;const u=i[i.length-1],f=u!==void 0&&R.isFragment(u),{destNode:p,remainingNodes:g}=f?{destNode:u,remainingNodes:i.slice(0,-1)}:{destNode:new DocumentFragment,remainingNodes:i};if(a.nodeType===Node.TEXT_NODE)return p.appendChild(a),[...g,p];if(a.nodeType!==Node.ELEMENT_NODE)return[...g,p];const v=this.processElementNode(a,g,p);if(v)return v;const y=Array.from(a.childNodes).reduce(o,[]);return[...g,...y]};return t.reduce(o,[])}composePasteEvent(e,t){return new CustomEvent(e,{detail:t})}};zs.PATTERN_PROCESSING_MAX_LENGTH=450;let qd=zs;class NC extends Be{constructor(){super(...arguments),this.toolsDontSupportReadOnly=[],this.readOnlyEnabled=!1}get isEnabled(){return this.readOnlyEnabled}async prepare(){const{Tools:e}=this.Blok,{blockTools:t}=e,o=[];Array.from(t.entries()).forEach(([i,a])=>{a.isReadOnlySupported||o.push(i)}),this.toolsDontSupportReadOnly=o,this.config.readOnly===!0&&o.length>0&&this.throwCriticalError(),await this.toggle(this.config.readOnly,!0)}async toggle(e=!this.readOnlyEnabled,t=!1){e&&this.toolsDontSupportReadOnly.length>0&&this.throwCriticalError();const o=this.readOnlyEnabled;this.readOnlyEnabled=e;for(const a of Object.values(this.Blok))a!=null&&typeof a.toggleReadOnly=="function"&&a.toggleReadOnly(e);if(o===e)return this.readOnlyEnabled;if(t)return this.readOnlyEnabled;this.Blok.ModificationsObserver.disable();const i=await this.Blok.Saver.save();return i===void 0?(this.Blok.ModificationsObserver.enable(),this.readOnlyEnabled):(await this.Blok.BlockManager.clear(),await this.Blok.Renderer.render(i.blocks),this.Blok.ModificationsObserver.enable(),this.readOnlyEnabled)}throwCriticalError(){throw new Ho(`To enable read-only mode all connected tools should support it. Tools ${this.toolsDontSupportReadOnly.join(", ")} don't support read-only mode.`)}}class li extends Be{constructor(){super(...arguments),this.isRectSelectionActivated=!1,this.SCROLL_SPEED=3,this.HEIGHT_OF_SCROLL_ZONE=40,this.BOTTOM_SCROLL_ZONE=1,this.TOP_SCROLL_ZONE=2,this.MAIN_MOUSE_BUTTON=0,this.mousedown=!1,this.isScrolling=!1,this.inScrollZone=null,this.startX=0,this.startY=0,this.mouseX=0,this.mouseY=0,this.stackOfSelected=[],this.rectCrossesBlocks=!1,this.overlayRectangle=null,this.listenerIds=[]}static get CSS(){return{overlay:"blok-editor-overlay",overlayContainer:"blok-editor-overlay__container",rect:"blok-editor-overlay__rectangle",topScrollZone:"blok-editor-overlay__scroll-zone--top",bottomScrollZone:"blok-editor-overlay__scroll-zone--bottom"}}prepare(){this.enableModuleBindings()}startSelection(e,t){const o=this.getScrollLeft(),i=this.getScrollTop(),a=document.elementFromPoint(e-o,t-i);if(!a)return;a.closest(`.${this.Blok.Toolbar.CSS.toolbarSelector}`)||(this.Blok.BlockSelection.allBlocksSelected=!1,this.clearSelection(),this.stackOfSelected=[]);const f=[`.${vn.CSS.content}`,`.${this.Blok.Toolbar.CSS.toolbarSelector}`,Wv],p=a.closest("."+this.Blok.UI.CSS.blokWrapper),g=f.some(v=>!!a.closest(v));!p||g||(this.mousedown=!0,this.startX=e,this.startY=t)}endSelection(){this.mousedown=!1,this.startX=0,this.startY=0,this.overlayRectangle!==null&&(this.overlayRectangle.style.display="none")}isRectActivated(){return this.isRectSelectionActivated}clearSelection(){this.isRectSelectionActivated=!1}enableModuleBindings(){const{container:e}=this.genHTML();this.listeners.on(e,"mousedown",i=>{this.processMouseDown(i)},!1);const t=Mu(i=>{i instanceof MouseEvent&&this.processMouseMove(i)},10);this.listeners.on(document.body,"mousemove",t,{passive:!0}),this.listeners.on(document.body,"mouseleave",()=>{this.processMouseLeave()});const o=Mu(i=>{this.processScroll(i)},10);this.listeners.on(window,"scroll",o,{passive:!0}),this.listeners.on(document.body,"mouseup",()=>{this.processMouseUp()},!1)}processMouseDown(e){if(e.button!==this.MAIN_MOUSE_BUTTON)return;e.target.closest(R.allInputsSelector)!==null||this.startSelection(e.pageX,e.pageY)}processMouseMove(e){this.changingRectangle(e),this.scrollByZones(e.clientY)}processMouseLeave(){this.clearSelection(),this.endSelection()}processScroll(e){this.changingRectangle(e)}processMouseUp(){this.clearSelection(),this.endSelection()}scrollByZones(e){if(this.inScrollZone=null,e<=this.HEIGHT_OF_SCROLL_ZONE&&(this.inScrollZone=this.TOP_SCROLL_ZONE),document.documentElement.clientHeight-e<=this.HEIGHT_OF_SCROLL_ZONE&&(this.inScrollZone=this.BOTTOM_SCROLL_ZONE),!this.inScrollZone){this.isScrolling=!1;return}this.isScrolling||(this.scrollVertical(this.inScrollZone===this.TOP_SCROLL_ZONE?-this.SCROLL_SPEED:this.SCROLL_SPEED),this.isScrolling=!0)}genHTML(){const{UI:e}=this.Blok,t=e.nodes.holder.querySelector("."+e.CSS.blokWrapper),o=R.make("div",[li.CSS.overlay,"fixed","inset-0","z-overlay","pointer-events-none","overflow-hidden"],{}),i=R.make("div",[li.CSS.overlayContainer,"relative","pointer-events-auto","z-0"],{}),a=R.make("div",[li.CSS.rect,"absolute","pointer-events-none","bg-selection-highlight","border","border-transparent"],{});if(o.setAttribute("data-blok-testid","overlay"),a.setAttribute("data-blok-testid","overlay-rectangle"),!t)throw new Error("RectangleSelection: blok wrapper not found");return i.appendChild(a),o.appendChild(i),t.appendChild(o),this.overlayRectangle=a,{container:t,overlay:o}}scrollVertical(e){if(!(this.inScrollZone&&this.mousedown))return;const t=this.getScrollTop();window.scrollBy(0,e),this.mouseY+=this.getScrollTop()-t,setTimeout(()=>{this.scrollVertical(e)},0)}changingRectangle(e){if(!this.mousedown)return;const t=this.overlayRectangle;if(t===null)return;e.pageY!==void 0&&(this.mouseX=e.pageX,this.mouseY=e.pageY);const{rightPos:o,leftPos:i,index:a}=this.genInfoForMouseSelection(),u=this.startX>o&&this.mouseX>o,f=this.startX<i&&this.mouseX<i;if(this.rectCrossesBlocks=!(u||f),this.isRectSelectionActivated||(this.rectCrossesBlocks=!1,this.isRectSelectionActivated=!0,this.shrinkRectangleToPoint(),t.style.display="block"),this.updateRectangleSize(),this.Blok.Toolbar.close(),a===void 0)return;this.trySelectNextBlock(a),this.inverseSelection();const p=X.get();p&&p.removeAllRanges()}shrinkRectangleToPoint(){if(this.overlayRectangle===null)return;const e=this.getScrollLeft(),t=this.getScrollTop();this.overlayRectangle.style.left=`${this.startX-e}px`,this.overlayRectangle.style.top=`${this.startY-t}px`,this.overlayRectangle.style.bottom=`calc(100% - ${this.startY-t}px)`,this.overlayRectangle.style.right=`calc(100% - ${this.startX-e}px)`}inverseSelection(){if(this.stackOfSelected.length===0)return;const e=this.Blok.BlockManager.getBlockByIndex(this.stackOfSelected[0]);if(!e)return;const t=e.selected;if(this.rectCrossesBlocks&&!t)for(const o of this.stackOfSelected)this.Blok.BlockSelection.selectBlockByIndex(o);if(!this.rectCrossesBlocks&&t)for(const o of this.stackOfSelected)this.Blok.BlockSelection.unSelectBlockByIndex(o)}updateRectangleSize(){if(this.overlayRectangle===null)return;const e=this.getScrollLeft(),t=this.getScrollTop();this.mouseY>=this.startY?(this.overlayRectangle.style.top=`${this.startY-t}px`,this.overlayRectangle.style.bottom=`calc(100% - ${this.mouseY-t}px)`):(this.overlayRectangle.style.bottom=`calc(100% - ${this.startY-t}px)`,this.overlayRectangle.style.top=`${this.mouseY-t}px`),this.mouseX>=this.startX?(this.overlayRectangle.style.left=`${this.startX-e}px`,this.overlayRectangle.style.right=`calc(100% - ${this.mouseX-e}px)`):(this.overlayRectangle.style.right=`calc(100% - ${this.startX-e}px)`,this.overlayRectangle.style.left=`${this.mouseX-e}px`)}genInfoForMouseSelection(){const t=document.body.offsetWidth/2,o=this.getScrollTop(),i=this.mouseY-o,a=document.elementFromPoint(t,i),f=this.Blok.BlockManager.lastBlock?.holder?.querySelector("."+vn.CSS.content),g=(f?Number.parseInt(window.getComputedStyle(f).width,10):0)/2,v=t-g,y=t+g;if(!a)return{index:void 0,leftPos:v,rightPos:y};const w=this.Blok.BlockManager.getBlockByChildNode(a);return{index:w!==void 0?this.Blok.BlockManager.blocks.findIndex(k=>k.holder===w.holder):void 0,leftPos:v,rightPos:y}}getScrollTop(){return typeof window.scrollY=="number"?window.scrollY:document.documentElement?.scrollTop??document.body?.scrollTop??0}getScrollLeft(){return typeof window.scrollX=="number"?window.scrollX:document.documentElement?.scrollLeft??document.body?.scrollLeft??0}addBlockInSelection(e){this.rectCrossesBlocks&&this.Blok.BlockSelection.selectBlockByIndex(e),this.stackOfSelected.push(e)}trySelectNextBlock(e){const t=this.stackOfSelected.length,o=this.stackOfSelected[t-1];if(o===e)return;const a=this.stackOfSelected[t-2],u=a!==void 0&&o!==void 0?o-a>0:!1,f=t<=1,p=o!==void 0&&e>o&&u,g=o!==void 0&&e<o&&t>1&&!u,y=!(p||g||f);if(!y&&(o===void 0||e>o)){const k=o!==void 0?o+1:e;Array.from({length:e-k+1},(E,_)=>k+_).forEach(E=>{this.addBlockInSelection(E)});return}if(!y&&o!==void 0&&e<o){Array.from({length:o-e},(k,E)=>o-1-E).forEach(k=>{this.addBlockInSelection(k)});return}if(!y)return;const w=k=>o===void 0?!1:e>o?e>k:e<k,S=[];for(const k of[...this.stackOfSelected].reverse()){if(!w(k))break;this.rectCrossesBlocks&&this.Blok.BlockSelection.unSelectBlockByIndex(k),S.push(k)}S.length>0&&this.stackOfSelected.splice(this.stackOfSelected.length-S.length,S.length)}}class RC extends Be{render(e){return new Promise(t=>{const{Tools:o,BlockManager:i}=this.Blok;if(e.length===0)i.insert();else{const a=e.map(u=>{const{tunes:f,id:p}=u,g=u.type,v=o.available.has(g)?{tool:g,data:u.data}:(Vt(`Tool «${g}» is not found. Check 'tools' property at the Blok config.`,"warn"),{tool:o.stubTool,data:this.composeStubDataForTool(g,u.data,p)});return((w,S)=>{try{return i.composeBlock({id:p,tool:w,data:S,tunes:f})}catch(k){Ee(`Block «${w}» skipped because of plugins error`,"error",{data:S,error:k});const E=this.composeStubDataForTool(w,S,p);return i.composeBlock({id:p,tool:o.stubTool,data:E,tunes:f})}})(v.tool,v.data)});i.insertMany(a)}window.requestIdleCallback(()=>{t()},{timeout:2e3})})}composeStubDataForTool(e,t,o){const{Tools:i}=this.Blok,a=(()=>{if(!i.unavailable.has(e))return e;const u=i.unavailable.get(e).toolbox;return u!==void 0&&u[0].title!==void 0?u[0].title:e})();return{savedData:{id:o,type:e,data:t},title:a}}}class OC extends Be{async save(){const{BlockManager:e,Tools:t}=this.Blok,o=e.blocks;if(o.length===1&&o[0].isEmpty)return{time:+new Date,blocks:[],version:os()};const i=o.map(a=>this.getSavedData(a));this.lastSaveError=void 0;try{const a=await Promise.all(i),u=this.sanitizeExtractedData(a,f=>t.blockTools.get(f)?.sanitizeConfig,this.config.sanitizer);return this.makeOutput(u)}catch(a){this.lastSaveError=a;const u=a instanceof Error?a:new Error(String(a));Vt("Saving failed due to the Error %o","error",u);return}}async getSavedData(e){const t=await e.save(),o=e.name,i=t?.data!==void 0?t:this.getPreservedSavedData(e);if(i===void 0)return{tool:o,isValid:!1};const a=await e.validate(i.data);return{...i,isValid:a}}makeOutput(e){const t=[];return e.forEach(({id:o,tool:i,data:a,tunes:u,isValid:f})=>{if(!f){Ee(`Block «${i}» skipped because saved data is invalid`);return}if(i===void 0||a===void 0){Ee("Block skipped because saved data is missing required fields");return}if(i===this.Blok.Tools.stubTool&&this.isStubSavedData(a)){t.push(a);return}if(i===this.Blok.Tools.stubTool){Ee("Stub block data is malformed and was skipped");return}const p=u===void 0||ot(u),g={id:o,type:i,data:a,...!p&&{tunes:u}};t.push(g)}),{time:+new Date,blocks:t,version:os()}}sanitizeExtractedData(e,t,o){const i=[];if(e.forEach((f,p)=>{this.hasSanitizableData(f)&&i.push({index:p,data:f})}),i.length===0)return e;const a=Xu(i.map(({data:f})=>f),t,o),u=e.map(f=>({...f}));return i.forEach(({index:f},p)=>{const g=a[p];u[f]={...u[f],data:g.data}}),u}hasSanitizableData(e){return e.data!==void 0&&typeof e.tool=="string"}isStubSavedData(e){if(!je(e))return!1;const t=e;return typeof t.type=="string"&&t.data!==void 0}getLastSaveError(){return this.lastSaveError}getPreservedSavedData(e){const t=e.preservedData;if(ot(t))return;const o=e.preservedTunes;return{id:e.id,tool:e.name,data:t,...ot(o)?{}:{tunes:o},time:0}}}const PC=l=>{const e=document.createElement("div");e.innerHTML=l.trim();const t=document.createDocumentFragment();return t.append(...Array.from(e.childNodes)),t},Nr=class Nr{static get DEFAULT_PLACEHOLDER(){return""}constructor({data:e,config:t,api:o,readOnly:i}){this.api=o,this.readOnly=i,this._CSS={block:this.api.styles.block,wrapper:"blok-paragraph"},this.readOnly||(this.onKeyUp=this.onKeyUp.bind(this)),this._placeholder=t?.placeholder??Nr.DEFAULT_PLACEHOLDER,this._data=e??{text:""},this._element=null,this._preserveBlank=t?.preserveBlank??!1}onKeyUp(e){if(e.code!=="Backspace"&&e.code!=="Delete"||!this._element)return;const{textContent:t}=this._element;t===""&&(this._element.innerHTML="")}drawView(){const e=document.createElement("DIV");return e.className=we(this._CSS.wrapper,this._CSS.block,Nr.WRAPPER_CLASSES,Nr.PLACEHOLDER_CLASSES),e.contentEditable="false",e.setAttribute("data-placeholder-active",this.api.i18n.t(this._placeholder)),this._data.text&&(e.innerHTML=this._data.text),this.readOnly||(e.contentEditable="true",e.addEventListener("keyup",this.onKeyUp)),e}render(){return this._element=this.drawView(),this._element}merge(e){if(!this._element)return;this._data.text+=e.text;const t=PC(e.text);this._element.appendChild(t),this._element.normalize()}validate(e){return!(e.text.trim()===""&&!this._preserveBlank)}save(e){return{text:e.innerHTML}}onPaste(e){const t=e.detail;if(!("data"in t))return;const i={text:t.data.innerHTML};this._data=i,window.requestAnimationFrame(()=>{this._element&&(this._element.innerHTML=this._data.text||"")})}static get conversionConfig(){return{export:"text",import:"text"}}static get sanitize(){return{text:{br:!0}}}static get isReadOnlySupported(){return!0}static get pasteConfig(){return{tags:["P"]}}static get toolbox(){return{icon:_1,title:"Text"}}};Nr.WRAPPER_CLASSES=["leading-[1.6em]","outline-none","[&>p:first-of-type]:mt-0","[&>p:last-of-type]:mb-0"],Nr.PLACEHOLDER_CLASSES=["empty:before:pointer-events-none","empty:before:text-gray-text","empty:before:cursor-text","empty:before:content-[attr(data-placeholder-active)]","[&[data-empty=true]]:before:pointer-events-none","[&[data-empty=true]]:before:text-gray-text","[&[data-empty=true]]:before:cursor-text","[&[data-empty=true]]:before:content-[attr(data-placeholder-active)]"];let Ud=Nr;const C=class C{static get sanitize(){return{strong:{},b:{}}}static normalizeAllBoldTags(){if(typeof document>"u")return;const e=X.CSS.blokWrapper,t=`${Uv} b, .${e} b`;document.querySelectorAll(t).forEach(o=>{C.ensureStrongElement(o)})}static normalizeBoldInNode(e){const t=e.nodeType===Node.ELEMENT_NODE?e:e.parentElement;if(!t||typeof t.closest!="function")return;const o=X.CSS.blokWrapper;t.closest(`${Uv}, .${o}`)&&(t.tagName==="B"&&C.ensureStrongElement(t),t.querySelectorAll?.("b").forEach(a=>{C.ensureStrongElement(a)}))}constructor(){typeof document>"u"||(C.instances.add(this),C.initializeGlobalListeners())}static initializeGlobalListeners(){return typeof document>"u"?!1:(C.shortcutListenerRegistered||(document.addEventListener("keydown",C.handleShortcut,!0),C.shortcutListenerRegistered=!0),C.selectionListenerRegistered||(document.addEventListener("selectionchange",C.handleGlobalSelectionChange,!0),C.selectionListenerRegistered=!0),C.inputListenerRegistered||(document.addEventListener("input",C.handleGlobalInput,!0),C.inputListenerRegistered=!0),C.beforeInputListenerRegistered||(document.addEventListener("beforeinput",C.handleBeforeInput,!0),C.beforeInputListenerRegistered=!0),C.ensureMutationObserver(),!0)}static maintainCollapsedExitState(){if(!(typeof document>"u"))for(const e of Array.from(C.collapsedExitRecords)){const t=C.resolveBoundary(e);if(!t){C.collapsedExitRecords.delete(e);continue}e.boundary=t.boundary,e.boldElement=t.boldElement;const o=t.boundary,i=t.boldElement,a=e.allowedLength,u=i.textContent??"";if(u.length>a){const L=u.slice(0,a),P=u.slice(a);i.textContent=L,o.textContent=(o.textContent??"")+P}const f=o.textContent??"";f.length>1&&f.startsWith("")&&(o.textContent=f.slice(1));const p=window.getSelection();C.ensureCaretAtBoundary(p,o),C.scheduleBoundaryCaretAdjustment(o);const g=o.textContent??"",v=g.replace(/\u200B/g,""),y=v.match(/^\s+/),w=/\S/.test(v),S=g.startsWith("");y&&(e.hasLeadingSpace=!0,e.leadingWhitespace=y[0]),w&&(e.hasTypedContent=!0);const k=/^\s/.test(v),E=e.hasTypedContent&&!S&&(i.textContent??"").length<=a,_=e.hasLeadingSpace&&e.hasTypedContent&&!k;if(E&&_){const L=g.replace(/^[\u200B\s]+/,""),P=e.leadingWhitespace||" ";o.textContent=`${P}${L}`,C.ensureCaretAtBoundary(p,o)}E&&C.collapsedExitRecords.delete(e)}}static ensureCaretAtBoundary(e,t){!e||!e.isCollapsed||C.setCaretToBoundaryEnd(e,t)}static scheduleBoundaryCaretAdjustment(e){C.pendingBoundaryCaretAdjustments.has(e)||(C.pendingBoundaryCaretAdjustments.add(e),setTimeout(()=>{C.pendingBoundaryCaretAdjustments.delete(e);const t=e.ownerDocument??(typeof document<"u"?document:null);if(!t)return;const o=t.getSelection();if(!o||!o.isCollapsed||o.anchorNode!==e)return;const i=e.textContent?.length??0;o.anchorOffset!==i&&C.setCaret(o,e,i)},0))}static ensureTextNodeAfter(e){const t=e.nextSibling;if(t?.nodeType===Node.TEXT_NODE)return t;const o=e.parentNode;if(!o)return null;const i=e.ownerDocument??(typeof document<"u"?document:null);if(!i)return null;const a=i.createTextNode("");return o.insertBefore(a,t),a}static resolveBoundary(e){if(!e.boldElement.isConnected)return null;const t=C.ensureStrongElement(e.boldElement),o=e.boundary,a=o.isConnected&&o.previousSibling===t?o:C.ensureTextNodeAfter(t);return a?{boundary:a,boldElement:t}:null}static setCaretToBoundaryEnd(e,t){const o=document.createRange(),i=t.textContent?.length??0;o.setStart(t,i),o.collapse(!0),e.removeAllRanges(),e.addRange(o)}static hasBoldParent(e){return e?e.nodeType===Node.ELEMENT_NODE&&C.isBoldTag(e)?!0:C.hasBoldParent(e.parentNode):!1}static findBoldElement(e){return e?e.nodeType===Node.ELEMENT_NODE&&C.isBoldTag(e)?C.ensureStrongElement(e):C.findBoldElement(e.parentNode):null}static isBoldTag(e){const t=e.tagName;return t==="B"||t==="STRONG"}static ensureStrongElement(e){if(e.tagName==="STRONG")return e;const t=document.createElement("strong");for(e.hasAttributes()&&Array.from(e.attributes).forEach(o=>{t.setAttribute(o.name,o.value)});e.firstChild;)t.appendChild(e.firstChild);return e.replaceWith(t),t}static mergeStrongNodes(e,t){const o=C.ensureStrongElement(e),i=C.ensureStrongElement(t);for(;i.firstChild;)o.appendChild(i.firstChild);return i.remove(),o}render(){return{icon:p1,name:"bold",onActivate:()=>{this.toggleBold()},isActive:()=>{const e=window.getSelection();return e?this.isSelectionVisuallyBold(e):!1}}}toggleBold(){const e=window.getSelection();if(!e||e.rangeCount===0)return;const t=e.getRangeAt(0);if(t.collapsed){this.toggleCollapsedSelection();return}this.isRangeBold(t,{ignoreWhitespace:!0})?this.unwrapBoldTags(t):this.wrapWithBold(t)}isSelectionVisuallyBold(e){if(!e||e.rangeCount===0)return!1;const t=e.getRangeAt(0);return this.isRangeBold(t,{ignoreWhitespace:!0})}wrapWithBold(e){const t=this.getRangeHtmlWithoutBold(e),o=this.replaceRangeWithHtml(e,`<strong>${t}</strong>`),i=window.getSelection();i&&o&&(i.removeAllRanges(),i.addRange(o)),C.normalizeAllBoldTags();const a=i?C.findBoldElement(i.focusNode):null;if(!a)return;const u=this.mergeAdjacentBold(a);this.normalizeWhitespaceAround(u),this.selectElementContents(u),C.normalizeBoldTagsWithinBlok(window.getSelection()),C.replaceNbspInBlock(window.getSelection()),this.notifySelectionChange()}unwrapBoldTags(e){const t=this.collectBoldAncestors(e),o=window.getSelection();if(!o)return;const i=document.createElement("span"),a=e.extractContents();i.setAttribute("data-blok-bold-marker",`unwrap-${C.markerSequence++}`),i.appendChild(a),this.removeNestedBold(i),e.insertNode(i);const u=document.createRange();for(u.selectNodeContents(i),o.removeAllRanges(),o.addRange(u);;){const v=C.findBoldElement(i);if(!v)break;this.moveMarkerOutOfBold(i,v)}const f=i.firstChild,p=i.lastChild;this.unwrapElement(i);const g=f&&p?(()=>{const v=document.createRange();return v.setStartBefore(f),v.setEndAfter(p),o.removeAllRanges(),o.addRange(v),v})():void 0;g||o.removeAllRanges(),this.replaceNbspWithinRange(g),C.normalizeBoldTagsWithinBlok(o),C.replaceNbspInBlock(o),C.removeEmptyBoldElements(o),t.forEach(v=>{C.isElementEmpty(v)&&v.remove()}),this.notifySelectionChange()}replaceRangeWithHtml(e,t){const o=C.createFragmentFromHtml(t),i=o.firstChild??null,a=o.lastChild??null;if(e.deleteContents(),!i||!a)return;e.insertNode(o);const u=document.createRange();return u.setStartBefore(i),u.setEndAfter(a),u}moveMarkerOutOfBold(e,t){const o=t.parentNode;if(!o)return;if(Array.from(t.childNodes).forEach(p=>{p.nodeType===Node.TEXT_NODE&&(p.textContent??"").length===0&&p.remove()}),t.childNodes.length===1&&t.firstChild===e){t.replaceWith(e);return}if(t.firstChild===e){o.insertBefore(e,t);return}if(t.lastChild===e){o.insertBefore(e,t.nextSibling);return}const f=t.cloneNode(!1);for(;e.nextSibling;)f.appendChild(e.nextSibling);o.insertBefore(f,t.nextSibling),o.insertBefore(e,f)}selectElementContents(e){const t=window.getSelection();if(!t)return;const o=document.createRange();o.selectNodeContents(e),t.removeAllRanges(),t.addRange(o)}get shortcut(){return"CMD+B"}isRangeBold(e,t){if(e.collapsed)return!!C.findBoldElement(e.startContainer);const o=document.createTreeWalker(e.commonAncestorContainer,NodeFilter.SHOW_TEXT,{acceptNode:a=>{try{return e.intersectsNode(a)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}catch{const f=document.createRange();f.selectNodeContents(a);const p=e.compareBoundaryPoints(Range.END_TO_START,f)>0,g=e.compareBoundaryPoints(Range.START_TO_END,f)<0;return p&&g?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}}),i=[];for(;o.nextNode();){const a=o.currentNode,u=a.textContent??"";t.ignoreWhitespace&&u.trim().length===0||u.length!==0&&i.push(a)}return i.length===0?!!C.findBoldElement(e.startContainer):i.every(a=>C.hasBoldParent(a))}removeNestedBold(e){const t=e.querySelectorAll?.("b,strong");t&&t.forEach(o=>{this.unwrapElement(o)})}unwrapElement(e){const t=e.parentNode;if(!t){e.remove();return}for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}mergeAdjacentBold(e){const t=C.ensureStrongElement(e),o=t.previousSibling,i=o&&o.nodeType===Node.ELEMENT_NODE&&C.isBoldTag(o)?C.mergeStrongNodes(o,t):t,a=i.nextSibling;return a&&a.nodeType===Node.ELEMENT_NODE&&C.isBoldTag(a)?C.mergeStrongNodes(i,a):i}toggleCollapsedSelection(){const e=window.getSelection();if(!e||e.rangeCount===0)return;const t=e.getRangeAt(0),o=C.findBoldElement(t.startContainer),i=(()=>{if(o&&o.getAttribute(C.DATA_ATTR_COLLAPSED_ACTIVE)!=="true")return C.exitCollapsedBold(e,o);const a=o??C.getBoundaryBold(t);return a?C.exitCollapsedBold(e,a):this.startCollapsedBold(t)})();document.dispatchEvent(new Event("selectionchange")),i&&(e.removeAllRanges(),e.addRange(i)),C.normalizeBoldTagsWithinBlok(e),C.replaceNbspInBlock(e),C.removeEmptyBoldElements(e),this.notifySelectionChange()}startCollapsedBold(e){if(!e.collapsed)return;const t=document.createElement("strong"),o=document.createTextNode("");t.appendChild(o),t.setAttribute(C.DATA_ATTR_COLLAPSED_ACTIVE,"true");const i=e.startContainer,a=e.startOffset;if(!(i.nodeType===Node.TEXT_NODE?this.insertCollapsedBoldIntoText(i,t,a):i.nodeType===Node.ELEMENT_NODE?(this.insertCollapsedBoldIntoElement(i,t,a),!0):!1))return;const f=window.getSelection(),p=document.createRange();p.setStart(o,0),p.collapse(!0);const g=this.mergeAdjacentBold(t);return C.normalizeBoldTagsWithinBlok(f),C.replaceNbspInBlock(f),C.removeEmptyBoldElements(f),f&&(f.removeAllRanges(),f.addRange(p)),this.notifySelectionChange(),g.firstChild instanceof Text?(()=>{const v=document.createRange();return v.setStart(g.firstChild,g.firstChild.textContent?.length??0),v.collapse(!0),v})():p}insertCollapsedBoldIntoText(e,t,o){const i=e,a=i.parentNode;if(!a)return!1;const u=i.textContent??"",f=u.slice(0,o),p=u.slice(o);i.textContent=f;const g=p.length?document.createTextNode(p):null;return g&&a.insertBefore(g,i.nextSibling),a.insertBefore(t,g??i.nextSibling),t.setAttribute(C.DATA_ATTR_PREV_LENGTH,f.length.toString()),!0}insertCollapsedBoldIntoElement(e,t,o){const i=e.childNodes[o]??null;e.insertBefore(t,i),t.setAttribute(C.DATA_ATTR_PREV_LENGTH,"0")}static isElementEmpty(e){return(e.textContent??"").length===0}notifySelectionChange(){C.enforceCollapsedBoldLengths(window.getSelection()),document.dispatchEvent(new Event("selectionchange")),this.updateToolbarButtonState()}updateToolbarButtonState(){const e=window.getSelection();if(!e)return;const t=e.anchorNode,i=(t?.nodeType===Node.ELEMENT_NODE?t:t?.parentElement)?.closest(`.${X.CSS.blokWrapper}`);if(!i)return;const a=i.querySelector("[data-blok-testid=inline-toolbar]");if(!(a instanceof HTMLElement))return;const u=a.querySelector('[data-blok-item-name="bold"]');if(!(u instanceof HTMLElement))return;const f=this.isSelectionVisuallyBold(e);u.classList.toggle("is-active",f),f?u.setAttribute("data-blok-popover-item-active","true"):u.removeAttribute("data-blok-popover-item-active")}normalizeWhitespaceAround(e){C.replaceNbspWithSpace(e.previousSibling),C.replaceNbspWithSpace(e.nextSibling)}static replaceNbspWithSpace(e){if(!e||e.nodeType!==Node.TEXT_NODE)return;const t=e,o=t.textContent??"";o.includes(" ")&&(t.textContent=o.replace(/\u00A0/g," "))}restoreSelectionFromMarkers(e){const t=document.querySelector(`[data-blok-bold-marker="${e}-start"]`),o=document.querySelector(`[data-blok-bold-marker="${e}-end"]`);if(!t||!o){t?.remove(),o?.remove();return}const i=window.getSelection();if(!i){t.remove(),o.remove();return}const a=document.createRange();return a.setStartAfter(t),a.setEndBefore(o),i.removeAllRanges(),i.addRange(a),t.remove(),o.remove(),a}replaceNbspWithinRange(e){if(!e)return;const t=document.createTreeWalker(e.commonAncestorContainer,NodeFilter.SHOW_TEXT,{acceptNode:o=>{try{return e.intersectsNode(o)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}catch{const a=document.createRange();a.selectNodeContents(o);const u=e.compareBoundaryPoints(Range.END_TO_START,a)>0,f=e.compareBoundaryPoints(Range.START_TO_END,a)<0;return u&&f?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}});for(;t.nextNode();)C.replaceNbspWithSpace(t.currentNode)}static normalizeBoldTagsWithinBlok(e){const t=e?.anchorNode??e?.focusNode;if(!t)return;const i=(t.nodeType===Node.ELEMENT_NODE?t:t.parentElement)?.closest(`.${X.CSS.blokWrapper}`);i&&i.querySelectorAll("b").forEach(a=>{C.ensureStrongElement(a)})}static replaceNbspInBlock(e){const t=e?.anchorNode??e?.focusNode;if(!t)return;const i=(t.nodeType===Node.ELEMENT_NODE?t:t.parentElement)?.closest('[data-blok-component="paragraph"]');if(!i)return;const a=document.createTreeWalker(i,NodeFilter.SHOW_TEXT);for(;a.nextNode();)C.replaceNbspWithSpace(a.currentNode);i.querySelectorAll("b").forEach(u=>{C.ensureStrongElement(u)})}static removeEmptyBoldElements(e){const t=e?.anchorNode??e?.focusNode;if(!t)return;const i=(t.nodeType===Node.ELEMENT_NODE?t:t.parentElement)?.closest('[data-blok-component="paragraph"]');if(!i)return;const a=e?.focusNode??null;i.querySelectorAll("strong").forEach(u=>{const f=u.getAttribute(C.DATA_ATTR_COLLAPSED_ACTIVE)==="true",p=u.hasAttribute(C.DATA_ATTR_COLLAPSED_LENGTH);f||p||(u.textContent??"").length===0&&!C.isNodeWithin(a,u)&&u.remove()})}static synchronizeCollapsedBold(e){const t=e?.anchorNode??e?.focusNode,o=t&&t.nodeType===Node.ELEMENT_NODE?t:t?.parentElement,i=o?.closest(`.${X.CSS.blokWrapper}`)??o?.ownerDocument;if(!i)return;const a=`strong[${C.DATA_ATTR_COLLAPSED_ACTIVE}="true"]`;i.querySelectorAll(a).forEach(u=>{const f=u.getAttribute(C.DATA_ATTR_PREV_LENGTH),p=u.previousSibling;if(!f||!p||p.nodeType!==Node.TEXT_NODE)return;const g=Number(f);if(!Number.isFinite(g))return;const v=p,y=v.textContent??"";if(y.length<=g)return;const w=y.slice(0,g),S=y.slice(g);v.textContent=w;const k=S.match(/^[\u00A0\s]+/);if(k&&!u.hasAttribute(C.DATA_ATTR_LEADING_WHITESPACE)&&u.setAttribute(C.DATA_ATTR_LEADING_WHITESPACE,k[0]),S.length===0)return;const E=u.textContent??"",_=E+S,L=u.getAttribute(C.DATA_ATTR_LEADING_WHITESPACE)??"",K=L.length>0&&E.length===0&&!_.startsWith(L)?L+_:_,j=document.createTextNode(K);for(;u.firstChild;)u.removeChild(u.firstChild);if(u.appendChild(j),!e?.isCollapsed||!C.isNodeWithin(e.focusNode,v))return;const J=document.createRange(),W=j.textContent?.length??0;J.setStart(j,W),J.collapse(!0),e.removeAllRanges(),e.addRange(J)})}static moveCaretAfterBoundaryBold(e){if(!e.rangeCount)return;const t=e.getRangeAt(0);!t.collapsed||C.findBoldElement(t.startContainer)?.getAttribute(C.DATA_ATTR_COLLAPSED_ACTIVE)==="true"||C.moveCaretFromElementContainer(e,t)||C.moveCaretFromTextContainer(e,t)}static getAdjacentBold(e){const t=e.startContainer;return t.nodeType===Node.TEXT_NODE?C.getBoldAdjacentToText(e,t):t.nodeType===Node.ELEMENT_NODE?C.getBoldAdjacentToElement(e,t):null}static getBoldAdjacentToText(e,t){const o=t.textContent?.length??0,i=t.previousSibling;if(e.startOffset===0&&C.isBoldElement(i))return i;if(e.startOffset!==o)return null;const a=t.nextSibling;return C.isBoldElement(a)?a:null}static getBoldAdjacentToElement(e,t){const o=e.startOffset>0?t.childNodes[e.startOffset-1]??null:null;if(C.isBoldElement(o))return o;const i=t.childNodes[e.startOffset]??null;return C.isBoldElement(i)?i:null}static exitCollapsedIfNeeded(e,t){if(!!C.findBoldElement(t.startContainer))return;const i=C.getBoundaryBold(t)??C.getAdjacentBold(t);if(!i)return;const a=C.exitCollapsedBold(e,i);a&&(e.removeAllRanges(),e.addRange(a))}static moveCaretFromElementContainer(e,t){if(t.startContainer.nodeType!==Node.ELEMENT_NODE)return!1;const o=t.startContainer;return C.moveCaretAfterPreviousBold(e,o,t.startOffset)?!0:C.moveCaretBeforeNextBold(e,o,t.startOffset)}static moveCaretAfterPreviousBold(e,t,o){const i=o>0?t.childNodes[o-1]??null:null;if(!C.isBoldElement(i))return!1;const a=C.ensureFollowingTextNode(i,i.nextSibling);if(!a)return!1;const u=a.textContent?.length??0;return C.setCaret(e,a,u),!0}static moveCaretBeforeNextBold(e,t,o){const i=t.childNodes[o]??null;if(!C.isBoldElement(i))return!1;const a=C.ensureFollowingTextNode(i,i.nextSibling);return a?(C.setCaret(e,a,0),!0):(C.setCaretAfterNode(e,i),!0)}static moveCaretFromTextContainer(e,t){if(t.startContainer.nodeType!==Node.TEXT_NODE)return;const o=t.startContainer,i=o.previousSibling,a=o.textContent??"",u=/^\s/.test(a);if(t.startOffset===0&&C.isBoldElement(i)&&(a.length===0||u)){C.setCaret(e,o,a.length);return}const f=C.findBoldElement(o);if(!f||t.startOffset!==(o.textContent?.length??0))return;const p=C.ensureFollowingTextNode(f,f.nextSibling);if(p){C.setCaret(e,p,0);return}C.setCaretAfterNode(e,f)}static guardCollapsedBoundaryKeydown(e){if(e.defaultPrevented||e.metaKey||e.ctrlKey||e.altKey||e.key.length!==1)return;const o=window.getSelection();if(!o||!o.isCollapsed||o.rangeCount===0)return;const i=o.getRangeAt(0);if(i.startContainer.nodeType!==Node.TEXT_NODE)return;const a=i.startContainer,u=a.textContent??"";if(u.length===0||i.startOffset!==0)return;const f=a.previousSibling;C.isBoldElement(f)&&/^\s/.test(u)&&C.setCaret(o,a,u.length)}static isBoldElement(e){return!!(e&&e.nodeType===Node.ELEMENT_NODE&&C.isBoldTag(e))}static setCaret(e,t,o){const i=document.createRange();i.setStart(t,o),i.collapse(!0),e.removeAllRanges(),e.addRange(i)}static setCaretAfterNode(e,t){if(!t)return;const o=document.createRange();o.setStartAfter(t),o.collapse(!0),e.removeAllRanges(),e.addRange(o)}static ensureFollowingTextNode(e,t){const o=e.parentNode;if(!o)return null;if(t&&t.nodeType===Node.TEXT_NODE)return t;const i=document.createTextNode("");return o.insertBefore(i,t),i}static enforceCollapsedBoldLengths(e){const t=e?.anchorNode??e?.focusNode;if(!t)return;const i=(t.nodeType===Node.ELEMENT_NODE?t:t.parentElement)?.closest(`.${X.CSS.blokWrapper}`);if(!i)return;i.querySelectorAll(`strong[${C.DATA_ATTR_COLLAPSED_LENGTH}]`).forEach(u=>{const f=u,p=f.getAttribute(C.DATA_ATTR_COLLAPSED_LENGTH);if(!p)return;const g=Number(p),v=f.textContent??"";if(!Number.isFinite(g))return;const y=v.length>g,w=y?C.splitCollapsedBoldText(f,g,v):null,S=f.getAttribute(C.DATA_ATTR_PREV_LENGTH),k=S?Number(S):NaN,E=f.previousSibling,_=E?.nodeType===Node.TEXT_NODE?E:null,L=_?.textContent??"",P=!!(S&&Number.isFinite(k)&&_&&L.length>k);if(P&&_){const K=L.slice(0,k),j=L.slice(k);_.textContent=K;const J=document.createTextNode(j);f.parentNode?.insertBefore(J,f.nextSibling)}if(P&&f.removeAttribute(C.DATA_ATTR_PREV_LENGTH),e?.isCollapsed&&w&&C.isNodeWithin(e.focusNode,f)){const K=document.createRange(),j=w.textContent?.length??0;K.setStart(w,j),K.collapse(!0),e.removeAllRanges(),e.addRange(K)}y&&f.removeAttribute(C.DATA_ATTR_COLLAPSED_LENGTH)})}static splitCollapsedBoldText(e,t,o){const i=e,a=i.parentNode;if(!a)return null;const u=o.slice(0,t),f=o.slice(t);i.textContent=u;const p=document.createTextNode(f);return a.insertBefore(p,i.nextSibling),p}static isNodeWithin(e,t){return e?e===t||t.contains(e):!1}static handleGlobalSelectionChange(){C.refreshSelectionState("selectionchange")}static handleGlobalInput(){C.refreshSelectionState("input")}static refreshSelectionState(e){const t=window.getSelection();C.enforceCollapsedBoldLengths(t),C.maintainCollapsedExitState(),C.synchronizeCollapsedBold(t),C.normalizeBoldTagsWithinBlok(t),C.removeEmptyBoldElements(t),e==="input"&&t&&C.moveCaretAfterBoundaryBold(t),C.normalizeAllBoldTags()}static ensureMutationObserver(){if(typeof MutationObserver>"u"||C.mutationObserver)return;const e=new MutationObserver(t=>{if(!C.isProcessingMutation){C.isProcessingMutation=!0;try{t.forEach(o=>{o.addedNodes.forEach(i=>{C.normalizeBoldInNode(i)}),o.type==="characterData"&&o.target&&C.normalizeBoldInNode(o.target)})}finally{C.isProcessingMutation=!1}}});e.observe(document.body,{subtree:!0,childList:!0,characterData:!0}),C.mutationObserver=e}static handleBeforeInput(e){if(e.inputType!=="formatBold")return;const t=window.getSelection(),o=!!(t&&C.isSelectionInsideBlok(t)),i=C.isEventTargetInsideBlok(e.target);!o&&!i||(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),C.normalizeAllBoldTags())}static exitCollapsedBold(e,t){const o=C.ensureStrongElement(t),i=o.parentNode;if(i)return C.isElementEmpty(o)?C.removeEmptyBoldElement(e,o,i):C.exitCollapsedBoldWithContent(e,o,i)}static removeEmptyBoldElement(e,t,o){const i=document.createRange();return i.setStartBefore(t),i.collapse(!0),o.removeChild(t),e.removeAllRanges(),e.addRange(i),i}static exitCollapsedBoldWithContent(e,t,o){t.setAttribute(C.DATA_ATTR_COLLAPSED_LENGTH,(t.textContent?.length??0).toString()),t.removeAttribute(C.DATA_ATTR_PREV_LENGTH),t.removeAttribute(C.DATA_ATTR_COLLAPSED_ACTIVE),t.removeAttribute(C.DATA_ATTR_LEADING_WHITESPACE);const i=t.nextSibling,a=!i||i.nodeType!==Node.TEXT_NODE,u=a?document.createTextNode(""):null;u&&o.insertBefore(u,i);const f=u??i;!a&&(f.textContent??"").length===0&&(f.textContent="");const p=document.createRange(),v=(f.textContent??"").startsWith("")?1:0;p.setStart(f,v),p.collapse(!0),e.removeAllRanges(),e.addRange(p);const y=C.ensureStrongElement(t);return C.collapsedExitRecords.add({boundary:f,boldElement:y,allowedLength:y.textContent?.length??0,hasLeadingSpace:!1,hasTypedContent:!1,leadingWhitespace:""}),p}static getBoundaryBold(e){const t=e.startContainer;return t.nodeType===Node.TEXT_NODE?C.getBoundaryBoldForText(e,t):t.nodeType===Node.ELEMENT_NODE?C.getBoundaryBoldForElement(e,t):null}static getBoundaryBoldForText(e,t){const o=t.textContent?.length??0;if(e.startOffset===o)return C.findBoldElement(t);if(e.startOffset!==0)return null;const i=t.previousSibling;return C.isBoldElement(i)?i:null}static getBoundaryBoldForElement(e,t){if(e.startOffset<=0)return null;const o=t.childNodes[e.startOffset-1];return C.isBoldElement(o)?o:null}static handleShortcut(e){if(C.guardCollapsedBoundaryKeydown(e),!C.isBoldShortcut(e))return;const t=window.getSelection();if(!t||!t.rangeCount||!C.isSelectionInsideBlok(t))return;const o=C.instances.values().next().value??new C;o&&(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),o.toggleBold())}static isBoldShortcut(e){return!((typeof navigator<"u"?navigator.userAgent.toLowerCase():"").includes("mac")?e.metaKey:e.ctrlKey)||e.altKey?!1:e.key.toLowerCase()==="b"}static isSelectionInsideBlok(e){const t=e.anchorNode;return t?!!(t.nodeType===Node.ELEMENT_NODE?t:t.parentElement)?.closest(`.${X.CSS.blokWrapper}`):!1}static isEventTargetInsideBlok(e){if(!e||typeof Node>"u")return!1;if(e instanceof Element)return!!e.closest(`.${X.CSS.blokWrapper}`);if(e instanceof Text)return!!e.parentElement?.closest(`.${X.CSS.blokWrapper}`);if(typeof ShadowRoot<"u"&&e instanceof ShadowRoot)return C.isEventTargetInsideBlok(e.host);if(!(e instanceof Node))return!1;const t=e.parentNode;return t?t instanceof Element?!!t.closest(`.${X.CSS.blokWrapper}`):C.isEventTargetInsideBlok(t):!1}getRangeHtmlWithoutBold(e){const t=e.cloneContents();this.removeNestedBold(t);const o=document.createElement("div");return o.appendChild(t),o.innerHTML}static createFragmentFromHtml(e){const t=document.createElement("template");return t.innerHTML=e,t.content}collectBoldAncestors(e){const t=new Set,o=document.createTreeWalker(e.commonAncestorContainer,NodeFilter.SHOW_TEXT,{acceptNode:i=>{try{return e.intersectsNode(i)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}catch{const u=document.createRange();u.selectNodeContents(i);const f=e.compareBoundaryPoints(Range.END_TO_START,u)>0,p=e.compareBoundaryPoints(Range.START_TO_END,u)<0;return f&&p?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}});for(;o.nextNode();){const i=C.findBoldElement(o.currentNode);i&&t.add(i)}return Array.from(t)}};C.isInline=!0,C.title="Bold",C.shortcutListenerRegistered=!1,C.selectionListenerRegistered=!1,C.inputListenerRegistered=!1,C.beforeInputListenerRegistered=!1,C.globalListenersInitialized=C.initializeGlobalListeners(),C.collapsedExitRecords=new Set,C.markerSequence=0,C.isProcessingMutation=!1,C.DATA_ATTR_COLLAPSED_LENGTH="data-blok-bold-collapsed-length",C.DATA_ATTR_COLLAPSED_ACTIVE="data-blok-bold-collapsed-active",C.DATA_ATTR_PREV_LENGTH="data-blok-bold-prev-length",C.DATA_ATTR_LEADING_WHITESPACE="data-blok-bold-leading-ws",C.instances=new Set,C.pendingBoundaryCaretAdjustments=new WeakSet;let Wd=C;const Hs=class Hs{static get sanitize(){return{i:{},em:{}}}render(){return{icon:g1,name:"italic",onActivate:()=>{this.toggleItalic()},isActive:()=>{const e=window.getSelection();return e?this.isSelectionVisuallyItalic(e):!1}}}get shortcut(){return"CMD+I"}toggleItalic(){const e=window.getSelection();if(!e||e.rangeCount===0)return;const t=e.getRangeAt(0);if(t.collapsed){this.toggleCollapsedItalic(t,e);return}this.isRangeItalic(t,{ignoreWhitespace:!0})?this.unwrapItalicTags(t):this.wrapWithItalic(t)}toggleCollapsedItalic(e,t){if(this.isRangeItalic(e,{ignoreWhitespace:!0})){const i=document.createTextNode("");e.insertNode(i),e.selectNode(i),this.unwrapItalicTags(e);const a=document.createRange();a.setStart(i,1),a.setEnd(i,1),t.removeAllRanges(),t.addRange(a)}else{const i=document.createElement("i"),a=document.createTextNode("");i.appendChild(a),e.insertNode(i);const u=document.createRange();u.setStart(a,1),u.setEnd(a,1),t.removeAllRanges(),t.addRange(u)}}isSelectionVisuallyItalic(e){if(!e||e.rangeCount===0)return!1;const t=e.getRangeAt(0);return this.isRangeItalic(t,{ignoreWhitespace:!0})}isRangeItalic(e,t){if(e.collapsed)return!!this.findItalicElement(e.startContainer);const o=document.createTreeWalker(e.commonAncestorContainer,NodeFilter.SHOW_TEXT,{acceptNode:a=>{try{return e.intersectsNode(a)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}catch{const f=document.createRange();f.selectNodeContents(a);const p=e.compareBoundaryPoints(Range.END_TO_START,f)>0,g=e.compareBoundaryPoints(Range.START_TO_END,f)<0;return p&&g?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}}),i=[];for(;o.nextNode();){const a=o.currentNode,u=a.textContent??"";t.ignoreWhitespace&&u.trim().length===0||u.length!==0&&i.push(a)}return i.length===0?!!this.findItalicElement(e.startContainer):i.every(a=>this.hasItalicParent(a))}wrapWithItalic(e){const t=this.getRangeHtmlWithoutItalic(e),o=this.replaceRangeWithHtml(e,`<i>${t}</i>`),i=window.getSelection();i&&o&&(i.removeAllRanges(),i.addRange(o))}unwrapItalicTags(e){const t=this.collectItalicAncestors(e),o=window.getSelection();if(!o)return;const i=document.createElement("span"),a=e.extractContents();i.appendChild(a),this.removeNestedItalic(i),e.insertNode(i);const u=document.createRange();for(u.selectNodeContents(i),o.removeAllRanges(),o.addRange(u);;){const v=this.findItalicElement(i);if(!v)break;this.moveMarkerOutOfItalic(i,v)}const f=i.firstChild,p=i.lastChild;this.unwrapElement(i),(f&&p?(()=>{const v=document.createRange();return v.setStartBefore(f),v.setEndAfter(p),o.removeAllRanges(),o.addRange(v),v})():void 0)||o.removeAllRanges(),t.forEach(v=>{(v.textContent??"").length===0&&v.remove()})}hasItalicParent(e){return e?e.nodeType===Node.ELEMENT_NODE&&this.isItalicTag(e)?!0:this.hasItalicParent(e.parentNode):!1}findItalicElement(e){return e?e.nodeType===Node.ELEMENT_NODE&&this.isItalicTag(e)?e:this.findItalicElement(e.parentNode):null}isItalicTag(e){const t=e.tagName;return t==="I"||t==="EM"}collectItalicAncestors(e){const t=new Set,o=document.createTreeWalker(e.commonAncestorContainer,NodeFilter.SHOW_TEXT,{acceptNode:i=>{try{return e.intersectsNode(i)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}catch{const u=document.createRange();u.selectNodeContents(i);const f=e.compareBoundaryPoints(Range.END_TO_START,u)>0,p=e.compareBoundaryPoints(Range.START_TO_END,u)<0;return f&&p?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}});for(;o.nextNode();){const i=this.findItalicElement(o.currentNode);i&&t.add(i)}return Array.from(t)}getRangeHtmlWithoutItalic(e){const t=e.cloneContents();this.removeNestedItalic(t);const o=document.createElement("div");return o.appendChild(t),o.innerHTML}removeNestedItalic(e){const t=e.querySelectorAll?.("i,em");t&&t.forEach(o=>{this.unwrapElement(o)})}unwrapElement(e){const t=e.parentNode;if(!t){e.remove();return}for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}replaceRangeWithHtml(e,t){const o=this.createFragmentFromHtml(t),i=o.firstChild??null,a=o.lastChild??null;if(e.deleteContents(),!i||!a)return;e.insertNode(o);const u=document.createRange();return u.setStartBefore(i),u.setEndAfter(a),u}createFragmentFromHtml(e){const t=document.createElement("template");return t.innerHTML=e,t.content}moveMarkerOutOfItalic(e,t){const o=t.parentNode;if(!o)return;if(Array.from(t.childNodes).forEach(p=>{p.nodeType===Node.TEXT_NODE&&(p.textContent??"").length===0&&p.remove()}),t.childNodes.length===1&&t.firstChild===e){t.replaceWith(e);return}if(t.firstChild===e){o.insertBefore(e,t);return}if(t.lastChild===e){o.insertBefore(e,t.nextSibling);return}const f=t.cloneNode(!1);for(;e.nextSibling;)f.appendChild(e.nextSibling);o.insertBefore(f,t.nextSibling),o.insertBefore(e,f)}};Hs.isInline=!0,Hs.title="Italic";let Kd=Hs;const LC=(Rr=class{constructor({api:e}){this.BUTTON_CLASSES="flex justify-center items-center border-0 rounded h-full p-0 w-7 bg-transparent cursor-pointer leading-normal text-text-primary can-hover:hover:bg-item-hover-bg mobile:w-icon-mobile mobile:h-icon-mobile [&_svg]:block [&_svg]:w-icon [&_svg]:h-icon mobile:[&_svg]:w-icon-mobile mobile:[&_svg]:h-icon-mobile",this.BUTTON_ACTIVE_CLASSES="bg-icon-active-bg text-icon-active-text",this.INPUT_BASE_CLASSES="hidden w-full m-0 px-2 py-1 text-sm leading-[22px] font-medium bg-item-hover-bg border border-[rgba(226,226,229,0.2)] rounded-md outline-none box-border appearance-none font-[inherit] placeholder:text-gray-text mobile:text-[15px] mobile:font-medium",this.CSS={buttonActive:"is-active",buttonModifier:"is-link",buttonUnlink:"is-unlink",inputShowed:"block"},this.DATA_ATTRIBUTES={buttonActive:"data-blok-link-tool-active",buttonUnlink:"data-blok-link-tool-unlink",inputOpened:"data-blok-link-tool-input-opened"},this.nodes={input:null,button:null},this.inputOpened=!1,this.unlinkAvailable=!1,this.handleButtonClick=t=>{!this.inputOpened||!this.unlinkAvailable||(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),this.restoreSelection(),this.unlink(),this.inlineToolbar.close())},this.toolbar=e.toolbar,this.inlineToolbar=e.inlineToolbar,this.notifier=e.notifier,this.i18n=e.i18n,this.selection=new X,this.nodes.input=this.createInput()}static get sanitize(){return{a:{href:!0,target:"_blank",rel:"nofollow"}}}render(){return{icon:m1,isActive:()=>!!this.selection.findParentTag("A"),children:{hideChevron:!0,items:[{type:tt.Html,element:this.nodes.input}],onOpen:()=>{this.openActions(!0)},onClose:()=>{this.closeActions()}}}}createInput(){const e=document.createElement("input");return e.placeholder=this.i18n.t("Add a link"),e.enterKeyHint="done",e.className=this.INPUT_BASE_CLASSES,e.setAttribute("data-blok-testid","inline-tool-input"),this.setBooleanStateAttribute(e,this.DATA_ATTRIBUTES.inputOpened,!1),e.addEventListener("keydown",t=>{t.key==="Enter"&&this.enterPressed(t)}),e}get shortcut(){return"CMD+K"}openActions(e=!1){if(!this.nodes.input)return;const t=this.selection.findParentTag("A"),o=!!t;if(this.updateButtonStateAttributes(o),this.unlinkAvailable=o,t){const i=t.getAttribute("href");this.nodes.input.value=i!==null?i:""}else this.nodes.input.value="";this.nodes.input.className=we(this.INPUT_BASE_CLASSES,this.CSS.inputShowed),this.setBooleanStateAttribute(this.nodes.input,this.DATA_ATTRIBUTES.inputOpened,!0),this.selection.save(),e&&this.focusInputWithRetry(),this.inputOpened=!0}focusInputWithRetry(){this.nodes.input&&(this.nodes.input.focus(),!(typeof window>"u"||typeof document>"u")&&window.setTimeout(()=>{document.activeElement!==this.nodes.input&&this.nodes.input?.focus()},0))}getButtonElement(){if(this.nodes.button&&document.contains(this.nodes.button))return this.nodes.button;const e=document.querySelector(`${Wv} [data-blok-item-name="link"]`);return e&&e.addEventListener("click",this.handleButtonClick,!0),this.nodes.button=e??null,this.nodes.button}updateButtonStateAttributes(e){const t=this.getButtonElement();if(!t)return;const o=typeof e=="boolean"?e:!!this.selection.findParentTag("A");this.setBooleanStateAttribute(t,this.DATA_ATTRIBUTES.buttonActive,o),this.setBooleanStateAttribute(t,this.DATA_ATTRIBUTES.buttonUnlink,o)}closeActions(e=!0){(this.selection.isFakeBackgroundEnabled||e&&this.selection.savedSelectionRange)&&this.restoreSelection(),this.nodes.input&&(this.nodes.input.className=this.INPUT_BASE_CLASSES,this.setBooleanStateAttribute(this.nodes.input,this.DATA_ATTRIBUTES.inputOpened,!1),this.nodes.input.value="",this.updateButtonStateAttributes(!1),this.unlinkAvailable=!1,e&&this.selection.clearSaved(),this.inputOpened=!1)}restoreSelection(){const e=new X,t=X.isAtBlok;if(t&&e.save(),this.selection.removeFakeBackground(),this.selection.restore(),!t&&this.selection.savedSelectionRange){const a=this.selection.savedSelectionRange.commonAncestorContainer;(a.nodeType===Node.ELEMENT_NODE?a:a.parentElement)?.focus()}if(!t)return;e.restore();const o=e.savedSelectionRange;if(o){const i=o.commonAncestorContainer;(i.nodeType===Node.ELEMENT_NODE?i:i.parentElement)?.focus()}}enterPressed(e){if(!this.nodes.input)return;const t=this.nodes.input.value||"";if(!t.trim()){this.selection.restore(),this.unlink(),e.preventDefault(),this.closeActions(),this.inlineToolbar.close();return}if(!this.validateURL(t)){this.notifier.show({message:"Pasted link is not valid.",style:"error"}),Ee("Incorrect Link pasted","warn",t);return}const o=this.prepareLink(t);this.selection.removeFakeBackground(),this.selection.restore(),this.insertLink(o),e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),this.selection.collapseToEnd(),this.inlineToolbar.close()}validateURL(e){return!/\s/.test(e)}prepareLink(e){return this.addProtocol(e.trim())}addProtocol(e){if(/^(\w+):(\/\/)?/.test(e))return e;const t=/^\/[^/\s]/.test(e),o=e.substring(0,1)==="#",i=/^\/\/[^/\s]/.test(e);return!t&&!o&&!i?"http://"+e:e}insertLink(e){const t=this.selection.findParentTag("A");if(t){this.selection.expandToTag(t),t.href=e,t.target="_blank",t.rel="nofollow";return}const o=X.range;if(!o)return;const i=document.createElement("a");i.href=e,i.target="_blank",i.rel="nofollow",i.appendChild(o.extractContents()),o.insertNode(i),this.selection.expandToTag(i)}unlink(){const e=this.selection.findParentTag("A");e&&(this.unwrap(e),this.updateButtonStateAttributes(!1),this.unlinkAvailable=!1)}unwrap(e){const t=document.createDocumentFragment();for(;e.firstChild;)t.appendChild(e.firstChild);e.parentNode?.replaceChild(t,e)}setBooleanStateAttribute(e,t,o){e&&e.setAttribute(t,o?"true":"false")}},Rr.isInline=!0,Rr.title="Link",Rr),Zd=class Zd{constructor({api:e}){this.i18nAPI=e.i18n,this.blocksAPI=e.blocks,this.selectionAPI=e.selection,this.toolsAPI=e.tools,this.caretAPI=e.caret}async render(){const e=X.get();if(e===null)return[];const t=this.blocksAPI.getBlockByElement(e.anchorNode);if(t===void 0)return[];const o=this.toolsAPI.getBlockTools(),i=await Mv(t,o);if(i.length===0)return[];const a=i.reduce((g,v)=>(v.toolbox?.forEach(y=>{y.title!==void 0&&g.push({icon:y.icon,title:Ke.t(it.toolNames,y.title),name:v.name,closeOnActivate:!0,onActivate:async()=>{const w=await this.blocksAPI.convert(t.id,v.name,y.data);this.caretAPI.setToBlock(w,"end")}})}),g),[]),f=(await t.getActiveToolboxEntry())?.title??t.name,p=!Kn();return{name:"convert-to",title:Ke.t(it.toolNames,f),hint:{title:Ke.ui(it.ui.inlineToolbar.converter,"Convert to")},children:{searchable:p,items:a,onOpen:()=>{p&&(this.selectionAPI.setFakeBackground(),this.selectionAPI.save())},onClose:()=>{p&&(this.selectionAPI.restore(),this.selectionAPI.removeFakeBackground())}}}}};Zd.isInline=!0;let Vd=Zd;const Or=class Or{constructor({data:e,api:t}){this.CSS={wrapper:"blok-stub flex items-center py-3 px-[18px] my-2.5 rounded-[10px] bg-bg-light border border-line-gray text-gray-text text-sm [&_svg]:size-icon",info:"blok-stub__info ml-3.5",title:"blok-stub__title font-medium capitalize",subtitle:"blok-stub__subtitle"},this.api=t,this.title=e.title||this.api.i18n.t("Error"),this.subtitle=this.api.i18n.t("The block can not be displayed correctly."),this.savedData=e.savedData,this.wrapper=this.make()}render(){return this.wrapper}save(){return this.savedData}make(){const e=R.make("div",this.CSS.wrapper),t=N1,o=R.make("div",this.CSS.info),i=R.make("div",this.CSS.title,{textContent:this.title}),a=R.make("div",this.CSS.subtitle,{textContent:this.subtitle});return e.setAttribute(Or.DATA_ATTR.wrapper,""),i.setAttribute(Or.DATA_ATTR.title,""),a.setAttribute(Or.DATA_ATTR.subtitle,""),e.innerHTML=t,o.appendChild(i),o.appendChild(a),e.appendChild(o),e}};Or.isReadOnlySupported=!0,Or.DATA_ATTR={wrapper:"data-blok-stub",title:"data-blok-stub-title",subtitle:"data-blok-stub-subtitle"};let $d=Or;class DC extends bd{constructor(){super(...arguments),this.type=Cr.Inline}getMissingMethods(e){const o=this.constructable?.prototype;return o?e.filter(i=>typeof o[i]!="function"):[...e]}create(){const e=this.constructable;return new e({api:this.api,config:this.settings})}get isReadOnlySupported(){return this.constructable?.isReadOnlySupported??!1}get title(){return this.constructable.title||""}}class MC extends bd{constructor(){super(...arguments),this.type=Cr.Tune}create(e,t){const o=this.constructable;return new o({api:this.api,config:this.settings,block:t,data:e})}}class Tt extends Map{get blockTools(){const e=Array.from(this.entries()).filter(([,t])=>t.isBlock());return new Tt(e)}get inlineTools(){const e=Array.from(this.entries()).filter(([,t])=>t.isInline());return new Tt(e)}get blockTunes(){const e=Array.from(this.entries()).filter(([,t])=>t.isTune());return new Tt(e)}get internalTools(){const e=Array.from(this.entries()).filter(([,t])=>t.isInternal);return new Tt(e)}get externalTools(){const e=Array.from(this.entries()).filter(([,t])=>!t.isInternal);return new Tt(e)}}class FC extends bd{constructor(){super(...arguments),this.type=Cr.Block,this.inlineTools=new Tt,this.tunes=new Tt}create(e,t,o){return new this.constructable({data:e,block:t,readOnly:o,api:this.api,config:this.settings})}get isReadOnlySupported(){return this.constructable[to.IsReadOnlySupported]===!0}get isLineBreaksEnabled(){return this.constructable[to.IsEnabledLineBreaks]??!1}get toolbox(){const e=this.constructable[to.Toolbox],t=this.config[ks.Toolbox];if(!(!e||ot(e))&&t!==!1)return t==null?Array.isArray(e)?e:[e]:!Array.isArray(t)&&Array.isArray(e)?[t]:Array.isArray(t)?Array.isArray(e)?t.map((o,i)=>{const a=e[i];return a?{...a,...o}:o}):t:[{...e,...t}]}get conversionConfig(){return this.constructable[to.ConversionConfig]}get enabledInlineTools(){return this.config[ks.EnabledInlineTools]||!1}get enabledBlockTunes(){return this.config[ks.EnabledBlockTunes]}get pasteConfig(){return this.constructable[to.PasteConfig]??{}}get hasOnPasteHandler(){return typeof this.constructable?.prototype?.onPaste=="function"}get sanitizeConfig(){if(this._sanitizeConfig)return this._sanitizeConfig;const e=super.sanitizeConfig,t=this.baseSanitizeConfig;if(ot(e))return this._sanitizeConfig=t,t;const o={};for(const i in e){if(!Object.prototype.hasOwnProperty.call(e,i))continue;const a=e[i];je(a)?o[i]=Object.assign({},t,a):o[i]=a}return this._sanitizeConfig=o,o}get baseSanitizeConfig(){if(this._baseSanitizeConfig)return this._baseSanitizeConfig;const e={};return Array.from(this.inlineTools.values()).forEach(t=>Object.assign(e,t.sanitizeConfig)),Array.from(this.tunes.values()).forEach(t=>Object.assign(e,t.sanitizeConfig)),this._baseSanitizeConfig=e,e}}class zC{constructor(e,t,o){this.api=o,this.config=e,this.blokConfig=t}get(e){const{class:t,isInternal:o=!1,...i}=this.config[e],a=t;if(a===void 0)throw new Error(`Tool "${e}" does not provide a class.`);const u=this.getConstructor(a),f=!!Reflect.get(a,yd.IsTune);return new u({name:e,constructable:a,config:i,api:this.api.getMethodsForTool(e,f),isDefault:e===this.blokConfig.defaultBlock,defaultPlaceholder:this.blokConfig.placeholder,isInternal:o})}getConstructor(e){switch(!0){case!!Reflect.get(e,dy.IsInline):return DC;case!!Reflect.get(e,yd.IsTune):return MC;default:return FC}}}const Jd=class Jd{constructor({api:e}){this.api=e}render(){return{icon:h1,title:this.api.i18n.t("Delete"),name:"delete",confirmation:{title:this.api.i18n.t("Click to delete"),onActivate:()=>this.handleClick()}}}handleClick(){this.api.blocks.delete()}};Jd.isTune=!0;let Gd=Jd;const Ir=l=>{if(!Oe(l))throw new Error("Tool constructable must be a function");return l};class HC extends Be{constructor(){super(...arguments),this.stubTool="stub",this.factory=null,this.toolsAvailable=new Tt,this.toolsUnavailable=new Tt,this.inlineToolsSanitizeConfigCache=null}get available(){return this.toolsAvailable}get unavailable(){return this.toolsUnavailable}get inlineTools(){return this.available.inlineTools}get blockTools(){return this.available.blockTools}get blockTunes(){return this.available.blockTunes}get defaultTool(){const e=this.config.defaultBlock;if(!e)throw new Error("Default block tool name is not configured");const t=this.blockTools.get(e);if(!t)throw new Error(`Default block tool "${e}" not found in available block tools`);return t}get internal(){return this.available.internalTools}async prepare(){const e=this.config.tools??{};this.config.tools=zo({},this.internalTools,e),this.validateTools();const t=this.config.tools;if(!t||Object.keys(t).length===0)throw Error("Can't start without tools");const o=this.prepareConfig(t);this.factory=new zC(o,this.config,this.Blok.API);const i=this.getListOfPrepareFunctions(o);if(i.length===0)return Promise.resolve();const a=p=>{this.isToolPrepareData(p)&&this.toolPrepareMethodSuccess({toolName:p.toolName})},u=p=>{this.isToolPrepareData(p)&&this.toolPrepareMethodFallback({toolName:p.toolName})},f=new Uy;i.forEach(p=>{f.add(async()=>{const g=hS(p.data)?{}:p.data;try{await p.function(p.data),a(g)}catch{u(g)}})}),await f.completed,this.prepareBlockTools()}getAllInlineToolsSanitizeConfig(){if(this.inlineToolsSanitizeConfigCache)return this.inlineToolsSanitizeConfigCache;const e={};return Array.from(this.inlineTools.values()).forEach(t=>{Object.assign(e,t.sanitizeConfig)}),this.inlineToolsSanitizeConfigCache=e,e}destroy(){for(const e of this.available.values()){const t=(()=>{try{return e.reset()}catch(o){Ee(`Tool "${e.name}" reset failed`,"warn",o);return}})();t instanceof Promise&&t.catch(o=>{Ee(`Tool "${e.name}" reset failed`,"warn",o)})}}get internalTools(){return{convertTo:{class:Ir(Vd),isInternal:!0},link:{class:Ir(LC),isInternal:!0},bold:{class:Ir(Wd),isInternal:!0},italic:{class:Ir(Kd),isInternal:!0},paragraph:{class:Ir(Ud),inlineToolbar:!0,config:{preserveBlank:!0},isInternal:!0},stub:{class:Ir($d),isInternal:!0},delete:{class:Ir(Gd),isInternal:!0}}}toolPrepareMethodSuccess(e){const t=this.getFactory().get(e.toolName);if(!t.isInline()){this.toolsAvailable.set(t.name,t);return}const o=["render"],i=t.getMissingMethods(o);if(i.length){Ee(`Incorrect Inline Tool: ${t.name}. Some of required methods is not implemented %o`,"warn",i),this.toolsUnavailable.set(t.name,t);return}this.toolsAvailable.set(t.name,t)}toolPrepareMethodFallback(e){const t=this.getFactory();this.toolsUnavailable.set(e.toolName,t.get(e.toolName))}getListOfPrepareFunctions(e){return Object.entries(e).map(([t,o])=>{const i={toolName:t,config:o.config??{}};return{function:async u=>{const f=o.class;if(!f||!Oe(f.prepare))return;const p=u??i;return f.prepare.call(f,p)},data:i}})}prepareBlockTools(){Array.from(this.blockTools.values()).forEach(e=>{this.assignInlineToolsToBlockTool(e),this.assignBlockTunesToBlockTool(e)})}assignInlineToolsToBlockTool(e){const t=e;if(this.config.inlineToolbar!==!1){if(t.enabledInlineTools===!0){const o=Array.isArray(this.config.inlineToolbar)?this.createInlineToolsCollection(this.config.inlineToolbar):new Tt(Array.from(this.inlineTools.entries()));t.inlineTools=o;return}if(Array.isArray(t.enabledInlineTools)){const o=this.createInlineToolsCollection(["convertTo",...t.enabledInlineTools]);t.inlineTools=o}}}assignBlockTunesToBlockTool(e){const t=e;if(t.enabledBlockTunes!==!1){if(Array.isArray(t.enabledBlockTunes)){const o=this.createBlockTunesCollection(t.enabledBlockTunes),i=[...Array.from(o.entries()),...Array.from(this.blockTunes.internalTools.entries())];t.tunes=new Tt(i);return}if(Array.isArray(this.config.tunes)){const o=this.createBlockTunesCollection(this.config.tunes),i=[...Array.from(o.entries()),...Array.from(this.blockTunes.internalTools.entries())];t.tunes=new Tt(i);return}t.tunes=new Tt(Array.from(this.blockTunes.internalTools.entries()))}}validateTools(){const e=this.config.tools;if(!e)return;const t=this.internalTools;for(const o in e){if(!Object.prototype.hasOwnProperty.call(e,o)||o in t)continue;const i=e[o],a=Oe(i),f=Oe(i.class);if(!a&&!f)throw new Ho(`Tool «${o}» must be a constructor function or an object with function in the «class» property`)}}prepareConfig(e){const t={};for(const o in e){if(!Object.prototype.hasOwnProperty.call(e,o))continue;const i=e[o];if(je(i)){t[o]=i;continue}t[o]={class:i}}return t}isToolPrepareData(e){return typeof e?.toolName=="string"}getFactory(){if(this.factory===null)throw new Error("Tools factory is not initialized");return this.factory}createInlineToolsCollection(e){const t=[];for(const o of e){const i=this.inlineTools.get(o);if(!i){Ee(`Inline tool "${o}" is not available and will be skipped`,"warn");continue}t.push([o,i])}return new Tt(t)}createBlockTunesCollection(e){const t=[];for(const o of e){const i=this.blockTunes.get(o);if(!i){Ee(`Block tune "${o}" is not available and will be skipped`,"warn");continue}t.push([o,i])}return new Tt(t)}}const jC=`*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:PT Mono,Menlo,Monaco,Consolas,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.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;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([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}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.\\!container{width:100%!important}.container{width:100%}@media(min-width:640px){.\\!container{max-width:640px!important}.container{max-width:640px}}@media(min-width:651px){.\\!container{max-width:651px!important}.container{max-width:651px}}@media(min-width:768px){.\\!container{max-width:768px!important}.container{max-width:768px}}@media(min-width:1024px){.\\!container{max-width:1024px!important}.container{max-width:1024px}}@media(min-width:1280px){.\\!container{max-width:1280px!important}.container{max-width:1280px}}@media(min-width:1536px){.\\!container{max-width:1536px!important}.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.inset-\\[auto_var\\(--offset\\)_calc\\(var\\(--offset\\)\\+env\\(safe-area-inset-bottom\\)\\)_var\\(--offset\\)\\]{inset:auto var(--offset) calc(var(--offset) + env(safe-area-inset-bottom)) var(--offset)}.bottom-0{bottom:0}.bottom-5{bottom:1.25rem}.left-0{left:0}.left-5{left:1.25rem}.left-\\[var\\(--popover-left\\)\\]{left:var(--popover-left)}.right-0{right:0}.right-\\[15px\\]{right:15px}.right-full{right:100%}.top-0{top:0}.top-\\[7px\\]{top:7px}.top-\\[var\\(--popover-top\\)\\]{top:var(--popover-top)}.z-0{z-index:0}.z-\\[1\\]{z-index:1}.z-\\[2\\]{z-index:2}.z-\\[3\\]{z-index:3}.z-\\[4\\]{z-index:4}.z-overlay{z-index:999}.m-0{margin:0}.mx-auto{margin-left:auto;margin-right:auto}.my-2\\.5{margin-top:.625rem;margin-bottom:.625rem}.my-4{margin-top:1rem;margin-bottom:1rem}.\\!mb-0{margin-bottom:0!important}.\\!mr-0{margin-right:0!important}.\\!mr-2{margin-right:.5rem!important}.mb-1\\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-\\[30px\\]{margin-bottom:30px}.mb-px{margin-bottom:1px}.ml-3\\.5{margin-left:.875rem}.ml-auto{margin-left:auto}.mr-2{margin-right:.5rem}.mr-auto{margin-right:auto}.mt-1{margin-top:.25rem}.mt-\\[15px\\]{margin-top:15px}.mt-\\[3px\\]{margin-top:3px}.mt-\\[5px\\]{margin-top:5px}.box-border{box-sizing:border-box}.\\!block{display:block!important}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.\\!hidden{display:none!important}.hidden{display:none}.h-2\\.5{height:.625rem}.h-9{height:2.25rem}.h-\\[26px\\]{height:26px}.h-\\[50px\\]{height:50px}.h-auto{height:auto}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-px{height:1px}.h-toolbox-btn{height:26px}.max-h-0{max-height:0px}.max-h-\\[var\\(--max-height\\)\\]{max-height:var(--max-height)}.min-h-toolbox-btn{min-height:26px}.w-2\\.5{width:.625rem}.w-7{width:1.75rem}.w-9{width:2.25rem}.w-\\[230px\\]{width:230px}.w-\\[26px\\]{width:26px}.w-\\[44px\\]{width:44px}.w-\\[var\\(--width\\)\\]{width:var(--width)}.w-auto{width:auto}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-px{width:1px}.w-toolbox-btn{width:26px}.min-w-\\[calc\\(100\\%-theme\\(\\'spacing\\.6\\'\\)-10px\\)\\]{min-width:calc(100% - 1.5rem - 10px)}.min-w-\\[calc\\(100\\%-var\\(--offset\\)\\*2\\)\\]{min-width:calc(100% - var(--offset) * 2)}.min-w-\\[var\\(--width\\)\\]{min-width:var(--width)}.min-w-max{min-width:-moz-max-content;min-width:max-content}.min-w-toolbox-btn{min-width:26px}.max-w-\\[1100px\\]{max-width:1100px}.max-w-\\[130px\\]{max-width:130px}.max-w-content{max-width:650px}.max-w-none{max-width:none}.shrink-0{flex-shrink:0}.-translate-x-\\[5px\\]{--tw-translate-x: -5px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-\\[5px\\]{--tw-translate-y: -5px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\\[5px\\]{--tw-translate-x: 5px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\\[5px\\]{--tw-translate-y: 5px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-none{transform:none}@keyframes panelShowingMobile{0%{opacity:0;transform:translateY(14px) scale(.98)}70%{opacity:1;transform:translateY(-4px)}to{transform:translateY(0)}}.animate-\\[panelShowingMobile_250ms_ease\\]{animation:panelShowingMobile .25s ease}@keyframes panelShowing{0%{opacity:0;transform:translateY(-8px) scale(.9)}70%{opacity:1;transform:translateY(2px)}to{transform:translateY(0)}}.animate-\\[panelShowing_100ms_ease\\]{animation:panelShowing .1s ease}@keyframes buttonClicked{0%{transform:scale3d(.95,.95,.95)}60%{transform:scale3d(1.02,1.02,1.02)}80%,to{transform:scaleZ(1)}}.animate-button-clicked{animation:buttonClicked .75s cubic-bezier(.215,.61,.355,1) forwards}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.animate-fade-in{animation:fade-in .3s ease forwards}.animate-none{animation:none}@keyframes notifyBounceIn{0%{opacity:0;transform:scale(.3)}50%{opacity:1;transform:scale(1.05)}70%{transform:scale(.9)}to{transform:scale(1)}}.animate-notify-bounce-in{animation:notifyBounceIn .6s 1}@keyframes wobble{0%{transform:translateZ(0)}15%{transform:translate3d(-9%,0,0)}30%{transform:translate3d(9%,0,0)}45%{transform:translate3d(-4%,0,0)}60%{transform:translate3d(4%,0,0)}75%{transform:translate3d(-1%,0,0)}to{transform:translateZ(0)}}.animate-wobble{animation:wobble .4s}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.resize{resize:both}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-\\[auto_auto_1fr\\]{grid-template-columns:auto auto 1fr}.grid-rows-\\[auto\\]{grid-template-rows:auto}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.items-center{align-items:center}.justify-center{justify-content:center}.gap-2{gap:.5rem}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-\\[10px\\]{border-radius:10px}.rounded-\\[20px\\]{border-radius:20px}.rounded-\\[3px\\]{border-radius:3px}.rounded-\\[5px\\]{border-radius:5px}.rounded-\\[7px\\]{border-radius:7px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.border{border-width:1px}.border-0{border-width:0px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-none{border-style:none}.border-\\[\\#e8e8eb\\]{--tw-border-opacity: 1;border-color:rgb(232 232 235 / var(--tw-border-opacity, 1))}.border-\\[rgba\\(226\\,226\\,229\\,0\\.2\\)\\],.border-\\[rgba\\(226\\,226\\,229\\,0\\.20\\)\\]{border-color:#e2e2e533}.border-line-gray,.border-popover-border{--tw-border-opacity: 1;border-color:rgb(239 240 241 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.\\!bg-\\[\\#fafffe\\]{--tw-bg-opacity: 1 !important;background-color:rgb(250 255 254 / var(--tw-bg-opacity, 1))!important}.\\!bg-\\[\\#fffbfb\\]{--tw-bg-opacity: 1 !important;background-color:rgb(255 251 251 / var(--tw-bg-opacity, 1))!important}.\\!bg-item-confirm-bg{--tw-bg-opacity: 1 !important;background-color:rgb(226 74 74 / var(--tw-bg-opacity, 1))!important}.\\!bg-item-focus-bg{background-color:#22baff14!important}.bg-\\[\\#34c992\\]{--tw-bg-opacity: 1;background-color:rgb(52 201 146 / var(--tw-bg-opacity, 1))}.bg-\\[\\#7b8799\\]{--tw-bg-opacity: 1;background-color:rgb(123 135 153 / var(--tw-bg-opacity, 1))}.bg-\\[\\#F8F8F8\\]{--tw-bg-opacity: 1;background-color:rgb(248 248 248 / var(--tw-bg-opacity, 1))}.bg-\\[\\#eff1f4\\]{--tw-bg-opacity: 1;background-color:rgb(239 241 244 / var(--tw-bg-opacity, 1))}.bg-\\[\\#f2f5f7\\]{--tw-bg-opacity: 1;background-color:rgb(242 245 247 / var(--tw-bg-opacity, 1))}.bg-\\[\\#f7f7f7\\]{--tw-bg-opacity: 1;background-color:rgb(247 247 247 / var(--tw-bg-opacity, 1))}.bg-bg-light{--tw-bg-opacity: 1;background-color:rgb(239 242 245 / var(--tw-bg-opacity, 1))}.bg-dark{--tw-bg-opacity: 1;background-color:rgb(29 32 43 / var(--tw-bg-opacity, 1))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-icon-active-bg{background-color:#388ae51a}.bg-item-confirm-hover-bg{--tw-bg-opacity: 1;background-color:rgb(206 67 67 / var(--tw-bg-opacity, 1))}.bg-item-focus-bg{background-color:#22baff14}.bg-item-hover-bg{--tw-bg-opacity: 1;background-color:rgb(248 248 248 / var(--tw-bg-opacity, 1))}.bg-popover-bg{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-popover-border{--tw-bg-opacity: 1;background-color:rgb(239 240 241 / var(--tw-bg-opacity, 1))}.bg-selection{--tw-bg-opacity: 1;background-color:rgb(225 242 255 / var(--tw-bg-opacity, 1))}.bg-selection-highlight{background-color:#2eaadc33}.bg-tooltip-bg{--tw-bg-opacity: 1;background-color:rgb(29 32 43 / var(--tw-bg-opacity, 1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.p-0{padding:0}.p-0\\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\\.5{padding:.375rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-\\[13px\\]{padding:13px}.p-\\[2px\\]{padding:2px}.p-\\[3px\\]{padding:3px}.p-\\[5px\\]{padding:5px}.p-\\[var\\(--item-padding\\)\\]{padding:var(--item-padding)}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-\\[18px\\]{padding-left:18px;padding-right:18px}.px-\\[30px\\]{padding-left:30px;padding-right:30px}.px-\\[3px\\]{padding-left:3px;padding-right:3px}.py-0{padding-top:0;padding-bottom:0}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-\\[0\\.6em\\]{padding-top:.6em;padding-bottom:.6em}.py-\\[13px\\]{padding-top:13px;padding-bottom:13px}.py-\\[3px\\]{padding-top:3px;padding-bottom:3px}.py-\\[5px\\]{padding-top:5px;padding-bottom:5px}.py-\\[theme\\(spacing\\.block-padding-vertical\\)\\]{padding-top:.4em;padding-bottom:.4em}.pb-\\[3px\\]{padding-bottom:3px}.pr-1\\.5{padding-right:.375rem}.pr-\\[5px\\]{padding-right:5px}.text-center{text-align:center}.text-start{text-align:start}.align-bottom{vertical-align:bottom}.font-\\[-apple-system\\,BlinkMacSystemFont\\,\\"Segoe_UI\\"\\,\\"Roboto\\"\\,\\"Oxygen\\"\\,\\"Ubuntu\\"\\,\\"Cantarell\\"\\,\\"Fira_Sans\\"\\,\\"Droid_Sans\\"\\,\\"Helvetica_Neue\\"\\,sans-serif\\]{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}.font-\\[inherit\\]{font-family:inherit}.font-sans{font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.text-\\[1\\.25em\\]{font-size:1.25em}.text-\\[1\\.5em\\]{font-size:1.5em}.text-\\[1\\.75em\\]{font-size:1.75em}.text-\\[13px\\]{font-size:13px}.text-\\[14\\.9px\\]{font-size:14.9px}.text-\\[2\\.5em\\]{font-size:2.5em}.text-\\[2em\\]{font-size:2em}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-5{line-height:1.25rem}.leading-\\[1\\.25em\\]{line-height:1.25em}.leading-\\[1\\.4em\\]{line-height:1.4em}.leading-\\[1\\.6em\\]{line-height:1.6em}.leading-\\[1em\\]{line-height:1em}.leading-\\[22px\\]{line-height:22px}.leading-\\[50px\\]{line-height:50px}.leading-normal{line-height:1.5}.leading-relaxed{line-height:1.625}.tracking-\\[-0\\.1em\\]{letter-spacing:-.1em}.tracking-\\[0\\.02em\\]{letter-spacing:.02em}.\\!text-white{--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity, 1))!important}.text-\\[\\#656b7c\\]{--tw-text-opacity: 1;color:rgb(101 107 124 / var(--tw-text-opacity, 1))}.text-active-icon{--tw-text-opacity: 1;color:rgb(56 138 229 / var(--tw-text-opacity, 1))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-dark{--tw-text-opacity: 1;color:rgb(29 32 43 / var(--tw-text-opacity, 1))}.text-gray-text{--tw-text-opacity: 1;color:rgb(112 118 132 / var(--tw-text-opacity, 1))}.text-icon-active-text{--tw-text-opacity: 1;color:rgb(56 138 229 / var(--tw-text-opacity, 1))}.text-inherit{color:inherit}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-text-primary{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-text-secondary{--tw-text-opacity: 1;color:rgb(112 118 132 / var(--tw-text-opacity, 1))}.text-tooltip-font{--tw-text-opacity: 1;color:rgb(205 209 224 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.no-underline{text-decoration-line:none}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-55{opacity:.55}.opacity-60{opacity:.6}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_11px_17px_0_rgba\\(23\\,32\\,61\\,0\\.13\\)\\]{--tw-shadow: 0 11px 17px 0 rgba(23,32,61,.13);--tw-shadow-colored: 0 11px 17px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_1px_1px_0_rgba\\(18\\,49\\,35\\,0\\.05\\)\\]{--tw-shadow: 0 1px 1px 0 rgba(18,49,35,.05);--tw-shadow-colored: 0 1px 1px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_2px_1px_0_rgba\\(16\\,19\\,29\\,0\\)\\]{--tw-shadow: 0 2px 1px 0 rgba(16,19,29,0);--tw-shadow-colored: 0 2px 1px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_3px_15px_-3px_theme\\(colors\\.popover-shadow\\)\\]{--tw-shadow: 0 3px 15px -3px rgba(13, 20, 33, .1);--tw-shadow-colored: 0 3px 15px -3px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-button-base{--tw-shadow: 0 2px 2px 0 rgba(18, 30, 57, .04);--tw-shadow-colored: 0 2px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-button-focused{--tw-shadow: inset 0 0 0 1px rgba(7, 161, 227, .08);--tw-shadow-colored: inset 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-input{--tw-shadow: inset 0 1px 2px 0 rgba(35, 44, 72, .06);--tw-shadow-colored: inset 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-tooltip{--tw-shadow: 0 8px 12px 0 rgba(29, 32, 43, .17), 0 4px 5px -3px rgba(5, 6, 12, .49);--tw-shadow-colored: 0 8px 12px 0 var(--tw-shadow-color), 0 4px 5px -3px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[opacity\\,transform\\]{transition-property:opacity,transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-150{transition-duration:.15s}.duration-\\[120ms\\]{transition-duration:.12s}.duration-\\[250ms\\]{transition-duration:.25s}.duration-\\[50ms\\,70ms\\]{transition-duration:50ms,70ms}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-linear{transition-timing-function:linear}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.will-change-\\[opacity\\,left\\,top\\]{will-change:opacity,left,top}.will-change-\\[opacity\\,top\\,left\\]{will-change:opacity,top,left}.will-change-\\[opacity\\,top\\]{will-change:opacity,top}.will-change-\\[opacity\\]{will-change:opacity}.\\[direction\\:rtl\\]{direction:rtl}.placeholder\\:font-medium::-moz-placeholder{font-weight:500}.placeholder\\:font-medium::placeholder{font-weight:500}.placeholder\\:text-\\[\\#656b7c\\]::-moz-placeholder{--tw-text-opacity: 1;color:rgb(101 107 124 / var(--tw-text-opacity, 1))}.placeholder\\:text-\\[\\#656b7c\\]::placeholder{--tw-text-opacity: 1;color:rgb(101 107 124 / var(--tw-text-opacity, 1))}.placeholder\\:text-gray-text::-moz-placeholder{--tw-text-opacity: 1;color:rgb(112 118 132 / var(--tw-text-opacity, 1))}.placeholder\\:text-gray-text::placeholder{--tw-text-opacity: 1;color:rgb(112 118 132 / var(--tw-text-opacity, 1))}.before\\:absolute:before{content:var(--tw-content);position:absolute}.before\\:inset-0:before{content:var(--tw-content);inset:0}.before\\:left-0:before{content:var(--tw-content);left:0}.before\\:left-1\\/2:before{content:var(--tw-content);left:50%}.before\\:left-\\[9px\\]:before{content:var(--tw-content);left:9px}.before\\:top-0:before{content:var(--tw-content);top:0}.before\\:top-1\\/2:before{content:var(--tw-content);top:50%}.before\\:top-\\[5px\\]:before{content:var(--tw-content);top:5px}.before\\:-z-10:before{content:var(--tw-content);z-index:-10}.before\\:m-\\[3px\\]:before{content:var(--tw-content);margin:3px}.before\\:-ml-\\[11px\\]:before{content:var(--tw-content);margin-left:-11px}.before\\:-mt-\\[11px\\]:before{content:var(--tw-content);margin-top:-11px}.before\\:block:before{content:var(--tw-content);display:block}.before\\:h-3:before{content:var(--tw-content);height:.75rem}.before\\:h-\\[18px\\]:before{content:var(--tw-content);height:18px}.before\\:h-\\[calc\\(100\\%-6px\\)\\]:before{content:var(--tw-content);height:calc(100% - 6px)}.before\\:w-0\\.5:before{content:var(--tw-content);width:.125rem}.before\\:w-\\[18px\\]:before{content:var(--tw-content);width:18px}.before\\:w-\\[3px\\]:before{content:var(--tw-content);width:3px}.before\\:rotate-\\[-45deg\\]:before{content:var(--tw-content);--tw-rotate: -45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes rotation{0%{content:var(--tw-content);transform:rotate(0)}to{content:var(--tw-content);transform:rotate(360deg)}}.before\\:animate-rotation:before{content:var(--tw-content);animation:rotation 1.2s infinite linear}.before\\:rounded-\\[5px\\]:before{content:var(--tw-content);border-radius:5px}.before\\:rounded-full:before{content:var(--tw-content);border-radius:9999px}.before\\:rounded-lg:before{content:var(--tw-content);border-radius:.5rem}.before\\:border-2:before{content:var(--tw-content);border-width:2px}.before\\:border-line-gray:before{content:var(--tw-content);--tw-border-opacity: 1;border-color:rgb(239 240 241 / var(--tw-border-opacity, 1))}.before\\:border-l-active-icon:before{content:var(--tw-content);--tw-border-opacity: 1;border-left-color:rgb(56 138 229 / var(--tw-border-opacity, 1))}.before\\:\\!bg-\\[\\#41ffb1\\]:before{content:var(--tw-content);--tw-bg-opacity: 1 !important;background-color:rgb(65 255 177 / var(--tw-bg-opacity, 1))!important}.before\\:\\!bg-\\[\\#fb5d5d\\]:before{content:var(--tw-content);--tw-bg-opacity: 1 !important;background-color:rgb(251 93 93 / var(--tw-bg-opacity, 1))!important}.before\\:bg-\\[\\#575d67\\]:before{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(87 93 103 / var(--tw-bg-opacity, 1))}.before\\:bg-tooltip-bg:before{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(29 32 43 / var(--tw-bg-opacity, 1))}.before\\:bg-transparent:before{content:var(--tw-content);background-color:transparent}.before\\:content-\\[\\"\\"\\]:before{--tw-content: "";content:var(--tw-content)}.before\\:content-\\[\\\\\\'\\\\\\'\\]:before{--tw-content: \\'\\';content:var(--tw-content)}.after\\:absolute:after{content:var(--tw-content);position:absolute}.after\\:left-\\[9px\\]:after{content:var(--tw-content);left:9px}.after\\:top-\\[5px\\]:after{content:var(--tw-content);top:5px}.after\\:mx-3:after{content:var(--tw-content);margin-left:.75rem;margin-right:.75rem}.after\\:h-3:after{content:var(--tw-content);height:.75rem}.after\\:w-0\\.5:after{content:var(--tw-content);width:.125rem}.after\\:rotate-45:after{content:var(--tw-content);--tw-rotate: 45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.after\\:bg-\\[\\#575d67\\]:after{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(87 93 103 / var(--tw-bg-opacity, 1))}.after\\:text-\\[\\#ddd\\]:after{content:var(--tw-content);--tw-text-opacity: 1;color:rgb(221 221 221 / var(--tw-text-opacity, 1))}.after\\:content-\\[\\"\\"\\]:after{--tw-content: "";content:var(--tw-content)}.after\\:content-\\[\\'\\|\\'\\]:after{--tw-content: "|";content:var(--tw-content)}.first\\:mt-0:first-child{margin-top:0}.last\\:ml-2\\.5:last-child{margin-left:.625rem}.empty\\:before\\:pointer-events-none:empty:before{content:var(--tw-content);pointer-events:none}.empty\\:before\\:cursor-text:empty:before{content:var(--tw-content);cursor:text}.empty\\:before\\:text-gray-text:empty:before{content:var(--tw-content);--tw-text-opacity: 1;color:rgb(112 118 132 / var(--tw-text-opacity, 1))}.empty\\:before\\:content-\\[attr\\(data-blok-placeholder\\)\\]:empty:before{--tw-content: attr(data-blok-placeholder);content:var(--tw-content)}.empty\\:before\\:content-\\[attr\\(data-placeholder-active\\)\\]:empty:before{--tw-content: attr(data-placeholder-active);content:var(--tw-content)}.hover\\:bg-\\[\\#2db583\\]:hover{--tw-bg-opacity: 1;background-color:rgb(45 181 131 / var(--tw-bg-opacity, 1))}.hover\\:bg-\\[\\#e0e4eb\\]:hover{--tw-bg-opacity: 1;background-color:rgb(224 228 235 / var(--tw-bg-opacity, 1))}.hover\\:bg-\\[\\#e9ecee\\]:hover{--tw-bg-opacity: 1;background-color:rgb(233 236 238 / var(--tw-bg-opacity, 1))}.hover\\:bg-\\[\\#fbfcfe\\]:hover{--tw-bg-opacity: 1;background-color:rgb(251 252 254 / var(--tw-bg-opacity, 1))}.hover\\:opacity-100:hover{opacity:1}.hover\\:shadow-button-base-hover:hover{--tw-shadow: 0 1px 3px 0 rgba(18, 30, 57, .08);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\\:placeholder\\:text-\\[rgba\\(101\\,107\\,124\\,0\\.3\\)\\]:focus::-moz-placeholder{color:#656b7c4d}.focus\\:placeholder\\:text-\\[rgba\\(101\\,107\\,124\\,0\\.3\\)\\]:focus::placeholder{color:#656b7c4d}.active\\:cursor-grabbing:active{cursor:grabbing}.group.is-dragging .group-\\[\\.is-dragging\\]\\:pointer-events-none{pointer-events:none}.group.blok-editor--rtl .group-\\[\\.blok-editor--rtl\\]\\:left-\\[calc\\(-1\\*theme\\(width\\.toolbox-btn\\)\\)\\]{left:-26px}.group.blok-editor--rtl .group-\\[\\.blok-editor--rtl\\]\\:left-auto{left:auto}.group.blok-editor--rtl .group-\\[\\.blok-editor--rtl\\]\\:right-\\[calc\\(-1\\*theme\\(width\\.toolbox-btn\\)\\)\\]{right:-26px}.group.blok-editor--rtl .group-\\[\\.blok-editor--rtl\\]\\:right-auto{right:auto}.group.is-dragging .group-\\[\\.is-dragging\\]\\:cursor-grabbing{cursor:grabbing}@media(max-width:650px){.mobile\\:absolute{position:absolute}.mobile\\:right-auto{right:auto}.mobile\\:z-\\[2\\]{z-index:2}.mobile\\:hidden{display:none}.mobile\\:h-icon-mobile{height:28px}.mobile\\:h-toolbox-btn-mobile{height:36px}.mobile\\:w-icon-mobile{width:28px}.mobile\\:w-toolbox-btn-mobile{width:36px}.mobile\\:rounded-\\[6px\\]{border-radius:6px}.mobile\\:rounded-lg{border-radius:.5rem}.mobile\\:border{border-width:1px}.mobile\\:border-\\[\\#e8e8eb\\]{--tw-border-opacity: 1;border-color:rgb(232 232 235 / var(--tw-border-opacity, 1))}.mobile\\:bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.mobile\\:p-1{padding:.25rem}.mobile\\:text-\\[15px\\]{font-size:15px}.mobile\\:font-medium{font-weight:500}.mobile\\:shadow-overlay-pane{--tw-shadow: 0 3px 15px -3px rgba(13, 20, 33, .13);--tw-shadow-colored: 0 3px 15px -3px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.group.blok-editor--rtl .mobile\\:group-\\[\\.blok-editor--rtl\\]\\:ml-0{margin-left:0}.group.blok-editor--rtl .mobile\\:group-\\[\\.blok-editor--rtl\\]\\:mr-auto{margin-right:auto}.group.blok-editor--rtl .mobile\\:group-\\[\\.blok-editor--rtl\\]\\:pl-\\[10px\\]{padding-left:10px}.group.blok-editor--rtl .mobile\\:group-\\[\\.blok-editor--rtl\\]\\:pr-0{padding-right:0}}@media(min-width:651px){.not-mobile\\:w-6{width:1.5rem}.group.blok-editor--narrow.blok-editor--rtl .not-mobile\\:group-\\[\\.blok-editor--narrow\\.blok-editor--rtl\\]\\:left-0{left:0}.group.blok-editor--narrow.blok-editor--rtl .not-mobile\\:group-\\[\\.blok-editor--narrow\\.blok-editor--rtl\\]\\:left-\\[-5px\\]{left:-5px}.group.blok-editor--narrow.blok-editor--rtl .not-mobile\\:group-\\[\\.blok-editor--narrow\\.blok-editor--rtl\\]\\:left-\\[calc\\(-1\\*theme\\(spacing\\.narrow-mode-right-padding\\)-5px\\)\\]{left:-55px}.group.blok-editor--narrow.blok-editor--rtl .not-mobile\\:group-\\[\\.blok-editor--narrow\\.blok-editor--rtl\\]\\:right-\\[5px\\]{right:5px}.group.blok-editor--narrow.blok-editor--rtl .not-mobile\\:group-\\[\\.blok-editor--narrow\\.blok-editor--rtl\\]\\:right-auto{right:auto}.group.blok-editor--narrow .not-mobile\\:group-\\[\\.blok-editor--narrow\\]\\:left-\\[5px\\]{left:5px}.group.blok-editor--narrow .not-mobile\\:group-\\[\\.blok-editor--narrow\\]\\:right-\\[calc\\(-1\\*theme\\(spacing\\.narrow-mode-right-padding\\)-5px\\)\\]{right:-55px}.group.blok-editor--narrow.blok-editor--rtl .not-mobile\\:group-\\[\\.blok-editor--narrow\\.blok-editor--rtl\\]\\:ml-\\[theme\\(spacing\\.narrow-mode-right-padding\\)\\]{margin-left:50px}.group.blok-editor--narrow.blok-editor--rtl .not-mobile\\:group-\\[\\.blok-editor--narrow\\.blok-editor--rtl\\]\\:mr-0{margin-right:0}.group.blok-editor--narrow .not-mobile\\:group-\\[\\.blok-editor--narrow\\]\\:mr-\\[theme\\(spacing\\.narrow-mode-right-padding\\)\\]{margin-right:50px}}@media(hover:hover){.can-hover\\:hover\\:cursor-grab:hover{cursor:grab}.can-hover\\:hover\\:cursor-pointer:hover{cursor:pointer}.can-hover\\:hover\\:bg-bg-light:hover{--tw-bg-opacity: 1;background-color:rgb(239 242 245 / var(--tw-bg-opacity, 1))}.can-hover\\:hover\\:bg-item-hover-bg:hover{--tw-bg-opacity: 1;background-color:rgb(248 248 248 / var(--tw-bg-opacity, 1))}.group.is-toolbox-opened .group-\\[\\.is-toolbox-opened\\]\\:can-hover\\:hover\\:cursor-pointer:hover{cursor:pointer}}.\\[\\&\\.is-dragging\\]\\:cursor-grabbing.is-dragging{cursor:grabbing}.\\[\\&\\.is-toolbox-opened_\\[contentEditable\\=true\\]\\[data-blok-placeholder\\]\\:focus\\]\\:before\\:\\!opacity-0.is-toolbox-opened [contentEditable=true][data-blok-placeholder]:focus:before{content:var(--tw-content);opacity:0!important}.\\[\\&\\:\\:-webkit-input-placeholder\\]\\:\\!leading-normal::-webkit-input-placeholder{line-height:1.5!important}.\\[\\&\\>p\\:first-of-type\\]\\:mt-0>p:first-of-type{margin-top:0}.\\[\\&\\>p\\:last-of-type\\]\\:mb-0>p:last-of-type{margin-bottom:0}.\\[\\&\\[data-blok-empty\\=true\\]\\]\\:before\\:pointer-events-none[data-blok-empty=true]:before{content:var(--tw-content);pointer-events:none}.\\[\\&\\[data-blok-empty\\=true\\]\\]\\:before\\:cursor-text[data-blok-empty=true]:before{content:var(--tw-content);cursor:text}.\\[\\&\\[data-blok-empty\\=true\\]\\]\\:before\\:text-gray-text[data-blok-empty=true]:before{content:var(--tw-content);--tw-text-opacity: 1;color:rgb(112 118 132 / var(--tw-text-opacity, 1))}.\\[\\&\\[data-blok-empty\\=true\\]\\]\\:before\\:content-\\[attr\\(data-blok-placeholder\\)\\][data-blok-empty=true]:before{--tw-content: attr(data-blok-placeholder);content:var(--tw-content)}.\\[\\&\\[data-blok-focused\\=\\"true\\"\\]\\]\\:bg-item-focus-bg[data-blok-focused=true]{background-color:#22baff14}.\\[\\&\\[data-blok-force-hover\\]\\]\\:cursor-pointer[data-blok-force-hover]{cursor:pointer}.\\[\\&\\[data-blok-force-hover\\]\\]\\:bg-item-hover-bg[data-blok-force-hover]{--tw-bg-opacity: 1;background-color:rgb(248 248 248 / var(--tw-bg-opacity, 1))}.\\[\\&\\[data-blok-placeholder\\]\\]\\:before\\:pointer-events-none[data-blok-placeholder]:before{content:var(--tw-content);pointer-events:none}.\\[\\&\\[data-blok-placeholder\\]\\]\\:before\\:\\!static[data-blok-placeholder]:before{content:var(--tw-content);position:static!important}.\\[\\&\\[data-blok-placeholder\\]\\]\\:before\\:inline-block[data-blok-placeholder]:before{content:var(--tw-content);display:inline-block}.\\[\\&\\[data-blok-placeholder\\]\\]\\:before\\:w-0[data-blok-placeholder]:before{content:var(--tw-content);width:0px}.\\[\\&\\[data-blok-placeholder\\]\\]\\:before\\:whitespace-nowrap[data-blok-placeholder]:before{content:var(--tw-content);white-space:nowrap}.\\[\\&\\[data-blok-popover-item-no-hover\\]\\]\\:cursor-default[data-blok-popover-item-no-hover]{cursor:default}.\\[\\&\\[data-blok-popover-item-no-hover\\]\\]\\:hover\\:bg-transparent:hover[data-blok-popover-item-no-hover]{background-color:transparent}.\\[\\&\\[data-empty\\=true\\]\\]\\:before\\:pointer-events-none[data-empty=true]:before{content:var(--tw-content);pointer-events:none}.\\[\\&\\[data-empty\\=true\\]\\]\\:before\\:cursor-text[data-empty=true]:before{content:var(--tw-content);cursor:text}.\\[\\&\\[data-empty\\=true\\]\\]\\:before\\:text-gray-text[data-empty=true]:before{content:var(--tw-content);--tw-text-opacity: 1;color:rgb(112 118 132 / var(--tw-text-opacity, 1))}.\\[\\&\\[data-empty\\=true\\]\\]\\:before\\:content-\\[attr\\(data-placeholder-active\\)\\][data-empty=true]:before{--tw-content: attr(data-placeholder-active);content:var(--tw-content)}.\\[\\&_\\.blok-stub\\]\\:opacity-55 .blok-stub{opacity:.55}.\\[\\&_\\:\\:selection\\]\\:bg-selection-inline ::-moz-selection{--tw-bg-opacity: 1;background-color:rgb(212 236 255 / var(--tw-bg-opacity, 1))}.\\[\\&_\\:\\:selection\\]\\:bg-selection-inline ::selection{--tw-bg-opacity: 1;background-color:rgb(212 236 255 / var(--tw-bg-opacity, 1))}.\\[\\&_\\[contenteditable\\]\\:empty\\]\\:after\\:content-\\[\\"\\\\\\\\feff_\\"\\] [contenteditable]:empty:after{--tw-content: "\\\\feff ";content:var(--tw-content)}.\\[\\&_\\[contenteditable\\]\\]\\:select-none [contenteditable]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.\\[\\&_\\[hidden\\]\\]\\:\\!hidden [hidden]{display:none!important}.\\[\\&_a\\]\\:cursor-pointer a{cursor:pointer}.\\[\\&_a\\]\\:text-link a{--tw-text-opacity: 1;color:rgb(56 138 229 / var(--tw-text-opacity, 1))}.\\[\\&_a\\]\\:underline a{text-decoration-line:underline}.\\[\\&_b\\]\\:font-bold b{font-weight:700}.\\[\\&_div\\]\\:\\!m-0 div{margin:0!important}.\\[\\&_div\\]\\:\\!p-0 div{padding:0!important}.\\[\\&_i\\]\\:italic i{font-style:italic}.\\[\\&_img\\]\\:opacity-55 img{opacity:.55}.\\[\\&_p\\]\\:\\!m-0 p{margin:0!important}.\\[\\&_p\\]\\:\\!p-0 p{padding:0!important}.\\[\\&_path\\]\\:stroke-current path{stroke:currentColor}.\\[\\&_svg\\]\\:-mt-0\\.5 svg{margin-top:-.125rem}.\\[\\&_svg\\]\\:mr-\\[0\\.2em\\] svg{margin-right:.2em}.\\[\\&_svg\\]\\:block svg{display:block}.\\[\\&_svg\\]\\:size-icon svg{width:20px;height:20px}.\\[\\&_svg\\]\\:h-5 svg{height:1.25rem}.\\[\\&_svg\\]\\:h-6 svg{height:1.5rem}.\\[\\&_svg\\]\\:h-7 svg{height:1.75rem}.\\[\\&_svg\\]\\:h-auto svg{height:auto}.\\[\\&_svg\\]\\:h-icon svg{height:20px}.\\[\\&_svg\\]\\:max-h-full svg{max-height:100%}.\\[\\&_svg\\]\\:w-6 svg{width:1.5rem}.\\[\\&_svg\\]\\:w-7 svg{width:1.75rem}.\\[\\&_svg\\]\\:w-auto svg{width:auto}.\\[\\&_svg\\]\\:w-icon svg{width:20px}.\\[\\&_svg\\]\\:text-gray-text svg{--tw-text-opacity: 1;color:rgb(112 118 132 / var(--tw-text-opacity, 1))}@media(max-width:650px){.mobile\\:\\[\\&_svg\\]\\:h-icon-mobile svg{height:28px}.mobile\\:\\[\\&_svg\\]\\:w-icon-mobile svg{width:28px}}`;class qC extends Be{constructor(){super(...arguments),this.isMobile=!1,this.contentRectCache=null,this.resizeDebouncer=cv(()=>{this.windowResize()},200),this.selectionChangeDebounced=cv(()=>{this.selectionChanged()},qx),this.documentTouchedListener=e=>{this.documentTouched(e)}}get CSS(){return{blokWrapper:"blok-editor",blokWrapperNarrow:"blok-editor--narrow",blokZone:"blok-editor__redactor",blokZoneHidden:"is-hidden",blokEmpty:"is-empty",blokRtlFix:"blok-editor--rtl",blokDragging:"is-dragging"}}get contentRect(){if(this.contentRectCache!==null)return this.contentRectCache;const e=this.nodes.wrapper.querySelector('[data-blok-testid="block-content"]');return e?(this.contentRectCache=e.getBoundingClientRect(),this.contentRectCache):{width:650,left:0,right:0}}async prepare(){this.setIsMobile(),this.make(),this.loadStyles()}toggleReadOnly(e){if(e){this.unbindReadOnlySensitiveListeners();return}const t=()=>{this.bindReadOnlySensitiveListeners()};t();const o=window.requestIdleCallback;typeof o=="function"&&o(t,{timeout:2e3})}checkEmptiness(){const{BlockManager:e}=this.Blok;this.nodes.wrapper.classList.toggle(this.CSS.blokEmpty,e.isBlokEmpty),this.nodes.wrapper.setAttribute("data-blok-empty",e.isBlokEmpty?"true":"false")}get someToolbarOpened(){const{Toolbar:e,BlockSettings:t,InlineToolbar:o}=this.Blok;return!!(t.opened||o.opened||e.toolbox.opened)}get someFlipperButtonFocused(){return this.Blok.Toolbar.toolbox.hasFocus()?!0:Object.entries(this.Blok).filter(([e,t])=>t.flipper instanceof $n).some(([e,t])=>t.flipper.hasFocus())}destroy(){this.nodes.holder.innerHTML="",this.unbindReadOnlyInsensitiveListeners()}closeAllToolbars(){const{Toolbar:e,BlockSettings:t,InlineToolbar:o}=this.Blok;t.close(),o.close(),e.toolbox.close()}setIsMobile(){const e=window.innerWidth<fv;e!==this.isMobile&&this.eventsDispatcher.emit(Wo,{isEnabled:this.isMobile}),this.isMobile=e}make(){const e=this.config.holder;if(!e)throw new Error("Blok holder is not specified in the configuration.");this.nodes.holder=R.getHolder(e),this.nodes.wrapper=R.make("div",[this.CSS.blokWrapper,"group","relative","box-border","z-[1]","[&.is-dragging]:cursor-grabbing","[&_svg]:max-h-full","[&_path]:stroke-current","[&_::selection]:bg-selection-inline","[&.is-toolbox-opened_[contentEditable=true][data-blok-placeholder]:focus]:before:!opacity-0",...this.isRtl?[this.CSS.blokRtlFix,"[direction:rtl]"]:[]]),this.nodes.wrapper.setAttribute(Jr,Wx),this.nodes.wrapper.setAttribute("data-blok-testid","blok-editor"),this.nodes.redactor=R.make("div",[this.CSS.blokZone,"not-mobile:group-[.blok-editor--narrow]:mr-[theme(spacing.narrow-mode-right-padding)]","not-mobile:group-[.blok-editor--narrow.blok-editor--rtl]:ml-[theme(spacing.narrow-mode-right-padding)]","not-mobile:group-[.blok-editor--narrow.blok-editor--rtl]:mr-0",'[&_[contenteditable]:empty]:after:content-["\\feff_"]']),this.nodes.redactor.setAttribute("data-blok-testid","redactor"),this.nodes.holder.offsetWidth<this.contentRect.width&&(this.nodes.wrapper.classList.add(this.CSS.blokWrapperNarrow),this.nodes.wrapper.setAttribute("data-blok-narrow","true")),this.nodes.redactor.style.paddingBottom=this.config.minHeight+"px",this.nodes.wrapper.appendChild(this.nodes.redactor),this.nodes.holder.appendChild(this.nodes.wrapper),this.bindReadOnlyInsensitiveListeners()}loadStyles(){const e="blok-styles";if(R.get(e))return;const t=R.make("style",null,{id:e,textContent:jC.toString()});this.config.style&&!ot(this.config.style)&&this.config.style.nonce&&t.setAttribute("nonce",this.config.style.nonce),R.prepend(document.head,t)}bindReadOnlyInsensitiveListeners(){this.listeners.on(document,"selectionchange",this.selectionChangeDebounced),this.listeners.on(window,"resize",this.resizeDebouncer,{passive:!0}),this.listeners.on(this.nodes.redactor,"mousedown",this.documentTouchedListener,{capture:!0,passive:!0}),this.listeners.on(this.nodes.redactor,"touchstart",this.documentTouchedListener,{capture:!0,passive:!0})}unbindReadOnlyInsensitiveListeners(){this.listeners.off(document,"selectionchange",this.selectionChangeDebounced),this.listeners.off(window,"resize",this.resizeDebouncer),this.listeners.off(this.nodes.redactor,"mousedown",this.documentTouchedListener),this.listeners.off(this.nodes.redactor,"touchstart",this.documentTouchedListener)}bindReadOnlySensitiveListeners(){this.readOnlyMutableListeners.on(this.nodes.redactor,"click",e=>{e instanceof MouseEvent&&this.redactorClicked(e)},!1),this.readOnlyMutableListeners.on(document,"keydown",e=>{e instanceof KeyboardEvent&&this.documentKeydown(e)},!0),this.readOnlyMutableListeners.on(document,"mousedown",e=>{e instanceof MouseEvent&&this.documentClicked(e)},!0),this.watchBlockHoveredEvents(),this.enableInputsEmptyMark()}watchBlockHoveredEvents(){const e={lastHovered:null},o=Mu(i=>{const a=typeof MouseEvent<"u"&&i instanceof MouseEvent,u=typeof TouchEvent<"u"&&i instanceof TouchEvent;if(!a&&!u)return;const f=i.target?.closest('[data-blok-testid="block-wrapper"]');if(this.Blok.BlockSelection.anyBlockSelected||!f||e.lastHovered===f)return;e.lastHovered=f;const p=this.Blok.BlockManager.getBlockByChildNode(f);p&&this.eventsDispatcher.emit(ay,{block:p})},20);this.readOnlyMutableListeners.on(this.nodes.redactor,"mousemove",i=>{o(i)},{passive:!0})}unbindReadOnlySensitiveListeners(){this.readOnlyMutableListeners.clearAll()}windowResize(){this.contentRectCache=null,this.setIsMobile()}documentKeydown(e){switch(e.key??""){case"Enter":this.enterPressed(e);break;case"Backspace":case"Delete":this.backspacePressed(e);break;case"Escape":this.escapePressed(e);break;default:this.defaultBehaviour(e);break}}defaultBehaviour(e){const{currentBlock:t}=this.Blok.BlockManager,o=e.target.closest('[data-blok-testid="blok-editor"]'),i=e.altKey||e.ctrlKey||e.metaKey||e.shiftKey;if(!this.Blok.BlockSettings.contains(e.target)){if(t!==void 0&&o===null){this.Blok.BlockEvents.keydown(e);return}o||t&&i||(this.Blok.BlockManager.unsetCurrentBlock(),this.Blok.Toolbar.close())}}backspacePressed(e){if(this.Blok.BlockSettings.contains(e.target))return;const{BlockManager:t,BlockSelection:o,Caret:i}=this.Blok,a=X.isSelectionExists,u=X.isCollapsed;if(!(o.anyBlockSelected&&(!a||u===!0||this.Blok.CrossBlockSelection.isCrossBlockSelectionStarted)))return;const p=t.removeSelectedBlocks();if(p===void 0)return;const g=t.insertDefaultBlockAtIndex(p,!0);i.setToBlock(g,i.positions.START),o.clearSelection(e),e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()}escapePressed(e){if(this.Blok.BlockSelection.clearSelection(e),this.Blok.Toolbar.toolbox.opened){this.Blok.Toolbar.toolbox.close(),this.Blok.BlockManager.currentBlock&&this.Blok.Caret.setToBlock(this.Blok.BlockManager.currentBlock,this.Blok.Caret.positions.END);return}if(this.Blok.BlockSettings.opened){this.Blok.BlockSettings.close();return}if(this.Blok.InlineToolbar.opened){this.Blok.InlineToolbar.close();return}this.Blok.Toolbar.close()}enterPressed(e){const{BlockManager:t,BlockSelection:o}=this.Blok;if(this.someToolbarOpened)return;const i=t.currentBlockIndex>=0,a=X.isSelectionExists,u=X.isCollapsed;if(o.anyBlockSelected&&(!a||u===!0)){o.clearSelection(e),e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation();return}if(!this.someToolbarOpened&&i&&e.target.tagName==="BODY"){const f=this.Blok.BlockManager.insert();e.preventDefault(),this.Blok.Caret.setToBlock(f),this.Blok.Toolbar.moveAndOpen(f)}this.Blok.BlockSelection.clearSelection(e)}documentClicked(e){if(!e.isTrusted)return;const t=e.target,o=this.nodes.holder.contains(t)||X.isAtBlok,i=this.nodes.redactor.contains(t),a=this.Blok.Toolbar.contains(t);(!(o||a)||!i&&!a)&&(this.Blok.BlockManager.unsetCurrentBlock(),this.Blok.Toolbar.close());const p=this.Blok.BlockSettings.contains(t),g=this.Blok.Toolbar.nodes.settingsToggler?.contains(t),v=this.Blok.Toolbar.nodes.plusButton?.contains(t),y=p||g||v,w=this.Blok.BlockSettings.opened&&!y;if(w&&this.Blok.BlockSettings.close(),w&&i){const S=this.Blok.BlockManager.getBlockByChildNode(t);this.Blok.Toolbar.moveAndOpen(S)}this.Blok.BlockSelection.clearSelection(e)}documentTouched(e){const t=e.target,o=(()=>{if(t!==this.nodes.redactor)return t;if(e instanceof MouseEvent)return document.elementFromPoint(e.clientX,e.clientY)??t;if(e instanceof TouchEvent&&e.touches.length>0){const{clientX:i,clientY:a}=e.touches[0];return document.elementFromPoint(i,a)??t}return t})();try{this.Blok.BlockManager.setCurrentBlockByChildNode(o)}catch{this.Blok.RectangleSelection.isRectActivated()||this.Blok.Caret.setToTheLastBlock()}!this.Blok.ReadOnly.isEnabled&&!this.Blok.Toolbar.contains(t)&&this.Blok.Toolbar.moveAndOpen()}redactorClicked(e){if(!X.isCollapsed)return;const t=e.target,o=e.metaKey||e.ctrlKey;if(!(R.isAnchor(t)&&o)){this.processBottomZoneClick(e);return}e.stopImmediatePropagation(),e.stopPropagation();const a=t.getAttribute("href");if(!a)return;const u=vS(a);bS(u)}processBottomZoneClick(e){const t=this.Blok.BlockManager.getBlockByIndex(-1),o=R.offset(t.holder).bottom,i=e.pageY,{BlockSelection:a}=this.Blok;if(!(e.target instanceof Element&&e.target.isEqualNode(this.nodes.redactor)&&!a.anyBlockSelected&&o<i))return;e.stopImmediatePropagation(),e.stopPropagation();const{BlockManager:f,Caret:p,Toolbar:g}=this.Blok;(!f.lastBlock?.tool.isDefault||!f.lastBlock?.isEmpty)&&f.insertAtEnd(),p.setToTheLastBlock(),g.moveAndOpen(f.lastBlock)}selectionChanged(){const{CrossBlockSelection:e,BlockSelection:t}=this.Blok,o=X.anchorElement;if(e.isCrossBlockSelectionStarted&&t.anyBlockSelected&&X.get()?.removeAllRanges(),!o&&!X.range&&this.Blok.InlineToolbar.close(),!o)return;const i=o.closest('[data-blok-testid="block-content"]'),a=i===null||i.closest('[data-blok-testid="blok-editor"]')!==this.nodes.wrapper,u=o.getAttribute("data-blok-inline-toolbar")==="true";a&&!this.Blok.InlineToolbar.containsNode(o)&&this.Blok.InlineToolbar.close(),!(a&&!u)&&(this.Blok.BlockManager.currentBlock||this.Blok.BlockManager.setCurrentBlockByChildNode(o),this.Blok.InlineToolbar.tryToShow(!0))}enableInputsEmptyMark(){const e=t=>{const o=t.target;hv(o)};this.readOnlyMutableListeners.on(this.nodes.wrapper,"input",e),this.readOnlyMutableListeners.on(this.nodes.wrapper,"focusin",e),this.readOnlyMutableListeners.on(this.nodes.wrapper,"focusout",e)}}const UC={BlocksAPI:ux,CaretAPI:fx,EventsAPI:hx,I18nAPI:Gu,API:px,InlineToolbarAPI:gx,ListenersAPI:mx,NotifierAPI:yx,ReadOnlyAPI:bx,SanitizerAPI:Dx,SaverAPI:Mx,SelectionAPI:Fx,ToolsAPI:zx,StylesAPI:Hx,ToolbarAPI:jx,TooltipAPI:t1,UiAPI:n1,BlockSettings:H1,Toolbar:K1,InlineToolbar:$1,BlockEvents:Q1,BlockManager:CC,BlockSelection:EC,Caret:jd,CrossBlockSelection:IC,ModificationsObserver:_C,Paste:qd,ReadOnly:NC,RectangleSelection:li,Renderer:RC,Saver:OC,Tools:HC,UI:qC};class WC{constructor(e){this.moduleInstances={},this.eventsDispatcher=new jo,this.config={},this.isReady=new Promise((t,o)=>{Promise.resolve().then(async()=>{this.configuration=e,this.validate(),this.init(),await this.start(),await this.render();const{BlockManager:i,Caret:a,UI:u,ModificationsObserver:f}=this.moduleInstances;u.checkEmptiness(),f.enable(),this.configuration.autofocus===!0&&this.configuration.readOnly!==!0&&a.setToBlock(i.blocks[0],a.positions.START),t()}).catch(i=>{Ee(`Blok is not ready because of ${i}`,"error"),o(i)})})}set configuration(e){je(e)?this.config={...e}:this.config={holder:e},this.config.holder==null&&(this.config.holder="blok"),this.config.logLevel==null&&(this.config.logLevel=ov.VERBOSE),fS(this.config.logLevel),this.config.defaultBlock=this.config.defaultBlock??"paragraph";const t=this.config.tools,o=this.config.defaultBlock,i=t!=null&&Object.prototype.hasOwnProperty.call(t,o??""),a=this.config.data?.blocks,u=Array.isArray(a)&&a.length>0;if(o&&o!=="paragraph"&&!i&&!u){Ee(`Default block "${o}" is not configured. Falling back to "paragraph" tool.`,"warn"),this.config.defaultBlock="paragraph";const g={...this.config.tools??{}},v=g.paragraph;g.paragraph=this.createParagraphToolConfig(v),this.config.tools=g}this.config.minHeight=this.config.minHeight!==void 0?this.config.minHeight:300;const f={type:this.config.defaultBlock,data:{}};this.config.placeholder===void 0&&(this.config.placeholder=!1),this.config.sanitizer=this.config.sanitizer??{},this.config.hideToolbar=this.config.hideToolbar??!1,this.config.tools=this.config.tools||{},this.config.i18n=this.config.i18n||{},this.config.data=this.config.data||{blocks:[]},this.config.onReady=this.config.onReady||(()=>{}),this.config.onChange=this.config.onChange||(()=>{}),this.config.inlineToolbar=this.config.inlineToolbar!==void 0?this.config.inlineToolbar:!0,(ot(this.config.data)||!this.config.data.blocks||this.config.data.blocks.length===0)&&(this.config.data={blocks:[f]}),this.config.readOnly=this.config.readOnly||!1,this.config.i18n?.messages&&Ke.setDictionary(this.config.i18n.messages),this.config.i18n.direction=this.config.i18n?.direction||"ltr"}get configuration(){return this.config}validate(){const{holder:e}=this.config;if(on(e)&&!R.get(e))throw Error(`element with ID «${e}» is missing. Pass correct holder's ID.`);if(e&&je(e)&&!R.isElement(e))throw Error("«holder» value must be an Element node")}init(){this.constructModules(),this.configureModules()}async start(){await["Tools","UI","BlockManager","Paste","BlockSelection","RectangleSelection","CrossBlockSelection","ReadOnly"].reduce((t,o)=>t.then(async()=>{try{await this.moduleInstances[o].prepare()}catch(i){if(i instanceof Ho)throw new Error(i.message);Ee(`Module ${o} was skipped because of %o`,"warn",i)}}),Promise.resolve())}render(){const e=this.moduleInstances.Renderer;if(!e)throw new Ho("Renderer module is not initialized");if(!this.config.data)throw new Ho("Blok data is not initialized");return e.render(this.config.data.blocks)}constructModules(){Object.entries(UC).forEach(([e,t])=>{try{this.moduleInstances[e]=new t({config:this.configuration,eventsDispatcher:this.eventsDispatcher})}catch(o){Ee(`[constructModules] Module ${e} skipped because`,"error",o)}})}configureModules(){for(const e in this.moduleInstances)Object.prototype.hasOwnProperty.call(this.moduleInstances,e)&&(this.moduleInstances[e].state=this.getModulesDiff(e))}createParagraphToolConfig(e){if(e===void 0)return{config:{preserveBlank:!0}};if(Oe(e))return{class:e,config:{preserveBlank:!0}};if(je(e)){const t=e,o=t.config;return{...t,config:{...je(o)?o:{},preserveBlank:!0}}}return{config:{preserveBlank:!0}}}getModulesDiff(e){const t={};for(const o in this.moduleInstances)o!==e&&(t[o]=this.moduleInstances[o]);return t}}const js=class js{constructor({data:e,config:t,api:o,readOnly:i}){this.api=o,this.readOnly=i,this._settings=t||{},this._data=this.normalizeData(e),this._element=this.getTag()}get _CSS(){return{block:this.api.styles.block,wrapper:"blok-header"}}isHeaderData(e){return typeof e=="object"&&e!==null&&"text"in e}normalizeData(e){if(!this.isHeaderData(e))return{text:"",level:this.defaultLevel.number};const t=parseInt(String(e.level)),o=e.level!==void 0&&!isNaN(t);return{text:e.text||"",level:o?t:this.defaultLevel.number}}render(){return this._element}renderSettings(){return this.levels.map(e=>({icon:e.svg,label:this.api.i18n.t(`Heading ${e.number}`),onActivate:()=>this.setLevel(e.number),closeOnActivate:!0,isActive:this.currentLevel.number===e.number}))}setLevel(e){this.data={level:e,text:this.data.text}}merge(e){this._element.insertAdjacentHTML("beforeend",e.text)}validate(e){return e.text.trim()!==""}save(e){return{text:e.innerHTML,level:this.currentLevel.number}}static get conversionConfig(){return{export:"text",import:"text"}}static get sanitize(){return{level:!1,text:{}}}static get isReadOnlySupported(){return!0}get data(){return this._data.text=this._element.innerHTML,this._data.level=this.currentLevel.number,this._data}set data(e){if(this._data=this.normalizeData(e),e.level!==void 0&&this._element.parentNode){const t=this.getTag();t.innerHTML=this._element.innerHTML,this._element.parentNode.replaceChild(t,this._element),this._element=t}e.text!==void 0&&(this._element.innerHTML=this._data.text||"")}getTag(){const e=document.createElement(this.currentLevel.tag);return e.innerHTML=this._data.text||"",e.className=we(this._CSS.wrapper,js.BASE_STYLES,this.currentLevel.styles),e.contentEditable=this.readOnly?"false":"true",e.setAttribute("data-placeholder",this.api.i18n.t(this._settings.placeholder||"")),e}get currentLevel(){return this.levels.find(t=>t.number===this._data.level)??this.defaultLevel}get defaultLevel(){if(!this._settings.defaultLevel)return this.levels[1];const e=this.levels.find(t=>t.number===this._settings.defaultLevel);return e||(console.warn("(ง'̀-'́)ง Heading Tool: the default level specified was not found in available levels"),this.levels[1])}get levels(){const e=[{number:1,tag:"H1",svg:S1,styles:"text-[2.5em] font-bold"},{number:2,tag:"H2",svg:x1,styles:"text-[2em] font-semibold"},{number:3,tag:"H3",svg:C1,styles:"text-[1.75em] font-semibold"},{number:4,tag:"H4",svg:E1,styles:"text-[1.5em] font-semibold"},{number:5,tag:"H5",svg:B1,styles:"text-[1.25em] font-semibold"},{number:6,tag:"H6",svg:A1,styles:"text-base font-semibold"}];return this._settings.levels?e.filter(t=>this._settings.levels.includes(t.number)):e}onPaste(e){const t=e.detail;if(!("data"in t))return;const o=t.data,a={H1:1,H2:2,H3:3,H4:4,H5:5,H6:6}[o.tagName]??this.defaultLevel.number,u=this._settings.levels?this._settings.levels.reduce((f,p)=>Math.abs(p-a)<Math.abs(f-a)?p:f):a;this.data={level:u,text:o.innerHTML}}static get pasteConfig(){return{tags:["H1","H2","H3","H4","H5","H6"]}}static get toolbox(){return{icon:I1,title:"Heading"}}};js.BASE_STYLES="py-[0.6em] pb-[3px] px-0 m-0 leading-[1.25em] outline-none [&_p]:!p-0 [&_p]:!m-0 [&_div]:!p-0 [&_div]:!m-0";let Xd=js;const ai=class ai{static get version(){return os()}constructor(e){this.initialConfiguration=je(e)?{...e}:e;const t=je(e)&&Oe(e.onReady)?e.onReady:()=>{},o=new WC(e);this.destroy=()=>{},this.isReady=o.isReady.then(()=>{this.exportAPI(o),t()})}exportAPI(e){const t=["configuration"],o=()=>{Object.values(e.moduleInstances).forEach(k=>{if(k==null)return;Oe(k.destroy)&&k.destroy();const E=k.listeners;E&&Oe(E.removeAll)&&E.removeAll()}),e1();for(const k in this)Object.prototype.hasOwnProperty.call(this,k)&&delete this[k];Object.setPrototypeOf(this,null)};t.forEach(k=>{if(k!=="configuration"){this[k]=e[k];return}const E=e.configuration,_=je(this.initialConfiguration)?this.initialConfiguration:E??this.initialConfiguration;_!==void 0&&(this[k]=_)}),this.destroy=o;const i=e.moduleInstances.API.methods,a=e.moduleInstances.EventsAPI?.methods??i.events;if(a!==void 0){const k=E=>{Object.prototype.hasOwnProperty.call(E,"eventsDispatcher")||Object.defineProperty(E,"eventsDispatcher",{value:a,configurable:!0,enumerable:!0,writable:!1})};k(i),k(this)}Object.getPrototypeOf(i)!==ai.prototype&&Object.setPrototypeOf(i,ai.prototype),Object.setPrototypeOf(this,i);const u=Object.create(null),f=e.moduleInstances,p=f,g=k=>/^[A-Z]+$/.test(k)?k.toLowerCase():k.charAt(0).toLowerCase()+k.slice(1);Object.keys(p).forEach(k=>{const E=g(k);Object.defineProperty(u,E,{configurable:!0,enumerable:!0,get:()=>p[k]})});const v=f.Toolbar,y=f.BlockSettings;v!==void 0&&y!==void 0&&v.blockSettings===void 0&&(v.blockSettings=y);const w=f.InlineToolbar;v!==void 0&&w!==void 0&&v.inlineToolbar===void 0&&(v.inlineToolbar=w),Object.defineProperty(this,"module",{value:u,configurable:!0,enumerable:!1,writable:!1}),delete this.exportAPI,Object.entries({blocks:{clear:"clear",render:"render"},caret:{focus:"focus"},events:{on:"on",off:"off",emit:"emit"},saver:{save:"save"}}).forEach(([k,E])=>{Object.entries(E).forEach(([_,L])=>{const P=k,K=e.moduleInstances.API.methods[P];this[L]=K[_]})})}};ai.Header=Xd;let Yd=ai;const It={wrapper:vt("fixed z-[2] bottom-5 left-5",'font-[-apple-system,BlinkMacSystemFont,"Segoe_UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira_Sans","Droid_Sans","Helvetica_Neue",sans-serif]'),notification:vt("relative w-[230px] mt-[15px] py-[13px] px-4","bg-white shadow-[0_11px_17px_0_rgba(23,32,61,0.13)] rounded-[5px]","text-sm leading-[1.4em] break-words",'before:content-[""] before:absolute before:block before:top-0 before:left-0',"before:w-[3px] before:h-[calc(100%-6px)] before:m-[3px] before:rounded-[5px] before:bg-transparent"),crossBtn:vt("absolute top-[7px] right-[15px] w-2.5 h-2.5 p-[5px] opacity-55 cursor-pointer",'before:content-[""] before:absolute before:left-[9px] before:top-[5px] before:h-3 before:w-0.5 before:bg-[#575d67] before:rotate-[-45deg]','after:content-[""] after:absolute after:left-[9px] after:top-[5px] after:h-3 after:w-0.5 after:bg-[#575d67] after:rotate-45',"hover:opacity-100"),btnsWrapper:"flex flex-row flex-nowrap mt-[5px]",btn:"border-none rounded-[3px] text-[13px] py-[5px] px-2.5 cursor-pointer last:ml-2.5",okBtn:"bg-[#34c992] shadow-[0_1px_1px_0_rgba(18,49,35,0.05)] text-white hover:bg-[#2db583]",cancelBtn:"bg-[#f2f5f7] shadow-[0_2px_1px_0_rgba(16,19,29,0)] text-[#656b7c] hover:bg-[#e9ecee]",input:vt("max-w-[130px] py-[5px] px-2.5 bg-[#f7f7f7] border-0 rounded-[3px]","text-[13px] text-[#656b7c] outline-none","placeholder:text-[#656b7c] focus:placeholder:text-[rgba(101,107,124,0.3)]"),successNotification:vt("!bg-[#fafffe]","before:!bg-[#41ffb1]"),errorNotification:vt("!bg-[#fffbfb]","before:!bg-[#fb5d5d]"),bounceIn:"animate-notify-bounce-in"},Qd=l=>{const e=document.createElement("DIV"),t=document.createElement("DIV"),o=l.message,i=l.style,a=()=>i==="success"?It.successNotification:i==="error"?It.errorNotification:"";return e.className=we(It.notification,a()),i?e.setAttribute("data-blok-testid",`notification-${i}`):e.setAttribute("data-blok-testid","notification"),e.innerHTML=o,t.className=It.crossBtn,t.setAttribute("data-blok-testid","notification-cross"),t.addEventListener("click",()=>e.remove()),e.appendChild(t),e},KC=l=>{const e=Qd(l),t=document.createElement("div"),o=document.createElement("button"),i=document.createElement("button"),a=e.querySelector('[data-blok-testid="notification-cross"]'),u=l.cancelHandler,f=l.okHandler;return t.className=It.btnsWrapper,t.setAttribute("data-blok-testid","notification-buttons-wrapper"),o.innerHTML=l.okText||"Confirm",i.innerHTML=l.cancelText||"Cancel",o.className=vt(It.btn,It.okBtn),i.className=vt(It.btn,It.cancelBtn),o.setAttribute("data-blok-testid","notification-confirm-button"),i.setAttribute("data-blok-testid","notification-cancel-button"),u&&typeof u=="function"&&i.addEventListener("click",u),u&&typeof u=="function"&&a&&a.addEventListener("click",u),f&&typeof f=="function"&&o.addEventListener("click",f),o.addEventListener("click",()=>e.remove()),i.addEventListener("click",()=>e.remove()),t.appendChild(o),t.appendChild(i),e.appendChild(t),e},VC=l=>{const e=Qd(l),t=document.createElement("div"),o=document.createElement("button"),i=document.createElement("input"),a=e.querySelector('[data-blok-testid="notification-cross"]'),u=l.cancelHandler,f=l.okHandler;return t.className=It.btnsWrapper,o.innerHTML=l.okText||"Ok",o.className=vt(It.btn,It.okBtn),i.className=It.input,i.setAttribute("data-blok-testid","notification-input"),l.placeholder&&i.setAttribute("placeholder",l.placeholder),l.default&&(i.value=l.default),l.inputType&&(i.type=l.inputType),u&&typeof u=="function"&&a&&a.addEventListener("click",u),f&&typeof f=="function"&&o.addEventListener("click",()=>{f(i.value)}),o.addEventListener("click",()=>e.remove()),t.appendChild(i),t.appendChild(o),e.appendChild(t),e},$C=()=>{const l=document.createElement("DIV");return l.className=It.wrapper,l.setAttribute("data-blok-testid","notifier-container"),l},GC=8e3,XC=()=>{const l=document.querySelector('[data-blok-testid="notifier-container"]');if(l)return l;const e=$C();return document.body.appendChild(e),e},$y=l=>{if(!l.message)return;const e=XC(),t=l.time||GC,o=(()=>{switch(l.type){case"confirm":return KC(l);case"prompt":return VC(l);default:{const i=Qd(l);return window.setTimeout(()=>{i.remove()},t),i}}})();e&&o&&(e.appendChild(o),o.className=`${o.className} ${It.bounceIn}`,o.setAttribute("data-blok-bounce-in","true"))},YC=Object.freeze(Object.defineProperty({__proto__:null,default:{show:$y},show:$y},Symbol.toStringTag,{value:"Module"}));return Yd}));
|
|
173
|
+
`),c=o.innerHTML;t.setData("text/plain",l),t.setData("text/html",c);try{const d=await Promise.all(this.selectedBlocks.map(h=>h.save()));t.setData(this.Blok.Paste.MIME_TYPE,JSON.stringify(d))}catch(d){}}selectBlockByIndex(e){const{BlockManager:t}=this.Blok,o=t.getBlockByIndex(e);o!==void 0&&this.selectBlock(o)}selectBlock(e){this.selection.save();const t=se.get();t==null||t.removeAllRanges();const o=e;o.selected=!0,this.clearCache(),this.Blok.InlineToolbar.close()}unselectBlock(e){const t=e;t.selected=!1,this.clearCache()}clearCache(){this.anyBlockSelectedCache=null}destroy(){ro.remove(this.Blok.UI.nodes.redactor,"CMD+A")}handleCommandA(e){if(this.Blok.RectangleSelection.clearSelection(),R.isNativeInput(e.target)&&!this.readyToBlockSelection){this.readyToBlockSelection=!0;return}const t=this.Blok.BlockManager.getBlock(e.target);if(!t)return;const o=t.inputs;if(o.length>1&&!this.readyToBlockSelection){this.readyToBlockSelection=!0;return}if(o.length===1&&!this.needToSelectAll){this.needToSelectAll=!0;return}if(this.needToSelectAll){e.preventDefault(),this.selectAllBlocks(),this.needToSelectAll=!1,this.readyToBlockSelection=!1;return}this.readyToBlockSelection&&(e.preventDefault(),this.selectBlock(t),this.needToSelectAll=!0)}selectAllBlocks(){this.selection.save();const e=se.get();e==null||e.removeAllRanges(),this.allBlocksSelected=!0,this.Blok.InlineToolbar.close()}replaceSelectedBlocksWithPrintableKey(e){const{BlockManager:t,Caret:o}=this.Blok,i=t.removeSelectedBlocks();if(i===void 0)return;t.insertDefaultBlockAtIndex(i,!0);const l=t.currentBlock;l&&o.setToBlock(l),ls(()=>{const c=e.key;o.insertContentAtCaretPosition(c.length>1?"":c)},20)()}}const cC=127,nb=a=>{for(const e of a){if(e.trim().length===0)continue;if(e>="0"&&e<="9"||e.toLowerCase()!==e.toUpperCase())return!1;const t=e.codePointAt(0);if(typeof t=="number"&&t>cC)return!1}return!0},rb=a=>{var e;return a.nodeType===Node.TEXT_NODE?[a]:(e=a.hasChildNodes)!=null&&e.call(a)?Array.from(a.childNodes).flatMap(t=>rb(t)):[]},uC=a=>{var i,l;const e=rb(a);if(e.length===0)return null;const t=e[e.length-1],o=(i=[...e].reverse().find(c=>{var d;return!nb((d=c.textContent)!=null?d:"")}))!=null?i:null;return o&&o!==t&&nb((l=t.textContent)!=null?l:"")&&o.parentNode!==a?o:t};class $d extends Be{get positions(){return{START:"start",END:"end",DEFAULT:"default"}}static get DATA_ATTR(){return{shadowCaret:"data-blok-shadow-caret"}}setToBlock(e,t=this.positions.DEFAULT,o=0){var y;const{BlockManager:i,BlockSelection:l}=this.Blok;if(l.clearSelection(),!e.focusable){(y=window.getSelection())==null||y.removeAllRanges(),l.selectBlock(e),i.currentBlock=e;return}const d=t===this.positions.START?e.firstInput:t===this.positions.END?e.lastInput:e.currentInput;if(!d)return;const h=b=>{if(t===this.positions.START)return{node:R.getDeepestNode(b,!1),offset:0};if(t===this.positions.END)return this.resolveEndPositionNode(b);const{node:E,offset:w}=R.getNodeByOffset(b,o);return E?{node:E,offset:w}:{node:R.getDeepestNode(b,!1),offset:0}},{node:g,offset:v}=h(d);g&&(this.set(g,v),i.setCurrentBlockByChildNode(e.holder),i.currentBlock.currentInput=d)}resolveEndPositionNode(e){const t=R.getDeepestNode(e,!0);if(t instanceof HTMLElement&&R.isNativeInput(t))return{node:t,offset:R.getContentLength(t)};const o=uC(e);return o?{node:o,offset:R.getContentLength(o)}:t?{node:t,offset:R.getContentLength(t)}:{node:null,offset:0}}setToInput(e,t=this.positions.DEFAULT,o=0){const{currentBlock:i}=this.Blok.BlockManager,l=R.getDeepestNode(e);switch(t){case this.positions.START:this.set(l,0);break;case this.positions.END:l&&this.set(l,R.getContentLength(l));break;default:o&&this.set(l,o)}i&&(i.currentInput=e)}set(e,t=0){const{top:i,bottom:l}=se.setCursor(e,t),{innerHeight:c}=window;if(i<0){window.scrollBy(0,i-30);return}l>c&&window.scrollBy(0,l-c+30)}setToTheLastBlock(){const e=this.Blok.BlockManager.lastBlock;if(e)if(e.tool.isDefault&&e.isEmpty)this.setToBlock(e);else{const t=this.Blok.BlockManager.insertAtEnd();this.setToBlock(t)}}extractFragmentFromCaretPosition(){var c;const e=se.get();if(!e||!e.rangeCount)return;const t=e.getRangeAt(0),o=this.Blok.BlockManager.currentBlock;if(!o)return;const i=o.currentInput;if(t.deleteContents(),!i)return;if(R.isNativeInput(i)){const d=i,h=document.createDocumentFragment(),g=(c=d.selectionStart)!=null?c:0,v=d.value.substring(0,g),y=d.value.substring(g);return h.textContent=y,d.value=v,h}const l=t.cloneRange();return l.selectNodeContents(i),l.setStart(t.endContainer,t.endOffset),l.extractContents()}navigateNext(e=!1){const{BlockManager:t}=this.Blok,{currentBlock:o,nextBlock:i}=t;if(o===void 0)return!1;const{nextInput:l,currentInput:c}=o,d=c!==void 0?xs(c):void 0,h=e||d||!o.focusable;if(l&&h)return this.setToInput(l,this.positions.START),!0;const v=i!==null?i:o.tool.isDefault||!h?null:t.insertAtEnd();return v!==null&&h?(this.setToBlock(v,this.positions.START),!0):!1}navigatePrevious(e=!1){const{currentBlock:t,previousBlock:o}=this.Blok.BlockManager;if(!t)return!1;const{previousInput:i,currentInput:l}=t,c=l!==void 0?Ts(l):void 0,d=e||c||!t.focusable;return i&&d?(this.setToInput(i,this.positions.END),!0):o!==null&&d?(this.setToBlock(o,this.positions.END),!0):!1}createShadow(e){const t=document.createElement("span");t.setAttribute($d.DATA_ATTR.shadowCaret,""),t.setAttribute("data-blok-testid","shadow-caret"),e.insertAdjacentElement("beforeend",t)}restoreCaret(e){const t=e.querySelector('[data-blok-testid="shadow-caret"]');if(!t)return;new se().expandToTag(t);const i=document.createRange();i.selectNode(t),i.extractContents()}insertContentAtCaretPosition(e){const t=document.createDocumentFragment(),o=document.createElement("div"),i=se.get(),l=se.range;if(!i||!l)return;o.innerHTML=e,Array.from(o.childNodes).forEach(g=>t.appendChild(g)),t.childNodes.length===0&&t.appendChild(new Text);const c=t.lastChild;l.deleteContents(),l.insertNode(t);const d=document.createRange(),h=c.nodeType===Node.TEXT_NODE?c:c.firstChild;h!==null&&h.textContent!==null&&d.setStart(h,h.textContent.length),i.removeAllRanges(),i.addRange(d)}}class dC extends Be{constructor(){super(...arguments),this.firstSelectedBlock=null,this.lastSelectedBlock=null,this.onMouseUp=()=>{this.listeners.off(document,"mouseover",this.onMouseOver),this.listeners.off(document,"mouseup",this.onMouseUp)},this.onMouseOver=e=>{var d;const t=e,{BlockManager:o,BlockSelection:i}=this.Blok;if(t.relatedTarget===null&&t.target===null)return;const l=o.getBlockByChildNode(t.relatedTarget)||this.lastSelectedBlock,c=o.getBlockByChildNode(t.target);if(!(!l||!c)&&c!==l){if(this.firstSelectedBlock&&l===this.firstSelectedBlock){(d=se.get())==null||d.removeAllRanges(),l.selected=!0,c.selected=!0,i.clearCache();return}if(this.firstSelectedBlock&&c===this.firstSelectedBlock){l.selected=!1,c.selected=!1,i.clearCache();return}this.Blok.InlineToolbar.close(),this.toggleBlocksSelectedState(l,c),this.lastSelectedBlock=c}}}async prepare(){this.listeners.on(document,"mousedown",e=>{this.enableCrossBlockSelection(e)})}watchSelection(e){if(e.button!==S1.LEFT)return;const{BlockManager:t}=this.Blok,o=t.getBlock(e.target);o&&(this.firstSelectedBlock=o,this.lastSelectedBlock=o,this.listeners.on(document,"mouseover",this.onMouseOver),this.listeners.on(document,"mouseup",this.onMouseUp))}get isCrossBlockSelectionStarted(){return!!this.firstSelectedBlock&&!!this.lastSelectedBlock&&this.firstSelectedBlock!==this.lastSelectedBlock}toggleBlockSelectedState(e=!0){var d;const{BlockManager:t,BlockSelection:o}=this.Blok,i=t.currentBlock;if(!this.lastSelectedBlock&&!i||(!this.lastSelectedBlock&&i&&(this.lastSelectedBlock=this.firstSelectedBlock=i),this.firstSelectedBlock===this.lastSelectedBlock&&this.firstSelectedBlock&&(this.firstSelectedBlock.selected=!0,o.clearCache(),(d=se.get())==null||d.removeAllRanges(),this.Blok.Toolbar.close()),!this.lastSelectedBlock))return;const l=t.blocks.indexOf(this.lastSelectedBlock)+(e?1:-1),c=t.blocks[l];c&&(this.lastSelectedBlock.selected!==c.selected?(c.selected=!0,o.clearCache(),this.Blok.Toolbar.close()):(this.lastSelectedBlock.selected=!1,o.clearCache(),this.Blok.Toolbar.close()),this.lastSelectedBlock=c,this.Blok.InlineToolbar.close(),c.holder.scrollIntoView({block:"nearest"}))}clear(e){const{BlockManager:t,BlockSelection:o,Caret:i}=this.Blok;if(!this.firstSelectedBlock||!this.lastSelectedBlock)return;const l=t.blocks.indexOf(this.firstSelectedBlock),c=t.blocks.indexOf(this.lastSelectedBlock);if(!o.anyBlockSelected||l===-1||c===-1){this.firstSelectedBlock=this.lastSelectedBlock=null;return}if(e&&e instanceof KeyboardEvent)switch(e.key){case"ArrowDown":case"ArrowRight":i.setToBlock(t.blocks[Math.max(l,c)],i.positions.END);break;case"ArrowUp":case"ArrowLeft":i.setToBlock(t.blocks[Math.min(l,c)],i.positions.START);break;default:i.setToBlock(t.blocks[Math.max(l,c)],i.positions.END)}this.firstSelectedBlock=this.lastSelectedBlock=null}enableCrossBlockSelection(e){const{UI:t}=this.Blok;se.isCollapsed||this.Blok.BlockSelection.clearSelection(e),t.nodes.redactor.contains(e.target)?this.watchSelection(e):this.Blok.BlockSelection.clearSelection(e)}toggleBlocksSelectedState(e,t){const{BlockManager:o,BlockSelection:i}=this.Blok,l=o.blocks.indexOf(e),c=o.blocks.indexOf(t),d=e.selected!==t.selected,h=Math.min(l,c),g=Math.max(l,c);for(const v of Array.from({length:g-h+1},(y,b)=>h+b)){const y=o.blocks[v];y!==this.firstSelectedBlock&&y!==(d?e:t)&&(o.blocks[v].selected=!o.blocks[v].selected,i.clearCache())}this.Blok.Toolbar.close()}}class fC extends Be{constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t}),this.disabled=!1,this.batchingTimeout=null,this.batchingOnChangeQueue=new Map,this.batchTime=Sx,this.mutationObserver=new MutationObserver(o=>{this.redactorChanged(o)}),this.eventsDispatcher.on(Kv,o=>{this.particularBlockChanged(o.event)}),this.eventsDispatcher.on(Vv,()=>{this.disable()}),this.eventsDispatcher.on($v,()=>{this.enable()})}enable(){this.mutationObserver.observe(this.Blok.UI.nodes.redactor,{childList:!0,subtree:!0,characterData:!0,attributes:!0}),this.disabled=!1}disable(){this.mutationObserver.disconnect(),this.disabled=!0}particularBlockChanged(e){this.disabled||!De(this.config.onChange)||(this.batchingOnChangeQueue.set(`block:${e.detail.target.id}:event:${e.type}`,e),this.batchingTimeout&&clearTimeout(this.batchingTimeout),this.batchingTimeout=setTimeout(()=>{const t=Array.from(this.batchingOnChangeQueue.values());if(t.length===0)return;const o=t.length===1?t[0]:t;this.config.onChange&&this.config.onChange(this.Blok.API.methods,o),this.batchingOnChangeQueue.clear()},this.batchTime))}redactorChanged(e){this.eventsDispatcher.emit(Zu,{mutations:e})}}const ob=new Set(["table","thead","tbody","tfoot","tr","th","td","caption","colgroup","col","ul","ol","li","dl","dt","dd"]),js=class js extends Be{constructor(){super(...arguments),this.MIME_TYPE="application/x-blok",this.toolsTags={},this.tagsByTool={},this.toolsPatterns=[],this.toolsFiles={},this.exceptionList=[],this.handlePasteEventWrapper=e=>{this.handlePasteEvent(e)},this.processTool=e=>{try{if(e.pasteConfig===!1){this.exceptionList.push(e.name);return}if(!e.hasOnPasteHandler)return;this.getTagsConfig(e),this.getFilesConfig(e),this.getPatternsConfig(e)}catch(t){Ce(`Paste handling for «${e.name}» Tool hasn't been set up because of the error`,"warn",t)}},this.handlePasteEvent=async e=>{const{BlockManager:t,Toolbar:o}=this.Blok,i=t.setCurrentBlockByChildNode(e.target);!i||e.target&&this.isNativeBehaviour(e.target)&&e.clipboardData&&!e.clipboardData.types.includes("Files")||this.exceptionList.includes(i.name)||(e.preventDefault(),e.clipboardData&&await this.processDataTransfer(e.clipboardData),o.close())}}async prepare(){this.processTools()}shouldReplaceCurrentBlockForFile(e){const{BlockManager:t}=this.Blok,o=t.currentBlock;return o?e&&o.name===e?!0:!!o.tool.isDefault&&o.isEmpty:!1}getStructuralTagsSanitizeConfig(e){var i;const t={},o=[e];for(;o.length>0;){const l=o.pop();if(!l)continue;const c=l.tagName.toLowerCase();ob.has(c)&&(t[c]=(i=t[c])!=null?i:{}),o.push(...Array.from(l.children))}return t}toggleReadOnly(e){e?this.unsetCallback():this.setCallback()}containsFiles(e){var o;if(Array.from(e.types).includes("Files")||(o=e.files)!=null&&o.length)return!0;try{const i=e.types;if(typeof(i==null?void 0:i.contains)=="function"&&i.contains("Files"))return!0}catch(i){}return!1}async processDataTransfer(e){const{Tools:t}=this.Blok;if(this.containsFiles(e)&&!ot(this.toolsFiles)){await this.processFiles(e.files);return}const i=e.getData(this.MIME_TYPE),l=e.getData("text/plain"),d=e.getData("text/html");if(i)try{this.insertBlokData(JSON.parse(i));return}catch(w){}const h=Object.fromEntries(Object.keys(this.toolsTags).map(w=>{var T;return[w.toLowerCase(),(T=this.toolsTags[w].sanitizationConfig)!=null?T:{}]})),g=t.getAllInlineToolsSanitizeConfig(),v=ad(this.config.sanitizer,h,g,{br:{}}),y=Tn(d,v),b=R.isHTMLString(y);!y.trim()||y.trim()===l||!b?await this.processText(l):await this.processText(y,!0)}async processText(e,t=!1){var d,h;const{Caret:o,BlockManager:i}=this.Blok,l=t?this.processHTML(e):this.processPlain(e);if(!l.length)return;if(l.length>1){const v=!!((d=i.currentBlock)!=null&&d.tool.isDefault)&&!!((h=i.currentBlock)!=null&&h.isEmpty);for(const[y,b]of l.entries())await this.insertBlock(b,y===0&&v);i.currentBlock&&o.setToBlock(i.currentBlock,o.positions.END);return}const[c]=l;if(c.isBlock){await this.processSingleBlock(c);return}await this.processInlinePaste(c)}setCallback(){this.listeners.on(this.Blok.UI.nodes.holder,"paste",this.handlePasteEventWrapper)}unsetCallback(){this.listeners.off(this.Blok.UI.nodes.holder,"paste",this.handlePasteEventWrapper)}processTools(){const e=this.Blok.Tools.blockTools;Array.from(e.values()).forEach(this.processTool)}collectTagNames(e){return un(e)?[e]:qe(e)?Object.keys(e):[]}getTagsConfig(e){if(e.pasteConfig===!1)return;const t=e.pasteConfig.tags||[],o=[];t.forEach(i=>{const l=this.collectTagNames(i);o.push(...l),l.forEach(c=>{if(Object.prototype.hasOwnProperty.call(this.toolsTags,c)){Ce(`Paste handler for «${e.name}» Tool on «${c}» tag is skipped because it is already used by «${this.toolsTags[c].tool.name}» Tool.`,"warn");return}const d=qe(i)?i[c]:void 0;this.toolsTags[c.toUpperCase()]={tool:e,sanitizationConfig:d}})}),this.tagsByTool[e.name]=o.map(i=>i.toUpperCase())}getFilesConfig(e){if(e.pasteConfig===!1)return;const{files:t={}}=e.pasteConfig,{extensions:o,mimeTypes:i}=t;if(!o&&!i)return;const l=o==null?[]:Array.isArray(o)?o:(Ce(`«extensions» property of the paste config for «${e.name}» Tool should be an array`),[]),c=i==null?[]:Array.isArray(i)?i.filter(d=>N1(d)?!0:(Ce(`MIME type value «${d}» for the «${e.name}» Tool is not a valid MIME type`,"warn"),!1)):(Ce(`«mimeTypes» property of the paste config for «${e.name}» Tool should be an array`),[]);this.toolsFiles[e.name]={extensions:l,mimeTypes:c}}getPatternsConfig(e){e.pasteConfig===!1||!e.pasteConfig.patterns||ot(e.pasteConfig.patterns)||Object.entries(e.pasteConfig.patterns).forEach(([t,o])=>{o instanceof RegExp||Ce(`Pattern ${o} for «${e.name}» Tool is skipped because it should be a Regexp instance.`,"warn"),this.toolsPatterns.push({key:t,pattern:o,tool:e})})}isNativeBehaviour(e){return R.isNativeInput(e)}async processFiles(e){var c;const{BlockManager:t}=this.Blok,i=(await Promise.all(Array.from(e).map(d=>this.processFile(d)))).filter(d=>d!=null);if(i.length===0)return;const l=this.shouldReplaceCurrentBlockForFile((c=i[0])==null?void 0:c.type);for(const[d,h]of i.entries())await t.paste(h.type,h.event,d===0&&l)}async processFile(e){const t=_1(e),o=Object.entries(this.toolsFiles).find(([c,{mimeTypes:d,extensions:h}])=>{const[g,v]=e.type.split("/"),y=h.find(E=>E.toLowerCase()===t.toLowerCase()),b=d.find(E=>{const[w,T]=E.split("/");return w===g&&(T===v||T==="*")});return y!==void 0||b!==void 0});if(!o)return;const[i]=o;return{event:this.composePasteEvent("file",{file:e}),type:i}}processHTML(e){const{Tools:t}=this.Blok,o=R.make("DIV");return o.innerHTML=e,this.getNodes(o).map(l=>{var S;const c=(()=>{var O;switch(l.nodeType){case Node.DOCUMENT_FRAGMENT_NODE:{const L=R.make("div");return L.appendChild(l),{content:L,tool:t.defaultTool,isBlock:!1}}case Node.ELEMENT_NODE:{const L=l,U=this.toolsTags[L.tagName];return{content:L,tool:(O=U==null?void 0:U.tool)!=null?O:t.defaultTool,isBlock:!0}}default:return null}})();if(!c)return null;const{content:d,tool:h,isBlock:g}=c,y=(h.pasteConfig===!1?[]:((S=h.pasteConfig)==null?void 0:S.tags)||[]).reduce((O,L)=>{const U=this.collectTagNames(L),H=be({},O);return U.forEach(X=>{const q=qe(L)?L[X]:null;H[X.toLowerCase()]=q!=null?q:{}}),H},{}),b=this.getStructuralTagsSanitizeConfig(d),E=Object.assign({},b,y,h.baseSanitizeConfig),w=(()=>{if(d.tagName.toLowerCase()!=="table")return d.innerHTML=Tn(d.innerHTML,E),d;const O=Tn(d.outerHTML,E),U=R.make("div",void 0,{innerHTML:O}).firstChild;return!U||!(U instanceof HTMLElement)?null:U})();if(!w)return null;const T=this.composePasteEvent("tag",{data:w});return{content:w,isBlock:g,tool:h.name,event:T}}).filter(l=>{if(!l)return!1;const c=R.isEmpty(l.content),d=R.isSingleTag(l.content);return!c||d})}processPlain(e){const{defaultBlock:t}=this.config;if(!e)return[];const o=t;return e.split(/\r?\n/).filter(i=>i.trim()).map(i=>{const l=R.make("div");l.textContent=i;const c=this.composePasteEvent("tag",{data:l});return{content:l,tool:o,isBlock:!1,event:c}})}async processSingleBlock(e){const{Caret:t,BlockManager:o}=this.Blok,{currentBlock:i}=o;if(!i||e.tool!==i.name||!R.containsOnlyInlineElements(e.content.innerHTML)){await this.insertBlock(e,i?i.tool.isDefault&&i.isEmpty:!1);return}t.insertContentAtCaretPosition(e.content.innerHTML)}async processInlinePaste(e){var g,v;const{BlockManager:t,Caret:o}=this.Blok,{content:i}=e,l=(v=(g=t.currentBlock)==null?void 0:g.tool.isDefault)!=null?v:!1,c=i.textContent,h=l&&c!==null&&c.length<js.PATTERN_PROCESSING_MAX_LENGTH&&c!==null?await this.processPattern(c):void 0;if(h){const y=t.currentBlock&&t.currentBlock.tool.isDefault&&t.currentBlock.isEmpty,b=await t.paste(h.tool,h.event,y);o.setToBlock(b,o.positions.END);return}if(t.currentBlock&&t.currentBlock.currentInput){const y=t.currentBlock.tool.baseSanitizeConfig;o.insertContentAtCaretPosition(Tn(i.innerHTML,y))}else await this.insertBlock(e)}async processPattern(e){const t=this.toolsPatterns.find(i=>{const l=i.pattern.exec(e);return l?e===l.shift():!1});return t?{event:this.composePasteEvent("pattern",{key:t.key,data:e}),tool:t.tool.name}:void 0}async insertBlock(e,t=!1){const{BlockManager:o,Caret:i}=this.Blok,{currentBlock:l}=o;if(t&&l&&l.isEmpty){const d=await o.paste(e.tool,e.event,!0);i.setToBlock(d,i.positions.END);return}const c=await o.paste(e.tool,e.event);i.setToBlock(c,i.positions.END)}insertBlokData(e){const{BlockManager:t,Caret:o,Tools:i}=this.Blok;rd(e,c=>{var d,h;return(h=(d=i.blockTools.get(c))==null?void 0:d.sanitizeConfig)!=null?h:{}},this.config.sanitizer).forEach(({tool:c,data:d},h)=>{var y,b;const g=h===0&&!!((y=t.currentBlock)!=null&&y.tool.isDefault)&&!!((b=t.currentBlock)!=null&&b.isEmpty),v=t.insert({tool:c,data:d,replace:g});o.setToBlock(v,o.positions.END)})}processElementNode(e,t,o){var w,T;const i=Object.keys(this.toolsTags),l=e,c=this.toolsTags[l.tagName],d=c==null?void 0:c.tool,h=(T=this.tagsByTool[(w=d==null?void 0:d.name)!=null?w:""])!=null?T:[],g=i.includes(l.tagName),v=R.blockElements.includes(l.tagName.toLowerCase()),y=ob.has(l.tagName.toLowerCase()),b=Array.from(l.children).some(({tagName:S})=>i.includes(S)&&!h.includes(S)),E=Array.from(l.children).some(({tagName:S})=>R.blockElements.includes(S.toLowerCase()));if(!v&&!g&&!b)return o.appendChild(l),[...t,o];if(g&&!b||v&&!E&&!b||y&&!b)return[...t,o,l]}getNodes(e){const t=Array.from(e.childNodes),o=(i,l)=>{if(R.isEmpty(l)&&!R.isSingleTag(l))return i;const c=i[i.length-1],d=c!==void 0&&R.isFragment(c),{destNode:h,remainingNodes:g}=d?{destNode:c,remainingNodes:i.slice(0,-1)}:{destNode:new DocumentFragment,remainingNodes:i};if(l.nodeType===Node.TEXT_NODE)return h.appendChild(l),[...g,h];if(l.nodeType!==Node.ELEMENT_NODE)return[...g,h];const v=this.processElementNode(l,g,h);if(v)return v;const y=Array.from(l.childNodes).reduce(o,[]);return[...g,...y]};return t.reduce(o,[])}composePasteEvent(e,t){return new CustomEvent(e,{detail:t})}};js.PATTERN_PROCESSING_MAX_LENGTH=450;let Gd=js;class hC extends Be{constructor(){super(...arguments),this.toolsDontSupportReadOnly=[],this.readOnlyEnabled=!1}get isEnabled(){return this.readOnlyEnabled}async prepare(){const{Tools:e}=this.Blok,{blockTools:t}=e,o=[];Array.from(t.entries()).forEach(([i,l])=>{l.isReadOnlySupported||o.push(i)}),this.toolsDontSupportReadOnly=o,this.config.readOnly===!0&&o.length>0&&this.throwCriticalError(),await this.toggle(this.config.readOnly,!0)}async toggle(e=!this.readOnlyEnabled,t=!1){e&&this.toolsDontSupportReadOnly.length>0&&this.throwCriticalError();const o=this.readOnlyEnabled;this.readOnlyEnabled=e;for(const l of Object.values(this.Blok))l!=null&&typeof l.toggleReadOnly=="function"&&l.toggleReadOnly(e);if(o===e)return this.readOnlyEnabled;if(t)return this.readOnlyEnabled;this.Blok.ModificationsObserver.disable();const i=await this.Blok.Saver.save();return i===void 0?(this.Blok.ModificationsObserver.enable(),this.readOnlyEnabled):(await this.Blok.BlockManager.clear(),await this.Blok.Renderer.render(i.blocks),this.Blok.ModificationsObserver.enable(),this.readOnlyEnabled)}throwCriticalError(){throw new Wo(`To enable read-only mode all connected tools should support it. Tools ${this.toolsDontSupportReadOnly.join(", ")} don't support read-only mode.`)}}class pC extends Be{constructor(){super(...arguments),this.isRectSelectionActivated=!1,this.SCROLL_SPEED=3,this.HEIGHT_OF_SCROLL_ZONE=40,this.BOTTOM_SCROLL_ZONE=1,this.TOP_SCROLL_ZONE=2,this.MAIN_MOUSE_BUTTON=0,this.mousedown=!1,this.isScrolling=!1,this.inScrollZone=null,this.startX=0,this.startY=0,this.mouseX=0,this.mouseY=0,this.stackOfSelected=[],this.rectCrossesBlocks=!1,this.overlayRectangle=null,this.listenerIds=[]}static get CSS(){return{overlay:"",overlayContainer:"",rect:"",topScrollZone:"",bottomScrollZone:""}}prepare(){this.enableModuleBindings()}startSelection(e,t){const o=this.getScrollLeft(),i=this.getScrollTop(),l=document.elementFromPoint(e-o,t-i);if(!l)return;l.closest(qv)||(this.Blok.BlockSelection.allBlocksSelected=!1,this.clearSelection(),this.stackOfSelected=[]);const d=[Gu,qv,zv],h=l.closest(qt),g=d.some(v=>!!l.closest(v));!h||g||(this.mousedown=!0,this.startX=e,this.startY=t)}endSelection(){this.mousedown=!1,this.startX=0,this.startY=0,this.overlayRectangle!==null&&(this.overlayRectangle.style.display="none")}isRectActivated(){return this.isRectSelectionActivated}clearSelection(){this.isRectSelectionActivated=!1}enableModuleBindings(){const{container:e}=this.genHTML();this.listeners.on(e,"mousedown",i=>{this.processMouseDown(i)},!1);const t=zu(i=>{i instanceof MouseEvent&&this.processMouseMove(i)},10);this.listeners.on(document.body,"mousemove",t,{passive:!0}),this.listeners.on(document.body,"mouseleave",()=>{this.processMouseLeave()});const o=zu(i=>{this.processScroll(i)},10);this.listeners.on(window,"scroll",o,{passive:!0}),this.listeners.on(document.body,"mouseup",()=>{this.processMouseUp()},!1)}processMouseDown(e){if(e.button!==this.MAIN_MOUSE_BUTTON)return;e.target.closest(R.allInputsSelector)!==null||this.startSelection(e.pageX,e.pageY)}processMouseMove(e){this.changingRectangle(e),this.scrollByZones(e.clientY)}processMouseLeave(){this.clearSelection(),this.endSelection()}processScroll(e){this.changingRectangle(e)}processMouseUp(){this.clearSelection(),this.endSelection()}scrollByZones(e){if(this.inScrollZone=null,e<=this.HEIGHT_OF_SCROLL_ZONE&&(this.inScrollZone=this.TOP_SCROLL_ZONE),document.documentElement.clientHeight-e<=this.HEIGHT_OF_SCROLL_ZONE&&(this.inScrollZone=this.BOTTOM_SCROLL_ZONE),!this.inScrollZone){this.isScrolling=!1;return}this.isScrolling||(this.scrollVertical(this.inScrollZone===this.TOP_SCROLL_ZONE?-this.SCROLL_SPEED:this.SCROLL_SPEED),this.isScrolling=!0)}genHTML(){const{UI:e}=this.Blok,t=e.nodes.holder.querySelector(qt),o=R.make("div",["fixed","inset-0","z-overlay","pointer-events-none","overflow-hidden"],{}),i=R.make("div",["relative","pointer-events-auto","z-0"],{}),l=R.make("div",["absolute","pointer-events-none","bg-selection-highlight","border","border-transparent"],{});if(o.setAttribute(Dx,""),i.setAttribute(Px,""),l.setAttribute(Mx,""),o.setAttribute("data-blok-testid","overlay"),l.setAttribute("data-blok-testid","overlay-rectangle"),!t)throw new Error("RectangleSelection: blok wrapper not found");return i.appendChild(l),o.appendChild(i),t.appendChild(o),this.overlayRectangle=l,{container:t,overlay:o}}scrollVertical(e){if(!(this.inScrollZone&&this.mousedown))return;const t=this.getScrollTop();window.scrollBy(0,e),this.mouseY+=this.getScrollTop()-t,setTimeout(()=>{this.scrollVertical(e)},0)}changingRectangle(e){if(!this.mousedown)return;const t=this.overlayRectangle;if(t===null)return;e.pageY!==void 0&&(this.mouseX=e.pageX,this.mouseY=e.pageY);const{rightPos:o,leftPos:i,index:l}=this.genInfoForMouseSelection(),c=this.startX>o&&this.mouseX>o,d=this.startX<i&&this.mouseX<i;if(this.rectCrossesBlocks=!(c||d),this.isRectSelectionActivated||(this.rectCrossesBlocks=!1,this.isRectSelectionActivated=!0,this.shrinkRectangleToPoint(),t.style.display="block"),this.updateRectangleSize(),this.Blok.Toolbar.close(),l===void 0)return;this.trySelectNextBlock(l),this.inverseSelection();const h=se.get();h&&h.removeAllRanges()}shrinkRectangleToPoint(){if(this.overlayRectangle===null)return;const e=this.getScrollLeft(),t=this.getScrollTop();this.overlayRectangle.style.left=`${this.startX-e}px`,this.overlayRectangle.style.top=`${this.startY-t}px`,this.overlayRectangle.style.bottom=`calc(100% - ${this.startY-t}px)`,this.overlayRectangle.style.right=`calc(100% - ${this.startX-e}px)`}inverseSelection(){if(this.stackOfSelected.length===0)return;const e=this.Blok.BlockManager.getBlockByIndex(this.stackOfSelected[0]);if(!e)return;const t=e.selected;if(this.rectCrossesBlocks&&!t)for(const o of this.stackOfSelected)this.Blok.BlockSelection.selectBlockByIndex(o);if(!this.rectCrossesBlocks&&t)for(const o of this.stackOfSelected)this.Blok.BlockSelection.unSelectBlockByIndex(o)}updateRectangleSize(){if(this.overlayRectangle===null)return;const e=this.getScrollLeft(),t=this.getScrollTop();this.mouseY>=this.startY?(this.overlayRectangle.style.top=`${this.startY-t}px`,this.overlayRectangle.style.bottom=`calc(100% - ${this.mouseY-t}px)`):(this.overlayRectangle.style.bottom=`calc(100% - ${this.startY-t}px)`,this.overlayRectangle.style.top=`${this.mouseY-t}px`),this.mouseX>=this.startX?(this.overlayRectangle.style.left=`${this.startX-e}px`,this.overlayRectangle.style.right=`calc(100% - ${this.mouseX-e}px)`):(this.overlayRectangle.style.right=`calc(100% - ${this.startX-e}px)`,this.overlayRectangle.style.left=`${this.mouseX-e}px`)}genInfoForMouseSelection(){var w;const t=document.body.offsetWidth/2,o=this.getScrollTop(),i=this.mouseY-o,l=document.elementFromPoint(t,i),c=(w=this.Blok.BlockManager.lastBlock)==null?void 0:w.holder,d=c==null?void 0:c.querySelector(Gu),g=(d?Number.parseInt(window.getComputedStyle(d).width,10):0)/2,v=t-g,y=t+g;if(!l)return{index:void 0,leftPos:v,rightPos:y};const b=this.Blok.BlockManager.getBlockByChildNode(l);return{index:b!==void 0?this.Blok.BlockManager.blocks.findIndex(T=>T.holder===b.holder):void 0,leftPos:v,rightPos:y}}getScrollTop(){var e,t,o,i;return typeof window.scrollY=="number"?window.scrollY:(i=(o=(e=document.documentElement)==null?void 0:e.scrollTop)!=null?o:(t=document.body)==null?void 0:t.scrollTop)!=null?i:0}getScrollLeft(){var e,t,o,i;return typeof window.scrollX=="number"?window.scrollX:(i=(o=(e=document.documentElement)==null?void 0:e.scrollLeft)!=null?o:(t=document.body)==null?void 0:t.scrollLeft)!=null?i:0}addBlockInSelection(e){this.rectCrossesBlocks&&this.Blok.BlockSelection.selectBlockByIndex(e),this.stackOfSelected.push(e)}trySelectNextBlock(e){const t=this.stackOfSelected.length,o=this.stackOfSelected[t-1];if(o===e)return;const l=this.stackOfSelected[t-2],c=l!==void 0&&o!==void 0?o-l>0:!1,d=t<=1,h=o!==void 0&&e>o&&c,g=o!==void 0&&e<o&&t>1&&!c,y=!(h||g||d);if(!y&&(o===void 0||e>o)){const w=o!==void 0?o+1:e;Array.from({length:e-w+1},(T,S)=>w+S).forEach(T=>{this.addBlockInSelection(T)});return}if(!y&&o!==void 0&&e<o){Array.from({length:o-e},(w,T)=>o-1-T).forEach(w=>{this.addBlockInSelection(w)});return}if(!y)return;const b=w=>o===void 0?!1:e>o?e>w:e<w,E=[];for(const w of[...this.stackOfSelected].reverse()){if(!b(w))break;this.rectCrossesBlocks&&this.Blok.BlockSelection.unSelectBlockByIndex(w),E.push(w)}E.length>0&&this.stackOfSelected.splice(this.stackOfSelected.length-E.length,E.length)}}class gC extends Be{render(e){return new Promise(t=>{const{Tools:o,BlockManager:i}=this.Blok;if(e.length===0)i.insert();else{const l=e.map(c=>{const{tunes:d,id:h}=c,g=c.type,v=o.available.has(g)?{tool:g,data:c.data}:(Qt(`Tool «${g}» is not found. Check 'tools' property at the Blok config.`,"warn"),{tool:o.stubTool,data:this.composeStubDataForTool(g,c.data,h)});return((b,E)=>{try{return i.composeBlock({id:h,tool:b,data:E,tunes:d})}catch(w){Ce(`Block «${b}» skipped because of plugins error`,"error",{data:E,error:w});const T=this.composeStubDataForTool(b,E,h);return i.composeBlock({id:h,tool:o.stubTool,data:T,tunes:d})}})(v.tool,v.data)});i.insertMany(l)}window.requestIdleCallback(()=>{t()},{timeout:2e3})})}composeStubDataForTool(e,t,o){const{Tools:i}=this.Blok,l=(()=>{if(!i.unavailable.has(e))return e;const c=i.unavailable.get(e).toolbox;return c!==void 0&&c[0].title!==void 0?c[0].title:e})();return{savedData:{id:o,type:e,data:t},title:l}}}class mC extends Be{async save(){const{BlockManager:e,Tools:t}=this.Blok,o=e.blocks;if(o.length===1&&o[0].isEmpty)return{time:+new Date,blocks:[],version:ss()};const i=o.map(l=>this.getSavedData(l));this.lastSaveError=void 0;try{const l=await Promise.all(i),c=this.sanitizeExtractedData(l,d=>{var h;return(h=t.blockTools.get(d))==null?void 0:h.sanitizeConfig},this.config.sanitizer);return this.makeOutput(c)}catch(l){this.lastSaveError=l;const c=l instanceof Error?l:new Error(String(l));Qt("Saving failed due to the Error %o","error",c);return}}async getSavedData(e){const t=await e.save(),o=e.name,i=(t==null?void 0:t.data)!==void 0?t:this.getPreservedSavedData(e);if(i===void 0)return{tool:o,isValid:!1};const l=await e.validate(i.data);return It(be({},i),{isValid:l})}makeOutput(e){const t=[];return e.forEach(({id:o,tool:i,data:l,tunes:c,isValid:d})=>{if(!d){Ce(`Block «${i}» skipped because saved data is invalid`);return}if(i===void 0||l===void 0){Ce("Block skipped because saved data is missing required fields");return}if(i===this.Blok.Tools.stubTool&&this.isStubSavedData(l)){t.push(l);return}if(i===this.Blok.Tools.stubTool){Ce("Stub block data is malformed and was skipped");return}const h=c===void 0||ot(c),g=be({id:o,type:i,data:l},!h&&{tunes:c});t.push(g)}),{time:+new Date,blocks:t,version:ss()}}sanitizeExtractedData(e,t,o){const i=[];if(e.forEach((d,h)=>{this.hasSanitizableData(d)&&i.push({index:h,data:d})}),i.length===0)return e;const l=rd(i.map(({data:d})=>d),t,o),c=e.map(d=>be({},d));return i.forEach(({index:d},h)=>{const g=l[h];c[d]=It(be({},c[d]),{data:g.data})}),c}hasSanitizableData(e){return e.data!==void 0&&typeof e.tool=="string"}isStubSavedData(e){if(!qe(e))return!1;const t=e;return typeof t.type=="string"&&t.data!==void 0}getLastSaveError(){return this.lastSaveError}getPreservedSavedData(e){const t=e.preservedData;if(ot(t))return;const o=e.preservedTunes;return It(be({id:e.id,tool:e.name,data:t},ot(o)?{}:{tunes:o}),{time:0})}}const vC=a=>{const e=document.createElement("div");e.innerHTML=a.trim();const t=document.createDocumentFragment();return t.append(...Array.from(e.childNodes)),t},Lr=class Lr{static get DEFAULT_PLACEHOLDER(){return""}constructor({data:e,config:t,api:o,readOnly:i}){var l,c;this.api=o,this.readOnly=i,this.readOnly||(this.onKeyUp=this.onKeyUp.bind(this)),this._placeholder=(l=t==null?void 0:t.placeholder)!=null?l:Lr.DEFAULT_PLACEHOLDER,this._data=e!=null?e:{text:""},this._element=null,this._preserveBlank=(c=t==null?void 0:t.preserveBlank)!=null?c:!1}onKeyUp(e){if(e.code!=="Backspace"&&e.code!=="Delete"||!this._element)return;const{textContent:t}=this._element;t===""&&(this._element.innerHTML="")}drawView(){const e=document.createElement("DIV");return e.className=Ae(this.api.styles.block,Lr.WRAPPER_CLASSES,Lr.PLACEHOLDER_CLASSES),e.setAttribute(Xu,"paragraph"),e.contentEditable="false",e.setAttribute("data-placeholder-active",this.api.i18n.t(this._placeholder)),this._data.text&&(e.innerHTML=this._data.text),this.readOnly||(e.contentEditable="true",e.addEventListener("keyup",this.onKeyUp)),e}render(){return this._element=this.drawView(),this._element}merge(e){if(!this._element)return;this._data.text+=e.text;const t=vC(e.text);this._element.appendChild(t),this._element.normalize()}validate(e){return!(e.text.trim()===""&&!this._preserveBlank)}save(e){return{text:e.innerHTML}}onPaste(e){const t=e.detail;if(!("data"in t))return;const i={text:t.data.innerHTML};this._data=i,window.requestAnimationFrame(()=>{this._element&&(this._element.innerHTML=this._data.text||"")})}static get conversionConfig(){return{export:"text",import:"text"}}static get sanitize(){return{text:{br:!0}}}static get isReadOnlySupported(){return!0}static get pasteConfig(){return{tags:["P"]}}static get toolbox(){return{icon:dS,title:"Text"}}};Lr.WRAPPER_CLASSES=["leading-[1.6em]","outline-none","[&>p:first-of-type]:mt-0","[&>p:last-of-type]:mb-0"],Lr.PLACEHOLDER_CLASSES=["empty:before:pointer-events-none","empty:before:text-gray-text","empty:before:cursor-text","empty:before:content-[attr(data-placeholder-active)]","[&[data-empty=true]]:before:pointer-events-none","[&[data-empty=true]]:before:text-gray-text","[&[data-empty=true]]:before:cursor-text","[&[data-empty=true]]:before:content-[attr(data-placeholder-active)]"];let Hs=Lr;const B=class B{static get sanitize(){return{strong:{},b:{}}}static normalizeAllBoldTags(){if(typeof document=="undefined")return;const e=`${Fv} b, ${qt} b`;document.querySelectorAll(e).forEach(t=>{B.ensureStrongElement(t)})}static normalizeBoldInNode(e){var i;const t=e.nodeType===Node.ELEMENT_NODE?e:e.parentElement;!t||typeof t.closest!="function"||!t.closest(`${Fv}, ${qt}`)||(t.tagName==="B"&&B.ensureStrongElement(t),(i=t.querySelectorAll)==null||i.call(t,"b").forEach(l=>{B.ensureStrongElement(l)}))}constructor(){typeof document!="undefined"&&(B.instances.add(this),B.initializeGlobalListeners())}static initializeGlobalListeners(){return typeof document=="undefined"?!1:(B.shortcutListenerRegistered||(document.addEventListener("keydown",B.handleShortcut,!0),B.shortcutListenerRegistered=!0),B.selectionListenerRegistered||(document.addEventListener("selectionchange",B.handleGlobalSelectionChange,!0),B.selectionListenerRegistered=!0),B.inputListenerRegistered||(document.addEventListener("input",B.handleGlobalInput,!0),B.inputListenerRegistered=!0),B.beforeInputListenerRegistered||(document.addEventListener("beforeinput",B.handleBeforeInput,!0),B.beforeInputListenerRegistered=!0),B.ensureMutationObserver(),!0)}static maintainCollapsedExitState(){var e,t,o,i,l;if(typeof document!="undefined")for(const c of Array.from(B.collapsedExitRecords)){const d=B.resolveBoundary(c);if(!d){B.collapsedExitRecords.delete(c);continue}c.boundary=d.boundary,c.boldElement=d.boldElement;const h=d.boundary,g=d.boldElement,v=c.allowedLength,y=(e=g.textContent)!=null?e:"";if(y.length>v){const q=y.slice(0,v),W=y.slice(v);g.textContent=q,h.textContent=((t=h.textContent)!=null?t:"")+W}const b=(o=h.textContent)!=null?o:"";b.length>1&&b.startsWith("")&&(h.textContent=b.slice(1));const E=window.getSelection();B.ensureCaretAtBoundary(E,h),B.scheduleBoundaryCaretAdjustment(h);const w=(i=h.textContent)!=null?i:"",T=w.replace(/\u200B/g,""),S=T.match(/^\s+/),O=/\S/.test(T),L=w.startsWith("");S&&(c.hasLeadingSpace=!0,c.leadingWhitespace=S[0]),O&&(c.hasTypedContent=!0);const U=/^\s/.test(T),H=c.hasTypedContent&&!L&&((l=g.textContent)!=null?l:"").length<=v,X=c.hasLeadingSpace&&c.hasTypedContent&&!U;if(H&&X){const q=w.replace(/^[\u200B\s]+/,""),W=c.leadingWhitespace||" ";h.textContent=`${W}${q}`,B.ensureCaretAtBoundary(E,h)}H&&B.collapsedExitRecords.delete(c)}}static ensureCaretAtBoundary(e,t){!e||!e.isCollapsed||B.setCaretToBoundaryEnd(e,t)}static scheduleBoundaryCaretAdjustment(e){B.pendingBoundaryCaretAdjustments.has(e)||(B.pendingBoundaryCaretAdjustments.add(e),setTimeout(()=>{var l,c,d;B.pendingBoundaryCaretAdjustments.delete(e);const t=(l=e.ownerDocument)!=null?l:typeof document!="undefined"?document:null;if(!t)return;const o=t.getSelection();if(!o||!o.isCollapsed||o.anchorNode!==e)return;const i=(d=(c=e.textContent)==null?void 0:c.length)!=null?d:0;o.anchorOffset!==i&&B.setCaret(o,e,i)},0))}static ensureTextNodeAfter(e){var c;const t=e.nextSibling;if((t==null?void 0:t.nodeType)===Node.TEXT_NODE)return t;const o=e.parentNode;if(!o)return null;const i=(c=e.ownerDocument)!=null?c:typeof document!="undefined"?document:null;if(!i)return null;const l=i.createTextNode("");return o.insertBefore(l,t),l}static resolveBoundary(e){if(!e.boldElement.isConnected)return null;const t=B.ensureStrongElement(e.boldElement),o=e.boundary,l=o.isConnected&&o.previousSibling===t?o:B.ensureTextNodeAfter(t);return l?{boundary:l,boldElement:t}:null}static setCaretToBoundaryEnd(e,t){var l,c;const o=document.createRange(),i=(c=(l=t.textContent)==null?void 0:l.length)!=null?c:0;o.setStart(t,i),o.collapse(!0),e.removeAllRanges(),e.addRange(o)}static hasBoldParent(e){return e?e.nodeType===Node.ELEMENT_NODE&&B.isBoldTag(e)?!0:B.hasBoldParent(e.parentNode):!1}static findBoldElement(e){return e?e.nodeType===Node.ELEMENT_NODE&&B.isBoldTag(e)?B.ensureStrongElement(e):B.findBoldElement(e.parentNode):null}static isBoldTag(e){const t=e.tagName;return t==="B"||t==="STRONG"}static ensureStrongElement(e){if(e.tagName==="STRONG")return e;const t=document.createElement("strong");for(e.hasAttributes()&&Array.from(e.attributes).forEach(o=>{t.setAttribute(o.name,o.value)});e.firstChild;)t.appendChild(e.firstChild);return e.replaceWith(t),t}static mergeStrongNodes(e,t){const o=B.ensureStrongElement(e),i=B.ensureStrongElement(t);for(;i.firstChild;)o.appendChild(i.firstChild);return i.remove(),o}render(){return{icon:XE,name:"bold",onActivate:()=>{this.toggleBold()},isActive:()=>{const e=window.getSelection();return e?this.isSelectionVisuallyBold(e):!1}}}toggleBold(){const e=window.getSelection();if(!e||e.rangeCount===0)return;const t=e.getRangeAt(0);if(t.collapsed){this.toggleCollapsedSelection();return}this.isRangeBold(t,{ignoreWhitespace:!0})?this.unwrapBoldTags(t):this.wrapWithBold(t)}isSelectionVisuallyBold(e){if(!e||e.rangeCount===0)return!1;const t=e.getRangeAt(0);return this.isRangeBold(t,{ignoreWhitespace:!0})}wrapWithBold(e){const t=this.getRangeHtmlWithoutBold(e),o=this.replaceRangeWithHtml(e,`<strong>${t}</strong>`),i=window.getSelection();i&&o&&(i.removeAllRanges(),i.addRange(o)),B.normalizeAllBoldTags();const l=i?B.findBoldElement(i.focusNode):null;if(!l)return;const c=this.mergeAdjacentBold(l);this.normalizeWhitespaceAround(c),this.selectElementContents(c),B.normalizeBoldTagsWithinBlok(window.getSelection()),B.replaceNbspInBlock(window.getSelection()),this.notifySelectionChange()}unwrapBoldTags(e){const t=this.collectBoldAncestors(e),o=window.getSelection();if(!o)return;const i=document.createElement("span"),l=e.extractContents();i.setAttribute("data-blok-bold-marker",`unwrap-${B.markerSequence++}`),i.appendChild(l),this.removeNestedBold(i),e.insertNode(i);const c=document.createRange();for(c.selectNodeContents(i),o.removeAllRanges(),o.addRange(c);;){const v=B.findBoldElement(i);if(!v)break;this.moveMarkerOutOfBold(i,v)}const d=i.firstChild,h=i.lastChild;this.unwrapElement(i);const g=d&&h?(()=>{const v=document.createRange();return v.setStartBefore(d),v.setEndAfter(h),o.removeAllRanges(),o.addRange(v),v})():void 0;g||o.removeAllRanges(),this.replaceNbspWithinRange(g),B.normalizeBoldTagsWithinBlok(o),B.replaceNbspInBlock(o),B.removeEmptyBoldElements(o),t.forEach(v=>{B.isElementEmpty(v)&&v.remove()}),this.notifySelectionChange()}replaceRangeWithHtml(e,t){var d,h;const o=B.createFragmentFromHtml(t),i=(d=o.firstChild)!=null?d:null,l=(h=o.lastChild)!=null?h:null;if(e.deleteContents(),!i||!l)return;e.insertNode(o);const c=document.createRange();return c.setStartBefore(i),c.setEndAfter(l),c}moveMarkerOutOfBold(e,t){const o=t.parentNode;if(!o)return;if(Array.from(t.childNodes).forEach(h=>{var g;h.nodeType===Node.TEXT_NODE&&((g=h.textContent)!=null?g:"").length===0&&h.remove()}),t.childNodes.length===1&&t.firstChild===e){t.replaceWith(e);return}if(t.firstChild===e){o.insertBefore(e,t);return}if(t.lastChild===e){o.insertBefore(e,t.nextSibling);return}const d=t.cloneNode(!1);for(;e.nextSibling;)d.appendChild(e.nextSibling);o.insertBefore(d,t.nextSibling),o.insertBefore(e,d)}selectElementContents(e){const t=window.getSelection();if(!t)return;const o=document.createRange();o.selectNodeContents(e),t.removeAllRanges(),t.addRange(o)}get shortcut(){return"CMD+B"}isRangeBold(e,t){var l;if(e.collapsed)return!!B.findBoldElement(e.startContainer);const o=document.createTreeWalker(e.commonAncestorContainer,NodeFilter.SHOW_TEXT,{acceptNode:c=>{try{return e.intersectsNode(c)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}catch(d){const h=document.createRange();h.selectNodeContents(c);const g=e.compareBoundaryPoints(Range.END_TO_START,h)>0,v=e.compareBoundaryPoints(Range.START_TO_END,h)<0;return g&&v?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}}),i=[];for(;o.nextNode();){const c=o.currentNode,d=(l=c.textContent)!=null?l:"";t.ignoreWhitespace&&d.trim().length===0||d.length!==0&&i.push(c)}return i.length===0?!!B.findBoldElement(e.startContainer):i.every(c=>B.hasBoldParent(c))}removeNestedBold(e){var o;const t=(o=e.querySelectorAll)==null?void 0:o.call(e,"b,strong");t&&t.forEach(i=>{this.unwrapElement(i)})}unwrapElement(e){const t=e.parentNode;if(!t){e.remove();return}for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}mergeAdjacentBold(e){const t=B.ensureStrongElement(e),o=t.previousSibling,i=o&&o.nodeType===Node.ELEMENT_NODE&&B.isBoldTag(o)?B.mergeStrongNodes(o,t):t,l=i.nextSibling;return l&&l.nodeType===Node.ELEMENT_NODE&&B.isBoldTag(l)?B.mergeStrongNodes(i,l):i}toggleCollapsedSelection(){const e=window.getSelection();if(!e||e.rangeCount===0)return;const t=e.getRangeAt(0),o=B.findBoldElement(t.startContainer),i=(()=>{if(o&&o.getAttribute(B.DATA_ATTR_COLLAPSED_ACTIVE)!=="true")return B.exitCollapsedBold(e,o);const l=o!=null?o:B.getBoundaryBold(t);return l?B.exitCollapsedBold(e,l):this.startCollapsedBold(t)})();document.dispatchEvent(new Event("selectionchange")),i&&(e.removeAllRanges(),e.addRange(i)),B.normalizeBoldTagsWithinBlok(e),B.replaceNbspInBlock(e),B.removeEmptyBoldElements(e),this.notifySelectionChange()}startCollapsedBold(e){if(!e.collapsed)return;const t=document.createElement("strong"),o=document.createTextNode("");t.appendChild(o),t.setAttribute(B.DATA_ATTR_COLLAPSED_ACTIVE,"true");const i=e.startContainer,l=e.startOffset;if(!(i.nodeType===Node.TEXT_NODE?this.insertCollapsedBoldIntoText(i,t,l):i.nodeType===Node.ELEMENT_NODE?(this.insertCollapsedBoldIntoElement(i,t,l),!0):!1))return;const d=window.getSelection(),h=document.createRange();h.setStart(o,0),h.collapse(!0);const g=this.mergeAdjacentBold(t);return B.normalizeBoldTagsWithinBlok(d),B.replaceNbspInBlock(d),B.removeEmptyBoldElements(d),d&&(d.removeAllRanges(),d.addRange(h)),this.notifySelectionChange(),g.firstChild instanceof Text?(()=>{var y,b;const v=document.createRange();return v.setStart(g.firstChild,(b=(y=g.firstChild.textContent)==null?void 0:y.length)!=null?b:0),v.collapse(!0),v})():h}insertCollapsedBoldIntoText(e,t,o){var v;const i=e,l=i.parentNode;if(!l)return!1;const c=(v=i.textContent)!=null?v:"",d=c.slice(0,o),h=c.slice(o);i.textContent=d;const g=h.length?document.createTextNode(h):null;return g&&l.insertBefore(g,i.nextSibling),l.insertBefore(t,g!=null?g:i.nextSibling),t.setAttribute(B.DATA_ATTR_PREV_LENGTH,d.length.toString()),!0}insertCollapsedBoldIntoElement(e,t,o){var l;const i=(l=e.childNodes[o])!=null?l:null;e.insertBefore(t,i),t.setAttribute(B.DATA_ATTR_PREV_LENGTH,"0")}static isElementEmpty(e){var t;return((t=e.textContent)!=null?t:"").length===0}notifySelectionChange(){B.enforceCollapsedBoldLengths(window.getSelection()),document.dispatchEvent(new Event("selectionchange")),this.updateToolbarButtonState()}updateToolbarButtonState(){const e=window.getSelection();if(!e)return;const t=e.anchorNode,o=(t==null?void 0:t.nodeType)===Node.ELEMENT_NODE?t:t==null?void 0:t.parentElement,i=o==null?void 0:o.closest(qt);if(!i)return;const l=i.querySelector("[data-blok-testid=inline-toolbar]");if(!(l instanceof HTMLElement))return;const c=l.querySelector('[data-blok-item-name="bold"]');if(!(c instanceof HTMLElement))return;this.isSelectionVisuallyBold(e)?c.setAttribute("data-blok-popover-item-active","true"):c.removeAttribute("data-blok-popover-item-active")}normalizeWhitespaceAround(e){B.replaceNbspWithSpace(e.previousSibling),B.replaceNbspWithSpace(e.nextSibling)}static replaceNbspWithSpace(e){var i;if(!e||e.nodeType!==Node.TEXT_NODE)return;const t=e,o=(i=t.textContent)!=null?i:"";o.includes(" ")&&(t.textContent=o.replace(/\u00A0/g," "))}restoreSelectionFromMarkers(e){const t=document.querySelector(`[data-blok-bold-marker="${e}-start"]`),o=document.querySelector(`[data-blok-bold-marker="${e}-end"]`);if(!t||!o){t==null||t.remove(),o==null||o.remove();return}const i=window.getSelection();if(!i){t.remove(),o.remove();return}const l=document.createRange();return l.setStartAfter(t),l.setEndBefore(o),i.removeAllRanges(),i.addRange(l),t.remove(),o.remove(),l}replaceNbspWithinRange(e){if(!e)return;const t=document.createTreeWalker(e.commonAncestorContainer,NodeFilter.SHOW_TEXT,{acceptNode:o=>{try{return e.intersectsNode(o)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}catch(i){const l=document.createRange();l.selectNodeContents(o);const c=e.compareBoundaryPoints(Range.END_TO_START,l)>0,d=e.compareBoundaryPoints(Range.START_TO_END,l)<0;return c&&d?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}});for(;t.nextNode();)B.replaceNbspWithSpace(t.currentNode)}static normalizeBoldTagsWithinBlok(e){var l;const t=(l=e==null?void 0:e.anchorNode)!=null?l:e==null?void 0:e.focusNode;if(!t)return;const o=t.nodeType===Node.ELEMENT_NODE?t:t.parentElement,i=o==null?void 0:o.closest(qt);i&&i.querySelectorAll("b").forEach(c=>{B.ensureStrongElement(c)})}static replaceNbspInBlock(e){var c;const t=(c=e==null?void 0:e.anchorNode)!=null?c:e==null?void 0:e.focusNode;if(!t)return;const o=t.nodeType===Node.ELEMENT_NODE?t:t.parentElement,i=o==null?void 0:o.closest('[data-blok-component="paragraph"]');if(!i)return;const l=document.createTreeWalker(i,NodeFilter.SHOW_TEXT);for(;l.nextNode();)B.replaceNbspWithSpace(l.currentNode);i.querySelectorAll("b").forEach(d=>{B.ensureStrongElement(d)})}static removeEmptyBoldElements(e){var c,d;const t=(c=e==null?void 0:e.anchorNode)!=null?c:e==null?void 0:e.focusNode;if(!t)return;const o=t.nodeType===Node.ELEMENT_NODE?t:t.parentElement,i=o==null?void 0:o.closest('[data-blok-component="paragraph"]');if(!i)return;const l=(d=e==null?void 0:e.focusNode)!=null?d:null;i.querySelectorAll("strong").forEach(h=>{var y;const g=h.getAttribute(B.DATA_ATTR_COLLAPSED_ACTIVE)==="true",v=h.hasAttribute(B.DATA_ATTR_COLLAPSED_LENGTH);g||v||((y=h.textContent)!=null?y:"").length===0&&!B.isNodeWithin(l,h)&&h.remove()})}static synchronizeCollapsedBold(e){var c,d;const t=(c=e==null?void 0:e.anchorNode)!=null?c:e==null?void 0:e.focusNode,o=t&&t.nodeType===Node.ELEMENT_NODE?t:t==null?void 0:t.parentElement,i=(d=o==null?void 0:o.closest(qt))!=null?d:o==null?void 0:o.ownerDocument;if(!i)return;const l=`strong[${B.DATA_ATTR_COLLAPSED_ACTIVE}="true"]`;i.querySelectorAll(l).forEach(h=>{var ne,ce,Q,ye,Z;const g=h.getAttribute(B.DATA_ATTR_PREV_LENGTH),v=h.previousSibling;if(!g||!v||v.nodeType!==Node.TEXT_NODE)return;const y=Number(g);if(!Number.isFinite(y))return;const b=v,E=(ne=b.textContent)!=null?ne:"";if(E.length<=y)return;const w=E.slice(0,y),T=E.slice(y);b.textContent=w;const S=T.match(/^[\u00A0\s]+/);if(S&&!h.hasAttribute(B.DATA_ATTR_LEADING_WHITESPACE)&&h.setAttribute(B.DATA_ATTR_LEADING_WHITESPACE,S[0]),T.length===0)return;const O=(ce=h.textContent)!=null?ce:"",L=O+T,U=(Q=h.getAttribute(B.DATA_ATTR_LEADING_WHITESPACE))!=null?Q:"",X=U.length>0&&O.length===0&&!L.startsWith(U)?U+L:L,q=document.createTextNode(X);for(;h.firstChild;)h.removeChild(h.firstChild);if(h.appendChild(q),!(e!=null&&e.isCollapsed)||!B.isNodeWithin(e.focusNode,b))return;const W=document.createRange(),F=(Z=(ye=q.textContent)==null?void 0:ye.length)!=null?Z:0;W.setStart(q,F),W.collapse(!0),e.removeAllRanges(),e.addRange(W)})}static moveCaretAfterBoundaryBold(e){if(!e.rangeCount)return;const t=e.getRangeAt(0);if(!t.collapsed)return;const o=B.findBoldElement(t.startContainer);(o==null?void 0:o.getAttribute(B.DATA_ATTR_COLLAPSED_ACTIVE))!=="true"&&(B.moveCaretFromElementContainer(e,t)||B.moveCaretFromTextContainer(e,t))}static getAdjacentBold(e){const t=e.startContainer;return t.nodeType===Node.TEXT_NODE?B.getBoldAdjacentToText(e,t):t.nodeType===Node.ELEMENT_NODE?B.getBoldAdjacentToElement(e,t):null}static getBoldAdjacentToText(e,t){var c,d;const o=(d=(c=t.textContent)==null?void 0:c.length)!=null?d:0,i=t.previousSibling;if(e.startOffset===0&&B.isBoldElement(i))return i;if(e.startOffset!==o)return null;const l=t.nextSibling;return B.isBoldElement(l)?l:null}static getBoldAdjacentToElement(e,t){var l,c;const o=e.startOffset>0&&(l=t.childNodes[e.startOffset-1])!=null?l:null;if(B.isBoldElement(o))return o;const i=(c=t.childNodes[e.startOffset])!=null?c:null;return B.isBoldElement(i)?i:null}static exitCollapsedIfNeeded(e,t){var c;if(!!B.findBoldElement(t.startContainer))return;const i=(c=B.getBoundaryBold(t))!=null?c:B.getAdjacentBold(t);if(!i)return;const l=B.exitCollapsedBold(e,i);l&&(e.removeAllRanges(),e.addRange(l))}static moveCaretFromElementContainer(e,t){if(t.startContainer.nodeType!==Node.ELEMENT_NODE)return!1;const o=t.startContainer;return B.moveCaretAfterPreviousBold(e,o,t.startOffset)?!0:B.moveCaretBeforeNextBold(e,o,t.startOffset)}static moveCaretAfterPreviousBold(e,t,o){var d,h,g;const i=o>0&&(d=t.childNodes[o-1])!=null?d:null;if(!B.isBoldElement(i))return!1;const l=B.ensureFollowingTextNode(i,i.nextSibling);if(!l)return!1;const c=(g=(h=l.textContent)==null?void 0:h.length)!=null?g:0;return B.setCaret(e,l,c),!0}static moveCaretBeforeNextBold(e,t,o){var c;const i=(c=t.childNodes[o])!=null?c:null;if(!B.isBoldElement(i))return!1;const l=B.ensureFollowingTextNode(i,i.nextSibling);return l?(B.setCaret(e,l,0),!0):(B.setCaretAfterNode(e,i),!0)}static moveCaretFromTextContainer(e,t){var g,v,y;if(t.startContainer.nodeType!==Node.TEXT_NODE)return;const o=t.startContainer,i=o.previousSibling,l=(g=o.textContent)!=null?g:"",c=/^\s/.test(l);if(t.startOffset===0&&B.isBoldElement(i)&&(l.length===0||c)){B.setCaret(e,o,l.length);return}const d=B.findBoldElement(o);if(!d||t.startOffset!==((y=(v=o.textContent)==null?void 0:v.length)!=null?y:0))return;const h=B.ensureFollowingTextNode(d,d.nextSibling);if(h){B.setCaret(e,h,0);return}B.setCaretAfterNode(e,d)}static guardCollapsedBoundaryKeydown(e){var h;if(e.defaultPrevented||e.metaKey||e.ctrlKey||e.altKey||e.key.length!==1)return;const o=window.getSelection();if(!o||!o.isCollapsed||o.rangeCount===0)return;const i=o.getRangeAt(0);if(i.startContainer.nodeType!==Node.TEXT_NODE)return;const l=i.startContainer,c=(h=l.textContent)!=null?h:"";if(c.length===0||i.startOffset!==0)return;const d=l.previousSibling;B.isBoldElement(d)&&/^\s/.test(c)&&B.setCaret(o,l,c.length)}static isBoldElement(e){return!!(e&&e.nodeType===Node.ELEMENT_NODE&&B.isBoldTag(e))}static setCaret(e,t,o){const i=document.createRange();i.setStart(t,o),i.collapse(!0),e.removeAllRanges(),e.addRange(i)}static setCaretAfterNode(e,t){if(!t)return;const o=document.createRange();o.setStartAfter(t),o.collapse(!0),e.removeAllRanges(),e.addRange(o)}static ensureFollowingTextNode(e,t){const o=e.parentNode;if(!o)return null;if(t&&t.nodeType===Node.TEXT_NODE)return t;const i=document.createTextNode("");return o.insertBefore(i,t),i}static enforceCollapsedBoldLengths(e){var c;const t=(c=e==null?void 0:e.anchorNode)!=null?c:e==null?void 0:e.focusNode;if(!t)return;const o=t.nodeType===Node.ELEMENT_NODE?t:t.parentElement,i=o==null?void 0:o.closest(qt);if(!i)return;i.querySelectorAll(`strong[${B.DATA_ATTR_COLLAPSED_LENGTH}]`).forEach(d=>{var H,X,q,W,F;const h=d,g=h.getAttribute(B.DATA_ATTR_COLLAPSED_LENGTH);if(!g)return;const v=Number(g),y=(H=h.textContent)!=null?H:"";if(!Number.isFinite(v))return;const b=y.length>v,E=b?B.splitCollapsedBoldText(h,v,y):null,w=h.getAttribute(B.DATA_ATTR_PREV_LENGTH),T=w?Number(w):NaN,S=h.previousSibling,O=(S==null?void 0:S.nodeType)===Node.TEXT_NODE?S:null,L=(X=O==null?void 0:O.textContent)!=null?X:"",U=!!(w&&Number.isFinite(T)&&O&&L.length>T);if(U&&O){const ne=L.slice(0,T),ce=L.slice(T);O.textContent=ne;const Q=document.createTextNode(ce);(q=h.parentNode)==null||q.insertBefore(Q,h.nextSibling)}if(U&&h.removeAttribute(B.DATA_ATTR_PREV_LENGTH),e!=null&&e.isCollapsed&&E&&B.isNodeWithin(e.focusNode,h)){const ne=document.createRange(),ce=(F=(W=E.textContent)==null?void 0:W.length)!=null?F:0;ne.setStart(E,ce),ne.collapse(!0),e.removeAllRanges(),e.addRange(ne)}b&&h.removeAttribute(B.DATA_ATTR_COLLAPSED_LENGTH)})}static splitCollapsedBoldText(e,t,o){const i=e,l=i.parentNode;if(!l)return null;const c=o.slice(0,t),d=o.slice(t);i.textContent=c;const h=document.createTextNode(d);return l.insertBefore(h,i.nextSibling),h}static isNodeWithin(e,t){return e?e===t||t.contains(e):!1}static handleGlobalSelectionChange(){B.refreshSelectionState("selectionchange")}static handleGlobalInput(){B.refreshSelectionState("input")}static refreshSelectionState(e){const t=window.getSelection();B.enforceCollapsedBoldLengths(t),B.maintainCollapsedExitState(),B.synchronizeCollapsedBold(t),B.normalizeBoldTagsWithinBlok(t),B.removeEmptyBoldElements(t),e==="input"&&t&&B.moveCaretAfterBoundaryBold(t),B.normalizeAllBoldTags()}static ensureMutationObserver(){if(typeof MutationObserver=="undefined"||B.mutationObserver)return;const e=new MutationObserver(t=>{if(!B.isProcessingMutation){B.isProcessingMutation=!0;try{t.forEach(o=>{o.addedNodes.forEach(i=>{B.normalizeBoldInNode(i)}),o.type==="characterData"&&o.target&&B.normalizeBoldInNode(o.target)})}finally{B.isProcessingMutation=!1}}});e.observe(document.body,{subtree:!0,childList:!0,characterData:!0}),B.mutationObserver=e}static handleBeforeInput(e){if(e.inputType!=="formatBold")return;const t=window.getSelection(),o=!!(t&&B.isSelectionInsideBlok(t)),i=B.isEventTargetInsideBlok(e.target);!o&&!i||(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),B.normalizeAllBoldTags())}static exitCollapsedBold(e,t){const o=B.ensureStrongElement(t),i=o.parentNode;if(i)return B.isElementEmpty(o)?B.removeEmptyBoldElement(e,o,i):B.exitCollapsedBoldWithContent(e,o,i)}static removeEmptyBoldElement(e,t,o){const i=document.createRange();return i.setStartBefore(t),i.collapse(!0),o.removeChild(t),e.removeAllRanges(),e.addRange(i),i}static exitCollapsedBoldWithContent(e,t,o){var b,E,w,T,S,O;t.setAttribute(B.DATA_ATTR_COLLAPSED_LENGTH,((E=(b=t.textContent)==null?void 0:b.length)!=null?E:0).toString()),t.removeAttribute(B.DATA_ATTR_PREV_LENGTH),t.removeAttribute(B.DATA_ATTR_COLLAPSED_ACTIVE),t.removeAttribute(B.DATA_ATTR_LEADING_WHITESPACE);const i=t.nextSibling,l=!i||i.nodeType!==Node.TEXT_NODE,c=l?document.createTextNode(""):null;c&&o.insertBefore(c,i);const d=c!=null?c:i;!l&&((w=d.textContent)!=null?w:"").length===0&&(d.textContent="");const h=document.createRange(),v=((T=d.textContent)!=null?T:"").startsWith("")?1:0;h.setStart(d,v),h.collapse(!0),e.removeAllRanges(),e.addRange(h);const y=B.ensureStrongElement(t);return B.collapsedExitRecords.add({boundary:d,boldElement:y,allowedLength:(O=(S=y.textContent)==null?void 0:S.length)!=null?O:0,hasLeadingSpace:!1,hasTypedContent:!1,leadingWhitespace:""}),h}static getBoundaryBold(e){const t=e.startContainer;return t.nodeType===Node.TEXT_NODE?B.getBoundaryBoldForText(e,t):t.nodeType===Node.ELEMENT_NODE?B.getBoundaryBoldForElement(e,t):null}static getBoundaryBoldForText(e,t){var l,c;const o=(c=(l=t.textContent)==null?void 0:l.length)!=null?c:0;if(e.startOffset===o)return B.findBoldElement(t);if(e.startOffset!==0)return null;const i=t.previousSibling;return B.isBoldElement(i)?i:null}static getBoundaryBoldForElement(e,t){if(e.startOffset<=0)return null;const o=t.childNodes[e.startOffset-1];return B.isBoldElement(o)?o:null}static handleShortcut(e){var i;if(B.guardCollapsedBoundaryKeydown(e),!B.isBoldShortcut(e))return;const t=window.getSelection();if(!t||!t.rangeCount||!B.isSelectionInsideBlok(t))return;const o=(i=B.instances.values().next().value)!=null?i:new B;o&&(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),o.toggleBold())}static isBoldShortcut(e){return!((typeof navigator!="undefined"?navigator.userAgent.toLowerCase():"").includes("mac")?e.metaKey:e.ctrlKey)||e.altKey?!1:e.key.toLowerCase()==="b"}static isSelectionInsideBlok(e){const t=e.anchorNode;if(!t)return!1;const o=t.nodeType===Node.ELEMENT_NODE?t:t.parentElement;return!!(o!=null&&o.closest(qt))}static isEventTargetInsideBlok(e){var o;if(!e||typeof Node=="undefined")return!1;if(e instanceof Element)return!!e.closest(qt);if(e instanceof Text)return!!((o=e.parentElement)!=null&&o.closest(qt));if(typeof ShadowRoot!="undefined"&&e instanceof ShadowRoot)return B.isEventTargetInsideBlok(e.host);if(!(e instanceof Node))return!1;const t=e.parentNode;return t?t instanceof Element?!!t.closest(qt):B.isEventTargetInsideBlok(t):!1}getRangeHtmlWithoutBold(e){const t=e.cloneContents();this.removeNestedBold(t);const o=document.createElement("div");return o.appendChild(t),o.innerHTML}static createFragmentFromHtml(e){const t=document.createElement("template");return t.innerHTML=e,t.content}collectBoldAncestors(e){const t=new Set,o=document.createTreeWalker(e.commonAncestorContainer,NodeFilter.SHOW_TEXT,{acceptNode:i=>{try{return e.intersectsNode(i)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}catch(l){const c=document.createRange();c.selectNodeContents(i);const d=e.compareBoundaryPoints(Range.END_TO_START,c)>0,h=e.compareBoundaryPoints(Range.START_TO_END,c)<0;return d&&h?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}});for(;o.nextNode();){const i=B.findBoldElement(o.currentNode);i&&t.add(i)}return Array.from(t)}};B.isInline=!0,B.title="Bold",B.shortcutListenerRegistered=!1,B.selectionListenerRegistered=!1,B.inputListenerRegistered=!1,B.beforeInputListenerRegistered=!1,B.globalListenersInitialized=B.initializeGlobalListeners(),B.collapsedExitRecords=new Set,B.markerSequence=0,B.isProcessingMutation=!1,B.DATA_ATTR_COLLAPSED_LENGTH="data-blok-bold-collapsed-length",B.DATA_ATTR_COLLAPSED_ACTIVE="data-blok-bold-collapsed-active",B.DATA_ATTR_PREV_LENGTH="data-blok-bold-prev-length",B.DATA_ATTR_LEADING_WHITESPACE="data-blok-bold-leading-ws",B.instances=new Set,B.pendingBoundaryCaretAdjustments=new WeakSet;let Xd=B;const qs=class qs{static get sanitize(){return{i:{},em:{}}}render(){return{icon:YE,name:"italic",onActivate:()=>{this.toggleItalic()},isActive:()=>{const e=window.getSelection();return e?this.isSelectionVisuallyItalic(e):!1}}}get shortcut(){return"CMD+I"}toggleItalic(){const e=window.getSelection();if(!e||e.rangeCount===0)return;const t=e.getRangeAt(0);if(t.collapsed){this.toggleCollapsedItalic(t,e);return}this.isRangeItalic(t,{ignoreWhitespace:!0})?this.unwrapItalicTags(t):this.wrapWithItalic(t)}toggleCollapsedItalic(e,t){if(this.isRangeItalic(e,{ignoreWhitespace:!0})){const i=document.createTextNode("");e.insertNode(i),e.selectNode(i),this.unwrapItalicTags(e);const l=document.createRange();l.setStart(i,1),l.setEnd(i,1),t.removeAllRanges(),t.addRange(l)}else{const i=document.createElement("i"),l=document.createTextNode("");i.appendChild(l),e.insertNode(i);const c=document.createRange();c.setStart(l,1),c.setEnd(l,1),t.removeAllRanges(),t.addRange(c)}}isSelectionVisuallyItalic(e){if(!e||e.rangeCount===0)return!1;const t=e.getRangeAt(0);return this.isRangeItalic(t,{ignoreWhitespace:!0})}isRangeItalic(e,t){var l;if(e.collapsed)return!!this.findItalicElement(e.startContainer);const o=document.createTreeWalker(e.commonAncestorContainer,NodeFilter.SHOW_TEXT,{acceptNode:c=>{try{return e.intersectsNode(c)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}catch(d){const h=document.createRange();h.selectNodeContents(c);const g=e.compareBoundaryPoints(Range.END_TO_START,h)>0,v=e.compareBoundaryPoints(Range.START_TO_END,h)<0;return g&&v?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}}),i=[];for(;o.nextNode();){const c=o.currentNode,d=(l=c.textContent)!=null?l:"";t.ignoreWhitespace&&d.trim().length===0||d.length!==0&&i.push(c)}return i.length===0?!!this.findItalicElement(e.startContainer):i.every(c=>this.hasItalicParent(c))}wrapWithItalic(e){const t=this.getRangeHtmlWithoutItalic(e),o=this.replaceRangeWithHtml(e,`<i>${t}</i>`),i=window.getSelection();i&&o&&(i.removeAllRanges(),i.addRange(o))}unwrapItalicTags(e){const t=this.collectItalicAncestors(e),o=window.getSelection();if(!o)return;const i=document.createElement("span"),l=e.extractContents();i.appendChild(l),this.removeNestedItalic(i),e.insertNode(i);const c=document.createRange();for(c.selectNodeContents(i),o.removeAllRanges(),o.addRange(c);;){const v=this.findItalicElement(i);if(!v)break;this.moveMarkerOutOfItalic(i,v)}const d=i.firstChild,h=i.lastChild;this.unwrapElement(i),(d&&h?(()=>{const v=document.createRange();return v.setStartBefore(d),v.setEndAfter(h),o.removeAllRanges(),o.addRange(v),v})():void 0)||o.removeAllRanges(),t.forEach(v=>{var y;((y=v.textContent)!=null?y:"").length===0&&v.remove()})}hasItalicParent(e){return e?e.nodeType===Node.ELEMENT_NODE&&this.isItalicTag(e)?!0:this.hasItalicParent(e.parentNode):!1}findItalicElement(e){return e?e.nodeType===Node.ELEMENT_NODE&&this.isItalicTag(e)?e:this.findItalicElement(e.parentNode):null}isItalicTag(e){const t=e.tagName;return t==="I"||t==="EM"}collectItalicAncestors(e){const t=new Set,o=document.createTreeWalker(e.commonAncestorContainer,NodeFilter.SHOW_TEXT,{acceptNode:i=>{try{return e.intersectsNode(i)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}catch(l){const c=document.createRange();c.selectNodeContents(i);const d=e.compareBoundaryPoints(Range.END_TO_START,c)>0,h=e.compareBoundaryPoints(Range.START_TO_END,c)<0;return d&&h?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}});for(;o.nextNode();){const i=this.findItalicElement(o.currentNode);i&&t.add(i)}return Array.from(t)}getRangeHtmlWithoutItalic(e){const t=e.cloneContents();this.removeNestedItalic(t);const o=document.createElement("div");return o.appendChild(t),o.innerHTML}removeNestedItalic(e){var o;const t=(o=e.querySelectorAll)==null?void 0:o.call(e,"i,em");t&&t.forEach(i=>{this.unwrapElement(i)})}unwrapElement(e){const t=e.parentNode;if(!t){e.remove();return}for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}replaceRangeWithHtml(e,t){var d,h;const o=this.createFragmentFromHtml(t),i=(d=o.firstChild)!=null?d:null,l=(h=o.lastChild)!=null?h:null;if(e.deleteContents(),!i||!l)return;e.insertNode(o);const c=document.createRange();return c.setStartBefore(i),c.setEndAfter(l),c}createFragmentFromHtml(e){const t=document.createElement("template");return t.innerHTML=e,t.content}moveMarkerOutOfItalic(e,t){const o=t.parentNode;if(!o)return;if(Array.from(t.childNodes).forEach(h=>{var g;h.nodeType===Node.TEXT_NODE&&((g=h.textContent)!=null?g:"").length===0&&h.remove()}),t.childNodes.length===1&&t.firstChild===e){t.replaceWith(e);return}if(t.firstChild===e){o.insertBefore(e,t);return}if(t.lastChild===e){o.insertBefore(e,t.nextSibling);return}const d=t.cloneNode(!1);for(;e.nextSibling;)d.appendChild(e.nextSibling);o.insertBefore(d,t.nextSibling),o.insertBefore(e,d)}};qs.isInline=!0,qs.title="Italic";let Yd=qs;const yC=(Dr=class{constructor({api:e}){this.INPUT_BASE_CLASSES="hidden w-full m-0 px-2 py-1 text-sm leading-[22px] font-medium bg-item-hover-bg border border-[rgba(226,226,229,0.2)] rounded-md outline-none box-border appearance-none font-[inherit] placeholder:text-gray-text mobile:text-[15px] mobile:font-medium",this.DATA_ATTRIBUTES={buttonActive:"data-blok-link-tool-active",buttonUnlink:"data-blok-link-tool-unlink",inputOpened:"data-blok-link-tool-input-opened"},this.nodes={input:null,button:null},this.inputOpened=!1,this.unlinkAvailable=!1,this.handleButtonClick=t=>{!this.inputOpened||!this.unlinkAvailable||(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),this.restoreSelection(),this.unlink(),this.inlineToolbar.close())},this.toolbar=e.toolbar,this.inlineToolbar=e.inlineToolbar,this.notifier=e.notifier,this.i18n=e.i18n,this.selection=new se,this.nodes.input=this.createInput()}static get sanitize(){return{a:{href:!0,target:"_blank",rel:"nofollow"}}}render(){return{icon:QE,isActive:()=>!!this.selection.findParentTag("A"),children:{hideChevron:!0,items:[{type:tt.Html,element:this.nodes.input}],onOpen:()=>{this.openActions(!0)},onClose:()=>{this.closeActions()}}}}createInput(){const e=document.createElement("input");return e.placeholder=this.i18n.t("Add a link"),e.enterKeyHint="done",e.className=this.INPUT_BASE_CLASSES,e.setAttribute("data-blok-testid","inline-tool-input"),this.setBooleanStateAttribute(e,this.DATA_ATTRIBUTES.inputOpened,!1),e.addEventListener("keydown",t=>{t.key==="Enter"&&this.enterPressed(t)}),e}get shortcut(){return"CMD+K"}openActions(e=!1){if(!this.nodes.input)return;const t=this.selection.findParentTag("A"),o=!!t;if(this.updateButtonStateAttributes(o),this.unlinkAvailable=o,t){const i=t.getAttribute("href");this.nodes.input.value=i!==null?i:""}else this.nodes.input.value="";this.nodes.input.className=Ae(this.INPUT_BASE_CLASSES,"block"),this.setBooleanStateAttribute(this.nodes.input,this.DATA_ATTRIBUTES.inputOpened,!0),this.selection.save(),e&&this.focusInputWithRetry(),this.inputOpened=!0}focusInputWithRetry(){this.nodes.input&&(this.nodes.input.focus(),!(typeof window=="undefined"||typeof document=="undefined")&&window.setTimeout(()=>{var e;document.activeElement!==this.nodes.input&&((e=this.nodes.input)==null||e.focus())},0))}getButtonElement(){if(this.nodes.button&&document.contains(this.nodes.button))return this.nodes.button;const e=document.querySelector(`${zv} [data-blok-item-name="link"]`);return e&&e.addEventListener("click",this.handleButtonClick,!0),this.nodes.button=e!=null?e:null,this.nodes.button}updateButtonStateAttributes(e){const t=this.getButtonElement();if(!t)return;const o=typeof e=="boolean"?e:!!this.selection.findParentTag("A");this.setBooleanStateAttribute(t,this.DATA_ATTRIBUTES.buttonActive,o),this.setBooleanStateAttribute(t,this.DATA_ATTRIBUTES.buttonUnlink,o)}closeActions(e=!0){(this.selection.isFakeBackgroundEnabled||e&&this.selection.savedSelectionRange)&&this.restoreSelection(),this.nodes.input&&(this.nodes.input.className=this.INPUT_BASE_CLASSES,this.setBooleanStateAttribute(this.nodes.input,this.DATA_ATTRIBUTES.inputOpened,!1),this.nodes.input.value="",this.updateButtonStateAttributes(!1),this.unlinkAvailable=!1,e&&this.selection.clearSaved(),this.inputOpened=!1)}restoreSelection(){const e=new se,t=se.isAtBlok;if(t&&e.save(),this.selection.removeFakeBackground(),this.selection.restore(),!t&&this.selection.savedSelectionRange){const l=this.selection.savedSelectionRange.commonAncestorContainer,c=l.nodeType===Node.ELEMENT_NODE?l:l.parentElement;c==null||c.focus()}if(!t)return;e.restore();const o=e.savedSelectionRange;if(o){const i=o.commonAncestorContainer,l=i.nodeType===Node.ELEMENT_NODE?i:i.parentElement;l==null||l.focus()}}enterPressed(e){if(!this.nodes.input)return;const t=this.nodes.input.value||"";if(!t.trim()){this.selection.restore(),this.unlink(),e.preventDefault(),this.closeActions(),this.inlineToolbar.close();return}if(!this.validateURL(t)){this.notifier.show({message:"Pasted link is not valid.",style:"error"}),Ce("Incorrect Link pasted","warn",t);return}const o=this.prepareLink(t);this.selection.removeFakeBackground(),this.selection.restore(),this.insertLink(o),e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),this.selection.collapseToEnd(),this.inlineToolbar.close()}validateURL(e){return!/\s/.test(e)}prepareLink(e){return this.addProtocol(e.trim())}addProtocol(e){if(/^(\w+):(\/\/)?/.test(e))return e;const t=/^\/[^/\s]/.test(e),o=e.substring(0,1)==="#",i=/^\/\/[^/\s]/.test(e);return!t&&!o&&!i?"http://"+e:e}insertLink(e){const t=this.selection.findParentTag("A");if(t){this.selection.expandToTag(t),t.href=e,t.target="_blank",t.rel="nofollow";return}const o=se.range;if(!o)return;const i=document.createElement("a");i.href=e,i.target="_blank",i.rel="nofollow",i.appendChild(o.extractContents()),o.insertNode(i),this.selection.expandToTag(i)}unlink(){const e=this.selection.findParentTag("A");e&&(this.unwrap(e),this.updateButtonStateAttributes(!1),this.unlinkAvailable=!1)}unwrap(e){var o;const t=document.createDocumentFragment();for(;e.firstChild;)t.appendChild(e.firstChild);(o=e.parentNode)==null||o.replaceChild(t,e)}setBooleanStateAttribute(e,t,o){e&&e.setAttribute(t,o?"true":"false")}},Dr.isInline=!0,Dr.title="Link",Dr),rf=class rf{constructor({api:e}){this.i18nAPI=e.i18n,this.blocksAPI=e.blocks,this.selectionAPI=e.selection,this.toolsAPI=e.tools,this.caretAPI=e.caret}async render(){var g;const e=se.get();if(e===null)return[];const t=this.blocksAPI.getBlockByElement(e.anchorNode);if(t===void 0)return[];const o=this.toolsAPI.getBlockTools(),i=await Xv(t,o);if(i.length===0)return[];const l=i.reduce((v,y)=>{var b;return(b=y.toolbox)==null||b.forEach(E=>{E.title!==void 0&&v.push({icon:E.icon,title:$e.t(it.toolNames,E.title),name:y.name,closeOnActivate:!0,onActivate:async()=>{const w=await this.blocksAPI.convert(t.id,y.name,E.data);this.caretAPI.setToBlock(w,"end")}})}),v},[]),c=await t.getActiveToolboxEntry(),d=(g=c==null?void 0:c.title)!=null?g:t.name,h=!Gn();return{name:"convert-to",title:$e.t(it.toolNames,d),hint:{title:$e.ui(it.ui.inlineToolbar.converter,"Convert to")},children:{searchable:h,items:l,onOpen:()=>{h&&(this.selectionAPI.setFakeBackground(),this.selectionAPI.save())},onClose:()=>{h&&(this.selectionAPI.restore(),this.selectionAPI.removeFakeBackground())}}}}};rf.isInline=!0;let Qd=rf;const of=class of{constructor({data:e,api:t}){this.api=t,this.title=e.title||this.api.i18n.t("Error"),this.subtitle=this.api.i18n.t("The block can not be displayed correctly."),this.savedData=e.savedData,this.wrapper=this.make()}render(){return this.wrapper}save(){return this.savedData}make(){const e=R.make("div","flex items-center py-3 px-[18px] my-2.5 rounded-[10px] bg-bg-light border border-line-gray text-gray-text text-sm [&_svg]:size-icon"),t=fS,o=R.make("div","ml-3.5"),i=R.make("div","font-medium capitalize",{textContent:this.title}),l=R.make("div","",{textContent:this.subtitle});return e.setAttribute(Xu,"stub"),e.setAttribute(qx,""),o.setAttribute(Ux,""),i.setAttribute(Wx,""),l.setAttribute(Kx,""),e.innerHTML=t,o.appendChild(i),o.appendChild(l),e.appendChild(o),e}};of.isReadOnlySupported=!0;let Zd=of;class bC extends Sd{constructor(){super(...arguments),this.type=Ar.Inline}getMissingMethods(e){const t=this.constructable,o=t==null?void 0:t.prototype;return o?e.filter(i=>typeof o[i]!="function"):[...e]}create(){const e=this.constructable;return new e({api:this.api,config:this.settings})}get isReadOnlySupported(){var t;const e=this.constructable;return(t=e==null?void 0:e.isReadOnlySupported)!=null?t:!1}get title(){return this.constructable.title||""}}class kC extends Sd{constructor(){super(...arguments),this.type=Ar.Tune}create(e,t){const o=this.constructable;return new o({api:this.api,config:this.settings,block:t,data:e})}}class xt extends Map{get blockTools(){const e=Array.from(this.entries()).filter(([,t])=>t.isBlock());return new xt(e)}get inlineTools(){const e=Array.from(this.entries()).filter(([,t])=>t.isInline());return new xt(e)}get blockTunes(){const e=Array.from(this.entries()).filter(([,t])=>t.isTune());return new xt(e)}get internalTools(){const e=Array.from(this.entries()).filter(([,t])=>t.isInternal);return new xt(e)}get externalTools(){const e=Array.from(this.entries()).filter(([,t])=>!t.isInternal);return new xt(e)}}class wC extends Sd{constructor(){super(...arguments),this.type=Ar.Block,this.inlineTools=new xt,this.tunes=new xt}create(e,t,o){return new this.constructable({data:e,block:t,readOnly:o,api:this.api,config:this.settings})}get isReadOnlySupported(){return this.constructable[oo.IsReadOnlySupported]===!0}get isLineBreaksEnabled(){var e;return(e=this.constructable[oo.IsEnabledLineBreaks])!=null?e:!1}get toolbox(){const e=this.constructable[oo.Toolbox],t=this.config[ws.Toolbox];if(!(!e||ot(e))&&t!==!1)return t==null?Array.isArray(e)?e:[e]:!Array.isArray(t)&&Array.isArray(e)?[t]:Array.isArray(t)?Array.isArray(e)?t.map((o,i)=>{const l=e[i];return l?be(be({},l),o):o}):t:[be(be({},e),t)]}get conversionConfig(){return this.constructable[oo.ConversionConfig]}get enabledInlineTools(){return this.config[ws.EnabledInlineTools]||!1}get enabledBlockTunes(){return this.config[ws.EnabledBlockTunes]}get pasteConfig(){var e;return(e=this.constructable[oo.PasteConfig])!=null?e:{}}get hasOnPasteHandler(){var t;const e=(t=this.constructable)==null?void 0:t.prototype;return typeof(e==null?void 0:e.onPaste)=="function"}get sanitizeConfig(){if(this._sanitizeConfig)return this._sanitizeConfig;const e=super.sanitizeConfig,t=this.baseSanitizeConfig;if(ot(e))return this._sanitizeConfig=t,t;const o={};for(const i in e){if(!Object.prototype.hasOwnProperty.call(e,i))continue;const l=e[i];qe(l)?o[i]=Object.assign({},t,l):o[i]=l}return this._sanitizeConfig=o,o}get baseSanitizeConfig(){if(this._baseSanitizeConfig)return this._baseSanitizeConfig;const e={};return Array.from(this.inlineTools.values()).forEach(t=>Object.assign(e,t.sanitizeConfig)),Array.from(this.tunes.values()).forEach(t=>Object.assign(e,t.sanitizeConfig)),this._baseSanitizeConfig=e,e}}class TC{constructor(e,t,o){this.api=o,this.config=e,this.blokConfig=t}get(e){const h=this.config[e],{class:t,isInternal:o=!1}=h,i=n0(h,["class","isInternal"]),l=t;if(l===void 0)throw new Error(`Tool "${e}" does not provide a class.`);const c=this.getConstructor(l),d=!!Reflect.get(l,Ed.IsTune);return new c({name:e,constructable:l,config:i,api:this.api.getMethodsForTool(e,d),isDefault:e===this.blokConfig.defaultBlock,defaultPlaceholder:this.blokConfig.placeholder,isInternal:o})}getConstructor(e){switch(!0){case!!Reflect.get(e,xy.IsInline):return bC;case!!Reflect.get(e,Ed.IsTune):return kC;default:return wC}}}const sf=class sf{constructor({api:e}){this.api=e}render(){return{icon:GE,title:this.api.i18n.t("Delete"),name:"delete",confirmation:{title:this.api.i18n.t("Click to delete"),onActivate:()=>this.handleClick()}}}handleClick(){this.api.blocks.delete()}};sf.isTune=!0;let Jd=sf;const Rr=a=>{if(!De(a))throw new Error("Tool constructable must be a function");return a};class xC extends Be{constructor(){super(...arguments),this.stubTool="stub",this.factory=null,this.toolsAvailable=new xt,this.toolsUnavailable=new xt,this.inlineToolsSanitizeConfigCache=null}get available(){return this.toolsAvailable}get unavailable(){return this.toolsUnavailable}get inlineTools(){return this.available.inlineTools}get blockTools(){return this.available.blockTools}get blockTunes(){return this.available.blockTunes}get defaultTool(){const e=this.config.defaultBlock;if(!e)throw new Error("Default block tool name is not configured");const t=this.blockTools.get(e);if(!t)throw new Error(`Default block tool "${e}" not found in available block tools`);return t}get internal(){return this.available.internalTools}async prepare(){var h;const e=(h=this.config.tools)!=null?h:{};this.config.tools=Uo({},this.internalTools,e),this.validateTools();const t=this.config.tools;if(!t||Object.keys(t).length===0)throw Error("Can't start without tools");const o=this.prepareConfig(t);this.factory=new TC(o,this.config,this.Blok.API);const i=this.getListOfPrepareFunctions(o);if(i.length===0)return Promise.resolve();const l=g=>{this.isToolPrepareData(g)&&this.toolPrepareMethodSuccess({toolName:g.toolName})},c=g=>{this.isToolPrepareData(g)&&this.toolPrepareMethodFallback({toolName:g.toolName})},d=new tb;i.forEach(g=>{d.add(async()=>{const v=I1(g.data)?{}:g.data;try{await g.function(g.data),l(v)}catch(y){c(v)}})}),await d.completed,this.prepareBlockTools()}getAllInlineToolsSanitizeConfig(){if(this.inlineToolsSanitizeConfigCache)return this.inlineToolsSanitizeConfigCache;const e={};return Array.from(this.inlineTools.values()).forEach(t=>{Object.assign(e,t.sanitizeConfig)}),this.inlineToolsSanitizeConfigCache=e,e}destroy(){for(const e of this.available.values()){const t=(()=>{try{return e.reset()}catch(o){Ce(`Tool "${e.name}" reset failed`,"warn",o);return}})();t instanceof Promise&&t.catch(o=>{Ce(`Tool "${e.name}" reset failed`,"warn",o)})}}get internalTools(){return{convertTo:{class:Rr(Qd),isInternal:!0},link:{class:Rr(yC),isInternal:!0},bold:{class:Rr(Xd),isInternal:!0},italic:{class:Rr(Yd),isInternal:!0},paragraph:{class:Rr(Hs),inlineToolbar:!0,config:{preserveBlank:!0},isInternal:!0},stub:{class:Rr(Zd),isInternal:!0},delete:{class:Rr(Jd),isInternal:!0}}}toolPrepareMethodSuccess(e){const t=this.getFactory().get(e.toolName);if(!t.isInline()){this.toolsAvailable.set(t.name,t);return}const o=["render"],i=t.getMissingMethods(o);if(i.length){Ce(`Incorrect Inline Tool: ${t.name}. Some of required methods is not implemented %o`,"warn",i),this.toolsUnavailable.set(t.name,t);return}this.toolsAvailable.set(t.name,t)}toolPrepareMethodFallback(e){const t=this.getFactory();this.toolsUnavailable.set(e.toolName,t.get(e.toolName))}getListOfPrepareFunctions(e){return Object.entries(e).map(([t,o])=>{var c;const i={toolName:t,config:(c=o.config)!=null?c:{}};return{function:async d=>{const h=o.class;if(!h||!De(h.prepare))return;const g=d!=null?d:i;return h.prepare.call(h,g)},data:i}})}prepareBlockTools(){Array.from(this.blockTools.values()).forEach(e=>{this.assignInlineToolsToBlockTool(e),this.assignBlockTunesToBlockTool(e)})}assignInlineToolsToBlockTool(e){const t=e;if(this.config.inlineToolbar!==!1){if(t.enabledInlineTools===!0){const o=Array.isArray(this.config.inlineToolbar)?this.createInlineToolsCollection(this.config.inlineToolbar):new xt(Array.from(this.inlineTools.entries()));t.inlineTools=o;return}if(Array.isArray(t.enabledInlineTools)){const o=this.createInlineToolsCollection(["convertTo",...t.enabledInlineTools]);t.inlineTools=o}}}assignBlockTunesToBlockTool(e){const t=e;if(t.enabledBlockTunes!==!1){if(Array.isArray(t.enabledBlockTunes)){const o=this.createBlockTunesCollection(t.enabledBlockTunes),i=[...Array.from(o.entries()),...Array.from(this.blockTunes.internalTools.entries())];t.tunes=new xt(i);return}if(Array.isArray(this.config.tunes)){const o=this.createBlockTunesCollection(this.config.tunes),i=[...Array.from(o.entries()),...Array.from(this.blockTunes.internalTools.entries())];t.tunes=new xt(i);return}t.tunes=new xt(Array.from(this.blockTunes.internalTools.entries()))}}validateTools(){const e=this.config.tools;if(!e)return;const t=this.internalTools;for(const o in e){if(!Object.prototype.hasOwnProperty.call(e,o)||o in t)continue;const i=e[o],l=De(i),d=De(i.class);if(!l&&!d)throw new Wo(`Tool «${o}» must be a constructor function or an object with function in the «class» property`)}}prepareConfig(e){const t={};for(const o in e){if(!Object.prototype.hasOwnProperty.call(e,o))continue;const i=e[o];if(qe(i)){t[o]=i;continue}t[o]={class:i}}return t}isToolPrepareData(e){const t=e;return typeof(t==null?void 0:t.toolName)=="string"}getFactory(){if(this.factory===null)throw new Error("Tools factory is not initialized");return this.factory}createInlineToolsCollection(e){const t=[];for(const o of e){const i=this.inlineTools.get(o);if(!i){Ce(`Inline tool "${o}" is not available and will be skipped`,"warn");continue}t.push([o,i])}return new xt(t)}createBlockTunesCollection(e){const t=[];for(const o of e){const i=this.blockTunes.get(o);if(!i){Ce(`Block tune "${o}" is not available and will be skipped`,"warn");continue}t.push([o,i])}return new xt(t)}}const EC=`*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:PT Mono,Menlo,Monaco,Consolas,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.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;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([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}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.\\!container{width:100%!important}.container{width:100%}@media(min-width:640px){.\\!container{max-width:640px!important}.container{max-width:640px}}@media(min-width:651px){.\\!container{max-width:651px!important}.container{max-width:651px}}@media(min-width:768px){.\\!container{max-width:768px!important}.container{max-width:768px}}@media(min-width:1024px){.\\!container{max-width:1024px!important}.container{max-width:1024px}}@media(min-width:1280px){.\\!container{max-width:1280px!important}.container{max-width:1280px}}@media(min-width:1536px){.\\!container{max-width:1536px!important}.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.inset-\\[auto_var\\(--offset\\)_calc\\(var\\(--offset\\)\\+env\\(safe-area-inset-bottom\\)\\)_var\\(--offset\\)\\]{inset:auto var(--offset) calc(var(--offset) + env(safe-area-inset-bottom)) var(--offset)}.bottom-0{bottom:0}.bottom-5{bottom:1.25rem}.left-0{left:0}.left-5{left:1.25rem}.left-\\[var\\(--popover-left\\)\\]{left:var(--popover-left)}.right-0{right:0}.right-\\[15px\\]{right:15px}.right-full{right:100%}.top-0{top:0}.top-\\[7px\\]{top:7px}.top-\\[var\\(--popover-top\\)\\]{top:var(--popover-top)}.z-0{z-index:0}.z-\\[1\\]{z-index:1}.z-\\[2\\]{z-index:2}.z-\\[3\\]{z-index:3}.z-\\[4\\]{z-index:4}.z-overlay{z-index:999}.m-0{margin:0}.mx-auto{margin-left:auto;margin-right:auto}.my-2\\.5{margin-top:.625rem;margin-bottom:.625rem}.my-4{margin-top:1rem;margin-bottom:1rem}.\\!mr-0{margin-right:0!important}.\\!mr-2{margin-right:.5rem!important}.mb-1\\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-\\[30px\\]{margin-bottom:30px}.mb-px{margin-bottom:1px}.ml-3\\.5{margin-left:.875rem}.mr-2{margin-right:.5rem}.mr-auto{margin-right:auto}.mt-1{margin-top:.25rem}.mt-\\[15px\\]{margin-top:15px}.mt-\\[3px\\]{margin-top:3px}.mt-\\[5px\\]{margin-top:5px}.box-border{box-sizing:border-box}.\\!block{display:block!important}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.\\!hidden{display:none!important}.hidden{display:none}.h-2\\.5{height:.625rem}.h-9{height:2.25rem}.h-\\[26px\\]{height:26px}.h-\\[50px\\]{height:50px}.h-auto{height:auto}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-px{height:1px}.h-toolbox-btn{height:26px}.max-h-0{max-height:0px}.max-h-\\[var\\(--max-height\\)\\]{max-height:var(--max-height)}.min-h-toolbox-btn{min-height:26px}.w-2\\.5{width:.625rem}.w-7{width:1.75rem}.w-9{width:2.25rem}.w-\\[230px\\]{width:230px}.w-\\[26px\\]{width:26px}.w-\\[var\\(--width\\)\\]{width:var(--width)}.w-auto{width:auto}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-px{width:1px}.w-toolbox-btn{width:26px}.min-w-\\[calc\\(100\\%-theme\\(\\'spacing\\.6\\'\\)-10px\\)\\]{min-width:calc(100% - 1.5rem - 10px)}.min-w-\\[calc\\(100\\%-var\\(--offset\\)\\*2\\)\\]{min-width:calc(100% - var(--offset) * 2)}.min-w-\\[var\\(--width\\)\\]{min-width:var(--width)}.min-w-max{min-width:-moz-max-content;min-width:max-content}.min-w-toolbox-btn{min-width:26px}.max-w-\\[1100px\\]{max-width:1100px}.max-w-\\[130px\\]{max-width:130px}.max-w-content{max-width:650px}.max-w-none{max-width:none}.shrink-0{flex-shrink:0}.-translate-x-\\[5px\\]{--tw-translate-x: -5px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-\\[5px\\]{--tw-translate-y: -5px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\\[5px\\]{--tw-translate-x: 5px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\\[5px\\]{--tw-translate-y: 5px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-none{transform:none}@keyframes panelShowingMobile{0%{opacity:0;transform:translateY(14px) scale(.98)}70%{opacity:1;transform:translateY(-4px)}to{transform:translateY(0)}}.animate-\\[panelShowingMobile_250ms_ease\\]{animation:panelShowingMobile .25s ease}@keyframes panelShowing{0%{opacity:0;transform:translateY(-8px) scale(.9)}70%{opacity:1;transform:translateY(2px)}to{transform:translateY(0)}}.animate-\\[panelShowing_100ms_ease\\]{animation:panelShowing .1s ease}@keyframes buttonClicked{0%{transform:scale3d(.95,.95,.95)}60%{transform:scale3d(1.02,1.02,1.02)}80%,to{transform:scaleZ(1)}}.animate-button-clicked{animation:buttonClicked .75s cubic-bezier(.215,.61,.355,1) forwards}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.animate-fade-in{animation:fade-in .3s ease forwards}.animate-none{animation:none}@keyframes notifyBounceIn{0%{opacity:0;transform:scale(.3)}50%{opacity:1;transform:scale(1.05)}70%{transform:scale(.9)}to{transform:scale(1)}}.animate-notify-bounce-in{animation:notifyBounceIn .6s 1}@keyframes wobble{0%{transform:translateZ(0)}15%{transform:translate3d(-9%,0,0)}30%{transform:translate3d(9%,0,0)}45%{transform:translate3d(-4%,0,0)}60%{transform:translate3d(4%,0,0)}75%{transform:translate3d(-1%,0,0)}to{transform:translateZ(0)}}.animate-wobble{animation:wobble .4s}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.resize{resize:both}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-\\[auto_auto_1fr\\]{grid-template-columns:auto auto 1fr}.grid-rows-\\[auto\\]{grid-template-rows:auto}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.items-center{align-items:center}.justify-center{justify-content:center}.gap-2{gap:.5rem}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-\\[10px\\]{border-radius:10px}.rounded-\\[3px\\]{border-radius:3px}.rounded-\\[5px\\]{border-radius:5px}.rounded-\\[7px\\]{border-radius:7px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.border{border-width:1px}.border-0{border-width:0px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-none{border-style:none}.border-\\[\\#e8e8eb\\]{--tw-border-opacity: 1;border-color:rgb(232 232 235 / var(--tw-border-opacity, 1))}.border-\\[rgba\\(226\\,226\\,229\\,0\\.2\\)\\],.border-\\[rgba\\(226\\,226\\,229\\,0\\.20\\)\\]{border-color:#e2e2e533}.border-line-gray,.border-popover-border{--tw-border-opacity: 1;border-color:rgb(239 240 241 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.\\!bg-\\[\\#fafffe\\]{--tw-bg-opacity: 1 !important;background-color:rgb(250 255 254 / var(--tw-bg-opacity, 1))!important}.\\!bg-\\[\\#fffbfb\\]{--tw-bg-opacity: 1 !important;background-color:rgb(255 251 251 / var(--tw-bg-opacity, 1))!important}.\\!bg-item-confirm-bg{--tw-bg-opacity: 1 !important;background-color:rgb(226 74 74 / var(--tw-bg-opacity, 1))!important}.\\!bg-item-focus-bg{background-color:#22baff14!important}.bg-\\[\\#34c992\\]{--tw-bg-opacity: 1;background-color:rgb(52 201 146 / var(--tw-bg-opacity, 1))}.bg-\\[\\#F8F8F8\\]{--tw-bg-opacity: 1;background-color:rgb(248 248 248 / var(--tw-bg-opacity, 1))}.bg-\\[\\#eff1f4\\]{--tw-bg-opacity: 1;background-color:rgb(239 241 244 / var(--tw-bg-opacity, 1))}.bg-\\[\\#f2f5f7\\]{--tw-bg-opacity: 1;background-color:rgb(242 245 247 / var(--tw-bg-opacity, 1))}.bg-\\[\\#f7f7f7\\]{--tw-bg-opacity: 1;background-color:rgb(247 247 247 / var(--tw-bg-opacity, 1))}.bg-bg-light{--tw-bg-opacity: 1;background-color:rgb(239 242 245 / var(--tw-bg-opacity, 1))}.bg-dark{--tw-bg-opacity: 1;background-color:rgb(29 32 43 / var(--tw-bg-opacity, 1))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-icon-active-bg{background-color:#388ae51a}.bg-item-focus-bg{background-color:#22baff14}.bg-item-hover-bg{--tw-bg-opacity: 1;background-color:rgb(248 248 248 / var(--tw-bg-opacity, 1))}.bg-popover-bg{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-popover-border{--tw-bg-opacity: 1;background-color:rgb(239 240 241 / var(--tw-bg-opacity, 1))}.bg-selection{--tw-bg-opacity: 1;background-color:rgb(225 242 255 / var(--tw-bg-opacity, 1))}.bg-selection-highlight{background-color:#2eaadc33}.bg-tooltip-bg{--tw-bg-opacity: 1;background-color:rgb(29 32 43 / var(--tw-bg-opacity, 1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.p-0{padding:0}.p-0\\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\\.5{padding:.375rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-\\[13px\\]{padding:13px}.p-\\[3px\\]{padding:3px}.p-\\[5px\\]{padding:5px}.p-\\[var\\(--item-padding\\)\\]{padding:var(--item-padding)}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-\\[18px\\]{padding-left:18px;padding-right:18px}.px-\\[30px\\]{padding-left:30px;padding-right:30px}.px-\\[3px\\]{padding-left:3px;padding-right:3px}.py-0{padding-top:0;padding-bottom:0}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-\\[0\\.6em\\]{padding-top:.6em;padding-bottom:.6em}.py-\\[13px\\]{padding-top:13px;padding-bottom:13px}.py-\\[3px\\]{padding-top:3px;padding-bottom:3px}.py-\\[5px\\]{padding-top:5px;padding-bottom:5px}.py-\\[theme\\(spacing\\.block-padding-vertical\\)\\]{padding-top:.4em;padding-bottom:.4em}.pb-\\[3px\\]{padding-bottom:3px}.pr-1\\.5{padding-right:.375rem}.pr-\\[5px\\]{padding-right:5px}.text-center{text-align:center}.text-start{text-align:start}.align-bottom{vertical-align:bottom}.font-\\[-apple-system\\,BlinkMacSystemFont\\,\\"Segoe_UI\\"\\,\\"Roboto\\"\\,\\"Oxygen\\"\\,\\"Ubuntu\\"\\,\\"Cantarell\\"\\,\\"Fira_Sans\\"\\,\\"Droid_Sans\\"\\,\\"Helvetica_Neue\\"\\,sans-serif\\]{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}.font-\\[inherit\\]{font-family:inherit}.font-sans{font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.text-\\[1\\.25em\\]{font-size:1.25em}.text-\\[1\\.5em\\]{font-size:1.5em}.text-\\[1\\.75em\\]{font-size:1.75em}.text-\\[13px\\]{font-size:13px}.text-\\[14\\.9px\\]{font-size:14.9px}.text-\\[2\\.5em\\]{font-size:2.5em}.text-\\[2em\\]{font-size:2em}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-5{line-height:1.25rem}.leading-\\[1\\.25em\\]{line-height:1.25em}.leading-\\[1\\.4em\\]{line-height:1.4em}.leading-\\[1\\.6em\\]{line-height:1.6em}.leading-\\[1em\\]{line-height:1em}.leading-\\[22px\\]{line-height:22px}.leading-\\[50px\\]{line-height:50px}.leading-normal{line-height:1.5}.leading-relaxed{line-height:1.625}.-tracking-widest{letter-spacing:-.1em}.tracking-\\[0\\.02em\\]{letter-spacing:.02em}.\\!text-white{--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity, 1))!important}.text-\\[\\#656b7c\\]{--tw-text-opacity: 1;color:rgb(101 107 124 / var(--tw-text-opacity, 1))}.text-active-icon{--tw-text-opacity: 1;color:rgb(56 138 229 / var(--tw-text-opacity, 1))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-dark{--tw-text-opacity: 1;color:rgb(29 32 43 / var(--tw-text-opacity, 1))}.text-gray-text{--tw-text-opacity: 1;color:rgb(112 118 132 / var(--tw-text-opacity, 1))}.text-icon-active-text{--tw-text-opacity: 1;color:rgb(56 138 229 / var(--tw-text-opacity, 1))}.text-inherit{color:inherit}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-text-primary{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-text-secondary{--tw-text-opacity: 1;color:rgb(112 118 132 / var(--tw-text-opacity, 1))}.text-tooltip-font{--tw-text-opacity: 1;color:rgb(205 209 224 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.no-underline{text-decoration-line:none}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-55{opacity:.55}.opacity-60{opacity:.6}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_11px_17px_0_rgba\\(23\\,32\\,61\\,0\\.13\\)\\]{--tw-shadow: 0 11px 17px 0 rgba(23,32,61,.13);--tw-shadow-colored: 0 11px 17px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_1px_1px_0_rgba\\(18\\,49\\,35\\,0\\.05\\)\\]{--tw-shadow: 0 1px 1px 0 rgba(18,49,35,.05);--tw-shadow-colored: 0 1px 1px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_2px_1px_0_rgba\\(16\\,19\\,29\\,0\\)\\]{--tw-shadow: 0 2px 1px 0 rgba(16,19,29,0);--tw-shadow-colored: 0 2px 1px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_3px_15px_-3px_theme\\(colors\\.popover-shadow\\)\\]{--tw-shadow: 0 3px 15px -3px rgba(13, 20, 33, .1);--tw-shadow-colored: 0 3px 15px -3px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-button-base{--tw-shadow: 0 2px 2px 0 rgba(18, 30, 57, .04);--tw-shadow-colored: 0 2px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-button-focused{--tw-shadow: inset 0 0 0 1px rgba(7, 161, 227, .08);--tw-shadow-colored: inset 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-input{--tw-shadow: inset 0 1px 2px 0 rgba(35, 44, 72, .06);--tw-shadow-colored: inset 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-tooltip{--tw-shadow: 0 8px 12px 0 rgba(29, 32, 43, .17), 0 4px 5px -3px rgba(5, 6, 12, .49);--tw-shadow-colored: 0 8px 12px 0 var(--tw-shadow-color), 0 4px 5px -3px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[opacity\\,transform\\]{transition-property:opacity,transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-150{transition-duration:.15s}.duration-\\[120ms\\]{transition-duration:.12s}.duration-\\[250ms\\]{transition-duration:.25s}.duration-\\[50ms\\,70ms\\]{transition-duration:50ms,70ms}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-linear{transition-timing-function:linear}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.will-change-\\[opacity\\,left\\,top\\]{will-change:opacity,left,top}.will-change-\\[opacity\\,top\\,left\\]{will-change:opacity,top,left}.will-change-\\[opacity\\,top\\]{will-change:opacity,top}.will-change-\\[opacity\\]{will-change:opacity}.\\[direction\\:rtl\\]{direction:rtl}.placeholder\\:font-medium::-moz-placeholder{font-weight:500}.placeholder\\:font-medium::placeholder{font-weight:500}.placeholder\\:text-\\[\\#656b7c\\]::-moz-placeholder{--tw-text-opacity: 1;color:rgb(101 107 124 / var(--tw-text-opacity, 1))}.placeholder\\:text-\\[\\#656b7c\\]::placeholder{--tw-text-opacity: 1;color:rgb(101 107 124 / var(--tw-text-opacity, 1))}.placeholder\\:text-gray-text::-moz-placeholder{--tw-text-opacity: 1;color:rgb(112 118 132 / var(--tw-text-opacity, 1))}.placeholder\\:text-gray-text::placeholder{--tw-text-opacity: 1;color:rgb(112 118 132 / var(--tw-text-opacity, 1))}.before\\:absolute:before{content:var(--tw-content);position:absolute}.before\\:inset-0:before{content:var(--tw-content);inset:0}.before\\:left-0:before{content:var(--tw-content);left:0}.before\\:left-1\\/2:before{content:var(--tw-content);left:50%}.before\\:left-\\[9px\\]:before{content:var(--tw-content);left:9px}.before\\:top-0:before{content:var(--tw-content);top:0}.before\\:top-1\\/2:before{content:var(--tw-content);top:50%}.before\\:top-\\[5px\\]:before{content:var(--tw-content);top:5px}.before\\:-z-10:before{content:var(--tw-content);z-index:-10}.before\\:m-\\[3px\\]:before{content:var(--tw-content);margin:3px}.before\\:-ml-\\[11px\\]:before{content:var(--tw-content);margin-left:-11px}.before\\:-mt-\\[11px\\]:before{content:var(--tw-content);margin-top:-11px}.before\\:block:before{content:var(--tw-content);display:block}.before\\:h-3:before{content:var(--tw-content);height:.75rem}.before\\:h-\\[18px\\]:before{content:var(--tw-content);height:18px}.before\\:h-\\[calc\\(100\\%-6px\\)\\]:before{content:var(--tw-content);height:calc(100% - 6px)}.before\\:w-0\\.5:before{content:var(--tw-content);width:.125rem}.before\\:w-\\[18px\\]:before{content:var(--tw-content);width:18px}.before\\:w-\\[3px\\]:before{content:var(--tw-content);width:3px}.before\\:rotate-\\[-45deg\\]:before{content:var(--tw-content);--tw-rotate: -45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes rotation{0%{content:var(--tw-content);transform:rotate(0)}to{content:var(--tw-content);transform:rotate(360deg)}}.before\\:animate-rotation:before{content:var(--tw-content);animation:rotation 1.2s infinite linear}.before\\:rounded-\\[5px\\]:before{content:var(--tw-content);border-radius:5px}.before\\:rounded-full:before{content:var(--tw-content);border-radius:9999px}.before\\:rounded-lg:before{content:var(--tw-content);border-radius:.5rem}.before\\:border-2:before{content:var(--tw-content);border-width:2px}.before\\:border-line-gray:before{content:var(--tw-content);--tw-border-opacity: 1;border-color:rgb(239 240 241 / var(--tw-border-opacity, 1))}.before\\:border-l-active-icon:before{content:var(--tw-content);--tw-border-opacity: 1;border-left-color:rgb(56 138 229 / var(--tw-border-opacity, 1))}.before\\:\\!bg-\\[\\#41ffb1\\]:before{content:var(--tw-content);--tw-bg-opacity: 1 !important;background-color:rgb(65 255 177 / var(--tw-bg-opacity, 1))!important}.before\\:\\!bg-\\[\\#fb5d5d\\]:before{content:var(--tw-content);--tw-bg-opacity: 1 !important;background-color:rgb(251 93 93 / var(--tw-bg-opacity, 1))!important}.before\\:bg-\\[\\#575d67\\]:before{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(87 93 103 / var(--tw-bg-opacity, 1))}.before\\:bg-tooltip-bg:before{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(29 32 43 / var(--tw-bg-opacity, 1))}.before\\:bg-transparent:before{content:var(--tw-content);background-color:transparent}.before\\:content-\\[\\"\\"\\]:before{--tw-content: "";content:var(--tw-content)}.before\\:content-\\[\\\\\\'\\\\\\'\\]:before{--tw-content: \\'\\';content:var(--tw-content)}.after\\:absolute:after{content:var(--tw-content);position:absolute}.after\\:left-\\[9px\\]:after{content:var(--tw-content);left:9px}.after\\:top-\\[5px\\]:after{content:var(--tw-content);top:5px}.after\\:mx-3:after{content:var(--tw-content);margin-left:.75rem;margin-right:.75rem}.after\\:h-3:after{content:var(--tw-content);height:.75rem}.after\\:w-0\\.5:after{content:var(--tw-content);width:.125rem}.after\\:rotate-45:after{content:var(--tw-content);--tw-rotate: 45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.after\\:bg-\\[\\#575d67\\]:after{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(87 93 103 / var(--tw-bg-opacity, 1))}.after\\:text-\\[\\#ddd\\]:after{content:var(--tw-content);--tw-text-opacity: 1;color:rgb(221 221 221 / var(--tw-text-opacity, 1))}.after\\:content-\\[\\"\\"\\]:after{--tw-content: "";content:var(--tw-content)}.after\\:content-\\[\\'\\|\\'\\]:after{--tw-content: "|";content:var(--tw-content)}.first\\:mt-0:first-child{margin-top:0}.last\\:ml-2\\.5:last-child{margin-left:.625rem}.empty\\:before\\:pointer-events-none:empty:before{content:var(--tw-content);pointer-events:none}.empty\\:before\\:cursor-text:empty:before{content:var(--tw-content);cursor:text}.empty\\:before\\:text-gray-text:empty:before{content:var(--tw-content);--tw-text-opacity: 1;color:rgb(112 118 132 / var(--tw-text-opacity, 1))}.empty\\:before\\:content-\\[attr\\(data-blok-placeholder\\)\\]:empty:before{--tw-content: attr(data-blok-placeholder);content:var(--tw-content)}.empty\\:before\\:content-\\[attr\\(data-placeholder-active\\)\\]:empty:before{--tw-content: attr(data-placeholder-active);content:var(--tw-content)}.hover\\:bg-\\[\\#2db583\\]:hover{--tw-bg-opacity: 1;background-color:rgb(45 181 131 / var(--tw-bg-opacity, 1))}.hover\\:bg-\\[\\#e0e4eb\\]:hover{--tw-bg-opacity: 1;background-color:rgb(224 228 235 / var(--tw-bg-opacity, 1))}.hover\\:bg-\\[\\#e9ecee\\]:hover{--tw-bg-opacity: 1;background-color:rgb(233 236 238 / var(--tw-bg-opacity, 1))}.hover\\:bg-\\[\\#fbfcfe\\]:hover{--tw-bg-opacity: 1;background-color:rgb(251 252 254 / var(--tw-bg-opacity, 1))}.hover\\:opacity-100:hover{opacity:1}.hover\\:shadow-button-base-hover:hover{--tw-shadow: 0 1px 3px 0 rgba(18, 30, 57, .08);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\\:placeholder\\:text-\\[rgba\\(101\\,107\\,124\\,0\\.3\\)\\]:focus::-moz-placeholder{color:#656b7c4d}.focus\\:placeholder\\:text-\\[rgba\\(101\\,107\\,124\\,0\\.3\\)\\]:focus::placeholder{color:#656b7c4d}.active\\:cursor-grabbing:active{cursor:grabbing}.group[data-blok-dragging=true] .group-data-\\[blok-dragging\\=true\\]\\:pointer-events-none{pointer-events:none}.group[data-blok-rtl=true] .group-data-\\[blok-rtl\\=true\\]\\:left-\\[calc\\(-1\\*theme\\(width\\.toolbox-btn\\)\\)\\]{left:-26px}.group[data-blok-rtl=true] .group-data-\\[blok-rtl\\=true\\]\\:left-auto{left:auto}.group[data-blok-rtl=true] .group-data-\\[blok-rtl\\=true\\]\\:right-\\[calc\\(-1\\*theme\\(width\\.toolbox-btn\\)\\)\\]{right:-26px}.group[data-blok-rtl=true] .group-data-\\[blok-rtl\\=true\\]\\:right-auto{right:auto}.group[data-blok-dragging=true] .group-data-\\[blok-dragging\\=true\\]\\:cursor-grabbing{cursor:grabbing}@media(max-width:650px){.mobile\\:absolute{position:absolute}.mobile\\:right-auto{right:auto}.mobile\\:z-\\[2\\]{z-index:2}.mobile\\:hidden{display:none}.mobile\\:h-toolbox-btn-mobile{height:36px}.mobile\\:w-toolbox-btn-mobile{width:36px}.mobile\\:rounded-\\[6px\\]{border-radius:6px}.mobile\\:rounded-lg{border-radius:.5rem}.mobile\\:border{border-width:1px}.mobile\\:border-\\[\\#e8e8eb\\]{--tw-border-opacity: 1;border-color:rgb(232 232 235 / var(--tw-border-opacity, 1))}.mobile\\:bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.mobile\\:p-1{padding:.25rem}.mobile\\:text-\\[15px\\]{font-size:15px}.mobile\\:font-medium{font-weight:500}.mobile\\:shadow-overlay-pane{--tw-shadow: 0 3px 15px -3px rgba(13, 20, 33, .13);--tw-shadow-colored: 0 3px 15px -3px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.group[data-blok-rtl=true] .mobile\\:group-data-\\[blok-rtl\\=true\\]\\:ml-0{margin-left:0}.group[data-blok-rtl=true] .mobile\\:group-data-\\[blok-rtl\\=true\\]\\:mr-auto{margin-right:auto}.group[data-blok-rtl=true] .mobile\\:group-data-\\[blok-rtl\\=true\\]\\:pl-\\[10px\\]{padding-left:10px}.group[data-blok-rtl=true] .mobile\\:group-data-\\[blok-rtl\\=true\\]\\:pr-0{padding-right:0}}@media(min-width:651px){.not-mobile\\:w-6{width:1.5rem}.group[data-blok-narrow=true][data-blok-rtl=true] .not-mobile\\:group-data-\\[blok-narrow\\=true\\]\\:group-data-\\[blok-rtl\\=true\\]\\:left-0{left:0}.group[data-blok-narrow=true][data-blok-rtl=true] .not-mobile\\:group-data-\\[blok-narrow\\=true\\]\\:group-data-\\[blok-rtl\\=true\\]\\:left-\\[-5px\\]{left:-5px}.group[data-blok-narrow=true][data-blok-rtl=true] .not-mobile\\:group-data-\\[blok-narrow\\=true\\]\\:group-data-\\[blok-rtl\\=true\\]\\:left-\\[calc\\(-1\\*theme\\(spacing\\.narrow-mode-right-padding\\)-5px\\)\\]{left:-55px}.group[data-blok-narrow=true][data-blok-rtl=true] .not-mobile\\:group-data-\\[blok-narrow\\=true\\]\\:group-data-\\[blok-rtl\\=true\\]\\:right-\\[5px\\]{right:5px}.group[data-blok-narrow=true][data-blok-rtl=true] .not-mobile\\:group-data-\\[blok-narrow\\=true\\]\\:group-data-\\[blok-rtl\\=true\\]\\:right-auto{right:auto}.group[data-blok-narrow=true] .not-mobile\\:group-data-\\[blok-narrow\\=true\\]\\:left-\\[5px\\]{left:5px}.group[data-blok-narrow=true] .not-mobile\\:group-data-\\[blok-narrow\\=true\\]\\:right-\\[calc\\(-1\\*theme\\(spacing\\.narrow-mode-right-padding\\)-5px\\)\\]{right:-55px}.group[data-blok-narrow=true][data-blok-rtl=true] .not-mobile\\:group-data-\\[blok-narrow\\=true\\]\\:group-data-\\[blok-rtl\\=true\\]\\:ml-\\[theme\\(spacing\\.narrow-mode-right-padding\\)\\]{margin-left:50px}.group[data-blok-narrow=true][data-blok-rtl=true] .not-mobile\\:group-data-\\[blok-narrow\\=true\\]\\:group-data-\\[blok-rtl\\=true\\]\\:mr-0{margin-right:0}.group[data-blok-narrow=true] .not-mobile\\:group-data-\\[blok-narrow\\=true\\]\\:mr-\\[theme\\(spacing\\.narrow-mode-right-padding\\)\\]{margin-right:50px}}@media(hover:hover){.can-hover\\:hover\\:cursor-grab:hover{cursor:grab}.can-hover\\:hover\\:cursor-pointer:hover{cursor:pointer}.can-hover\\:hover\\:bg-bg-light:hover{--tw-bg-opacity: 1;background-color:rgb(239 242 245 / var(--tw-bg-opacity, 1))}.can-hover\\:hover\\:bg-item-hover-bg:hover{--tw-bg-opacity: 1;background-color:rgb(248 248 248 / var(--tw-bg-opacity, 1))}.group[data-blok-toolbox-opened=true] .group-data-\\[blok-toolbox-opened\\=true\\]\\:can-hover\\:hover\\:cursor-pointer:hover{cursor:pointer}}.\\[\\&\\:\\:-webkit-input-placeholder\\]\\:\\!leading-normal::-webkit-input-placeholder{line-height:1.5!important}.\\[\\&\\>p\\:first-of-type\\]\\:mt-0>p:first-of-type{margin-top:0}.\\[\\&\\>p\\:last-of-type\\]\\:mb-0>p:last-of-type{margin-bottom:0}.\\[\\&\\[data-blok-dragging\\=true\\]\\]\\:cursor-grabbing[data-blok-dragging=true]{cursor:grabbing}.\\[\\&\\[data-blok-empty\\=true\\]\\]\\:before\\:pointer-events-none[data-blok-empty=true]:before{content:var(--tw-content);pointer-events:none}.\\[\\&\\[data-blok-empty\\=true\\]\\]\\:before\\:cursor-text[data-blok-empty=true]:before{content:var(--tw-content);cursor:text}.\\[\\&\\[data-blok-empty\\=true\\]\\]\\:before\\:text-gray-text[data-blok-empty=true]:before{content:var(--tw-content);--tw-text-opacity: 1;color:rgb(112 118 132 / var(--tw-text-opacity, 1))}.\\[\\&\\[data-blok-empty\\=true\\]\\]\\:before\\:content-\\[attr\\(data-blok-placeholder\\)\\][data-blok-empty=true]:before{--tw-content: attr(data-blok-placeholder);content:var(--tw-content)}.\\[\\&\\[data-blok-focused\\=\\"true\\"\\]\\]\\:bg-item-focus-bg[data-blok-focused=true]{background-color:#22baff14}.\\[\\&\\[data-blok-force-hover\\]\\]\\:cursor-pointer[data-blok-force-hover]{cursor:pointer}.\\[\\&\\[data-blok-force-hover\\]\\]\\:bg-item-hover-bg[data-blok-force-hover]{--tw-bg-opacity: 1;background-color:rgb(248 248 248 / var(--tw-bg-opacity, 1))}.\\[\\&\\[data-blok-placeholder\\]\\]\\:before\\:pointer-events-none[data-blok-placeholder]:before{content:var(--tw-content);pointer-events:none}.\\[\\&\\[data-blok-placeholder\\]\\]\\:before\\:\\!static[data-blok-placeholder]:before{content:var(--tw-content);position:static!important}.\\[\\&\\[data-blok-placeholder\\]\\]\\:before\\:inline-block[data-blok-placeholder]:before{content:var(--tw-content);display:inline-block}.\\[\\&\\[data-blok-placeholder\\]\\]\\:before\\:w-0[data-blok-placeholder]:before{content:var(--tw-content);width:0px}.\\[\\&\\[data-blok-placeholder\\]\\]\\:before\\:whitespace-nowrap[data-blok-placeholder]:before{content:var(--tw-content);white-space:nowrap}.\\[\\&\\[data-blok-popover-item-no-hover\\]\\]\\:cursor-default[data-blok-popover-item-no-hover]{cursor:default}.\\[\\&\\[data-blok-popover-item-no-hover\\]\\]\\:hover\\:bg-transparent:hover[data-blok-popover-item-no-hover]{background-color:transparent}.\\[\\&\\[data-blok-toolbox-opened\\=true\\]_\\[contentEditable\\=true\\]\\[data-blok-placeholder\\]\\:focus\\]\\:before\\:\\!opacity-0[data-blok-toolbox-opened=true] [contentEditable=true][data-blok-placeholder]:focus:before{content:var(--tw-content);opacity:0!important}.\\[\\&\\[data-empty\\=true\\]\\]\\:before\\:pointer-events-none[data-empty=true]:before{content:var(--tw-content);pointer-events:none}.\\[\\&\\[data-empty\\=true\\]\\]\\:before\\:cursor-text[data-empty=true]:before{content:var(--tw-content);cursor:text}.\\[\\&\\[data-empty\\=true\\]\\]\\:before\\:text-gray-text[data-empty=true]:before{content:var(--tw-content);--tw-text-opacity: 1;color:rgb(112 118 132 / var(--tw-text-opacity, 1))}.\\[\\&\\[data-empty\\=true\\]\\]\\:before\\:content-\\[attr\\(data-placeholder-active\\)\\][data-empty=true]:before{--tw-content: attr(data-placeholder-active);content:var(--tw-content)}.\\[\\&_\\:\\:selection\\]\\:bg-selection-inline ::-moz-selection{--tw-bg-opacity: 1;background-color:rgb(212 236 255 / var(--tw-bg-opacity, 1))}.\\[\\&_\\:\\:selection\\]\\:bg-selection-inline ::selection{--tw-bg-opacity: 1;background-color:rgb(212 236 255 / var(--tw-bg-opacity, 1))}.\\[\\&_\\[contenteditable\\]\\:empty\\]\\:after\\:content-\\[\\"\\\\\\\\feff_\\"\\] [contenteditable]:empty:after{--tw-content: "\\\\feff ";content:var(--tw-content)}.\\[\\&_\\[contenteditable\\]\\]\\:select-none [contenteditable]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.\\[\\&_\\[data-blok-tool\\=stub\\]\\]\\:opacity-55 [data-blok-tool=stub]{opacity:.55}.\\[\\&_\\[hidden\\]\\]\\:\\!hidden [hidden]{display:none!important}.\\[\\&_a\\]\\:cursor-pointer a{cursor:pointer}.\\[\\&_a\\]\\:text-link a{--tw-text-opacity: 1;color:rgb(56 138 229 / var(--tw-text-opacity, 1))}.\\[\\&_a\\]\\:underline a{text-decoration-line:underline}.\\[\\&_b\\]\\:font-bold b{font-weight:700}.\\[\\&_div\\]\\:\\!m-0 div{margin:0!important}.\\[\\&_div\\]\\:\\!p-0 div{padding:0!important}.\\[\\&_i\\]\\:italic i{font-style:italic}.\\[\\&_img\\]\\:opacity-55 img{opacity:.55}.\\[\\&_p\\]\\:\\!m-0 p{margin:0!important}.\\[\\&_p\\]\\:\\!p-0 p{padding:0!important}.\\[\\&_path\\]\\:stroke-current path{stroke:currentColor}.\\[\\&_svg\\]\\:-mt-0\\.5 svg{margin-top:-.125rem}.\\[\\&_svg\\]\\:mr-\\[0\\.2em\\] svg{margin-right:.2em}.\\[\\&_svg\\]\\:block svg{display:block}.\\[\\&_svg\\]\\:size-icon svg{width:20px;height:20px}.\\[\\&_svg\\]\\:h-5 svg{height:1.25rem}.\\[\\&_svg\\]\\:h-6 svg{height:1.5rem}.\\[\\&_svg\\]\\:h-7 svg{height:1.75rem}.\\[\\&_svg\\]\\:h-auto svg{height:auto}.\\[\\&_svg\\]\\:h-icon svg{height:20px}.\\[\\&_svg\\]\\:max-h-full svg{max-height:100%}.\\[\\&_svg\\]\\:w-6 svg{width:1.5rem}.\\[\\&_svg\\]\\:w-7 svg{width:1.75rem}.\\[\\&_svg\\]\\:w-auto svg{width:auto}.\\[\\&_svg\\]\\:w-icon svg{width:20px}.\\[\\&_svg\\]\\:text-gray-text svg{--tw-text-opacity: 1;color:rgb(112 118 132 / var(--tw-text-opacity, 1))}@media(max-width:650px){.mobile\\:\\[\\&_svg\\]\\:h-icon-mobile svg{height:28px}.mobile\\:\\[\\&_svg\\]\\:w-icon-mobile svg{width:28px}}`;class SC extends Be{constructor(){super(...arguments),this.isMobile=!1,this.contentRectCache=null,this.resizeDebouncer=pv(()=>{this.windowResize()},200),this.selectionChangeDebounced=pv(()=>{this.selectionChanged()},Ex),this.documentTouchedListener=e=>{this.documentTouched(e)}}get contentRect(){if(this.contentRectCache!==null)return this.contentRectCache;const e=this.nodes.wrapper.querySelector('[data-blok-testid="block-content"]');return e?(this.contentRectCache=e.getBoundingClientRect(),this.contentRectCache):{width:650,left:0,right:0}}async prepare(){this.setIsMobile(),this.make(),this.loadStyles()}toggleReadOnly(e){if(e){this.unbindReadOnlySensitiveListeners();return}const t=()=>{this.bindReadOnlySensitiveListeners()};t();const o=window.requestIdleCallback;typeof o=="function"&&o(t,{timeout:2e3})}checkEmptiness(){const{BlockManager:e}=this.Blok;this.nodes.wrapper.setAttribute(Vx,e.isBlokEmpty?"true":"false")}get someToolbarOpened(){const{Toolbar:e,BlockSettings:t,InlineToolbar:o}=this.Blok;return!!(t.opened||o.opened||e.toolbox.opened)}get someFlipperButtonFocused(){return this.Blok.Toolbar.toolbox.hasFocus()?!0:Object.entries(this.Blok).filter(([e,t])=>t.flipper instanceof Yn).some(([e,t])=>t.flipper.hasFocus())}destroy(){this.nodes.holder.innerHTML="",this.unbindReadOnlyInsensitiveListeners()}closeAllToolbars(){const{Toolbar:e,BlockSettings:t,InlineToolbar:o}=this.Blok;t.close(),o.close(),e.toolbox.close()}setIsMobile(){const e=window.innerWidth<vv;e!==this.isMobile&&this.eventsDispatcher.emit(Go,{isEnabled:this.isMobile}),this.isMobile=e}make(){const e=this.config.holder;if(!e)throw new Error("Blok holder is not specified in the configuration.");this.nodes.holder=R.getHolder(e),this.nodes.wrapper=R.make("div",["group","relative","box-border","z-[1]","[&[data-blok-dragging=true]]:cursor-grabbing","[&_svg]:max-h-full","[&_path]:stroke-current","[&_::selection]:bg-selection-inline","[&[data-blok-toolbox-opened=true]_[contentEditable=true][data-blok-placeholder]:focus]:before:!opacity-0",...this.isRtl?["[direction:rtl]"]:[]]),this.nodes.wrapper.setAttribute(to,Cx),this.nodes.wrapper.setAttribute(_x,""),this.nodes.wrapper.setAttribute("data-blok-testid","blok-editor"),this.isRtl&&this.nodes.wrapper.setAttribute(Ox,"true"),this.nodes.redactor=R.make("div",["not-mobile:group-data-[blok-narrow=true]:mr-[theme(spacing.narrow-mode-right-padding)]","not-mobile:group-data-[blok-narrow=true]:group-data-[blok-rtl=true]:ml-[theme(spacing.narrow-mode-right-padding)]","not-mobile:group-data-[blok-narrow=true]:group-data-[blok-rtl=true]:mr-0",'[&_[contenteditable]:empty]:after:content-["\\feff_"]']),this.nodes.redactor.setAttribute(Nx,""),this.nodes.redactor.setAttribute("data-blok-testid","redactor"),this.nodes.holder.offsetWidth<this.contentRect.width&&this.nodes.wrapper.setAttribute(Rx,"true"),this.nodes.redactor.style.paddingBottom=this.config.minHeight+"px",this.nodes.wrapper.appendChild(this.nodes.redactor),this.nodes.holder.appendChild(this.nodes.wrapper),this.bindReadOnlyInsensitiveListeners()}loadStyles(){const e="blok-styles";if(R.get(e))return;const t=R.make("style",null,{id:e,textContent:EC.toString()});this.config.style&&!ot(this.config.style)&&this.config.style.nonce&&t.setAttribute("nonce",this.config.style.nonce),R.prepend(document.head,t)}bindReadOnlyInsensitiveListeners(){this.listeners.on(document,"selectionchange",this.selectionChangeDebounced),this.listeners.on(window,"resize",this.resizeDebouncer,{passive:!0}),this.listeners.on(this.nodes.redactor,"mousedown",this.documentTouchedListener,{capture:!0,passive:!0}),this.listeners.on(this.nodes.redactor,"touchstart",this.documentTouchedListener,{capture:!0,passive:!0})}unbindReadOnlyInsensitiveListeners(){this.listeners.off(document,"selectionchange",this.selectionChangeDebounced),this.listeners.off(window,"resize",this.resizeDebouncer),this.listeners.off(this.nodes.redactor,"mousedown",this.documentTouchedListener),this.listeners.off(this.nodes.redactor,"touchstart",this.documentTouchedListener)}bindReadOnlySensitiveListeners(){this.readOnlyMutableListeners.on(this.nodes.redactor,"click",e=>{e instanceof MouseEvent&&this.redactorClicked(e)},!1),this.readOnlyMutableListeners.on(document,"keydown",e=>{e instanceof KeyboardEvent&&this.documentKeydown(e)},!0),this.readOnlyMutableListeners.on(document,"mousedown",e=>{e instanceof MouseEvent&&this.documentClicked(e)},!0),this.watchBlockHoveredEvents(),this.enableInputsEmptyMark()}watchBlockHoveredEvents(){const e={lastHovered:null},o=zu(i=>{var g;const l=typeof MouseEvent!="undefined"&&i instanceof MouseEvent,c=typeof TouchEvent!="undefined"&&i instanceof TouchEvent;if(!l&&!c)return;const d=(g=i.target)==null?void 0:g.closest('[data-blok-testid="block-wrapper"]');if(this.Blok.BlockSelection.anyBlockSelected||!d||e.lastHovered===d)return;e.lastHovered=d;const h=this.Blok.BlockManager.getBlockByChildNode(d);h&&this.eventsDispatcher.emit(ky,{block:h})},20);this.readOnlyMutableListeners.on(this.nodes.redactor,"mousemove",i=>{o(i)},{passive:!0})}unbindReadOnlySensitiveListeners(){this.readOnlyMutableListeners.clearAll()}windowResize(){this.contentRectCache=null,this.setIsMobile()}documentKeydown(e){var o;switch((o=e.key)!=null?o:""){case"Enter":this.enterPressed(e);break;case"Backspace":case"Delete":this.backspacePressed(e);break;case"Escape":this.escapePressed(e);break;default:this.defaultBehaviour(e);break}}defaultBehaviour(e){const{currentBlock:t}=this.Blok.BlockManager,o=e.target.closest('[data-blok-testid="blok-editor"]'),i=e.altKey||e.ctrlKey||e.metaKey||e.shiftKey;if(!this.Blok.BlockSettings.contains(e.target)){if(t!==void 0&&o===null){this.Blok.BlockEvents.keydown(e);return}o||t&&i||(this.Blok.BlockManager.unsetCurrentBlock(),this.Blok.Toolbar.close())}}backspacePressed(e){if(this.Blok.BlockSettings.contains(e.target))return;const{BlockManager:t,BlockSelection:o,Caret:i}=this.Blok,l=se.isSelectionExists,c=se.isCollapsed;if(!(o.anyBlockSelected&&(!l||c===!0||this.Blok.CrossBlockSelection.isCrossBlockSelectionStarted)))return;const h=t.removeSelectedBlocks();if(h===void 0)return;const g=t.insertDefaultBlockAtIndex(h,!0);i.setToBlock(g,i.positions.START),o.clearSelection(e),e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()}escapePressed(e){if(this.Blok.BlockSelection.clearSelection(e),this.Blok.Toolbar.toolbox.opened){this.Blok.Toolbar.toolbox.close(),this.Blok.BlockManager.currentBlock&&this.Blok.Caret.setToBlock(this.Blok.BlockManager.currentBlock,this.Blok.Caret.positions.END);return}if(this.Blok.BlockSettings.opened){this.Blok.BlockSettings.close();return}if(this.Blok.InlineToolbar.opened){this.Blok.InlineToolbar.close();return}this.Blok.Toolbar.close()}enterPressed(e){const{BlockManager:t,BlockSelection:o}=this.Blok;if(this.someToolbarOpened)return;const i=t.currentBlockIndex>=0,l=se.isSelectionExists,c=se.isCollapsed;if(o.anyBlockSelected&&(!l||c===!0)){o.clearSelection(e),e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation();return}if(!this.someToolbarOpened&&i&&e.target.tagName==="BODY"){const d=this.Blok.BlockManager.insert();e.preventDefault(),this.Blok.Caret.setToBlock(d),this.Blok.Toolbar.moveAndOpen(d)}this.Blok.BlockSelection.clearSelection(e)}documentClicked(e){var E,w;if(!e.isTrusted)return;const t=e.target,o=this.nodes.holder.contains(t)||se.isAtBlok,i=this.nodes.redactor.contains(t),l=this.Blok.Toolbar.contains(t);(!(o||l)||!i&&!l)&&(this.Blok.BlockManager.unsetCurrentBlock(),this.Blok.Toolbar.close());const h=this.Blok.BlockSettings.contains(t),g=(E=this.Blok.Toolbar.nodes.settingsToggler)==null?void 0:E.contains(t),v=(w=this.Blok.Toolbar.nodes.plusButton)==null?void 0:w.contains(t),y=h||g||v,b=this.Blok.BlockSettings.opened&&!y;if(b&&this.Blok.BlockSettings.close(),b&&i){const T=this.Blok.BlockManager.getBlockByChildNode(t);this.Blok.Toolbar.moveAndOpen(T)}this.Blok.BlockSelection.clearSelection(e)}documentTouched(e){const t=e.target,o=(()=>{if(t!==this.nodes.redactor)return t;if(e instanceof MouseEvent){const i=document.elementFromPoint(e.clientX,e.clientY);return i!=null?i:t}if(e instanceof TouchEvent&&e.touches.length>0){const{clientX:i,clientY:l}=e.touches[0],c=document.elementFromPoint(i,l);return c!=null?c:t}return t})();try{this.Blok.BlockManager.setCurrentBlockByChildNode(o)}catch(i){this.Blok.RectangleSelection.isRectActivated()||this.Blok.Caret.setToTheLastBlock()}!this.Blok.ReadOnly.isEnabled&&!this.Blok.Toolbar.contains(t)&&this.Blok.Toolbar.moveAndOpen()}redactorClicked(e){if(!se.isCollapsed)return;const t=e.target,o=e.metaKey||e.ctrlKey;if(!(R.isAnchor(t)&&o)){this.processBottomZoneClick(e);return}e.stopImmediatePropagation(),e.stopPropagation();const l=t.getAttribute("href");if(!l)return;const c=O1(l);D1(c)}processBottomZoneClick(e){var v,y;const t=this.Blok.BlockManager.getBlockByIndex(-1),o=R.offset(t.holder).bottom,i=e.pageY,{BlockSelection:l}=this.Blok;if(!(e.target instanceof Element&&e.target.isEqualNode(this.nodes.redactor)&&!l.anyBlockSelected&&o<i))return;e.stopImmediatePropagation(),e.stopPropagation();const{BlockManager:d,Caret:h,Toolbar:g}=this.Blok;(!((v=d.lastBlock)!=null&&v.tool.isDefault)||!((y=d.lastBlock)!=null&&y.isEmpty))&&d.insertAtEnd(),h.setToTheLastBlock(),g.moveAndOpen(d.lastBlock)}selectionChanged(){var h;const{CrossBlockSelection:e,BlockSelection:t}=this.Blok,o=se.anchorElement;if(e.isCrossBlockSelectionStarted&&t.anyBlockSelected&&((h=se.get())==null||h.removeAllRanges()),!o&&!se.range&&this.Blok.InlineToolbar.close(),!o)return;const i=o.closest('[data-blok-testid="block-content"]'),l=i===null||i.closest('[data-blok-testid="blok-editor"]')!==this.nodes.wrapper,c=o.getAttribute("data-blok-inline-toolbar")==="true";l&&!this.Blok.InlineToolbar.containsNode(o)&&this.Blok.InlineToolbar.close(),!(l&&!c)&&(this.Blok.BlockManager.currentBlock||this.Blok.BlockManager.setCurrentBlockByChildNode(o),this.Blok.InlineToolbar.tryToShow(!0))}enableInputsEmptyMark(){const e=t=>{const o=t.target;yv(o)};this.readOnlyMutableListeners.on(this.nodes.wrapper,"input",e),this.readOnlyMutableListeners.on(this.nodes.wrapper,"focusin",e),this.readOnlyMutableListeners.on(this.nodes.wrapper,"focusout",e)}}const CC={BlocksAPI:Xx,CaretAPI:Qx,EventsAPI:Zx,I18nAPI:nd,API:Jx,InlineToolbarAPI:eE,ListenersAPI:tE,NotifierAPI:rE,ReadOnlyAPI:oE,SanitizerAPI:wE,SaverAPI:TE,SelectionAPI:xE,ToolsAPI:EE,StylesAPI:SE,ToolbarAPI:CE,TooltipAPI:PE,UiAPI:ME,BlockSettings:wS,Toolbar:BS,InlineToolbar:IS,BlockEvents:OS,BlockManager:aC,BlockSelection:lC,Caret:$d,CrossBlockSelection:dC,ModificationsObserver:fC,Paste:Gd,ReadOnly:hC,RectangleSelection:pC,Renderer:gC,Saver:mC,Tools:xC,UI:SC};class BC{constructor(e){this.moduleInstances={},this.eventsDispatcher=new Ko,this.config={},this.isReady=new Promise((t,o)=>{Promise.resolve().then(async()=>{this.configuration=e,this.validate(),this.init(),await this.start(),await this.render();const{BlockManager:i,Caret:l,UI:c,ModificationsObserver:d}=this.moduleInstances;c.checkEmptiness(),d.enable(),this.configuration.autofocus===!0&&this.configuration.readOnly!==!0&&l.setToBlock(i.blocks[0],l.positions.START),t()}).catch(i=>{Ce(`Blok is not ready because of ${i}`,"error"),o(i)})})}set configuration(e){var h,g,v,y,b,E;qe(e)?this.config=be({},e):this.config={holder:e},this.config.holder==null&&(this.config.holder="blok"),this.config.logLevel==null&&(this.config.logLevel=cv.VERBOSE),A1(this.config.logLevel),this.config.defaultBlock=(h=this.config.defaultBlock)!=null?h:"paragraph";const t=this.config.tools,o=this.config.defaultBlock,i=t!=null&&Object.prototype.hasOwnProperty.call(t,o!=null?o:""),l=(g=this.config.data)==null?void 0:g.blocks,c=Array.isArray(l)&&l.length>0;if(o&&o!=="paragraph"&&!i&&!c){Ce(`Default block "${o}" is not configured. Falling back to "paragraph" tool.`,"warn"),this.config.defaultBlock="paragraph";const w=this.config.tools,T=be({},w!=null?w:{}),S=T.paragraph;T.paragraph=this.createParagraphToolConfig(S),this.config.tools=T}this.config.minHeight=this.config.minHeight!==void 0?this.config.minHeight:300;const d={type:this.config.defaultBlock,data:{}};this.config.placeholder===void 0&&(this.config.placeholder=!1),this.config.sanitizer=(v=this.config.sanitizer)!=null?v:{},this.config.hideToolbar=(y=this.config.hideToolbar)!=null?y:!1,this.config.tools=this.config.tools||{},this.config.i18n=this.config.i18n||{},this.config.data=this.config.data||{blocks:[]},this.config.onReady=this.config.onReady||(()=>{}),this.config.onChange=this.config.onChange||(()=>{}),this.config.inlineToolbar=this.config.inlineToolbar!==void 0?this.config.inlineToolbar:!0,(ot(this.config.data)||!this.config.data.blocks||this.config.data.blocks.length===0)&&(this.config.data={blocks:[d]}),this.config.readOnly=this.config.readOnly||!1,(b=this.config.i18n)!=null&&b.messages&&$e.setDictionary(this.config.i18n.messages),this.config.i18n.direction=((E=this.config.i18n)==null?void 0:E.direction)||"ltr"}get configuration(){return this.config}validate(){const{holder:e}=this.config;if(un(e)&&!R.get(e))throw Error(`element with ID «${e}» is missing. Pass correct holder's ID.`);if(e&&qe(e)&&!R.isElement(e))throw Error("«holder» value must be an Element node")}init(){this.constructModules(),this.configureModules()}async start(){await["Tools","UI","BlockManager","Paste","BlockSelection","RectangleSelection","CrossBlockSelection","ReadOnly"].reduce((t,o)=>t.then(async()=>{try{await this.moduleInstances[o].prepare()}catch(i){if(i instanceof Wo)throw new Error(i.message);Ce(`Module ${o} was skipped because of %o`,"warn",i)}}),Promise.resolve())}render(){const e=this.moduleInstances.Renderer;if(!e)throw new Wo("Renderer module is not initialized");if(!this.config.data)throw new Wo("Blok data is not initialized");return e.render(this.config.data.blocks)}constructModules(){Object.entries(CC).forEach(([e,t])=>{try{this.moduleInstances[e]=new t({config:this.configuration,eventsDispatcher:this.eventsDispatcher})}catch(o){Ce(`[constructModules] Module ${e} skipped because`,"error",o)}})}configureModules(){for(const e in this.moduleInstances)Object.prototype.hasOwnProperty.call(this.moduleInstances,e)&&(this.moduleInstances[e].state=this.getModulesDiff(e))}createParagraphToolConfig(e){if(e===void 0)return{config:{preserveBlank:!0}};if(De(e))return{class:e,config:{preserveBlank:!0}};if(qe(e)){const t=e,o=t.config;return It(be({},t),{config:It(be({},qe(o)?o:{}),{preserveBlank:!0})})}return{config:{preserveBlank:!0}}}getModulesDiff(e){const t={};for(const o in this.moduleInstances)o!==e&&(t[o]=this.moduleInstances[o]);return t}}const Us=class Us{constructor({data:e,config:t,api:o,readOnly:i}){this.api=o,this.readOnly=i,this._settings=t||{},this._data=this.normalizeData(e),this._element=this.getTag()}get _CSS(){return{block:this.api.styles.block,wrapper:""}}isHeaderData(e){return typeof e=="object"&&e!==null&&"text"in e}normalizeData(e){if(!this.isHeaderData(e))return{text:"",level:this.defaultLevel.number};const t=parseInt(String(e.level)),o=e.level!==void 0&&!isNaN(t);return{text:e.text||"",level:o?t:this.defaultLevel.number}}render(){return this._element}renderSettings(){return this.levels.map(e=>({icon:e.svg,label:this.api.i18n.t(`Heading ${e.number}`),onActivate:()=>this.setLevel(e.number),closeOnActivate:!0,isActive:this.currentLevel.number===e.number}))}setLevel(e){this.data={level:e,text:this.data.text}}merge(e){this._element.insertAdjacentHTML("beforeend",e.text)}validate(e){return e.text.trim()!==""}save(e){return{text:e.innerHTML,level:this.currentLevel.number}}static get conversionConfig(){return{export:"text",import:"text"}}static get sanitize(){return{level:!1,text:{}}}static get isReadOnlySupported(){return!0}get data(){return this._data.text=this._element.innerHTML,this._data.level=this.currentLevel.number,this._data}set data(e){if(this._data=this.normalizeData(e),e.level!==void 0&&this._element.parentNode){const t=this.getTag();t.innerHTML=this._element.innerHTML,this._element.parentNode.replaceChild(t,this._element),this._element=t}e.text!==void 0&&(this._element.innerHTML=this._data.text||"")}getTag(){const e=document.createElement(this.currentLevel.tag);return e.innerHTML=this._data.text||"",e.className=Ae(Us.BASE_STYLES,this.currentLevel.styles),e.setAttribute(Xu,"header"),e.contentEditable=this.readOnly?"false":"true",e.setAttribute("data-placeholder",this.api.i18n.t(this._settings.placeholder||"")),e}get currentLevel(){const e=this.levels.find(t=>t.number===this._data.level);return e!=null?e:this.defaultLevel}get defaultLevel(){if(!this._settings.defaultLevel)return this.levels[1];const e=this.levels.find(t=>t.number===this._settings.defaultLevel);return e||(console.warn("(ง'̀-'́)ง Heading Tool: the default level specified was not found in available levels"),this.levels[1])}get levels(){const e=[{number:1,tag:"H1",svg:oS,styles:"text-[2.5em] font-bold"},{number:2,tag:"H2",svg:iS,styles:"text-[2em] font-semibold"},{number:3,tag:"H3",svg:sS,styles:"text-[1.75em] font-semibold"},{number:4,tag:"H4",svg:aS,styles:"text-[1.5em] font-semibold"},{number:5,tag:"H5",svg:lS,styles:"text-[1.25em] font-semibold"},{number:6,tag:"H6",svg:cS,styles:"text-base font-semibold"}];return this._settings.levels?e.filter(t=>this._settings.levels.includes(t.number)):e}onPaste(e){var d;const t=e.detail;if(!("data"in t))return;const o=t.data,l=(d={H1:1,H2:2,H3:3,H4:4,H5:5,H6:6}[o.tagName])!=null?d:this.defaultLevel.number,c=this._settings.levels?this._settings.levels.reduce((h,g)=>Math.abs(g-l)<Math.abs(h-l)?g:h):l;this.data={level:c,text:o.innerHTML}}static get pasteConfig(){return{tags:["H1","H2","H3","H4","H5","H6"]}}static get toolbox(){return{icon:uS,title:"Heading"}}};Us.BASE_STYLES="py-[0.6em] pb-[3px] px-0 m-0 leading-[1.25em] outline-none [&_p]:!p-0 [&_p]:!m-0 [&_div]:!p-0 [&_div]:!m-0";let ef=Us;const fo=class fo{static get version(){return ss()}constructor(e){this.initialConfiguration=qe(e)?be({},e):e;const t=qe(e)&&De(e.onReady)?e.onReady:()=>{},o=new BC(e);this.destroy=()=>{},this.isReady=o.isReady.then(()=>{this.exportAPI(o),t()})}exportAPI(e){var w,T;const t=["configuration"],o=()=>{Object.values(e.moduleInstances).forEach(S=>{if(S==null)return;De(S.destroy)&&S.destroy();const O=S.listeners;O&&De(O.removeAll)&&O.removeAll()}),DE();for(const S in this)Object.prototype.hasOwnProperty.call(this,S)&&delete this[S];Object.setPrototypeOf(this,null)};t.forEach(S=>{if(S!=="configuration"){this[S]=e[S];return}const O=e.configuration,L=qe(this.initialConfiguration)?this.initialConfiguration:O!=null?O:this.initialConfiguration;L!==void 0&&(this[S]=L)}),this.destroy=o;const i=e.moduleInstances.API.methods,l=(T=(w=e.moduleInstances.EventsAPI)==null?void 0:w.methods)!=null?T:i.events;if(l!==void 0){const S=O=>{Object.prototype.hasOwnProperty.call(O,"eventsDispatcher")||Object.defineProperty(O,"eventsDispatcher",{value:l,configurable:!0,enumerable:!0,writable:!1})};S(i),S(this)}Object.getPrototypeOf(i)!==fo.prototype&&Object.setPrototypeOf(i,fo.prototype),Object.setPrototypeOf(this,i);const c=Object.create(null),d=e.moduleInstances,h=d,g=S=>/^[A-Z]+$/.test(S)?S.toLowerCase():S.charAt(0).toLowerCase()+S.slice(1);Object.keys(h).forEach(S=>{const O=g(S);Object.defineProperty(c,O,{configurable:!0,enumerable:!0,get:()=>h[S]})});const v=d.Toolbar,y=d.BlockSettings;v!==void 0&&y!==void 0&&v.blockSettings===void 0&&(v.blockSettings=y);const b=d.InlineToolbar;v!==void 0&&b!==void 0&&v.inlineToolbar===void 0&&(v.inlineToolbar=b),Object.defineProperty(this,"module",{value:c,configurable:!0,enumerable:!1,writable:!1}),delete this.exportAPI,Object.entries({blocks:{clear:"clear",render:"render"},caret:{focus:"focus"},events:{on:"on",off:"off",emit:"emit"},saver:{save:"save"}}).forEach(([S,O])=>{Object.entries(O).forEach(([L,U])=>{const H=S,X=e.moduleInstances.API.methods[H];this[U]=X[L]})})}};fo.Header=ef,fo.Paragraph=Hs;let tf=fo;const Pt={wrapper:yt("fixed z-[2] bottom-5 left-5",'font-[-apple-system,BlinkMacSystemFont,"Segoe_UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira_Sans","Droid_Sans","Helvetica_Neue",sans-serif]'),notification:yt("relative w-[230px] mt-[15px] py-[13px] px-4","bg-white shadow-[0_11px_17px_0_rgba(23,32,61,0.13)] rounded-[5px]","text-sm leading-[1.4em] break-words",'before:content-[""] before:absolute before:block before:top-0 before:left-0',"before:w-[3px] before:h-[calc(100%-6px)] before:m-[3px] before:rounded-[5px] before:bg-transparent"),crossBtn:yt("absolute top-[7px] right-[15px] w-2.5 h-2.5 p-[5px] opacity-55 cursor-pointer",'before:content-[""] before:absolute before:left-[9px] before:top-[5px] before:h-3 before:w-0.5 before:bg-[#575d67] before:rotate-[-45deg]','after:content-[""] after:absolute after:left-[9px] after:top-[5px] after:h-3 after:w-0.5 after:bg-[#575d67] after:rotate-45',"hover:opacity-100"),btnsWrapper:"flex flex-row flex-nowrap mt-[5px]",btn:"border-none rounded-[3px] text-[13px] py-[5px] px-2.5 cursor-pointer last:ml-2.5",okBtn:"bg-[#34c992] shadow-[0_1px_1px_0_rgba(18,49,35,0.05)] text-white hover:bg-[#2db583]",cancelBtn:"bg-[#f2f5f7] shadow-[0_2px_1px_0_rgba(16,19,29,0)] text-[#656b7c] hover:bg-[#e9ecee]",input:yt("max-w-[130px] py-[5px] px-2.5 bg-[#f7f7f7] border-0 rounded-[3px]","text-[13px] text-[#656b7c] outline-none","placeholder:text-[#656b7c] focus:placeholder:text-[rgba(101,107,124,0.3)]"),successNotification:yt("!bg-[#fafffe]","before:!bg-[#41ffb1]"),errorNotification:yt("!bg-[#fffbfb]","before:!bg-[#fb5d5d]")},nf=a=>{const e=document.createElement("DIV"),t=document.createElement("DIV"),o=a.message,i=a.style,l=()=>i==="success"?Pt.successNotification:i==="error"?Pt.errorNotification:"";return e.className=Ae(Pt.notification,l()),i?e.setAttribute("data-blok-testid",`notification-${i}`):e.setAttribute("data-blok-testid","notification"),e.innerHTML=o,t.className=Pt.crossBtn,t.setAttribute("data-blok-testid","notification-cross"),t.addEventListener("click",()=>e.remove()),e.appendChild(t),e},AC=a=>{const e=nf(a),t=document.createElement("div"),o=document.createElement("button"),i=document.createElement("button"),l=e.querySelector('[data-blok-testid="notification-cross"]'),c=a.cancelHandler,d=a.okHandler;return t.className=Pt.btnsWrapper,t.setAttribute("data-blok-testid","notification-buttons-wrapper"),o.innerHTML=a.okText||"Confirm",i.innerHTML=a.cancelText||"Cancel",o.className=yt(Pt.btn,Pt.okBtn),i.className=yt(Pt.btn,Pt.cancelBtn),o.setAttribute("data-blok-testid","notification-confirm-button"),i.setAttribute("data-blok-testid","notification-cancel-button"),c&&typeof c=="function"&&i.addEventListener("click",c),c&&typeof c=="function"&&l&&l.addEventListener("click",c),d&&typeof d=="function"&&o.addEventListener("click",d),o.addEventListener("click",()=>e.remove()),i.addEventListener("click",()=>e.remove()),t.appendChild(o),t.appendChild(i),e.appendChild(t),e},IC=a=>{const e=nf(a),t=document.createElement("div"),o=document.createElement("button"),i=document.createElement("input"),l=e.querySelector('[data-blok-testid="notification-cross"]'),c=a.cancelHandler,d=a.okHandler;return t.className=Pt.btnsWrapper,o.innerHTML=a.okText||"Ok",o.className=yt(Pt.btn,Pt.okBtn),i.className=Pt.input,i.setAttribute("data-blok-testid","notification-input"),a.placeholder&&i.setAttribute("placeholder",a.placeholder),a.default&&(i.value=a.default),a.inputType&&(i.type=a.inputType),c&&typeof c=="function"&&l&&l.addEventListener("click",c),d&&typeof d=="function"&&o.addEventListener("click",()=>{d(i.value)}),o.addEventListener("click",()=>e.remove()),t.appendChild(i),t.appendChild(o),e.appendChild(t),e},_C=()=>{const a=document.createElement("DIV");return a.className=Pt.wrapper,a.setAttribute("data-blok-testid","notifier-container"),a},NC=8e3,RC=()=>{const a=document.querySelector('[data-blok-testid="notifier-container"]');if(a)return a;const e=_C();return document.body.appendChild(e),e},ib=a=>{if(!a.message)return;const e=RC(),t=a.time||NC,o=(()=>{switch(a.type){case"confirm":return AC(a);case"prompt":return IC(a);default:{const i=nf(a);return window.setTimeout(()=>{i.remove()},t),i}}})();e&&o&&(e.appendChild(o),o.className=`${o.className} animate-notify-bounce-in`,o.setAttribute("data-blok-bounce-in","true"))},OC=Object.freeze(Object.defineProperty({__proto__:null,default:{show:ib},show:ib},Symbol.toStringTag,{value:"Module"}));return tf}));
|