One Hat Cyber Team
Your IP :
216.73.216.115
Server IP :
194.44.31.54
Server :
Linux zen.imath.kiev.ua 4.18.0-553.77.1.el8_10.x86_64 #1 SMP Fri Oct 3 14:30:23 UTC 2025 x86_64
Server Software :
Apache/2.4.37 (Rocky Linux) OpenSSL/1.1.1k
PHP Version :
5.6.40
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
www
/
ojs-nosc
/
js
/
Edit File:
build.js
var tvt=Object.defineProperty;var nvt=(Qu,Ir,jg)=>Ir in Qu?tvt(Qu,Ir,{enumerable:!0,configurable:!0,writable:!0,value:jg}):Qu[Ir]=jg;var $o=(Qu,Ir,jg)=>nvt(Qu,typeof Ir!="symbol"?Ir+"":Ir,jg);(function(){"use strict";/** * @vue/shared v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **//*! #__NO_SIDE_EFFECTS__ */var fU,F5;function Qu(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Ir={},jg=[],jd=()=>{},qI=()=>!1,yS=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),AX=e=>e.startsWith("onUpdate:"),wi=Object.assign,OX=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Z6e=Object.prototype.hasOwnProperty,fa=(e,t)=>Z6e.call(e,t),Ks=Array.isArray,sw=e=>ow(e)==="[object Map]",_S=e=>ow(e)==="[object Set]",Hpe=e=>ow(e)==="[object Date]",q6e=e=>ow(e)==="[object RegExp]",qo=e=>typeof e=="function",kr=e=>typeof e=="string",Em=e=>typeof e=="symbol",Fa=e=>e!==null&&typeof e=="object",RX=e=>(Fa(e)||qo(e))&&qo(e.then)&&qo(e.catch),Upe=Object.prototype.toString,ow=e=>Upe.call(e),G6e=e=>ow(e).slice(8,-1),w$=e=>ow(e)==="[object Object]",DX=e=>kr(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,z3=Qu(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),K6e=Qu("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),E$=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Y6e=/-(\w)/g,Sl=E$(e=>e.replace(Y6e,(t,n)=>n?n.toUpperCase():"")),X6e=/\B([A-Z])/g,km=E$(e=>e.replace(X6e,"-$1").toLowerCase()),W3=E$(e=>e.charAt(0).toUpperCase()+e.slice(1)),SS=E$(e=>e?"on".concat(W3(e)):""),Pp=(e,t)=>!Object.is(e,t),rw=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},zpe=(e,t,n,i=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:i,value:n})},k$=e=>{const t=parseFloat(e);return isNaN(t)?e:t},x$=e=>{const t=kr(e)?Number(e):NaN;return isNaN(t)?e:t};let Wpe;const T$=()=>Wpe||(Wpe=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function J6e(e,t){return e+JSON.stringify(t,(n,i)=>typeof i=="function"?i.toString():i)}const Q6e=Qu("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol");function Ih(e){if(Ks(e)){const t={};for(let n=0;n<e.length;n++){const i=e[n],a=kr(i)?jpe(i):Ih(i);if(a)for(const l in a)t[l]=a[l]}return t}else if(kr(e)||Fa(e))return e}const e8e=/;(?![^(]*\))/g,t8e=/:([^]+)/,n8e=/\/\*[^]*?\*\//g;function jpe(e){const t={};return e.replace(n8e,"").split(e8e).forEach(n=>{if(n){const i=n.split(t8e);i.length>1&&(t[i[0].trim()]=i[1].trim())}}),t}function Rn(e){let t="";if(kr(e))t=e;else if(Ks(e))for(let n=0;n<e.length;n++){const i=Rn(e[n]);i&&(t+=i+" ")}else if(Fa(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function CS(e){if(!e)return null;let{class:t,style:n}=e;return t&&!kr(t)&&(e.class=Rn(t)),n&&(e.style=Ih(n)),e}const s8e="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot",o8e="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",r8e="annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics",i8e="area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr",a8e=Qu(s8e),l8e=Qu(o8e),c8e=Qu(r8e),u8e=Qu(i8e),d8e=Qu("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function Zpe(e){return!!e||e===""}function f8e(e,t){if(e.length!==t.length)return!1;let n=!0;for(let i=0;n&&i<e.length;i++)n=j3(e[i],t[i]);return n}function j3(e,t){if(e===t)return!0;let n=Hpe(e),i=Hpe(t);if(n||i)return n&&i?e.getTime()===t.getTime():!1;if(n=Em(e),i=Em(t),n||i)return e===t;if(n=Ks(e),i=Ks(t),n||i)return n&&i?f8e(e,t):!1;if(n=Fa(e),i=Fa(t),n||i){if(!n||!i)return!1;const a=Object.keys(e).length,l=Object.keys(t).length;if(a!==l)return!1;for(const f in e){const d=e.hasOwnProperty(f),h=t.hasOwnProperty(f);if(d&&!h||!d&&h||!j3(e[f],t[f]))return!1}}return String(e)===String(t)}function I$(e,t){return e.findIndex(n=>j3(n,t))}const qpe=e=>!!(e&&e.__v_isRef===!0),ee=e=>kr(e)?e:e==null?"":Ks(e)||Fa(e)&&(e.toString===Upe||!qo(e.toString))?qpe(e)?ee(e.value):JSON.stringify(e,Gpe,2):String(e),Gpe=(e,t)=>qpe(t)?Gpe(e,t.value):sw(t)?{["Map(".concat(t.size,")")]:[...t.entries()].reduce((n,[i,a],l)=>(n[LX(i,l)+" =>"]=a,n),{})}:_S(t)?{["Set(".concat(t.size,")")]:[...t.values()].map(n=>LX(n))}:Em(t)?LX(t):Fa(t)&&!Ks(t)&&!w$(t)?String(t):t,LX=(e,t="")=>{var n;return Em(e)?"Symbol(".concat((n=e.description)!=null?n:t,")"):e};/** * @vue/reactivity v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/let Mp;class A${constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Mp,!t&&Mp&&(this.index=(Mp.scopes||(Mp.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=Mp;try{return Mp=this,t()}finally{Mp=n}}}on(){Mp=this}off(){Mp=this.parent}stop(t){if(this._active){this._active=!1;let n,i;for(n=0,i=this.effects.length;n<i;n++)this.effects[n].stop();for(this.effects.length=0,n=0,i=this.cleanups.length;n<i;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,i=this.scopes.length;n<i;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const a=this.parent.scopes.pop();a&&a!==this&&(this.parent.scopes[this.index]=a,a.index=this.index)}this.parent=void 0}}}function O$(e){return new A$(e)}function GI(){return Mp}function KI(e,t=!1){Mp&&Mp.cleanups.push(e)}let Cl;const PX=new WeakSet;class iw{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Mp&&Mp.active&&Mp.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,PX.has(this)&&(PX.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Ype(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,sme(this),Xpe(this);const t=Cl,n=Zg;Cl=this,Zg=!0;try{return this.fn()}finally{Jpe(this),Cl=t,Zg=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)$X(t);this.deps=this.depsTail=void 0,sme(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?PX.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){FX(this)&&this.run()}get dirty(){return FX(this)}}let Kpe=0,YI,XI;function Ype(e,t=!1){if(e.flags|=8,t){e.next=XI,XI=e;return}e.next=YI,YI=e}function MX(){Kpe++}function NX(){if(--Kpe>0)return;if(XI){let t=XI;for(XI=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;YI;){let t=YI;for(YI=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(i){e||(e=i)}t=n}}if(e)throw e}function Xpe(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Jpe(e){let t,n=e.depsTail,i=n;for(;i;){const a=i.prevDep;i.version===-1?(i===n&&(n=a),$X(i),p8e(i)):t=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=a}e.deps=t,e.depsTail=n}function FX(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Qpe(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Qpe(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===JI))return;e.globalVersion=JI;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!FX(e)){e.flags&=-3;return}const n=Cl,i=Zg;Cl=e,Zg=!0;try{Xpe(e);const a=e.fn(e._value);(t.version===0||Pp(a,e._value))&&(e._value=a,t.version++)}catch(a){throw t.version++,a}finally{Cl=n,Zg=i,Jpe(e),e.flags&=-3}}function $X(e,t=!1){const{dep:n,prevSub:i,nextSub:a}=e;if(i&&(i.nextSub=a,e.prevSub=void 0),a&&(a.prevSub=i,e.nextSub=void 0),n.subs===e&&(n.subs=i,!i&&n.computed)){n.computed.flags&=-5;for(let l=n.computed.deps;l;l=l.nextDep)$X(l,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function p8e(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}function eme(e,t){e.effect instanceof iw&&(e=e.effect.fn);const n=new iw(e);t&&wi(n,t);try{n.run()}catch(a){throw n.stop(),a}const i=n.run.bind(n);return i.effect=n,i}function tme(e){e.effect.stop()}let Zg=!0;const nme=[];function gb(){nme.push(Zg),Zg=!1}function vb(){const e=nme.pop();Zg=e===void 0?!0:e}function sme(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Cl;Cl=void 0;try{t()}finally{Cl=n}}}let JI=0;class m8e{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class R${constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(t){if(!Cl||!Zg||Cl===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Cl)n=this.activeLink=new m8e(Cl,this),Cl.deps?(n.prevDep=Cl.depsTail,Cl.depsTail.nextDep=n,Cl.depsTail=n):Cl.deps=Cl.depsTail=n,ome(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const i=n.nextDep;i.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=i),n.prevDep=Cl.depsTail,n.nextDep=void 0,Cl.depsTail.nextDep=n,Cl.depsTail=n,Cl.deps===n&&(Cl.deps=i)}return n}trigger(t){this.version++,JI++,this.notify(t)}notify(t){MX();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{NX()}}}function ome(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let i=t.deps;i;i=i.nextDep)ome(i)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const D$=new WeakMap,wS=Symbol(""),BX=Symbol(""),QI=Symbol("");function xf(e,t,n){if(Zg&&Cl){let i=D$.get(e);i||D$.set(e,i=new Map);let a=i.get(n);a||(i.set(n,a=new R$),a.map=i,a.key=n),a.track()}}function bb(e,t,n,i,a,l){const f=D$.get(e);if(!f){JI++;return}const d=h=>{h&&h.trigger()};if(MX(),t==="clear")f.forEach(d);else{const h=Ks(e),b=h&&DX(n);if(h&&n==="length"){const S=Number(i);f.forEach((k,T)=>{(T==="length"||T===QI||!Em(T)&&T>=S)&&d(k)})}else switch((n!==void 0||f.has(void 0))&&d(f.get(n)),b&&d(f.get(QI)),t){case"add":h?b&&d(f.get("length")):(d(f.get(wS)),sw(e)&&d(f.get(BX)));break;case"delete":h||(d(f.get(wS)),sw(e)&&d(f.get(BX)));break;case"set":sw(e)&&d(f.get(wS));break}}NX()}function h8e(e,t){const n=D$.get(e);return n&&n.get(t)}function aw(e){const t=Qo(e);return t===e?t:(xf(t,"iterate",QI),xm(e)?t:t.map(Tf))}function L$(e){return xf(e=Qo(e),"iterate",QI),e}const g8e={__proto__:null,[Symbol.iterator](){return VX(this,Symbol.iterator,Tf)},concat(...e){return aw(this).concat(...e.map(t=>Ks(t)?aw(t):t))},entries(){return VX(this,"entries",e=>(e[1]=Tf(e[1]),e))},every(e,t){return yb(this,"every",e,t,void 0,arguments)},filter(e,t){return yb(this,"filter",e,t,n=>n.map(Tf),arguments)},find(e,t){return yb(this,"find",e,t,Tf,arguments)},findIndex(e,t){return yb(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return yb(this,"findLast",e,t,Tf,arguments)},findLastIndex(e,t){return yb(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return yb(this,"forEach",e,t,void 0,arguments)},includes(...e){return HX(this,"includes",e)},indexOf(...e){return HX(this,"indexOf",e)},join(e){return aw(this).join(e)},lastIndexOf(...e){return HX(this,"lastIndexOf",e)},map(e,t){return yb(this,"map",e,t,void 0,arguments)},pop(){return eA(this,"pop")},push(...e){return eA(this,"push",e)},reduce(e,...t){return rme(this,"reduce",e,t)},reduceRight(e,...t){return rme(this,"reduceRight",e,t)},shift(){return eA(this,"shift")},some(e,t){return yb(this,"some",e,t,void 0,arguments)},splice(...e){return eA(this,"splice",e)},toReversed(){return aw(this).toReversed()},toSorted(e){return aw(this).toSorted(e)},toSpliced(...e){return aw(this).toSpliced(...e)},unshift(...e){return eA(this,"unshift",e)},values(){return VX(this,"values",Tf)}};function VX(e,t,n){const i=L$(e),a=i[t]();return i!==e&&!xm(e)&&(a._next=a.next,a.next=()=>{const l=a._next();return l.value&&(l.value=n(l.value)),l}),a}const v8e=Array.prototype;function yb(e,t,n,i,a,l){const f=L$(e),d=f!==e&&!xm(e),h=f[t];if(h!==v8e[t]){const k=h.apply(e,l);return d?Tf(k):k}let b=n;f!==e&&(d?b=function(k,T){return n.call(this,Tf(k),T,e)}:n.length>2&&(b=function(k,T){return n.call(this,k,T,e)}));const S=h.call(f,b,i);return d&&a?a(S):S}function rme(e,t,n,i){const a=L$(e);let l=n;return a!==e&&(xm(e)?n.length>3&&(l=function(f,d,h){return n.call(this,f,d,h,e)}):l=function(f,d,h){return n.call(this,f,Tf(d),h,e)}),a[t](l,...i)}function HX(e,t,n){const i=Qo(e);xf(i,"iterate",QI);const a=i[t](...n);return(a===-1||a===!1)&&ES(n[0])?(n[0]=Qo(n[0]),i[t](...n)):a}function eA(e,t,n=[]){gb(),MX();const i=Qo(e)[t].apply(e,n);return NX(),vb(),i}const b8e=Qu("__proto__,__v_isRef,__isVue"),ime=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Em));function y8e(e){Em(e)||(e=String(e));const t=Qo(this);return xf(t,"has",e),t.hasOwnProperty(e)}class ame{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,i){if(n==="__v_skip")return t.__v_skip;const a=this._isReadonly,l=this._isShallow;if(n==="__v_isReactive")return!a;if(n==="__v_isReadonly")return a;if(n==="__v_isShallow")return l;if(n==="__v_raw")return i===(a?l?pme:fme:l?dme:ume).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(i)?t:void 0;const f=Ks(t);if(!a){let h;if(f&&(h=g8e[n]))return h;if(n==="hasOwnProperty")return y8e}const d=Reflect.get(t,n,xa(t)?t:i);return(Em(n)?ime.has(n):b8e(n))||(a||xf(t,"get",n),l)?d:xa(d)?f&&DX(n)?d:d.value:Fa(d)?a?lw(d):I1(d):d}}class lme extends ame{constructor(t=!1){super(!1,t)}set(t,n,i,a){let l=t[n];if(!this._isShallow){const h=_b(l);if(!xm(i)&&!_b(i)&&(l=Qo(l),i=Qo(i)),!Ks(t)&&xa(l)&&!xa(i))return h?!1:(l.value=i,!0)}const f=Ks(t)&&DX(n)?Number(n)<t.length:fa(t,n),d=Reflect.set(t,n,i,xa(t)?t:a);return t===Qo(a)&&(f?Pp(i,l)&&bb(t,"set",n,i):bb(t,"add",n,i)),d}deleteProperty(t,n){const i=fa(t,n);t[n];const a=Reflect.deleteProperty(t,n);return a&&i&&bb(t,"delete",n,void 0),a}has(t,n){const i=Reflect.has(t,n);return(!Em(n)||!ime.has(n))&&xf(t,"has",n),i}ownKeys(t){return xf(t,"iterate",Ks(t)?"length":wS),Reflect.ownKeys(t)}}class cme extends ame{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const _8e=new lme,S8e=new cme,C8e=new lme(!0),w8e=new cme(!0),UX=e=>e,P$=e=>Reflect.getPrototypeOf(e);function E8e(e,t,n){return function(...i){const a=this.__v_raw,l=Qo(a),f=sw(l),d=e==="entries"||e===Symbol.iterator&&f,h=e==="keys"&&f,b=a[e](...i),S=n?UX:t?WX:Tf;return!t&&xf(l,"iterate",h?BX:wS),{next(){const{value:k,done:T}=b.next();return T?{value:k,done:T}:{value:d?[S(k[0]),S(k[1])]:S(k),done:T}},[Symbol.iterator](){return this}}}}function M$(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function k8e(e,t){const n={get(a){const l=this.__v_raw,f=Qo(l),d=Qo(a);e||(Pp(a,d)&&xf(f,"get",a),xf(f,"get",d));const{has:h}=P$(f),b=t?UX:e?WX:Tf;if(h.call(f,a))return b(l.get(a));if(h.call(f,d))return b(l.get(d));l!==f&&l.get(a)},get size(){const a=this.__v_raw;return!e&&xf(Qo(a),"iterate",wS),Reflect.get(a,"size",a)},has(a){const l=this.__v_raw,f=Qo(l),d=Qo(a);return e||(Pp(a,d)&&xf(f,"has",a),xf(f,"has",d)),a===d?l.has(a):l.has(a)||l.has(d)},forEach(a,l){const f=this,d=f.__v_raw,h=Qo(d),b=t?UX:e?WX:Tf;return!e&&xf(h,"iterate",wS),d.forEach((S,k)=>a.call(l,b(S),b(k),f))}};return wi(n,e?{add:M$("add"),set:M$("set"),delete:M$("delete"),clear:M$("clear")}:{add(a){!t&&!xm(a)&&!_b(a)&&(a=Qo(a));const l=Qo(this);return P$(l).has.call(l,a)||(l.add(a),bb(l,"add",a,a)),this},set(a,l){!t&&!xm(l)&&!_b(l)&&(l=Qo(l));const f=Qo(this),{has:d,get:h}=P$(f);let b=d.call(f,a);b||(a=Qo(a),b=d.call(f,a));const S=h.call(f,a);return f.set(a,l),b?Pp(l,S)&&bb(f,"set",a,l):bb(f,"add",a,l),this},delete(a){const l=Qo(this),{has:f,get:d}=P$(l);let h=f.call(l,a);h||(a=Qo(a),h=f.call(l,a)),d&&d.call(l,a);const b=l.delete(a);return h&&bb(l,"delete",a,void 0),b},clear(){const a=Qo(this),l=a.size!==0,f=a.clear();return l&&bb(a,"clear",void 0,void 0),f}}),["keys","values","entries",Symbol.iterator].forEach(a=>{n[a]=E8e(a,e,t)}),n}function N$(e,t){const n=k8e(e,t);return(i,a,l)=>a==="__v_isReactive"?!e:a==="__v_isReadonly"?e:a==="__v_raw"?i:Reflect.get(fa(n,a)&&a in i?n:i,a,l)}const x8e={get:N$(!1,!1)},T8e={get:N$(!1,!0)},I8e={get:N$(!0,!1)},A8e={get:N$(!0,!0)},ume=new WeakMap,dme=new WeakMap,fme=new WeakMap,pme=new WeakMap;function O8e(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function R8e(e){return e.__v_skip||!Object.isExtensible(e)?0:O8e(G6e(e))}function I1(e){return _b(e)?e:F$(e,!1,_8e,x8e,ume)}function zX(e){return F$(e,!1,C8e,T8e,dme)}function lw(e){return F$(e,!0,S8e,I8e,fme)}function mme(e){return F$(e,!0,w8e,A8e,pme)}function F$(e,t,n,i,a){if(!Fa(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const l=a.get(e);if(l)return l;const f=R8e(e);if(f===0)return e;const d=new Proxy(e,f===2?i:n);return a.set(e,d),d}function A1(e){return _b(e)?A1(e.__v_raw):!!(e&&e.__v_isReactive)}function _b(e){return!!(e&&e.__v_isReadonly)}function xm(e){return!!(e&&e.__v_isShallow)}function ES(e){return e?!!e.__v_raw:!1}function Qo(e){const t=e&&e.__v_raw;return t?Qo(t):e}function Z3(e){return!fa(e,"__v_skip")&&Object.isExtensible(e)&&zpe(e,"__v_skip",!0),e}const Tf=e=>Fa(e)?I1(e):e,WX=e=>Fa(e)?lw(e):e;function xa(e){return e?e.__v_isRef===!0:!1}function kt(e){return hme(e,!1)}function kS(e){return hme(e,!0)}function hme(e,t){return xa(e)?e:new D8e(e,t)}class D8e{constructor(t,n){this.dep=new R$,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Qo(t),this._value=n?t:Tf(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,i=this.__v_isShallow||xm(t)||_b(t);t=i?t:Qo(t),Pp(t,n)&&(this._rawValue=t,this._value=i?t:Tf(t),this.dep.trigger())}}function $$(e){e.dep&&e.dep.trigger()}function se(e){return xa(e)?e.value:e}function gme(e){return qo(e)?e():se(e)}const L8e={get:(e,t,n)=>t==="__v_raw"?e:se(Reflect.get(e,t,n)),set:(e,t,n,i)=>{const a=e[t];return xa(a)&&!xa(n)?(a.value=n,!0):Reflect.set(e,t,n,i)}};function B$(e){return A1(e)?e:new Proxy(e,L8e)}class P8e{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new R$,{get:i,set:a}=t(n.track.bind(n),n.trigger.bind(n));this._get=i,this._set=a}get value(){return this._value=this._get()}set value(t){this._set(t)}}function jX(e){return new P8e(e)}function q3(e){const t=Ks(e)?new Array(e.length):{};for(const n in e)t[n]=vme(e,n);return t}class M8e{constructor(t,n,i){this._object=t,this._key=n,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return h8e(Qo(this._object),this._key)}}class N8e{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function V$(e,t,n){return xa(e)?e:qo(e)?new N8e(e):Fa(e)&&arguments.length>1?vme(e,t,n):kt(e)}function vme(e,t,n){const i=e[t];return xa(i)?i:new M8e(e,t,n)}class F8e{constructor(t,n,i){this.fn=t,this.setter=n,this._value=void 0,this.dep=new R$(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=JI-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&Cl!==this)return Ype(this,!0),!0}get value(){const t=this.dep.track();return Qpe(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function $8e(e,t,n=!1){let i,a;return qo(e)?i=e:(i=e.get,a=e.set),new F8e(i,a,n)}const bme={GET:"get",HAS:"has",ITERATE:"iterate"},yme={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},H$={},U$=new WeakMap;let G3;function _me(){return G3}function ZX(e,t=!1,n=G3){if(n){let i=U$.get(n);i||U$.set(n,i=[]),i.push(e)}}function B8e(e,t,n=Ir){const{immediate:i,deep:a,once:l,scheduler:f,augmentJob:d,call:h}=n,b=q=>a?q:xm(q)||a===!1||a===0?Sb(q,1):Sb(q);let S,k,T,O,P=!1,B=!1;if(xa(e)?(k=()=>e.value,P=xm(e)):A1(e)?(k=()=>b(e),P=!0):Ks(e)?(B=!0,P=e.some(q=>A1(q)||xm(q)),k=()=>e.map(q=>{if(xa(q))return q.value;if(A1(q))return b(q);if(qo(q))return h?h(q,2):q()})):qo(e)?t?k=h?()=>h(e,2):e:k=()=>{if(T){gb();try{T()}finally{vb()}}const q=G3;G3=S;try{return h?h(e,3,[O]):e(O)}finally{G3=q}}:k=jd,t&&a){const q=k,ne=a===!0?1/0:a;k=()=>Sb(q(),ne)}const W=GI(),Z=()=>{S.stop(),W&&W.active&&OX(W.effects,S)};if(l&&t){const q=t;t=(...ne)=>{q(...ne),Z()}}let Y=B?new Array(e.length).fill(H$):H$;const z=q=>{if(!(!(S.flags&1)||!S.dirty&&!q))if(t){const ne=S.run();if(a||P||(B?ne.some((ue,J)=>Pp(ue,Y[J])):Pp(ne,Y))){T&&T();const ue=G3;G3=S;try{const J=[ne,Y===H$?void 0:B&&Y[0]===H$?[]:Y,O];h?h(t,3,J):t(...J),Y=ne}finally{G3=ue}}}else S.run()};return d&&d(z),S=new iw(k),S.scheduler=f?()=>f(z,!1):z,O=q=>ZX(q,!1,S),T=S.onStop=()=>{const q=U$.get(S);if(q){if(h)h(q,4);else for(const ne of q)ne();U$.delete(S)}},t?i?z(!0):Y=S.run():f?f(z.bind(null,!0),!0):S.run(),Z.pause=S.pause.bind(S),Z.resume=S.resume.bind(S),Z.stop=Z,Z}function Sb(e,t=1/0,n){if(t<=0||!Fa(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,xa(e))Sb(e.value,t,n);else if(Ks(e))for(let i=0;i<e.length;i++)Sb(e[i],t,n);else if(_S(e)||sw(e))e.forEach(i=>{Sb(i,t,n)});else if(w$(e)){for(const i in e)Sb(e[i],t,n);for(const i of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,i)&&Sb(e[i],t,n)}return e}/** * @vue/runtime-core v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/const xS=[];function V8e(e){xS.push(e)}function H8e(){xS.pop()}let qX=!1;function rvt(e,...t){if(qX)return;qX=!0,gb();const n=xS.length?xS[xS.length-1].component:null,i=n&&n.appContext.config.warnHandler,a=U8e();if(i)K3(i,n,11,[e+t.map(l=>{var f,d;return(d=(f=l.toString)==null?void 0:f.call(l))!=null?d:JSON.stringify(l)}).join(""),n&&n.proxy,a.map(({vnode:l})=>"at <".concat(Khe(n,l.type),">")).join("\n"),a]);else{const l=["[Vue warn]: ".concat(e),...t];a.length&&l.push("\n",...z8e(a)),console.warn(...l)}vb(),qX=!1}function U8e(){let e=xS[xS.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const i=e.component&&e.component.parent;e=i&&i.vnode}return t}function z8e(e){const t=[];return e.forEach((n,i)=>{t.push(...i===0?[]:["\n"],...W8e(n))}),t}function W8e({vnode:e,recurseCount:t}){const n=t>0?"... (".concat(t," recursive calls)"):"",i=e.component?e.component.parent==null:!1,a=" at <".concat(Khe(e.component,e.type,i)),l=">"+n;return e.props?[a,...j8e(e.props),l]:[a+l]}function j8e(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(i=>{t.push(...Sme(i,e[i]))}),n.length>3&&t.push(" ..."),t}function Sme(e,t,n){return kr(t)?(t=JSON.stringify(t),n?t:["".concat(e,"=").concat(t)]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:["".concat(e,"=").concat(t)]:xa(t)?(t=Sme(e,Qo(t.value),!0),n?t:["".concat(e,"=Ref<"),t,">"]):qo(t)?["".concat(e,"=fn").concat(t.name?"<".concat(t.name,">"):"")]:(t=Qo(t),n?t:["".concat(e,"="),t])}function Cme(e,t){}const wme={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},Z8e={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function K3(e,t,n,i){try{return i?e(...i):e()}catch(a){Y3(a,t,n)}}function Ah(e,t,n,i){if(qo(e)){const a=K3(e,t,n,i);return a&&RX(a)&&a.catch(l=>{Y3(l,t,n)}),a}if(Ks(e)){const a=[];for(let l=0;l<e.length;l++)a.push(Ah(e[l],t,n,i));return a}}function Y3(e,t,n,i=!0){const a=t?t.vnode:null,{errorHandler:l,throwUnhandledErrorInProduction:f}=t&&t.appContext.config||Ir;if(t){let d=t.parent;const h=t.proxy,b="https://vuejs.org/error-reference/#runtime-".concat(n);for(;d;){const S=d.ec;if(S){for(let k=0;k<S.length;k++)if(S[k](e,h,b)===!1)return}d=d.parent}if(l){gb(),K3(l,null,10,[e,h,b]),vb();return}}q8e(e,n,a,i,f)}function q8e(e,t,n,i=!0,a=!1){if(a)throw e;console.error(e)}const Np=[];let wv=-1;const cw=[];let X3=null,uw=0;const Eme=Promise.resolve();let z$=null;function kc(e){const t=z$||Eme;return e?t.then(this?e.bind(this):e):t}function G8e(e){let t=wv+1,n=Np.length;for(;t<n;){const i=t+n>>>1,a=Np[i],l=tA(a);l<e||l===e&&a.flags&2?t=i+1:n=i}return t}function GX(e){if(!(e.flags&1)){const t=tA(e),n=Np[Np.length-1];!n||!(e.flags&2)&&t>=tA(n)?Np.push(e):Np.splice(G8e(t),0,e),e.flags|=1,kme()}}function kme(){z$||(z$=Eme.then(Tme))}function dw(e){Ks(e)?cw.push(...e):X3&&e.id===-1?X3.splice(uw+1,0,e):e.flags&1||(cw.push(e),e.flags|=1),kme()}function xme(e,t,n=wv+1){for(;n<Np.length;n++){const i=Np[n];if(i&&i.flags&2){if(e&&i.id!==e.uid)continue;Np.splice(n,1),n--,i.flags&4&&(i.flags&=-2),i(),i.flags&4||(i.flags&=-2)}}}function W$(e){if(cw.length){const t=[...new Set(cw)].sort((n,i)=>tA(n)-tA(i));if(cw.length=0,X3){X3.push(...t);return}for(X3=t,uw=0;uw<X3.length;uw++){const n=X3[uw];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}X3=null,uw=0}}const tA=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Tme(e){try{for(wv=0;wv<Np.length;wv++){const t=Np[wv];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),K3(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;wv<Np.length;wv++){const t=Np[wv];t&&(t.flags&=-2)}wv=-1,Np.length=0,W$(),z$=null,(Np.length||cw.length)&&Tme()}}let fw,j$=[];function Ime(e,t){var n,i;fw=e,fw?(fw.enabled=!0,j$.forEach(({event:a,args:l})=>fw.emit(a,...l)),j$=[]):typeof window<"u"&&window.HTMLElement&&!((i=(n=window.navigator)==null?void 0:n.userAgent)!=null&&i.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(l=>{Ime(l,t)}),setTimeout(()=>{fw||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,j$=[])},3e3)):j$=[]}let ed=null,Z$=null;function nA(e){const t=ed;return ed=e,Z$=e&&e.type.__scopeId||null,t}function KX(e){Z$=e}function YX(){Z$=null}const q$=e=>te;function te(e,t=ed,n){if(!t||e._n)return e;const i=(...a)=>{i._d&&pB(-1);const l=nA(t);let f;try{f=e(...a)}finally{nA(l),i._d&&pB(1)}return f};return i._n=!0,i._c=!0,i._d=!0,i}function Gn(e,t){if(ed===null)return e;const n=gA(ed),i=e.dirs||(e.dirs=[]);for(let a=0;a<t.length;a++){let[l,f,d,h=Ir]=t[a];l&&(qo(l)&&(l={mounted:l,updated:l}),l.deep&&Sb(f),i.push({dir:l,instance:n,value:f,oldValue:void 0,arg:d,modifiers:h}))}return e}function Ev(e,t,n,i){const a=e.dirs,l=t&&t.dirs;for(let f=0;f<a.length;f++){const d=a[f];l&&(d.oldValue=l[f].value);let h=d.dir[i];h&&(gb(),Ah(h,n,8,[e.el,d,e,t]),vb())}}const Ame=Symbol("_vte"),Ome=e=>e.__isTeleport,sA=e=>e&&(e.disabled||e.disabled===""),Rme=e=>e&&(e.defer||e.defer===""),Dme=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Lme=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,XX=(e,t)=>{const n=e&&e.to;return kr(n)?t?t(n):null:n},Pme={name:"Teleport",__isTeleport:!0,process(e,t,n,i,a,l,f,d,h,b){const{mc:S,pc:k,pbc:T,o:{insert:O,querySelector:P,createText:B,createComment:W}}=b,Z=sA(t.props);let{shapeFlag:Y,children:z,dynamicChildren:q}=t;if(e==null){const ne=t.el=B(""),ue=t.anchor=B("");O(ne,n,i),O(ue,n,i);const J=(ge,de)=>{Y&16&&(a&&a.isCE&&(a.ce._teleportTarget=ge),S(z,ge,de,a,l,f,d,h))},ce=()=>{const ge=t.target=XX(t.props,P),de=Mme(ge,t,B,O);ge&&(f!=="svg"&&Dme(ge)?f="svg":f!=="mathml"&&Lme(ge)&&(f="mathml"),Z||(J(ge,de),K$(t,!1)))};Z&&(J(n,ue),K$(t,!0)),Rme(t.props)?td(()=>{ce(),t.el.__isMounted=!0},l):ce()}else{if(Rme(t.props)&&!e.el.__isMounted){td(()=>{Pme.process(e,t,n,i,a,l,f,d,h,b),delete e.el.__isMounted},l);return}t.el=e.el,t.targetStart=e.targetStart;const ne=t.anchor=e.anchor,ue=t.target=e.target,J=t.targetAnchor=e.targetAnchor,ce=sA(e.props),ge=ce?n:ue,de=ce?ne:J;if(f==="svg"||Dme(ue)?f="svg":(f==="mathml"||Lme(ue))&&(f="mathml"),q?(T(e.dynamicChildren,q,ge,a,l,f,d),EJ(e,t,!0)):h||k(e,t,ge,de,a,l,f,d,!1),Z)ce?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):G$(t,n,ne,b,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const he=t.target=XX(t.props,P);he&&G$(t,he,null,b,0)}else ce&&G$(t,ue,J,b,1);K$(t,Z)}},remove(e,t,n,{um:i,o:{remove:a}},l){const{shapeFlag:f,children:d,anchor:h,targetStart:b,targetAnchor:S,target:k,props:T}=e;if(k&&(a(b),a(S)),l&&a(h),f&16){const O=l||!sA(T);for(let P=0;P<d.length;P++){const B=d[P];i(B,t,n,O,!!B.dynamicChildren)}}},move:G$,hydrate:K8e};function G$(e,t,n,{o:{insert:i},m:a},l=2){l===0&&i(e.targetAnchor,t,n);const{el:f,anchor:d,shapeFlag:h,children:b,props:S}=e,k=l===2;if(k&&i(f,t,n),(!k||sA(S))&&h&16)for(let T=0;T<b.length;T++)a(b[T],t,n,2);k&&i(d,t,n)}function K8e(e,t,n,i,a,l,{o:{nextSibling:f,parentNode:d,querySelector:h,insert:b,createText:S}},k){const T=t.target=XX(t.props,h);if(T){const O=sA(t.props),P=T._lpa||T.firstChild;if(t.shapeFlag&16)if(O)t.anchor=k(f(e),t,d(e),n,i,a,l),t.targetStart=P,t.targetAnchor=P&&f(P);else{t.anchor=f(e);let B=P;for(;B;){if(B&&B.nodeType===8){if(B.data==="teleport start anchor")t.targetStart=B;else if(B.data==="teleport anchor"){t.targetAnchor=B,T._lpa=t.targetAnchor&&f(t.targetAnchor);break}}B=f(B)}t.targetAnchor||Mme(T,t,S,b),k(P&&f(P),t,T,n,i,a,l)}K$(t,O)}return t.anchor&&f(t.anchor)}const JX=Pme;function K$(e,t){const n=e.ctx;if(n&&n.ut){let i,a;for(t?(i=e.el,a=e.anchor):(i=e.targetStart,a=e.targetAnchor);i&&i!==a;)i.nodeType===1&&i.setAttribute("data-v-owner",n.uid),i=i.nextSibling;n.ut()}}function Mme(e,t,n,i){const a=t.targetStart=n(""),l=t.targetAnchor=n("");return a[Ame]=l,e&&(i(a,e),i(l,e)),l}const J3=Symbol("_leaveCb"),Y$=Symbol("_enterCb");function X$(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Pr(()=>{e.isMounted=!0}),wb(()=>{e.isUnmounting=!0}),e}const O1=[Function,Array],J$={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:O1,onEnter:O1,onAfterEnter:O1,onEnterCancelled:O1,onBeforeLeave:O1,onLeave:O1,onAfterLeave:O1,onLeaveCancelled:O1,onBeforeAppear:O1,onAppear:O1,onAfterAppear:O1,onAppearCancelled:O1},Nme=e=>{const t=e.subTree;return t.component?Nme(t.component):t},Y8e={name:"BaseTransition",props:J$,setup(e,{slots:t}){const n=sd(),i=X$();return()=>{const a=t.default&&oA(t.default(),!0);if(!a||!a.length)return;const l=Fme(a),f=Qo(e),{mode:d}=f;if(i.isLeaving)return eJ(l);const h=Bme(l);if(!h)return eJ(l);let b=TS(h,f,i,n,k=>b=k);h.type!==au&&kv(h,b);let S=n.subTree&&Bme(n.subTree);if(S&&S.type!==au&&!qg(h,S)&&Nme(n).type!==au){let k=TS(S,f,i,n);if(kv(S,k),d==="out-in"&&h.type!==au)return i.isLeaving=!0,k.afterLeave=()=>{i.isLeaving=!1,n.job.flags&8||n.update(),delete k.afterLeave,S=void 0},eJ(l);d==="in-out"&&h.type!==au?k.delayLeave=(T,O,P)=>{const B=$me(i,S);B[String(S.key)]=S,T[J3]=()=>{O(),T[J3]=void 0,delete b.delayedLeave,S=void 0},b.delayedLeave=()=>{P(),delete b.delayedLeave,S=void 0}}:S=void 0}else S&&(S=void 0);return l}}};function Fme(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==au){t=n;break}}return t}const QX=Y8e;function $me(e,t){const{leavingVNodes:n}=e;let i=n.get(t.type);return i||(i=Object.create(null),n.set(t.type,i)),i}function TS(e,t,n,i,a){const{appear:l,mode:f,persisted:d=!1,onBeforeEnter:h,onEnter:b,onAfterEnter:S,onEnterCancelled:k,onBeforeLeave:T,onLeave:O,onAfterLeave:P,onLeaveCancelled:B,onBeforeAppear:W,onAppear:Z,onAfterAppear:Y,onAppearCancelled:z}=t,q=String(e.key),ne=$me(n,e),ue=(ge,de)=>{ge&&Ah(ge,i,9,de)},J=(ge,de)=>{const he=de[1];ue(ge,de),Ks(ge)?ge.every(ie=>ie.length<=1)&&he():ge.length<=1&&he()},ce={mode:f,persisted:d,beforeEnter(ge){let de=h;if(!n.isMounted)if(l)de=W||h;else return;ge[J3]&&ge[J3](!0);const he=ne[q];he&&qg(e,he)&&he.el[J3]&&he.el[J3](),ue(de,[ge])},enter(ge){let de=b,he=S,ie=k;if(!n.isMounted)if(l)de=Z||b,he=Y||S,ie=z||k;else return;let Be=!1;const $e=ge[Y$]=Ue=>{Be||(Be=!0,Ue?ue(ie,[ge]):ue(he,[ge]),ce.delayedLeave&&ce.delayedLeave(),ge[Y$]=void 0)};de?J(de,[ge,$e]):$e()},leave(ge,de){const he=String(e.key);if(ge[Y$]&&ge[Y$](!0),n.isUnmounting)return de();ue(T,[ge]);let ie=!1;const Be=ge[J3]=$e=>{ie||(ie=!0,de(),$e?ue(B,[ge]):ue(P,[ge]),ge[J3]=void 0,ne[he]===e&&delete ne[he])};ne[he]=e,O?J(O,[ge,Be]):Be()},clone(ge){const de=TS(ge,t,n,i,a);return a&&a(de),de}};return ce}function eJ(e){if(iA(e))return e=Rh(e),e.children=null,e}function Bme(e){if(!iA(e))return Ome(e.type)&&e.children?Fme(e.children):e;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&qo(n.default))return n.default()}}function kv(e,t){e.shapeFlag&6&&e.component?(e.transition=t,kv(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function oA(e,t=!1,n){let i=[],a=0;for(let l=0;l<e.length;l++){let f=e[l];const d=n==null?f.key:String(n)+String(f.key!=null?f.key:l);f.type===bt?(f.patchFlag&128&&a++,i=i.concat(oA(f.children,t,d))):(t||f.type!==au)&&i.push(d!=null?Rh(f,{key:d}):f)}if(a>1)for(let l=0;l<i.length;l++)i[l].patchFlag=-2;return i}/*! #__NO_SIDE_EFFECTS__ */function Gr(e,t){return qo(e)?wi({name:e.name},t,{setup:e}):e}function Oh(){const e=sd();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function tJ(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Vme(e){const t=sd(),n=kS(null);if(t){const a=t.refs===Ir?t.refs={}:t.refs;Object.defineProperty(a,e,{enumerable:!0,get:()=>n.value,set:l=>n.value=l})}return n}function rA(e,t,n,i,a=!1){if(Ks(e)){e.forEach((P,B)=>rA(P,t&&(Ks(t)?t[B]:t),n,i,a));return}if(Q3(i)&&!a){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&rA(e,t,n,i.component.subTree);return}const l=i.shapeFlag&4?gA(i.component):i.el,f=a?null:l,{i:d,r:h}=e,b=t&&t.r,S=d.refs===Ir?d.refs={}:d.refs,k=d.setupState,T=Qo(k),O=k===Ir?()=>!1:P=>fa(T,P);if(b!=null&&b!==h&&(kr(b)?(S[b]=null,O(b)&&(k[b]=null)):xa(b)&&(b.value=null)),qo(h))K3(h,d,12,[f,S]);else{const P=kr(h),B=xa(h);if(P||B){const W=()=>{if(e.f){const Z=P?O(h)?k[h]:S[h]:h.value;a?Ks(Z)&&OX(Z,l):Ks(Z)?Z.includes(l)||Z.push(l):P?(S[h]=[l],O(h)&&(k[h]=S[h])):(h.value=[l],e.k&&(S[e.k]=h.value))}else P?(S[h]=f,O(h)&&(k[h]=f)):B&&(h.value=f,e.k&&(S[e.k]=f))};f?(W.id=-1,td(W,n)):W()}}}let Hme=!1;const pw=()=>{Hme||(console.error("Hydration completed but contains mismatches."),Hme=!0)},X8e=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",J8e=e=>e.namespaceURI.includes("MathML"),Q$=e=>{if(e.nodeType===1){if(X8e(e))return"svg";if(J8e(e))return"mathml"}},mw=e=>e.nodeType===8;function Q8e(e){const{mt:t,p:n,o:{patchProp:i,createText:a,nextSibling:l,parentNode:f,remove:d,insert:h,createComment:b}}=e,S=(z,q)=>{if(!q.hasChildNodes()){n(null,z,q),W$(),q._vnode=z;return}k(q.firstChild,z,null,null,null),W$(),q._vnode=z},k=(z,q,ne,ue,J,ce=!1)=>{ce=ce||!!q.dynamicChildren;const ge=mw(z)&&z.data==="[",de=()=>B(z,q,ne,ue,J,ge),{type:he,ref:ie,shapeFlag:Be,patchFlag:$e}=q;let Ue=z.nodeType;q.el=z,$e===-2&&(ce=!1,q.dynamicChildren=null);let V=null;switch(he){case Eb:Ue!==3?q.children===""?(h(q.el=a(""),f(z),z),V=z):V=de():(z.data!==q.children&&(pw(),z.data=q.children),V=l(z));break;case au:Y(z)?(V=l(z),Z(q.el=z.content.firstChild,z,ne)):Ue!==8||ge?V=de():V=l(z);break;case e5:if(ge&&(z=l(z),Ue=z.nodeType),Ue===1||Ue===3){V=z;const Ye=!q.children.length;for(let Fe=0;Fe<q.staticCount;Fe++)Ye&&(q.children+=V.nodeType===1?V.outerHTML:V.data),Fe===q.staticCount-1&&(q.anchor=V),V=l(V);return ge?l(V):V}else de();break;case bt:ge?V=P(z,q,ne,ue,J,ce):V=de();break;default:if(Be&1)(Ue!==1||q.type.toLowerCase()!==z.tagName.toLowerCase())&&!Y(z)?V=de():V=T(z,q,ne,ue,J,ce);else if(Be&6){q.slotScopeIds=J;const Ye=f(z);if(ge?V=W(z):mw(z)&&z.data==="teleport start"?V=W(z,z.data,"teleport end"):V=l(z),t(q,Ye,null,ne,ue,Q$(Ye),ce),Q3(q)&&!q.type.__asyncResolved){let Fe;ge?(Fe=pe(bt),Fe.anchor=V?V.previousSibling:Ye.lastChild):Fe=z.nodeType===3?D(""):pe("div"),Fe.el=z,q.component.subTree=Fe}}else Be&64?Ue!==8?V=de():V=q.type.hydrate(z,q,ne,ue,J,ce,e,O):Be&128&&(V=q.type.hydrate(z,q,ne,ue,Q$(f(z)),J,ce,e,k))}return ie!=null&&rA(ie,null,ue,q),V},T=(z,q,ne,ue,J,ce)=>{ce=ce||!!q.dynamicChildren;const{type:ge,props:de,patchFlag:he,shapeFlag:ie,dirs:Be,transition:$e}=q,Ue=ge==="input"||ge==="option";if(Ue||he!==-1){Be&&Ev(q,null,ne,"created");let V=!1;if(Y(z)){V=The(null,$e)&&ne&&ne.vnode.props&&ne.vnode.props.appear;const Fe=z.content.firstChild;V&&$e.beforeEnter(Fe),Z(Fe,z,ne),q.el=z=Fe}if(ie&16&&!(de&&(de.innerHTML||de.textContent))){let Fe=O(z.firstChild,q,z,ne,ue,J,ce);for(;Fe;){eB(z,1)||pw();const St=Fe;Fe=Fe.nextSibling,d(St)}}else if(ie&8){let Fe=q.children;Fe[0]==="\n"&&(z.tagName==="PRE"||z.tagName==="TEXTAREA")&&(Fe=Fe.slice(1)),z.textContent!==Fe&&(eB(z,0)||pw(),z.textContent=q.children)}if(de){if(Ue||!ce||he&48){const Fe=z.tagName.includes("-");for(const St in de)(Ue&&(St.endsWith("value")||St==="indeterminate")||yS(St)&&!z3(St)||St[0]==="."||Fe)&&i(z,St,null,de[St],void 0,ne)}else if(de.onClick)i(z,"onClick",null,de.onClick,void 0,ne);else if(he&4&&A1(de.style))for(const Fe in de.style)de.style[Fe]}let Ye;(Ye=de&&de.onVnodeBeforeMount)&&Im(Ye,ne,q),Be&&Ev(q,null,ne,"beforeMount"),((Ye=de&&de.onVnodeMounted)||Be||V)&&$he(()=>{Ye&&Im(Ye,ne,q),V&&$e.enter(z),Be&&Ev(q,null,ne,"mounted")},ue)}return z.nextSibling},O=(z,q,ne,ue,J,ce,ge)=>{ge=ge||!!q.dynamicChildren;const de=q.children,he=de.length;for(let ie=0;ie<he;ie++){const Be=ge?de[ie]:de[ie]=Tm(de[ie]),$e=Be.type===Eb;z?($e&&!ge&&ie+1<he&&Tm(de[ie+1]).type===Eb&&(h(a(z.data.slice(Be.children.length)),ne,l(z)),z.data=Be.children),z=k(z,Be,ue,J,ce,ge)):$e&&!Be.children?h(Be.el=a(""),ne):(eB(ne,1)||pw(),n(null,Be,ne,null,ue,J,Q$(ne),ce))}return z},P=(z,q,ne,ue,J,ce)=>{const{slotScopeIds:ge}=q;ge&&(J=J?J.concat(ge):ge);const de=f(z),he=O(l(z),q,de,ne,ue,J,ce);return he&&mw(he)&&he.data==="]"?l(q.anchor=he):(pw(),h(q.anchor=b("]"),de,he),he)},B=(z,q,ne,ue,J,ce)=>{if(eB(z.parentElement,1)||pw(),q.el=null,ce){const he=W(z);for(;;){const ie=l(z);if(ie&&ie!==he)d(ie);else break}}const ge=l(z),de=f(z);return d(z),n(null,q,de,ge,ne,ue,Q$(de),J),ne&&(ne.vnode.el=q.el,dB(ne,q.el)),ge},W=(z,q="[",ne="]")=>{let ue=0;for(;z;)if(z=l(z),z&&mw(z)&&(z.data===q&&ue++,z.data===ne)){if(ue===0)return l(z);ue--}return z},Z=(z,q,ne)=>{const ue=q.parentNode;ue&&ue.replaceChild(z,q);let J=ne;for(;J;)J.vnode.el===q&&(J.vnode.el=J.subTree.el=z),J=J.parent},Y=z=>z.nodeType===1&&z.tagName==="TEMPLATE";return[S,k]}const Ume="data-allow-mismatch",e7e={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function eB(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(Ume);)e=e.parentElement;const n=e&&e.getAttribute(Ume);if(n==null)return!1;if(n==="")return!0;{const i=n.split(",");return t===0&&i.includes("children")?!0:n.split(",").includes(e7e[t])}}const t7e=T$().requestIdleCallback||(e=>setTimeout(e,1)),n7e=T$().cancelIdleCallback||(e=>clearTimeout(e)),zme=(e=1e4)=>t=>{const n=t7e(t,{timeout:e});return()=>n7e(n)};function s7e(e){const{top:t,left:n,bottom:i,right:a}=e.getBoundingClientRect(),{innerHeight:l,innerWidth:f}=window;return(t>0&&t<l||i>0&&i<l)&&(n>0&&n<f||a>0&&a<f)}const Wme=e=>(t,n)=>{const i=new IntersectionObserver(a=>{for(const l of a)if(l.isIntersecting){i.disconnect(),t();break}},e);return n(a=>{if(a instanceof Element){if(s7e(a))return t(),i.disconnect(),!1;i.observe(a)}}),()=>i.disconnect()},jme=e=>t=>{if(e){const n=matchMedia(e);if(n.matches)t();else return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t)}},Zme=(e=[])=>(t,n)=>{kr(e)&&(e=[e]);let i=!1;const a=f=>{i||(i=!0,l(),t(),f.target.dispatchEvent(new f.constructor(f.type,f)))},l=()=>{n(f=>{for(const d of e)f.removeEventListener(d,a)})};return n(f=>{for(const d of e)f.addEventListener(d,a,{once:!0})}),l};function o7e(e,t){if(mw(e)&&e.data==="["){let n=1,i=e.nextSibling;for(;i;){if(i.nodeType===1){if(t(i)===!1)break}else if(mw(i))if(i.data==="]"){if(--n===0)break}else i.data==="["&&n++;i=i.nextSibling}}else t(e)}const Q3=e=>!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function nJ(e){qo(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:i,delay:a=200,hydrate:l,timeout:f,suspensible:d=!0,onError:h}=e;let b=null,S,k=0;const T=()=>(k++,b=null,O()),O=()=>{let P;return b||(P=b=t().catch(B=>{if(B=B instanceof Error?B:new Error(String(B)),h)return new Promise((W,Z)=>{h(B,()=>W(T()),()=>Z(B),k+1)});throw B}).then(B=>P!==b&&b?b:(B&&(B.__esModule||B[Symbol.toStringTag]==="Module")&&(B=B.default),S=B,B)))};return Gr({name:"AsyncComponentWrapper",__asyncLoader:O,__asyncHydrate(P,B,W){const Z=l?()=>{const Y=l(W,z=>o7e(P,z));Y&&(B.bum||(B.bum=[])).push(Y)}:W;S?Z():O().then(()=>!B.isUnmounted&&Z())},get __asyncResolved(){return S},setup(){const P=nd;if(tJ(P),S)return()=>sJ(S,P);const B=z=>{b=null,Y3(z,P,13,!i)};if(d&&P.suspense||gw)return O().then(z=>()=>sJ(z,P)).catch(z=>(B(z),()=>i?pe(i,{error:z}):null));const W=kt(!1),Z=kt(),Y=kt(!!a);return a&&setTimeout(()=>{Y.value=!1},a),f!=null&&setTimeout(()=>{if(!W.value&&!Z.value){const z=new Error("Async component timed out after ".concat(f,"ms."));B(z),Z.value=z}},f),O().then(()=>{W.value=!0,P.parent&&iA(P.parent.vnode)&&P.parent.update()}).catch(z=>{B(z),Z.value=z}),()=>{if(W.value&&S)return sJ(S,P);if(Z.value&&i)return pe(i,{error:Z.value});if(n&&!Y.value)return pe(n)}}})}function sJ(e,t){const{ref:n,props:i,children:a,ce:l}=t.vnode,f=pe(e,i,a);return f.ref=n,f.ce=l,delete t.vnode.ce,f}const iA=e=>e.type.__isKeepAlive,qme={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=sd(),i=n.ctx;if(!i.renderer)return()=>{const Y=t.default&&t.default();return Y&&Y.length===1?Y[0]:Y};const a=new Map,l=new Set;let f=null;const d=n.suspense,{renderer:{p:h,m:b,um:S,o:{createElement:k}}}=i,T=k("div");i.activate=(Y,z,q,ne,ue)=>{const J=Y.component;b(Y,z,q,0,d),h(J.vnode,Y,z,q,J,d,ne,Y.slotScopeIds,ue),td(()=>{J.isDeactivated=!1,J.a&&rw(J.a);const ce=Y.props&&Y.props.onVnodeMounted;ce&&Im(ce,J.parent,Y)},d)},i.deactivate=Y=>{const z=Y.component;lB(z.m),lB(z.a),b(Y,T,null,1,d),td(()=>{z.da&&rw(z.da);const q=Y.props&&Y.props.onVnodeUnmounted;q&&Im(q,z.parent,Y),z.isDeactivated=!0},d)};function O(Y){oJ(Y),S(Y,n,d,!0)}function P(Y){a.forEach((z,q)=>{const ne=vB(z.type);ne&&!Y(ne)&&B(q)})}function B(Y){const z=a.get(Y);z&&(!f||!qg(z,f))?O(z):f&&oJ(f),a.delete(Y),l.delete(Y)}io(()=>[e.include,e.exclude],([Y,z])=>{Y&&P(q=>aA(Y,q)),z&&P(q=>!aA(z,q))},{flush:"post",deep:!0});let W=null;const Z=()=>{W!=null&&(fB(n.subTree.type)?td(()=>{a.set(W,sB(n.subTree))},n.subTree.suspense):a.set(W,sB(n.subTree)))};return Pr(Z),lA(Z),wb(()=>{a.forEach(Y=>{const{subTree:z,suspense:q}=n,ne=sB(z);if(Y.type===ne.type&&Y.key===ne.key){oJ(ne);const ue=ne.component.da;ue&&td(ue,q);return}O(Y)})}),()=>{if(W=null,!t.default)return f=null;const Y=t.default(),z=Y[0];if(Y.length>1)return f=null,Y;if(!xv(z)||!(z.shapeFlag&4)&&!(z.shapeFlag&128))return f=null,z;let q=sB(z);if(q.type===au)return f=null,q;const ne=q.type,ue=vB(Q3(q)?q.type.__asyncResolved||{}:ne),{include:J,exclude:ce,max:ge}=e;if(J&&(!ue||!aA(J,ue))||ce&&ue&&aA(ce,ue))return q.shapeFlag&=-257,f=q,z;const de=q.key==null?ne:q.key,he=a.get(de);return q.el&&(q=Rh(q),z.shapeFlag&128&&(z.ssContent=q)),W=de,he?(q.el=he.el,q.component=he.component,q.transition&&kv(q,q.transition),q.shapeFlag|=512,l.delete(de),l.add(de)):(l.add(de),ge&&l.size>parseInt(ge,10)&&B(l.values().next().value)),q.shapeFlag|=256,f=q,fB(z.type)?z:q}}};function aA(e,t){return Ks(e)?e.some(n=>aA(n,t)):kr(e)?e.split(",").includes(t):q6e(e)?(e.lastIndex=0,e.test(t)):!1}function tB(e,t){Gme(e,"a",t)}function nB(e,t){Gme(e,"da",t)}function Gme(e,t,n=nd){const i=e.__wdc||(e.__wdc=()=>{let a=n;for(;a;){if(a.isDeactivated)return;a=a.parent}return e()});if(oB(t,i,n),n){let a=n.parent;for(;a&&a.parent;)iA(a.parent.vnode)&&r7e(i,t,n,a),a=a.parent}}function r7e(e,t,n,i){const a=oB(t,e,i,!0);$a(()=>{OX(i[t],a)},n)}function oJ(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function sB(e){return e.shapeFlag&128?e.ssContent:e}function oB(e,t,n=nd,i=!1){if(n){const a=n[e]||(n[e]=[]),l=t.__weh||(t.__weh=(...f)=>{gb();const d=DS(n),h=Ah(t,n,e,f);return d(),vb(),h});return i?a.unshift(l):a.push(l),l}}const Cb=e=>(t,n=nd)=>{(!gw||e==="sp")&&oB(e,(...i)=>t(...i),n)},rJ=Cb("bm"),Pr=Cb("m"),rB=Cb("bu"),lA=Cb("u"),wb=Cb("bum"),$a=Cb("um"),iJ=Cb("sp"),aJ=Cb("rtg"),lJ=Cb("rtc");function cJ(e,t=nd){oB("ec",e,t)}const uJ="components",i7e="directives";function Xe(e,t){return dJ(uJ,e,!0,t)||e}const Kme=Symbol.for("v-ndc");function Io(e){return kr(e)?dJ(uJ,e,!1)||e:e||Kme}function Hr(e){return dJ(i7e,e)}function dJ(e,t,n=!0,i=!1){const a=ed||nd;if(a){const l=a.type;if(e===uJ){const d=vB(l,!1);if(d&&(d===t||d===Sl(t)||d===W3(Sl(t))))return l}const f=Yme(a[e]||l[e],t)||Yme(a.appContext[e],t);return!f&&i?l:f}}function Yme(e,t){return e&&(e[t]||e[Sl(t)]||e[W3(Sl(t))])}function Sn(e,t,n,i){let a;const l=n&&n[i],f=Ks(e);if(f||kr(e)){const d=f&&A1(e);let h=!1;d&&(h=!xm(e),e=L$(e)),a=new Array(e.length);for(let b=0,S=e.length;b<S;b++)a[b]=t(h?Tf(e[b]):e[b],b,void 0,l&&l[b])}else if(typeof e=="number"){a=new Array(e);for(let d=0;d<e;d++)a[d]=t(d+1,d,void 0,l&&l[d])}else if(Fa(e))if(e[Symbol.iterator])a=Array.from(e,(d,h)=>t(d,h,void 0,l&&l[h]));else{const d=Object.keys(e);a=new Array(d.length);for(let h=0,b=d.length;h<b;h++){const S=d[h];a[h]=t(e[S],S,h,l&&l[h])}}else a=[];return n&&(n[i]=a),a}function If(e,t){for(let n=0;n<t.length;n++){const i=t[n];if(Ks(i))for(let a=0;a<i.length;a++)e[i[a].name]=i[a].fn;else i&&(e[i.name]=i.key?(...a)=>{const l=i.fn(...a);return l&&(l.key=i.key),l}:i.fn)}return e}function is(e,t,n={},i,a){if(ed.ce||ed.parent&&Q3(ed.parent)&&ed.parent.ce)return t!=="default"&&(n.name=t),L(),Ee(bt,null,[pe("slot",n,i&&i())],64);let l=e[t];l&&l._c&&(l._d=!1),L();const f=l&&fJ(l(n)),d=n.key||f&&f.key,h=Ee(bt,{key:(d&&!Em(d)?d:"_".concat(t))+(!f&&i?"_fb":"")},f||(i?i():[]),f&&e._===1?64:-2);return!a&&h.scopeId&&(h.slotScopeIds=[h.scopeId+"-s"]),l&&l._c&&(l._d=!0),h}function fJ(e){return e.some(t=>xv(t)?!(t.type===au||t.type===bt&&!fJ(t.children)):!0)?e:null}function Xme(e,t){const n={};for(const i in e)n[t&&/[A-Z]/.test(i)?"on:".concat(i):SS(i)]=e[i];return n}const pJ=e=>e?Whe(e)?gA(e):pJ(e.parent):null,cA=wi(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>pJ(e.parent),$root:e=>pJ(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>vJ(e),$forceUpdate:e=>e.f||(e.f=()=>{GX(e.update)}),$nextTick:e=>e.n||(e.n=kc.bind(e.proxy)),$watch:e=>C7e.bind(e)}),mJ=(e,t)=>e!==Ir&&!e.__isScriptSetup&&fa(e,t),hJ={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:i,data:a,props:l,accessCache:f,type:d,appContext:h}=e;let b;if(t[0]!=="$"){const O=f[t];if(O!==void 0)switch(O){case 1:return i[t];case 2:return a[t];case 4:return n[t];case 3:return l[t]}else{if(mJ(i,t))return f[t]=1,i[t];if(a!==Ir&&fa(a,t))return f[t]=2,a[t];if((b=e.propsOptions[0])&&fa(b,t))return f[t]=3,l[t];if(n!==Ir&&fa(n,t))return f[t]=4,n[t];gJ&&(f[t]=0)}}const S=cA[t];let k,T;if(S)return t==="$attrs"&&xf(e.attrs,"get",""),S(e);if((k=d.__cssModules)&&(k=k[t]))return k;if(n!==Ir&&fa(n,t))return f[t]=4,n[t];if(T=h.config.globalProperties,fa(T,t))return T[t]},set({_:e},t,n){const{data:i,setupState:a,ctx:l}=e;return mJ(a,t)?(a[t]=n,!0):i!==Ir&&fa(i,t)?(i[t]=n,!0):fa(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(l[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:i,appContext:a,propsOptions:l}},f){let d;return!!n[f]||e!==Ir&&fa(e,f)||mJ(t,f)||(d=l[0])&&fa(d,f)||fa(i,f)||fa(cA,f)||fa(a.config.globalProperties,f)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:fa(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},a7e=wi({},hJ,{get(e,t){if(t!==Symbol.unscopables)return hJ.get(e,t,e)},has(e,t){return t[0]!=="_"&&!Q6e(t)}});function Jme(){return null}function Qme(){return null}function ehe(e){}function the(e){}function nhe(){return null}function she(){}function ohe(e,t){return null}function uA(){return ihe().slots}function rhe(){return ihe().attrs}function ihe(){const e=sd();return e.setupContext||(e.setupContext=Ghe(e))}function dA(e){return Ks(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function ahe(e,t){const n=dA(e);for(const i in t){if(i.startsWith("__skip"))continue;let a=n[i];a?Ks(a)||qo(a)?a=n[i]={type:a,default:t[i]}:a.default=t[i]:a===null&&(a=n[i]={default:t[i]}),a&&t["__skip_".concat(i)]&&(a.skipFactory=!0)}return n}function lhe(e,t){return!e||!t?e||t:Ks(e)&&Ks(t)?e.concat(t):wi({},dA(e),dA(t))}function che(e,t){const n={};for(const i in e)t.includes(i)||Object.defineProperty(n,i,{enumerable:!0,get:()=>e[i]});return n}function uhe(e){const t=sd();let n=e();return RJ(),RX(n)&&(n=n.catch(i=>{throw DS(t),i})),[n,()=>DS(t)]}let gJ=!0;function l7e(e){const t=vJ(e),n=e.proxy,i=e.ctx;gJ=!1,t.beforeCreate&&dhe(t.beforeCreate,e,"bc");const{data:a,computed:l,methods:f,watch:d,provide:h,inject:b,created:S,beforeMount:k,mounted:T,beforeUpdate:O,updated:P,activated:B,deactivated:W,beforeDestroy:Z,beforeUnmount:Y,destroyed:z,unmounted:q,render:ne,renderTracked:ue,renderTriggered:J,errorCaptured:ce,serverPrefetch:ge,expose:de,inheritAttrs:he,components:ie,directives:Be,filters:$e}=t;if(b&&c7e(b,i,null),f)for(const Ye in f){const Fe=f[Ye];qo(Fe)&&(i[Ye]=Fe.bind(n))}if(a){const Ye=a.call(n,n);Fa(Ye)&&(e.data=I1(Ye))}if(gJ=!0,l)for(const Ye in l){const Fe=l[Ye],St=qo(Fe)?Fe.bind(n,n):qo(Fe.get)?Fe.get.bind(n,n):jd,Dt=!qo(Fe)&&qo(Fe.set)?Fe.set.bind(n):jd,He=Ge({get:St,set:Dt});Object.defineProperty(i,Ye,{enumerable:!0,configurable:!0,get:()=>He.value,set:ft=>He.value=ft})}if(d)for(const Ye in d)fhe(d[Ye],i,n,Ye);if(h){const Ye=qo(h)?h.call(n):h;Reflect.ownKeys(Ye).forEach(Fe=>{Ba(Fe,Ye[Fe])})}S&&dhe(S,e,"c");function V(Ye,Fe){Ks(Fe)?Fe.forEach(St=>Ye(St.bind(n))):Fe&&Ye(Fe.bind(n))}if(V(rJ,k),V(Pr,T),V(rB,O),V(lA,P),V(tB,B),V(nB,W),V(cJ,ce),V(lJ,ue),V(aJ,J),V(wb,Y),V($a,q),V(iJ,ge),Ks(de))if(de.length){const Ye=e.exposed||(e.exposed={});de.forEach(Fe=>{Object.defineProperty(Ye,Fe,{get:()=>n[Fe],set:St=>n[Fe]=St})})}else e.exposed||(e.exposed={});ne&&e.render===jd&&(e.render=ne),he!=null&&(e.inheritAttrs=he),ie&&(e.components=ie),Be&&(e.directives=Be),ge&&tJ(e)}function c7e(e,t,n=jd){Ks(e)&&(e=bJ(e));for(const i in e){const a=e[i];let l;Fa(a)?"default"in a?l=Mr(a.from||i,a.default,!0):l=Mr(a.from||i):l=Mr(a),xa(l)?Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>l.value,set:f=>l.value=f}):t[i]=l}}function dhe(e,t,n){Ah(Ks(e)?e.map(i=>i.bind(t.proxy)):e.bind(t.proxy),t,n)}function fhe(e,t,n,i){let a=i.includes(".")?Ohe(n,i):()=>n[i];if(kr(e)){const l=t[e];qo(l)&&io(a,l)}else if(qo(e))io(a,e.bind(n));else if(Fa(e))if(Ks(e))e.forEach(l=>fhe(l,t,n,i));else{const l=qo(e.handler)?e.handler.bind(n):t[e.handler];qo(l)&&io(a,l,e)}}function vJ(e){const t=e.type,{mixins:n,extends:i}=t,{mixins:a,optionsCache:l,config:{optionMergeStrategies:f}}=e.appContext,d=l.get(t);let h;return d?h=d:!a.length&&!n&&!i?h=t:(h={},a.length&&a.forEach(b=>iB(h,b,f,!0)),iB(h,t,f)),Fa(t)&&l.set(t,h),h}function iB(e,t,n,i=!1){const{mixins:a,extends:l}=t;l&&iB(e,l,n,!0),a&&a.forEach(f=>iB(e,f,n,!0));for(const f in t)if(!(i&&f==="expose")){const d=u7e[f]||n&&n[f];e[f]=d?d(e[f],t[f]):t[f]}return e}const u7e={data:phe,props:mhe,emits:mhe,methods:fA,computed:fA,beforeCreate:Fp,created:Fp,beforeMount:Fp,mounted:Fp,beforeUpdate:Fp,updated:Fp,beforeDestroy:Fp,beforeUnmount:Fp,destroyed:Fp,unmounted:Fp,activated:Fp,deactivated:Fp,errorCaptured:Fp,serverPrefetch:Fp,components:fA,directives:fA,watch:f7e,provide:phe,inject:d7e};function phe(e,t){return t?e?function(){return wi(qo(e)?e.call(this,this):e,qo(t)?t.call(this,this):t)}:t:e}function d7e(e,t){return fA(bJ(e),bJ(t))}function bJ(e){if(Ks(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Fp(e,t){return e?[...new Set([].concat(e,t))]:t}function fA(e,t){return e?wi(Object.create(null),e,t):t}function mhe(e,t){return e?Ks(e)&&Ks(t)?[...new Set([...e,...t])]:wi(Object.create(null),dA(e),dA(t!=null?t:{})):t}function f7e(e,t){if(!e)return t;if(!t)return e;const n=wi(Object.create(null),e);for(const i in t)n[i]=Fp(e[i],t[i]);return n}function hhe(){return{app:null,config:{isNativeTag:qI,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let p7e=0;function m7e(e,t){return function(i,a=null){qo(i)||(i=wi({},i)),a!=null&&!Fa(a)&&(a=null);const l=hhe(),f=new WeakSet,d=[];let h=!1;const b=l.app={_uid:p7e++,_component:i,_props:a,_container:null,_context:l,_instance:null,version:bB,get config(){return l.config},set config(S){},use(S,...k){return f.has(S)||(S&&qo(S.install)?(f.add(S),S.install(b,...k)):qo(S)&&(f.add(S),S(b,...k))),b},mixin(S){return l.mixins.includes(S)||l.mixins.push(S),b},component(S,k){return k?(l.components[S]=k,b):l.components[S]},directive(S,k){return k?(l.directives[S]=k,b):l.directives[S]},mount(S,k,T){if(!h){const O=b._ceVNode||pe(i,a);return O.appContext=l,T===!0?T="svg":T===!1&&(T=void 0),k&&t?t(O,S):e(O,S,T),h=!0,b._container=S,S.__vue_app__=b,gA(O.component)}},onUnmount(S){d.push(S)},unmount(){h&&(Ah(d,b._instance,16),e(null,b._container),delete b._container.__vue_app__)},provide(S,k){return l.provides[S]=k,b},runWithContext(S){const k=IS;IS=b;try{return S()}finally{IS=k}}};return b}}let IS=null;function Ba(e,t){if(nd){let n=nd.provides;const i=nd.parent&&nd.parent.provides;i===n&&(n=nd.provides=Object.create(i)),n[e]=t}}function Mr(e,t,n=!1){const i=nd||ed;if(i||IS){const a=IS?IS._context.provides:i?i.parent==null?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides:void 0;if(a&&e in a)return a[e];if(arguments.length>1)return n&&qo(t)?t.call(i&&i.proxy):t}}function aB(){return!!(nd||ed||IS)}const ghe={},vhe=()=>Object.create(ghe),bhe=e=>Object.getPrototypeOf(e)===ghe;function h7e(e,t,n,i=!1){const a={},l=vhe();e.propsDefaults=Object.create(null),yhe(e,t,a,l);for(const f in e.propsOptions[0])f in a||(a[f]=void 0);n?e.props=i?a:zX(a):e.type.props?e.props=a:e.props=l,e.attrs=l}function g7e(e,t,n,i){const{props:a,attrs:l,vnode:{patchFlag:f}}=e,d=Qo(a),[h]=e.propsOptions;let b=!1;if((i||f>0)&&!(f&16)){if(f&8){const S=e.vnode.dynamicProps;for(let k=0;k<S.length;k++){let T=S[k];if(cB(e.emitsOptions,T))continue;const O=t[T];if(h)if(fa(l,T))O!==l[T]&&(l[T]=O,b=!0);else{const P=Sl(T);a[P]=yJ(h,d,P,O,e,!1)}else O!==l[T]&&(l[T]=O,b=!0)}}}else{yhe(e,t,a,l)&&(b=!0);let S;for(const k in d)(!t||!fa(t,k)&&((S=km(k))===k||!fa(t,S)))&&(h?n&&(n[k]!==void 0||n[S]!==void 0)&&(a[k]=yJ(h,d,k,void 0,e,!0)):delete a[k]);if(l!==d)for(const k in l)(!t||!fa(t,k))&&(delete l[k],b=!0)}b&&bb(e.attrs,"set","")}function yhe(e,t,n,i){const[a,l]=e.propsOptions;let f=!1,d;if(t)for(let h in t){if(z3(h))continue;const b=t[h];let S;a&&fa(a,S=Sl(h))?!l||!l.includes(S)?n[S]=b:(d||(d={}))[S]=b:cB(e.emitsOptions,h)||(!(h in i)||b!==i[h])&&(i[h]=b,f=!0)}if(l){const h=Qo(n),b=d||Ir;for(let S=0;S<l.length;S++){const k=l[S];n[k]=yJ(a,h,k,b[k],e,!fa(b,k))}}return f}function yJ(e,t,n,i,a,l){const f=e[n];if(f!=null){const d=fa(f,"default");if(d&&i===void 0){const h=f.default;if(f.type!==Function&&!f.skipFactory&&qo(h)){const{propsDefaults:b}=a;if(n in b)i=b[n];else{const S=DS(a);i=b[n]=h.call(null,t),S()}}else i=h;a.ce&&a.ce._setProp(n,i)}f[0]&&(l&&!d?i=!1:f[1]&&(i===""||i===km(n))&&(i=!0))}return i}const v7e=new WeakMap;function _he(e,t,n=!1){const i=n?v7e:t.propsCache,a=i.get(e);if(a)return a;const l=e.props,f={},d=[];let h=!1;if(!qo(e)){const S=k=>{h=!0;const[T,O]=_he(k,t,!0);wi(f,T),O&&d.push(...O)};!n&&t.mixins.length&&t.mixins.forEach(S),e.extends&&S(e.extends),e.mixins&&e.mixins.forEach(S)}if(!l&&!h)return Fa(e)&&i.set(e,jg),jg;if(Ks(l))for(let S=0;S<l.length;S++){const k=Sl(l[S]);She(k)&&(f[k]=Ir)}else if(l)for(const S in l){const k=Sl(S);if(She(k)){const T=l[S],O=f[k]=Ks(T)||qo(T)?{type:T}:wi({},T),P=O.type;let B=!1,W=!0;if(Ks(P))for(let Z=0;Z<P.length;++Z){const Y=P[Z],z=qo(Y)&&Y.name;if(z==="Boolean"){B=!0;break}else z==="String"&&(W=!1)}else B=qo(P)&&P.name==="Boolean";O[0]=B,O[1]=W,(B||fa(O,"default"))&&d.push(k)}}const b=[f,d];return Fa(e)&&i.set(e,b),b}function She(e){return e[0]!=="$"&&!z3(e)}const Che=e=>e[0]==="_"||e==="$stable",_J=e=>Ks(e)?e.map(Tm):[Tm(e)],b7e=(e,t,n)=>{if(t._n)return t;const i=te((...a)=>_J(t(...a)),n);return i._c=!1,i},whe=(e,t,n)=>{const i=e._ctx;for(const a in e){if(Che(a))continue;const l=e[a];if(qo(l))t[a]=b7e(a,l,i);else if(l!=null){const f=_J(l);t[a]=()=>f}}},Ehe=(e,t)=>{const n=_J(t);e.slots.default=()=>n},khe=(e,t,n)=>{for(const i in t)(n||i!=="_")&&(e[i]=t[i])},y7e=(e,t,n)=>{const i=e.slots=vhe();if(e.vnode.shapeFlag&32){const a=t._;a?(khe(i,t,n),n&&zpe(i,"_",a,!0)):whe(t,i)}else t&&Ehe(e,t)},_7e=(e,t,n)=>{const{vnode:i,slots:a}=e;let l=!0,f=Ir;if(i.shapeFlag&32){const d=t._;d?n&&d===1?l=!1:khe(a,t,n):(l=!t.$stable,whe(t,a)),f=t}else t&&(Ehe(e,t),f={default:1});if(l)for(const d in a)!Che(d)&&f[d]==null&&delete a[d]},td=$he;function SJ(e){return xhe(e)}function CJ(e){return xhe(e,Q8e)}function xhe(e,t){const n=T$();n.__VUE__=!0;const{insert:i,remove:a,patchProp:l,createElement:f,createText:d,createComment:h,setText:b,setElementText:S,parentNode:k,nextSibling:T,setScopeId:O=jd,insertStaticContent:P}=e,B=(ot,Qe,Ot,Nt=null,Ve=null,dn=null,kn=void 0,Bt=null,Le=!!Qe.dynamicChildren)=>{if(ot===Qe)return;ot&&!qg(ot,Qe)&&(Nt=Ht(ot),ft(ot,Ve,dn,!0),ot=null),Qe.patchFlag===-2&&(Le=!1,Qe.dynamicChildren=null);const{type:je,ref:Ze,shapeFlag:pt}=Qe;switch(je){case Eb:W(ot,Qe,Ot,Nt);break;case au:Z(ot,Qe,Ot,Nt);break;case e5:ot==null&&Y(Qe,Ot,Nt,kn);break;case bt:ie(ot,Qe,Ot,Nt,Ve,dn,kn,Bt,Le);break;default:pt&1?ne(ot,Qe,Ot,Nt,Ve,dn,kn,Bt,Le):pt&6?Be(ot,Qe,Ot,Nt,Ve,dn,kn,Bt,Le):(pt&64||pt&128)&&je.process(ot,Qe,Ot,Nt,Ve,dn,kn,Bt,Le,jn)}Ze!=null&&Ve&&rA(Ze,ot&&ot.ref,dn,Qe||ot,!Qe)},W=(ot,Qe,Ot,Nt)=>{if(ot==null)i(Qe.el=d(Qe.children),Ot,Nt);else{const Ve=Qe.el=ot.el;Qe.children!==ot.children&&b(Ve,Qe.children)}},Z=(ot,Qe,Ot,Nt)=>{ot==null?i(Qe.el=h(Qe.children||""),Ot,Nt):Qe.el=ot.el},Y=(ot,Qe,Ot,Nt)=>{[ot.el,ot.anchor]=P(ot.children,Qe,Ot,Nt,ot.el,ot.anchor)},z=({el:ot,anchor:Qe},Ot,Nt)=>{let Ve;for(;ot&&ot!==Qe;)Ve=T(ot),i(ot,Ot,Nt),ot=Ve;i(Qe,Ot,Nt)},q=({el:ot,anchor:Qe})=>{let Ot;for(;ot&&ot!==Qe;)Ot=T(ot),a(ot),ot=Ot;a(Qe)},ne=(ot,Qe,Ot,Nt,Ve,dn,kn,Bt,Le)=>{Qe.type==="svg"?kn="svg":Qe.type==="math"&&(kn="mathml"),ot==null?ue(Qe,Ot,Nt,Ve,dn,kn,Bt,Le):ge(ot,Qe,Ve,dn,kn,Bt,Le)},ue=(ot,Qe,Ot,Nt,Ve,dn,kn,Bt)=>{let Le,je;const{props:Ze,shapeFlag:pt,transition:Vt,dirs:sn}=ot;if(Le=ot.el=f(ot.type,dn,Ze&&Ze.is,Ze),pt&8?S(Le,ot.children):pt&16&&ce(ot.children,Le,null,Nt,Ve,wJ(ot,dn),kn,Bt),sn&&Ev(ot,null,Nt,"created"),J(Le,ot,ot.scopeId,kn,Nt),Ze){for(const ts in Ze)ts!=="value"&&!z3(ts)&&l(Le,ts,null,Ze[ts],dn,Nt);"value"in Ze&&l(Le,"value",null,Ze.value,dn),(je=Ze.onVnodeBeforeMount)&&Im(je,Nt,ot)}sn&&Ev(ot,null,Nt,"beforeMount");const Wn=The(Ve,Vt);Wn&&Vt.beforeEnter(Le),i(Le,Qe,Ot),((je=Ze&&Ze.onVnodeMounted)||Wn||sn)&&td(()=>{je&&Im(je,Nt,ot),Wn&&Vt.enter(Le),sn&&Ev(ot,null,Nt,"mounted")},Ve)},J=(ot,Qe,Ot,Nt,Ve)=>{if(Ot&&O(ot,Ot),Nt)for(let dn=0;dn<Nt.length;dn++)O(ot,Nt[dn]);if(Ve){let dn=Ve.subTree;if(Qe===dn||fB(dn.type)&&(dn.ssContent===Qe||dn.ssFallback===Qe)){const kn=Ve.vnode;J(ot,kn,kn.scopeId,kn.slotScopeIds,Ve.parent)}}},ce=(ot,Qe,Ot,Nt,Ve,dn,kn,Bt,Le=0)=>{for(let je=Le;je<ot.length;je++){const Ze=ot[je]=Bt?t5(ot[je]):Tm(ot[je]);B(null,Ze,Qe,Ot,Nt,Ve,dn,kn,Bt)}},ge=(ot,Qe,Ot,Nt,Ve,dn,kn)=>{const Bt=Qe.el=ot.el;let{patchFlag:Le,dynamicChildren:je,dirs:Ze}=Qe;Le|=ot.patchFlag&16;const pt=ot.props||Ir,Vt=Qe.props||Ir;let sn;if(Ot&&AS(Ot,!1),(sn=Vt.onVnodeBeforeUpdate)&&Im(sn,Ot,Qe,ot),Ze&&Ev(Qe,ot,Ot,"beforeUpdate"),Ot&&AS(Ot,!0),(pt.innerHTML&&Vt.innerHTML==null||pt.textContent&&Vt.textContent==null)&&S(Bt,""),je?de(ot.dynamicChildren,je,Bt,Ot,Nt,wJ(Qe,Ve),dn):kn||Fe(ot,Qe,Bt,null,Ot,Nt,wJ(Qe,Ve),dn,!1),Le>0){if(Le&16)he(Bt,pt,Vt,Ot,Ve);else if(Le&2&&pt.class!==Vt.class&&l(Bt,"class",null,Vt.class,Ve),Le&4&&l(Bt,"style",pt.style,Vt.style,Ve),Le&8){const Wn=Qe.dynamicProps;for(let ts=0;ts<Wn.length;ts++){const Zn=Wn[ts],yo=pt[Zn],Qs=Vt[Zn];(Qs!==yo||Zn==="value")&&l(Bt,Zn,yo,Qs,Ve,Ot)}}Le&1&&ot.children!==Qe.children&&S(Bt,Qe.children)}else!kn&&je==null&&he(Bt,pt,Vt,Ot,Ve);((sn=Vt.onVnodeUpdated)||Ze)&&td(()=>{sn&&Im(sn,Ot,Qe,ot),Ze&&Ev(Qe,ot,Ot,"updated")},Nt)},de=(ot,Qe,Ot,Nt,Ve,dn,kn)=>{for(let Bt=0;Bt<Qe.length;Bt++){const Le=ot[Bt],je=Qe[Bt],Ze=Le.el&&(Le.type===bt||!qg(Le,je)||Le.shapeFlag&70)?k(Le.el):Ot;B(Le,je,Ze,null,Nt,Ve,dn,kn,!0)}},he=(ot,Qe,Ot,Nt,Ve)=>{if(Qe!==Ot){if(Qe!==Ir)for(const dn in Qe)!z3(dn)&&!(dn in Ot)&&l(ot,dn,Qe[dn],null,Ve,Nt);for(const dn in Ot){if(z3(dn))continue;const kn=Ot[dn],Bt=Qe[dn];kn!==Bt&&dn!=="value"&&l(ot,dn,Bt,kn,Ve,Nt)}"value"in Ot&&l(ot,"value",Qe.value,Ot.value,Ve)}},ie=(ot,Qe,Ot,Nt,Ve,dn,kn,Bt,Le)=>{const je=Qe.el=ot?ot.el:d(""),Ze=Qe.anchor=ot?ot.anchor:d("");let{patchFlag:pt,dynamicChildren:Vt,slotScopeIds:sn}=Qe;sn&&(Bt=Bt?Bt.concat(sn):sn),ot==null?(i(je,Ot,Nt),i(Ze,Ot,Nt),ce(Qe.children||[],Ot,Ze,Ve,dn,kn,Bt,Le)):pt>0&&pt&64&&Vt&&ot.dynamicChildren?(de(ot.dynamicChildren,Vt,Ot,Ve,dn,kn,Bt),(Qe.key!=null||Ve&&Qe===Ve.subTree)&&EJ(ot,Qe,!0)):Fe(ot,Qe,Ot,Ze,Ve,dn,kn,Bt,Le)},Be=(ot,Qe,Ot,Nt,Ve,dn,kn,Bt,Le)=>{Qe.slotScopeIds=Bt,ot==null?Qe.shapeFlag&512?Ve.ctx.activate(Qe,Ot,Nt,kn,Le):$e(Qe,Ot,Nt,Ve,dn,kn,Le):Ue(ot,Qe,Le)},$e=(ot,Qe,Ot,Nt,Ve,dn,kn)=>{const Bt=ot.component=zhe(ot,Nt,Ve);if(iA(ot)&&(Bt.ctx.renderer=jn),jhe(Bt,!1,kn),Bt.asyncDep){if(Ve&&Ve.registerDep(Bt,V,kn),!ot.el){const Le=Bt.subTree=pe(au);Z(null,Le,Qe,Ot)}}else V(Bt,ot,Qe,Ot,Ve,dn,kn)},Ue=(ot,Qe,Ot)=>{const Nt=Qe.component=ot.component;if(T7e(ot,Qe,Ot))if(Nt.asyncDep&&!Nt.asyncResolved){Ye(Nt,Qe,Ot);return}else Nt.next=Qe,Nt.update();else Qe.el=ot.el,Nt.vnode=Qe},V=(ot,Qe,Ot,Nt,Ve,dn,kn)=>{const Bt=()=>{if(ot.isMounted){let{next:pt,bu:Vt,u:sn,parent:Wn,vnode:ts}=ot;{const xr=Ihe(ot);if(xr){pt&&(pt.el=ts.el,Ye(ot,pt,kn)),xr.asyncDep.then(()=>{ot.isUnmounted||Bt()});return}}let Zn=pt,yo;AS(ot,!1),pt?(pt.el=ts.el,Ye(ot,pt,kn)):pt=ts,Vt&&rw(Vt),(yo=pt.props&&pt.props.onVnodeBeforeUpdate)&&Im(yo,Wn,pt,ts),AS(ot,!0);const Qs=uB(ot),Rs=ot.subTree;ot.subTree=Qs,B(Rs,Qs,k(Rs.el),Ht(Rs),ot,Ve,dn),pt.el=Qs.el,Zn===null&&dB(ot,Qs.el),sn&&td(sn,Ve),(yo=pt.props&&pt.props.onVnodeUpdated)&&td(()=>Im(yo,Wn,pt,ts),Ve)}else{let pt;const{el:Vt,props:sn}=Qe,{bm:Wn,m:ts,parent:Zn,root:yo,type:Qs}=ot,Rs=Q3(Qe);if(AS(ot,!1),Wn&&rw(Wn),!Rs&&(pt=sn&&sn.onVnodeBeforeMount)&&Im(pt,Zn,Qe),AS(ot,!0),Vt&&Xs){const xr=()=>{ot.subTree=uB(ot),Xs(Vt,ot.subTree,ot,Ve,null)};Rs&&Qs.__asyncHydrate?Qs.__asyncHydrate(Vt,ot,xr):xr()}else{yo.ce&&yo.ce._injectChildStyle(Qs);const xr=ot.subTree=uB(ot);B(null,xr,Ot,Nt,ot,Ve,dn),Qe.el=xr.el}if(ts&&td(ts,Ve),!Rs&&(pt=sn&&sn.onVnodeMounted)){const xr=Qe;td(()=>Im(pt,Zn,xr),Ve)}(Qe.shapeFlag&256||Zn&&Q3(Zn.vnode)&&Zn.vnode.shapeFlag&256)&&ot.a&&td(ot.a,Ve),ot.isMounted=!0,Qe=Ot=Nt=null}};ot.scope.on();const Le=ot.effect=new iw(Bt);ot.scope.off();const je=ot.update=Le.run.bind(Le),Ze=ot.job=Le.runIfDirty.bind(Le);Ze.i=ot,Ze.id=ot.uid,Le.scheduler=()=>GX(Ze),AS(ot,!0),je()},Ye=(ot,Qe,Ot)=>{Qe.component=ot;const Nt=ot.vnode.props;ot.vnode=Qe,ot.next=null,g7e(ot,Qe.props,Nt,Ot),_7e(ot,Qe.children,Ot),gb(),xme(ot),vb()},Fe=(ot,Qe,Ot,Nt,Ve,dn,kn,Bt,Le=!1)=>{const je=ot&&ot.children,Ze=ot?ot.shapeFlag:0,pt=Qe.children,{patchFlag:Vt,shapeFlag:sn}=Qe;if(Vt>0){if(Vt&128){Dt(je,pt,Ot,Nt,Ve,dn,kn,Bt,Le);return}else if(Vt&256){St(je,pt,Ot,Nt,Ve,dn,kn,Bt,Le);return}}sn&8?(Ze&16&&ct(je,Ve,dn),pt!==je&&S(Ot,pt)):Ze&16?sn&16?Dt(je,pt,Ot,Nt,Ve,dn,kn,Bt,Le):ct(je,Ve,dn,!0):(Ze&8&&S(Ot,""),sn&16&&ce(pt,Ot,Nt,Ve,dn,kn,Bt,Le))},St=(ot,Qe,Ot,Nt,Ve,dn,kn,Bt,Le)=>{ot=ot||jg,Qe=Qe||jg;const je=ot.length,Ze=Qe.length,pt=Math.min(je,Ze);let Vt;for(Vt=0;Vt<pt;Vt++){const sn=Qe[Vt]=Le?t5(Qe[Vt]):Tm(Qe[Vt]);B(ot[Vt],sn,Ot,null,Ve,dn,kn,Bt,Le)}je>Ze?ct(ot,Ve,dn,!0,!1,pt):ce(Qe,Ot,Nt,Ve,dn,kn,Bt,Le,pt)},Dt=(ot,Qe,Ot,Nt,Ve,dn,kn,Bt,Le)=>{let je=0;const Ze=Qe.length;let pt=ot.length-1,Vt=Ze-1;for(;je<=pt&&je<=Vt;){const sn=ot[je],Wn=Qe[je]=Le?t5(Qe[je]):Tm(Qe[je]);if(qg(sn,Wn))B(sn,Wn,Ot,null,Ve,dn,kn,Bt,Le);else break;je++}for(;je<=pt&&je<=Vt;){const sn=ot[pt],Wn=Qe[Vt]=Le?t5(Qe[Vt]):Tm(Qe[Vt]);if(qg(sn,Wn))B(sn,Wn,Ot,null,Ve,dn,kn,Bt,Le);else break;pt--,Vt--}if(je>pt){if(je<=Vt){const sn=Vt+1,Wn=sn<Ze?Qe[sn].el:Nt;for(;je<=Vt;)B(null,Qe[je]=Le?t5(Qe[je]):Tm(Qe[je]),Ot,Wn,Ve,dn,kn,Bt,Le),je++}}else if(je>Vt)for(;je<=pt;)ft(ot[je],Ve,dn,!0),je++;else{const sn=je,Wn=je,ts=new Map;for(je=Wn;je<=Vt;je++){const Mo=Qe[je]=Le?t5(Qe[je]):Tm(Qe[je]);Mo.key!=null&&ts.set(Mo.key,je)}let Zn,yo=0;const Qs=Vt-Wn+1;let Rs=!1,xr=0;const Po=new Array(Qs);for(je=0;je<Qs;je++)Po[je]=0;for(je=sn;je<=pt;je++){const Mo=ot[je];if(yo>=Qs){ft(Mo,Ve,dn,!0);continue}let Do;if(Mo.key!=null)Do=ts.get(Mo.key);else for(Zn=Wn;Zn<=Vt;Zn++)if(Po[Zn-Wn]===0&&qg(Mo,Qe[Zn])){Do=Zn;break}Do===void 0?ft(Mo,Ve,dn,!0):(Po[Do-Wn]=je+1,Do>=xr?xr=Do:Rs=!0,B(Mo,Qe[Do],Ot,null,Ve,dn,kn,Bt,Le),yo++)}const jo=Rs?S7e(Po):jg;for(Zn=jo.length-1,je=Qs-1;je>=0;je--){const Mo=Wn+je,Do=Qe[Mo],er=Mo+1<Ze?Qe[Mo+1].el:Nt;Po[je]===0?B(null,Do,Ot,er,Ve,dn,kn,Bt,Le):Rs&&(Zn<0||je!==jo[Zn]?He(Do,Ot,er,2):Zn--)}}},He=(ot,Qe,Ot,Nt,Ve=null)=>{const{el:dn,type:kn,transition:Bt,children:Le,shapeFlag:je}=ot;if(je&6){He(ot.component.subTree,Qe,Ot,Nt);return}if(je&128){ot.suspense.move(Qe,Ot,Nt);return}if(je&64){kn.move(ot,Qe,Ot,jn);return}if(kn===bt){i(dn,Qe,Ot);for(let pt=0;pt<Le.length;pt++)He(Le[pt],Qe,Ot,Nt);i(ot.anchor,Qe,Ot);return}if(kn===e5){z(ot,Qe,Ot);return}if(Nt!==2&&je&1&&Bt)if(Nt===0)Bt.beforeEnter(dn),i(dn,Qe,Ot),td(()=>Bt.enter(dn),Ve);else{const{leave:pt,delayLeave:Vt,afterLeave:sn}=Bt,Wn=()=>i(dn,Qe,Ot),ts=()=>{pt(dn,()=>{Wn(),sn&&sn()})};Vt?Vt(dn,Wn,ts):ts()}else i(dn,Qe,Ot)},ft=(ot,Qe,Ot,Nt=!1,Ve=!1)=>{const{type:dn,props:kn,ref:Bt,children:Le,dynamicChildren:je,shapeFlag:Ze,patchFlag:pt,dirs:Vt,cacheIndex:sn}=ot;if(pt===-2&&(Ve=!1),Bt!=null&&rA(Bt,null,Ot,ot,!0),sn!=null&&(Qe.renderCache[sn]=void 0),Ze&256){Qe.ctx.deactivate(ot);return}const Wn=Ze&1&&Vt,ts=!Q3(ot);let Zn;if(ts&&(Zn=kn&&kn.onVnodeBeforeUnmount)&&Im(Zn,Qe,ot),Ze&6)hn(ot.component,Ot,Nt);else{if(Ze&128){ot.suspense.unmount(Ot,Nt);return}Wn&&Ev(ot,null,Qe,"beforeUnmount"),Ze&64?ot.type.remove(ot,Qe,Ot,jn,Nt):je&&!je.hasOnce&&(dn!==bt||pt>0&&pt&64)?ct(je,Qe,Ot,!1,!0):(dn===bt&&pt&384||!Ve&&Ze&16)&&ct(Le,Qe,Ot),Nt&&ht(ot)}(ts&&(Zn=kn&&kn.onVnodeUnmounted)||Wn)&&td(()=>{Zn&&Im(Zn,Qe,ot),Wn&&Ev(ot,null,Qe,"unmounted")},Ot)},ht=ot=>{const{type:Qe,el:Ot,anchor:Nt,transition:Ve}=ot;if(Qe===bt){At(Ot,Nt);return}if(Qe===e5){q(ot);return}const dn=()=>{a(Ot),Ve&&!Ve.persisted&&Ve.afterLeave&&Ve.afterLeave()};if(ot.shapeFlag&1&&Ve&&!Ve.persisted){const{leave:kn,delayLeave:Bt}=Ve,Le=()=>kn(Ot,dn);Bt?Bt(ot.el,dn,Le):Le()}else dn()},At=(ot,Qe)=>{let Ot;for(;ot!==Qe;)Ot=T(ot),a(ot),ot=Ot;a(Qe)},hn=(ot,Qe,Ot)=>{const{bum:Nt,scope:Ve,job:dn,subTree:kn,um:Bt,m:Le,a:je}=ot;lB(Le),lB(je),Nt&&rw(Nt),Ve.stop(),dn&&(dn.flags|=8,ft(kn,ot,Qe,Ot)),Bt&&td(Bt,Qe),td(()=>{ot.isUnmounted=!0},Qe),Qe&&Qe.pendingBranch&&!Qe.isUnmounted&&ot.asyncDep&&!ot.asyncResolved&&ot.suspenseId===Qe.pendingId&&(Qe.deps--,Qe.deps===0&&Qe.resolve())},ct=(ot,Qe,Ot,Nt=!1,Ve=!1,dn=0)=>{for(let kn=dn;kn<ot.length;kn++)ft(ot[kn],Qe,Ot,Nt,Ve)},Ht=ot=>{if(ot.shapeFlag&6)return Ht(ot.component.subTree);if(ot.shapeFlag&128)return ot.suspense.next();const Qe=T(ot.anchor||ot.el),Ot=Qe&&Qe[Ame];return Ot?T(Ot):Qe};let ye=!1;const lo=(ot,Qe,Ot)=>{ot==null?Qe._vnode&&ft(Qe._vnode,null,null,!0):B(Qe._vnode||null,ot,Qe,null,null,null,Ot),Qe._vnode=ot,ye||(ye=!0,xme(),W$(),ye=!1)},jn={p:B,um:ft,m:He,r:ht,mt:$e,mc:ce,pc:Fe,pbc:de,n:Ht,o:e};let so,Xs;return t&&([so,Xs]=t(jn)),{render:lo,hydrate:so,createApp:m7e(lo,so)}}function wJ({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function AS({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function The(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function EJ(e,t,n=!1){const i=e.children,a=t.children;if(Ks(i)&&Ks(a))for(let l=0;l<i.length;l++){const f=i[l];let d=a[l];d.shapeFlag&1&&!d.dynamicChildren&&((d.patchFlag<=0||d.patchFlag===32)&&(d=a[l]=t5(a[l]),d.el=f.el),!n&&d.patchFlag!==-2&&EJ(f,d)),d.type===Eb&&(d.el=f.el)}}function S7e(e){const t=e.slice(),n=[0];let i,a,l,f,d;const h=e.length;for(i=0;i<h;i++){const b=e[i];if(b!==0){if(a=n[n.length-1],e[a]<b){t[i]=a,n.push(i);continue}for(l=0,f=n.length-1;l<f;)d=l+f>>1,e[n[d]]<b?l=d+1:f=d;b<e[n[l]]&&(l>0&&(t[i]=n[l-1]),n[l]=i)}}for(l=n.length,f=n[l-1];l-- >0;)n[l]=f,f=t[f];return n}function Ihe(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ihe(t)}function lB(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const kJ=Symbol.for("v-scx"),xJ=()=>Mr(kJ);function oc(e,t){return pA(e,null,t)}function Ahe(e,t){return pA(e,null,{flush:"post"})}function TJ(e,t){return pA(e,null,{flush:"sync"})}function io(e,t,n){return pA(e,t,n)}function pA(e,t,n=Ir){const{immediate:i,deep:a,flush:l,once:f}=n,d=wi({},n),h=t&&i||!t&&l!=="post";let b;if(gw){if(l==="sync"){const O=xJ();b=O.__watcherHandles||(O.__watcherHandles=[])}else if(!h){const O=()=>{};return O.stop=jd,O.resume=jd,O.pause=jd,O}}const S=nd;d.call=(O,P,B)=>Ah(O,S,P,B);let k=!1;l==="post"?d.scheduler=O=>{td(O,S&&S.suspense)}:l!=="sync"&&(k=!0,d.scheduler=(O,P)=>{P?O():GX(O)}),d.augmentJob=O=>{t&&(O.flags|=4),k&&(O.flags|=2,S&&(O.id=S.uid,O.i=S))};const T=B8e(e,t,d);return gw&&(b?b.push(T):h&&T()),T}function C7e(e,t,n){const i=this.proxy,a=kr(e)?e.includes(".")?Ohe(i,e):()=>i[e]:e.bind(i,i);let l;qo(t)?l=t:(l=t.handler,n=t);const f=DS(this),d=pA(a,l.bind(i),n);return f(),d}function Ohe(e,t){const n=t.split(".");return()=>{let i=e;for(let a=0;a<n.length&&i;a++)i=i[n[a]];return i}}function Rhe(e,t,n=Ir){const i=sd(),a=Sl(t),l=km(t),f=Dhe(e,a),d=jX((h,b)=>{let S,k=Ir,T;return TJ(()=>{const O=e[a];Pp(S,O)&&(S=O,b())}),{get(){return h(),n.get?n.get(S):S},set(O){const P=n.set?n.set(O):O;if(!Pp(P,S)&&!(k!==Ir&&Pp(O,k)))return;const B=i.vnode.props;B&&(t in B||a in B||l in B)&&("onUpdate:".concat(t)in B||"onUpdate:".concat(a)in B||"onUpdate:".concat(l)in B)||(S=O,b()),i.emit("update:".concat(t),P),Pp(O,P)&&Pp(O,k)&&!Pp(P,T)&&b(),k=O,T=P}}});return d[Symbol.iterator]=()=>{let h=0;return{next(){return h<2?{value:h++?f||Ir:d,done:!1}:{done:!0}}}},d}const Dhe=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e["".concat(t,"Modifiers")]||e["".concat(Sl(t),"Modifiers")]||e["".concat(km(t),"Modifiers")];function w7e(e,t,...n){if(e.isUnmounted)return;const i=e.vnode.props||Ir;let a=n;const l=t.startsWith("update:"),f=l&&Dhe(i,t.slice(7));f&&(f.trim&&(a=n.map(S=>kr(S)?S.trim():S)),f.number&&(a=n.map(k$)));let d,h=i[d=SS(t)]||i[d=SS(Sl(t))];!h&&l&&(h=i[d=SS(km(t))]),h&&Ah(h,e,6,a);const b=i[d+"Once"];if(b){if(!e.emitted)e.emitted={};else if(e.emitted[d])return;e.emitted[d]=!0,Ah(b,e,6,a)}}function Lhe(e,t,n=!1){const i=t.emitsCache,a=i.get(e);if(a!==void 0)return a;const l=e.emits;let f={},d=!1;if(!qo(e)){const h=b=>{const S=Lhe(b,t,!0);S&&(d=!0,wi(f,S))};!n&&t.mixins.length&&t.mixins.forEach(h),e.extends&&h(e.extends),e.mixins&&e.mixins.forEach(h)}return!l&&!d?(Fa(e)&&i.set(e,null),null):(Ks(l)?l.forEach(h=>f[h]=null):wi(f,l),Fa(e)&&i.set(e,f),f)}function cB(e,t){return!e||!yS(t)?!1:(t=t.slice(2).replace(/Once$/,""),fa(e,t[0].toLowerCase()+t.slice(1))||fa(e,km(t))||fa(e,t))}function avt(){}function uB(e){const{type:t,vnode:n,proxy:i,withProxy:a,propsOptions:[l],slots:f,attrs:d,emit:h,render:b,renderCache:S,props:k,data:T,setupState:O,ctx:P,inheritAttrs:B}=e,W=nA(e);let Z,Y;try{if(n.shapeFlag&4){const q=a||i,ne=q;Z=Tm(b.call(ne,q,S,k,O,T,P)),Y=d}else{const q=t;Z=Tm(q.length>1?q(k,{attrs:d,slots:f,emit:h}):q(k,null)),Y=t.props?d:k7e(d)}}catch(q){hA.length=0,Y3(q,e,1),Z=pe(au)}let z=Z;if(Y&&B!==!1){const q=Object.keys(Y),{shapeFlag:ne}=z;q.length&&ne&7&&(l&&q.some(AX)&&(Y=x7e(Y,l)),z=Rh(z,Y,!1,!0))}return n.dirs&&(z=Rh(z,null,!1,!0),z.dirs=z.dirs?z.dirs.concat(n.dirs):n.dirs),n.transition&&kv(z,n.transition),Z=z,nA(W),Z}function E7e(e,t=!0){let n;for(let i=0;i<e.length;i++){const a=e[i];if(xv(a)){if(a.type!==au||a.children==="v-if"){if(n)return;n=a}}else return}return n}const k7e=e=>{let t;for(const n in e)(n==="class"||n==="style"||yS(n))&&((t||(t={}))[n]=e[n]);return t},x7e=(e,t)=>{const n={};for(const i in e)(!AX(i)||!(i.slice(9)in t))&&(n[i]=e[i]);return n};function T7e(e,t,n){const{props:i,children:a,component:l}=e,{props:f,children:d,patchFlag:h}=t,b=l.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&h>=0){if(h&1024)return!0;if(h&16)return i?Phe(i,f,b):!!f;if(h&8){const S=t.dynamicProps;for(let k=0;k<S.length;k++){const T=S[k];if(f[T]!==i[T]&&!cB(b,T))return!0}}}else return(a||d)&&(!d||!d.$stable)?!0:i===f?!1:i?f?Phe(i,f,b):!0:!!f;return!1}function Phe(e,t,n){const i=Object.keys(t);if(i.length!==Object.keys(e).length)return!0;for(let a=0;a<i.length;a++){const l=i[a];if(t[l]!==e[l]&&!cB(n,l))return!0}return!1}function dB({vnode:e,parent:t},n){for(;t;){const i=t.subTree;if(i.suspense&&i.suspense.activeBranch===e&&(i.el=e.el),i===e)(e=t.vnode).el=n,t=t.parent;else break}}const fB=e=>e.__isSuspense;let IJ=0;const Mhe={name:"Suspense",__isSuspense:!0,process(e,t,n,i,a,l,f,d,h,b){if(e==null)I7e(t,n,i,a,l,f,d,h,b);else{if(l&&l.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}A7e(e,t,n,i,a,f,d,h,b)}},hydrate:O7e,normalize:R7e};function mA(e,t){const n=e.props&&e.props[t];qo(n)&&n()}function I7e(e,t,n,i,a,l,f,d,h){const{p:b,o:{createElement:S}}=h,k=S("div"),T=e.suspense=Nhe(e,a,i,t,k,n,l,f,d,h);b(null,T.pendingBranch=e.ssContent,k,null,i,T,l,f),T.deps>0?(mA(e,"onPending"),mA(e,"onFallback"),b(null,e.ssFallback,t,n,i,null,l,f),hw(T,e.ssFallback)):T.resolve(!1,!0)}function A7e(e,t,n,i,a,l,f,d,{p:h,um:b,o:{createElement:S}}){const k=t.suspense=e.suspense;k.vnode=t,t.el=e.el;const T=t.ssContent,O=t.ssFallback,{activeBranch:P,pendingBranch:B,isInFallback:W,isHydrating:Z}=k;if(B)k.pendingBranch=T,qg(T,B)?(h(B,T,k.hiddenContainer,null,a,k,l,f,d),k.deps<=0?k.resolve():W&&(Z||(h(P,O,n,i,a,null,l,f,d),hw(k,O)))):(k.pendingId=IJ++,Z?(k.isHydrating=!1,k.activeBranch=B):b(B,a,k),k.deps=0,k.effects.length=0,k.hiddenContainer=S("div"),W?(h(null,T,k.hiddenContainer,null,a,k,l,f,d),k.deps<=0?k.resolve():(h(P,O,n,i,a,null,l,f,d),hw(k,O))):P&&qg(T,P)?(h(P,T,n,i,a,k,l,f,d),k.resolve(!0)):(h(null,T,k.hiddenContainer,null,a,k,l,f,d),k.deps<=0&&k.resolve()));else if(P&&qg(T,P))h(P,T,n,i,a,k,l,f,d),hw(k,T);else if(mA(t,"onPending"),k.pendingBranch=T,T.shapeFlag&512?k.pendingId=T.component.suspenseId:k.pendingId=IJ++,h(null,T,k.hiddenContainer,null,a,k,l,f,d),k.deps<=0)k.resolve();else{const{timeout:Y,pendingId:z}=k;Y>0?setTimeout(()=>{k.pendingId===z&&k.fallback(O)},Y):Y===0&&k.fallback(O)}}function Nhe(e,t,n,i,a,l,f,d,h,b,S=!1){const{p:k,m:T,um:O,n:P,o:{parentNode:B,remove:W}}=b;let Z;const Y=D7e(e);Y&&t&&t.pendingBranch&&(Z=t.pendingId,t.deps++);const z=e.props?x$(e.props.timeout):void 0,q=l,ne={vnode:e,parent:t,parentComponent:n,namespace:f,container:i,hiddenContainer:a,deps:0,pendingId:IJ++,timeout:typeof z=="number"?z:-1,activeBranch:null,pendingBranch:null,isInFallback:!S,isHydrating:S,isUnmounted:!1,effects:[],resolve(ue=!1,J=!1){const{vnode:ce,activeBranch:ge,pendingBranch:de,pendingId:he,effects:ie,parentComponent:Be,container:$e}=ne;let Ue=!1;ne.isHydrating?ne.isHydrating=!1:ue||(Ue=ge&&de.transition&&de.transition.mode==="out-in",Ue&&(ge.transition.afterLeave=()=>{he===ne.pendingId&&(T(de,$e,l===q?P(ge):l,0),dw(ie))}),ge&&(B(ge.el)===$e&&(l=P(ge)),O(ge,Be,ne,!0)),Ue||T(de,$e,l,0)),hw(ne,de),ne.pendingBranch=null,ne.isInFallback=!1;let V=ne.parent,Ye=!1;for(;V;){if(V.pendingBranch){V.effects.push(...ie),Ye=!0;break}V=V.parent}!Ye&&!Ue&&dw(ie),ne.effects=[],Y&&t&&t.pendingBranch&&Z===t.pendingId&&(t.deps--,t.deps===0&&!J&&t.resolve()),mA(ce,"onResolve")},fallback(ue){if(!ne.pendingBranch)return;const{vnode:J,activeBranch:ce,parentComponent:ge,container:de,namespace:he}=ne;mA(J,"onFallback");const ie=P(ce),Be=()=>{ne.isInFallback&&(k(null,ue,de,ie,ge,null,he,d,h),hw(ne,ue))},$e=ue.transition&&ue.transition.mode==="out-in";$e&&(ce.transition.afterLeave=Be),ne.isInFallback=!0,O(ce,ge,null,!0),$e||Be()},move(ue,J,ce){ne.activeBranch&&T(ne.activeBranch,ue,J,ce),ne.container=ue},next(){return ne.activeBranch&&P(ne.activeBranch)},registerDep(ue,J,ce){const ge=!!ne.pendingBranch;ge&&ne.deps++;const de=ue.vnode.el;ue.asyncDep.catch(he=>{Y3(he,ue,0)}).then(he=>{if(ue.isUnmounted||ne.isUnmounted||ne.pendingId!==ue.suspenseId)return;ue.asyncResolved=!0;const{vnode:ie}=ue;DJ(ue,he,!1),de&&(ie.el=de);const Be=!de&&ue.subTree.el;J(ue,ie,B(de||ue.subTree.el),de?null:P(ue.subTree),ne,f,ce),Be&&W(Be),dB(ue,ie.el),ge&&--ne.deps===0&&ne.resolve()})},unmount(ue,J){ne.isUnmounted=!0,ne.activeBranch&&O(ne.activeBranch,n,ue,J),ne.pendingBranch&&O(ne.pendingBranch,n,ue,J)}};return ne}function O7e(e,t,n,i,a,l,f,d,h){const b=t.suspense=Nhe(t,i,n,e.parentNode,document.createElement("div"),null,a,l,f,d,!0),S=h(e,b.pendingBranch=t.ssContent,n,b,l,f);return b.deps===0&&b.resolve(!1,!0),S}function R7e(e){const{shapeFlag:t,children:n}=e,i=t&32;e.ssContent=Fhe(i?n.default:n),e.ssFallback=i?Fhe(n.fallback):pe(au)}function Fhe(e){let t;if(qo(e)){const n=OS&&e._c;n&&(e._d=!1,L()),e=e(),n&&(e._d=!0,t=Af,Bhe())}return Ks(e)&&(e=E7e(e)),e=Tm(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function $he(e,t){t&&t.pendingBranch?Ks(e)?t.effects.push(...e):t.effects.push(e):dw(e)}function hw(e,t){e.activeBranch=t;const{vnode:n,parentComponent:i}=e;let a=t.el;for(;!a&&t.component;)t=t.component.subTree,a=t.el;n.el=a,i&&i.subTree===n&&(i.vnode.el=a,dB(i,a))}function D7e(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const bt=Symbol.for("v-fgt"),Eb=Symbol.for("v-txt"),au=Symbol.for("v-cmt"),e5=Symbol.for("v-stc"),hA=[];let Af=null;function L(e=!1){hA.push(Af=e?null:[])}function Bhe(){hA.pop(),Af=hA[hA.length-1]||null}let OS=1;function pB(e,t=!1){OS+=e,e<0&&Af&&t&&(Af.hasOnce=!0)}function Vhe(e){return e.dynamicChildren=OS>0?Af||jg:null,Bhe(),OS>0&&Af&&Af.push(e),e}function Q(e,t,n,i,a,l){return Vhe(H(e,t,n,i,a,l,!0))}function Ee(e,t,n,i,a){return Vhe(pe(e,t,n,i,a,!0))}function xv(e){return e?e.__v_isVNode===!0:!1}function qg(e,t){return e.type===t.type&&e.key===t.key}function Hhe(e){}const Uhe=({key:e})=>e!=null?e:null,mB=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?kr(e)||xa(e)||qo(e)?{i:ed,r:e,k:t,f:!!n}:e:null);function H(e,t=null,n=null,i=0,a=null,l=e===bt?0:1,f=!1,d=!1){const h={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Uhe(t),ref:t&&mB(t),scopeId:Z$,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:l,patchFlag:i,dynamicProps:a,dynamicChildren:null,appContext:null,ctx:ed};return d?(AJ(h,n),l&128&&e.normalize(h)):n&&(h.shapeFlag|=kr(n)?8:16),OS>0&&!f&&Af&&(h.patchFlag>0||l&6)&&h.patchFlag!==32&&Af.push(h),h}const pe=L7e;function L7e(e,t=null,n=null,i=0,a=null,l=!1){if((!e||e===Kme)&&(e=au),xv(e)){const d=Rh(e,t,!0);return n&&AJ(d,n),OS>0&&!l&&Af&&(d.shapeFlag&6?Af[Af.indexOf(e)]=d:Af.push(d)),d.patchFlag=-2,d}if(V7e(e)&&(e=e.__vccOpts),t){t=RS(t);let{class:d,style:h}=t;d&&!kr(d)&&(t.class=Rn(d)),Fa(h)&&(ES(h)&&!Ks(h)&&(h=wi({},h)),t.style=Ih(h))}const f=kr(e)?1:fB(e)?128:Ome(e)?64:Fa(e)?4:qo(e)?2:0;return H(e,t,n,i,a,f,l,!0)}function RS(e){return e?ES(e)||bhe(e)?wi({},e):e:null}function Rh(e,t,n=!1,i=!1){const{props:a,ref:l,patchFlag:f,children:d,transition:h}=e,b=t?Cn(a||{},t):a,S={__v_isVNode:!0,__v_skip:!0,type:e.type,props:b,key:b&&Uhe(b),ref:t&&t.ref?n&&l?Ks(l)?l.concat(mB(t)):[l,mB(t)]:mB(t):l,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:d,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==bt?f===-1?16:f|16:f,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:h,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Rh(e.ssContent),ssFallback:e.ssFallback&&Rh(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return h&&i&&kv(S,h.clone(S)),S}function D(e=" ",t=0){return pe(Eb,null,e,t)}function rc(e,t){const n=pe(e5,null,e);return n.staticCount=t,n}function we(e="",t=!1){return t?(L(),Ee(au,null,e)):pe(au,null,e)}function Tm(e){return e==null||typeof e=="boolean"?pe(au):Ks(e)?pe(bt,null,e.slice()):xv(e)?t5(e):pe(Eb,null,String(e))}function t5(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Rh(e)}function AJ(e,t){let n=0;const{shapeFlag:i}=e;if(t==null)t=null;else if(Ks(t))n=16;else if(typeof t=="object")if(i&65){const a=t.default;a&&(a._c&&(a._d=!1),AJ(e,a()),a._c&&(a._d=!0));return}else{n=32;const a=t._;!a&&!bhe(t)?t._ctx=ed:a===3&&ed&&(ed.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else qo(t)?(t={default:t,_ctx:ed},n=32):(t=String(t),i&64?(n=16,t=[D(t)]):n=8);e.children=t,e.shapeFlag|=n}function Cn(...e){const t={};for(let n=0;n<e.length;n++){const i=e[n];for(const a in i)if(a==="class")t.class!==i.class&&(t.class=Rn([t.class,i.class]));else if(a==="style")t.style=Ih([t.style,i.style]);else if(yS(a)){const l=t[a],f=i[a];f&&l!==f&&!(Ks(l)&&l.includes(f))&&(t[a]=l?[].concat(l,f):f)}else a!==""&&(t[a]=i[a])}return t}function Im(e,t,n,i=null){Ah(e,t,7,[n,i])}const P7e=hhe();let M7e=0;function zhe(e,t,n){const i=e.type,a=(t?t.appContext:e.appContext)||P7e,l={uid:M7e++,vnode:e,type:i,parent:t,appContext:a,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new A$(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(a.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:_he(i,a),emitsOptions:Lhe(i,a),emit:null,emitted:null,propsDefaults:Ir,inheritAttrs:i.inheritAttrs,ctx:Ir,data:Ir,props:Ir,attrs:Ir,slots:Ir,refs:Ir,setupState:Ir,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return l.ctx={_:l},l.root=t?t.root:l,l.emit=w7e.bind(null,l),e.ce&&e.ce(l),l}let nd=null;const sd=()=>nd||ed;let hB,OJ;{const e=T$(),t=(n,i)=>{let a;return(a=e[n])||(a=e[n]=[]),a.push(i),l=>{a.length>1?a.forEach(f=>f(l)):a[0](l)}};hB=t("__VUE_INSTANCE_SETTERS__",n=>nd=n),OJ=t("__VUE_SSR_SETTERS__",n=>gw=n)}const DS=e=>{const t=nd;return hB(e),e.scope.on(),()=>{e.scope.off(),hB(t)}},RJ=()=>{nd&&nd.scope.off(),hB(null)};function Whe(e){return e.vnode.shapeFlag&4}let gw=!1;function jhe(e,t=!1,n=!1){t&&OJ(t);const{props:i,children:a}=e.vnode,l=Whe(e);h7e(e,i,l,t),y7e(e,a,n);const f=l?N7e(e,t):void 0;return t&&OJ(!1),f}function N7e(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,hJ);const{setup:i}=n;if(i){gb();const a=e.setupContext=i.length>1?Ghe(e):null,l=DS(e),f=K3(i,e,0,[e.props,a]),d=RX(f);if(vb(),l(),(d||e.sp)&&!Q3(e)&&tJ(e),d){if(f.then(RJ,RJ),t)return f.then(h=>{DJ(e,h,t)}).catch(h=>{Y3(h,e,0)});e.asyncDep=f}else DJ(e,f,t)}else qhe(e,t)}function DJ(e,t,n){qo(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Fa(t)&&(e.setupState=B$(t)),qhe(e,n)}let gB,LJ;function PJ(e){gB=e,LJ=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,a7e))}}const Zhe=()=>!gB;function qhe(e,t,n){const i=e.type;if(!e.render){if(!t&&gB&&!i.render){const a=i.template||vJ(e).template;if(a){const{isCustomElement:l,compilerOptions:f}=e.appContext.config,{delimiters:d,compilerOptions:h}=i,b=wi(wi({isCustomElement:l,delimiters:d},f),h);i.render=gB(a,b)}}e.render=i.render||jd,LJ&&LJ(e)}{const a=DS(e);gb();try{l7e(e)}finally{vb(),a()}}}const F7e={get(e,t){return xf(e,"get",""),e[t]}};function Ghe(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,F7e),slots:e.slots,emit:e.emit,expose:t}}function gA(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(B$(Z3(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in cA)return cA[n](e)},has(t,n){return n in t||n in cA}})):e.proxy}const $7e=/(?:^|[-_])(\w)/g,B7e=e=>e.replace($7e,t=>t.toUpperCase()).replace(/[-_]/g,"");function vB(e,t=!0){return qo(e)?e.displayName||e.name:e.name||t&&e.__name}function Khe(e,t,n=!1){let i=vB(t);if(!i&&t.__file){const a=t.__file.match(/([^/\\]+)\.\w+$/);a&&(i=a[1])}if(!i&&e&&e.parent){const a=l=>{for(const f in l)if(l[f]===t)return f};i=a(e.components||e.parent.type.components)||a(e.appContext.components)}return i?B7e(i):n?"App":"Anonymous"}function V7e(e){return qo(e)&&"__vccOpts"in e}const Ge=(e,t)=>$8e(e,t,gw);function oi(e,t,n){const i=arguments.length;return i===2?Fa(t)&&!Ks(t)?xv(t)?pe(e,null,[t]):pe(e,t):pe(e,null,t):(i>3?n=Array.prototype.slice.call(arguments,2):i===3&&xv(n)&&(n=[n]),pe(e,t,n))}function Yhe(){}function Xhe(e,t,n,i){const a=n[i];if(a&&MJ(a,e))return a;const l=t();return l.memo=e.slice(),l.cacheIndex=i,n[i]=l}function MJ(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let i=0;i<n.length;i++)if(Pp(n[i],t[i]))return!1;return OS>0&&Af&&Af.push(e),!0}const bB="3.5.13",Jhe=jd,Qhe=Z8e,e1e=fw,t1e=Ime,n1e={createComponentInstance:zhe,setupComponent:jhe,renderComponentRoot:uB,setCurrentRenderingInstance:nA,isVNode:xv,normalizeVNode:Tm,getComponentPublicInstance:gA,ensureValidVNode:fJ,pushWarningContext:V8e,popWarningContext:H8e},s1e=null,o1e=null,r1e=null;/** * @vue/runtime-dom v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/let NJ;const i1e=typeof window<"u"&&window.trustedTypes;if(i1e)try{NJ=i1e.createPolicy("vue",{createHTML:e=>e})}catch{}const a1e=NJ?e=>NJ.createHTML(e):e=>e,H7e="http://www.w3.org/2000/svg",U7e="http://www.w3.org/1998/Math/MathML",kb=typeof document<"u"?document:null,l1e=kb&&kb.createElement("template"),z7e={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,i)=>{const a=t==="svg"?kb.createElementNS(H7e,e):t==="mathml"?kb.createElementNS(U7e,e):n?kb.createElement(e,{is:n}):kb.createElement(e);return e==="select"&&i&&i.multiple!=null&&a.setAttribute("multiple",i.multiple),a},createText:e=>kb.createTextNode(e),createComment:e=>kb.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>kb.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,i,a,l){const f=n?n.previousSibling:t.lastChild;if(a&&(a===l||a.nextSibling))for(;t.insertBefore(a.cloneNode(!0),n),!(a===l||!(a=a.nextSibling)););else{l1e.innerHTML=a1e(i==="svg"?"<svg>".concat(e,"</svg>"):i==="mathml"?"<math>".concat(e,"</math>"):e);const d=l1e.content;if(i==="svg"||i==="mathml"){const h=d.firstChild;for(;h.firstChild;)d.appendChild(h.firstChild);d.removeChild(h)}t.insertBefore(d,n)}return[f?f.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},n5="transition",vA="animation",vw=Symbol("_vtc"),c1e={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},u1e=wi({},J$,c1e),s5=(e=>(e.displayName="Transition",e.props=u1e,e))((e,{slots:t})=>oi(QX,f1e(e),t)),LS=(e,t=[])=>{Ks(e)?e.forEach(n=>n(...t)):e&&e(...t)},d1e=e=>e?Ks(e)?e.some(t=>t.length>1):e.length>1:!1;function f1e(e){const t={};for(const ie in e)ie in c1e||(t[ie]=e[ie]);if(e.css===!1)return t;const{name:n="v",type:i,duration:a,enterFromClass:l="".concat(n,"-enter-from"),enterActiveClass:f="".concat(n,"-enter-active"),enterToClass:d="".concat(n,"-enter-to"),appearFromClass:h=l,appearActiveClass:b=f,appearToClass:S=d,leaveFromClass:k="".concat(n,"-leave-from"),leaveActiveClass:T="".concat(n,"-leave-active"),leaveToClass:O="".concat(n,"-leave-to")}=e,P=W7e(a),B=P&&P[0],W=P&&P[1],{onBeforeEnter:Z,onEnter:Y,onEnterCancelled:z,onLeave:q,onLeaveCancelled:ne,onBeforeAppear:ue=Z,onAppear:J=Y,onAppearCancelled:ce=z}=t,ge=(ie,Be,$e,Ue)=>{ie._enterCancelled=Ue,o5(ie,Be?S:d),o5(ie,Be?b:f),$e&&$e()},de=(ie,Be)=>{ie._isLeaving=!1,o5(ie,k),o5(ie,O),o5(ie,T),Be&&Be()},he=ie=>(Be,$e)=>{const Ue=ie?J:Y,V=()=>ge(Be,ie,$e);LS(Ue,[Be,V]),p1e(()=>{o5(Be,ie?h:l),Tv(Be,ie?S:d),d1e(Ue)||m1e(Be,i,B,V)})};return wi(t,{onBeforeEnter(ie){LS(Z,[ie]),Tv(ie,l),Tv(ie,f)},onBeforeAppear(ie){LS(ue,[ie]),Tv(ie,h),Tv(ie,b)},onEnter:he(!1),onAppear:he(!0),onLeave(ie,Be){ie._isLeaving=!0;const $e=()=>de(ie,Be);Tv(ie,k),ie._enterCancelled?(Tv(ie,T),$J()):($J(),Tv(ie,T)),p1e(()=>{ie._isLeaving&&(o5(ie,k),Tv(ie,O),d1e(q)||m1e(ie,i,W,$e))}),LS(q,[ie,$e])},onEnterCancelled(ie){ge(ie,!1,void 0,!0),LS(z,[ie])},onAppearCancelled(ie){ge(ie,!0,void 0,!0),LS(ce,[ie])},onLeaveCancelled(ie){de(ie),LS(ne,[ie])}})}function W7e(e){if(e==null)return null;if(Fa(e))return[FJ(e.enter),FJ(e.leave)];{const t=FJ(e);return[t,t]}}function FJ(e){return x$(e)}function Tv(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[vw]||(e[vw]=new Set)).add(t)}function o5(e,t){t.split(/\s+/).forEach(i=>i&&e.classList.remove(i));const n=e[vw];n&&(n.delete(t),n.size||(e[vw]=void 0))}function p1e(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let j7e=0;function m1e(e,t,n,i){const a=e._endId=++j7e,l=()=>{a===e._endId&&i()};if(n!=null)return setTimeout(l,n);const{type:f,timeout:d,propCount:h}=h1e(e,t);if(!f)return i();const b=f+"end";let S=0;const k=()=>{e.removeEventListener(b,T),l()},T=O=>{O.target===e&&++S>=h&&k()};setTimeout(()=>{S<h&&k()},d+1),e.addEventListener(b,T)}function h1e(e,t){const n=window.getComputedStyle(e),i=P=>(n[P]||"").split(", "),a=i("".concat(n5,"Delay")),l=i("".concat(n5,"Duration")),f=g1e(a,l),d=i("".concat(vA,"Delay")),h=i("".concat(vA,"Duration")),b=g1e(d,h);let S=null,k=0,T=0;t===n5?f>0&&(S=n5,k=f,T=l.length):t===vA?b>0&&(S=vA,k=b,T=h.length):(k=Math.max(f,b),S=k>0?f>b?n5:vA:null,T=S?S===n5?l.length:h.length:0);const O=S===n5&&/\b(transform|all)(,|$)/.test(i("".concat(n5,"Property")).toString());return{type:S,timeout:k,propCount:T,hasTransform:O}}function g1e(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,i)=>v1e(n)+v1e(e[i])))}function v1e(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function $J(){return document.body.offsetHeight}function Z7e(e,t,n){const i=e[vw];i&&(t=(t?[t,...i]:[...i]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const yB=Symbol("_vod"),b1e=Symbol("_vsh"),bA={beforeMount(e,{value:t},{transition:n}){e[yB]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):yA(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:i}){!t!=!n&&(i?t?(i.beforeEnter(e),yA(e,!0),i.enter(e)):i.leave(e,()=>{yA(e,!1)}):yA(e,t))},beforeUnmount(e,{value:t}){yA(e,t)}};function yA(e,t){e.style.display=t?e[yB]:"none",e[b1e]=!t}function q7e(){bA.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const y1e=Symbol("");function _1e(e){const t=sd();if(!t)return;const n=t.ut=(a=e(t.proxy))=>{Array.from(document.querySelectorAll('[data-v-owner="'.concat(t.uid,'"]'))).forEach(l=>_B(l,a))},i=()=>{const a=e(t.proxy);t.ce?_B(t.ce,a):BJ(t.subTree,a),n(a)};rB(()=>{dw(i)}),Pr(()=>{io(i,jd,{flush:"post"});const a=new MutationObserver(i);a.observe(t.subTree.el.parentNode,{childList:!0}),$a(()=>a.disconnect())})}function BJ(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{BJ(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)_B(e.el,t);else if(e.type===bt)e.children.forEach(n=>BJ(n,t));else if(e.type===e5){let{el:n,anchor:i}=e;for(;n&&(_B(n,t),n!==i);)n=n.nextSibling}}function _B(e,t){if(e.nodeType===1){const n=e.style;let i="";for(const a in t)n.setProperty("--".concat(a),t[a]),i+="--".concat(a,": ").concat(t[a],";");n[y1e]=i}}const G7e=/(^|;)\s*display\s*:/;function K7e(e,t,n){const i=e.style,a=kr(n);let l=!1;if(n&&!a){if(t)if(kr(t))for(const f of t.split(";")){const d=f.slice(0,f.indexOf(":")).trim();n[d]==null&&SB(i,d,"")}else for(const f in t)n[f]==null&&SB(i,f,"");for(const f in n)f==="display"&&(l=!0),SB(i,f,n[f])}else if(a){if(t!==n){const f=i[y1e];f&&(n+=";"+f),i.cssText=n,l=G7e.test(n)}}else t&&e.removeAttribute("style");yB in e&&(e[yB]=l?i.display:"",e[b1e]&&(i.display="none"))}const S1e=/\s*!important$/;function SB(e,t,n){if(Ks(n))n.forEach(i=>SB(e,t,i));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const i=Y7e(e,t);S1e.test(n)?e.setProperty(km(i),n.replace(S1e,""),"important"):e[i]=n}}const C1e=["Webkit","Moz","ms"],VJ={};function Y7e(e,t){const n=VJ[t];if(n)return n;let i=Sl(t);if(i!=="filter"&&i in e)return VJ[t]=i;i=W3(i);for(let a=0;a<C1e.length;a++){const l=C1e[a]+i;if(l in e)return VJ[t]=l}return t}const w1e="http://www.w3.org/1999/xlink";function E1e(e,t,n,i,a,l=d8e(t)){i&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(w1e,t.slice(6,t.length)):e.setAttributeNS(w1e,t,n):n==null||l&&!Zpe(n)?e.removeAttribute(t):e.setAttribute(t,l?"":Em(n)?String(n):n)}function k1e(e,t,n,i,a){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?a1e(n):n);return}const l=e.tagName;if(t==="value"&&l!=="PROGRESS"&&!l.includes("-")){const d=l==="OPTION"?e.getAttribute("value")||"":e.value,h=n==null?e.type==="checkbox"?"on":"":String(n);(d!==h||!("_value"in e))&&(e.value=h),n==null&&e.removeAttribute(t),e._value=n;return}let f=!1;if(n===""||n==null){const d=typeof e[t];d==="boolean"?n=Zpe(n):n==null&&d==="string"?(n="",f=!0):d==="number"&&(n=0,f=!0)}try{e[t]=n}catch{}f&&e.removeAttribute(a||t)}function xb(e,t,n,i){e.addEventListener(t,n,i)}function X7e(e,t,n,i){e.removeEventListener(t,n,i)}const x1e=Symbol("_vei");function J7e(e,t,n,i,a=null){const l=e[x1e]||(e[x1e]={}),f=l[t];if(i&&f)f.value=i;else{const[d,h]=Q7e(t);if(i){const b=l[t]=nwe(i,a);xb(e,d,b,h)}else f&&(X7e(e,d,f,h),l[t]=void 0)}}const T1e=/(?:Once|Passive|Capture)$/;function Q7e(e){let t;if(T1e.test(e)){t={};let i;for(;i=e.match(T1e);)e=e.slice(0,e.length-i[0].length),t[i[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):km(e.slice(2)),t]}let HJ=0;const ewe=Promise.resolve(),twe=()=>HJ||(ewe.then(()=>HJ=0),HJ=Date.now());function nwe(e,t){const n=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=n.attached)return;Ah(swe(i,n.value),t,5,[i])};return n.value=e,n.attached=twe(),n}function swe(e,t){if(Ks(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(i=>a=>!a._stopped&&i&&i(a))}else return t}const I1e=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,owe=(e,t,n,i,a,l)=>{const f=a==="svg";t==="class"?Z7e(e,i,f):t==="style"?K7e(e,n,i):yS(t)?AX(t)||J7e(e,t,n,i,l):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):rwe(e,t,i,f))?(k1e(e,t,i),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&E1e(e,t,i,f,l,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!kr(i))?k1e(e,Sl(t),i,l,t):(t==="true-value"?e._trueValue=i:t==="false-value"&&(e._falseValue=i),E1e(e,t,i,f))};function rwe(e,t,n,i){if(i)return!!(t==="innerHTML"||t==="textContent"||t in e&&I1e(t)&&qo(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const a=e.tagName;if(a==="IMG"||a==="VIDEO"||a==="CANVAS"||a==="SOURCE")return!1}return I1e(t)&&kr(n)?!1:t in e}const A1e={};/*! #__NO_SIDE_EFFECTS__ */function UJ(e,t,n){const i=Gr(e,t);w$(i)&&wi(i,t);class a extends _A{constructor(f){super(i,f,n)}}return a.def=i,a}/*! #__NO_SIDE_EFFECTS__ */const O1e=(e,t)=>UJ(e,t,jJ),iwe=typeof HTMLElement<"u"?HTMLElement:class{};class _A extends iwe{constructor(t,n={},i=NS){super(),this._def=t,this._props=n,this._createApp=i,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&i!==NS?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow({mode:"open"}),this._root=this.shadowRoot):this._root=this,this._def.__asyncLoader||this._resolveProps(this._def)}connectedCallback(){if(!this.isConnected)return;this.shadowRoot||this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.parentNode||t.host);)if(t instanceof _A){this._parent=t;break}this._instance||(this._resolved?(this._setParent(),this._update()):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._instance.provides=t._instance.provides)}disconnectedCallback(){this._connected=!1,kc(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null)})}_resolveDef(){if(this._pendingResolve)return;for(let i=0;i<this.attributes.length;i++)this._setAttr(this.attributes[i].name);this._ob=new MutationObserver(i=>{for(const a of i)this._setAttr(a.attributeName)}),this._ob.observe(this,{attributes:!0});const t=(i,a=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:l,styles:f}=i;let d;if(l&&!Ks(l))for(const h in l){const b=l[h];(b===Number||b&&b.type===Number)&&(h in this._props&&(this._props[h]=x$(this._props[h])),(d||(d=Object.create(null)))[Sl(h)]=!0)}this._numberProps=d,a&&this._resolveProps(i),this.shadowRoot&&this._applyStyles(f),this._mount(i)},n=this._def.__asyncLoader;n?this._pendingResolve=n().then(i=>t(this._def=i,!0)):t(this._def)}_mount(t){this._app=this._createApp(t),t.configureApp&&t.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const n=this._instance&&this._instance.exposed;if(n)for(const i in n)fa(this,i)||Object.defineProperty(this,i,{get:()=>se(n[i])})}_resolveProps(t){const{props:n}=t,i=Ks(n)?n:Object.keys(n||{});for(const a of Object.keys(this))a[0]!=="_"&&i.includes(a)&&this._setProp(a,this[a]);for(const a of i.map(Sl))Object.defineProperty(this,a,{get(){return this._getProp(a)},set(l){this._setProp(a,l,!0,!0)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const n=this.hasAttribute(t);let i=n?this.getAttribute(t):A1e;const a=Sl(t);n&&this._numberProps&&this._numberProps[a]&&(i=x$(i)),this._setProp(a,i,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,n,i=!0,a=!1){if(n!==this._props[t]&&(n===A1e?delete this._props[t]:(this._props[t]=n,t==="key"&&this._app&&(this._app._ceVNode.key=n)),a&&this._instance&&this._update(),i)){const l=this._ob;l&&l.disconnect(),n===!0?this.setAttribute(km(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(km(t),n+""):n||this.removeAttribute(km(t)),l&&l.observe(this,{attributes:!0})}}_update(){WJ(this._createVNode(),this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const n=pe(this._def,wi(t,this._props));return this._instance||(n.ce=i=>{this._instance=i,i.ce=this,i.isCE=!0;const a=(l,f)=>{this.dispatchEvent(new CustomEvent(l,w$(f[0])?wi({detail:f},f[0]):{detail:f}))};i.emit=(l,...f)=>{a(l,f),km(l)!==l&&a(km(l),f)},this._setParent()}),n}_applyStyles(t,n){if(!t)return;if(n){if(n===this._def||this._styleChildren.has(n))return;this._styleChildren.add(n)}const i=this._nonce;for(let a=t.length-1;a>=0;a--){const l=document.createElement("style");i&&l.setAttribute("nonce",i),l.textContent=t[a],this.shadowRoot.prepend(l)}}_parseSlots(){const t=this._slots={};let n;for(;n=this.firstChild;){const i=n.nodeType===1&&n.getAttribute("slot")||"default";(t[i]||(t[i]=[])).push(n),this.removeChild(n)}}_renderSlots(){const t=(this._teleportTarget||this).querySelectorAll("slot"),n=this._instance.type.__scopeId;for(let i=0;i<t.length;i++){const a=t[i],l=a.getAttribute("name")||"default",f=this._slots[l],d=a.parentNode;if(f)for(const h of f){if(n&&h.nodeType===1){const b=n+"-s",S=document.createTreeWalker(h,1);h.setAttribute(b,"");let k;for(;k=S.nextNode();)k.setAttribute(b,"")}d.insertBefore(h,a)}else for(;a.firstChild;)d.insertBefore(a.firstChild,a);d.removeChild(a)}}_injectChildStyle(t){this._applyStyles(t.styles,t)}_removeChildStyle(t){}}function zJ(e){const t=sd(),n=t&&t.ce;return n||null}function R1e(){const e=zJ();return e&&e.shadowRoot}function D1e(e="$style"){{const t=sd();if(!t)return Ir;const n=t.type.__cssModules;if(!n)return Ir;const i=n[e];return i||Ir}}const L1e=new WeakMap,P1e=new WeakMap,CB=Symbol("_moveCb"),M1e=Symbol("_enterCb"),N1e=(e=>(delete e.props.mode,e))({name:"TransitionGroup",props:wi({},u1e,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=sd(),i=X$();let a,l;return lA(()=>{if(!a.length)return;const f=e.moveClass||"".concat(e.name||"v","-move");if(!uwe(a[0].el,n.vnode.el,f))return;a.forEach(awe),a.forEach(lwe);const d=a.filter(cwe);$J(),d.forEach(h=>{const b=h.el,S=b.style;Tv(b,f),S.transform=S.webkitTransform=S.transitionDuration="";const k=b[CB]=T=>{T&&T.target!==b||(!T||/transform$/.test(T.propertyName))&&(b.removeEventListener("transitionend",k),b[CB]=null,o5(b,f))};b.addEventListener("transitionend",k)})}),()=>{const f=Qo(e),d=f1e(f);let h=f.tag||bt;if(a=[],l)for(let b=0;b<l.length;b++){const S=l[b];S.el&&S.el instanceof Element&&(a.push(S),kv(S,TS(S,d,i,n)),L1e.set(S,S.el.getBoundingClientRect()))}l=t.default?oA(t.default()):[];for(let b=0;b<l.length;b++){const S=l[b];S.key!=null&&kv(S,TS(S,d,i,n))}return pe(h,null,l)}}});function awe(e){const t=e.el;t[CB]&&t[CB](),t[M1e]&&t[M1e]()}function lwe(e){P1e.set(e,e.el.getBoundingClientRect())}function cwe(e){const t=L1e.get(e),n=P1e.get(e),i=t.left-n.left,a=t.top-n.top;if(i||a){const l=e.el.style;return l.transform=l.webkitTransform="translate(".concat(i,"px,").concat(a,"px)"),l.transitionDuration="0s",e}}function uwe(e,t,n){const i=e.cloneNode(),a=e[vw];a&&a.forEach(d=>{d.split(/\s+/).forEach(h=>h&&i.classList.remove(h))}),n.split(/\s+/).forEach(d=>d&&i.classList.add(d)),i.style.display="none";const l=t.nodeType===1?t:t.parentNode;l.appendChild(i);const{hasTransform:f}=h1e(i);return l.removeChild(i),f}const r5=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Ks(t)?n=>rw(t,n):t};function dwe(e){e.target.composing=!0}function F1e(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const R1=Symbol("_assign"),lu={created(e,{modifiers:{lazy:t,trim:n,number:i}},a){e[R1]=r5(a);const l=i||a.props&&a.props.type==="number";xb(e,t?"change":"input",f=>{if(f.target.composing)return;let d=e.value;n&&(d=d.trim()),l&&(d=k$(d)),e[R1](d)}),n&&xb(e,"change",()=>{e.value=e.value.trim()}),t||(xb(e,"compositionstart",dwe),xb(e,"compositionend",F1e),xb(e,"change",F1e))},mounted(e,{value:t}){e.value=t==null?"":t},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:i,trim:a,number:l}},f){if(e[R1]=r5(f),e.composing)return;const d=(l||e.type==="number")&&!/^0\d/.test(e.value)?k$(e.value):e.value,h=t==null?"":t;d!==h&&(document.activeElement===e&&e.type!=="range"&&(i&&t===n||a&&e.value.trim()===h)||(e.value=h))}},Iv={deep:!0,created(e,t,n){e[R1]=r5(n),xb(e,"change",()=>{const i=e._modelValue,a=bw(e),l=e.checked,f=e[R1];if(Ks(i)){const d=I$(i,a),h=d!==-1;if(l&&!h)f(i.concat(a));else if(!l&&h){const b=[...i];b.splice(d,1),f(b)}}else if(_S(i)){const d=new Set(i);l?d.add(a):d.delete(a),f(d)}else f(V1e(e,l))})},mounted:$1e,beforeUpdate(e,t,n){e[R1]=r5(n),$1e(e,t,n)}};function $1e(e,{value:t,oldValue:n},i){e._modelValue=t;let a;if(Ks(t))a=I$(t,i.props.value)>-1;else if(_S(t))a=t.has(i.props.value);else{if(t===n)return;a=j3(t,V1e(e,!0))}e.checked!==a&&(e.checked=a)}const PS={created(e,{value:t},n){e.checked=j3(t,n.props.value),e[R1]=r5(n),xb(e,"change",()=>{e[R1](bw(e))})},beforeUpdate(e,{value:t,oldValue:n},i){e[R1]=r5(i),t!==n&&(e.checked=j3(t,i.props.value))}},wB={deep:!0,created(e,{value:t,modifiers:{number:n}},i){const a=_S(t);xb(e,"change",()=>{const l=Array.prototype.filter.call(e.options,f=>f.selected).map(f=>n?k$(bw(f)):bw(f));e[R1](e.multiple?a?new Set(l):l:l[0]),e._assigning=!0,kc(()=>{e._assigning=!1})}),e[R1]=r5(i)},mounted(e,{value:t}){B1e(e,t)},beforeUpdate(e,t,n){e[R1]=r5(n)},updated(e,{value:t}){e._assigning||B1e(e,t)}};function B1e(e,t){const n=e.multiple,i=Ks(t);if(!(n&&!i&&!_S(t))){for(let a=0,l=e.options.length;a<l;a++){const f=e.options[a],d=bw(f);if(n)if(i){const h=typeof d;h==="string"||h==="number"?f.selected=t.some(b=>String(b)===String(d)):f.selected=I$(t,d)>-1}else f.selected=t.has(d);else if(j3(bw(f),t)){e.selectedIndex!==a&&(e.selectedIndex=a);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function bw(e){return"_value"in e?e._value:e.value}function V1e(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const EB={created(e,t,n){kB(e,t,n,null,"created")},mounted(e,t,n){kB(e,t,n,null,"mounted")},beforeUpdate(e,t,n,i){kB(e,t,n,i,"beforeUpdate")},updated(e,t,n,i){kB(e,t,n,i,"updated")}};function H1e(e,t){switch(e){case"SELECT":return wB;case"TEXTAREA":return lu;default:switch(t){case"checkbox":return Iv;case"radio":return PS;default:return lu}}}function kB(e,t,n,i,a){const f=H1e(e.tagName,n.props&&n.props.type)[a];f&&f(e,t,n,i)}function fwe(){lu.getSSRProps=({value:e})=>({value:e}),PS.getSSRProps=({value:e},t)=>{if(t.props&&j3(t.props.value,e))return{checked:!0}},Iv.getSSRProps=({value:e},t)=>{if(Ks(e)){if(t.props&&I$(e,t.props.value)>-1)return{checked:!0}}else if(_S(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},EB.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const n=H1e(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}const pwe=["ctrl","shift","alt","meta"],mwe={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>pwe.some(n=>e["".concat(n,"Key")]&&!t.includes(n))},wl=(e,t)=>{const n=e._withMods||(e._withMods={}),i=t.join(".");return n[i]||(n[i]=(a,...l)=>{for(let f=0;f<t.length;f++){const d=mwe[t[f]];if(d&&d(a,t))return}return e(a,...l)})},hwe={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},MS=(e,t)=>{const n=e._withKeys||(e._withKeys={}),i=t.join(".");return n[i]||(n[i]=a=>{if(!("key"in a))return;const l=km(a.key);if(t.some(f=>f===l||hwe[f]===l))return e(a)})},U1e=wi({patchProp:owe},z7e);let SA,z1e=!1;function W1e(){return SA||(SA=SJ(U1e))}function j1e(){return SA=z1e?SA:CJ(U1e),z1e=!0,SA}const WJ=(...e)=>{W1e().render(...e)},Z1e=(...e)=>{j1e().hydrate(...e)},NS=(...e)=>{const t=W1e().createApp(...e),{mount:n}=t;return t.mount=i=>{const a=G1e(i);if(!a)return;const l=t._component;!qo(l)&&!l.render&&!l.template&&(l.template=a.innerHTML),a.nodeType===1&&(a.textContent="");const f=n(a,!1,q1e(a));return a instanceof Element&&(a.removeAttribute("v-cloak"),a.setAttribute("data-v-app","")),f},t},jJ=(...e)=>{const t=j1e().createApp(...e),{mount:n}=t;return t.mount=i=>{const a=G1e(i);if(a)return n(a,!0,q1e(a))},t};function q1e(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function G1e(e){return kr(e)?document.querySelector(e):e}let K1e=!1;const Y1e=()=>{K1e||(K1e=!0,fwe(),q7e())},gwe=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:QX,BaseTransitionPropsValidators:J$,Comment:au,DeprecationTypes:r1e,EffectScope:A$,ErrorCodes:wme,ErrorTypeStrings:Qhe,Fragment:bt,KeepAlive:qme,ReactiveEffect:iw,Static:e5,Suspense:Mhe,Teleport:JX,Text:Eb,TrackOpTypes:bme,Transition:s5,TransitionGroup:N1e,TriggerOpTypes:yme,VueElement:_A,assertNumber:Cme,callWithAsyncErrorHandling:Ah,callWithErrorHandling:K3,camelize:Sl,capitalize:W3,cloneVNode:Rh,compatUtils:o1e,computed:Ge,createApp:NS,createBlock:Ee,createCommentVNode:we,createElementBlock:Q,createElementVNode:H,createHydrationRenderer:CJ,createPropsRestProxy:che,createRenderer:SJ,createSSRApp:jJ,createSlots:If,createStaticVNode:rc,createTextVNode:D,createVNode:pe,customRef:jX,defineAsyncComponent:nJ,defineComponent:Gr,defineCustomElement:UJ,defineEmits:Qme,defineExpose:ehe,defineModel:she,defineOptions:the,defineProps:Jme,defineSSRCustomElement:O1e,defineSlots:nhe,devtools:e1e,effect:eme,effectScope:O$,getCurrentInstance:sd,getCurrentScope:GI,getCurrentWatcher:_me,getTransitionRawChildren:oA,guardReactiveProps:RS,h:oi,handleError:Y3,hasInjectionContext:aB,hydrate:Z1e,hydrateOnIdle:zme,hydrateOnInteraction:Zme,hydrateOnMediaQuery:jme,hydrateOnVisible:Wme,initCustomFormatter:Yhe,initDirectivesForSSR:Y1e,inject:Mr,isMemoSame:MJ,isProxy:ES,isReactive:A1,isReadonly:_b,isRef:xa,isRuntimeOnly:Zhe,isShallow:xm,isVNode:xv,markRaw:Z3,mergeDefaults:ahe,mergeModels:lhe,mergeProps:Cn,nextTick:kc,normalizeClass:Rn,normalizeProps:CS,normalizeStyle:Ih,onActivated:tB,onBeforeMount:rJ,onBeforeUnmount:wb,onBeforeUpdate:rB,onDeactivated:nB,onErrorCaptured:cJ,onMounted:Pr,onRenderTracked:lJ,onRenderTriggered:aJ,onScopeDispose:KI,onServerPrefetch:iJ,onUnmounted:$a,onUpdated:lA,onWatcherCleanup:ZX,openBlock:L,popScopeId:YX,provide:Ba,proxyRefs:B$,pushScopeId:KX,queuePostFlushCb:dw,reactive:I1,readonly:lw,ref:kt,registerRuntimeCompiler:PJ,render:WJ,renderList:Sn,renderSlot:is,resolveComponent:Xe,resolveDirective:Hr,resolveDynamicComponent:Io,resolveFilter:s1e,resolveTransitionHooks:TS,setBlockTracking:pB,setDevtoolsHook:t1e,setTransitionHooks:kv,shallowReactive:zX,shallowReadonly:mme,shallowRef:kS,ssrContextKey:kJ,ssrUtils:n1e,stop:tme,toDisplayString:ee,toHandlerKey:SS,toHandlers:Xme,toRaw:Qo,toRef:V$,toRefs:q3,toValue:gme,transformVNodeArgs:Hhe,triggerRef:$$,unref:se,useAttrs:rhe,useCssModule:D1e,useCssVars:_1e,useHost:zJ,useId:Oh,useModel:Rhe,useSSRContext:xJ,useShadowRoot:R1e,useSlots:uA,useTemplateRef:Vme,useTransitionState:X$,vModelCheckbox:Iv,vModelDynamic:EB,vModelRadio:PS,vModelSelect:wB,vModelText:lu,vShow:bA,version:bB,warn:Jhe,watch:io,watchEffect:oc,watchPostEffect:Ahe,watchSyncEffect:TJ,withAsyncContext:uhe,withCtx:te,withDefaults:ohe,withDirectives:Gn,withKeys:MS,withMemo:Xhe,withModifiers:wl,withScopeId:q$},Symbol.toStringTag,{value:"Module"}));/** * @vue/compiler-core v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/const CA=Symbol(""),wA=Symbol(""),ZJ=Symbol(""),xB=Symbol(""),X1e=Symbol(""),FS=Symbol(""),J1e=Symbol(""),Q1e=Symbol(""),qJ=Symbol(""),GJ=Symbol(""),EA=Symbol(""),KJ=Symbol(""),ege=Symbol(""),YJ=Symbol(""),XJ=Symbol(""),JJ=Symbol(""),QJ=Symbol(""),eQ=Symbol(""),tQ=Symbol(""),tge=Symbol(""),nge=Symbol(""),TB=Symbol(""),IB=Symbol(""),nQ=Symbol(""),sQ=Symbol(""),kA=Symbol(""),xA=Symbol(""),oQ=Symbol(""),rQ=Symbol(""),vwe=Symbol(""),iQ=Symbol(""),AB=Symbol(""),bwe=Symbol(""),ywe=Symbol(""),aQ=Symbol(""),_we=Symbol(""),Swe=Symbol(""),lQ=Symbol(""),sge=Symbol(""),yw={[CA]:"Fragment",[wA]:"Teleport",[ZJ]:"Suspense",[xB]:"KeepAlive",[X1e]:"BaseTransition",[FS]:"openBlock",[J1e]:"createBlock",[Q1e]:"createElementBlock",[qJ]:"createVNode",[GJ]:"createElementVNode",[EA]:"createCommentVNode",[KJ]:"createTextVNode",[ege]:"createStaticVNode",[YJ]:"resolveComponent",[XJ]:"resolveDynamicComponent",[JJ]:"resolveDirective",[QJ]:"resolveFilter",[eQ]:"withDirectives",[tQ]:"renderList",[tge]:"renderSlot",[nge]:"createSlots",[TB]:"toDisplayString",[IB]:"mergeProps",[nQ]:"normalizeClass",[sQ]:"normalizeStyle",[kA]:"normalizeProps",[xA]:"guardReactiveProps",[oQ]:"toHandlers",[rQ]:"camelize",[vwe]:"capitalize",[iQ]:"toHandlerKey",[AB]:"setBlockTracking",[bwe]:"pushScopeId",[ywe]:"popScopeId",[aQ]:"withCtx",[_we]:"unref",[Swe]:"isRef",[lQ]:"withMemo",[sge]:"isMemoSame"};function Cwe(e){Object.getOwnPropertySymbols(e).forEach(t=>{yw[t]=e[t]})}const Dh={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function wwe(e,t=""){return{type:0,source:t,children:e,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:Dh}}function TA(e,t,n,i,a,l,f,d=!1,h=!1,b=!1,S=Dh){return e&&(d?(e.helper(FS),e.helper(Cw(e.inSSR,b))):e.helper(Sw(e.inSSR,b)),f&&e.helper(eQ)),{type:13,tag:t,props:n,children:i,patchFlag:a,dynamicProps:l,directives:f,isBlock:d,disableTracking:h,isComponent:b,loc:S}}function $S(e,t=Dh){return{type:17,loc:t,elements:e}}function D1(e,t=Dh){return{type:15,loc:t,properties:e}}function cu(e,t){return{type:16,loc:Dh,key:kr(e)?Ur(e,!0):e,value:t}}function Ur(e,t=!1,n=Dh,i=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:i}}function Gg(e,t=Dh){return{type:8,loc:t,children:e}}function od(e,t=[],n=Dh){return{type:14,loc:n,callee:e,arguments:t}}function _w(e,t=void 0,n=!1,i=!1,a=Dh){return{type:18,params:e,returns:t,newline:n,isSlot:i,loc:a}}function cQ(e,t,n,i=!0){return{type:19,test:e,consequent:t,alternate:n,newline:i,loc:Dh}}function Ewe(e,t,n=!1,i=!1){return{type:20,index:e,value:t,needPauseTracking:n,inVOnce:i,needArraySpread:!1,loc:Dh}}function kwe(e){return{type:21,body:e,loc:Dh}}function Sw(e,t){return e||t?qJ:GJ}function Cw(e,t){return e||t?J1e:Q1e}function uQ(e,{helper:t,removeHelper:n,inSSR:i}){e.isBlock||(e.isBlock=!0,n(Sw(i,e.isComponent)),t(FS),t(Cw(i,e.isComponent)))}const oge=new Uint8Array([123,123]),rge=new Uint8Array([125,125]);function ige(e){return e>=97&&e<=122||e>=65&&e<=90}function Lh(e){return e===32||e===10||e===9||e===12||e===13}function i5(e){return e===47||e===62||Lh(e)}function OB(e){const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}const Of={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])};class xwe{constructor(t,n){this.stack=t,this.cbs=n,this.state=1,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=oge,this.delimiterClose=rge,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return this.mode===2&&this.stack.length===0}reset(){this.state=1,this.mode=0,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=oge,this.delimiterClose=rge}getPos(t){let n=1,i=t+1;for(let a=this.newlines.length-1;a>=0;a--){const l=this.newlines[a];if(t>l){n=a+2,i=t-l;break}}return{column:i,line:n,offset:t}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(t){t===60?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):!this.inVPre&&t===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(t))}stateInterpolationOpen(t){if(t===this.delimiterOpen[this.delimiterIndex])if(this.delimiterIndex===this.delimiterOpen.length-1){const n=this.index+1-this.delimiterOpen.length;n>this.sectionStart&&this.cbs.ontext(this.sectionStart,n),this.state=3,this.sectionStart=n}else this.delimiterIndex++;else this.inRCDATA?(this.state=32,this.stateInRCDATA(t)):(this.state=1,this.stateText(t))}stateInterpolation(t){t===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(t))}stateInterpolationClose(t){t===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(t))}stateSpecialStartSequence(t){const n=this.sequenceIndex===this.currentSequence.length;if(!(n?i5(t):(t|32)===this.currentSequence[this.sequenceIndex]))this.inRCDATA=!1;else if(!n){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=6,this.stateInTagName(t)}stateInRCDATA(t){if(this.sequenceIndex===this.currentSequence.length){if(t===62||Lh(t)){const n=this.index-this.currentSequence.length;if(this.sectionStart<n){const i=this.index;this.index=n,this.cbs.ontext(this.sectionStart,n),this.index=i}this.sectionStart=n+2,this.stateInClosingTagName(t),this.inRCDATA=!1;return}this.sequenceIndex=0}(t|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===Of.TitleEnd||this.currentSequence===Of.TextareaEnd&&!this.inSFCRoot?!this.inVPre&&t===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(t)):this.fastForwardTo(60)&&(this.sequenceIndex=1):this.sequenceIndex=+(t===60)}stateCDATASequence(t){t===Of.Cdata[this.sequenceIndex]?++this.sequenceIndex===Of.Cdata.length&&(this.state=28,this.currentSequence=Of.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=23,this.stateInDeclaration(t))}fastForwardTo(t){for(;++this.index<this.buffer.length;){const n=this.buffer.charCodeAt(this.index);if(n===10&&this.newlines.push(this.index),n===t)return!0}return this.index=this.buffer.length-1,!1}stateInCommentLike(t){t===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===Of.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index-2):this.cbs.oncomment(this.sectionStart,this.index-2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=1):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):t!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}startSpecial(t,n){this.enterRCDATA(t,n),this.state=31}enterRCDATA(t,n){this.inRCDATA=!0,this.currentSequence=t,this.sequenceIndex=n}stateBeforeTagName(t){t===33?(this.state=22,this.sectionStart=this.index+1):t===63?(this.state=24,this.sectionStart=this.index+1):ige(t)?(this.sectionStart=this.index,this.mode===0?this.state=6:this.inSFCRoot?this.state=34:this.inXML?this.state=6:t===116?this.state=30:this.state=t===115?29:6):t===47?this.state=8:(this.state=1,this.stateText(t))}stateInTagName(t){i5(t)&&this.handleTagName(t)}stateInSFCRootTagName(t){if(i5(t)){const n=this.buffer.slice(this.sectionStart,this.index);n!=="template"&&this.enterRCDATA(OB("</"+n),0),this.handleTagName(t)}}handleTagName(t){this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(t)}stateBeforeClosingTagName(t){Lh(t)||(t===62?(this.state=1,this.sectionStart=this.index+1):(this.state=ige(t)?9:27,this.sectionStart=this.index))}stateInClosingTagName(t){(t===62||Lh(t))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=10,this.stateAfterClosingTagName(t))}stateAfterClosingTagName(t){t===62&&(this.state=1,this.sectionStart=this.index+1)}stateBeforeAttrName(t){t===62?(this.cbs.onopentagend(this.index),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):t===47?this.state=7:t===60&&this.peek()===47?(this.cbs.onopentagend(this.index),this.state=5,this.sectionStart=this.index):Lh(t)||this.handleAttrStart(t)}handleAttrStart(t){t===118&&this.peek()===45?(this.state=13,this.sectionStart=this.index):t===46||t===58||t===64||t===35?(this.cbs.ondirname(this.index,this.index+1),this.state=14,this.sectionStart=this.index+1):(this.state=12,this.sectionStart=this.index)}stateInSelfClosingTag(t){t===62?(this.cbs.onselfclosingtag(this.index),this.state=1,this.sectionStart=this.index+1,this.inRCDATA=!1):Lh(t)||(this.state=11,this.stateBeforeAttrName(t))}stateInAttrName(t){(t===61||i5(t))&&(this.cbs.onattribname(this.sectionStart,this.index),this.handleAttrNameEnd(t))}stateInDirName(t){t===61||i5(t)?(this.cbs.ondirname(this.sectionStart,this.index),this.handleAttrNameEnd(t)):t===58?(this.cbs.ondirname(this.sectionStart,this.index),this.state=14,this.sectionStart=this.index+1):t===46&&(this.cbs.ondirname(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDirArg(t){t===61||i5(t)?(this.cbs.ondirarg(this.sectionStart,this.index),this.handleAttrNameEnd(t)):t===91?this.state=15:t===46&&(this.cbs.ondirarg(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDynamicDirArg(t){t===93?this.state=14:(t===61||i5(t))&&(this.cbs.ondirarg(this.sectionStart,this.index+1),this.handleAttrNameEnd(t))}stateInDirModifier(t){t===61||i5(t)?(this.cbs.ondirmodifier(this.sectionStart,this.index),this.handleAttrNameEnd(t)):t===46&&(this.cbs.ondirmodifier(this.sectionStart,this.index),this.sectionStart=this.index+1)}handleAttrNameEnd(t){this.sectionStart=this.index,this.state=17,this.cbs.onattribnameend(this.index),this.stateAfterAttrName(t)}stateAfterAttrName(t){t===61?this.state=18:t===47||t===62?(this.cbs.onattribend(0,this.sectionStart),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(t)):Lh(t)||(this.cbs.onattribend(0,this.sectionStart),this.handleAttrStart(t))}stateBeforeAttrValue(t){t===34?(this.state=19,this.sectionStart=this.index+1):t===39?(this.state=20,this.sectionStart=this.index+1):Lh(t)||(this.sectionStart=this.index,this.state=21,this.stateInAttrValueNoQuotes(t))}handleInAttrValue(t,n){(t===n||this.fastForwardTo(n))&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(n===34?3:2,this.index+1),this.state=11)}stateInAttrValueDoubleQuotes(t){this.handleInAttrValue(t,34)}stateInAttrValueSingleQuotes(t){this.handleInAttrValue(t,39)}stateInAttrValueNoQuotes(t){Lh(t)||t===62?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(1,this.index),this.state=11,this.stateBeforeAttrName(t)):(t===39||t===60||t===61||t===96)&&this.cbs.onerr(18,this.index)}stateBeforeDeclaration(t){t===91?(this.state=26,this.sequenceIndex=0):this.state=t===45?25:23}stateInDeclaration(t){(t===62||this.fastForwardTo(62))&&(this.state=1,this.sectionStart=this.index+1)}stateInProcessingInstruction(t){(t===62||this.fastForwardTo(62))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeComment(t){t===45?(this.state=28,this.currentSequence=Of.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=23}stateInSpecialComment(t){(t===62||this.fastForwardTo(62))&&(this.cbs.oncomment(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeSpecialS(t){t===Of.ScriptEnd[3]?this.startSpecial(Of.ScriptEnd,4):t===Of.StyleEnd[3]?this.startSpecial(Of.StyleEnd,4):(this.state=6,this.stateInTagName(t))}stateBeforeSpecialT(t){t===Of.TitleEnd[3]?this.startSpecial(Of.TitleEnd,4):t===Of.TextareaEnd[3]?this.startSpecial(Of.TextareaEnd,4):(this.state=6,this.stateInTagName(t))}startEntity(){}stateInEntity(){}parse(t){for(this.buffer=t;this.index<this.buffer.length;){const n=this.buffer.charCodeAt(this.index);switch(n===10&&this.newlines.push(this.index),this.state){case 1:{this.stateText(n);break}case 2:{this.stateInterpolationOpen(n);break}case 3:{this.stateInterpolation(n);break}case 4:{this.stateInterpolationClose(n);break}case 31:{this.stateSpecialStartSequence(n);break}case 32:{this.stateInRCDATA(n);break}case 26:{this.stateCDATASequence(n);break}case 19:{this.stateInAttrValueDoubleQuotes(n);break}case 12:{this.stateInAttrName(n);break}case 13:{this.stateInDirName(n);break}case 14:{this.stateInDirArg(n);break}case 15:{this.stateInDynamicDirArg(n);break}case 16:{this.stateInDirModifier(n);break}case 28:{this.stateInCommentLike(n);break}case 27:{this.stateInSpecialComment(n);break}case 11:{this.stateBeforeAttrName(n);break}case 6:{this.stateInTagName(n);break}case 34:{this.stateInSFCRootTagName(n);break}case 9:{this.stateInClosingTagName(n);break}case 5:{this.stateBeforeTagName(n);break}case 17:{this.stateAfterAttrName(n);break}case 20:{this.stateInAttrValueSingleQuotes(n);break}case 18:{this.stateBeforeAttrValue(n);break}case 8:{this.stateBeforeClosingTagName(n);break}case 10:{this.stateAfterClosingTagName(n);break}case 29:{this.stateBeforeSpecialS(n);break}case 30:{this.stateBeforeSpecialT(n);break}case 21:{this.stateInAttrValueNoQuotes(n);break}case 7:{this.stateInSelfClosingTag(n);break}case 23:{this.stateInDeclaration(n);break}case 22:{this.stateBeforeDeclaration(n);break}case 25:{this.stateBeforeComment(n);break}case 24:{this.stateInProcessingInstruction(n);break}case 33:{this.stateInEntity();break}}this.index++}this.cleanup(),this.finish()}cleanup(){this.sectionStart!==this.index&&(this.state===1||this.state===32&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===19||this.state===20||this.state===21)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}finish(){this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const t=this.buffer.length;this.sectionStart>=t||(this.state===28?this.currentSequence===Of.CdataEnd?this.cbs.oncdata(this.sectionStart,t):this.cbs.oncomment(this.sectionStart,t):this.state===6||this.state===11||this.state===18||this.state===17||this.state===12||this.state===13||this.state===14||this.state===15||this.state===16||this.state===20||this.state===19||this.state===21||this.state===9||this.cbs.ontext(this.sectionStart,t))}emitCodePoint(t,n){}}function age(e,{compatConfig:t}){const n=t&&t[e];return e==="MODE"?n||3:n}function BS(e,t){const n=age("MODE",t),i=age(e,t);return n===3?i===!0:i!==!1}function IA(e,t,n,...i){return BS(e,t)}function dQ(e){throw e}function lge(e){}function ic(e,t,n,i){const a="https://vuejs.org/error-reference/#compiler-".concat(e),l=new SyntaxError(String(a));return l.code=e,l.loc=t,l}const Am=e=>e.type===4&&e.isStatic;function cge(e){switch(e){case"Teleport":case"teleport":return wA;case"Suspense":case"suspense":return ZJ;case"KeepAlive":case"keep-alive":return xB;case"BaseTransition":case"base-transition":return X1e}}const Twe=/^\d|[^\$\w\xA0-\uFFFF]/,fQ=e=>!Twe.test(e),Iwe=/[A-Za-z_$\xA0-\uFFFF]/,Awe=/[\.\?\w$\xA0-\uFFFF]/,Owe=/\s+[.[]\s*|\s*[.[]\s+/g,uge=e=>e.type===4?e.content:e.loc.source,dge=e=>{const t=uge(e).trim().replace(Owe,d=>d.trim());let n=0,i=[],a=0,l=0,f=null;for(let d=0;d<t.length;d++){const h=t.charAt(d);switch(n){case 0:if(h==="[")i.push(n),n=1,a++;else if(h==="(")i.push(n),n=2,l++;else if(!(d===0?Iwe:Awe).test(h))return!1;break;case 1:h==="'"||h==='"'||h==="`"?(i.push(n),n=3,f=h):h==="["?a++:h==="]"&&(--a||(n=i.pop()));break;case 2:if(h==="'"||h==='"'||h==="`")i.push(n),n=3,f=h;else if(h==="(")l++;else if(h===")"){if(d===t.length-1)return!1;--l||(n=i.pop())}break;case 3:h===f&&(n=i.pop(),f=null);break}}return!a&&!l},Rwe=/^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,Dwe=e=>Rwe.test(uge(e));function L1(e,t,n=!1){for(let i=0;i<e.props.length;i++){const a=e.props[i];if(a.type===7&&(n||a.exp)&&(kr(t)?a.name===t:t.test(a.name)))return a}}function RB(e,t,n=!1,i=!1){for(let a=0;a<e.props.length;a++){const l=e.props[a];if(l.type===6){if(n)continue;if(l.name===t&&(l.value||i))return l}else if(l.name==="bind"&&(l.exp||i)&&VS(l.arg,t))return l}}function VS(e,t){return!!(e&&Am(e)&&e.content===t)}function Lwe(e){return e.props.some(t=>t.type===7&&t.name==="bind"&&(!t.arg||t.arg.type!==4||!t.arg.isStatic))}function pQ(e){return e.type===5||e.type===2}function Pwe(e){return e.type===7&&e.name==="slot"}function DB(e){return e.type===1&&e.tagType===3}function LB(e){return e.type===1&&e.tagType===2}const Mwe=new Set([kA,xA]);function fge(e,t=[]){if(e&&!kr(e)&&e.type===14){const n=e.callee;if(!kr(n)&&Mwe.has(n))return fge(e.arguments[0],t.concat(e))}return[e,t]}function PB(e,t,n){let i,a=e.type===13?e.props:e.arguments[2],l=[],f;if(a&&!kr(a)&&a.type===14){const d=fge(a);a=d[0],l=d[1],f=l[l.length-1]}if(a==null||kr(a))i=D1([t]);else if(a.type===14){const d=a.arguments[0];!kr(d)&&d.type===15?pge(t,d)||d.properties.unshift(t):a.callee===oQ?i=od(n.helper(IB),[D1([t]),a]):a.arguments.unshift(D1([t])),!i&&(i=a)}else a.type===15?(pge(t,a)||a.properties.unshift(t),i=a):(i=od(n.helper(IB),[D1([t]),a]),f&&f.callee===xA&&(f=l[l.length-2]));e.type===13?f?f.arguments[0]=i:e.props=i:f?f.arguments[0]=i:e.arguments[2]=i}function pge(e,t){let n=!1;if(e.key.type===4){const i=e.key.content;n=t.properties.some(a=>a.key.type===4&&a.key.content===i)}return n}function AA(e,t){return"_".concat(t,"_").concat(e.replace(/[^\w]/g,(n,i)=>n==="-"?"_":e.charCodeAt(i).toString()))}function Nwe(e){return e.type===14&&e.callee===lQ?e.arguments[1].returns:e}const Fwe=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/,mge={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:qI,isPreTag:qI,isIgnoreNewlineTag:qI,isCustomElement:qI,onError:dQ,onWarn:lge,comments:!1,prefixIdentifiers:!1};let pa=mge,OA=null,Tb="",Rf=null,Fi=null,Om="",Ib=-1,HS=-1,mQ=0,a5=!1,hQ=null;const ac=[],Hc=new xwe(ac,{onerr:Ab,ontext(e,t){MB(Zd(e,t),e,t)},ontextentity(e,t,n){MB(e,t,n)},oninterpolation(e,t){if(a5)return MB(Zd(e,t),e,t);let n=e+Hc.delimiterOpen.length,i=t-Hc.delimiterClose.length;for(;Lh(Tb.charCodeAt(n));)n++;for(;Lh(Tb.charCodeAt(i-1));)i--;let a=Zd(n,i);a.includes("&")&&(a=pa.decodeEntities(a,!1)),gQ({type:5,content:FB(a,!1,uu(n,i)),loc:uu(e,t)})},onopentagname(e,t){const n=Zd(e,t);Rf={type:1,tag:n,ns:pa.getNamespace(n,ac[0],pa.ns),tagType:0,props:[],children:[],loc:uu(e-1,t),codegenNode:void 0}},onopentagend(e){gge(e)},onclosetag(e,t){const n=Zd(e,t);if(!pa.isVoidTag(n)){let i=!1;for(let a=0;a<ac.length;a++)if(ac[a].tag.toLowerCase()===n.toLowerCase()){i=!0,a>0&&Ab(24,ac[0].loc.start.offset);for(let f=0;f<=a;f++){const d=ac.shift();NB(d,t,f<a)}break}i||Ab(23,vge(e,60))}},onselfclosingtag(e){const t=Rf.tag;Rf.isSelfClosing=!0,gge(e),ac[0]&&ac[0].tag===t&&NB(ac.shift(),e)},onattribname(e,t){Fi={type:6,name:Zd(e,t),nameLoc:uu(e,t),value:void 0,loc:uu(e)}},ondirname(e,t){const n=Zd(e,t),i=n==="."||n===":"?"bind":n==="@"?"on":n==="#"?"slot":n.slice(2);if(!a5&&i===""&&Ab(26,e),a5||i==="")Fi={type:6,name:n,nameLoc:uu(e,t),value:void 0,loc:uu(e)};else if(Fi={type:7,name:i,rawName:n,exp:void 0,arg:void 0,modifiers:n==="."?[Ur("prop")]:[],loc:uu(e)},i==="pre"){a5=Hc.inVPre=!0,hQ=Rf;const a=Rf.props;for(let l=0;l<a.length;l++)a[l].type===7&&(a[l]=Gwe(a[l]))}},ondirarg(e,t){if(e===t)return;const n=Zd(e,t);if(a5)Fi.name+=n,US(Fi.nameLoc,t);else{const i=n[0]!=="[";Fi.arg=FB(i?n:n.slice(1,-1),i,uu(e,t),i?3:0)}},ondirmodifier(e,t){const n=Zd(e,t);if(a5)Fi.name+="."+n,US(Fi.nameLoc,t);else if(Fi.name==="slot"){const i=Fi.arg;i&&(i.content+="."+n,US(i.loc,t))}else{const i=Ur(n,!0,uu(e,t));Fi.modifiers.push(i)}},onattribdata(e,t){Om+=Zd(e,t),Ib<0&&(Ib=e),HS=t},onattribentity(e,t,n){Om+=e,Ib<0&&(Ib=t),HS=n},onattribnameend(e){const t=Fi.loc.start.offset,n=Zd(t,e);Fi.type===7&&(Fi.rawName=n),Rf.props.some(i=>(i.type===7?i.rawName:i.name)===n)&&Ab(2,t)},onattribend(e,t){if(Rf&&Fi){if(US(Fi.loc,t),e!==0)if(Om.includes("&")&&(Om=pa.decodeEntities(Om,!0)),Fi.type===6)Fi.name==="class"&&(Om=_ge(Om).trim()),e===1&&!Om&&Ab(13,t),Fi.value={type:2,content:Om,loc:e===1?uu(Ib,HS):uu(Ib-1,HS+1)},Hc.inSFCRoot&&Rf.tag==="template"&&Fi.name==="lang"&&Om&&Om!=="html"&&Hc.enterRCDATA(OB("</template"),0);else{let n=0;Fi.exp=FB(Om,!1,uu(Ib,HS),0,n),Fi.name==="for"&&(Fi.forParseResult=Bwe(Fi.exp));let i=-1;Fi.name==="bind"&&(i=Fi.modifiers.findIndex(a=>a.content==="sync"))>-1&&IA("COMPILER_V_BIND_SYNC",pa,Fi.loc,Fi.rawName)&&(Fi.name="model",Fi.modifiers.splice(i,1))}(Fi.type!==7||Fi.name!=="pre")&&Rf.props.push(Fi)}Om="",Ib=HS=-1},oncomment(e,t){pa.comments&&gQ({type:3,content:Zd(e,t),loc:uu(e-4,t+3)})},onend(){const e=Tb.length;for(let t=0;t<ac.length;t++)NB(ac[t],e-1),Ab(24,ac[t].loc.start.offset)},oncdata(e,t){ac[0].ns!==0?MB(Zd(e,t),e,t):Ab(1,e-9)},onprocessinginstruction(e){(ac[0]?ac[0].ns:pa.ns)===0&&Ab(21,e-1)}}),hge=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,$we=/^\(|\)$/g;function Bwe(e){const t=e.loc,n=e.content,i=n.match(Fwe);if(!i)return;const[,a,l]=i,f=(k,T,O=!1)=>{const P=t.start.offset+T,B=P+k.length;return FB(k,!1,uu(P,B),0,O?1:0)},d={source:f(l.trim(),n.indexOf(l,a.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let h=a.trim().replace($we,"").trim();const b=a.indexOf(h),S=h.match(hge);if(S){h=h.replace(hge,"").trim();const k=S[1].trim();let T;if(k&&(T=n.indexOf(k,b+h.length),d.key=f(k,T,!0)),S[2]){const O=S[2].trim();O&&(d.index=f(O,n.indexOf(O,d.key?T+k.length:b+h.length),!0))}}return h&&(d.value=f(h,b,!0)),d}function Zd(e,t){return Tb.slice(e,t)}function gge(e){Hc.inSFCRoot&&(Rf.innerLoc=uu(e+1,e+1)),gQ(Rf);const{tag:t,ns:n}=Rf;n===0&&pa.isPreTag(t)&&mQ++,pa.isVoidTag(t)?NB(Rf,e):(ac.unshift(Rf),(n===1||n===2)&&(Hc.inXML=!0)),Rf=null}function MB(e,t,n){{const l=ac[0]&&ac[0].tag;l!=="script"&&l!=="style"&&e.includes("&")&&(e=pa.decodeEntities(e,!1))}const i=ac[0]||OA,a=i.children[i.children.length-1];a&&a.type===2?(a.content+=e,US(a.loc,n)):i.children.push({type:2,content:e,loc:uu(t,n)})}function NB(e,t,n=!1){n?US(e.loc,vge(t,60)):US(e.loc,Vwe(t,62)+1),Hc.inSFCRoot&&(e.children.length?e.innerLoc.end=wi({},e.children[e.children.length-1].loc.end):e.innerLoc.end=wi({},e.innerLoc.start),e.innerLoc.source=Zd(e.innerLoc.start.offset,e.innerLoc.end.offset));const{tag:i,ns:a,children:l}=e;if(a5||(i==="slot"?e.tagType=2:bge(e)?e.tagType=3:Uwe(e)&&(e.tagType=1)),Hc.inRCDATA||(e.children=yge(l)),a===0&&pa.isIgnoreNewlineTag(i)){const f=l[0];f&&f.type===2&&(f.content=f.content.replace(/^\r?\n/,""))}a===0&&pa.isPreTag(i)&&mQ--,hQ===e&&(a5=Hc.inVPre=!1,hQ=null),Hc.inXML&&(ac[0]?ac[0].ns:pa.ns)===0&&(Hc.inXML=!1);{const f=e.props;if(!Hc.inSFCRoot&&BS("COMPILER_NATIVE_TEMPLATE",pa)&&e.tag==="template"&&!bge(e)){const h=ac[0]||OA,b=h.children.indexOf(e);h.children.splice(b,1,...e.children)}const d=f.find(h=>h.type===6&&h.name==="inline-template");d&&IA("COMPILER_INLINE_TEMPLATE",pa,d.loc)&&e.children.length&&(d.value={type:2,content:Zd(e.children[0].loc.start.offset,e.children[e.children.length-1].loc.end.offset),loc:d.loc})}}function Vwe(e,t){let n=e;for(;Tb.charCodeAt(n)!==t&&n<Tb.length-1;)n++;return n}function vge(e,t){let n=e;for(;Tb.charCodeAt(n)!==t&&n>=0;)n--;return n}const Hwe=new Set(["if","else","else-if","for","slot"]);function bge({tag:e,props:t}){if(e==="template"){for(let n=0;n<t.length;n++)if(t[n].type===7&&Hwe.has(t[n].name))return!0}return!1}function Uwe({tag:e,props:t}){if(pa.isCustomElement(e))return!1;if(e==="component"||zwe(e.charCodeAt(0))||cge(e)||pa.isBuiltInComponent&&pa.isBuiltInComponent(e)||pa.isNativeTag&&!pa.isNativeTag(e))return!0;for(let n=0;n<t.length;n++){const i=t[n];if(i.type===6){if(i.name==="is"&&i.value){if(i.value.content.startsWith("vue:"))return!0;if(IA("COMPILER_IS_ON_ELEMENT",pa,i.loc))return!0}}else if(i.name==="bind"&&VS(i.arg,"is")&&IA("COMPILER_IS_ON_ELEMENT",pa,i.loc))return!0}return!1}function zwe(e){return e>64&&e<91}const Wwe=/\r\n/g;function yge(e,t){const n=pa.whitespace!=="preserve";let i=!1;for(let a=0;a<e.length;a++){const l=e[a];if(l.type===2)if(mQ)l.content=l.content.replace(Wwe,"\n");else if(jwe(l.content)){const f=e[a-1]&&e[a-1].type,d=e[a+1]&&e[a+1].type;!f||!d||n&&(f===3&&(d===3||d===1)||f===1&&(d===3||d===1&&Zwe(l.content)))?(i=!0,e[a]=null):l.content=" "}else n&&(l.content=_ge(l.content))}return i?e.filter(Boolean):e}function jwe(e){for(let t=0;t<e.length;t++)if(!Lh(e.charCodeAt(t)))return!1;return!0}function Zwe(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n===10||n===13)return!0}return!1}function _ge(e){let t="",n=!1;for(let i=0;i<e.length;i++)Lh(e.charCodeAt(i))?n||(t+=" ",n=!0):(t+=e[i],n=!1);return t}function gQ(e){(ac[0]||OA).children.push(e)}function uu(e,t){return{start:Hc.getPos(e),end:t==null?t:Hc.getPos(t),source:t==null?t:Zd(e,t)}}function qwe(e){return uu(e.start.offset,e.end.offset)}function US(e,t){e.end=Hc.getPos(t),e.source=Zd(e.start.offset,t)}function Gwe(e){const t={type:6,name:e.rawName,nameLoc:uu(e.loc.start.offset,e.loc.start.offset+e.rawName.length),value:void 0,loc:e.loc};if(e.exp){const n=e.exp.loc;n.end.offset<e.loc.end.offset&&(n.start.offset--,n.start.column--,n.end.offset++,n.end.column++),t.value={type:2,content:e.exp.content,loc:n}}return t}function FB(e,t=!1,n,i=0,a=0){return Ur(e,t,n,i)}function Ab(e,t,n){pa.onError(ic(e,uu(t,t)))}function Kwe(){Hc.reset(),Rf=null,Fi=null,Om="",Ib=-1,HS=-1,ac.length=0}function Ywe(e,t){if(Kwe(),Tb=e,pa=wi({},mge),t){let a;for(a in t)t[a]!=null&&(pa[a]=t[a])}Hc.mode=pa.parseMode==="html"?1:pa.parseMode==="sfc"?2:0,Hc.inXML=pa.ns===1||pa.ns===2;const n=t&&t.delimiters;n&&(Hc.delimiterOpen=OB(n[0]),Hc.delimiterClose=OB(n[1]));const i=OA=wwe([],e);return Hc.parse(Tb),i.loc=uu(0,e.length),i.children=yge(i.children),OA=null,i}function Xwe(e,t){$B(e,void 0,t,Sge(e,e.children[0]))}function Sge(e,t){const{children:n}=e;return n.length===1&&t.type===1&&!LB(t)}function $B(e,t,n,i=!1,a=!1){const{children:l}=e,f=[];for(let S=0;S<l.length;S++){const k=l[S];if(k.type===1&&k.tagType===0){const T=i?0:Ph(k,n);if(T>0){if(T>=2){k.codegenNode.patchFlag=-1,f.push(k);continue}}else{const O=k.codegenNode;if(O.type===13){const P=O.patchFlag;if((P===void 0||P===512||P===1)&&wge(k,n)>=2){const B=Ege(k);B&&(O.props=n.hoist(B))}O.dynamicProps&&(O.dynamicProps=n.hoist(O.dynamicProps))}}}else if(k.type===12&&(i?0:Ph(k,n))>=2){f.push(k);continue}if(k.type===1){const T=k.tagType===1;T&&n.scopes.vSlot++,$B(k,e,n,!1,a),T&&n.scopes.vSlot--}else if(k.type===11)$B(k,e,n,k.children.length===1,!0);else if(k.type===9)for(let T=0;T<k.branches.length;T++)$B(k.branches[T],e,n,k.branches[T].children.length===1,a)}let d=!1;if(f.length===l.length&&e.type===1){if(e.tagType===0&&e.codegenNode&&e.codegenNode.type===13&&Ks(e.codegenNode.children))e.codegenNode.children=h($S(e.codegenNode.children)),d=!0;else if(e.tagType===1&&e.codegenNode&&e.codegenNode.type===13&&e.codegenNode.children&&!Ks(e.codegenNode.children)&&e.codegenNode.children.type===15){const S=b(e.codegenNode,"default");S&&(S.returns=h($S(S.returns)),d=!0)}else if(e.tagType===3&&t&&t.type===1&&t.tagType===1&&t.codegenNode&&t.codegenNode.type===13&&t.codegenNode.children&&!Ks(t.codegenNode.children)&&t.codegenNode.children.type===15){const S=L1(e,"slot",!0),k=S&&S.arg&&b(t.codegenNode,S.arg);k&&(k.returns=h($S(k.returns)),d=!0)}}if(!d)for(const S of f)S.codegenNode=n.cache(S.codegenNode);function h(S){const k=n.cache(S);return a&&n.hmr&&(k.needArraySpread=!0),k}function b(S,k){if(S.children&&!Ks(S.children)&&S.children.type===15){const T=S.children.properties.find(O=>O.key===k||O.key.content===k);return T&&T.value}}f.length&&n.transformHoist&&n.transformHoist(l,n,e)}function Ph(e,t){const{constantCache:n}=t;switch(e.type){case 1:if(e.tagType!==0)return 0;const i=n.get(e);if(i!==void 0)return i;const a=e.codegenNode;if(a.type!==13||a.isBlock&&e.tag!=="svg"&&e.tag!=="foreignObject"&&e.tag!=="math")return 0;if(a.patchFlag===void 0){let f=3;const d=wge(e,t);if(d===0)return n.set(e,0),0;d<f&&(f=d);for(let h=0;h<e.children.length;h++){const b=Ph(e.children[h],t);if(b===0)return n.set(e,0),0;b<f&&(f=b)}if(f>1)for(let h=0;h<e.props.length;h++){const b=e.props[h];if(b.type===7&&b.name==="bind"&&b.exp){const S=Ph(b.exp,t);if(S===0)return n.set(e,0),0;S<f&&(f=S)}}if(a.isBlock){for(let h=0;h<e.props.length;h++)if(e.props[h].type===7)return n.set(e,0),0;t.removeHelper(FS),t.removeHelper(Cw(t.inSSR,a.isComponent)),a.isBlock=!1,t.helper(Sw(t.inSSR,a.isComponent))}return n.set(e,f),f}else return n.set(e,0),0;case 2:case 3:return 3;case 9:case 11:case 10:return 0;case 5:case 12:return Ph(e.content,t);case 4:return e.constType;case 8:let l=3;for(let f=0;f<e.children.length;f++){const d=e.children[f];if(kr(d)||Em(d))continue;const h=Ph(d,t);if(h===0)return 0;h<l&&(l=h)}return l;case 20:return 2;default:return 0}}const Jwe=new Set([nQ,sQ,kA,xA]);function Cge(e,t){if(e.type===14&&!kr(e.callee)&&Jwe.has(e.callee)){const n=e.arguments[0];if(n.type===4)return Ph(n,t);if(n.type===14)return Cge(n,t)}return 0}function wge(e,t){let n=3;const i=Ege(e);if(i&&i.type===15){const{properties:a}=i;for(let l=0;l<a.length;l++){const{key:f,value:d}=a[l],h=Ph(f,t);if(h===0)return h;h<n&&(n=h);let b;if(d.type===4?b=Ph(d,t):d.type===14?b=Cge(d,t):b=0,b===0)return b;b<n&&(n=b)}}return n}function Ege(e){const t=e.codegenNode;if(t.type===13)return t.props}function Qwe(e,{filename:t="",prefixIdentifiers:n=!1,hoistStatic:i=!1,hmr:a=!1,cacheHandlers:l=!1,nodeTransforms:f=[],directiveTransforms:d={},transformHoist:h=null,isBuiltInComponent:b=jd,isCustomElement:S=jd,expressionPlugins:k=[],scopeId:T=null,slotted:O=!0,ssr:P=!1,inSSR:B=!1,ssrCssVars:W="",bindingMetadata:Z=Ir,inline:Y=!1,isTS:z=!1,onError:q=dQ,onWarn:ne=lge,compatConfig:ue}){const J=t.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),ce={filename:t,selfName:J&&W3(Sl(J[1])),prefixIdentifiers:n,hoistStatic:i,hmr:a,cacheHandlers:l,nodeTransforms:f,directiveTransforms:d,transformHoist:h,isBuiltInComponent:b,isCustomElement:S,expressionPlugins:k,scopeId:T,slotted:O,ssr:P,inSSR:B,ssrCssVars:W,bindingMetadata:Z,inline:Y,isTS:z,onError:q,onWarn:ne,compatConfig:ue,root:e,helpers:new Map,components:new Set,directives:new Set,hoists:[],imports:[],cached:[],constantCache:new WeakMap,temps:0,identifiers:Object.create(null),scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},parent:null,grandParent:null,currentNode:e,childIndex:0,inVOnce:!1,helper(ge){const de=ce.helpers.get(ge)||0;return ce.helpers.set(ge,de+1),ge},removeHelper(ge){const de=ce.helpers.get(ge);if(de){const he=de-1;he?ce.helpers.set(ge,he):ce.helpers.delete(ge)}},helperString(ge){return"_".concat(yw[ce.helper(ge)])},replaceNode(ge){ce.parent.children[ce.childIndex]=ce.currentNode=ge},removeNode(ge){const de=ce.parent.children,he=ge?de.indexOf(ge):ce.currentNode?ce.childIndex:-1;!ge||ge===ce.currentNode?(ce.currentNode=null,ce.onNodeRemoved()):ce.childIndex>he&&(ce.childIndex--,ce.onNodeRemoved()),ce.parent.children.splice(he,1)},onNodeRemoved:jd,addIdentifiers(ge){},removeIdentifiers(ge){},hoist(ge){kr(ge)&&(ge=Ur(ge)),ce.hoists.push(ge);const de=Ur("_hoisted_".concat(ce.hoists.length),!1,ge.loc,2);return de.hoisted=ge,de},cache(ge,de=!1,he=!1){const ie=Ewe(ce.cached.length,ge,de,he);return ce.cached.push(ie),ie}};return ce.filters=new Set,ce}function e9e(e,t){const n=Qwe(e,t);BB(e,n),t.hoistStatic&&Xwe(e,n),t.ssr||t9e(e,n),e.helpers=new Set([...n.helpers.keys()]),e.components=[...n.components],e.directives=[...n.directives],e.imports=n.imports,e.hoists=n.hoists,e.temps=n.temps,e.cached=n.cached,e.transformed=!0,e.filters=[...n.filters]}function t9e(e,t){const{helper:n}=t,{children:i}=e;if(i.length===1){const a=i[0];if(Sge(e,a)&&a.codegenNode){const l=a.codegenNode;l.type===13&&uQ(l,t),e.codegenNode=l}else e.codegenNode=a}else if(i.length>1){let a=64;e.codegenNode=TA(t,n(CA),void 0,e.children,a,void 0,void 0,!0,void 0,!1)}}function n9e(e,t){let n=0;const i=()=>{n--};for(;n<e.children.length;n++){const a=e.children[n];kr(a)||(t.grandParent=t.parent,t.parent=e,t.childIndex=n,t.onNodeRemoved=i,BB(a,t))}}function BB(e,t){t.currentNode=e;const{nodeTransforms:n}=t,i=[];for(let l=0;l<n.length;l++){const f=n[l](e,t);if(f&&(Ks(f)?i.push(...f):i.push(f)),t.currentNode)e=t.currentNode;else return}switch(e.type){case 3:t.ssr||t.helper(EA);break;case 5:t.ssr||t.helper(TB);break;case 9:for(let l=0;l<e.branches.length;l++)BB(e.branches[l],t);break;case 10:case 11:case 1:case 0:n9e(e,t);break}t.currentNode=e;let a=i.length;for(;a--;)i[a]()}function kge(e,t){const n=kr(e)?i=>i===e:i=>e.test(i);return(i,a)=>{if(i.type===1){const{props:l}=i;if(i.tagType===3&&l.some(Pwe))return;const f=[];for(let d=0;d<l.length;d++){const h=l[d];if(h.type===7&&n(h.name)){l.splice(d,1),d--;const b=t(i,h,a);b&&f.push(b)}}return f}}}const VB="/*@__PURE__*/",xge=e=>"".concat(yw[e],": _").concat(yw[e]);function s9e(e,{mode:t="function",prefixIdentifiers:n=t==="module",sourceMap:i=!1,filename:a="template.vue.html",scopeId:l=null,optimizeImports:f=!1,runtimeGlobalName:d="Vue",runtimeModuleName:h="vue",ssrRuntimeModuleName:b="vue/server-renderer",ssr:S=!1,isTS:k=!1,inSSR:T=!1}){const O={mode:t,prefixIdentifiers:n,sourceMap:i,filename:a,scopeId:l,optimizeImports:f,runtimeGlobalName:d,runtimeModuleName:h,ssrRuntimeModuleName:b,ssr:S,isTS:k,inSSR:T,source:e.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper(B){return"_".concat(yw[B])},push(B,W=-2,Z){O.code+=B},indent(){P(++O.indentLevel)},deindent(B=!1){B?--O.indentLevel:P(--O.indentLevel)},newline(){P(O.indentLevel)}};function P(B){O.push("\n"+" ".repeat(B),0)}return O}function o9e(e,t={}){const n=s9e(e,t);t.onContextCreated&&t.onContextCreated(n);const{mode:i,push:a,prefixIdentifiers:l,indent:f,deindent:d,newline:h,scopeId:b,ssr:S}=n,k=Array.from(e.helpers),T=k.length>0,O=!l&&i!=="module";r9e(e,n);const B=S?"ssrRender":"render",Z=(S?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ");if(a("function ".concat(B,"(").concat(Z,") {")),f(),O&&(a("with (_ctx) {"),f(),T&&(a("const { ".concat(k.map(xge).join(", ")," } = _Vue\n"),-1),h())),e.components.length&&(vQ(e.components,"component",n),(e.directives.length||e.temps>0)&&h()),e.directives.length&&(vQ(e.directives,"directive",n),e.temps>0&&h()),e.filters&&e.filters.length&&(h(),vQ(e.filters,"filter",n),h()),e.temps>0){a("let ");for(let Y=0;Y<e.temps;Y++)a("".concat(Y>0?", ":"","_temp").concat(Y))}return(e.components.length||e.directives.length||e.temps)&&(a("\n",0),h()),S||a("return "),e.codegenNode?Df(e.codegenNode,n):a("null"),O&&(d(),a("}")),d(),a("}"),{ast:e,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}function r9e(e,t){const{ssr:n,prefixIdentifiers:i,push:a,newline:l,runtimeModuleName:f,runtimeGlobalName:d,ssrRuntimeModuleName:h}=t,b=d,S=Array.from(e.helpers);if(S.length>0&&(a("const _Vue = ".concat(b,"\n"),-1),e.hoists.length)){const k=[qJ,GJ,EA,KJ,ege].filter(T=>S.includes(T)).map(xge).join(", ");a("const { ".concat(k," } = _Vue\n"),-1)}i9e(e.hoists,t),l(),a("return ")}function vQ(e,t,{helper:n,push:i,newline:a,isTS:l}){const f=n(t==="filter"?QJ:t==="component"?YJ:JJ);for(let d=0;d<e.length;d++){let h=e[d];const b=h.endsWith("__self");b&&(h=h.slice(0,-6)),i("const ".concat(AA(h,t)," = ").concat(f,"(").concat(JSON.stringify(h)).concat(b?", true":"",")").concat(l?"!":"")),d<e.length-1&&a()}}function i9e(e,t){if(!e.length)return;t.pure=!0;const{push:n,newline:i}=t;i();for(let a=0;a<e.length;a++){const l=e[a];l&&(n("const _hoisted_".concat(a+1," = ")),Df(l,t),i())}t.pure=!1}function bQ(e,t){const n=e.length>3||!1;t.push("["),n&&t.indent(),RA(e,t,n),n&&t.deindent(),t.push("]")}function RA(e,t,n=!1,i=!0){const{push:a,newline:l}=t;for(let f=0;f<e.length;f++){const d=e[f];kr(d)?a(d,-3):Ks(d)?bQ(d,t):Df(d,t),f<e.length-1&&(n?(i&&a(","),l()):i&&a(", "))}}function Df(e,t){if(kr(e)){t.push(e,-3);return}if(Em(e)){t.push(t.helper(e));return}switch(e.type){case 1:case 9:case 11:Df(e.codegenNode,t);break;case 2:a9e(e,t);break;case 4:Tge(e,t);break;case 5:l9e(e,t);break;case 12:Df(e.codegenNode,t);break;case 8:Ige(e,t);break;case 3:u9e(e,t);break;case 13:d9e(e,t);break;case 14:p9e(e,t);break;case 15:m9e(e,t);break;case 17:h9e(e,t);break;case 18:g9e(e,t);break;case 19:v9e(e,t);break;case 20:b9e(e,t);break;case 21:RA(e.body,t,!0,!1);break}}function a9e(e,t){t.push(JSON.stringify(e.content),-3,e)}function Tge(e,t){const{content:n,isStatic:i}=e;t.push(i?JSON.stringify(n):n,-3,e)}function l9e(e,t){const{push:n,helper:i,pure:a}=t;a&&n(VB),n("".concat(i(TB),"(")),Df(e.content,t),n(")")}function Ige(e,t){for(let n=0;n<e.children.length;n++){const i=e.children[n];kr(i)?t.push(i,-3):Df(i,t)}}function c9e(e,t){const{push:n}=t;if(e.type===8)n("["),Ige(e,t),n("]");else if(e.isStatic){const i=fQ(e.content)?e.content:JSON.stringify(e.content);n(i,-2,e)}else n("[".concat(e.content,"]"),-3,e)}function u9e(e,t){const{push:n,helper:i,pure:a}=t;a&&n(VB),n("".concat(i(EA),"(").concat(JSON.stringify(e.content),")"),-3,e)}function d9e(e,t){const{push:n,helper:i,pure:a}=t,{tag:l,props:f,children:d,patchFlag:h,dynamicProps:b,directives:S,isBlock:k,disableTracking:T,isComponent:O}=e;let P;h&&(P=String(h)),S&&n(i(eQ)+"("),k&&n("(".concat(i(FS),"(").concat(T?"true":"","), ")),a&&n(VB);const B=k?Cw(t.inSSR,O):Sw(t.inSSR,O);n(i(B)+"(",-2,e),RA(f9e([l,f,d,P,b]),t),n(")"),k&&n(")"),S&&(n(", "),Df(S,t),n(")"))}function f9e(e){let t=e.length;for(;t--&&e[t]==null;);return e.slice(0,t+1).map(n=>n||"null")}function p9e(e,t){const{push:n,helper:i,pure:a}=t,l=kr(e.callee)?e.callee:i(e.callee);a&&n(VB),n(l+"(",-2,e),RA(e.arguments,t),n(")")}function m9e(e,t){const{push:n,indent:i,deindent:a,newline:l}=t,{properties:f}=e;if(!f.length){n("{}",-2,e);return}const d=f.length>1||!1;n(d?"{":"{ "),d&&i();for(let h=0;h<f.length;h++){const{key:b,value:S}=f[h];c9e(b,t),n(": "),Df(S,t),h<f.length-1&&(n(","),l())}d&&a(),n(d?"}":" }")}function h9e(e,t){bQ(e.elements,t)}function g9e(e,t){const{push:n,indent:i,deindent:a}=t,{params:l,returns:f,body:d,newline:h,isSlot:b}=e;b&&n("_".concat(yw[aQ],"(")),n("(",-2,e),Ks(l)?RA(l,t):l&&Df(l,t),n(") => "),(h||d)&&(n("{"),i()),f?(h&&n("return "),Ks(f)?bQ(f,t):Df(f,t)):d&&Df(d,t),(h||d)&&(a(),n("}")),b&&(e.isNonScopedSlot&&n(", undefined, true"),n(")"))}function v9e(e,t){const{test:n,consequent:i,alternate:a,newline:l}=e,{push:f,indent:d,deindent:h,newline:b}=t;if(n.type===4){const k=!fQ(n.content);k&&f("("),Tge(n,t),k&&f(")")}else f("("),Df(n,t),f(")");l&&d(),t.indentLevel++,l||f(" "),f("? "),Df(i,t),t.indentLevel--,l&&b(),l||f(" "),f(": ");const S=a.type===19;S||t.indentLevel++,Df(a,t),S||t.indentLevel--,l&&h(!0)}function b9e(e,t){const{push:n,helper:i,indent:a,deindent:l,newline:f}=t,{needPauseTracking:d,needArraySpread:h}=e;h&&n("[...("),n("_cache[".concat(e.index,"] || (")),d&&(a(),n("".concat(i(AB),"(-1")),e.inVOnce&&n(", true"),n("),"),f(),n("(")),n("_cache[".concat(e.index,"] = ")),Df(e.value,t),d&&(n(").cacheIndex = ".concat(e.index,",")),f(),n("".concat(i(AB),"(1),")),f(),n("_cache[".concat(e.index,"]")),l()),n(")"),h&&n(")]")}new RegExp("\\b"+"arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b")+"\\b");const y9e=kge(/^(if|else|else-if)$/,(e,t,n)=>_9e(e,t,n,(i,a,l)=>{const f=n.parent.children;let d=f.indexOf(i),h=0;for(;d-->=0;){const b=f[d];b&&b.type===9&&(h+=b.branches.length)}return()=>{if(l)i.codegenNode=Oge(a,h,n);else{const b=S9e(i.codegenNode);b.alternate=Oge(a,h+i.branches.length-1,n)}}}));function _9e(e,t,n,i){if(t.name!=="else"&&(!t.exp||!t.exp.content.trim())){const a=t.exp?t.exp.loc:e.loc;n.onError(ic(28,t.loc)),t.exp=Ur("true",!1,a)}if(t.name==="if"){const a=Age(e,t),l={type:9,loc:qwe(e.loc),branches:[a]};if(n.replaceNode(l),i)return i(l,a,!0)}else{const a=n.parent.children;let l=a.indexOf(e);for(;l-->=-1;){const f=a[l];if(f&&f.type===3){n.removeNode(f);continue}if(f&&f.type===2&&!f.content.trim().length){n.removeNode(f);continue}if(f&&f.type===9){t.name==="else-if"&&f.branches[f.branches.length-1].condition===void 0&&n.onError(ic(30,e.loc)),n.removeNode();const d=Age(e,t);f.branches.push(d);const h=i&&i(f,d,!1);BB(d,n),h&&h(),n.currentNode=null}else n.onError(ic(30,e.loc));break}}}function Age(e,t){const n=e.tagType===3;return{type:10,loc:e.loc,condition:t.name==="else"?void 0:t.exp,children:n&&!L1(e,"for")?e.children:[e],userKey:RB(e,"key"),isTemplateIf:n}}function Oge(e,t,n){return e.condition?cQ(e.condition,Rge(e,t,n),od(n.helper(EA),['""',"true"])):Rge(e,t,n)}function Rge(e,t,n){const{helper:i}=n,a=cu("key",Ur("".concat(t),!1,Dh,2)),{children:l}=e,f=l[0];if(l.length!==1||f.type!==1)if(l.length===1&&f.type===11){const h=f.codegenNode;return PB(h,a,n),h}else return TA(n,i(CA),D1([a]),l,64,void 0,void 0,!0,!1,!1,e.loc);else{const h=f.codegenNode,b=Nwe(h);return b.type===13&&uQ(b,n),PB(b,a,n),h}}function S9e(e){for(;;)if(e.type===19)if(e.alternate.type===19)e=e.alternate;else return e;else e.type===20&&(e=e.value)}const C9e=(e,t,n)=>{const{modifiers:i,loc:a}=e,l=e.arg;let{exp:f}=e;if(f&&f.type===4&&!f.content.trim()&&(f=void 0),!f){if(l.type!==4||!l.isStatic)return n.onError(ic(52,l.loc)),{props:[cu(l,Ur("",!0,a))]};Dge(e),f=e.exp}return l.type!==4?(l.children.unshift("("),l.children.push(') || ""')):l.isStatic||(l.content="".concat(l.content,' || ""')),i.some(d=>d.content==="camel")&&(l.type===4?l.isStatic?l.content=Sl(l.content):l.content="".concat(n.helperString(rQ),"(").concat(l.content,")"):(l.children.unshift("".concat(n.helperString(rQ),"(")),l.children.push(")"))),n.inSSR||(i.some(d=>d.content==="prop")&&Lge(l,"."),i.some(d=>d.content==="attr")&&Lge(l,"^")),{props:[cu(l,f)]}},Dge=(e,t)=>{const n=e.arg,i=Sl(n.content);e.exp=Ur(i,!1,n.loc)},Lge=(e,t)=>{e.type===4?e.isStatic?e.content=t+e.content:e.content="`".concat(t,"${").concat(e.content,"}`"):(e.children.unshift("'".concat(t,"' + (")),e.children.push(")"))},w9e=kge("for",(e,t,n)=>{const{helper:i,removeHelper:a}=n;return E9e(e,t,n,l=>{const f=od(i(tQ),[l.source]),d=DB(e),h=L1(e,"memo"),b=RB(e,"key",!1,!0);b&&b.type===7&&!b.exp&&Dge(b);let k=b&&(b.type===6?b.value?Ur(b.value.content,!0):void 0:b.exp);const T=b&&k?cu("key",k):null,O=l.source.type===4&&l.source.constType>0,P=O?64:b?128:256;return l.codegenNode=TA(n,i(CA),void 0,f,P,void 0,void 0,!0,!O,!1,e.loc),()=>{let B;const{children:W}=l,Z=W.length!==1||W[0].type!==1,Y=LB(e)?e:d&&e.children.length===1&&LB(e.children[0])?e.children[0]:null;if(Y?(B=Y.codegenNode,d&&T&&PB(B,T,n)):Z?B=TA(n,i(CA),T?D1([T]):void 0,e.children,64,void 0,void 0,!0,void 0,!1):(B=W[0].codegenNode,d&&T&&PB(B,T,n),B.isBlock!==!O&&(B.isBlock?(a(FS),a(Cw(n.inSSR,B.isComponent))):a(Sw(n.inSSR,B.isComponent))),B.isBlock=!O,B.isBlock?(i(FS),i(Cw(n.inSSR,B.isComponent))):i(Sw(n.inSSR,B.isComponent))),h){const z=_w(yQ(l.parseResult,[Ur("_cached")]));z.body=kwe([Gg(["const _memo = (",h.exp,")"]),Gg(["if (_cached",...k?[" && _cached.key === ",k]:[]," && ".concat(n.helperString(sge),"(_cached, _memo)) return _cached")]),Gg(["const _item = ",B]),Ur("_item.memo = _memo"),Ur("return _item")]),f.arguments.push(z,Ur("_cache"),Ur(String(n.cached.length))),n.cached.push(null)}else f.arguments.push(_w(yQ(l.parseResult),B,!0))}})});function E9e(e,t,n,i){if(!t.exp){n.onError(ic(31,t.loc));return}const a=t.forParseResult;if(!a){n.onError(ic(32,t.loc));return}Pge(a);const{addIdentifiers:l,removeIdentifiers:f,scopes:d}=n,{source:h,value:b,key:S,index:k}=a,T={type:11,loc:t.loc,source:h,valueAlias:b,keyAlias:S,objectIndexAlias:k,parseResult:a,children:DB(e)?e.children:[e]};n.replaceNode(T),d.vFor++;const O=i&&i(T);return()=>{d.vFor--,O&&O()}}function Pge(e,t){e.finalized||(e.finalized=!0)}function yQ({value:e,key:t,index:n},i=[]){return k9e([e,t,n,...i])}function k9e(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map((n,i)=>n||Ur("_".repeat(i+1),!1))}const Mge=Ur("undefined",!1),x9e=(e,t)=>{if(e.type===1&&(e.tagType===1||e.tagType===3)){const n=L1(e,"slot");if(n)return n.exp,t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},T9e=(e,t,n,i)=>_w(e,n,!1,!0,n.length?n[0].loc:i);function I9e(e,t,n=T9e){t.helper(aQ);const{children:i,loc:a}=e,l=[],f=[];let d=t.scopes.vSlot>0||t.scopes.vFor>0;const h=L1(e,"slot",!0);if(h){const{arg:W,exp:Z}=h;W&&!Am(W)&&(d=!0),l.push(cu(W||Ur("default",!0),n(Z,void 0,i,a)))}let b=!1,S=!1;const k=[],T=new Set;let O=0;for(let W=0;W<i.length;W++){const Z=i[W];let Y;if(!DB(Z)||!(Y=L1(Z,"slot",!0))){Z.type!==3&&k.push(Z);continue}if(h){t.onError(ic(37,Y.loc));break}b=!0;const{children:z,loc:q}=Z,{arg:ne=Ur("default",!0),exp:ue,loc:J}=Y;let ce;Am(ne)?ce=ne?ne.content:"default":d=!0;const ge=L1(Z,"for"),de=n(ue,ge,z,q);let he,ie;if(he=L1(Z,"if"))d=!0,f.push(cQ(he.exp,HB(ne,de,O++),Mge));else if(ie=L1(Z,/^else(-if)?$/,!0)){let Be=W,$e;for(;Be--&&($e=i[Be],$e.type===3););if($e&&DB($e)&&L1($e,/^(else-)?if$/)){let Ue=f[f.length-1];for(;Ue.alternate.type===19;)Ue=Ue.alternate;Ue.alternate=ie.exp?cQ(ie.exp,HB(ne,de,O++),Mge):HB(ne,de,O++)}else t.onError(ic(30,ie.loc))}else if(ge){d=!0;const Be=ge.forParseResult;Be?(Pge(Be),f.push(od(t.helper(tQ),[Be.source,_w(yQ(Be),HB(ne,de),!0)]))):t.onError(ic(32,ge.loc))}else{if(ce){if(T.has(ce)){t.onError(ic(38,J));continue}T.add(ce),ce==="default"&&(S=!0)}l.push(cu(ne,de))}}if(!h){const W=(Z,Y)=>{const z=n(Z,void 0,Y,a);return t.compatConfig&&(z.isNonScopedSlot=!0),cu("default",z)};b?k.length&&k.some(Z=>Nge(Z))&&(S?t.onError(ic(39,k[0].loc)):l.push(W(void 0,k))):l.push(W(void 0,i))}const P=d?2:UB(e.children)?3:1;let B=D1(l.concat(cu("_",Ur(P+"",!1))),a);return f.length&&(B=od(t.helper(nge),[B,$S(f)])),{slots:B,hasDynamicSlots:d}}function HB(e,t,n){const i=[cu("name",e),cu("fn",t)];return n!=null&&i.push(cu("key",Ur(String(n),!0))),D1(i)}function UB(e){for(let t=0;t<e.length;t++){const n=e[t];switch(n.type){case 1:if(n.tagType===2||UB(n.children))return!0;break;case 9:if(UB(n.branches))return!0;break;case 10:case 11:if(UB(n.children))return!0;break}}return!1}function Nge(e){return e.type!==2&&e.type!==12?!0:e.type===2?!!e.content.trim():Nge(e.content)}const Fge=new WeakMap,A9e=(e,t)=>function(){if(e=t.currentNode,!(e.type===1&&(e.tagType===0||e.tagType===1)))return;const{tag:i,props:a}=e,l=e.tagType===1;let f=l?O9e(e,t):'"'.concat(i,'"');const d=Fa(f)&&f.callee===XJ;let h,b,S=0,k,T,O,P=d||f===wA||f===ZJ||!l&&(i==="svg"||i==="foreignObject"||i==="math");if(a.length>0){const B=$ge(e,t,void 0,l,d);h=B.props,S=B.patchFlag,T=B.dynamicPropNames;const W=B.directives;O=W&&W.length?$S(W.map(Z=>D9e(Z,t))):void 0,B.shouldUseBlock&&(P=!0)}if(e.children.length>0)if(f===xB&&(P=!0,S|=1024),l&&f!==wA&&f!==xB){const{slots:W,hasDynamicSlots:Z}=I9e(e,t);b=W,Z&&(S|=1024)}else if(e.children.length===1&&f!==wA){const W=e.children[0],Z=W.type,Y=Z===5||Z===8;Y&&Ph(W,t)===0&&(S|=1),Y||Z===2?b=W:b=e.children}else b=e.children;T&&T.length&&(k=L9e(T)),e.codegenNode=TA(t,f,h,b,S===0?void 0:S,k,O,!!P,!1,l,e.loc)};function O9e(e,t,n=!1){let{tag:i}=e;const a=_Q(i),l=RB(e,"is",!1,!0);if(l)if(a||BS("COMPILER_IS_ON_ELEMENT",t)){let d;if(l.type===6?d=l.value&&Ur(l.value.content,!0):(d=l.exp,d||(d=Ur("is",!1,l.arg.loc))),d)return od(t.helper(XJ),[d])}else l.type===6&&l.value.content.startsWith("vue:")&&(i=l.value.content.slice(4));const f=cge(i)||t.isBuiltInComponent(i);return f?(n||t.helper(f),f):(t.helper(YJ),t.components.add(i),AA(i,"component"))}function $ge(e,t,n=e.props,i,a,l=!1){const{tag:f,loc:d,children:h}=e;let b=[];const S=[],k=[],T=h.length>0;let O=!1,P=0,B=!1,W=!1,Z=!1,Y=!1,z=!1,q=!1;const ne=[],ue=de=>{b.length&&(S.push(D1(Bge(b),d)),b=[]),de&&S.push(de)},J=()=>{t.scopes.vFor>0&&b.push(cu(Ur("ref_for",!0),Ur("true")))},ce=({key:de,value:he})=>{if(Am(de)){const ie=de.content,Be=yS(ie);if(Be&&(!i||a)&&ie.toLowerCase()!=="onclick"&&ie!=="onUpdate:modelValue"&&!z3(ie)&&(Y=!0),Be&&z3(ie)&&(q=!0),Be&&he.type===14&&(he=he.arguments[0]),he.type===20||(he.type===4||he.type===8)&&Ph(he,t)>0)return;ie==="ref"?B=!0:ie==="class"?W=!0:ie==="style"?Z=!0:ie!=="key"&&!ne.includes(ie)&&ne.push(ie),i&&(ie==="class"||ie==="style")&&!ne.includes(ie)&&ne.push(ie)}else z=!0};for(let de=0;de<n.length;de++){const he=n[de];if(he.type===6){const{loc:ie,name:Be,nameLoc:$e,value:Ue}=he;let V=!0;if(Be==="ref"&&(B=!0,J()),Be==="is"&&(_Q(f)||Ue&&Ue.content.startsWith("vue:")||BS("COMPILER_IS_ON_ELEMENT",t)))continue;b.push(cu(Ur(Be,!0,$e),Ur(Ue?Ue.content:"",V,Ue?Ue.loc:ie)))}else{const{name:ie,arg:Be,exp:$e,loc:Ue,modifiers:V}=he,Ye=ie==="bind",Fe=ie==="on";if(ie==="slot"){i||t.onError(ic(40,Ue));continue}if(ie==="once"||ie==="memo"||ie==="is"||Ye&&VS(Be,"is")&&(_Q(f)||BS("COMPILER_IS_ON_ELEMENT",t))||Fe&&l)continue;if((Ye&&VS(Be,"key")||Fe&&T&&VS(Be,"vue:before-update"))&&(O=!0),Ye&&VS(Be,"ref")&&J(),!Be&&(Ye||Fe)){if(z=!0,$e)if(Ye){if(J(),ue(),BS("COMPILER_V_BIND_OBJECT_ORDER",t)){S.unshift($e);continue}S.push($e)}else ue({type:14,loc:Ue,callee:t.helper(oQ),arguments:i?[$e]:[$e,"true"]});else t.onError(ic(Ye?34:35,Ue));continue}Ye&&V.some(Dt=>Dt.content==="prop")&&(P|=32);const St=t.directiveTransforms[ie];if(St){const{props:Dt,needRuntime:He}=St(he,e,t);!l&&Dt.forEach(ce),Fe&&Be&&!Am(Be)?ue(D1(Dt,d)):b.push(...Dt),He&&(k.push(he),Em(He)&&Fge.set(he,He))}else K6e(ie)||(k.push(he),T&&(O=!0))}}let ge;if(S.length?(ue(),S.length>1?ge=od(t.helper(IB),S,d):ge=S[0]):b.length&&(ge=D1(Bge(b),d)),z?P|=16:(W&&!i&&(P|=2),Z&&!i&&(P|=4),ne.length&&(P|=8),Y&&(P|=32)),!O&&(P===0||P===32)&&(B||q||k.length>0)&&(P|=512),!t.inSSR&&ge)switch(ge.type){case 15:let de=-1,he=-1,ie=!1;for(let Ue=0;Ue<ge.properties.length;Ue++){const V=ge.properties[Ue].key;Am(V)?V.content==="class"?de=Ue:V.content==="style"&&(he=Ue):V.isHandlerKey||(ie=!0)}const Be=ge.properties[de],$e=ge.properties[he];ie?ge=od(t.helper(kA),[ge]):(Be&&!Am(Be.value)&&(Be.value=od(t.helper(nQ),[Be.value])),$e&&(Z||$e.value.type===4&&$e.value.content.trim()[0]==="["||$e.value.type===17)&&($e.value=od(t.helper(sQ),[$e.value])));break;case 14:break;default:ge=od(t.helper(kA),[od(t.helper(xA),[ge])]);break}return{props:ge,directives:k,patchFlag:P,dynamicPropNames:ne,shouldUseBlock:O}}function Bge(e){const t=new Map,n=[];for(let i=0;i<e.length;i++){const a=e[i];if(a.key.type===8||!a.key.isStatic){n.push(a);continue}const l=a.key.content,f=t.get(l);f?(l==="style"||l==="class"||yS(l))&&R9e(f,a):(t.set(l,a),n.push(a))}return n}function R9e(e,t){e.value.type===17?e.value.elements.push(t.value):e.value=$S([e.value,t.value],e.loc)}function D9e(e,t){const n=[],i=Fge.get(e);i?n.push(t.helperString(i)):(t.helper(JJ),t.directives.add(e.name),n.push(AA(e.name,"directive")));const{loc:a}=e;if(e.exp&&n.push(e.exp),e.arg&&(e.exp||n.push("void 0"),n.push(e.arg)),Object.keys(e.modifiers).length){e.arg||(e.exp||n.push("void 0"),n.push("void 0"));const l=Ur("true",!1,a);n.push(D1(e.modifiers.map(f=>cu(f,l)),a))}return $S(n,e.loc)}function L9e(e){let t="[";for(let n=0,i=e.length;n<i;n++)t+=JSON.stringify(e[n]),n<i-1&&(t+=", ");return t+"]"}function _Q(e){return e==="component"||e==="Component"}const P9e=(e,t)=>{if(LB(e)){const{children:n,loc:i}=e,{slotName:a,slotProps:l}=M9e(e,t),f=[t.prefixIdentifiers?"_ctx.$slots":"$slots",a,"{}","undefined","true"];let d=2;l&&(f[2]=l,d=3),n.length&&(f[3]=_w([],n,!1,!1,i),d=4),t.scopeId&&!t.slotted&&(d=5),f.splice(d),e.codegenNode=od(t.helper(tge),f,i)}};function M9e(e,t){let n='"default"',i;const a=[];for(let l=0;l<e.props.length;l++){const f=e.props[l];if(f.type===6)f.value&&(f.name==="name"?n=JSON.stringify(f.value.content):(f.name=Sl(f.name),a.push(f)));else if(f.name==="bind"&&VS(f.arg,"name")){if(f.exp)n=f.exp;else if(f.arg&&f.arg.type===4){const d=Sl(f.arg.content);n=f.exp=Ur(d,!1,f.arg.loc)}}else f.name==="bind"&&f.arg&&Am(f.arg)&&(f.arg.content=Sl(f.arg.content)),a.push(f)}if(a.length>0){const{props:l,directives:f}=$ge(e,t,a,!1,!1);i=l,f.length&&t.onError(ic(36,f[0].loc))}return{slotName:n,slotProps:i}}const Vge=(e,t,n,i)=>{const{loc:a,modifiers:l,arg:f}=e;!e.exp&&!l.length&&n.onError(ic(35,a));let d;if(f.type===4)if(f.isStatic){let k=f.content;k.startsWith("vue:")&&(k="vnode-".concat(k.slice(4)));const T=t.tagType!==0||k.startsWith("vnode")||!/[A-Z]/.test(k)?SS(Sl(k)):"on:".concat(k);d=Ur(T,!0,f.loc)}else d=Gg(["".concat(n.helperString(iQ),"("),f,")"]);else d=f,d.children.unshift("".concat(n.helperString(iQ),"(")),d.children.push(")");let h=e.exp;h&&!h.content.trim()&&(h=void 0);let b=n.cacheHandlers&&!h&&!n.inVOnce;if(h){const k=dge(h),T=!(k||Dwe(h)),O=h.content.includes(";");(T||b&&k)&&(h=Gg(["".concat(T?"$event":"(...args)"," => ").concat(O?"{":"("),h,O?"}":")"]))}let S={props:[cu(d,h||Ur("() => {}",!1,a))]};return i&&(S=i(S)),b&&(S.props[0].value=n.cache(S.props[0].value)),S.props.forEach(k=>k.key.isHandlerKey=!0),S},N9e=(e,t)=>{if(e.type===0||e.type===1||e.type===11||e.type===10)return()=>{const n=e.children;let i,a=!1;for(let l=0;l<n.length;l++){const f=n[l];if(pQ(f)){a=!0;for(let d=l+1;d<n.length;d++){const h=n[d];if(pQ(h))i||(i=n[l]=Gg([f],f.loc)),i.children.push(" + ",h),n.splice(d,1),d--;else{i=void 0;break}}}}if(!(!a||n.length===1&&(e.type===0||e.type===1&&e.tagType===0&&!e.props.find(l=>l.type===7&&!t.directiveTransforms[l.name])&&e.tag!=="template")))for(let l=0;l<n.length;l++){const f=n[l];if(pQ(f)||f.type===8){const d=[];(f.type!==2||f.content!==" ")&&d.push(f),!t.ssr&&Ph(f,t)===0&&d.push("1"),n[l]={type:12,content:f,loc:f.loc,codegenNode:od(t.helper(KJ),d)}}}}},Hge=new WeakSet,F9e=(e,t)=>{if(e.type===1&&L1(e,"once",!0))return Hge.has(e)||t.inVOnce||t.inSSR?void 0:(Hge.add(e),t.inVOnce=!0,t.helper(AB),()=>{t.inVOnce=!1;const n=t.currentNode;n.codegenNode&&(n.codegenNode=t.cache(n.codegenNode,!0,!0))})},Uge=(e,t,n)=>{const{exp:i,arg:a}=e;if(!i)return n.onError(ic(41,e.loc)),zB();const l=i.loc.source.trim(),f=i.type===4?i.content:l,d=n.bindingMetadata[l];if(d==="props"||d==="props-aliased")return n.onError(ic(44,i.loc)),zB();if(!f.trim()||!dge(i))return n.onError(ic(42,i.loc)),zB();const h=a||Ur("modelValue",!0),b=a?Am(a)?"onUpdate:".concat(Sl(a.content)):Gg(['"onUpdate:" + ',a]):"onUpdate:modelValue";let S;const k=n.isTS?"($event: any)":"$event";S=Gg(["".concat(k," => (("),i,") = $event)"]);const T=[cu(h,e.exp),cu(b,S)];if(e.modifiers.length&&t.tagType===1){const O=e.modifiers.map(B=>B.content).map(B=>(fQ(B)?B:JSON.stringify(B))+": true").join(", "),P=a?Am(a)?"".concat(a.content,"Modifiers"):Gg([a,' + "Modifiers"']):"modelModifiers";T.push(cu(P,Ur("{ ".concat(O," }"),!1,e.loc,2)))}return zB(T)};function zB(e=[]){return{props:e}}const $9e=/[\w).+\-_$\]]/,B9e=(e,t)=>{BS("COMPILER_FILTERS",t)&&(e.type===5?WB(e.content,t):e.type===1&&e.props.forEach(n=>{n.type===7&&n.name!=="for"&&n.exp&&WB(n.exp,t)}))};function WB(e,t){if(e.type===4)zge(e,t);else for(let n=0;n<e.children.length;n++){const i=e.children[n];typeof i=="object"&&(i.type===4?zge(i,t):i.type===8?WB(e,t):i.type===5&&WB(i.content,t))}}function zge(e,t){const n=e.content;let i=!1,a=!1,l=!1,f=!1,d=0,h=0,b=0,S=0,k,T,O,P,B=[];for(O=0;O<n.length;O++)if(T=k,k=n.charCodeAt(O),i)k===39&&T!==92&&(i=!1);else if(a)k===34&&T!==92&&(a=!1);else if(l)k===96&&T!==92&&(l=!1);else if(f)k===47&&T!==92&&(f=!1);else if(k===124&&n.charCodeAt(O+1)!==124&&n.charCodeAt(O-1)!==124&&!d&&!h&&!b)P===void 0?(S=O+1,P=n.slice(0,O).trim()):W();else{switch(k){case 34:a=!0;break;case 39:i=!0;break;case 96:l=!0;break;case 40:b++;break;case 41:b--;break;case 91:h++;break;case 93:h--;break;case 123:d++;break;case 125:d--;break}if(k===47){let Z=O-1,Y;for(;Z>=0&&(Y=n.charAt(Z),Y===" ");Z--);(!Y||!$9e.test(Y))&&(f=!0)}}P===void 0?P=n.slice(0,O).trim():S!==0&&W();function W(){B.push(n.slice(S,O).trim()),S=O+1}if(B.length){for(O=0;O<B.length;O++)P=V9e(P,B[O],t);e.content=P,e.ast=void 0}}function V9e(e,t,n){n.helper(QJ);const i=t.indexOf("(");if(i<0)return n.filters.add(t),"".concat(AA(t,"filter"),"(").concat(e,")");{const a=t.slice(0,i),l=t.slice(i+1);return n.filters.add(a),"".concat(AA(a,"filter"),"(").concat(e).concat(l!==")"?","+l:l)}}const Wge=new WeakSet,H9e=(e,t)=>{if(e.type===1){const n=L1(e,"memo");return!n||Wge.has(e)?void 0:(Wge.add(e),()=>{const i=e.codegenNode||t.currentNode.codegenNode;i&&i.type===13&&(e.tagType!==1&&uQ(i,t),e.codegenNode=od(t.helper(lQ),[n.exp,_w(void 0,i),"_cache",String(t.cached.length)]),t.cached.push(null))})}};function U9e(e){return[[F9e,y9e,H9e,w9e,B9e,P9e,A9e,x9e,N9e],{on:Vge,bind:C9e,model:Uge}]}function z9e(e,t={}){const n=t.onError||dQ,i=t.mode==="module";t.prefixIdentifiers===!0?n(ic(47)):i&&n(ic(48));const a=!1;t.cacheHandlers&&n(ic(49)),t.scopeId&&!i&&n(ic(50));const l=wi({},t,{prefixIdentifiers:a}),f=kr(e)?Ywe(e,l):e,[d,h]=U9e();return e9e(f,wi({},l,{nodeTransforms:[...d,...t.nodeTransforms||[]],directiveTransforms:wi({},h,t.directiveTransforms||{})})),o9e(f,l)}const W9e=()=>({props:[]});/** * @vue/compiler-dom v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/const jge=Symbol(""),Zge=Symbol(""),qge=Symbol(""),Gge=Symbol(""),SQ=Symbol(""),Kge=Symbol(""),Yge=Symbol(""),Xge=Symbol(""),Jge=Symbol(""),Qge=Symbol("");Cwe({[jge]:"vModelRadio",[Zge]:"vModelCheckbox",[qge]:"vModelText",[Gge]:"vModelSelect",[SQ]:"vModelDynamic",[Kge]:"withModifiers",[Yge]:"withKeys",[Xge]:"vShow",[Jge]:"Transition",[Qge]:"TransitionGroup"});let ww;function j9e(e,t=!1){return ww||(ww=document.createElement("div")),t?(ww.innerHTML='<div foo="'.concat(e.replace(/"/g,"""),'">'),ww.children[0].getAttribute("foo")):(ww.innerHTML=e,ww.textContent)}const Z9e={parseMode:"html",isVoidTag:u8e,isNativeTag:e=>a8e(e)||l8e(e)||c8e(e),isPreTag:e=>e==="pre",isIgnoreNewlineTag:e=>e==="pre"||e==="textarea",decodeEntities:j9e,isBuiltInComponent:e=>{if(e==="Transition"||e==="transition")return Jge;if(e==="TransitionGroup"||e==="transition-group")return Qge},getNamespace(e,t,n){let i=t?t.ns:n;if(t&&i===2)if(t.tag==="annotation-xml"){if(e==="svg")return 1;t.props.some(a=>a.type===6&&a.name==="encoding"&&a.value!=null&&(a.value.content==="text/html"||a.value.content==="application/xhtml+xml"))&&(i=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&e!=="mglyph"&&e!=="malignmark"&&(i=0);else t&&i===1&&(t.tag==="foreignObject"||t.tag==="desc"||t.tag==="title")&&(i=0);if(i===0){if(e==="svg")return 1;if(e==="math")return 2}return i}},q9e=e=>{e.type===1&&e.props.forEach((t,n)=>{t.type===6&&t.name==="style"&&t.value&&(e.props[n]={type:7,name:"bind",arg:Ur("style",!0,t.loc),exp:G9e(t.value.content,t.loc),modifiers:[],loc:t.loc})})},G9e=(e,t)=>{const n=jpe(e);return Ur(JSON.stringify(n),!1,t,3)};function l5(e,t){return ic(e,t)}const K9e=(e,t,n)=>{const{exp:i,loc:a}=e;return i||n.onError(l5(53,a)),t.children.length&&(n.onError(l5(54,a)),t.children.length=0),{props:[cu(Ur("innerHTML",!0,a),i||Ur("",!0))]}},Y9e=(e,t,n)=>{const{exp:i,loc:a}=e;return i||n.onError(l5(55,a)),t.children.length&&(n.onError(l5(56,a)),t.children.length=0),{props:[cu(Ur("textContent",!0),i?Ph(i,n)>0?i:od(n.helperString(TB),[i],a):Ur("",!0))]}},X9e=(e,t,n)=>{const i=Uge(e,t,n);if(!i.props.length||t.tagType===1)return i;e.arg&&n.onError(l5(58,e.arg.loc));const{tag:a}=t,l=n.isCustomElement(a);if(a==="input"||a==="textarea"||a==="select"||l){let f=qge,d=!1;if(a==="input"||l){const h=RB(t,"type");if(h){if(h.type===7)f=SQ;else if(h.value)switch(h.value.content){case"radio":f=jge;break;case"checkbox":f=Zge;break;case"file":d=!0,n.onError(l5(59,e.loc));break}}else Lwe(t)&&(f=SQ)}else a==="select"&&(f=Gge);d||(i.needRuntime=n.helper(f))}else n.onError(l5(57,e.loc));return i.props=i.props.filter(f=>!(f.key.type===4&&f.key.content==="modelValue")),i},J9e=Qu("passive,once,capture"),Q9e=Qu("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),eEe=Qu("left,right"),e0e=Qu("onkeyup,onkeydown,onkeypress"),tEe=(e,t,n,i)=>{const a=[],l=[],f=[];for(let d=0;d<t.length;d++){const h=t[d].content;h==="native"&&IA("COMPILER_V_ON_NATIVE",n)||J9e(h)?f.push(h):eEe(h)?Am(e)?e0e(e.content.toLowerCase())?a.push(h):l.push(h):(a.push(h),l.push(h)):Q9e(h)?l.push(h):a.push(h)}return{keyModifiers:a,nonKeyModifiers:l,eventOptionModifiers:f}},t0e=(e,t)=>Am(e)&&e.content.toLowerCase()==="onclick"?Ur(t,!0):e.type!==4?Gg(["(",e,') === "onClick" ? "'.concat(t,'" : ('),e,")"]):e,nEe=(e,t,n)=>Vge(e,t,n,i=>{const{modifiers:a}=e;if(!a.length)return i;let{key:l,value:f}=i.props[0];const{keyModifiers:d,nonKeyModifiers:h,eventOptionModifiers:b}=tEe(l,a,n,e.loc);if(h.includes("right")&&(l=t0e(l,"onContextmenu")),h.includes("middle")&&(l=t0e(l,"onMouseup")),h.length&&(f=od(n.helper(Kge),[f,JSON.stringify(h)])),d.length&&(!Am(l)||e0e(l.content.toLowerCase()))&&(f=od(n.helper(Yge),[f,JSON.stringify(d)])),b.length){const S=b.map(W3).join("");l=Am(l)?Ur("".concat(l.content).concat(S),!0):Gg(["(",l,') + "'.concat(S,'"')])}return{props:[cu(l,f)]}}),sEe=(e,t,n)=>{const{exp:i,loc:a}=e;return i||n.onError(l5(61,a)),{props:[],needRuntime:n.helper(Xge)}},oEe=(e,t)=>{e.type===1&&e.tagType===0&&(e.tag==="script"||e.tag==="style")&&t.removeNode()},rEe=[q9e],iEe={cloak:W9e,html:K9e,text:Y9e,model:X9e,on:nEe,show:sEe};function aEe(e,t={}){return z9e(e,wi({},Z9e,t,{nodeTransforms:[oEe,...rEe,...t.nodeTransforms||[]],directiveTransforms:wi({},iEe,t.directiveTransforms||{}),transformHoist:null}))}/** * vue v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/const n0e=Object.create(null);function s0e(e,t){if(!kr(e))if(e.nodeType)e=e.innerHTML;else return jd;const n=J6e(e,t),i=n0e[n];if(i)return i;if(e[0]==="#"){const d=document.querySelector(e);e=d?d.innerHTML:""}const a=wi({hoistStatic:!0,onError:void 0,onWarn:jd},t);!a.isCustomElement&&typeof customElements<"u"&&(a.isCustomElement=d=>!!customElements.get(d));const{code:l}=aEe(e,a),f=new Function("Vue",l)(gwe);return f._rc=!0,n0e[n]=f}PJ(s0e);const o0e=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:QX,BaseTransitionPropsValidators:J$,Comment:au,DeprecationTypes:r1e,EffectScope:A$,ErrorCodes:wme,ErrorTypeStrings:Qhe,Fragment:bt,KeepAlive:qme,ReactiveEffect:iw,Static:e5,Suspense:Mhe,Teleport:JX,Text:Eb,TrackOpTypes:bme,Transition:s5,TransitionGroup:N1e,TriggerOpTypes:yme,VueElement:_A,assertNumber:Cme,callWithAsyncErrorHandling:Ah,callWithErrorHandling:K3,camelize:Sl,capitalize:W3,cloneVNode:Rh,compatUtils:o1e,compile:s0e,computed:Ge,createApp:NS,createBlock:Ee,createCommentVNode:we,createElementBlock:Q,createElementVNode:H,createHydrationRenderer:CJ,createPropsRestProxy:che,createRenderer:SJ,createSSRApp:jJ,createSlots:If,createStaticVNode:rc,createTextVNode:D,createVNode:pe,customRef:jX,defineAsyncComponent:nJ,defineComponent:Gr,defineCustomElement:UJ,defineEmits:Qme,defineExpose:ehe,defineModel:she,defineOptions:the,defineProps:Jme,defineSSRCustomElement:O1e,defineSlots:nhe,devtools:e1e,effect:eme,effectScope:O$,getCurrentInstance:sd,getCurrentScope:GI,getCurrentWatcher:_me,getTransitionRawChildren:oA,guardReactiveProps:RS,h:oi,handleError:Y3,hasInjectionContext:aB,hydrate:Z1e,hydrateOnIdle:zme,hydrateOnInteraction:Zme,hydrateOnMediaQuery:jme,hydrateOnVisible:Wme,initCustomFormatter:Yhe,initDirectivesForSSR:Y1e,inject:Mr,isMemoSame:MJ,isProxy:ES,isReactive:A1,isReadonly:_b,isRef:xa,isRuntimeOnly:Zhe,isShallow:xm,isVNode:xv,markRaw:Z3,mergeDefaults:ahe,mergeModels:lhe,mergeProps:Cn,nextTick:kc,normalizeClass:Rn,normalizeProps:CS,normalizeStyle:Ih,onActivated:tB,onBeforeMount:rJ,onBeforeUnmount:wb,onBeforeUpdate:rB,onDeactivated:nB,onErrorCaptured:cJ,onMounted:Pr,onRenderTracked:lJ,onRenderTriggered:aJ,onScopeDispose:KI,onServerPrefetch:iJ,onUnmounted:$a,onUpdated:lA,onWatcherCleanup:ZX,openBlock:L,popScopeId:YX,provide:Ba,proxyRefs:B$,pushScopeId:KX,queuePostFlushCb:dw,reactive:I1,readonly:lw,ref:kt,registerRuntimeCompiler:PJ,render:WJ,renderList:Sn,renderSlot:is,resolveComponent:Xe,resolveDirective:Hr,resolveDynamicComponent:Io,resolveFilter:s1e,resolveTransitionHooks:TS,setBlockTracking:pB,setDevtoolsHook:t1e,setTransitionHooks:kv,shallowReactive:zX,shallowReadonly:mme,shallowRef:kS,ssrContextKey:kJ,ssrUtils:n1e,stop:tme,toDisplayString:ee,toHandlerKey:SS,toHandlers:Xme,toRaw:Qo,toRef:V$,toRefs:q3,toValue:gme,transformVNodeArgs:Hhe,triggerRef:$$,unref:se,useAttrs:rhe,useCssModule:D1e,useCssVars:_1e,useHost:zJ,useId:Oh,useModel:Rhe,useSSRContext:xJ,useShadowRoot:R1e,useSlots:uA,useTemplateRef:Vme,useTransitionState:X$,vModelCheckbox:Iv,vModelDynamic:EB,vModelRadio:PS,vModelSelect:wB,vModelText:lu,vShow:bA,version:bB,warn:Jhe,watch:io,watchEffect:oc,watchPostEffect:Ahe,watchSyncEffect:TJ,withAsyncContext:uhe,withCtx:te,withDefaults:ohe,withDirectives:Gn,withKeys:MS,withMemo:Xhe,withModifiers:wl,withScopeId:q$},Symbol.toStringTag,{value:"Module"}));/*! * pinia v2.3.1 * (c) 2025 Eduardo San Martin Morote * @license MIT */let CQ;const jB=e=>CQ=e,lEe=()=>aB()&&Mr(wQ)||CQ,wQ=Symbol();function EQ(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var DA;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(DA||(DA={}));function cEe(){const e=O$(!0),t=e.run(()=>kt({}));let n=[],i=[];const a=Z3({install(l){jB(a),a._a=l,l.provide(wQ,a),l.config.globalProperties.$pinia=a,i.forEach(f=>n.push(f)),i=[]},use(l){return this._a?n.push(l):i.push(l),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return a}const r0e=()=>{};function i0e(e,t,n,i=r0e){e.push(t);const a=()=>{const l=e.indexOf(t);l>-1&&(e.splice(l,1),i())};return!n&&GI()&&KI(a),a}function Ew(e,...t){e.slice().forEach(n=>{n(...t)})}const uEe=e=>e(),a0e=Symbol(),kQ=Symbol();function xQ(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,i)=>e.set(i,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const i=t[n],a=e[n];EQ(a)&&EQ(i)&&e.hasOwnProperty(n)&&!xa(i)&&!A1(i)?e[n]=xQ(a,i):e[n]=i}return e}const dEe=Symbol();function fEe(e){return!EQ(e)||!e.hasOwnProperty(dEe)}const{assign:c5}=Object;function pEe(e){return!!(xa(e)&&e.effect)}function mEe(e,t,n,i){const{state:a,actions:l,getters:f}=t,d=n.state.value[e];let h;function b(){d||(n.state.value[e]=a?a():{});const S=q3(n.state.value[e]);return c5(S,l,Object.keys(f||{}).reduce((k,T)=>(k[T]=Z3(Ge(()=>{jB(n);const O=n._s.get(e);return f[T].call(O,O)})),k),{}))}return h=l0e(e,b,t,n,i,!0),h}function l0e(e,t,n={},i,a,l){let f;const d=c5({actions:{}},n),h={deep:!0};let b,S,k=[],T=[],O;const P=i.state.value[e];!l&&!P&&(i.state.value[e]={}),kt({});let B;function W(ce){let ge;b=S=!1,typeof ce=="function"?(ce(i.state.value[e]),ge={type:DA.patchFunction,storeId:e,events:O}):(xQ(i.state.value[e],ce),ge={type:DA.patchObject,payload:ce,storeId:e,events:O});const de=B=Symbol();kc().then(()=>{B===de&&(b=!0)}),S=!0,Ew(k,ge,i.state.value[e])}const Z=l?function(){const{state:ge}=n,de=ge?ge():{};this.$patch(he=>{c5(he,de)})}:r0e;function Y(){f.stop(),k=[],T=[],i._s.delete(e)}const z=(ce,ge="")=>{if(a0e in ce)return ce[kQ]=ge,ce;const de=function(){jB(i);const he=Array.from(arguments),ie=[],Be=[];function $e(Ye){ie.push(Ye)}function Ue(Ye){Be.push(Ye)}Ew(T,{args:he,name:de[kQ],store:ne,after:$e,onError:Ue});let V;try{V=ce.apply(this&&this.$id===e?this:ne,he)}catch(Ye){throw Ew(Be,Ye),Ye}return V instanceof Promise?V.then(Ye=>(Ew(ie,Ye),Ye)).catch(Ye=>(Ew(Be,Ye),Promise.reject(Ye))):(Ew(ie,V),V)};return de[a0e]=!0,de[kQ]=ge,de},q={_p:i,$id:e,$onAction:i0e.bind(null,T),$patch:W,$reset:Z,$subscribe(ce,ge={}){const de=i0e(k,ce,ge.detached,()=>he()),he=f.run(()=>io(()=>i.state.value[e],ie=>{(ge.flush==="sync"?S:b)&&ce({storeId:e,type:DA.direct,events:O},ie)},c5({},h,ge)));return de},$dispose:Y},ne=I1(q);i._s.set(e,ne);const J=(i._a&&i._a.runWithContext||uEe)(()=>i._e.run(()=>(f=O$()).run(()=>t({action:z}))));for(const ce in J){const ge=J[ce];if(xa(ge)&&!pEe(ge)||A1(ge))l||(P&&fEe(ge)&&(xa(ge)?ge.value=P[ce]:xQ(ge,P[ce])),i.state.value[e][ce]=ge);else if(typeof ge=="function"){const de=z(ge,ce);J[ce]=de,d.actions[ce]=ge}}return c5(ne,J),c5(Qo(ne),J),Object.defineProperty(ne,"$state",{get:()=>i.state.value[e],set:ce=>{W(ge=>{c5(ge,ce)})}}),i._p.forEach(ce=>{c5(ne,f.run(()=>ce({store:ne,app:i._a,pinia:i,options:d})))}),P&&l&&n.hydrate&&n.hydrate(ne.$state,P),b=!0,S=!0,ne}/*! #__NO_SIDE_EFFECTS__ */function LA(e,t,n){let i,a;const l=typeof t=="function";typeof e=="string"?(i=e,a=l?n:t):(a=e,i=e.id);function f(d,h){const b=aB();return d=d||(b?Mr(wQ,null):null),d&&jB(d),d=CQ,d._s.has(i)||(l?l0e(i,t,a,d):mEe(i,a,d)),d._s.get(i)}return f.$id=i,f}function c0e(e){{const t=Qo(e),n={};for(const i in t){const a=t[i];a.effect?n[i]=Ge({get:()=>e[i],set(l){e[i]=l}}):(xa(a)||A1(a))&&(n[i]=V$(e,i))}return n}}class zS extends Error{}class hEe extends zS{constructor(t){super("Invalid DateTime: ".concat(t.toMessage()))}}class gEe extends zS{constructor(t){super("Invalid Interval: ".concat(t.toMessage()))}}class vEe extends zS{constructor(t){super("Invalid Duration: ".concat(t.toMessage()))}}class kw extends zS{}class u0e extends zS{constructor(t){super("Invalid unit ".concat(t))}}class Lf extends zS{}class u5 extends zS{constructor(){super("Zone is an abstract class")}}const $s="numeric",Kg="short",Mh="long",ZB={year:$s,month:$s,day:$s},d0e={year:$s,month:Kg,day:$s},bEe={year:$s,month:Kg,day:$s,weekday:Kg},f0e={year:$s,month:Mh,day:$s},p0e={year:$s,month:Mh,day:$s,weekday:Mh},m0e={hour:$s,minute:$s},h0e={hour:$s,minute:$s,second:$s},g0e={hour:$s,minute:$s,second:$s,timeZoneName:Kg},v0e={hour:$s,minute:$s,second:$s,timeZoneName:Mh},b0e={hour:$s,minute:$s,hourCycle:"h23"},y0e={hour:$s,minute:$s,second:$s,hourCycle:"h23"},_0e={hour:$s,minute:$s,second:$s,hourCycle:"h23",timeZoneName:Kg},S0e={hour:$s,minute:$s,second:$s,hourCycle:"h23",timeZoneName:Mh},C0e={year:$s,month:$s,day:$s,hour:$s,minute:$s},w0e={year:$s,month:$s,day:$s,hour:$s,minute:$s,second:$s},E0e={year:$s,month:Kg,day:$s,hour:$s,minute:$s},k0e={year:$s,month:Kg,day:$s,hour:$s,minute:$s,second:$s},yEe={year:$s,month:Kg,day:$s,weekday:Kg,hour:$s,minute:$s},x0e={year:$s,month:Mh,day:$s,hour:$s,minute:$s,timeZoneName:Kg},T0e={year:$s,month:Mh,day:$s,hour:$s,minute:$s,second:$s,timeZoneName:Kg},I0e={year:$s,month:Mh,day:$s,weekday:Mh,hour:$s,minute:$s,timeZoneName:Mh},A0e={year:$s,month:Mh,day:$s,weekday:Mh,hour:$s,minute:$s,second:$s,timeZoneName:Mh};class PA{get type(){throw new u5}get name(){throw new u5}get ianaName(){return this.name}get isUniversal(){throw new u5}offsetName(t,n){throw new u5}formatOffset(t,n){throw new u5}offset(t){throw new u5}equals(t){throw new u5}get isValid(){throw new u5}}let TQ=null;class qB extends PA{static get instance(){return TQ===null&&(TQ=new qB),TQ}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:n,locale:i}){return eve(t,n,i)}formatOffset(t,n){return $A(this.offset(t),n)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}let GB={};function _Ee(e){return GB[e]||(GB[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),GB[e]}const SEe={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function CEe(e,t){const n=e.format(t).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,a,l,f,d,h,b,S]=i;return[f,a,l,d,h,b,S]}function wEe(e,t){const n=e.formatToParts(t),i=[];for(let a=0;a<n.length;a++){const{type:l,value:f}=n[a],d=SEe[l];l==="era"?i[d]=f:wr(d)||(i[d]=parseInt(f,10))}return i}let KB={};class Ob extends PA{static create(t){return KB[t]||(KB[t]=new Ob(t)),KB[t]}static resetCache(){KB={},GB={}}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=Ob.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:n,locale:i}){return eve(t,n,i,this.name)}formatOffset(t,n){return $A(this.offset(t),n)}offset(t){const n=new Date(t);if(isNaN(n))return NaN;const i=_Ee(this.name);let[a,l,f,d,h,b,S]=i.formatToParts?wEe(i,n):CEe(i,n);d==="BC"&&(a=-Math.abs(a)+1);const T=eV({year:a,month:l,day:f,hour:h===24?0:h,minute:b,second:S,millisecond:0});let O=+n;const P=O%1e3;return O-=P>=0?P:1e3+P,(T-O)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let O0e={};function EEe(e,t={}){const n=JSON.stringify([e,t]);let i=O0e[n];return i||(i=new Intl.ListFormat(e,t),O0e[n]=i),i}let IQ={};function AQ(e,t={}){const n=JSON.stringify([e,t]);let i=IQ[n];return i||(i=new Intl.DateTimeFormat(e,t),IQ[n]=i),i}let OQ={};function kEe(e,t={}){const n=JSON.stringify([e,t]);let i=OQ[n];return i||(i=new Intl.NumberFormat(e,t),OQ[n]=i),i}let RQ={};function xEe(e,t={}){const{base:n,...i}=t,a=JSON.stringify([e,i]);let l=RQ[a];return l||(l=new Intl.RelativeTimeFormat(e,t),RQ[a]=l),l}let MA=null;function TEe(){return MA||(MA=new Intl.DateTimeFormat().resolvedOptions().locale,MA)}let R0e={};function IEe(e){let t=R0e[e];if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,R0e[e]=t}return t}function AEe(e){const t=e.indexOf("-x-");t!==-1&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(n===-1)return[e];{let i,a;try{i=AQ(e).resolvedOptions(),a=e}catch{const h=e.substring(0,n);i=AQ(h).resolvedOptions(),a=h}const{numberingSystem:l,calendar:f}=i;return[a,l,f]}}function OEe(e,t,n){return(n||t)&&(e.includes("-u-")||(e+="-u"),n&&(e+="-ca-".concat(n)),t&&(e+="-nu-".concat(t))),e}function REe(e){const t=[];for(let n=1;n<=12;n++){const i=Wo.utc(2009,n,1);t.push(e(i))}return t}function DEe(e){const t=[];for(let n=1;n<=7;n++){const i=Wo.utc(2016,11,13+n);t.push(e(i))}return t}function YB(e,t,n,i){const a=e.listingMode();return a==="error"?null:a==="en"?n(t):i(t)}function LEe(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem==="latn"}class PEe{constructor(t,n,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:a,floor:l,...f}=i;if(!n||Object.keys(f).length>0){const d={useGrouping:!1,...i};i.padTo>0&&(d.minimumIntegerDigits=i.padTo),this.inf=kEe(t,d)}}format(t){if(this.inf){const n=this.floor?Math.floor(t):t;return this.inf.format(n)}else{const n=this.floor?Math.floor(t):BQ(t,3);return Au(n,this.padTo)}}}class MEe{constructor(t,n,i){this.opts=i,this.originalZone=void 0;let a;if(this.opts.timeZone)this.dt=t;else if(t.zone.type==="fixed"){const f=-1*(t.offset/60),d=f>=0?"Etc/GMT+".concat(f):"Etc/GMT".concat(f);t.offset!==0&&Ob.create(d).valid?(a=d,this.dt=t):(a="UTC",this.dt=t.offset===0?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else t.zone.type==="system"?this.dt=t:t.zone.type==="iana"?(this.dt=t,a=t.zone.name):(a="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const l={...this.opts};l.timeZone=l.timeZone||a,this.dtf=AQ(n,l)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(n=>{if(n.type==="timeZoneName"){const i=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:i}}else return n}):t}resolvedOptions(){return this.dtf.resolvedOptions()}}class NEe{constructor(t,n,i){this.opts={style:"long",...i},!n&&Y0e()&&(this.rtf=xEe(t,i))}format(t,n){return this.rtf?this.rtf.format(t,n):rke(n,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,n){return this.rtf?this.rtf.formatToParts(t,n):[]}}const FEe={firstDay:1,minimalDays:4,weekend:[6,7]};class Ta{static fromOpts(t){return Ta.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,n,i,a,l=!1){const f=t||Uc.defaultLocale,d=f||(l?"en-US":TEe()),h=n||Uc.defaultNumberingSystem,b=i||Uc.defaultOutputCalendar,S=FQ(a)||Uc.defaultWeekSettings;return new Ta(d,h,b,S,f)}static resetCache(){MA=null,IQ={},OQ={},RQ={}}static fromObject({locale:t,numberingSystem:n,outputCalendar:i,weekSettings:a}={}){return Ta.create(t,n,i,a)}constructor(t,n,i,a,l){const[f,d,h]=AEe(t);this.locale=f,this.numberingSystem=n||d||null,this.outputCalendar=i||h||null,this.weekSettings=a,this.intl=OEe(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=l,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=LEe(this)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&n?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:Ta.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,FQ(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,n=!1){return YB(this,t,sve,()=>{const i=n?{month:t,day:"numeric"}:{month:t},a=n?"format":"standalone";return this.monthsCache[a][t]||(this.monthsCache[a][t]=REe(l=>this.extract(l,i,"month"))),this.monthsCache[a][t]})}weekdays(t,n=!1){return YB(this,t,ive,()=>{const i=n?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},a=n?"format":"standalone";return this.weekdaysCache[a][t]||(this.weekdaysCache[a][t]=DEe(l=>this.extract(l,i,"weekday"))),this.weekdaysCache[a][t]})}meridiems(){return YB(this,void 0,()=>ave,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Wo.utc(2016,11,13,9),Wo.utc(2016,11,13,19)].map(n=>this.extract(n,t,"dayperiod"))}return this.meridiemCache})}eras(t){return YB(this,t,lve,()=>{const n={era:t};return this.eraCache[t]||(this.eraCache[t]=[Wo.utc(-40,1,1),Wo.utc(2017,1,1)].map(i=>this.extract(i,n,"era"))),this.eraCache[t]})}extract(t,n,i){const a=this.dtFormatter(t,n),l=a.formatToParts(),f=l.find(d=>d.type.toLowerCase()===i);return f?f.value:null}numberFormatter(t={}){return new PEe(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,n={}){return new MEe(t,this.intl,n)}relFormatter(t={}){return new NEe(this.intl,this.isEnglish(),t)}listFormatter(t={}){return EEe(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:X0e()?IEe(this.locale):FEe}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}toString(){return"Locale(".concat(this.locale,", ").concat(this.numberingSystem,", ").concat(this.outputCalendar,")")}}let DQ=null;class $p extends PA{static get utcInstance(){return DQ===null&&(DQ=new $p(0)),DQ}static instance(t){return t===0?$p.utcInstance:new $p(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new $p(tV(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":"UTC".concat($A(this.fixed,"narrow"))}get ianaName(){return this.fixed===0?"Etc/UTC":"Etc/GMT".concat($A(-this.fixed,"narrow"))}offsetName(){return this.name}formatOffset(t,n){return $A(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}class $Ee extends PA{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function d5(e,t){if(wr(e)||e===null)return t;if(e instanceof PA)return e;if(WEe(e)){const n=e.toLowerCase();return n==="default"?t:n==="local"||n==="system"?qB.instance:n==="utc"||n==="gmt"?$p.utcInstance:$p.parseSpecifier(n)||Ob.create(e)}else return f5(e)?$p.instance(e):typeof e=="object"&&"offset"in e&&typeof e.offset=="function"?e:new $Ee(e)}const LQ={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},D0e={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},BEe=LQ.hanidec.replace(/[\[|\]]/g,"").split("");function VEe(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);if(e[n].search(LQ.hanidec)!==-1)t+=BEe.indexOf(e[n]);else for(const a in D0e){const[l,f]=D0e[a];i>=l&&i<=f&&(t+=i-l)}}return parseInt(t,10)}else return t}let xw={};function HEe(){xw={}}function Yg({numberingSystem:e},t=""){const n=e||"latn";return xw[n]||(xw[n]={}),xw[n][t]||(xw[n][t]=new RegExp("".concat(LQ[n]).concat(t))),xw[n][t]}let L0e=()=>Date.now(),P0e="system",M0e=null,N0e=null,F0e=null,$0e=60,B0e,V0e=null,Uc=class{static get now(){return L0e}static set now(t){L0e=t}static set defaultZone(t){P0e=t}static get defaultZone(){return d5(P0e,qB.instance)}static get defaultLocale(){return M0e}static set defaultLocale(t){M0e=t}static get defaultNumberingSystem(){return N0e}static set defaultNumberingSystem(t){N0e=t}static get defaultOutputCalendar(){return F0e}static set defaultOutputCalendar(t){F0e=t}static get defaultWeekSettings(){return V0e}static set defaultWeekSettings(t){V0e=FQ(t)}static get twoDigitCutoffYear(){return $0e}static set twoDigitCutoffYear(t){$0e=t%100}static get throwOnInvalid(){return B0e}static set throwOnInvalid(t){B0e=t}static resetCaches(){Ta.resetCache(),Ob.resetCache(),Wo.resetCache(),HEe()}};class Xg{constructor(t,n){this.reason=t,this.explanation=n}toMessage(){return this.explanation?"".concat(this.reason,": ").concat(this.explanation):this.reason}}const H0e=[0,31,59,90,120,151,181,212,243,273,304,334],U0e=[0,31,60,91,121,152,182,213,244,274,305,335];function P1(e,t){return new Xg("unit out of range","you specified ".concat(t," (of type ").concat(typeof t,") as a ").concat(e,", which is invalid"))}function PQ(e,t,n){const i=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const a=i.getUTCDay();return a===0?7:a}function z0e(e,t,n){return n+(NA(e)?U0e:H0e)[t-1]}function W0e(e,t){const n=NA(e)?U0e:H0e,i=n.findIndex(l=>l<t),a=t-n[i];return{month:i+1,day:a}}function MQ(e,t){return(e-t+7)%7+1}function XB(e,t=4,n=1){const{year:i,month:a,day:l}=e,f=z0e(i,a,l),d=MQ(PQ(i,a,l),n);let h=Math.floor((f-d+14-t)/7),b;return h<1?(b=i-1,h=FA(b,t,n)):h>FA(i,t,n)?(b=i+1,h=1):b=i,{weekYear:b,weekNumber:h,weekday:d,...sV(e)}}function j0e(e,t=4,n=1){const{weekYear:i,weekNumber:a,weekday:l}=e,f=MQ(PQ(i,1,t),n),d=Iw(i);let h=a*7+l-f-7+t,b;h<1?(b=i-1,h+=Iw(b)):h>d?(b=i+1,h-=Iw(i)):b=i;const{month:S,day:k}=W0e(b,h);return{year:b,month:S,day:k,...sV(e)}}function NQ(e){const{year:t,month:n,day:i}=e,a=z0e(t,n,i);return{year:t,ordinal:a,...sV(e)}}function Z0e(e){const{year:t,ordinal:n}=e,{month:i,day:a}=W0e(t,n);return{year:t,month:i,day:a,...sV(e)}}function q0e(e,t){if(!wr(e.localWeekday)||!wr(e.localWeekNumber)||!wr(e.localWeekYear)){if(!wr(e.weekday)||!wr(e.weekNumber)||!wr(e.weekYear))throw new kw("Cannot mix locale-based week fields with ISO-based week fields");return wr(e.localWeekday)||(e.weekday=e.localWeekday),wr(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),wr(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function UEe(e,t=4,n=1){const i=JB(e.weekYear),a=M1(e.weekNumber,1,FA(e.weekYear,t,n)),l=M1(e.weekday,1,7);return i?a?l?!1:P1("weekday",e.weekday):P1("week",e.weekNumber):P1("weekYear",e.weekYear)}function zEe(e){const t=JB(e.year),n=M1(e.ordinal,1,Iw(e.year));return t?n?!1:P1("ordinal",e.ordinal):P1("year",e.year)}function G0e(e){const t=JB(e.year),n=M1(e.month,1,12),i=M1(e.day,1,QB(e.year,e.month));return t?n?i?!1:P1("day",e.day):P1("month",e.month):P1("year",e.year)}function K0e(e){const{hour:t,minute:n,second:i,millisecond:a}=e,l=M1(t,0,23)||t===24&&n===0&&i===0&&a===0,f=M1(n,0,59),d=M1(i,0,59),h=M1(a,0,999);return l?f?d?h?!1:P1("millisecond",a):P1("second",i):P1("minute",n):P1("hour",t)}function wr(e){return typeof e>"u"}function f5(e){return typeof e=="number"}function JB(e){return typeof e=="number"&&e%1===0}function WEe(e){return typeof e=="string"}function jEe(e){return Object.prototype.toString.call(e)==="[object Date]"}function Y0e(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function X0e(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function ZEe(e){return Array.isArray(e)?e:[e]}function J0e(e,t,n){if(e.length!==0)return e.reduce((i,a)=>{const l=[t(a),a];return i&&n(i[0],l[0])===i[0]?i:l},null)[1]}function qEe(e,t){return t.reduce((n,i)=>(n[i]=e[i],n),{})}function Tw(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function FQ(e){if(e==null)return null;if(typeof e!="object")throw new Lf("Week settings must be an object");if(!M1(e.firstDay,1,7)||!M1(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(t=>!M1(t,1,7)))throw new Lf("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function M1(e,t,n){return JB(e)&&e>=t&&e<=n}function GEe(e,t){return e-t*Math.floor(e/t)}function Au(e,t=2){const n=e<0;let i;return n?i="-"+(""+-e).padStart(t,"0"):i=(""+e).padStart(t,"0"),i}function p5(e){if(!(wr(e)||e===null||e===""))return parseInt(e,10)}function WS(e){if(!(wr(e)||e===null||e===""))return parseFloat(e)}function $Q(e){if(!(wr(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function BQ(e,t,n=!1){const i=10**t;return(n?Math.trunc:Math.round)(e*i)/i}function NA(e){return e%4===0&&(e%100!==0||e%400===0)}function Iw(e){return NA(e)?366:365}function QB(e,t){const n=GEe(t-1,12)+1,i=e+(t-n)/12;return n===2?NA(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function eV(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function Q0e(e,t,n){return-MQ(PQ(e,1,t),n)+t-1}function FA(e,t=4,n=1){const i=Q0e(e,t,n),a=Q0e(e+1,t,n);return(Iw(e)-i+a)/7}function VQ(e){return e>99?e:e>Uc.twoDigitCutoffYear?1900+e:2e3+e}function eve(e,t,n,i=null){const a=new Date(e),l={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(l.timeZone=i);const f={timeZoneName:t,...l},d=new Intl.DateTimeFormat(n,f).formatToParts(a).find(h=>h.type.toLowerCase()==="timezonename");return d?d.value:null}function tV(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const i=parseInt(t,10)||0,a=n<0||Object.is(n,-0)?-i:i;return n*60+a}function tve(e){const t=Number(e);if(typeof e=="boolean"||e===""||Number.isNaN(t))throw new Lf("Invalid unit value ".concat(e));return t}function nV(e,t){const n={};for(const i in e)if(Tw(e,i)){const a=e[i];if(a==null)continue;n[t(i)]=tve(a)}return n}function $A(e,t){const n=Math.trunc(Math.abs(e/60)),i=Math.trunc(Math.abs(e%60)),a=e>=0?"+":"-";switch(t){case"short":return"".concat(a).concat(Au(n,2),":").concat(Au(i,2));case"narrow":return"".concat(a).concat(n).concat(i>0?":".concat(i):"");case"techie":return"".concat(a).concat(Au(n,2)).concat(Au(i,2));default:throw new RangeError("Value format ".concat(t," is out of range for property format"))}}function sV(e){return qEe(e,["hour","minute","second","millisecond"])}const KEe=["January","February","March","April","May","June","July","August","September","October","November","December"],nve=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],YEe=["J","F","M","A","M","J","J","A","S","O","N","D"];function sve(e){switch(e){case"narrow":return[...YEe];case"short":return[...nve];case"long":return[...KEe];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const ove=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],rve=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],XEe=["M","T","W","T","F","S","S"];function ive(e){switch(e){case"narrow":return[...XEe];case"short":return[...rve];case"long":return[...ove];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const ave=["AM","PM"],JEe=["Before Christ","Anno Domini"],QEe=["BC","AD"],eke=["B","A"];function lve(e){switch(e){case"narrow":return[...eke];case"short":return[...QEe];case"long":return[...JEe];default:return null}}function tke(e){return ave[e.hour<12?0:1]}function nke(e,t){return ive(t)[e.weekday-1]}function ske(e,t){return sve(t)[e.month-1]}function oke(e,t){return lve(t)[e.year<0?0:1]}function rke(e,t,n="always",i=!1){const a={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},l=["hours","minutes","seconds"].indexOf(e)===-1;if(n==="auto"&&l){const k=e==="days";switch(t){case 1:return k?"tomorrow":"next ".concat(a[e][0]);case-1:return k?"yesterday":"last ".concat(a[e][0]);case 0:return k?"today":"this ".concat(a[e][0])}}const f=Object.is(t,-0)||t<0,d=Math.abs(t),h=d===1,b=a[e],S=i?h?b[1]:b[2]||b[1]:h?a[e][0]:e;return f?"".concat(d," ").concat(S," ago"):"in ".concat(d," ").concat(S)}function cve(e,t){let n="";for(const i of e)i.literal?n+=i.val:n+=t(i.val);return n}const ike={D:ZB,DD:d0e,DDD:f0e,DDDD:p0e,t:m0e,tt:h0e,ttt:g0e,tttt:v0e,T:b0e,TT:y0e,TTT:_0e,TTTT:S0e,f:C0e,ff:E0e,fff:x0e,ffff:I0e,F:w0e,FF:k0e,FFF:T0e,FFFF:A0e};class Pf{static create(t,n={}){return new Pf(t,n)}static parseFormat(t){let n=null,i="",a=!1;const l=[];for(let f=0;f<t.length;f++){const d=t.charAt(f);d==="'"?(i.length>0&&l.push({literal:a||/^\s+$/.test(i),val:i}),n=null,i="",a=!a):a||d===n?i+=d:(i.length>0&&l.push({literal:/^\s+$/.test(i),val:i}),i=d,n=d)}return i.length>0&&l.push({literal:a||/^\s+$/.test(i),val:i}),l}static macroTokenToFormatOpts(t){return ike[t]}constructor(t,n){this.opts=n,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...n}).format()}dtFormatter(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n})}formatDateTime(t,n){return this.dtFormatter(t,n).format()}formatDateTimeParts(t,n){return this.dtFormatter(t,n).formatToParts()}formatInterval(t,n){return this.dtFormatter(t.start,n).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,n){return this.dtFormatter(t,n).resolvedOptions()}num(t,n=0){if(this.opts.forceSimple)return Au(t,n);const i={...this.opts};return n>0&&(i.padTo=n),this.loc.numberFormatter(i).format(t)}formatDateTimeFromString(t,n){const i=this.loc.listingMode()==="en",a=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",l=(O,P)=>this.loc.extract(t,O,P),f=O=>t.isOffsetFixed&&t.offset===0&&O.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,O.format):"",d=()=>i?tke(t):l({hour:"numeric",hourCycle:"h12"},"dayperiod"),h=(O,P)=>i?ske(t,O):l(P?{month:O}:{month:O,day:"numeric"},"month"),b=(O,P)=>i?nke(t,O):l(P?{weekday:O}:{weekday:O,month:"long",day:"numeric"},"weekday"),S=O=>{const P=Pf.macroTokenToFormatOpts(O);return P?this.formatWithSystemDefault(t,P):O},k=O=>i?oke(t,O):l({era:O},"era"),T=O=>{switch(O){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return f({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return f({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return f({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return d();case"d":return a?l({day:"numeric"},"day"):this.num(t.day);case"dd":return a?l({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return b("short",!0);case"cccc":return b("long",!0);case"ccccc":return b("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return b("short",!1);case"EEEE":return b("long",!1);case"EEEEE":return b("narrow",!1);case"L":return a?l({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return a?l({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return h("short",!0);case"LLLL":return h("long",!0);case"LLLLL":return h("narrow",!0);case"M":return a?l({month:"numeric"},"month"):this.num(t.month);case"MM":return a?l({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return h("short",!1);case"MMMM":return h("long",!1);case"MMMMM":return h("narrow",!1);case"y":return a?l({year:"numeric"},"year"):this.num(t.year);case"yy":return a?l({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return a?l({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return a?l({year:"numeric"},"year"):this.num(t.year,6);case"G":return k("short");case"GG":return k("long");case"GGGGG":return k("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return S(O)}};return cve(Pf.parseFormat(n),T)}formatDurationFromString(t,n){const i=h=>{switch(h[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},a=h=>b=>{const S=i(b);return S?this.num(h.get(S),b.length):b},l=Pf.parseFormat(n),f=l.reduce((h,{literal:b,val:S})=>b?h:h.concat(S),[]),d=t.shiftTo(...f.map(i).filter(h=>h));return cve(l,a(d))}}const uve=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Aw(...e){const t=e.reduce((n,i)=>n+i.source,"");return RegExp("^".concat(t,"$"))}function Ow(...e){return t=>e.reduce(([n,i,a],l)=>{const[f,d,h]=l(t,a);return[{...n,...f},d||i,h]},[{},null,1]).slice(0,2)}function Rw(e,...t){if(e==null)return[null,null];for(const[n,i]of t){const a=n.exec(e);if(a)return i(a)}return[null,null]}function dve(...e){return(t,n)=>{const i={};let a;for(a=0;a<e.length;a++)i[e[a]]=p5(t[n+a]);return[i,null,n+a]}}const fve=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,ake="(?:".concat(fve.source,"?(?:\\[(").concat(uve.source,")\\])?)?"),HQ=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,pve=RegExp("".concat(HQ.source).concat(ake)),UQ=RegExp("(?:T".concat(pve.source,")?")),lke=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,cke=/(\d{4})-?W(\d\d)(?:-?(\d))?/,uke=/(\d{4})-?(\d{3})/,dke=dve("weekYear","weekNumber","weekDay"),fke=dve("year","ordinal"),pke=/(\d{4})-(\d\d)-(\d\d)/,mve=RegExp("".concat(HQ.source," ?(?:").concat(fve.source,"|(").concat(uve.source,"))?")),mke=RegExp("(?: ".concat(mve.source,")?"));function Dw(e,t,n){const i=e[t];return wr(i)?n:p5(i)}function hke(e,t){return[{year:Dw(e,t),month:Dw(e,t+1,1),day:Dw(e,t+2,1)},null,t+3]}function Lw(e,t){return[{hours:Dw(e,t,0),minutes:Dw(e,t+1,0),seconds:Dw(e,t+2,0),milliseconds:$Q(e[t+3])},null,t+4]}function BA(e,t){const n=!e[t]&&!e[t+1],i=tV(e[t+1],e[t+2]),a=n?null:$p.instance(i);return[{},a,t+3]}function VA(e,t){const n=e[t]?Ob.create(e[t]):null;return[{},n,t+1]}const gke=RegExp("^T?".concat(HQ.source,"$")),vke=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function bke(e){const[t,n,i,a,l,f,d,h,b]=e,S=t[0]==="-",k=h&&h[0]==="-",T=(O,P=!1)=>O!==void 0&&(P||O&&S)?-O:O;return[{years:T(WS(n)),months:T(WS(i)),weeks:T(WS(a)),days:T(WS(l)),hours:T(WS(f)),minutes:T(WS(d)),seconds:T(WS(h),h==="-0"),milliseconds:T($Q(b),k)}]}const yke={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function zQ(e,t,n,i,a,l,f){const d={year:t.length===2?VQ(p5(t)):p5(t),month:nve.indexOf(n)+1,day:p5(i),hour:p5(a),minute:p5(l)};return f&&(d.second=p5(f)),e&&(d.weekday=e.length>3?ove.indexOf(e)+1:rve.indexOf(e)+1),d}const _ke=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Ske(e){const[,t,n,i,a,l,f,d,h,b,S,k]=e,T=zQ(t,a,i,n,l,f,d);let O;return h?O=yke[h]:b?O=0:O=tV(S,k),[T,new $p(O)]}function Cke(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const wke=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Eke=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,kke=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function hve(e){const[,t,n,i,a,l,f,d]=e;return[zQ(t,a,i,n,l,f,d),$p.utcInstance]}function xke(e){const[,t,n,i,a,l,f,d]=e;return[zQ(t,d,n,i,a,l,f),$p.utcInstance]}const Tke=Aw(lke,UQ),Ike=Aw(cke,UQ),Ake=Aw(uke,UQ),Oke=Aw(pve),gve=Ow(hke,Lw,BA,VA),Rke=Ow(dke,Lw,BA,VA),Dke=Ow(fke,Lw,BA,VA),Lke=Ow(Lw,BA,VA);function Pke(e){return Rw(e,[Tke,gve],[Ike,Rke],[Ake,Dke],[Oke,Lke])}function Mke(e){return Rw(Cke(e),[_ke,Ske])}function Nke(e){return Rw(e,[wke,hve],[Eke,hve],[kke,xke])}function Fke(e){return Rw(e,[vke,bke])}const $ke=Ow(Lw);function Bke(e){return Rw(e,[gke,$ke])}const Vke=Aw(pke,mke),Hke=Aw(mve),Uke=Ow(Lw,BA,VA);function zke(e){return Rw(e,[Vke,gve],[Hke,Uke])}const vve="Invalid Duration",bve={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Wke={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...bve},N1=146097/400,Pw=146097/4800,jke={years:{quarters:4,months:12,weeks:N1/7,days:N1,hours:N1*24,minutes:N1*24*60,seconds:N1*24*60*60,milliseconds:N1*24*60*60*1e3},quarters:{months:3,weeks:N1/28,days:N1/4,hours:N1*24/4,minutes:N1*24*60/4,seconds:N1*24*60*60/4,milliseconds:N1*24*60*60*1e3/4},months:{weeks:Pw/7,days:Pw,hours:Pw*24,minutes:Pw*24*60,seconds:Pw*24*60*60,milliseconds:Pw*24*60*60*1e3},...bve},jS=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Zke=jS.slice(0).reverse();function m5(e,t,n=!1){const i={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new ea(i)}function yve(e,t){var i;let n=(i=t.milliseconds)!=null?i:0;for(const a of Zke.slice(1))t[a]&&(n+=t[a]*e[a].milliseconds);return n}function _ve(e,t){const n=yve(e,t)<0?-1:1;jS.reduceRight((i,a)=>{if(wr(t[a]))return i;if(i){const l=t[i]*n,f=e[a][i],d=Math.floor(l/f);t[a]+=d*n,t[i]-=d*f*n}return a},null),jS.reduce((i,a)=>{if(wr(t[a]))return i;if(i){const l=t[i]%1;t[i]-=l,t[a]+=l*e[i][a]}return a},null)}function qke(e){const t={};for(const[n,i]of Object.entries(e))i!==0&&(t[n]=i);return t}class ea{constructor(t){const n=t.conversionAccuracy==="longterm"||!1;let i=n?jke:Wke;t.matrix&&(i=t.matrix),this.values=t.values,this.loc=t.loc||Ta.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=i,this.isLuxonDuration=!0}static fromMillis(t,n){return ea.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(t==null||typeof t!="object")throw new Lf("Duration.fromObject: argument expected to be an object, got ".concat(t===null?"null":typeof t));return new ea({values:nV(t,ea.normalizeUnit),loc:Ta.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(f5(t))return ea.fromMillis(t);if(ea.isDuration(t))return t;if(typeof t=="object")return ea.fromObject(t);throw new Lf("Unknown duration argument ".concat(t," of type ").concat(typeof t))}static fromISO(t,n){const[i]=Fke(t);return i?ea.fromObject(i,n):ea.invalid("unparsable",'the input "'.concat(t,"\" can't be parsed as ISO 8601"))}static fromISOTime(t,n){const[i]=Bke(t);return i?ea.fromObject(i,n):ea.invalid("unparsable",'the input "'.concat(t,"\" can't be parsed as ISO 8601"))}static invalid(t,n=null){if(!t)throw new Lf("need to specify a reason the Duration is invalid");const i=t instanceof Xg?t:new Xg(t,n);if(Uc.throwOnInvalid)throw new vEe(i);return new ea({invalid:i})}static normalizeUnit(t){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!n)throw new u0e(t);return n}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,n={}){const i={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?Pf.create(this.loc,i).formatDurationFromString(this,t):vve}toHuman(t={}){if(!this.isValid)return vve;const n=jS.map(i=>{const a=this.values[i];return wr(a)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:i.slice(0,-1)}).format(a)}).filter(i=>i);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=BQ(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1},Wo.fromMillis(n,{zone:"UTC"}).toISOTime(t))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?"Duration { values: ".concat(JSON.stringify(this.values)," }"):"Duration { Invalid, reason: ".concat(this.invalidReason," }")}toMillis(){return this.isValid?yve(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const n=ea.fromDurationLike(t),i={};for(const a of jS)(Tw(n.values,a)||Tw(this.values,a))&&(i[a]=n.get(a)+this.get(a));return m5(this,{values:i},!0)}minus(t){if(!this.isValid)return this;const n=ea.fromDurationLike(t);return this.plus(n.negate())}mapUnits(t){if(!this.isValid)return this;const n={};for(const i of Object.keys(this.values))n[i]=tve(t(this.values[i],i));return m5(this,{values:n},!0)}get(t){return this[ea.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const n={...this.values,...nV(t,ea.normalizeUnit)};return m5(this,{values:n})}reconfigure({locale:t,numberingSystem:n,conversionAccuracy:i,matrix:a}={}){const f={loc:this.loc.clone({locale:t,numberingSystem:n}),matrix:a,conversionAccuracy:i};return m5(this,f)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return _ve(this.matrix,t),m5(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=qke(this.normalize().shiftToAll().toObject());return m5(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(f=>ea.normalizeUnit(f));const n={},i={},a=this.toObject();let l;for(const f of jS)if(t.indexOf(f)>=0){l=f;let d=0;for(const b in i)d+=this.matrix[b][f]*i[b],i[b]=0;f5(a[f])&&(d+=a[f]);const h=Math.trunc(d);n[f]=h,i[f]=(d*1e3-h*1e3)/1e3}else f5(a[f])&&(i[f]=a[f]);for(const f in i)i[f]!==0&&(n[l]+=f===l?i[f]:i[f]/this.matrix[l][f]);return _ve(this.matrix,n),m5(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=this.values[n]===0?0:-this.values[n];return m5(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function n(i,a){return i===void 0||i===0?a===void 0||a===0:i===a}for(const i of jS)if(!n(this.values[i],t.values[i]))return!1;return!0}}const Mw="Invalid Interval";function Gke(e,t){return!e||!e.isValid?zc.invalid("missing or invalid start"):!t||!t.isValid?zc.invalid("missing or invalid end"):t<e?zc.invalid("end before start","The end of an interval must be after its start, but you had start=".concat(e.toISO()," and end=").concat(t.toISO())):null}class zc{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,n=null){if(!t)throw new Lf("need to specify a reason the Interval is invalid");const i=t instanceof Xg?t:new Xg(t,n);if(Uc.throwOnInvalid)throw new gEe(i);return new zc({invalid:i})}static fromDateTimes(t,n){const i=UA(t),a=UA(n),l=Gke(i,a);return l==null?new zc({start:i,end:a}):l}static after(t,n){const i=ea.fromDurationLike(n),a=UA(t);return zc.fromDateTimes(a,a.plus(i))}static before(t,n){const i=ea.fromDurationLike(n),a=UA(t);return zc.fromDateTimes(a.minus(i),a)}static fromISO(t,n){const[i,a]=(t||"").split("/",2);if(i&&a){let l,f;try{l=Wo.fromISO(i,n),f=l.isValid}catch{f=!1}let d,h;try{d=Wo.fromISO(a,n),h=d.isValid}catch{h=!1}if(f&&h)return zc.fromDateTimes(l,d);if(f){const b=ea.fromISO(a,n);if(b.isValid)return zc.after(l,b)}else if(h){const b=ea.fromISO(i,n);if(b.isValid)return zc.before(d,b)}}return zc.invalid("unparsable",'the input "'.concat(t,"\" can't be parsed as ISO 8601"))}static isInterval(t){return t&&t.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(t="milliseconds"){return this.isValid?this.toDuration(t).get(t):NaN}count(t="milliseconds",n){if(!this.isValid)return NaN;const i=this.start.startOf(t,n);let a;return n!=null&&n.useLocaleWeeks?a=this.end.reconfigure({locale:i.locale}):a=this.end,a=a.startOf(t,n),Math.floor(a.diff(i,t).get(t))+(a.valueOf()!==this.end.valueOf())}hasSame(t){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,t):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return this.isValid?this.s>t:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:n}={}){return this.isValid?zc.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];const n=t.map(UA).filter(f=>this.contains(f)).sort((f,d)=>f.toMillis()-d.toMillis()),i=[];let{s:a}=this,l=0;for(;a<this.e;){const f=n[l]||this.e,d=+f>+this.e?this.e:f;i.push(zc.fromDateTimes(a,d)),a=d,l+=1}return i}splitBy(t){const n=ea.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:i}=this,a=1,l;const f=[];for(;i<this.e;){const d=this.start.plus(n.mapUnits(h=>h*a));l=+d>+this.e?this.e:d,f.push(zc.fromDateTimes(i,l)),i=l,a+=1}return f}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return this.isValid?+this.e==+t.s:!1}abutsEnd(t){return this.isValid?+t.e==+this.s:!1}engulfs(t){return this.isValid?this.s<=t.s&&this.e>=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;const n=this.s>t.s?this.s:t.s,i=this.e<t.e?this.e:t.e;return n>=i?null:zc.fromDateTimes(n,i)}union(t){if(!this.isValid)return this;const n=this.s<t.s?this.s:t.s,i=this.e>t.e?this.e:t.e;return zc.fromDateTimes(n,i)}static merge(t){const[n,i]=t.sort((a,l)=>a.s-l.s).reduce(([a,l],f)=>l?l.overlaps(f)||l.abutsStart(f)?[a,l.union(f)]:[a.concat([l]),f]:[a,f],[[],null]);return i&&n.push(i),n}static xor(t){let n=null,i=0;const a=[],l=t.map(h=>[{time:h.s,type:"s"},{time:h.e,type:"e"}]),f=Array.prototype.concat(...l),d=f.sort((h,b)=>h.time-b.time);for(const h of d)i+=h.type==="s"?1:-1,i===1?n=h.time:(n&&+n!=+h.time&&a.push(zc.fromDateTimes(n,h.time)),n=null);return zc.merge(a)}difference(...t){return zc.xor([this].concat(t)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?"[".concat(this.s.toISO()," – ").concat(this.e.toISO(),")"):Mw}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?"Interval { start: ".concat(this.s.toISO(),", end: ").concat(this.e.toISO()," }"):"Interval { Invalid, reason: ".concat(this.invalidReason," }")}toLocaleString(t=ZB,n={}){return this.isValid?Pf.create(this.s.loc.clone(n),t).formatInterval(this):Mw}toISO(t){return this.isValid?"".concat(this.s.toISO(t),"/").concat(this.e.toISO(t)):Mw}toISODate(){return this.isValid?"".concat(this.s.toISODate(),"/").concat(this.e.toISODate()):Mw}toISOTime(t){return this.isValid?"".concat(this.s.toISOTime(t),"/").concat(this.e.toISOTime(t)):Mw}toFormat(t,{separator:n=" – "}={}){return this.isValid?"".concat(this.s.toFormat(t)).concat(n).concat(this.e.toFormat(t)):Mw}toDuration(t,n){return this.isValid?this.e.diff(this.s,t,n):ea.invalid(this.invalidReason)}mapEndpoints(t){return zc.fromDateTimes(t(this.s),t(this.e))}}class oV{static hasDST(t=Uc.defaultZone){const n=Wo.now().setZone(t).set({month:12});return!t.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(t){return Ob.isValidZone(t)}static normalizeZone(t){return d5(t,Uc.defaultZone)}static getStartOfWeek({locale:t=null,locObj:n=null}={}){return(n||Ta.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:n=null}={}){return(n||Ta.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:n=null}={}){return(n||Ta.create(t)).getWeekendDays().slice()}static months(t="long",{locale:n=null,numberingSystem:i=null,locObj:a=null,outputCalendar:l="gregory"}={}){return(a||Ta.create(n,i,l)).months(t)}static monthsFormat(t="long",{locale:n=null,numberingSystem:i=null,locObj:a=null,outputCalendar:l="gregory"}={}){return(a||Ta.create(n,i,l)).months(t,!0)}static weekdays(t="long",{locale:n=null,numberingSystem:i=null,locObj:a=null}={}){return(a||Ta.create(n,i,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:n=null,numberingSystem:i=null,locObj:a=null}={}){return(a||Ta.create(n,i,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return Ta.create(t).meridiems()}static eras(t="short",{locale:n=null}={}){return Ta.create(n,null,"gregory").eras(t)}static features(){return{relative:Y0e(),localeWeek:X0e()}}}function Sve(e,t){const n=a=>a.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=n(t)-n(e);return Math.floor(ea.fromMillis(i).as("days"))}function Kke(e,t,n){const i=[["years",(h,b)=>b.year-h.year],["quarters",(h,b)=>b.quarter-h.quarter+(b.year-h.year)*4],["months",(h,b)=>b.month-h.month+(b.year-h.year)*12],["weeks",(h,b)=>{const S=Sve(h,b);return(S-S%7)/7}],["days",Sve]],a={},l=e;let f,d;for(const[h,b]of i)n.indexOf(h)>=0&&(f=h,a[h]=b(e,t),d=l.plus(a),d>t?(a[h]--,e=l.plus(a),e>t&&(d=e,a[h]--,e=l.plus(a))):e=d);return[e,a,d,f]}function Yke(e,t,n,i){let[a,l,f,d]=Kke(e,t,n);const h=t-a,b=n.filter(k=>["hours","minutes","seconds","milliseconds"].indexOf(k)>=0);b.length===0&&(f<t&&(f=a.plus({[d]:1})),f!==a&&(l[d]=(l[d]||0)+h/(f-a)));const S=ea.fromObject(l,i);return b.length>0?ea.fromMillis(h,i).shiftTo(...b).plus(S):S}const Xke="missing Intl.DateTimeFormat.formatToParts support";function ma(e,t=n=>n){return{regex:e,deser:([n])=>t(VEe(n))}}const Cve="[ ".concat(" ","]"),wve=new RegExp(Cve,"g");function Jke(e){return e.replace(/\./g,"\\.?").replace(wve,Cve)}function Eve(e){return e.replace(/\./g,"").replace(wve," ").toLowerCase()}function Jg(e,t){return e===null?null:{regex:RegExp(e.map(Jke).join("|")),deser:([n])=>e.findIndex(i=>Eve(n)===Eve(i))+t}}function kve(e,t){return{regex:e,deser:([,n,i])=>tV(n,i),groups:t}}function rV(e){return{regex:e,deser:([t])=>t}}function Qke(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function exe(e,t){const n=Yg(t),i=Yg(t,"{2}"),a=Yg(t,"{3}"),l=Yg(t,"{4}"),f=Yg(t,"{6}"),d=Yg(t,"{1,2}"),h=Yg(t,"{1,3}"),b=Yg(t,"{1,6}"),S=Yg(t,"{1,9}"),k=Yg(t,"{2,4}"),T=Yg(t,"{4,6}"),O=W=>({regex:RegExp(Qke(W.val)),deser:([Z])=>Z,literal:!0}),B=(W=>{if(e.literal)return O(W);switch(W.val){case"G":return Jg(t.eras("short"),0);case"GG":return Jg(t.eras("long"),0);case"y":return ma(b);case"yy":return ma(k,VQ);case"yyyy":return ma(l);case"yyyyy":return ma(T);case"yyyyyy":return ma(f);case"M":return ma(d);case"MM":return ma(i);case"MMM":return Jg(t.months("short",!0),1);case"MMMM":return Jg(t.months("long",!0),1);case"L":return ma(d);case"LL":return ma(i);case"LLL":return Jg(t.months("short",!1),1);case"LLLL":return Jg(t.months("long",!1),1);case"d":return ma(d);case"dd":return ma(i);case"o":return ma(h);case"ooo":return ma(a);case"HH":return ma(i);case"H":return ma(d);case"hh":return ma(i);case"h":return ma(d);case"mm":return ma(i);case"m":return ma(d);case"q":return ma(d);case"qq":return ma(i);case"s":return ma(d);case"ss":return ma(i);case"S":return ma(h);case"SSS":return ma(a);case"u":return rV(S);case"uu":return rV(d);case"uuu":return ma(n);case"a":return Jg(t.meridiems(),0);case"kkkk":return ma(l);case"kk":return ma(k,VQ);case"W":return ma(d);case"WW":return ma(i);case"E":case"c":return ma(n);case"EEE":return Jg(t.weekdays("short",!1),1);case"EEEE":return Jg(t.weekdays("long",!1),1);case"ccc":return Jg(t.weekdays("short",!0),1);case"cccc":return Jg(t.weekdays("long",!0),1);case"Z":case"ZZ":return kve(new RegExp("([+-]".concat(d.source,")(?::(").concat(i.source,"))?")),2);case"ZZZ":return kve(new RegExp("([+-]".concat(d.source,")(").concat(i.source,")?")),2);case"z":return rV(/[a-z_+-/]{1,256}?/i);case" ":return rV(/[^\S\n\r]/);default:return O(W)}})(e)||{invalidReason:Xke};return B.token=e,B}const txe={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function nxe(e,t,n){const{type:i,value:a}=e;if(i==="literal"){const h=/^\s+$/.test(a);return{literal:!h,val:h?" ":a}}const l=t[i];let f=i;i==="hour"&&(t.hour12!=null?f=t.hour12?"hour12":"hour24":t.hourCycle!=null?t.hourCycle==="h11"||t.hourCycle==="h12"?f="hour12":f="hour24":f=n.hour12?"hour12":"hour24");let d=txe[f];if(typeof d=="object"&&(d=d[l]),d)return{literal:!1,val:d}}function sxe(e){const t=e.map(n=>n.regex).reduce((n,i)=>"".concat(n,"(").concat(i.source,")"),"");return["^".concat(t,"$"),e]}function oxe(e,t,n){const i=e.match(t);if(i){const a={};let l=1;for(const f in n)if(Tw(n,f)){const d=n[f],h=d.groups?d.groups+1:1;!d.literal&&d.token&&(a[d.token.val[0]]=d.deser(i.slice(l,l+h))),l+=h}return[i,a]}else return[i,{}]}function rxe(e){const t=l=>{switch(l){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,i;return wr(e.z)||(n=Ob.create(e.z)),wr(e.Z)||(n||(n=new $p(e.Z)),i=e.Z),wr(e.q)||(e.M=(e.q-1)*3+1),wr(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),wr(e.u)||(e.S=$Q(e.u)),[Object.keys(e).reduce((l,f)=>{const d=t(f);return d&&(l[d]=e[f]),l},{}),n,i]}let WQ=null;function ixe(){return WQ||(WQ=Wo.fromMillis(1555555555555)),WQ}function axe(e,t){if(e.literal)return e;const n=Pf.macroTokenToFormatOpts(e.val),i=Ave(n,t);return i==null||i.includes(void 0)?e:i}function xve(e,t){return Array.prototype.concat(...e.map(n=>axe(n,t)))}class Tve{constructor(t,n){if(this.locale=t,this.format=n,this.tokens=xve(Pf.parseFormat(n),t),this.units=this.tokens.map(i=>exe(i,t)),this.disqualifyingUnit=this.units.find(i=>i.invalidReason),!this.disqualifyingUnit){const[i,a]=sxe(this.units);this.regex=RegExp(i,"i"),this.handlers=a}}explainFromTokens(t){if(this.isValid){const[n,i]=oxe(t,this.regex,this.handlers),[a,l,f]=i?rxe(i):[null,null,void 0];if(Tw(i,"a")&&Tw(i,"H"))throw new kw("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:this.tokens,regex:this.regex,rawMatches:n,matches:i,result:a,zone:l,specificOffset:f}}else return{input:t,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function Ive(e,t,n){return new Tve(e,n).explainFromTokens(t)}function lxe(e,t,n){const{result:i,zone:a,specificOffset:l,invalidReason:f}=Ive(e,t,n);return[i,a,l,f]}function Ave(e,t){if(!e)return null;const i=Pf.create(t,e).dtFormatter(ixe()),a=i.formatToParts(),l=i.resolvedOptions();return a.map(f=>nxe(f,e,l))}const jQ="Invalid DateTime",cxe=864e13;function HA(e){return new Xg("unsupported zone",'the zone "'.concat(e.name,'" is not supported'))}function ZQ(e){return e.weekData===null&&(e.weekData=XB(e.c)),e.weekData}function qQ(e){return e.localWeekData===null&&(e.localWeekData=XB(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function ZS(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new Wo({...n,...t,old:n})}function Ove(e,t,n){let i=e-t*60*1e3;const a=n.offset(i);if(t===a)return[i,t];i-=(a-t)*60*1e3;const l=n.offset(i);return a===l?[i,a]:[e-Math.min(a,l)*60*1e3,Math.max(a,l)]}function iV(e,t){e+=t*60*1e3;const n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function aV(e,t,n){return Ove(eV(e),t,n)}function Rve(e,t){const n=e.o,i=e.c.year+Math.trunc(t.years),a=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,l={...e.c,year:i,month:a,day:Math.min(e.c.day,QB(i,a))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},f=ea.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),d=eV(l);let[h,b]=Ove(d,n,e.zone);return f!==0&&(h+=f,b=e.zone.offset(h)),{ts:h,o:b}}function Nw(e,t,n,i,a,l){const{setZone:f,zone:d}=n;if(e&&Object.keys(e).length!==0||t){const h=t||d,b=Wo.fromObject(e,{...n,zone:h,specificOffset:l});return f?b:b.setZone(d)}else return Wo.invalid(new Xg("unparsable",'the input "'.concat(a,"\" can't be parsed as ").concat(i)))}function lV(e,t,n=!0){return e.isValid?Pf.create(Ta.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function GQ(e,t){const n=e.c.year>9999||e.c.year<0;let i="";return n&&e.c.year>=0&&(i+="+"),i+=Au(e.c.year,n?6:4),t?(i+="-",i+=Au(e.c.month),i+="-",i+=Au(e.c.day)):(i+=Au(e.c.month),i+=Au(e.c.day)),i}function Dve(e,t,n,i,a,l){let f=Au(e.c.hour);return t?(f+=":",f+=Au(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(f+=":")):f+=Au(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(f+=Au(e.c.second),(e.c.millisecond!==0||!i)&&(f+=".",f+=Au(e.c.millisecond,3))),a&&(e.isOffsetFixed&&e.offset===0&&!l?f+="Z":e.o<0?(f+="-",f+=Au(Math.trunc(-e.o/60)),f+=":",f+=Au(Math.trunc(-e.o%60))):(f+="+",f+=Au(Math.trunc(e.o/60)),f+=":",f+=Au(Math.trunc(e.o%60)))),l&&(f+="["+e.zone.ianaName+"]"),f}const Lve={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},uxe={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},dxe={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Pve=["year","month","day","hour","minute","second","millisecond"],fxe=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],pxe=["year","ordinal","hour","minute","second","millisecond"];function mxe(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new u0e(e);return t}function Mve(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return mxe(e)}}function hxe(e){return uV[e]||(cV===void 0&&(cV=Uc.now()),uV[e]=e.offset(cV)),uV[e]}function Nve(e,t){const n=d5(t.zone,Uc.defaultZone);if(!n.isValid)return Wo.invalid(HA(n));const i=Ta.fromObject(t);let a,l;if(wr(e.year))a=Uc.now();else{for(const h of Pve)wr(e[h])&&(e[h]=Lve[h]);const f=G0e(e)||K0e(e);if(f)return Wo.invalid(f);const d=hxe(n);[a,l]=aV(e,d,n)}return new Wo({ts:a,zone:n,loc:i,o:l})}function Fve(e,t,n){const i=wr(n.round)?!0:n.round,a=(f,d)=>(f=BQ(f,i||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(f,d)),l=f=>n.calendary?t.hasSame(e,f)?0:t.startOf(f).diff(e.startOf(f),f).get(f):t.diff(e,f).get(f);if(n.unit)return a(l(n.unit),n.unit);for(const f of n.units){const d=l(f);if(Math.abs(d)>=1)return a(d,f)}return a(e>t?-0:0,n.units[n.units.length-1])}function $ve(e){let t={},n;return e.length>0&&typeof e[e.length-1]=="object"?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}let cV,uV={};class Wo{constructor(t){const n=t.zone||Uc.defaultZone;let i=t.invalid||(Number.isNaN(t.ts)?new Xg("invalid input"):null)||(n.isValid?null:HA(n));this.ts=wr(t.ts)?Uc.now():t.ts;let a=null,l=null;if(!i)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(n))[a,l]=[t.old.c,t.old.o];else{const d=f5(t.o)&&!t.old?t.o:n.offset(this.ts);a=iV(this.ts,d),i=Number.isNaN(a.year)?new Xg("invalid input"):null,a=i?null:a,l=i?null:d}this._zone=n,this.loc=t.loc||Ta.create(),this.invalid=i,this.weekData=null,this.localWeekData=null,this.c=a,this.o=l,this.isLuxonDateTime=!0}static now(){return new Wo({})}static local(){const[t,n]=$ve(arguments),[i,a,l,f,d,h,b]=n;return Nve({year:i,month:a,day:l,hour:f,minute:d,second:h,millisecond:b},t)}static utc(){const[t,n]=$ve(arguments),[i,a,l,f,d,h,b]=n;return t.zone=$p.utcInstance,Nve({year:i,month:a,day:l,hour:f,minute:d,second:h,millisecond:b},t)}static fromJSDate(t,n={}){const i=jEe(t)?t.valueOf():NaN;if(Number.isNaN(i))return Wo.invalid("invalid input");const a=d5(n.zone,Uc.defaultZone);return a.isValid?new Wo({ts:i,zone:a,loc:Ta.fromObject(n)}):Wo.invalid(HA(a))}static fromMillis(t,n={}){if(f5(t))return t<-864e13||t>cxe?Wo.invalid("Timestamp out of range"):new Wo({ts:t,zone:d5(n.zone,Uc.defaultZone),loc:Ta.fromObject(n)});throw new Lf("fromMillis requires a numerical input, but received a ".concat(typeof t," with value ").concat(t))}static fromSeconds(t,n={}){if(f5(t))return new Wo({ts:t*1e3,zone:d5(n.zone,Uc.defaultZone),loc:Ta.fromObject(n)});throw new Lf("fromSeconds requires a numerical input")}static fromObject(t,n={}){t=t||{};const i=d5(n.zone,Uc.defaultZone);if(!i.isValid)return Wo.invalid(HA(i));const a=Ta.fromObject(n),l=nV(t,Mve),{minDaysInFirstWeek:f,startOfWeek:d}=q0e(l,a),h=Uc.now(),b=wr(n.specificOffset)?i.offset(h):n.specificOffset,S=!wr(l.ordinal),k=!wr(l.year),T=!wr(l.month)||!wr(l.day),O=k||T,P=l.weekYear||l.weekNumber;if((O||S)&&P)throw new kw("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(T&&S)throw new kw("Can't mix ordinal dates with month/day");const B=P||l.weekday&&!O;let W,Z,Y=iV(h,b);B?(W=fxe,Z=uxe,Y=XB(Y,f,d)):S?(W=pxe,Z=dxe,Y=NQ(Y)):(W=Pve,Z=Lve);let z=!1;for(const de of W){const he=l[de];wr(he)?z?l[de]=Z[de]:l[de]=Y[de]:z=!0}const q=B?UEe(l,f,d):S?zEe(l):G0e(l),ne=q||K0e(l);if(ne)return Wo.invalid(ne);const ue=B?j0e(l,f,d):S?Z0e(l):l,[J,ce]=aV(ue,b,i),ge=new Wo({ts:J,zone:i,o:ce,loc:a});return l.weekday&&O&&t.weekday!==ge.weekday?Wo.invalid("mismatched weekday","you can't specify both a weekday of ".concat(l.weekday," and a date of ").concat(ge.toISO())):ge.isValid?ge:Wo.invalid(ge.invalid)}static fromISO(t,n={}){const[i,a]=Pke(t);return Nw(i,a,n,"ISO 8601",t)}static fromRFC2822(t,n={}){const[i,a]=Mke(t);return Nw(i,a,n,"RFC 2822",t)}static fromHTTP(t,n={}){const[i,a]=Nke(t);return Nw(i,a,n,"HTTP",n)}static fromFormat(t,n,i={}){if(wr(t)||wr(n))throw new Lf("fromFormat requires an input string and a format");const{locale:a=null,numberingSystem:l=null}=i,f=Ta.fromOpts({locale:a,numberingSystem:l,defaultToEN:!0}),[d,h,b,S]=lxe(f,t,n);return S?Wo.invalid(S):Nw(d,h,i,"format ".concat(n),t,b)}static fromString(t,n,i={}){return Wo.fromFormat(t,n,i)}static fromSQL(t,n={}){const[i,a]=zke(t);return Nw(i,a,n,"SQL",t)}static invalid(t,n=null){if(!t)throw new Lf("need to specify a reason the DateTime is invalid");const i=t instanceof Xg?t:new Xg(t,n);if(Uc.throwOnInvalid)throw new hEe(i);return new Wo({invalid:i})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,n={}){const i=Ave(t,Ta.fromObject(n));return i?i.map(a=>a?a.val:null).join(""):null}static expandFormat(t,n={}){return xve(Pf.parseFormat(t),Ta.fromObject(n)).map(a=>a.val).join("")}static resetCache(){cV=void 0,uV={}}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?ZQ(this).weekYear:NaN}get weekNumber(){return this.isValid?ZQ(this).weekNumber:NaN}get weekday(){return this.isValid?ZQ(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?qQ(this).weekday:NaN}get localWeekNumber(){return this.isValid?qQ(this).weekNumber:NaN}get localWeekYear(){return this.isValid?qQ(this).weekYear:NaN}get ordinal(){return this.isValid?NQ(this.c).ordinal:NaN}get monthShort(){return this.isValid?oV.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?oV.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?oV.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?oV.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const t=864e5,n=6e4,i=eV(this.c),a=this.zone.offset(i-t),l=this.zone.offset(i+t),f=this.zone.offset(i-a*n),d=this.zone.offset(i-l*n);if(f===d)return[this];const h=i-f*n,b=i-d*n,S=iV(h,f),k=iV(b,d);return S.hour===k.hour&&S.minute===k.minute&&S.second===k.second&&S.millisecond===k.millisecond?[ZS(this,{ts:h}),ZS(this,{ts:b})]:[this]}get isInLeapYear(){return NA(this.year)}get daysInMonth(){return QB(this.year,this.month)}get daysInYear(){return this.isValid?Iw(this.year):NaN}get weeksInWeekYear(){return this.isValid?FA(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?FA(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){const{locale:n,numberingSystem:i,calendar:a}=Pf.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:n,numberingSystem:i,outputCalendar:a}}toUTC(t=0,n={}){return this.setZone($p.instance(t),n)}toLocal(){return this.setZone(Uc.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:i=!1}={}){if(t=d5(t,Uc.defaultZone),t.equals(this.zone))return this;if(t.isValid){let a=this.ts;if(n||i){const l=t.offset(this.ts),f=this.toObject();[a]=aV(f,l,t)}return ZS(this,{ts:a,zone:t})}else return Wo.invalid(HA(t))}reconfigure({locale:t,numberingSystem:n,outputCalendar:i}={}){const a=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:i});return ZS(this,{loc:a})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const n=nV(t,Mve),{minDaysInFirstWeek:i,startOfWeek:a}=q0e(n,this.loc),l=!wr(n.weekYear)||!wr(n.weekNumber)||!wr(n.weekday),f=!wr(n.ordinal),d=!wr(n.year),h=!wr(n.month)||!wr(n.day),b=d||h,S=n.weekYear||n.weekNumber;if((b||f)&&S)throw new kw("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(h&&f)throw new kw("Can't mix ordinal dates with month/day");let k;l?k=j0e({...XB(this.c,i,a),...n},i,a):wr(n.ordinal)?(k={...this.toObject(),...n},wr(n.day)&&(k.day=Math.min(QB(k.year,k.month),k.day))):k=Z0e({...NQ(this.c),...n});const[T,O]=aV(k,this.o,this.zone);return ZS(this,{ts:T,o:O})}plus(t){if(!this.isValid)return this;const n=ea.fromDurationLike(t);return ZS(this,Rve(this,n))}minus(t){if(!this.isValid)return this;const n=ea.fromDurationLike(t).negate();return ZS(this,Rve(this,n))}startOf(t,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const i={},a=ea.normalizeUnit(t);switch(a){case"years":i.month=1;case"quarters":case"months":i.day=1;case"weeks":case"days":i.hour=0;case"hours":i.minute=0;case"minutes":i.second=0;case"seconds":i.millisecond=0;break}if(a==="weeks")if(n){const l=this.loc.getStartOfWeek(),{weekday:f}=this;f<l&&(i.weekNumber=this.weekNumber-1),i.weekday=l}else i.weekday=1;if(a==="quarters"){const l=Math.ceil(this.month/3);i.month=(l-1)*3+1}return this.set(i)}endOf(t,n){return this.isValid?this.plus({[t]:1}).startOf(t,n).minus(1):this}toFormat(t,n={}){return this.isValid?Pf.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,t):jQ}toLocaleString(t=ZB,n={}){return this.isValid?Pf.create(this.loc.clone(n),t).formatDateTime(this):jQ}toLocaleParts(t={}){return this.isValid?Pf.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:n=!1,suppressMilliseconds:i=!1,includeOffset:a=!0,extendedZone:l=!1}={}){if(!this.isValid)return null;const f=t==="extended";let d=GQ(this,f);return d+="T",d+=Dve(this,f,n,i,a,l),d}toISODate({format:t="extended"}={}){return this.isValid?GQ(this,t==="extended"):null}toISOWeekDate(){return lV(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:n=!1,includeOffset:i=!0,includePrefix:a=!1,extendedZone:l=!1,format:f="extended"}={}){return this.isValid?(a?"T":"")+Dve(this,f==="extended",n,t,i,l):null}toRFC2822(){return lV(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return lV(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?GQ(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:n=!1,includeOffsetSpace:i=!0}={}){let a="HH:mm:ss.SSS";return(n||t)&&(i&&(a+=" "),n?a+="z":t&&(a+="ZZ")),lV(this,a,!0)}toSQL(t={}){return this.isValid?"".concat(this.toSQLDate()," ").concat(this.toSQLTime(t)):null}toString(){return this.isValid?this.toISO():jQ}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?"DateTime { ts: ".concat(this.toISO(),", zone: ").concat(this.zone.name,", locale: ").concat(this.locale," }"):"DateTime { Invalid, reason: ".concat(this.invalidReason," }")}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(t={}){if(!this.isValid)return{};const n={...this.c};return t.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,n="milliseconds",i={}){if(!this.isValid||!t.isValid)return ea.invalid("created by diffing an invalid DateTime");const a={locale:this.locale,numberingSystem:this.numberingSystem,...i},l=ZEe(n).map(ea.normalizeUnit),f=t.valueOf()>this.valueOf(),d=f?this:t,h=f?t:this,b=Yke(d,h,l,a);return f?b.negate():b}diffNow(t="milliseconds",n={}){return this.diff(Wo.now(),t,n)}until(t){return this.isValid?zc.fromDateTimes(this,t):this}hasSame(t,n,i){if(!this.isValid)return!1;const a=t.valueOf(),l=this.setZone(t.zone,{keepLocalTime:!0});return l.startOf(n,i)<=a&&a<=l.endOf(n,i)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const n=t.base||Wo.fromObject({},{zone:this.zone}),i=t.padding?this<n?-t.padding:t.padding:0;let a=["years","months","days","hours","minutes","seconds"],l=t.unit;return Array.isArray(t.unit)&&(a=t.unit,l=void 0),Fve(n,this.plus(i),{...t,numeric:"always",units:a,unit:l})}toRelativeCalendar(t={}){return this.isValid?Fve(t.base||Wo.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(Wo.isDateTime))throw new Lf("min requires all arguments be DateTimes");return J0e(t,n=>n.valueOf(),Math.min)}static max(...t){if(!t.every(Wo.isDateTime))throw new Lf("max requires all arguments be DateTimes");return J0e(t,n=>n.valueOf(),Math.max)}static fromFormatExplain(t,n,i={}){const{locale:a=null,numberingSystem:l=null}=i,f=Ta.fromOpts({locale:a,numberingSystem:l,defaultToEN:!0});return Ive(f,t,n)}static fromStringExplain(t,n,i={}){return Wo.fromFormatExplain(t,n,i)}static buildFormatParser(t,n={}){const{locale:i=null,numberingSystem:a=null}=n,l=Ta.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0});return new Tve(l,t)}static fromFormatParser(t,n,i={}){if(wr(t)||wr(n))throw new Lf("fromFormatParser requires an input string and a format parser");const{locale:a=null,numberingSystem:l=null}=i,f=Ta.fromOpts({locale:a,numberingSystem:l,defaultToEN:!0});if(!f.equals(n.locale))throw new Lf("fromFormatParser called with a locale of ".concat(f,", ")+"but the format parser was created for ".concat(n.locale));const{result:d,zone:h,specificOffset:b,invalidReason:S}=n.explainFromTokens(t);return S?Wo.invalid(S):Nw(d,h,i,"format ".concat(n.format),t,b)}static get DATE_SHORT(){return ZB}static get DATE_MED(){return d0e}static get DATE_MED_WITH_WEEKDAY(){return bEe}static get DATE_FULL(){return f0e}static get DATE_HUGE(){return p0e}static get TIME_SIMPLE(){return m0e}static get TIME_WITH_SECONDS(){return h0e}static get TIME_WITH_SHORT_OFFSET(){return g0e}static get TIME_WITH_LONG_OFFSET(){return v0e}static get TIME_24_SIMPLE(){return b0e}static get TIME_24_WITH_SECONDS(){return y0e}static get TIME_24_WITH_SHORT_OFFSET(){return _0e}static get TIME_24_WITH_LONG_OFFSET(){return S0e}static get DATETIME_SHORT(){return C0e}static get DATETIME_SHORT_WITH_SECONDS(){return w0e}static get DATETIME_MED(){return E0e}static get DATETIME_MED_WITH_SECONDS(){return k0e}static get DATETIME_MED_WITH_WEEKDAY(){return yEe}static get DATETIME_FULL(){return x0e}static get DATETIME_FULL_WITH_SECONDS(){return T0e}static get DATETIME_HUGE(){return I0e}static get DATETIME_HUGE_WITH_SECONDS(){return A0e}}function UA(e){if(Wo.isDateTime(e))return e;if(e&&e.valueOf&&f5(e.valueOf()))return Wo.fromJSDate(e);if(e&&typeof e=="object")return Wo.fromObject(e);throw new Lf("Unknown datetime argument: ".concat(e,", of type ").concat(typeof e))}function xc(e,t){var n;return typeof pkp>"u"||typeof((n=pkp==null?void 0:pkp.localeKeys)==null?void 0:n[e])>"u"?"":typeof t>"u"?pkp.localeKeys[e]:Bve(pkp.localeKeys[e],t)}function Bve(e,t){for(var n in t){let i=t[n];i===Object(i)&&(i=KQ(i));const a=new RegExp("{\\$"+n+"}","g");e=e.replace(a,i)}return e}function KQ(e,t){if(e){if(t!==void 0)return Object.prototype.hasOwnProperty.call(e,t)?e[t]:"";if(Object.prototype.hasOwnProperty.call(e,$.pkp.app.currentLocale)&&e[$.pkp.app.currentLocale])return e[$.pkp.app.currentLocale];if(Object.prototype.hasOwnProperty.call(e,$.pkp.app.primaryLocale)&&e[$.pkp.app.primaryLocale])return e[$.pkp.app.primaryLocale]}else return"";for(var n in e)if(e[n])return e[n];return""}function Vve(e,t){if(typeof e>"u")return"";if(Object.prototype.hasOwnProperty.call(e,$.pkp.app.currentLocale)&&e[$.pkp.app.currentLocale])return e[$.pkp.app.currentLocale];if(Object.prototype.hasOwnProperty.call(e,t)&&e[t])return e[t];if(Object.prototype.hasOwnProperty.call(e,$.pkp.app.primaryLocale)&&e[$.pkp.app.primaryLocale])return e[$.pkp.app.primaryLocale];for(var n in e)if(e[n])return e[n];return""}const gxe={methods:{t:function(e,t){return xc(e,t)},getBrowserSafeDate(e){return Wo.fromISO(e,{zone:"utc"}).toJSDate()},localize:function(e,t){return KQ(e,t)},localizeDate(e,t){if(!e)return"";e=this.getBrowserSafeDate(e);let n=t!==void 0?t.replace("_","-"):$.pkp.app.currentLocale.replace("_","-");return e.toLocaleDateString(n,{weekday:"long",year:"numeric",month:"long",day:"numeric"})},replaceLocaleParams(e,t){return Bve(e,t)},setFocusIn(e,t){const n=["button","[href]","input","select","textarea","details",'[tabindex]:not([tabindex="-1"])'];let i=[...e.querySelectorAll(n.join(","))].filter(a=>!a.hasAttribute("disabled")).filter(a=>!a.hasAttribute("aria-hidden"));i.length&&(t?i[i.length-1].focus():i[0].focus())},setFocusToRef(e){this.$refs[e]&&(this.$refs[e].$el?this.$refs[e].$el.focus():typeof this.$refs[e].focus<"u"&&this.$refs[e].focus())}}};var vxe=Object.defineProperty,Hve=Object.prototype.hasOwnProperty,dV=Object.getOwnPropertySymbols,Uve=Object.prototype.propertyIsEnumerable,zve=(e,t,n)=>t in e?vxe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fV=(e,t)=>{for(var n in t||(t={}))Hve.call(t,n)&&zve(e,n,t[n]);if(dV)for(var n of dV(t))Uve.call(t,n)&&zve(e,n,t[n]);return e};const Wve=e=>requestAnimationFrame(()=>requestAnimationFrame(e)),bxe=typeof window<"u",YQ=Symbol("_vue-announcer_"),yxe={message:"",politeness:"polite",routeComplement:"has loaded",router:!1};function _xe(){const e=Mr(YQ),{data:t}=e;return((n,i)=>{var a={};for(var l in n)Hve.call(n,l)&&i.indexOf(l)<0&&(a[l]=n[l]);if(n!=null&&dV)for(var l of dV(n))i.indexOf(l)<0&&Uve.call(n,l)&&(a[l]=n[l]);return a})(e,["data"])}var XQ=Gr({name:"VueAnnouncer",setup(){const{data:e}=Mr(YQ),{announce:t}=_xe();return e.value.router&&e.value.router.afterEach(n=>{const i=kt(fV({},n.meta.announcer));!i.value.skip&&bxe&&setTimeout(()=>{Wve(()=>{const a=(i.value.message||document.title).trim(),l=(i.value.routeComplement||e.value.routeComplement).trim(),f=i.value.politeness||null;t("".concat(a," ").concat(l),f)})},500)}),{data:e}}});const Sxe=q$()((e,t)=>(L(),Ee("div",{id:"announcer",class:"announcer","aria-atomic":"true","aria-live":e.data.politeness,innerHTML:e.data.message},null,8,["aria-live","innerHTML"])));function Cxe(e,t={}){t=fV(fV({},yxe),t),e.component("VueAnnouncer",XQ);const n=kt(null),i=()=>fV({message:""},t),a=kt(t.routeComplement);function l(b,S){n.value=i(),S&&(n.value.politeness=S),Wve(()=>{n.value.routeComplement=a.value||n.value.routeComplement,n.value.message=b.trim()})}function f(b){return l(b,"polite")}function d(b){return l(b,"assertive")}function h(b){typeof b=="string"&&(a.value=b)}n.value=i(),e.provide(YQ,{data:n,announce:l,polite:f,assertive:d,setRouteComplement:h}),e.config.globalProperties.$announcer={set:l,polite:f,assertive:d,setRouteComplement:h}}XQ.render=Sxe,XQ.__scopeId="data-v-6a5b1d5f";const wxe=["top","right","bottom","left"],jve=["start","end"],Zve=wxe.reduce((e,t)=>e.concat(t,t+"-"+jve[0],t+"-"+jve[1]),[]),zA=Math.min,qS=Math.max,Exe={left:"right",right:"left",bottom:"top",top:"bottom"},kxe={start:"end",end:"start"};function JQ(e,t,n){return qS(e,zA(t,n))}function GS(e,t){return typeof e=="function"?e(t):e}function Av(e){return e.split("-")[0]}function Qg(e){return e.split("-")[1]}function qve(e){return e==="x"?"y":"x"}function QQ(e){return e==="y"?"height":"width"}function KS(e){return["top","bottom"].includes(Av(e))?"y":"x"}function eee(e){return qve(KS(e))}function Gve(e,t,n){n===void 0&&(n=!1);const i=Qg(e),a=eee(e),l=QQ(a);let f=a==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(f=mV(f)),[f,mV(f)]}function xxe(e){const t=mV(e);return[pV(e),t,pV(t)]}function pV(e){return e.replace(/start|end/g,t=>kxe[t])}function Txe(e,t,n){const i=["left","right"],a=["right","left"],l=["top","bottom"],f=["bottom","top"];switch(e){case"top":case"bottom":return n?t?a:i:t?i:a;case"left":case"right":return t?l:f;default:return[]}}function Ixe(e,t,n,i){const a=Qg(e);let l=Txe(Av(e),n==="start",i);return a&&(l=l.map(f=>f+"-"+a),t&&(l=l.concat(l.map(pV)))),l}function mV(e){return e.replace(/left|right|bottom|top/g,t=>Exe[t])}function Axe(e){return{top:0,right:0,bottom:0,left:0,...e}}function Kve(e){return typeof e!="number"?Axe(e):{top:e,right:e,bottom:e,left:e}}function WA(e){const{x:t,y:n,width:i,height:a}=e;return{width:i,height:a,top:n,left:t,right:t+i,bottom:n+a,x:t,y:n}}function Yve(e,t,n){let{reference:i,floating:a}=e;const l=KS(t),f=eee(t),d=QQ(f),h=Av(t),b=l==="y",S=i.x+i.width/2-a.width/2,k=i.y+i.height/2-a.height/2,T=i[d]/2-a[d]/2;let O;switch(h){case"top":O={x:S,y:i.y-a.height};break;case"bottom":O={x:S,y:i.y+i.height};break;case"right":O={x:i.x+i.width,y:k};break;case"left":O={x:i.x-a.width,y:k};break;default:O={x:i.x,y:i.y}}switch(Qg(t)){case"start":O[f]-=T*(n&&b?-1:1);break;case"end":O[f]+=T*(n&&b?-1:1);break}return O}const Oxe=async(e,t,n)=>{const{placement:i="bottom",strategy:a="absolute",middleware:l=[],platform:f}=n,d=l.filter(Boolean),h=await(f.isRTL==null?void 0:f.isRTL(t));let b=await f.getElementRects({reference:e,floating:t,strategy:a}),{x:S,y:k}=Yve(b,i,h),T=i,O={},P=0;for(let B=0;B<d.length;B++){const{name:W,fn:Z}=d[B],{x:Y,y:z,data:q,reset:ne}=await Z({x:S,y:k,initialPlacement:i,placement:T,strategy:a,middlewareData:O,rects:b,platform:f,elements:{reference:e,floating:t}});S=Y!=null?Y:S,k=z!=null?z:k,O={...O,[W]:{...O[W],...q}},ne&&P<=50&&(P++,typeof ne=="object"&&(ne.placement&&(T=ne.placement),ne.rects&&(b=ne.rects===!0?await f.getElementRects({reference:e,floating:t,strategy:a}):ne.rects),{x:S,y:k}=Yve(b,T,h)),B=-1)}return{x:S,y:k,placement:T,strategy:a,middlewareData:O}};async function hV(e,t){var n;t===void 0&&(t={});const{x:i,y:a,platform:l,rects:f,elements:d,strategy:h}=e,{boundary:b="clippingAncestors",rootBoundary:S="viewport",elementContext:k="floating",altBoundary:T=!1,padding:O=0}=GS(t,e),P=Kve(O),W=d[T?k==="floating"?"reference":"floating":k],Z=WA(await l.getClippingRect({element:(n=await(l.isElement==null?void 0:l.isElement(W)))==null||n?W:W.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(d.floating)),boundary:b,rootBoundary:S,strategy:h})),Y=k==="floating"?{x:i,y:a,width:f.floating.width,height:f.floating.height}:f.reference,z=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d.floating)),q=await(l.isElement==null?void 0:l.isElement(z))?await(l.getScale==null?void 0:l.getScale(z))||{x:1,y:1}:{x:1,y:1},ne=WA(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:Y,offsetParent:z,strategy:h}):Y);return{top:(Z.top-ne.top+P.top)/q.y,bottom:(ne.bottom-Z.bottom+P.bottom)/q.y,left:(Z.left-ne.left+P.left)/q.x,right:(ne.right-Z.right+P.right)/q.x}}const Rxe=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:i,placement:a,rects:l,platform:f,elements:d,middlewareData:h}=t,{element:b,padding:S=0}=GS(e,t)||{};if(b==null)return{};const k=Kve(S),T={x:n,y:i},O=eee(a),P=QQ(O),B=await f.getDimensions(b),W=O==="y",Z=W?"top":"left",Y=W?"bottom":"right",z=W?"clientHeight":"clientWidth",q=l.reference[P]+l.reference[O]-T[O]-l.floating[P],ne=T[O]-l.reference[O],ue=await(f.getOffsetParent==null?void 0:f.getOffsetParent(b));let J=ue?ue[z]:0;(!J||!await(f.isElement==null?void 0:f.isElement(ue)))&&(J=d.floating[z]||l.floating[P]);const ce=q/2-ne/2,ge=J/2-B[P]/2-1,de=zA(k[Z],ge),he=zA(k[Y],ge),ie=de,Be=J-B[P]-he,$e=J/2-B[P]/2+ce,Ue=JQ(ie,$e,Be),V=!h.arrow&&Qg(a)!=null&&$e!==Ue&&l.reference[P]/2-($e<ie?de:he)-B[P]/2<0,Ye=V?$e<ie?$e-ie:$e-Be:0;return{[O]:T[O]+Ye,data:{[O]:Ue,centerOffset:$e-Ue-Ye,...V&&{alignmentOffset:Ye}},reset:V}}});function Dxe(e,t,n){return(e?[...n.filter(a=>Qg(a)===e),...n.filter(a=>Qg(a)!==e)]:n.filter(a=>Av(a)===a)).filter(a=>e?Qg(a)===e||(t?pV(a)!==a:!1):!0)}const Lxe=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,i,a;const{rects:l,middlewareData:f,placement:d,platform:h,elements:b}=t,{crossAxis:S=!1,alignment:k,allowedPlacements:T=Zve,autoAlignment:O=!0,...P}=GS(e,t),B=k!==void 0||T===Zve?Dxe(k||null,O,T):T,W=await hV(t,P),Z=((n=f.autoPlacement)==null?void 0:n.index)||0,Y=B[Z];if(Y==null)return{};const z=Gve(Y,l,await(h.isRTL==null?void 0:h.isRTL(b.floating)));if(d!==Y)return{reset:{placement:B[0]}};const q=[W[Av(Y)],W[z[0]],W[z[1]]],ne=[...((i=f.autoPlacement)==null?void 0:i.overflows)||[],{placement:Y,overflows:q}],ue=B[Z+1];if(ue)return{data:{index:Z+1,overflows:ne},reset:{placement:ue}};const J=ne.map(de=>{const he=Qg(de.placement);return[de.placement,he&&S?de.overflows.slice(0,2).reduce((ie,Be)=>ie+Be,0):de.overflows[0],de.overflows]}).sort((de,he)=>de[1]-he[1]),ge=((a=J.filter(de=>de[2].slice(0,Qg(de[0])?2:3).every(he=>he<=0))[0])==null?void 0:a[0])||J[0][0];return ge!==d?{data:{index:Z+1,overflows:ne},reset:{placement:ge}}:{}}}},Pxe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:a,middlewareData:l,rects:f,initialPlacement:d,platform:h,elements:b}=t,{mainAxis:S=!0,crossAxis:k=!0,fallbackPlacements:T,fallbackStrategy:O="bestFit",fallbackAxisSideDirection:P="none",flipAlignment:B=!0,...W}=GS(e,t);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const Z=Av(a),Y=KS(d),z=Av(d)===d,q=await(h.isRTL==null?void 0:h.isRTL(b.floating)),ne=T||(z||!B?[mV(d)]:xxe(d)),ue=P!=="none";!T&&ue&&ne.push(...Ixe(d,B,P,q));const J=[d,...ne],ce=await hV(t,W),ge=[];let de=((i=l.flip)==null?void 0:i.overflows)||[];if(S&&ge.push(ce[Z]),k){const $e=Gve(a,f,q);ge.push(ce[$e[0]],ce[$e[1]])}if(de=[...de,{placement:a,overflows:ge}],!ge.every($e=>$e<=0)){var he,ie;const $e=(((he=l.flip)==null?void 0:he.index)||0)+1,Ue=J[$e];if(Ue)return{data:{index:$e,overflows:de},reset:{placement:Ue}};let V=(ie=de.filter(Ye=>Ye.overflows[0]<=0).sort((Ye,Fe)=>Ye.overflows[1]-Fe.overflows[1])[0])==null?void 0:ie.placement;if(!V)switch(O){case"bestFit":{var Be;const Ye=(Be=de.filter(Fe=>{if(ue){const St=KS(Fe.placement);return St===Y||St==="y"}return!0}).map(Fe=>[Fe.placement,Fe.overflows.filter(St=>St>0).reduce((St,Dt)=>St+Dt,0)]).sort((Fe,St)=>Fe[1]-St[1])[0])==null?void 0:Be[0];Ye&&(V=Ye);break}case"initialPlacement":V=d;break}if(a!==V)return{reset:{placement:V}}}return{}}}};async function Mxe(e,t){const{placement:n,platform:i,elements:a}=e,l=await(i.isRTL==null?void 0:i.isRTL(a.floating)),f=Av(n),d=Qg(n),h=KS(n)==="y",b=["left","top"].includes(f)?-1:1,S=l&&h?-1:1,k=GS(t,e);let{mainAxis:T,crossAxis:O,alignmentAxis:P}=typeof k=="number"?{mainAxis:k,crossAxis:0,alignmentAxis:null}:{mainAxis:k.mainAxis||0,crossAxis:k.crossAxis||0,alignmentAxis:k.alignmentAxis};return d&&typeof P=="number"&&(O=d==="end"?P*-1:P),h?{x:O*S,y:T*b}:{x:T*b,y:O*S}}const Nxe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:a,y:l,placement:f,middlewareData:d}=t,h=await Mxe(t,e);return f===((n=d.offset)==null?void 0:n.placement)&&(i=d.arrow)!=null&&i.alignmentOffset?{}:{x:a+h.x,y:l+h.y,data:{...h,placement:f}}}}},Fxe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:a}=t,{mainAxis:l=!0,crossAxis:f=!1,limiter:d={fn:W=>{let{x:Z,y:Y}=W;return{x:Z,y:Y}}},...h}=GS(e,t),b={x:n,y:i},S=await hV(t,h),k=KS(Av(a)),T=qve(k);let O=b[T],P=b[k];if(l){const W=T==="y"?"top":"left",Z=T==="y"?"bottom":"right",Y=O+S[W],z=O-S[Z];O=JQ(Y,O,z)}if(f){const W=k==="y"?"top":"left",Z=k==="y"?"bottom":"right",Y=P+S[W],z=P-S[Z];P=JQ(Y,P,z)}const B=d.fn({...t,[T]:O,[k]:P});return{...B,data:{x:B.x-n,y:B.y-i,enabled:{[T]:l,[k]:f}}}}}},$xe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,i;const{placement:a,rects:l,platform:f,elements:d}=t,{apply:h=()=>{},...b}=GS(e,t),S=await hV(t,b),k=Av(a),T=Qg(a),O=KS(a)==="y",{width:P,height:B}=l.floating;let W,Z;k==="top"||k==="bottom"?(W=k,Z=T===(await(f.isRTL==null?void 0:f.isRTL(d.floating))?"start":"end")?"left":"right"):(Z=k,W=T==="end"?"top":"bottom");const Y=B-S.top-S.bottom,z=P-S.left-S.right,q=zA(B-S[W],Y),ne=zA(P-S[Z],z),ue=!t.middlewareData.shift;let J=q,ce=ne;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(ce=z),(i=t.middlewareData.shift)!=null&&i.enabled.y&&(J=Y),ue&&!T){const de=qS(S.left,0),he=qS(S.right,0),ie=qS(S.top,0),Be=qS(S.bottom,0);O?ce=P-2*(de!==0||he!==0?de+he:qS(S.left,S.right)):J=B-2*(ie!==0||Be!==0?ie+Be:qS(S.top,S.bottom))}await h({...t,availableWidth:ce,availableHeight:J});const ge=await f.getDimensions(d.floating);return P!==ge.width||B!==ge.height?{reset:{rects:!0}}:{}}}};function F1(e){var t;return((t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ov(e){return F1(e).getComputedStyle(e)}const Xve=Math.min,jA=Math.max,gV=Math.round;function Jve(e){const t=Ov(e);let n=parseFloat(t.width),i=parseFloat(t.height);const a=e.offsetWidth,l=e.offsetHeight,f=gV(n)!==a||gV(i)!==l;return f&&(n=a,i=l),{width:n,height:i,fallback:f}}function h5(e){return e2e(e)?(e.nodeName||"").toLowerCase():""}let vV;function Qve(){if(vV)return vV;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(vV=e.brands.map(t=>t.brand+"/"+t.version).join(" "),vV):navigator.userAgent}function Rv(e){return e instanceof F1(e).HTMLElement}function g5(e){return e instanceof F1(e).Element}function e2e(e){return e instanceof F1(e).Node}function t2e(e){return typeof ShadowRoot>"u"?!1:e instanceof F1(e).ShadowRoot||e instanceof ShadowRoot}function bV(e){const{overflow:t,overflowX:n,overflowY:i,display:a}=Ov(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!["inline","contents"].includes(a)}function Bxe(e){return["table","td","th"].includes(h5(e))}function tee(e){const t=/firefox/i.test(Qve()),n=Ov(e),i=n.backdropFilter||n.WebkitBackdropFilter;return n.transform!=="none"||n.perspective!=="none"||!!i&&i!=="none"||t&&n.willChange==="filter"||t&&!!n.filter&&n.filter!=="none"||["transform","perspective"].some(a=>n.willChange.includes(a))||["paint","layout","strict","content"].some(a=>{const l=n.contain;return l!=null&&l.includes(a)})}function n2e(){return!/^((?!chrome|android).)*safari/i.test(Qve())}function nee(e){return["html","body","#document"].includes(h5(e))}function s2e(e){return g5(e)?e:e.contextElement}const o2e={x:1,y:1};function Fw(e){const t=s2e(e);if(!Rv(t))return o2e;const n=t.getBoundingClientRect(),{width:i,height:a,fallback:l}=Jve(t);let f=(l?gV(n.width):n.width)/i,d=(l?gV(n.height):n.height)/a;return f&&Number.isFinite(f)||(f=1),d&&Number.isFinite(d)||(d=1),{x:f,y:d}}function ZA(e,t,n,i){var a,l;t===void 0&&(t=!1),n===void 0&&(n=!1);const f=e.getBoundingClientRect(),d=s2e(e);let h=o2e;t&&(i?g5(i)&&(h=Fw(i)):h=Fw(e));const b=d?F1(d):window,S=!n2e()&&n;let k=(f.left+(S&&((a=b.visualViewport)==null?void 0:a.offsetLeft)||0))/h.x,T=(f.top+(S&&((l=b.visualViewport)==null?void 0:l.offsetTop)||0))/h.y,O=f.width/h.x,P=f.height/h.y;if(d){const B=F1(d),W=i&&g5(i)?F1(i):i;let Z=B.frameElement;for(;Z&&i&&W!==B;){const Y=Fw(Z),z=Z.getBoundingClientRect(),q=getComputedStyle(Z);z.x+=(Z.clientLeft+parseFloat(q.paddingLeft))*Y.x,z.y+=(Z.clientTop+parseFloat(q.paddingTop))*Y.y,k*=Y.x,T*=Y.y,O*=Y.x,P*=Y.y,k+=z.x,T+=z.y,Z=F1(Z).frameElement}}return{width:O,height:P,top:T,right:k+O,bottom:T+P,left:k,x:k,y:T}}function v5(e){return((e2e(e)?e.ownerDocument:e.document)||window.document).documentElement}function yV(e){return g5(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function r2e(e){return ZA(v5(e)).left+yV(e).scrollLeft}function qA(e){if(h5(e)==="html")return e;const t=e.assignedSlot||e.parentNode||t2e(e)&&e.host||v5(e);return t2e(t)?t.host:t}function i2e(e){const t=qA(e);return nee(t)?t.ownerDocument.body:Rv(t)&&bV(t)?t:i2e(t)}function _V(e,t){var n;t===void 0&&(t=[]);const i=i2e(e),a=i===((n=e.ownerDocument)==null?void 0:n.body),l=F1(i);return a?t.concat(l,l.visualViewport||[],bV(i)?i:[]):t.concat(i,_V(i))}function a2e(e,t,n){return t==="viewport"?WA(function(i,a){const l=F1(i),f=v5(i),d=l.visualViewport;let h=f.clientWidth,b=f.clientHeight,S=0,k=0;if(d){h=d.width,b=d.height;const T=n2e();(T||!T&&a==="fixed")&&(S=d.offsetLeft,k=d.offsetTop)}return{width:h,height:b,x:S,y:k}}(e,n)):g5(t)?WA(function(i,a){const l=ZA(i,!0,a==="fixed"),f=l.top+i.clientTop,d=l.left+i.clientLeft,h=Rv(i)?Fw(i):{x:1,y:1};return{width:i.clientWidth*h.x,height:i.clientHeight*h.y,x:d*h.x,y:f*h.y}}(t,n)):WA(function(i){const a=v5(i),l=yV(i),f=i.ownerDocument.body,d=jA(a.scrollWidth,a.clientWidth,f.scrollWidth,f.clientWidth),h=jA(a.scrollHeight,a.clientHeight,f.scrollHeight,f.clientHeight);let b=-l.scrollLeft+r2e(i);const S=-l.scrollTop;return Ov(f).direction==="rtl"&&(b+=jA(a.clientWidth,f.clientWidth)-d),{width:d,height:h,x:b,y:S}}(v5(e)))}function l2e(e){return Rv(e)&&Ov(e).position!=="fixed"?e.offsetParent:null}function c2e(e){const t=F1(e);let n=l2e(e);for(;n&&Bxe(n)&&Ov(n).position==="static";)n=l2e(n);return n&&(h5(n)==="html"||h5(n)==="body"&&Ov(n).position==="static"&&!tee(n))?t:n||function(i){let a=qA(i);for(;Rv(a)&&!nee(a);){if(tee(a))return a;a=qA(a)}return null}(e)||t}function Vxe(e,t,n){const i=Rv(t),a=v5(t),l=ZA(e,!0,n==="fixed",t);let f={scrollLeft:0,scrollTop:0};const d={x:0,y:0};if(i||!i&&n!=="fixed")if((h5(t)!=="body"||bV(a))&&(f=yV(t)),Rv(t)){const h=ZA(t,!0);d.x=h.x+t.clientLeft,d.y=h.y+t.clientTop}else a&&(d.x=r2e(a));return{x:l.left+f.scrollLeft-d.x,y:l.top+f.scrollTop-d.y,width:l.width,height:l.height}}const Hxe={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:i,strategy:a}=e;const l=n==="clippingAncestors"?function(b,S){const k=S.get(b);if(k)return k;let T=_V(b).filter(W=>g5(W)&&h5(W)!=="body"),O=null;const P=Ov(b).position==="fixed";let B=P?qA(b):b;for(;g5(B)&&!nee(B);){const W=Ov(B),Z=tee(B);(P?Z||O:Z||W.position!=="static"||!O||!["absolute","fixed"].includes(O.position))?O=W:T=T.filter(Y=>Y!==B),B=qA(B)}return S.set(b,T),T}(t,this._c):[].concat(n),f=[...l,i],d=f[0],h=f.reduce((b,S)=>{const k=a2e(t,S,a);return b.top=jA(k.top,b.top),b.right=Xve(k.right,b.right),b.bottom=Xve(k.bottom,b.bottom),b.left=jA(k.left,b.left),b},a2e(t,d,a));return{width:h.right-h.left,height:h.bottom-h.top,x:h.left,y:h.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:i}=e;const a=Rv(n),l=v5(n);if(n===l)return t;let f={scrollLeft:0,scrollTop:0},d={x:1,y:1};const h={x:0,y:0};if((a||!a&&i!=="fixed")&&((h5(n)!=="body"||bV(l))&&(f=yV(n)),Rv(n))){const b=ZA(n);d=Fw(n),h.x=b.x+n.clientLeft,h.y=b.y+n.clientTop}return{width:t.width*d.x,height:t.height*d.y,x:t.x*d.x-f.scrollLeft*d.x+h.x,y:t.y*d.y-f.scrollTop*d.y+h.y}},isElement:g5,getDimensions:function(e){return Rv(e)?Jve(e):e.getBoundingClientRect()},getOffsetParent:c2e,getDocumentElement:v5,getScale:Fw,async getElementRects(e){let{reference:t,floating:n,strategy:i}=e;const a=this.getOffsetParent||c2e,l=this.getDimensions;return{reference:Vxe(t,await a(n),i),floating:{x:0,y:0,...await l(n)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Ov(e).direction==="rtl"},Uxe=(e,t,n)=>{const i=new Map,a={platform:Hxe,...n},l={...a.platform,_c:i};return Oxe(e,t,{...a,platform:l})};function u2e(e,t){for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(typeof t[n]=="object"&&e[n]?u2e(e[n],t[n]):e[n]=t[n])}const Rb={disabled:!1,distance:5,skidding:0,container:"body",boundary:void 0,instantMove:!1,disposeTimeout:0,popperTriggers:[],strategy:"absolute",preventOverflow:!0,flip:!0,shift:!0,overflowPadding:0,arrowPadding:0,arrowOverflow:!0,themes:{tooltip:{placement:"top",triggers:["hover","focus","touch"],hideTriggers:e=>[...e,"click"],delay:{show:200,hide:0},handleResize:!1,html:!1,loadingContent:"..."},dropdown:{placement:"bottom",triggers:["click"],delay:0,handleResize:!0,autoHide:!0},menu:{$extend:"dropdown",triggers:["hover","focus"],popperTriggers:["hover","focus"],delay:{show:0,hide:400}}}};function GA(e,t){let n=Rb.themes[e]||{},i;do i=n[t],typeof i>"u"?n.$extend?n=Rb.themes[n.$extend]||{}:(n=null,i=Rb[t]):n=null;while(n);return i}function zxe(e){const t=[e];let n=Rb.themes[e]||{};do n.$extend&&!n.$resetCss?(t.push(n.$extend),n=Rb.themes[n.$extend]||{}):n=null;while(n);return t.map(i=>"v-popper--theme-".concat(i))}function d2e(e){const t=[e];let n=Rb.themes[e]||{};do n.$extend?(t.push(n.$extend),n=Rb.themes[n.$extend]||{}):n=null;while(n);return t}let YS=!1;if(typeof window<"u"){YS=!1;try{const e=Object.defineProperty({},"passive",{get(){YS=!0}});window.addEventListener("test",null,e)}catch{}}let f2e=!1;typeof window<"u"&&typeof navigator<"u"&&(f2e=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);const p2e=["auto","top","bottom","left","right"].reduce((e,t)=>e.concat([t,"".concat(t,"-start"),"".concat(t,"-end")]),[]),m2e={hover:"mouseenter",focus:"focus",click:"click",touch:"touchstart",pointer:"pointerdown"},h2e={hover:"mouseleave",focus:"blur",click:"click",touch:"touchend",pointer:"pointerup"};function g2e(e,t){const n=e.indexOf(t);n!==-1&&e.splice(n,1)}function see(){return new Promise(e=>requestAnimationFrame(()=>{requestAnimationFrame(e)}))}const e0=[];let XS=null;const v2e={};function b2e(e){let t=v2e[e];return t||(t=v2e[e]=[]),t}let oee=function(){};typeof window<"u"&&(oee=window.Element);function $i(e){return function(t){return GA(t.theme,e)}}const ree="__floating-vue__popper",y2e=()=>Gr({name:"VPopper",provide(){return{[ree]:{parentPopper:this}}},inject:{[ree]:{default:null}},props:{theme:{type:String,required:!0},targetNodes:{type:Function,required:!0},referenceNode:{type:Function,default:null},popperNode:{type:Function,required:!0},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:$i("disabled")},positioningDisabled:{type:Boolean,default:$i("positioningDisabled")},placement:{type:String,default:$i("placement"),validator:e=>p2e.includes(e)},delay:{type:[String,Number,Object],default:$i("delay")},distance:{type:[Number,String],default:$i("distance")},skidding:{type:[Number,String],default:$i("skidding")},triggers:{type:Array,default:$i("triggers")},showTriggers:{type:[Array,Function],default:$i("showTriggers")},hideTriggers:{type:[Array,Function],default:$i("hideTriggers")},popperTriggers:{type:Array,default:$i("popperTriggers")},popperShowTriggers:{type:[Array,Function],default:$i("popperShowTriggers")},popperHideTriggers:{type:[Array,Function],default:$i("popperHideTriggers")},container:{type:[String,Object,oee,Boolean],default:$i("container")},boundary:{type:[String,oee],default:$i("boundary")},strategy:{type:String,validator:e=>["absolute","fixed"].includes(e),default:$i("strategy")},autoHide:{type:[Boolean,Function],default:$i("autoHide")},handleResize:{type:Boolean,default:$i("handleResize")},instantMove:{type:Boolean,default:$i("instantMove")},eagerMount:{type:Boolean,default:$i("eagerMount")},popperClass:{type:[String,Array,Object],default:$i("popperClass")},computeTransformOrigin:{type:Boolean,default:$i("computeTransformOrigin")},autoMinSize:{type:Boolean,default:$i("autoMinSize")},autoSize:{type:[Boolean,String],default:$i("autoSize")},autoMaxSize:{type:Boolean,default:$i("autoMaxSize")},autoBoundaryMaxSize:{type:Boolean,default:$i("autoBoundaryMaxSize")},preventOverflow:{type:Boolean,default:$i("preventOverflow")},overflowPadding:{type:[Number,String],default:$i("overflowPadding")},arrowPadding:{type:[Number,String],default:$i("arrowPadding")},arrowOverflow:{type:Boolean,default:$i("arrowOverflow")},flip:{type:Boolean,default:$i("flip")},shift:{type:Boolean,default:$i("shift")},shiftCrossAxis:{type:Boolean,default:$i("shiftCrossAxis")},noAutoFocus:{type:Boolean,default:$i("noAutoFocus")},disposeTimeout:{type:Number,default:$i("disposeTimeout")}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},data(){return{isShown:!1,isMounted:!1,skipTransition:!1,classes:{showFrom:!1,showTo:!1,hideFrom:!1,hideTo:!0},result:{x:0,y:0,placement:"",strategy:this.strategy,arrow:{x:0,y:0,centerOffset:0},transformOrigin:null},shownChildren:new Set,lastAutoHide:!0}},computed:{popperId(){return this.ariaId!=null?this.ariaId:this.randomId},shouldMountContent(){return this.eagerMount||this.isMounted},slotData(){return{popperId:this.popperId,isShown:this.isShown,shouldMountContent:this.shouldMountContent,skipTransition:this.skipTransition,autoHide:typeof this.autoHide=="function"?this.lastAutoHide:this.autoHide,show:this.show,hide:this.hide,handleResize:this.handleResize,onResize:this.onResize,classes:{...this.classes,popperClass:this.popperClass},result:this.positioningDisabled?null:this.result,attrs:this.$attrs}},parentPopper(){var e;return(e=this[ree])==null?void 0:e.parentPopper},hasPopperShowTriggerHover(){var e,t;return((e=this.popperTriggers)==null?void 0:e.includes("hover"))||((t=this.popperShowTriggers)==null?void 0:t.includes("hover"))}},watch:{shown:"$_autoShowHide",disabled(e){e?this.dispose():this.init()},async container(){this.isShown&&(this.$_ensureTeleport(),await this.$_computePosition())},...["triggers","positioningDisabled"].reduce((e,t)=>(e[t]="$_refreshListeners",e),{}),...["placement","distance","skidding","boundary","strategy","overflowPadding","arrowPadding","preventOverflow","shift","shiftCrossAxis","flip"].reduce((e,t)=>(e[t]="$_computePosition",e),{})},created(){this.$_isDisposed=!0,this.randomId="popper_".concat([Math.random(),Date.now()].map(e=>e.toString(36).substring(2,10)).join("_")),this.autoMinSize&&console.warn('[floating-vue] `autoMinSize` option is deprecated. Use `autoSize="min"` instead.'),this.autoMaxSize&&console.warn("[floating-vue] `autoMaxSize` option is deprecated. Use `autoBoundaryMaxSize` instead.")},mounted(){this.init(),this.$_detachPopperNode()},activated(){this.$_autoShowHide()},deactivated(){this.hide()},beforeUnmount(){this.dispose()},methods:{show({event:e=null,skipDelay:t=!1,force:n=!1}={}){var i,a;(i=this.parentPopper)!=null&&i.lockedChild&&this.parentPopper.lockedChild!==this||(this.$_pendingHide=!1,(n||!this.disabled)&&(((a=this.parentPopper)==null?void 0:a.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.$_scheduleShow(e,t),this.$emit("show"),this.$_showFrameLocked=!0,requestAnimationFrame(()=>{this.$_showFrameLocked=!1})),this.$emit("update:shown",!0))},hide({event:e=null,skipDelay:t=!1}={}){var n;if(!this.$_hideInProgress){if(this.shownChildren.size>0){this.$_pendingHide=!0;return}if(this.hasPopperShowTriggerHover&&this.$_isAimingPopper()){this.parentPopper&&(this.parentPopper.lockedChild=this,clearTimeout(this.parentPopper.lockedChildTimer),this.parentPopper.lockedChildTimer=setTimeout(()=>{this.parentPopper.lockedChild===this&&(this.parentPopper.lockedChild.hide({skipDelay:t}),this.parentPopper.lockedChild=null)},1e3));return}((n=this.parentPopper)==null?void 0:n.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.$_pendingHide=!1,this.$_scheduleHide(e,t),this.$emit("hide"),this.$emit("update:shown",!1)}},init(){var t;var e;this.$_isDisposed&&(this.$_isDisposed=!1,this.isMounted=!1,this.$_events=[],this.$_preventShow=!1,this.$_referenceNode=(t=(e=this.referenceNode)==null?void 0:e.call(this))!=null?t:this.$el,this.$_targetNodes=this.targetNodes().filter(n=>n.nodeType===n.ELEMENT_NODE),this.$_popperNode=this.popperNode(),this.$_innerNode=this.$_popperNode.querySelector(".v-popper__inner"),this.$_arrowNode=this.$_popperNode.querySelector(".v-popper__arrow-container"),this.$_swapTargetAttrs("title","data-original-title"),this.$_detachPopperNode(),this.triggers.length&&this.$_addEventListeners(),this.shown&&this.show())},dispose(){this.$_isDisposed||(this.$_isDisposed=!0,this.$_removeEventListeners(),this.hide({skipDelay:!0}),this.$_detachPopperNode(),this.isMounted=!1,this.isShown=!1,this.$_updateParentShownChildren(!1),this.$_swapTargetAttrs("data-original-title","title"))},async onResize(){this.isShown&&(await this.$_computePosition(),this.$emit("resize"))},async $_computePosition(){var i;if(this.$_isDisposed||this.positioningDisabled)return;const e={strategy:this.strategy,middleware:[]};(this.distance||this.skidding)&&e.middleware.push(Nxe({mainAxis:this.distance,crossAxis:this.skidding}));const t=this.placement.startsWith("auto");if(t?e.middleware.push(Lxe({alignment:(i=this.placement.split("-")[1])!=null?i:""})):e.placement=this.placement,this.preventOverflow&&(this.shift&&e.middleware.push(Fxe({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!t&&this.flip&&e.middleware.push(Pxe({padding:this.overflowPadding,boundary:this.boundary}))),e.middleware.push(Rxe({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&e.middleware.push({name:"arrowOverflow",fn:({placement:a,rects:l,middlewareData:f})=>{let d;const{centerOffset:h}=f.arrow;return a.startsWith("top")||a.startsWith("bottom")?d=Math.abs(h)>l.reference.width/2:d=Math.abs(h)>l.reference.height/2,{data:{overflow:d}}}}),this.autoMinSize||this.autoSize){const a=this.autoSize?this.autoSize:this.autoMinSize?"min":null;e.middleware.push({name:"autoSize",fn:({rects:l,placement:f,middlewareData:d})=>{var h;if((h=d.autoSize)!=null&&h.skip)return{};let b,S;return f.startsWith("top")||f.startsWith("bottom")?b=l.reference.width:S=l.reference.height,this.$_innerNode.style[a==="min"?"minWidth":a==="max"?"maxWidth":"width"]=b!=null?"".concat(b,"px"):null,this.$_innerNode.style[a==="min"?"minHeight":a==="max"?"maxHeight":"height"]=S!=null?"".concat(S,"px"):null,{data:{skip:!0},reset:{rects:!0}}}})}(this.autoMaxSize||this.autoBoundaryMaxSize)&&(this.$_innerNode.style.maxWidth=null,this.$_innerNode.style.maxHeight=null,e.middleware.push($xe({boundary:this.boundary,padding:this.overflowPadding,apply:({availableWidth:a,availableHeight:l})=>{this.$_innerNode.style.maxWidth=a!=null?"".concat(a,"px"):null,this.$_innerNode.style.maxHeight=l!=null?"".concat(l,"px"):null}})));const n=await Uxe(this.$_referenceNode,this.$_popperNode,e);Object.assign(this.result,{x:n.x,y:n.y,placement:n.placement,strategy:n.strategy,arrow:{...n.middlewareData.arrow,...n.middlewareData.arrowOverflow}})},$_scheduleShow(e=null,t=!1){if(this.$_updateParentShownChildren(!0),this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),XS&&this.instantMove&&XS.instantMove&&XS!==this.parentPopper){XS.$_applyHide(!0),this.$_applyShow(!0);return}t?this.$_applyShow():this.$_scheduleTimer=setTimeout(this.$_applyShow.bind(this),this.$_computeDelay("show"))},$_scheduleHide(e=null,t=!1){if(this.shownChildren.size>0){this.$_pendingHide=!0;return}this.$_updateParentShownChildren(!1),this.$_hideInProgress=!0,clearTimeout(this.$_scheduleTimer),this.isShown&&(XS=this),t?this.$_applyHide():this.$_scheduleTimer=setTimeout(this.$_applyHide.bind(this),this.$_computeDelay("hide"))},$_computeDelay(e){const t=this.delay;return parseInt(t&&t[e]||t||0)},async $_applyShow(e=!1){clearTimeout(this.$_disposeTimer),clearTimeout(this.$_scheduleTimer),this.skipTransition=e,!this.isShown&&(this.$_ensureTeleport(),await see(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([..._V(this.$_referenceNode),..._V(this.$_popperNode)],"scroll",()=>{this.$_computePosition()}))},async $_applyShowEffect(){if(this.$_hideInProgress)return;if(this.computeTransformOrigin){const t=this.$_referenceNode.getBoundingClientRect(),n=this.$_popperNode.querySelector(".v-popper__wrapper"),i=n.parentNode.getBoundingClientRect(),a=t.x+t.width/2-(i.left+n.offsetLeft),l=t.y+t.height/2-(i.top+n.offsetTop);this.result.transformOrigin="".concat(a,"px ").concat(l,"px")}this.isShown=!0,this.$_applyAttrsToTarget({"aria-describedby":this.popperId,"data-popper-shown":""});const e=this.showGroup;if(e){let t;for(let n=0;n<e0.length;n++)t=e0[n],t.showGroup!==e&&(t.hide(),t.$emit("close-group"))}e0.push(this),document.body.classList.add("v-popper--some-open");for(const t of d2e(this.theme))b2e(t).push(this),document.body.classList.add("v-popper--some-open--".concat(t));this.$emit("apply-show"),this.classes.showFrom=!0,this.classes.showTo=!1,this.classes.hideFrom=!1,this.classes.hideTo=!1,await see(),this.classes.showFrom=!1,this.classes.showTo=!0,this.noAutoFocus||this.$_popperNode.focus()},async $_applyHide(e=!1){if(this.shownChildren.size>0){this.$_pendingHide=!0,this.$_hideInProgress=!1;return}if(clearTimeout(this.$_scheduleTimer),!this.isShown)return;this.skipTransition=e,g2e(e0,this),e0.length===0&&document.body.classList.remove("v-popper--some-open");for(const n of d2e(this.theme)){const i=b2e(n);g2e(i,this),i.length===0&&document.body.classList.remove("v-popper--some-open--".concat(n))}XS===this&&(XS=null),this.isShown=!1,this.$_applyAttrsToTarget({"aria-describedby":void 0,"data-popper-shown":void 0}),clearTimeout(this.$_disposeTimer);const t=this.disposeTimeout;t!==null&&(this.$_disposeTimer=setTimeout(()=>{this.$_popperNode&&(this.$_detachPopperNode(),this.isMounted=!1)},t)),this.$_removeEventListeners("scroll"),this.$emit("apply-hide"),this.classes.showFrom=!1,this.classes.showTo=!1,this.classes.hideFrom=!0,this.classes.hideTo=!1,await see(),this.classes.hideFrom=!1,this.classes.hideTo=!0},$_autoShowHide(){this.shown?this.show():this.hide()},$_ensureTeleport(){if(this.$_isDisposed)return;let e=this.container;if(typeof e=="string"?e=window.document.querySelector(e):e===!1&&(e=this.$_targetNodes[0].parentNode),!e)throw new Error("No container for popover: "+this.container);e.appendChild(this.$_popperNode),this.isMounted=!0},$_addEventListeners(){const e=n=>{this.isShown&&!this.$_hideInProgress||(n.usedByTooltip=!0,!this.$_preventShow&&this.show({event:n}))};this.$_registerTriggerListeners(this.$_targetNodes,m2e,this.triggers,this.showTriggers,e),this.$_registerTriggerListeners([this.$_popperNode],m2e,this.popperTriggers,this.popperShowTriggers,e);const t=n=>{n.usedByTooltip||this.hide({event:n})};this.$_registerTriggerListeners(this.$_targetNodes,h2e,this.triggers,this.hideTriggers,t),this.$_registerTriggerListeners([this.$_popperNode],h2e,this.popperTriggers,this.popperHideTriggers,t)},$_registerEventListeners(e,t,n){this.$_events.push({targetNodes:e,eventType:t,handler:n}),e.forEach(i=>i.addEventListener(t,n,YS?{passive:!0}:void 0))},$_registerTriggerListeners(e,t,n,i,a){let l=n;i!=null&&(l=typeof i=="function"?i(l):i),l.forEach(f=>{const d=t[f];d&&this.$_registerEventListeners(e,d,a)})},$_removeEventListeners(e){const t=[];this.$_events.forEach(n=>{const{targetNodes:i,eventType:a,handler:l}=n;!e||e===a?i.forEach(f=>f.removeEventListener(a,l)):t.push(n)}),this.$_events=t},$_refreshListeners(){this.$_isDisposed||(this.$_removeEventListeners(),this.$_addEventListeners())},$_handleGlobalClose(e,t=!1){this.$_showFrameLocked||(this.hide({event:e}),e.closePopover?this.$emit("close-directive"):this.$emit("auto-hide"),t&&(this.$_preventShow=!0,setTimeout(()=>{this.$_preventShow=!1},300)))},$_detachPopperNode(){this.$_popperNode.parentNode&&this.$_popperNode.parentNode.removeChild(this.$_popperNode)},$_swapTargetAttrs(e,t){for(const n of this.$_targetNodes){const i=n.getAttribute(e);i&&(n.removeAttribute(e),n.setAttribute(t,i))}},$_applyAttrsToTarget(e){for(const t of this.$_targetNodes)for(const n in e){const i=e[n];i==null?t.removeAttribute(n):t.setAttribute(n,i)}},$_updateParentShownChildren(e){let t=this.parentPopper;for(;t;)e?t.shownChildren.add(this.randomId):(t.shownChildren.delete(this.randomId),t.$_pendingHide&&t.hide()),t=t.parentPopper},$_isAimingPopper(){const e=this.$_referenceNode.getBoundingClientRect();if(KA>=e.left&&KA<=e.right&&YA>=e.top&&YA<=e.bottom){const t=this.$_popperNode.getBoundingClientRect(),n=KA-b5,i=YA-y5,a=t.left+t.width/2-b5+(t.top+t.height/2)-y5+t.width+t.height,l=b5+n*a,f=y5+i*a;return SV(b5,y5,l,f,t.left,t.top,t.left,t.bottom)||SV(b5,y5,l,f,t.left,t.top,t.right,t.top)||SV(b5,y5,l,f,t.right,t.top,t.right,t.bottom)||SV(b5,y5,l,f,t.left,t.bottom,t.right,t.bottom)}return!1}},render(){return this.$slots.default(this.slotData)}});typeof document<"u"&&typeof window<"u"&&(f2e?(document.addEventListener("touchstart",_2e,YS?{passive:!0,capture:!0}:!0),document.addEventListener("touchend",jxe,YS?{passive:!0,capture:!0}:!0)):(window.addEventListener("mousedown",_2e,!0),window.addEventListener("click",Wxe,!0)),window.addEventListener("resize",Gxe));function _2e(e){for(let t=0;t<e0.length;t++){const n=e0[t];try{const i=n.popperNode();n.$_mouseDownContains=i.contains(e.target)}catch{}}}function Wxe(e){S2e(e)}function jxe(e){S2e(e,!0)}function S2e(e,t=!1){const n={};for(let i=e0.length-1;i>=0;i--){const a=e0[i];try{const l=a.$_containsGlobalTarget=Zxe(a,e);a.$_pendingHide=!1,requestAnimationFrame(()=>{if(a.$_pendingHide=!1,!n[a.randomId]&&C2e(a,l,e)){if(a.$_handleGlobalClose(e,t),!e.closeAllPopover&&e.closePopover&&l){let d=a.parentPopper;for(;d;)n[d.randomId]=!0,d=d.parentPopper;return}let f=a.parentPopper;for(;f&&C2e(f,f.$_containsGlobalTarget,e);)f.$_handleGlobalClose(e,t),f=f.parentPopper}})}catch{}}}function Zxe(e,t){const n=e.popperNode();return e.$_mouseDownContains||n.contains(t.target)}function C2e(e,t,n){return n.closeAllPopover||n.closePopover&&t||qxe(e,n)&&!t}function qxe(e,t){if(typeof e.autoHide=="function"){const n=e.autoHide(t);return e.lastAutoHide=n,n}return e.autoHide}function Gxe(e){for(let t=0;t<e0.length;t++)e0[t].$_computePosition(e)}let b5=0,y5=0,KA=0,YA=0;typeof window<"u"&&window.addEventListener("mousemove",e=>{b5=KA,y5=YA,KA=e.clientX,YA=e.clientY},YS?{passive:!0}:void 0);function SV(e,t,n,i,a,l,f,d){const h=((f-a)*(t-l)-(d-l)*(e-a))/((d-l)*(n-e)-(f-a)*(i-t)),b=((n-e)*(t-l)-(i-t)*(e-a))/((d-l)*(n-e)-(f-a)*(i-t));return h>=0&&h<=1&&b>=0&&b<=1}const Kxe={extends:y2e()},CV=(e,t)=>{const n=e.__vccOpts||e;for(const[i,a]of t)n[i]=a;return n};function Yxe(e,t,n,i,a,l){return L(),Q("div",{ref:"reference",class:Rn(["v-popper",{"v-popper--shown":e.slotData.isShown}])},[is(e.$slots,"default",CS(RS(e.slotData)))],2)}const Xxe=CV(Kxe,[["render",Yxe]]);function Jxe(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);var n=e.indexOf("Trident/");if(n>0){var i=e.indexOf("rv:");return parseInt(e.substring(i+3,e.indexOf(".",i)),10)}var a=e.indexOf("Edge/");return a>0?parseInt(e.substring(a+5,e.indexOf(".",a)),10):-1}let wV;function iee(){iee.init||(iee.init=!0,wV=Jxe()!==-1)}var EV={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){iee(),kc(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",wV&&this.$el.appendChild(e),e.data="about:blank",wV||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!wV&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const Qxe=q$();KX("data-v-b329ee4c");const eTe={class:"resize-observer",tabindex:"-1"};YX();const tTe=Qxe((e,t,n,i,a,l)=>(L(),Ee("div",eTe)));EV.render=tTe,EV.__scopeId="data-v-b329ee4c",EV.__file="src/components/ResizeObserver.vue";const w2e=(e="theme")=>({computed:{themeClass(){return zxe(this[e])}}}),nTe=Gr({name:"VPopperContent",components:{ResizeObserver:EV},mixins:[w2e()],props:{popperId:String,theme:String,shown:Boolean,mounted:Boolean,skipTransition:Boolean,autoHide:Boolean,handleResize:Boolean,classes:Object,result:Object},emits:["hide","resize"],methods:{toPx(e){return e!=null&&!isNaN(e)?"".concat(e,"px"):null}}}),sTe=["id","aria-hidden","tabindex","data-popper-placement"],oTe={ref:"inner",class:"v-popper__inner"},rTe=H("div",{class:"v-popper__arrow-outer"},null,-1),iTe=H("div",{class:"v-popper__arrow-inner"},null,-1),aTe=[rTe,iTe];function lTe(e,t,n,i,a,l){const f=Xe("ResizeObserver");return L(),Q("div",{id:e.popperId,ref:"popover",class:Rn(["v-popper__popper",[e.themeClass,e.classes.popperClass,{"v-popper__popper--shown":e.shown,"v-popper__popper--hidden":!e.shown,"v-popper__popper--show-from":e.classes.showFrom,"v-popper__popper--show-to":e.classes.showTo,"v-popper__popper--hide-from":e.classes.hideFrom,"v-popper__popper--hide-to":e.classes.hideTo,"v-popper__popper--skip-transition":e.skipTransition,"v-popper__popper--arrow-overflow":e.result&&e.result.arrow.overflow,"v-popper__popper--no-positioning":!e.result}]]),style:Ih(e.result?{position:e.result.strategy,transform:"translate3d(".concat(Math.round(e.result.x),"px,").concat(Math.round(e.result.y),"px,0)")}:void 0),"aria-hidden":e.shown?"false":"true",tabindex:e.autoHide?0:void 0,"data-popper-placement":e.result?e.result.placement:void 0,onKeyup:t[2]||(t[2]=MS(d=>e.autoHide&&e.$emit("hide"),["esc"]))},[H("div",{class:"v-popper__backdrop",onClick:t[0]||(t[0]=d=>e.autoHide&&e.$emit("hide"))}),H("div",{class:"v-popper__wrapper",style:Ih(e.result?{transformOrigin:e.result.transformOrigin}:void 0)},[H("div",oTe,[e.mounted?(L(),Q(bt,{key:0},[H("div",null,[is(e.$slots,"default")]),e.handleResize?(L(),Ee(f,{key:0,onNotify:t[1]||(t[1]=d=>e.$emit("resize",d))})):we("",!0)],64)):we("",!0)],512),H("div",{ref:"arrow",class:"v-popper__arrow-container",style:Ih(e.result?{left:e.toPx(e.result.arrow.x),top:e.toPx(e.result.arrow.y)}:void 0)},aTe,4)],4)],46,sTe)}const E2e=CV(nTe,[["render",lTe]]),k2e={methods:{show(...e){return this.$refs.popper.show(...e)},hide(...e){return this.$refs.popper.hide(...e)},dispose(...e){return this.$refs.popper.dispose(...e)},onResize(...e){return this.$refs.popper.onResize(...e)}}},cTe=Gr({name:"VPopperWrapper",components:{Popper:Xxe,PopperContent:E2e},mixins:[k2e,w2e("finalTheme")],props:{theme:{type:String,default:null},referenceNode:{type:Function,default:null},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:void 0},positioningDisabled:{type:Boolean,default:void 0},placement:{type:String,default:void 0},delay:{type:[String,Number,Object],default:void 0},distance:{type:[Number,String],default:void 0},skidding:{type:[Number,String],default:void 0},triggers:{type:Array,default:void 0},showTriggers:{type:[Array,Function],default:void 0},hideTriggers:{type:[Array,Function],default:void 0},popperTriggers:{type:Array,default:void 0},popperShowTriggers:{type:[Array,Function],default:void 0},popperHideTriggers:{type:[Array,Function],default:void 0},container:{type:[String,Object,Element,Boolean],default:void 0},boundary:{type:[String,Element],default:void 0},strategy:{type:String,default:void 0},autoHide:{type:[Boolean,Function],default:void 0},handleResize:{type:Boolean,default:void 0},instantMove:{type:Boolean,default:void 0},eagerMount:{type:Boolean,default:void 0},popperClass:{type:[String,Array,Object],default:void 0},computeTransformOrigin:{type:Boolean,default:void 0},autoMinSize:{type:Boolean,default:void 0},autoSize:{type:[Boolean,String],default:void 0},autoMaxSize:{type:Boolean,default:void 0},autoBoundaryMaxSize:{type:Boolean,default:void 0},preventOverflow:{type:Boolean,default:void 0},overflowPadding:{type:[Number,String],default:void 0},arrowPadding:{type:[Number,String],default:void 0},arrowOverflow:{type:Boolean,default:void 0},flip:{type:Boolean,default:void 0},shift:{type:Boolean,default:void 0},shiftCrossAxis:{type:Boolean,default:void 0},noAutoFocus:{type:Boolean,default:void 0},disposeTimeout:{type:Number,default:void 0}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},computed:{finalTheme(){var e;return(e=this.theme)!=null?e:this.$options.vPopperTheme}},methods:{getTargetNodes(){return Array.from(this.$el.children).filter(e=>e!==this.$refs.popperContent.$el)}}});function uTe(e,t,n,i,a,l){const f=Xe("PopperContent"),d=Xe("Popper");return L(),Ee(d,Cn({ref:"popper"},e.$props,{theme:e.finalTheme,"target-nodes":e.getTargetNodes,"popper-node":()=>e.$refs.popperContent.$el,class:[e.themeClass],onShow:t[0]||(t[0]=()=>e.$emit("show")),onHide:t[1]||(t[1]=()=>e.$emit("hide")),"onUpdate:shown":t[2]||(t[2]=h=>e.$emit("update:shown",h)),onApplyShow:t[3]||(t[3]=()=>e.$emit("apply-show")),onApplyHide:t[4]||(t[4]=()=>e.$emit("apply-hide")),onCloseGroup:t[5]||(t[5]=()=>e.$emit("close-group")),onCloseDirective:t[6]||(t[6]=()=>e.$emit("close-directive")),onAutoHide:t[7]||(t[7]=()=>e.$emit("auto-hide")),onResize:t[8]||(t[8]=()=>e.$emit("resize"))}),{default:te(({popperId:h,isShown:b,shouldMountContent:S,skipTransition:k,autoHide:T,show:O,hide:P,handleResize:B,onResize:W,classes:Z,result:Y})=>[is(e.$slots,"default",{shown:b,show:O,hide:P}),pe(f,{ref:"popperContent","popper-id":h,theme:e.finalTheme,shown:b,mounted:S,"skip-transition":k,"auto-hide":T,"handle-resize":B,classes:Z,result:Y,onHide:P,onResize:W},{default:te(()=>[is(e.$slots,"popper",{shown:b,hide:P})]),_:2},1032,["popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:3},16,["theme","target-nodes","popper-node","class"])}const aee=CV(cTe,[["render",uTe]]),dTe={...aee,name:"VDropdown",vPopperTheme:"dropdown"},fTe={...aee,name:"VMenu",vPopperTheme:"menu"},pTe={...aee,name:"VTooltip",vPopperTheme:"tooltip"},mTe=Gr({name:"VTooltipDirective",components:{Popper:y2e(),PopperContent:E2e},mixins:[k2e],inheritAttrs:!1,props:{theme:{type:String,default:"tooltip"},html:{type:Boolean,default:e=>GA(e.theme,"html")},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:e=>GA(e.theme,"loadingContent")},targetNodes:{type:Function,required:!0}},data(){return{asyncContent:null}},computed:{isContentAsync(){return typeof this.content=="function"},loading(){return this.isContentAsync&&this.asyncContent==null},finalContent(){return this.isContentAsync?this.loading?this.loadingContent:this.asyncContent:this.content}},watch:{content:{handler(){this.fetchContent(!0)},immediate:!0},async finalContent(){await this.$nextTick(),this.$refs.popper.onResize()}},created(){this.$_fetchId=0},methods:{fetchContent(e){if(typeof this.content=="function"&&this.$_isShown&&(e||!this.$_loading&&this.asyncContent==null)){this.asyncContent=null,this.$_loading=!0;const t=++this.$_fetchId,n=this.content(this);n.then?n.then(i=>this.onResult(t,i)):this.onResult(t,n)}},onResult(e,t){e===this.$_fetchId&&(this.$_loading=!1,this.asyncContent=t)},onShow(){this.$_isShown=!0,this.fetchContent()},onHide(){this.$_isShown=!1}}}),hTe=["innerHTML"],gTe=["textContent"];function vTe(e,t,n,i,a,l){const f=Xe("PopperContent"),d=Xe("Popper");return L(),Ee(d,Cn({ref:"popper"},e.$attrs,{theme:e.theme,"target-nodes":e.targetNodes,"popper-node":()=>e.$refs.popperContent.$el,onApplyShow:e.onShow,onApplyHide:e.onHide}),{default:te(({popperId:h,isShown:b,shouldMountContent:S,skipTransition:k,autoHide:T,hide:O,handleResize:P,onResize:B,classes:W,result:Z})=>[pe(f,{ref:"popperContent",class:Rn({"v-popper--tooltip-loading":e.loading}),"popper-id":h,theme:e.theme,shown:b,mounted:S,"skip-transition":k,"auto-hide":T,"handle-resize":P,classes:W,result:Z,onHide:O,onResize:B},{default:te(()=>[e.html?(L(),Q("div",{key:0,innerHTML:e.finalContent},null,8,hTe)):(L(),Q("div",{key:1,textContent:ee(e.finalContent)},null,8,gTe))]),_:2},1032,["class","popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:1},16,["theme","target-nodes","popper-node","onApplyShow","onApplyHide"])}const bTe=CV(mTe,[["render",vTe]]),x2e="v-popper--has-tooltip";function yTe(e,t){let n=e.placement;if(!n&&t)for(const i of p2e)t[i]&&(n=i);return n||(n=GA(e.theme||"tooltip","placement")),n}function T2e(e,t,n){let i;const a=typeof t;return a==="string"?i={content:t}:t&&a==="object"?i=t:i={content:!1},i.placement=yTe(i,n),i.targetNodes=()=>[e],i.referenceNode=()=>e,i}let lee,XA,_Te=0;function STe(){if(lee)return;XA=kt([]),lee=NS({name:"VTooltipDirectiveApp",setup(){return{directives:XA}},render(){return this.directives.map(t=>oi(bTe,{...t.options,shown:t.shown||t.options.shown,key:t.id}))},devtools:{hide:!0}});const e=document.createElement("div");document.body.appendChild(e),lee.mount(e)}function CTe(e,t,n){STe();const i=kt(T2e(e,t,n)),a=kt(!1),l={id:_Te++,options:i,shown:a};return XA.value.push(l),e.classList&&e.classList.add(x2e),e.$_popper={options:i,item:l,show(){a.value=!0},hide(){a.value=!1}}}function I2e(e){if(e.$_popper){const t=XA.value.indexOf(e.$_popper.item);t!==-1&&XA.value.splice(t,1),delete e.$_popper,delete e.$_popperOldShown,delete e.$_popperMountTarget}e.classList&&e.classList.remove(x2e)}function A2e(e,{value:t,modifiers:n}){const i=T2e(e,t,n);if(!i.content||GA(i.theme||"tooltip","disabled"))I2e(e);else{let a;e.$_popper?(a=e.$_popper,a.options.value=i):a=CTe(e,t,n),typeof t.shown<"u"&&t.shown!==e.$_popperOldShown&&(e.$_popperOldShown=t.shown,t.shown?a.show():a.hide())}}const wTe={beforeMount:A2e,updated:A2e,beforeUnmount(e){I2e(e)}};function O2e(e){e.addEventListener("click",D2e),e.addEventListener("touchstart",L2e,YS?{passive:!0}:!1)}function R2e(e){e.removeEventListener("click",D2e),e.removeEventListener("touchstart",L2e),e.removeEventListener("touchend",P2e),e.removeEventListener("touchcancel",M2e)}function D2e(e){const t=e.currentTarget;e.closePopover=!t.$_vclosepopover_touch,e.closeAllPopover=t.$_closePopoverModifiers&&!!t.$_closePopoverModifiers.all}function L2e(e){if(e.changedTouches.length===1){const t=e.currentTarget;t.$_vclosepopover_touch=!0;const n=e.changedTouches[0];t.$_vclosepopover_touchPoint=n,t.addEventListener("touchend",P2e),t.addEventListener("touchcancel",M2e)}}function P2e(e){const t=e.currentTarget;if(t.$_vclosepopover_touch=!1,e.changedTouches.length===1){const n=e.changedTouches[0],i=t.$_vclosepopover_touchPoint;e.closePopover=Math.abs(n.screenY-i.screenY)<20&&Math.abs(n.screenX-i.screenX)<20,e.closeAllPopover=t.$_closePopoverModifiers&&!!t.$_closePopoverModifiers.all}}function M2e(e){const t=e.currentTarget;t.$_vclosepopover_touch=!1}const ETe={beforeMount(e,{value:t,modifiers:n}){e.$_closePopoverModifiers=n,(typeof t>"u"||t)&&O2e(e)},updated(e,{value:t,oldValue:n,modifiers:i}){e.$_closePopoverModifiers=i,t!==n&&(typeof t>"u"||t?O2e(e):R2e(e))},beforeUnmount(e){R2e(e)}};function kTe(e,t={}){e.$_vTooltipInstalled||(e.$_vTooltipInstalled=!0,u2e(Rb,t),e.directive("tooltip",wTe),e.directive("close-popper",ETe),e.component("VTooltip",pTe),e.component("VDropdown",dTe),e.component("VMenu",fTe))}const xTe={version:"2.0.0",install:kTe,options:Rb};var TTe=Object.defineProperty,N2e=Object.getOwnPropertySymbols,ITe=Object.prototype.hasOwnProperty,ATe=Object.prototype.propertyIsEnumerable,F2e=(e,t,n)=>t in e?TTe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,OTe=(e,t)=>{for(var n in t||(t={}))ITe.call(t,n)&&F2e(e,n,t[n]);if(N2e)for(var n of N2e(t))ATe.call(t,n)&&F2e(e,n,t[n]);return e};function _5(e){return e==null||e===""||Array.isArray(e)&&e.length===0||!(e instanceof Date)&&typeof e=="object"&&Object.keys(e).length===0}function cee(e,t,n=new WeakSet){if(e===t)return!0;if(!e||!t||typeof e!="object"||typeof t!="object"||n.has(e)||n.has(t))return!1;n.add(e).add(t);const i=Array.isArray(e),a=Array.isArray(t);let l,f,d;if(i&&a){if(f=e.length,f!=t.length)return!1;for(l=f;l--!==0;)if(!cee(e[l],t[l],n))return!1;return!0}if(i!=a)return!1;const h=e instanceof Date,b=t instanceof Date;if(h!=b)return!1;if(h&&b)return e.getTime()==t.getTime();const S=e instanceof RegExp,k=t instanceof RegExp;if(S!=k)return!1;if(S&&k)return e.toString()==t.toString();const T=Object.keys(e);if(f=T.length,f!==Object.keys(t).length)return!1;for(l=f;l--!==0;)if(!Object.prototype.hasOwnProperty.call(t,T[l]))return!1;for(l=f;l--!==0;)if(d=T[l],!cee(e[d],t[d],n))return!1;return!0}function RTe(e,t){return cee(e,t)}function uee(e){return typeof e=="function"&&"call"in e&&"apply"in e}function zr(e){return!_5(e)}function $w(e,t,n){return RTe(e,t)}function Dv(e,t=!0){return e instanceof Object&&e.constructor===Object&&(t||Object.keys(e).length!==0)}function $2e(e={},t={}){const n=OTe({},e);return Object.keys(t).forEach(i=>{const a=i;Dv(t[a])&&a in e&&Dv(e[a])?n[a]=$2e(e[a],t[a]):n[a]=t[a]}),n}function DTe(...e){return e.reduce((t,n,i)=>i===0?n:$2e(t,n),{})}function B2e(e,t){let n;if(zr(e))try{n=e.findLast(t)}catch{n=[...e].reverse().find(t)}return n}function Bp(e,...t){return uee(e)?e(...t):e}function Rm(e,t=!0){return typeof e=="string"&&(t||e!=="")}function Lv(e){return Rm(e)?e.replace(/(-|_)/g,"").toLowerCase():e}function dee(e,t="",n={}){const i=Lv(t).split("."),a=i.shift();if(a){if(Dv(e)){const l=Object.keys(e).find(f=>Lv(f)===a)||"";return dee(Bp(e[l],n),i.join("."),n)}return}return Bp(e,n)}function kV(e,t=!0){return Array.isArray(e)&&(t||e.length!==0)}function LTe(e){return zr(e)&&!isNaN(e)}function PTe(e=""){return zr(e)&&e.length===1&&!!e.match(/\S| /)}function Db(e,t){if(t){const n=t.test(e);return t.lastIndex=0,n}return!1}function MTe(...e){return DTe(...e)}function JA(e){return e&&e.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g,"").replace(/ {2,}/g," ").replace(/ ([{:}]) /g,"$1").replace(/([;,]) /g,"$1").replace(/ !/g,"!").replace(/: /g,":")}function NTe(e){return Rm(e,!1)?e[0].toUpperCase()+e.slice(1):e}function V2e(e){return Rm(e)?e.replace(/(_)/g,"-").replace(/[A-Z]/g,(t,n)=>n===0?t:"-"+t.toLowerCase()).toLowerCase():e}function H2e(e){return Rm(e)?e.replace(/[A-Z]/g,(t,n)=>n===0?t:"."+t.toLowerCase()).toLowerCase():e}function U2e(){const e=new Map;return{on(t,n){let i=e.get(t);return i?i.push(n):i=[n],e.set(t,i),this},off(t,n){const i=e.get(t);return i&&i.splice(i.indexOf(n)>>>0,1),this},emit(t,n){const i=e.get(t);i&&i.forEach(a=>{a(n)})},clear(){e.clear()}}}function FTe(e,t){return e?e.classList?e.classList.contains(t):new RegExp("(^| )"+t+"( |$)","gi").test(e.className):!1}function $Te(e,t){if(e&&t){const n=i=>{FTe(e,i)||(e.classList?e.classList.add(i):e.className+=" "+i)};[t].flat().filter(Boolean).forEach(i=>i.split(" ").forEach(n))}}function fee(e,t){if(e&&t){const n=i=>{e.classList?e.classList.remove(i):e.className=e.className.replace(new RegExp("(^|\\b)"+i.split(" ").join("|")+"(\\b|$)","gi")," ")};[t].flat().filter(Boolean).forEach(i=>i.split(" ").forEach(n))}}function pee(e){return e?Math.abs(e.scrollLeft):0}function BTe(){const e=document.documentElement;return(window.pageXOffset||pee(e))-(e.clientLeft||0)}function VTe(){const e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)}function HTe(e,t){return e instanceof HTMLElement?e.offsetWidth:0}function UTe(e){if(e){let t=e.parentNode;return t&&t instanceof ShadowRoot&&t.host&&(t=t.host),t}return null}function zTe(e){return!!(e!==null&&typeof e<"u"&&e.nodeName&&UTe(e))}function QA(e){return typeof HTMLElement<"u"?e instanceof HTMLElement:e!==null&&typeof e=="object"&&e.nodeType===1&&typeof e.nodeName=="string"}function xV(e,t={}){if(QA(e)){const n=(i,a)=>{var l,f;const d=(l=e==null?void 0:e.$attrs)!=null&&l[i]?[(f=e==null?void 0:e.$attrs)==null?void 0:f[i]]:[];return[a].flat().reduce((h,b)=>{if(b!=null){const S=typeof b;if(S==="string"||S==="number")h.push(b);else if(S==="object"){const k=Array.isArray(b)?n(i,b):Object.entries(b).map(([T,O])=>i==="style"&&(O||O===0)?"".concat(T.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),":").concat(O):O?T:void 0);h=k.length?h.concat(k.filter(T=>!!T)):h}}return h},d)};Object.entries(t).forEach(([i,a])=>{if(a!=null){const l=i.match(/^on(.+)/);l?e.addEventListener(l[1].toLowerCase(),a):i==="p-bind"||i==="pBind"?xV(e,a):(a=i==="class"?[...new Set(n("class",a))].join(" ").trim():i==="style"?n("style",a).join(";").trim():a,(e.$attrs=e.$attrs||{})&&(e.$attrs[i]=a),e.setAttribute(i,a))}})}}function WTe(e,t={},...n){{const i=document.createElement(e);return xV(i,t),i.append(...n),i}}function t0(e,t){return QA(e)?e.matches(t)?e:e.querySelector(t):null}function eO(e,t){e&&document.activeElement!==e&&e.focus(t)}function Bw(e,t){if(QA(e)){const n=e.getAttribute(t);return isNaN(n)?n==="true"||n==="false"?n==="true":n:+n}}function z2e(e){if(e){let t=e.offsetHeight;const n=getComputedStyle(e);return t-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)+parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),t}return 0}function jTe(e){if(e){const t=e.getBoundingClientRect();return{top:t.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:t.left+(window.pageXOffset||pee(document.documentElement)||pee(document.body)||0)}}return{top:"auto",left:"auto"}}function ZTe(e,t){return e?e.offsetHeight:0}function W2e(e){if(e){let t=e.offsetWidth;const n=getComputedStyle(e);return t-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)+parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth),t}return 0}function qTe(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function GTe(e){return e?getComputedStyle(e).direction==="rtl":!1}function KTe(e,t="",n){QA(e)&&n!==null&&n!==void 0&&e.setAttribute(t,n)}var TV={};function YTe(e="pui_id_"){return Object.hasOwn(TV,e)||(TV[e]=0),TV[e]++,"".concat(e).concat(TV[e])}var XTe=Object.defineProperty,JTe=Object.defineProperties,QTe=Object.getOwnPropertyDescriptors,IV=Object.getOwnPropertySymbols,j2e=Object.prototype.hasOwnProperty,Z2e=Object.prototype.propertyIsEnumerable,q2e=(e,t,n)=>t in e?XTe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,n0=(e,t)=>{for(var n in t||(t={}))j2e.call(t,n)&&q2e(e,n,t[n]);if(IV)for(var n of IV(t))Z2e.call(t,n)&&q2e(e,n,t[n]);return e},mee=(e,t)=>JTe(e,QTe(t)),Lb=(e,t)=>{var n={};for(var i in e)j2e.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&IV)for(var i of IV(e))t.indexOf(i)<0&&Z2e.call(e,i)&&(n[i]=e[i]);return n},eIe=U2e(),qd=eIe;function G2e(e,t){kV(e)?e.push(...t||[]):Dv(e)&&Object.assign(e,t)}function tIe(e){return Dv(e)&&e.hasOwnProperty("$value")&&e.hasOwnProperty("$type")?e.$value:e}function nIe(e){return e.replaceAll(/ /g,"").replace(/[^\w]/g,"-")}function hee(e="",t=""){return nIe("".concat(Rm(e,!1)&&Rm(t,!1)?"".concat(e,"-"):e).concat(t))}function K2e(e="",t=""){return"--".concat(hee(e,t))}function sIe(e=""){const t=(e.match(/{/g)||[]).length,n=(e.match(/}/g)||[]).length;return(t+n)%2!==0}function Y2e(e,t="",n="",i=[],a){if(Rm(e)){const l=/{([^}]*)}/g,f=e.trim();if(sIe(f))return;if(Db(f,l)){const d=f.replaceAll(l,S=>{const T=S.replace(/{|}/g,"").split(".").filter(O=>!i.some(P=>Db(O,P)));return"var(".concat(K2e(n,V2e(T.join("-")))).concat(zr(a)?", ".concat(a):"",")")}),h=/(\d+\s+[\+\-\*\/]\s+\d+)/g,b=/var\([^)]+\)/g;return Db(d.replace(b,"0"),h)?"calc(".concat(d,")"):d}return f}else if(LTe(e))return e}function oIe(e,t,n){Rm(t,!1)&&e.push("".concat(t,":").concat(n,";"))}function Vw(e,t){return e?"".concat(e,"{").concat(t,"}"):""}var tO=(...e)=>rIe(Ka.getTheme(),...e),rIe=(e={},t,n,i)=>{if(t){const{variable:a,options:l}=Ka.defaults||{},{prefix:f,transform:d}=(e==null?void 0:e.options)||l||{},b=Db(t,/{([^}]*)}/g)?t:"{".concat(t,"}");return i==="value"||_5(i)&&d==="strict"?Ka.getTokenValue(t):Y2e(b,void 0,f,[a.excludedKeyRegex],n)}return""};function iIe(e,t={}){const n=Ka.defaults.variable,{prefix:i=n.prefix,selector:a=n.selector,excludedKeyRegex:l=n.excludedKeyRegex}=t,f=(b,S="")=>Object.entries(b).reduce((k,[T,O])=>{const P=Db(T,l)?hee(S):hee(S,V2e(T)),B=tIe(O);if(Dv(B)){const{variables:W,tokens:Z}=f(B,P);G2e(k.tokens,Z),G2e(k.variables,W)}else k.tokens.push((i?P.replace("".concat(i,"-"),""):P).replaceAll("-",".")),oIe(k.variables,K2e(P),Y2e(B,P,i,[l]));return k},{variables:[],tokens:[]}),{variables:d,tokens:h}=f(e,i);return{value:d,tokens:h,declarations:d.join(""),css:Vw(a,d.join(""))}}var s0={regex:{rules:{class:{pattern:/^\.([a-zA-Z][\w-]*)$/,resolve(e){return{type:"class",selector:e,matched:this.pattern.test(e.trim())}}},attr:{pattern:/^\[(.*)\]$/,resolve(e){return{type:"attr",selector:":root".concat(e),matched:this.pattern.test(e.trim())}}},media:{pattern:/^@media (.*)$/,resolve(e){return{type:"media",selector:"".concat(e,"{:root{[CSS]}}"),matched:this.pattern.test(e.trim())}}},system:{pattern:/^system$/,resolve(e){return{type:"system",selector:"@media (prefers-color-scheme: dark){:root{[CSS]}}",matched:this.pattern.test(e.trim())}}},custom:{resolve(e){return{type:"custom",selector:e,matched:!0}}}},resolve(e){const t=Object.keys(this.rules).filter(n=>n!=="custom").map(n=>this.rules[n]);return[e].flat().map(n=>{var i;return(i=t.map(a=>a.resolve(n)).find(a=>a.matched))!=null?i:this.rules.custom.resolve(n)})}},_toVariables(e,t){return iIe(e,{prefix:t==null?void 0:t.prefix})},getCommon({name:e="",theme:t={},params:n,set:i,defaults:a}){var l,f,d,h,b,S,k;const{preset:T,options:O}=t;let P,B,W,Z,Y,z,q;if(zr(T)&&O.transform!=="strict"){const{primitive:ne,semantic:ue,extend:J}=T,ce=ue||{},{colorScheme:ge}=ce,de=Lb(ce,["colorScheme"]),he=J||{},{colorScheme:ie}=he,Be=Lb(he,["colorScheme"]),$e=ge||{},{dark:Ue}=$e,V=Lb($e,["dark"]),Ye=ie||{},{dark:Fe}=Ye,St=Lb(Ye,["dark"]),Dt=zr(ne)?this._toVariables({primitive:ne},O):{},He=zr(de)?this._toVariables({semantic:de},O):{},ft=zr(V)?this._toVariables({light:V},O):{},ht=zr(Ue)?this._toVariables({dark:Ue},O):{},At=zr(Be)?this._toVariables({semantic:Be},O):{},hn=zr(St)?this._toVariables({light:St},O):{},ct=zr(Fe)?this._toVariables({dark:Fe},O):{},[Ht,ye]=[(l=Dt.declarations)!=null?l:"",Dt.tokens],[lo,jn]=[(f=He.declarations)!=null?f:"",He.tokens||[]],[so,Xs]=[(d=ft.declarations)!=null?d:"",ft.tokens||[]],[ot,Qe]=[(h=ht.declarations)!=null?h:"",ht.tokens||[]],[Ot,Nt]=[(b=At.declarations)!=null?b:"",At.tokens||[]],[Ve,dn]=[(S=hn.declarations)!=null?S:"",hn.tokens||[]],[kn,Bt]=[(k=ct.declarations)!=null?k:"",ct.tokens||[]];P=this.transformCSS(e,Ht,"light","variable",O,i,a),B=ye;const Le=this.transformCSS(e,"".concat(lo).concat(so),"light","variable",O,i,a),je=this.transformCSS(e,"".concat(ot),"dark","variable",O,i,a);W="".concat(Le).concat(je),Z=[...new Set([...jn,...Xs,...Qe])];const Ze=this.transformCSS(e,"".concat(Ot).concat(Ve,"color-scheme:light"),"light","variable",O,i,a),pt=this.transformCSS(e,"".concat(kn,"color-scheme:dark"),"dark","variable",O,i,a);Y="".concat(Ze).concat(pt),z=[...new Set([...Nt,...dn,...Bt])],q=Bp(T.css,{dt:tO})}return{primitive:{css:P,tokens:B},semantic:{css:W,tokens:Z},global:{css:Y,tokens:z},style:q}},getPreset({name:e="",preset:t={},options:n,params:i,set:a,defaults:l,selector:f}){var d,h,b;let S,k,T;if(zr(t)&&n.transform!=="strict"){const O=e.replace("-directive",""),P=t,{colorScheme:B,extend:W,css:Z}=P,Y=Lb(P,["colorScheme","extend","css"]),z=W||{},{colorScheme:q}=z,ne=Lb(z,["colorScheme"]),ue=B||{},{dark:J}=ue,ce=Lb(ue,["dark"]),ge=q||{},{dark:de}=ge,he=Lb(ge,["dark"]),ie=zr(Y)?this._toVariables({[O]:n0(n0({},Y),ne)},n):{},Be=zr(ce)?this._toVariables({[O]:n0(n0({},ce),he)},n):{},$e=zr(J)?this._toVariables({[O]:n0(n0({},J),de)},n):{},[Ue,V]=[(d=ie.declarations)!=null?d:"",ie.tokens||[]],[Ye,Fe]=[(h=Be.declarations)!=null?h:"",Be.tokens||[]],[St,Dt]=[(b=$e.declarations)!=null?b:"",$e.tokens||[]],He=this.transformCSS(O,"".concat(Ue).concat(Ye),"light","variable",n,a,l,f),ft=this.transformCSS(O,St,"dark","variable",n,a,l,f);S="".concat(He).concat(ft),k=[...new Set([...V,...Fe,...Dt])],T=Bp(Z,{dt:tO})}return{css:S,tokens:k,style:T}},getPresetC({name:e="",theme:t={},params:n,set:i,defaults:a}){var l;const{preset:f,options:d}=t,h=(l=f==null?void 0:f.components)==null?void 0:l[e];return this.getPreset({name:e,preset:h,options:d,params:n,set:i,defaults:a})},getPresetD({name:e="",theme:t={},params:n,set:i,defaults:a}){var l,f;const d=e.replace("-directive",""),{preset:h,options:b}=t,S=((l=h==null?void 0:h.components)==null?void 0:l[d])||((f=h==null?void 0:h.directives)==null?void 0:f[d]);return this.getPreset({name:d,preset:S,options:b,params:n,set:i,defaults:a})},applyDarkColorScheme(e){return!(e.darkModeSelector==="none"||e.darkModeSelector===!1)},getColorSchemeOption(e,t){var n;return this.applyDarkColorScheme(e)?this.regex.resolve(e.darkModeSelector===!0?t.options.darkModeSelector:(n=e.darkModeSelector)!=null?n:t.options.darkModeSelector):[]},getLayerOrder(e,t={},n,i){const{cssLayer:a}=t;if(a){const l=Bp(a.order||"primeui",n);return"@layer ".concat(l)}return""},getCommonStyleSheet({name:e="",theme:t={},params:n,props:i={},set:a,defaults:l}){const f=this.getCommon({name:e,theme:t,params:n,set:a,defaults:l}),d=Object.entries(i).reduce((h,[b,S])=>h.push("".concat(b,'="').concat(S,'"'))&&h,[]).join(" ");return Object.entries(f||{}).reduce((h,[b,S])=>{if(S!=null&&S.css){const k=JA(S==null?void 0:S.css),T="".concat(b,"-variables");h.push('<style type="text/css" data-primevue-style-id="'.concat(T,'" ').concat(d,">").concat(k,"</style>"))}return h},[]).join("")},getStyleSheet({name:e="",theme:t={},params:n,props:i={},set:a,defaults:l}){var f;const d={name:e,theme:t,params:n,set:a,defaults:l},h=(f=e.includes("-directive")?this.getPresetD(d):this.getPresetC(d))==null?void 0:f.css,b=Object.entries(i).reduce((S,[k,T])=>S.push("".concat(k,'="').concat(T,'"'))&&S,[]).join(" ");return h?'<style type="text/css" data-primevue-style-id="'.concat(e,'-variables" ').concat(b,">").concat(JA(h),"</style>"):""},createTokens(e={},t,n="",i="",a={}){return Object.entries(e).forEach(([l,f])=>{const d=Db(l,t.variable.excludedKeyRegex)?n:n?"".concat(n,".").concat(H2e(l)):H2e(l),h=i?"".concat(i,".").concat(l):l;Dv(f)?this.createTokens(f,t,d,h,a):(a[d]||(a[d]={paths:[],computed(b,S={}){var k,T;return this.paths.length===1?(k=this.paths[0])==null?void 0:k.computed(this.paths[0].scheme,S.binding):b&&b!=="none"?(T=this.paths.find(O=>O.scheme===b))==null?void 0:T.computed(b,S.binding):this.paths.map(O=>O.computed(O.scheme,S[O.scheme]))}}),a[d].paths.push({path:h,value:f,scheme:h.includes("colorScheme.light")?"light":h.includes("colorScheme.dark")?"dark":"none",computed(b,S={}){const k=/{([^}]*)}/g;let T=f;if(S.name=this.path,S.binding||(S.binding={}),Db(f,k)){const P=f.trim().replaceAll(k,Z=>{var Y;const z=Z.replace(/{|}/g,""),q=(Y=a[z])==null?void 0:Y.computed(b,S);return kV(q)&&q.length===2?"light-dark(".concat(q[0].value,",").concat(q[1].value,")"):q==null?void 0:q.value}),B=/(\d+\w*\s+[\+\-\*\/]\s+\d+\w*)/g,W=/var\([^)]+\)/g;T=Db(P.replace(W,"0"),B)?"calc(".concat(P,")"):P}return _5(S.binding)&&delete S.binding,{colorScheme:b,path:this.path,paths:S,value:T.includes("undefined")?void 0:T}}}))}),a},getTokenValue(e,t,n){var i;const l=(h=>h.split(".").filter(S=>!Db(S.toLowerCase(),n.variable.excludedKeyRegex)).join("."))(t),f=t.includes("colorScheme.light")?"light":t.includes("colorScheme.dark")?"dark":void 0,d=[(i=e[l])==null?void 0:i.computed(f)].flat().filter(h=>h);return d.length===1?d[0].value:d.reduce((h={},b)=>{const S=b,{colorScheme:k}=S,T=Lb(S,["colorScheme"]);return h[k]=T,h},void 0)},getSelectorRule(e,t,n,i){return n==="class"||n==="attr"?Vw(zr(t)?"".concat(e).concat(t,",").concat(e," ").concat(t):e,i):Vw(e,zr(t)?Vw(t,i):i)},transformCSS(e,t,n,i,a={},l,f,d){if(zr(t)){const{cssLayer:h}=a;if(i!=="style"){const b=this.getColorSchemeOption(a,f);t=n==="dark"?b.reduce((S,{type:k,selector:T})=>(zr(T)&&(S+=T.includes("[CSS]")?T.replace("[CSS]",t):this.getSelectorRule(T,d,k,t)),S),""):Vw(d!=null?d:":root",t)}if(h){const b={name:"primeui"};Dv(h)&&(b.name=Bp(h.name,{name:e,type:i})),zr(b.name)&&(t=Vw("@layer ".concat(b.name),t),l==null||l.layerNames(b.name))}return t}return""}},Ka={defaults:{variable:{prefix:"p",selector:":root",excludedKeyRegex:/^(primitive|semantic|components|directives|variables|colorscheme|light|dark|common|root|states|extend|css)$/gi},options:{prefix:"p",darkModeSelector:"system",cssLayer:!1}},_theme:void 0,_layerNames:new Set,_loadedStyleNames:new Set,_loadingStyles:new Set,_tokens:{},update(e={}){const{theme:t}=e;t&&(this._theme=mee(n0({},t),{options:n0(n0({},this.defaults.options),t.options)}),this._tokens=s0.createTokens(this.preset,this.defaults),this.clearLoadedStyleNames())},get theme(){return this._theme},get preset(){var e;return((e=this.theme)==null?void 0:e.preset)||{}},get options(){var e;return((e=this.theme)==null?void 0:e.options)||{}},get tokens(){return this._tokens},getTheme(){return this.theme},setTheme(e){this.update({theme:e}),qd.emit("theme:change",e)},getPreset(){return this.preset},setPreset(e){this._theme=mee(n0({},this.theme),{preset:e}),this._tokens=s0.createTokens(e,this.defaults),this.clearLoadedStyleNames(),qd.emit("preset:change",e),qd.emit("theme:change",this.theme)},getOptions(){return this.options},setOptions(e){this._theme=mee(n0({},this.theme),{options:e}),this.clearLoadedStyleNames(),qd.emit("options:change",e),qd.emit("theme:change",this.theme)},getLayerNames(){return[...this._layerNames]},setLayerNames(e){this._layerNames.add(e)},getLoadedStyleNames(){return this._loadedStyleNames},isStyleNameLoaded(e){return this._loadedStyleNames.has(e)},setLoadedStyleName(e){this._loadedStyleNames.add(e)},deleteLoadedStyleName(e){this._loadedStyleNames.delete(e)},clearLoadedStyleNames(){this._loadedStyleNames.clear()},getTokenValue(e){return s0.getTokenValue(this.tokens,e,this.defaults)},getCommon(e="",t){return s0.getCommon({name:e,theme:this.theme,params:t,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},getComponent(e="",t){const n={name:e,theme:this.theme,params:t,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return s0.getPresetC(n)},getDirective(e="",t){const n={name:e,theme:this.theme,params:t,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return s0.getPresetD(n)},getCustomPreset(e="",t,n,i){const a={name:e,preset:t,options:this.options,selector:n,params:i,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return s0.getPreset(a)},getLayerOrderCSS(e=""){return s0.getLayerOrder(e,this.options,{names:this.getLayerNames()},this.defaults)},transformCSS(e="",t,n="style",i){return s0.transformCSS(e,t,i,n,this.options,{layerNames:this.setLayerNames.bind(this)},this.defaults)},getCommonStyleSheet(e="",t,n={}){return s0.getCommonStyleSheet({name:e,theme:this.theme,params:t,props:n,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},getStyleSheet(e,t,n={}){return s0.getStyleSheet({name:e,theme:this.theme,params:t,props:n,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},onStyleMounted(e){this._loadingStyles.add(e)},onStyleUpdated(e){this._loadingStyles.add(e)},onStyleLoaded(e,{name:t}){this._loadingStyles.size&&(this._loadingStyles.delete(t),qd.emit("theme:".concat(t,":load"),e),!this._loadingStyles.size&&qd.emit("theme:load"))}},Mf={STARTS_WITH:"startsWith",CONTAINS:"contains",NOT_CONTAINS:"notContains",ENDS_WITH:"endsWith",EQUALS:"equals",NOT_EQUALS:"notEquals",LESS_THAN:"lt",LESS_THAN_OR_EQUAL_TO:"lte",GREATER_THAN:"gt",GREATER_THAN_OR_EQUAL_TO:"gte",DATE_IS:"dateIs",DATE_IS_NOT:"dateIsNot",DATE_BEFORE:"dateBefore",DATE_AFTER:"dateAfter"},aIe=({dt:e})=>"\n*,\n::before,\n::after {\n box-sizing: border-box;\n}\n\n/* Non vue overlay animations */\n.p-connected-overlay {\n opacity: 0;\n transform: scaleY(0.8);\n transition: transform 0.12s cubic-bezier(0, 0, 0.2, 1),\n opacity 0.12s cubic-bezier(0, 0, 0.2, 1);\n}\n\n.p-connected-overlay-visible {\n opacity: 1;\n transform: scaleY(1);\n}\n\n.p-connected-overlay-hidden {\n opacity: 0;\n transform: scaleY(1);\n transition: opacity 0.1s linear;\n}\n\n/* Vue based overlay animations */\n.p-connected-overlay-enter-from {\n opacity: 0;\n transform: scaleY(0.8);\n}\n\n.p-connected-overlay-leave-to {\n opacity: 0;\n}\n\n.p-connected-overlay-enter-active {\n transition: transform 0.12s cubic-bezier(0, 0, 0.2, 1),\n opacity 0.12s cubic-bezier(0, 0, 0.2, 1);\n}\n\n.p-connected-overlay-leave-active {\n transition: opacity 0.1s linear;\n}\n\n/* Toggleable Content */\n.p-toggleable-content-enter-from,\n.p-toggleable-content-leave-to {\n max-height: 0;\n}\n\n.p-toggleable-content-enter-to,\n.p-toggleable-content-leave-from {\n max-height: 1000px;\n}\n\n.p-toggleable-content-leave-active {\n overflow: hidden;\n transition: max-height 0.45s cubic-bezier(0, 1, 0, 1);\n}\n\n.p-toggleable-content-enter-active {\n overflow: hidden;\n transition: max-height 1s ease-in-out;\n}\n\n.p-disabled,\n.p-disabled * {\n cursor: default;\n pointer-events: none;\n user-select: none;\n}\n\n.p-disabled,\n.p-component:disabled {\n opacity: ".concat(e("disabled.opacity"),";\n}\n\n.pi {\n font-size: ").concat(e("icon.size"),";\n}\n\n.p-icon {\n width: ").concat(e("icon.size"),";\n height: ").concat(e("icon.size"),";\n}\n\n.p-overlay-mask {\n background: ").concat(e("mask.background"),";\n color: ").concat(e("mask.color"),";\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n\n.p-overlay-mask-enter {\n animation: p-overlay-mask-enter-animation ").concat(e("mask.transition.duration")," forwards;\n}\n\n.p-overlay-mask-leave {\n animation: p-overlay-mask-leave-animation ").concat(e("mask.transition.duration")," forwards;\n}\n\n@keyframes p-overlay-mask-enter-animation {\n from {\n background: transparent;\n }\n to {\n background: ").concat(e("mask.background"),";\n }\n}\n@keyframes p-overlay-mask-leave-animation {\n from {\n background: ").concat(e("mask.background"),";\n }\n to {\n background: transparent;\n }\n}\n");function nO(e){"@babel/helpers - typeof";return nO=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nO(e)}function X2e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function J2e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?X2e(Object(n),!0).forEach(function(i){lIe(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X2e(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function lIe(e,t,n){return(t=cIe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cIe(e){var t=uIe(e,"string");return nO(t)=="symbol"?t:t+""}function uIe(e,t){if(nO(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(nO(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function dIe(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;sd()?Pr(e):t?e():kc(e)}var fIe=0;function pIe(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=kt(!1),i=kt(e),a=kt(null),l=qTe()?window.document:void 0,f=t.document,d=f===void 0?l:f,h=t.immediate,b=h===void 0?!0:h,S=t.manual,k=S===void 0?!1:S,T=t.name,O=T===void 0?"style_".concat(++fIe):T,P=t.id,B=P===void 0?void 0:P,W=t.media,Z=W===void 0?void 0:W,Y=t.nonce,z=Y===void 0?void 0:Y,q=t.first,ne=q===void 0?!1:q,ue=t.onMounted,J=ue===void 0?void 0:ue,ce=t.onUpdated,ge=ce===void 0?void 0:ce,de=t.onLoad,he=de===void 0?void 0:de,ie=t.props,Be=ie===void 0?{}:ie,$e=function(){},Ue=function(Fe){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(d){var Dt=J2e(J2e({},Be),St),He=Dt.name||O,ft=Dt.id||B,ht=Dt.nonce||z;a.value=d.querySelector('style[data-primevue-style-id="'.concat(He,'"]'))||d.getElementById(ft)||d.createElement("style"),a.value.isConnected||(i.value=Fe||e,xV(a.value,{type:"text/css",id:ft,media:Z,nonce:ht}),ne?d.head.prepend(a.value):d.head.appendChild(a.value),KTe(a.value,"data-primevue-style-id",He),xV(a.value,Dt),a.value.onload=function(At){return he==null?void 0:he(At,{name:He})},J==null||J(He)),!n.value&&($e=io(i,function(At){a.value.textContent=At,ge==null||ge(He)},{immediate:!0}),n.value=!0)}},V=function(){!d||!n.value||($e(),zTe(a.value)&&d.head.removeChild(a.value),n.value=!1)};return b&&!k&&dIe(Ue),{id:B,name:O,el:a,css:i,unload:V,load:Ue,isLoaded:lw(n)}}function sO(e){"@babel/helpers - typeof";return sO=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sO(e)}function Q2e(e,t){return vIe(e)||gIe(e,t)||hIe(e,t)||mIe()}function mIe(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function hIe(e,t){if(e){if(typeof e=="string")return ebe(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ebe(e,t):void 0}}function ebe(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function gIe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i,a,l,f,d=[],h=!0,b=!1;try{if(l=(n=n.call(e)).next,t!==0)for(;!(h=(i=l.call(n)).done)&&(d.push(i.value),d.length!==t);h=!0);}catch(S){b=!0,a=S}finally{try{if(!h&&n.return!=null&&(f=n.return(),Object(f)!==f))return}finally{if(b)throw a}}return d}}function vIe(e){if(Array.isArray(e))return e}function tbe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function gee(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tbe(Object(n),!0).forEach(function(i){bIe(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tbe(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function bIe(e,t,n){return(t=yIe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yIe(e){var t=_Ie(e,"string");return sO(t)=="symbol"?t:t+""}function _Ie(e,t){if(sO(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(sO(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var SIe=function(t){var n=t.dt;return"\n.p-hidden-accessible {\n border: 0;\n clip: rect(0 0 0 0);\n height: 1px;\n margin: -1px;\n opacity: 0;\n overflow: hidden;\n padding: 0;\n pointer-events: none;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n\n.p-overflow-hidden {\n overflow: hidden;\n padding-right: ".concat(n("scrollbar.width"),";\n}\n")},CIe={},wIe={},lc={name:"base",css:SIe,style:aIe,classes:CIe,inlineStyles:wIe,load:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(l){return l},a=i(Bp(t,{dt:tO}));return zr(a)?pIe(JA(a),gee({name:this.name},n)):{}},loadCSS:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.load(this.css,t)},loadStyle:function(){var t=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return this.load(this.style,n,function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return Ka.transformCSS(n.name||t.name,"".concat(a).concat(i))})},getCommonTheme:function(t){return Ka.getCommon(this.name,t)},getComponentTheme:function(t){return Ka.getComponent(this.name,t)},getDirectiveTheme:function(t){return Ka.getDirective(this.name,t)},getPresetTheme:function(t,n,i){return Ka.getCustomPreset(this.name,t,n,i)},getLayerOrderThemeCSS:function(){return Ka.getLayerOrderCSS(this.name)},getStyleSheet:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.css){var i=Bp(this.css,{dt:tO})||"",a=JA("".concat(i).concat(t)),l=Object.entries(n).reduce(function(f,d){var h=Q2e(d,2),b=h[0],S=h[1];return f.push("".concat(b,'="').concat(S,'"'))&&f},[]).join(" ");return zr(a)?'<style type="text/css" data-primevue-style-id="'.concat(this.name,'" ').concat(l,">").concat(a,"</style>"):""}return""},getCommonThemeStyleSheet:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Ka.getCommonStyleSheet(this.name,t,n)},getThemeStyleSheet:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=[Ka.getStyleSheet(this.name,t,n)];if(this.style){var a=this.name==="base"?"global-style":"".concat(this.name,"-style"),l=Bp(this.style,{dt:tO}),f=JA(Ka.transformCSS(a,l)),d=Object.entries(n).reduce(function(h,b){var S=Q2e(b,2),k=S[0],T=S[1];return h.push("".concat(k,'="').concat(T,'"'))&&h},[]).join(" ");zr(f)&&i.push('<style type="text/css" data-primevue-style-id="'.concat(a,'" ').concat(d,">").concat(f,"</style>"))}return i.join("")},extend:function(t){return gee(gee({},this),{},{css:void 0,style:void 0},t)}},S5=U2e();function oO(e){"@babel/helpers - typeof";return oO=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oO(e)}function nbe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function AV(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nbe(Object(n),!0).forEach(function(i){EIe(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nbe(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function EIe(e,t,n){return(t=kIe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kIe(e){var t=xIe(e,"string");return oO(t)=="symbol"?t:t+""}function xIe(e,t){if(oO(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(oO(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var TIe={ripple:!1,inputStyle:null,inputVariant:null,locale:{startsWith:"Starts with",contains:"Contains",notContains:"Not contains",endsWith:"Ends with",equals:"Equals",notEquals:"Not equals",noFilter:"No Filter",lt:"Less than",lte:"Less than or equal to",gt:"Greater than",gte:"Greater than or equal to",dateIs:"Date is",dateIsNot:"Date is not",dateBefore:"Date is before",dateAfter:"Date is after",clear:"Clear",apply:"Apply",matchAll:"Match All",matchAny:"Match Any",addRule:"Add Rule",removeRule:"Remove Rule",accept:"Yes",reject:"No",choose:"Choose",upload:"Upload",cancel:"Cancel",completed:"Completed",pending:"Pending",fileSizeTypes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],chooseYear:"Choose Year",chooseMonth:"Choose Month",chooseDate:"Choose Date",prevDecade:"Previous Decade",nextDecade:"Next Decade",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",prevHour:"Previous Hour",nextHour:"Next Hour",prevMinute:"Previous Minute",nextMinute:"Next Minute",prevSecond:"Previous Second",nextSecond:"Next Second",am:"am",pm:"pm",today:"Today",weekHeader:"Wk",firstDayOfWeek:0,showMonthAfterYear:!1,dateFormat:"mm/dd/yy",weak:"Weak",medium:"Medium",strong:"Strong",passwordPrompt:"Enter a password",emptyFilterMessage:"No results found",searchMessage:"{0} results are available",selectionMessage:"{0} items selected",emptySelectionMessage:"No selected item",emptySearchMessage:"No results found",fileChosenMessage:"{0} files",noFileChosenMessage:"No file chosen",emptyMessage:"No available options",aria:{trueLabel:"True",falseLabel:"False",nullLabel:"Not Selected",star:"1 star",stars:"{star} stars",selectAll:"All items selected",unselectAll:"All items unselected",close:"Close",previous:"Previous",next:"Next",navigation:"Navigation",scrollTop:"Scroll Top",moveTop:"Move Top",moveUp:"Move Up",moveDown:"Move Down",moveBottom:"Move Bottom",moveToTarget:"Move to Target",moveToSource:"Move to Source",moveAllToTarget:"Move All to Target",moveAllToSource:"Move All to Source",pageLabel:"Page {page}",firstPageLabel:"First Page",lastPageLabel:"Last Page",nextPageLabel:"Next Page",prevPageLabel:"Previous Page",rowsPerPageLabel:"Rows per page",jumpToPageDropdownLabel:"Jump to Page Dropdown",jumpToPageInputLabel:"Jump to Page Input",selectRow:"Row Selected",unselectRow:"Row Unselected",expandRow:"Row Expanded",collapseRow:"Row Collapsed",showFilterMenu:"Show Filter Menu",hideFilterMenu:"Hide Filter Menu",filterOperator:"Filter Operator",filterConstraint:"Filter Constraint",editRow:"Row Edit",saveEdit:"Save Edit",cancelEdit:"Cancel Edit",listView:"List View",gridView:"Grid View",slide:"Slide",slideNumber:"{slideNumber}",zoomImage:"Zoom Image",zoomIn:"Zoom In",zoomOut:"Zoom Out",rotateRight:"Rotate Right",rotateLeft:"Rotate Left",listLabel:"Option List"}},filterMatchModeOptions:{text:[Mf.STARTS_WITH,Mf.CONTAINS,Mf.NOT_CONTAINS,Mf.ENDS_WITH,Mf.EQUALS,Mf.NOT_EQUALS],numeric:[Mf.EQUALS,Mf.NOT_EQUALS,Mf.LESS_THAN,Mf.LESS_THAN_OR_EQUAL_TO,Mf.GREATER_THAN,Mf.GREATER_THAN_OR_EQUAL_TO],date:[Mf.DATE_IS,Mf.DATE_IS_NOT,Mf.DATE_BEFORE,Mf.DATE_AFTER]},zIndex:{modal:1100,overlay:1e3,menu:1e3,tooltip:1100},theme:void 0,unstyled:!1,pt:void 0,ptOptions:{mergeSections:!0,mergeProps:!1},csp:{nonce:void 0}},IIe=Symbol();function AIe(e,t){var n={config:I1(t)};return e.config.globalProperties.$primevue=n,e.provide(IIe,n),OIe(),RIe(e,n),n}var Hw=[];function OIe(){qd.clear(),Hw.forEach(function(e){return e==null?void 0:e()}),Hw=[]}function RIe(e,t){var n=kt(!1),i=function(){var b;if(((b=t.config)===null||b===void 0?void 0:b.theme)!=="none"&&!Ka.isStyleNameLoaded("common")){var S,k,T=((S=lc.getCommonTheme)===null||S===void 0?void 0:S.call(lc))||{},O=T.primitive,P=T.semantic,B=T.global,W=T.style,Z={nonce:(k=t.config)===null||k===void 0||(k=k.csp)===null||k===void 0?void 0:k.nonce};lc.load(O==null?void 0:O.css,AV({name:"primitive-variables"},Z)),lc.load(P==null?void 0:P.css,AV({name:"semantic-variables"},Z)),lc.load(B==null?void 0:B.css,AV({name:"global-variables"},Z)),lc.loadStyle(AV({name:"global-style"},Z),W),Ka.setLoadedStyleName("common")}};qd.on("theme:change",function(h){n.value||(e.config.globalProperties.$primevue.config.theme=h,n.value=!0)});var a=io(t.config,function(h,b){S5.emit("config:change",{newValue:h,oldValue:b})},{immediate:!0,deep:!0}),l=io(function(){return t.config.ripple},function(h,b){S5.emit("config:ripple:change",{newValue:h,oldValue:b})},{immediate:!0,deep:!0}),f=io(function(){return t.config.theme},function(h,b){n.value||Ka.setTheme(h),t.config.unstyled||i(),n.value=!1,S5.emit("config:theme:change",{newValue:h,oldValue:b})},{immediate:!0,deep:!1}),d=io(function(){return t.config.unstyled},function(h,b){!h&&t.config.theme&&i(),S5.emit("config:unstyled:change",{newValue:h,oldValue:b})},{immediate:!0,deep:!0});Hw.push(a),Hw.push(l),Hw.push(f),Hw.push(d)}var DIe={install:function(t,n){var i=MTe(TIe,n);AIe(t,i)}};function Uw(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function LIe(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function i(){return this instanceof i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(i){var a=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(n,i,a.get?a:{enumerable:!0,get:function(){return e[i]}})}),n}var OV={exports:{}};/*! * vue-scrollto v2.20.0 * (c) 2019 Randjelovic Igor * @license MIT */var PIe=OV.exports,sbe;function MIe(){return sbe||(sbe=1,function(e,t){(function(n,i){e.exports=i()})(PIe,function(){function n(He){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?n=function(ft){return typeof ft}:n=function(ft){return ft&&typeof Symbol=="function"&&ft.constructor===Symbol&&ft!==Symbol.prototype?"symbol":typeof ft},n(He)}function i(){return i=Object.assign||function(He){for(var ft=1;ft<arguments.length;ft++){var ht=arguments[ft];for(var At in ht)Object.prototype.hasOwnProperty.call(ht,At)&&(He[At]=ht[At])}return He},i.apply(this,arguments)}var a=4,l=.001,f=1e-7,d=10,h=11,b=1/(h-1),S=typeof Float32Array=="function";function k(He,ft){return 1-3*ft+3*He}function T(He,ft){return 3*ft-6*He}function O(He){return 3*He}function P(He,ft,ht){return((k(ft,ht)*He+T(ft,ht))*He+O(ft))*He}function B(He,ft,ht){return 3*k(ft,ht)*He*He+2*T(ft,ht)*He+O(ft)}function W(He,ft,ht,At,hn){var ct,Ht,ye=0;do Ht=ft+(ht-ft)/2,ct=P(Ht,At,hn)-He,ct>0?ht=Ht:ft=Ht;while(Math.abs(ct)>f&&++ye<d);return Ht}function Z(He,ft,ht,At){for(var hn=0;hn<a;++hn){var ct=B(ft,ht,At);if(ct===0)return ft;var Ht=P(ft,ht,At)-He;ft-=Ht/ct}return ft}function Y(He){return He}var z=function(ft,ht,At,hn){if(!(0<=ft&&ft<=1&&0<=At&&At<=1))throw new Error("bezier x values must be in [0, 1] range");if(ft===ht&&At===hn)return Y;for(var ct=S?new Float32Array(h):new Array(h),Ht=0;Ht<h;++Ht)ct[Ht]=P(Ht*b,ft,At);function ye(lo){for(var jn=0,so=1,Xs=h-1;so!==Xs&&ct[so]<=lo;++so)jn+=b;--so;var ot=(lo-ct[so])/(ct[so+1]-ct[so]),Qe=jn+ot*b,Ot=B(Qe,ft,At);return Ot>=l?Z(lo,Qe,ft,At):Ot===0?Qe:W(lo,jn,jn+b,ft,At)}return function(jn){return jn===0?0:jn===1?1:P(ye(jn),ht,hn)}},q={ease:[.25,.1,.25,1],linear:[0,0,1,1],"ease-in":[.42,0,1,1],"ease-out":[0,0,.58,1],"ease-in-out":[.42,0,.58,1]},ne=!1;try{var ue=Object.defineProperty({},"passive",{get:function(){ne=!0}});window.addEventListener("test",null,ue)}catch{}var J={$:function(ft){return typeof ft!="string"?ft:document.querySelector(ft)},on:function(ft,ht,At){var hn=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{passive:!1};ht instanceof Array||(ht=[ht]);for(var ct=0;ct<ht.length;ct++)ft.addEventListener(ht[ct],At,ne?hn:!1)},off:function(ft,ht,At){ht instanceof Array||(ht=[ht]);for(var hn=0;hn<ht.length;hn++)ft.removeEventListener(ht[hn],At)},cumulativeOffset:function(ft){var ht=0,At=0;do ht+=ft.offsetTop||0,At+=ft.offsetLeft||0,ft=ft.offsetParent;while(ft);return{top:ht,left:At}}},ce=["mousedown","wheel","DOMMouseScroll","mousewheel","keyup","touchmove"],ge={container:"body",duration:500,lazy:!0,easing:"ease",offset:0,force:!0,cancelable:!0,onStart:!1,onDone:!1,onCancel:!1,x:!1,y:!0};function de(He){ge=i({},ge,He)}var he=function(){var ft,ht,At,hn,ct,Ht,ye,lo,jn,so,Xs,ot,Qe,Ot,Nt,Ve,dn,kn,Bt,Le,je,Ze,pt,Vt=function(er){lo&&(pt=er,Le=!0)},sn,Wn,ts,Zn;function yo(Do){var er=Do.scrollTop;return Do.tagName.toLowerCase()==="body"&&(er=er||document.documentElement.scrollTop),er}function Qs(Do){var er=Do.scrollLeft;return Do.tagName.toLowerCase()==="body"&&(er=er||document.documentElement.scrollLeft),er}function Rs(){je=J.cumulativeOffset(ht),Ze=J.cumulativeOffset(ft),ot&&(Nt=Ze.left-je.left+Ht,kn=Nt-Ot),Qe&&(dn=Ze.top-je.top+Ht,Bt=dn-Ve)}function xr(Do){if(Le)return Po();Wn||(Wn=Do),ct||Rs(),ts=Do-Wn,Zn=Math.min(ts/At,1),Zn=sn(Zn),jo(ht,Ve+Bt*Zn,Ot+kn*Zn),ts<At?window.requestAnimationFrame(xr):Po()}function Po(){Le||jo(ht,dn,Nt),Wn=!1,J.off(ht,ce,Vt),Le&&Xs&&Xs(pt,ft),!Le&&so&&so(ft)}function jo(Do,er,Zs){Qe&&(Do.scrollTop=er),ot&&(Do.scrollLeft=Zs),Do.tagName.toLowerCase()==="body"&&(Qe&&(document.documentElement.scrollTop=er),ot&&(document.documentElement.scrollLeft=Zs))}function Mo(Do,er){var Zs=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(n(er)==="object"?Zs=er:typeof er=="number"&&(Zs.duration=er),ft=J.$(Do),!ft)return console.warn("[vue-scrollto warn]: Trying to scroll to an element that is not on the page: "+Do);if(ht=J.$(Zs.container||ge.container),At=Zs.hasOwnProperty("duration")?Zs.duration:ge.duration,ct=Zs.hasOwnProperty("lazy")?Zs.lazy:ge.lazy,hn=Zs.easing||ge.easing,Ht=Zs.hasOwnProperty("offset")?Zs.offset:ge.offset,ye=Zs.hasOwnProperty("force")?Zs.force!==!1:ge.force,lo=Zs.hasOwnProperty("cancelable")?Zs.cancelable!==!1:ge.cancelable,jn=Zs.onStart||ge.onStart,so=Zs.onDone||ge.onDone,Xs=Zs.onCancel||ge.onCancel,ot=Zs.x===void 0?ge.x:Zs.x,Qe=Zs.y===void 0?ge.y:Zs.y,typeof Ht=="function"&&(Ht=Ht(ft,ht)),Ot=Qs(ht),Ve=yo(ht),Rs(),Le=!1,!ye){var Xa=ht.tagName.toLowerCase()==="body"?document.documentElement.clientHeight||window.innerHeight:ht.offsetHeight,bn=Ve,qs=bn+Xa,Qr=dn-Ht,lt=Qr+ft.offsetHeight;if(Qr>=bn&<<=qs){so&&so(ft);return}}if(jn&&jn(ft),!Bt&&!kn){so&&so(ft);return}return typeof hn=="string"&&(hn=q[hn]||q.ease),sn=z.apply(z,hn),J.on(ht,ce,Vt,{passive:!0}),window.requestAnimationFrame(xr),function(){pt=null,Le=!0}}return Mo},ie=he(),Be=[];function $e(He){for(var ft=0;ft<Be.length;++ft)if(Be[ft].el===He)return Be.splice(ft,1),!0;return!1}function Ue(He){for(var ft=0;ft<Be.length;++ft)if(Be[ft].el===He)return Be[ft]}function V(He){var ft=Ue(He);return ft||(Be.push(ft={el:He,binding:{}}),ft)}function Ye(He){var ft=V(this).binding;if(ft.value){if(He.preventDefault(),typeof ft.value=="string")return ie(ft.value);ie(ft.value.el||ft.value.element,ft.value)}}var Fe={bind:function(ft,ht){V(ft).binding=ht,J.on(ft,"click",Ye)},unbind:function(ft){$e(ft),J.off(ft,"click",Ye)},update:function(ft,ht){V(ft).binding=ht}},St={bind:Fe.bind,unbind:Fe.unbind,update:Fe.update,beforeMount:Fe.bind,unmounted:Fe.unbind,updated:Fe.update,scrollTo:ie,bindings:Be},Dt=function(ft,ht){ht&&de(ht),ft.directive("scroll-to",St);var At=ft.config.globalProperties||ft.prototype;At.$scrollTo=St.scrollTo};return typeof window<"u"&&window.Vue&&(window.VueScrollTo=St,window.VueScrollTo.setDefaults=de,window.VueScrollTo.scroller=he,window.Vue.use&&window.Vue.use(Dt)),St.install=Dt,St})}(OV)),OV.exports}var NIe=MIe();const FIe=Uw(NIe);var RV={exports:{}},obe;function $Ie(){if(obe)return RV.exports;obe=1;function e(){}return e.prototype={on:function(t,n,i){var a=this.e||(this.e={});return(a[t]||(a[t]=[])).push({fn:n,ctx:i}),this},once:function(t,n,i){var a=this;function l(){a.off(t,l),n.apply(i,arguments)}return l._=n,this.on(t,l,i)},emit:function(t){var n=[].slice.call(arguments,1),i=((this.e||(this.e={}))[t]||[]).slice(),a=0,l=i.length;for(a;a<l;a++)i[a].fn.apply(i[a].ctx,n);return this},off:function(t,n){var i=this.e||(this.e={}),a=i[t],l=[];if(a&&n)for(var f=0,d=a.length;f<d;f++)a[f].fn!==n&&a[f].fn._!==n&&l.push(a[f]);return l.length?i[t]=l:delete i[t],this}},RV.exports=e,RV.exports.TinyEmitter=e,RV.exports}var vee,rbe;function BIe(){if(rbe)return vee;rbe=1;var e=$Ie();return vee=new e,vee}var VIe=BIe();const DV=Uw(VIe),rO=LA("modal",()=>{var B,W,Z,Y,z;const e=Ge(()=>{var q,ne,ue,J;return(q=b==null?void 0:b.value)!=null&&q.opened?4:(ne=h==null?void 0:h.value)!=null&&ne.opened?3:(ue=d==null?void 0:d.value)!=null&&ue.opened?2:(J=f==null?void 0:f.value)!=null&&J.opened?1:0}),t=kt({}),n=kt(!1);function i(q){q.bodyComponent&&(q.bodyComponent=Z3(q.bodyComponent)),t.value=q,n.value=!0}function a(q=!0){q&&t.value.closeLegacyHandler&&t.value.closeLegacyHandler(),t.value={},n.value=!1}function l(q){var ue,J;const ne=((ue=q==null?void 0:q.data)==null?void 0:ue.errorMessage)||((J=q==null?void 0:q.data)==null?void 0:J.error)||xc("common.unknownError");i({name:"ajaxError",title:xc("common.error"),message:ne,actions:[{label:xc("common.ok"),callback:ce=>ce()}],modalStyle:"negative"})}const f=kt(null),d=kt(null),h=kt(null),b=kt(null);let S=1;function k(q,ne={},ue={}){var de,he,ie,Be,$e,Ue,V,Ye;S++;let J=null;typeof q!="string"?J=Z3(q):J=q;const ge={modalId:ue!=null&&ue.modalId?ue==null?void 0:ue.modalId:S,opened:!0,component:J,props:ne,onClose:ue.onClose};!((de=f.value)!=null&&de.opened)||(he=f.value)!=null&&he.toBeClosed?f.value=ge:!((ie=d.value)!=null&&ie.opened)||(Be=d.value)!=null&&Be.toBeClosed?d.value=ge:!(($e=h.value)!=null&&$e.opened)||(Ue=h.value)!=null&&Ue.toBeClosed?h.value=ge:(!((V=b.value)!=null&&V.opened)||(Ye=b.value)!=null&&Ye.toBeClosed)&&(b.value=ge)}function T(q,ne){var ue,J,ce,ge,de,he,ie,Be;((ue=f==null?void 0:f.value)==null?void 0:ue.component)===q?P(!1,(J=f==null?void 0:f.value)==null?void 0:J.modalId,ne):((ce=d==null?void 0:d.value)==null?void 0:ce.component)===q?P(!1,(ge=d==null?void 0:d.value)==null?void 0:ge.modalId,ne):((de=h==null?void 0:h.value)==null?void 0:de.component)===q?P(!1,(he=h==null?void 0:h.value)==null?void 0:he.modalId,ne):((ie=b==null?void 0:b.value)==null?void 0:ie.component)===q&&P(!1,(Be=b==null?void 0:b.value)==null?void 0:Be.modalId,ne)}function O(q){var ne,ue,J,ce;return((ne=f==null?void 0:f.value)==null?void 0:ne.component)===q||((ue=d==null?void 0:d.value)==null?void 0:ue.component)===q||((J=h==null?void 0:h.value)==null?void 0:J.component)===q?!0:((ce=b==null?void 0:b.value)==null?void 0:ce.component)===q}function P(q=!0,ne,ue){var ce,ge,de,he,ie,Be,$e,Ue,V,Ye,Fe,St,Dt,He;let J=null;((ce=f==null?void 0:f.value)==null?void 0:ce.modalId)===ne&&((ge=f==null?void 0:f.value)!=null&&ge.opened)&&(J=f),((de=d==null?void 0:d.value)==null?void 0:de.modalId)===ne&&((he=d==null?void 0:d.value)!=null&&he.opened)&&(J=d),((ie=h==null?void 0:h.value)==null?void 0:ie.modalId)===ne&&((Be=h==null?void 0:h.value)!=null&&Be.opened)&&(J=h),(($e=b==null?void 0:b.value)==null?void 0:$e.modalId)===ne&&((Ue=b==null?void 0:b.value)!=null&&Ue.opened)&&(J=b),J&&(J.value.opened=!1,J.value.onClose&&J.value.onClose(ue),setTimeout(()=>{var ft;(ft=J.value)!=null&&ft.opened||(J.value=null)},300),q&&((Fe=(Ye=(V=J.value)==null?void 0:V.props)==null?void 0:Ye.legacyOptions)!=null&&Fe.modalHandler)&&((He=(Dt=(St=J.value)==null?void 0:St.props)==null?void 0:Dt.legacyOptions)==null||He.modalHandler.modalClose()))}return(B=pkp==null?void 0:pkp.eventBus)==null||B.$on("open-modal-vue",q=>{var ue;const ne=((ue=q.options)==null?void 0:ue.props)||{};k(q.component,{...ne,legacyOptions:q.options},{modalId:q.modalId})}),(W=pkp==null?void 0:pkp.eventBus)==null||W.$on("close-modal-vue-soon",q=>{var ue,J,ce,ge;const ne=q.modalId;((ue=f.value)==null?void 0:ue.modalId)===ne&&(f.value.toBeClosed=!0),((J=d.value)==null?void 0:J.modalId)===ne&&(d.value.toBeClosed=!0),((ce=h.value)==null?void 0:ce.modalId)===ne&&(h.value.toBeClosed=!0),((ge=b.value)==null?void 0:ge.modalId)===ne&&(b.value.toBeClosed=!0)}),(Z=pkp==null?void 0:pkp.eventBus)==null||Z.$on("close-modal-vue",q=>{P(!1,q.modalId)}),(Y=pkp==null?void 0:pkp.eventBus)==null||Y.$on("open-dialog-vue",q=>{i(q.dialogProps)}),(z=pkp==null?void 0:pkp.eventBus)==null||z.$on("close-dialog-vue",q=>{a(!1)}),{dialogLevel:e,dialogProps:t,dialogOpened:n,openDialogNetworkError:l,openDialog:i,closeDialog:a,openSideModal:k,closeSideModal:T,closeSideModalById:P,isSideModalOpened:O,sideModal1:f,sideModal2:d,sideModal3:h,sideModal4:b}}),wd={methods:{openDialog(e,t,n){rO().openDialog(e)}}},ibe=LA("announcer",()=>{const e=kt(""),t=kt("");function n(i,a="polite"){e.value=a,t.value=i}return{politeness:e,content:t,set:n}});function iO(){const e=ibe();function t(n,i="polite"){e.set(n,i)}return{announce:t}}const HIe=Object.freeze(Object.defineProperty({__proto__:null,useAnnouncer:iO},Symbol.toStringTag,{value:"Module"}));function LV(){function e(){return pkp.context.app==="ojs2"}function t(){return pkp.context.app==="omp"}function n(){return pkp.context.app==="ops"}function i(){return pkp.context.supportedLocales}function a(){return pkp.context.currentLocale}function l(){return pkp.context.helpUrl}return{isOJS:e,isOMP:t,isOPS:n,getSupportedLocales:i,getCurrentLocale:a,getHelpUrl:l}}const UIe=Object.freeze(Object.defineProperty({__proto__:null,useApp:LV},Symbol.toStringTag,{value:"Module"}));function zIe(){const e=kt({});function t(i){return e.value[i]?e.value[i]:{}}function n(i,a){let l={...t(i)};Object.keys(a).forEach(function(f){l[f]=a[f]}),e.value[i]=l}return{components:e,get:t,set:n}}const WIe=Object.freeze(Object.defineProperty({__proto__:null,useContainerStateManager:zIe},Symbol.toStringTag,{value:"Module"}));function jIe(e){return e}function Jn(){return{t:xc,tk:jIe,localize:KQ,localizeSubmission:Vve}}const ZIe=Object.freeze(Object.defineProperty({__proto__:null,useLocalize:Jn},Symbol.toStringTag,{value:"Module"})),{t:abe,tk:Ou}=Jn(),$1={INCOMPLETE:"incomplete",SUBMISSION:"submission",INTERNAL_REVIEW:"internalReview",EXTERNAL_REVIEW:"externalReview",EDITING:"editing",PRODUCTION_QUEUED:"productionQueued",PRODUCTION_SCHEDULED:"productionScheduled",PRODUCTION_PUBLISHED:"productionPublished",DECLINED:"declined"},lbe={incomplete:Ou("submissions.incomplete"),submission:Ou("manager.publication.submissionStage"),internalReview:Ou("submission.stage.internalReviewWithRound"),externalReview:Ou("submission.stage.externalReviewWithRound"),editing:Ou("submission.copyediting"),productionQueued:Ou("manager.publication.productionStage"),productionScheduled:Ou("submission.status.scheduled"),productionPublished:Ou("submission.stage.published"),declined:Ou("submissions.declined")},cbe={[pkp.const.WORKFLOW_STAGE_ID_SUBMISSION]:Ou("manager.publication.submissionStage"),[pkp.const.WORKFLOW_STAGE_ID_INTERNAL_REVIEW]:Ou("workflow.review.internalReview"),[pkp.const.WORKFLOW_STAGE_ID_EXTERNAL_REVIEW]:Ou("workflow.review.externalReview"),[pkp.const.WORKFLOW_STAGE_ID_EDITING]:Ou("submission.copyediting"),[pkp.const.WORKFLOW_STAGE_ID_PRODUCTION]:Ou("manager.publication.productionStage")},PV={[pkp.const.SUBMISSION_REVIEWER_RECOMMENDATION_ACCEPT]:Ou("reviewer.article.decision.accept"),[pkp.const.SUBMISSION_REVIEWER_RECOMMENDATION_PENDING_REVISIONS]:Ou("reviewer.article.decision.pendingRevisions"),[pkp.const.SUBMISSION_REVIEWER_RECOMMENDATION_RESUBMIT_HERE]:Ou("reviewer.article.decision.resubmitHere"),[pkp.const.SUBMISSION_REVIEWER_RECOMMENDATION_RESUBMIT_ELSEWHERE]:Ou("reviewer.article.decision.resubmitElsewhere"),[pkp.const.SUBMISSION_REVIEWER_RECOMMENDATION_DECLINE]:Ou("reviewer.article.decision.decline"),[pkp.const.SUBMISSION_REVIEWER_RECOMMENDATION_SEE_COMMENTS]:Ou("reviewer.article.decision.seeComments")},qIe=[pkp.const.REVIEW_ASSIGNMENT_STATUS_ACCEPTED,pkp.const.REVIEW_ASSIGNMENT_STATUS_REVIEW_OVERDUE],aO=[pkp.const.REVIEW_ASSIGNMENT_STATUS_RECEIVED,pkp.const.REVIEW_ASSIGNMENT_STATUS_COMPLETE,pkp.const.REVIEW_ASSIGNMENT_STATUS_THANKED,pkp.const.REVIEW_ASSIGNMENT_STATUS_VIEWED],ube=[pkp.const.REVIEW_ASSIGNMENT_STATUS_COMPLETE,pkp.const.REVIEW_ASSIGNMENT_STATUS_THANKED],GIe=[pkp.const.REVIEW_ASSIGNMENT_STATUS_DECLINED,pkp.const.REVIEW_ASSIGNMENT_STATUS_CANCELLED];function Va(){function e(J){return J.stages.find(ce=>ce.isActiveStage)}function t(J,ce){return J.stages.find(ge=>ge.id===ce)}function n(J,ce){return J.find(ge=>ge.id===ce)}function i(J,ce){return J.filter(ge=>ge.roundId===ce)}function a(J,ce=pkp.const.WORKFLOW_STAGE_ID_EXTERNAL_REVIEW){const ge=J==null?void 0:J.reviewRounds.filter(de=>de.stageId===ce);return ge.length?ge[ge.length-1]:null}function l(J,ce){return J==null?void 0:J.reviewRounds.find(ge=>ge.id===ce)}function f(J,ce){return J==null?void 0:J.reviewRounds.filter(ge=>ge.stageId===ce)}function d(J,ce){const ge=a(J,ce);return J.reviewAssignments.filter(de=>de.round===ge.round)}function h(J){return J.publications.find(ce=>ce.id===J.currentPublicationId)}function b(J){return J.publications.reduce((ce,ge)=>ge.id>ce.id?ge:ce,J.publications[0])}function S(J){const ce=e(J);if(J.status===pkp.const.STATUS_DECLINED)return $1.DECLINED;switch(ce.id){case pkp.const.WORKFLOW_STAGE_ID_SUBMISSION:return J.submissionProgress?$1.INCOMPLETE:$1.SUBMISSION;case pkp.const.WORKFLOW_STAGE_ID_INTERNAL_REVIEW:return $1.INTERNAL_REVIEW;case pkp.const.WORKFLOW_STAGE_ID_EXTERNAL_REVIEW:return $1.EXTERNAL_REVIEW;case pkp.const.WORKFLOW_STAGE_ID_EDITING:switch(J.status){case pkp.const.STATUS_SCHEDULED:return $1.PRODUCTION_SCHEDULED;case pkp.const.STATUS_PUBLISHED:return $1.PRODUCTION_PUBLISHED;default:return $1.EDITING}case pkp.const.WORKFLOW_STAGE_ID_PRODUCTION:switch(J.status){case pkp.const.STATUS_QUEUED:return $1.PRODUCTION_QUEUED;case pkp.const.STATUS_SCHEDULED:return $1.PRODUCTION_SCHEDULED;case pkp.const.STATUS_PUBLISHED:return $1.PRODUCTION_PUBLISHED}}}function k(J){const ce=S(J);let ge;const de=e(J);if(de.id===pkp.const.WORKFLOW_STAGE_ID_EXTERNAL_REVIEW||de.id===pkp.const.WORKFLOW_STAGE_ID_INTERNAL_REVIEW){const he=f(J,de.id);ge=he[he.length-1].round}return abe(lbe[ce],{round:ge})}function T(J){return abe(cbe[J.stageId])}function O(J,ce){return J.stageId>ce}function P(J,ce){if(ce===pkp.const.WORKFLOW_STAGE_ID_EXTERNAL_REVIEW||ce===pkp.const.WORKFLOW_STAGE_ID_INTERNAL_REVIEW){const ge=f(J,ce);return(ge==null?void 0:ge.length)===0}return J.stageId<ce}function B(J){return J.filter(ce=>!GIe.includes(ce.statusId))}function W(J=[]){return B(J).filter(ce=>aO.includes(ce.statusId))}function Z(J=[]){return B(J).filter(ce=>ube.includes(ce.statusId))}function Y(J){return J.filter(ce=>ce.reviewMethod===pkp.const.SUBMISSION_REVIEW_METHOD_OPEN)}function z(J,ce){return i(J,ce).filter(ge=>ge.reviewMethod===pkp.const.SUBMISSION_REVIEW_METHOD_OPEN)}function q(J,ce){return z(J,ce).filter(ge=>!!ge.dateCompleted)}function ne(J,ce){var de;const ge=e(J);return(de=J==null?void 0:J.availableEditorialDecisions)==null?void 0:de.some(he=>he.id===ce&&he.stageId===ge.id)}function ue(J,ce,ge,de){if(!de||!(ce===pkp.const.WORKFLOW_STAGE_ID_EXTERNAL_REVIEW||ce===pkp.const.WORKFLOW_STAGE_ID_INTERNAL_REVIEW))return{shouldMinimumReviewsBeConsidered:!1,hasMinimumReviewsCount:!1};const he=i(J.reviewAssignments,ge);return{shouldMinimumReviewsBeConsidered:!0,hasMinimumReviewsCount:Z(he).length>=de}}return{getSubmissionById:n,getActiveStage:e,getStageById:t,getStageLabel:T,getExtendedStage:S,getExtendedStageLabel:k,getCurrentReviewRound:a,getReviewRound:l,getReviewRoundsForStage:f,getCurrentReviewAssignments:d,getCurrentPublication:h,getLatestPublication:b,hasNotSubmissionStartedStage:P,hasSubmissionPassedStage:O,getReviewAssignmentsForRound:i,getActiveReviewAssignments:B,getConfirmedReviewAssignments:Z,getCompletedReviewAssignments:W,checkMinimumConsideredReviews:ue,getOpenReviewAssignments:Y,getOpenReviewAssignmentsForRound:z,getOpenAndCompletedReviewAssignmentsForRound:q,InProgressReviewAssignmentStatuses:qIe,isDecisionAvailable:ne}}const KIe=Object.freeze(Object.defineProperty({__proto__:null,CompletedReviewAssignmentStatuses:aO,ConfirmedReviewAssignmentStatuses:ube,ExtendedStages:$1,ExtendedStagesLabels:lbe,RecommendationTranslations:PV,StageLabels:cbe,useSubmission:Va},Symbol.toStringTag,{value:"Module"})),bee=[pkp.const.ROLE_ID_SITE_ADMIN,pkp.const.ROLE_ID_MANAGER,pkp.const.ROLE_ID_SUB_EDITOR,pkp.const.ROLE_ID_ASSISTANT];function Nh(){function e(P=[]){return P.some(B=>pkp.currentUser.roles.includes(B))}function t(){return pkp.currentUser.id}function n(){return pkp.currentUser.username}function i(){return pkp.currentUser.fullName}function a(){return pkp.currentUser.initials}function l(){const P=S();return(P==null?void 0:P.username)||null}function f(){const P=S();return(P==null?void 0:P.initials)||null}function d(){return pkp.currentUser.unreadTasksCount}function h(P){return pkp.currentUser.unreadTasksCount=P,pkp.currentUser.unreadTasksCount}function b(){return pkp.currentUser.isUserLoggedInAs}function S(){return pkp.currentUser.loggedInAsUser}function k(P,B,W=[]){const{getStageById:Z}=Va(),Y=[];return Z(P,B).currentUserAssignedRoles.forEach(q=>{Y.includes(q)||Y.push(q)}),W.some(q=>Y.includes(q))}function T(P,B=[]){const W=[];return P.stages.forEach(Z=>{Z.currentUserAssignedRoles.forEach(Y=>{W.includes(Y)||W.push(Y)})}),B.some(Z=>W.includes(Z))}function O(P){const{getActiveReviewAssignments:B}=Va();return B(P.reviewAssignments).some(W=>W.isCurrentUserAssigned)}return{hasCurrentUserAtLeastOneRole:e,getCurrentUserId:t,hasCurrentUserAtLeastOneAssignedRoleInStage:k,hasCurrentUserAtLeastOneAssignedRoleInAnyStage:T,isCurrentUserAssignedAsReviewer:O,getUnreadNotifications:d,setUnreadNotifications:h,isUserLoggedInAs:b,getUserLoggedInAs:S,getCurrentUserFullName:i,getCurrentUserName:n,getCurrentUserInitials:a,getUserLoggedInAsUserName:l,getUserLoggedInAsInitials:f}}const YIe=Object.freeze(Object.defineProperty({__proto__:null,EditorialRoles:bee,useCurrentUser:Nh},Symbol.toStringTag,{value:"Module"}));let Fh={};function dbe(e){return Fh[e].useStore()}function JS(e){const t=sd(),n=t?t.parent==null?t.vnode.appContext&&t.vnode.appContext.provides:t.parent.provides:void 0;return n==null?void 0:n[e]}function Nf(e,t,{requireNamespace:n}={}){return function(i,a=""){var d;if(!a&&n){const h=(d=Mr(e))==null?void 0:d.namespace;h&&(a=h)}const l=a?"".concat(e,"_").concat(a):e;Fh[l]||(Fh[l]={mountedCount:0,useStore:null}),Pr(()=>{Fh[l].mountedCount=Fh[l].mountedCount+1}),wb(()=>{if(Fh[l].mountedCount=Fh[l].mountedCount-1,Fh[l].mountedCount===0){const h=Fh[l].useStore();h.$dispose(),Fh[l]=null,delete lEe().state.value[h.$id]}});function f(){return t(i)}return Fh[l].useStore||(n&&Ba(e,{namespace:a||null}),Fh[l].useStore=LA(l,f)),Fh[l].useStore()}}function Pb(e){if(e){const n=JS("registerDataChangeCallback");n&&n(e);const i=JS("unRegisterDataChangeCallback");$a(()=>{i&&i(e)})}let t=JS("triggerDataChange");return t||(t=()=>{}),{triggerDataChange:t}}const XIe=Object.freeze(Object.defineProperty({__proto__:null,useDataChanged:Pb},Symbol.toStringTag,{value:"Module"}));function fbe(e){let t=[];function n(l){t.push(l)}function i(l){t=t.filter(f=>f!==l)}async function a(){return Promise.all(t.map(l=>l()))}return e&&n(e),Ba("registerDataChangeCallback",n),Ba("unRegisterDataChangeCallback",i),Ba("triggerDataChange",a),{triggerDataChange:a}}const JIe=Object.freeze(Object.defineProperty({__proto__:null,useDataChangedProvider:fbe},Symbol.toStringTag,{value:"Module"}));function QIe(e){const t={d:"dd",D:"ccc",j:"d",l:"cccc",N:"E",S:"",w:"c",z:"o",W:"WW",F:"LLLL",m:"LL",M:"LLL",n:"L",t:"",L:"",o:"kkkk",Y:"yyyy",y:"yy",a:"a",A:"a",B:"",g:"h",G:"H",h:"hh",H:"HH",i:"mm",s:"ss",u:"SSS",v:"SSS",f:"SSS",e:"z",I:"",O:"ZZ",P:"Z",p:"z",T:"z",Z:"",c:"yyyy-LL-dd'T'HH:mm:ssZ",r:"ccc, dd LLL yyyy HH:mm:ss ZZ",U:"X",x:"kkkk-'WW'",X:"W"},n="GyYQqMLwWdDFgHhmsSAazZEeOPTxkKc";let i=[],a=0;for(;a<e.length;){if(e[a]==="\\"&&a+1<e.length){const f=e[a+1];n.includes(f)?i.push("'".concat(f,"'")):f==="'"?i.push("''"):i.push(f),a+=2;continue}if(Object.prototype.hasOwnProperty.call(t,e[a])){const f=t[e[a]];f&&i.push(f),a++;continue}const l=e[a];n.includes(l)?i.push("'".concat(l,"'")):l==="'"?i.push("''"):i.push(l),a++}return i.join("")}function eAe(){var e;if(typeof pkp>"u"||!((e=pkp==null?void 0:pkp.context)!=null&&e.dateFormatShort))throw new Error("pkp.context.dateFormatShort is not configured");return pkp.context.dateFormatShort}function tAe(){var e;if(typeof pkp>"u"||!((e=pkp==null?void 0:pkp.context)!=null&&e.datetimeFormatShort))throw new Error("pkp.context.datetimeFormatShort is not configured");return pkp.context.datetimeFormatShort}function pbe(){var e;if(typeof pkp>"u"||!((e=pkp==null?void 0:pkp.context)!=null&&e.timeZone))throw new Error("pkp.context.timeZone is not configured");return pkp.context.timeZone||"UTC"}function MV(){var e;if(typeof pkp>"u"||!((e=pkp==null?void 0:pkp.context)!=null&&e.currentLocale))throw new Error("pkp.context.currentLocale is not configured");return yee(pkp.context.currentLocale)}function yee(e){const t=e.replace("_","-");return nAe(t)?t:"en"}function nAe(e){try{return new Intl.DateTimeFormat(e),!0}catch{return!1}}function NV(e){if(e instanceof Date)return Wo.fromJSDate(e);const t=e.includes("T"),n=e.includes(" ");return t?Wo.fromISO(e):n?Wo.fromFormat(e,"yyyy-MM-dd HH:mm:ss",{zone:pbe()}):Wo.fromFormat(e,"yyyy-MM-dd",{zone:pbe()})}function sAe(e,t){const n=NV(e),i=NV(t);return Math.trunc(i.diff(n,"days").days)+0}function _ee(e,t,n="en"){const i=QIe(t);return e.setLocale(yee(n)).toFormat(i)}function oAe(e){if(!e)return"";const t=NV(e);return _ee(t,eAe(),MV())}function rAe(e){if(!e)return"";const t=NV(e);return _ee(t,tAe(),MV())}function iAe(e){return Wo.fromMillis(e).toRelative({locale:MV()})}function Ed(){return{calculateDaysBetweenDates:sAe,formatShortDate:oAe,formatShortDateTime:rAe,getDateCurrentLocale:MV,relativeStringTimeFromNow:iAe}}const aAe=Object.freeze(Object.defineProperty({__proto__:null,useDate:Ed},Symbol.toStringTag,{value:"Module"}));function C5(){const e={};function t(a){return Object.keys(a).forEach(l=>{e[l]=a[l]}),e}function n(a,l){const f=e[a];e[a]=(...d)=>{const h=f(...d);return l(h,...d)}}function i(){return Object.keys(e)}return{addFns:t,extendFn:n,listExtendableFns:i}}const lAe=Object.freeze(Object.defineProperty({__proto__:null,useExtender:C5},Symbol.toStringTag,{value:"Module"})),cAe=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,uAe=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,dAe=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function fAe(e,t){if(e==="__proto__"||e==="constructor"&&t&&typeof t=="object"&&"prototype"in t){pAe(e);return}return t}function pAe(e){console.warn('[destr] Dropping "'.concat(e,'" key to prevent prototype pollution.'))}function mAe(e,t={}){if(typeof e!="string")return e;const n=e.trim();if(e[0]==='"'&&e.endsWith('"')&&!e.includes("\\"))return n.slice(1,-1);if(n.length<=9){const i=n.toLowerCase();if(i==="true")return!0;if(i==="false")return!1;if(i==="undefined")return;if(i==="null")return null;if(i==="nan")return Number.NaN;if(i==="infinity")return Number.POSITIVE_INFINITY;if(i==="-infinity")return Number.NEGATIVE_INFINITY}if(!dAe.test(e)){if(t.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(cAe.test(e)||uAe.test(e)){if(t.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,fAe)}return JSON.parse(e)}catch(i){if(t.strict)throw i;return e}}const hAe=/#/g,gAe=/&/g,vAe=/\//g,bAe=/=/g,See=/\+/g,yAe=/%5e/gi,_Ae=/%60/gi,SAe=/%7c/gi,CAe=/%20/gi;function wAe(e){return encodeURI(""+e).replace(SAe,"|")}function Cee(e){return wAe(typeof e=="string"?e:JSON.stringify(e)).replace(See,"%2B").replace(CAe,"+").replace(hAe,"%23").replace(gAe,"%26").replace(_Ae,"`").replace(yAe,"^").replace(vAe,"%2F")}function wee(e){return Cee(e).replace(bAe,"%3D")}function mbe(e=""){try{return decodeURIComponent(""+e)}catch{return""+e}}function EAe(e){return mbe(e.replace(See," "))}function kAe(e){return mbe(e.replace(See," "))}function xAe(e=""){const t={};e[0]==="?"&&(e=e.slice(1));for(const n of e.split("&")){const i=n.match(/([^=]+)=?(.*)/)||[];if(i.length<2)continue;const a=EAe(i[1]);if(a==="__proto__"||a==="constructor")continue;const l=kAe(i[2]||"");t[a]===void 0?t[a]=l:Array.isArray(t[a])?t[a].push(l):t[a]=[t[a],l]}return t}function TAe(e,t){return(typeof t=="number"||typeof t=="boolean")&&(t=String(t)),t?Array.isArray(t)?t.map(n=>"".concat(wee(e),"=").concat(Cee(n))).join("&"):"".concat(wee(e),"=").concat(Cee(t)):wee(e)}function IAe(e){return Object.keys(e).filter(t=>e[t]!==void 0).map(t=>TAe(t,e[t])).filter(Boolean).join("&")}const AAe=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,OAe=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,RAe=/^([/\\]\s*){2,}[^/\\]/,DAe=/^\.?\//;function hbe(e,t={}){return typeof t=="boolean"&&(t={acceptRelative:t}),t.strict?AAe.test(e):OAe.test(e)||(t.acceptRelative?RAe.test(e):!1)}function LAe(e="",t){return e.endsWith("/")}function PAe(e="",t){return(LAe(e)?e.slice(0,-1):e)||"/"}function MAe(e="",t){return e.endsWith("/")?e:e+"/"}function NAe(e,t){if($Ae(t)||hbe(e))return e;const n=PAe(t);return e.startsWith(n)?e:VAe(n,e)}function FAe(e,t){const n=HAe(e),i={...xAe(n.search),...t};return n.search=IAe(i),UAe(n)}function $Ae(e){return!e||e==="/"}function BAe(e){return e&&e!=="/"}function VAe(e,...t){let n=e||"";for(const i of t.filter(a=>BAe(a)))if(n){const a=i.replace(DAe,"");n=MAe(n)+a}else n=i;return n}const gbe=Symbol.for("ufo:protocolRelative");function HAe(e="",t){const n=e.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(n){const[,k,T=""]=n;return{protocol:k.toLowerCase(),pathname:T,href:k+T,auth:"",host:"",search:"",hash:""}}if(!hbe(e,{acceptRelative:!0}))return vbe(e);const[,i="",a,l=""]=e.replace(/\\/g,"/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[];let[,f="",d=""]=l.match(/([^#/?]*)(.*)?/)||[];i==="file:"&&(d=d.replace(/\/(?=[A-Za-z]:)/,""));const{pathname:h,search:b,hash:S}=vbe(d);return{protocol:i.toLowerCase(),auth:a?a.slice(0,Math.max(0,a.length-1)):"",host:f,pathname:h,search:b,hash:S,[gbe]:!i}}function vbe(e=""){const[t="",n="",i=""]=(e.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:t,search:n,hash:i}}function UAe(e){const t=e.pathname||"",n=e.search?(e.search.startsWith("?")?"":"?")+e.search:"",i=e.hash||"",a=e.auth?e.auth+"@":"",l=e.host||"";return(e.protocol||e[gbe]?(e.protocol||"")+"//":"")+a+l+t+n+i}class zAe extends Error{constructor(t,n){super(t,n),this.name="FetchError",n!=null&&n.cause&&!this.cause&&(this.cause=n.cause)}}function WAe(e){var h,b,S,k,T;const t=((h=e.error)==null?void 0:h.message)||((b=e.error)==null?void 0:b.toString())||"",n=((S=e.request)==null?void 0:S.method)||((k=e.options)==null?void 0:k.method)||"GET",i=((T=e.request)==null?void 0:T.url)||String(e.request)||"/",a="[".concat(n,"] ").concat(JSON.stringify(i)),l=e.response?"".concat(e.response.status," ").concat(e.response.statusText):"<no response>",f="".concat(a,": ").concat(l).concat(t?" ".concat(t):""),d=new zAe(f,e.error?{cause:e.error}:void 0);for(const O of["request","options","response"])Object.defineProperty(d,O,{get(){return e[O]}});for(const[O,P]of[["data","_data"],["status","status"],["statusCode","status"],["statusText","statusText"],["statusMessage","statusText"]])Object.defineProperty(d,O,{get(){return e.response&&e.response[P]}});return d}const jAe=new Set(Object.freeze(["PATCH","POST","PUT","DELETE"]));function bbe(e="GET"){return jAe.has(e.toUpperCase())}function ZAe(e){if(e===void 0)return!1;const t=typeof e;return t==="string"||t==="number"||t==="boolean"||t===null?!0:t!=="object"?!1:Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name==="Object"||typeof e.toJSON=="function"}const qAe=new Set(["image/svg","application/xml","application/xhtml","application/html"]),GAe=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function KAe(e=""){if(!e)return"json";const t=e.split(";").shift()||"";return GAe.test(t)?"json":qAe.has(t)||t.startsWith("text/")?"text":"blob"}function YAe(e,t,n,i){var f;const a=XAe((f=t==null?void 0:t.headers)!=null?f:e==null?void 0:e.headers,n==null?void 0:n.headers,i);let l;return(n!=null&&n.query||n!=null&&n.params||t!=null&&t.params||t!=null&&t.query)&&(l={...n==null?void 0:n.params,...n==null?void 0:n.query,...t==null?void 0:t.params,...t==null?void 0:t.query}),{...n,...t,query:l,params:l,headers:a}}function XAe(e,t,n){if(!t)return new n(e);const i=new n(t);if(e)for(const[a,l]of Symbol.iterator in e||Array.isArray(e)?e:new n(e))i.set(a,l);return i}async function FV(e,t){if(t)if(Array.isArray(t))for(const n of t)await n(e);else await t(e)}const JAe=new Set([408,409,425,429,500,502,503,504]),QAe=new Set([101,204,205,304]);function Eee(e={}){const{fetch:t=globalThis.fetch,Headers:n=globalThis.Headers,AbortController:i=globalThis.AbortController}=e;async function a(d){const h=d.error&&d.error.name==="AbortError"&&!d.options.timeout||!1;if(d.options.retry!==!1&&!h){let S;typeof d.options.retry=="number"?S=d.options.retry:S=bbe(d.options.method)?0:1;const k=d.response&&d.response.status||500;if(S>0&&(Array.isArray(d.options.retryStatusCodes)?d.options.retryStatusCodes.includes(k):JAe.has(k))){const T=typeof d.options.retryDelay=="function"?d.options.retryDelay(d):d.options.retryDelay||0;return T>0&&await new Promise(O=>setTimeout(O,T)),l(d.request,{...d.options,retry:S-1})}}const b=WAe(d);throw Error.captureStackTrace&&Error.captureStackTrace(b,l),b}const l=async function(h,b={}){const S={request:h,options:YAe(h,b,e.defaults,n),response:void 0,error:void 0};S.options.method&&(S.options.method=S.options.method.toUpperCase()),S.options.onRequest&&await FV(S,S.options.onRequest),typeof S.request=="string"&&(S.options.baseURL&&(S.request=NAe(S.request,S.options.baseURL)),S.options.query&&(S.request=FAe(S.request,S.options.query),delete S.options.query),"query"in S.options&&delete S.options.query,"params"in S.options&&delete S.options.params),S.options.body&&bbe(S.options.method)&&(ZAe(S.options.body)?(S.options.body=typeof S.options.body=="string"?S.options.body:JSON.stringify(S.options.body),S.options.headers=new n(S.options.headers||{}),S.options.headers.has("content-type")||S.options.headers.set("content-type","application/json"),S.options.headers.has("accept")||S.options.headers.set("accept","application/json")):("pipeTo"in S.options.body&&typeof S.options.body.pipeTo=="function"||typeof S.options.body.pipe=="function")&&("duplex"in S.options||(S.options.duplex="half")));let k;if(!S.options.signal&&S.options.timeout){const O=new i;k=setTimeout(()=>{const P=new Error("[TimeoutError]: The operation was aborted due to timeout");P.name="TimeoutError",P.code=23,O.abort(P)},S.options.timeout),S.options.signal=O.signal}try{S.response=await t(S.request,S.options)}catch(O){return S.error=O,S.options.onRequestError&&await FV(S,S.options.onRequestError),await a(S)}finally{k&&clearTimeout(k)}if((S.response.body||S.response._bodyInit)&&!QAe.has(S.response.status)&&S.options.method!=="HEAD"){const O=(S.options.parseResponse?"json":S.options.responseType)||KAe(S.response.headers.get("content-type")||"");switch(O){case"json":{const P=await S.response.text(),B=S.options.parseResponse||mAe;S.response._data=B(P);break}case"stream":{S.response._data=S.response.body||S.response._bodyInit;break}default:S.response._data=await S.response[O]()}}return S.options.onResponse&&await FV(S,S.options.onResponse),!S.options.ignoreResponseError&&S.response.status>=400&&S.response.status<600?(S.options.onResponseError&&await FV(S,S.options.onResponseError),await a(S)):S.response},f=async function(h,b){return(await l(h,b))._data};return f.raw=l,f.native=(...d)=>t(...d),f.create=(d={},h={})=>Eee({...e,...h,defaults:{...e.defaults,...h.defaults,...d}}),f}const $V=function(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}(),eOe=$V.fetch?(...e)=>$V.fetch(...e):()=>Promise.reject(new Error("[ofetch] global.fetch is not supported!")),tOe=$V.Headers,nOe=$V.AbortController,sOe=Eee({fetch:eOe,Headers:tOe,AbortController:nOe}),lO=LA("progress",()=>{const e=kt({}),t=Ge(()=>{const d=[];return Object.keys(e.value).forEach(h=>{e.value[h]>0&&d.push(h)}),d});function n(d="base"){Object.prototype.hasOwnProperty.call(e.value,d)&&(e.value[d]=0),e.value[d]++}function i(d="base"){e.value[d]--}const a=kt(!1);function l(){a.value=!0}function f(){a.value=!1}return{fetchStarted:n,fetchFinished:i,screensInProgress:t,isFullScreenSpinner:a,startFullScreenSpinner:l,stopFullScreenSpinner:f}});function oOe(e){return GI()?(KI(e),!0):!1}function cO(e){return typeof e=="function"?e():se(e)}const rOe=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const iOe=Object.prototype.toString,aOe=e=>iOe.call(e)==="[object Object]",uO=()=>{};function kee(e,t){function n(...i){return new Promise((a,l)=>{Promise.resolve(e(()=>t.apply(this,i),{fn:t,thisArg:this,args:i})).then(a).catch(l)})}return n}const ybe=e=>e();function lOe(e,t={}){let n,i,a=uO;const l=d=>{clearTimeout(d),a(),a=uO};return d=>{const h=cO(e),b=cO(t.maxWait);return n&&l(n),h<=0||b!==void 0&&b<=0?(i&&(l(i),i=null),Promise.resolve(d())):new Promise((S,k)=>{a=t.rejectOnCancel?k:S,b&&!i&&(i=setTimeout(()=>{n&&l(n),i=null,S(d())},b)),n=setTimeout(()=>{i&&l(i),i=null,S(d())},h)})}}function cOe(...e){let t=0,n,i=!0,a=uO,l,f,d,h,b;!xa(e[0])&&typeof e[0]=="object"?{delay:f,trailing:d=!0,leading:h=!0,rejectOnCancel:b=!1}=e[0]:[f,d=!0,h=!0,b=!1]=e;const S=()=>{n&&(clearTimeout(n),n=void 0,a(),a=uO)};return T=>{const O=cO(f),P=Date.now()-t,B=()=>l=T();return S(),O<=0?(t=Date.now(),B()):(P>O&&(h||!i)?(t=Date.now(),B()):d&&(l=new Promise((W,Z)=>{a=b?Z:W,n=setTimeout(()=>{t=Date.now(),i=!0,W(B()),S()},Math.max(0,O-P))})),!h&&!n&&(n=setTimeout(()=>i=!0,O)),i=!1,l)}}function uOe(e=ybe){const t=kt(!0);function n(){t.value=!1}function i(){t.value=!0}const a=(...l)=>{t.value&&e(...l)};return{isActive:lw(t),pause:n,resume:i,eventFilter:a}}function dOe(e,t=200,n={}){return kee(lOe(t,n),e)}function xee(e,t=200,n=!1,i=!0,a=!1){return kee(cOe(t,n,i,a),e)}function fOe(e,t,n={}){const{eventFilter:i=ybe,...a}=n;return io(e,kee(i,t),a)}function pOe(e,t,n={}){const{eventFilter:i,...a}=n,{eventFilter:l,pause:f,resume:d,isActive:h}=uOe(i);return{stop:fOe(e,t,{...a,eventFilter:l}),pause:f,resume:d,isActive:h}}function mOe(e){var t;const n=cO(e);return(t=n==null?void 0:n.$el)!=null?t:n}const _be=rOe?window:void 0;function Sbe(...e){let t,n,i,a;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,i,a]=e,t=_be):[t,n,i,a]=e,!t)return uO;Array.isArray(n)||(n=[n]),Array.isArray(i)||(i=[i]);const l=[],f=()=>{l.forEach(S=>S()),l.length=0},d=(S,k,T,O)=>(S.addEventListener(k,T,O),()=>S.removeEventListener(k,T,O)),h=io(()=>[mOe(t),cO(a)],([S,k])=>{if(f(),!S)return;const T=aOe(k)?{...k}:k;l.push(...n.flatMap(O=>i.map(P=>d(S,O,P,T))))},{immediate:!0,flush:"post"}),b=()=>{h(),f()};return oOe(b),b}function Cbe(e="history",t={}){const{initialValue:n={},removeNullishValues:i=!0,removeFalsyValues:a=!1,write:l=!0,window:f=_be}=t;if(!f)return I1(n);const d=I1({});function h(){if(e==="history")return f.location.search||"";if(e==="hash"){const Z=f.location.hash||"",Y=Z.indexOf("?");return Y>0?Z.slice(Y):""}else return(f.location.hash||"").replace(/^#/,"")}function b(Z){const Y=Z.toString();if(e==="history")return"".concat(Y?"?".concat(Y):"").concat(f.location.hash||"");if(e==="hash-params")return"".concat(f.location.search||"").concat(Y?"#".concat(Y):"");const z=f.location.hash||"#",q=z.indexOf("?");return q>0?"".concat(z.slice(0,q)).concat(Y?"?".concat(Y):""):"".concat(z).concat(Y?"?".concat(Y):"")}function S(){return new URLSearchParams(h())}function k(Z){const Y=new Set(Object.keys(d));for(const z of Z.keys()){const q=Z.getAll(z);d[z]=q.length>1?q:Z.get(z)||"",Y.delete(z)}Array.from(Y).forEach(z=>delete d[z])}const{pause:T,resume:O}=pOe(d,()=>{const Z=new URLSearchParams("");Object.keys(d).forEach(Y=>{const z=d[Y];Array.isArray(z)?z.forEach(q=>Z.append(Y,q)):i&&z==null||a&&!z?Z.delete(Y):Z.set(Y,z)}),P(Z)},{deep:!0});function P(Z,Y){T(),Y&&k(Z),f.history.replaceState(f.history.state,f.document.title,f.location.pathname+b(Z)),O()}function B(){l&&P(S(),!0)}Sbe(f,"popstate",B,!1),e!=="history"&&Sbe(f,"hashchange",B,!1);const W=S();return W.keys().next().value?k(W):Object.assign(d,n),d}let wbe=sOe;function Pv(){var t;const e="test_csrf_token";return typeof pkp<"u"&&((t=pkp==null?void 0:pkp.currentUser)==null?void 0:t.csrfToken)||e}function hOe(e){if(!e)return{};const t={};return Object.entries(e).forEach(([n,i])=>{Array.isArray(i)?t["".concat(n,"[]")]=i:t[n]=i}),t}function fr(e,t={}){var z;typeof process<"u"&&((z=process==null?void 0:process.env)==null?void 0:z.VITEST)=="true"&&(wbe=Eee());const{expectValidationError:n,query:i,body:a,...l}=t,f=kt(i||{}),d=kt(a||void 0),h=rO(),b=kt(!1),S=kt(null),k=kt(null),T=kt(null);let O=null;const P=JS("modalLevel"),B=P!=null&&P.value?"modal_".concat(P.value):"base",W=lO();async function Z({clearData:q}={clearData:!1}){O&&O.abort(),O=new AbortController;const ne=O.signal,ue={...l,query:hOe(f.value),body:d.value,signal:ne};["POST","DELETE","PUT"].includes(ue.method)&&(ue.headers||(ue.headers={}),ue.headers["X-Csrf-Token"]=Pv(),["DELETE","PUT"].includes(ue==null?void 0:ue.method)&&(ue.headers["X-Http-Method-Override"]=t.method,ue.method="POST")),b.value=!0,W.fetchStarted(B),ue.showFullScreenSpinner&&W.startFullScreenSpinner(),k.value=null,q&&(S.value=null);try{const J=await wbe(se(e),ue);S.value=J,T.value=null,k.value=!0}catch(J){if(S.value=null,k.value=!1,ne&&(J.aborted=ne.aborted),J.aborted)return;if(n&&[400,422].includes(J.status)){T.value=J.data,S.value=null;return}h.openDialogNetworkError(J)}finally{b.value=!1,W.fetchFinished(B),ue.showFullScreenSpinner&&W.stopFullScreenSpinner()}}let Y=Z;return t.debouncedMs&&(Y=dOe(Z,t.debouncedMs)),{data:S,isSuccess:k,validationError:T,isLoading:b,fetch:Y}}const gOe=Object.freeze(Object.defineProperty({__proto__:null,getCSRFToken:Pv,useFetch:fr},Symbol.toStringTag,{value:"Module"}));function BV(e,t){const{currentPage:n,pageSize:i,query:a,...l}=t,f=kt(n),d=kt(i),h=kt(a||{}),b=Ge(()=>(f.value-1)*d.value),S=Ge(()=>({...h.value,offset:b.value,count:d.value,page:f.value,perPage:d.value})),{data:k,isLoading:T,fetch:O}=fr(e,{...l,query:S}),P=Ge(()=>{var Z,Y;return((Z=k.value)==null?void 0:Z.items)||((Y=k.value)==null?void 0:Y.data)||[]}),B=Ge(()=>{var Z,Y;return((Z=k.value)==null?void 0:Z.itemsMax)||((Y=k.value)==null?void 0:Y.total)||0}),W=Ge(()=>{const Z=B.value?b.value+1:0,Y=Math.min(b.value+d.value,B.value),z=Math.ceil(B.value/d.value);return{currentPage:f.value,pageSize:d.value,pageCount:z,firstItemIndex:Z,lastItemIndex:Y,itemCount:B.value,offset:b.value}});return{items:P,isLoading:T,pagination:W,fetch:O}}const vOe=Object.freeze(Object.defineProperty({__proto__:null,useFetchPaginated:BV},Symbol.toStringTag,{value:"Module"}));function VV(e,t){return e.fields.find(i=>i.name===t)}function Ebe(e,t){return!!e.fields.find(i=>i.name===t)}function kbe(e,t=null){return t?e.component==="field-slider"?e.min:Array.isArray(e.value[t])||e.selected?[]:"":e.component==="field-slider"?e.min:Array.isArray(e.value)||e.selected?[]:""}function xbe(e){return e.map(t=>t.value)}function Tbe(e){return!!(Array.isArray(e.value)||e.selected)}function B1(e,{customSubmit:t}={}){const n=kt(e);t&&(n.value.customSubmit=t);function i(B){io(B,W=>{Object.keys(W).forEach(Z=>{Ebe(n.value,Z)&&f(Z)!==W[Z]&&h(Z,W[Z])})},{immediate:!0})}function a(B){io(B,W=>{n.value.errors={},Object.keys(W).forEach(Z=>{Ebe(n.value,Z)&&(n.value.errors[Z]=W[Z])})},{immediate:!0})}function l(B,W){Object.keys(W).forEach(function(Z){n.value[Z]=W[Z]})}function f(B){return VV(n.value,B).value}function d(B){Object.keys(B).forEach(W=>{h(W,B[W])})}function h(B,W){const Z=VV(n.value,B);if(Z)if(Z.selected){if(Z.isMultilingual)Z.value={},Z.selected={},Object.keys(W).forEach(Y=>{Z.value[Y]=xbe(W[Y])});else{const Y=xbe(W);Z.value=Y,Z.selected=W}Z.selected=W}else Z.value=W}function b(B){const W=VV(n.value,B);if(W.isMultilingual){const Z={};n.value.supportedFormLocales.forEach(Y=>{const z=Y.key,q=kbe(W,z);Z[z]=q}),h(W.name,Z)}else{const Z=kbe(W);h(W.name,Z)}}function S(B,W){const Z=f(B),Y=VV(n.value,B);if(Array.isArray(Z)){let z=null;Y.selected?z=Y.selected.filter(q=>q.value!==W):z=Z.filter(q=>q!==W),h(B,z)}else b(B)}function k(){n.value.fields.forEach(B=>{b(B.name)})}function T(B){const W=B.metadataLocales;Array.isArray(W)?n.value.supportedFormLocales=W:n.value.supportedFormLocales=Object.keys(W).map(Z=>({key:Z,label:W[Z]})),n.value.primaryLocale=B.locale,n.value.visibleLocales=[B.locale]}function O(B){const W={};for(const Z in B){const Y=B[Z],z=Z.split(".");let q=W;for(let ne=0;ne<z.length;ne++){const ue=z[ne];ne===z.length-1?q[ue]=Y:(q[ue]=q[ue]||{},q=q[ue])}}return W}function P(B){n.value.action=B}return{set:l,setValue:h,setValues:d,getValue:f,removeFieldValue:S,isFieldValueArray:Tbe,clearForm:k,form:n,connectWithPayload:i,connectWithErrors:a,setLocalesForSubmission:T,setAction:P,structuredErrors:O}}const bOe=Object.freeze(Object.defineProperty({__proto__:null,isFieldValueArray:Tbe,useForm:B1},Symbol.toStringTag,{value:"Module"}));function Tee(e){return Array.isArray(e)?!!e.length:!!e}function Ibe(e){return Array.isArray(e)?e:[e]}function Abe(e){return isNaN(Number(e))?e:Number(e)}function yOe(e,t){return e.map((n,i)=>({value:n,label:t[i]}))}function Iee(e){const t=kt(e),{clearForm:n,removeFieldValue:i,setValue:a,isFieldValueArray:l}=B1(e),f=Ge(()=>{const O=[];return t.value.fields.forEach(P=>{(Array.isArray(P.value)?P.value:[P.value]).forEach(W=>{if(P.selected){const Z=P.selected.find(Y=>Y.value===W);O.push({name:P.name,fieldLabel:P.label,label:Z.label,value:Z.value})}else if(P.options){const Z=P.options.find(Y=>Y.value===W);O.push({name:P.name,fieldLabel:P.label,label:Z.label,value:Z.value})}else P.component==="field-slider"?W!==P.min&&O.push({name:P.name,fieldLabel:P.label,value:W,label:W}):O.push({name:P.name,fieldLabel:P.label,value:W,label:"TODO"})})}),O}),d=Ge(()=>{const O={};return t.value.fields.forEach(P=>{Tee(P.value)&&(O[P.name]=P.value)}),O}),h=Ge(()=>{const O={};return t.value.fields.forEach(P=>{O[P.name]=Tee(P.value)?P.value:null,P.selected&&(O["".concat(P.name,"_label")]=Tee(P.value)?P.selected.map(B=>B.label):null)}),O});function b(O){t.value.fields.forEach(P=>{if(O[P.name]){const B=l(P)?Ibe(O[P.name]).map(Abe):Abe(O[P.name]);if(O["".concat(P.name,"_label")]){const W=Ibe(O["".concat(P.name,"_label")]);a(P.name,yOe(B,W))}else a(P.name,B)}})}function S(O){t.value={...t.value,...O}}function k(){n()}function T(O,P){i(O,P)}return{filtersForm:t,filtersFormList:f,filtersFormQueryParamsApi:d,filtersFormQueryParams:h,initFiltersFormFromQueryParams:b,updateFiltersForm:S,clearFiltersForm:k,clearFiltersFormField:T}}const _Oe=Object.freeze(Object.defineProperty({__proto__:null,useFiltersForm:Iee},Symbol.toStringTag,{value:"Module"}));function Ms(){const e=rO();function t(f){e.openDialog(f)}function n(f,d,h){e.openSideModal(f,d,h)}function i(f){e.openDialogNetworkError(f)}function a(f){e.closeSideModal(f)}function l(f){return e.isSideModalOpened(f)}return{openDialog:t,openSideModal:n,openDialogNetworkError:i,closeSideModal:a,isSideModalOpened:l}}const SOe=Object.freeze(Object.defineProperty({__proto__:null,useModal:Ms},Symbol.toStringTag,{value:"Module"}));function Obe(e){return e.replace(/([a-z]+)([A-Z])/g,"$1-$2").toLowerCase()}function Ar({component:e,op:t,params:n}={}){var b;if(typeof pkp>"u"||!((b=pkp==null?void 0:pkp.context)!=null&&b.legacyGridBaseUrl))throw new Error("pkp.context.legacyGridBaseUrl is not configured");const i=kt(e),a=kt(t),l=kt(n),f=Ge(()=>l.value&&Object.keys(l.value).length?"?".concat(new URLSearchParams(l.value).toString()):""),d=Ge(()=>{let S=i.value.slice(0,-7);S=Obe(S.split(".").join("/"));const k=Obe(a.value);let T=pkp.context.legacyGridBaseUrl.replace("component",S).replace("action",k);return"".concat(T).concat(f.value)});function h({title:S,closeOnFormSuccessId:k,description:T},O=()=>{}){const{openSideModal:P}=Ms();P("LegacyAjax",{legacyOptions:{title:S,url:d,closeOnFormSuccessId:k,description:T}},{onClose:async B=>{O(B)}})}return{url:d,openLegacyModal:h}}const COe=Object.freeze(Object.defineProperty({__proto__:null,useLegacyGridUrl:Ar},Symbol.toStringTag,{value:"Module"}));function wOe(){function e(t,n=""){pkp.eventBus.$emit("notify",t,n)}return{notify:e}}const EOe=Object.freeze(Object.defineProperty({__proto__:null,useNotify:wOe},Symbol.toStringTag,{value:"Module"})),kOe=Cbe();function HV(){return kOe}const xOe=Object.freeze(Object.defineProperty({__proto__:null,useQueryParams:HV},Symbol.toStringTag,{value:"Module"}));function Aee(e,t={}){const n=HV(),i=t.activeItemKey||"",a=t.expandedKeys||{},l=t.onActionFn||(()=>{}),f=V$(e);if(typeof f.value>"u")throw new Error("items must be provided to use this api");const d=Ge(()=>W(f.value)),h=kt(a),b=kt(i);function S(q){h.value=q}function k(q,ne){if(!(q!=null&&q.length)||!ne)return null;for(const ue of q){if(ue.key===ne)return ue;if(ue.items){const J=k(ue.items,ne);if(J)return J}}return null}function T(q=[]){return h.value={},q.forEach(ne=>h.value[ne]=!0),h}function O(q,ne,ue=[]){for(const J of q){if(J.key===ne)return ue;if(J.items){const ce=O(J.items,ne,[...ue,J.key]);if(ce)return ce}}return null}function P(q=""){if(!k(d.value,q))return!1;b.value=q;const ne=O(d.value,q);return ne&&T([...ne,...Object.keys(h.value)]),!0}function B(q,ne){const ue=Z(q)?new URL(q):!1,J=Z(ne)?new URL(ne):!1;return ue&&J&&ue.pathname===J.pathname&&ue.hostname===J.hostname}function W(q,ne=1){const ue=[];return q.forEach((J,ce)=>{const ge={...J,level:ne,index:ce};J.items&&(ge.items=W(J.items,ne+1)),ge.link?ge.command=()=>{if(B(window.location.href,ge.link)){const de=new URL(ge.link),he=new URLSearchParams(de.search);for(const[ie,Be]of he)n[ie]=Be}else window.location.href=ge.link;P(ge.key)}:ge.action?ge.command=()=>{l(ge.action,{...ge.actionArgs,key:ge.key}),ge.state&&P(ge.key)}:ge.state&&(ge.command=()=>{P(ge.key)}),ue.push(ge)}),ue}function Z(q){try{return new URL(q),!0}catch{return!1}}const Y=Ge(()=>({items:d.value,expandedKeys:h.value,activeItemKey:b.value,"onUpdate:expandedKeys":S,"onUpdate:activeItemKey":P})),z=Ge(()=>k(d.value,b.value));return{sideMenuProps:Y,updateExpandedKeys:S,setExpandedKeys:T,setActiveItemKey:P,selectedItem:z}}const TOe=Object.freeze(Object.defineProperty({__proto__:null,useSideMenu:Aee},Symbol.toStringTag,{value:"Module"})),zw=["descending","ascending","none"];function Rbe(){const e=kt({column:"",direction:"none"}),t=Ge(()=>{var a,l;return(a=e.value)!=null&&a.column&&((l=e.value)==null?void 0:l.direction)!=="none"?{orderBy:e.value.column,orderDirection:e.value.direction==="descending"?"DESC":"ASC"}:{}}),n=Ge(()=>{var a,l;return(a=e.value)!=null&&a.column&&((l=e.value)==null?void 0:l.direction)!=="none"?{sortColumn:e.value.column,sortDirection:e.value.direction}:{}});function i(a,l=null){const f=l&&zw.includes(l)?l:null;if(a===e.value.column){const d=zw.findIndex(h=>h===e.value.direction);f?e.value.direction=f:e.value.direction=d+1===zw.length?zw[0]:zw[d+1]}else e.value={column:a,direction:f||zw[0]}}return{sortDescriptor:e,sortQueryParamsApi:t,sortQueryParams:n,applySort:i}}const IOe=Object.freeze(Object.defineProperty({__proto__:null,useSorting:Rbe},Symbol.toStringTag,{value:"Module"}));function to(e,t={}){var h,b;if(typeof pkp>"u"||!((h=pkp==null?void 0:pkp.context)!=null&&h.apiBaseUrl))throw new Error("pkp.context.apiBaseUrl is not configured");if(typeof pkp>"u"||!((b=pkp==null?void 0:pkp.context)!=null&&b.pageBaseUrl))throw new Error("pkp.context.pageBaseUrl is not configured");const n=kt(e),i=kt(t),a=Ge(()=>i.value&&Object.keys(i.value).length?"?".concat(new URLSearchParams(i.value).toString()):""),l=Ge(()=>"".concat(pkp.context.apiBaseUrl).concat(n.value).concat(a.value)),f=Ge(()=>n.value.startsWith("http")?"".concat(n.value).concat(a.value):"".concat(pkp.context.pageBaseUrl).concat(n.value).concat(a.value));function d(){window.location.href=f.value}return{apiUrl:l,pageUrl:f,redirectToPage:d}}const AOe=Object.freeze(Object.defineProperty({__proto__:null,useUrl:to},Symbol.toStringTag,{value:"Module"}));/*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */const{entries:Dbe,setPrototypeOf:Lbe,isFrozen:OOe,getPrototypeOf:ROe,getOwnPropertyDescriptor:DOe}=Object;let{freeze:Vp,seal:V1,create:Pbe}=Object,{apply:Oee,construct:Ree}=typeof Reflect<"u"&&Reflect;Vp||(Vp=function(t){return t}),V1||(V1=function(t){return t}),Oee||(Oee=function(t,n,i){return t.apply(n,i)}),Ree||(Ree=function(t,n){return new t(...n)});const UV=Up(Array.prototype.forEach),LOe=Up(Array.prototype.lastIndexOf),Mbe=Up(Array.prototype.pop),dO=Up(Array.prototype.push),POe=Up(Array.prototype.splice),zV=Up(String.prototype.toLowerCase),Dee=Up(String.prototype.toString),Nbe=Up(String.prototype.match),fO=Up(String.prototype.replace),MOe=Up(String.prototype.indexOf),NOe=Up(String.prototype.trim),o0=Up(Object.prototype.hasOwnProperty),Hp=Up(RegExp.prototype.test),pO=FOe(TypeError);function Up(e){return function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];return Oee(e,t,i)}}function FOe(e){return function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return Ree(e,n)}}function yi(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:zV;Lbe&&Lbe(e,null);let i=t.length;for(;i--;){let a=t[i];if(typeof a=="string"){const l=n(a);l!==a&&(OOe(t)||(t[i]=l),a=l)}e[a]=!0}return e}function $Oe(e){for(let t=0;t<e.length;t++)o0(e,t)||(e[t]=null);return e}function QS(e){const t=Pbe(null);for(const[n,i]of Dbe(e))o0(e,n)&&(Array.isArray(i)?t[n]=$Oe(i):i&&typeof i=="object"&&i.constructor===Object?t[n]=QS(i):t[n]=i);return t}function mO(e,t){for(;e!==null;){const i=DOe(e,t);if(i){if(i.get)return Up(i.get);if(typeof i.value=="function")return Up(i.value)}e=ROe(e)}function n(){return null}return n}const Fbe=Vp(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Lee=Vp(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Pee=Vp(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),BOe=Vp(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Mee=Vp(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),VOe=Vp(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),$be=Vp(["#text"]),Bbe=Vp(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Nee=Vp(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Vbe=Vp(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),WV=Vp(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),HOe=V1(/\{\{[\w\W]*|[\w\W]*\}\}/gm),UOe=V1(/<%[\w\W]*|[\w\W]*%>/gm),zOe=V1(/\$\{[\w\W]*/gm),WOe=V1(/^data-[\-\w.\u00B7-\uFFFF]+$/),jOe=V1(/^aria-[\-\w]+$/),Hbe=V1(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ZOe=V1(/^(?:\w+script|data):/i),qOe=V1(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ube=V1(/^html$/i),GOe=V1(/^[a-z][.\w]*(-[.\w]+)+$/i);var zbe=Object.freeze({__proto__:null,ARIA_ATTR:jOe,ATTR_WHITESPACE:qOe,CUSTOM_ELEMENT:GOe,DATA_ATTR:WOe,DOCTYPE_NAME:Ube,ERB_EXPR:UOe,IS_ALLOWED_URI:Hbe,IS_SCRIPT_OR_DATA:ZOe,MUSTACHE_EXPR:HOe,TMPLIT_EXPR:zOe});const hO={element:1,text:3,progressingInstruction:7,comment:8,document:9},KOe=function(){return typeof window>"u"?null:window},YOe=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const a="data-tt-policy-suffix";n&&n.hasAttribute(a)&&(i=n.getAttribute(a));const l="dompurify"+(i?"#"+i:"");try{return t.createPolicy(l,{createHTML(f){return f},createScriptURL(f){return f}})}catch{return console.warn("TrustedTypes policy "+l+" could not be created."),null}},Wbe=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function jbe(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:KOe();const t=Es=>jbe(Es);if(t.version="3.2.4",t.removed=[],!e||!e.document||e.document.nodeType!==hO.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e;const i=n,a=i.currentScript,{DocumentFragment:l,HTMLTemplateElement:f,Node:d,Element:h,NodeFilter:b,NamedNodeMap:S=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:k,DOMParser:T,trustedTypes:O}=e,P=h.prototype,B=mO(P,"cloneNode"),W=mO(P,"remove"),Z=mO(P,"nextSibling"),Y=mO(P,"childNodes"),z=mO(P,"parentNode");if(typeof f=="function"){const Es=n.createElement("template");Es.content&&Es.content.ownerDocument&&(n=Es.content.ownerDocument)}let q,ne="";const{implementation:ue,createNodeIterator:J,createDocumentFragment:ce,getElementsByTagName:ge}=n,{importNode:de}=i;let he=Wbe();t.isSupported=typeof Dbe=="function"&&typeof z=="function"&&ue&&ue.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:ie,ERB_EXPR:Be,TMPLIT_EXPR:$e,DATA_ATTR:Ue,ARIA_ATTR:V,IS_SCRIPT_OR_DATA:Ye,ATTR_WHITESPACE:Fe,CUSTOM_ELEMENT:St}=zbe;let{IS_ALLOWED_URI:Dt}=zbe,He=null;const ft=yi({},[...Fbe,...Lee,...Pee,...Mee,...$be]);let ht=null;const At=yi({},[...Bbe,...Nee,...Vbe,...WV]);let hn=Object.seal(Pbe(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ct=null,Ht=null,ye=!0,lo=!0,jn=!1,so=!0,Xs=!1,ot=!0,Qe=!1,Ot=!1,Nt=!1,Ve=!1,dn=!1,kn=!1,Bt=!0,Le=!1;const je="user-content-";let Ze=!0,pt=!1,Vt={},sn=null;const Wn=yi({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ts=null;const Zn=yi({},["audio","video","img","source","image","track"]);let yo=null;const Qs=yi({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Rs="http://www.w3.org/1998/Math/MathML",xr="http://www.w3.org/2000/svg",Po="http://www.w3.org/1999/xhtml";let jo=Po,Mo=!1,Do=null;const er=yi({},[Rs,xr,Po],Dee);let Zs=yi({},["mi","mo","mn","ms","mtext"]),Xa=yi({},["annotation-xml"]);const bn=yi({},["title","style","font","a","script"]);let qs=null;const Qr=["application/xhtml+xml","text/html"],lt="text/html";let yt=null,_n=null;const us=n.createElement("form"),Zo=function(_t){return _t instanceof RegExp||_t instanceof Function},br=function(){let _t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(_n&&_n===_t)){if((!_t||typeof _t!="object")&&(_t={}),_t=QS(_t),qs=Qr.indexOf(_t.PARSER_MEDIA_TYPE)===-1?lt:_t.PARSER_MEDIA_TYPE,yt=qs==="application/xhtml+xml"?Dee:zV,He=o0(_t,"ALLOWED_TAGS")?yi({},_t.ALLOWED_TAGS,yt):ft,ht=o0(_t,"ALLOWED_ATTR")?yi({},_t.ALLOWED_ATTR,yt):At,Do=o0(_t,"ALLOWED_NAMESPACES")?yi({},_t.ALLOWED_NAMESPACES,Dee):er,yo=o0(_t,"ADD_URI_SAFE_ATTR")?yi(QS(Qs),_t.ADD_URI_SAFE_ATTR,yt):Qs,ts=o0(_t,"ADD_DATA_URI_TAGS")?yi(QS(Zn),_t.ADD_DATA_URI_TAGS,yt):Zn,sn=o0(_t,"FORBID_CONTENTS")?yi({},_t.FORBID_CONTENTS,yt):Wn,ct=o0(_t,"FORBID_TAGS")?yi({},_t.FORBID_TAGS,yt):{},Ht=o0(_t,"FORBID_ATTR")?yi({},_t.FORBID_ATTR,yt):{},Vt=o0(_t,"USE_PROFILES")?_t.USE_PROFILES:!1,ye=_t.ALLOW_ARIA_ATTR!==!1,lo=_t.ALLOW_DATA_ATTR!==!1,jn=_t.ALLOW_UNKNOWN_PROTOCOLS||!1,so=_t.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Xs=_t.SAFE_FOR_TEMPLATES||!1,ot=_t.SAFE_FOR_XML!==!1,Qe=_t.WHOLE_DOCUMENT||!1,Ve=_t.RETURN_DOM||!1,dn=_t.RETURN_DOM_FRAGMENT||!1,kn=_t.RETURN_TRUSTED_TYPE||!1,Nt=_t.FORCE_BODY||!1,Bt=_t.SANITIZE_DOM!==!1,Le=_t.SANITIZE_NAMED_PROPS||!1,Ze=_t.KEEP_CONTENT!==!1,pt=_t.IN_PLACE||!1,Dt=_t.ALLOWED_URI_REGEXP||Hbe,jo=_t.NAMESPACE||Po,Zs=_t.MATHML_TEXT_INTEGRATION_POINTS||Zs,Xa=_t.HTML_INTEGRATION_POINTS||Xa,hn=_t.CUSTOM_ELEMENT_HANDLING||{},_t.CUSTOM_ELEMENT_HANDLING&&Zo(_t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(hn.tagNameCheck=_t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),_t.CUSTOM_ELEMENT_HANDLING&&Zo(_t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(hn.attributeNameCheck=_t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),_t.CUSTOM_ELEMENT_HANDLING&&typeof _t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(hn.allowCustomizedBuiltInElements=_t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Xs&&(lo=!1),dn&&(Ve=!0),Vt&&(He=yi({},$be),ht=[],Vt.html===!0&&(yi(He,Fbe),yi(ht,Bbe)),Vt.svg===!0&&(yi(He,Lee),yi(ht,Nee),yi(ht,WV)),Vt.svgFilters===!0&&(yi(He,Pee),yi(ht,Nee),yi(ht,WV)),Vt.mathMl===!0&&(yi(He,Mee),yi(ht,Vbe),yi(ht,WV))),_t.ADD_TAGS&&(He===ft&&(He=QS(He)),yi(He,_t.ADD_TAGS,yt)),_t.ADD_ATTR&&(ht===At&&(ht=QS(ht)),yi(ht,_t.ADD_ATTR,yt)),_t.ADD_URI_SAFE_ATTR&&yi(yo,_t.ADD_URI_SAFE_ATTR,yt),_t.FORBID_CONTENTS&&(sn===Wn&&(sn=QS(sn)),yi(sn,_t.FORBID_CONTENTS,yt)),Ze&&(He["#text"]=!0),Qe&&yi(He,["html","head","body"]),He.table&&(yi(He,["tbody"]),delete ct.tbody),_t.TRUSTED_TYPES_POLICY){if(typeof _t.TRUSTED_TYPES_POLICY.createHTML!="function")throw pO('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof _t.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw pO('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');q=_t.TRUSTED_TYPES_POLICY,ne=q.createHTML("")}else q===void 0&&(q=YOe(O,a)),q!==null&&typeof ne=="string"&&(ne=q.createHTML(""));Vp&&Vp(_t),_n=_t}},Vn=yi({},[...Lee,...Pee,...BOe]),Kt=yi({},[...Mee,...VOe]),Ps=function(_t){let Hn=z(_t);(!Hn||!Hn.tagName)&&(Hn={namespaceURI:jo,tagName:"template"});const Cs=zV(_t.tagName),_r=zV(Hn.tagName);return Do[_t.namespaceURI]?_t.namespaceURI===xr?Hn.namespaceURI===Po?Cs==="svg":Hn.namespaceURI===Rs?Cs==="svg"&&(_r==="annotation-xml"||Zs[_r]):!!Vn[Cs]:_t.namespaceURI===Rs?Hn.namespaceURI===Po?Cs==="math":Hn.namespaceURI===xr?Cs==="math"&&Xa[_r]:!!Kt[Cs]:_t.namespaceURI===Po?Hn.namespaceURI===xr&&!Xa[_r]||Hn.namespaceURI===Rs&&!Zs[_r]?!1:!Kt[Cs]&&(bn[Cs]||!Vn[Cs]):!!(qs==="application/xhtml+xml"&&Do[_t.namespaceURI]):!1},Bo=function(_t){dO(t.removed,{element:_t});try{z(_t).removeChild(_t)}catch{W(_t)}},Nr=function(_t,Hn){try{dO(t.removed,{attribute:Hn.getAttributeNode(_t),from:Hn})}catch{dO(t.removed,{attribute:null,from:Hn})}if(Hn.removeAttribute(_t),_t==="is")if(Ve||dn)try{Bo(Hn)}catch{}else try{Hn.setAttribute(_t,"")}catch{}},uc=function(_t){let Hn=null,Cs=null;if(Nt)_t="<remove></remove>"+_t;else{const Xt=Nbe(_t,/^[\r\n\t ]+/);Cs=Xt&&Xt[0]}qs==="application/xhtml+xml"&&jo===Po&&(_t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+_t+"</body></html>");const _r=q?q.createHTML(_t):_t;if(jo===Po)try{Hn=new T().parseFromString(_r,qs)}catch{}if(!Hn||!Hn.documentElement){Hn=ue.createDocument(jo,"template",null);try{Hn.documentElement.innerHTML=Mo?ne:_r}catch{}}const fn=Hn.body||Hn.documentElement;return _t&&Cs&&fn.insertBefore(n.createTextNode(Cs),fn.childNodes[0]||null),jo===Po?ge.call(Hn,Qe?"html":"body")[0]:Qe?Hn.documentElement:fn},Hi=function(_t){return J.call(_t.ownerDocument||_t,_t,b.SHOW_ELEMENT|b.SHOW_COMMENT|b.SHOW_TEXT|b.SHOW_PROCESSING_INSTRUCTION|b.SHOW_CDATA_SECTION,null)},ir=function(_t){return _t instanceof k&&(typeof _t.nodeName!="string"||typeof _t.textContent!="string"||typeof _t.removeChild!="function"||!(_t.attributes instanceof S)||typeof _t.removeAttribute!="function"||typeof _t.setAttribute!="function"||typeof _t.namespaceURI!="string"||typeof _t.insertBefore!="function"||typeof _t.hasChildNodes!="function")},Wr=function(_t){return typeof d=="function"&&_t instanceof d};function mi(Es,_t,Hn){UV(Es,Cs=>{Cs.call(t,_t,Hn,_n)})}const dc=function(_t){let Hn=null;if(mi(he.beforeSanitizeElements,_t,null),ir(_t))return Bo(_t),!0;const Cs=yt(_t.nodeName);if(mi(he.uponSanitizeElement,_t,{tagName:Cs,allowedTags:He}),_t.hasChildNodes()&&!Wr(_t.firstElementChild)&&Hp(/<[/\w]/g,_t.innerHTML)&&Hp(/<[/\w]/g,_t.textContent)||_t.nodeType===hO.progressingInstruction||ot&&_t.nodeType===hO.comment&&Hp(/<[/\w]/g,_t.data))return Bo(_t),!0;if(!He[Cs]||ct[Cs]){if(!ct[Cs]&&_i(Cs)&&(hn.tagNameCheck instanceof RegExp&&Hp(hn.tagNameCheck,Cs)||hn.tagNameCheck instanceof Function&&hn.tagNameCheck(Cs)))return!1;if(Ze&&!sn[Cs]){const _r=z(_t)||_t.parentNode,fn=Y(_t)||_t.childNodes;if(fn&&_r){const Xt=fn.length;for(let Ii=Xt-1;Ii>=0;--Ii){const kl=B(fn[Ii],!0);kl.__removalCount=(_t.__removalCount||0)+1,_r.insertBefore(kl,Z(_t))}}}return Bo(_t),!0}return _t instanceof h&&!Ps(_t)||(Cs==="noscript"||Cs==="noembed"||Cs==="noframes")&&Hp(/<\/no(script|embed|frames)/i,_t.innerHTML)?(Bo(_t),!0):(Xs&&_t.nodeType===hO.text&&(Hn=_t.textContent,UV([ie,Be,$e],_r=>{Hn=fO(Hn,_r," ")}),_t.textContent!==Hn&&(dO(t.removed,{element:_t.cloneNode()}),_t.textContent=Hn)),mi(he.afterSanitizeElements,_t,null),!1)},Ti=function(_t,Hn,Cs){if(Bt&&(Hn==="id"||Hn==="name")&&(Cs in n||Cs in us))return!1;if(!(lo&&!Ht[Hn]&&Hp(Ue,Hn))){if(!(ye&&Hp(V,Hn))){if(!ht[Hn]||Ht[Hn]){if(!(_i(_t)&&(hn.tagNameCheck instanceof RegExp&&Hp(hn.tagNameCheck,_t)||hn.tagNameCheck instanceof Function&&hn.tagNameCheck(_t))&&(hn.attributeNameCheck instanceof RegExp&&Hp(hn.attributeNameCheck,Hn)||hn.attributeNameCheck instanceof Function&&hn.attributeNameCheck(Hn))||Hn==="is"&&hn.allowCustomizedBuiltInElements&&(hn.tagNameCheck instanceof RegExp&&Hp(hn.tagNameCheck,Cs)||hn.tagNameCheck instanceof Function&&hn.tagNameCheck(Cs))))return!1}else if(!yo[Hn]){if(!Hp(Dt,fO(Cs,Fe,""))){if(!((Hn==="src"||Hn==="xlink:href"||Hn==="href")&&_t!=="script"&&MOe(Cs,"data:")===0&&ts[_t])){if(!(jn&&!Hp(Ye,fO(Cs,Fe,"")))){if(Cs)return!1}}}}}}return!0},_i=function(_t){return _t!=="annotation-xml"&&Nbe(_t,St)},yr=function(_t){mi(he.beforeSanitizeAttributes,_t,null);const{attributes:Hn}=_t;if(!Hn||ir(_t))return;const Cs={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ht,forceKeepAttr:void 0};let _r=Hn.length;for(;_r--;){const fn=Hn[_r],{name:Xt,namespaceURI:Ii,value:kl}=fn,ll=yt(Xt);let _o=Xt==="value"?kl:NOe(kl);if(Cs.attrName=ll,Cs.attrValue=_o,Cs.keepAttr=!0,Cs.forceKeepAttr=void 0,mi(he.uponSanitizeAttribute,_t,Cs),_o=Cs.attrValue,Le&&(ll==="id"||ll==="name")&&(Nr(Xt,_t),_o=je+_o),ot&&Hp(/((--!?|])>)|<\/(style|title)/i,_o)){Nr(Xt,_t);continue}if(Cs.forceKeepAttr||(Nr(Xt,_t),!Cs.keepAttr))continue;if(!so&&Hp(/\/>/i,_o)){Nr(Xt,_t);continue}Xs&&UV([ie,Be,$e],js=>{_o=fO(_o,js," ")});const Qn=yt(_t.nodeName);if(Ti(Qn,ll,_o)){if(q&&typeof O=="object"&&typeof O.getAttributeType=="function"&&!Ii)switch(O.getAttributeType(Qn,ll)){case"TrustedHTML":{_o=q.createHTML(_o);break}case"TrustedScriptURL":{_o=q.createScriptURL(_o);break}}try{Ii?_t.setAttributeNS(Ii,Xt,_o):_t.setAttribute(Xt,_o),ir(_t)?Bo(_t):Mbe(t.removed)}catch{}}}mi(he.afterSanitizeAttributes,_t,null)},Ui=function Es(_t){let Hn=null;const Cs=Hi(_t);for(mi(he.beforeSanitizeShadowDOM,_t,null);Hn=Cs.nextNode();)mi(he.uponSanitizeShadowNode,Hn,null),dc(Hn),yr(Hn),Hn.content instanceof l&&Es(Hn.content);mi(he.afterSanitizeShadowDOM,_t,null)};return t.sanitize=function(Es){let _t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Hn=null,Cs=null,_r=null,fn=null;if(Mo=!Es,Mo&&(Es="<!-->"),typeof Es!="string"&&!Wr(Es))if(typeof Es.toString=="function"){if(Es=Es.toString(),typeof Es!="string")throw pO("dirty is not a string, aborting")}else throw pO("toString is not a function");if(!t.isSupported)return Es;if(Ot||br(_t),t.removed=[],typeof Es=="string"&&(pt=!1),pt){if(Es.nodeName){const kl=yt(Es.nodeName);if(!He[kl]||ct[kl])throw pO("root node is forbidden and cannot be sanitized in-place")}}else if(Es instanceof d)Hn=uc("<!---->"),Cs=Hn.ownerDocument.importNode(Es,!0),Cs.nodeType===hO.element&&Cs.nodeName==="BODY"||Cs.nodeName==="HTML"?Hn=Cs:Hn.appendChild(Cs);else{if(!Ve&&!Xs&&!Qe&&Es.indexOf("<")===-1)return q&&kn?q.createHTML(Es):Es;if(Hn=uc(Es),!Hn)return Ve?null:kn?ne:""}Hn&&Nt&&Bo(Hn.firstChild);const Xt=Hi(pt?Es:Hn);for(;_r=Xt.nextNode();)dc(_r),yr(_r),_r.content instanceof l&&Ui(_r.content);if(pt)return Es;if(Ve){if(dn)for(fn=ce.call(Hn.ownerDocument);Hn.firstChild;)fn.appendChild(Hn.firstChild);else fn=Hn;return(ht.shadowroot||ht.shadowrootmode)&&(fn=de.call(i,fn,!0)),fn}let Ii=Qe?Hn.outerHTML:Hn.innerHTML;return Qe&&He["!doctype"]&&Hn.ownerDocument&&Hn.ownerDocument.doctype&&Hn.ownerDocument.doctype.name&&Hp(Ube,Hn.ownerDocument.doctype.name)&&(Ii="<!DOCTYPE "+Hn.ownerDocument.doctype.name+">\n"+Ii),Xs&&UV([ie,Be,$e],kl=>{Ii=fO(Ii,kl," ")}),q&&kn?q.createHTML(Ii):Ii},t.setConfig=function(){let Es=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};br(Es),Ot=!0},t.clearConfig=function(){_n=null,Ot=!1},t.isValidAttribute=function(Es,_t,Hn){_n||br({});const Cs=yt(Es),_r=yt(_t);return Ti(Cs,_r,Hn)},t.addHook=function(Es,_t){typeof _t=="function"&&dO(he[Es],_t)},t.removeHook=function(Es,_t){if(_t!==void 0){const Hn=LOe(he[Es],_t);return Hn===-1?void 0:POe(he[Es],Hn,1)[0]}return Mbe(he[Es])},t.removeHooks=function(Es){he[Es]=[]},t.removeAllHooks=function(){he=Wbe()},t}var Zbe=jbe();const XOe={USE_PROFILES:{html:!0},ADD_ATTR:["target"]};Zbe.addHook("afterSanitizeAttributes",e=>{if(e.tagName==="A"&&e.getAttribute("target")==="_blank"){const t=(e.getAttribute("rel")||"").toLowerCase().split(/\s+/).filter(n=>n&&n!=="opener");t.push("noopener"),e.setAttribute("rel",Array.from(new Set(t)).join(" "))}});function Fee(e){return Zbe.sanitize(e,XOe)}const JOe={mounted(e,t){const n=t.value==null?"":String(t.value),i=Fee(n);e.innerHTML=i},updated(e,t){if(t.value!==t.oldValue){const n=t.value==null?"":String(t.value),i=Fee(n);e.innerHTML=i}}},wt=(e,t)=>{const n=e.__vccOpts||e;for(const[i,a]of t)n[i]=a;return n},QOe={},eRe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function tRe(e,t){return L(),Q("svg",eRe,t[0]||(t[0]=[H("path",{d:"M20.5714 11.1429H12.8571V3.42857C12.8571 3.20124 12.7668 2.98323 12.6061 2.82248C12.4453 2.66174 12.2273 2.57143 12 2.57143C11.7727 2.57143 11.5547 2.66174 11.3939 2.82248C11.2332 2.98323 11.1429 3.20124 11.1429 3.42857V11.1429H3.42857C3.20124 11.1429 2.98323 11.2332 2.82248 11.3939C2.66174 11.5547 2.57143 11.7727 2.57143 12C2.57143 12.2273 2.66174 12.4453 2.82248 12.6061C2.98323 12.7668 3.20124 12.8571 3.42857 12.8571H11.1429V20.5714C11.1429 20.7988 11.2332 21.0168 11.3939 21.1775C11.5547 21.3383 11.7727 21.4286 12 21.4286C12.2273 21.4286 12.4453 21.3383 12.6061 21.1775C12.7668 21.0168 12.8571 20.7988 12.8571 20.5714V12.8571H20.5714C20.7988 12.8571 21.0168 12.7668 21.1775 12.6061C21.3383 12.4453 21.4286 12.2273 21.4286 12C21.4286 11.7727 21.3383 11.5547 21.1775 11.3939C21.0168 11.2332 20.7988 11.1429 20.5714 11.1429Z",fill:"currentColor"},null,-1)]))}const nRe=wt(QOe,[["render",tRe]]),sRe={},oRe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function rRe(e,t){return L(),Q("svg",oRe,t[0]||(t[0]=[rc('<g clip-path="url(#clip0_339_392)"><path d="M24 0H0V24H24V0Z" fill="white" fill-opacity="0.01"></path> <path d="M21.2 8.80005H3.20001" stroke="currentColor" stroke-linejoin="round"></path> <path d="M21.2 2.80005H3.20001" stroke="currentColor" stroke-linejoin="round"></path> <path d="M21.2 14.8H3.20001" stroke="currentColor" stroke-linejoin="round"></path> <path d="M21.2 20.8H3.20001" stroke="currentColor" stroke-linejoin="round"></path></g> <defs><clipPath id="clip0_339_392"><rect width="24" height="24" fill="white"></rect></clipPath></defs>',3)]))}const iRe=wt(sRe,[["render",rRe]]),aRe={},lRe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function cRe(e,t){return L(),Q("svg",lRe,t[0]||(t[0]=[H("g",{"clip-path":"url(#clip0_339_391)"},[H("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2 3H22V4H2V3ZM2 10H14V9H2V10ZM2 16H22V15H2V16ZM2 22H14V21H2V22Z",fill:"currentColor"})],-1),D(),H("defs",null,[H("clipPath",{id:"clip0_339_391"},[H("rect",{width:"24",height:"24",fill:"white"})])],-1)]))}const uRe=wt(aRe,[["render",cRe]]),dRe={},fRe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function pRe(e,t){return L(),Q("svg",fRe,t[0]||(t[0]=[H("g",{"clip-path":"url(#clip0_339_393)"},[H("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2 3H22V4H2V3ZM10 10H22V9H10V10ZM2 16H22V15H2V16ZM10 22H22V21H10V22Z",fill:"currentColor"})],-1),D(),H("defs",null,[H("clipPath",{id:"clip0_339_393"},[H("rect",{width:"24",height:"24",fill:"white"})])],-1)]))}const mRe=wt(dRe,[["render",pRe]]),hRe={},gRe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function vRe(e,t){return L(),Q("svg",gRe,t[0]||(t[0]=[H("g",{"clip-path":"url(#clip0_3404_6059)"},[H("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.9999 4.74141V8.00041C19.3939 8.00041 19.784 8.078 20.148 8.22877C20.512 8.37953 20.8427 8.60051 21.1213 8.87909C21.3998 9.15766 21.6208 9.48838 21.7716 9.85236C21.9223 10.2163 21.9999 10.6064 21.9999 11.0004C21.9999 11.3944 21.9223 11.7845 21.7716 12.1485C21.6208 12.5124 21.3998 12.8432 21.1213 13.1217C20.8427 13.4003 20.512 13.6213 20.148 13.772C19.784 13.9228 19.3939 14.0004 18.9999 14.0004V17.0004C18.9999 18.6484 17.1189 19.5894 15.7999 18.6004L13.7399 17.0544C12.6388 16.2288 11.3567 15.6775 9.99993 15.4464V18.2904C10 18.9442 9.76382 19.5759 9.33483 20.0692C8.90584 20.5625 8.31298 20.8841 7.66555 20.9747C7.01811 21.0653 6.35975 20.9188 5.81181 20.5623C5.26387 20.2057 4.8633 19.6631 4.68393 19.0344L3.11393 13.5384C2.54895 12.8712 2.18127 12.0596 2.05222 11.1949C1.92317 10.3302 2.03786 9.44664 2.38342 8.64354C2.72897 7.84044 3.29167 7.14965 4.00828 6.6488C4.72489 6.14796 5.56699 5.85692 6.43993 5.80841L9.45793 5.64041C10.9346 5.55823 12.3706 5.12674 13.6479 4.38141L15.9919 3.01341C17.3259 2.23641 18.9999 3.19741 18.9999 4.74141ZM5.63393 15.0784L6.60693 18.4854C6.65376 18.6503 6.75867 18.7927 6.9023 18.8863C7.04594 18.9799 7.21858 19.0184 7.38836 18.9946C7.55814 18.9708 7.71359 18.8865 7.826 18.757C7.93841 18.6276 8.00019 18.4618 7.99993 18.2904V15.2804L6.43993 15.1934C6.16845 15.1783 5.89879 15.1399 5.63393 15.0784ZM16.9999 4.74141L14.6549 6.11041C13.2303 6.94085 11.6417 7.45069 9.99993 7.60441V13.4234C11.7869 13.6694 13.4879 14.3664 14.9399 15.4544L16.9999 17.0004V4.74141ZM7.99993 7.72441L6.54993 7.80441C5.87538 7.84165 5.2393 8.13043 4.76725 8.61373C4.2952 9.09703 4.02148 9.73973 4.00013 10.415C3.97879 11.0902 4.21135 11.7489 4.65193 12.2611C5.09251 12.7732 5.70908 13.1016 6.37993 13.1814L6.54993 13.1964L7.99993 13.2764V7.72441ZM18.9999 10.0004V12.0004C19.2548 12.0001 19.5 11.9025 19.6853 11.7276C19.8706 11.5526 19.9822 11.3135 19.9971 11.059C20.012 10.8046 19.9293 10.554 19.7657 10.3586C19.6021 10.1631 19.37 10.0375 19.1169 10.0074L18.9999 10.0004Z",fill:"currentColor"})],-1),D(),H("defs",null,[H("clipPath",{id:"clip0_3404_6059"},[H("rect",{width:"24",height:"24",fill:"white"})])],-1)]))}const bRe=wt(hRe,[["render",vRe]]),yRe={},_Re={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function SRe(e,t){return L(),Q("svg",_Re,t[0]||(t[0]=[H("circle",{cx:"12",cy:"12",r:"11.625",stroke:"currentColor","stroke-width":"0.75"},null,-1),D(),H("path",{d:"M10.176 18.5278H12.768V21.1198H10.176V18.5278ZM11.904 3.83984C16.5264 4.02992 18.5395 8.69552 15.792 12.1947C15.0749 13.0587 13.9171 13.629 13.3469 14.3547C12.768 15.0718 12.768 15.9358 12.768 16.7998H10.176C10.176 15.357 10.176 14.1387 10.7549 13.2747C11.3251 12.4107 12.4829 11.901 13.2 11.3307C15.2909 9.39536 14.7725 6.65648 11.904 6.43184C11.2165 6.43184 10.5572 6.70493 10.0711 7.19102C9.58506 7.67712 9.31197 8.3364 9.31197 9.02384H6.71997C6.71997 7.64896 7.26614 6.33039 8.23833 5.3582C9.21052 4.38601 10.5291 3.83984 11.904 3.83984Z",fill:"currentColor"},null,-1)]))}const CRe=wt(yRe,[["render",SRe]]),wRe={},ERe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function kRe(e,t){return L(),Q("svg",ERe,t[0]||(t[0]=[rc('<g clip-path="url(#clip0_339_506)"><path d="M17.4127 13.9246L16.4714 15.8067H7.5286L6.58735 13.9237H1.88063C1.69504 13.9238 1.51128 13.9604 1.33986 14.0315C1.16843 14.1026 1.01271 14.2069 0.881588 14.3382C0.750465 14.4695 0.646513 14.6254 0.575676 14.797C0.504839 14.9685 0.468505 15.1523 0.468751 15.3379V20.985C0.468875 21.3594 0.617666 21.7184 0.882417 21.9832C1.14717 22.2479 1.50621 22.3967 1.88063 22.3968H22.1194C22.4938 22.3967 22.8528 22.2479 23.1176 21.9832C23.3823 21.7184 23.5311 21.3594 23.5313 20.985V15.3379C23.5313 14.9634 23.3825 14.6043 23.1178 14.3394C22.853 14.0746 22.4939 13.9257 22.1194 13.9256L17.4127 13.9246Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path> <path d="M16.942 18.1608H7.05798C6.53814 18.1608 6.11673 18.5822 6.11673 19.102C6.11673 19.6219 6.53814 20.0433 7.05798 20.0433H16.942C17.4619 20.0433 17.8833 19.6219 17.8833 19.102C17.8833 18.5822 17.4619 18.1608 16.942 18.1608Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path> <path d="M17.8833 2.62872H20.0114C20.3396 2.62881 20.6576 2.74322 20.9106 2.95228C21.1637 3.16135 21.336 3.45202 21.398 3.77435L23.5312 14.8659" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path> <path d="M0.46875 14.8659L2.60156 3.77437C2.65659 3.48832 2.79875 3.22629 3.00855 3.02421C3.21836 2.82213 3.48553 2.68989 3.77344 2.64562L6.11719 2.64093" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path> <path d="M3.29251 13.9247V11.9559C3.29251 11.7705 3.32905 11.5869 3.40003 11.4155C3.47101 11.2442 3.57505 11.0885 3.70621 10.9574C3.83736 10.8263 3.99306 10.7223 4.16441 10.6514C4.33576 10.5805 4.51941 10.544 4.70485 10.5441H19.2952C19.4806 10.544 19.6643 10.5805 19.8356 10.6514C20.007 10.7223 20.1627 10.8263 20.2938 10.9574C20.425 11.0885 20.529 11.2442 20.6 11.4155C20.671 11.5869 20.7075 11.7705 20.7075 11.9559V13.9247" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path> <path d="M4.23422 10.5464V8.97747C4.23416 8.79202 4.27063 8.60837 4.34156 8.43702C4.41249 8.26567 4.51647 8.10997 4.64759 7.97882C4.7787 7.84766 4.93436 7.74363 5.10569 7.67264C5.27702 7.60166 5.46065 7.56512 5.6461 7.56512H18.3539C18.5394 7.56512 18.723 7.60166 18.8943 7.67264C19.0656 7.74363 19.2213 7.84766 19.3524 7.97882C19.4835 8.10997 19.5875 8.26567 19.6584 8.43702C19.7294 8.60837 19.7658 8.79202 19.7658 8.97747V10.5464" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path> <path d="M5.17548 7.56513V5.99623C5.17548 5.81082 5.212 5.62722 5.28295 5.45592C5.3539 5.28463 5.4579 5.12898 5.589 4.99788C5.85378 4.7331 6.2129 4.58435 6.58735 4.58435H17.4127C17.5981 4.58435 17.7817 4.62087 17.953 4.69182C18.1243 4.76278 18.2799 4.86677 18.411 4.99788C18.5421 5.12898 18.6461 5.28463 18.7171 5.45592C18.788 5.62722 18.8245 5.81082 18.8245 5.99623V7.56513" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path> <path d="M6.11673 4.58436V3.01545C6.11685 2.64104 6.26564 2.28199 6.5304 2.01724C6.79515 1.75249 7.15419 1.6037 7.5286 1.60358H16.4714C16.8458 1.6037 17.2049 1.75249 17.4696 2.01724C17.7344 2.28199 17.8832 2.64104 17.8833 3.01545V4.58436" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></g> <defs><clipPath id="clip0_339_506"><rect width="24" height="24" fill="white"></rect></clipPath></defs>',3)]))}const xRe=wt(wRe,[["render",kRe]]),TRe={},IRe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ARe(e,t){return L(),Q("svg",IRe,t[0]||(t[0]=[H("path",{d:"M21 11H5.41L6.71 9.71C6.8983 9.52169 7.00409 9.2663 7.00409 9C7.00409 8.7337 6.8983 8.4783 6.71 8.29C6.5217 8.10169 6.2663 7.99591 6 7.99591C5.7337 7.99591 5.4783 8.10169 5.29 8.29L2.29 11.29C2.19627 11.383 2.12188 11.4936 2.07111 11.6154C2.02034 11.7373 1.9942 11.868 1.9942 12C1.9942 12.132 2.02034 12.2627 2.07111 12.3846C2.12188 12.5064 2.19627 12.617 2.29 12.71L5.29 15.71C5.38296 15.8037 5.49356 15.8781 5.61542 15.9289C5.73728 15.9797 5.86799 16.0058 6 16.0058C6.13201 16.0058 6.26272 15.9797 6.38458 15.9289C6.50644 15.8781 6.61704 15.8037 6.71 15.71C6.80373 15.617 6.87812 15.5064 6.92889 15.3846C6.97966 15.2627 7.0058 15.132 7.0058 15C7.0058 14.868 6.97966 14.7373 6.92889 14.6154C6.87812 14.4936 6.80373 14.383 6.71 14.29L5.41 13H21C21.2652 13 21.5196 12.8946 21.7071 12.7071C21.8946 12.5196 22 12.2652 22 12C22 11.7348 21.8946 11.4804 21.7071 11.2929C21.5196 11.1054 21.2652 11 21 11Z",fill:"currentColor"},null,-1)]))}const ORe=wt(TRe,[["render",ARe]]),RRe={},DRe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function LRe(e,t){return L(),Q("svg",DRe,t[0]||(t[0]=[H("path",{d:"M3 12H21",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),D(),H("path",{d:"M18 15L21 12L18 9",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const PRe=wt(RRe,[["render",LRe]]),MRe={},NRe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function FRe(e,t){return L(),Q("svg",NRe,t[0]||(t[0]=[H("path",{d:"M11.9601 21C10.4454 21 9.16309 20.4683 8.11309 19.405C7.06309 18.3417 6.53809 17.0527 6.53809 15.538V6.808C6.53809 5.75 6.90209 4.851 7.63009 4.111C8.35809 3.371 9.25075 3.00067 10.3081 3C11.3654 3 12.2581 3.37 12.9861 4.11C13.7128 4.85067 14.0761 5.75 14.0761 6.808V13.5C14.0761 13.642 14.0284 13.7607 13.9331 13.856C13.8378 13.9513 13.7188 13.9993 13.5761 14C13.4341 14 13.3154 13.952 13.2201 13.856C13.1248 13.76 13.0771 13.6413 13.0771 13.5V6.788C13.0731 6.01133 12.8061 5.35267 12.2761 4.812C11.7454 4.27067 11.0894 4 10.3081 4C9.53275 4 8.87742 4.27367 8.34209 4.821C7.80609 5.36833 7.53809 6.03067 7.53809 6.808V15.538C7.53475 16.7727 7.96242 17.825 8.82109 18.695C9.68042 19.565 10.7271 20 11.9611 20C12.2451 20 12.5248 19.9707 12.8001 19.912C13.0754 19.854 13.3364 19.777 13.5831 19.681C13.7084 19.6323 13.8374 19.6333 13.9701 19.684C14.1028 19.7347 14.1954 19.8227 14.2481 19.948C14.2968 20.074 14.2928 20.204 14.2361 20.338C14.1794 20.472 14.0881 20.5637 13.9621 20.613C13.6501 20.7463 13.3258 20.8443 12.9891 20.907C12.6531 20.969 12.3101 21 11.9601 21ZM16.8451 20C16.7038 20 16.5851 19.952 16.4891 19.856C16.3938 19.76 16.3461 19.6413 16.3461 19.5V17.385H14.2311C14.0891 17.385 13.9704 17.337 13.8751 17.241C13.7798 17.145 13.7318 17.026 13.7311 16.884C13.7311 16.742 13.7791 16.6233 13.8751 16.528C13.9704 16.4327 14.0891 16.385 14.2311 16.385H16.3461V14.269C16.3461 14.1277 16.3941 14.009 16.4901 13.913C16.5861 13.817 16.7051 13.769 16.8471 13.769C16.9891 13.769 17.1078 13.817 17.2031 13.913C17.2984 14.009 17.3461 14.1277 17.3461 14.269V16.385H19.4621C19.6034 16.385 19.7221 16.433 19.8181 16.529C19.9141 16.6243 19.9621 16.743 19.9621 16.885C19.9621 17.027 19.9141 17.1457 19.8181 17.241C19.7221 17.337 19.6034 17.385 19.4621 17.385H17.3461V19.5C17.3461 19.642 17.2981 19.7607 17.2021 19.856C17.1061 19.952 16.9871 20 16.8451 20ZM10.3071 16.885C10.1651 16.885 10.0464 16.837 9.95109 16.741C9.85575 16.645 9.80809 16.5263 9.80809 16.385V7.269C9.80809 7.12767 9.85609 7.009 9.95209 6.913C10.0481 6.817 10.1668 6.769 10.3081 6.769C10.4501 6.769 10.5688 6.817 10.6641 6.913C10.7601 7.009 10.8081 7.12767 10.8081 7.269V16.385C10.8081 16.5263 10.7601 16.645 10.6641 16.741C10.5681 16.837 10.4491 16.885 10.3071 16.885ZM16.8451 11.385C16.7038 11.385 16.5851 11.337 16.4891 11.241C16.3938 11.145 16.3461 11.0263 16.3461 10.885V7.269C16.3461 7.12767 16.3941 7.009 16.4901 6.913C16.5861 6.817 16.7051 6.769 16.8471 6.769C16.9891 6.769 17.1078 6.817 17.2031 6.913C17.2984 7.009 17.3461 7.12767 17.3461 7.269V10.885C17.3461 11.0263 17.2981 11.145 17.2021 11.241C17.1061 11.337 16.9871 11.385 16.8451 11.385Z",fill:"currentColor"},null,-1)]))}const $Re=wt(MRe,[["render",FRe]]),BRe={},VRe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function HRe(e,t){return L(),Q("svg",VRe,t[0]||(t[0]=[H("path",{d:"M13 2V16.5H11V2H13ZM11 19H13.004V21.004H11V19Z",fill:"currentColor"},null,-1)]))}const URe=wt(BRe,[["render",HRe]]),zRe={},WRe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function jRe(e,t){return L(),Q("svg",WRe,t[0]||(t[0]=[H("rect",{width:"24",height:"24"},null,-1),D(),H("path",{d:"M15.6667 17.12L9.56008 11L15.6667 4.88L13.7867 3L5.78675 11L13.7867 19L15.6667 17.12Z",fill:"currentColor"},null,-1)]))}const ZRe=wt(zRe,[["render",jRe]]),qRe={},GRe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function KRe(e,t){return L(),Q("svg",GRe,t[0]||(t[0]=[H("path",{d:"M10.9735 4C13.105 4 14.7037 4.26644 15.7694 4.88813C16.924 5.50982 17.4569 6.57558 17.4569 8.0854C17.4569 8.97353 17.1904 9.77285 16.8352 10.3945C16.6338 10.6982 16.3723 10.9574 16.0667 11.156C15.7612 11.3545 15.4182 11.4884 15.0589 11.5491C15.5666 11.6677 16.0483 11.8784 16.4799 12.1708C16.8352 12.4372 17.1904 12.8813 17.4569 13.3254C17.7348 13.9687 17.8566 14.6687 17.8121 15.3681C17.8435 16.0097 17.7232 16.6497 17.4608 17.2361C17.1985 17.8225 16.8016 18.3387 16.3023 18.743C15.038 19.6459 13.501 20.0851 11.9505 19.9864H6V4H10.9735ZM11.3288 10.3057C12.3057 10.3057 13.0162 10.2169 13.3715 9.86166C13.8155 9.59522 13.9932 9.06234 13.9932 8.52947C13.9932 7.90777 13.7267 7.46371 13.2827 7.19727C12.8386 6.93083 12.1281 6.75321 11.1512 6.75321H9.3749V10.3057H11.3288ZM9.3749 12.9701V17.322H11.5952C12.5722 17.322 13.3715 17.0555 13.7267 16.7003C14.1708 16.2562 14.3484 15.8121 14.3484 15.1016C14.359 14.8332 14.3086 14.5658 14.2009 14.3197C14.0932 14.0735 13.9311 13.855 13.7267 13.6806C13.2827 13.3254 12.5722 13.1477 11.5064 13.1477H9.28608L9.3749 12.9701Z",fill:"currentColor"},null,-1)]))}const YRe=wt(qRe,[["render",KRe]]),XRe={},JRe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function QRe(e,t){return L(),Q("svg",JRe,t[0]||(t[0]=[H("path",{d:"M4 8C4 5.17157 4 3.75736 4.87868 2.87868C5.75736 2 7.17157 2 10 2H14C16.8284 2 18.2426 2 19.1213 2.87868C20 3.75736 20 5.17157 20 8V16C20 18.8284 20 20.2426 19.1213 21.1213C18.2426 22 16.8284 22 14 22H10C7.17157 22 5.75736 22 4.87868 21.1213C4 20.2426 4 18.8284 4 16V8Z",stroke:"currentColor"},null,-1),D(),H("path",{d:"M19.8978 16H7.89778C6.96781 16 6.50282 16 6.12132 16.1022C5.08604 16.3796 4.2774 17.1883 4 18.2235",stroke:"currentColor"},null,-1),D(),H("path",{d:"M7 16V2.5",stroke:"currentColor","stroke-linecap":"round"},null,-1)]))}const eDe=wt(XRe,[["render",QRe]]),tDe={},nDe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function sDe(e,t){return L(),Q("svg",nDe,t[0]||(t[0]=[H("path",{d:"M21 9H7V7H21V9ZM21 13H7V11H21V13ZM21 17H7V15H21V17ZM5 17H3V15H5V17ZM5 7V9H3V7H5ZM5 13H3V11H5V13Z",fill:"currentColor"},null,-1)]))}const oDe=wt(tDe,[["render",sDe]]),rDe={},iDe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function aDe(e,t){return L(),Q("svg",iDe,t[0]||(t[0]=[rc('<g clip-path="url(#clip0_336_796)"><g filter="url(#filter0_d_336_796)"><path d="M3 8.26667V19C3 19.5523 3.44772 20 4 20H20C20.5523 20 21 19.5523 21 19V8.26667M3 8.26667V5C3 4.44772 3.44772 4 4 4H20C20.5523 4 21 4.44772 21 5V8.26667M3 8.26667H21" stroke="currentColor" stroke-linejoin="round"></path></g> <g filter="url(#filter1_d_336_796)"><path d="M7 2V5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></g> <g filter="url(#filter2_d_336_796)"><path d="M17 2V5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></g> <g filter="url(#filter3_d_336_796)"><path d="M18 11H16" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></g> <g filter="url(#filter4_d_336_796)"><path d="M18 17H16" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></g> <g filter="url(#filter5_d_336_796)"><path d="M13 11H11" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></g> <g filter="url(#filter6_d_336_796)"><path d="M13 17H11" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></g> <g filter="url(#filter7_d_336_796)"><path d="M8 11H6" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></g> <g filter="url(#filter8_d_336_796)"><path d="M8 17H6" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></g> <g filter="url(#filter9_d_336_796)"><path d="M18 14H16" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></g> <g filter="url(#filter10_d_336_796)"><path d="M13 14H11" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></g> <g filter="url(#filter11_d_336_796)"><path d="M8 14H6" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></g></g> <defs><filter id="filter0_d_336_796" x="0" y="3.5" width="24" height="22" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood> <feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix> <feOffset dy="2.5"></feOffset> <feGaussianBlur stdDeviation="1.25"></feGaussianBlur> <feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"></feColorMatrix> <feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_336_796"></feBlend> <feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_336_796" result="shape"></feBlend></filter> <filter id="filter1_d_336_796" x="4" y="1.5" width="6" height="9" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood> <feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix> <feOffset dy="2.5"></feOffset> <feGaussianBlur stdDeviation="1.25"></feGaussianBlur> <feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"></feColorMatrix> <feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_336_796"></feBlend> <feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_336_796" result="shape"></feBlend></filter> <filter id="filter2_d_336_796" x="14" y="1.5" width="6" height="9" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood> <feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix> <feOffset dy="2.5"></feOffset> <feGaussianBlur stdDeviation="1.25"></feGaussianBlur> <feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"></feColorMatrix> <feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_336_796"></feBlend> <feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_336_796" result="shape"></feBlend></filter> <filter id="filter3_d_336_796" x="13" y="10.5" width="8" height="6" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood> <feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix> <feOffset dy="2.5"></feOffset> <feGaussianBlur stdDeviation="1.25"></feGaussianBlur> <feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"></feColorMatrix> <feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_336_796"></feBlend> <feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_336_796" result="shape"></feBlend></filter> <filter id="filter4_d_336_796" x="13" y="16.5" width="8" height="6" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood> <feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix> <feOffset dy="2.5"></feOffset> <feGaussianBlur stdDeviation="1.25"></feGaussianBlur> <feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"></feColorMatrix> <feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_336_796"></feBlend> <feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_336_796" result="shape"></feBlend></filter> <filter id="filter5_d_336_796" x="8" y="10.5" width="8" height="6" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood> <feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix> <feOffset dy="2.5"></feOffset> <feGaussianBlur stdDeviation="1.25"></feGaussianBlur> <feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"></feColorMatrix> <feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_336_796"></feBlend> <feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_336_796" result="shape"></feBlend></filter> <filter id="filter6_d_336_796" x="8" y="16.5" width="8" height="6" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood> <feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix> <feOffset dy="2.5"></feOffset> <feGaussianBlur stdDeviation="1.25"></feGaussianBlur> <feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"></feColorMatrix> <feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_336_796"></feBlend> <feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_336_796" result="shape"></feBlend></filter> <filter id="filter7_d_336_796" x="3" y="10.5" width="8" height="6" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood> <feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix> <feOffset dy="2.5"></feOffset> <feGaussianBlur stdDeviation="1.25"></feGaussianBlur> <feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"></feColorMatrix> <feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_336_796"></feBlend> <feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_336_796" result="shape"></feBlend></filter> <filter id="filter8_d_336_796" x="3" y="16.5" width="8" height="6" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood> <feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix> <feOffset dy="2.5"></feOffset> <feGaussianBlur stdDeviation="1.25"></feGaussianBlur> <feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"></feColorMatrix> <feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_336_796"></feBlend> <feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_336_796" result="shape"></feBlend></filter> <filter id="filter9_d_336_796" x="13" y="13.5" width="8" height="6" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood> <feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix> <feOffset dy="2.5"></feOffset> <feGaussianBlur stdDeviation="1.25"></feGaussianBlur> <feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"></feColorMatrix> <feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_336_796"></feBlend> <feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_336_796" result="shape"></feBlend></filter> <filter id="filter10_d_336_796" x="8" y="13.5" width="8" height="6" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood> <feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix> <feOffset dy="2.5"></feOffset> <feGaussianBlur stdDeviation="1.25"></feGaussianBlur> <feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"></feColorMatrix> <feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_336_796"></feBlend> <feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_336_796" result="shape"></feBlend></filter> <filter id="filter11_d_336_796" x="3" y="13.5" width="8" height="6" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood> <feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix> <feOffset dy="2.5"></feOffset> <feGaussianBlur stdDeviation="1.25"></feGaussianBlur> <feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"></feColorMatrix> <feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_336_796"></feBlend> <feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_336_796" result="shape"></feBlend></filter> <clipPath id="clip0_336_796"><rect width="24" height="24" fill="white"></rect></clipPath></defs>',3)]))}const lDe=wt(rDe,[["render",aDe]]),cDe={},uDe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function dDe(e,t){return L(),Q("svg",uDe,t[0]||(t[0]=[H("path",{d:"M5 19L12 12L19 19M19 5L11.9987 12L5 5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const fDe=wt(cDe,[["render",dDe]]),pDe={},mDe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function hDe(e,t){return L(),Q("svg",mDe,t[0]||(t[0]=[rc('<path d="M3.14999 21.25H20.2" stroke="currentColor" stroke-width="0.5" stroke-linecap="round" stroke-linejoin="round"></path> <path d="M3.2 20.25L6.7 20.15L6.45 2.8L3.3 2.75L3.2 20.25Z" stroke="currentColor" stroke-width="0.5" stroke-linecap="round" stroke-linejoin="round"></path> <path d="M7.50001 6.75L7.35001 19.9L10.6 19.8L11 6.85L7.50001 6.75Z" stroke="currentColor" stroke-width="0.5" stroke-linecap="round" stroke-linejoin="round"></path> <path d="M12 3.95L11.3 20.05L15.65 20L16.5 4.2L12 3.95Z" stroke="currentColor" stroke-width="0.5" stroke-linecap="round" stroke-linejoin="round"></path> <path d="M17 7.10001L16.25 20.25L20.15 20.3L20.85 7.15001L17 7.10001Z" stroke="currentColor" stroke-width="0.5" stroke-linecap="round" stroke-linejoin="round"></path> <path d="M17.5 7.1C17.8225 6.61239 18.242 6.19647 18.7323 5.87818C19.2227 5.55988 19.7733 5.34604 20.35 5.25" stroke="currentColor" stroke-width="0.5" stroke-linecap="round" stroke-linejoin="round"></path> <path d="M6.45 2.8L7.4 4.5L7.45 6.8" stroke="currentColor" stroke-width="0.5" stroke-linecap="round" stroke-linejoin="round"></path> <path d="M6.7 20.15L7.35 19.9" stroke="currentColor" stroke-width="0.5" stroke-linecap="round" stroke-linejoin="round"></path>',15)]))}const gDe=wt(pDe,[["render",hDe]]),vDe={},bDe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function yDe(e,t){return L(),Q("svg",bDe,t[0]||(t[0]=[H("path",{d:"M19.5 3H4.5C4.10218 3 3.72064 3.15804 3.43934 3.43934C3.15804 3.72064 3 4.10218 3 4.5V19.5C3 19.8978 3.15804 20.2794 3.43934 20.5607C3.72064 20.842 4.10218 21 4.5 21H19.5C19.8978 21 20.2794 20.842 20.5607 20.5607C20.842 20.2794 21 19.8978 21 19.5V4.5C21 4.10218 20.842 3.72064 20.5607 3.43934C20.2794 3.15804 19.8978 3 19.5 3ZM4.5 19.5V4.5H19.5V19.5H4.5Z",fill:"currentColor"},null,-1)]))}const _De=wt(vDe,[["render",yDe]]),SDe={},CDe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function wDe(e,t){return L(),Q("svg",CDe,t[0]||(t[0]=[H("path",{d:"M18.75 2.25H5.25C4.45462 2.25087 3.69206 2.56722 3.12964 3.12964C2.56722 3.69206 2.25087 4.45462 2.25 5.25V18.75C2.25087 19.5454 2.56722 20.3079 3.12964 20.8704C3.69206 21.4328 4.45462 21.7491 5.25 21.75H18.75C19.5454 21.7491 20.3079 21.4328 20.8704 20.8704C21.4328 20.3079 21.7491 19.5454 21.75 18.75V5.25C21.7491 4.45462 21.4328 3.69206 20.8704 3.12964C20.3079 2.56722 19.5454 2.25087 18.75 2.25ZM17.0742 8.73234L10.7742 16.2323C10.7051 16.3147 10.6191 16.3812 10.5221 16.4273C10.425 16.4735 10.3192 16.4983 10.2117 16.5H10.1991C10.0939 16.5 9.99 16.4778 9.89398 16.435C9.79797 16.3922 9.71202 16.3297 9.64172 16.2516L6.94172 13.2516C6.87315 13.1788 6.81981 13.0931 6.78483 12.9995C6.74986 12.9059 6.73395 12.8062 6.73805 12.7063C6.74215 12.6064 6.76617 12.5084 6.8087 12.4179C6.85124 12.3275 6.91142 12.2464 6.98572 12.1796C7.06002 12.1127 7.14694 12.0614 7.24136 12.0286C7.33579 11.9958 7.43581 11.9822 7.53556 11.9886C7.63531 11.995 7.73277 12.0213 7.82222 12.0659C7.91166 12.1106 7.99128 12.1726 8.05641 12.2484L10.1794 14.6072L15.9258 7.76766C16.0547 7.61863 16.237 7.52632 16.4335 7.51066C16.6299 7.49501 16.8246 7.55728 16.9754 7.68402C17.1263 7.81075 17.2212 7.99176 17.2397 8.18793C17.2582 8.3841 17.1988 8.57966 17.0742 8.73234Z",fill:"currentColor"},null,-1)]))}const EDe=wt(SDe,[["render",wDe]]),kDe={},xDe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function TDe(e,t){return L(),Q("svg",xDe,t[0]||(t[0]=[H("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.9999 13.9394L17.4696 8.46973L18.5303 9.53039L11.9999 16.0607L5.46961 9.53039L6.53027 8.46973L11.9999 13.9394Z",fill:"currentColor"},null,-1)]))}const IDe=wt(kDe,[["render",TDe]]),ADe={},ODe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function RDe(e,t){return L(),Q("svg",ODe,t[0]||(t[0]=[H("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.0606 11.9999L15.5303 17.4696L14.4696 18.5303L7.93929 11.9999L14.4696 5.4696L15.5303 6.5303L10.0606 11.9999Z",fill:"currentColor"},null,-1)]))}const DDe=wt(ADe,[["render",RDe]]),LDe={},PDe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function MDe(e,t){return L(),Q("svg",PDe,t[0]||(t[0]=[H("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.9394 12.0001L8.46971 6.53039L9.53041 5.46973L16.0607 12.0001L9.53041 18.5304L8.46971 17.4697L13.9394 12.0001Z",fill:"currentColor"},null,-1)]))}const NDe=wt(LDe,[["render",MDe]]),FDe={},$De={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function BDe(e,t){return L(),Q("svg",$De,t[0]||(t[0]=[H("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.0001 10.0606L6.53039 15.5303L5.46973 14.4696L12.0001 7.93929L18.5304 14.4696L17.4697 15.5303L12.0001 10.0606Z",fill:"currentColor"},null,-1)]))}const VDe=wt(FDe,[["render",BDe]]),HDe={},UDe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function zDe(e,t){return L(),Q("svg",UDe,t[0]||(t[0]=[H("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12 2.75C6.89137 2.75 2.75 6.89137 2.75 12C2.75 17.1086 6.89137 21.25 12 21.25C17.1086 21.25 21.25 17.1086 21.25 12C21.25 6.89137 17.1086 2.75 12 2.75ZM1.25 12C1.25 6.06294 6.06294 1.25 12 1.25C17.9371 1.25 22.75 6.06294 22.75 12C22.75 17.9371 17.9371 22.75 12 22.75C6.06294 22.75 1.25 17.9371 1.25 12ZM12 7.25C12.4142 7.25 12.75 7.58579 12.75 8V11.6893L15.0303 13.9697C15.3232 14.2626 15.3232 14.7374 15.0303 15.0303C14.7374 15.3232 14.2626 15.3232 13.9697 15.0303L11.4697 12.5303C11.329 12.3897 11.25 12.1989 11.25 12V8C11.25 7.58579 11.5858 7.25 12 7.25Z",fill:"currentColor"},null,-1)]))}const WDe=wt(HDe,[["render",zDe]]),jDe={},ZDe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function qDe(e,t){return L(),Q("svg",ZDe,t[0]||(t[0]=[H("g",{"clip-path":"url(#clip0_336_651)"},[H("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12 19.5C11.124 19.5 10.278 19.398 9.465 19.2247L5.934 21.3473L5.98125 17.868C3.2745 16.2405 1.5 13.5495 1.5 10.5C1.5 5.52975 6.201 1.5 12 1.5C17.799 1.5 22.5 5.52975 22.5 10.5C22.5 15.471 17.799 19.5 12 19.5ZM12 0C5.373 0 0 4.70175 0 10.5C0 13.8142 1.75875 16.7655 4.5 18.6893V24L9.75675 20.8103C10.4843 20.9303 11.2327 21 12 21C18.627 21 24 16.299 24 10.5C24 4.70175 18.627 0 12 0Z",fill:"currentColor"})],-1),D(),H("defs",null,[H("clipPath",{id:"clip0_336_651"},[H("rect",{width:"24",height:"24",fill:"white"})])],-1)]))}const GDe=wt(jDe,[["render",qDe]]),KDe={},YDe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function XDe(e,t){return L(),Q("svg",YDe,t[0]||(t[0]=[H("path",{d:"M21 6.99984L9 18.9998L3.5 13.4998L4.91 12.0898L9 16.1698L19.59 5.58984L21 6.99984Z",fill:"currentColor"},null,-1)]))}const JDe=wt(KDe,[["render",XDe]]),QDe={},eLe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function tLe(e,t){return L(),Q("svg",eLe,t[0]||(t[0]=[H("path",{d:"M5.615 20C5.16833 20 4.78733 19.8427 4.472 19.528C4.15733 19.2133 4 18.8323 4 18.385V5.615C4 5.16833 4.15733 4.78733 4.472 4.472C4.78667 4.15733 5.16767 4 5.615 4H18.385C18.8317 4 19.2127 4.15733 19.528 4.472C19.8427 4.78667 20 5.16767 20 5.615V18.385C20 18.8317 19.8427 19.2127 19.528 19.528C19.2133 19.8427 18.8323 20 18.385 20H5.615ZM10.5 19V12.5H5V18.385C5 18.5643 5.05767 18.7117 5.173 18.827C5.28833 18.9423 5.43567 19 5.615 19H10.5ZM11.5 19H18.385C18.5643 19 18.7117 18.9423 18.827 18.827C18.9423 18.7117 19 18.5643 19 18.385V12.5H11.5V19ZM5 11.5H19V5.615C19 5.43567 18.9423 5.28833 18.827 5.173C18.7117 5.05767 18.5643 5 18.385 5H5.615C5.43567 5 5.28833 5.05767 5.173 5.173C5.05767 5.28833 5 5.43567 5 5.615V11.5Z",fill:"currentColor"},null,-1)]))}const nLe=wt(QDe,[["render",tLe]]),sLe={},oLe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function rLe(e,t){return L(),Q("svg",oLe,t[0]||(t[0]=[H("path",{d:"M12 4C7.6 4 4 7.6 4 12C4 16.4 7.6 20 12 20C16.4 20 20 16.4 20 12C20 7.6 16.4 4 12 4ZM12 5.77778C13.3778 5.77778 14.6667 6.26667 15.7333 7.02222L7.02222 15.7333C6.26667 14.6667 5.77778 13.3778 5.77778 12C5.77778 8.57778 8.57778 5.77778 12 5.77778ZM12 18.2222C10.6222 18.2222 9.33333 17.7333 8.26667 16.9778L16.9778 8.26667C17.7333 9.33333 18.2222 10.6222 18.2222 12C18.2222 15.4222 15.4222 18.2222 12 18.2222Z",fill:"currentColor"},null,-1)]))}const iLe=wt(sLe,[["render",rLe]]),aLe={},lLe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function cLe(e,t){return L(),Q("svg",lLe,t[0]||(t[0]=[H("path",{d:"M0.98999 19H3.40999L4.67999 15.42H10.33L11.59 19H14.01L8.74999 5H6.24999L0.98999 19ZM5.40999 13.39L7.43999 7.6H7.55999L9.58999 13.39H5.40999ZM23 11V13H15V11H23Z",fill:"currentColor"},null,-1)]))}const uLe=wt(aLe,[["render",cLe]]),dLe={},fLe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function pLe(e,t){return L(),Q("svg",fLe,t[0]||(t[0]=[H("g",{"clip-path":"url(#clip0_339_400)"},[H("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M22.125 13.5H1.875V3C1.875 2.172 2.547 1.5 3.375 1.5H20.625C21.453 1.5 22.125 2.172 22.125 3V13.5ZM22.125 16.5C22.125 17.328 21.453 18 20.625 18H3.375C2.547 18 1.875 17.328 1.875 16.5V15H22.125V16.5ZM10.875 19.5H13.875V22.5H10.875V19.5ZM20.625 0H3.375C1.71825 0 0.375 1.34325 0.375 3V16.5C0.375 18.1567 1.71825 19.5 3.375 19.5H9.375V22.5H7.875C7.46025 22.5 7.125 22.836 7.125 23.25C7.125 23.6647 7.46025 24 7.875 24H16.875C17.2897 24 17.625 23.6647 17.625 23.25C17.625 22.836 17.2897 22.5 16.875 22.5H15.375V19.5H20.625C22.2817 19.5 23.625 18.1567 23.625 16.5V3C23.625 1.34325 22.2817 0 20.625 0Z",fill:"currentColor"})],-1),D(),H("defs",null,[H("clipPath",{id:"clip0_339_400"},[H("rect",{width:"24",height:"24",fill:"white"})])],-1)]))}const mLe=wt(dLe,[["render",pLe]]),hLe={},gLe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function vLe(e,t){return L(),Q("svg",gLe,t[0]||(t[0]=[H("path",{d:"M19.7861 20L16.6905 16.9044V17.364H4V15.8729C4 15.4988 4.10878 15.1489 4.32633 14.8232C4.54448 14.4969 4.83757 14.2436 5.2056 14.0636C6.0613 13.6532 6.9173 13.3456 7.77361 13.1408C8.63052 12.9353 9.48773 12.8326 10.3452 12.8326C10.7858 12.8326 11.2254 12.8628 11.6642 12.9232C12.1029 12.9825 12.5464 13.0779 12.9948 13.2097L10.5791 10.793C10.5489 10.8051 10.5126 10.8112 10.4703 10.8112H10.3452C9.59772 10.8112 8.95745 10.5447 8.42445 10.0117C7.89145 9.47867 7.62525 8.8384 7.62586 8.09087V7.96487C7.62586 7.92257 7.6319 7.88631 7.64399 7.8561L4.43148 4.64722L5.07779 4L20.4342 19.3537L19.7861 20ZM12.8417 9.17863L12.1237 8.4598C12.1352 8.39816 12.1437 8.33652 12.1491 8.27489C12.1552 8.21385 12.1582 8.15251 12.1582 8.09087C12.1582 7.59232 11.9805 7.16537 11.6252 6.81004C11.2698 6.4547 10.8432 6.27734 10.3452 6.27794C10.2836 6.27794 10.222 6.28097 10.1603 6.28701C10.0987 6.29245 10.0371 6.30091 9.97541 6.31239L9.25749 5.59447C9.42609 5.52014 9.60225 5.46424 9.78596 5.42677C9.96967 5.38991 10.1561 5.37148 10.3452 5.37148C11.0934 5.37148 11.7337 5.63738 12.266 6.16917C12.7984 6.70096 13.0646 7.34153 13.0646 8.09087C13.0646 8.27942 13.0459 8.46585 13.0084 8.65016C12.9716 8.83387 12.916 9.01003 12.8417 9.17863ZM4.90646 16.4575H15.784L14.3228 14.5367C13.6907 14.2708 13.0396 14.0714 12.3694 13.9385C11.6986 13.8055 11.0239 13.7391 10.3452 13.7391C9.5385 13.7391 8.73899 13.8351 7.94674 14.0273C7.15389 14.2195 6.38461 14.4963 5.63889 14.8576C5.40925 14.9797 5.22977 15.129 5.10045 15.3054C4.97113 15.4825 4.90646 15.6713 4.90646 15.872V16.4575Z",fill:"currentColor"},null,-1)]))}const bLe=wt(hLe,[["render",vLe]]),yLe={},_Le={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function SLe(e,t){return L(),Q("svg",_Le,t[0]||(t[0]=[H("path",{d:"M8 22.0002H16C18.8284 22.0002 20.2426 22.0002 21.1213 21.1215C22 20.2429 22 18.8286 22 16.0002V15.0002C22 12.1718 22 10.7576 21.1213 9.8789C20.3529 9.11051 19.175 9.01406 17 9.00195M7 9.00195C4.82497 9.01406 3.64706 9.11051 2.87868 9.87889C2 10.7576 2 12.1718 2 15.0002V16.0002C2 18.8286 2 20.2429 2.87868 21.1215C3.17848 21.4213 3.54062 21.6188 4 21.749",stroke:"currentColor","stroke-linecap":"round"},null,-1),D(),H("path",{d:"M12 2V15M12 15L9 11.5M12 15L15 11.5",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const CLe=wt(yLe,[["render",SLe]]),wLe={},ELe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function kLe(e,t){return L(),Q("svg",ELe,t[0]||(t[0]=[H("path",{d:"M3 8L12 17L21 8H3Z",fill:"currentColor"},null,-1)]))}const xLe=wt(wLe,[["render",kLe]]),TLe={},ILe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ALe(e,t){return L(),Q("svg",ILe,t[0]||(t[0]=[H("path",{d:"M21 16L12 7L3 16L21 16Z",fill:"currentColor"},null,-1)]))}const OLe=wt(TLe,[["render",ALe]]),RLe={},DLe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function LLe(e,t){return L(),Q("svg",DLe,t[0]||(t[0]=[H("rect",{width:"24",height:"24"},null,-1),D(),H("path",{d:"M5.39231 19H18.6524C18.7564 19 18.8562 18.9587 18.9298 18.8851C19.0034 18.8115 19.0447 18.7117 19.0447 18.6077C19.0447 18.5036 19.0034 18.4039 18.9298 18.3303C18.8562 18.2567 18.7564 18.2154 18.6524 18.2154H5.39231C5.28826 18.2154 5.18848 18.2567 5.1149 18.3303C5.04133 18.4039 5 18.5036 5 18.6077C5 18.7117 5.04133 18.8115 5.1149 18.8851C5.18848 18.9587 5.28826 19 5.39231 19ZM10.2271 16.0514C10.5586 15.9586 10.861 15.7831 11.1059 15.5414L18.5912 8.05613C18.8475 7.79878 18.9914 7.45036 18.9914 7.08713C18.9914 6.7239 18.8475 6.37547 18.5912 6.11812L17.8536 5.38843C17.5926 5.13912 17.2456 5 16.8846 5C16.5237 5 16.1766 5.13912 15.9156 5.38843L8.43036 12.8658C8.18817 13.1092 8.01489 13.4124 7.9282 13.7446L7.34758 15.9102C7.32003 16.0091 7.31932 16.1136 7.34552 16.2128C7.37172 16.3121 7.42389 16.4026 7.49666 16.4751C7.60772 16.5843 7.75678 16.6461 7.91251 16.6477L10.2271 16.0514ZM10.5488 14.9843C10.4042 15.1316 10.2226 15.2373 10.0231 15.2903L9.26205 15.4943L8.47743 14.7097L8.68143 13.9486C8.73631 13.7499 8.84174 13.5688 8.98743 13.4229L9.28559 13.1326L10.847 14.694L10.5488 14.9843ZM11.4041 14.1369L9.84267 12.5755L15.1232 7.29505L16.6845 8.85644L11.4041 14.1369ZM18.0341 7.5069L17.2416 8.29936L15.6802 6.73797L16.4727 5.93766C16.5272 5.88291 16.592 5.83946 16.6634 5.80981C16.7348 5.78017 16.8113 5.76491 16.8886 5.76491C16.9658 5.76491 17.0423 5.78017 17.1137 5.80981C17.1851 5.83946 17.2499 5.88291 17.3044 5.93766L18.0341 6.6752C18.1435 6.78594 18.2049 6.93536 18.2049 7.09105C18.2049 7.24674 18.1435 7.39616 18.0341 7.5069Z",fill:"currentColor"},null,-1)]))}const PLe=wt(RLe,[["render",LLe]]),MLe={},NLe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function FLe(e,t){return L(),Q("svg",NLe,t[0]||(t[0]=[H("rect",{width:"24",height:"24"},null,-1),D(),H("path",{d:"M3.46667 5.46667V5C3.3429 5 3.2242 5.04917 3.13668 5.13668C3.04917 5.2242 3 5.3429 3 5.46667H3.46667ZM20.2667 5.46667H20.7333C20.7333 5.3429 20.6842 5.2242 20.5967 5.13668C20.5091 5.04917 20.3904 5 20.2667 5V5.46667ZM3.46667 5.93333H20.2667V5H3.46667V5.93333ZM19.8 5.46667V16.6667H20.7333V5.46667H19.8ZM18.4 18.0667H5.33333V19H18.4V18.0667ZM3.93333 16.6667V5.46667H3V16.6667H3.93333ZM5.33333 18.0667C4.96203 18.0667 4.60593 17.9192 4.34338 17.6566C4.08083 17.3941 3.93333 17.038 3.93333 16.6667H3C3 17.2855 3.24583 17.879 3.68342 18.3166C4.121 18.7542 4.71449 19 5.33333 19V18.0667ZM19.8 16.6667C19.8 17.038 19.6525 17.3941 19.3899 17.6566C19.1274 17.9192 18.7713 18.0667 18.4 18.0667V19C19.0188 19 19.6123 18.7542 20.0499 18.3166C20.4875 17.879 20.7333 17.2855 20.7333 16.6667H19.8Z",fill:"currentColor"},null,-1),D(),H("path",{d:"M3.4668 5.4668L11.8668 13.8668L20.2668 5.4668",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const $Le=wt(MLe,[["render",FLe]]),BLe={},VLe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function HLe(e,t){return L(),Q("svg",VLe,t[0]||(t[0]=[rc('<rect width="24" height="24"></rect> <g clip-path="url(#clip0_3406_6112)"><path d="M18 7.7V7H16.5L12 4L7.4 7H6V7.7L4 9V20H20V9.1L18 7.7ZM12 5.2L14.7 7H9.2L12 5.2ZM7 8H17V11.7L13.5 13.4L12 12.1L10.5 13.5L7 11.8V8ZM5 9.5L6 8.8V11.2L5 10.8V9.5ZM5 11.9L9.6 14.2L5 18.2V11.9ZM5.9 19L12 13.7L18.1 19H5.9ZM19 18.2L14.3 14.1L19 11.8V18.2ZM19 10.7L18 11.2V8.9L19 9.6V10.7Z" fill="currentColor"></path></g> <defs><clipPath id="clip0_3406_6112"><rect width="16" height="16" fill="white" transform="translate(4 4)"></rect></clipPath></defs>',5)]))}const ULe=wt(BLe,[["render",HLe]]),zLe={},WLe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function jLe(e,t){return L(),Q("svg",WLe,t[0]||(t[0]=[H("path",{d:"M12.8849 3.4905C12.5389 2.8365 11.4629 2.8365 11.1169 3.4905L2.11694 20.4905C2.03592 20.6429 1.99575 20.8136 2.00036 20.9861C2.00496 21.1586 2.05417 21.327 2.14319 21.4749C2.23221 21.6227 2.35801 21.7449 2.50833 21.8297C2.65865 21.9145 2.82837 21.9588 3.00094 21.9585H21.0009C21.1734 21.9589 21.343 21.9145 21.4932 21.8298C21.6434 21.7451 21.7691 21.6229 21.8581 21.4752C21.947 21.3274 21.9961 21.1591 22.0007 20.9867C22.0052 20.8144 21.965 20.6437 21.8839 20.4915L12.8849 3.4905ZM13.0009 18.9585H11.0009V16.9585H13.0009V18.9585ZM11.0009 14.9585V9.9585H13.0009L13.0019 14.9585H11.0009Z",fill:"currentColor"},null,-1)]))}const ZLe=wt(zLe,[["render",jLe]]),qLe={},GLe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function KLe(e,t){return L(),Q("svg",GLe,t[0]||(t[0]=[H("g",{"clip-path":"url(#clip0_339_325)"},[H("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M23.7637 0.225037C23.6272 0.0900366 23.4382 0 23.229 0H16.5C16.0853 0 15.75 0.3375 15.75 0.75C15.75 1.1625 16.0853 1.5 16.5 1.5H21.4717L13.3725 9.60004L14.433 10.6575L22.5233 2.56503L22.5 7.5C22.5 7.9125 22.8353 8.25 23.25 8.25C23.6647 8.25 24 7.9125 24 7.5V0.75C24 0.525 23.9085 0.345037 23.7637 0.225037ZM9.56701 13.3425L1.47675 21.435L1.5 16.5C1.5 16.0875 1.16475 15.75 0.75 15.75C0.33525 15.75 0 16.0875 0 16.5V23.25C0 23.475 0.0915018 23.655 0.236252 23.775C0.372752 23.91 0.561761 24 0.771011 24H7.5C7.91475 24 8.25 23.6625 8.25 23.25C8.25 22.8375 7.91475 22.5 7.5 22.5H2.52825L10.6275 14.4L9.56701 13.3425Z",fill:"currentColor"})],-1),D(),H("defs",null,[H("clipPath",{id:"clip0_339_325"},[H("rect",{width:"24",height:"24",fill:"white"})])],-1)]))}const YLe=wt(qLe,[["render",KLe]]),XLe={},JLe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function QLe(e,t){return L(),Q("svg",JLe,t[0]||(t[0]=[H("g",{"clip-path":"url(#clip0_3517_5864)"},[H("path",{d:"M14.5933 2.66699H5.21992C4.88984 2.67573 4.57654 2.81438 4.3481 3.0528C4.11966 3.29123 3.99454 3.61017 3.99992 3.94033V20.0603C3.99454 20.3905 4.11966 20.7094 4.3481 20.9478C4.57654 21.1863 4.88984 21.3249 5.21992 21.3337H18.7799C19.11 21.3249 19.4233 21.1863 19.6517 20.9478C19.8802 20.7094 20.0053 20.3905 19.9999 20.0603V7.94699L14.5933 2.66699ZM14.3933 4.32699L18.3933 8.26033H14.3933V4.32699ZM5.33326 20.0003V4.00033H13.3333V9.33366H18.6666V20.0003H5.33326Z",fill:"currentColor"})],-1),D(),H("defs",null,[H("clipPath",{id:"clip0_3517_5864"},[H("rect",{width:"24",height:"24",fill:"none"})])],-1)]))}const ePe=wt(XLe,[["render",QLe]]),tPe={},nPe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function sPe(e,t){return L(),Q("svg",nPe,t[0]||(t[0]=[rc('<path d="M8.74781 16.7527C8.73996 16.5959 8.77928 16.4403 8.86071 16.306C8.94213 16.1718 9.06192 16.065 9.20462 15.9994C9.34732 15.9339 9.50639 15.9126 9.6613 15.9384C9.81621 15.9641 9.95985 16.0357 10.0737 16.1438C10.1875 16.252 10.2664 16.3918 10.3 16.5451C10.3337 16.6985 10.3206 16.8585 10.2624 17.0043C10.2043 17.1502 10.1038 17.2753 9.97385 17.3635C9.84392 17.4517 9.69056 17.499 9.53352 17.4992C9.33177 17.4994 9.13765 17.422 8.99138 17.2831C8.84511 17.1441 8.7579 16.9542 8.74781 16.7527Z" fill="currentColor" stroke="currentColor" stroke-miterlimit="10"></path> <path d="M13.9964 16.7448C14.4087 16.7448 14.7429 16.4106 14.7429 15.9984C14.7429 15.5861 14.4087 15.252 13.9964 15.252C13.5842 15.252 13.25 15.5861 13.25 15.9984C13.25 16.4106 13.5842 16.7448 13.9964 16.7448Z" fill="currentColor" stroke="currentColor" stroke-miterlimit="10"></path> <path d="M14.7507 15.9963V11.4941L10.2485 12.2484V16.7506" stroke="currentColor" stroke-miterlimit="10"></path> <path d="M18.4986 7.74786V20.5H5V4H14.7507L18.4986 7.74786Z" stroke="currentColor" stroke-miterlimit="10"></path> <path d="M18.4985 7.74786V8.50214H13.9963V4H14.7506L18.4985 7.74786Z" stroke="currentColor" stroke-miterlimit="10"></path>',9)]))}const oPe=wt(tPe,[["render",sPe]]),rPe={},iPe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function aPe(e,t){return L(),Q("svg",iPe,t[0]||(t[0]=[H("path",{d:"M8.25333 10.3791L5.17247 13.4592C4.99482 13.6368 4.89384 13.879 4.89384 14.1311C4.89384 14.3839 4.99482 14.6246 5.17247 14.803L8.15084 17.7821C8.33684 17.9673 8.57979 18.0607 8.82425 18.0607C9.0672 18.0607 9.3109 17.9673 9.49615 17.7821C9.86816 17.4116 9.86816 16.8096 9.49615 16.4375L7.18968 14.1311L9.59864 11.7229C9.96989 11.3524 9.96989 10.7503 9.59864 10.3791C9.22587 10.0078 8.62458 10.0078 8.25333 10.3791Z",fill:"currentColor"},null,-1),D(),H("path",{d:"M14.4014 11.7244L16.8111 14.1318L14.5039 16.4383C14.1334 16.8088 14.1334 17.4108 14.5039 17.7829C14.6891 17.9681 14.9321 18.0607 15.1765 18.0607C15.421 18.0607 15.6639 17.9681 15.8499 17.7829L18.8283 14.8037C19.006 14.6261 19.1069 14.3831 19.1069 14.1311C19.1069 13.8783 19.006 13.6368 18.8283 13.4584L15.7474 10.3791C15.3762 10.0078 14.7749 10.0078 14.4029 10.3791C14.0301 10.7503 14.0301 11.3531 14.4014 11.7244Z",fill:"currentColor"},null,-1),D(),H("path",{d:"M10.0709 20.3801C10.1324 20.3976 10.1938 20.4082 10.2569 20.4082C10.5271 20.4082 10.7792 20.2321 10.8627 19.9588L14.3475 8.57449C14.4522 8.23968 14.2632 7.88513 13.9276 7.78264C13.5913 7.68015 13.2398 7.86843 13.1358 8.20324L9.6495 19.5868C9.54777 19.9223 9.73529 20.2761 10.0709 20.3801Z",fill:"currentColor"},null,-1),D(),H("path",{d:"M8.51525 0L2.29964 6.56181V24H21.7004V0H8.51525ZM7.96786 2.75971V5.66747H5.21347L7.96786 2.75971ZM20.1987 22.5006H3.79983V7.16766H9.46729V1.49943H20.1987V22.5006Z",fill:"currentColor"},null,-1)]))}const lPe=wt(rPe,[["render",aPe]]),cPe={},uPe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function dPe(e,t){return L(),Q("svg",uPe,t[0]||(t[0]=[H("path",{d:"M8.20057 10.8595C7.71387 10.8679 7.43335 11.3473 7.43335 11.9817C7.43335 12.621 7.72298 13.0768 8.20518 13.0851C8.69931 13.094 8.98613 12.6128 8.98613 11.9624C8.98595 11.362 8.70405 10.8509 8.20057 10.8595Z",fill:"currentColor",stroke:"currentColor","stroke-width":"0.108732"},null,-1),D(),H("path",{d:"M4.7442 10.9279C4.59937 10.9303 4.50625 10.9456 4.45142 10.9604V12.996C4.50625 13.0108 4.59527 13.0126 4.67582 13.0139C5.26872 13.0287 5.66157 12.6778 5.66157 11.9197C5.666 11.2607 5.30769 10.9182 4.7442 10.9279Z",fill:"currentColor",stroke:"currentColor","stroke-width":"0.108732"},null,-1),D(),H("path",{d:"M13.6362 19.4459C13.6601 19.4472 13.6836 19.4493 13.7078 19.4493H19.1573C19.7948 19.4493 20.3133 18.9306 20.3133 18.2933V5.66037C20.3133 5.02312 19.7948 4.5044 19.1573 4.5044H13.7078C13.6838 4.5044 13.6601 4.50676 13.6362 4.50786V3L3 4.41948V19.5438L13.6362 21V19.4459ZM13.7078 5.16508H19.1573C19.4305 5.16508 19.6528 5.3874 19.6528 5.66049V18.2936C19.6528 18.5666 19.4305 18.789 19.1573 18.789H13.7078C13.6835 18.789 13.6598 18.7851 13.6362 18.7816V14.7428H18.5336C18.6545 14.7428 18.7526 14.645 18.7526 14.5242C18.7526 14.4032 18.6545 14.3055 18.5336 14.3055H13.6362V12.9634H18.5336C18.6545 12.9634 18.7526 12.8654 18.7526 12.7448C18.7526 12.6238 18.6545 12.5261 18.5336 12.5261H13.6362V11.2257H18.5336C18.6545 11.2257 18.7526 11.1279 18.7526 11.007C18.7526 10.8861 18.6545 10.7884 18.5336 10.7884H13.6362V9.47569H15.9375C16.0581 9.47569 16.1561 9.3778 16.1561 9.257C16.1561 9.13615 16.0581 9.03826 15.9375 9.03826H13.6362V5.17235C13.6598 5.16887 13.6833 5.16508 13.7078 5.16508ZM5.88183 13.1853C5.5692 13.4566 5.09976 13.5756 4.53596 13.5607C4.20303 13.5517 3.96985 13.5228 3.81211 13.4959V10.4725C4.04465 10.4254 4.35018 10.3947 4.67578 10.3865C5.22505 10.372 5.5867 10.471 5.87303 10.6954C6.18434 10.936 6.38101 11.3282 6.38101 11.895C6.38104 12.5093 6.17049 12.9299 5.88183 13.1853ZM8.16667 13.6765C7.22939 13.6516 6.69398 12.9142 6.69398 11.995C6.69398 11.028 7.28486 10.2897 8.21948 10.2649C9.2207 10.2385 9.78086 11.0023 9.78086 11.9365C9.78086 13.0466 9.11789 13.7019 8.16667 13.6765ZM12.0839 13.1211C12.3306 13.1253 12.607 13.0776 12.7709 13.0174L12.8963 13.6452C12.7431 13.7149 12.4013 13.7846 11.961 13.7726C10.7402 13.7404 10.1283 12.9918 10.1283 12.022C10.1283 10.861 10.9673 10.1925 12.041 10.1643C12.4661 10.153 12.7925 10.2285 12.9405 10.2985L12.7709 10.9379C12.6019 10.8724 12.3687 10.8133 12.0783 10.818C11.4369 10.8287 10.9466 11.2102 10.9466 11.977C10.9466 12.6673 11.3632 13.1087 12.0839 13.1211Z",fill:"currentColor",stroke:"currentColor","stroke-width":"0.108732"},null,-1),D(),H("path",{d:"M17.2559 9.91342L17.4586 9.08972C17.5104 8.8896 17.5444 8.72086 17.5757 8.53367H17.5807C17.6014 8.72324 17.6325 8.8896 17.6767 9.08972L17.8589 9.91342H18.2021L18.672 8.16211H18.3472L18.1653 8.95468C18.1186 9.16761 18.0769 9.36768 18.0458 9.56006H18.0403C18.0147 9.37034 17.9781 9.17544 17.934 8.96749L17.7599 8.16211H17.4248L17.2353 8.95468C17.1856 9.17544 17.1358 9.38333 17.1077 9.5678H17.1029C17.0742 9.3937 17.0326 9.17012 16.9882 8.95725L16.822 8.16229H16.4817L16.9105 9.91358H17.2559V9.91342Z",fill:"currentColor",stroke:"currentColor","stroke-width":"0.108732"},null,-1)]))}const fPe=wt(cPe,[["render",dPe]]),pPe={},mPe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function hPe(e,t){return L(),Q("svg",mPe,t[0]||(t[0]=[H("path",{d:"M16.4441 4.85296H5.42432V3.42383H16.0018L16.4441 4.85296Z",fill:"currentColor"},null,-1),D(),H("path",{d:"M14.9926 10.82C15.3017 10.5108 15.3018 10.0094 14.9926 9.70019L12.2241 12.4686L10.0157 10.2601L12.2241 8.05161L13.0484 8.87584L11.7831 10.1412L12.343 10.7011L13.8882 9.15581C14.0429 9.0012 14.0429 8.75048 13.8882 8.59588L12.504 7.21166C12.3494 7.05705 12.0988 7.05705 11.9442 7.21166L9.17573 9.9801C9.02118 10.1347 9.02118 10.3854 9.17573 10.54L11.9442 13.3085C12.0988 13.4631 12.3494 13.4631 12.504 13.3085L14.9926 10.82Z",fill:"currentColor"},null,-1),D(),H("path",{d:"M13.6241 17.7922C13.6241 17.9878 13.5903 18.1285 13.5229 18.2146C13.4555 18.3006 13.3468 18.3436 13.1971 18.3436C13.0572 18.3436 12.9514 18.3003 12.8796 18.2137C12.8078 18.1271 12.772 17.9879 12.772 17.796V16.2031H12.035V17.8535C12.035 18.2088 12.1343 18.481 12.3329 18.6704C12.5316 18.8597 12.8159 18.9544 13.186 18.9544C13.5647 18.9544 13.8546 18.8569 14.0558 18.6621C14.2569 18.4671 14.3575 18.1921 14.3575 17.8369V16.2031H13.6241V17.7922H13.6241ZM19.1599 5.9825L16.3018 3.12429C16.2222 3.04469 16.1143 3 16.0017 3H5.42428C5.18991 3 5 3.18996 5 3.42428V20.5757C5 20.81 5.18991 21 5.42428 21H18.86C19.0943 21 19.2842 20.81 19.2842 20.5757V6.28249C19.2842 6.16998 19.2395 6.0621 19.1599 5.9825ZM16.426 4.44854L17.8356 5.85822H16.426V4.44854ZM5.84855 3.84855H15.5775V4.42914H5.84855V3.84855ZM18.4357 20.1514H5.84855V5.27769H15.5775V6.28255C15.5775 6.51686 15.7674 6.70683 16.0017 6.70683H18.4356V20.1514H18.4357ZM14.9274 16.2031V18.9173H15.9837C16.303 18.9173 16.5552 18.8464 16.7402 18.7047C16.9253 18.563 17.0177 18.369 17.0177 18.1227C17.0177 17.9568 16.98 17.8219 16.9045 17.718C16.829 17.614 16.7071 17.5398 16.5388 17.4952V17.4766C16.6662 17.4457 16.7689 17.3764 16.8469 17.2687C16.9249 17.161 16.9639 17.031 16.9639 16.8788C16.9639 16.6474 16.8745 16.4769 16.6956 16.3673C16.5168 16.2578 16.2429 16.203 15.8741 16.203L14.9274 16.2031ZM15.9188 18.351H15.6607V17.7811H15.9039C16.0202 17.7811 16.109 17.8052 16.1703 17.8535C16.2315 17.9018 16.2622 17.9711 16.2622 18.0615C16.2622 18.2545 16.1476 18.351 15.9188 18.351ZM16.212 16.9865C16.212 17.0719 16.1833 17.1362 16.1257 17.1796C16.0682 17.2229 15.9868 17.2445 15.8816 17.2445H15.6607V16.7581H15.8668C16.097 16.7581 16.212 16.8343 16.212 16.9865ZM11.3591 16.4277C11.1871 16.278 10.9296 16.2031 10.5869 16.2031H9.64748V18.9173H10.3808V18.0168H10.5869C10.9161 18.0168 11.1702 17.9342 11.3491 17.769C11.5279 17.6038 11.6173 17.3695 11.6173 17.0663C11.6172 16.7903 11.5312 16.5774 11.3591 16.4277ZM10.7772 17.3263C10.7122 17.3882 10.6246 17.4191 10.5144 17.4191H10.3807V16.7954H10.5701C10.7731 16.7954 10.8747 16.8869 10.8747 17.0701C10.8746 17.179 10.8421 17.2644 10.7772 17.3263ZM8.20126 16.7767C7.86834 16.7767 7.61214 16.8717 7.43269 17.0617C7.2532 17.2517 7.16348 17.5243 7.16348 17.8795C7.16348 18.2236 7.26032 18.4887 7.45402 18.675C7.64772 18.8613 7.91971 18.9544 8.26999 18.9544C8.43829 18.9544 8.58311 18.9433 8.70445 18.921C8.82568 18.8987 8.94329 18.8585 9.05711 18.8003V18.2786C8.93209 18.3368 8.81606 18.3779 8.70909 18.4021C8.602 18.4262 8.48468 18.4383 8.35722 18.4383C8.21732 18.4383 8.1069 18.4048 8.02583 18.338C7.94477 18.2712 7.90178 18.179 7.89685 18.0614H9.19452V17.7384C9.19452 17.4278 9.10819 17.1898 8.93554 17.0246C8.76289 16.8593 8.51811 16.7767 8.20126 16.7767ZM7.91167 17.6047C7.92157 17.4896 7.95529 17.4051 8.01288 17.3513C8.07041 17.2975 8.14186 17.2705 8.22728 17.2705C8.32011 17.2705 8.39405 17.3009 8.44909 17.3615C8.50419 17.4222 8.53293 17.5032 8.53548 17.6047H7.91167Z",fill:"currentColor"},null,-1)]))}const gPe=wt(pPe,[["render",hPe]]),vPe={},bPe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function yPe(e,t){return L(),Q("svg",bPe,t[0]||(t[0]=[H("path",{d:"M20.4198 5.07617H14.0769V7.14202H16.1753V8.5481H14.0769V9.92233H16.1538V11.3069H14.0769V12.6916H16.1538V14.0762H14.0769V15.4608H16.1538V16.8454H14.0769V18.9223H20.4198C20.739 18.9223 21 18.6516 21 18.32V5.67848C21 5.34686 20.739 5.07617 20.4198 5.07617ZM19.6154 16.8454H16.8461V15.4608H19.6154V16.8454ZM19.6154 14.0762H16.8461V12.6916H19.6154V14.0762ZM19.6154 11.3069H16.8461V9.92233H19.6154V11.3069ZM19.6154 8.53771H16.8461V7.1531H19.6154V8.53771Z",fill:"currentColor"},null,-1),D(),H("path",{d:"M3 5.00008V19.0006L13.3846 21V3L3 5.00008ZM9.56861 15.5169L8.36054 13.233C8.31485 13.1478 8.26777 12.9914 8.21862 12.7636H8.19992C8.17708 12.8709 8.12308 13.0343 8.03792 13.2531L6.82569 15.5169H4.94331L7.17808 12.0111L5.13369 8.50454H7.05554L8.058 10.6071C8.13623 10.7732 8.20615 10.9705 8.26846 11.1983H8.28785C8.32731 11.0612 8.40069 10.8577 8.508 10.587L9.62261 8.50385H11.3825L9.27992 11.9806L11.4413 15.5162L9.56861 15.5169Z",fill:"currentColor"},null,-1)]))}const _Pe=wt(vPe,[["render",yPe]]),SPe={},CPe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function wPe(e,t){return L(),Q("svg",CPe,t[0]||(t[0]=[H("path",{d:"M18.0553 7.31325C18.0543 7.23074 18.0278 7.14936 17.9714 7.08476L14.5008 3.12039C14.5001 3.11944 14.499 3.11892 14.498 3.11807C14.4773 3.0948 14.4536 3.07595 14.428 3.05915C14.4205 3.05425 14.4128 3.04967 14.4049 3.04536C14.3825 3.0332 14.3594 3.0235 14.3353 3.01624C14.3288 3.01435 14.3229 3.0115 14.316 3.0101C14.2898 3.00373 14.2626 3 14.2354 3H5.70588C5.31673 3 5 3.3166 5 3.70591V20.2941C5 20.6832 5.31673 21 5.70588 21H17.3529C17.742 21 18.0588 20.6832 18.0588 20.2941V7.35283C18.0588 7.33956 18.0567 7.32655 18.0553 7.31325ZM5.70588 3.70591H13.8824V7.31734C13.8824 7.51217 14.0403 7.67028 14.2354 7.67028H17.3529L17.3533 14.9852H5.70588V3.70591ZM8.42669 19.3173H7.71943V17.9689H6.55133V19.3173H5.83993V16.0947H6.55133V17.3331H7.71943V16.0947H8.42669V19.3173ZM11.2181 16.7068H10.3623V19.3173H9.65054V16.7068H8.80861V16.0947H11.2181V16.7068ZM14.275 19.3173L14.2285 18.0837C14.2147 17.6965 14.2006 17.2279 14.2006 16.7592H14.1868C14.0889 17.1704 13.9586 17.6295 13.8376 18.0072L13.4564 19.2646H12.9029L12.5679 18.0169C12.4655 17.6391 12.3583 17.18 12.2839 16.7592H12.2746C12.2562 17.1945 12.2418 17.6917 12.2193 18.0934L12.1631 19.3175H11.5072L11.7071 16.0948H12.6516L12.9587 17.1705C13.0566 17.5435 13.154 17.9452 13.2241 18.323H13.2379C13.3265 17.9498 13.4332 17.5247 13.5357 17.1659L13.8707 16.0949H14.7965L14.9685 19.3175L14.275 19.3173ZM17.4718 19.3173H15.513V16.0947H16.2248V18.7052H17.4716L17.4718 19.3173Z",fill:"currentColor"},null,-1),D(),H("path",{d:"M7.56641 11.1409L10.2703 12.397V11.8L8.22533 10.9044V10.8931L10.2703 9.99735V9.40039L7.56641 10.6564V11.1409Z",fill:"currentColor"},null,-1),D(),H("path",{d:"M10.6875 12.6209H11.2563L12.4616 8.53711H11.8929L10.6875 12.6209Z",fill:"currentColor"},null,-1),D(),H("path",{d:"M12.7888 9.99735L14.8789 10.8931V10.9044L12.7888 11.8V12.397L15.4924 11.1578V10.6395L12.7888 9.40039V9.99735Z",fill:"currentColor"},null,-1)]))}const EPe=wt(SPe,[["render",wPe]]),kPe={},xPe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function TPe(e,t){return L(),Q("svg",xPe,t[0]||(t[0]=[H("path",{d:"M5.25 21V3H14.25L18.75 7.5V21H5.25Z",stroke:"currentColor","stroke-miterlimit":"10"},null,-1),D(),H("path",{d:"M14.25 3V7.5H18.75",stroke:"currentColor","stroke-miterlimit":"10"},null,-1),D(),H("path",{d:"M16.5 15.75L14.25 13.5L12.75 15L10.5 12.75L7.5 15.75",stroke:"currentColor","stroke-miterlimit":"10"},null,-1),D(),H("path",{d:"M15.825 12C16.2392 12 16.575 11.6642 16.575 11.25C16.575 10.8358 16.2392 10.5 15.825 10.5C15.4107 10.5 15.075 10.8358 15.075 11.25C15.075 11.6642 15.4107 12 15.825 12Z",fill:"currentColor"},null,-1)]))}const IPe=wt(kPe,[["render",TPe]]),APe={},OPe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function RPe(e,t){return L(),Q("svg",OPe,t[0]||(t[0]=[H("path",{d:"M14.7717 15.1714C14.4765 15.1536 13.7667 15.1957 13.0558 15.3307C12.6445 14.9145 12.2884 14.3902 12.0243 13.9578C12.8708 11.5238 12.3347 10.832 11.6131 10.832C11.0464 10.832 10.7634 11.4301 10.8264 12.0908C10.8583 12.4234 11.1399 13.1223 11.4866 13.7861C11.2739 14.3455 10.8944 15.291 10.5176 15.9753C10.0766 16.1093 9.69828 16.2582 9.42681 16.3839C8.07452 17.0127 7.96586 17.8524 8.24725 18.2083C8.78151 18.8842 9.91984 18.301 11.0621 16.2582C11.844 16.0358 12.8729 15.7396 12.9656 15.7396C12.9763 15.7396 12.991 15.743 13.008 15.7485C13.578 16.2511 14.2513 16.8267 14.8054 16.9025C15.6073 17.0127 16.0637 16.4312 16.0321 16.0696C16.0007 15.7077 15.7893 15.2325 14.7717 15.1714ZM9.70978 17.3748C9.37927 17.7678 8.84472 18.1447 8.65608 18.0194C8.46718 17.8937 8.43582 17.5321 8.86065 17.123C9.2852 16.7144 9.99584 16.5022 10.1027 16.4625C10.2289 16.4155 10.2603 16.4625 10.2603 16.5255C10.2603 16.5884 10.04 16.9814 9.70978 17.3748ZM11.1569 12.0905C11.1253 11.697 11.2036 11.3198 11.5341 11.2728C11.8641 11.2253 12.0217 11.6028 11.896 12.216C11.77 12.8299 11.7068 13.2383 11.6441 13.2861C11.5812 13.3331 11.5187 13.1756 11.5187 13.1756C11.3926 12.9237 11.1882 12.4835 11.1569 12.0905ZM11.2828 15.7863C11.4555 15.5028 11.896 14.3554 11.896 14.3554C11.9903 14.5286 12.7292 15.4086 12.7292 15.4086C12.7292 15.4086 11.5969 15.6607 11.2828 15.7863ZM14.7103 16.289C14.2387 16.2269 13.4369 15.6599 13.4369 15.6599C13.327 15.6129 14.3156 15.4786 14.6952 15.5029C15.183 15.5345 15.3559 15.7391 15.3559 15.9434C15.3559 16.1479 15.183 16.352 14.7103 16.289Z",fill:"currentColor"},null,-1),D(),H("path",{d:"M18.765 6.78491L15.3077 3.32737L14.9803 3H14.5169H7.46615C5.8014 3 4.44705 4.35464 4.44705 6.01995V6.25093H4V9.86263H4.44705V17.9803C4.44705 19.6454 5.80144 21 7.46619 21H16.0727C17.738 21 19.0924 19.6454 19.0924 17.9803V7.57575V7.11253L18.765 6.78491ZM16.0727 19.8818H7.46615C6.41586 19.8818 5.5647 19.0306 5.5647 17.9803V9.86259H11.0951V6.25089H5.5647V6.01992C5.5647 4.96938 6.41586 4.1179 7.46615 4.1179H14.2493V6.2587C14.2493 7.13366 14.9592 7.84301 15.8341 7.84301H17.9747V17.9803C17.9747 19.0306 17.1232 19.8818 16.0727 19.8818ZM5.64309 8.83895V7.16713C5.64309 7.13764 5.66711 7.11355 5.69667 7.11355H6.22781C6.31535 7.11355 6.39607 7.12793 6.46817 7.15616C6.53951 7.18411 6.60219 7.22331 6.65447 7.27295C6.70724 7.32284 6.74774 7.38348 6.77516 7.45299C6.80258 7.52116 6.81671 7.59565 6.81671 7.67426C6.81671 7.75449 6.80258 7.82944 6.77488 7.89687C6.74746 7.9643 6.70696 8.0241 6.65471 8.07455C6.60272 8.12472 6.53975 8.16416 6.46765 8.19158C6.39607 8.21901 6.31535 8.23286 6.22781 8.23286H6.00366V8.83898C6.00366 8.86852 5.97964 8.89253 5.95011 8.89253H5.69671C5.66711 8.89253 5.64309 8.86848 5.64309 8.83895ZM7.2812 8.83895V7.16713C7.2812 7.13764 7.30524 7.11355 7.33477 7.11355H7.92181C8.03336 7.11355 8.13163 7.13212 8.21445 7.16868C8.29834 7.20602 8.37329 7.26536 8.43759 7.34478C8.47078 7.38658 8.49714 7.43281 8.5162 7.48245C8.53476 7.53079 8.54886 7.58307 8.558 7.63738C8.56689 7.69121 8.5721 7.74921 8.57392 7.81165C8.57551 7.87121 8.57628 7.93523 8.57628 8.00315C8.57628 8.07079 8.57551 8.13484 8.57392 8.1944C8.5721 8.25659 8.56689 8.31484 8.558 8.36891C8.54886 8.42326 8.53476 8.47526 8.5162 8.52356C8.49686 8.57373 8.4705 8.62 8.4378 8.66099C8.37304 8.74122 8.29802 8.80052 8.21442 8.83733C8.13236 8.87389 8.03389 8.89246 7.92178 8.89246H7.33474C7.30521 8.89253 7.2812 8.86848 7.2812 8.83895ZM10.0791 7.85089C10.1086 7.85089 10.1326 7.87493 10.1326 7.90446V8.13228C10.1326 8.16181 10.1086 8.18585 10.0791 8.18585H9.43768V8.83902C9.43768 8.86855 9.41363 8.89256 9.3841 8.89256H9.13066C9.10113 8.89256 9.07712 8.86855 9.07712 8.83902V7.1672C9.07712 7.13771 9.10113 7.11363 9.13066 7.11363H10.1028C10.1323 7.11363 10.1564 7.13767 10.1564 7.1672V7.39502C10.1564 7.42455 10.1324 7.44859 10.1028 7.44859H9.43768V7.85092L10.0791 7.85089Z",fill:"currentColor"},null,-1),D(),H("path",{d:"M6.39295 7.84191C6.43556 7.80352 6.45616 7.74893 6.45616 7.67496C6.45616 7.60127 6.43552 7.54667 6.39295 7.50828C6.34854 7.46855 6.29001 7.44922 6.21372 7.44922H6.00366V7.90091H6.21372C6.28997 7.90094 6.34854 7.88164 6.39295 7.84191Z",fill:"currentColor"},null,-1),D(),H("path",{d:"M8.03553 8.53558C8.07525 8.52067 8.10946 8.49666 8.14004 8.46217C8.17323 8.42508 8.19411 8.37178 8.20224 8.30358C8.21138 8.22596 8.21581 8.1246 8.21581 8.00233C8.21581 7.87981 8.21138 7.77842 8.20224 7.70107C8.19411 7.63266 8.17323 7.57936 8.14029 7.54252C8.10974 7.508 8.07444 7.48349 8.03581 7.46908C7.99425 7.45315 7.94672 7.44531 7.8937 7.44531H7.64185V8.55906H7.8937C7.94644 8.5591 7.99425 8.55126 8.03553 8.53558Z",fill:"currentColor"},null,-1)]))}const DPe=wt(APe,[["render",RPe]]),LPe={},PPe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function MPe(e,t){return L(),Q("svg",PPe,t[0]||(t[0]=[rc('<path d="M13.902 1.74072V3.88797C16.452 3.90222 19.4198 3.86172 21.9675 3.89997C22.449 3.89997 22.47 4.32597 22.476 4.69797C22.5165 9.15447 22.4662 13.7392 22.5 18.198C22.491 18.3735 22.4955 19.023 22.4902 19.2075C22.4737 19.8247 22.1647 19.8517 21.5475 19.8705C21.4485 19.8705 21.1575 19.875 21.0615 19.8795C18.6758 19.8675 16.29 19.8727 13.902 19.8727V22.2592L1.5 20.3505C1.5 14.7835 1.5 9.21822 1.5 3.65472L13.902 1.74072Z" fill="currentColor"></path> <path d="M13.902 4.60352H21.777V19.1535H13.902V17.25H19.6275V16.2938H13.902V15.1013H19.6275V14.1473H13.9042C13.9042 13.6793 13.9042 13.212 13.8997 12.7448C14.3682 12.9138 14.8684 12.9762 15.364 12.9276C15.8596 12.8789 16.3381 12.7204 16.7647 12.4635C17.1996 12.1778 17.5598 11.7922 17.8154 11.339C18.071 10.8857 18.2145 10.378 18.234 9.85802C17.184 9.85052 16.1392 9.85352 15.0945 9.85352C15.0945 8.81552 15.1065 7.77827 15.0727 6.74252C14.6812 6.81752 14.2905 6.90002 13.9012 6.98327V4.60427" fill="white"></path> <path d="M15.5745 6.24298C16.388 6.29396 17.1552 6.63919 17.7329 7.21426C18.3106 7.78933 18.6593 8.55494 18.714 9.36823C17.664 9.38023 16.6193 9.37573 15.5723 9.37573C15.5723 8.33098 15.5723 7.28548 15.5723 6.24298" fill="currentColor"></path> <path d="M5.32501 8.04449C6.62026 8.10674 8.19002 7.53149 9.26402 8.50274C10.2923 9.75074 10.02 12.0457 8.49602 12.792C7.94189 13.0114 7.34117 13.0868 6.75001 13.011C6.75001 13.944 6.74551 14.877 6.75001 15.8092C6.27751 15.7687 5.80276 15.7282 5.33026 15.69C5.30851 13.14 5.30401 10.59 5.33026 8.03999" fill="white"></path> <path d="M6.74476 9.3345C7.21501 9.31275 7.79476 9.22725 8.11426 9.66825C8.242 9.90839 8.31136 10.1753 8.3167 10.4472C8.32204 10.7192 8.26322 10.9885 8.14501 11.2335C7.87276 11.7248 7.25776 11.6775 6.78301 11.7345C6.73276 10.935 6.73801 10.1363 6.74476 9.3345Z" fill="currentColor"></path>',9)]))}const NPe=wt(LPe,[["render",MPe]]),FPe={},$Pe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function BPe(e,t){return L(),Q("svg",$Pe,t[0]||(t[0]=[rc('<path d="M19.9579 16.0421V0H7.80095L2.52634 5.27466V24H19.5789V23.2421H3.28421V5.81053H8.33682V0.757875H19.2V16.0421H19.9579V16.0421ZM7.57895 5.05261H3.82009L7.57895 1.29375V5.05261Z" fill="currentColor"></path> <path d="M17.5579 7.07367H4.92633V7.83154H17.5579V7.07367Z" fill="currentColor"></path> <path d="M14.2737 2.02106H13.5158V2.77893H14.2737V2.02106Z" fill="currentColor"></path> <path d="M17.3052 2.02106H16.5473V2.77893H17.3052V2.02106Z" fill="currentColor"></path> <path d="M15.7895 2.02106H15.0316V2.77893H15.7895V2.02106Z" fill="currentColor"></path> <path d="M14.2737 3.53687H13.5158V4.29474H14.2737V3.53687Z" fill="currentColor"></path> <path d="M15.7895 3.53687H15.0316V4.29474H15.7895V3.53687Z" fill="currentColor"></path> <path d="M12.7579 3.53687H12V4.29474H12.7579V3.53687Z" fill="currentColor"></path> <path d="M17.3052 3.53687H16.5473V4.29474H17.3052V3.53687Z" fill="currentColor"></path> <path d="M12.7579 5.05261H12V5.81049H12.7579V5.05261Z" fill="currentColor"></path> <path d="M15.7895 5.05261H15.0316V5.81049H15.7895V5.05261Z" fill="currentColor"></path> <path d="M11.2421 5.05261H10.4842V5.81049H11.2421V5.05261Z" fill="currentColor"></path> <path d="M17.3052 5.05261H16.5473V5.81049H17.3052V5.05261Z" fill="currentColor"></path> <path d="M14.2737 5.05261H13.5158V5.81049H14.2737V5.05261Z" fill="currentColor"></path> <path d="M17.5579 8.96838H4.92633V9.72626H17.5579V8.96838Z" fill="currentColor"></path> <path d="M17.5579 10.8632H4.92633V11.621H17.5579V10.8632Z" fill="currentColor"></path> <path d="M17.5579 12.7579H4.92633V13.5157H17.5579V12.7579Z" fill="currentColor"></path> <path d="M11.2421 14.6526H4.92633V15.4105H11.2421V14.6526Z" fill="currentColor"></path> <path d="M9.32817 16.5783L11.0549 19.6211L9.30276 22.4842H21.4737V16.5783H9.32817ZM20.7158 21.7263H10.6552L11.9346 19.6357L10.6297 17.3363H20.7157V21.7263H20.7158Z" fill="currentColor"></path> <path d="M13.0469 18.1585V18.646H13.7927V20.8087H14.4075V18.646H15.1532V18.1585H13.0469Z" fill="currentColor"></path> <path d="M16.9121 19.419L17.7434 18.1585H17.1541C17.1019 18.1585 17.0606 18.184 17.0304 18.2349L16.5684 19.028C16.5587 19.0438 16.5498 19.0589 16.542 19.0735C16.5341 19.088 16.5271 19.1032 16.5211 19.1189L15.9936 18.2258C15.9791 18.2016 15.9624 18.1843 15.9436 18.174C15.9248 18.1637 15.8954 18.1585 15.8554 18.1585H15.2406L16.0609 19.4463L15.2079 20.8087H15.7826C15.819 20.8087 15.8493 20.7987 15.8736 20.7787C15.8978 20.7587 15.9172 20.7359 15.9318 20.7105L16.4266 19.8519C16.4387 19.8325 16.4495 19.8095 16.4592 19.7828L16.9904 20.7104C17.0049 20.7371 17.0246 20.7602 17.0495 20.7796C17.0743 20.799 17.1068 20.8087 17.1468 20.8087H17.7617L16.9121 19.419Z" fill="currentColor"></path> <path d="M17.8162 18.1585V18.646H18.5619V20.8087H19.1768V18.646H19.9225V18.1585H17.8162Z" fill="currentColor"></path>',43)]))}const VPe=wt(FPe,[["render",BPe]]),HPe={},UPe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function zPe(e,t){return L(),Q("svg",UPe,t[0]||(t[0]=[H("path",{d:"M18.47 7.73249C18.4513 7.68749 18.425 7.64625 18.3875 7.6125L13.8875 3.1125C13.82 3.04124 13.7225 3 13.625 3H5.37501C5.16875 3 5 3.16875 5 3.37501V20.625C5 20.8313 5.16875 21 5.37501 21H18.125C18.3313 21 18.5 20.8313 18.5 20.625V7.87501C18.5 7.82625 18.4888 7.77749 18.47 7.73249ZM14 4.27874L17.2213 7.5H14V4.27874ZM17.75 20.25H5.74999V3.74999H13.25V7.87498C13.25 8.08124 13.4187 8.24999 13.625 8.24999H17.75V20.25H17.75Z",fill:"currentColor",stroke:"currentColor","stroke-width":"0.125"},null,-1),D(),H("path",{d:"M8.91875 9.06634C8.81001 9.1376 8.75 9.25759 8.75 9.38134V16.8588C8.75 16.9976 8.82126 17.1288 8.94125 17.1963C9.065 17.2638 9.21125 17.2563 9.31999 17.1851L15.3125 13.4426C15.4887 13.3339 15.5412 13.1013 15.4325 12.9289C15.4025 12.8764 15.3612 12.8351 15.3125 12.8051L9.33124 9.06634C9.20373 8.98759 9.0425 8.98383 8.91875 9.06634ZM9.49999 10.0488L14.4162 13.1238L9.49999 16.1988V10.0488Z",fill:"currentColor",stroke:"currentColor","stroke-width":"0.125"},null,-1)]))}const WPe=wt(HPe,[["render",zPe]]),jPe={},ZPe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function qPe(e,t){return L(),Q("svg",ZPe,t[0]||(t[0]=[rc('<path d="M18 7.25H14.25C14.1837 7.25 14.1201 7.22366 14.0732 7.17678C14.0263 7.12989 14 7.0663 14 7V3.25C14 3.1837 14.0263 3.12011 14.0732 3.07322C14.1201 3.02634 14.1837 3 14.25 3C14.3163 3 14.3799 3.02634 14.4268 3.07322C14.4737 3.12011 14.5 3.1837 14.5 3.25V6.75H18C18.0663 6.75 18.1299 6.77634 18.1768 6.82322C18.2237 6.87011 18.25 6.9337 18.25 7C18.25 7.0663 18.2237 7.12989 18.1768 7.17678C18.1299 7.22366 18.0663 7.25 18 7.25Z" fill="currentColor" stroke="currentColor" stroke-width="0.16"></path> <path d="M18 9.7415C17.9337 9.7415 17.8701 9.71516 17.8232 9.66828C17.7763 9.62139 17.75 9.5578 17.75 9.4915V7.1035L14.1465 3.5H6.75C6.48478 3.5 6.23043 3.60536 6.04289 3.79289C5.85536 3.98043 5.75 4.23478 5.75 4.5V9.4085C5.75 9.4748 5.72366 9.53839 5.67678 9.58528C5.62989 9.63216 5.5663 9.6585 5.5 9.6585C5.4337 9.6585 5.37011 9.63216 5.32322 9.58528C5.27634 9.53839 5.25 9.4748 5.25 9.4085V4.5C5.25 4.10218 5.40804 3.72064 5.68934 3.43934C5.97064 3.15804 6.35218 3 6.75 3H14.25C14.2829 2.99994 14.3154 3.00636 14.3458 3.01888C14.3761 3.03141 14.4037 3.0498 14.427 3.073L18.177 6.823C18.2002 6.84626 18.2186 6.87386 18.2311 6.90423C18.2436 6.93461 18.2501 6.96715 18.25 7V9.4915C18.25 9.52433 18.2435 9.55684 18.231 9.58717C18.2184 9.6175 18.2 9.64506 18.1768 9.66828C18.1536 9.69149 18.126 9.70991 18.0957 9.72247C18.0653 9.73503 18.0328 9.7415 18 9.7415Z" fill="currentColor" stroke="currentColor" stroke-width="0.16"></path> <path d="M16.75 21H6.75C6.35218 21 5.97064 20.842 5.68934 20.5607C5.40804 20.2794 5.25 19.8978 5.25 19.5V15.75C5.25 15.6837 5.27634 15.6201 5.32322 15.5732C5.37011 15.5263 5.4337 15.5 5.5 15.5C5.5663 15.5 5.62989 15.5263 5.67678 15.5732C5.72366 15.6201 5.75 15.6837 5.75 15.75V19.5C5.75 19.7652 5.85536 20.0196 6.04289 20.2071C6.23043 20.3946 6.48478 20.5 6.75 20.5H16.75C17.0152 20.5 17.2696 20.3946 17.4571 20.2071C17.6446 20.0196 17.75 19.7652 17.75 19.5V15.75C17.75 15.6837 17.7763 15.6201 17.8232 15.5732C17.8701 15.5263 17.9337 15.5 18 15.5C18.0663 15.5 18.1299 15.5263 18.1768 15.5732C18.2237 15.6201 18.25 15.6837 18.25 15.75V19.5C18.25 19.8978 18.092 20.2794 17.8107 20.5607C17.5294 20.842 17.1478 21 16.75 21Z" fill="currentColor" stroke="currentColor" stroke-width="0.16"></path> <path d="M15.5 16H8C7.9337 16 7.87011 15.9737 7.82322 15.9268C7.77634 15.8799 7.75 15.8163 7.75 15.75C7.75 15.6837 7.77634 15.6201 7.82322 15.5732C7.87011 15.5263 7.9337 15.5 8 15.5H15.5C15.5663 15.5 15.6299 15.5263 15.6768 15.5732C15.7237 15.6201 15.75 15.6837 15.75 15.75C15.75 15.8163 15.7237 15.8799 15.6768 15.9268C15.6299 15.9737 15.5663 16 15.5 16Z" fill="currentColor" stroke="currentColor" stroke-width="0.16"></path> <path d="M11.75 18.5H8C7.9337 18.5 7.87011 18.4737 7.82322 18.4268C7.77634 18.3799 7.75 18.3163 7.75 18.25C7.75 18.1837 7.77634 18.1201 7.82322 18.0732C7.87011 18.0263 7.9337 18 8 18H11.75C11.8163 18 11.8799 18.0263 11.9268 18.0732C11.9737 18.1201 12 18.1837 12 18.25C12 18.3163 11.9737 18.3799 11.9268 18.4268C11.8799 18.4737 11.8163 18.5 11.75 18.5Z" fill="currentColor" stroke="currentColor" stroke-width="0.16"></path> <path d="M18 15.9997H5.5C5.10218 15.9997 4.72064 15.8417 4.43934 15.5604C4.15804 15.2791 4 14.8975 4 14.4997V10.6582C4 10.2604 4.15804 9.87885 4.43934 9.59754C4.72064 9.31624 5.10218 9.1582 5.5 9.1582H5.51L18.01 9.2412C18.4058 9.24488 18.7842 9.4044 19.0632 9.68518C19.3422 9.96596 19.4993 10.3454 19.5005 10.7412V14.4997C19.5005 14.6967 19.4617 14.8918 19.3863 15.0738C19.3109 15.2559 19.2003 15.4212 19.061 15.5605C18.9216 15.6998 18.7562 15.8103 18.5742 15.8857C18.3921 15.961 18.197 15.9998 18 15.9997ZM5.5 9.6582C5.23478 9.6582 4.98043 9.76356 4.79289 9.9511C4.60536 10.1386 4.5 10.393 4.5 10.6582V14.4997C4.5 14.7649 4.60536 15.0193 4.79289 15.2068C4.98043 15.3943 5.23478 15.4997 5.5 15.4997H18C18.2652 15.4997 18.5196 15.3943 18.7071 15.2068C18.8946 15.0193 19 14.7649 19 14.4997V10.7412C18.9992 10.4773 18.8944 10.2243 18.7084 10.0371C18.5223 9.84988 18.2699 9.74357 18.006 9.7412L5.506 9.6582H5.5Z" fill="currentColor" stroke="currentColor" stroke-width="0.16"></path> <path d="M11.004 13.3868V13.8008H9.03296V13.4218L10.4 11.5158H9.12896V11.1348H10.965V11.5158L9.61496 13.3868H11.004Z" fill="currentColor" stroke="currentColor" stroke-width="0.16"></path> <path d="M11.8575 13.8008H11.377V11.1348H11.8575V13.8008Z" fill="currentColor" stroke="currentColor" stroke-width="0.16"></path> <path d="M12.9241 13.8008H12.4436V11.1348H13.5351C13.8464 11.1348 14.0773 11.2133 14.2276 11.3703C14.3756 11.5258 14.4566 11.7332 14.4532 11.9478C14.4497 12.1624 14.362 12.3671 14.2091 12.5178C14.0402 12.6711 13.8181 12.7524 13.5901 12.7443H12.9241V13.8008ZM12.9241 12.3323H13.4926C13.6409 12.3323 13.7543 12.2958 13.8326 12.2228C13.8717 12.1854 13.9024 12.1401 13.9226 12.0899C13.9428 12.0397 13.952 11.9858 13.9496 11.9318C13.9514 11.8275 13.9125 11.7267 13.8411 11.6508C13.7688 11.5728 13.6383 11.5338 13.4496 11.5338H12.9241V12.3323Z" fill="currentColor" stroke="currentColor" stroke-width="0.16"></path>',17)]))}const GPe=wt(jPe,[["render",qPe]]),KPe={},YPe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function XPe(e,t){return L(),Q("svg",YPe,t[0]||(t[0]=[H("path",{d:"M3 4.6C3 4.03995 3 3.75992 3.10899 3.54601C3.20487 3.35785 3.35785 3.20487 3.54601 3.10899C3.75992 3 4.03995 3 4.6 3H19.4C19.9601 3 20.2401 3 20.454 3.10899C20.6422 3.20487 20.7951 3.35785 20.891 3.54601C21 3.75992 21 4.03995 21 4.6V6.33726C21 6.58185 21 6.70414 20.9724 6.81923C20.9479 6.92127 20.9075 7.01881 20.8526 7.10828C20.7908 7.2092 20.7043 7.29568 20.5314 7.46863L14.4686 13.5314C14.2957 13.7043 14.2092 13.7908 14.1474 13.8917C14.0925 13.9812 14.0521 14.0787 14.0276 14.1808C14 14.2959 14 14.4182 14 14.6627V17L10 21V14.6627C10 14.4182 10 14.2959 9.97237 14.1808C9.94787 14.0787 9.90747 13.9812 9.85264 13.8917C9.7908 13.7908 9.70432 13.7043 9.53137 13.5314L3.46863 7.46863C3.29568 7.29568 3.2092 7.2092 3.14736 7.10828C3.09253 7.01881 3.05213 6.92127 3.02763 6.81923C3 6.70414 3 6.58185 3 6.33726V4.6Z",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const JPe=wt(KPe,[["render",XPe]]),QPe={},eMe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function tMe(e,t){return L(),Q("svg",eMe,t[0]||(t[0]=[H("g",{"clip-path":"url(#clip0_338_70)"},[H("path",{d:"M12 0C5.916 0 0.892875 4.52887 0.1095 10.3984C0.10875 10.4044 0.108 10.41 0.10725 10.416C0.08625 10.5739 0.0675 10.7321 0.0525 10.8919C0.045375 10.9657 0.041625 11.0404 0.035625 11.1146C0.02775 11.2196 0.019125 11.3246 0.013875 11.4304C0.00525 11.6186 0 11.8088 0 12C0 18.6274 5.37262 24 12 24C18.6274 24 24 18.6274 24 12C24 5.37262 18.6274 0 12 0ZM12.5107 21.9382C12.2407 22.2334 11.7979 22.4685 11.5076 22.1895C11.2627 21.948 11.4705 21.6495 11.5076 21.3071C11.5545 20.9077 11.3719 20.4277 11.7574 20.3036C12.0712 20.2065 12.3079 20.4244 12.5107 20.6831C12.8201 21.0656 12.8396 21.5723 12.5107 21.9382ZM16.2922 18.7013C15.8497 18.9292 15.54 18.8865 15.0461 18.9536C14.1259 19.0695 13.3984 19.5236 12.6713 18.9536C12.3461 18.693 12.3045 18.4095 12.0525 18.0758C11.646 17.5642 11.5444 16.6211 10.9237 16.83C10.527 16.9635 10.539 17.3606 10.3035 17.7056C9.99975 18.1391 10.0759 18.753 9.55163 18.828C9.18638 18.8797 8.9895 18.6562 8.68125 18.453C8.3355 18.2227 8.26725 17.9475 7.9305 17.7056C7.58025 17.4473 7.29675 17.4457 6.93525 17.2054C6.675 17.0317 6.6195 16.7164 6.30787 16.7051C6.02625 16.6969 5.8245 16.8349 5.68388 17.0786C5.421 17.5339 5.33063 18.876 4.56337 18.828C3.99487 18.7894 2.77912 17.5121 2.31563 17.2054C2.16375 17.103 2.02313 16.9988 1.88138 16.9193C1.1955 15.5107 0.79725 13.9373 0.7575 12.2749C0.98775 12.0818 1.22213 11.9865 1.43963 11.715C1.78725 11.2913 1.62 10.7749 2.067 10.4644C2.39925 10.2379 2.66775 10.2743 3.06787 10.2176C3.64125 10.1344 4.002 10.0594 4.56337 10.2176C5.1105 10.371 5.31938 10.6849 5.81063 10.9646C6.34125 11.2684 6.58013 11.6269 7.18313 11.715C7.62038 11.7769 7.92037 11.3771 8.30363 11.5886C8.61263 11.7604 8.83087 11.9884 8.8065 12.339C8.769 12.7957 7.86075 12.5055 7.80938 12.9623C7.74075 13.5465 8.75138 12.8895 9.30637 13.086C9.67163 13.2191 10.1468 13.1962 10.1783 13.5863C10.2086 14.0197 9.57525 13.9001 9.18188 14.0869C8.74613 14.2897 8.51775 14.4604 8.05538 14.5853C7.6335 14.697 7.18837 14.3497 6.93525 14.7086C6.7365 14.9869 6.80662 15.267 6.93525 15.5842C7.23037 16.3084 8.19112 16.0912 8.931 15.8306C9.44963 15.6476 9.54638 15.1834 10.0549 14.9573C10.5941 14.7169 11.0126 14.4566 11.5478 14.7086C11.9895 14.9171 11.8661 15.4774 12.3 15.7073C12.7699 15.9578 13.212 15.4339 13.6736 15.7073C14.0325 15.9206 14.0063 16.2776 14.2943 16.5799C14.6295 16.9331 14.823 17.2181 15.2948 17.3299C15.777 17.442 16.0717 16.9282 16.5424 17.0783C16.9042 17.1964 17.2005 17.3333 17.2875 17.7052C17.4244 18.2378 16.779 18.4492 16.2922 18.7013ZM17.1896 12.6904C16.7569 13.1254 16.3811 13.2675 15.7755 13.4003C15.2381 13.5184 14.4844 13.9395 14.361 13.4003C14.2669 12.9698 14.7469 12.816 15.0709 12.5156C15.4305 12.18 15.7661 12.147 16.1306 11.8061C16.4569 11.5054 16.4141 11.0445 16.8405 10.9215C17.2564 10.8015 17.6588 10.9144 17.8999 11.2766C18.2445 11.7892 17.6273 12.2554 17.1896 12.6904ZM22.4959 10.9946C22.3114 11.1851 22.3226 11.3861 22.134 11.5729C21.9251 11.775 21.6349 11.688 21.4823 11.9359C21.348 12.1523 21.4335 12.3322 21.4095 12.5865C21.3941 12.7316 20.688 13.0575 20.5421 12.7309C20.4619 12.5505 20.6475 12.3907 20.5421 12.2235C20.4435 12.0731 20.334 12.1504 20.205 12.2914C20.0704 12.4369 19.9155 12.6506 19.7471 12.7309C19.5263 12.8333 19.6736 11.8871 19.599 11.5729C19.5443 11.3243 19.6028 11.1679 19.6733 10.9219C19.767 10.5806 20.025 10.4696 20.1064 10.125C20.1791 9.82275 20.1187 9.63938 20.1064 9.32888C20.0918 8.98913 20.1007 8.79375 20.0359 8.46112C19.9639 8.10975 19.9414 7.88925 19.7467 7.59262C19.59 7.35862 19.4865 7.21725 19.239 7.08563C19.179 7.05263 19.1228 7.03088 19.0695 7.014C18.942 6.97163 18.8224 6.966 18.6578 6.94162C18.3248 6.89212 18.087 7.10362 17.79 6.94162C17.6167 6.846 17.5627 6.726 17.43 6.579C17.2785 6.41625 17.2384 6.28312 17.0674 6.14475C16.9395 6.04125 16.8604 5.98088 16.7055 5.92688C16.4093 5.82825 16.2022 5.89612 15.9083 6.00037C15.6195 6.10087 15.5115 6.2655 15.2561 6.4335C15.0604 6.54712 14.9212 6.57263 14.7506 6.72375C14.6471 6.8145 14.1544 7.16512 13.953 7.15687C13.749 7.149 13.6339 7.02825 13.4513 7.01362C13.4269 7.01062 13.4025 7.01062 13.3748 7.01362C13.3748 7.01362 13.3748 7.01362 13.3729 7.01362C13.1955 7.02712 13.1119 7.1145 12.9431 7.15687C12.528 7.26037 12.2636 7.11375 11.8538 7.23075C11.5868 7.30575 11.4814 7.518 11.205 7.51987C10.8896 7.52175 10.7831 7.24125 10.4805 7.15687C10.3147 7.11262 10.2172 7.1085 10.0466 7.08563C9.76575 7.04513 9.60487 7.041 9.32438 7.014H9.3225C9.3165 7.01625 9.10087 7.03575 9.0645 7.014C8.90625 6.90675 8.79375 6.81862 8.598 6.72412C8.38237 6.618 8.25338 6.56362 8.01788 6.50513L8.02763 6.36225C8.02763 6.36225 8.02763 6.04462 7.98225 5.90963C7.93912 5.77425 7.89225 5.77425 7.98225 5.50238C8.07525 5.23163 8.23688 5.05912 8.23688 5.05912C8.34825 4.97363 8.43038 4.94475 8.52525 4.84163C8.7165 4.6395 8.79412 4.46737 8.8155 4.1895C8.84062 3.825 8.36362 3.67687 8.45175 3.321C8.53012 3.01125 8.79075 2.9535 9.03187 2.74238C9.324 2.49113 9.58237 2.45812 9.82687 2.16412C10.0147 1.94175 10.1685 1.80225 10.1906 1.51237C10.2105 1.266 10.1044 1.11187 9.97688 0.935625C10.6335 0.815625 11.3089 0.75 12 0.75C17.5946 0.75 22.2337 4.83488 23.1019 10.1842C23.0257 10.3163 23.1015 10.4827 23.0006 10.6316C22.8671 10.8352 22.6635 10.8188 22.4959 10.9946Z",fill:"currentColor"})],-1),D(),H("defs",null,[H("clipPath",{id:"clip0_338_70"},[H("rect",{width:"24",height:"24",fill:"white"})])],-1)]))}const nMe=wt(QPe,[["render",tMe]]),sMe={},oMe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function rMe(e,t){return L(),Q("svg",oMe,t[0]||(t[0]=[H("path",{d:"M23.3389 10.1113L19.9711 4.95638C19.4618 4.17713 18.5935 3.70697 17.6629 3.70697H6.33783C5.40647 3.70697 4.5382 4.17713 4.02886 4.95638L0.661078 10.1113C0.230062 10.7714 0 11.5426 0 12.3308V17.622C0 18.3569 0.300047 19.0297 0.782344 19.5106C1.26323 19.9929 1.93612 20.2933 2.67136 20.293H21.3286C22.804 20.2923 23.9993 19.0976 24 17.622V12.3308C24 11.5426 23.7699 10.7714 23.3389 10.1113ZM1.941 10.9474L5.30878 5.79244C5.53538 5.44491 5.9227 5.23566 6.33783 5.23566H17.6629C18.0773 5.23566 18.4647 5.44491 18.6912 5.79244L22.0597 10.9474C22.1477 11.0822 22.217 11.2267 22.2773 11.3743H1.7227C1.78298 11.2266 1.85227 11.0821 1.941 10.9474ZM22.4713 17.622C22.4707 17.94 22.3445 18.2207 22.1366 18.4296C21.9273 18.6378 21.6467 18.764 21.3286 18.7643H2.67136C2.35327 18.764 2.07262 18.6378 1.86333 18.4296C1.65544 18.2207 1.5293 17.94 1.52864 17.622V12.3308C1.52864 12.3177 1.53141 12.3045 1.53141 12.2914H22.4685C22.4685 12.3045 22.4713 12.3177 22.4713 12.3308V17.622H22.4713Z",fill:"currentColor"},null,-1),D(),H("path",{d:"M14.293 16.5964C14.8418 16.5964 15.2867 16.1515 15.2867 15.6027C15.2867 15.0538 14.8418 14.6089 14.293 14.6089C13.7442 14.6089 13.2993 15.0538 13.2993 15.6027C13.2993 16.1515 13.7442 16.5964 14.293 16.5964Z",fill:"currentColor"},null,-1),D(),H("path",{d:"M18.6496 16.5964C19.1985 16.5964 19.6434 16.1515 19.6434 15.6027C19.6434 15.0538 19.1985 14.6089 18.6496 14.6089C18.1008 14.6089 17.6559 15.0538 17.6559 15.6027C17.6559 16.1515 18.1008 16.5964 18.6496 16.5964Z",fill:"currentColor"},null,-1)]))}const iMe=wt(sMe,[["render",rMe]]),aMe={},lMe={viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function cMe(e,t){return L(),Q("svg",lMe,t[0]||(t[0]=[rc('<g clip-path="url(#clip0_3415_5808)"><rect x="1.5" y="1.5" width="15" height="15" rx="7.5" stroke="currentColor"></rect> <path d="M10.1556 6.49536C10.8447 6.49536 11.4033 5.93675 11.4033 5.24768C11.4033 4.5586 10.8447 4 10.1556 4C9.46656 4 8.90796 4.5586 8.90796 5.24768C8.90796 5.93675 9.46656 6.49536 10.1556 6.49536Z" fill="currentColor"></path> <path d="M11.4315 11.5578C11.397 11.5346 11.3583 11.5185 11.3175 11.5105C11.2767 11.5025 11.2348 11.5027 11.1941 11.5111C11.1534 11.5196 11.1148 11.536 11.0806 11.5596C11.0464 11.5831 11.0172 11.6133 10.9948 11.6482C10.6932 12.0948 10.3239 12.4915 9.89995 12.8242C9.79702 12.9021 9.41335 13.1985 9.25116 13.1361C9.13887 13.1018 9.20437 12.8803 9.2262 12.7867L9.39152 12.297C9.46014 12.0974 10.6548 8.55399 10.7858 8.14849C10.9792 7.55585 10.895 6.97256 10.0122 7.11292C9.77206 7.13787 7.33597 7.45291 7.2923 7.45603C7.25134 7.45869 7.2113 7.4694 7.17448 7.48753C7.13765 7.50567 7.10476 7.53088 7.07768 7.56173C7.0506 7.59257 7.02986 7.62845 7.01664 7.66732C7.00343 7.70618 6.998 7.74726 7.00066 7.78823C7.00332 7.82919 7.01403 7.86922 7.03216 7.90605C7.0503 7.94287 7.07551 7.97577 7.10635 8.00285C7.1372 8.02993 7.17308 8.05067 7.21194 8.06389C7.25081 8.0771 7.29189 8.08253 7.33285 8.07987C7.33285 8.07987 8.26861 7.95822 8.37154 7.94886C8.42427 7.94372 8.47736 7.95394 8.5244 7.97829C8.57145 8.00264 8.61044 8.04009 8.63668 8.08611C8.69319 8.26082 8.68545 8.44998 8.61484 8.61949C8.53374 8.93141 7.25175 12.5434 7.2112 12.7524C7.16771 12.9273 7.17979 13.1114 7.24575 13.2791C7.31171 13.4468 7.42829 13.5898 7.57927 13.6882C7.86265 13.8771 8.20007 13.968 8.53998 13.9471C8.87048 13.943 9.19734 13.8775 9.50381 13.7537C10.2805 13.4418 11.0915 12.6121 11.5188 11.9601C11.5556 11.8939 11.567 11.8165 11.551 11.7425C11.5349 11.6685 11.4924 11.6028 11.4315 11.5578Z" fill="currentColor"></path></g> <defs><clipPath id="clip0_3415_5808"><rect width="18" height="18" fill="white"></rect></clipPath></defs>',3)]))}const uMe=wt(aMe,[["render",cMe]]),dMe={},fMe={viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function pMe(e,t){return L(),Q("svg",fMe,t[0]||(t[0]=[rc('<g clip-path="url(#clip0_757_38)"><path d="M18.4444 8.88894C20.4081 8.88894 22 7.29707 22 5.33339C22 3.36971 20.4081 1.77783 18.4444 1.77783C16.4808 1.77783 14.8889 3.36971 14.8889 5.33339C14.8889 7.29707 16.4808 8.88894 18.4444 8.88894Z" fill="currentColor"></path> <path d="M22.08 23.3156C21.9818 23.2495 21.8713 23.2037 21.7552 23.1809C21.639 23.1581 21.5195 23.1587 21.4035 23.1827C21.2876 23.2067 21.1777 23.2537 21.0801 23.3208C20.9826 23.3878 20.8994 23.4737 20.8355 23.5734C19.9762 24.846 18.9236 25.9766 17.7155 26.9245C17.4222 27.1467 16.3289 27.9912 15.8667 27.8134C15.5467 27.7156 15.7333 27.0845 15.7955 26.8178L16.2667 25.4223C16.4622 24.8534 19.8667 14.7556 20.24 13.6001C20.7911 11.9112 20.5511 10.2489 18.0355 10.6489C17.3511 10.7201 10.4089 11.6178 10.2844 11.6267C10.1677 11.6343 10.0536 11.6648 9.94867 11.7165C9.84373 11.7682 9.74999 11.84 9.67282 11.9279C9.59564 12.0158 9.53654 12.1181 9.49887 12.2288C9.46121 12.3396 9.44573 12.4567 9.45332 12.5734C9.46091 12.6901 9.49142 12.8042 9.5431 12.9091C9.59478 13.0141 9.66662 13.1078 9.75453 13.185C9.84243 13.2622 9.94468 13.3213 10.0554 13.3589C10.1662 13.3966 10.2833 13.4121 10.4 13.4045C10.4 13.4045 13.0667 13.0578 13.36 13.0312C13.5102 13.0165 13.6615 13.0456 13.7956 13.115C13.9297 13.1844 14.0408 13.2911 14.1155 13.4223C14.2766 13.9202 14.2545 14.4592 14.0533 14.9423C13.8222 15.8312 10.1689 26.1245 10.0533 26.72C9.92938 27.2184 9.96379 27.743 10.1518 28.2209C10.3398 28.6989 10.672 29.1063 11.1022 29.3867C11.9098 29.925 12.8713 30.1841 13.84 30.1245C14.7818 30.113 15.7133 29.9261 16.5867 29.5734C18.8 28.6845 21.1111 26.3201 22.3289 24.4623C22.4337 24.2735 22.4663 24.0531 22.4205 23.842C22.3747 23.631 22.2537 23.4439 22.08 23.3156Z" fill="currentColor"></path></g> <defs><clipPath id="clip0_757_38"><rect width="32" height="32" fill="white"></rect></clipPath></defs>',3)]))}const mMe=wt(dMe,[["render",pMe]]),hMe={},gMe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function vMe(e,t){return L(),Q("svg",gMe,t[0]||(t[0]=[rc('<rect width="24" height="24"></rect> <g clip-path="url(#clip0_7755_18920)"><path d="M11.9999 7.46094C11.8525 7.46094 11.7112 7.51947 11.6071 7.62366C11.5029 7.72784 11.4443 7.86915 11.4443 8.01649V12.8609L14.7221 15.0832C14.8451 15.1613 14.9939 15.188 15.1365 15.1574C15.279 15.1269 15.4038 15.0415 15.4839 14.9198C15.5641 14.7981 15.5932 14.6497 15.565 14.5067C15.5368 14.3638 15.4536 14.2376 15.3332 14.1554L12.5554 12.272V8.01649C12.5554 7.86915 12.4969 7.72784 12.3927 7.62366C12.2885 7.51947 12.1472 7.46094 11.9999 7.46094Z" fill="currentColor"></path> <path d="M12 3.11133C10.4129 3.11689 8.8559 3.54489 7.48899 4.35137C6.12207 5.15785 4.99452 6.31372 4.2222 7.70022V4.88911C4.2222 4.74176 4.16366 4.60046 4.05948 4.49627C3.95529 4.39208 3.81398 4.33355 3.66664 4.33355C3.5193 4.33355 3.37799 4.39208 3.2738 4.49627C3.16962 4.60046 3.11108 4.74176 3.11108 4.88911V9.778H7.99997C8.14732 9.778 8.28862 9.71946 8.39281 9.61528C8.497 9.51109 8.55553 9.36978 8.55553 9.22244C8.55553 9.0751 8.497 8.93379 8.39281 8.8296C8.28862 8.72542 8.14732 8.66688 7.99997 8.66688H4.9722C5.67288 7.1881 6.82213 5.96799 8.25639 5.18018C9.69065 4.39236 11.3369 4.07699 12.9607 4.27893C14.5846 4.48088 16.1034 5.18985 17.301 6.30496C18.4986 7.42007 19.314 8.88451 19.6312 10.4899C19.9483 12.0952 19.7511 13.7597 19.0675 15.2465C18.3839 16.7332 17.2487 17.9665 15.8236 18.7708C14.3985 19.575 12.7561 19.9094 11.13 19.7261C9.5039 19.5429 7.97702 18.8515 6.76664 17.7502C6.71265 17.701 6.64949 17.6628 6.58077 17.638C6.51205 17.6132 6.4391 17.6021 6.36611 17.6055C6.29311 17.6088 6.22149 17.6265 6.15533 17.6575C6.08917 17.6886 6.02977 17.7323 5.98053 17.7863C5.93128 17.8403 5.89315 17.9035 5.86832 17.9722C5.84348 18.0409 5.83242 18.1139 5.83578 18.1869C5.83913 18.2599 5.85683 18.3315 5.88786 18.3976C5.91889 18.4638 5.96265 18.5232 6.01664 18.5724C7.0845 19.5449 8.37323 20.2424 9.77131 20.6048C11.1694 20.9672 12.6347 20.9834 14.0405 20.6521C15.4462 20.3208 16.7501 19.6519 17.8393 18.7034C18.9284 17.7549 19.77 16.5552 20.2913 15.2083C20.8125 13.8614 20.9977 12.4077 20.8308 10.9731C20.6639 9.5385 20.15 8.16617 19.3335 6.97486C18.5169 5.78355 17.4224 4.80914 16.1446 4.13596C14.8668 3.46277 13.4443 3.11108 12 3.11133Z" fill="currentColor"></path></g> <defs><clipPath id="clip0_7755_18920"><rect width="20" height="20" transform="translate(2 2)"></rect></clipPath></defs>',5)]))}const bMe=wt(hMe,[["render",vMe]]),yMe={},_Me={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function SMe(e,t){return L(),Q("svg",_Me,t[0]||(t[0]=[H("path",{d:"M12 1.5C9.9233 1.5 7.89323 2.11581 6.16652 3.26957C4.4398 4.42332 3.09399 6.0632 2.29927 7.98182C1.50455 9.90045 1.29661 12.0116 1.70176 14.0484C2.1069 16.0852 3.10693 17.9562 4.57538 19.4246C6.04383 20.8931 7.91476 21.8931 9.95156 22.2982C11.9884 22.7034 14.0996 22.4955 16.0182 21.7007C17.9368 20.906 19.5767 19.5602 20.7304 17.8335C21.8842 16.1068 22.5 14.0767 22.5 12C22.4968 9.2162 21.3896 6.54733 19.4211 4.57889C17.4527 2.61044 14.7838 1.50318 12 1.5ZM12 21C9.61306 21 7.32387 20.0518 5.63604 18.364C3.94822 16.6761 3 14.3869 3 12C3 9.61305 3.94822 7.32387 5.63604 5.63604C7.32387 3.94821 9.61306 3 12 3V12L18.3608 18.3608C17.5266 19.1979 16.5352 19.862 15.4437 20.3149C14.3521 20.7679 13.1818 21.0007 12 21Z",fill:"currentColor"},null,-1)]))}const CMe=wt(yMe,[["render",SMe]]),wMe={},EMe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function kMe(e,t){return L(),Q("svg",EMe,t[0]||(t[0]=[H("path",{d:"M0.98999 19H3.40999L4.67999 15.42H10.33L11.59 19H14.01L8.74999 5H6.24999L0.98999 19ZM5.40999 13.39L7.43999 7.6H7.55999L9.58999 13.39H5.40999ZM20 11H23V13H20V16H18V13H15V11H18V8H20V11Z",fill:"currentColor"},null,-1)]))}const xMe=wt(wMe,[["render",kMe]]),TMe={},IMe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function AMe(e,t){return L(),Q("svg",IMe,t[0]||(t[0]=[H("path",{d:"M6 4H16.59L20 7.41V18C20 18.7956 19.6839 19.5587 19.1213 20.1213C18.5587 20.6839 17.7956 21 17 21H6C5.20435 21 4.44129 20.6839 3.87868 20.1213C3.31607 19.5587 3 18.7956 3 18V7C3 6.20435 3.31607 5.44129 3.87868 4.87868C4.44129 4.31607 5.20435 4 6 4ZM6 5C5.46957 5 4.96086 5.21071 4.58579 5.58579C4.21071 5.96086 4 6.46957 4 7V18C4 18.5304 4.21071 19.0391 4.58579 19.4142C4.96086 19.7893 5.46957 20 6 20H17C17.5304 20 18.0391 19.7893 18.4142 19.4142C18.7893 19.0391 19 18.5304 19 18V7.91L16.09 5H15V10H6V9V5ZM7 5V9H14V5H7ZM12 12C12.7956 12 13.5587 12.3161 14.1213 12.8787C14.6839 13.4413 15 14.2044 15 15C15 15.7956 14.6839 16.5587 14.1213 17.1213C13.5587 17.6839 12.7956 18 12 18C11.2044 18 10.4413 17.6839 9.87868 17.1213C9.31607 16.5587 9 15.7956 9 15C9 14.2044 9.31607 13.4413 9.87868 12.8787C10.4413 12.3161 11.2044 12 12 12ZM12 13C11.4696 13 10.9609 13.2107 10.5858 13.5858C10.2107 13.9609 10 14.4696 10 15C10 15.5304 10.2107 16.0391 10.5858 16.4142C10.9609 16.7893 11.4696 17 12 17C12.5304 17 13.0391 16.7893 13.4142 16.4142C13.7893 16.0391 14 15.5304 14 15C14 14.4696 13.7893 13.9609 13.4142 13.5858C13.0391 13.2107 12.5304 13 12 13Z",fill:"currentColor"},null,-1)]))}const OMe=wt(TMe,[["render",AMe]]),RMe={},DMe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function LMe(e,t){return L(),Q("svg",DMe,t[0]||(t[0]=[H("path",{d:"M2.79807 21.5667C2.3305 21.5667 1.9615 21.4167 1.69107 21.1159C1.44164 20.8381 1.30707 20.4739 1.28822 20.023L1.28564 19.9086V3.80115C1.28564 3.29115 1.42064 2.88701 1.69107 2.58958C1.9405 2.31486 2.27393 2.16658 2.69179 2.14558L2.7985 2.14258H14.2872C14.7488 2.14258 15.1144 2.29129 15.3852 2.58915C15.6346 2.86344 15.7688 3.22901 15.7881 3.68501L15.7902 3.80072V6.62501H21.2116C21.6372 6.62501 21.9822 6.75358 22.2449 7.00944L22.3092 7.07629C22.5586 7.35358 22.6932 7.71786 22.7121 8.16872L22.7146 8.28315V19.9086C22.7146 20.4126 22.5796 20.815 22.3092 21.1159C22.0598 21.3931 21.7285 21.5427 21.3162 21.5641L21.2112 21.5667H2.79807ZM15.7898 19.9086C15.7898 19.9741 15.7876 20.038 15.7829 20.1001H20.7278C20.9039 20.1001 21.0346 20.0573 21.1199 19.9724C21.1928 19.8996 21.2344 19.7907 21.2446 19.6467L21.2476 19.5717V8.62043C21.2476 8.43829 21.2048 8.30458 21.1199 8.21929C21.0471 8.14644 20.9404 8.10486 20.8006 8.09458L20.7278 8.09201L15.7898 8.09158V19.9086ZM13.8042 3.60958H3.28107C3.0985 3.60958 2.96522 3.65201 2.87993 3.73686C2.80707 3.80972 2.7655 3.91858 2.75522 4.06258L2.75264 4.13801V19.5717C2.75264 19.7539 2.79507 19.8871 2.87993 19.9724C2.95279 20.0453 3.06164 20.0869 3.20564 20.0971L3.28107 20.1001L5.36693 20.0997V17.4126C5.36693 17.0534 5.4415 16.7809 5.58979 16.5953L5.63607 16.5421C5.79893 16.3737 6.04107 16.282 6.36207 16.2666L6.46064 16.2644H10.6152C10.9915 16.2644 11.2679 16.357 11.4441 16.5421C11.6044 16.7106 11.6918 16.9656 11.7064 17.3071L11.7085 17.4121L11.7081 20.0997H13.8038C13.9799 20.0997 14.1106 20.0573 14.1955 19.9724C14.2684 19.8996 14.3104 19.7907 14.3206 19.6467L14.3232 19.5717V4.13801C14.3232 3.95544 14.2804 3.82215 14.1955 3.73686C14.1106 3.65201 13.9804 3.60958 13.8042 3.60958ZM10.2235 17.458H6.85236C6.67579 17.458 6.57936 17.5381 6.56307 17.6989L6.56093 17.7494L6.5605 20.0997H10.5145V17.7494C10.5145 17.5729 10.4344 17.4764 10.2741 17.4601L10.2235 17.458ZM19.2522 16.5559C19.4412 16.5559 19.5436 16.6424 19.5595 16.816L19.5616 16.8657V18.2869C19.5616 18.4763 19.4751 18.5787 19.3015 18.5946L19.2522 18.5967H17.7852C17.6014 18.5967 17.5024 18.5097 17.4865 18.3366L17.4848 18.2869V16.8657C17.4848 16.6763 17.5688 16.5739 17.7376 16.558L17.7852 16.5559H19.2522ZM19.2522 13.0759C19.4412 13.0759 19.5436 13.1624 19.5595 13.336L19.5616 13.3853V14.8064C19.5616 14.9959 19.4751 15.0983 19.3015 15.1141L19.2522 15.1163H17.7852C17.6014 15.1163 17.5024 15.0297 17.4865 14.8561L17.4848 14.8064V13.3853C17.4848 13.1959 17.5688 13.0934 17.7376 13.0776L17.7852 13.0754L19.2522 13.0759ZM7.2895 12.3374C7.51965 12.3374 7.6435 12.4437 7.66107 12.6559L7.66322 12.7111V14.4331C7.66322 14.6629 7.55693 14.7867 7.34479 14.8043L7.2895 14.8064H5.51307C5.2945 14.8064 5.17664 14.7006 5.15993 14.4884L5.15779 14.4327V12.7111C5.15779 12.4814 5.2585 12.3576 5.46036 12.3396L5.51307 12.3374H7.2895ZM11.5538 12.3374C11.7835 12.3374 11.9069 12.4437 11.9249 12.6559L11.9271 12.7111V14.4331C11.9271 14.6629 11.8208 14.7867 11.6086 14.8043L11.5534 14.8064H9.78593C9.56179 14.8064 9.44093 14.7006 9.42379 14.4884L9.42165 14.4327V12.7111C9.42165 12.4814 9.52493 12.3576 9.73193 12.3396L9.78593 12.3374H11.5538ZM19.2522 9.59501C19.4412 9.59501 19.5436 9.68201 19.5595 9.85558L19.5616 9.90486V11.3264C19.5616 11.5154 19.4751 11.6179 19.3015 11.6337L19.2522 11.6359H17.7852C17.6014 11.6359 17.5024 11.5493 17.4865 11.3757L17.4848 11.3264V9.90486C17.4848 9.71586 17.5688 9.61343 17.7376 9.59715L17.7852 9.59501H19.2522ZM7.2895 8.72929C7.51965 8.72929 7.6435 8.83558 7.66107 9.04815L7.66322 9.10301V10.825C7.66322 11.0551 7.55693 11.179 7.34479 11.1966L7.2895 11.1987H5.51307C5.2945 11.1987 5.17664 11.0924 5.15993 10.8803L5.15779 10.825V9.10301C5.15779 8.87329 5.2585 8.74943 5.46036 8.73186L5.51307 8.72972L7.2895 8.72929ZM11.5538 8.72929C11.7835 8.72929 11.9069 8.83558 11.9249 9.04815L11.9271 9.10301V10.825C11.9271 11.0551 11.8208 11.179 11.6086 11.1966L11.5534 11.1987H9.78593C9.56179 11.1987 9.44093 11.0924 9.42379 10.8803L9.42165 10.825V9.10301C9.42165 8.87329 9.52493 8.74943 9.73193 8.73186L9.78593 8.72972L11.5538 8.72929ZM7.2895 5.12201C7.51965 5.12201 7.6435 5.22786 7.66107 5.44001L7.66322 5.49572V7.21729C7.66322 7.44701 7.55693 7.57086 7.34479 7.58844L7.2895 7.59101H5.51307C5.2945 7.59101 5.17664 7.48472 5.15993 7.27258L5.15779 7.21729V5.49529C5.15779 5.26558 5.2585 5.14172 5.46036 5.12415L5.51307 5.12201H7.2895ZM11.5538 5.12201C11.7835 5.12201 11.9069 5.22786 11.9249 5.44001L11.9271 5.49572V7.21729C11.9271 7.44701 11.8208 7.57086 11.6086 7.58844L11.5534 7.59101H9.78593C9.56179 7.59101 9.44093 7.48472 9.42379 7.27258L9.42165 7.21729V5.49529C9.42165 5.26558 9.52493 5.14172 9.73193 5.12415L9.78593 5.12201H11.5538Z",fill:"currentColor"},null,-1)]))}const PMe=wt(RMe,[["render",LMe]]),MMe={},NMe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function FMe(e,t){return L(),Q("svg",NMe,t[0]||(t[0]=[H("path",{d:"M5.14282 8.18848H15.4285M6.26396 11.6605L7.40682 11.6399C7.68678 11.6345 7.95897 11.7321 8.17175 11.9141C8.38453 12.0961 8.52308 12.3499 8.56111 12.6273L8.57139 12.7816V13.9062C8.57145 14.2056 8.45402 14.493 8.24437 14.7067C8.03472 14.9204 7.74958 15.0434 7.45025 15.049L6.30739 15.0696C6.02744 15.075 5.75524 14.9774 5.54246 14.7954C5.32969 14.6134 5.19114 14.3596 5.15311 14.0822L5.14282 13.9268V12.8033C5.14277 12.504 5.26019 12.2165 5.46984 12.0028C5.6795 11.7891 5.96464 11.6662 6.26396 11.6605Z",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),D(),H("path",{d:"M10.8572 11.6174H15.4286M10.8572 15.046H15.4286M4.00007 4.74316H16.5715C17.1777 4.74316 17.7591 4.98398 18.1877 5.41263C18.6164 5.84129 18.8572 6.42267 18.8572 7.02888V18.4746H4.00007C3.39386 18.4746 2.81248 18.2338 2.38383 17.8051C1.95517 17.3765 1.71436 16.7951 1.71436 16.1889V7.03002C1.71436 6.42381 1.95517 5.84243 2.38383 5.41378C2.81248 4.98512 3.39386 4.74316 4.00007 4.74316Z",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),D(),H("path",{d:"M18.2859 18.4742C19.0437 18.4742 19.7704 18.1732 20.3062 17.6374C20.842 17.1015 21.143 16.3748 21.143 15.617V8.18848H18.8573",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const $Me=wt(MMe,[["render",FMe]]),BMe={},VMe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function HMe(e,t){return L(),Q("svg",VMe,t[0]||(t[0]=[H("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.6875 5C10.4389 5 10.2004 5.09877 10.0246 5.27459C9.84877 5.4504 9.75 5.68886 9.75 5.9375C9.75 6.18614 9.84877 6.4246 10.0246 6.60041C10.2004 6.77623 10.4389 6.875 10.6875 6.875H12.3338L8.95875 18.125H6.9375C6.68886 18.125 6.4504 18.2238 6.27459 18.3996C6.09877 18.5754 6 18.8139 6 19.0625C6 19.3111 6.09877 19.5496 6.27459 19.7254C6.4504 19.9012 6.68886 20 6.9375 20H12.5625C12.8111 20 13.0496 19.9012 13.2254 19.7254C13.4012 19.5496 13.5 19.3111 13.5 19.0625C13.5 18.8139 13.4012 18.5754 13.2254 18.3996C13.0496 18.2238 12.8111 18.125 12.5625 18.125H10.9163L14.2913 6.875H16.3125C16.5611 6.875 16.7996 6.77623 16.9754 6.60041C17.1512 6.4246 17.25 6.18614 17.25 5.9375C17.25 5.68886 17.1512 5.4504 16.9754 5.27459C16.7996 5.09877 16.5611 5 16.3125 5H10.6875Z",fill:"currentColor"},null,-1)]))}const UMe=wt(BMe,[["render",HMe]]),zMe={},WMe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function jMe(e,t){return L(),Q("svg",WMe,t[0]||(t[0]=[H("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.25 10.0546V8C5.25 4.27208 8.27208 1.25 12 1.25C15.7279 1.25 18.75 4.27208 18.75 8V10.0546C19.8648 10.1379 20.5907 10.348 21.1213 10.8787C22 11.7574 22 13.1716 22 16C22 18.8284 22 20.2426 21.1213 21.1213C20.2426 22 18.8284 22 16 22H8C5.17157 22 3.75736 22 2.87868 21.1213C2 20.2426 2 18.8284 2 16C2 13.1716 2 11.7574 2.87868 10.8787C3.40931 10.348 4.13525 10.1379 5.25 10.0546ZM6.75 8C6.75 5.10051 9.10051 2.75 12 2.75C14.8995 2.75 17.25 5.10051 17.25 8V10.0036C16.867 10 16.4515 10 16 10H8C7.54849 10 7.13301 10 6.75 10.0036V8Z",fill:"currentColor"},null,-1)]))}const ZMe=wt(zMe,[["render",jMe]]),qMe={},GMe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function KMe(e,t){return L(),Q("svg",GMe,t[0]||(t[0]=[H("rect",{width:"24",height:"24"},null,-1),D(),H("path",{d:"M12.2 10.3992C13.1208 10.3992 13.8 9.72082 13.8 8.79922C13.8 7.87762 13.1208 7.19922 12.2 7.19922C11.28 7.19922 10.6 7.87762 10.6 8.79922C10.6 9.72082 11.28 10.3992 12.2 10.3992ZM12.2 11.1992C10.4328 11.1992 9 12.4888 9 14.0792V14.388H15.4V14.0792C15.4 12.4888 13.9672 11.1992 12.2 11.1992Z",fill:"currentColor"},null,-1),D(),H("path",{d:"M17.8 4H6.6C5.7176 4 5 4.7176 5 5.6V16C5 16.8824 5.7176 17.6 6.6 17.6H9.8L12.2 20L14.6 17.6H17.8C18.6824 17.6 19.4 16.8824 19.4 16V5.6C19.4 4.7176 18.6824 4 17.8 4ZM13.8 16L12.2 17.6L10.6 16H6.6V5.6H17.8L17.8016 16H13.8Z",fill:"currentColor"},null,-1)]))}const YMe=wt(qMe,[["render",KMe]]),XMe={},JMe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function QMe(e,t){return L(),Q("svg",JMe,t[0]||(t[0]=[H("rect",{width:"24",height:"24"},null,-1),D(),H("path",{d:"M15.5984 6C14.168 6 12.854 6.49933 11.8179 7.32834C10.7484 6.46841 9.41423 5.99948 8.03852 6C4.7088 6 2 8.69093 2 11.9995C2 15.3085 4.7088 18 8.03852 18C9.46885 18 10.7823 17.5007 11.8179 16.6711C12.8876 17.5315 14.2222 18.0007 15.5984 18C18.9281 18 21.6364 15.3085 21.6364 11.9995C21.6358 8.69093 18.9276 6 15.5984 6ZM8.03852 17.5001C4.98614 17.5001 2.50299 15.0324 2.50299 11.9995C2.50299 8.96709 4.98614 6.49987 8.03852 6.49987C9.3186 6.49987 10.4953 6.93819 11.4339 7.66604C10.2826 8.7589 9.5604 10.2954 9.5604 11.9995C9.5604 13.7035 10.282 15.24 11.4339 16.3334C10.4655 17.0892 9.26985 17.5 8.03852 17.5001ZM15.5984 17.5001C14.3178 17.5001 13.1411 17.0618 12.2019 16.3334C12.7934 15.775 13.2644 15.1028 13.5863 14.3577C13.9082 13.6126 14.0743 12.8103 14.0743 11.9995C14.0743 10.296 13.3527 8.75943 12.2019 7.66604C13.1705 6.91027 14.3663 6.49943 15.5978 6.49933C18.6497 6.49933 21.1328 8.96655 21.1328 11.9989C21.1334 15.0324 18.6502 17.5001 15.5984 17.5001Z",fill:"currentColor"},null,-1)]))}const eNe=wt(XMe,[["render",QMe]]),tNe={},nNe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function sNe(e,t){return L(),Q("svg",nNe,t[0]||(t[0]=[H("path",{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",stroke:"currentColor"},null,-1),D(),H("path",{d:"M15 12H9",stroke:"currentColor","stroke-linecap":"round"},null,-1)]))}const oNe=wt(tNe,[["render",sNe]]),rNe={},iNe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function aNe(e,t){return L(),Q("svg",iNe,t[0]||(t[0]=[rc('<g clip-path="url(#clip0_339_532)"><path d="M5.49762 3.69733H23.0787C23.3977 3.69733 23.6416 3.94125 23.6416 4.26022V15.1991C23.6416 15.5181 23.3977 15.762 23.0787 15.762H5.49762C5.17864 15.762 4.93472 15.5181 4.93472 15.1991V4.26022C4.93472 3.94125 5.17864 3.69733 5.49762 3.69733Z" fill="white"></path> <path d="M23.0787 16.1373H5.49761C4.97224 16.1373 4.55945 15.7245 4.55945 15.1991V4.26018C4.55945 3.73481 4.97224 3.32202 5.49761 3.32202H23.0787C23.6041 3.32202 24.0169 3.73481 24.0169 4.26018V15.1991C24.0169 15.7057 23.6041 16.1373 23.0787 16.1373ZM5.49761 4.07255C5.38503 4.07255 5.30997 4.1476 5.30997 4.26018V15.1991C5.30997 15.3117 5.38503 15.3867 5.49761 15.3867H23.0787C23.1913 15.3867 23.2663 15.3117 23.2663 15.1991V4.26018C23.2663 4.1476 23.1913 4.07255 23.0787 4.07255H5.49761Z" fill="currentColor"></path> <path d="M3.90274 5.29218H21.5026C21.8216 5.29218 22.0655 5.5361 22.0655 5.85507V16.794C22.0655 17.113 21.8216 17.3569 21.5026 17.3569H3.90274C3.58377 17.3569 3.33984 17.113 3.33984 16.794V5.85507C3.33984 5.5361 3.58377 5.29218 3.90274 5.29218Z" fill="white"></path> <path d="M21.4838 17.7322H3.90273C3.37736 17.7322 2.96457 17.3194 2.96457 16.794V5.85509C2.96457 5.32972 3.37736 4.91693 3.90273 4.91693H21.5026C22.028 4.91693 22.4407 5.32972 22.4407 5.85509V16.794C22.422 17.3006 22.0092 17.7322 21.4838 17.7322ZM3.90273 5.66746C3.79015 5.66746 3.7151 5.74251 3.7151 5.85509V16.794C3.7151 16.9066 3.79015 16.9817 3.90273 16.9817H21.5026C21.6152 16.9817 21.6902 16.9066 21.6902 16.794V5.85509C21.6902 5.74251 21.6152 5.66746 21.5026 5.66746H3.90273Z" fill="currentColor"></path> <path d="M2.43921 6.84949H20.0391C20.358 6.84949 20.602 7.09341 20.602 7.41238V18.3513C20.602 18.6703 20.358 18.9142 20.0391 18.9142H2.43921C2.12023 18.9142 1.87631 18.6703 1.87631 18.3513V7.41238C1.87631 7.11217 2.12023 6.84949 2.43921 6.84949Z" fill="white"></path> <path d="M20.0391 19.2895H2.43923C1.91386 19.2895 1.50107 18.8767 1.50107 18.3513V7.4124C1.50107 6.88703 1.91386 6.47424 2.43923 6.47424H20.0391C20.5644 6.47424 20.9772 6.88703 20.9772 7.4124V18.3513C20.9772 18.8579 20.5457 19.2895 20.0391 19.2895ZM2.43923 7.22477C2.32665 7.22477 2.25159 7.29982 2.25159 7.4124V18.3513C2.25159 18.4639 2.32665 18.539 2.43923 18.539H20.0391C20.1517 18.539 20.2267 18.4639 20.2267 18.3513V7.4124C20.2267 7.29982 20.1517 7.22477 20.0391 7.22477H2.43923Z" fill="currentColor"></path> <path d="M0.93817 8.23798H18.538C18.857 8.23798 19.1009 8.4819 19.1009 8.80087V19.7398C19.1009 20.0588 18.857 20.3027 18.538 20.3027H0.93817C0.619196 20.3027 0.375275 20.0588 0.375275 19.7398V8.80087C0.375275 8.50066 0.619196 8.23798 0.93817 8.23798Z" fill="white"></path> <path d="M18.538 20.678H0.938159C0.41279 20.678 0 20.2652 0 19.7398V8.80089C0 8.27552 0.41279 7.86273 0.938159 7.86273H18.538C19.0634 7.86273 19.4762 8.27552 19.4762 8.80089V19.7398C19.4762 20.2652 19.0446 20.678 18.538 20.678ZM0.938159 8.61326C0.82558 8.61326 0.750527 8.68831 0.750527 8.80089V19.7398C0.750527 19.8524 0.82558 19.9275 0.938159 19.9275H18.538C18.6506 19.9275 18.7256 19.8524 18.7256 19.7398V8.80089C18.7256 8.68831 18.6506 8.61326 18.538 8.61326H0.938159Z" fill="currentColor"></path> <path d="M16.1739 18.614H3.30232C3.30232 17.7322 2.57056 17.0004 1.68869 17.0004V11.3339C2.57056 11.3339 3.30232 10.6021 3.30232 9.72028H16.1739C16.1739 10.6021 16.9056 11.3339 17.7875 11.3339V17.0004C16.8869 17.0004 16.1739 17.7322 16.1739 18.614Z" fill="white"></path> <path d="M16.1738 18.9893H3.30231C3.09592 18.9893 2.92705 18.8204 2.92705 18.614C2.92705 17.9386 2.36415 17.3757 1.68868 17.3757C1.48228 17.3757 1.31342 17.2068 1.31342 17.0004V11.3339C1.31342 11.1275 1.48228 10.9587 1.68868 10.9587C2.36415 10.9587 2.92705 10.3958 2.92705 9.7203C2.92705 9.5139 3.09592 9.34503 3.30231 9.34503H16.1738C16.3802 9.34503 16.5491 9.5139 16.5491 9.7203C16.5491 10.3958 17.112 10.9587 17.7875 10.9587C17.9939 10.9587 18.1627 11.1275 18.1627 11.3339V17.0004C18.1627 17.2068 17.9939 17.3757 17.7875 17.3757C17.112 17.3757 16.5491 17.9386 16.5491 18.614C16.5491 18.8204 16.3802 18.9893 16.1738 18.9893ZM3.64005 18.2388H15.8173C15.9675 17.4507 16.6054 16.8128 17.3935 16.6627V11.6717C16.6054 11.5216 15.9675 10.8836 15.8173 10.0956H3.64005C3.48994 10.8836 2.852 11.5216 2.06394 11.6717V16.6439C2.852 16.8128 3.48994 17.4507 3.64005 18.2388Z" fill="currentColor"></path> <path d="M9.7756 16.7189C9.17518 16.7189 8.53724 16.4938 8.08692 15.9121C7.95558 15.7432 7.9931 15.5181 8.14321 15.3867C8.31208 15.2554 8.53723 15.2929 8.66858 15.443C9.11889 16.0247 9.81313 16.0435 10.2634 15.8934C10.6387 15.762 10.8639 15.5181 10.8639 15.2554C10.8639 15.0115 10.2822 14.8426 9.7756 14.6925C8.98755 14.4486 7.9931 14.1671 7.9931 13.229C7.9931 12.7787 8.27455 12.3659 8.76239 12.122C9.36281 11.8217 10.376 11.7092 11.3329 12.4034C11.5018 12.5347 11.5393 12.7599 11.408 12.9288C11.2767 13.0976 11.0515 13.1352 10.8826 13.0038C10.2447 12.5347 9.53168 12.5535 9.10013 12.7787C8.87497 12.8912 8.72487 13.0601 8.72487 13.229C8.72487 13.5855 9.25024 13.7544 9.96324 13.9795C10.7325 14.2047 11.5769 14.4674 11.5769 15.2554C11.5769 15.8371 11.1453 16.3624 10.4698 16.6064C10.2822 16.6626 10.0195 16.7189 9.7756 16.7189Z" fill="currentColor"></path> <path d="M9.73809 12.6286C9.53169 12.6286 9.36282 12.4597 9.36282 12.2533V11.4278C9.36282 11.2214 9.53169 11.0525 9.73809 11.0525C9.94448 11.0525 10.1134 11.2214 10.1134 11.4278V12.2533C10.1134 12.4785 9.94448 12.6286 9.73809 12.6286Z" fill="currentColor"></path> <path d="M9.73809 17.432C9.53169 17.432 9.36282 17.2631 9.36282 17.0567V16.4375C9.36282 16.2311 9.53169 16.0623 9.73809 16.0623C9.94448 16.0623 10.1134 16.2311 10.1134 16.4375V17.0567C10.1134 17.2631 9.94448 17.432 9.73809 17.432Z" fill="currentColor"></path> <path d="M4.14667 14.3923C4.14667 14.4835 4.16462 14.5737 4.19951 14.658C4.2344 14.7422 4.28554 14.8187 4.35 14.8832C4.41447 14.9477 4.491 14.9988 4.57523 15.0337C4.65946 15.0686 4.74974 15.0865 4.8409 15.0865C4.93207 15.0865 5.02235 15.0686 5.10658 15.0337C5.19081 14.9988 5.26734 14.9477 5.3318 14.8832C5.39627 14.8187 5.44741 14.7422 5.4823 14.658C5.51719 14.5737 5.53514 14.4835 5.53514 14.3923C5.53514 14.2082 5.462 14.0316 5.3318 13.9014C5.20161 13.7712 5.02503 13.6981 4.8409 13.6981C4.65678 13.6981 4.4802 13.7712 4.35 13.9014C4.21981 14.0316 4.14667 14.2082 4.14667 14.3923Z" fill="white"></path> <path d="M4.84089 15.443C4.25924 15.443 3.77139 14.9739 3.77139 14.3735C3.77139 13.7731 4.24047 13.304 4.84089 13.304C5.42255 13.304 5.91039 13.7731 5.91039 14.3735C5.91039 14.9739 5.42255 15.443 4.84089 15.443ZM4.84089 14.0733C4.67202 14.0733 4.52192 14.2046 4.52192 14.3923C4.52192 14.5799 4.65326 14.7113 4.84089 14.7113C5.00976 14.7113 5.15987 14.5799 5.15987 14.3923C5.15987 14.2046 5.00976 14.0733 4.84089 14.0733Z" fill="currentColor"></path> <path d="M13.9786 14.3923C13.9786 14.5764 14.0517 14.753 14.1819 14.8832C14.3121 15.0134 14.4887 15.0865 14.6728 15.0865C14.8569 15.0865 15.0335 15.0134 15.1637 14.8832C15.2939 14.753 15.3671 14.5764 15.3671 14.3923C15.3671 14.2082 15.2939 14.0316 15.1637 13.9014C15.0335 13.7712 14.8569 13.6981 14.6728 13.6981C14.4887 13.6981 14.3121 13.7712 14.1819 13.9014C14.0517 14.0316 13.9786 14.2082 13.9786 14.3923Z" fill="white"></path> <path d="M14.6728 15.443C14.0911 15.443 13.6033 14.9739 13.6033 14.3735C13.6033 13.7731 14.0724 13.304 14.6728 13.304C15.2545 13.304 15.7423 13.7731 15.7423 14.3735C15.7423 14.9739 15.2545 15.443 14.6728 15.443ZM14.6728 14.0733C14.5039 14.0733 14.3538 14.2046 14.3538 14.3923C14.3538 14.5799 14.4852 14.7113 14.6728 14.7113C14.8604 14.7113 14.9918 14.5799 14.9918 14.3923C14.9918 14.2046 14.8417 14.0733 14.6728 14.0733Z" fill="currentColor"></path></g> <defs><clipPath id="clip0_339_532"><rect width="24" height="24" fill="white"></rect></clipPath></defs>',3)]))}const lNe=wt(rNe,[["render",aNe]]),cNe={},uNe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function dNe(e,t){return L(),Q("svg",uNe,t[0]||(t[0]=[H("path",{d:"M4.5 10.5C3.675 10.5 3 11.175 3 12C3 12.825 3.675 13.5 4.5 13.5C5.325 13.5 6 12.825 6 12C6 11.175 5.325 10.5 4.5 10.5ZM19.5 10.5C18.675 10.5 18 11.175 18 12C18 12.825 18.675 13.5 19.5 13.5C20.325 13.5 21 12.825 21 12C21 11.175 20.325 10.5 19.5 10.5ZM12 10.5C11.175 10.5 10.5 11.175 10.5 12C10.5 12.825 11.175 13.5 12 13.5C12.825 13.5 13.5 12.825 13.5 12C13.5 11.175 12.825 10.5 12 10.5Z",fill:"currentColor"},null,-1)]))}const fNe=wt(cNe,[["render",dNe]]),pNe={},mNe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function hNe(e,t){return L(),Q("svg",mNe,t[0]||(t[0]=[H("path",{d:"M19.7653 7.98469L14.5153 2.73469C14.4805 2.69987 14.4391 2.67227 14.3936 2.65345C14.348 2.63463 14.2993 2.62496 14.25 2.625H5.25C4.95163 2.625 4.66548 2.74353 4.4545 2.95451C4.24353 3.16548 4.125 3.45163 4.125 3.75V20.25C4.125 20.5484 4.24353 20.8345 4.4545 21.0455C4.66548 21.2565 4.95163 21.375 5.25 21.375H18.75C19.0484 21.375 19.3345 21.2565 19.5455 21.0455C19.7565 20.8345 19.875 20.5484 19.875 20.25V8.25C19.875 8.20074 19.8654 8.15195 19.8466 8.10643C19.8277 8.06091 19.8001 8.01954 19.7653 7.98469ZM14.625 3.90469L18.5944 7.875H14.625V3.90469ZM18.75 20.625H5.25C5.15054 20.625 5.05516 20.5855 4.98484 20.5152C4.91451 20.4448 4.875 20.3495 4.875 20.25V3.75C4.875 3.65054 4.91451 3.55516 4.98484 3.48484C5.05516 3.41451 5.15054 3.375 5.25 3.375H13.875V8.25C13.875 8.34946 13.9145 8.44484 13.9848 8.51517C14.0552 8.58549 14.1505 8.625 14.25 8.625H19.125V20.25C19.125 20.3495 19.0855 20.4448 19.0152 20.5152C18.9448 20.5855 18.8495 20.625 18.75 20.625ZM15.375 12.75C15.375 12.8495 15.3355 12.9448 15.2652 13.0152C15.1948 13.0855 15.0995 13.125 15 13.125H9C8.90054 13.125 8.80516 13.0855 8.73483 13.0152C8.66451 12.9448 8.625 12.8495 8.625 12.75C8.625 12.6505 8.66451 12.5552 8.73483 12.4848C8.80516 12.4145 8.90054 12.375 9 12.375H15C15.0995 12.375 15.1948 12.4145 15.2652 12.4848C15.3355 12.5552 15.375 12.6505 15.375 12.75ZM15.375 15.75C15.375 15.8495 15.3355 15.9448 15.2652 16.0152C15.1948 16.0855 15.0995 16.125 15 16.125H9C8.90054 16.125 8.80516 16.0855 8.73483 16.0152C8.66451 15.9448 8.625 15.8495 8.625 15.75C8.625 15.6505 8.66451 15.5552 8.73483 15.4848C8.80516 15.4145 8.90054 15.375 9 15.375H15C15.0995 15.375 15.1948 15.4145 15.2652 15.4848C15.3355 15.5552 15.375 15.6505 15.375 15.75Z",fill:"currentColor"},null,-1)]))}const gNe=wt(pNe,[["render",hNe]]),vNe={},bNe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function yNe(e,t){return L(),Q("svg",bNe,t[0]||(t[0]=[H("g",{"clip-path":"url(#clip0_3404_6064)"},[H("path",{d:"M5.41838 10.43C4.96247 10.43 4.54022 10.7616 4.24716 11.1058C4.00997 11.3849 3.89138 11.8152 3.89138 12.1734C3.89138 12.5315 4.02591 12.9299 4.26314 13.209C4.55152 13.5532 4.86211 13.7891 5.32266 13.7891C5.7367 13.7891 6.22913 13.6153 6.51281 13.3316C6.80114 13.0478 7.04105 12.5714 7.04105 12.1574C7.04105 11.7481 6.92873 11.258 6.64036 10.9742C6.35194 10.6858 5.82769 10.43 5.41838 10.43ZM13.6048 10.5425C13.1304 10.5425 12.7443 10.7291 12.4466 11.1021C12.2048 11.4014 12.0838 11.7425 12.0838 12.1252C12.0838 12.513 12.2048 12.8565 12.4466 13.1558C12.7442 13.5288 13.1304 13.7154 13.6049 13.7154C14.0281 13.7154 14.3863 13.563 14.6792 13.2587C14.9724 12.9495 15.1189 12.5719 15.1189 12.1253C15.1189 11.6836 14.97 11.3108 14.6723 11.0065C14.3793 10.6973 14.0234 10.5425 13.6048 10.5425ZM12 0.375C5.57972 0.375 0.375 5.57972 0.375 12C0.375 18.4203 5.57972 23.625 12 23.625C18.4203 23.625 23.625 18.4203 23.625 12C23.625 5.57972 18.4203 0.375 12 0.375ZM9.24253 15.5527H7.08938V14.6761C6.8707 14.9506 6.3563 15.2304 6.13312 15.3559C5.74242 15.5745 5.21184 15.7169 4.71408 15.7169C3.90933 15.7169 3.19298 15.4626 2.56509 14.9092C1.81617 14.2487 1.46433 13.2389 1.46433 12.1504C1.46433 11.0433 1.84805 10.1595 2.61558 9.49898C3.22491 8.97333 3.97008 8.55258 4.76086 8.55258C5.22127 8.55258 5.7893 8.59397 6.19392 8.7893C6.42652 8.90086 6.84286 9.16359 7.08942 9.41944V4.80216H9.24267V15.5527L9.24253 15.5527ZM16.612 14.5617C15.8957 15.3862 14.8933 15.7985 13.6048 15.7985C12.3117 15.7985 11.307 15.3862 10.5906 14.5618C9.99994 13.8845 9.70444 13.0527 9.70444 12.0664C9.70444 11.1781 10.0021 10.3905 10.5975 9.7035C11.3185 8.87414 12.3442 8.45944 13.6744 8.45944C14.8978 8.45944 15.8746 8.87405 16.605 9.7035C17.2004 10.3807 17.498 11.1879 17.498 12.1252C17.4982 13.0724 17.2028 13.8845 16.612 14.5618V14.5617ZM18.4293 5.22342C18.6805 4.97217 18.9852 4.84664 19.3433 4.84664C19.7015 4.84664 20.0062 4.97222 20.2574 5.22342C20.5085 5.46998 20.6341 5.77233 20.6341 6.13045C20.6341 6.49327 20.5085 6.80025 20.2574 7.05145C20.0108 7.29797 19.7061 7.4212 19.3433 7.4212C18.9851 7.4212 18.6804 7.29563 18.4293 7.04442C18.1828 6.79327 18.0595 6.48858 18.0595 6.13041C18.0594 5.77228 18.1828 5.46998 18.4293 5.22342ZM20.4876 15.5473H18.199V8.7113H20.4876V15.5473Z",fill:"currentColor"})],-1),D(),H("defs",null,[H("clipPath",{id:"clip0_3404_6064"},[H("rect",{width:"24",height:"24",fill:"white"})])],-1)]))}const _Ne=wt(vNe,[["render",yNe]]),SNe={},CNe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function wNe(e,t){return L(),Q("svg",CNe,t[0]||(t[0]=[H("path",{d:"M17 17C17.4167 17 17.771 16.8543 18.063 16.563C18.355 16.2717 18.5007 15.9173 18.5 15.5C18.4993 15.0827 18.3537 14.7287 18.063 14.438C17.7723 14.1473 17.418 14.0013 17 14C16.582 13.9987 16.228 14.1447 15.938 14.438C15.648 14.7313 15.502 15.0853 15.5 15.5C15.498 15.9147 15.644 16.269 15.938 16.563C16.232 16.857 16.586 17.0027 17 17ZM17 20C17.5167 20 17.9917 19.879 18.425 19.637C18.8583 19.395 19.2083 19.0743 19.475 18.675C19.1083 18.4583 18.7167 18.2917 18.3 18.175C17.8833 18.0583 17.45 18 17 18C16.55 18 16.1167 18.0583 15.7 18.175C15.2833 18.2917 14.8917 18.4583 14.525 18.675C14.7917 19.075 15.1417 19.396 15.575 19.638C16.0083 19.88 16.4833 20.0007 17 20ZM12 22C9.68333 21.4167 7.77067 20.0873 6.262 18.012C4.75333 15.9367 3.99933 13.6327 4 11.1V5L12 2L20 5V10.675C19.6833 10.5417 19.3583 10.4207 19.025 10.312C18.6917 10.2033 18.35 10.1247 18 10.076V6.4L12 4.15L6 6.4V11.1C6 11.8833 6.10433 12.6667 6.313 13.45C6.52167 14.2333 6.81333 14.9793 7.188 15.688C7.56267 16.3967 8.01667 17.0507 8.55 17.65C9.08333 18.2493 9.675 18.7493 10.325 19.15C10.5083 19.6833 10.75 20.1917 11.05 20.675C11.35 21.1583 11.6917 21.5917 12.075 21.975C12.0583 21.975 12.046 21.9793 12.038 21.988C12.03 21.9967 12.0173 22.0007 12 22ZM17 22C15.6167 22 14.4377 21.5123 13.463 20.537C12.4883 19.5617 12.0007 18.3827 12 17C11.9993 15.6173 12.487 14.4383 13.463 13.463C14.439 12.4877 15.618 12 17 12C18.382 12 19.5613 12.4877 20.538 13.463C21.5147 14.4383 22.002 15.6173 22 17C21.998 18.3827 21.5103 19.562 20.537 20.538C19.5637 21.514 18.3847 22.0013 17 22Z",fill:"currentColor"},null,-1)]))}const ENe=wt(SNe,[["render",wNe]]),kNe={},xNe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function TNe(e,t){return L(),Q("svg",xNe,t[0]||(t[0]=[H("path",{d:"M20.5477 4.79141V14.8916C20.5471 15.0505 20.4836 15.2028 20.3713 15.3151C20.2589 15.4275 20.1067 15.491 19.9477 15.4916H16.9717V18.6141C16.9714 18.7732 16.9081 18.9256 16.7956 19.038C16.6832 19.1505 16.5308 19.2138 16.3717 19.2141H4.05215C3.89312 19.2138 3.7407 19.1505 3.62825 19.038C3.5158 18.9256 3.45248 18.7732 3.45215 18.6141V8.51393C3.45248 8.3549 3.5158 8.20249 3.62825 8.09004C3.7407 7.97759 3.89312 7.91427 4.05215 7.91393H7.02815V4.79141C7.02848 4.63238 7.0918 4.47996 7.20425 4.36751C7.3167 4.25506 7.46912 4.19174 7.62815 4.19141H19.9477C20.1068 4.19174 20.2592 4.25506 20.3716 4.36751C20.4841 4.47996 20.5474 4.63238 20.5477 4.79141ZM15.5709 15.4916H7.62941C7.47049 15.491 7.31826 15.4275 7.20588 15.3151C7.0935 15.2028 7.03008 15.0505 7.02941 14.8916V10.8962H4.85046V17.8133H15.5709V15.4916ZM19.1481 7.17372H8.42773V14.0908H19.1481V7.17372Z",fill:"currentColor"},null,-1)]))}const INe=wt(kNe,[["render",TNe]]),ANe={},ONe={viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function RNe(e,t){return L(),Q("svg",ONe,t[0]||(t[0]=[H("path",{d:"M13.75 1.875H18.125V6.25M17.1875 2.8125L12.5 7.5M10.625 3.125H5C4.50272 3.125 4.02581 3.32254 3.67417 3.67417C3.32254 4.02581 3.125 4.50272 3.125 5V15C3.125 15.4973 3.32254 15.9742 3.67417 16.3258C4.02581 16.6775 4.50272 16.875 5 16.875H15C15.4973 16.875 15.9742 16.6775 16.3258 16.3258C16.6775 15.9742 16.875 15.4973 16.875 15V9.375",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const DNe=wt(ANe,[["render",RNe]]),LNe={},PNe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function MNe(e,t){return L(),Q("svg",PNe,t[0]||(t[0]=[H("path",{d:"M21.5303 14.4697L19.5 12.4395V9.75C19.4977 7.89138 18.8063 6.09964 17.5595 4.72124C16.3127 3.34284 14.5991 2.4757 12.75 2.2875V0.75H11.25V2.2875C9.40093 2.4757 7.68732 3.34284 6.44053 4.72124C5.19373 6.09964 4.50233 7.89138 4.5 9.75V12.4395L2.46975 14.4697C2.32909 14.6104 2.25004 14.8011 2.25 15V17.25C2.25 17.4489 2.32902 17.6397 2.46967 17.7803C2.61032 17.921 2.80109 18 3 18H8.25V18.5828C8.23369 19.5342 8.56905 20.4583 9.19184 21.1778C9.81462 21.8973 10.681 22.3617 11.625 22.482C12.1464 22.5337 12.6728 22.4757 13.1704 22.3117C13.6681 22.1478 14.1259 21.8815 14.5144 21.53C14.9029 21.1785 15.2136 20.7495 15.4264 20.2707C15.6392 19.792 15.7494 19.2739 15.75 18.75V18H21C21.1989 18 21.3897 17.921 21.5303 17.7803C21.671 17.6397 21.75 17.4489 21.75 17.25V15C21.75 14.8011 21.6709 14.6104 21.5303 14.4697ZM14.25 18.75C14.25 19.3467 14.0129 19.919 13.591 20.341C13.169 20.7629 12.5967 21 12 21C11.4033 21 10.831 20.7629 10.409 20.341C9.98705 19.919 9.75 19.3467 9.75 18.75V18H14.25V18.75ZM20.25 16.5H3.75V15.3105L5.78025 13.2803C5.92091 13.1396 5.99996 12.9489 6 12.75V9.75C6 8.1587 6.63214 6.63258 7.75736 5.50736C8.88258 4.38214 10.4087 3.75 12 3.75C13.5913 3.75 15.1174 4.38214 16.2426 5.50736C17.3679 6.63258 18 8.1587 18 9.75V12.75C18 12.9489 18.0791 13.1396 18.2197 13.2803L20.25 15.3105V16.5Z",fill:"currentColor"},null,-1)]))}const NNe=wt(LNe,[["render",MNe]]),FNe={},$Ne={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function BNe(e,t){return L(),Q("svg",$Ne,t[0]||(t[0]=[rc('<g clip-path="url(#clip0_339_278)"><path fill-rule="evenodd" clip-rule="evenodd" d="M5.12738 3.87939L3.966 5.04039L18.9109 19.9856L20.0723 18.8243L5.12738 3.87939Z" fill="currentColor"></path> <path d="M6.41963 7.49403L7.51275 8.58715C6.31613 9.60603 5.36325 10.8743 4.7475 11.9839L4.74563 11.9877C6.4605 14.8549 9.1815 17.5647 12.6158 17.1537C13.5428 17.0427 14.4075 16.7258 15.1976 16.2724L16.3043 17.3787C14.7641 18.3672 12.9986 18.8907 11.0858 18.6319C7.6365 18.1654 4.81613 15.3364 3.03825 12.0139C3.873 10.3343 5.01488 8.7274 6.41963 7.49403ZM8.90588 5.87403C9.87038 5.44428 10.914 5.19153 12.0285 5.17353C12.0904 5.17315 12.825 5.20803 13.158 5.26278C13.3669 5.29728 13.575 5.3404 13.7801 5.39403C17.052 6.2464 19.476 9.16428 21 12.0139C20.3606 13.305 19.5233 14.4132 18.5246 15.4928L17.4645 14.4327C18.2021 13.6377 18.8228 12.8723 19.2964 12.0139C19.2964 12.0139 18.8145 11.1285 18.4534 10.6478C18.2213 10.3388 17.9771 10.0388 17.7206 9.74965C17.5181 9.52165 16.7318 8.74728 16.5446 8.58603C15.2891 7.5064 13.815 6.65928 12.0469 6.67353C11.3621 6.6844 10.7036 6.8194 10.0785 7.04665L8.90588 5.87403Z" fill="currentColor"></path> <path fill-rule="evenodd" clip-rule="evenodd" d="M9.39526 10.47L10.2949 11.3693C10.236 11.5481 10.2038 11.7394 10.2038 11.9378C10.2038 12.9398 11.0171 13.7531 12.0191 13.7531C12.2175 13.7531 12.4088 13.7213 12.5876 13.662L13.4873 14.5616C13.053 14.8054 12.552 14.9441 12.0191 14.9441C10.3598 14.9441 9.01276 13.5971 9.01276 11.9378C9.01276 11.4049 9.15188 10.9043 9.39526 10.47ZM11.9636 8.93215C11.982 8.93177 12.0008 8.9314 12.0191 8.9314C13.6785 8.9314 15.0255 10.2788 15.0255 11.9378C15.0255 11.9565 15.0255 11.9749 15.0251 11.9933L11.9636 8.93215Z" fill="currentColor"></path></g> <defs><clipPath id="clip0_339_278"><rect width="24" height="24" fill="white"></rect></clipPath></defs>',3)]))}const VNe=wt(FNe,[["render",BNe]]),HNe={},UNe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function zNe(e,t){return L(),Q("svg",UNe,t[0]||(t[0]=[H("path",{d:"M12 0C9.62663 0 7.30655 0.703788 5.33316 2.02236C3.35977 3.34094 1.8217 5.21508 0.913451 7.4078C0.00519922 9.60051 -0.232441 12.0133 0.230582 14.3411C0.693605 16.6689 1.83649 18.807 3.51472 20.4853C5.19295 22.1635 7.33115 23.3064 9.65892 23.7694C11.9867 24.2324 14.3995 23.9948 16.5922 23.0865C18.7849 22.1783 20.6591 20.6402 21.9776 18.6668C23.2962 16.6934 24 14.3734 24 12C23.9965 8.81847 22.7311 5.76826 20.4814 3.51858C18.2317 1.2689 15.1815 0.00349392 12 0ZM4.9044 20.4504C5.61661 19.1963 6.64848 18.1534 7.8949 17.4278C9.14133 16.7023 10.5578 16.32 12 16.32C13.4422 16.32 14.8587 16.7023 16.1051 17.4278C17.3515 18.1534 18.3834 19.1963 19.0956 20.4504C17.1095 22.1228 14.5965 23.04 12 23.04C9.40353 23.04 6.89051 22.1228 4.9044 20.4504ZM19.8204 19.7844C18.628 17.7908 16.7163 16.3305 14.4792 15.7044C15.5193 15.1512 16.3446 14.2661 16.8237 13.1899C17.3027 12.1137 17.4082 10.9081 17.1231 9.76508C16.8381 8.62203 16.1789 7.60714 15.2506 6.88188C14.3223 6.15661 13.1781 5.76264 12 5.76264C10.8219 5.76264 9.67773 6.15661 8.7494 6.88188C7.82106 7.60714 7.16194 8.62203 6.8769 9.76508C6.59185 10.9081 6.69726 12.1137 7.17635 13.1899C7.65544 14.2661 8.48069 15.1512 9.5208 15.7044C7.28375 16.3305 5.37205 17.7908 4.17961 19.7844C2.63958 18.2389 1.59204 16.2717 1.16926 14.1312C0.746474 11.9907 0.967405 9.77296 1.80415 7.75797C2.6409 5.74297 4.05595 4.02109 5.87061 2.80974C7.68527 1.5984 9.81818 0.951907 12 0.951907C14.1818 0.951907 16.3147 1.5984 18.1294 2.80974C19.9441 4.02109 21.3591 5.74297 22.1959 7.75797C23.0326 9.77296 23.2535 11.9907 22.8307 14.1312C22.408 16.2717 21.3604 18.2389 19.8204 19.7844ZM12 15.36C11.1456 15.36 10.3104 15.1066 9.59994 14.6319C8.88952 14.1573 8.33581 13.4826 8.00884 12.6932C7.68187 11.9038 7.59632 11.0352 7.76301 10.1972C7.9297 9.35921 8.34114 8.58946 8.9453 7.9853C9.54947 7.38113 10.3192 6.96969 11.1572 6.80301C11.9952 6.63632 12.8638 6.72187 13.6532 7.04884C14.4426 7.37581 15.1173 7.92951 15.592 8.63994C16.0666 9.35036 16.32 10.1856 16.32 11.04C16.32 12.1857 15.8649 13.2845 15.0547 14.0947C14.2445 14.9049 13.1457 15.36 12 15.36Z",fill:"currentColor"},null,-1),D(),H("circle",{cx:"12",cy:"12",r:"11.625",stroke:"currentColor","stroke-width":"0.75"},null,-1)]))}const WNe=wt(HNe,[["render",zNe]]),jNe={},ZNe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function qNe(e,t){return L(),Q("svg",ZNe,t[0]||(t[0]=[rc('<g clip-path="url(#clip0_11_315)"><path d="M12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.37258 0 0 5.37258 0 12C0 18.6274 5.37258 24 12 24Z" fill="#A6CE39"></path> <path d="M8.10938 17.4375H6.65625V7.40625H8.10938V17.4375ZM10.2188 7.40625H14.1094C17.8125 7.40625 19.4531 10.0781 19.4531 12.4219C19.4531 15 17.4375 17.4375 14.1094 17.4375H10.1719L10.2188 7.40625ZM11.6719 16.1719H13.9688C17.25 16.1719 18 13.6875 18 12.4688C18 10.4531 16.7344 8.76562 13.9219 8.76562H11.7188L11.6719 16.1719ZM8.34375 5.34375C8.34375 5.85938 7.92188 6.28125 7.40625 6.28125C6.89062 6.28125 6.46875 5.85938 6.46875 5.34375C6.46875 5.09511 6.56752 4.85665 6.74334 4.68084C6.91915 4.50502 7.15761 4.40625 7.40625 4.40625C7.92188 4.40625 8.34375 4.82812 8.34375 5.34375Z" fill="white"></path></g> <defs><clipPath id="clip0_11_315"><rect width="24" height="24" fill="white"></rect></clipPath></defs>',3)]))}const GNe=wt(jNe,[["render",qNe]]),KNe={},YNe={viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"mr-2 inline-block w-6 align-middle"};function XNe(e,t){return L(),Q("svg",YNe,t[0]||(t[0]=[H("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M29.474 16c0 7.442-6.032 13.474-13.474 13.474S2.526 23.442 2.526 16 8.558 2.526 16 2.526 29.474 8.558 29.474 16Z",fill:"#fff"},null,-1),D(),H("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M32 16c0 8.837-7.163 16-16 16S0 24.837 0 16 7.163 0 16 0s16 7.163 16 16ZM16 29.474c7.442 0 13.474-6.032 13.474-13.474S23.442 2.526 16 2.526 2.526 8.558 2.526 16 8.558 29.474 16 29.474Z",fill:"#7FAA26"},null,-1),D(),H("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.22 10.973h-4.547v11.6h4.569c3.8 0 6.133-2.82 6.133-5.8 0-1.365-.469-2.815-1.478-3.925-1.013-1.115-2.557-1.875-4.676-1.875Zm-.177 9.732h-2.347v-7.864h2.264c1.521 0 2.603.46 3.304 1.167.703.709 1.046 1.688 1.046 2.765 0 .654-.2 1.641-.83 2.46-.621.808-1.677 1.473-3.437 1.473Zm-.083-8.073c3.13 0 4.558 1.898 4.558 4.141 0-2.243-1.429-4.141-4.558-4.141h-2.472 2.472Zm6.205 4.017.001.124c0 2.869-2.242 5.591-5.924 5.591h-4.36V11.182v11.182h4.36c3.682 0 5.924-2.722 5.924-5.591l-.001-.124ZM9.5 11.005v11.588h2.024V11.005H9.5Zm1.815.208v11.172-11.172H9.71h1.606ZM10.512 10.15c.7 0 1.262-.575 1.262-1.263 0-.687-.561-1.262-1.262-1.262-.7 0-1.262.563-1.262 1.262 0 .688.561 1.262 1.262 1.262Zm.614-.408a1.044 1.044 0 0 0 0 0Z",fill:"#7FAA26"},null,-1)]))}const JNe=wt(KNe,[["render",XNe]]),QNe={},eFe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function tFe(e,t){return L(),Q("svg",eFe,t[0]||(t[0]=[H("path",{d:"M18 11.7578C18.3125 11.9714 18.5911 12.2135 18.8359 12.4844C19.0807 12.7552 19.2917 13.0521 19.4688 13.375C19.6458 13.6979 19.776 14.0391 19.8594 14.3984C19.9427 14.7578 19.9896 15.125 20 15.5C20 16.1198 19.8828 16.7031 19.6484 17.25C19.4141 17.7969 19.0911 18.2734 18.6797 18.6797C18.2682 19.0859 17.7917 19.4062 17.25 19.6406C16.7083 19.875 16.125 19.9948 15.5 20C15.026 20 14.5677 19.9297 14.125 19.7891C13.6823 19.6484 13.276 19.4453 12.9062 19.1797C12.5365 18.9141 12.2083 18.5964 11.9219 18.2266C11.6354 17.8568 11.4141 17.4479 11.2578 17H5V5H7V4H8V5H15V4H16V5H18V11.7578ZM6 6V8H17V6H16V7H15V6H8V7H7V6H6ZM11.0234 16C11.0078 15.8385 11 15.6719 11 15.5C11 14.8802 11.1172 14.2969 11.3516 13.75C11.5859 13.2031 11.9089 12.7266 12.3203 12.3203C12.7318 11.9141 13.2083 11.5938 13.75 11.3594C14.2917 11.125 14.875 11.0052 15.5 11C16.0208 11 16.5208 11.0859 17 11.2578V9H6V16H11.0234ZM15.5 19C15.9844 19 16.4375 18.9089 16.8594 18.7266C17.2812 18.5443 17.651 18.2943 17.9688 17.9766C18.2865 17.6589 18.5365 17.2891 18.7188 16.8672C18.901 16.4453 18.9948 15.9896 19 15.5C19 15.0156 18.9089 14.5625 18.7266 14.1406C18.5443 13.7188 18.2943 13.349 17.9766 13.0312C17.6589 12.7135 17.2891 12.4635 16.8672 12.2812C16.4453 12.099 15.9896 12.0052 15.5 12C15.0156 12 14.5625 12.0911 14.1406 12.2734C13.7188 12.4557 13.349 12.7057 13.0312 13.0234C12.7135 13.3411 12.4635 13.7109 12.2812 14.1328C12.099 14.5547 12.0052 15.0104 12 15.5C12 15.9844 12.0911 16.4375 12.2734 16.8594C12.4557 17.2812 12.7057 17.651 13.0234 17.9688C13.3411 18.2865 13.7109 18.5365 14.1328 18.7188C14.5547 18.901 15.0104 18.9948 15.5 19ZM16 15H17.5V16H15V13H16V15Z",fill:"currentColor"},null,-1)]))}const nFe=wt(QNe,[["render",tFe]]),sFe={},oFe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function rFe(e,t){return L(),Q("svg",oFe,t[0]||(t[0]=[H("g",{"clip-path":"url(#clip0_359_48)"},[H("path",{d:"M3 21H8V20H4V4H6V6H16V4H18V7H18.4C18.619 7.0052 18.83 7.08293 19 7.221V3H16V2H13C13 1.46957 12.7893 0.960859 12.4142 0.585786C12.0391 0.210714 11.5304 0 11 0C10.4696 0 9.96086 0.210714 9.58579 0.585786C9.21071 0.960859 9 1.46957 9 2H6V3H3V21ZM7 3H10V1.615C10 1.45206 10.0647 1.29579 10.1798 1.18048C10.2949 1.06518 10.4511 1.00026 10.614 1H11.385C11.5481 1 11.7045 1.06479 11.8199 1.18013C11.9352 1.29546 12 1.45189 12 1.615V3H15V5H7V3ZM11 17H20V18H11V17ZM9 8V24H22V11.6L18.4 8H9ZM21 23H10V9H17V13H21V23ZM21 12H18V9H18.31L21 11.69V12ZM11 14H20V15H11V14ZM11 20H18V21H11V20Z",fill:"currentColor"})],-1),D(),H("defs",null,[H("clipPath",{id:"clip0_359_48"},[H("rect",{width:"24",height:"24",fill:"white"})])],-1)]))}const iFe=wt(sFe,[["render",rFe]]),aFe={},lFe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function cFe(e,t){return L(),Q("svg",lFe,t[0]||(t[0]=[rc('<g clip-path="url(#clip0_114_79)"><path d="M23.5312 11.9225H23.25V8.54752V5.54752C23.25 4.55068 22.468 3.73332 21.4852 3.67604L21.0037 1.6869C20.8579 1.08469 20.2493 0.71335 19.6472 0.859225L7.97203 3.68565C7.94105 3.67735 7.90861 3.67252 7.875 3.67252H1.875C0.841125 3.67252 0 4.51365 0 5.54752V21.2975C0 22.3314 0.841125 23.1725 1.875 23.1725H21.375C22.4089 23.1725 23.25 22.3314 23.25 21.2975V17.9225H23.5312C23.7897 17.9225 24 17.7122 24 17.4538V12.3913C24 12.1328 23.7897 11.9225 23.5312 11.9225ZM22.5 5.54752V5.54832C22.3119 5.4068 22.0965 5.30012 21.8632 5.23716L21.6759 4.46373C22.1505 4.59568 22.5 5.03143 22.5 5.54752ZM1.875 4.42252H4.92825L1.80023 5.17979C1.79827 5.18016 1.79639 5.18077 1.79447 5.18119L1.78673 5.18307C1.78575 5.1833 1.78477 5.18368 1.78378 5.18396C1.773 5.18663 1.76245 5.18977 1.75205 5.19333C1.75017 5.19399 1.74839 5.19469 1.74656 5.19535C1.73695 5.19887 1.72753 5.20266 1.71825 5.20693C1.71562 5.20815 1.71309 5.20941 1.71052 5.21063C1.70236 5.21462 1.69434 5.21883 1.68656 5.22338C1.68333 5.22526 1.68014 5.22723 1.67695 5.22924C1.67006 5.23355 1.66327 5.23805 1.65666 5.24279C1.65314 5.24532 1.64972 5.2479 1.6463 5.25052C1.6402 5.25521 1.6343 5.26004 1.62853 5.2651C1.62516 5.26805 1.62187 5.27105 1.61864 5.2741C1.61306 5.27935 1.60767 5.28469 1.60242 5.29023C1.59947 5.29332 1.59661 5.29651 1.5938 5.29974C1.58859 5.30565 1.58353 5.31174 1.5787 5.31798C1.57627 5.32107 1.57392 5.32426 1.57162 5.3274C1.5668 5.33405 1.5622 5.34085 1.5578 5.34779C1.55583 5.35088 1.55395 5.35402 1.55208 5.35721C1.54781 5.36438 1.54383 5.37169 1.54008 5.37915C1.53839 5.38252 1.5368 5.3859 1.5352 5.38927C1.53178 5.39663 1.52859 5.40404 1.52564 5.41163C1.52409 5.41562 1.52264 5.41965 1.52123 5.42368C1.5188 5.43071 1.5165 5.43779 1.51444 5.44505C1.51298 5.45012 1.51172 5.45527 1.5105 5.46043C1.509 5.46671 1.50759 5.47299 1.50642 5.47937C1.5052 5.48583 1.50431 5.4924 1.50342 5.49891C1.50272 5.50426 1.50206 5.50955 1.50159 5.51494C1.50094 5.52254 1.50061 5.53023 1.50042 5.53791C1.50033 5.54101 1.49995 5.54405 1.49995 5.54719C1.49995 5.54898 1.50019 5.55066 1.50023 5.55244C1.50033 5.5599 1.5008 5.56735 1.50136 5.5749C1.50178 5.58038 1.50216 5.58587 1.50277 5.5913C1.50352 5.59754 1.50455 5.60377 1.50563 5.61005C1.50675 5.61662 1.50788 5.62318 1.50933 5.62965C1.5098 5.63166 1.50998 5.63368 1.51045 5.63569C1.51134 5.63926 1.51261 5.64263 1.51355 5.64615C1.51533 5.65276 1.5172 5.65932 1.51936 5.66579C1.52133 5.67169 1.52348 5.67746 1.52573 5.68318C1.52784 5.68862 1.52995 5.69396 1.53234 5.69926C1.5353 5.70591 1.53848 5.71238 1.54177 5.7188C1.54383 5.72279 1.54589 5.72682 1.54809 5.73071C1.55217 5.73798 1.55648 5.74501 1.56098 5.75194C1.56286 5.7548 1.56473 5.75766 1.56666 5.76048C1.57181 5.76793 1.57725 5.77515 1.58292 5.78218C1.58461 5.78429 1.58634 5.78644 1.58812 5.78851C1.59422 5.79573 1.60055 5.80271 1.60716 5.80946C1.60889 5.81124 1.61062 5.81302 1.61245 5.81476C1.61925 5.82141 1.62623 5.82779 1.6335 5.83388C1.63547 5.83552 1.63744 5.83716 1.63945 5.8388C1.64672 5.84466 1.65417 5.85029 1.66191 5.85558C1.66416 5.85718 1.66645 5.85873 1.66875 5.86023C1.67648 5.86533 1.68441 5.87012 1.69247 5.87466C1.69491 5.87602 1.69734 5.87734 1.69978 5.87865C1.70812 5.88305 1.71666 5.88713 1.72533 5.89093C1.72763 5.89191 1.72992 5.89294 1.73227 5.89388C1.7415 5.89773 1.75087 5.9011 1.76044 5.90419C1.76227 5.90476 1.76409 5.90537 1.76592 5.90593C1.77638 5.90912 1.78692 5.91183 1.79766 5.91408C1.79869 5.91427 1.79967 5.91455 1.8007 5.91474C1.81242 5.91713 1.82428 5.91891 1.83623 5.92018C1.83647 5.92018 1.8367 5.92023 1.83694 5.92027C1.84941 5.92154 1.86197 5.92219 1.87467 5.92219C1.87477 5.92219 1.87491 5.92219 1.875 5.92219H1.87594C1.88063 5.92219 1.88522 5.92238 1.88991 5.92219H19.5C19.7071 5.92219 19.875 5.75429 19.875 5.54719C19.875 5.3401 19.7071 5.17219 19.5 5.17219H5.01867L19.8237 1.58813C20.024 1.53952 20.2263 1.66313 20.2747 1.86338L21.0758 5.17229H21.0002C20.7931 5.17229 20.6252 5.34019 20.6252 5.54729C20.6252 5.75438 20.7931 5.92229 21.0002 5.92229H21.375C21.4127 5.92229 21.45 5.92426 21.4868 5.92787C21.5014 5.93058 21.5161 5.93237 21.531 5.93335C22.0778 6.00957 22.5 6.47991 22.5 7.04729V7.04855C22.1864 6.81258 21.7968 6.67252 21.375 6.67252H1.875C1.25466 6.67252 0.75 6.16782 0.75 5.54752C0.75 4.92723 1.2547 4.42252 1.875 4.42252ZM22.5 21.2975C22.5 21.9178 21.9953 22.4225 21.375 22.4225H1.875C1.25466 22.4225 0.75 21.9178 0.75 21.2975V7.04649C1.06359 7.28246 1.45322 7.42252 1.875 7.42252H21.375C21.9953 7.42252 22.5 7.92723 22.5 8.54752V11.9225H17.0157C16.7314 11.9225 16.5 12.1539 16.5 12.4382V17.4068C16.5 17.6911 16.7314 17.9225 17.0157 17.9225H22.5V21.2975ZM23.25 17.1725H17.25V12.6725H22.8696C22.8714 12.6725 22.8732 12.6728 22.875 12.6728C22.8768 12.6728 22.8786 12.6726 22.8804 12.6725H23.25V17.1725Z" fill="currentColor"></path> <path d="M20.25 14.5475C20.0429 14.5475 19.875 14.7154 19.875 14.9225C19.875 15.1293 19.7068 15.2975 19.5 15.2975C19.2932 15.2975 19.125 15.1293 19.125 14.9225C19.125 14.7158 19.2932 14.5475 19.5 14.5475C19.7071 14.5475 19.875 14.3796 19.875 14.1725C19.875 13.9654 19.7071 13.7975 19.5 13.7975C18.8797 13.7975 18.375 14.3022 18.375 14.9225C18.375 15.5428 18.8797 16.0475 19.5 16.0475C20.1203 16.0475 20.625 15.5428 20.625 14.9225C20.625 14.7154 20.4571 14.5475 20.25 14.5475Z" fill="currentColor"></path></g> <defs><clipPath id="clip0_114_79"><rect width="24" height="24" fill="white"></rect></clipPath></defs>',3)]))}const uFe=wt(aFe,[["render",cFe]]),dFe={},fFe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function pFe(e,t){return L(),Q("svg",fFe,t[0]||(t[0]=[H("path",{d:"M8 11C9.10457 11 10 10.1046 10 9C10 7.89543 9.10457 7 8 7C6.89543 7 6 7.89543 6 9C6 10.1046 6.89543 11 8 11Z",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),D(),H("path",{d:"M6.56055 21C12.1305 8.89997 16.7605 6.77997 22.0005 14.63",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),D(),H("path",{d:"M18 3H6C3.79086 3 2 4.79086 2 7V17C2 19.2091 3.79086 21 6 21H18C20.2091 21 22 19.2091 22 17V7C22 4.79086 20.2091 3 18 3Z",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const mFe=wt(dFe,[["render",pFe]]),hFe={},gFe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function vFe(e,t){return L(),Q("svg",gFe,t[0]||(t[0]=[H("path",{d:"M19.1835 7.80516L16.2188 4.83755C14.1921 2.8089 13.1788 1.79457 12.0904 2.03468C11.0021 2.2748 10.5086 3.62155 9.5217 6.31506L8.85373 8.1381C8.59063 8.85617 8.45908 9.2152 8.22239 9.49292C8.11619 9.61754 7.99536 9.72887 7.86251 9.82451C7.56644 10.0377 7.19811 10.1392 6.46145 10.3423C4.80107 10.8 3.97088 11.0289 3.65804 11.5721C3.5228 11.8069 3.45242 12.0735 3.45413 12.3446C3.45809 12.9715 4.06698 13.581 5.28476 14.8L6.69935 16.2163L2.22345 20.6964C1.92552 20.9946 1.92552 21.4782 2.22345 21.7764C2.52138 22.0746 3.00443 22.0746 3.30236 21.7764L7.77841 17.2961L9.24441 18.7635C10.4699 19.9902 11.0827 20.6036 11.7134 20.6045C11.9792 20.6049 12.2404 20.5358 12.4713 20.4041C13.0192 20.0914 13.2493 19.2551 13.7095 17.5825C13.9119 16.8472 14.013 16.4795 14.2254 16.1835C14.3184 16.054 14.4262 15.9358 14.5468 15.8314C14.8221 15.593 15.1788 15.459 15.8922 15.191L17.7362 14.4981C20.4 13.4973 21.7319 12.9969 21.9667 11.9115C22.2014 10.826 21.1954 9.81905 19.1835 7.80516Z",fill:"currentColor"},null,-1)]))}const bFe=wt(hFe,[["render",vFe]]),yFe={},_Fe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function SFe(e,t){return L(),Q("svg",_Fe,t[0]||(t[0]=[H("path",{d:"M8.242 5.0785L7.984 7.0945H16.8197L16.5617 5.0785C16.5617 4.46875 16.0697 4 15.46 4H9.319C8.70925 4 8.2405 4.46875 8.2405 5.0785H8.242ZM5.0785 8.1955H19.7267C20.3365 8.1955 20.8052 8.66425 20.8052 9.274V15.6962C20.8052 16.306 20.3365 16.7747 19.7267 16.7747H17.7347V19.7515H7.0705V16.7747H5.0785C4.46875 16.7747 4 16.306 4 15.6962V9.274C4 8.66425 4.46875 8.1955 5.0785 8.1955ZM16.6562 18.6722V11.7115H8.14825V18.6722H16.6562ZM15.391 13.7267H9.29725C9.15625 13.7267 9.03925 13.5857 9.03925 13.4455V13.117C9.03925 12.976 9.15625 12.859 9.29725 12.859H15.391C15.532 12.859 15.6722 12.976 15.6722 13.117V13.4455C15.6722 13.5865 15.5312 13.7267 15.391 13.7267ZM15.391 15.6722H9.29725C9.15625 15.6722 9.03925 15.5312 9.03925 15.391V15.0625C9.03925 14.9215 9.15625 14.8045 9.29725 14.8045H15.391C15.532 14.8045 15.6722 14.9215 15.6722 15.0625V15.391C15.6722 15.532 15.5312 15.6722 15.391 15.6722ZM15.391 17.617H9.29725C9.15625 17.617 9.03925 17.476 9.03925 17.3357V17.0072C9.03925 16.8662 9.15625 16.7492 9.29725 16.7492H15.391C15.532 16.7492 15.6722 16.8662 15.6722 17.0072V17.3357C15.6722 17.4767 15.5312 17.617 15.391 17.617Z",fill:"currentColor"},null,-1)]))}const CFe=wt(yFe,[["render",SFe]]),wFe={},EFe={viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function kFe(e,t){return L(),Q("svg",EFe,t[0]||(t[0]=[rc('<g clip-path="url(#clip0_385_53)"><path d="M18 5.20512H15.1796V3.99075H7.49661L6.58583 1.56201H0V16.438H15.1796V16.173L18 5.20512ZM17.2167 5.81231L15.1796 13.7349V5.81231H17.2167ZM0.607185 2.1692H6.16505L7.07583 4.59794H14.5724V5.20512V15.8309H0.607185V2.1692Z" fill="currentColor"></path> <path d="M1.82155 14.6165H9.10777V10.0626H1.82155V14.6165ZM2.42873 10.6698H8.50058V14.0093H2.42873V10.6698Z" fill="currentColor"></path> <path d="M6.07184 12.7949H3.33951C3.17163 12.7949 3.03592 12.9306 3.03592 13.0985C3.03592 13.2664 3.17163 13.4021 3.33951 13.4021H6.07184C6.23973 13.4021 6.37544 13.2664 6.37544 13.0985C6.37544 12.9306 6.23973 12.7949 6.07184 12.7949Z" fill="currentColor"></path> <path d="M3.33951 11.8842H4.55388C4.72177 11.8842 4.85747 11.7485 4.85747 11.5806C4.85747 11.4127 4.72177 11.277 4.55388 11.277H3.33951C3.17163 11.277 3.03592 11.4127 3.03592 11.5806C3.03592 11.7485 3.17163 11.8842 3.33951 11.8842Z" fill="currentColor"></path> <path d="M7.58981 11.277H6.98262C6.81474 11.277 6.67903 11.4127 6.67903 11.5806C6.67903 11.7485 6.81474 11.8842 6.98262 11.8842H7.58981C7.7577 11.8842 7.8934 11.7485 7.8934 11.5806C7.8934 11.4127 7.7577 11.277 7.58981 11.277Z" fill="currentColor"></path> <path d="M7.07066 12.883C7.01571 12.9403 6.98262 13.0162 6.98262 13.0985C6.98262 13.1805 7.01571 13.2564 7.07066 13.311C7.12804 13.3684 7.20394 13.4021 7.28621 13.4021C7.36515 13.4021 7.44408 13.3687 7.50176 13.3141C7.55641 13.2564 7.58981 13.1774 7.58981 13.0985C7.58981 13.0196 7.55641 12.9403 7.50176 12.883C7.38943 12.7706 7.18299 12.7706 7.07066 12.883Z" fill="currentColor"></path> <path d="M5.76825 11.8842C5.84719 11.8842 5.92612 11.8508 5.9838 11.7961C6.03845 11.7384 6.07185 11.6595 6.07185 11.5806C6.07185 11.4983 6.03845 11.4224 5.9838 11.365C5.87147 11.2527 5.66169 11.2527 5.5527 11.365C5.49775 11.4224 5.46466 11.5016 5.46466 11.5806C5.46466 11.6595 5.49775 11.7384 5.5527 11.7961C5.61008 11.8508 5.68932 11.8842 5.76825 11.8842Z" fill="currentColor"></path></g> <defs><clipPath id="clip0_385_53"><rect width="18" height="18" fill="white"></rect></clipPath></defs>',3)]))}const xFe=wt(wFe,[["render",kFe]]),TFe={},IFe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function AFe(e,t){return L(),Q("svg",IFe,t[0]||(t[0]=[H("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M9.11241 7.82201C9.44756 6.83666 10.5551 6 12 6C13.7865 6 15 7.24054 15 8.5C15 9.75946 13.7865 11 12 11C11.4477 11 11 11.4477 11 12V14C11 14.5523 11.4477 15 12 15C12.5523 15 13 14.5523 13 14V12.9082C15.203 12.5001 17 10.7706 17 8.5C17 5.89347 14.6319 4 12 4C9.82097 4 7.86728 5.27185 7.21894 7.17799C7.0411 7.70085 7.3208 8.26889 7.84366 8.44673C8.36653 8.62458 8.93457 8.34488 9.11241 7.82201ZM12 20C12.8285 20 13.5 19.3284 13.5 18.5C13.5 17.6716 12.8285 17 12 17C11.1716 17 10.5 17.6716 10.5 18.5C10.5 19.3284 11.1716 20 12 20Z",fill:"currentColor"},null,-1)]))}const OFe=wt(TFe,[["render",AFe]]),RFe={},DFe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function LFe(e,t){return L(),Q("svg",DFe,t[0]||(t[0]=[rc('<rect width="24" height="24"></rect> <g clip-path="url(#clip0_3406_6112)"><path d="M18 7.7V7H16.5L12 4L7.4 7H6V7.7L4 9V20H20V9.1L18 7.7ZM12 5.2L14.7 7H9.2L12 5.2ZM7 8H17V11.7L13.5 13.4L12 12.1L10.5 13.5L7 11.8V8ZM5 9.5L6 8.8V11.2L5 10.8V9.5ZM5 11.9L9.6 14.2L5 18.2V11.9ZM5.9 19L12 13.7L18.1 19H5.9ZM19 18.2L14.3 14.1L19 11.8V18.2ZM19 10.7L18 11.2V8.9L19 9.6V10.7Z" fill="currentColor"></path></g> <defs><clipPath id="clip0_3406_6112"><rect width="16" height="16" fill="white" transform="translate(4 4)"></rect></clipPath></defs>',5)]))}const PFe=wt(RFe,[["render",LFe]]),MFe={},NFe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function FFe(e,t){return L(),Q("svg",NFe,t[0]||(t[0]=[rc('<g clip-path="url(#clip0_446_210)"><path d="M12 11.3334C12.9839 11.3347 13.9461 11.0441 14.7649 10.4985C15.5836 9.95279 16.2221 9.17653 16.5995 8.26789C16.977 7.35924 17.0764 6.35906 16.8853 5.39389C16.6941 4.42872 16.221 3.54194 15.5257 2.84574C14.8304 2.14954 13.9443 1.67521 12.9794 1.48277C12.0145 1.29033 11.0142 1.38843 10.105 1.76465C9.19586 2.14088 8.41874 2.77832 7.87196 3.59632C7.32519 4.41433 7.03334 5.37613 7.03334 6.36005C7.03334 7.67791 7.5564 8.94188 8.48764 9.87437C9.41888 10.8069 10.6822 11.3316 12 11.3334ZM12 2.71338C12.7205 2.71206 13.4252 2.92459 14.0248 3.32406C14.6244 3.72352 15.092 4.29194 15.3683 4.95733C15.6446 5.62273 15.7173 6.35516 15.5771 7.06187C15.4368 7.76858 15.09 8.41778 14.5805 8.92725C14.0711 9.43671 13.4219 9.78352 12.7152 9.92376C12.0085 10.064 11.276 9.99135 10.6106 9.71502C9.94523 9.43869 9.37681 8.97111 8.97735 8.3715C8.57788 7.77188 8.36536 7.06721 8.36667 6.34672C8.36844 5.38364 8.7518 4.46051 9.4328 3.77951C10.1138 3.09851 11.0369 2.71515 12 2.71338Z" fill="currentColor"></path> <path d="M4 21.26V17.18C5.02925 16.0998 6.27203 15.2456 7.64932 14.6717C9.0266 14.0978 10.5082 13.8169 12 13.8467C14.0417 13.8192 16.0513 14.3567 17.8067 15.4L18.7067 14.3933C16.6998 13.1293 14.3716 12.4697 12 12.4933C10.2648 12.4491 8.54122 12.7883 6.95213 13.4866C5.36304 14.1849 3.94758 15.2252 2.80666 16.5333C2.71773 16.6479 2.66858 16.7883 2.66666 16.9333V21.26C2.6577 21.6231 2.79296 21.975 3.04285 22.2387C3.29274 22.5023 3.6369 22.6562 4 22.6667H12.26L10.9933 21.3333L4 21.26Z" fill="currentColor"></path> <path d="M20 21.26V21.3333H17.9L16.7 22.6667H20C20.3584 22.6562 20.6985 22.506 20.9477 22.2482C21.1968 21.9903 21.3352 21.6452 21.3333 21.2867V17.4667L20 18.9533V21.26Z" fill="currentColor"></path> <path d="M23.1733 12.4133C23.0415 12.296 22.8685 12.2357 22.6923 12.2457C22.5161 12.2557 22.351 12.3352 22.2333 12.4667L14.4867 21.1333L11.02 17.4067C10.9631 17.3401 10.8936 17.2854 10.8156 17.2458C10.7376 17.2061 10.6525 17.1821 10.5652 17.1753C10.4779 17.1685 10.3901 17.1789 10.3069 17.2061C10.2236 17.2332 10.1465 17.2764 10.08 17.3333C10.0148 17.3926 9.96205 17.4643 9.92472 17.5441C9.8874 17.6239 9.86627 17.7103 9.86255 17.7983C9.85883 17.8864 9.8726 17.9743 9.90305 18.0569C9.93351 18.1396 9.98006 18.2154 10.04 18.28L14.5 23.08L23.2267 13.3333C23.3379 13.2026 23.3945 13.034 23.3846 12.8626C23.3746 12.6913 23.299 12.5303 23.1733 12.4133Z" fill="currentColor"></path></g> <defs><clipPath id="clip0_446_210"><rect width="24" height="24" fill="white"></rect></clipPath></defs>',3)]))}const $Fe=wt(MFe,[["render",FFe]]),BFe={},VFe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function HFe(e,t){return L(),Q("svg",VFe,t[0]||(t[0]=[H("path",{d:"M6.385 13.615H8.588L13.858 8.346C13.944 8.24733 14.0083 8.144 14.051 8.036C14.0937 7.92733 14.115 7.81967 14.115 7.713C14.115 7.60633 14.0927 7.501 14.048 7.397C14.0033 7.29233 13.94 7.19067 13.858 7.092L12.938 6.142C12.8527 6.056 12.7533 5.99167 12.64 5.949C12.5273 5.90633 12.416 5.885 12.306 5.885C12.1993 5.885 12.092 5.90633 11.984 5.949C11.8753 5.99167 11.772 6.056 11.674 6.142L6.384 11.412L6.385 13.615ZM7.269 12.731V11.781L10.717 8.333L11.179 8.821L11.649 9.301L8.219 12.731H7.269ZM11.179 8.821L11.649 9.301L10.717 8.333L11.179 8.821ZM11.809 13.615H17.615V12.615H12.81L11.809 13.615ZM3 20.077V4.615C3 4.155 3.15433 3.771 3.463 3.463C3.771 3.15433 4.155 3 4.615 3H19.385C19.845 3 20.229 3.15433 20.537 3.463C20.8457 3.771 21 4.155 21 4.615V15.385C21 15.845 20.846 16.2293 20.538 16.538C20.2293 16.846 19.845 17 19.385 17H6.077L3 20.077ZM5.65 16H19.385C19.5383 16 19.6793 15.936 19.808 15.808C19.936 15.6793 20 15.5383 20 15.385V4.615C20 4.46167 19.936 4.32067 19.808 4.192C19.6793 4.064 19.5383 4 19.385 4H4.615C4.46167 4 4.32067 4.064 4.192 4.192C4.064 4.32067 4 4.46167 4 4.615V17.645L5.65 16Z",fill:"currentColor"},null,-1)]))}const UFe=wt(BFe,[["render",HFe]]),zFe={},WFe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function jFe(e,t){return L(),Q("svg",WFe,t[0]||(t[0]=[H("path",{d:"M12 4C7.6 4 4 7.6 4 12C4 16.4 7.6 20 12 20C16.4 20 20 16.4 20 12C20 7.6 16.4 4 12 4ZM12 5.77778C13.3778 5.77778 14.6667 6.26667 15.7333 7.02222L7.02222 15.7333C6.26667 14.6667 5.77778 13.3778 5.77778 12C5.77778 8.57778 8.57778 5.77778 12 5.77778ZM12 18.2222C10.6222 18.2222 9.33333 17.7333 8.26667 16.9778L16.9778 8.26667C17.7333 9.33333 18.2222 10.6222 18.2222 12C18.2222 15.4222 15.4222 18.2222 12 18.2222Z",fill:"currentColor"},null,-1)]))}const ZFe=wt(zFe,[["render",jFe]]),qFe={},GFe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function KFe(e,t){return L(),Q("svg",GFe,t[0]||(t[0]=[H("path",{d:"M8.625 15.375C9.22174 15.375 9.79403 15.1379 10.216 14.716C10.6379 14.294 10.875 13.7217 10.875 13.125C10.875 12.5283 10.6379 11.956 10.216 11.534C9.79403 11.1121 9.22174 10.875 8.625 10.875C8.02826 10.875 7.45597 11.1121 7.03401 11.534C6.61205 11.956 6.375 12.5283 6.375 13.125C6.375 13.7217 6.61205 14.294 7.03401 14.716C7.45597 15.1379 8.02826 15.375 8.625 15.375ZM8.625 12C8.92337 12 9.20952 12.1185 9.4205 12.3295C9.63147 12.5405 9.75 12.8266 9.75 13.125C9.75 13.4234 9.63147 13.7095 9.4205 13.9205C9.20952 14.1315 8.92337 14.25 8.625 14.25C8.32663 14.25 8.04048 14.1315 7.8295 13.9205C7.61853 13.7095 7.5 13.4234 7.5 13.125C7.5 12.8266 7.61853 12.5405 7.8295 12.3295C8.04048 12.1185 8.32663 12 8.625 12ZM11.4375 16.5H5.8125C5.06658 16.5 4.35121 16.7963 3.82376 17.3238C3.29632 17.8512 3 18.5666 3 19.3125C3 19.7601 3.17779 20.1893 3.49426 20.5057C3.81073 20.8222 4.23995 21 4.6875 21H12.5625C13.0101 21 13.4393 20.8222 13.7557 20.5057C14.0722 20.1893 14.25 19.7601 14.25 19.3125C14.25 18.5666 13.9537 17.8512 13.4262 17.3238C12.8988 16.7963 12.1834 16.5 11.4375 16.5ZM12.5625 19.875H4.6875C4.53832 19.875 4.39524 19.8157 4.28975 19.7102C4.18426 19.6048 4.125 19.4617 4.125 19.3125C4.125 18.8649 4.30279 18.4357 4.61926 18.1193C4.93573 17.8028 5.36495 17.625 5.8125 17.625H11.4375C11.8851 17.625 12.3143 17.8028 12.6307 18.1193C12.9472 18.4357 13.125 18.8649 13.125 19.3125C13.125 19.4617 13.0657 19.6048 12.9602 19.7102C12.8548 19.8157 12.7117 19.875 12.5625 19.875ZM21 5.8125V11.4375C21 12.1834 20.7037 12.8988 20.1762 13.4262C19.6488 13.9537 18.9334 14.25 18.1875 14.25H15.0454L12.9608 16.3358C12.9084 16.388 12.8463 16.4293 12.778 16.4575C12.7096 16.4857 12.6364 16.5001 12.5625 16.5C12.4887 16.5002 12.4157 16.4856 12.3476 16.4572C12.2448 16.4147 12.1568 16.3426 12.0949 16.2501C12.0331 16.1576 12 16.0488 12 15.9375V13.6875C12 13.5383 12.0593 13.3952 12.1648 13.2898C12.2702 13.1843 12.4133 13.125 12.5625 13.125C12.7117 13.125 12.8548 13.1843 12.9602 13.2898C13.0657 13.3952 13.125 13.5383 13.125 13.6875V14.5796L14.4142 13.2892C14.4666 13.237 14.5287 13.1957 14.597 13.1675C14.6654 13.1393 14.7386 13.1249 14.8125 13.125H18.1875C18.6351 13.125 19.0643 12.9472 19.3807 12.6307C19.6972 12.3143 19.875 11.8851 19.875 11.4375V5.8125C19.875 5.36495 19.6972 4.93572 19.3807 4.61926C19.0643 4.30279 18.6351 4.125 18.1875 4.125H10.3125C9.86495 4.125 9.43573 4.30279 9.11926 4.61926C8.80279 4.93572 8.625 5.36495 8.625 5.8125V9.1875C8.625 9.33668 8.56574 9.47976 8.46025 9.58525C8.35476 9.69074 8.21168 9.75 8.0625 9.75C7.91332 9.75 7.77024 9.69074 7.66475 9.58525C7.55926 9.47976 7.5 9.33668 7.5 9.1875V5.8125C7.5 5.06658 7.79632 4.35121 8.32376 3.82376C8.85121 3.29632 9.56658 3 10.3125 3L18.1875 3C18.9334 3 19.6488 3.29632 20.1762 3.82376C20.7037 4.35121 21 5.06658 21 5.8125ZM12.1642 9.91425L14.5796 7.5H12.5625C12.4133 7.5 12.2702 7.44074 12.1648 7.33525C12.0593 7.22976 12 7.08668 12 6.9375C12 6.78832 12.0593 6.64524 12.1648 6.53975C12.2702 6.43426 12.4133 6.375 12.5625 6.375H15.9375C16.0112 6.37503 16.0842 6.38955 16.1524 6.41775C16.29 6.47547 16.3995 6.58496 16.4572 6.72263C16.4854 6.79076 16.5 6.86377 16.5 6.9375V10.3125C16.5 10.4617 16.4407 10.6048 16.3352 10.7102C16.2298 10.8157 16.0867 10.875 15.9375 10.875C15.7883 10.875 15.6452 10.8157 15.5398 10.7102C15.4343 10.6048 15.375 10.4617 15.375 10.3125V8.29537L12.9608 10.7108C12.9084 10.763 12.8463 10.8043 12.778 10.8325C12.7096 10.8607 12.6364 10.8751 12.5625 10.875C12.4886 10.8751 12.4154 10.8607 12.347 10.8325C12.2787 10.8043 12.2166 10.763 12.1642 10.7108C12.1119 10.6585 12.0703 10.5964 12.0419 10.5281C12.0136 10.4597 11.999 10.3865 11.999 10.3125C11.999 10.2385 12.0136 10.1653 12.0419 10.0969C12.0703 10.0286 12.1119 9.9665 12.1642 9.91425Z",fill:"currentColor",stroke:"currentColor","stroke-width":"0.25"},null,-1)]))}const YFe=wt(qFe,[["render",KFe]]),XFe={},JFe={viewBox:"0 0 24 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function QFe(e,t){return L(),Q("svg",JFe,t[0]||(t[0]=[rc('<g clip-path="url(#clip0_5753_4959)"><path d="M9.90815 1.38672L8.13303 4.10574L6.35645 1.38672H9.90815Z" fill="#53BAA1"></path> <path d="M17.3364 1.38672L15.5613 4.10574L13.7847 1.38672H17.3364Z" fill="#53BAA1"></path> <path d="M6.35645 17.6775L8.13303 14.957L9.90815 17.6775H6.35645Z" fill="#53BAA1"></path> <path d="M13.7847 17.6775L15.5613 14.957L17.3364 17.6775H13.7847Z" fill="#53BAA1"></path> <path d="M21.1589 10.1002C21.7881 9.98315 22.2667 9.70364 22.593 9.26315C22.9208 8.82266 23.0832 8.28705 23.0832 7.65925C23.0832 7.13827 22.9925 6.7051 22.8125 6.35681C22.6325 6.00851 22.3881 5.73193 22.0823 5.52559C21.7764 5.32071 21.4193 5.1729 21.0125 5.0851C20.6057 4.99729 20.1754 4.95339 19.7232 4.95339H16.2754V7.709C16.2476 7.62851 16.2184 7.54949 16.1862 7.47047C15.9476 6.89242 15.614 6.39925 15.1852 5.99242C14.7564 5.58559 14.2501 5.27242 13.6618 5.05437C13.075 4.83632 12.4325 4.72656 11.7359 4.72656C11.0393 4.72656 10.3984 4.83632 9.81007 5.05437C9.22324 5.27242 8.71544 5.58559 8.28666 5.99242C7.90324 6.35681 7.59593 6.79144 7.36471 7.29486C7.33105 6.93339 7.24617 6.62022 7.11007 6.35681C6.93007 6.00851 6.68568 5.73193 6.37983 5.52559C6.07398 5.32071 5.7169 5.1729 5.31007 5.0851C4.90324 4.99729 4.473 4.95339 4.0208 4.95339H0.574463V13.8627H2.5369V10.3007H3.50568L5.36861 13.8627H7.72178L5.45788 10.1002C6.08715 9.98315 6.56568 9.70364 6.89202 9.26315C6.90666 9.24266 6.91983 9.22071 6.93446 9.20022C6.93154 9.269 6.93007 9.33778 6.93007 9.40803C6.93007 10.1207 7.05007 10.7675 7.28861 11.3456C7.52715 11.9236 7.8608 12.4168 8.28958 12.8236C8.7169 13.2305 9.22471 13.5436 9.813 13.7617C10.3998 13.9797 11.0423 14.0895 11.7389 14.0895C12.4354 14.0895 13.0764 13.9797 13.6647 13.7617C14.2515 13.5436 14.7593 13.2305 15.1881 12.8236C15.6154 12.4168 15.9491 11.9236 16.1891 11.3456C16.2213 11.268 16.2506 11.1875 16.2784 11.107V13.8627H18.2408V10.3007H19.2096L21.0725 13.8627H23.4257L21.1589 10.1002ZM5.18715 8.21242C5.08178 8.34705 4.95007 8.4451 4.79056 8.50803C4.63105 8.57095 4.45251 8.609 4.25641 8.62071C4.05885 8.63388 3.873 8.63973 3.69593 8.63973H2.53837V6.61437H3.82178C3.99739 6.61437 4.17885 6.62754 4.36324 6.65242C4.54763 6.67729 4.71154 6.72559 4.85349 6.79729C4.99544 6.869 5.11398 6.97144 5.20617 7.10607C5.29837 7.24071 5.34519 7.42071 5.34519 7.64754C5.34519 7.889 5.29251 8.07778 5.18715 8.21242ZM14.3115 10.5597C14.1813 10.908 13.9954 11.2095 13.751 11.4656C13.5081 11.7217 13.2169 11.9207 12.8759 12.0641C12.5364 12.2075 12.1559 12.2778 11.7374 12.2778C11.3174 12.2778 10.9384 12.2061 10.5989 12.0641C10.2593 11.9222 9.96812 11.7217 9.72373 11.4656C9.4808 11.2095 9.29349 10.908 9.16324 10.5597C9.033 10.2114 8.96861 9.82803 8.96861 9.40803C8.96861 8.99681 9.033 8.61486 9.16324 8.26217C9.29349 7.90949 9.47934 7.60656 9.72373 7.35046C9.96666 7.09437 10.2579 6.89534 10.5989 6.75193C10.9384 6.60998 11.3174 6.53827 11.7374 6.53827C12.1574 6.53827 12.5364 6.60998 12.8759 6.75193C13.2154 6.89388 13.5067 7.09437 13.751 7.35046C13.994 7.60656 14.1813 7.91095 14.3115 8.26217C14.4418 8.61486 14.5062 8.99681 14.5062 9.40803C14.5062 9.82803 14.4418 10.2114 14.3115 10.5597ZM20.8881 8.21242C20.7828 8.34705 20.651 8.4451 20.4915 8.50803C20.332 8.57095 20.1535 8.609 19.9574 8.62071C19.7598 8.63388 19.574 8.63973 19.3969 8.63973H18.2393V6.61437H19.5228C19.6984 6.61437 19.8798 6.62754 20.0642 6.65242C20.2486 6.67729 20.4125 6.72559 20.5545 6.79729C20.6964 6.869 20.815 6.97144 20.9071 7.10607C20.9993 7.24071 21.0462 7.42071 21.0462 7.64754C21.0462 7.889 20.9935 8.07778 20.8881 8.21242Z" fill="#202826"></path></g> <defs><clipPath id="clip0_5753_4959"><rect width="24" height="17.2683" fill="white" transform="translate(0 0.898438)"></rect></clipPath></defs>',3)]))}const e$e=wt(XFe,[["render",QFe]]),t$e={},n$e={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function s$e(e,t){return L(),Q("svg",n$e,t[0]||(t[0]=[H("path",{d:"M15.5 14H14.71L14.43 13.73C15.4439 12.554 16.0011 11.0527 16 9.5C16 8.21442 15.6188 6.95772 14.9046 5.8888C14.1903 4.81988 13.1752 3.98676 11.9874 3.49479C10.7997 3.00282 9.49279 2.87409 8.23192 3.1249C6.97104 3.3757 5.81285 3.99477 4.90381 4.90381C3.99477 5.81285 3.3757 6.97104 3.1249 8.23192C2.87409 9.49279 3.00282 10.7997 3.49479 11.9874C3.98676 13.1752 4.81988 14.1903 5.8888 14.9046C6.95772 15.6188 8.21442 16 9.5 16C11.11 16 12.59 15.41 13.73 14.43L14 14.71V15.5L19 20.49L20.49 19L15.5 14ZM9.5 14C7.01 14 5 11.99 5 9.5C5 7.01 7.01 5 9.5 5C11.99 5 14 7.01 14 9.5C14 11.99 11.99 14 9.5 14Z",fill:"currentColor"},null,-1)]))}const o$e=wt(t$e,[["render",s$e]]),r$e={},i$e={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function a$e(e,t){return L(),Q("svg",i$e,t[0]||(t[0]=[rc('<g clip-path="url(#clip0_3404_6073)"><path d="M12.0666 7.33301C9.46657 7.33301 7.3999 9.39967 7.3999 11.9997C7.3999 14.5997 9.46657 16.6663 12.0666 16.6663C14.6666 16.6663 16.7332 14.5997 16.7332 11.9997C16.7332 9.39967 14.6666 7.33301 12.0666 7.33301ZM12.0666 15.333C10.1999 15.333 8.73324 13.8663 8.73324 11.9997C8.73324 10.133 10.1999 8.66634 12.0666 8.66634C13.9332 8.66634 15.3999 10.133 15.3999 11.9997C15.3999 13.8663 13.9332 15.333 12.0666 15.333Z" fill="currentColor"></path> <path d="M21.8666 9.79967L19.9999 9.19967L19.5999 8.19967L20.5333 6.46634C20.7333 6.06634 20.6666 5.53301 20.3333 5.19967L18.7333 3.59967C18.3999 3.26634 17.8666 3.19967 17.4666 3.39967L15.7333 4.33301L14.7333 3.93301L14.1333 2.06634C13.9999 1.66634 13.5999 1.33301 13.1333 1.33301H10.8666C10.3999 1.33301 9.99992 1.66634 9.93325 2.13301L9.33325 3.99967C8.93325 4.06634 8.59992 4.19967 8.26659 4.39967L6.53325 3.46634C6.13325 3.26634 5.59992 3.33301 5.26659 3.66634L3.66659 5.26634C3.33325 5.59967 3.26659 6.13301 3.46659 6.53301L4.33325 8.19967C4.19992 8.53301 4.06659 8.93301 3.93325 9.26634L2.06659 9.86634C1.66659 9.99967 1.33325 10.3997 1.33325 10.8663V13.133C1.33325 13.5997 1.66659 13.9997 2.13325 14.133L3.99992 14.733L4.39992 15.733L3.46659 17.4663C3.26659 17.8663 3.33325 18.3997 3.66659 18.733L5.26659 20.333C5.59992 20.6663 6.13325 20.733 6.53325 20.533L8.26659 19.5997L9.26659 19.9997L9.86659 21.933C9.99992 22.333 10.3999 22.6663 10.8666 22.6663H13.1333C13.5999 22.6663 13.9999 22.333 14.1333 21.933L14.7333 19.9997L15.7333 19.5997L17.4666 20.533C17.8666 20.733 18.3999 20.6663 18.7333 20.333L20.3333 18.733C20.6666 18.3997 20.7333 17.8663 20.5333 17.4663L19.5999 15.733L19.9999 14.733L21.9333 14.133C22.3333 13.9997 22.6666 13.5997 22.6666 13.133V10.8663C22.6666 10.3997 22.3333 9.93301 21.8666 9.79967ZM21.3333 12.933L18.9333 13.6663L18.8666 13.9997L18.2666 15.3997L18.0666 15.733L19.2666 17.933L17.9333 19.2663L15.7333 18.0663L15.3999 18.2663C14.9333 18.533 14.4666 18.733 13.9999 18.8663L13.6666 18.933L12.9333 21.333H11.0666L10.3333 18.933L9.99992 18.8663L8.59992 18.2663L8.26659 18.0663L6.06659 19.2663L4.73325 17.933L5.93325 15.733L5.73325 15.3997C5.46659 14.933 5.26659 14.4663 5.13325 13.9997L5.06659 13.6663L2.66659 12.933V11.0663L4.93325 10.3997L5.06659 10.0663C5.19992 9.53301 5.39992 9.06634 5.66659 8.59967L5.86659 8.26634L4.73325 6.06634L6.06659 4.73301L8.19992 5.93301L8.53325 5.73301C8.99992 5.46634 9.46659 5.26634 9.99992 5.13301L10.3333 4.99967L11.0666 2.66634H12.9333L13.6666 4.99967L13.9999 5.13301C14.4666 5.26634 14.9333 5.46634 15.3999 5.73301L15.7333 5.93301L17.9333 4.73301L19.2666 6.06634L18.0666 8.26634L18.2666 8.59967C18.5333 9.06634 18.7333 9.53301 18.8666 9.99967L18.9333 10.333L21.3333 11.0663V12.933Z" fill="currentColor"></path></g> <defs><clipPath id="clip0_3404_6073"><rect width="24" height="24" fill="white"></rect></clipPath></defs>',3)]))}const l$e=wt(r$e,[["render",a$e]]),c$e={},u$e={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function d$e(e,t){return L(),Q("svg",u$e,t[0]||(t[0]=[H("path",{d:"M18.2812 11.7893V15.1178H20.0625V19.3598H15.8205V15.1178H17.5785V12.4928H12.4455V15.1178H14.2267V19.3598H9.96075V15.1178H11.742V12.4928H6.609V15.1178H8.367V19.3598H4.125V15.1178H5.90625V11.7893H11.742V9.21075H9.44475V4.96875H14.742V9.21075H12.4447V11.7893H18.2812Z",fill:"currentColor"},null,-1)]))}const f$e=wt(c$e,[["render",d$e]]),p$e={},m$e={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function h$e(e,t){return L(),Q("svg",m$e,t[0]||(t[0]=[H("path",{d:"M12 14.2854L16.5715 18.9791L21.1429 14.2854M12 9.71401L7.42861 5.14258M7.42861 5.14258L2.85718 9.71058M7.42861 5.14258V18.8569M16.5715 5.14258V18.8569",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const g$e=wt(p$e,[["render",h$e]]),v$e={},b$e={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function y$e(e,t){return L(),Q("svg",b$e,t[0]||(t[0]=[H("path",{d:"M11.2691 4.41115C11.5006 3.89177 11.6164 3.63208 11.7776 3.55211C11.9176 3.48263 12.082 3.48263 12.222 3.55211C12.3832 3.63208 12.499 3.89177 12.7305 4.41115L14.5745 8.54808C14.643 8.70162 14.6772 8.77839 14.7302 8.83718C14.777 8.8892 14.8343 8.93081 14.8982 8.95929C14.9705 8.99149 15.0541 9.00031 15.2213 9.01795L19.7256 9.49336C20.2911 9.55304 20.5738 9.58288 20.6997 9.71147C20.809 9.82316 20.8598 9.97956 20.837 10.1342C20.8108 10.3122 20.5996 10.5025 20.1772 10.8832L16.8125 13.9154C16.6877 14.0279 16.6252 14.0842 16.5857 14.1527C16.5507 14.2134 16.5288 14.2807 16.5215 14.3503C16.5132 14.429 16.5306 14.5112 16.5655 14.6757L17.5053 19.1064C17.6233 19.6627 17.6823 19.9408 17.5989 20.1002C17.5264 20.2388 17.3934 20.3354 17.2393 20.3615C17.0619 20.3915 16.8156 20.2495 16.323 19.9654L12.3995 17.7024C12.2539 17.6184 12.1811 17.5765 12.1037 17.56C12.0352 17.5455 11.9644 17.5455 11.8959 17.56C11.8185 17.5765 11.7457 17.6184 11.6001 17.7024L7.67662 19.9654C7.18404 20.2495 6.93775 20.3915 6.76034 20.3615C6.60623 20.3354 6.47319 20.2388 6.40075 20.1002C6.31736 19.9408 6.37635 19.6627 6.49434 19.1064L7.4341 14.6757C7.46898 14.5112 7.48642 14.429 7.47814 14.3503C7.47081 14.2807 7.44894 14.2134 7.41394 14.1527C7.37439 14.0842 7.31195 14.0279 7.18708 13.9154L3.82246 10.8832C3.40005 10.5025 3.18884 10.3122 3.16258 10.1342C3.13978 9.97956 3.19059 9.82316 3.29993 9.71147C3.42581 9.58288 3.70856 9.55304 4.27406 9.49336L8.77835 9.01795C8.94553 9.00031 9.02911 8.99149 9.10139 8.95929C9.16534 8.93081 9.2226 8.8892 9.26946 8.83718C9.32241 8.77839 9.35663 8.70162 9.42508 8.54808L11.2691 4.41115Z",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const _$e=wt(v$e,[["render",y$e]]),S$e={},C$e={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function w$e(e,t){return L(),Q("svg",C$e,t[0]||(t[0]=[H("path",{d:"M19.9203 9.73016L15.0488 9.26951C14.7417 9.24159 14.4763 9.04617 14.3508 8.75303L12.606 4.52346C12.3268 3.82551 11.3356 3.82551 11.0564 4.52346L9.32548 8.75303C9.21381 9.04617 8.93463 9.24159 8.62753 9.26951L3.75585 9.73016C3.02998 9.79995 2.73685 10.7073 3.28124 11.1958L6.95245 14.4204C7.18976 14.6298 7.28747 14.9368 7.21767 15.2439L6.11492 19.7665C5.94741 20.4786 6.71515 21.0647 7.35726 20.6879L11.4193 18.3008C11.6845 18.1473 12.0056 18.1473 12.2708 18.3008L16.333 20.6879C16.9751 21.0647 17.7429 20.4925 17.5752 19.7665L16.4864 15.2439C16.4166 14.9368 16.5143 14.6298 16.7516 14.4204L20.4229 11.1958C20.9533 10.7073 20.6462 9.79995 19.9203 9.73016Z",fill:"currentColor"},null,-1)]))}const E$e=wt(S$e,[["render",w$e]]),k$e={},x$e={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function T$e(e,t){return L(),Q("svg",x$e,t[0]||(t[0]=[H("path",{d:"M3 1.5H1.5V21C1.5 21.3978 1.65804 21.7794 1.93934 22.0607C2.22064 22.342 2.60218 22.5 3 22.5H22.5V21H3V1.5Z",fill:"currentColor"},null,-1),D(),H("path",{d:"M22.5 6.75H17.25V8.25H19.9425L14.25 13.9425L11.0325 10.7175C10.9628 10.6472 10.8798 10.5914 10.7884 10.5533C10.697 10.5153 10.599 10.4957 10.5 10.4957C10.401 10.4957 10.303 10.5153 10.2116 10.5533C10.1202 10.5914 10.0372 10.6472 9.9675 10.7175L4.5 16.1925L5.5575 17.25L10.5 12.3075L13.7175 15.5325C13.7872 15.6028 13.8702 15.6586 13.9616 15.6967C14.053 15.7347 14.151 15.7543 14.25 15.7543C14.349 15.7543 14.447 15.7347 14.5384 15.6967C14.6298 15.6586 14.7128 15.6028 14.7825 15.5325L21 9.3075V12H22.5V6.75Z",fill:"currentColor"},null,-1)]))}const I$e=wt(k$e,[["render",T$e]]),A$e={},O$e={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function R$e(e,t){return L(),Q("svg",O$e,t[0]||(t[0]=[rc('<g clip-path="url(#clip0_60_16)"><path d="M13.3333 9.33334H10.6667C10.4899 9.33334 10.3203 9.40357 10.1953 9.5286C10.0702 9.65362 10 9.82319 10 10V14C10 14.1768 10.0702 14.3464 10.1953 14.4714C10.3203 14.5964 10.4899 14.6667 10.6667 14.6667H13.3333C13.5101 14.6667 13.6797 14.5964 13.8047 14.4714C13.9298 14.3464 14 14.1768 14 14V10C14 9.82319 13.9298 9.65362 13.8047 9.5286C13.6797 9.40357 13.5101 9.33334 13.3333 9.33334ZM13.0667 13.7333H10.9333V10.2667H13.0667V13.7333Z" fill="currentColor"></path> <path d="M22.4733 8.25333L19.7467 5.52666C19.6225 5.4035 19.4549 5.33407 19.28 5.33333H15.9467V4.03333C15.9557 3.68303 15.8265 3.34326 15.5869 3.0875C15.3474 2.83174 15.0168 2.68056 14.6667 2.66666H9.22667C9.05557 2.6734 8.88755 2.71439 8.73258 2.78723C8.5776 2.86006 8.43881 2.96325 8.32443 3.09068C8.21005 3.21812 8.1224 3.36721 8.06668 3.52913C8.01095 3.69104 7.98828 3.86249 8.00001 4.03333V5.33333H4.72001C4.63227 5.33282 4.54529 5.34964 4.46407 5.38282C4.38284 5.41599 4.30897 5.46488 4.24667 5.52666L1.52667 8.25333C1.46489 8.31562 1.416 8.3895 1.38283 8.47073C1.34965 8.55195 1.33283 8.63893 1.33334 8.72666V18.6667C1.33334 19.0203 1.47382 19.3594 1.72386 19.6095C1.97391 19.8595 2.31305 20 2.66667 20H21.3333C21.687 20 22.0261 19.8595 22.2761 19.6095C22.5262 19.3594 22.6667 19.0203 22.6667 18.6667V8.72C22.6659 8.5451 22.5965 8.3775 22.4733 8.25333ZM9.33334 4H14.6667V5.33333H9.33334V4ZM21.3333 11.3333H14.6667V12.62H21.3333V18.6667H2.66667V12.62H9.33334V11.3333H2.66667V9L5.00001 6.66666H19L21.3333 9V11.3333Z" fill="currentColor"></path></g> <defs><clipPath id="clip0_60_16"><rect width="24" height="24" fill="white"></rect></clipPath></defs>',3)]))}const D$e=wt(A$e,[["render",R$e]]),L$e={},P$e={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function M$e(e,t){return L(),Q("svg",P$e,t[0]||(t[0]=[H("path",{d:"M16.8324 18.3333C17.0448 18.3336 17.2491 18.4149 17.4035 18.5607C17.558 18.7065 17.6509 18.9058 17.6634 19.1178C17.6758 19.3299 17.6068 19.5386 17.4705 19.7015C17.3342 19.8644 17.1408 19.9691 16.9299 19.9942L16.8324 20H6.83241C6.62001 19.9998 6.41572 19.9184 6.26127 19.7726C6.10682 19.6268 6.01388 19.4275 6.00143 19.2155C5.98899 19.0035 6.05797 18.7947 6.1943 18.6318C6.33062 18.4689 6.524 18.3643 6.73491 18.3392L6.83241 18.3333H16.8324ZM15.9991 5C16.2032 5.00003 16.4002 5.07496 16.5527 5.2106C16.7052 5.34623 16.8027 5.53312 16.8266 5.73583L16.8324 5.83333V12.5C16.8337 13.8107 16.3203 15.0695 15.4027 16.0055C14.4851 16.9414 13.2367 17.4796 11.9262 17.5041C10.6157 17.5287 9.34796 17.0377 8.3959 16.1369C7.44383 15.236 6.88358 13.9973 6.83574 12.6875L6.83241 12.5V5.83333C6.83265 5.62093 6.91398 5.41664 7.05978 5.26219C7.20559 5.10775 7.40487 5.0148 7.61691 5.00236C7.82894 4.98991 8.03773 5.0589 8.2006 5.19522C8.36348 5.33155 8.46816 5.52492 8.49324 5.73583L8.49908 5.83333V12.5C8.49906 13.3696 8.8389 14.2048 9.44608 14.8274C10.0533 15.45 10.8797 15.8106 11.7491 15.8323C12.6184 15.8541 13.4618 15.5352 14.0994 14.9438C14.7369 14.3524 15.1181 13.5352 15.1616 12.6667L15.1657 12.5V5.83333C15.1657 5.61232 15.2535 5.40036 15.4098 5.24408C15.5661 5.0878 15.7781 5 15.9991 5Z",fill:"currentColor"},null,-1)]))}const N$e=wt(L$e,[["render",M$e]]),F$e={},$$e={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function B$e(e,t){return L(),Q("svg",$$e,t[0]||(t[0]=[H("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20 22V12H8V7.95C8 5.77793 9.78136 4 12 4C14.2186 4 16 5.77793 16 7.95H18C18 4.65445 15.3042 2 12 2C8.69579 2 6 4.65445 6 7.95V12H4V22H20Z",fill:"currentColor"},null,-1)]))}const V$e=wt(F$e,[["render",B$e]]),H$e={},U$e={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function z$e(e,t){return L(),Q("svg",U$e,t[0]||(t[0]=[H("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.25 5C4.25 4.27065 4.53973 3.57118 5.05546 3.05546C5.57118 2.53973 6.27065 2.25 7 2.25H14.987C15.2648 2.25016 15.5386 2.31645 15.7857 2.44339C16.0328 2.57033 16.2461 2.75427 16.408 2.98L19.422 7.177C19.635 7.475 19.75 7.832 19.75 8.197V19C19.75 19.7293 19.4603 20.4288 18.9445 20.9445C18.4288 21.4603 17.7293 21.75 17 21.75H7C6.27065 21.75 5.57118 21.4603 5.05546 20.9445C4.53973 20.4288 4.25 19.7293 4.25 19V5ZM7 3.75C6.31 3.75 5.75 4.31 5.75 5V19C5.75 19.69 6.31 20.25 7 20.25H17C17.69 20.25 18.25 19.69 18.25 19V8.897H15C14.8011 8.897 14.6103 8.81798 14.4697 8.67733C14.329 8.53668 14.25 8.34591 14.25 8.147V3.75H7Z",fill:"currentColor"},null,-1),D(),H("path",{d:"M15.086 13.219C15.0245 13.296 14.9483 13.3601 14.862 13.4077C14.7756 13.4553 14.6807 13.4854 14.5828 13.4962C14.4848 13.5071 14.3856 13.4985 14.2909 13.471C14.1962 13.4436 14.1079 13.3977 14.031 13.336L12.751 12.31V15.75C12.751 15.9489 12.672 16.1397 12.5313 16.2803C12.3907 16.421 12.1999 16.5 12.001 16.5C11.8021 16.5 11.6113 16.421 11.4707 16.2803C11.33 16.1397 11.251 15.9489 11.251 15.75V12.31L9.969 13.336C9.81358 13.4603 9.61517 13.5177 9.41741 13.4956C9.21966 13.4736 9.03875 13.3739 8.9145 13.2185C8.79024 13.0631 8.73282 12.8647 8.75485 12.6669C8.77689 12.4692 8.87658 12.2883 9.032 12.164L11.529 10.166C11.6607 10.0596 11.8247 10.001 11.994 10H12.002C12.182 10 12.346 10.064 12.475 10.17L14.969 12.164C15.046 12.2255 15.1101 12.3017 15.1577 12.388C15.2053 12.4744 15.2354 12.5693 15.2462 12.6672C15.2571 12.7652 15.2485 12.8644 15.221 12.9591C15.1935 13.0537 15.1477 13.1421 15.086 13.219Z",fill:"currentColor"},null,-1)]))}const W$e=wt(H$e,[["render",z$e]]),j$e={},Z$e={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function q$e(e,t){return L(),Q("svg",Z$e,t[0]||(t[0]=[H("path",{d:"M14.207 17.7605H4.27277V6.79285H19.3763V14.9664L20.6491 16.2392V4.06064C20.6491 3.4758 20.1733 3 19.5885 3H4.06059C3.4758 3 3 3.4758 3 4.06064V17.9726C3 18.5574 3.4758 19.0332 4.06059 19.0332H14.8119C14.222 18.1946 14.207 17.7605 14.207 17.7605ZM18.2116 4.78098C18.2116 4.5647 18.387 4.38937 18.6032 4.38937H18.9948C19.2111 4.38937 19.3864 4.5647 19.3864 4.78098V5.22482C19.3864 5.4411 19.2111 5.61643 18.9948 5.61643H18.6032C18.3869 5.61643 18.2116 5.4411 18.2116 5.22482V4.78098ZM16.3907 4.78098C16.3907 4.5647 16.566 4.38937 16.7822 4.38937H17.1739C17.3902 4.38937 17.5655 4.5647 17.5655 4.78098V5.22482C17.5655 5.4411 17.3901 5.61643 17.1739 5.61643H16.7822C16.5659 5.61643 16.3907 5.4411 16.3907 5.22482V4.78098ZM14.5696 4.78098C14.5696 4.5647 14.745 4.38937 14.9612 4.38937H15.3528C15.5692 4.38937 15.7445 4.5647 15.7445 4.78098V5.22482C15.7445 5.4411 15.5692 5.61643 15.3528 5.61643H14.9612C14.745 5.61643 14.5696 5.4411 14.5696 5.22482V4.78098Z",fill:"currentColor"},null,-1),D(),H("path",{d:"M20.6679 17.3799L18.8154 15.5274C18.3973 15.1093 17.8345 14.9223 17.2867 14.9654C17.3298 14.4176 17.1428 13.8549 16.7247 13.4367L14.8722 11.5842C14.1141 10.8261 12.8807 10.8261 12.1225 11.5842L11.8215 11.8851C11.0634 12.6432 11.0634 13.8767 11.8215 14.6348L13.674 16.4873C14.0922 16.9055 14.6549 17.0924 15.2028 17.0493C15.1597 17.5971 15.3466 18.1599 15.7648 18.5781L17.6173 20.4305C18.3753 21.1886 19.6088 21.1886 20.3669 20.4305L20.6679 20.1295C21.426 19.3714 21.426 18.138 20.6679 17.3799ZM14.8025 15.2197L15.5703 15.9876C15.1794 16.2204 14.665 16.1688 14.3289 15.8328L12.4764 13.9803C12.0793 13.5833 12.0793 12.9371 12.4764 12.54L12.7773 12.239C13.1744 11.8419 13.8206 11.8419 14.2176 12.239L16.0701 14.0915C16.4062 14.4276 16.4577 14.9419 16.2248 15.3329L15.457 14.5651C15.2762 14.3843 14.9832 14.3843 14.8023 14.5651C14.6216 14.7458 14.6216 15.0389 14.8025 15.2197ZM20.0132 19.4749L19.7123 19.7758C19.3152 20.1729 18.6691 20.1729 18.272 19.7759L16.4195 17.9234C16.0834 17.5873 16.0319 17.073 16.2647 16.682L17.0326 17.4498C17.2134 17.6307 17.5064 17.6307 17.6873 17.4498C17.868 17.269 17.868 16.9759 17.6873 16.7951L16.9194 16.0273C17.3104 15.7944 17.8247 15.846 18.1609 16.1821L20.0134 18.0345C20.4103 18.4317 20.4103 19.0778 20.0132 19.4749Z",fill:"currentColor"},null,-1)]))}const G$e=wt(j$e,[["render",q$e]]),K$e={},Y$e={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function X$e(e,t){return L(),Q("svg",Y$e,t[0]||(t[0]=[H("path",{d:"M15 17C15 14 19 12 19 8C19 4 16 1 12 1C8 1 5 4 5 8C5 12 9 14 9 17V20C9 22 10 23 12 23C14 23 15 22 15 20V17ZM9 18H15H9Z",fill:"#FDF873"},null,-1),D(),H("path",{d:"M9 18H15M15 17C15 14 19 12 19 8C19 4 16 1 12 1C8 1 5 4 5 8C5 12 9 14 9 17V20C9 22 10 23 12 23C14 23 15 22 15 20V17Z",stroke:"#002C40","stroke-width":"2"},null,-1)]))}const J$e=wt(K$e,[["render",X$e]]),Q$e={},eBe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function tBe(e,t){return L(),Q("svg",eBe,t[0]||(t[0]=[H("path",{d:"M15 17C15 14 19 12 19 8C19 4 16 1 12 1C8 1 5 4 5 8C5 12 9 14 9 17V20C9 22 10 23 12 23C14 23 15 22 15 20V17ZM9 18H15H9Z"},null,-1),D(),H("path",{d:"M9 18H15M15 17C15 14 19 12 19 8C19 4 16 1 12 1C8 1 5 4 5 8C5 12 9 14 9 17V20C9 22 10 23 12 23C14 23 15 22 15 20V17Z",stroke:"currentColor","stroke-width":"2"},null,-1)]))}const nBe=wt(Q$e,[["render",tBe]]),sBe={},oBe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function rBe(e,t){return L(),Q("svg",oBe,t[0]||(t[0]=[H("path",{d:"M5 21C5 17.134 8.13401 14 12 14C15.866 14 19 17.134 19 21M16 7C16 9.20914 14.2091 11 12 11C9.79086 11 8 9.20914 8 7C8 4.79086 9.79086 3 12 3C14.2091 3 16 4.79086 16 7Z",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const iBe=wt(sBe,[["render",rBe]]),aBe={},lBe={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function cBe(e,t){return L(),Q("svg",lBe,t[0]||(t[0]=[H("rect",{width:"24",height:"24"},null,-1),D(),H("path",{d:"M22.0525 11.7836C21.304 9.84759 20.0046 8.1733 18.315 6.96769C16.6253 5.76208 14.6194 5.078 12.5452 5C10.471 5.078 8.46507 5.76208 6.7754 6.96769C5.08574 8.1733 3.78638 9.84759 3.03791 11.7836C2.98736 11.9234 2.98736 12.0765 3.03791 12.2164C3.78638 14.1524 5.08574 15.8267 6.7754 17.0323C8.46507 18.2379 10.471 18.922 12.5452 19C14.6194 18.922 16.6253 18.2379 18.315 17.0323C20.0046 15.8267 21.304 14.1524 22.0525 12.2164C22.103 12.0765 22.103 11.9234 22.0525 11.7836ZM12.5452 17.7273C9.17246 17.7273 5.60882 15.2264 4.317 12C5.60882 8.77364 9.17246 6.27273 12.5452 6.27273C15.9179 6.27273 19.4815 8.77364 20.7734 12C19.4815 15.2264 15.9179 17.7273 12.5452 17.7273Z",fill:"currentColor"},null,-1),D(),H("path",{d:"M12.5457 8.18164C11.7906 8.18164 11.0524 8.40557 10.4245 8.82512C9.79656 9.24467 9.30717 9.84099 9.01818 10.5387C8.72919 11.2363 8.65358 12.0041 8.80091 12.7447C8.94823 13.4854 9.31188 14.1657 9.84586 14.6997C10.3798 15.2337 11.0602 15.5973 11.8008 15.7446C12.5415 15.892 13.3092 15.8164 14.0069 15.5274C14.7046 15.2384 15.3009 14.749 15.7204 14.1211C16.14 13.4932 16.3639 12.755 16.3639 11.9998C16.3639 10.9872 15.9616 10.016 15.2456 9.29996C14.5295 8.58391 13.5584 8.18164 12.5457 8.18164ZM12.5457 14.5453C12.0423 14.5453 11.5501 14.396 11.1315 14.1163C10.7129 13.8366 10.3867 13.439 10.194 12.9739C10.0014 12.5088 9.95096 11.997 10.0492 11.5032C10.1474 11.0095 10.3898 10.5559 10.7458 10.1999C11.1018 9.84393 11.5554 9.60149 12.0491 9.50328C12.5429 9.40506 13.0547 9.45547 13.5198 9.64813C13.9849 9.84079 14.3825 10.167 14.6622 10.5856C14.9419 11.0042 15.0912 11.4964 15.0912 11.9998C15.0912 12.6749 14.823 13.3224 14.3456 13.7997C13.8683 14.2771 13.2208 14.5453 12.5457 14.5453Z",fill:"currentColor"},null,-1)]))}const uBe=wt(aBe,[["render",cBe]]),dBe={},fBe={viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function pBe(e,t){return L(),Q("svg",fBe,t[0]||(t[0]=[H("g",{"clip-path":"url(#clip0_385_54)"},[H("path",{d:"M5.625 11.625H1.875C1.67609 11.625 1.48532 11.704 1.34467 11.8447C1.20402 11.9853 1.125 12.1761 1.125 12.375V16.125C1.125 16.3239 1.20402 16.5147 1.34467 16.6553C1.48532 16.796 1.67609 16.875 1.875 16.875H5.625C5.82391 16.875 6.01468 16.796 6.15533 16.6553C6.29598 16.5147 6.375 16.3239 6.375 16.125V15H9C9.19891 15 9.38968 14.921 9.53033 14.7803C9.67098 14.6397 9.75 14.4489 9.75 14.25C9.75 14.0511 9.67098 13.8603 9.53033 13.7197C9.38968 13.579 9.19891 13.5 9 13.5H6.375V12.375C6.375 12.1761 6.29598 11.9853 6.15533 11.8447C6.01468 11.704 5.82391 11.625 5.625 11.625ZM4.875 15.375H2.625V13.125H4.875V15.375ZM3 6.64351V9.75001C3 9.94892 3.07902 10.1397 3.21967 10.2803C3.36032 10.421 3.55109 10.5 3.75 10.5C3.94891 10.5 4.13968 10.421 4.28033 10.2803C4.42098 10.1397 4.5 9.94892 4.5 9.75001V6.64351C5.20699 6.46096 5.82314 6.02684 6.23295 5.4225C6.64276 4.81817 6.81809 4.08512 6.72609 3.36076C6.63408 2.6364 6.28105 1.97046 5.73317 1.48777C5.18529 1.00507 4.48018 0.73877 3.75 0.73877C3.01982 0.73877 2.3147 1.00507 1.76683 1.48777C1.21895 1.97046 0.865916 2.6364 0.773911 3.36076C0.681905 4.08512 0.857239 4.81817 1.26705 5.4225C1.67686 6.02684 2.29301 6.46096 3 6.64351ZM3.75 2.25001C4.04667 2.25001 4.33668 2.33798 4.58335 2.5028C4.83003 2.66762 5.02229 2.90189 5.13582 3.17598C5.24935 3.45007 5.27906 3.75167 5.22118 4.04264C5.1633 4.33361 5.02044 4.60089 4.81066 4.81067C4.60088 5.02045 4.33361 5.16331 4.04263 5.22118C3.75166 5.27906 3.45006 5.24936 3.17597 5.13583C2.90189 5.02229 2.66762 4.83004 2.5028 4.58336C2.33797 4.33669 2.25 4.04668 2.25 3.75001C2.25 3.35218 2.40803 2.97065 2.68934 2.68935C2.97064 2.40804 3.35217 2.25001 3.75 2.25001ZM15 11.3565V9.00001C15 8.8011 14.921 8.61033 14.7803 8.46968C14.6397 8.32902 14.4489 8.25001 14.25 8.25001C14.0511 8.25001 13.8603 8.32902 13.7197 8.46968C13.579 8.61033 13.5 8.8011 13.5 9.00001V11.3565C12.793 11.5391 12.1769 11.9732 11.767 12.5775C11.3572 13.1818 11.1819 13.9149 11.2739 14.6393C11.3659 15.3636 11.7189 16.0296 12.2668 16.5122C12.8147 16.9949 13.5198 17.2612 14.25 17.2612C14.9802 17.2612 15.6853 16.9949 16.2332 16.5122C16.7811 16.0296 17.1341 15.3636 17.2261 14.6393C17.3181 13.9149 17.1428 13.1818 16.733 12.5775C16.3231 11.9732 15.707 11.5391 15 11.3565ZM14.25 15.75C13.9533 15.75 13.6633 15.662 13.4166 15.4972C13.17 15.3324 12.9777 15.0981 12.8642 14.824C12.7506 14.5499 12.7209 14.2483 12.7788 13.9574C12.8367 13.6664 12.9796 13.3991 13.1893 13.1893C13.3991 12.9796 13.6664 12.8367 13.9574 12.7788C14.2483 12.721 14.5499 12.7507 14.824 12.8642C15.0981 12.9777 15.3324 13.17 15.4972 13.4167C15.662 13.6633 15.75 13.9533 15.75 14.25C15.75 14.6478 15.592 15.0294 15.3107 15.3107C15.0294 15.592 14.6478 15.75 14.25 15.75ZM12.375 6.37501H16.125C16.3239 6.37501 16.5147 6.29599 16.6553 6.15534C16.796 6.01468 16.875 5.82392 16.875 5.62501V1.87501C16.875 1.67609 16.796 1.48533 16.6553 1.34468C16.5147 1.20402 16.3239 1.12501 16.125 1.12501H12.375C12.1761 1.12501 11.9853 1.20402 11.8447 1.34468C11.704 1.48533 11.625 1.67609 11.625 1.87501V3.00001H9C8.80109 3.00001 8.61032 3.07902 8.46967 3.21968C8.32902 3.36033 8.25 3.55109 8.25 3.75001C8.25 3.94892 8.32902 4.13968 8.46967 4.28034C8.61032 4.42099 8.80109 4.50001 9 4.50001H11.625V5.62501C11.625 5.82392 11.704 6.01468 11.8447 6.15534C11.9853 6.29599 12.1761 6.37501 12.375 6.37501ZM13.125 2.62501H15.375V4.87501H13.125V2.62501Z",fill:"currentColor"})],-1),D(),H("defs",null,[H("clipPath",{id:"clip0_385_54"},[H("rect",{width:"18",height:"18",fill:"currentColor"})])],-1)]))}const mBe=wt(dBe,[["render",pBe]]),Vs={__name:"Icon",props:{icon:{type:String,required:!0},inline:Boolean},setup(e){const t={Add:nRe,AlignCenter:iRe,AlignLeft:uRe,AlignRight:mRe,Announcements:bRe,AnonymousReview:CRe,ArchivedFile:xRe,ArrowLeft:ORe,ArrowRight:PRe,AttachFile:$Re,Attention:URe,BackButton:ZRe,Bold:YRe,Book:eDe,Bullets:oDe,Calendar:lDe,Cancel:fDe,Catalog:gDe,Checkbox:_De,CheckboxTicked:EDe,ChevronDown:IDe,ChevronLeft:DDe,ChevronRight:NDe,ChevronUp:VDe,Clock:WDe,Comment:GDe,Complete:JDe,Dashboard:nLe,Declined:iLe,DefaultDocument:ePe,DecreaseTextSize:uLe,Desktop:mLe,DisableUser:bLe,Download:CLe,Dropdown:xLe,Dropup:OLe,Edit:PLe,Email:$Le,EmailOpened:ULe,Error:ZLe,Expand:YLe,FileAudio:oPe,FileDoc:fPe,FileCode:lPe,FileEpub:gPe,FileExcel:_Pe,FileHtml:EPe,FileImage:IPe,FilePdf:DPe,FilePowerpoint:NPe,FileText:VPe,FileVideo:WPe,FileZip:GPe,Filter:JPe,Globe:nMe,Hdd:iMe,Help:uMe,HelpTopNav:mMe,History:bMe,InProgress:CMe,IncreaseTextSize:xMe,InsertContent:OMe,Institutes:PMe,Issues:$Me,Italics:UMe,Lock:ZMe,LoginAs:YMe,MergeUser:eNe,Minus:oNe,Money:lNe,MoreOptions:fNe,MySubmissions:gNe,NavDoi:_Ne,NavAdmin:ENe,New:INe,OpenNewTab:DNe,Notifications:NNe,NotVisible:VNe,OpenReview:WNe,Orcid:GNe,Overdue:nFe,Paste:iFe,Payment:uFe,Photo:mFe,Pin:bFe,Print:CFe,Publication:xFe,Question:OFe,ReadRecommendation:PFe,ReinstateReviewer:$Fe,ReviewAssignments:UFe,ReviewRequestDeclined:ZFe,ReviewSent:YFe,ROR:e$e,Search:o$e,Settings:l$e,Sitemap:f$e,Sort:g$e,Star:_$e,StarTicked:E$e,Statistics:I$e,Tools:D$e,Underline:N$e,Unlock:V$e,Upload:W$e,Url:G$e,UsefulTips:J$e,UsefulTipsPrimary:nBe,User:iBe,View:uBe,Workflow:mBe,OrcidUnauthenticated:JNe},n=e,i=Ge(()=>({"inline-block align-middle rtl:scale-x-[-1]":!0,"text-negative":n.icon==="Error","pkpIcon--inline":n.inline}));return(a,l)=>(L(),Q("span",{class:Rn(i.value)},[(L(),Ee(Io(t[e.icon])))],2))}},hBe={name:"Badge",components:{Icon:Vs},props:{label:String,isPrimary:Boolean,isSuccess:Boolean,isWarnable:Boolean,isButton:Boolean,icon:{required:!1,type:String,default:()=>null},colorVariant:{required:!1,type:String,default:()=>null,validator:e=>["default-on-dark","primary","primary-bg","attention-bg","negative-bg","stage-in-review-bg","success-bg","attention"].includes(e)},sizeVariant:{required:!1,default:()=>"default",validator:e=>["default","compact"].includes(e)},hasDot:Boolean,stage:String},emits:["click"],computed:{classes(){let e=[];if(this.colorVariant){const t=this.colorVariant;return{"inline-block rounded-[1.2em] border":!0,"text-base-normal py-1 px-3":this.sizeVariant==="default","text-sm-normal py-[0.18rem] px-2":this.sizeVariant==="compact","text-default border-light":t==="default","text-on-dark border-light":t==="default-on-dark","border-primary text-primary bg-secondary":t==="primary","border-dark text-attention bg-secondary":t==="attention","bg-primary text-on-dark border-primary":t==="primary-bg","bg-success text-on-dark border-success":t==="success-bg","bg-attention text-on-dark border-attention":t==="attention-bg","bg-negative text-on-dark border-negative":t==="negative-bg","bg-stage-in-review text-on-dark border-stage-in-review":t==="stage-in-review-bg"}}else e.push("pkpBadge"),this.isButton&&e.push("pkpBadge--button");return this.isPrimary&&e.push("pkpBadge--isPrimary"),this.isSuccess&&e.push("pkpBadge--isSuccess"),this.isWarnable&&e.push("pkpBadge--isWarnable"),(this.hasDot||this.stage)&&e.push("pkpBadge--dot"),this.stage&&e.push("pkpBadge--"+this.stage),e}},methods:{click(){this.$emit("click")}}},gBe={class:"flex items-center gap-x-2"},vBe={key:1,class:"-screenReader"},bBe={class:"flex items-center justify-center"},yBe={key:1,class:"-screenReader"};function _Be(e,t,n,i,a,l){const f=Xe("Icon");return n.isButton?(L(),Q("button",{key:0,class:Rn(l.classes),onClick:t[0]||(t[0]=(...d)=>l.click&&l.click(...d))},[H("div",gBe,[n.icon?(L(),Ee(f,{key:0,class:"h-5 w-5",icon:n.icon},null,8,["icon"])):we("",!0),t[1]||(t[1]=D()),is(e.$slots,"default"),t[2]||(t[2]=D()),n.label?(L(),Q("span",vBe,ee(n.label),1)):we("",!0)])],2)):(L(),Q("span",{key:1,class:Rn(l.classes)},[H("div",bBe,[n.icon?(L(),Ee(f,{key:0,class:"me-2 h-5 w-5",icon:n.icon},null,8,["icon"])):we("",!0),t[3]||(t[3]=D()),is(e.$slots,"default"),t[4]||(t[4]=D()),n.label?(L(),Q("span",yBe,ee(n.label),1)):we("",!0)])],2))}const kd=wt(hBe,[["render",_Be]]),ms={__name:"Button",props:{element:{type:String,default:"button"},href:String,isPrimary:Boolean,isSecondary:{type:Boolean,default:!1,required:!1},isWarnable:Boolean,isActive:Boolean,isLink:Boolean,icon:{required:!1,type:String,default:()=>null},isDisabled:Boolean,sizeVariant:{required:!1,type:String,default:()=>"default",validator:e=>["default","compact","fullWidth"].includes(e)}},emits:["focus","blur"],setup(e,{emit:t}){const n=e,i=Ge(()=>n.isSecondary||!n.isSecondary&&!n.isPrimary&&!n.isWarnable&&!n.isActive),a=Ge(()=>({"inline-flex relative items-center gap-x-1 ":!0,"text-lg-semibold":!n.isLink,"border-transparent hover:enabled:underline disabled:text-disabled text-lg-medium":n.isLink,"bg-primary border-transparent text-on-dark hover:bg-hover hover:text-on-dark disabled:bg-disabled disabled:text-disabled":n.isPrimary,"text-primary border-light hover:text-hover disabled:text-disabled ":i.value,"text-negative border-light disabled:text-disabled":n.isWarnable,"bg-secondary":(i.value||n.isWarnable)&&!n.isLink,"text-on-dark bg-selection-dark border-transparent":n.isActive,"py-[0.4375rem] px-3":n.sizeVariant==="default","py-[0.1875rem] px-3":n.sizeVariant==="compact","py-2 px-3 w-full ":n.sizeVariant==="fullWidth","border rounded":n.sizeVariant!=="fullWidth"})),l=t;return(f,d)=>(L(),Ee(Io(e.element),{class:Rn(["pkpButton",a.value]),type:"button",href:e.element==="a"?e.href:!1,disabled:e.element==="a"&&!e.isDisabled?void 0:e.isDisabled,onFocus:d[0]||(d[0]=h=>l("focus")),onBlur:d[1]||(d[1]=h=>l("blur"))},{default:te(()=>[e.icon?(L(),Ee(Vs,{key:0,class:"h-5 w-5",icon:e.icon,"aria-hidden":"true"},null,8,["icon"])):we("",!0),d[2]||(d[2]=D()),is(f.$slots,"default")]),_:3},40,["class","href","disabled"]))}},SBe={components:{PkpButton:ms,Icon:Vs},props:{ariaDescribedBy:{type:String,default:""},icon:{type:String,default:""},label:{type:String,default:""},isActive:{type:Boolean,default:!1},isLink:{type:Boolean,default:!1},isPrimary:{type:Boolean,default:!1},isWarnable:{type:Boolean,default:!1},hasDropdownIcon:{type:Boolean,default:!1}},data(){return{isOpen:!1}},computed:{id(){return Oh()}},methods:{preserveFocus(e){document.activeElement===document.body&&this.$refs.button.$el.focus()},toggle(){this.isOpen=!this.isOpen},closeOnBlur(){setTimeout(()=>{if(this.$el.contains(document.activeElement))var e=setInterval(()=>{this.$el.contains(document.activeElement)||(this.isOpen=!1,window.clearInterval(e))},1e3);else this.isOpen=!1},100)}}},CBe={class:"pkpDropdown"},wBe=["id"],EBe={key:1,class:"pkpDropdown__caret"};function kBe(e,t,n,i,a,l){const f=Xe("Icon"),d=Xe("PkpButton");return L(),Q("div",CBe,[pe(d,{ref:"button","is-active":n.isActive,"is-link":n.isLink,"is-primary":n.isPrimary,"is-warnable":n.isWarnable,"aria-describedby":n.ariaDescribedBy,"aria-controls":l.id,"aria-expanded":a.isOpen,onClick:l.toggle,onBlur:l.closeOnBlur},{default:te(()=>[is(e.$slots,"button",{},()=>[n.icon?(L(),Ee(f,{key:0,icon:n.icon,inline:!0},null,8,["icon"])):we("",!0),D(" "+ee(n.label)+" ",1),n.hasDropdownIcon?(L(),Ee(f,{key:1,class:"-mr-1 h-5 w-5 text-primary",icon:"Dropdown","aria-hidden":"true"})):we("",!0)])]),_:3},8,["is-active","is-link","is-primary","is-warnable","aria-describedby","aria-controls","aria-expanded","onClick","onBlur"]),t[1]||(t[1]=D()),a.isOpen?(L(),Q("div",{key:0,id:l.id,class:"pkpDropdown__content",onClick:t[0]||(t[0]=(...h)=>l.preserveFocus&&l.preserveFocus(...h))},[is(e.$slots,"default")],8,wBe)):we("",!0),t[2]||(t[2]=D()),a.isOpen?(L(),Q("span",EBe)):we("",!0)])}const Ww=wt(SBe,[["render",kBe]]);function jw(e,t,n){var l;let i=(l=n.initialDeps)!=null?l:[],a;return()=>{var f,d,h,b;let S;n.key&&((f=n.debug)!=null&&f.call(n))&&(S=Date.now());const k=e();if(!(k.length!==i.length||k.some((P,B)=>i[B]!==P)))return a;i=k;let O;if(n.key&&((d=n.debug)!=null&&d.call(n))&&(O=Date.now()),a=t(...k),n.key&&((h=n.debug)!=null&&h.call(n))){const P=Math.round((Date.now()-S)*100)/100,B=Math.round((Date.now()-O)*100)/100,W=B/16,Z=(Y,z)=>{for(Y=String(Y);Y.length<z;)Y=" "+Y;return Y};console.info("%c⏱ ".concat(Z(B,5)," /").concat(Z(P,5)," ms"),"\n font-size: .6rem;\n font-weight: bold;\n color: hsl(".concat(Math.max(0,Math.min(120-120*W,120)),"deg 100% 31%);"),n==null?void 0:n.key)}return(b=n==null?void 0:n.onChange)==null||b.call(n,a),a}}function $ee(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const xBe=(e,t)=>Math.abs(e-t)<1,TBe=(e,t,n)=>{let i;return function(...a){e.clearTimeout(i),i=e.setTimeout(()=>t.apply(this,a),n)}},IBe=e=>e,ABe=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),i=[];for(let a=t;a<=n;a++)i.push(a);return i},OBe=(e,t)=>{const n=e.scrollElement;if(!n)return;const i=e.targetWindow;if(!i)return;const a=f=>{const{width:d,height:h}=f;t({width:Math.round(d),height:Math.round(h)})};if(a(n.getBoundingClientRect()),!i.ResizeObserver)return()=>{};const l=new i.ResizeObserver(f=>{const d=()=>{const h=f[0];if(h!=null&&h.borderBoxSize){const b=h.borderBoxSize[0];if(b){a({width:b.inlineSize,height:b.blockSize});return}}a(n.getBoundingClientRect())};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(d):d()});return l.observe(n,{box:"border-box"}),()=>{l.unobserve(n)}},qbe={passive:!0},Gbe=typeof window>"u"?!0:"onscrollend"in window,RBe=(e,t)=>{const n=e.scrollElement;if(!n)return;const i=e.targetWindow;if(!i)return;let a=0;const l=e.options.useScrollendEvent&&Gbe?()=>{}:TBe(i,()=>{t(a,!1)},e.options.isScrollingResetDelay),f=S=>()=>{const{horizontal:k,isRtl:T}=e.options;a=k?n.scrollLeft*(T&&-1||1):n.scrollTop,l(),t(a,S)},d=f(!0),h=f(!1);h(),n.addEventListener("scroll",d,qbe);const b=e.options.useScrollendEvent&&Gbe;return b&&n.addEventListener("scrollend",h,qbe),()=>{n.removeEventListener("scroll",d),b&&n.removeEventListener("scrollend",h)}},DBe=(e,t,n)=>{if(t!=null&&t.borderBoxSize){const i=t.borderBoxSize[0];if(i)return Math.round(i[n.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[n.options.horizontal?"width":"height"])},LBe=(e,{adjustments:t=0,behavior:n},i)=>{var a,l;const f=e+t;(l=(a=i.scrollElement)==null?void 0:a.scrollTo)==null||l.call(a,{[i.options.horizontal?"left":"top"]:f,behavior:n})};class PBe{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const i=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(a=>{a.forEach(l=>{const f=()=>{this._measureElement(l.target,l)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(f):f()})}));return{disconnect:()=>{var a;(a=i())==null||a.disconnect(),n=null},observe:a=>{var l;return(l=i())==null?void 0:l.observe(a,{box:"border-box"})},unobserve:a=>{var l;return(l=i())==null?void 0:l.unobserve(a)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([i,a])=>{typeof a>"u"&&delete n[i]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:IBe,rangeExtractor:ABe,onChange:()=>{},measureElement:DBe,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!0,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var i,a;(a=(i=this.options).onChange)==null||a.call(i,this,n)},this.maybeNotify=jw(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var a;var n;const i=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==i){if(this.cleanup(),!i){this.maybeNotify();return}this.scrollElement=i,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(a=(n=this.scrollElement)==null?void 0:n.window)!=null?a:null,this.elementsCache.forEach(l=>{this.observer.observe(l)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,l=>{this.scrollRect=l,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(l,f)=>{this.scrollAdjustments=0,this.scrollDirection=f?this.getScrollOffset()<l?"forward":"backward":null,this.scrollOffset=l,this.isScrolling=f,this.maybeNotify()}))}},this.getSize=()=>{var n;return this.options.enabled?(this.scrollRect=(n=this.scrollRect)!=null?n:this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0)},this.getScrollOffset=()=>{var n;return this.options.enabled?(this.scrollOffset=(n=this.scrollOffset)!=null?n:typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset,this.scrollOffset):(this.scrollOffset=null,0)},this.getFurthestMeasurement=(n,i)=>{const a=new Map,l=new Map;for(let f=i-1;f>=0;f--){const d=n[f];if(a.has(d.lane))continue;const h=l.get(d.lane);if(h==null||d.end>h.end?l.set(d.lane,d):d.end<h.end&&a.set(d.lane,!0),a.size===this.options.lanes)break}return l.size===this.options.lanes?Array.from(l.values()).sort((f,d)=>f.end===d.end?f.index-d.index:f.end-d.end)[0]:void 0},this.getMeasurementOptions=jw(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,i,a,l,f)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:i,scrollMargin:a,getItemKey:l,enabled:f}),{key:!1}),this.getMeasurements=jw(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:i,scrollMargin:a,getItemKey:l,enabled:f},d)=>{if(!f)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(S=>{this.itemSizeCache.set(S.key,S.size)}));const h=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const b=this.measurementsCache.slice(0,h);for(let S=h;S<n;S++){const k=l(S),T=this.options.lanes===1?b[S-1]:this.getFurthestMeasurement(b,S),O=T?T.end+this.options.gap:i+a,P=d.get(k),B=typeof P=="number"?P:this.options.estimateSize(S),W=O+B,Z=T?T.lane:S%this.options.lanes;b[S]={index:S,start:O,size:B,end:W,key:k,lane:Z}}return this.measurementsCache=b,b},{key:!1,debug:()=>this.options.debug}),this.calculateRange=jw(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,i,a,l)=>this.range=n.length>0&&i>0?MBe({measurements:n,outerSize:i,scrollOffset:a,lanes:l}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=jw(()=>{let n=null,i=null;const a=this.calculateRange();return a&&(n=a.startIndex,i=a.endIndex),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,i]},(n,i,a,l,f)=>l===null||f===null?[]:n({startIndex:l,endIndex:f,overscan:i,count:a}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const i=this.options.indexAttribute,a=n.getAttribute(i);return a?parseInt(a,10):(console.warn("Missing attribute name '".concat(i,"={index}' on measured element.")),-1)},this._measureElement=(n,i)=>{const a=this.indexFromElement(n),l=this.measurementsCache[a];if(!l)return;const f=l.key,d=this.elementsCache.get(f);d!==n&&(d&&this.observer.unobserve(d),this.observer.observe(n),this.elementsCache.set(f,n)),n.isConnected&&this.resizeItem(a,this.options.measureElement(n,i,this))},this.resizeItem=(n,i)=>{var d;const a=this.measurementsCache[n];if(!a)return;const l=(d=this.itemSizeCache.get(a.key))!=null?d:a.size,f=i-l;f!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(a,f,this):a.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=f,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(a.index),this.itemSizeCache=new Map(this.itemSizeCache.set(a.key,i)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((i,a)=>{i.isConnected||(this.observer.unobserve(i),this.elementsCache.delete(a))});return}this._measureElement(n,void 0)},this.getVirtualItems=jw(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,i)=>{const a=[];for(let l=0,f=n.length;l<f;l++){const d=n[l],h=i[d];a.push(h)}return a},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const i=this.getMeasurements();if(i.length!==0)return $ee(i[Kbe(0,i.length-1,a=>$ee(i[a]).start,n)])},this.getOffsetForAlignment=(n,i,a=0)=>{const l=this.getSize(),f=this.getScrollOffset();i==="auto"&&(i=n>=f+l?"end":"start"),i==="center"?n+=(a-l)/2:i==="end"&&(n-=l);const d=this.options.horizontal?"scrollWidth":"scrollHeight",b=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[d]:this.scrollElement[d]:0)-l;return Math.max(Math.min(b,n),0)},this.getOffsetForIndex=(n,i="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const a=this.measurementsCache[n];if(!a)return;const l=this.getSize(),f=this.getScrollOffset();if(i==="auto")if(a.end>=f+l-this.options.scrollPaddingEnd)i="end";else if(a.start<=f+this.options.scrollPaddingStart)i="start";else return[f,i];const d=i==="end"?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(d,i,a.size),i]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(n,{align:i="start",behavior:a}={})=>{this.cancelScrollToIndex(),a==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,i),{adjustments:void 0,behavior:a})},this.scrollToIndex=(n,{align:i="auto",behavior:a}={})=>{n=Math.max(0,Math.min(n,this.options.count-1)),this.cancelScrollToIndex(),a==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const l=this.getOffsetForIndex(n,i);if(!l)return;const[f,d]=l;this._scrollToOffset(f,{adjustments:void 0,behavior:a}),a!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(n))){const[b]=$ee(this.getOffsetForIndex(n,d));xBe(b,this.getScrollOffset())||this.scrollToIndex(n,{align:d,behavior:a})}else this.scrollToIndex(n,{align:d,behavior:a})}))},this.scrollBy=(n,{behavior:i}={})=>{this.cancelScrollToIndex(),i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:i})},this.getTotalSize=()=>{var l;var n;const i=this.getMeasurements();let a;return i.length===0?a=this.options.paddingStart:a=this.options.lanes===1?(l=(n=i[i.length-1])==null?void 0:n.end)!=null?l:0:Math.max(...i.slice(-this.options.lanes).map(f=>f.end)),Math.max(a-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:i,behavior:a})=>{this.options.scrollToFn(n,{behavior:a,adjustments:i},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t)}}const Kbe=(e,t,n,i)=>{for(;e<=t;){const a=(e+t)/2|0,l=n(a);if(l<i)e=a+1;else if(l>i)t=a-1;else return a}return e>0?e-1:0};function MBe({measurements:e,outerSize:t,scrollOffset:n,lanes:i}){const a=e.length-1;let f=Kbe(0,a,h=>e[h].start,n),d=f;for(;d<a&&e[d].end<n+t;)d++;return i>1&&(f=Math.max(0,f-f%i),d=Math.min(a,d+(i-1-d%i))),{startIndex:f,endIndex:d}}function NBe(e){const t=new PBe(se(e)),n=kS(t),i=t._didMount();return io(()=>se(e).getScrollElement(),a=>{a&&t._willUpdate()},{immediate:!0}),io(()=>se(e),a=>{t.setOptions({...a,onChange:(l,f)=>{var d;$$(n),(d=a.onChange)==null||d.call(a,l,f)}}),t._willUpdate(),$$(n)},{immediate:!0}),KI(i),n}function FBe(e){return NBe(Ge(()=>({observeElementRect:OBe,observeElementOffset:RBe,scrollToFn:LBe,...se(e)})))}function $Be(e,t,n){let i=kt(n==null?void 0:n.value),a=Ge(()=>e.value!==void 0);return[Ge(()=>a.value?e.value:i.value),function(l){return a.value||(i.value=l),t==null?void 0:t(l)}]}function Bee(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function w5(){let e=[],t={addEventListener(n,i,a,l){return n.addEventListener(i,a,l),t.add(()=>n.removeEventListener(i,a,l))},requestAnimationFrame(...n){let i=requestAnimationFrame(...n);t.add(()=>cancelAnimationFrame(i))},nextFrame(...n){t.requestAnimationFrame(()=>{t.requestAnimationFrame(...n)})},setTimeout(...n){let i=setTimeout(...n);t.add(()=>clearTimeout(i))},microTask(...n){let i={current:!0};return Bee(()=>{i.current&&n[0]()}),t.add(()=>{i.current=!1})},style(n,i,a){let l=n.style.getPropertyValue(i);return Object.assign(n.style,{[i]:a}),this.add(()=>{Object.assign(n.style,{[i]:l})})},group(n){let i=w5();return n(i),this.add(()=>i.dispose())},add(n){return e.push(n),()=>{let i=e.indexOf(n);if(i>=0)for(let a of e.splice(i,1))a()}},dispose(){for(let n of e.splice(0))n()}};return t}function BBe(){let e=w5();return $a(()=>e.dispose()),e}function VBe(){let e=BBe();return t=>{e.dispose(),e.nextFrame(t)}}var Ybe;let HBe=Symbol("headlessui.useid"),UBe=0;const xd=(Ybe=Oh)!=null?Ybe:function(){return Mr(HBe,()=>"".concat(++UBe))()};function Kn(e){var t;if(e==null||e.value==null)return null;let n=(t=e.value.$el)!=null?t:e.value;return n instanceof Node?n:null}function Hl(e,t,...n){if(e in t){let a=t[e];return typeof a=="function"?a(...n):a}let i=new Error('Tried to handle "'.concat(e,'" but there is no handler defined. Only defined handlers are: ').concat(Object.keys(t).map(a=>'"'.concat(a,'"')).join(", "),"."));throw Error.captureStackTrace&&Error.captureStackTrace(i,Hl),i}var zBe=Object.defineProperty,WBe=(e,t,n)=>t in e?zBe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xbe=(e,t,n)=>(WBe(e,typeof t!="symbol"?t+"":t,n),n);let jBe=class{constructor(){Xbe(this,"current",this.detect()),Xbe(this,"currentId",0)}set(t){this.current!==t&&(this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}},gO=new jBe;function H1(e){if(gO.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let t=Kn(e);if(t)return t.ownerDocument}return document}let Vee=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>"".concat(e,":not([tabindex='-1'])")).join(",");var Td=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(Td||{}),vO=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(vO||{}),ZBe=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(ZBe||{});function bO(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Vee)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var jV=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(jV||{});function ZV(e,t=0){var n;return e===((n=H1(e))==null?void 0:n.body)?!1:Hl(t,{0(){return e.matches(Vee)},1(){let i=e;for(;i!==null;){if(i.matches(Vee))return!0;i=i.parentElement}return!1}})}function Jbe(e){let t=H1(e);kc(()=>{t&&!ZV(t.activeElement,0)&&E5(e)})}var qBe=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(qBe||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function E5(e){e==null||e.focus({preventScroll:!0})}let GBe=["textarea","input"].join(",");function KBe(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,GBe))!=null?n:!1}function Hee(e,t=n=>n){return e.slice().sort((n,i)=>{let a=t(n),l=t(i);if(a===null||l===null)return 0;let f=a.compareDocumentPosition(l);return f&Node.DOCUMENT_POSITION_FOLLOWING?-1:f&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function YBe(e,t){return U1(bO(),t,{relativeTo:e})}function U1(e,t,{sorted:n=!0,relativeTo:i=null,skipElements:a=[]}={}){var l;let f=(l=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e==null?void 0:e.ownerDocument)!=null?l:document,d=Array.isArray(e)?n?Hee(e):e:bO(e);a.length>0&&d.length>1&&(d=d.filter(P=>!a.includes(P))),i=i!=null?i:f.activeElement;let h=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),b=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,d.indexOf(i))-1;if(t&4)return Math.max(0,d.indexOf(i))+1;if(t&8)return d.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),S=t&32?{preventScroll:!0}:{},k=0,T=d.length,O;do{if(k>=T||k+T<=0)return 0;let P=b+k;if(t&16)P=(P+T)%T;else{if(P<0)return 3;if(P>=T)return 1}O=d[P],O==null||O.focus(S),k+=h}while(O!==f.activeElement);return t&6&&KBe(O)&&O.select(),2}function Qbe(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function XBe(){return/Android/gi.test(window.navigator.userAgent)}function eye(){return Qbe()||XBe()}function qV(e,t,n){gO.isServer||oc(i=>{document.addEventListener(e,t,n),i(()=>document.removeEventListener(e,t,n))})}function tye(e,t,n){gO.isServer||oc(i=>{window.addEventListener(e,t,n),i(()=>window.removeEventListener(e,t,n))})}function GV(e,t,n=Ge(()=>!0)){function i(l,f){if(!n.value||l.defaultPrevented)return;let d=f(l);if(d===null||!d.getRootNode().contains(d))return;let h=function b(S){return typeof S=="function"?b(S()):Array.isArray(S)||S instanceof Set?S:[S]}(e);for(let b of h){if(b===null)continue;let S=b instanceof HTMLElement?b:Kn(b);if(S!=null&&S.contains(d)||l.composed&&l.composedPath().includes(S))return}return!ZV(d,jV.Loose)&&d.tabIndex!==-1&&l.preventDefault(),t(l,d)}let a=kt(null);qV("pointerdown",l=>{var f,d;n.value&&(a.value=((d=(f=l.composedPath)==null?void 0:f.call(l))==null?void 0:d[0])||l.target)},!0),qV("mousedown",l=>{var f,d;n.value&&(a.value=((d=(f=l.composedPath)==null?void 0:f.call(l))==null?void 0:d[0])||l.target)},!0),qV("click",l=>{eye()||a.value&&(i(l,()=>a.value),a.value=null)},!0),qV("touchend",l=>i(l,()=>l.target instanceof HTMLElement?l.target:null),!0),tye("blur",l=>i(l,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function nye(e,t){if(e)return e;let n=t!=null?t:"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function Uee(e,t){let n=kt(nye(e.value.type,e.value.as));return Pr(()=>{n.value=nye(e.value.type,e.value.as)}),oc(()=>{var i;n.value||Kn(t)&&Kn(t)instanceof HTMLButtonElement&&!((i=Kn(t))!=null&&i.hasAttribute("type"))&&(n.value="button")}),n}function sye(e){return[e.screenX,e.screenY]}function oye(){let e=kt([-1,-1]);return{wasMoved(t){let n=sye(t);return e.value[0]===n[0]&&e.value[1]===n[1]?!1:(e.value=n,!0)},update(t){e.value=sye(t)}}}function rye({container:e,accept:t,walk:n,enabled:i}){oc(()=>{let a=e.value;if(!a||i!==void 0&&!i.value)return;let l=H1(e);if(!l)return;let f=Object.assign(h=>t(h),{acceptNode:t}),d=l.createTreeWalker(a,NodeFilter.SHOW_ELEMENT,f,!1);for(;d.nextNode();)n(d.currentNode)})}var Dm=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Dm||{}),k5=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(k5||{});function Ul({visible:e=!0,features:t=0,ourProps:n,theirProps:i,...a}){var l;let f=aye(i,n),d=Object.assign(a,{props:f});if(e||t&2&&f.static)return zee(d);if(t&1){let h=(l=f.unmount)==null||l?0:1;return Hl(h,{0(){return null},1(){return zee({...a,props:{...f,hidden:!0,style:{display:"none"}}})}})}return zee(d)}function zee({props:e,attrs:t,slots:n,slot:i,name:a}){var l,f;let{as:d,...h}=yO(e,["unmount","static"]),b=(l=n.default)==null?void 0:l.call(n,i),S={};if(i){let k=!1,T=[];for(let[O,P]of Object.entries(i))typeof P=="boolean"&&(k=!0),P===!0&&T.push(O);k&&(S["data-headlessui-state"]=T.join(" "))}if(d==="template"){if(b=iye(b!=null?b:[]),Object.keys(h).length>0||Object.keys(t).length>0){let[k,...T]=b!=null?b:[];if(!QBe(k)||T.length>0)throw new Error(['Passing props on "template"!',"","The current component <".concat(a,' /> is rendering a "template".'),"However we need to passthrough the following props:",Object.keys(h).concat(Object.keys(t)).map(B=>B.trim()).filter((B,W,Z)=>Z.indexOf(B)===W).sort((B,W)=>B.localeCompare(W)).map(B=>" - ".concat(B)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".',"Render a single element as the child so that we can forward the props onto that element."].map(B=>" - ".concat(B)).join("\n")].join("\n"));let O=aye((f=k.props)!=null?f:{},h,S),P=Rh(k,O,!0);for(let B in O)B.startsWith("on")&&(P.props||(P.props={}),P.props[B]=O[B]);return P}return Array.isArray(b)&&b.length===1?b[0]:b}return oi(d,Object.assign({},h,S),{default:()=>b})}function iye(e){return e.flatMap(t=>t.type===bt?iye(t.children):[t])}function aye(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let i of e)for(let a in i)a.startsWith("on")&&typeof i[a]=="function"?(n[a]!=null||(n[a]=[]),n[a].push(i[a])):t[a]=i[a];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(i=>[i,void 0])));for(let i in n)Object.assign(t,{[i](a,...l){let f=n[i];for(let d of f){if(a instanceof Event&&a.defaultPrevented)return;d(a,...l)}}});return t}function JBe(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function yO(e,t=[]){let n=Object.assign({},e);for(let i of t)i in n&&delete n[i];return n}function QBe(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}var x5=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(x5||{});let eC=Gr({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(e,{slots:t,attrs:n}){return()=>{var i;let{features:a,...l}=e,f={"aria-hidden":(a&2)===2?!0:(i=l["aria-hidden"])!=null?i:void 0,hidden:(a&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(a&4)===4&&(a&2)!==2&&{display:"none"}}};return Ul({ourProps:f,theirProps:l,slot:{},attrs:n,slots:t,name:"Hidden"})}}}),lye=Symbol("Context");var Ha=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Ha||{});function eVe(){return tC()!==null}function tC(){return Mr(lye,null)}function _O(e){Ba(lye,e)}var ri=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(ri||{}),cye=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))(cye||{});function tVe(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let Mb=[];tVe(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&Mb[0]!==t.target&&(Mb.unshift(t.target),Mb=Mb.filter(n=>n!=null&&n.isConnected),Mb.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function nVe(e){throw new Error("Unexpected object: "+e)}var Ya=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(Ya||{});function Wee(e,t){let n=t.resolveItems();if(n.length<=0)return null;let i=t.resolveActiveIndex(),a=i!=null?i:-1;switch(e.focus){case 0:{for(let l=0;l<n.length;++l)if(!t.resolveDisabled(n[l],l,n))return l;return i}case 1:{a===-1&&(a=n.length);for(let l=a-1;l>=0;--l)if(!t.resolveDisabled(n[l],l,n))return l;return i}case 2:{for(let l=a+1;l<n.length;++l)if(!t.resolveDisabled(n[l],l,n))return l;return i}case 3:{for(let l=n.length-1;l>=0;--l)if(!t.resolveDisabled(n[l],l,n))return l;return i}case 4:{for(let l=0;l<n.length;++l)if(t.resolveId(n[l],l,n)===e.id)return l;return i}case 5:return null;default:nVe(e)}}function uye(e={},t=null,n=[]){for(let[i,a]of Object.entries(e))fye(n,dye(t,i),a);return n}function dye(e,t){return e?e+"["+t+"]":t}function fye(e,t,n){if(Array.isArray(n))for(let[i,a]of n.entries())fye(e,dye(t,i.toString()),a);else n instanceof Date?e.push([t,n.toISOString()]):typeof n=="boolean"?e.push([t,n?"1":"0"]):typeof n=="string"?e.push([t,n]):typeof n=="number"?e.push([t,"".concat(n)]):n==null?e.push([t,""]):uye(n,t,e)}var sVe={};function oVe(e,t){return e===t}var rVe=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(rVe||{}),iVe=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(iVe||{}),aVe=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(aVe||{});let pye=Symbol("ComboboxContext");function SO(e){let t=Mr(pye,null);if(t===null){let n=new Error("<".concat(e," /> is missing a parent <Combobox /> component."));throw Error.captureStackTrace&&Error.captureStackTrace(n,SO),n}return t}let mye=Symbol("VirtualContext"),lVe=Gr({name:"VirtualProvider",setup(e,{slots:t}){let n=SO("VirtualProvider"),i=Ge(()=>{let d=Kn(n.optionsRef);if(!d)return{start:0,end:0};let h=window.getComputedStyle(d);return{start:parseFloat(h.paddingBlockStart||h.paddingTop),end:parseFloat(h.paddingBlockEnd||h.paddingBottom)}}),a=FBe(Ge(()=>({scrollPaddingStart:i.value.start,scrollPaddingEnd:i.value.end,count:n.virtual.value.options.length,estimateSize(){return 40},getScrollElement(){return Kn(n.optionsRef)},overscan:12}))),l=Ge(()=>{var d;return(d=n.virtual.value)==null?void 0:d.options}),f=kt(0);return io([l],()=>{f.value+=1}),Ba(mye,n.virtual.value?a:null),()=>[oi("div",{style:{position:"relative",width:"100%",height:"".concat(a.value.getTotalSize(),"px")},ref:d=>{if(d){if(typeof process<"u"&&sVe.JEST_WORKER_ID!==void 0||n.activationTrigger.value===0)return;n.activeOptionIndex.value!==null&&n.virtual.value.options.length>n.activeOptionIndex.value&&a.value.scrollToIndex(n.activeOptionIndex.value)}}},a.value.getVirtualItems().map(d=>Rh(t.default({option:n.virtual.value.options[d.index],open:n.comboboxState.value===0})[0],{key:"".concat(f.value,"-").concat(d.index),"data-index":d.index,"aria-setsize":n.virtual.value.options.length,"aria-posinset":d.index+1,style:{position:"absolute",top:0,left:0,transform:"translateY(".concat(d.start,"px)"),overflowAnchor:"none"}})))]}}),cVe=Gr({name:"Combobox",emits:{"update:modelValue":e=>!0},props:{as:{type:[Object,String],default:"template"},disabled:{type:[Boolean],default:!1},by:{type:[String,Function],nullable:!0,default:null},modelValue:{type:[Object,String,Number,Boolean],default:void 0},defaultValue:{type:[Object,String,Number,Boolean],default:void 0},form:{type:String,optional:!0},name:{type:String,optional:!0},nullable:{type:Boolean,default:!1},multiple:{type:[Boolean],default:!1},immediate:{type:[Boolean],default:!1},virtual:{type:Object,default:null}},inheritAttrs:!1,setup(e,{slots:t,attrs:n,emit:i}){let a=kt(1),l=kt(null),f=kt(null),d=kt(null),h=kt(null),b=kt({static:!1,hold:!1}),S=kt([]),k=kt(null),T=kt(2),O=kt(!1);function P(de=he=>he){let he=k.value!==null?S.value[k.value]:null,ie=de(S.value.slice()),Be=ie.length>0&&ie[0].dataRef.order.value!==null?ie.sort((Ue,V)=>Ue.dataRef.order.value-V.dataRef.order.value):Hee(ie,Ue=>Kn(Ue.dataRef.domRef)),$e=he?Be.indexOf(he):null;return $e===-1&&($e=null),{options:Be,activeOptionIndex:$e}}let B=Ge(()=>e.multiple?1:0),W=Ge(()=>e.nullable),[Z,Y]=$Be(Ge(()=>e.modelValue),de=>i("update:modelValue",de),Ge(()=>e.defaultValue)),z=Ge(()=>Z.value===void 0?Hl(B.value,{1:[],0:void 0}):Z.value),q=null,ne=null;function ue(de){return Hl(B.value,{0(){return Y==null?void 0:Y(de)},1:()=>{let he=Qo(ce.value.value).slice(),ie=Qo(de),Be=he.findIndex($e=>ce.compare(ie,Qo($e)));return Be===-1?he.push(ie):he.splice(Be,1),Y==null?void 0:Y(he)}})}let J=Ge(()=>{});io([J],([de],[he])=>{if(ce.virtual.value&&de&&he&&k.value!==null){let ie=de.indexOf(he[k.value]);ie!==-1?k.value=ie:k.value=null}});let ce={comboboxState:a,value:z,mode:B,compare(de,he){if(typeof e.by=="string"){let ie=e.by;return(de==null?void 0:de[ie])===(he==null?void 0:he[ie])}return e.by===null?oVe(de,he):e.by(de,he)},calculateIndex(de){return ce.virtual.value?e.by===null?ce.virtual.value.options.indexOf(de):ce.virtual.value.options.findIndex(he=>ce.compare(he,de)):S.value.findIndex(he=>ce.compare(he.dataRef.value,de))},defaultValue:Ge(()=>e.defaultValue),nullable:W,immediate:Ge(()=>!1),virtual:Ge(()=>null),inputRef:f,labelRef:l,buttonRef:d,optionsRef:h,disabled:Ge(()=>e.disabled),options:S,change(de){Y(de)},activeOptionIndex:Ge(()=>{if(O.value&&k.value===null&&(ce.virtual.value?ce.virtual.value.options.length>0:S.value.length>0)){if(ce.virtual.value){let he=ce.virtual.value.options.findIndex(ie=>{var Be;return!((Be=ce.virtual.value)!=null&&Be.disabled(ie))});if(he!==-1)return he}let de=S.value.findIndex(he=>!he.dataRef.disabled);if(de!==-1)return de}return k.value}),activationTrigger:T,optionsPropsRef:b,closeCombobox(){O.value=!1,!e.disabled&&a.value!==1&&(a.value=1,k.value=null)},openCombobox(){if(O.value=!0,!e.disabled&&a.value!==0){if(ce.value.value){let de=ce.calculateIndex(ce.value.value);de!==-1&&(k.value=de)}a.value=0}},setActivationTrigger(de){T.value=de},goToOption(de,he,ie){O.value=!1,q!==null&&cancelAnimationFrame(q),q=requestAnimationFrame(()=>{if(e.disabled||h.value&&!b.value.static&&a.value===1)return;if(ce.virtual.value){k.value=de===Ya.Specific?he:Wee({focus:de},{resolveItems:()=>ce.virtual.value.options,resolveActiveIndex:()=>{var Ue,V;return(V=(Ue=ce.activeOptionIndex.value)!=null?Ue:ce.virtual.value.options.findIndex(Ye=>{var Fe;return!((Fe=ce.virtual.value)!=null&&Fe.disabled(Ye))}))!=null?V:null},resolveDisabled:Ue=>ce.virtual.value.disabled(Ue),resolveId(){throw new Error("Function not implemented.")}}),T.value=ie!=null?ie:2;return}let Be=P();if(Be.activeOptionIndex===null){let Ue=Be.options.findIndex(V=>!V.dataRef.disabled);Ue!==-1&&(Be.activeOptionIndex=Ue)}let $e=de===Ya.Specific?he:Wee({focus:de},{resolveItems:()=>Be.options,resolveActiveIndex:()=>Be.activeOptionIndex,resolveId:Ue=>Ue.id,resolveDisabled:Ue=>Ue.dataRef.disabled});k.value=$e,T.value=ie!=null?ie:2,S.value=Be.options})},selectOption(de){let he=S.value.find(Be=>Be.id===de);if(!he)return;let{dataRef:ie}=he;ue(ie.value)},selectActiveOption(){if(ce.activeOptionIndex.value!==null){if(ce.virtual.value)ue(ce.virtual.value.options[ce.activeOptionIndex.value]);else{let{dataRef:de}=S.value[ce.activeOptionIndex.value];ue(de.value)}ce.goToOption(Ya.Specific,ce.activeOptionIndex.value)}},registerOption(de,he){let ie=I1({id:de,dataRef:he});if(ce.virtual.value){S.value.push(ie);return}ne&&cancelAnimationFrame(ne);let Be=P($e=>($e.push(ie),$e));k.value===null&&ce.isSelected(he.value.value)&&(Be.activeOptionIndex=Be.options.indexOf(ie)),S.value=Be.options,k.value=Be.activeOptionIndex,T.value=2,Be.options.some($e=>!Kn($e.dataRef.domRef))&&(ne=requestAnimationFrame(()=>{let $e=P();S.value=$e.options,k.value=$e.activeOptionIndex}))},unregisterOption(de,he){if(q!==null&&cancelAnimationFrame(q),he&&(O.value=!0),ce.virtual.value){S.value=S.value.filter(Be=>Be.id!==de);return}let ie=P(Be=>{let $e=Be.findIndex(Ue=>Ue.id===de);return $e!==-1&&Be.splice($e,1),Be});S.value=ie.options,k.value=ie.activeOptionIndex,T.value=2},isSelected(de){return Hl(B.value,{0:()=>ce.compare(Qo(ce.value.value),Qo(de)),1:()=>Qo(ce.value.value).some(he=>ce.compare(Qo(he),Qo(de)))})},isActive(de){return k.value===ce.calculateIndex(de)}};GV([f,d,h],()=>ce.closeCombobox(),Ge(()=>a.value===0)),Ba(pye,ce),_O(Ge(()=>Hl(a.value,{0:Ha.Open,1:Ha.Closed})));let ge=Ge(()=>{var de;return(de=Kn(f))==null?void 0:de.closest("form")});return Pr(()=>{io([ge],()=>{if(!ge.value||e.defaultValue===void 0)return;function de(){ce.change(e.defaultValue)}return ge.value.addEventListener("reset",de),()=>{var he;(he=ge.value)==null||he.removeEventListener("reset",de)}},{immediate:!0})}),()=>{var de,he,ie;let{name:Be,disabled:$e,form:Ue,...V}=e,Ye={open:a.value===0,disabled:$e,activeIndex:ce.activeOptionIndex.value,activeOption:ce.activeOptionIndex.value===null?null:ce.virtual.value?ce.virtual.value.options[(de=ce.activeOptionIndex.value)!=null?de:0]:(ie=(he=ce.options.value[ce.activeOptionIndex.value])==null?void 0:he.dataRef.value)!=null?ie:null,value:z.value};return oi(bt,[...Be!=null&&z.value!=null?uye({[Be]:z.value}).map(([Fe,St])=>oi(eC,JBe({features:x5.Hidden,key:Fe,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:Ue,disabled:$e,name:Fe,value:St}))):[],Ul({theirProps:{...n,...yO(V,["by","defaultValue","immediate","modelValue","multiple","nullable","onUpdate:modelValue","virtual"])},ourProps:{},slot:Ye,slots:t,attrs:n,name:"Combobox"})])}}}),uVe=Gr({name:"ComboboxInput",props:{as:{type:[Object,String],default:"input"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},displayValue:{type:Function},defaultValue:{type:String,default:void 0},id:{type:String,default:null}},emits:{change:e=>!0},setup(e,{emit:t,attrs:n,slots:i,expose:a}){var l;let f=(l=e.id)!=null?l:"headlessui-combobox-input-".concat(xd()),d=SO("ComboboxInput"),h=Ge(()=>H1(Kn(d.inputRef))),b={value:!1};a({el:d.inputRef,$el:d.inputRef});function S(){d.change(null);let ne=Kn(d.optionsRef);ne&&(ne.scrollTop=0),d.goToOption(Ya.Nothing)}let k=Ge(()=>{var ne;let ue=d.value.value;return Kn(d.inputRef)?typeof e.displayValue<"u"&&ue!==void 0?(ne=e.displayValue(ue))!=null?ne:"":typeof ue=="string"?ue:"":""});Pr(()=>{io([k,d.comboboxState,h],([ne,ue],[J,ce])=>{if(b.value)return;let ge=Kn(d.inputRef);ge&&((ce===0&&ue===1||ne!==J)&&(ge.value=ne),requestAnimationFrame(()=>{var de;if(b.value||!ge||((de=h.value)==null?void 0:de.activeElement)!==ge)return;let{selectionStart:he,selectionEnd:ie}=ge;Math.abs((ie!=null?ie:0)-(he!=null?he:0))===0&&he===0&&ge.setSelectionRange(ge.value.length,ge.value.length)}))},{immediate:!0}),io([d.comboboxState],([ne],[ue])=>{if(ne===0&&ue===1){if(b.value)return;let J=Kn(d.inputRef);if(!J)return;let ce=J.value,{selectionStart:ge,selectionEnd:de,selectionDirection:he}=J;J.value="",J.value=ce,he!==null?J.setSelectionRange(ge,de,he):J.setSelectionRange(ge,de)}})});let T=kt(!1);function O(){T.value=!0}function P(){w5().nextFrame(()=>{T.value=!1})}let B=VBe();function W(ne){switch(b.value=!0,B(()=>{b.value=!1}),ne.key){case ri.Enter:if(b.value=!1,d.comboboxState.value!==0||T.value)return;if(ne.preventDefault(),ne.stopPropagation(),d.activeOptionIndex.value===null){d.closeCombobox();return}d.selectActiveOption(),d.mode.value===0&&d.closeCombobox();break;case ri.ArrowDown:return b.value=!1,ne.preventDefault(),ne.stopPropagation(),Hl(d.comboboxState.value,{0:()=>d.goToOption(Ya.Next),1:()=>d.openCombobox()});case ri.ArrowUp:return b.value=!1,ne.preventDefault(),ne.stopPropagation(),Hl(d.comboboxState.value,{0:()=>d.goToOption(Ya.Previous),1:()=>{d.openCombobox(),kc(()=>{d.value.value||d.goToOption(Ya.Last)})}});case ri.Home:if(ne.shiftKey)break;return b.value=!1,ne.preventDefault(),ne.stopPropagation(),d.goToOption(Ya.First);case ri.PageUp:return b.value=!1,ne.preventDefault(),ne.stopPropagation(),d.goToOption(Ya.First);case ri.End:if(ne.shiftKey)break;return b.value=!1,ne.preventDefault(),ne.stopPropagation(),d.goToOption(Ya.Last);case ri.PageDown:return b.value=!1,ne.preventDefault(),ne.stopPropagation(),d.goToOption(Ya.Last);case ri.Escape:if(b.value=!1,d.comboboxState.value!==0)return;ne.preventDefault(),d.optionsRef.value&&!d.optionsPropsRef.value.static&&ne.stopPropagation(),d.nullable.value&&d.mode.value===0&&d.value.value===null&&S(),d.closeCombobox();break;case ri.Tab:if(b.value=!1,d.comboboxState.value!==0)return;d.mode.value===0&&d.activationTrigger.value!==1&&d.selectActiveOption(),d.closeCombobox();break}}function Z(ne){t("change",ne),d.nullable.value&&d.mode.value===0&&ne.target.value===""&&S(),d.openCombobox()}function Y(ne){var ue,J,ce;let ge=(ue=ne.relatedTarget)!=null?ue:Mb.find(de=>de!==ne.currentTarget);if(b.value=!1,!((J=Kn(d.optionsRef))!=null&&J.contains(ge))&&!((ce=Kn(d.buttonRef))!=null&&ce.contains(ge))&&d.comboboxState.value===0)return ne.preventDefault(),d.mode.value===0&&(d.nullable.value&&d.value.value===null?S():d.activationTrigger.value!==1&&d.selectActiveOption()),d.closeCombobox()}function z(ne){var ue,J,ce;let ge=(ue=ne.relatedTarget)!=null?ue:Mb.find(de=>de!==ne.currentTarget);(J=Kn(d.buttonRef))!=null&&J.contains(ge)||(ce=Kn(d.optionsRef))!=null&&ce.contains(ge)||d.disabled.value||d.immediate.value&&d.comboboxState.value!==0&&(d.openCombobox(),w5().nextFrame(()=>{d.setActivationTrigger(1)}))}let q=Ge(()=>{var ne,ue,J,ce;return(ce=(J=(ue=e.defaultValue)!=null?ue:d.defaultValue.value!==void 0?(ne=e.displayValue)==null?void 0:ne.call(e,d.defaultValue.value):null)!=null?J:d.defaultValue.value)!=null?ce:""});return()=>{var ne,ue,J,ce,ge,de,he;let ie={open:d.comboboxState.value===0},{displayValue:Be,onChange:$e,...Ue}=e,V={"aria-controls":(ne=d.optionsRef.value)==null?void 0:ne.id,"aria-expanded":d.comboboxState.value===0,"aria-activedescendant":d.activeOptionIndex.value===null?void 0:d.virtual.value?(ue=d.options.value.find(Ye=>!d.virtual.value.disabled(Ye.dataRef.value)&&d.compare(Ye.dataRef.value,d.virtual.value.options[d.activeOptionIndex.value])))==null?void 0:ue.id:(J=d.options.value[d.activeOptionIndex.value])==null?void 0:J.id,"aria-labelledby":(de=(ce=Kn(d.labelRef))==null?void 0:ce.id)!=null?de:(ge=Kn(d.buttonRef))==null?void 0:ge.id,"aria-autocomplete":"list",id:f,onCompositionstart:O,onCompositionend:P,onKeydown:W,onInput:Z,onFocus:z,onBlur:Y,role:"combobox",type:(he=n.type)!=null?he:"text",tabIndex:0,ref:d.inputRef,defaultValue:q.value,disabled:d.disabled.value===!0?!0:void 0};return Ul({ourProps:V,theirProps:Ue,slot:ie,attrs:n,slots:i,features:Dm.RenderStrategy|Dm.Static,name:"ComboboxInput"})}}}),dVe=Gr({name:"ComboboxOptions",props:{as:{type:[Object,String],default:"ul"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},hold:{type:[Boolean],default:!1}},setup(e,{attrs:t,slots:n,expose:i}){let a=SO("ComboboxOptions"),l="headlessui-combobox-options-".concat(xd());i({el:a.optionsRef,$el:a.optionsRef}),oc(()=>{a.optionsPropsRef.value.static=e.static}),oc(()=>{a.optionsPropsRef.value.hold=e.hold});let f=tC(),d=Ge(()=>f!==null?(f.value&Ha.Open)===Ha.Open:a.comboboxState.value===0);rye({container:Ge(()=>Kn(a.optionsRef)),enabled:Ge(()=>a.comboboxState.value===0),accept(b){return b.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:b.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(b){b.setAttribute("role","none")}});function h(b){b.preventDefault()}return()=>{var b,S,k;let T={open:a.comboboxState.value===0},O={"aria-labelledby":(k=(b=Kn(a.labelRef))==null?void 0:b.id)!=null?k:(S=Kn(a.buttonRef))==null?void 0:S.id,id:l,ref:a.optionsRef,role:"listbox","aria-multiselectable":a.mode.value===1?!0:void 0,onMousedown:h},P=yO(e,["hold"]);return Ul({ourProps:O,theirProps:P,slot:T,attrs:t,slots:a.virtual.value&&a.comboboxState.value===0?{...n,default:()=>[oi(lVe,{},n.default)]}:n,features:Dm.RenderStrategy|Dm.Static,visible:d.value,name:"ComboboxOptions"})}}}),jee=Gr({name:"ComboboxOption",props:{as:{type:[Object,String],default:"li"},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1},order:{type:[Number],default:null}},setup(e,{slots:t,attrs:n,expose:i}){let a=SO("ComboboxOption"),l="headlessui-combobox-option-".concat(xd()),f=kt(null),d=Ge(()=>e.disabled);i({el:f,$el:f});let h=Ge(()=>{var Y;return a.virtual.value?a.activeOptionIndex.value===a.calculateIndex(e.value):a.activeOptionIndex.value===null?!1:((Y=a.options.value[a.activeOptionIndex.value])==null?void 0:Y.id)===l}),b=Ge(()=>a.isSelected(e.value)),S=Mr(mye,null),k=Ge(()=>({disabled:e.disabled,value:e.value,domRef:f,order:Ge(()=>e.order)}));Pr(()=>a.registerOption(l,k)),$a(()=>a.unregisterOption(l,h.value)),oc(()=>{let Y=Kn(f);Y&&(S==null||S.value.measureElement(Y))}),oc(()=>{a.comboboxState.value===0&&h.value&&(a.virtual.value||a.activationTrigger.value!==0&&kc(()=>{var Y,z;return(z=(Y=Kn(f))==null?void 0:Y.scrollIntoView)==null?void 0:z.call(Y,{block:"nearest"})}))});function T(Y){Y.preventDefault(),Y.button===cye.Left&&(d.value||(a.selectOption(l),eye()||requestAnimationFrame(()=>{var z;return(z=Kn(a.inputRef))==null?void 0:z.focus({preventScroll:!0})}),a.mode.value===0&&a.closeCombobox()))}function O(){var Y;if(e.disabled||(Y=a.virtual.value)!=null&&Y.disabled(e.value))return a.goToOption(Ya.Nothing);let z=a.calculateIndex(e.value);a.goToOption(Ya.Specific,z)}let P=oye();function B(Y){P.update(Y)}function W(Y){var z;if(!P.wasMoved(Y)||e.disabled||(z=a.virtual.value)!=null&&z.disabled(e.value)||h.value)return;let q=a.calculateIndex(e.value);a.goToOption(Ya.Specific,q,0)}function Z(Y){var z;P.wasMoved(Y)&&(e.disabled||(z=a.virtual.value)!=null&&z.disabled(e.value)||h.value&&(a.optionsPropsRef.value.hold||a.goToOption(Ya.Nothing)))}return()=>{let{disabled:Y}=e,z={active:h.value,selected:b.value,disabled:Y},q={id:l,ref:f,role:"option",tabIndex:Y===!0?void 0:-1,"aria-disabled":Y===!0?!0:void 0,"aria-selected":b.value,disabled:void 0,onMousedown:T,onFocus:O,onPointerenter:B,onMouseenter:B,onPointermove:W,onMousemove:W,onPointerleave:Z,onMouseleave:Z},ne=yO(e,["order","value"]);return Ul({ourProps:q,theirProps:ne,slot:z,attrs:n,slots:t,name:"ComboboxOption"})}}});function Zee(e,t,n,i){gO.isServer||oc(a=>{e=e!=null?e:window,e.addEventListener(t,n,i),a(()=>e.removeEventListener(t,n,i))})}var $h=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))($h||{});function qee(){let e=kt(0);return tye("keydown",t=>{t.key==="Tab"&&(e.value=t.shiftKey?1:0)}),e}function hye(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.value){let i=Kn(n);i instanceof HTMLElement&&t.add(i)}return t}var gye=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(gye||{});let CO=Object.assign(Gr({name:"FocusTrap",props:{as:{type:[Object,String],default:"div"},initialFocus:{type:Object,default:null},features:{type:Number,default:30},containers:{type:[Object,Function],default:kt(new Set)}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:i}){let a=kt(null);i({el:a,$el:a});let l=Ge(()=>H1(a)),f=kt(!1);Pr(()=>f.value=!0),$a(()=>f.value=!1),pVe({ownerDocument:l},Ge(()=>f.value&&!!(e.features&16)));let d=mVe({ownerDocument:l,container:a,initialFocus:Ge(()=>e.initialFocus)},Ge(()=>f.value&&!!(e.features&2)));hVe({ownerDocument:l,container:a,containers:e.containers,previousActiveElement:d},Ge(()=>f.value&&!!(e.features&8)));let h=qee();function b(O){let P=Kn(a);P&&(B=>B())(()=>{Hl(h.value,{[$h.Forwards]:()=>{U1(P,Td.First,{skipElements:[O.relatedTarget]})},[$h.Backwards]:()=>{U1(P,Td.Last,{skipElements:[O.relatedTarget]})}})})}let S=kt(!1);function k(O){O.key==="Tab"&&(S.value=!0,requestAnimationFrame(()=>{S.value=!1}))}function T(O){if(!f.value)return;let P=hye(e.containers);Kn(a)instanceof HTMLElement&&P.add(Kn(a));let B=O.relatedTarget;B instanceof HTMLElement&&B.dataset.headlessuiFocusGuard!=="true"&&(vye(P,B)||(S.value?U1(Kn(a),Hl(h.value,{[$h.Forwards]:()=>Td.Next,[$h.Backwards]:()=>Td.Previous})|Td.WrapAround,{relativeTo:O.target}):O.target instanceof HTMLElement&&E5(O.target)))}return()=>{let O={},P={ref:a,onKeydown:k,onFocusout:T},{features:B,initialFocus:W,containers:Z,...Y}=e;return oi(bt,[!!(B&4)&&oi(eC,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:b,features:x5.Focusable}),Ul({ourProps:P,theirProps:{...t,...Y},slot:O,attrs:t,slots:n,name:"FocusTrap"}),!!(B&4)&&oi(eC,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:b,features:x5.Focusable})])}}}),{features:gye});function fVe(e){let t=kt(Mb.slice());return io([e],([n],[i])=>{i===!0&&n===!1?Bee(()=>{t.value.splice(0)}):i===!1&&n===!0&&(t.value=Mb.slice())},{flush:"post"}),()=>{var n;return(n=t.value.find(i=>i!=null&&i.isConnected))!=null?n:null}}function pVe({ownerDocument:e},t){let n=fVe(t);Pr(()=>{oc(()=>{var i,a;t.value||((i=e.value)==null?void 0:i.activeElement)===((a=e.value)==null?void 0:a.body)&&E5(n())},{flush:"post"})}),$a(()=>{t.value&&E5(n())})}function mVe({ownerDocument:e,container:t,initialFocus:n},i){let a=kt(null),l=kt(!1);return Pr(()=>l.value=!0),$a(()=>l.value=!1),Pr(()=>{io([t,n,i],(f,d)=>{if(f.every((b,S)=>(d==null?void 0:d[S])===b)||!i.value)return;let h=Kn(t);h&&Bee(()=>{var b,S;if(!l.value)return;let k=Kn(n),T=(b=e.value)==null?void 0:b.activeElement;if(k){if(k===T){a.value=T;return}}else if(h.contains(T)){a.value=T;return}k?E5(k):U1(h,Td.First|Td.NoScroll)===vO.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),a.value=(S=e.value)==null?void 0:S.activeElement})},{immediate:!0,flush:"post"})}),a}function hVe({ownerDocument:e,container:t,containers:n,previousActiveElement:i},a){var l;Zee((l=e.value)==null?void 0:l.defaultView,"focus",f=>{if(!a.value)return;let d=hye(n);Kn(t)instanceof HTMLElement&&d.add(Kn(t));let h=i.value;if(!h)return;let b=f.target;b&&b instanceof HTMLElement?vye(d,b)?(i.value=b,E5(b)):(f.preventDefault(),f.stopPropagation(),E5(h)):E5(i.value)},!0)}function vye(e,t){for(let n of e)if(n.contains(t))return!0;return!1}function gVe(e){let t=kS(e.getSnapshot());return $a(e.subscribe(()=>{t.value=e.getSnapshot()})),t}function vVe(e,t){let n=e(),i=new Set;return{getSnapshot(){return n},subscribe(a){return i.add(a),()=>i.delete(a)},dispatch(a,...l){let f=t[a].call(n,...l);f&&(n=f,i.forEach(d=>d()))}}}function bVe(){let e;return{before({doc:t}){var n;let i=t.documentElement;e=((n=t.defaultView)!=null?n:window).innerWidth-i.clientWidth},after({doc:t,d:n}){let i=t.documentElement,a=i.clientWidth-i.offsetWidth,l=e-a;n.style(i,"paddingRight","".concat(l,"px"))}}}function yVe(){return Qbe()?{before({doc:e,d:t,meta:n}){function i(a){return n.containers.flatMap(l=>l()).some(l=>l.contains(a))}t.microTask(()=>{var a;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let d=w5();d.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>d.dispose()))}let l=(a=window.scrollY)!=null?a:window.pageYOffset,f=null;t.addEventListener(e,"click",d=>{if(d.target instanceof HTMLElement)try{let h=d.target.closest("a");if(!h)return;let{hash:b}=new URL(h.href),S=e.querySelector(b);S&&!i(S)&&(f=S)}catch{}},!0),t.addEventListener(e,"touchstart",d=>{if(d.target instanceof HTMLElement)if(i(d.target)){let h=d.target;for(;h.parentElement&&i(h.parentElement);)h=h.parentElement;t.style(h,"overscrollBehavior","contain")}else t.style(d.target,"touchAction","none")}),t.addEventListener(e,"touchmove",d=>{if(d.target instanceof HTMLElement){if(d.target.tagName==="INPUT")return;if(i(d.target)){let h=d.target;for(;h.parentElement&&h.dataset.headlessuiPortal!==""&&!(h.scrollHeight>h.clientHeight||h.scrollWidth>h.clientWidth);)h=h.parentElement;h.dataset.headlessuiPortal===""&&d.preventDefault()}else d.preventDefault()}},{passive:!1}),t.add(()=>{var d;let h=(d=window.scrollY)!=null?d:window.pageYOffset;l!==h&&window.scrollTo(0,l),f&&f.isConnected&&(f.scrollIntoView({block:"nearest"}),f=null)})})}}:{}}function _Ve(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function SVe(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let nC=vVe(()=>new Map,{PUSH(e,t){var n;let i=(n=this.get(e))!=null?n:{doc:e,count:0,d:w5(),meta:new Set};return i.count++,i.meta.add(t),this.set(e,i),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let i={doc:e,d:t,meta:SVe(n)},a=[yVe(),bVe(),_Ve()];a.forEach(({before:l})=>l==null?void 0:l(i)),a.forEach(({after:l})=>l==null?void 0:l(i))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});nC.subscribe(()=>{let e=nC.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let i=t.get(n.doc)==="hidden",a=n.count!==0;(a&&!i||!a&&i)&&nC.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&nC.dispatch("TEARDOWN",n)}});function CVe(e,t,n){let i=gVe(nC),a=Ge(()=>{let l=e.value?i.value.get(e.value):void 0;return l?l.count>0:!1});return io([e,t],([l,f],[d],h)=>{if(!l||!f)return;nC.dispatch("PUSH",l,n);let b=!1;h(()=>{b||(nC.dispatch("POP",d!=null?d:l,n),b=!0)})},{immediate:!0}),a}let Gee=new Map,wO=new Map;function bye(e,t=kt(!0)){oc(n=>{var i;if(!t.value)return;let a=Kn(e);if(!a)return;n(function(){var f;if(!a)return;let d=(f=wO.get(a))!=null?f:1;if(d===1?wO.delete(a):wO.set(a,d-1),d!==1)return;let h=Gee.get(a);h&&(h["aria-hidden"]===null?a.removeAttribute("aria-hidden"):a.setAttribute("aria-hidden",h["aria-hidden"]),a.inert=h.inert,Gee.delete(a))});let l=(i=wO.get(a))!=null?i:0;wO.set(a,l+1),l===0&&(Gee.set(a,{"aria-hidden":a.getAttribute("aria-hidden"),inert:a.inert}),a.setAttribute("aria-hidden","true"),a.inert=!0)})}function yye({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){let i=kt(null),a=H1(i);function l(){var f,d,h;let b=[];for(let S of e)S!==null&&(S instanceof HTMLElement?b.push(S):"value"in S&&S.value instanceof HTMLElement&&b.push(S.value));if(t!=null&&t.value)for(let S of t.value)b.push(S);for(let S of(f=a==null?void 0:a.querySelectorAll("html > *, body > *"))!=null?f:[])S!==document.body&&S!==document.head&&S instanceof HTMLElement&&S.id!=="headlessui-portal-root"&&(S.contains(Kn(i))||S.contains((h=(d=Kn(i))==null?void 0:d.getRootNode())==null?void 0:h.host)||b.some(k=>S.contains(k))||b.push(S));return b}return{resolveContainers:l,contains(f){return l().some(d=>d.contains(f))},mainTreeNodeRef:i,MainTreeNode(){return n!=null?null:oi(eC,{features:x5.Hidden,ref:i})}}}let _ye=Symbol("ForcePortalRootContext");function wVe(){return Mr(_ye,!1)}let Sye=Gr({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup(e,{slots:t,attrs:n}){return Ba(_ye,e.force),()=>{let{force:i,...a}=e;return Ul({theirProps:a,ourProps:{},slot:{},slots:t,attrs:n,name:"ForcePortalRoot"})}}}),Cye=Symbol("StackContext");var Kee=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Kee||{});function EVe(){return Mr(Cye,()=>{})}function kVe({type:e,enabled:t,element:n,onUpdate:i}){let a=EVe();function l(...f){i==null||i(...f),a(...f)}Pr(()=>{io(t,(f,d)=>{f?l(0,e,n):d===!0&&l(1,e,n)},{immediate:!0,flush:"sync"})}),$a(()=>{t.value&&l(1,e,n)}),Ba(Cye,l)}let wye=Symbol("DescriptionContext");function xVe(){let e=Mr(wye,null);if(e===null)throw new Error("Missing parent");return e}function TVe({slot:e=kt({}),name:t="Description",props:n={}}={}){let i=kt([]);function a(l){return i.value.push(l),()=>{let f=i.value.indexOf(l);f!==-1&&i.value.splice(f,1)}}return Ba(wye,{register:a,slot:e,name:t,props:n}),Ge(()=>i.value.length>0?i.value.join(" "):void 0)}let IVe=Gr({name:"Description",props:{as:{type:[Object,String],default:"p"},id:{type:String,default:null}},setup(e,{attrs:t,slots:n}){var i;let a=(i=e.id)!=null?i:"headlessui-description-".concat(xd()),l=xVe();return Pr(()=>$a(l.register(a))),()=>{let{name:f="Description",slot:d=kt({}),props:h={}}=l,{...b}=e,S={...Object.entries(h).reduce((k,[T,O])=>Object.assign(k,{[T]:se(O)}),{}),id:a};return Ul({ourProps:S,theirProps:b,slot:d.value,attrs:t,slots:n,name:f})}}});function AVe(e){let t=H1(e);if(!t){if(e===null)return null;throw new Error("[Headless UI]: Cannot find ownerDocument for contextElement: ".concat(e))}let n=t.getElementById("headlessui-portal-root");if(n)return n;let i=t.createElement("div");return i.setAttribute("id","headlessui-portal-root"),t.body.appendChild(i)}const Yee=new WeakMap;function OVe(e){var t;return(t=Yee.get(e))!=null?t:0}function Eye(e,t){let n=t(OVe(e));return n<=0?Yee.delete(e):Yee.set(e,n),n}let RVe=Gr({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){let i=kt(null),a=Ge(()=>H1(i)),l=wVe(),f=Mr(xye,null),d=kt(l===!0||f==null?AVe(i.value):f.resolveTarget());d.value&&Eye(d.value,T=>T+1);let h=kt(!1);Pr(()=>{h.value=!0}),oc(()=>{l||f!=null&&(d.value=f.resolveTarget())});let b=Mr(Xee,null),S=!1,k=sd();return io(i,()=>{if(S||!b)return;let T=Kn(i);T&&($a(b.register(T),k),S=!0)}),$a(()=>{var T,O;let P=(T=a.value)==null?void 0:T.getElementById("headlessui-portal-root");!P||d.value!==P||Eye(d.value,B=>B-1)||d.value.children.length>0||(O=d.value.parentElement)==null||O.removeChild(d.value)}),()=>{if(!h.value||d.value===null)return null;let T={ref:i,"data-headlessui-portal":""};return oi(JX,{to:d.value},Ul({ourProps:T,theirProps:e,slot:{},attrs:n,slots:t,name:"Portal"}))}}}),Xee=Symbol("PortalParentContext");function kye(){let e=Mr(Xee,null),t=kt([]);function n(l){return t.value.push(l),e&&e.register(l),()=>i(l)}function i(l){let f=t.value.indexOf(l);f!==-1&&t.value.splice(f,1),e&&e.unregister(l)}let a={register:n,unregister:i,portals:t};return[t,Gr({name:"PortalWrapper",setup(l,{slots:f}){return Ba(Xee,a),()=>{var d;return(d=f.default)==null?void 0:d.call(f)}}})]}let xye=Symbol("PortalGroupContext"),DVe=Gr({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup(e,{attrs:t,slots:n}){let i=I1({resolveTarget(){return e.target}});return Ba(xye,i),()=>{let{target:a,...l}=e;return Ul({theirProps:l,ourProps:{},slot:{},attrs:t,slots:n,name:"PortalGroup"})}}});var LVe=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(LVe||{});let Jee=Symbol("DialogContext");function Qee(e){let t=Mr(Jee,null);if(t===null){let n=new Error("<".concat(e," /> is missing a parent <Dialog /> component."));throw Error.captureStackTrace&&Error.captureStackTrace(n,Qee),n}return t}let KV="DC8F892D-2EBD-447C-A4C8-A03058436FF4",ete=Gr({name:"Dialog",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},open:{type:[Boolean,String],default:KV},initialFocus:{type:Object,default:null},id:{type:String,default:null},role:{type:String,default:"dialog"}},emits:{close:e=>!0},setup(e,{emit:t,attrs:n,slots:i,expose:a}){var l,f;let d=(l=e.id)!=null?l:"headlessui-dialog-".concat(xd()),h=kt(!1);Pr(()=>{h.value=!0});let b=!1,S=Ge(()=>e.role==="dialog"||e.role==="alertdialog"?e.role:(b||(b=!0,console.warn("Invalid role [".concat(S,"] passed to <Dialog />. Only `dialog` and and `alertdialog` are supported. Using `dialog` instead."))),"dialog")),k=kt(0),T=tC(),O=Ge(()=>e.open===KV&&T!==null?(T.value&Ha.Open)===Ha.Open:e.open),P=kt(null),B=Ge(()=>H1(P));if(a({el:P,$el:P}),!(e.open!==KV||T!==null))throw new Error("You forgot to provide an `open` prop to the `Dialog`.");if(typeof O.value!="boolean")throw new Error("You provided an `open` prop to the `Dialog`, but the value is not a boolean. Received: ".concat(O.value===KV?void 0:e.open));let W=Ge(()=>h.value&&O.value?0:1),Z=Ge(()=>W.value===0),Y=Ge(()=>k.value>1),z=Mr(Jee,null)!==null,[q,ne]=kye(),{resolveContainers:ue,mainTreeNodeRef:J,MainTreeNode:ce}=yye({portals:q,defaultContainers:[Ge(()=>{var He;return(He=Ye.panelRef.value)!=null?He:P.value})]}),ge=Ge(()=>Y.value?"parent":"leaf"),de=Ge(()=>T!==null?(T.value&Ha.Closing)===Ha.Closing:!1),he=Ge(()=>z||de.value?!1:Z.value),ie=Ge(()=>{var He,ft,ht;return(ht=Array.from((ft=(He=B.value)==null?void 0:He.querySelectorAll("body > *"))!=null?ft:[]).find(At=>At.id==="headlessui-portal-root"?!1:At.contains(Kn(J))&&At instanceof HTMLElement))!=null?ht:null});bye(ie,he);let Be=Ge(()=>Y.value?!0:Z.value),$e=Ge(()=>{var He,ft,ht;return(ht=Array.from((ft=(He=B.value)==null?void 0:He.querySelectorAll("[data-headlessui-portal]"))!=null?ft:[]).find(At=>At.contains(Kn(J))&&At instanceof HTMLElement))!=null?ht:null});bye($e,Be),kVe({type:"Dialog",enabled:Ge(()=>W.value===0),element:P,onUpdate:(He,ft)=>{if(ft==="Dialog")return Hl(He,{[Kee.Add]:()=>k.value+=1,[Kee.Remove]:()=>k.value-=1})}});let Ue=TVe({name:"DialogDescription",slot:Ge(()=>({open:O.value}))}),V=kt(null),Ye={titleId:V,panelRef:kt(null),dialogState:W,setTitleId(He){V.value!==He&&(V.value=He)},close(){t("close",!1)}};Ba(Jee,Ye);let Fe=Ge(()=>!(!Z.value||Y.value));GV(ue,(He,ft)=>{He.preventDefault(),Ye.close(),kc(()=>ft==null?void 0:ft.focus())},Fe);let St=Ge(()=>!(Y.value||W.value!==0));Zee((f=B.value)==null?void 0:f.defaultView,"keydown",He=>{St.value&&(He.defaultPrevented||He.key===ri.Escape&&(He.preventDefault(),He.stopPropagation(),Ye.close()))});let Dt=Ge(()=>!(de.value||W.value!==0||z));return CVe(B,Dt,He=>{var ft;return{containers:[...(ft=He.containers)!=null?ft:[],ue]}}),oc(He=>{if(W.value!==0)return;let ft=Kn(P);if(!ft)return;let ht=new ResizeObserver(At=>{for(let hn of At){let ct=hn.target.getBoundingClientRect();ct.x===0&&ct.y===0&&ct.width===0&&ct.height===0&&Ye.close()}});ht.observe(ft),He(()=>ht.disconnect())}),()=>{let{open:He,initialFocus:ft,...ht}=e,At={...n,ref:P,id:d,role:S.value,"aria-modal":W.value===0?!0:void 0,"aria-labelledby":V.value,"aria-describedby":Ue.value},hn={open:W.value===0};return oi(Sye,{force:!0},()=>[oi(RVe,()=>oi(DVe,{target:P.value},()=>oi(Sye,{force:!1},()=>oi(CO,{initialFocus:ft,containers:ue,features:Z.value?Hl(ge.value,{parent:CO.features.RestoreFocus,leaf:CO.features.All&~CO.features.FocusLock}):CO.features.None},()=>oi(ne,{},()=>Ul({ourProps:At,theirProps:{...ht,...n},slot:hn,attrs:n,slots:i,visible:W.value===0,features:Dm.RenderStrategy|Dm.Static,name:"Dialog"})))))),oi(ce)])}}}),tte=Gr({name:"DialogPanel",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:null}},setup(e,{attrs:t,slots:n,expose:i}){var a;let l=(a=e.id)!=null?a:"headlessui-dialog-panel-".concat(xd()),f=Qee("DialogPanel");i({el:f.panelRef,$el:f.panelRef});function d(h){h.stopPropagation()}return()=>{let{...h}=e,b={id:l,ref:f.panelRef,onClick:d};return Ul({ourProps:b,theirProps:h,slot:{open:f.dialogState.value===0},attrs:t,slots:n,name:"DialogPanel"})}}}),nte=Gr({name:"DialogTitle",props:{as:{type:[Object,String],default:"h2"},id:{type:String,default:null}},setup(e,{attrs:t,slots:n}){var i;let a=(i=e.id)!=null?i:"headlessui-dialog-title-".concat(xd()),l=Qee("DialogTitle");return Pr(()=>{l.setTitleId(a),$a(()=>l.setTitleId(null))}),()=>{let{...f}=e;return Ul({ourProps:{id:a},theirProps:f,slot:{open:l.dialogState.value===0},attrs:t,slots:n,name:"DialogTitle"})}}}),PVe=IVe;var MVe=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(MVe||{});let Tye=Symbol("DisclosureContext");function ste(e){let t=Mr(Tye,null);if(t===null){let n=new Error("<".concat(e," /> is missing a parent <Disclosure /> component."));throw Error.captureStackTrace&&Error.captureStackTrace(n,ste),n}return t}let Iye=Symbol("DisclosurePanelContext");function NVe(){return Mr(Iye,null)}let FVe=Gr({name:"Disclosure",props:{as:{type:[Object,String],default:"template"},defaultOpen:{type:[Boolean],default:!1}},setup(e,{slots:t,attrs:n}){let i=kt(e.defaultOpen?0:1),a=kt(null),l=kt(null),f={buttonId:kt("headlessui-disclosure-button-".concat(xd())),panelId:kt("headlessui-disclosure-panel-".concat(xd())),disclosureState:i,panel:a,button:l,toggleDisclosure(){i.value=Hl(i.value,{0:1,1:0})},closeDisclosure(){i.value!==1&&(i.value=1)},close(d){f.closeDisclosure();let h=d?d instanceof HTMLElement?d:d.value instanceof HTMLElement?Kn(d):Kn(f.button):Kn(f.button);h==null||h.focus()}};return Ba(Tye,f),_O(Ge(()=>Hl(i.value,{0:Ha.Open,1:Ha.Closed}))),()=>{let{defaultOpen:d,...h}=e,b={open:i.value===0,close:f.close};return Ul({theirProps:h,ourProps:{},slot:b,slots:t,attrs:n,name:"Disclosure"})}}}),$Ve=Gr({name:"DisclosureButton",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:null}},setup(e,{attrs:t,slots:n,expose:i}){let a=ste("DisclosureButton"),l=NVe(),f=Ge(()=>l===null?!1:l.value===a.panelId.value);Pr(()=>{f.value||e.id!==null&&(a.buttonId.value=e.id)}),$a(()=>{f.value||(a.buttonId.value=null)});let d=kt(null);i({el:d,$el:d}),f.value||oc(()=>{a.button.value=d.value});let h=Uee(Ge(()=>({as:e.as,type:t.type})),d);function b(){var T;e.disabled||(f.value?(a.toggleDisclosure(),(T=Kn(a.button))==null||T.focus()):a.toggleDisclosure())}function S(T){var O;if(!e.disabled)if(f.value)switch(T.key){case ri.Space:case ri.Enter:T.preventDefault(),T.stopPropagation(),a.toggleDisclosure(),(O=Kn(a.button))==null||O.focus();break}else switch(T.key){case ri.Space:case ri.Enter:T.preventDefault(),T.stopPropagation(),a.toggleDisclosure();break}}function k(T){switch(T.key){case ri.Space:T.preventDefault();break}}return()=>{var T;let O={open:a.disclosureState.value===0},{id:P,...B}=e,W=f.value?{ref:d,type:h.value,onClick:b,onKeydown:S}:{id:(T=a.buttonId.value)!=null?T:P,ref:d,type:h.value,"aria-expanded":a.disclosureState.value===0,"aria-controls":a.disclosureState.value===0||Kn(a.panel)?a.panelId.value:void 0,disabled:e.disabled?!0:void 0,onClick:b,onKeydown:S,onKeyup:k};return Ul({ourProps:W,theirProps:B,slot:O,attrs:t,slots:n,name:"DisclosureButton"})}}}),BVe=Gr({name:"DisclosurePanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:null}},setup(e,{attrs:t,slots:n,expose:i}){let a=ste("DisclosurePanel");Pr(()=>{e.id!==null&&(a.panelId.value=e.id)}),$a(()=>{a.panelId.value=null}),i({el:a.panel,$el:a.panel}),Ba(Iye,a.panelId);let l=tC(),f=Ge(()=>l!==null?(l.value&Ha.Open)===Ha.Open:a.disclosureState.value===0);return()=>{var d;let h={open:a.disclosureState.value===0,close:a.close},{id:b,...S}=e,k={id:(d=a.panelId.value)!=null?d:b,ref:a.panel};return Ul({ourProps:k,theirProps:S,slot:h,attrs:t,slots:n,features:Dm.RenderStrategy|Dm.Static,visible:f.value,name:"DisclosurePanel"})}}}),Aye=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Oye(e){var t,n;let i=(t=e.innerText)!=null?t:"",a=e.cloneNode(!0);if(!(a instanceof HTMLElement))return i;let l=!1;for(let d of a.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))d.remove(),l=!0;let f=l?(n=a.innerText)!=null?n:"":i;return Aye.test(f)&&(f=f.replace(Aye,"")),f}function VVe(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let i=n.split(" ").map(a=>{let l=document.getElementById(a);if(l){let f=l.getAttribute("aria-label");return typeof f=="string"?f.trim():Oye(l).trim()}return null}).filter(Boolean);if(i.length>0)return i.join(", ")}return Oye(e).trim()}function HVe(e){let t=kt(""),n=kt("");return()=>{let i=Kn(e);if(!i)return"";let a=i.innerText;if(t.value===a)return n.value;let l=VVe(i).trim().toLowerCase();return t.value=a,n.value=l,l}}var UVe=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(UVe||{}),zVe=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(zVe||{});function WVe(e){requestAnimationFrame(()=>requestAnimationFrame(e))}let Rye=Symbol("MenuContext");function YV(e){let t=Mr(Rye,null);if(t===null){let n=new Error("<".concat(e," /> is missing a parent <Menu /> component."));throw Error.captureStackTrace&&Error.captureStackTrace(n,YV),n}return t}let jVe=Gr({name:"Menu",props:{as:{type:[Object,String],default:"template"}},setup(e,{slots:t,attrs:n}){let i=kt(1),a=kt(null),l=kt(null),f=kt([]),d=kt(""),h=kt(null),b=kt(1);function S(T=O=>O){let O=h.value!==null?f.value[h.value]:null,P=Hee(T(f.value.slice()),W=>Kn(W.dataRef.domRef)),B=O?P.indexOf(O):null;return B===-1&&(B=null),{items:P,activeItemIndex:B}}let k={menuState:i,buttonRef:a,itemsRef:l,items:f,searchQuery:d,activeItemIndex:h,activationTrigger:b,closeMenu:()=>{i.value=1,h.value=null},openMenu:()=>i.value=0,goToItem(T,O,P){let B=S(),W=Wee(T===Ya.Specific?{focus:Ya.Specific,id:O}:{focus:T},{resolveItems:()=>B.items,resolveActiveIndex:()=>B.activeItemIndex,resolveId:Z=>Z.id,resolveDisabled:Z=>Z.dataRef.disabled});d.value="",h.value=W,b.value=P!=null?P:1,f.value=B.items},search(T){let O=d.value!==""?0:1;d.value+=T.toLowerCase();let P=(h.value!==null?f.value.slice(h.value+O).concat(f.value.slice(0,h.value+O)):f.value).find(W=>W.dataRef.textValue.startsWith(d.value)&&!W.dataRef.disabled),B=P?f.value.indexOf(P):-1;B===-1||B===h.value||(h.value=B,b.value=1)},clearSearch(){d.value=""},registerItem(T,O){let P=S(B=>[...B,{id:T,dataRef:O}]);f.value=P.items,h.value=P.activeItemIndex,b.value=1},unregisterItem(T){let O=S(P=>{let B=P.findIndex(W=>W.id===T);return B!==-1&&P.splice(B,1),P});f.value=O.items,h.value=O.activeItemIndex,b.value=1}};return GV([a,l],(T,O)=>{var P;k.closeMenu(),ZV(O,jV.Loose)||(T.preventDefault(),(P=Kn(a))==null||P.focus())},Ge(()=>i.value===0)),Ba(Rye,k),_O(Ge(()=>Hl(i.value,{0:Ha.Open,1:Ha.Closed}))),()=>{let T={open:i.value===0,close:k.closeMenu};return Ul({ourProps:{},theirProps:e,slot:T,slots:t,attrs:n,name:"Menu"})}}}),ZVe=Gr({name:"MenuButton",props:{disabled:{type:Boolean,default:!1},as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(e,{attrs:t,slots:n,expose:i}){var a;let l=(a=e.id)!=null?a:"headlessui-menu-button-".concat(xd()),f=YV("MenuButton");i({el:f.buttonRef,$el:f.buttonRef});function d(k){switch(k.key){case ri.Space:case ri.Enter:case ri.ArrowDown:k.preventDefault(),k.stopPropagation(),f.openMenu(),kc(()=>{var T;(T=Kn(f.itemsRef))==null||T.focus({preventScroll:!0}),f.goToItem(Ya.First)});break;case ri.ArrowUp:k.preventDefault(),k.stopPropagation(),f.openMenu(),kc(()=>{var T;(T=Kn(f.itemsRef))==null||T.focus({preventScroll:!0}),f.goToItem(Ya.Last)});break}}function h(k){switch(k.key){case ri.Space:k.preventDefault();break}}function b(k){e.disabled||(f.menuState.value===0?(f.closeMenu(),kc(()=>{var T;return(T=Kn(f.buttonRef))==null?void 0:T.focus({preventScroll:!0})})):(k.preventDefault(),f.openMenu(),WVe(()=>{var T;return(T=Kn(f.itemsRef))==null?void 0:T.focus({preventScroll:!0})})))}let S=Uee(Ge(()=>({as:e.as,type:t.type})),f.buttonRef);return()=>{var k;let T={open:f.menuState.value===0},{...O}=e,P={ref:f.buttonRef,id:l,type:S.value,"aria-haspopup":"menu","aria-controls":(k=Kn(f.itemsRef))==null?void 0:k.id,"aria-expanded":f.menuState.value===0,onKeydown:d,onKeyup:h,onClick:b};return Ul({ourProps:P,theirProps:O,slot:T,attrs:t,slots:n,name:"MenuButton"})}}}),qVe=Gr({name:"MenuItems",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:null}},setup(e,{attrs:t,slots:n,expose:i}){var a;let l=(a=e.id)!=null?a:"headlessui-menu-items-".concat(xd()),f=YV("MenuItems"),d=kt(null);i({el:f.itemsRef,$el:f.itemsRef}),rye({container:Ge(()=>Kn(f.itemsRef)),enabled:Ge(()=>f.menuState.value===0),accept(T){return T.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:T.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(T){T.setAttribute("role","none")}});function h(T){var O;switch(d.value&&clearTimeout(d.value),T.key){case ri.Space:if(f.searchQuery.value!=="")return T.preventDefault(),T.stopPropagation(),f.search(T.key);case ri.Enter:if(T.preventDefault(),T.stopPropagation(),f.activeItemIndex.value!==null){let P=f.items.value[f.activeItemIndex.value];(O=Kn(P.dataRef.domRef))==null||O.click()}f.closeMenu(),Jbe(Kn(f.buttonRef));break;case ri.ArrowDown:return T.preventDefault(),T.stopPropagation(),f.goToItem(Ya.Next);case ri.ArrowUp:return T.preventDefault(),T.stopPropagation(),f.goToItem(Ya.Previous);case ri.Home:case ri.PageUp:return T.preventDefault(),T.stopPropagation(),f.goToItem(Ya.First);case ri.End:case ri.PageDown:return T.preventDefault(),T.stopPropagation(),f.goToItem(Ya.Last);case ri.Escape:T.preventDefault(),T.stopPropagation(),f.closeMenu(),kc(()=>{var P;return(P=Kn(f.buttonRef))==null?void 0:P.focus({preventScroll:!0})});break;case ri.Tab:T.preventDefault(),T.stopPropagation(),f.closeMenu(),kc(()=>YBe(Kn(f.buttonRef),T.shiftKey?Td.Previous:Td.Next));break;default:T.key.length===1&&(f.search(T.key),d.value=setTimeout(()=>f.clearSearch(),350));break}}function b(T){switch(T.key){case ri.Space:T.preventDefault();break}}let S=tC(),k=Ge(()=>S!==null?(S.value&Ha.Open)===Ha.Open:f.menuState.value===0);return()=>{var T,O;let P={open:f.menuState.value===0},{...B}=e,W={"aria-activedescendant":f.activeItemIndex.value===null||(T=f.items.value[f.activeItemIndex.value])==null?void 0:T.id,"aria-labelledby":(O=Kn(f.buttonRef))==null?void 0:O.id,id:l,onKeydown:h,onKeyup:b,role:"menu",tabIndex:0,ref:f.itemsRef};return Ul({ourProps:W,theirProps:B,slot:P,attrs:t,slots:n,features:Dm.RenderStrategy|Dm.Static,visible:k.value,name:"MenuItems"})}}}),GVe=Gr({name:"MenuItem",inheritAttrs:!1,props:{as:{type:[Object,String],default:"template"},disabled:{type:Boolean,default:!1},id:{type:String,default:null}},setup(e,{slots:t,attrs:n,expose:i}){var a;let l=(a=e.id)!=null?a:"headlessui-menu-item-".concat(xd()),f=YV("MenuItem"),d=kt(null);i({el:d,$el:d});let h=Ge(()=>f.activeItemIndex.value!==null?f.items.value[f.activeItemIndex.value].id===l:!1),b=HVe(d),S=Ge(()=>({disabled:e.disabled,get textValue(){return b()},domRef:d}));Pr(()=>f.registerItem(l,S)),$a(()=>f.unregisterItem(l)),oc(()=>{f.menuState.value===0&&h.value&&f.activationTrigger.value!==0&&kc(()=>{var Z,Y;return(Y=(Z=Kn(d))==null?void 0:Z.scrollIntoView)==null?void 0:Y.call(Z,{block:"nearest"})})});function k(Z){if(e.disabled)return Z.preventDefault();f.closeMenu(),Jbe(Kn(f.buttonRef))}function T(){if(e.disabled)return f.goToItem(Ya.Nothing);f.goToItem(Ya.Specific,l)}let O=oye();function P(Z){O.update(Z)}function B(Z){O.wasMoved(Z)&&(e.disabled||h.value||f.goToItem(Ya.Specific,l,0))}function W(Z){O.wasMoved(Z)&&(e.disabled||h.value&&f.goToItem(Ya.Nothing))}return()=>{let{disabled:Z,...Y}=e,z={active:h.value,disabled:Z,close:f.closeMenu};return Ul({ourProps:{id:l,ref:d,role:"menuitem",tabIndex:Z===!0?void 0:-1,"aria-disabled":Z===!0?!0:void 0,onClick:k,onFocus:T,onPointerenter:P,onMouseenter:P,onPointermove:B,onMousemove:B,onPointerleave:W,onMouseleave:W},theirProps:{...n,...Y},slot:z,attrs:n,slots:t,name:"MenuItem"})}}});var KVe=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(KVe||{});let Dye=Symbol("PopoverContext");function ote(e){let t=Mr(Dye,null);if(t===null){let n=new Error("<".concat(e," /> is missing a parent <").concat(Mye.name," /> component."));throw Error.captureStackTrace&&Error.captureStackTrace(n,ote),n}return t}let YVe=Symbol("PopoverGroupContext");function Lye(){return Mr(YVe,null)}let Pye=Symbol("PopoverPanelContext");function XVe(){return Mr(Pye,null)}let Mye=Gr({name:"Popover",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n,expose:i}){var a;let l=kt(null);i({el:l,$el:l});let f=kt(1),d=kt(null),h=kt(null),b=kt(null),S=kt(null),k=Ge(()=>H1(l)),T=Ge(()=>{var ne,ue;if(!Kn(d)||!Kn(S))return!1;for(let Be of document.querySelectorAll("body > *"))if(Number(Be==null?void 0:Be.contains(Kn(d)))^Number(Be==null?void 0:Be.contains(Kn(S))))return!0;let J=bO(),ce=J.indexOf(Kn(d)),ge=(ce+J.length-1)%J.length,de=(ce+1)%J.length,he=J[ge],ie=J[de];return!((ne=Kn(S))!=null&&ne.contains(he))&&!((ue=Kn(S))!=null&&ue.contains(ie))}),O={popoverState:f,buttonId:kt(null),panelId:kt(null),panel:S,button:d,isPortalled:T,beforePanelSentinel:h,afterPanelSentinel:b,togglePopover(){f.value=Hl(f.value,{0:1,1:0})},closePopover(){f.value!==1&&(f.value=1)},close(ne){O.closePopover();let ue=ne?ne instanceof HTMLElement?ne:ne.value instanceof HTMLElement?Kn(ne):Kn(O.button):Kn(O.button);ue==null||ue.focus()}};Ba(Dye,O),_O(Ge(()=>Hl(f.value,{0:Ha.Open,1:Ha.Closed})));let P={buttonId:O.buttonId,panelId:O.panelId,close(){O.closePopover()}},B=Lye(),W=B==null?void 0:B.registerPopover,[Z,Y]=kye(),z=yye({mainTreeNodeRef:B==null?void 0:B.mainTreeNodeRef,portals:Z,defaultContainers:[d,S]});function q(){var ne,ue,J,ce;return(ce=B==null?void 0:B.isFocusWithinPopoverGroup())!=null?ce:((ne=k.value)==null?void 0:ne.activeElement)&&(((ue=Kn(d))==null?void 0:ue.contains(k.value.activeElement))||((J=Kn(S))==null?void 0:J.contains(k.value.activeElement)))}return oc(()=>W==null?void 0:W(P)),Zee((a=k.value)==null?void 0:a.defaultView,"focus",ne=>{var ue,J;ne.target!==window&&ne.target instanceof HTMLElement&&f.value===0&&(q()||d&&S&&(z.contains(ne.target)||(ue=Kn(O.beforePanelSentinel))!=null&&ue.contains(ne.target)||(J=Kn(O.afterPanelSentinel))!=null&&J.contains(ne.target)||O.closePopover()))},!0),GV(z.resolveContainers,(ne,ue)=>{var J;O.closePopover(),ZV(ue,jV.Loose)||(ne.preventDefault(),(J=Kn(d))==null||J.focus())},Ge(()=>f.value===0)),()=>{let ne={open:f.value===0,close:O.close};return oi(bt,[oi(Y,{},()=>Ul({theirProps:{...e,...n},ourProps:{ref:l},slot:ne,slots:t,attrs:n,name:"Popover"})),oi(z.MainTreeNode)])}}}),JVe=Gr({name:"PopoverButton",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:null}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:i}){var a;let l=(a=e.id)!=null?a:"headlessui-popover-button-".concat(xd()),f=ote("PopoverButton"),d=Ge(()=>H1(f.button));i({el:f.button,$el:f.button}),Pr(()=>{f.buttonId.value=l}),$a(()=>{f.buttonId.value=null});let h=Lye(),b=h==null?void 0:h.closeOthers,S=XVe(),k=Ge(()=>S===null?!1:S.value===f.panelId.value),T=kt(null),O="headlessui-focus-sentinel-".concat(xd());k.value||oc(()=>{f.button.value=Kn(T)});let P=Uee(Ge(()=>({as:e.as,type:t.type})),T);function B(ne){var ue,J,ce,ge,de;if(k.value){if(f.popoverState.value===1)return;switch(ne.key){case ri.Space:case ri.Enter:ne.preventDefault(),(J=(ue=ne.target).click)==null||J.call(ue),f.closePopover(),(ce=Kn(f.button))==null||ce.focus();break}}else switch(ne.key){case ri.Space:case ri.Enter:ne.preventDefault(),ne.stopPropagation(),f.popoverState.value===1&&(b==null||b(f.buttonId.value)),f.togglePopover();break;case ri.Escape:if(f.popoverState.value!==0)return b==null?void 0:b(f.buttonId.value);if(!Kn(f.button)||(ge=d.value)!=null&&ge.activeElement&&!((de=Kn(f.button))!=null&&de.contains(d.value.activeElement)))return;ne.preventDefault(),ne.stopPropagation(),f.closePopover();break}}function W(ne){k.value||ne.key===ri.Space&&ne.preventDefault()}function Z(ne){var ue,J;e.disabled||(k.value?(f.closePopover(),(ue=Kn(f.button))==null||ue.focus()):(ne.preventDefault(),ne.stopPropagation(),f.popoverState.value===1&&(b==null||b(f.buttonId.value)),f.togglePopover(),(J=Kn(f.button))==null||J.focus()))}function Y(ne){ne.preventDefault(),ne.stopPropagation()}let z=qee();function q(){let ne=Kn(f.panel);if(!ne)return;function ue(){Hl(z.value,{[$h.Forwards]:()=>U1(ne,Td.First),[$h.Backwards]:()=>U1(ne,Td.Last)})===vO.Error&&U1(bO().filter(J=>J.dataset.headlessuiFocusGuard!=="true"),Hl(z.value,{[$h.Forwards]:Td.Next,[$h.Backwards]:Td.Previous}),{relativeTo:Kn(f.button)})}ue()}return()=>{let ne=f.popoverState.value===0,ue={open:ne},{...J}=e,ce=k.value?{ref:T,type:P.value,onKeydown:B,onClick:Z}:{ref:T,id:l,type:P.value,"aria-expanded":f.popoverState.value===0,"aria-controls":Kn(f.panel)?f.panelId.value:void 0,disabled:e.disabled?!0:void 0,onKeydown:B,onKeyup:W,onClick:Z,onMousedown:Y};return oi(bt,[Ul({ourProps:ce,theirProps:{...t,...J},slot:ue,attrs:t,slots:n,name:"PopoverButton"}),ne&&!k.value&&f.isPortalled.value&&oi(eC,{id:O,features:x5.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:q})])}}}),QVe=Gr({name:"PopoverPanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},focus:{type:Boolean,default:!1},id:{type:String,default:null}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:i}){var a;let l=(a=e.id)!=null?a:"headlessui-popover-panel-".concat(xd()),{focus:f}=e,d=ote("PopoverPanel"),h=Ge(()=>H1(d.panel)),b="headlessui-focus-sentinel-before-".concat(xd()),S="headlessui-focus-sentinel-after-".concat(xd());i({el:d.panel,$el:d.panel}),Pr(()=>{d.panelId.value=l}),$a(()=>{d.panelId.value=null}),Ba(Pye,d.panelId),oc(()=>{var Y,z;if(!f||d.popoverState.value!==0||!d.panel)return;let q=(Y=h.value)==null?void 0:Y.activeElement;(z=Kn(d.panel))!=null&&z.contains(q)||U1(Kn(d.panel),Td.First)});let k=tC(),T=Ge(()=>k!==null?(k.value&Ha.Open)===Ha.Open:d.popoverState.value===0);function O(Y){var z,q;switch(Y.key){case ri.Escape:if(d.popoverState.value!==0||!Kn(d.panel)||h.value&&!((z=Kn(d.panel))!=null&&z.contains(h.value.activeElement)))return;Y.preventDefault(),Y.stopPropagation(),d.closePopover(),(q=Kn(d.button))==null||q.focus();break}}function P(Y){var z,q,ne,ue,J;let ce=Y.relatedTarget;ce&&Kn(d.panel)&&((z=Kn(d.panel))!=null&&z.contains(ce)||(d.closePopover(),((ne=(q=Kn(d.beforePanelSentinel))==null?void 0:q.contains)!=null&&ne.call(q,ce)||(J=(ue=Kn(d.afterPanelSentinel))==null?void 0:ue.contains)!=null&&J.call(ue,ce))&&ce.focus({preventScroll:!0})))}let B=qee();function W(){let Y=Kn(d.panel);if(!Y)return;function z(){Hl(B.value,{[$h.Forwards]:()=>{var q;U1(Y,Td.First)===vO.Error&&((q=Kn(d.afterPanelSentinel))==null||q.focus())},[$h.Backwards]:()=>{var q;(q=Kn(d.button))==null||q.focus({preventScroll:!0})}})}z()}function Z(){let Y=Kn(d.panel);if(!Y)return;function z(){Hl(B.value,{[$h.Forwards]:()=>{let q=Kn(d.button),ne=Kn(d.panel);if(!q)return;let ue=bO(),J=ue.indexOf(q),ce=ue.slice(0,J+1),ge=[...ue.slice(J+1),...ce];for(let de of ge.slice())if(de.dataset.headlessuiFocusGuard==="true"||ne!=null&&ne.contains(de)){let he=ge.indexOf(de);he!==-1&&ge.splice(he,1)}U1(ge,Td.First,{sorted:!1})},[$h.Backwards]:()=>{var q;U1(Y,Td.Previous)===vO.Error&&((q=Kn(d.button))==null||q.focus())}})}z()}return()=>{let Y={open:d.popoverState.value===0,close:d.close},{focus:z,...q}=e,ne={ref:d.panel,id:l,onKeydown:O,onFocusout:f&&d.popoverState.value===0?P:void 0,tabIndex:-1};return Ul({ourProps:ne,theirProps:{...t,...q},attrs:t,slot:Y,slots:{...n,default:(...ue)=>{var J;return[oi(bt,[T.value&&d.isPortalled.value&&oi(eC,{id:b,ref:d.beforePanelSentinel,features:x5.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:W}),(J=n.default)==null?void 0:J.call(n,...ue),T.value&&d.isPortalled.value&&oi(eC,{id:S,ref:d.afterPanelSentinel,features:x5.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:Z})])]}},features:Dm.RenderStrategy|Dm.Static,visible:T.value,name:"PopoverPanel"})}}});function eHe(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function rte(e,...t){e&&t.length>0&&e.classList.add(...t)}function XV(e,...t){e&&t.length>0&&e.classList.remove(...t)}var ite=(e=>(e.Finished="finished",e.Cancelled="cancelled",e))(ite||{});function tHe(e,t){let n=w5();if(!e)return n.dispose;let{transitionDuration:i,transitionDelay:a}=getComputedStyle(e),[l,f]=[i,a].map(d=>{let[h=0]=d.split(",").filter(Boolean).map(b=>b.includes("ms")?parseFloat(b):parseFloat(b)*1e3).sort((b,S)=>S-b);return h});return l!==0?n.setTimeout(()=>t("finished"),l+f):t("finished"),n.add(()=>t("cancelled")),n.dispose}function Nye(e,t,n,i,a,l){let f=w5(),d=l!==void 0?eHe(l):()=>{};return XV(e,...a),rte(e,...t,...n),f.nextFrame(()=>{XV(e,...n),rte(e,...i),f.add(tHe(e,h=>(XV(e,...i,...t),rte(e,...a),d(h))))}),f.add(()=>XV(e,...t,...n,...i,...a)),f.add(()=>d("cancelled")),f.dispose}function sC(e=""){return e.split(/\s+/).filter(t=>t.length>1)}let ate=Symbol("TransitionContext");var nHe=(e=>(e.Visible="visible",e.Hidden="hidden",e))(nHe||{});function sHe(){return Mr(ate,null)!==null}function oHe(){let e=Mr(ate,null);if(e===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}function rHe(){let e=Mr(lte,null);if(e===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}let lte=Symbol("NestingContext");function JV(e){return"children"in e?JV(e.children):e.value.filter(({state:t})=>t==="visible").length>0}function Fye(e){let t=kt([]),n=kt(!1);Pr(()=>n.value=!0),$a(()=>n.value=!1);function i(l,f=k5.Hidden){let d=t.value.findIndex(({id:h})=>h===l);d!==-1&&(Hl(f,{[k5.Unmount](){t.value.splice(d,1)},[k5.Hidden](){t.value[d].state="hidden"}}),!JV(t)&&n.value&&(e==null||e()))}function a(l){let f=t.value.find(({id:d})=>d===l);return f?f.state!=="visible"&&(f.state="visible"):t.value.push({id:l,state:"visible"}),()=>i(l,k5.Unmount)}return{children:t,register:a,unregister:i}}let $ye=Dm.RenderStrategy,Zw=Gr({props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:n,slots:i,expose:a}){let l=kt(0);function f(){l.value|=Ha.Opening,t("beforeEnter")}function d(){l.value&=~Ha.Opening,t("afterEnter")}function h(){l.value|=Ha.Closing,t("beforeLeave")}function b(){l.value&=~Ha.Closing,t("afterLeave")}if(!sHe()&&eVe())return()=>oi(QV,{...e,onBeforeEnter:f,onAfterEnter:d,onBeforeLeave:h,onAfterLeave:b},i);let S=kt(null),k=Ge(()=>e.unmount?k5.Unmount:k5.Hidden);a({el:S,$el:S});let{show:T,appear:O}=oHe(),{register:P,unregister:B}=rHe(),W=kt(T.value?"visible":"hidden"),Z={value:!0},Y=xd(),z={value:!1},q=Fye(()=>{!z.value&&W.value!=="hidden"&&(W.value="hidden",B(Y),b())});Pr(()=>{let Be=P(Y);$a(Be)}),oc(()=>{if(k.value===k5.Hidden&&Y){if(T.value&&W.value!=="visible"){W.value="visible";return}Hl(W.value,{hidden:()=>B(Y),visible:()=>P(Y)})}});let ne=sC(e.enter),ue=sC(e.enterFrom),J=sC(e.enterTo),ce=sC(e.entered),ge=sC(e.leave),de=sC(e.leaveFrom),he=sC(e.leaveTo);Pr(()=>{oc(()=>{if(W.value==="visible"){let Be=Kn(S);if(Be instanceof Comment&&Be.data==="")throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function ie(Be){let $e=Z.value&&!O.value,Ue=Kn(S);!Ue||!(Ue instanceof HTMLElement)||$e||(z.value=!0,T.value&&f(),T.value||h(),Be(T.value?Nye(Ue,ne,ue,J,ce,V=>{z.value=!1,V===ite.Finished&&d()}):Nye(Ue,ge,de,he,ce,V=>{z.value=!1,V===ite.Finished&&(JV(q)||(W.value="hidden",B(Y),b()))})))}return Pr(()=>{io([T],(Be,$e,Ue)=>{ie(Ue),Z.value=!1},{immediate:!0})}),Ba(lte,q),_O(Ge(()=>Hl(W.value,{visible:Ha.Open,hidden:Ha.Closed})|l.value)),()=>{let{appear:Be,show:$e,enter:Ue,enterFrom:V,enterTo:Ye,entered:Fe,leave:St,leaveFrom:Dt,leaveTo:He,...ft}=e,ht={ref:S},At={...ft,...O.value&&T.value&&gO.isServer?{class:Rn([n.class,ft.class,...ne,...ue])}:{}};return Ul({theirProps:At,ourProps:ht,slot:{},slots:i,attrs:n,features:$ye,visible:W.value==="visible",name:"TransitionChild"})}}}),iHe=Zw,QV=Gr({inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:n,slots:i}){let a=tC(),l=Ge(()=>e.show===null&&a!==null?(a.value&Ha.Open)===Ha.Open:e.show);oc(()=>{if(![!0,!1].includes(l.value))throw new Error('A <Transition /> is used but it is missing a `:show="true | false"` prop.')});let f=kt(l.value?"visible":"hidden"),d=Fye(()=>{f.value="hidden"}),h=kt(!0),b={show:l,appear:Ge(()=>e.appear||!h.value)};return Pr(()=>{oc(()=>{h.value=!1,l.value?f.value="visible":JV(d)||(f.value="hidden")})}),Ba(lte,d),Ba(ate,b),()=>{let S=yO(e,["show","appear","unmount","onBeforeEnter","onBeforeLeave","onAfterEnter","onAfterLeave"]),k={unmount:e.unmount};return Ul({ourProps:{...k,as:"template"},theirProps:{},slot:{},slots:{...i,default:()=>[oi(iHe,{onBeforeEnter:()=>t("beforeEnter"),onAfterEnter:()=>t("afterEnter"),onBeforeLeave:()=>t("beforeLeave"),onAfterLeave:()=>t("afterLeave"),...n,...k,...S},i.default)]},attrs:{},features:$ye,visible:f.value==="visible",name:"Transition"})}}});const aHe={key:0},lHe={class:"min-w-[96px]"},z1=wt({__name:"DropdownActions",props:{actions:{type:Array,required:!0,validator:e=>e.every(t=>{const n=typeof t.label=="string"&&t.label.trim()!=="",i=t.url||t.name;return n&&i})},actionArgs:{type:Object,required:!1,default:()=>null},label:{type:String,required:!0},buttonVariant:{type:String,default:"dropdown",validator:e=>["dropdown","ellipsis","text"].includes(e)},ariaLabel:{type:String,default:""},direction:{type:String,default:"left",validator:e=>["left","right"].includes(e)}},emits:["action"],setup(e,{emit:t}){const n=e,i=Ge(()=>n.buttonVariant==="ellipsis"),a=t,l=h=>{h.actionFn?h.actionFn(n==null?void 0:n.actionArgs):h.name&&a("action",h.name,(n==null?void 0:n.actionArgs)||{})},f=Ge(()=>({"w-full justify-center":!0,"inline-flex rounded border border-light bg-secondary px-3 py-2 text-lg-normal gap-x-1.5":n.buttonVariant==="dropdown","text-primary hover:text-hover mb-1":n.buttonVariant==="text","leading-none rounded hover:text-on-dark hover:bg-hover":i.value})),d=h=>(h==null?void 0:h.label)&&((h==null?void 0:h.url)||(h==null?void 0:h.name));return(h,b)=>(L(),Q("div",{class:Rn(["relative inline-block items-start justify-between",{"leading-none":i.value}])},[pe(se(jVe),{as:"div"},{default:te(()=>[pe(se(ZVe),{class:Rn(f.value),"aria-label":i.value?e.label:e.ariaLabel},{default:te(()=>[i.value?we("",!0):(L(),Q("span",aHe,ee(e.label),1)),b[0]||(b[0]=D()),e.buttonVariant==="dropdown"?(L(),Ee(Vs,{key:1,class:"h-5 w-5 text-primary",icon:"Dropdown","aria-hidden":"true"})):i.value?(L(),Ee(Vs,{key:2,class:"h-6 w-6",icon:"MoreOptions","aria-hidden":"true"})):we("",!0)]),_:1},8,["class","aria-label"]),b[1]||(b[1]=D()),pe(s5,{"enter-active-class":"transition ease-out duration-100","enter-from-class":"transform opacity-0 scale-95","enter-to-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-75","leave-from-class":"transform opacity-100 scale-100","leave-to-class":"transform opacity-0 scale-95"},{default:te(()=>[pe(se(qVe),{class:Rn(["absolute z-10 w-max border border-light bg-secondary shadow focus:outline-none",e.direction==="right"?"ltr:left-0 ltr:origin-top-left rtl:right-0 rtl:origin-top-left":"ltr:right-0 ltr:origin-top-right rtl:left-0 rtl:origin-top-right"])},{default:te(()=>[(L(!0),Q(bt,null,Sn(e.actions,(S,k)=>(L(),Ee(se(GVe),{key:k,disabled:S.disabled||!1},{default:te(({active:T,close:O})=>[H("div",lHe,[d(S)?(L(),Ee(ms,{key:0,element:S.url?"a":"button",href:S.url,icon:S.icon,"is-active":T,"is-warnable":S.isWarnable,class:Rn([k!==e.actions.length-1?"border-b":"","border-light"]),"size-variant":"fullWidth","is-disabled":S.disabled||!1,onClick:()=>{l(S),O()}},{default:te(()=>[D(ee(S.label),1)]),_:2},1032,["element","href","icon","is-active","is-warnable","class","is-disabled","onClick"])):we("",!0)])]),_:2},1032,["disabled"]))),128))]),_:1},8,["class"])]),_:1})]),_:1})],2))}},[["__scopeId","data-v-8e82d0eb"]]),cHe={key:0},eH={__name:"InitialsAvatar",props:{isPrimary:{type:Boolean,default:!0},isSecondary:{type:Boolean,default:!1},isWarnable:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},shrink:{type:Boolean,default:!1},initials:{type:String,required:!0}},setup(e){const t=e,n=Ge(()=>({"inline-flex items-center justify-center align-middle rounded-full p-1 cursor-pointer":!0,"h-8 w-8 text-3xl-medium":!t.shrink,"h-5 w-5 text-base-normal":t.shrink,"bg-primary text-on-dark hover:text-on-dark hover:bg-hover":t.isPrimary&&!t.isSecondary&&!t.isWarnable,"bg-secondary":t.isSecondary,"text-primary":t.isSecondary&&!t.isDisabled,"bg-negative text-on-dark":t.isWarnable,"text-disabled":t.isDisabled}));return(i,a)=>(L(),Q("div",{class:Rn(n.value)},[e.initials?(L(),Q("span",cHe,ee(e.initials),1)):(L(),Ee(Vs,{key:1,icon:"User",class:Rn(e.shrink?"h-3 w-3":"h-5 w-5")},null,8,["class"]))],2))}},uHe=Nf("workflowLogResponseModal",e=>{const t=JS("closeModal"),{set:n,form:i}=B1(e.logResponseForm);function a(){t()}return{form:i,formSuccess:a,updateForm:n}}),vvt="modulepreload",bvt=function(e){return"/"+e},yvt={},Bye=function(t,n,i){let a=Promise.resolve();function l(f){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=f,window.dispatchEvent(d),!d.defaultPrevented)throw f}return a.then(f=>{for(const d of f||[])d.status==="rejected"&&l(d.reason);return t().catch(l)})},dHe={class:"shadow-xl flex h-full flex-col bg-default"},fHe={class:"pointer-events-auto flex h-12 items-center justify-end bg-selection-dark px-4"},pHe={class:"mt-4"},mHe={class:"flex items-start"},hHe={class:"ms-4"},gHe={class:"sr-only"},vHe={class:"ml-8 mr-8 flex-grow","data-cy":"sidemodal-header"},bHe={class:"flex"},yHe={class:"flex-grow"},_He={class:"text-xl-medium"},SHe={class:"mt-1"},CHe={class:"flex flex-none items-center"},wHe={class:"pkp-modal-scroll-container relative mt-6 flex-1 overflow-y-scroll"},il={__name:"SideModalBody",setup(e){const t=nJ(()=>Bye(()=>Promise.resolve().then(()=>kXe),void 0)),{t:n}=Jn(),i=Ge(()=>l.value===4?"max-w-[72vw]":l.value===3?"max-w-[79vw]":l.value===2?"max-w-[86vw]":"max-w-[93vw]"),a=Mr("closeModal"),l=Mr("modalLevel"),f=Mr("closeModalButton");return(d,h)=>(L(),Ee(se(tte),{class:Rn(["pointer-events-auto h-screen w-screen",i.value])},{default:te(()=>[H("div",dHe,[H("div",fHe,[pe(se(t))]),h[7]||(h[7]=D()),H("div",pHe,[H("div",mHe,[H("div",hHe,[H("button",{ref_key:"closeModalButton",ref:f,type:"button",class:"rounded-md text-gray-400 hover:text-gray-500 focus:ring-indigo-500 relative inline-flex focus:outline-none focus:ring-2 focus:ring-offset-2",onClick:h[0]||(h[0]=(...b)=>se(a)&&se(a)(...b))},[H("span",gHe,ee(se(n)("common.close")),1),h[1]||(h[1]=D()),pe(Vs,{class:"h-8 w-8 text-primary",icon:"BackButton","aria-hidden":!0})],512)]),h[6]||(h[6]=D()),H("div",vHe,[H("div",bHe,[H("div",yHe,[H("div",_He,[is(d.$slots,"pre-title")]),h[2]||(h[2]=D()),pe(se(nte),{as:"h1",class:"mt-1 text-4xl-bold text-heading"},{default:te(()=>[is(d.$slots,"title")]),_:3}),h[3]||(h[3]=D()),pe(se(PVe),{class:"mt-1 text-3xl-normal"},{default:te(()=>[is(d.$slots,"description")]),_:3}),h[4]||(h[4]=D()),H("div",SHe,[is(d.$slots,"post-description")])]),h[5]||(h[5]=D()),H("div",CHe,[is(d.$slots,"actions")])])])])]),h[8]||(h[8]=D()),H("div",wHe,[is(d.$slots,"default",{closeModal:se(a)})])])]),_:3},8,["class"]))}},EHe={name:"FormLocales",props:{locales:{type:Array,required:!0},visible:{type:Array,required:!0},primaryLocaleKey:{type:String,required:!0}},computed:{primaryLocale(){return this.locales.find(e=>e.key===this.primaryLocaleKey)},additionalLocales(){return this.locales.filter(e=>e.key!==this.primaryLocaleKey)}},methods:{toggleLocale:function(e){let t=[this.primaryLocaleKey];this.visible.includes(e)||t.push(e),this.updateLocales(t)},updateLocales:function(e){this.$emit("updateLocales",e)}}},kHe={key:0,class:"pkpFormLocales"},xHe=["label","onClick"],THe={class:"pkpFormLocales__locale pkpFormLocales__locale--isPrimary"};function IHe(e,t,n,i,a,l){return n.locales.length?(L(),Q("div",kHe,[(L(!0),Q(bt,null,Sn(l.additionalLocales,f=>(L(),Q("button",{key:f.key,class:Rn(["pkpFormLocales__locale",{"pkpFormLocales__locale--isActive":n.visible.includes(f.key)}]),type:"button",label:f.label,onClick:wl(d=>l.toggleLocale(f.key),["prevent"])},ee(f.label),11,xHe))),128)),t[0]||(t[0]=D()),H("span",THe,ee(l.primaryLocale.label),1)])):we("",!0)}const AHe=wt(EHe,[["render",IHe]]),OHe={computed:{hasEndSlot(){return this.$slots.end}}},RHe={class:"buttonRow"},DHe={key:0,class:"buttonRow__end"};function LHe(e,t,n,i,a,l){return L(),Q("div",RHe,[l.hasEndSlot?(L(),Q("div",DHe,[is(e.$slots,"end")])):we("",!0),t[0]||(t[0]=D()),is(e.$slots,"default")])}const r0=wt(OHe,[["render",LHe]]),PHe={name:"FormErrors",components:{Icon:Vs},props:{errors:Object,fields:Array},computed:{message(){return Object.keys(this.errors).length===1?this.t("form.errorOne"):this.t("form.errorMany",{count:Object.keys(this.errors).length})},errorList(){return Object.keys(this.errors).map(e=>{const t=this.fields.find(a=>a.name===e),n=t?t.label:e;let i;return this.errors[e]!==null&&typeof this.errors[e]=="object"?i=this.errors[e][Object.keys(this.errors[e])[0]]:i=this.errors[e],{fieldName:e,label:n,message:i}})}},methods:{showNextError(){this.showError(Object.keys(this.errors)[0])},showError:function(e){const t=this.errors[e];t&&typeof t=="object"&&t.constructor===Object&&this.$emit("showLocale",Object.keys(t)[0]),this.$emit("showField",e)}}},MHe={class:"pkpFormErrors"},NHe={class:"-screenReader"},FHe=["onClick"];function $He(e,t,n,i,a,l){const f=Xe("Icon");return L(),Q("div",MHe,[pe(f,{icon:"Error",class:"h-5 w-5",inline:!0}),D(" "+ee(l.message)+" ",1),H("ul",NHe,[(L(!0),Q(bt,null,Sn(l.errorList,(d,h)=>(L(),Q("li",{key:h},[H("button",{onClick:wl(b=>l.showError(d.fieldName),["prevent"])},ee(e.t("form.errorA11y",{fieldLabel:d.label,errorMessage:d.message})),9,FHe)]))),128))]),t[1]||(t[1]=D()),H("button",{class:"pkpFormErrors__goTo",onClick:t[0]||(t[0]=wl((...d)=>l.showNextError&&l.showNextError(...d),["prevent"]))},ee(e.t("form.errorGoTo")),1)])}const BHe=wt(PHe,[["render",$He]]),VHe={name:"FieldError",components:{Icon:Vs},props:{messages:Array}},HHe={class:"pkpFieldError","aria-live":"polite"};function UHe(e,t,n,i,a,l){const f=Xe("Icon"),d=Hr("strip-unsafe-html");return L(),Q("div",HHe,[(L(!0),Q(bt,null,Sn(n.messages,h=>(L(),Q("div",{key:h,class:"pkpFieldError__message"},[pe(f,{icon:"Error",class:"me-1 h-4 w-4 text-on-dark",inline:!0}),t[0]||(t[0]=D()),Gn(H("span",null,null,512),[[d,h]])]))),128))])}const Gd=wt(VHe,[["render",UHe]]),zHe={name:"FormFieldLabel",props:{labelId:String,controlId:String,label:String,localeLabel:String,multilingualLabel:String,isRequired:{type:Boolean,default:!1},requiredLabel:String}},WHe=["for"],jHe={class:"aria-hidden"},ZHe={class:"-screenReader"},qHe={key:2,class:"pkpFormFieldLabel__required"},GHe={class:"-screenReader"};function KHe(e,t,n,i,a,l){return L(),Q("label",{for:n.controlId,class:"pkpFormFieldLabel"},[n.localeLabel?(L(),Q(bt,{key:0},[H("span",jHe,ee(n.localeLabel),1),t[0]||(t[0]=D()),H("span",ZHe,ee(n.multilingualLabel),1)],64)):(L(),Q(bt,{key:1},[D(ee(n.label),1)],64)),t[3]||(t[3]=D()),n.isRequired?(L(),Q("span",qHe,[t[1]||(t[1]=H("span",{class:"aria-hidden"},"*",-1)),t[2]||(t[2]=D()),H("span",GHe,ee(n.requiredLabel),1)])):we("",!0)],8,WHe)}const i0=wt(zHe,[["render",KHe]]),YHe={name:"HelpButton",components:{Icon:Vs},props:{topic:{type:String,required:!0},section:String,label:{type:String,required:!0}}},XHe=["data-topic","data-section"],JHe={class:"-screenReader"};function QHe(e,t,n,i,a,l){const f=Xe("Icon");return L(),Q("button",{class:"helpButton requestHelpPanel","data-topic":n.topic,"data-section":n.section,onClick:t[0]||(t[0]=wl(()=>{},["prevent"]))},[pe(f,{class:"h-5 w-5 text-primary",icon:"Help"}),t[1]||(t[1]=D()),H("span",JHe,ee(n.label),1)],8,XHe)}const Id=wt(YHe,[["render",QHe]]),eUe={name:"Tooltip",components:{Icon:Vs},props:{tooltip:{type:String,required:!0},label:{type:String,required:!0},iconSize:{type:String,default:()=>"medium",validator:e=>["medium","small"].includes(e)},isPrimary:{type:Boolean,default:!1}},computed:{tooltipContent(){return Fee(this.tooltip)},iconClass(){return{"h-4 w-4":this.iconSize!=="small","h-3 w-3":this.iconSize==="small","text-primary":this.isPrimary}}}},tUe={key:0,class:"-screenReader"};function nUe(e,t,n,i,a,l){const f=Xe("Icon"),d=Hr("tooltip");return Gn((L(),Q("span",{class:"tooltipButton",onClick:t[0]||(t[0]=wl(()=>{},["prevent"]))},[pe(f,{icon:n.isPrimary?"UsefulTipsPrimary":"UsefulTips",class:Rn(l.iconClass)},null,8,["icon","class"]),t[1]||(t[1]=D()),n.label?(L(),Q("span",tUe,ee(n.label),1)):we("",!0)])),[[d,{content:l.tooltipContent,theme:"pkp-tooltip",html:!0}]])}const Tc=wt(eUe,[["render",nUe]]),sUe={name:"MultilingualProgress",components:{Icon:Vs},props:{count:{type:Number,required:!0},total:{type:Number,required:!0}},computed:{classes(){let e=[];return this.count===this.total?e.push("multilingualProgress--isComplete"):this.count?e.push("multilingualProgress--isIncomplete"):e.push("multilingualProgress--isEmpty"),e},tooltip(){return this.t("form.multilingualProgress",{count:this.count,total:this.total})}}},oUe={class:"-screenReader"};function rUe(e,t,n,i,a,l){const f=Xe("Icon"),d=Hr("tooltip");return L(),Q("span",{class:Rn(["multilingualProgress",l.classes])},[Gn((L(),Q("button",{type:"button","aria-hidden":"true",onClick:t[0]||(t[0]=wl(()=>{},["prevent"]))},[pe(f,{icon:"Globe",class:"h-5 w-5"})])),[[d,{content:l.tooltip,theme:"pkp-tooltip"}]]),t[1]||(t[1]=D()),H("span",oUe,ee(l.tooltip),1)],2)}const a0=wt(sUe,[["render",rUe]]),Lm={name:"FieldBase",components:{FieldError:Gd,FormFieldLabel:i0,HelpButton:Id,Tooltip:Tc,MultilingualProgress:a0},props:{name:String,component:String,label:String,description:String,tooltip:String,helpTopic:String,helpSection:String,groupId:String,formId:String,isInert:{type:Boolean,default(){return!1}},isMultilingual:Boolean,isRequired:Boolean,showWhen:[String,Array],primaryLocale:String,localeKey:String,locales:Array,error:String,value:{required:!0},allErrors:{type:Object,default(){return{}}}},emits:["change","set-errors"],computed:{currentValue:{get(){return this.isMultilingual?this.value[this.localeKey]:this.value},set:function(e){this.$emit("change",this.name,"value",e,this.localeKey)}},errors(){if(!Object.keys(this.allErrors).includes(this.name))return[];let e=this.allErrors[this.name];return this.isMultilingual&&Object.keys(e).includes(this.localeKey)?e[this.localeKey]:this.isMultilingual?[]:e},localizedName(){return this.isMultilingual?this.name+"-"+this.localeKey:this.name},labelId(){return this.compileId("control")},controlId(){return this.compileId("control")},describedByTooltipId(){return this.compileId("tooltip")},describedByHelpId(){return this.compileId("help")},describedByDescriptionId(){return this.compileId("description")},describedByErrorId(){return this.compileId("error")},multilingualProgressId(){return this.compileId("multilingualProgress")},describedByIds(){let e=[];return this.description&&e.push(this.describedByDescriptionId),this.tooltip&&e.push(this.describedByTooltipId),this.helpTopic&&e.push(this.describedByHelpId),this.error&&e.push(this.describedByErrorId),this.isMultilingual&&e.push(this.multilingualProgressId),e.length?e.join(" "):void 0},multilingualFieldsCompleted(){return this.isMultilingual?Object.values(this.value).filter(e=>Array.isArray(e)?e.length:e).length:0},isPrimaryLocale(){return!this.isMultilingual||this.localeKey===this.primaryLocale},localeLabel(){return!this.isMultilingual||this.isPrimaryLocale?"":this.locales.find(e=>e.key===this.localeKey).label},multilingualLabel(){return this.t("form.multilingualLabel",{label:this.label,localeName:this.localeLabel})}},beforeUnmount(){this.$emit("set-errors",this.name,[],this.localeKey)},methods:{compileId:function(e){let t=[this.formId,this.name,e];return this.isMultilingual&&t.push(this.localeKey.replace("@","_")),t.join("-")}}},iUe={name:"FieldText",components:{FormFieldLabel:i0,FieldError:Gd,PkpButton:ms,Tooltip:Tc,HelpButton:Id,MultilingualProgress:a0},extends:Lm,props:{inputType:{type:String,default:"text"},optIntoEdit:{type:Boolean,default:!1},optIntoEditLabel:String,size:{default:"normal",validator:function(e){return["small","normal","large"].indexOf(e)!==-1}},prefix:String,disabled:{type:Boolean,default:!1}},data(){return{inputStyles:{},isDisabled:!1,prefixStyles:{}}},computed:{classes(){let e=["pkpFormField--size"+this.size];return this.isRTL()&&e.push("pkpFormField--text--rtl"),e},controlClasses(){let e=[];return this.isMultilingual&&this.locales.length>1&&e.push("pkpFormField__control--hasMultilingualIndicator"),this.prefix&&e.push("pkpFormField__control--hasPrefix"),e}},mounted(){this.$nextTick(()=>{setTimeout(()=>{this.prefix&&(this.inputStyles={direction:"ltr","padding-inline-start":this.$refs.prefix.clientWidth+this.$refs.prefix.offsetLeft+"px"},this.$nextTick(()=>{this.$refs.prefix.clientWidth+this.$refs.prefix.offsetLeft>this.$refs.input.clientWidth-20&&(this.prefixStyles={width:this.$refs.input.clientWidth-this.$refs.prefix.offsetLeft-80+"px",display:"block","white-space":"nowrap","overflow-x":"hidden","text-overflow":"ellipsis"},this.$nextTick(()=>{this.inputStyles={direction:"ltr","padding-inline-start":this.$refs.prefix.clientWidth+this.$refs.prefix.offsetLeft+"px"}}))}))},700)}),(this.optIntoEdit||this.disabled)&&(this.isDisabled=!0)},methods:{setFocus(){this.$refs.input.focus()},isRTL(){var e=document.body.getAttribute("dir");return e==="rtl"}}},aUe={class:"pkpFormField__heading"},lUe=["id"],cUe=["id"],uUe={class:"pkpFormField__control_top"},dUe=["id","type","name","aria-describedby","aria-invalid","disabled","required"];function fUe(e,t,n,i,a,l){const f=Xe("FormFieldLabel"),d=Xe("Tooltip"),h=Xe("HelpButton"),b=Xe("MultilingualProgress"),S=Xe("PkpButton"),k=Xe("FieldError"),T=Hr("strip-unsafe-html");return L(),Q("div",{class:Rn(["pkpFormField pkpFormField--text",l.classes])},[H("div",aUe,[pe(f,{"control-id":e.controlId,label:e.label,"locale-label":e.localeLabel,"is-required":e.isRequired,"required-label":e.t("common.required"),"multilingual-label":e.multilingualLabel,class:"align-middle"},null,8,["control-id","label","locale-label","is-required","required-label","multilingual-label"]),t[3]||(t[3]=D()),e.isPrimaryLocale&&e.tooltip?(L(),Ee(d,{key:0,"aria-hidden":"true",tooltip:e.tooltip,label:""},null,8,["tooltip"])):we("",!0),t[4]||(t[4]=D()),e.isPrimaryLocale&&e.tooltip?Gn((L(),Q("span",{key:1,id:e.describedByTooltipId,class:"-screenReader"},null,8,lUe)),[[T,e.tooltip]]):we("",!0),t[5]||(t[5]=D()),e.isPrimaryLocale&&e.helpTopic?(L(),Ee(h,{key:2,id:e.describedByHelpId,topic:e.helpTopic,section:e.helpSection,label:e.t("help.help")},null,8,["id","topic","section","label"])):we("",!0)]),t[10]||(t[10]=D()),e.isPrimaryLocale&&e.description?Gn((L(),Q("div",{key:0,id:e.describedByDescriptionId,class:"pkpFormField__description semantic-defaults"},null,8,cUe)),[[T,e.description]]):we("",!0),t[11]||(t[11]=D()),H("div",{class:Rn(["pkpFormField__control",l.controlClasses])},[H("div",uUe,[Gn(H("input",{id:e.controlId,ref:"input","onUpdate:modelValue":t[0]||(t[0]=O=>e.currentValue=O),class:"pkpFormField__input pkpFormField--text__input",type:n.inputType,name:e.localizedName,"aria-describedby":e.describedByIds,"aria-invalid":e.errors&&e.errors.length,disabled:a.isDisabled,required:e.isRequired,style:Ih(a.inputStyles)},null,12,dUe),[[EB,e.currentValue]]),t[6]||(t[6]=D()),n.prefix?Gn((L(),Q("span",{key:0,ref:"prefix",class:"pkpFormField__inputPrefix",style:Ih(a.prefixStyles),onClick:t[1]||(t[1]=(...O)=>l.setFocus&&l.setFocus(...O))},null,4)),[[T,n.prefix]]):we("",!0),t[7]||(t[7]=D()),e.isMultilingual&&e.locales.length>1?(L(),Ee(b,{key:1,id:e.multilingualProgressId,count:e.multilingualFieldsCompleted,total:e.locales.length},null,8,["id","count","total"])):we("",!0),t[8]||(t[8]=D()),n.optIntoEdit&&a.isDisabled?(L(),Ee(S,{key:2,class:"pkpFormField--text__optIntoEdit",onClick:t[2]||(t[2]=O=>a.isDisabled=!1)},{default:te(()=>[D(ee(n.optIntoEditLabel),1)]),_:1})):we("",!0)]),t[9]||(t[9]=D()),e.errors&&e.errors.length?(L(),Ee(k,{key:0,id:e.describedByErrorId,messages:e.errors},null,8,["id","messages"])):we("",!0)],2)],2)}const Nb=wt(iUe,[["render",fUe]]),pUe={key:0,class:"ms-3 text-base-normal text-disabled"},zl={__name:"Spinner",props:{message:{required:!1,type:String,default:null},sizeVariant:{required:!1,type:String,default:()=>"default",validator:e=>["default","big"].includes(e)}},setup(e){return(t,n)=>(L(),Q("span",{class:Rn(["pkpSpinner",{"pkpSpinner--big":e.sizeVariant==="big"}]),"aria-hidden":"true"},[e.message?(L(),Q("span",pUe,ee(e.message),1)):we("",!0)],2))}},mUe={class:"-screenReader"},hUe={key:0,class:"-screenReader"},gUe=["onClick"],vUe={class:"-screenReader"},bUe={key:1},yUe={key:0},_Ue=["href"],Vye={__name:"Autosuggest",props:{id:{type:String,required:!0},suggestions:{type:Array,default:()=>[]},selectedLabel:{type:String,required:!0},currentSelected:{type:Array,default:()=>[]},inputValue:{type:String,default:()=>""},isDisabled:{type:Boolean,default:()=>!1},isLoading:{type:Boolean,default:()=>!1},isMultiple:{type:Boolean,default:()=>!0},allowCustom:{type:Boolean,default:()=>!1},inputId:{type:String,required:!1,default:null},describedBy:{type:String,required:!1,default:""}},emits:["update:inputValue","focus-changed","select-suggestion","deselect"],setup(e,{expose:t,emit:n}){const i=uA(),a=e,l={"aria-describedby":"".concat(a.describedBy),class:"pkpAutosuggest__input",id:a.inputId,disabled:a.isDisabled},f=Ge(()=>a.isMultiple?!0:!a.currentSelected.length),d=n,h=kt(""),b=kt(!1);function S(P){h.value=P.target.value.trim(),d("update:inputValue",h.value)}function k(P){b.value=P,d("focus-changed",P)}function T(P){d("select-suggestion",P)}function O(P){d("deselect",P)}return t({handleFocus:k}),(P,B)=>(L(),Q(bt,null,[H("span",mUe,ee(e.selectedLabel),1),B[11]||(B[11]=D()),e.currentSelected.length?(L(!0),Q(bt,{key:1},Sn(e.currentSelected,W=>(L(),Ee(kd,{key:W.value,class:"pkpAutosuggest__selection"},{default:te(()=>[D(ee(W.label)+" ",1),W.hasSlot?is(P.$slots,"input-slot",{key:0}):we("",!0),B[5]||(B[5]=D()),e.isDisabled?we("",!0):(L(),Q("button",{key:1,class:"pkpAutosuggest__deselect text-negative hover:text-on-dark",onClick:wl(Z=>O(W),["stop","prevent"])},[pe(Vs,{icon:"Cancel",class:"h-3 w-3"}),B[4]||(B[4]=D()),H("span",vUe,ee(P.t("common.removeItem",{item:W.label})),1)],8,gUe))]),_:2},1024))),128)):(L(),Q("span",hUe,ee(P.t("common.none")),1)),B[12]||(B[12]=D()),e.isDisabled?we("",!0):(L(),Ee(se(cVe),{id:e.id,key:e.id,"model-value":null,class:"pkpAutosuggest__autosuggester",as:"div","onUpdate:modelValue":T},{default:te(()=>{var W;return[pe(se(uVe),Cn({class:"pkpAutosuggest__input"},l,{autocomplete:"off",disabled:e.isDisabled||!f.value,onChange:B[0]||(B[0]=Z=>S(Z)),onFocus:B[1]||(B[1]=()=>k(!0)),onBlur:B[2]||(B[2]=()=>k(!1))}),null,16,["disabled"]),B[10]||(B[10]=D()),e.suggestions.length||e.allowCustom&&((W=h.value)!=null&&W.length)||e.isLoading?(L(),Ee(se(dVe),{key:0,class:"autosuggest__results-container autosuggest__results max-h-80 overflow-auto"},{default:te(()=>{var Z;return[e.isLoading?(L(),Ee(se(jee),{key:0,as:"template",disabled:!0},{default:te(({active:Y})=>[H("li",{class:Rn(["autosuggest__results-item",Y&&"autosuggest__results-item--highlighted"])},[pe(zl),D(" "+ee(P.t("common.loading")),1)],2)]),_:1})):we("",!0),B[8]||(B[8]=D()),e.allowCustom&&((Z=h.value)!=null&&Z.length)&&!e.suggestions.includes(h.value)?(L(),Ee(se(jee),{key:1,as:"template"},{default:te(({active:Y})=>[H("li",{class:Rn(["autosuggest__results-item",Y&&"autosuggest__results-item--highlighted"])},ee(h.value),3)]),_:1})):we("",!0),B[9]||(B[9]=D()),!e.isLoading&&f.value?(L(!0),Q(bt,{key:2},Sn(e.suggestions,Y=>(L(),Ee(se(jee),{key:Y.value,value:Y,as:"template"},{default:te(({active:z})=>{var q;return[H("li",{class:Rn(["autosuggest__results-item flex items-center",z&&"autosuggest__results-item--highlighted"])},[se(i).option?is(P.$slots,"option",{key:0,suggestion:Y}):(L(),Q("ul",bUe,[H("li",null,ee(Y.label),1),B[6]||(B[6]=D()),Y.identifier?(L(),Q("li",yUe,[Y.identifier.match(/^http/)?(L(),Q("a",{key:0,href:Y.identifier,target:"_blank",onClick:B[3]||(B[3]=wl(()=>{},["stop"]))},ee(Y.identifier),9,_Ue)):(L(),Q(bt,{key:1},[D(ee(Y.identifier),1)],64))])):we("",!0),B[7]||(B[7]=D()),(L(!0),Q(bt,null,Sn((q=Y.extraItems)!=null?q:{},(ne,ue)=>(L(),Q("li",{key:ue},ee(ne),1))),128))]))],2)]}),_:2},1032,["value"]))),128)):we("",!0)]}),_:3})):we("",!0)]}),_:3},8,["id"]))],64))}},SUe={class:"relative mt-1 w-full"},CUe=["id"],wUe={class:"opacity-75"},EUe=["href"],kUe="https://api.ror.org/v2/organizations",Hye="no_lang_code",xUe={__name:"FieldAffiliationsRorAutoSuggest",props:{filterIds:{type:Array,default:()=>[]}},setup(e,{expose:t}){const n=e,i=Oh(),a=kt([]),l=kt(""),f=kt(!1),d=Ge(()=>({query:l.value})),{data:h,isLoading:b,fetch:S}=fr(kUe,{query:d,debouncedMs:400}),k={id:"default-autosuggest-autosuggest",selectedLabel:"Selected",isMultiple:!1,describedBy:i,allowCustom:!0},T=Ge(()=>({...k,suggestions:O.value,currentSelected:a.value,isLoading:b.value})),O=Ge(()=>{var q;return(q=h.value)==null?void 0:q.items.filter(ne=>{var ue;return!((ue=n.filterIds)!=null&&ue.includes(ne.id))}).map(ne=>P(ne))});function P(q){var J,ce,ge,de,he,ie,Be,$e;const ne=((ce=(J=q.names)==null?void 0:J.find(Ue=>Ue.types.includes("ror_display")))==null?void 0:ce.lang)!==null?(de=(ge=q.names)==null?void 0:ge.find(Ue=>Ue.types.includes("ror_display")))==null?void 0:de.lang:Hye;let ue={};return(he=q.names)==null||he.forEach(Ue=>{if(Ue.types.includes("label")||Ue.types.includes("ror_display")){const V=Ue.lang!==null?Ue.lang:Hye;ue[V]=Ue.value}}),{value:{id:null,ror:q.id,displayLocale:ne,isActive:q.status==="active"?1:0,name:ue,_href:null},label:ue[ne],hasSlot:!0,href:q.id,country:($e=(Be=(ie=q.locations)==null?void 0:ie[0])==null?void 0:Be.geonames_details.country_name)!=null?$e:""}}io(d,()=>{l.value.length>3&&B()});async function B(){await S()}function W(q){l.value=q}function Z(q){f.value=q}function Y(q){if(!q){if(!l.value)return;q={value:l.value,label:l.value}}a.value!==q.value&&(a.value=[q])}function z(q){a.value=a.value.filter(ne=>ne.value!==q.value)}return t({currentSelected:a}),(q,ne)=>(L(),Q("div",{class:Rn(["relative",{"pkpAutosuggest--disabled":T.value.isDisabled}])},[H("div",SUe,[H("div",{id:se(i),ref:"values",class:Rn(["pkpAutosuggest__inputWrapper pkpFormField__input",{"pkpAutosuggest__inputWrapper--focus":f.value}]),onClick:ne[1]||(ne[1]=(...ue)=>q.setFocusToInput&&q.setFocusToInput(...ue))},[pe(Vye,Cn(T.value,{"onUpdate:inputValue":W,onSelectSuggestion:Y,onDeselect:z,onFocusChanged:Z}),{"input-slot":te(()=>[pe(Vs,{icon:"ROR",class:"ms-2 h-auto w-6",inline:!0})]),option:te(({suggestion:ue})=>[D(ee(ue.label)+" \n ",1),H("sub",wUe,ee(ue.country),1),ne[4]||(ne[4]=D()),ue.hasSlot?(L(),Ee(Vs,{key:0,icon:"ROR",class:"ms-2 h-auto w-6",inline:!0})):we("",!0),ne[5]||(ne[5]=D()),ue.hasSlot?(L(),Q("a",{key:1,href:ue.href,target:"_blank",class:"ms-auto flex",onMousedown:ne[0]||(ne[0]=wl(()=>{},["stop"]))},[ne[2]||(ne[2]=H("span",{class:"sr-only"},"Open link in new tab",-1)),ne[3]||(ne[3]=D()),pe(Vs,{icon:"OpenNewTab",class:"h-5 w-5 text-primary",inline:!0})],40,EUe)):we("",!0)]),_:1},16)],10,CUe)])],2))}},TUe={class:""},IUe={key:0,class:"flex justify-between border-x border-t border-light bg-secondary p-4"},AUe={key:0},OUe=["id"],RUe=["id"],DUe={key:1,class:"flex-shrink-0"},LUe=["aria-label","aria-labelledby","aria-describedby"],du={__name:"Table",props:{ariaLabel:{type:String,default:null},labelledBy:{type:String,default:null},describedBy:{type:String,default:null},sortDescriptor:{type:Object,default:null,required:!1}},emits:["sort"],setup(e,{emit:t}){const n=t;function i(B){n("sort",B)}const a=e,{sortDescriptor:l}=q3(a),f=kt(0),d=kt(0),h=()=>{d.value++},b=()=>{d.value--},S=Ge(()=>!!(d.value%2)),k={sortDescriptor:l,onSort:i,columnsCount:f,rowCount:d,registerRow:h,unregisterRow:b},T=uA(),O=T.label?Oh():null,P=T.description?Oh():null;return Ba("tableContext",k),(B,W)=>{var Z,Y;return L(),Q("div",TUe,[se(T).label||se(T).description||se(T)["top-controls"]?(L(),Q("div",IUe,[se(T).label||se(T).description?(L(),Q("div",AUe,[se(T).label?(L(),Q("span",{key:0,id:se(O),class:"text-lg-bold text-heading"},[is(B.$slots,"label")],8,OUe)):we("",!0),W[0]||(W[0]=D()),se(T).description?(L(),Q("div",{key:1,id:se(P),class:"text-sm-normal"},[is(B.$slots,"description")],8,RUe)):we("",!0)])):we("",!0),W[1]||(W[1]=D()),se(T)["top-controls"]?(L(),Q("div",DUe,[is(B.$slots,"top-controls")])):we("",!0)])):we("",!0),W[2]||(W[2]=D()),H("table",{class:"w-full max-w-full border-separate border-spacing-0","aria-label":e.ariaLabel,"aria-labelledby":(Z=e.labelledBy)!=null?Z:se(T).label?se(O):null,"aria-describedby":(Y=e.describedBy)!=null?Y:se(T).description?se(P):null},[is(B.$slots,"default")],8,LUe),W[3]||(W[3]=D()),se(T)["bottom-controls"]?(L(),Q("div",{key:1,class:Rn(["flex justify-between border-x border-b border-light px-3 py-2",{"bg-tertiary":S.value}])},[is(B.$slots,"bottom-controls")],2)):we("",!0)])}}},PUe={},MUe={class:"bg bg-default"};function NUe(e,t){return L(),Q("thead",null,[H("tr",MUe,[is(e.$slots,"default")])])}const Ad=wt(PUe,[["render",NUe]]),FUe={class:""},$Ue={key:0},BUe=["colspan"],VUe={key:1},Kd={__name:"TableBody",props:{emptyText:{type:String,default:""}},setup(e){const t=e,n=uA(),{t:i}=Jn(),a=Mr("tableContext"),l=Ge(()=>t.emptyText||i("grid.noItems"));return(f,d)=>(L(),Q("tbody",FUe,[is(f.$slots,"default"),d[0]||(d[0]=D()),se(a).rowCount.value?we("",!0):(L(),Q("tr",$Ue,[H("td",{colspan:se(a).columnsCount.value,class:"border-x border-b border-light p-5 text-base-normal"},[se(n)["no-content"]?is(f.$slots,"no-content",{key:0}):(L(),Q("span",VUe,ee(l.value),1))],8,BUe)]))]))}},HUe={class:"border-separate border border-light even:bg-tertiary"},Bi={__name:"TableRow",setup(e){const t=Mr("tableContext",null);return Pr(()=>{t&&t.registerRow()}),$a(()=>{t&&t.unregisterRow()}),(n,i)=>(L(),Q("tr",HUe,[is(n.$slots,"default")]))}},UUe=["aria-sort"],zUe={class:"-screenReader"},Ei={__name:"TableColumn",props:{id:{type:String,required:!1,default:null},allowsSorting:{type:Boolean,required:!1,default:()=>!1}},setup(e){const t=e,n=Mr("tableContext");return Pr(()=>{n.columnsCount.value++}),$a(()=>{n.columnsCount.value--}),(i,a)=>(L(),Q("th",{scope:"col","aria-sort":t.allowsSorting?se(n).sortDirection:void 0,class:"whitespace-nowrap border-b border-t border-light px-2 py-4 text-start text-base-normal uppercase text-heading first:border-s first:ps-3 last:border-e last:pe-3"},[t.allowsSorting?(L(),Q("button",{key:0,class:"flex items-center uppercase",onClick:a[0]||(a[0]=l=>se(n).onSort(e.id))},[is(i.$slots,"default"),a[1]||(a[1]=D()),pe(Vs,{class:"h-5 w-5 text-primary",icon:"Sort","aria-hidden":!0}),a[2]||(a[2]=D()),H("span",zUe,ee(i.t("grid.action.sort")),1)])):is(i.$slots,"default",{key:1})],8,UUe))}},as={__name:"TableCell",props:{noWrap:{type:Boolean,default:!1},fullWidthTruncated:{type:Boolean,default:!1},isRowHeader:{type:Boolean,default(){return!1}},fitContent:{type:Boolean,default(){return!1}}},setup(e){const t=e,n=Ge(()=>{const i=[];return t.noWrap&&i.push("whitespace-nowrap"),t.fullWidthTruncated&&i.push("w-full max-w-0 truncate"),t.fitContent&&i.push("whitespace-nowrap w-1"),i});return(i,a)=>(L(),Ee(Io(e.isRowHeader?"th":"td"),{scope:e.isRowHeader?"row":!1,class:Rn(["border-b border-light px-2 py-2 text-start text-base-normal first:border-s first:ps-3 last:border-e last:pe-3",n.value])},{default:te(()=>[is(i.$slots,"default")]),_:3},8,["scope","class"]))}},WUe=["id"],jUe={class:"pkpFormField__heading"},ZUe=["id"],qUe=["id"],GUe={class:"pkpFormField__control pkpFormField--affiliations__control"},KUe={key:0,class:"flex items-center"},YUe={class:"inline-block align-middle text-lg-semibold"},XUe=["href"],JUe={key:1},QUe={class:"text-lg-semibold text-negative"},eze={key:0},tze=["href"],nze={key:1},sze=["onClick"],oze={key:0},rze={key:0},ize={class:"text-lg-semibold"},aze={key:0},lze={key:0},cze=["href"],uze={key:1},dze={class:"flex items-center py-[0.5rem] text-lg-semibold"},fze={class:"align-middle"},pze={key:0},mze={key:0},hze={__name:"FieldAffiliations",props:{name:{type:String,default:null},formId:{type:String,default:null},value:{type:Array,default:()=>[]},authorId:{type:Number,default:null},primaryLocale:{type:String,default:"en"},locales:{type:Array,default:()=>[]},allErrors:{type:Object,default(){return{}}}},emits:["change","set-errors"],setup(e,{emit:t}){const n=e,i=Oh(),a=Oh(),l=n.authorId,f=n.primaryLocale,d=n.locales,h=Ge({get:()=>n.value,set:Fe=>B("change",n.name,"value",Fe)}),b=Ge(()=>h.value.filter(Fe=>Fe.ror).map(Fe=>Fe.ror)),S=n.locales.map(Fe=>Fe.key),k=kt(null),T=Ge({get:()=>{var Fe;return(Fe=k.value)==null?void 0:Fe.currentSelected},set:Fe=>k.value.currentSelected=Fe}),O=kt(-1),P=kt({}),B=t,{apiUrl:W}=to("rors/"),Z=Ge(()=>Object.hasOwn(P.value,"rorObject")?P.value.rorObject:{}),{fetch:Y}=fr(W.value,{method:"POST",body:Z}),z=Ge(()=>Object.keys(n.allErrors).includes(n.name)?n.allErrors[n.name]:[]),q=Ge(()=>Object.hasOwn(P.value,"id"));io(T,()=>{var Fe;typeof((Fe=T.value[0])==null?void 0:Fe.value)<"u"?ne(T.value[0].value):P.value={}});function ne(Fe){switch(P.value=J(),typeof Fe){case"string":P.value.name[f]=Fe;break;case"object":P.value.ror=Fe.ror,P.value.name[f]=Fe.name[Fe.displayLocale],P.value.rorObject=Fe;break}}function ue(){Object.hasOwn(P.value,"id")&&(h.value.push(JSON.parse(JSON.stringify(P.value))),Object.hasOwn(P.value.rorObject,"id")&&Y(),P.value={},T.value=[])}function J(){let Fe={};return Fe[f]="",S.forEach(St=>{Fe[St]=""}),Fe=Ue(Fe),{id:null,authorId:l,ror:null,name:Fe,rorObject:{}}}function ce(Fe,St){P.value={...P.value,name:{...P.value.name,[Fe]:St}}}const ge=function(Fe){let St=[];return h.value[Fe].ror||St.push({label:xc("user.affiliations.translationEditActionLabel",{}),name:"edit",id:Fe}),St.push({label:xc("user.affiliations.translationDeleteActionLabel",{}),name:"delete",isWarnable:!0,id:Fe}),{actions:St,label:xc("user.affiliations.translationActionsAriaLabel",{}),ariaLabel:xc("user.affiliations.translationActionsAriaLabel",{}),direction:"left",buttonVariant:"ellipsis"}};function de(Fe,St){switch(Fe){case"edit":he(St);break;case"delete":ie(St);break;default:console.error("No handler for action: ".concat(Fe))}}function he(Fe){O.value===Fe?O.value=-1:O.value=Fe}function ie(Fe){const{openDialog:St}=Ms();St({name:"deleteAffiliation",title:xc("user.affiliations.deleteModal.title",{}),message:xc("user.affiliations.deleteModal.message",{affiliation:h.value[Fe].name[f]}),actions:[{label:xc("common.yes",{}),isWarnable:!0,callback:async Dt=>{h.value=h.value.filter((He,ft)=>ft!==Fe),Dt()}},{label:xc("common.no",{}),isPrimary:!0,callback:Dt=>{Dt()}}],close:()=>{}})}function Be(Fe,St,Dt){h.value=h.value.map((He,ft)=>ft!==Fe?He:{...He,name:{...He.name,[St]:Dt}})}function $e(Fe){let St=Fe;return d.forEach(Dt=>{Dt.key===Fe&&(St=Dt.label)}),St}function Ue(Fe){let St={},Dt={};return Object.keys(Fe).forEach(He=>{He===f?St[f]=Fe[He]:Dt[He]=Fe[He]}),{...St,...Dt}}function V(Fe){let St={label:"",count:0,total:S.length},Dt=Fe.name;return Object.keys(Dt).forEach(He=>{S.includes(He)&&Dt[He].length>0&&St.count++}),St.total===St.count?St.label=xc("user.affiliations.translationsAllAvailable",{}):St.label=xc("user.affiliations.translationsSomeAvailable",{count:St.count,total:St.total}),St}function Ye(Fe){return xc("user.affiliations.typeTranslationNameInLanguageLabel",{language:$e(Fe)})}return Pr(()=>{h.value=h.value.map(Fe=>(Fe.name=Ue(Fe.name),Fe))}),wb(()=>{B("set-errors",n.name,[])}),(Fe,St)=>(L(),Q("div",{id:"".concat(n.formId,"-").concat(n.name),class:"pkpFormField pkpFormField--affiliations"},[H("div",jUe,[H("label",{id:se(i),class:"pkpFormFieldLabel"},ee(se(xc)("user.affiliations",{})),9,ZUe)]),St[14]||(St[14]=D()),H("div",{id:se(a),class:"pkpFormField__description"},ee(se(xc)("user.affiliations.description",{})),9,qUe),St[15]||(St[15]=D()),H("div",GUe,[pe(du,{"labelled-by":se(i),"described-by":se(a)},{default:te(()=>[pe(Ad,null,{default:te(()=>[pe(Ei,{id:"",class:"w-[45%]"},{default:te(()=>[D(ee(se(xc)("user.affiliations.institution",{})),1)]),_:1}),St[1]||(St[1]=D()),pe(Ei,{id:""},{default:te(()=>[D(ee(se(xc)("user.affiliations.translation",{})),1)]),_:1}),St[2]||(St[2]=D()),pe(Ei,{id:"",class:"w-[100px]"},{default:te(()=>St[0]||(St[0]=[D(" ")])),_:1})]),_:1}),St[13]||(St[13]=D()),pe(Kd,null,{default:te(()=>[(L(!0),Q(bt,null,Sn(h.value,(Dt,He)=>(L(),Ee(Bi,{key:He},{default:te(()=>[pe(as,null,{default:te(()=>[Dt.name[se(f)]?(L(),Q("div",KUe,[H("span",YUe,ee(Dt.name[se(f)]),1),St[3]||(St[3]=D()),Dt.ror?(L(),Q("a",{key:0,href:Dt.ror,class:"inline-block align-middle",target:"_blank"},[pe(Vs,{icon:"ROR",class:Rn("ms-2 inline-block h-auto w-6 align-middle"),inline:!0})],8,XUe)):we("",!0)])):(L(),Q("div",JUe,[H("span",QUe,ee(se(xc)("user.affiliations.primaryLocaleRequired",{primaryLocale:$e(se(f))})),1)]))]),_:2},1024),St[5]||(St[5]=D()),pe(as,null,{default:te(()=>{var ft,ht;return[Dt.ror?(L(),Q("div",eze,[H("a",{href:Dt.ror,class:"flex cursor-pointer py-2 align-middle text-lg-semibold",target:"_blank"},ee(Dt.ror),9,tze)])):(L(),Q("div",nze,[H("a",{class:"pkpButton flex cursor-pointer items-center border-transparent py-2 text-lg-semibold text-primary hover:enabled:underline",onClick:At=>he(He)},[pe(Vs,{icon:V(Dt).count===V(Dt).total?"Complete":"InProgress",class:Rn("inline-block h-auto w-6 align-middle"),inline:!0},null,8,["icon"]),D(" "+ee(V(Dt).label),1)],8,sze),St[4]||(St[4]=D()),He===O.value||(ht=(ft=z.value)==null?void 0:ft[He])!=null&&ht.name?(L(),Q("div",oze,[(L(!0),Q(bt,null,Sn(Object.entries(Dt.name),([At])=>{var hn,ct,Ht;return L(),Q("div",{key:At},[se(S).includes(At)?(L(),Q("div",rze,[pe(Nb,{label:Ye(At),value:Dt.name[At],name:"name","all-errors":{name:(Ht=(ct=(hn=z.value)==null?void 0:hn[He])==null?void 0:ct.name)==null?void 0:Ht[At]},size:"large","is-required":At===se(f),onChange:(ye,lo,jn)=>{Be(He,At,jn)}},null,8,["label","value","all-errors","is-required","onChange"])])):we("",!0)])}),128))])):we("",!0)]))]}),_:2},1024),St[6]||(St[6]=D()),pe(as,null,{default:te(()=>[He!==O.value?(L(),Ee(z1,Cn({key:0,ref_for:!0},ge(He),{class:"dropDownActions border-transparent py-1.5",onAction:ft=>de(ft,He)}),null,16,["onAction"])):we("",!0)]),_:2},1024)]),_:2},1024))),128)),St[12]||(St[12]=D()),pe(Bi,null,{default:te(()=>[pe(as,{class:"align-top"},{default:te(()=>[H("span",ize,ee(se(xc)("user.affiliations.searchPhraseLabel",{language:$e(se(f))})),1),St[7]||(St[7]=D()),pe(xUe,{ref_key:"autoSuggestRef",ref:k,"filter-ids":b.value},null,8,["filter-ids"])]),_:1}),St[10]||(St[10]=D()),pe(as,{class:"align-bottom"},{default:te(()=>[q.value?(L(),Q("div",aze,[P.value.ror?(L(),Q("div",lze,[H("a",{href:P.value.ror,class:"flex cursor-pointer items-center py-[0.625rem] text-lg-semibold",target:"_blank"},[D(ee(P.value.ror)+" ",1),pe(Vs,{icon:"ROR",class:Rn("ms-2 inline-block h-auto w-6 align-middle"),inline:!0})],8,cze)])):(L(),Q("div",uze,[H("div",null,[H("span",dze,[pe(Vs,{icon:V(P.value).count===V(P.value).total?"Complete":"InProgress",class:Rn("inline-block h-auto w-6 align-middle"),inline:!0},null,8,["icon"]),St[8]||(St[8]=D()),H("span",fze,ee(V(P.value).label),1)])]),St[9]||(St[9]=D()),(L(!0),Q(bt,null,Sn(Object.entries(P.value.name),([Dt,He])=>{var ft,ht,At;return L(),Q("div",{key:Dt},[se(S).includes(Dt)&&Dt!==se(f)?(L(),Q("div",pze,[H("div",null,[pe(Nb,{label:Ye(Dt),value:P.value.name[Dt],name:"name","all-errors":{name:(At=(ht=(ft=z.value)==null?void 0:ft[He])==null?void 0:ht.name)==null?void 0:At[Dt]},size:"large","is-required":Dt===se(f),onChange:(hn,ct,Ht)=>{ce(Dt,Ht)}},null,8,["label","value","all-errors","is-required","onChange"])])])):we("",!0)])}),128))]))])):we("",!0)]),_:1}),St[11]||(St[11]=D()),pe(as,{class:"text-right"},{default:te(()=>[q.value?(L(),Q("div",mze,[pe(ms,{"is-required":!0,disabled:!P.value.name[se(f)],onClick:ue},{default:te(()=>[D(ee(se(xc)("common.add",{})),1)]),_:1},8,["disabled"])])):we("",!0)]),_:1})]),_:1})]),_:1})]),_:1},8,["labelled-by","described-by"])])],8,WUe))}};var gze=Object.defineProperty,tH=Object.getOwnPropertySymbols,Uye=Object.prototype.hasOwnProperty,zye=Object.prototype.propertyIsEnumerable,Wye=(e,t,n)=>t in e?gze(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qw=(e,t)=>{for(var n in t||(t={}))Uye.call(t,n)&&Wye(e,n,t[n]);if(tH)for(var n of tH(t))zye.call(t,n)&&Wye(e,n,t[n]);return e},jye=(e,t)=>{var n={};for(var i in e)Uye.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&tH)for(var i of tH(e))t.indexOf(i)<0&&zye.call(e,i)&&(n[i]=e[i]);return n};const Zye="[vue-draggable-plus]: ";function vze(e){console.warn(Zye+e)}function bze(e){console.error(Zye+e)}function qye(e,t,n){return n>=0&&n<e.length&&e.splice(n,0,e.splice(t,1)[0]),e}function yze(e){return e.replace(/-(\w)/g,(t,n)=>n?n.toUpperCase():"")}function _ze(e){return Object.keys(e).reduce((t,n)=>(typeof e[n]<"u"&&(t[yze(n)]=e[n]),t),{})}function Gye(e,t){return Array.isArray(e)&&e.splice(t,1),e}function Kye(e,t,n){return Array.isArray(e)&&e.splice(t,0,n),e}function Sze(e){return typeof e>"u"}function Cze(e){return typeof e=="string"}function Yye(e,t,n){const i=e.children[n];e.insertBefore(t,i)}function cte(e){e.parentNode&&e.parentNode.removeChild(e)}function wze(e,t=document){var n;let i=null;return typeof(t==null?void 0:t.querySelector)=="function"?i=(n=t==null?void 0:t.querySelector)==null?void 0:n.call(t,e):i=document.querySelector(e),i||vze("Element not found: ".concat(e)),i}function Eze(e,t,n=null){return function(...i){return e.apply(n,i),t.apply(n,i)}}function kze(e,t){const n=qw({},e);return Object.keys(t).forEach(i=>{n[i]?n[i]=Eze(e[i],t[i]):n[i]=t[i]}),n}function xze(e){return e instanceof HTMLElement}function Xye(e,t){Object.keys(e).forEach(n=>{t(n,e[n])})}function Tze(e){return e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97)}const Ize=Object.assign;/**! * Sortable 1.15.2 * @author RubaXa <trash@rubaxa.org> * @author owenm <owen23355@gmail.com> * @license MIT */function Jye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function Mv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Jye(Object(n),!0).forEach(function(i){Aze(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jye(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function nH(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?nH=function(t){return typeof t}:nH=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nH(e)}function Aze(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fb(){return Fb=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Fb.apply(this,arguments)}function Oze(e,t){if(e==null)return{};var n={},i=Object.keys(e),a,l;for(l=0;l<i.length;l++)a=i[l],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Rze(e,t){if(e==null)return{};var n=Oze(e,t),i,a;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)i=l[a],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}var Dze="1.15.2";function $b(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var Bb=$b(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),EO=$b(/Edge/i),Qye=$b(/firefox/i),kO=$b(/safari/i)&&!$b(/chrome/i)&&!$b(/android/i),e3e=$b(/iP(ad|od|hone)/i),t3e=$b(/chrome/i)&&$b(/android/i),n3e={capture:!1,passive:!1};function ha(e,t,n){e.addEventListener(t,n,!Bb&&n3e)}function ta(e,t,n){e.removeEventListener(t,n,!Bb&&n3e)}function sH(e,t){if(t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function Lze(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function l0(e,t,n,i){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&sH(e,t):sH(e,t))||i&&e===n)return e;if(e===n)break}while(e=Lze(e))}return null}var s3e=/\s+/g;function Bh(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var i=(" "+e.className+" ").replace(s3e," ").replace(" "+t+" "," ");e.className=(i+(n?" "+t:"")).replace(s3e," ")}}function pr(e,t,n){var i=e&&e.style;if(i){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in i)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),i[t]=n+(typeof n=="string"?"":"px")}}function Gw(e,t){var n="";if(typeof e=="string")n=e;else do{var i=pr(e,"transform");i&&i!=="none"&&(n=i+" "+n)}while(!t&&(e=e.parentNode));var a=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return a&&new a(n)}function o3e(e,t,n){if(e){var i=e.getElementsByTagName(t),a=0,l=i.length;if(n)for(;a<l;a++)n(i[a],a);return i}return[]}function Nv(){var e=document.scrollingElement;return e||document.documentElement}function Ru(e,t,n,i,a){if(!(!e.getBoundingClientRect&&e!==window)){var l,f,d,h,b,S,k;if(e!==window&&e.parentNode&&e!==Nv()?(l=e.getBoundingClientRect(),f=l.top,d=l.left,h=l.bottom,b=l.right,S=l.height,k=l.width):(f=0,d=0,h=window.innerHeight,b=window.innerWidth,S=window.innerHeight,k=window.innerWidth),(t||n)&&e!==window&&(a=a||e.parentNode,!Bb))do if(a&&a.getBoundingClientRect&&(pr(a,"transform")!=="none"||n&&pr(a,"position")!=="static")){var T=a.getBoundingClientRect();f-=T.top+parseInt(pr(a,"border-top-width")),d-=T.left+parseInt(pr(a,"border-left-width")),h=f+l.height,b=d+l.width;break}while(a=a.parentNode);if(i&&e!==window){var O=Gw(a||e),P=O&&O.a,B=O&&O.d;O&&(f/=B,d/=P,k/=P,S/=B,h=f+S,b=d+k)}return{top:f,left:d,bottom:h,right:b,width:k,height:S}}}function r3e(e,t,n){for(var i=T5(e,!0),a=Ru(e)[t];i;){var l=Ru(i)[n],f=void 0;if(f=a>=l,!f)return i;if(i===Nv())break;i=T5(i,!1)}return!1}function Kw(e,t,n,i){for(var a=0,l=0,f=e.children;l<f.length;){if(f[l].style.display!=="none"&&f[l]!==mr.ghost&&(i||f[l]!==mr.dragged)&&l0(f[l],n.draggable,e,!1)){if(a===t)return f[l];a++}l++}return null}function ute(e,t){for(var n=e.lastElementChild;n&&(n===mr.ghost||pr(n,"display")==="none"||t&&!sH(n,t));)n=n.previousElementSibling;return n||null}function W1(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==mr.clone&&(!t||sH(e,t))&&n++;return n}function i3e(e){var t=0,n=0,i=Nv();if(e)do{var a=Gw(e),l=a.a,f=a.d;t+=e.scrollLeft*l,n+=e.scrollTop*f}while(e!==i&&(e=e.parentNode));return[t,n]}function Pze(e,t){for(var n in e)if(e.hasOwnProperty(n)){for(var i in t)if(t.hasOwnProperty(i)&&t[i]===e[n][i])return Number(n)}return-1}function T5(e,t){if(!e||!e.getBoundingClientRect)return Nv();var n=e,i=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var a=pr(n);if(n.clientWidth<n.scrollWidth&&(a.overflowX=="auto"||a.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(a.overflowY=="auto"||a.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return Nv();if(i||t)return n;i=!0}}while(n=n.parentNode);return Nv()}function Mze(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function dte(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}var xO;function a3e(e,t){return function(){if(!xO){var n=arguments,i=this;n.length===1?e.call(i,n[0]):e.apply(i,n),xO=setTimeout(function(){xO=void 0},t)}}}function Nze(){clearTimeout(xO),xO=void 0}function l3e(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function c3e(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}function u3e(e,t,n){var i={};return Array.from(e.children).forEach(function(a){var l,f,d,h;if(!(!l0(a,t.draggable,e,!1)||a.animated||a===n)){var b=Ru(a);i.left=Math.min((l=i.left)!==null&&l!==void 0?l:1/0,b.left),i.top=Math.min((f=i.top)!==null&&f!==void 0?f:1/0,b.top),i.right=Math.max((d=i.right)!==null&&d!==void 0?d:-1/0,b.right),i.bottom=Math.max((h=i.bottom)!==null&&h!==void 0?h:-1/0,b.bottom)}}),i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}var Vh="Sortable"+new Date().getTime();function Fze(){var e=[],t;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var n=[].slice.call(this.el.children);n.forEach(function(i){if(!(pr(i,"display")==="none"||i===mr.ghost)){e.push({target:i,rect:Ru(i)});var a=Mv({},e[e.length-1].rect);if(i.thisAnimationDuration){var l=Gw(i,!0);l&&(a.top-=l.f,a.left-=l.e)}i.fromRect=a}})}},addAnimationState:function(n){e.push(n)},removeAnimationState:function(n){e.splice(Pze(e,{target:n}),1)},animateAll:function(n){var i=this;if(!this.options.animation){clearTimeout(t),typeof n=="function"&&n();return}var a=!1,l=0;e.forEach(function(f){var d=0,h=f.target,b=h.fromRect,S=Ru(h),k=h.prevFromRect,T=h.prevToRect,O=f.rect,P=Gw(h,!0);P&&(S.top-=P.f,S.left-=P.e),h.toRect=S,h.thisAnimationDuration&&dte(k,S)&&!dte(b,S)&&(O.top-S.top)/(O.left-S.left)===(b.top-S.top)/(b.left-S.left)&&(d=Bze(O,k,T,i.options)),dte(S,b)||(h.prevFromRect=b,h.prevToRect=S,d||(d=i.options.animation),i.animate(h,O,S,d)),d&&(a=!0,l=Math.max(l,d),clearTimeout(h.animationResetTimer),h.animationResetTimer=setTimeout(function(){h.animationTime=0,h.prevFromRect=null,h.fromRect=null,h.prevToRect=null,h.thisAnimationDuration=null},d),h.thisAnimationDuration=d)}),clearTimeout(t),a?t=setTimeout(function(){typeof n=="function"&&n()},l):typeof n=="function"&&n(),e=[]},animate:function(n,i,a,l){if(l){pr(n,"transition",""),pr(n,"transform","");var f=Gw(this.el),d=f&&f.a,h=f&&f.d,b=(i.left-a.left)/(d||1),S=(i.top-a.top)/(h||1);n.animatingX=!!b,n.animatingY=!!S,pr(n,"transform","translate3d("+b+"px,"+S+"px,0)"),this.forRepaintDummy=$ze(n),pr(n,"transition","transform "+l+"ms"+(this.options.easing?" "+this.options.easing:"")),pr(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){pr(n,"transition",""),pr(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},l)}}}}function $ze(e){return e.offsetWidth}function Bze(e,t,n,i){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*i.animation}var Yw=[],fte={initializeByDefault:!0},TO={mount:function(e){for(var t in fte)fte.hasOwnProperty(t)&&!(t in e)&&(e[t]=fte[t]);Yw.forEach(function(n){if(n.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),Yw.push(e)},pluginEvent:function(e,t,n){var i=this;this.eventCanceled=!1,n.cancel=function(){i.eventCanceled=!0};var a=e+"Global";Yw.forEach(function(l){t[l.pluginName]&&(t[l.pluginName][a]&&t[l.pluginName][a](Mv({sortable:t},n)),t.options[l.pluginName]&&t[l.pluginName][e]&&t[l.pluginName][e](Mv({sortable:t},n)))})},initializePlugins:function(e,t,n,i){Yw.forEach(function(f){var d=f.pluginName;if(!(!e.options[d]&&!f.initializeByDefault)){var h=new f(e,t,e.options);h.sortable=e,h.options=e.options,e[d]=h,Fb(n,h.defaults)}});for(var a in e.options)if(e.options.hasOwnProperty(a)){var l=this.modifyOption(e,a,e.options[a]);typeof l<"u"&&(e.options[a]=l)}},getEventProperties:function(e,t){var n={};return Yw.forEach(function(i){typeof i.eventProperties=="function"&&Fb(n,i.eventProperties.call(t[i.pluginName],e))}),n},modifyOption:function(e,t,n){var i;return Yw.forEach(function(a){e[a.pluginName]&&a.optionListeners&&typeof a.optionListeners[t]=="function"&&(i=a.optionListeners[t].call(e[a.pluginName],n))}),i}};function Vze(e){var t=e.sortable,n=e.rootEl,i=e.name,a=e.targetEl,l=e.cloneEl,f=e.toEl,d=e.fromEl,h=e.oldIndex,b=e.newIndex,S=e.oldDraggableIndex,k=e.newDraggableIndex,T=e.originalEvent,O=e.putSortable,P=e.extraEventProperties;if(t=t||n&&n[Vh],!!t){var B,W=t.options,Z="on"+i.charAt(0).toUpperCase()+i.substr(1);window.CustomEvent&&!Bb&&!EO?B=new CustomEvent(i,{bubbles:!0,cancelable:!0}):(B=document.createEvent("Event"),B.initEvent(i,!0,!0)),B.to=f||n,B.from=d||n,B.item=a||n,B.clone=l,B.oldIndex=h,B.newIndex=b,B.oldDraggableIndex=S,B.newDraggableIndex=k,B.originalEvent=T,B.pullMode=O?O.lastPutMode:void 0;var Y=Mv(Mv({},P),TO.getEventProperties(i,t));for(var z in Y)B[z]=Y[z];n&&n.dispatchEvent(B),W[Z]&&W[Z].call(t,B)}}var Hze=["evt"],Pm=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.evt,a=Rze(n,Hze);TO.pluginEvent.bind(mr)(e,t,Mv({dragEl:Is,parentEl:Wc,ghostEl:Or,rootEl:cc,nextEl:oC,lastDownEl:oH,cloneEl:Ic,cloneHidden:I5,dragStarted:AO,putSortable:Yd,activeSortable:mr.active,originalEvent:i,oldIndex:Xw,oldDraggableIndex:IO,newIndex:Hh,newDraggableIndex:A5,hideGhostForTarget:v3e,unhideGhostForTarget:b3e,cloneNowHidden:function(){I5=!0},cloneNowShown:function(){I5=!1},dispatchSortableEvent:function(l){zp({sortable:t,name:l,originalEvent:i})}},a))};function zp(e){Vze(Mv({putSortable:Yd,cloneEl:Ic,targetEl:Is,rootEl:cc,oldIndex:Xw,oldDraggableIndex:IO,newIndex:Hh,newDraggableIndex:A5},e))}var Is,Wc,Or,cc,oC,oH,Ic,I5,Xw,Hh,IO,A5,rH,Yd,Jw=!1,iH=!1,aH=[],rC,c0,pte,mte,d3e,f3e,AO,Qw,OO,RO=!1,lH=!1,cH,Ff,hte=[],gte=!1,uH=[],dH=typeof document<"u",fH=e3e,p3e=EO||Bb?"cssFloat":"float",Uze=dH&&!t3e&&!e3e&&"draggable"in document.createElement("div"),m3e=function(){if(dH){if(Bb)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),h3e=function(e,t){var n=pr(e),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),a=Kw(e,0,t),l=Kw(e,1,t),f=a&&pr(a),d=l&&pr(l),h=f&&parseInt(f.marginLeft)+parseInt(f.marginRight)+Ru(a).width,b=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+Ru(l).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(a&&f.float&&f.float!=="none"){var S=f.float==="left"?"left":"right";return l&&(d.clear==="both"||d.clear===S)?"vertical":"horizontal"}return a&&(f.display==="block"||f.display==="flex"||f.display==="table"||f.display==="grid"||h>=i&&n[p3e]==="none"||l&&n[p3e]==="none"&&h+b>i)?"vertical":"horizontal"},zze=function(e,t,n){var i=n?e.left:e.top,a=n?e.right:e.bottom,l=n?e.width:e.height,f=n?t.left:t.top,d=n?t.right:t.bottom,h=n?t.width:t.height;return i===f||a===d||i+l/2===f+h/2},Wze=function(e,t){var n;return aH.some(function(i){var a=i[Vh].options.emptyInsertThreshold;if(!(!a||ute(i))){var l=Ru(i),f=e>=l.left-a&&e<=l.right+a,d=t>=l.top-a&&t<=l.bottom+a;if(f&&d)return n=i}}),n},g3e=function(e){function t(a,l){return function(f,d,h,b){var S=f.options.group.name&&d.options.group.name&&f.options.group.name===d.options.group.name;if(a==null&&(l||S))return!0;if(a==null||a===!1)return!1;if(l&&a==="clone")return a;if(typeof a=="function")return t(a(f,d,h,b),l)(f,d,h,b);var k=(l?f:d).options.group.name;return a===!0||typeof a=="string"&&a===k||a.join&&a.indexOf(k)>-1}}var n={},i=e.group;(!i||nH(i)!="object")&&(i={name:i}),n.name=i.name,n.checkPull=t(i.pull,!0),n.checkPut=t(i.put),n.revertClone=i.revertClone,e.group=n},v3e=function(){!m3e&&Or&&pr(Or,"display","none")},b3e=function(){!m3e&&Or&&pr(Or,"display","")};dH&&!t3e&&document.addEventListener("click",function(e){if(iH)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),iH=!1,!1},!0);var iC=function(e){if(Is){e=e.touches?e.touches[0]:e;var t=Wze(e.clientX,e.clientY);if(t){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[i]=e[i]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[Vh]._onDragOver(n)}}},jze=function(e){Is&&Is.parentNode[Vh]._isOutsideThisEl(e.target)};function mr(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=Fb({},t),e[Vh]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return h3e(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(l,f){l.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:mr.supportPointer!==!1&&"PointerEvent"in window&&!kO,emptyInsertThreshold:5};TO.initializePlugins(this,e,n);for(var i in n)!(i in t)&&(t[i]=n[i]);g3e(t);for(var a in this)a.charAt(0)==="_"&&typeof this[a]=="function"&&(this[a]=this[a].bind(this));this.nativeDraggable=t.forceFallback?!1:Uze,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?ha(e,"pointerdown",this._onTapStart):(ha(e,"mousedown",this._onTapStart),ha(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(ha(e,"dragover",this),ha(e,"dragenter",this)),aH.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),Fb(this,Fze())}mr.prototype={constructor:mr,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Qw=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,Is):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,i=this.options,a=i.preventOnFilter,l=e.type,f=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,d=(f||e).target,h=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||d,b=i.filter;if(Qze(n),!Is&&!(/mousedown|pointerdown/.test(l)&&e.button!==0||i.disabled)&&!h.isContentEditable&&!(!this.nativeDraggable&&kO&&d&&d.tagName.toUpperCase()==="SELECT")&&(d=l0(d,i.draggable,n,!1),!(d&&d.animated)&&oH!==d)){if(Xw=W1(d),IO=W1(d,i.draggable),typeof b=="function"){if(b.call(this,e,d,this)){zp({sortable:t,rootEl:h,name:"filter",targetEl:d,toEl:n,fromEl:n}),Pm("filter",t,{evt:e}),a&&e.cancelable&&e.preventDefault();return}}else if(b&&(b=b.split(",").some(function(S){if(S=l0(h,S.trim(),n,!1),S)return zp({sortable:t,rootEl:S,name:"filter",targetEl:d,fromEl:n,toEl:n}),Pm("filter",t,{evt:e}),!0}),b)){a&&e.cancelable&&e.preventDefault();return}i.handle&&!l0(h,i.handle,n,!1)||this._prepareDragStart(e,f,d)}}},_prepareDragStart:function(e,t,n){var i=this,a=i.el,l=i.options,f=a.ownerDocument,d;if(n&&!Is&&n.parentNode===a){var h=Ru(n);if(cc=a,Is=n,Wc=Is.parentNode,oC=Is.nextSibling,oH=n,rH=l.group,mr.dragged=Is,rC={target:Is,clientX:(t||e).clientX,clientY:(t||e).clientY},d3e=rC.clientX-h.left,f3e=rC.clientY-h.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,Is.style["will-change"]="all",d=function(){if(Pm("delayEnded",i,{evt:e}),mr.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!Qye&&i.nativeDraggable&&(Is.draggable=!0),i._triggerDragStart(e,t),zp({sortable:i,name:"choose",originalEvent:e}),Bh(Is,l.chosenClass,!0)},l.ignore.split(",").forEach(function(b){o3e(Is,b.trim(),vte)}),ha(f,"dragover",iC),ha(f,"mousemove",iC),ha(f,"touchmove",iC),ha(f,"mouseup",i._onDrop),ha(f,"touchend",i._onDrop),ha(f,"touchcancel",i._onDrop),Qye&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Is.draggable=!0),Pm("delayStart",this,{evt:e}),l.delay&&(!l.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(EO||Bb))){if(mr.eventCanceled){this._onDrop();return}ha(f,"mouseup",i._disableDelayedDrag),ha(f,"touchend",i._disableDelayedDrag),ha(f,"touchcancel",i._disableDelayedDrag),ha(f,"mousemove",i._delayedDragTouchMoveHandler),ha(f,"touchmove",i._delayedDragTouchMoveHandler),l.supportPointer&&ha(f,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(d,l.delay)}else d()}},_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(){Is&&vte(Is),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;ta(e,"mouseup",this._disableDelayedDrag),ta(e,"touchend",this._disableDelayedDrag),ta(e,"touchcancel",this._disableDelayedDrag),ta(e,"mousemove",this._delayedDragTouchMoveHandler),ta(e,"touchmove",this._delayedDragTouchMoveHandler),ta(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?ha(document,"pointermove",this._onTouchMove):t?ha(document,"touchmove",this._onTouchMove):ha(document,"mousemove",this._onTouchMove):(ha(Is,"dragend",this),ha(cc,"dragstart",this._onDragStart));try{document.selection?mH(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(Jw=!1,cc&&Is){Pm("dragStarted",this,{evt:t}),this.nativeDraggable&&ha(document,"dragover",jze);var n=this.options;!e&&Bh(Is,n.dragClass,!1),Bh(Is,n.ghostClass,!0),mr.active=this,e&&this._appendGhost(),zp({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(c0){this._lastX=c0.clientX,this._lastY=c0.clientY,v3e();for(var e=document.elementFromPoint(c0.clientX,c0.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(c0.clientX,c0.clientY),e!==t);)t=e;if(Is.parentNode[Vh]._isOutsideThisEl(e),t)do{if(t[Vh]){var n=void 0;if(n=t[Vh]._onDragOver({clientX:c0.clientX,clientY:c0.clientY,target:e,rootEl:t}),n&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);b3e()}},_onTouchMove:function(e){if(rC){var t=this.options,n=t.fallbackTolerance,i=t.fallbackOffset,a=e.touches?e.touches[0]:e,l=Or&&Gw(Or,!0),f=Or&&l&&l.a,d=Or&&l&&l.d,h=fH&&Ff&&i3e(Ff),b=(a.clientX-rC.clientX+i.x)/(f||1)+(h?h[0]-hte[0]:0)/(f||1),S=(a.clientY-rC.clientY+i.y)/(d||1)+(h?h[1]-hte[1]:0)/(d||1);if(!mr.active&&!Jw){if(n&&Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(Or){l?(l.e+=b-(pte||0),l.f+=S-(mte||0)):l={a:1,b:0,c:0,d:1,e:b,f:S};var k="matrix(".concat(l.a,",").concat(l.b,",").concat(l.c,",").concat(l.d,",").concat(l.e,",").concat(l.f,")");pr(Or,"webkitTransform",k),pr(Or,"mozTransform",k),pr(Or,"msTransform",k),pr(Or,"transform",k),pte=b,mte=S,c0=a}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!Or){var e=this.options.fallbackOnBody?document.body:cc,t=Ru(Is,!0,fH,!0,e),n=this.options;if(fH){for(Ff=e;pr(Ff,"position")==="static"&&pr(Ff,"transform")==="none"&&Ff!==document;)Ff=Ff.parentNode;Ff!==document.body&&Ff!==document.documentElement?(Ff===document&&(Ff=Nv()),t.top+=Ff.scrollTop,t.left+=Ff.scrollLeft):Ff=Nv(),hte=i3e(Ff)}Or=Is.cloneNode(!0),Bh(Or,n.ghostClass,!1),Bh(Or,n.fallbackClass,!0),Bh(Or,n.dragClass,!0),pr(Or,"transition",""),pr(Or,"transform",""),pr(Or,"box-sizing","border-box"),pr(Or,"margin",0),pr(Or,"top",t.top),pr(Or,"left",t.left),pr(Or,"width",t.width),pr(Or,"height",t.height),pr(Or,"opacity","0.8"),pr(Or,"position",fH?"absolute":"fixed"),pr(Or,"zIndex","100000"),pr(Or,"pointerEvents","none"),mr.ghost=Or,e.appendChild(Or),pr(Or,"transform-origin",d3e/parseInt(Or.style.width)*100+"% "+f3e/parseInt(Or.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,i=e.dataTransfer,a=n.options;if(Pm("dragStart",this,{evt:e}),mr.eventCanceled){this._onDrop();return}Pm("setupClone",this),mr.eventCanceled||(Ic=c3e(Is),Ic.removeAttribute("id"),Ic.draggable=!1,Ic.style["will-change"]="",this._hideClone(),Bh(Ic,this.options.chosenClass,!1),mr.clone=Ic),n.cloneId=mH(function(){Pm("clone",n),!mr.eventCanceled&&(n.options.removeCloneOnHide||cc.insertBefore(Ic,Is),n._hideClone(),zp({sortable:n,name:"clone"}))}),!t&&Bh(Is,a.dragClass,!0),t?(iH=!0,n._loopId=setInterval(n._emulateDragOver,50)):(ta(document,"mouseup",n._onDrop),ta(document,"touchend",n._onDrop),ta(document,"touchcancel",n._onDrop),i&&(i.effectAllowed="move",a.setData&&a.setData.call(n,i,Is)),ha(document,"drop",n),pr(Is,"transform","translateZ(0)")),Jw=!0,n._dragStartId=mH(n._dragStarted.bind(n,t,e)),ha(document,"selectstart",n),AO=!0,kO&&pr(document.body,"user-select","none")},_onDragOver:function(e){var t=this.el,n=e.target,i,a,l,f=this.options,d=f.group,h=mr.active,b=rH===d,S=f.sort,k=Yd||h,T,O=this,P=!1;if(gte)return;function B(Ye,Fe){Pm(Ye,O,Mv({evt:e,isOwner:b,axis:T?"vertical":"horizontal",revert:l,dragRect:i,targetRect:a,canSort:S,fromSortable:k,target:n,completed:Z,onMove:function(St,Dt){return pH(cc,t,Is,i,St,Ru(St),e,Dt)},changed:Y},Fe))}function W(){B("dragOverAnimationCapture"),O.captureAnimationState(),O!==k&&k.captureAnimationState()}function Z(Ye){return B("dragOverCompleted",{insertion:Ye}),Ye&&(b?h._hideClone():h._showClone(O),O!==k&&(Bh(Is,Yd?Yd.options.ghostClass:h.options.ghostClass,!1),Bh(Is,f.ghostClass,!0)),Yd!==O&&O!==mr.active?Yd=O:O===mr.active&&Yd&&(Yd=null),k===O&&(O._ignoreWhileAnimating=n),O.animateAll(function(){B("dragOverAnimationComplete"),O._ignoreWhileAnimating=null}),O!==k&&(k.animateAll(),k._ignoreWhileAnimating=null)),(n===Is&&!Is.animated||n===t&&!n.animated)&&(Qw=null),!f.dragoverBubble&&!e.rootEl&&n!==document&&(Is.parentNode[Vh]._isOutsideThisEl(e.target),!Ye&&iC(e)),!f.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),P=!0}function Y(){Hh=W1(Is),A5=W1(Is,f.draggable),zp({sortable:O,name:"change",toEl:t,newIndex:Hh,newDraggableIndex:A5,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),n=l0(n,f.draggable,t,!0),B("dragOver"),mr.eventCanceled)return P;if(Is.contains(e.target)||n.animated&&n.animatingX&&n.animatingY||O._ignoreWhileAnimating===n)return Z(!1);if(iH=!1,h&&!f.disabled&&(b?S||(l=Wc!==cc):Yd===this||(this.lastPutMode=rH.checkPull(this,h,Is,e))&&d.checkPut(this,h,Is,e))){if(T=this._getDirection(e,n)==="vertical",i=Ru(Is),B("dragOverValid"),mr.eventCanceled)return P;if(l)return Wc=cc,W(),this._hideClone(),B("revert"),mr.eventCanceled||(oC?cc.insertBefore(Is,oC):cc.appendChild(Is)),Z(!0);var z=ute(t,f.draggable);if(!z||Kze(e,T,this)&&!z.animated){if(z===Is)return Z(!1);if(z&&t===e.target&&(n=z),n&&(a=Ru(n)),pH(cc,t,Is,i,n,a,e,!!n)!==!1)return W(),z&&z.nextSibling?t.insertBefore(Is,z.nextSibling):t.appendChild(Is),Wc=t,Y(),Z(!0)}else if(z&&Gze(e,T,this)){var q=Kw(t,0,f,!0);if(q===Is)return Z(!1);if(n=q,a=Ru(n),pH(cc,t,Is,i,n,a,e,!1)!==!1)return W(),t.insertBefore(Is,q),Wc=t,Y(),Z(!0)}else if(n.parentNode===t){a=Ru(n);var ne=0,ue,J=Is.parentNode!==t,ce=!zze(Is.animated&&Is.toRect||i,n.animated&&n.toRect||a,T),ge=T?"top":"left",de=r3e(n,"top","top")||r3e(Is,"top","top"),he=de?de.scrollTop:void 0;Qw!==n&&(ue=a[ge],RO=!1,lH=!ce&&f.invertSwap||J),ne=Yze(e,n,a,T,ce?1:f.swapThreshold,f.invertedSwapThreshold==null?f.swapThreshold:f.invertedSwapThreshold,lH,Qw===n);var ie;if(ne!==0){var Be=W1(Is);do Be-=ne,ie=Wc.children[Be];while(ie&&(pr(ie,"display")==="none"||ie===Or))}if(ne===0||ie===n)return Z(!1);Qw=n,OO=ne;var $e=n.nextElementSibling,Ue=!1;Ue=ne===1;var V=pH(cc,t,Is,i,n,a,e,Ue);if(V!==!1)return(V===1||V===-1)&&(Ue=V===1),gte=!0,setTimeout(qze,30),W(),Ue&&!$e?t.appendChild(Is):n.parentNode.insertBefore(Is,Ue?$e:n),de&&l3e(de,0,he-de.scrollTop),Wc=Is.parentNode,ue!==void 0&&!lH&&(cH=Math.abs(ue-Ru(n)[ge])),Y(),Z(!0)}if(t.contains(Is))return Z(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){ta(document,"mousemove",this._onTouchMove),ta(document,"touchmove",this._onTouchMove),ta(document,"pointermove",this._onTouchMove),ta(document,"dragover",iC),ta(document,"mousemove",iC),ta(document,"touchmove",iC)},_offUpEvents:function(){var e=this.el.ownerDocument;ta(e,"mouseup",this._onDrop),ta(e,"touchend",this._onDrop),ta(e,"pointerup",this._onDrop),ta(e,"touchcancel",this._onDrop),ta(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;if(Hh=W1(Is),A5=W1(Is,n.draggable),Pm("drop",this,{evt:e}),Wc=Is&&Is.parentNode,Hh=W1(Is),A5=W1(Is,n.draggable),mr.eventCanceled){this._nulling();return}Jw=!1,lH=!1,RO=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),bte(this.cloneId),bte(this._dragStartId),this.nativeDraggable&&(ta(document,"drop",this),ta(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),kO&&pr(document.body,"user-select",""),pr(Is,"transform",""),e&&(AO&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),Or&&Or.parentNode&&Or.parentNode.removeChild(Or),(cc===Wc||Yd&&Yd.lastPutMode!=="clone")&&Ic&&Ic.parentNode&&Ic.parentNode.removeChild(Ic),Is&&(this.nativeDraggable&&ta(Is,"dragend",this),vte(Is),Is.style["will-change"]="",AO&&!Jw&&Bh(Is,Yd?Yd.options.ghostClass:this.options.ghostClass,!1),Bh(Is,this.options.chosenClass,!1),zp({sortable:this,name:"unchoose",toEl:Wc,newIndex:null,newDraggableIndex:null,originalEvent:e}),cc!==Wc?(Hh>=0&&(zp({rootEl:Wc,name:"add",toEl:Wc,fromEl:cc,originalEvent:e}),zp({sortable:this,name:"remove",toEl:Wc,originalEvent:e}),zp({rootEl:Wc,name:"sort",toEl:Wc,fromEl:cc,originalEvent:e}),zp({sortable:this,name:"sort",toEl:Wc,originalEvent:e})),Yd&&Yd.save()):Hh!==Xw&&Hh>=0&&(zp({sortable:this,name:"update",toEl:Wc,originalEvent:e}),zp({sortable:this,name:"sort",toEl:Wc,originalEvent:e})),mr.active&&((Hh==null||Hh===-1)&&(Hh=Xw,A5=IO),zp({sortable:this,name:"end",toEl:Wc,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){Pm("nulling",this),cc=Is=Wc=Or=oC=Ic=oH=I5=rC=c0=AO=Hh=A5=Xw=IO=Qw=OO=Yd=rH=mr.dragged=mr.ghost=mr.clone=mr.active=null,uH.forEach(function(e){e.checked=!0}),uH.length=pte=mte=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":Is&&(this._onDragOver(e),Zze(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,n=this.el.children,i=0,a=n.length,l=this.options;i<a;i++)t=n[i],l0(t,l.draggable,this.el,!1)&&e.push(t.getAttribute(l.dataIdAttr)||Jze(t));return e},sort:function(e,t){var n={},i=this.el;this.toArray().forEach(function(a,l){var f=i.children[l];l0(f,this.options.draggable,i,!1)&&(n[a]=f)},this),t&&this.captureAnimationState(),e.forEach(function(a){n[a]&&(i.removeChild(n[a]),i.appendChild(n[a]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return l0(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(t===void 0)return n[e];var i=TO.modifyOption(this,e,t);typeof i<"u"?n[e]=i:n[e]=t,e==="group"&&g3e(n)},destroy:function(){Pm("destroy",this);var e=this.el;e[Vh]=null,ta(e,"mousedown",this._onTapStart),ta(e,"touchstart",this._onTapStart),ta(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(ta(e,"dragover",this),ta(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),aH.splice(aH.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!I5){if(Pm("hideClone",this),mr.eventCanceled)return;pr(Ic,"display","none"),this.options.removeCloneOnHide&&Ic.parentNode&&Ic.parentNode.removeChild(Ic),I5=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(I5){if(Pm("showClone",this),mr.eventCanceled)return;Is.parentNode==cc&&!this.options.group.revertClone?cc.insertBefore(Ic,Is):oC?cc.insertBefore(Ic,oC):cc.appendChild(Ic),this.options.group.revertClone&&this.animate(Is,Ic),pr(Ic,"display",""),I5=!1}}};function Zze(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function pH(e,t,n,i,a,l,f,d){var h,b=e[Vh],S=b.options.onMove,k;return window.CustomEvent&&!Bb&&!EO?h=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(h=document.createEvent("Event"),h.initEvent("move",!0,!0)),h.to=t,h.from=e,h.dragged=n,h.draggedRect=i,h.related=a||t,h.relatedRect=l||Ru(t),h.willInsertAfter=d,h.originalEvent=f,e.dispatchEvent(h),S&&(k=S.call(b,h,f)),k}function vte(e){e.draggable=!1}function qze(){gte=!1}function Gze(e,t,n){var i=Ru(Kw(n.el,0,n.options,!0)),a=u3e(n.el,n.options,Or),l=10;return t?e.clientX<a.left-l||e.clientY<i.top&&e.clientX<i.right:e.clientY<a.top-l||e.clientY<i.bottom&&e.clientX<i.left}function Kze(e,t,n){var i=Ru(ute(n.el,n.options.draggable)),a=u3e(n.el,n.options,Or),l=10;return t?e.clientX>a.right+l||e.clientY>i.bottom&&e.clientX>i.left:e.clientY>a.bottom+l||e.clientX>i.right&&e.clientY>i.top}function Yze(e,t,n,i,a,l,f,d){var h=i?e.clientY:e.clientX,b=i?n.height:n.width,S=i?n.top:n.left,k=i?n.bottom:n.right,T=!1;if(!f){if(d&&cH<b*a){if(!RO&&(OO===1?h>S+b*l/2:h<k-b*l/2)&&(RO=!0),RO)T=!0;else if(OO===1?h<S+cH:h>k-cH)return-OO}else if(h>S+b*(1-a)/2&&h<k-b*(1-a)/2)return Xze(t)}return T=T||f,T&&(h<S+b*l/2||h>k-b*l/2)?h>S+b/2?1:-1:0}function Xze(e){return W1(Is)<W1(e)?1:-1}function Jze(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,i=0;n--;)i+=t.charCodeAt(n);return i.toString(36)}function Qze(e){uH.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var i=t[n];i.checked&&uH.push(i)}}function mH(e){return setTimeout(e,0)}function bte(e){return clearTimeout(e)}dH&&ha(document,"touchmove",function(e){(mr.active||Jw)&&e.cancelable&&e.preventDefault()}),mr.utils={on:ha,off:ta,css:pr,find:o3e,is:function(e,t){return!!l0(e,t,e,!1)},extend:Mze,throttle:a3e,closest:l0,toggleClass:Bh,clone:c3e,index:W1,nextTick:mH,cancelNextTick:bte,detectDirection:h3e,getChild:Kw},mr.get=function(e){return e[Vh]},mr.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach(function(i){if(!i.prototype||!i.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(i));i.utils&&(mr.utils=Mv(Mv({},mr.utils),i.utils)),TO.mount(i)})},mr.create=function(e,t){return new mr(e,t)},mr.version=Dze;var Du=[],DO,yte,_te=!1,Ste,Cte,hH,LO;function eWe(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return e.prototype={dragStarted:function(t){var n=t.originalEvent;this.sortable.nativeDraggable?ha(document,"dragover",this._handleAutoScroll):this.options.supportPointer?ha(document,"pointermove",this._handleFallbackAutoScroll):n.touches?ha(document,"touchmove",this._handleFallbackAutoScroll):ha(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var n=t.originalEvent;!this.options.dragOverBubble&&!n.rootEl&&this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?ta(document,"dragover",this._handleAutoScroll):(ta(document,"pointermove",this._handleFallbackAutoScroll),ta(document,"touchmove",this._handleFallbackAutoScroll),ta(document,"mousemove",this._handleFallbackAutoScroll)),y3e(),gH(),Nze()},nulling:function(){hH=yte=DO=_te=LO=Ste=Cte=null,Du.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,n){var i=this,a=(t.touches?t.touches[0]:t).clientX,l=(t.touches?t.touches[0]:t).clientY,f=document.elementFromPoint(a,l);if(hH=t,n||this.options.forceAutoScrollFallback||EO||Bb||kO){wte(t,this.options,f,n);var d=T5(f,!0);_te&&(!LO||a!==Ste||l!==Cte)&&(LO&&y3e(),LO=setInterval(function(){var h=T5(document.elementFromPoint(a,l),!0);h!==d&&(d=h,gH()),wte(t,i.options,h,n)},10),Ste=a,Cte=l)}else{if(!this.options.bubbleScroll||T5(f,!0)===Nv()){gH();return}wte(t,this.options,T5(f,!1),!1)}}},Fb(e,{pluginName:"scroll",initializeByDefault:!0})}function gH(){Du.forEach(function(e){clearInterval(e.pid)}),Du=[]}function y3e(){clearInterval(LO)}var wte=a3e(function(e,t,n,i){if(t.scroll){var a=(e.touches?e.touches[0]:e).clientX,l=(e.touches?e.touches[0]:e).clientY,f=t.scrollSensitivity,d=t.scrollSpeed,h=Nv(),b=!1,S;yte!==n&&(yte=n,gH(),DO=t.scroll,S=t.scrollFn,DO===!0&&(DO=T5(n,!0)));var k=0,T=DO;do{var O=T,P=Ru(O),B=P.top,W=P.bottom,Z=P.left,Y=P.right,z=P.width,q=P.height,ne=void 0,ue=void 0,J=O.scrollWidth,ce=O.scrollHeight,ge=pr(O),de=O.scrollLeft,he=O.scrollTop;O===h?(ne=z<J&&(ge.overflowX==="auto"||ge.overflowX==="scroll"||ge.overflowX==="visible"),ue=q<ce&&(ge.overflowY==="auto"||ge.overflowY==="scroll"||ge.overflowY==="visible")):(ne=z<J&&(ge.overflowX==="auto"||ge.overflowX==="scroll"),ue=q<ce&&(ge.overflowY==="auto"||ge.overflowY==="scroll"));var ie=ne&&(Math.abs(Y-a)<=f&&de+z<J)-(Math.abs(Z-a)<=f&&!!de),Be=ue&&(Math.abs(W-l)<=f&&he+q<ce)-(Math.abs(B-l)<=f&&!!he);if(!Du[k])for(var $e=0;$e<=k;$e++)Du[$e]||(Du[$e]={});(Du[k].vx!=ie||Du[k].vy!=Be||Du[k].el!==O)&&(Du[k].el=O,Du[k].vx=ie,Du[k].vy=Be,clearInterval(Du[k].pid),(ie!=0||Be!=0)&&(b=!0,Du[k].pid=setInterval((function(){i&&this.layer===0&&mr.active._onTouchMove(hH);var Ue=Du[this.layer].vy?Du[this.layer].vy*d:0,V=Du[this.layer].vx?Du[this.layer].vx*d:0;typeof S=="function"&&S.call(mr.dragged.parentNode[Vh],V,Ue,e,hH,Du[this.layer].el)!=="continue"||l3e(Du[this.layer].el,V,Ue)}).bind({layer:k}),24))),k++}while(t.bubbleScroll&&T!==h&&(T=T5(T,!1)));_te=b}},30),_3e=function(e){var t=e.originalEvent,n=e.putSortable,i=e.dragEl,a=e.activeSortable,l=e.dispatchSortableEvent,f=e.hideGhostForTarget,d=e.unhideGhostForTarget;if(t){var h=n||a;f();var b=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,S=document.elementFromPoint(b.clientX,b.clientY);d(),h&&!h.el.contains(S)&&(l("spill"),this.onSpill({dragEl:i,putSortable:n}))}};function Ete(){}Ete.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var i=Kw(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(t,i):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:_3e},Fb(Ete,{pluginName:"revertOnSpill"});function kte(){}kte.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable,i=n||this.sortable;i.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),i.animateAll()},drop:_3e},Fb(kte,{pluginName:"removeOnSpill"}),mr.mount(new eWe),mr.mount(kte,Ete);function tWe(e){return e==null?e:JSON.parse(JSON.stringify(e))}function nWe(e){sd()&&$a(e)}function sWe(e){sd()?Pr(e):kc(e)}let S3e=null,C3e=null;function w3e(e=null,t=null){S3e=e,C3e=t}function oWe(){return{data:S3e,clonedData:C3e}}const E3e=Symbol("cloneElement");function rWe(...e){var t,n;const i=(t=sd())==null?void 0:t.proxy;let a=null;const l=e[0];let[,f,d]=e;Array.isArray(se(f))||(d=f,f=null);let h=null;const{immediate:b=!0,clone:S=tWe,customUpdate:k}=(n=se(d))!=null?n:{};function T(ce){var ge;const{from:de,oldIndex:he,item:ie}=ce;a=Array.from(de.childNodes);const Be=se((ge=se(f))==null?void 0:ge[he]),$e=S(Be);w3e(Be,$e),ie[E3e]=$e}function O(ce){const ge=ce.item[E3e];if(!Sze(ge)){if(cte(ce.item),xa(f)){const de=[...se(f)];f.value=Kye(de,ce.newDraggableIndex,ge);return}Kye(se(f),ce.newDraggableIndex,ge)}}function P(ce){const{from:ge,item:de,oldIndex:he,oldDraggableIndex:ie,pullMode:Be,clone:$e}=ce;if(Yye(ge,de,he),Be==="clone"){cte($e);return}if(xa(f)){const Ue=[...se(f)];f.value=Gye(Ue,ie);return}Gye(se(f),ie)}function B(ce){if(k){k(ce);return}const{from:ge,item:de,oldIndex:he,oldDraggableIndex:ie,newDraggableIndex:Be}=ce;if(cte(de),Yye(ge,de,he),xa(f)){const $e=[...se(f)];f.value=qye($e,ie,Be);return}qye(se(f),ie,Be)}function W(ce){const{newIndex:ge,oldIndex:de,from:he,to:ie}=ce;let Be=null;const $e=ge===de&&he===ie;try{if($e){let Ue=null;a==null||a.some((V,Ye)=>{if(Ue&&(a==null?void 0:a.length)!==ie.childNodes.length)return he.insertBefore(Ue,V.nextSibling),!0;const Fe=ie.childNodes[Ye];Ue=ie==null?void 0:ie.replaceChild(V,Fe)})}}catch(Ue){Be=Ue}finally{a=null}kc(()=>{if(w3e(),Be)throw Be})}const Z={onUpdate:B,onStart:T,onAdd:O,onRemove:P,onEnd:W};function Y(ce){const ge=se(l);return ce||(ce=Cze(ge)?wze(ge,i==null?void 0:i.$el):ge),ce&&!xze(ce)&&(ce=ce.$el),ce||bze("Root element not found"),ce}function z(){var ce;const ge=(ce=se(d))!=null?ce:{},{immediate:de,clone:he}=ge,ie=jye(ge,["immediate","clone"]);return Xye(ie,(Be,$e)=>{Tze(Be)&&(ie[Be]=(Ue,...V)=>{const Ye=oWe();return Ize(Ue,Ye),$e(Ue,...V)})}),kze(f===null?{}:Z,ie)}const q=ce=>{ce=Y(ce),h&&ne.destroy(),h=new mr(ce,z())};io(()=>d,()=>{h&&Xye(z(),(ce,ge)=>{h==null||h.option(ce,ge)})},{deep:!0});const ne={option:(ce,ge)=>h==null?void 0:h.option(ce,ge),destroy:()=>{h==null||h.destroy(),h=null},save:()=>h==null?void 0:h.save(),toArray:()=>h==null?void 0:h.toArray(),closest:(...ce)=>h==null?void 0:h.closest(...ce)},ue=()=>ne==null?void 0:ne.option("disabled",!0),J=()=>ne==null?void 0:ne.option("disabled",!1);return sWe(()=>{b&&q()}),nWe(ne.destroy),qw({start:q,pause:ue,resume:J},ne)}const xte=["update","start","add","remove","choose","unchoose","end","sort","filter","clone","move","change"],iWe=["clone","animation","ghostClass","group","sort","disabled","store","handle","draggable","swapThreshold","invertSwap","invertedSwapThreshold","removeCloneOnHide","direction","chosenClass","dragClass","ignore","filter","preventOnFilter","easing","setData","dropBubble","dragoverBubble","dataIdAttr","delay","delayOnTouchOnly","touchStartThreshold","forceFallback","fallbackClass","fallbackOnBody","fallbackTolerance","fallbackOffset","supportPointer","emptyInsertThreshold","scroll","forceAutoScrollFallback","scrollSensitivity","scrollSpeed","bubbleScroll","modelValue","tag","target","customUpdate",...xte.map(e=>"on".concat(e.replace(/^\S/,t=>t.toUpperCase())))],aWe=Gr({name:"VueDraggable",model:{prop:"modelValue",event:"update:modelValue"},props:iWe,emits:["update:modelValue",...xte],setup(e,{slots:t,emit:n,expose:i,attrs:a}){const l=xte.reduce((S,k)=>{const T="on".concat(k.replace(/^\S/,O=>O.toUpperCase()));return S[T]=(...O)=>n(k,...O),S},{}),f=Ge(()=>{const S=q3(e),{modelValue:k}=S,T=jye(S,["modelValue"]),O=Object.entries(T).reduce((P,[B,W])=>{const Z=se(W);return Z!==void 0&&(P[B]=Z),P},{});return qw(qw({},l),_ze(qw(qw({},a),O)))}),d=Ge({get:()=>e.modelValue,set:S=>n("update:modelValue",S)}),h=kt(),b=I1(rWe(e.target||h,d,f));return i(b),()=>{var S;return oi(e.tag||"div",{ref:h},(S=t==null?void 0:t.default)==null?void 0:S.call(t,b))}}}),lWe={name:"Orderer",components:{Icon:Vs},props:{itemId:[String,Number],itemTitle:String,isDraggable:{type:Boolean,default:!0}},emits:["up","down"],methods:{up(){this.$emit("up",this.itemId),this.$nextTick(()=>{this.setFocus("up")})},down(){this.$emit("down",this.itemId),this.$nextTick(()=>{this.setFocus("down")})},setFocus:function(e){const t=e==="up"?".orderer__up":".orderer__down";this.$el.querySelector(t).focus()}}},cWe={class:"orderer"},uWe={key:0,class:"orderer__dragDrop","aria-hidden":"true"},dWe={class:"-screenReader"},fWe={class:"-screenReader"};function pWe(e,t,n,i,a,l){const f=Xe("Icon");return L(),Q("div",cWe,[n.isDraggable?(L(),Q("span",uWe,[pe(f,{icon:"Sort",class:"h-5 w-5"})])):we("",!0),t[4]||(t[4]=D()),H("button",{class:"orderer__up",onClick:t[0]||(t[0]=wl((...d)=>l.up&&l.up(...d),["prevent"]))},[pe(f,{icon:"ChevronUp",class:"h-5 w-5"}),t[2]||(t[2]=D()),H("span",dWe,ee(e.t("common.orderUp",{itemTitle:n.itemTitle})),1)]),t[5]||(t[5]=D()),H("button",{class:"orderer__down",onClick:t[1]||(t[1]=wl((...d)=>l.down&&l.down(...d),["prevent"]))},[pe(f,{icon:"ChevronDown",class:"h-5 w-5"}),t[3]||(t[3]=D()),H("span",fWe,ee(e.t("common.orderDown",{itemTitle:n.itemTitle})),1)])])}const vH=wt(lWe,[["render",pWe]]),mWe={name:"FieldOptions",components:{VueDraggable:aWe,Orderer:vH,Tooltip:Tc,HelpButton:Id,MultilingualProgress:a0,FieldError:Gd},extends:Lm,props:{allowOnlySorting:{type:Boolean,default:!1},type:{validator:function(e){return["checkbox","radio"].includes(e)},default:"checkbox"},isOrderable:{type:Boolean,default:!1},options:{type:[Array,Object],required:!0},value:{type:[Array,Number,String,Boolean],required:!0}},data(){return{localizedOptions:this.isMultilingual?this.options[this.localeKey]:this.options,selectedValue:this.isMultilingual?this.value[this.localeKey]:this.value}},computed:{classes(){let e=[];return this.isOrderable&&e.push("pkpFormField--optionsOrderable"),e}},watch:{value(e,t){JSON.stringify(e)!==JSON.stringify(t)&&(this.selectedValue=this.isMultilingual?this.value[this.localeKey]:this.value)},selectedValue:function(e,t){JSON.stringify(e)!==JSON.stringify(t)&&(this.isOrderable&&(e=this.localizedOptions.filter(n=>e.includes(n.value)).map(n=>n.value)),this.$emit("change",this.name,"value",e,this.localeKey))},options:function(e){this.localizedOptions=this.isMultilingual?e[this.localeKey]:e}},mounted(){var e;this.isOrderable&&((e=this.selectedValue)!=null&&e.length)&&(this.localizedOptions=this.localizedOptions.sort((t,n)=>{let i=this.selectedValue.findIndex(l=>t.value===l),a=this.selectedValue.findIndex(l=>n.value===l);return i=i===-1?Number.MAX_SAFE_INTEGER:i,a=a===-1?Number.MAX_SAFE_INTEGER:a,i<a?-1:1}))},methods:{optionOrderUp:function(e){const t=this.localizedOptions.findIndex(n=>n.value===e);t&&(this.localizedOptions.splice(t-1,0,this.localizedOptions.splice(t,1)[0]),this.updateValueOrder())},optionOrderDown:function(e){const t=this.localizedOptions.findIndex(n=>n.value===e);t<0||t>=this.localizedOptions.length-1||(this.localizedOptions.splice(t+1,0,this.localizedOptions.splice(t,1)[0]),this.updateValueOrder())},updateValueOrder(){this.selectedValue=this.localizedOptions.filter(e=>this.selectedValue.includes(e.value)).map(e=>e.value)}}},hWe={class:"pkpFormField--options__legend"},gWe={class:"aria-hidden align-middle"},vWe={class:"-screenReader"},bWe={key:1,class:"align-middle"},yWe={key:2,class:"pkpFormFieldLabel__required"},_We={class:"-screenReader"},SWe=["id"],CWe=["id"],wWe={class:"pkpFormField__control"},EWe=["value","name","aria-describedby","aria-invalid","disabled"],kWe=["value","name","aria-describedby","aria-invalid","disabled"],xWe={class:"pkpFormField--options__optionLabel"};function TWe(e,t,n,i,a,l){const f=Xe("Tooltip"),d=Xe("HelpButton"),h=Xe("Orderer"),b=Xe("MultilingualProgress"),S=Xe("FieldError"),k=Hr("strip-unsafe-html");return L(),Q("fieldset",{class:Rn(["pkpFormField pkpFormField--options",l.classes])},[H("legend",hWe,[e.localeLabel?(L(),Q(bt,{key:0},[H("span",gWe,ee(e.localeLabel),1),t[3]||(t[3]=D()),H("span",vWe,ee(e.multilingualLabel),1)],64)):(L(),Q("span",bWe,ee(e.label),1)),t[5]||(t[5]=D()),e.isRequired?(L(),Q("span",yWe,[t[4]||(t[4]=D("\n *\n ")),H("span",_We,ee(e.t("common.required")),1)])):we("",!0),t[6]||(t[6]=D()),e.isPrimaryLocale&&e.tooltip?(L(),Ee(f,{key:3,"aria-hidden":"true",tooltip:e.tooltip,label:""},null,8,["tooltip"])):we("",!0),t[7]||(t[7]=D()),e.isPrimaryLocale&&e.tooltip?Gn((L(),Q("span",{key:4,id:e.describedByTooltipId,class:"-screenReader"},null,8,SWe)),[[k,e.tooltip]]):we("",!0),t[8]||(t[8]=D()),e.isPrimaryLocale&&e.helpTopic?(L(),Ee(d,{key:5,id:e.describedByHelpId,topic:e.helpTopic,section:e.helpSection,label:e.t("help.help")},null,8,["id","topic","section","label"])):we("",!0)]),t[12]||(t[12]=D()),e.isPrimaryLocale&&e.description?Gn((L(),Q("div",{key:0,id:e.describedByDescriptionId,class:"pkpFormField__description pkpFormField--options__description semantic-defaults"},null,8,CWe)),[[k,e.description]]):we("",!0),t[13]||(t[13]=D()),H("div",wWe,[(L(),Ee(Io(n.isOrderable?"VueDraggable":"div"),{ref:"el",modelValue:a.localizedOptions,"onUpdate:modelValue":t[2]||(t[2]=T=>a.localizedOptions=T),disabled:!n.isOrderable,onEnd:l.updateValueOrder},{default:te(()=>[(L(!0),Q(bt,null,Sn(a.localizedOptions,T=>(L(),Q("label",{key:T.value,class:"pkpFormField--options__option"},[n.allowOnlySorting?we("",!0):(L(),Q(bt,{key:0},[n.type==="checkbox"?Gn((L(),Q("input",{key:0,"onUpdate:modelValue":t[0]||(t[0]=O=>a.selectedValue=O),class:"pkpFormField--options__input",value:T.value,type:"checkbox",name:e.localizedName,"aria-describedby":e.describedByIds,"aria-invalid":e.errors&&e.errors.length,disabled:T.disabled},null,8,EWe)),[[Iv,a.selectedValue]]):Gn((L(),Q("input",{key:1,"onUpdate:modelValue":t[1]||(t[1]=O=>a.selectedValue=O),class:"pkpFormField--options__input",value:T.value,type:"radio",name:e.localizedName,"aria-describedby":e.describedByIds,"aria-invalid":e.errors&&e.errors.length,disabled:T.disabled},null,8,kWe)),[[PS,a.selectedValue]])],64)),t[9]||(t[9]=D()),Gn(H("span",xWe,null,512),[[k,T.label]]),t[10]||(t[10]=D()),n.isOrderable?(L(),Ee(h,{key:1,"item-id":T.value,"item-title":T.label,onUp:l.optionOrderUp,onDown:l.optionOrderDown},null,8,["item-id","item-title","onUp","onDown"])):we("",!0)]))),128))]),_:1},40,["modelValue","disabled","onEnd"])),t[11]||(t[11]=D()),e.isMultilingual&&e.locales.length>1?(L(),Ee(b,{key:0,id:e.multilingualProgressId,count:e.multilingualFieldsCompleted,total:e.locales.length},null,8,["id","count","total"])):we("",!0)]),t[14]||(t[14]=D()),e.errors&&e.errors.length?(L(),Ee(S,{key:1,id:e.describedByErrorId,messages:e.errors},null,8,["id","messages"])):we("",!0)],2)}const aC=wt(mWe,[["render",TWe]]),IWe={name:"FieldArchivingPn",components:{Tooltip:Tc,HelpButton:Id,FieldError:Gd},extends:aC,props:{value:{type:Boolean,required:!0},terms:{type:String,required:!0},disablePluginSuccess:{type:String,required:!0},enablePluginSuccess:{type:String,required:!0},enablePluginUrl:{type:String,required:!0},disablePluginUrl:{type:String,required:!0},settingsUrl:{type:String,required:!0}},data(){return{isSaving:!1}},watch:{value:function(e,t){e!==t&&(e?this.addSettingsListener():this.removeSettingsListener(),this.isSaving=!0,$.ajax({method:"POST",url:e?this.enablePluginUrl:this.disablePluginUrl,data:{csrfToken:pkp.currentUser.csrfToken,disableNotification:!1},success:this.success,error:this.error,complete:this.complete}))}},mounted(){this.value&&this.addSettingsListener()},beforeUnmount(){this.value||$(".pkpFormField--archivingPn__terms button",this.$el).off()},methods:{addSettingsListener(){this.$nextTick(()=>{$(".pkpFormField--archivingPn__terms button",this.$el).click(e=>{e.stopPropagation(),e.preventDefault();var t={title:"Test title",url:this.settingsUrl,closeCallback:this.resetFocus};return $('<div id="'+$.pkp.classes.Helper.uuid()+'" class="pkp_modal pkpModalWrapper" tabindex="-1"></div>').pkpHandler("$.pkp.controllers.modal.AjaxModalHandler",t),!1})})},removeSettingsListener(){$(".pkpFormField--archivingPn__terms button",this.$el).off()},resetFocus(){$(".pkpFormField--archivingPn__terms button",this.$el).focus()},success:function(e){e.status?pkp.eventBus.$emit("notify",this.value?this.enablePluginSuccess:this.disablePluginSuccess,"success"):pkp.eventBus.$emit("notify",this.t("common.unknownError"),"warning")},error(){pkp.eventBus.$emit("notify",this.enablePluginError,"warning")},complete(){this.isSaving=!1}}},AWe={class:"pkpFormField--options__legend"},OWe={class:"aria-hidden align-middle"},RWe={class:"-screenReader"},DWe={key:1,class:"align-middle"},LWe={key:2,class:"pkpFormFieldLabel__required"},PWe={class:"-screenReader"},MWe=["id"],NWe=["id"],FWe={key:1,class:"pkpFormField__description pkpFormField--options__description pkpFormField--archivingPn__terms semantic-defaults"},$We={class:"pkpFormField__control"},BWe=["value","name","aria-describedby","aria-invalid","disabled"],VWe={key:0,class:"pkpSpinner","aria-hidden":"true"};function HWe(e,t,n,i,a,l){const f=Xe("Tooltip"),d=Xe("HelpButton"),h=Xe("FieldError"),b=Hr("strip-unsafe-html");return L(),Q("fieldset",{class:Rn(["pkpFormField pkpFormField--options pkpFormField--archivingPn",e.classes])},[H("legend",AWe,[e.localeLabel?(L(),Q(bt,{key:0},[H("span",OWe,ee(e.localeLabel),1),t[2]||(t[2]=D()),H("span",RWe,ee(e.multilingualLabel),1)],64)):(L(),Q("span",DWe,ee(e.label),1)),t[4]||(t[4]=D()),e.isRequired?(L(),Q("span",LWe,[t[3]||(t[3]=D("\n *\n ")),H("span",PWe,ee(e.t("common.required")),1)])):we("",!0),t[5]||(t[5]=D()),e.tooltip?(L(),Ee(f,{key:3,"aria-hidden":"true",tooltip:e.tooltip,label:""},null,8,["tooltip"])):we("",!0),t[6]||(t[6]=D()),e.tooltip?Gn((L(),Q("span",{key:4,id:e.describedByTooltipId,class:"-screenReader"},null,8,MWe)),[[b,e.tooltip]]):we("",!0),t[7]||(t[7]=D()),e.helpTopic?(L(),Ee(d,{key:5,id:e.describedByHelpId,topic:e.helpTopic,section:e.helpSection,label:e.t("help.help")},null,8,["id","topic","section","label"])):we("",!0)]),t[8]||(t[8]=D()),e.description?Gn((L(),Q("div",{key:0,id:e.describedByDescriptionId,class:"pkpFormField__description pkpFormField--options__description semantic-defaults"},null,8,NWe)),[[b,e.description]]):we("",!0),t[9]||(t[9]=D()),n.terms&&n.value?Gn((L(),Q("div",FWe,null,512)),[[b,n.terms]]):we("",!0),t[10]||(t[10]=D()),e.errors&&e.errors.length?(L(),Ee(h,{key:2,id:e.describedByErrorId,messages:e.errors},null,8,["id","messages"])):we("",!0),t[11]||(t[11]=D()),Gn(H("input",{"onUpdate:modelValue":t[0]||(t[0]=S=>e.selectedValue=S),type:"hidden"},null,512),[[lu,e.selectedValue]]),t[12]||(t[12]=D()),H("div",$We,[(L(!0),Q(bt,null,Sn(e.localizedOptions,S=>(L(),Q("label",{key:S.value,class:"pkpFormField--options__option"},[Gn(H("input",{"onUpdate:modelValue":t[1]||(t[1]=k=>e.selectedValue=k),class:"pkpFormField--options__input",value:S.value,type:"checkbox",name:e.name,"aria-describedby":e.describedByIds,"aria-invalid":e.errors&&e.errors.length,disabled:a.isSaving||S.disabled},null,8,BWe),[[Iv,e.selectedValue]]),D(" "+ee(S.label)+" ",1),a.isSaving?(L(),Q("span",VWe)):we("",!0)]))),128))])],2)}const k3e=wt(IWe,[["render",HWe]]),Od={mixins:[wd],methods:{ajaxErrorCallback(e={}){var n,i;if("status"in e&&e.status==0)return;let t;(n=e==null?void 0:e.responseJSON)!=null&&n.errorMessage||(i=e==null?void 0:e.responseJSON)!=null&&i.error?t=e.responseJSON.errorMessage||e.responseJSON.error:t=this.t("common.unknownError"),this.openDialog({name:"ajaxError",title:this.t("common.error"),message:t,actions:[{label:this.t("common.ok"),callback:a=>a()}],modalStyle:"negative"})}}};var Tte,x3e;function UWe(){if(x3e)return Tte;x3e=1;function e(t,n,i){var a,l,f,d,h;n==null&&(n=100);function b(){var k=Date.now()-d;k<n&&k>=0?a=setTimeout(b,n-k):(a=null,i||(h=t.apply(f,l),f=l=null))}var S=function(){f=this,l=arguments,d=Date.now();var k=i&&!a;return a||(a=setTimeout(b,n)),k&&(h=t.apply(f,l),f=l=null),h};return S.clear=function(){a&&(clearTimeout(a),a=null)},S.flush=function(){a&&(h=t.apply(f,l),f=l=null,clearTimeout(a),a=null)},S}return e.debounce=e,Tte=e,Tte}var zWe=UWe();const Uh=Uw(zWe),WWe={name:"FieldBaseAutosuggest",components:{FormFieldLabel:i0,Tooltip:Tc,HelpButton:Id,FieldError:Gd,MultilingualProgress:a0,Autosuggest:Vye},extends:Lm,mixins:[Od],props:{apiUrl:{type:String,default(){return""}},deselectLabel:{type:String,required:!0},isDisabled:{type:Boolean,default(){return!1}},isLabelInline:{type:Boolean,default(){return!1}},getParams:{type:Object,default(){return{}}},selected:{type:[Array,Object],default(e){return e.isMultilingual?{}:[]}},selectedLabel:{type:String,required:!0},isMultiple:{type:Boolean,default:()=>!0},allowCustom:{type:Boolean,default:()=>!1}},data(){return{inputValue:"",inputFocused:!1,suggestions:[]}},computed:{autosuggestId(){return this.compileId("autosuggest")},currentSelected(){return this.isMultilingual?this.selected[this.localeKey]:this.selected},describedBySelectedId(){return this.compileId("selected")},describedByIds(){return this.describedBySelectedId+" "+Lm.computed.describedByIds.apply(this)},isRTL(){var e=document.body.getAttribute("dir");return e==="rtl"},autoSuggestProps(){return{id:this.autosuggestId,suggestions:this.suggestions,selectedLabel:this.selectedLabel,currentSelected:this.currentSelected,isDisabled:this.isDisabled,inputId:this.controlId,describedBy:this.describedByIds,allowCustom:this.allowCustom}}},watch:{inputValue(e,t){e!==t&&this.getSuggestions()}},mounted(){if(this.isMultilingual&&this.isLabelInline)throw new Error("An inline label can not be used with a multilingual autosuggest field. This error encountered in the field "+this.name)},methods:{deselect(e){let t=[...this.currentSelected];t.splice(t.findIndex(n=>n.value===e.value),1),this.setSelected(t)},setFocusToInput(){this.isDisabled||this.$refs.inputRef.handleFocus(!0)},changeFocus(e){this.inputFocused=e},getSuggestions:Uh(function(){if(!this.inputValue){this.suggestions=[];return}var e=this;$.ajax({url:this.apiUrl,type:"GET",data:{...this.getParams,searchPhrase:this.inputValue},error(t){e.ajaxErrorCallback(t)},success(t){e.setSuggestions(t.items)}})},250),select(e){if(!e){if(!this.inputValue||!this.suggestions.length)return;e=this.suggestions[0]}this.setSelected([...this.currentSelected,e]),this.inputValue=""},selectSuggestion(e){this.select(e||null)},setSelected(e){this.$emit("change",this.name,"selected",e,this.localeKey),this.$emit("change",this.name,"value",e.map(t=>t.value),this.localeKey)},setSuggestions(e){throw new Error("The setSuggestions method must be implemented in any component that extends FieldBaseAutosuggest.")}}},jWe={key:0,ref:"heading",class:"pkpFormField__heading"},ZWe=["id"],qWe=["id"],GWe={class:"pkpFormField__control pkpAutosuggest__control"},KWe=["id"],YWe={key:0,ref:"heading",class:"pkpFormField__heading"},XWe=["id"],JWe={class:"pkpAutosuggest__endslot"};function QWe(e,t,n,i,a,l){const f=Xe("FormFieldLabel"),d=Xe("Tooltip"),h=Xe("HelpButton"),b=Xe("Autosuggest"),S=Xe("MultilingualProgress"),k=Xe("FieldError"),T=Hr("strip-unsafe-html");return L(),Q("div",{class:Rn(["pkpFormField pkpAutosuggest",{"pkpAutosuggest--disabled":n.isDisabled,"pkpAutosuggest--rtl":l.isRTL}])},[n.isLabelInline?we("",!0):(L(),Q("div",jWe,[pe(f,{"control-id":e.controlId,label:e.label,"locale-label":e.localeLabel,"is-required":e.isRequired,"required-label":e.t("common.required"),"multilingual-label":e.multilingualLabel,class:"align-middle"},null,8,["control-id","label","locale-label","is-required","required-label","multilingual-label"]),t[2]||(t[2]=D()),e.tooltip?(L(),Ee(d,{key:0,"aria-hidden":"true",tooltip:e.tooltip,label:""},null,8,["tooltip"])):we("",!0),t[3]||(t[3]=D()),e.tooltip?Gn((L(),Q("span",{key:1,id:e.describedByTooltipId,class:"-screenReader"},null,8,ZWe)),[[T,e.tooltip]]):we("",!0),t[4]||(t[4]=D()),e.helpTopic?(L(),Ee(h,{key:2,id:e.describedByHelpId,topic:e.helpTopic,section:e.helpSection,label:e.t("help.help")},null,8,["id","topic","section","label"])):we("",!0)],512)),t[13]||(t[13]=D()),e.isPrimaryLocale&&e.description?Gn((L(),Q("div",{key:1,id:e.describedByDescriptionId,class:"pkpFormField__description semantic-defaults"},null,8,qWe)),[[T,e.description]]):we("",!0),t[14]||(t[14]=D()),H("div",GWe,[H("div",{id:l.describedBySelectedId,ref:"values",class:Rn(["pkpAutosuggest__inputWrapper pkpFormField__input",{"pkpAutosuggest__inputWrapper--multilingual":e.isMultilingual&&e.locales.length>1,"pkpAutosuggest__inputWrapper--focus":a.inputFocused}]),onClick:t[1]||(t[1]=(...O)=>l.setFocusToInput&&l.setFocusToInput(...O))},[n.isLabelInline?(L(),Q("div",YWe,[pe(f,{"control-id":e.controlId,label:e.label,"locale-label":e.localeLabel,"is-required":e.isRequired,"required-label":e.t("common.required"),"multilingual-label":e.multilingualLabel},null,8,["control-id","label","locale-label","is-required","required-label","multilingual-label"]),t[5]||(t[5]=D()),e.tooltip?(L(),Ee(d,{key:0,"aria-hidden":"true",tooltip:e.tooltip,label:""},null,8,["tooltip"])):we("",!0),t[6]||(t[6]=D()),e.tooltip?Gn((L(),Q("span",{key:1,id:e.describedByTooltipId,class:"-screenReader"},null,8,XWe)),[[T,e.tooltip]]):we("",!0),t[7]||(t[7]=D()),e.helpTopic?(L(),Ee(h,{key:2,id:e.describedByHelpId,topic:e.helpTopic,section:e.helpSection,label:e.t("help.help")},null,8,["id","topic","section","label"])):we("",!0)],512)):we("",!0),t[9]||(t[9]=D()),pe(b,Cn(l.autoSuggestProps,{ref:"inputRef","input-value":a.inputValue,"onUpdate:inputValue":t[0]||(t[0]=O=>a.inputValue=O),onSelectSuggestion:l.selectSuggestion,onDeselect:l.deselect,onFocusChanged:l.changeFocus}),If({_:2},[e.$slots["input-slot"]?{name:"input-slot",fn:te(()=>[is(e.$slots,"input-slot")]),key:"0"}:void 0,e.$slots.option?{name:"option",fn:te(({suggestion:O})=>[is(e.$slots,"option",{suggestion:O})]),key:"1"}:void 0]),1040,["input-value","onSelectSuggestion","onDeselect","onFocusChanged"]),t[10]||(t[10]=D()),H("span",JWe,[is(e.$slots,"end")])],10,KWe),t[11]||(t[11]=D()),e.isMultilingual&&e.locales.length>1?(L(),Ee(S,{key:0,id:e.multilingualProgressId,count:e.multilingualFieldsCompleted,total:e.locales.length},null,8,["id","count","total"])):we("",!0),t[12]||(t[12]=D()),e.errors&&e.errors.length?(L(),Ee(k,{key:1,id:e.describedByErrorId,messages:e.errors},null,8,["id","messages"])):we("",!0)])],2)}const lC=wt(WWe,[["render",QWe]]),bH={name:"FieldAutosuggestPreset",extends:lC,props:{options:{type:Array,required:!0}},watch:{value(e,t){if(!e||e===t||JSON.stringify(e)===JSON.stringify(t))return;const n=this.isMultilingual?e[this.localeKey]:e;this.setSelected(this.options.filter(i=>n.includes(i.value)))}},methods:{getSuggestions(){if(!this.inputValue||!this.options.length){this.suggestions=[];return}const e=new RegExp(this.inputValue.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"gi");this.suggestions=this.options.filter(t=>this.currentValue.includes(t.value)?!1:(typeof t.value=="string"?t.value.match(e):t.value==this.inputValue)||t.label.match(e))}}};var Ite={exports:{}};const eje=LIe(o0e);var T3e;function tje(){return T3e||(T3e=1,function(e){(function(){var t={9662:function(l,f,d){var h=d(7854),b=d(614),S=d(6330),k=h.TypeError;l.exports=function(T){if(b(T))return T;throw k(S(T)+" is not a function")}},6077:function(l,f,d){var h=d(7854),b=d(614),S=h.String,k=h.TypeError;l.exports=function(T){if(typeof T=="object"||b(T))return T;throw k("Can't set "+S(T)+" as a prototype")}},9670:function(l,f,d){var h=d(7854),b=d(111),S=h.String,k=h.TypeError;l.exports=function(T){if(b(T))return T;throw k(S(T)+" is not an object")}},1318:function(l,f,d){var h=d(5656),b=d(1400),S=d(6244),k=function(T){return function(O,P,B){var W=h(O),Z=S(W),Y=b(B,Z),z;if(T&&P!=P){for(;Z>Y;)if(z=W[Y++],z!=z)return!0}else for(;Z>Y;Y++)if((T||Y in W)&&W[Y]===P)return T||Y||0;return!T&&-1}};l.exports={includes:k(!0),indexOf:k(!1)}},4326:function(l,f,d){var h=d(1702),b=h({}.toString),S=h("".slice);l.exports=function(k){return S(b(k),8,-1)}},648:function(l,f,d){var h=d(7854),b=d(1694),S=d(614),k=d(4326),T=d(5112),O=T("toStringTag"),P=h.Object,B=k(function(){return arguments}())=="Arguments",W=function(Z,Y){try{return Z[Y]}catch{}};l.exports=b?k:function(Z){var Y,z,q;return Z===void 0?"Undefined":Z===null?"Null":typeof(z=W(Y=P(Z),O))=="string"?z:B?k(Y):(q=k(Y))=="Object"&&S(Y.callee)?"Arguments":q}},7741:function(l,f,d){var h=d(1702),b=h("".replace),S=function(O){return String(Error(O).stack)}("zxcasd"),k=/\n\s*at [^:]*:[^\n]*/,T=k.test(S);l.exports=function(O,P){if(T&&typeof O=="string")for(;P--;)O=b(O,k,"");return O}},9920:function(l,f,d){var h=d(2597),b=d(3887),S=d(1236),k=d(3070);l.exports=function(T,O,P){for(var B=b(O),W=k.f,Z=S.f,Y=0;Y<B.length;Y++){var z=B[Y];!h(T,z)&&!(P&&h(P,z))&&W(T,z,Z(O,z))}}},8880:function(l,f,d){var h=d(9781),b=d(3070),S=d(9114);l.exports=h?function(k,T,O){return b.f(k,T,S(1,O))}:function(k,T,O){return k[T]=O,k}},9114:function(l){l.exports=function(f,d){return{enumerable:!(f&1),configurable:!(f&2),writable:!(f&4),value:d}}},9781:function(l,f,d){var h=d(7293);l.exports=!h(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},317:function(l,f,d){var h=d(7854),b=d(111),S=h.document,k=b(S)&&b(S.createElement);l.exports=function(T){return k?S.createElement(T):{}}},8113:function(l,f,d){var h=d(5005);l.exports=h("navigator","userAgent")||""},7392:function(l,f,d){var h=d(7854),b=d(8113),S=h.process,k=h.Deno,T=S&&S.versions||k&&k.version,O=T&&T.v8,P,B;O&&(P=O.split("."),B=P[0]>0&&P[0]<4?1:+(P[0]+P[1])),!B&&b&&(P=b.match(/Edge\/(\d+)/),(!P||P[1]>=74)&&(P=b.match(/Chrome\/(\d+)/),P&&(B=+P[1]))),l.exports=B},748:function(l){l.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2914:function(l,f,d){var h=d(7293),b=d(9114);l.exports=!h(function(){var S=Error("a");return"stack"in S?(Object.defineProperty(S,"stack",b(1,7)),S.stack!==7):!0})},2109:function(l,f,d){var h=d(7854),b=d(1236).f,S=d(8880),k=d(1320),T=d(3505),O=d(9920),P=d(4705);l.exports=function(B,W){var Z=B.target,Y=B.global,z=B.stat,q,ne,ue,J,ce,ge;if(Y?ne=h:z?ne=h[Z]||T(Z,{}):ne=(h[Z]||{}).prototype,ne)for(ue in W){if(ce=W[ue],B.noTargetGet?(ge=b(ne,ue),J=ge&&ge.value):J=ne[ue],q=P(Y?ue:Z+(z?".":"#")+ue,B.forced),!q&&J!==void 0){if(typeof ce==typeof J)continue;O(ce,J)}(B.sham||J&&J.sham)&&S(ce,"sham",!0),k(ne,ue,ce,B)}}},7293:function(l){l.exports=function(f){try{return!!f()}catch{return!0}}},2104:function(l,f,d){var h=d(4374),b=Function.prototype,S=b.apply,k=b.call;l.exports=typeof Reflect=="object"&&Reflect.apply||(h?k.bind(S):function(){return k.apply(S,arguments)})},4374:function(l,f,d){var h=d(7293);l.exports=!h(function(){var b=(function(){}).bind();return typeof b!="function"||b.hasOwnProperty("prototype")})},6916:function(l,f,d){var h=d(4374),b=Function.prototype.call;l.exports=h?b.bind(b):function(){return b.apply(b,arguments)}},6530:function(l,f,d){var h=d(9781),b=d(2597),S=Function.prototype,k=h&&Object.getOwnPropertyDescriptor,T=b(S,"name"),O=T&&(function(){}).name==="something",P=T&&(!h||h&&k(S,"name").configurable);l.exports={EXISTS:T,PROPER:O,CONFIGURABLE:P}},1702:function(l,f,d){var h=d(4374),b=Function.prototype,S=b.bind,k=b.call,T=h&&S.bind(k,k);l.exports=h?function(O){return O&&T(O)}:function(O){return O&&function(){return k.apply(O,arguments)}}},5005:function(l,f,d){var h=d(7854),b=d(614),S=function(k){return b(k)?k:void 0};l.exports=function(k,T){return arguments.length<2?S(h[k]):h[k]&&h[k][T]}},8173:function(l,f,d){var h=d(9662);l.exports=function(b,S){var k=b[S];return k==null?void 0:h(k)}},7854:function(l,f,d){var h=function(b){return b&&b.Math==Math&&b};l.exports=h(typeof globalThis=="object"&&globalThis)||h(typeof window=="object"&&window)||h(typeof self=="object"&&self)||h(typeof d.g=="object"&&d.g)||function(){return this}()||Function("return this")()},2597:function(l,f,d){var h=d(1702),b=d(7908),S=h({}.hasOwnProperty);l.exports=Object.hasOwn||function(T,O){return S(b(T),O)}},3501:function(l){l.exports={}},4664:function(l,f,d){var h=d(9781),b=d(7293),S=d(317);l.exports=!h&&!b(function(){return Object.defineProperty(S("div"),"a",{get:function(){return 7}}).a!=7})},8361:function(l,f,d){var h=d(7854),b=d(1702),S=d(7293),k=d(4326),T=h.Object,O=b("".split);l.exports=S(function(){return!T("z").propertyIsEnumerable(0)})?function(P){return k(P)=="String"?O(P,""):T(P)}:T},9587:function(l,f,d){var h=d(614),b=d(111),S=d(7674);l.exports=function(k,T,O){var P,B;return S&&h(P=T.constructor)&&P!==O&&b(B=P.prototype)&&B!==O.prototype&&S(k,B),k}},2788:function(l,f,d){var h=d(1702),b=d(614),S=d(5465),k=h(Function.toString);b(S.inspectSource)||(S.inspectSource=function(T){return k(T)}),l.exports=S.inspectSource},8340:function(l,f,d){var h=d(111),b=d(8880);l.exports=function(S,k){h(k)&&"cause"in k&&b(S,"cause",k.cause)}},9909:function(l,f,d){var h=d(8536),b=d(7854),S=d(1702),k=d(111),T=d(8880),O=d(2597),P=d(5465),B=d(6200),W=d(3501),Z="Object already initialized",Y=b.TypeError,z=b.WeakMap,q,ne,ue,J=function($e){return ue($e)?ne($e):q($e,{})},ce=function($e){return function(Ue){var V;if(!k(Ue)||(V=ne(Ue)).type!==$e)throw Y("Incompatible receiver, "+$e+" required");return V}};if(h||P.state){var ge=P.state||(P.state=new z),de=S(ge.get),he=S(ge.has),ie=S(ge.set);q=function($e,Ue){if(he(ge,$e))throw new Y(Z);return Ue.facade=$e,ie(ge,$e,Ue),Ue},ne=function($e){return de(ge,$e)||{}},ue=function($e){return he(ge,$e)}}else{var Be=B("state");W[Be]=!0,q=function($e,Ue){if(O($e,Be))throw new Y(Z);return Ue.facade=$e,T($e,Be,Ue),Ue},ne=function($e){return O($e,Be)?$e[Be]:{}},ue=function($e){return O($e,Be)}}l.exports={set:q,get:ne,has:ue,enforce:J,getterFor:ce}},614:function(l){l.exports=function(f){return typeof f=="function"}},4705:function(l,f,d){var h=d(7293),b=d(614),S=/#|\.prototype\./,k=function(W,Z){var Y=O[T(W)];return Y==B?!0:Y==P?!1:b(Z)?h(Z):!!Z},T=k.normalize=function(W){return String(W).replace(S,".").toLowerCase()},O=k.data={},P=k.NATIVE="N",B=k.POLYFILL="P";l.exports=k},111:function(l,f,d){var h=d(614);l.exports=function(b){return typeof b=="object"?b!==null:h(b)}},1913:function(l){l.exports=!1},2190:function(l,f,d){var h=d(7854),b=d(5005),S=d(614),k=d(7976),T=d(3307),O=h.Object;l.exports=T?function(P){return typeof P=="symbol"}:function(P){var B=b("Symbol");return S(B)&&k(B.prototype,O(P))}},6244:function(l,f,d){var h=d(7466);l.exports=function(b){return h(b.length)}},133:function(l,f,d){var h=d(7392),b=d(7293);l.exports=!!Object.getOwnPropertySymbols&&!b(function(){var S=Symbol();return!String(S)||!(Object(S)instanceof Symbol)||!Symbol.sham&&h&&h<41})},8536:function(l,f,d){var h=d(7854),b=d(614),S=d(2788),k=h.WeakMap;l.exports=b(k)&&/native code/.test(S(k))},6277:function(l,f,d){var h=d(1340);l.exports=function(b,S){return b===void 0?arguments.length<2?"":S:h(b)}},3070:function(l,f,d){var h=d(7854),b=d(9781),S=d(4664),k=d(3353),T=d(9670),O=d(4948),P=h.TypeError,B=Object.defineProperty,W=Object.getOwnPropertyDescriptor,Z="enumerable",Y="configurable",z="writable";f.f=b?k?function(ne,ue,J){if(T(ne),ue=O(ue),T(J),typeof ne=="function"&&ue==="prototype"&&"value"in J&&z in J&&!J[z]){var ce=W(ne,ue);ce&&ce[z]&&(ne[ue]=J.value,J={configurable:Y in J?J[Y]:ce[Y],enumerable:Z in J?J[Z]:ce[Z],writable:!1})}return B(ne,ue,J)}:B:function(ne,ue,J){if(T(ne),ue=O(ue),T(J),S)try{return B(ne,ue,J)}catch{}if("get"in J||"set"in J)throw P("Accessors not supported");return"value"in J&&(ne[ue]=J.value),ne}},1236:function(l,f,d){var h=d(9781),b=d(6916),S=d(5296),k=d(9114),T=d(5656),O=d(4948),P=d(2597),B=d(4664),W=Object.getOwnPropertyDescriptor;f.f=h?W:function(Y,z){if(Y=T(Y),z=O(z),B)try{return W(Y,z)}catch{}if(P(Y,z))return k(!b(S.f,Y,z),Y[z])}},8006:function(l,f,d){var h=d(6324),b=d(748),S=b.concat("length","prototype");f.f=Object.getOwnPropertyNames||function(T){return h(T,S)}},5181:function(l,f){f.f=Object.getOwnPropertySymbols},7976:function(l,f,d){var h=d(1702);l.exports=h({}.isPrototypeOf)},6324:function(l,f,d){var h=d(1702),b=d(2597),S=d(5656),k=d(1318).indexOf,T=d(3501),O=h([].push);l.exports=function(P,B){var W=S(P),Z=0,Y=[],z;for(z in W)!b(T,z)&&b(W,z)&&O(Y,z);for(;B.length>Z;)b(W,z=B[Z++])&&(~k(Y,z)||O(Y,z));return Y}},5296:function(l,f){var d={}.propertyIsEnumerable,h=Object.getOwnPropertyDescriptor,b=h&&!d.call({1:2},1);f.f=b?function(k){var T=h(this,k);return!!T&&T.enumerable}:d},7674:function(l,f,d){var h=d(1702),b=d(9670),S=d(6077);l.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var k=!1,T={},O;try{O=h(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),O(T,[]),k=T instanceof Array}catch{}return function(B,W){return b(B),S(W),k?O(B,W):B.__proto__=W,B}}():void 0)},2140:function(l,f,d){var h=d(7854),b=d(6916),S=d(614),k=d(111),T=h.TypeError;l.exports=function(O,P){var B,W;if(P==="string"&&S(B=O.toString)&&!k(W=b(B,O))||S(B=O.valueOf)&&!k(W=b(B,O))||P!=="string"&&S(B=O.toString)&&!k(W=b(B,O)))return W;throw T("Can't convert object to primitive value")}},3887:function(l,f,d){var h=d(5005),b=d(1702),S=d(8006),k=d(5181),T=d(9670),O=b([].concat);l.exports=h("Reflect","ownKeys")||function(B){var W=S.f(T(B)),Z=k.f;return Z?O(W,Z(B)):W}},1320:function(l,f,d){var h=d(7854),b=d(614),S=d(2597),k=d(8880),T=d(3505),O=d(2788),P=d(9909),B=d(6530).CONFIGURABLE,W=P.get,Z=P.enforce,Y=String(String).split("String");(l.exports=function(z,q,ne,ue){var J=ue?!!ue.unsafe:!1,ce=ue?!!ue.enumerable:!1,ge=ue?!!ue.noTargetGet:!1,de=ue&&ue.name!==void 0?ue.name:q,he;if(b(ne)&&(String(de).slice(0,7)==="Symbol("&&(de="["+String(de).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!S(ne,"name")||B&&ne.name!==de)&&k(ne,"name",de),he=Z(ne),he.source||(he.source=Y.join(typeof de=="string"?de:""))),z===h){ce?z[q]=ne:T(q,ne);return}else J?!ge&&z[q]&&(ce=!0):delete z[q];ce?z[q]=ne:k(z,q,ne)})(Function.prototype,"toString",function(){return b(this)&&W(this).source||O(this)})},4488:function(l,f,d){var h=d(7854),b=h.TypeError;l.exports=function(S){if(S==null)throw b("Can't call method on "+S);return S}},3505:function(l,f,d){var h=d(7854),b=Object.defineProperty;l.exports=function(S,k){try{b(h,S,{value:k,configurable:!0,writable:!0})}catch{h[S]=k}return k}},6200:function(l,f,d){var h=d(2309),b=d(9711),S=h("keys");l.exports=function(k){return S[k]||(S[k]=b(k))}},5465:function(l,f,d){var h=d(7854),b=d(3505),S="__core-js_shared__",k=h[S]||b(S,{});l.exports=k},2309:function(l,f,d){var h=d(1913),b=d(5465);(l.exports=function(S,k){return b[S]||(b[S]=k!==void 0?k:{})})("versions",[]).push({version:"3.21.1",mode:h?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE",source:"https://github.com/zloirock/core-js"})},1400:function(l,f,d){var h=d(9303),b=Math.max,S=Math.min;l.exports=function(k,T){var O=h(k);return O<0?b(O+T,0):S(O,T)}},5656:function(l,f,d){var h=d(8361),b=d(4488);l.exports=function(S){return h(b(S))}},9303:function(l){var f=Math.ceil,d=Math.floor;l.exports=function(h){var b=+h;return b!==b||b===0?0:(b>0?d:f)(b)}},7466:function(l,f,d){var h=d(9303),b=Math.min;l.exports=function(S){return S>0?b(h(S),9007199254740991):0}},7908:function(l,f,d){var h=d(7854),b=d(4488),S=h.Object;l.exports=function(k){return S(b(k))}},7593:function(l,f,d){var h=d(7854),b=d(6916),S=d(111),k=d(2190),T=d(8173),O=d(2140),P=d(5112),B=h.TypeError,W=P("toPrimitive");l.exports=function(Z,Y){if(!S(Z)||k(Z))return Z;var z=T(Z,W),q;if(z){if(Y===void 0&&(Y="default"),q=b(z,Z,Y),!S(q)||k(q))return q;throw B("Can't convert object to primitive value")}return Y===void 0&&(Y="number"),O(Z,Y)}},4948:function(l,f,d){var h=d(7593),b=d(2190);l.exports=function(S){var k=h(S,"string");return b(k)?k:k+""}},1694:function(l,f,d){var h=d(5112),b=h("toStringTag"),S={};S[b]="z",l.exports=String(S)==="[object z]"},1340:function(l,f,d){var h=d(7854),b=d(648),S=h.String;l.exports=function(k){if(b(k)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return S(k)}},6330:function(l,f,d){var h=d(7854),b=h.String;l.exports=function(S){try{return b(S)}catch{return"Object"}}},9711:function(l,f,d){var h=d(1702),b=0,S=Math.random(),k=h(1 .toString);l.exports=function(T){return"Symbol("+(T===void 0?"":T)+")_"+k(++b+S,36)}},3307:function(l,f,d){var h=d(133);l.exports=h&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},3353:function(l,f,d){var h=d(9781),b=d(7293);l.exports=h&&b(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})},5112:function(l,f,d){var h=d(7854),b=d(2309),S=d(2597),k=d(9711),T=d(133),O=d(3307),P=b("wks"),B=h.Symbol,W=B&&B.for,Z=O?B:B&&B.withoutSetter||k;l.exports=function(Y){if(!S(P,Y)||!(T||typeof P[Y]=="string")){var z="Symbol."+Y;T&&S(B,Y)?P[Y]=B[Y]:O&&W?P[Y]=W(z):P[Y]=Z(z)}return P[Y]}},9191:function(l,f,d){var h=d(5005),b=d(2597),S=d(8880),k=d(7976),T=d(7674),O=d(9920),P=d(9587),B=d(6277),W=d(8340),Z=d(7741),Y=d(2914),z=d(1913);l.exports=function(q,ne,ue,J){var ce=J?2:1,ge=q.split("."),de=ge[ge.length-1],he=h.apply(null,ge);if(he){var ie=he.prototype;if(!z&&b(ie,"cause")&&delete ie.cause,!ue)return he;var Be=h("Error"),$e=ne(function(Ue,V){var Ye=B(J?V:Ue,void 0),Fe=J?new he(Ue):new he;return Ye!==void 0&&S(Fe,"message",Ye),Y&&S(Fe,"stack",Z(Fe.stack,2)),this&&k(ie,this)&&P(Fe,this,$e),arguments.length>ce&&W(Fe,arguments[ce]),Fe});if($e.prototype=ie,de!=="Error"&&(T?T($e,Be):O($e,Be,{name:!0})),O($e,he),!z)try{ie.name!==de&&S(ie,"name",de),ie.constructor=$e}catch{}return $e}}},1703:function(l,f,d){var h=d(2109),b=d(7854),S=d(2104),k=d(9191),T="WebAssembly",O=b[T],P=Error("e",{cause:7}).cause!==7,B=function(Z,Y){var z={};z[Z]=k(Z,Y,P),h({global:!0,forced:P},z)},W=function(Z,Y){if(O&&O[Z]){var z={};z[Z]=k(T+"."+Z,Y,P),h({target:T,stat:!0,forced:P},z)}};B("Error",function(Z){return function(z){return S(Z,this,arguments)}}),B("EvalError",function(Z){return function(z){return S(Z,this,arguments)}}),B("RangeError",function(Z){return function(z){return S(Z,this,arguments)}}),B("ReferenceError",function(Z){return function(z){return S(Z,this,arguments)}}),B("SyntaxError",function(Z){return function(z){return S(Z,this,arguments)}}),B("TypeError",function(Z){return function(z){return S(Z,this,arguments)}}),B("URIError",function(Z){return function(z){return S(Z,this,arguments)}}),W("CompileError",function(Z){return function(z){return S(Z,this,arguments)}}),W("LinkError",function(Z){return function(z){return S(Z,this,arguments)}}),W("RuntimeError",function(Z){return function(z){return S(Z,this,arguments)}})},6095:function(l,f,d){d.r(f);var h=d(8081),b=d.n(h),S=d(3645),k=d.n(S),T=k()(b());T.push([l.id,".vc-chrome{background:#fff;border-radius:2px;box-shadow:0 0 2px rgba(0,0,0,.3),0 4px 8px rgba(0,0,0,.3);box-sizing:initial;width:225px;font-family:Menlo;background-color:#fff}.vc-chrome-controls{display:flex}.vc-chrome-color-wrap{position:relative;width:36px}.vc-chrome-active-color{position:relative;width:30px;height:30px;border-radius:15px;overflow:hidden;z-index:1}.vc-chrome-color-wrap .vc-checkerboard{width:30px;height:30px;border-radius:15px;background-size:auto}.vc-chrome-sliders{flex:1}.vc-chrome-fields-wrap{display:flex;padding-top:16px}.vc-chrome-fields{display:flex;margin-left:-6px;flex:1}.vc-chrome-field{padding-left:6px;width:100%}.vc-chrome-toggle-btn{width:32px;text-align:right;position:relative}.vc-chrome-toggle-icon{margin-right:-4px;margin-top:12px;cursor:pointer;position:relative;z-index:2}.vc-chrome-toggle-icon-highlight{position:absolute;width:24px;height:28px;background:#eee;border-radius:4px;top:10px;left:12px}.vc-chrome-hue-wrap{margin-bottom:8px}.vc-chrome-alpha-wrap,.vc-chrome-hue-wrap{position:relative;height:10px}.vc-chrome-alpha-wrap .vc-alpha-gradient,.vc-chrome-hue-wrap .vc-hue{border-radius:2px}.vc-chrome-alpha-wrap .vc-alpha-picker,.vc-chrome-hue-wrap .vc-hue-picker{width:12px;height:12px;border-radius:6px;transform:translate(-6px,-2px);background-color:#f8f8f8;box-shadow:0 1px 4px 0 rgba(0,0,0,.37)}.vc-chrome-body{padding:16px 16px 12px;background-color:#fff}.vc-chrome-saturation-wrap{width:100%;padding-bottom:55%;position:relative;border-radius:2px 2px 0 0;overflow:hidden}.vc-chrome-saturation-wrap .vc-saturation-circle{width:12px;height:12px}.vc-chrome-fields .vc-input__input{font-size:11px;color:#333;width:100%;border-radius:2px;border:none;box-shadow:inset 0 0 0 1px #dadada;height:21px;text-align:center}.vc-chrome-fields .vc-input__label{text-transform:uppercase;font-size:11px;line-height:11px;color:#969696;text-align:center;display:block;margin-top:12px}.vc-chrome__disable-alpha .vc-chrome-active-color{width:18px;height:18px}.vc-chrome__disable-alpha .vc-chrome-color-wrap{width:30px}.vc-chrome__disable-alpha .vc-chrome-hue-wrap{margin-top:4px;margin-bottom:4px}",""]),f.default=T},6047:function(l,f,d){d.r(f);var h=d(8081),b=d.n(h),S=d(3645),k=d.n(S),T=k()(b());T.push([l.id,".vc-compact{padding-top:5px;padding-left:5px;width:245px;border-radius:2px;box-sizing:border-box;box-shadow:0 2px 10px rgba(0,0,0,.12),0 2px 5px rgba(0,0,0,.16);background-color:#fff}.vc-compact-colors{overflow:hidden;padding:0;margin:0}.vc-compact-color-item{list-style:none;width:15px;height:15px;float:left;margin-right:5px;margin-bottom:5px;position:relative;cursor:pointer}.vc-compact-color-item--white{box-shadow:inset 0 0 0 1px #ddd}.vc-compact-color-item--white .vc-compact-dot{background:#000}.vc-compact-dot{position:absolute;top:5px;right:5px;bottom:5px;left:5px;border-radius:50%;opacity:1;background:#fff}",""]),f.default=T},9481:function(l,f,d){d.r(f);var h=d(8081),b=d.n(h),S=d(3645),k=d.n(S),T=k()(b());T.push([l.id,".vc-grayscale{width:125px;border-radius:2px;box-shadow:0 2px 15px rgba(0,0,0,.12),0 2px 10px rgba(0,0,0,.16);background-color:#fff}.vc-grayscale-colors{border-radius:2px;overflow:hidden;padding:0;margin:0}.vc-grayscale-color-item{list-style:none;width:25px;height:25px;float:left;position:relative;cursor:pointer}.vc-grayscale-color-item--white .vc-grayscale-dot{background:#000}.vc-grayscale-dot{position:absolute;top:50%;left:50%;width:6px;height:6px;margin:-3px 0 0 -2px;border-radius:50%;opacity:1;background:#fff}",""]),f.default=T},5186:function(l,f,d){d.r(f);var h=d(8081),b=d.n(h),S=d(3645),k=d.n(S),T=k()(b());T.push([l.id,".vc-material{width:98px;height:98px;padding:16px;font-family:Roboto;position:relative;border-radius:2px;box-shadow:0 2px 10px rgba(0,0,0,.12),0 2px 5px rgba(0,0,0,.16);background-color:#fff}.vc-material .vc-input__input{width:100%;margin-top:12px;font-size:15px;color:#333;height:30px}.vc-material .vc-input__label{position:absolute;top:0;left:0;font-size:11px;color:#999;text-transform:capitalize}.vc-material-hex{border-bottom-width:2px;border-bottom-style:solid}.vc-material-split{display:flex;margin-right:-10px;padding-top:11px}.vc-material-third{flex:1;padding-right:10px}",""]),f.default=T},3695:function(l,f,d){d.r(f);var h=d(8081),b=d.n(h),S=d(3645),k=d.n(S),T=k()(b());T.push([l.id,'.vc-photoshop{background:#dcdcdc;border-radius:4px;box-shadow:0 0 0 1px rgba(0,0,0,.25),0 8px 16px rgba(0,0,0,.15);box-sizing:initial;width:513px;font-family:Roboto}.vc-photoshop__disable-fields{width:390px}.vc-ps-head{background-image:linear-gradient(-180deg,#f0f0f0,#d4d4d4);border-bottom:1px solid #b1b1b1;box-shadow:inset 0 1px 0 0 hsla(0,0%,100%,.2),inset 0 -1px 0 0 rgba(0,0,0,.02);height:23px;line-height:24px;border-radius:4px 4px 0 0;font-size:13px;color:#4d4d4d;text-align:center}.vc-ps-body{padding:15px;display:flex}.vc-ps-saturation-wrap{width:256px;height:256px;position:relative;border:2px solid #b3b3b3;border-bottom:2px solid #f0f0f0;overflow:hidden}.vc-ps-saturation-wrap .vc-saturation-circle{width:12px;height:12px}.vc-ps-hue-wrap{height:256px;width:19px;margin-left:10px;border:2px solid #b3b3b3;border-bottom:2px solid #f0f0f0}.vc-ps-hue-pointer,.vc-ps-hue-wrap{position:relative}.vc-ps-hue-pointer--left,.vc-ps-hue-pointer--right{position:absolute;width:0;height:0;border-style:solid;border-width:5px 0 5px 8px;border-color:transparent transparent transparent #555}.vc-ps-hue-pointer--left:after,.vc-ps-hue-pointer--right:after{content:"";width:0;height:0;border-style:solid;border-width:4px 0 4px 6px;border-color:transparent transparent transparent #fff;position:absolute;top:1px;left:1px;transform:translate(-8px,-5px)}.vc-ps-hue-pointer--left{transform:translate(-13px,-4px)}.vc-ps-hue-pointer--right{transform:translate(20px,-4px) rotate(180deg)}.vc-ps-controls{width:180px;margin-left:10px;display:flex}.vc-ps-controls__disable-fields{width:auto}.vc-ps-actions{margin-left:20px;flex:1}.vc-ps-ac-btn{cursor:pointer;background-image:linear-gradient(-180deg,#fff,#e6e6e6);border:1px solid #878787;border-radius:2px;height:20px;box-shadow:0 1px 0 0 #eaeaea;font-size:14px;color:#000;line-height:20px;text-align:center;margin-bottom:10px}.vc-ps-previews{width:60px}.vc-ps-previews__swatches{border:1px solid #b3b3b3;border-bottom:1px solid #f0f0f0;margin-bottom:2px;margin-top:1px}.vc-ps-previews__pr-color{height:34px;box-shadow:inset 1px 0 0 #000,inset -1px 0 0 #000,inset 0 1px 0 #000}.vc-ps-previews__label{font-size:14px;color:#000;text-align:center}.vc-ps-fields{padding-top:5px;padding-bottom:9px;width:80px;position:relative}.vc-ps-fields .vc-input__input{margin-left:40%;width:40%;height:18px;border:1px solid #888;box-shadow:inset 0 1px 1px rgba(0,0,0,.1),0 1px 0 0 #ececec;margin-bottom:5px;font-size:13px;padding-left:3px;margin-right:10px}.vc-ps-fields .vc-input__desc,.vc-ps-fields .vc-input__label{top:0;text-transform:uppercase;font-size:13px;height:18px;line-height:22px;position:absolute}.vc-ps-fields .vc-input__label{left:0;width:34px}.vc-ps-fields .vc-input__desc{right:0;width:0}.vc-ps-fields__divider{height:5px}.vc-ps-fields__hex .vc-input__input{margin-left:20%;width:80%;height:18px;border:1px solid #888;box-shadow:inset 0 1px 1px rgba(0,0,0,.1),0 1px 0 0 #ececec;margin-bottom:6px;font-size:13px;padding-left:3px}.vc-ps-fields__hex .vc-input__label{position:absolute;top:0;left:0;width:14px;text-transform:uppercase;font-size:13px;height:18px;line-height:22px}',""]),f.default=T},7279:function(l,f,d){d.r(f);var h=d(8081),b=d.n(h),S=d(3645),k=d.n(S),T=k()(b());T.push([l.id,".vc-sketch{position:relative;width:200px;padding:10px 10px 0;box-sizing:initial;background:#fff;border-radius:4px;box-shadow:0 0 0 1px rgba(0,0,0,.15),0 8px 16px rgba(0,0,0,.15)}.vc-sketch-saturation-wrap{width:100%;padding-bottom:75%;position:relative;overflow:hidden}.vc-sketch-controls{display:flex}.vc-sketch-sliders{padding:4px 0;flex:1}.vc-sketch-sliders .vc-alpha-gradient,.vc-sketch-sliders .vc-hue{border-radius:2px}.vc-sketch-alpha-wrap,.vc-sketch-hue-wrap{position:relative;height:10px}.vc-sketch-alpha-wrap{margin-top:4px;overflow:hidden}.vc-sketch-color-wrap{width:24px;height:24px;position:relative;margin-top:4px;margin-left:4px;border-radius:3px}.vc-sketch-active-color{position:absolute;top:0;left:0;right:0;bottom:0;border-radius:2px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.15),inset 0 0 4px rgba(0,0,0,.25);z-index:2}.vc-sketch-color-wrap .vc-checkerboard{background-size:auto}.vc-sketch-field{display:flex;padding-top:4px}.vc-sketch-field .vc-input__input{width:90%;padding:4px 0 3px 10%;border:none;box-shadow:inset 0 0 0 1px #ccc;font-size:10px}.vc-sketch-field .vc-input__label{display:block;text-align:center;font-size:11px;color:#222;padding-top:3px;padding-bottom:4px;text-transform:capitalize}.vc-sketch-field--single{flex:1;padding-left:6px}.vc-sketch-field--double{flex:2}.vc-sketch-presets{margin-right:-10px;margin-left:-10px;padding-left:10px;padding-top:10px;border-top:1px solid #eee}.vc-sketch-presets-color{overflow:hidden;position:relative;display:inline-block;margin:0 10px 10px 0;vertical-align:top;cursor:pointer;width:16px;height:16px}.vc-sketch-presets-color,.vc-sketch-presets-color .vc-checkerboard{border-radius:3px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.15)}.vc-sketch__disable-alpha .vc-sketch-color-wrap{height:10px}",""]),f.default=T},6278:function(l,f,d){d.r(f);var h=d(8081),b=d.n(h),S=d(3645),k=d.n(S),T=k()(b());T.push([l.id,".vc-slider{position:relative;width:410px}.vc-slider-hue-warp{height:12px;position:relative}.vc-slider-hue-warp .vc-hue-picker{width:14px;height:14px;border-radius:6px;transform:translate(-7px,-2px);background-color:#f8f8f8;box-shadow:0 1px 4px 0 rgba(0,0,0,.37)}.vc-slider-swatches{display:flex;margin-top:20px}.vc-slider-swatch{margin-right:1px;flex:1;width:20%}.vc-slider-swatch:first-child{margin-right:1px}.vc-slider-swatch:first-child .vc-slider-swatch-picker{border-radius:2px 0 0 2px}.vc-slider-swatch:last-child{margin-right:0}.vc-slider-swatch:last-child .vc-slider-swatch-picker{border-radius:0 2px 2px 0}.vc-slider-swatch-picker{cursor:pointer;height:12px}.vc-slider-swatch:nth-child(n) .vc-slider-swatch-picker.vc-slider-swatch-picker--active{transform:scaleY(1.8);border-radius:3.6px/2px}.vc-slider-swatch-picker--white{box-shadow:inset 0 0 0 1px #ddd}.vc-slider-swatch-picker--active.vc-slider-swatch-picker--white{box-shadow:inset 0 0 0 .6px #ddd}",""]),f.default=T},3468:function(l,f,d){d.r(f);var h=d(8081),b=d.n(h),S=d(3645),k=d.n(S),T=k()(b());T.push([l.id,".vc-swatches{width:320px;height:240px;overflow-y:scroll;background-color:#fff;box-shadow:0 2px 10px rgba(0,0,0,.12),0 2px 5px rgba(0,0,0,.16)}.vc-swatches-box{padding:16px 0 6px 16px;overflow:hidden}.vc-swatches-color-group{padding-bottom:10px;width:40px;float:left;margin-right:10px}.vc-swatches-color-it{box-sizing:border-box;width:40px;height:24px;cursor:pointer;background:#880e4f;margin-bottom:1px;overflow:hidden;border-radius:2px 2px 0 0}.vc-swatches-color--white{border:1px solid #ddd}.vc-swatches-pick{fill:#fff;margin-left:8px;display:block}.vc-swatches-color--white .vc-swatches-pick{fill:#333}",""]),f.default=T},5689:function(l,f,d){d.r(f);var h=d(8081),b=d.n(h),S=d(3645),k=d.n(S),T=k()(b());T.push([l.id,".vc-twitter{background:#fff;border:0 solid rgba(0,0,0,.25);box-shadow:0 1px 4px rgba(0,0,0,.25);border-radius:4px;position:relative}.vc-twitter-triangle{border-color:transparent transparent #fff transparent}.vc-twitter-triangle,.vc-twitter-triangle-shadow{width:0;height:0;border-style:solid;border-width:0 9px 10px 9px;position:absolute}.vc-twitter-triangle-shadow{border-color:transparent transparent rgba(0,0,0,.1) transparent}.vc-twitter-body{padding:15px 9px 9px 15px}.vc-twitter .vc-editable-input{position:relative}.vc-twitter .vc-editable-input input{width:100px;font-size:14px;color:#666;border:0;outline:none;height:28px;box-shadow:inset 0 0 0 1px #f0f0f0;box-sizing:content-box;border-radius:0 4px 4px 0;float:left;padding:1px;padding-left:8px}.vc-twitter .vc-editable-input span{display:none}.vc-twitter-hash{background:#f0f0f0;height:30px;width:30px;border-radius:4px 0 0 4px;float:left;color:#98a1a4;display:flex;align-items:center;justify-content:center}.vc-twitter-swatch{width:30px;height:30px;float:left;border-radius:4px;margin:0 6px 6px 0;cursor:pointer;position:relative;outline:none}.vc-twitter-clear{clear:both}.vc-twitter-hide-triangle .vc-twitter-triangle,.vc-twitter-hide-triangle .vc-twitter-triangle-shadow{display:none}.vc-twitter-top-left-triangle .vc-twitter-triangle{top:-10px;left:12px}.vc-twitter-top-left-triangle .vc-twitter-triangle-shadow{top:-11px;left:12px}.vc-twitter-top-right-triangle .vc-twitter-triangle{top:-10px;right:12px}.vc-twitter-top-right-triangle .vc-twitter-triangle-shadow{top:-11px;right:12px}",""]),f.default=T},2410:function(l,f,d){d.r(f);var h=d(8081),b=d.n(h),S=d(3645),k=d.n(S),T=k()(b());T.push([l.id,".vc-alpha,.vc-alpha-checkboard-wrap{position:absolute;top:0;right:0;bottom:0;left:0}.vc-alpha-checkboard-wrap{overflow:hidden}.vc-alpha-gradient{position:absolute;top:0;right:0;bottom:0;left:0}.vc-alpha-container{cursor:pointer;position:relative;z-index:2;height:100%;margin:0 3px}.vc-alpha-pointer{z-index:2;position:absolute}.vc-alpha-picker{cursor:pointer;width:4px;border-radius:1px;height:8px;box-shadow:0 0 2px rgba(0,0,0,.6);background:#fff;margin-top:1px;transform:translateX(-2px)}",""]),f.default=T},3142:function(l,f,d){d.r(f);var h=d(8081),b=d.n(h),S=d(3645),k=d.n(S),T=k()(b());T.push([l.id,".vc-checkerboard{position:absolute;top:0;right:0;bottom:0;left:0;background-size:contain}",""]),f.default=T},7953:function(l,f,d){d.r(f);var h=d(8081),b=d.n(h),S=d(3645),k=d.n(S),T=k()(b());T.push([l.id,".vc-editable-input{position:relative}.vc-input__input{padding:0;border:0;outline:none}.vc-input__label{text-transform:capitalize}",""]),f.default=T},3097:function(l,f,d){d.r(f);var h=d(8081),b=d.n(h),S=d(3645),k=d.n(S),T=k()(b());T.push([l.id,".vc-hue{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:2px}.vc-hue--horizontal{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.vc-hue--vertical{background:linear-gradient(0deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.vc-hue-container{cursor:pointer;margin:0 2px;position:relative;height:100%}.vc-hue-pointer{z-index:2;position:absolute}.vc-hue-picker{cursor:pointer;margin-top:1px;width:4px;border-radius:1px;height:8px;box-shadow:0 0 2px rgba(0,0,0,.6);background:#fff;transform:translateX(-2px)}",""]),f.default=T},4339:function(l,f,d){d.r(f);var h=d(8081),b=d.n(h),S=d(3645),k=d.n(S),T=k()(b());T.push([l.id,".vc-saturation,.vc-saturation--black,.vc-saturation--white{cursor:pointer;position:absolute;top:0;left:0;right:0;bottom:0}.vc-saturation--white{background:linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.vc-saturation--black{background:linear-gradient(0deg,#000,transparent)}.vc-saturation-pointer{cursor:pointer;position:absolute}.vc-saturation-circle{cursor:head;width:4px;height:4px;box-shadow:0 0 0 1.5px #fff,inset 0 0 1px 1px rgba(0,0,0,.3),0 0 1px 2px rgba(0,0,0,.4);border-radius:50%;transform:translate(-2px,-2px)}",""]),f.default=T},3645:function(l){l.exports=function(f){var d=[];return d.toString=function(){return this.map(function(b){var S="",k=typeof b[5]<"u";return b[4]&&(S+="@supports (".concat(b[4],") {")),b[2]&&(S+="@media ".concat(b[2]," {")),k&&(S+="@layer".concat(b[5].length>0?" ".concat(b[5]):""," {")),S+=f(b),k&&(S+="}"),b[2]&&(S+="}"),b[4]&&(S+="}"),S}).join("")},d.i=function(b,S,k,T,O){typeof b=="string"&&(b=[[null,b,void 0]]);var P={};if(k)for(var B=0;B<this.length;B++){var W=this[B][0];W!=null&&(P[W]=!0)}for(var Z=0;Z<b.length;Z++){var Y=[].concat(b[Z]);k&&P[Y[0]]||(typeof O<"u"&&(typeof Y[5]>"u"||(Y[1]="@layer".concat(Y[5].length>0?" ".concat(Y[5]):""," {").concat(Y[1],"}")),Y[5]=O),S&&(Y[2]&&(Y[1]="@media ".concat(Y[2]," {").concat(Y[1],"}")),Y[2]=S),T&&(Y[4]?(Y[1]="@supports (".concat(Y[4],") {").concat(Y[1],"}"),Y[4]=T):Y[4]="".concat(T)),d.push(Y))}},d}},8081:function(l){l.exports=function(f){return f[1]}},9428:function(l){l.exports=f;function f(d,h,b){return h<b?d<h?h:d>b?b:d:d<b?b:d>h?h:d}},9016:function(l,f,d){var h=d(9159),b=h.Symbol;l.exports=b},6423:function(l,f,d){var h=d(9016),b=d(2366),S=d(2886),k="[object Null]",T="[object Undefined]",O=h?h.toStringTag:void 0;function P(B){return B==null?B===void 0?T:k:O&&O in Object(B)?b(B):S(B)}l.exports=P},6009:function(l,f,d){var h=d(1626),b=/^\s+/;function S(k){return k&&k.slice(0,h(k)+1).replace(b,"")}l.exports=S},791:function(l,f,d){var h=typeof d.g=="object"&&d.g&&d.g.Object===Object&&d.g;l.exports=h},2366:function(l,f,d){var h=d(9016),b=Object.prototype,S=b.hasOwnProperty,k=b.toString,T=h?h.toStringTag:void 0;function O(P){var B=S.call(P,T),W=P[T];try{P[T]=void 0;var Z=!0}catch{}var Y=k.call(P);return Z&&(B?P[T]=W:delete P[T]),Y}l.exports=O},2886:function(l){var f=Object.prototype,d=f.toString;function h(b){return d.call(b)}l.exports=h},9159:function(l,f,d){var h=d(791),b=typeof self=="object"&&self&&self.Object===Object&&self,S=h||b||Function("return this")();l.exports=S},1626:function(l){var f=/\s/;function d(h){for(var b=h.length;b--&&f.test(h.charAt(b)););return b}l.exports=d},3738:function(l,f,d){d(1703);var h=d(150),b=d(657),S=d(2012),k="Expected a function",T=Math.max,O=Math.min;function P(B,W,Z){var Y,z,q,ne,ue,J,ce=0,ge=!1,de=!1,he=!0;if(typeof B!="function")throw new TypeError(k);W=S(W)||0,h(Z)&&(ge=!!Z.leading,de="maxWait"in Z,q=de?T(S(Z.maxWait)||0,W):q,he="trailing"in Z?!!Z.trailing:he);function ie(He){var ft=Y,ht=z;return Y=z=void 0,ce=He,ne=B.apply(ht,ft),ne}function Be(He){return ce=He,ue=setTimeout(V,W),ge?ie(He):ne}function $e(He){var ft=He-J,ht=He-ce,At=W-ft;return de?O(At,q-ht):At}function Ue(He){var ft=He-J,ht=He-ce;return J===void 0||ft>=W||ft<0||de&&ht>=q}function V(){var He=b();if(Ue(He))return Ye(He);ue=setTimeout(V,$e(He))}function Ye(He){return ue=void 0,he&&Y?ie(He):(Y=z=void 0,ne)}function Fe(){ue!==void 0&&clearTimeout(ue),ce=0,Y=J=z=ue=void 0}function St(){return ue===void 0?ne:Ye(b())}function Dt(){var He=b(),ft=Ue(He);if(Y=arguments,z=this,J=He,ft){if(ue===void 0)return Be(J);if(de)return clearTimeout(ue),ue=setTimeout(V,W),ie(J)}return ue===void 0&&(ue=setTimeout(V,W)),ne}return Dt.cancel=Fe,Dt.flush=St,Dt}l.exports=P},150:function(l){function f(d){var h=typeof d;return d!=null&&(h=="object"||h=="function")}l.exports=f},4430:function(l){function f(d){return d!=null&&typeof d=="object"}l.exports=f},7691:function(l,f,d){var h=d(6423),b=d(4430),S="[object Symbol]";function k(T){return typeof T=="symbol"||b(T)&&h(T)==S}l.exports=k},657:function(l,f,d){var h=d(9159),b=function(){return h.Date.now()};l.exports=b},9289:function(l,f,d){d(1703);var h=d(3738),b=d(150),S="Expected a function";function k(T,O,P){var B=!0,W=!0;if(typeof T!="function")throw new TypeError(S);return b(P)&&(B="leading"in P?!!P.leading:B,W="trailing"in P?!!P.trailing:W),h(T,O,{leading:B,maxWait:O,trailing:W})}l.exports=k},2012:function(l,f,d){var h=d(6009),b=d(150),S=d(7691),k=NaN,T=/^[-+]0x[0-9a-f]+$/i,O=/^0b[01]+$/i,P=/^0o[0-7]+$/i,B=parseInt;function W(Z){if(typeof Z=="number")return Z;if(S(Z))return k;if(b(Z)){var Y=typeof Z.valueOf=="function"?Z.valueOf():Z;Z=b(Y)?Y+"":Y}if(typeof Z!="string")return Z===0?Z:+Z;Z=h(Z);var z=O.test(Z);return z||P.test(Z)?B(Z.slice(2),z?2:8):T.test(Z)?k:+Z}l.exports=W},7013:function(l,f,d){var h;(function(b){var S=/^\s+/,k=/\s+$/,T=0,O=b.round,P=b.min,B=b.max,W=b.random;function Z(Le,je){if(Le=Le||"",je=je||{},Le instanceof Z)return Le;if(!(this instanceof Z))return new Z(Le,je);var Ze=Y(Le);this._originalInput=Le,this._r=Ze.r,this._g=Ze.g,this._b=Ze.b,this._a=Ze.a,this._roundA=O(100*this._a)/100,this._format=je.format||Ze.format,this._gradientType=je.gradientType,this._r<1&&(this._r=O(this._r)),this._g<1&&(this._g=O(this._g)),this._b<1&&(this._b=O(this._b)),this._ok=Ze.ok,this._tc_id=T++}Z.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var Le=this.toRgb();return(Le.r*299+Le.g*587+Le.b*114)/1e3},getLuminance:function(){var Le=this.toRgb(),je,Ze,pt,Vt,sn,Wn;return je=Le.r/255,Ze=Le.g/255,pt=Le.b/255,je<=.03928?Vt=je/12.92:Vt=b.pow((je+.055)/1.055,2.4),Ze<=.03928?sn=Ze/12.92:sn=b.pow((Ze+.055)/1.055,2.4),pt<=.03928?Wn=pt/12.92:Wn=b.pow((pt+.055)/1.055,2.4),.2126*Vt+.7152*sn+.0722*Wn},setAlpha:function(Le){return this._a=Ht(Le),this._roundA=O(100*this._a)/100,this},toHsv:function(){var Le=ue(this._r,this._g,this._b);return{h:Le.h*360,s:Le.s,v:Le.v,a:this._a}},toHsvString:function(){var Le=ue(this._r,this._g,this._b),je=O(Le.h*360),Ze=O(Le.s*100),pt=O(Le.v*100);return this._a==1?"hsv("+je+", "+Ze+"%, "+pt+"%)":"hsva("+je+", "+Ze+"%, "+pt+"%, "+this._roundA+")"},toHsl:function(){var Le=q(this._r,this._g,this._b);return{h:Le.h*360,s:Le.s,l:Le.l,a:this._a}},toHslString:function(){var Le=q(this._r,this._g,this._b),je=O(Le.h*360),Ze=O(Le.s*100),pt=O(Le.l*100);return this._a==1?"hsl("+je+", "+Ze+"%, "+pt+"%)":"hsla("+je+", "+Ze+"%, "+pt+"%, "+this._roundA+")"},toHex:function(Le){return ce(this._r,this._g,this._b,Le)},toHexString:function(Le){return"#"+this.toHex(Le)},toHex8:function(Le){return ge(this._r,this._g,this._b,this._a,Le)},toHex8String:function(Le){return"#"+this.toHex8(Le)},toRgb:function(){return{r:O(this._r),g:O(this._g),b:O(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+O(this._r)+", "+O(this._g)+", "+O(this._b)+")":"rgba("+O(this._r)+", "+O(this._g)+", "+O(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:O(ye(this._r,255)*100)+"%",g:O(ye(this._g,255)*100)+"%",b:O(ye(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+O(ye(this._r,255)*100)+"%, "+O(ye(this._g,255)*100)+"%, "+O(ye(this._b,255)*100)+"%)":"rgba("+O(ye(this._r,255)*100)+"%, "+O(ye(this._g,255)*100)+"%, "+O(ye(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:hn[ce(this._r,this._g,this._b,!0)]||!1},toFilter:function(Le){var je="#"+de(this._r,this._g,this._b,this._a),Ze=je,pt=this._gradientType?"GradientType = 1, ":"";if(Le){var Vt=Z(Le);Ze="#"+de(Vt._r,Vt._g,Vt._b,Vt._a)}return"progid:DXImageTransform.Microsoft.gradient("+pt+"startColorstr="+je+",endColorstr="+Ze+")"},toString:function(Le){var je=!!Le;Le=Le||this._format;var Ze=!1,pt=this._a<1&&this._a>=0,Vt=!je&&pt&&(Le==="hex"||Le==="hex6"||Le==="hex3"||Le==="hex4"||Le==="hex8"||Le==="name");return Vt?Le==="name"&&this._a===0?this.toName():this.toRgbString():(Le==="rgb"&&(Ze=this.toRgbString()),Le==="prgb"&&(Ze=this.toPercentageRgbString()),(Le==="hex"||Le==="hex6")&&(Ze=this.toHexString()),Le==="hex3"&&(Ze=this.toHexString(!0)),Le==="hex4"&&(Ze=this.toHex8String(!0)),Le==="hex8"&&(Ze=this.toHex8String()),Le==="name"&&(Ze=this.toName()),Le==="hsl"&&(Ze=this.toHslString()),Le==="hsv"&&(Ze=this.toHsvString()),Ze||this.toHexString())},clone:function(){return Z(this.toString())},_applyModification:function(Le,je){var Ze=Le.apply(null,[this].concat([].slice.call(je)));return this._r=Ze._r,this._g=Ze._g,this._b=Ze._b,this.setAlpha(Ze._a),this},lighten:function(){return this._applyModification($e,arguments)},brighten:function(){return this._applyModification(Ue,arguments)},darken:function(){return this._applyModification(V,arguments)},desaturate:function(){return this._applyModification(he,arguments)},saturate:function(){return this._applyModification(ie,arguments)},greyscale:function(){return this._applyModification(Be,arguments)},spin:function(){return this._applyModification(Ye,arguments)},_applyCombination:function(Le,je){return Le.apply(null,[this].concat([].slice.call(je)))},analogous:function(){return this._applyCombination(ft,arguments)},complement:function(){return this._applyCombination(Fe,arguments)},monochromatic:function(){return this._applyCombination(ht,arguments)},splitcomplement:function(){return this._applyCombination(He,arguments)},triad:function(){return this._applyCombination(St,arguments)},tetrad:function(){return this._applyCombination(Dt,arguments)}},Z.fromRatio=function(Le,je){if(typeof Le=="object"){var Ze={};for(var pt in Le)Le.hasOwnProperty(pt)&&(pt==="a"?Ze[pt]=Le[pt]:Ze[pt]=Qe(Le[pt]));Le=Ze}return Z(Le,je)};function Y(Le){var je={r:0,g:0,b:0},Ze=1,pt=null,Vt=null,sn=null,Wn=!1,ts=!1;return typeof Le=="string"&&(Le=kn(Le)),typeof Le=="object"&&(dn(Le.r)&&dn(Le.g)&&dn(Le.b)?(je=z(Le.r,Le.g,Le.b),Wn=!0,ts=String(Le.r).substr(-1)==="%"?"prgb":"rgb"):dn(Le.h)&&dn(Le.s)&&dn(Le.v)?(pt=Qe(Le.s),Vt=Qe(Le.v),je=J(Le.h,pt,Vt),Wn=!0,ts="hsv"):dn(Le.h)&&dn(Le.s)&&dn(Le.l)&&(pt=Qe(Le.s),sn=Qe(Le.l),je=ne(Le.h,pt,sn),Wn=!0,ts="hsl"),Le.hasOwnProperty("a")&&(Ze=Le.a)),Ze=Ht(Ze),{ok:Wn,format:Le.format||ts,r:P(255,B(je.r,0)),g:P(255,B(je.g,0)),b:P(255,B(je.b,0)),a:Ze}}function z(Le,je,Ze){return{r:ye(Le,255)*255,g:ye(je,255)*255,b:ye(Ze,255)*255}}function q(Le,je,Ze){Le=ye(Le,255),je=ye(je,255),Ze=ye(Ze,255);var pt=B(Le,je,Ze),Vt=P(Le,je,Ze),sn,Wn,ts=(pt+Vt)/2;if(pt==Vt)sn=Wn=0;else{var Zn=pt-Vt;switch(Wn=ts>.5?Zn/(2-pt-Vt):Zn/(pt+Vt),pt){case Le:sn=(je-Ze)/Zn+(je<Ze?6:0);break;case je:sn=(Ze-Le)/Zn+2;break;case Ze:sn=(Le-je)/Zn+4;break}sn/=6}return{h:sn,s:Wn,l:ts}}function ne(Le,je,Ze){var pt,Vt,sn;Le=ye(Le,360),je=ye(je,100),Ze=ye(Ze,100);function Wn(yo,Qs,Rs){return Rs<0&&(Rs+=1),Rs>1&&(Rs-=1),Rs<.16666666666666666?yo+(Qs-yo)*6*Rs:Rs<.5?Qs:Rs<.6666666666666666?yo+(Qs-yo)*(.6666666666666666-Rs)*6:yo}if(je===0)pt=Vt=sn=Ze;else{var ts=Ze<.5?Ze*(1+je):Ze+je-Ze*je,Zn=2*Ze-ts;pt=Wn(Zn,ts,Le+.3333333333333333),Vt=Wn(Zn,ts,Le),sn=Wn(Zn,ts,Le-.3333333333333333)}return{r:pt*255,g:Vt*255,b:sn*255}}function ue(Le,je,Ze){Le=ye(Le,255),je=ye(je,255),Ze=ye(Ze,255);var pt=B(Le,je,Ze),Vt=P(Le,je,Ze),sn,Wn,ts=pt,Zn=pt-Vt;if(Wn=pt===0?0:Zn/pt,pt==Vt)sn=0;else{switch(pt){case Le:sn=(je-Ze)/Zn+(je<Ze?6:0);break;case je:sn=(Ze-Le)/Zn+2;break;case Ze:sn=(Le-je)/Zn+4;break}sn/=6}return{h:sn,s:Wn,v:ts}}function J(Le,je,Ze){Le=ye(Le,360)*6,je=ye(je,100),Ze=ye(Ze,100);var pt=b.floor(Le),Vt=Le-pt,sn=Ze*(1-je),Wn=Ze*(1-Vt*je),ts=Ze*(1-(1-Vt)*je),Zn=pt%6,yo=[Ze,Wn,sn,sn,ts,Ze][Zn],Qs=[ts,Ze,Ze,Wn,sn,sn][Zn],Rs=[sn,sn,ts,Ze,Ze,Wn][Zn];return{r:yo*255,g:Qs*255,b:Rs*255}}function ce(Le,je,Ze,pt){var Vt=[ot(O(Le).toString(16)),ot(O(je).toString(16)),ot(O(Ze).toString(16))];return pt&&Vt[0].charAt(0)==Vt[0].charAt(1)&&Vt[1].charAt(0)==Vt[1].charAt(1)&&Vt[2].charAt(0)==Vt[2].charAt(1)?Vt[0].charAt(0)+Vt[1].charAt(0)+Vt[2].charAt(0):Vt.join("")}function ge(Le,je,Ze,pt,Vt){var sn=[ot(O(Le).toString(16)),ot(O(je).toString(16)),ot(O(Ze).toString(16)),ot(Ot(pt))];return Vt&&sn[0].charAt(0)==sn[0].charAt(1)&&sn[1].charAt(0)==sn[1].charAt(1)&&sn[2].charAt(0)==sn[2].charAt(1)&&sn[3].charAt(0)==sn[3].charAt(1)?sn[0].charAt(0)+sn[1].charAt(0)+sn[2].charAt(0)+sn[3].charAt(0):sn.join("")}function de(Le,je,Ze,pt){var Vt=[ot(Ot(pt)),ot(O(Le).toString(16)),ot(O(je).toString(16)),ot(O(Ze).toString(16))];return Vt.join("")}Z.equals=function(Le,je){return!Le||!je?!1:Z(Le).toRgbString()==Z(je).toRgbString()},Z.random=function(){return Z.fromRatio({r:W(),g:W(),b:W()})};function he(Le,je){je=je===0?0:je||10;var Ze=Z(Le).toHsl();return Ze.s-=je/100,Ze.s=lo(Ze.s),Z(Ze)}function ie(Le,je){je=je===0?0:je||10;var Ze=Z(Le).toHsl();return Ze.s+=je/100,Ze.s=lo(Ze.s),Z(Ze)}function Be(Le){return Z(Le).desaturate(100)}function $e(Le,je){je=je===0?0:je||10;var Ze=Z(Le).toHsl();return Ze.l+=je/100,Ze.l=lo(Ze.l),Z(Ze)}function Ue(Le,je){je=je===0?0:je||10;var Ze=Z(Le).toRgb();return Ze.r=B(0,P(255,Ze.r-O(255*-(je/100)))),Ze.g=B(0,P(255,Ze.g-O(255*-(je/100)))),Ze.b=B(0,P(255,Ze.b-O(255*-(je/100)))),Z(Ze)}function V(Le,je){je=je===0?0:je||10;var Ze=Z(Le).toHsl();return Ze.l-=je/100,Ze.l=lo(Ze.l),Z(Ze)}function Ye(Le,je){var Ze=Z(Le).toHsl(),pt=(Ze.h+je)%360;return Ze.h=pt<0?360+pt:pt,Z(Ze)}function Fe(Le){var je=Z(Le).toHsl();return je.h=(je.h+180)%360,Z(je)}function St(Le){var je=Z(Le).toHsl(),Ze=je.h;return[Z(Le),Z({h:(Ze+120)%360,s:je.s,l:je.l}),Z({h:(Ze+240)%360,s:je.s,l:je.l})]}function Dt(Le){var je=Z(Le).toHsl(),Ze=je.h;return[Z(Le),Z({h:(Ze+90)%360,s:je.s,l:je.l}),Z({h:(Ze+180)%360,s:je.s,l:je.l}),Z({h:(Ze+270)%360,s:je.s,l:je.l})]}function He(Le){var je=Z(Le).toHsl(),Ze=je.h;return[Z(Le),Z({h:(Ze+72)%360,s:je.s,l:je.l}),Z({h:(Ze+216)%360,s:je.s,l:je.l})]}function ft(Le,je,Ze){je=je||6,Ze=Ze||30;var pt=Z(Le).toHsl(),Vt=360/Ze,sn=[Z(Le)];for(pt.h=(pt.h-(Vt*je>>1)+720)%360;--je;)pt.h=(pt.h+Vt)%360,sn.push(Z(pt));return sn}function ht(Le,je){je=je||6;for(var Ze=Z(Le).toHsv(),pt=Ze.h,Vt=Ze.s,sn=Ze.v,Wn=[],ts=1/je;je--;)Wn.push(Z({h:pt,s:Vt,v:sn})),sn=(sn+ts)%1;return Wn}Z.mix=function(Le,je,Ze){Ze=Ze===0?0:Ze||50;var pt=Z(Le).toRgb(),Vt=Z(je).toRgb(),sn=Ze/100,Wn={r:(Vt.r-pt.r)*sn+pt.r,g:(Vt.g-pt.g)*sn+pt.g,b:(Vt.b-pt.b)*sn+pt.b,a:(Vt.a-pt.a)*sn+pt.a};return Z(Wn)},Z.readability=function(Le,je){var Ze=Z(Le),pt=Z(je);return(b.max(Ze.getLuminance(),pt.getLuminance())+.05)/(b.min(Ze.getLuminance(),pt.getLuminance())+.05)},Z.isReadable=function(Le,je,Ze){var pt=Z.readability(Le,je),Vt,sn;switch(sn=!1,Vt=Bt(Ze),Vt.level+Vt.size){case"AAsmall":case"AAAlarge":sn=pt>=4.5;break;case"AAlarge":sn=pt>=3;break;case"AAAsmall":sn=pt>=7;break}return sn},Z.mostReadable=function(Le,je,Ze){var pt=null,Vt=0,sn,Wn,ts,Zn;Ze=Ze||{},Wn=Ze.includeFallbackColors,ts=Ze.level,Zn=Ze.size;for(var yo=0;yo<je.length;yo++)sn=Z.readability(Le,je[yo]),sn>Vt&&(Vt=sn,pt=Z(je[yo]));return Z.isReadable(Le,pt,{level:ts,size:Zn})||!Wn?pt:(Ze.includeFallbackColors=!1,Z.mostReadable(Le,["#fff","#000"],Ze))};var At=Z.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},hn=Z.hexNames=ct(At);function ct(Le){var je={};for(var Ze in Le)Le.hasOwnProperty(Ze)&&(je[Le[Ze]]=Ze);return je}function Ht(Le){return Le=parseFloat(Le),(isNaN(Le)||Le<0||Le>1)&&(Le=1),Le}function ye(Le,je){so(Le)&&(Le="100%");var Ze=Xs(Le);return Le=P(je,B(0,parseFloat(Le))),Ze&&(Le=parseInt(Le*je,10)/100),b.abs(Le-je)<1e-6?1:Le%je/parseFloat(je)}function lo(Le){return P(1,B(0,Le))}function jn(Le){return parseInt(Le,16)}function so(Le){return typeof Le=="string"&&Le.indexOf(".")!=-1&&parseFloat(Le)===1}function Xs(Le){return typeof Le=="string"&&Le.indexOf("%")!=-1}function ot(Le){return Le.length==1?"0"+Le:""+Le}function Qe(Le){return Le<=1&&(Le=Le*100+"%"),Le}function Ot(Le){return b.round(parseFloat(Le)*255).toString(16)}function Nt(Le){return jn(Le)/255}var Ve=function(){var Le="[-\\+]?\\d+%?",je="[-\\+]?\\d*\\.\\d+%?",Ze="(?:"+je+")|(?:"+Le+")",pt="[\\s|\\(]+("+Ze+")[,|\\s]+("+Ze+")[,|\\s]+("+Ze+")\\s*\\)?",Vt="[\\s|\\(]+("+Ze+")[,|\\s]+("+Ze+")[,|\\s]+("+Ze+")[,|\\s]+("+Ze+")\\s*\\)?";return{CSS_UNIT:new RegExp(Ze),rgb:new RegExp("rgb"+pt),rgba:new RegExp("rgba"+Vt),hsl:new RegExp("hsl"+pt),hsla:new RegExp("hsla"+Vt),hsv:new RegExp("hsv"+pt),hsva:new RegExp("hsva"+Vt),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function dn(Le){return!!Ve.CSS_UNIT.exec(Le)}function kn(Le){Le=Le.replace(S,"").replace(k,"").toLowerCase();var je=!1;if(At[Le])Le=At[Le],je=!0;else if(Le=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var Ze;return(Ze=Ve.rgb.exec(Le))?{r:Ze[1],g:Ze[2],b:Ze[3]}:(Ze=Ve.rgba.exec(Le))?{r:Ze[1],g:Ze[2],b:Ze[3],a:Ze[4]}:(Ze=Ve.hsl.exec(Le))?{h:Ze[1],s:Ze[2],l:Ze[3]}:(Ze=Ve.hsla.exec(Le))?{h:Ze[1],s:Ze[2],l:Ze[3],a:Ze[4]}:(Ze=Ve.hsv.exec(Le))?{h:Ze[1],s:Ze[2],v:Ze[3]}:(Ze=Ve.hsva.exec(Le))?{h:Ze[1],s:Ze[2],v:Ze[3],a:Ze[4]}:(Ze=Ve.hex8.exec(Le))?{r:jn(Ze[1]),g:jn(Ze[2]),b:jn(Ze[3]),a:Nt(Ze[4]),format:je?"name":"hex8"}:(Ze=Ve.hex6.exec(Le))?{r:jn(Ze[1]),g:jn(Ze[2]),b:jn(Ze[3]),format:je?"name":"hex"}:(Ze=Ve.hex4.exec(Le))?{r:jn(Ze[1]+""+Ze[1]),g:jn(Ze[2]+""+Ze[2]),b:jn(Ze[3]+""+Ze[3]),a:Nt(Ze[4]+""+Ze[4]),format:je?"name":"hex8"}:(Ze=Ve.hex3.exec(Le))?{r:jn(Ze[1]+""+Ze[1]),g:jn(Ze[2]+""+Ze[2]),b:jn(Ze[3]+""+Ze[3]),format:je?"name":"hex"}:!1}function Bt(Le){var je,Ze;return Le=Le||{level:"AA",size:"small"},je=(Le.level||"AA").toUpperCase(),Ze=(Le.size||"small").toLowerCase(),je!=="AA"&&je!=="AAA"&&(je="AA"),Ze!=="small"&&Ze!=="large"&&(Ze="small"),{level:je,size:Ze}}l.exports?l.exports=Z:(h=(function(){return Z}).call(f,d,f,l),h!==void 0&&(l.exports=h))})(Math)},89:function(l,f){f.Z=(d,h)=>{const b=d.__vccOpts||d;for(const[S,k]of h)b[S]=k;return b}},3647:function(l,f,d){var h=d(6095);h.__esModule&&(h=h.default),typeof h=="string"&&(h=[[l.id,h,""]]),h.locals&&(l.exports=h.locals);var b=d(7037).Z;b("29397b9c",h,!0,{sourceMap:!1,shadowMode:!1})},325:function(l,f,d){var h=d(6047);h.__esModule&&(h=h.default),typeof h=="string"&&(h=[[l.id,h,""]]),h.locals&&(l.exports=h.locals);var b=d(7037).Z;b("479d8be0",h,!0,{sourceMap:!1,shadowMode:!1})},5208:function(l,f,d){var h=d(9481);h.__esModule&&(h=h.default),typeof h=="string"&&(h=[[l.id,h,""]]),h.locals&&(l.exports=h.locals);var b=d(7037).Z;b("1e383f72",h,!0,{sourceMap:!1,shadowMode:!1})},1425:function(l,f,d){var h=d(5186);h.__esModule&&(h=h.default),typeof h=="string"&&(h=[[l.id,h,""]]),h.locals&&(l.exports=h.locals);var b=d(7037).Z;b("3855edf0",h,!0,{sourceMap:!1,shadowMode:!1})},1902:function(l,f,d){var h=d(3695);h.__esModule&&(h=h.default),typeof h=="string"&&(h=[[l.id,h,""]]),h.locals&&(l.exports=h.locals);var b=d(7037).Z;b("2f73e1a8",h,!0,{sourceMap:!1,shadowMode:!1})},5815:function(l,f,d){var h=d(7279);h.__esModule&&(h=h.default),typeof h=="string"&&(h=[[l.id,h,""]]),h.locals&&(l.exports=h.locals);var b=d(7037).Z;b("36c086c2",h,!0,{sourceMap:!1,shadowMode:!1})},8016:function(l,f,d){var h=d(6278);h.__esModule&&(h=h.default),typeof h=="string"&&(h=[[l.id,h,""]]),h.locals&&(l.exports=h.locals);var b=d(7037).Z;b("8bcdd408",h,!0,{sourceMap:!1,shadowMode:!1})},193:function(l,f,d){var h=d(3468);h.__esModule&&(h=h.default),typeof h=="string"&&(h=[[l.id,h,""]]),h.locals&&(l.exports=h.locals);var b=d(7037).Z;b("17a63672",h,!0,{sourceMap:!1,shadowMode:!1})},1113:function(l,f,d){var h=d(5689);h.__esModule&&(h=h.default),typeof h=="string"&&(h=[[l.id,h,""]]),h.locals&&(l.exports=h.locals);var b=d(7037).Z;b("39c50172",h,!0,{sourceMap:!1,shadowMode:!1})},6320:function(l,f,d){var h=d(2410);h.__esModule&&(h=h.default),typeof h=="string"&&(h=[[l.id,h,""]]),h.locals&&(l.exports=h.locals);var b=d(7037).Z;b("5c6f2742",h,!0,{sourceMap:!1,shadowMode:!1})},3205:function(l,f,d){var h=d(3142);h.__esModule&&(h=h.default),typeof h=="string"&&(h=[[l.id,h,""]]),h.locals&&(l.exports=h.locals);var b=d(7037).Z;b("90803b82",h,!0,{sourceMap:!1,shadowMode:!1})},1979:function(l,f,d){var h=d(7953);h.__esModule&&(h=h.default),typeof h=="string"&&(h=[[l.id,h,""]]),h.locals&&(l.exports=h.locals);var b=d(7037).Z;b("418ed5a2",h,!0,{sourceMap:!1,shadowMode:!1})},6547:function(l,f,d){var h=d(3097);h.__esModule&&(h=h.default),typeof h=="string"&&(h=[[l.id,h,""]]),h.locals&&(l.exports=h.locals);var b=d(7037).Z;b("1f7c089b",h,!0,{sourceMap:!1,shadowMode:!1})},5233:function(l,f,d){var h=d(4339);h.__esModule&&(h=h.default),typeof h=="string"&&(h=[[l.id,h,""]]),h.locals&&(l.exports=h.locals);var b=d(7037).Z;b("491ed8fe",h,!0,{sourceMap:!1,shadowMode:!1})},7037:function(l,f,d){d.d(f,{Z:function(){return z}});function h(de,he){for(var ie=[],Be={},$e=0;$e<he.length;$e++){var Ue=he[$e],V=Ue[0],Ye=Ue[1],Fe=Ue[2],St=Ue[3],Dt={id:de+":"+$e,css:Ye,media:Fe,sourceMap:St};Be[V]?Be[V].parts.push(Dt):ie.push(Be[V]={id:V,parts:[Dt]})}return ie}var b=typeof document<"u";if(typeof DEBUG<"u"&&DEBUG&&!b)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var S={},k=b&&(document.head||document.getElementsByTagName("head")[0]),T=null,O=0,P=!1,B=function(){},W=null,Z="data-vue-ssr-id",Y=typeof navigator<"u"&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function z(de,he,ie,Be){P=ie,W=Be||{};var $e=h(de,he);return q($e),function(V){for(var Ye=[],Fe=0;Fe<$e.length;Fe++){var St=$e[Fe],Dt=S[St.id];Dt.refs--,Ye.push(Dt)}V?($e=h(de,V),q($e)):$e=[];for(var Fe=0;Fe<Ye.length;Fe++){var Dt=Ye[Fe];if(Dt.refs===0){for(var He=0;He<Dt.parts.length;He++)Dt.parts[He]();delete S[Dt.id]}}}}function q(de){for(var he=0;he<de.length;he++){var ie=de[he],Be=S[ie.id];if(Be){Be.refs++;for(var $e=0;$e<Be.parts.length;$e++)Be.parts[$e](ie.parts[$e]);for(;$e<ie.parts.length;$e++)Be.parts.push(ue(ie.parts[$e]));Be.parts.length>ie.parts.length&&(Be.parts.length=ie.parts.length)}else{for(var Ue=[],$e=0;$e<ie.parts.length;$e++)Ue.push(ue(ie.parts[$e]));S[ie.id]={id:ie.id,refs:1,parts:Ue}}}}function ne(){var de=document.createElement("style");return de.type="text/css",k.appendChild(de),de}function ue(de){var he,ie,Be=document.querySelector("style["+Z+'~="'+de.id+'"]');if(Be){if(P)return B;Be.parentNode.removeChild(Be)}if(Y){var $e=O++;Be=T||(T=ne()),he=ce.bind(null,Be,$e,!1),ie=ce.bind(null,Be,$e,!0)}else Be=ne(),he=ge.bind(null,Be),ie=function(){Be.parentNode.removeChild(Be)};return he(de),function(V){if(V){if(V.css===de.css&&V.media===de.media&&V.sourceMap===de.sourceMap)return;he(de=V)}else ie()}}var J=function(){var de=[];return function(he,ie){return de[he]=ie,de.filter(Boolean).join("\n")}}();function ce(de,he,ie,Be){var $e=ie?"":Be.css;if(de.styleSheet)de.styleSheet.cssText=J(he,$e);else{var Ue=document.createTextNode($e),V=de.childNodes;V[he]&&de.removeChild(V[he]),V.length?de.insertBefore(Ue,V[he]):de.appendChild(Ue)}}function ge(de,he){var ie=he.css,Be=he.media,$e=he.sourceMap;if(Be&&de.setAttribute("media",Be),W.ssrId&&de.setAttribute(Z,he.id),$e&&(ie+="\n/*# sourceURL="+$e.sources[0]+" */",ie+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify($e))))+" */"),de.styleSheet)de.styleSheet.cssText=ie;else{for(;de.firstChild;)de.removeChild(de.firstChild);de.appendChild(document.createTextNode(ie))}}}},n={};function i(l){var f=n[l];if(f!==void 0)return f.exports;var d=n[l]={id:l,exports:{}};return t[l](d,d.exports,i),d.exports}(function(){i.n=function(l){var f=l&&l.__esModule?function(){return l.default}:function(){return l};return i.d(f,{a:f}),f}})(),function(){i.d=function(l,f){for(var d in f)i.o(f,d)&&!i.o(l,d)&&Object.defineProperty(l,d,{enumerable:!0,get:f[d]})}}(),function(){i.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}()}(),function(){i.o=function(l,f){return Object.prototype.hasOwnProperty.call(l,f)}}(),function(){i.r=function(l){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(l,"__esModule",{value:!0})}}(),function(){i.p=""}();var a={};(function(){if(i.r(a),i.d(a,{Alpha:function(){return ke},Checkboard:function(){return eo},Chrome:function(){return Aa},ColorMixin:function(){return Z},Compact:function(){return ue},EditableInput:function(){return lo},Grayscale:function(){return Ue},Hue:function(){return pt},Material:function(){return Xs},Photoshop:function(){return Fr},Saturation:function(){return Nu},Sketch:function(){return wn},Slider:function(){return ts},Swatches:function(){return Hn},Twitter:function(){return Hm},default:function(){return qb},version:function(){return Y1}}),typeof window<"u"){var l=window.document.currentScript,f=l&&l.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);f&&(i.p=f[1])}var d={i8:"3.0.6"},h=eje;const b={role:"application","aria-label":"Compact color picker",class:"vc-compact"},S={class:"vc-compact-colors",role:"listbox"},k=["aria-label","aria-selected","onClick"],T={class:"vc-compact-dot"};function O(ze,an,$n,Ds,Eo,Yt){return(0,h.openBlock)(),(0,h.createElementBlock)("div",b,[(0,h.createElementVNode)("ul",S,[((0,h.openBlock)(!0),(0,h.createElementBlock)(h.Fragment,null,(0,h.renderList)(ze.paletteUpperCase($n.palette),Ys=>((0,h.openBlock)(),(0,h.createElementBlock)("li",{role:"option","aria-label":"color:"+Ys,"aria-selected":Ys===Yt.pick,class:(0,h.normalizeClass)(["vc-compact-color-item",{"vc-compact-color-item--white":Ys==="#FFFFFF"}]),key:Ys,style:(0,h.normalizeStyle)({background:Ys}),onClick:ko=>Yt.handlerClick(Ys)},[(0,h.withDirectives)((0,h.createElementVNode)("div",T,null,512),[[h.vShow,Ys===Yt.pick]])],14,k))),128))])])}var P=i(7013),B=i.n(P);function W(ze={},an=0){const $n=ze&&ze.a;let Ds;ze&&ze.hsl?Ds=B()(ze.hsl):ze&&ze.hex&&ze.hex.length>0?Ds=B()(ze.hex):ze&&ze.hsv?Ds=B()(ze.hsv):ze&&ze.rgba?Ds=B()(ze.rgba):ze&&ze.rgb?Ds=B()(ze.rgb):Ds=B()(ze),Ds&&(Ds._a===void 0||Ds._a===null)&&Ds.setAlpha($n||1);const Eo=Ds.toHsl(),Yt=Ds.toHsv();return Eo.s===0&&(Yt.h=Eo.h=ze.h||ze.hsl&&ze.hsl.h||an||0),{hsl:Eo,hex:Ds.toHexString().toUpperCase(),hex8:Ds.toHex8String().toUpperCase(),rgba:Ds.toRgb(),hsv:Yt,oldHue:ze.h||an||Eo.h,source:ze.source,a:ze.a||Ds.getAlpha()}}var Z={props:["modelValue"],data(){return{val:W(this.modelValue)}},computed:{colors:{get(){return this.val},set(ze){this.val=ze,this.$emit("update:modelValue",ze)}}},watch:{modelValue(ze){this.val=W(ze)}},methods:{colorChange(ze,an){this.oldHue=this.colors.hsl.h,this.colors=W(ze,an||this.oldHue)},isValidHex(ze){return B()(ze).isValid()},simpleCheckForValidColor(ze){const an=["r","g","b","a","h","s","l","v"];let $n=0,Ds=0;for(let Eo=0;Eo<an.length;Eo++){const Yt=an[Eo];ze[Yt]&&($n++,isNaN(ze[Yt])||Ds++)}if($n===Ds)return ze},paletteUpperCase(ze){return ze.map(an=>an.toUpperCase())},isTransparent(ze){return B()(ze).getAlpha()===0}}};const Y=["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#CCCCCC","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"];var z={name:"Compact",mixins:[Z],props:{palette:{type:Array,default(){return Y}}},components:{},computed:{pick(){return this.colors.hex.toUpperCase()}},methods:{handlerClick(ze){this.colorChange({hex:ze,source:"hex"})}}};i(325);var q=i(89),ue=(0,q.Z)(z,[["render",O]]);const J={role:"application","aria-label":"Grayscale color picker",class:"vc-grayscale"},ce={class:"vc-grayscale-colors",role:"listbox"},ge=["aria-label","aria-selected","onClick"],de={class:"vc-grayscale-dot"};function he(ze,an,$n,Ds,Eo,Yt){return(0,h.openBlock)(),(0,h.createElementBlock)("div",J,[(0,h.createElementVNode)("ul",ce,[((0,h.openBlock)(!0),(0,h.createElementBlock)(h.Fragment,null,(0,h.renderList)(ze.paletteUpperCase($n.palette),Ys=>((0,h.openBlock)(),(0,h.createElementBlock)("li",{role:"option","aria-label":"Color:"+Ys,"aria-selected":Ys===Yt.pick,key:Ys,class:(0,h.normalizeClass)(["vc-grayscale-color-item",{"vc-grayscale-color-item--white":Ys=="#FFFFFF"}]),style:(0,h.normalizeStyle)({background:Ys}),onClick:ko=>Yt.handlerClick(Ys)},[(0,h.withDirectives)((0,h.createElementVNode)("div",de,null,512),[[h.vShow,Ys===Yt.pick]])],14,ge))),128))])])}const ie=["#FFFFFF","#F2F2F2","#E6E6E6","#D9D9D9","#CCCCCC","#BFBFBF","#B3B3B3","#A6A6A6","#999999","#8C8C8C","#808080","#737373","#666666","#595959","#4D4D4D","#404040","#333333","#262626","#0D0D0D","#000000"];var Be={name:"Grayscale",mixins:[Z],props:{palette:{type:Array,default(){return ie}}},components:{},computed:{pick(){return this.colors.hex.toUpperCase()}},methods:{handlerClick(ze){this.colorChange({hex:ze,source:"hex"})}}};i(5208);var Ue=(0,q.Z)(Be,[["render",he]]);const V={role:"application","aria-label":"Material color picker",class:"vc-material"},Ye={class:"vc-material-split"},Fe={class:"vc-material-third"},St={class:"vc-material-third"},Dt={class:"vc-material-third"};function He(ze,an,$n,Ds,Eo,Yt){const Ys=(0,h.resolveComponent)("ed-in");return(0,h.openBlock)(),(0,h.createElementBlock)("div",V,[(0,h.createVNode)(Ys,{class:"vc-material-hex",label:"hex",modelValue:ze.colors.hex,"onUpdate:modelValue":an[0]||(an[0]=ko=>ze.colors.hex=ko),style:(0,h.normalizeStyle)({borderColor:ze.colors.hex}),onChange:Yt.onChange},null,8,["modelValue","style","onChange"]),(0,h.createElementVNode)("div",Ye,[(0,h.createElementVNode)("div",Fe,[(0,h.createVNode)(Ys,{label:"r",modelValue:ze.colors.rgba.r,"onUpdate:modelValue":an[1]||(an[1]=ko=>ze.colors.rgba.r=ko),onChange:Yt.onChange},null,8,["modelValue","onChange"])]),(0,h.createElementVNode)("div",St,[(0,h.createVNode)(Ys,{label:"g",modelValue:ze.colors.rgba.g,"onUpdate:modelValue":an[2]||(an[2]=ko=>ze.colors.rgba.g=ko),onChange:Yt.onChange},null,8,["modelValue","onChange"])]),(0,h.createElementVNode)("div",Dt,[(0,h.createVNode)(Ys,{label:"b",modelValue:ze.colors.rgba.b,"onUpdate:modelValue":an[3]||(an[3]=ko=>ze.colors.rgba.b=ko),onChange:Yt.onChange},null,8,["modelValue","onChange"])])])])}const ft={class:"vc-editable-input"},ht=["aria-labelledby"],At=["for","id"],hn={class:"vc-input__desc"};function ct(ze,an,$n,Ds,Eo,Yt){return(0,h.openBlock)(),(0,h.createElementBlock)("div",ft,[(0,h.withDirectives)((0,h.createElementVNode)("input",{"aria-labelledby":Yt.labelId,class:"vc-input__input","onUpdate:modelValue":an[0]||(an[0]=Ys=>Yt.val=Ys),onKeydown:an[1]||(an[1]=(...Ys)=>Yt.handleKeyDown&&Yt.handleKeyDown(...Ys)),onInput:an[2]||(an[2]=(...Ys)=>Yt.update&&Yt.update(...Ys)),ref:"input"},null,40,ht),[[h.vModelText,Yt.val]]),(0,h.createElementVNode)("span",{for:$n.label,class:"vc-input__label",id:Yt.labelId},(0,h.toDisplayString)(Yt.labelSpanText),9,At),(0,h.createElementVNode)("span",hn,(0,h.toDisplayString)($n.desc),1)])}var Ht={name:"editableInput",props:{label:String,labelText:String,desc:String,modelValue:[String,Number],max:Number,min:Number,arrowOffset:{type:Number,default:1}},computed:{val:{get(){return this.modelValue},set(ze){if(this.max!==void 0&&+ze>this.max)this.$refs.input.value=this.max;else return ze}},labelId(){return"input__label__".concat(this.label,"__").concat(Math.random().toString().slice(2,5))},labelSpanText(){return this.labelText||this.label}},methods:{update(ze){this.handleChange(ze.target.value)},handleChange(ze){const an={};an[this.label]=ze,an.hex===void 0&&an["#"]===void 0?this.$emit("change",an):ze.length>5&&this.$emit("change",an)},handleKeyDown(ze){let an=this.val;const $n=Number(an);if($n){const Ds=this.arrowOffset||1;ze.keyCode===38&&(an=$n+Ds,this.handleChange(an),ze.preventDefault()),ze.keyCode===40&&(an=$n-Ds,this.handleChange(an),ze.preventDefault())}}}};i(1979);var lo=(0,q.Z)(Ht,[["render",ct]]),jn={name:"Material",mixins:[Z],components:{"ed-in":lo},methods:{onChange(ze){ze&&(ze.hex?this.isValidHex(ze.hex)&&this.colorChange({hex:ze.hex,source:"hex"}):(ze.r||ze.g||ze.b)&&this.colorChange({r:ze.r||this.colors.rgba.r,g:ze.g||this.colors.rgba.g,b:ze.b||this.colors.rgba.b,a:ze.a||this.colors.rgba.a,source:"rgba"}))}}};i(1425);var Xs=(0,q.Z)(jn,[["render",He]]);const ot={role:"application","aria-label":"Slider color picker",class:"vc-slider"},Qe={class:"vc-slider-hue-warp"},Ot={class:"vc-slider-swatches",role:"group"},Nt=["data-index","aria-label","onClick"];function Ve(ze,an,$n,Ds,Eo,Yt){const Ys=(0,h.resolveComponent)("hue");return(0,h.openBlock)(),(0,h.createElementBlock)("div",ot,[(0,h.createElementVNode)("div",Qe,[(0,h.createVNode)(Ys,{modelValue:ze.colors,"onUpdate:modelValue":an[0]||(an[0]=ko=>ze.colors=ko),onChange:Yt.hueChange},null,8,["modelValue","onChange"])]),(0,h.createElementVNode)("div",Ot,[((0,h.openBlock)(!0),(0,h.createElementBlock)(h.Fragment,null,(0,h.renderList)(Yt.normalizedSwatches,(ko,ei)=>((0,h.openBlock)(),(0,h.createElementBlock)("div",{class:"vc-slider-swatch",key:ei,"data-index":ei,"aria-label":"color:"+ze.colors.hex,role:"button",onClick:Pi=>Yt.handleSwClick(ei,ko)},[(0,h.createElementVNode)("div",{class:(0,h.normalizeClass)(["vc-slider-swatch-picker",{"vc-slider-swatch-picker--active":Yt.isActive(ko,ei),"vc-slider-swatch-picker--white":ko.l===1}]),style:(0,h.normalizeStyle)({background:"hsl("+ze.colors.hsl.h+", "+ko.s*100+"%, "+ko.l*100+"%)"})},null,6)],8,Nt))),128))])])}const dn=["aria-valuenow"],Bt=[(0,h.createElementVNode)("div",{class:"vc-hue-picker"},null,-1)];function Le(ze,an,$n,Ds,Eo,Yt){return(0,h.openBlock)(),(0,h.createElementBlock)("div",{class:(0,h.normalizeClass)(["vc-hue",Yt.directionClass])},[(0,h.createElementVNode)("div",{class:"vc-hue-container",role:"slider","aria-valuenow":Yt.colors.hsl.h,"aria-valuemin":"0","aria-valuemax":"360",ref:"container",onMousedown:an[0]||(an[0]=(...Ys)=>Yt.handleMouseDown&&Yt.handleMouseDown(...Ys)),onTouchmove:an[1]||(an[1]=(...Ys)=>Yt.handleChange&&Yt.handleChange(...Ys)),onTouchstart:an[2]||(an[2]=(...Ys)=>Yt.handleChange&&Yt.handleChange(...Ys))},[(0,h.createElementVNode)("div",{class:"vc-hue-pointer",style:(0,h.normalizeStyle)({top:Yt.pointerTop,left:Yt.pointerLeft}),role:"presentation"},Bt,4)],40,dn)],2)}var je={name:"Hue",props:{modelValue:Object,direction:{type:String,default:"horizontal"}},data(){return{oldHue:0,pullDirection:""}},computed:{colors(){const ze=this.modelValue.hsl.h;return ze!==0&&ze-this.oldHue>0&&(this.pullDirection="right"),ze!==0&&ze-this.oldHue<0&&(this.pullDirection="left"),this.oldHue=ze,this.modelValue},directionClass(){return{"vc-hue--horizontal":this.direction==="horizontal","vc-hue--vertical":this.direction==="vertical"}},pointerTop(){return this.direction==="vertical"?this.colors.hsl.h===0&&this.pullDirection==="right"?0:-(this.colors.hsl.h*100/360)+100+"%":0},pointerLeft(){return this.direction==="vertical"?0:this.colors.hsl.h===0&&this.pullDirection==="right"?"100%":this.colors.hsl.h*100/360+"%"}},methods:{handleChange(ze,an){!an&&ze.preventDefault();const $n=this.$refs.container;if(!$n)return;const Ds=$n.clientWidth,Eo=$n.clientHeight,Yt=$n.getBoundingClientRect().left+window.pageXOffset,Ys=$n.getBoundingClientRect().top+window.pageYOffset,ko=ze.pageX||(ze.touches?ze.touches[0].pageX:0),ei=ze.pageY||(ze.touches?ze.touches[0].pageY:0),Pi=ko-Yt,ji=ei-Ys;let Ko,sf;this.direction==="vertical"?(ji<0?Ko=360:ji>Eo?Ko=0:(sf=-(ji*100/Eo)+100,Ko=360*sf/100),this.colors.hsl.h!==Ko&&this.$emit("change",{h:Ko,s:this.colors.hsl.s,l:this.colors.hsl.l,a:this.colors.hsl.a,source:"hsl"})):(Pi<0?Ko=0:Pi>Ds?Ko=360:(sf=Pi*100/Ds,Ko=360*sf/100),this.colors.hsl.h!==Ko&&this.$emit("change",{h:Ko,s:this.colors.hsl.s,l:this.colors.hsl.l,a:this.colors.hsl.a,source:"hsl"}))},handleMouseDown(ze){this.handleChange(ze,!0),window.addEventListener("mousemove",this.handleChange),window.addEventListener("mouseup",this.handleMouseUp)},handleMouseUp(ze){this.unbindEventListeners()},unbindEventListeners(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}}};i(6547);var pt=(0,q.Z)(je,[["render",Le]]);const Vt=.5;var sn={name:"Slider",mixins:[Z],props:{swatches:{type:Array,default(){return[{s:Vt,l:.8},{s:Vt,l:.65},{s:Vt,l:.5},{s:Vt,l:.35},{s:Vt,l:.2}]}}},components:{hue:pt},computed:{normalizedSwatches(){return this.swatches.map(an=>typeof an!="object"?{s:Vt,l:an}:an)}},methods:{isActive(ze,an){const $n=this.colors.hsl;return $n.l===1&&ze.l===1||$n.l===0&&ze.l===0?!0:Math.abs($n.l-ze.l)<.01&&Math.abs($n.s-ze.s)<.01},hueChange(ze){this.colorChange(ze)},handleSwClick(ze,an){this.colorChange({h:this.colors.hsl.h,s:an.s,l:an.l,source:"hsl"})}}};i(8016);var ts=(0,q.Z)(sn,[["render",Ve]]);const Zn=["data-pick"],yo={class:"vc-swatches-box",role:"listbox"},Qs=["aria-label","aria-selected","data-color","onClick"],Rs={class:"vc-swatches-pick"},Po=[(0,h.createElementVNode)("svg",{style:{width:"24px",height:"24px"},viewBox:"0 0 24 24"},[(0,h.createElementVNode)("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})],-1)];function jo(ze,an,$n,Ds,Eo,Yt){return(0,h.openBlock)(),(0,h.createElementBlock)("div",{role:"application","aria-label":"Swatches color picker",class:"vc-swatches","data-pick":Yt.pick},[(0,h.createElementVNode)("div",yo,[((0,h.openBlock)(!0),(0,h.createElementBlock)(h.Fragment,null,(0,h.renderList)($n.palette,(Ys,ko)=>((0,h.openBlock)(),(0,h.createElementBlock)("div",{class:"vc-swatches-color-group",key:ko},[((0,h.openBlock)(!0),(0,h.createElementBlock)(h.Fragment,null,(0,h.renderList)(Ys,ei=>((0,h.openBlock)(),(0,h.createElementBlock)("div",{class:(0,h.normalizeClass)(["vc-swatches-color-it",{"vc-swatches-color--white":ei==="#FFFFFF"}]),role:"option","aria-label":"Color:"+ei,"aria-selected":Yt.equal(ei),key:ei,"data-color":ei,style:(0,h.normalizeStyle)({background:ei}),onClick:Pi=>Yt.handlerClick(ei)},[(0,h.withDirectives)((0,h.createElementVNode)("div",Rs,Po,512),[[h.vShow,Yt.equal(ei)]])],14,Qs))),128))]))),128))])],8,Zn)}var Mo={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",a100:"#ff8a80",a200:"#ff5252",a400:"#ff1744",a700:"#d50000"},Do={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",a100:"#ff80ab",a200:"#ff4081",a400:"#f50057",a700:"#c51162"},er={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",a100:"#ea80fc",a200:"#e040fb",a400:"#d500f9",a700:"#aa00ff"},Zs={50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",a100:"#b388ff",a200:"#7c4dff",a400:"#651fff",a700:"#6200ea"},Xa={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",a100:"#8c9eff",a200:"#536dfe",a400:"#3d5afe",a700:"#304ffe"},bn={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",a100:"#82b1ff",a200:"#448aff",a400:"#2979ff",a700:"#2962ff"},qs={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",a100:"#80d8ff",a200:"#40c4ff",a400:"#00b0ff",a700:"#0091ea"},Qr={50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",a100:"#84ffff",a200:"#18ffff",a400:"#00e5ff",a700:"#00b8d4"},lt={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",a100:"#a7ffeb",a200:"#64ffda",a400:"#1de9b6",a700:"#00bfa5"},yt={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",a100:"#b9f6ca",a200:"#69f0ae",a400:"#00e676",a700:"#00c853"},_n={50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",a100:"#ccff90",a200:"#b2ff59",a400:"#76ff03",a700:"#64dd17"},us={50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",a100:"#f4ff81",a200:"#eeff41",a400:"#c6ff00",a700:"#aeea00"},Zo={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",a100:"#ffff8d",a200:"#ffff00",a400:"#ffea00",a700:"#ffd600"},br={50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",a100:"#ffe57f",a200:"#ffd740",a400:"#ffc400",a700:"#ffab00"},Vn={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",a100:"#ffd180",a200:"#ffab40",a400:"#ff9100",a700:"#ff6d00"},Kt={50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",a100:"#ff9e80",a200:"#ff6e40",a400:"#ff3d00",a700:"#dd2c00"},Ps={50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723"},Bo={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121"},Nr={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238"},uc={primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",dividers:"rgba(0, 0, 0, 0.12)"},Hi={primary:"rgba(255, 255, 255, 1)",secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",dividers:"rgba(255, 255, 255, 0.12)"},ir={active:"rgba(0, 0, 0, 0.54)",inactive:"rgba(0, 0, 0, 0.38)"},Wr={active:"rgba(255, 255, 255, 1)",inactive:"rgba(255, 255, 255, 0.5)"},mi="#ffffff",dc="#000000",Ti={red:Mo,pink:Do,purple:er,deepPurple:Zs,indigo:Xa,blue:bn,lightBlue:qs,cyan:Qr,teal:lt,green:yt,lightGreen:_n,lime:us,yellow:Zo,amber:br,orange:Vn,deepOrange:Kt,brown:Ps,grey:Bo,blueGrey:Nr,darkText:uc,lightText:Hi,darkIcons:ir,lightIcons:Wr,white:mi,black:dc};const _i=["red","pink","purple","deepPurple","indigo","blue","lightBlue","cyan","teal","green","lightGreen","lime","yellow","amber","orange","deepOrange","brown","blueGrey","black"],yr=["900","700","500","300","100"],Ui=(()=>{const ze=[];return _i.forEach(an=>{let $n=[];an.toLowerCase()==="black"||an.toLowerCase()==="white"?$n=$n.concat(["#000000","#FFFFFF"]):yr.forEach(Ds=>{const Eo=Ti[an][Ds];$n.push(Eo.toUpperCase())}),ze.push($n)}),ze})();var Es={name:"Swatches",mixins:[Z],props:{palette:{type:Array,default(){return Ui}}},computed:{pick(){return this.colors.hex}},methods:{equal(ze){return ze.toLowerCase()===this.colors.hex.toLowerCase()},handlerClick(ze){this.colorChange({hex:ze,source:"hex"})}}};i(193);var Hn=(0,q.Z)(Es,[["render",jo]]);const Cs={role:"heading",class:"vc-ps-head"},_r={class:"vc-ps-body"},fn={class:"vc-ps-saturation-wrap"},Xt={class:"vc-ps-hue-wrap"},Ii=(0,h.createElementVNode)("div",{class:"vc-ps-hue-pointer"},[(0,h.createElementVNode)("i",{class:"vc-ps-hue-pointer--left"}),(0,h.createElementVNode)("i",{class:"vc-ps-hue-pointer--right"})],-1),kl={class:"vc-ps-previews"},ll={class:"vc-ps-previews__label"},_o={class:"vc-ps-previews__swatches"},Qn=["aria-label"],js=["aria-label"],Ao={class:"vc-ps-previews__label"},Tr={key:0,class:"vc-ps-actions"},Go=["aria-label"],hr=["aria-label"],Ai={class:"vc-ps-fields"},fc=(0,h.createElementVNode)("div",{class:"vc-ps-fields__divider"},null,-1),tr=(0,h.createElementVNode)("div",{class:"vc-ps-fields__divider"},null,-1);function xl(ze,an,$n,Ds,Eo,Yt){const Ys=(0,h.resolveComponent)("saturation"),ko=(0,h.resolveComponent)("hue"),ei=(0,h.resolveComponent)("ed-in");return(0,h.openBlock)(),(0,h.createElementBlock)("div",{role:"application","aria-label":"PhotoShop color picker",class:(0,h.normalizeClass)(["vc-photoshop",$n.disableFields?"vc-photoshop__disable-fields":""])},[(0,h.createElementVNode)("div",Cs,(0,h.toDisplayString)($n.head),1),(0,h.createElementVNode)("div",_r,[(0,h.createElementVNode)("div",fn,[(0,h.createVNode)(Ys,{modelValue:ze.colors,"onUpdate:modelValue":an[0]||(an[0]=Pi=>ze.colors=Pi),onChange:Yt.childChange},null,8,["modelValue","onChange"])]),(0,h.createElementVNode)("div",Xt,[(0,h.createVNode)(ko,{modelValue:ze.colors,"onUpdate:modelValue":an[1]||(an[1]=Pi=>ze.colors=Pi),onChange:Yt.childChange,direction:"vertical"},{default:(0,h.withCtx)(()=>[Ii]),_:1},8,["modelValue","onChange"])]),(0,h.createElementVNode)("div",{class:(0,h.normalizeClass)(["vc-ps-controls",$n.disableFields?"vc-ps-controls__disable-fields":""])},[(0,h.createElementVNode)("div",kl,[(0,h.createElementVNode)("div",ll,(0,h.toDisplayString)($n.newLabel),1),(0,h.createElementVNode)("div",_o,[(0,h.createElementVNode)("div",{class:"vc-ps-previews__pr-color","aria-label":"New color is ".concat(ze.colors.hex),style:(0,h.normalizeStyle)({background:ze.colors.hex})},null,12,Qn),(0,h.createElementVNode)("div",{class:"vc-ps-previews__pr-color","aria-label":"Current color is ".concat(Eo.currentColor),style:(0,h.normalizeStyle)({background:Eo.currentColor}),onClick:an[2]||(an[2]=(...Pi)=>Yt.clickCurrentColor&&Yt.clickCurrentColor(...Pi))},null,12,js)]),(0,h.createElementVNode)("div",Ao,(0,h.toDisplayString)($n.currentLabel),1)]),$n.disableFields?(0,h.createCommentVNode)("",!0):((0,h.openBlock)(),(0,h.createElementBlock)("div",Tr,[(0,h.createElementVNode)("div",{class:"vc-ps-ac-btn",role:"button","aria-label":$n.acceptLabel,onClick:an[3]||(an[3]=(...Pi)=>Yt.handleAccept&&Yt.handleAccept(...Pi))},(0,h.toDisplayString)($n.acceptLabel),9,Go),(0,h.createElementVNode)("div",{class:"vc-ps-ac-btn",role:"button","aria-label":$n.cancelLabel,onClick:an[4]||(an[4]=(...Pi)=>Yt.handleCancel&&Yt.handleCancel(...Pi))},(0,h.toDisplayString)($n.cancelLabel),9,hr),(0,h.createElementVNode)("div",Ai,[(0,h.createVNode)(ei,{label:"h",desc:"°",modelValue:Yt.hsv.h,onChange:Yt.inputChange},null,8,["modelValue","onChange"]),(0,h.createVNode)(ei,{label:"s",desc:"%",modelValue:Yt.hsv.s,max:100,onChange:Yt.inputChange},null,8,["modelValue","onChange"]),(0,h.createVNode)(ei,{label:"v",desc:"%",modelValue:Yt.hsv.v,max:100,onChange:Yt.inputChange},null,8,["modelValue","onChange"]),fc,(0,h.createVNode)(ei,{label:"r",modelValue:ze.colors.rgba.r,onChange:Yt.inputChange},null,8,["modelValue","onChange"]),(0,h.createVNode)(ei,{label:"g",modelValue:ze.colors.rgba.g,onChange:Yt.inputChange},null,8,["modelValue","onChange"]),(0,h.createVNode)(ei,{label:"b",modelValue:ze.colors.rgba.b,onChange:Yt.inputChange},null,8,["modelValue","onChange"]),tr,(0,h.createVNode)(ei,{label:"#",class:"vc-ps-fields__hex",modelValue:Yt.hex,onChange:Yt.inputChange},null,8,["modelValue","onChange"])]),$n.hasResetButton?((0,h.openBlock)(),(0,h.createElementBlock)("div",{key:0,class:"vc-ps-ac-btn","aria-label":"reset",onClick:an[5]||(an[5]=(...Pi)=>Yt.handleReset&&Yt.handleReset(...Pi))},(0,h.toDisplayString)($n.resetLabel),1)):(0,h.createCommentVNode)("",!0)]))],2)])],2)}const cl=(0,h.createElementVNode)("div",{class:"vc-saturation--white"},null,-1),gr=(0,h.createElementVNode)("div",{class:"vc-saturation--black"},null,-1),ii=[(0,h.createElementVNode)("div",{class:"vc-saturation-circle"},null,-1)];function Mu(ze,an,$n,Ds,Eo,Yt){return(0,h.openBlock)(),(0,h.createElementBlock)("div",{class:"vc-saturation",style:(0,h.normalizeStyle)({background:Yt.bgColor}),ref:"container",onMousedown:an[0]||(an[0]=(...Ys)=>Yt.handleMouseDown&&Yt.handleMouseDown(...Ys)),onTouchmove:an[1]||(an[1]=(...Ys)=>Yt.handleChange&&Yt.handleChange(...Ys)),onTouchstart:an[2]||(an[2]=(...Ys)=>Yt.handleChange&&Yt.handleChange(...Ys))},[cl,gr,(0,h.createElementVNode)("div",{class:"vc-saturation-pointer",style:(0,h.normalizeStyle)({top:Yt.pointerTop,left:Yt.pointerLeft})},ii,4)],36)}var Ac=i(9428),ba=i.n(Ac),ar=i(9289),zf={name:"Saturation",props:{modelValue:Object},computed:{colors(){return this.modelValue},bgColor(){return"hsl(".concat(this.colors.hsv.h,", 100%, 50%)")},pointerTop(){return-(this.colors.hsv.v*100)+1+100+"%"},pointerLeft(){return this.colors.hsv.s*100+"%"}},methods:{throttle:ar((ze,an)=>{ze(an)},20,{leading:!0,trailing:!1}),handleChange(ze,an){!an&&ze.preventDefault();const $n=this.$refs.container;if(!$n)return;const Ds=$n.clientWidth,Eo=$n.clientHeight,Yt=$n.getBoundingClientRect().left+window.pageXOffset,Ys=$n.getBoundingClientRect().top+window.pageYOffset,ko=ze.pageX||(ze.touches?ze.touches[0].pageX:0),ei=ze.pageY||(ze.touches?ze.touches[0].pageY:0),Pi=ba()(ko-Yt,0,Ds),ji=ba()(ei-Ys,0,Eo),Ko=Pi/Ds,sf=ba()(-(ji/Eo)+1,0,1);this.throttle(this.onChange,{h:this.colors.hsv.h,s:Ko,v:sf,a:this.colors.hsv.a,source:"hsva"})},onChange(ze){this.$emit("change",ze)},handleMouseDown(ze){window.addEventListener("mousemove",this.handleChange),window.addEventListener("mouseup",this.handleChange),window.addEventListener("mouseup",this.handleMouseUp)},handleMouseUp(ze){this.unbindEventListeners()},unbindEventListeners(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}}};i(5233);var Nu=(0,q.Z)(zf,[["render",Mu]]),co={name:"Photoshop",mixins:[Z],props:{head:{type:String,default:"Color Picker"},disableFields:{type:Boolean,default:!1},hasResetButton:{type:Boolean,default:!1},acceptLabel:{type:String,default:"OK"},cancelLabel:{type:String,default:"Cancel"},resetLabel:{type:String,default:"Reset"},newLabel:{type:String,default:"new"},currentLabel:{type:String,default:"current"}},components:{saturation:Nu,hue:pt,"ed-in":lo},data(){return{currentColor:"#FFF"}},computed:{hsv(){const ze=this.colors.hsv;return{h:ze.h.toFixed(),s:(ze.s*100).toFixed(),v:(ze.v*100).toFixed()}},hex(){const ze=this.colors.hex;return ze&&ze.replace("#","")}},created(){this.currentColor=this.colors.hex},methods:{childChange(ze){this.colorChange(ze)},inputChange(ze){ze&&(ze["#"]?this.isValidHex(ze["#"])&&this.colorChange({hex:ze["#"],source:"hex"}):ze.r||ze.g||ze.b||ze.a?this.colorChange({r:ze.r||this.colors.rgba.r,g:ze.g||this.colors.rgba.g,b:ze.b||this.colors.rgba.b,a:ze.a||this.colors.rgba.a,source:"rgba"}):(ze.h||ze.s||ze.v)&&this.colorChange({h:ze.h||this.colors.hsv.h,s:ze.s/100||this.colors.hsv.s,v:ze.v/100||this.colors.hsv.v,source:"hsv"}))},clickCurrentColor(){this.colorChange({hex:this.currentColor,source:"hex"})},handleAccept(){this.$emit("ok")},handleCancel(){this.$emit("cancel")},handleReset(){this.$emit("reset")}}};i(1902);var Fr=(0,q.Z)(co,[["render",xl]]);const zi={class:"vc-sketch-saturation-wrap"},lr={class:"vc-sketch-controls"},pc={class:"vc-sketch-sliders"},ai={class:"vc-sketch-hue-wrap"},mu={key:0,class:"vc-sketch-alpha-wrap"},jl={class:"vc-sketch-color-wrap"},bs=["aria-label"],Hs={key:0,class:"vc-sketch-field"},No={class:"vc-sketch-field--double"},So={class:"vc-sketch-field--single"},Si={class:"vc-sketch-field--single"},Ja={class:"vc-sketch-field--single"},ad={key:0,class:"vc-sketch-field--single"},Wf={class:"vc-sketch-presets",role:"group","aria-label":"A color preset, pick one to set as current color"},hu=["aria-label","onClick"],za=["aria-label","onClick"];function ia(ze,an,$n,Ds,Eo,Yt){const Ys=(0,h.resolveComponent)("saturation"),ko=(0,h.resolveComponent)("hue"),ei=(0,h.resolveComponent)("alpha"),Pi=(0,h.resolveComponent)("checkboard"),ji=(0,h.resolveComponent)("ed-in");return(0,h.openBlock)(),(0,h.createElementBlock)("div",{role:"application","aria-label":"Sketch color picker",class:(0,h.normalizeClass)(["vc-sketch",$n.disableAlpha?"vc-sketch__disable-alpha":""])},[(0,h.createElementVNode)("div",zi,[(0,h.createVNode)(Ys,{modelValue:ze.colors,"onUpdate:modelValue":an[0]||(an[0]=Ko=>ze.colors=Ko),onChange:Yt.childChange},null,8,["modelValue","onChange"])]),(0,h.createElementVNode)("div",lr,[(0,h.createElementVNode)("div",pc,[(0,h.createElementVNode)("div",ai,[(0,h.createVNode)(ko,{modelValue:ze.colors,"onUpdate:modelValue":an[1]||(an[1]=Ko=>ze.colors=Ko),onChange:Yt.childChange},null,8,["modelValue","onChange"])]),$n.disableAlpha?(0,h.createCommentVNode)("",!0):((0,h.openBlock)(),(0,h.createElementBlock)("div",mu,[(0,h.createVNode)(ei,{modelValue:ze.colors,"onUpdate:modelValue":an[2]||(an[2]=Ko=>ze.colors=Ko),onChange:Yt.childChange},null,8,["modelValue","onChange"])]))]),(0,h.createElementVNode)("div",jl,[(0,h.createElementVNode)("div",{"aria-label":"Current color is ".concat(Yt.activeColor),class:"vc-sketch-active-color",style:(0,h.normalizeStyle)({background:Yt.activeColor})},null,12,bs),(0,h.createVNode)(Pi)])]),$n.disableFields?(0,h.createCommentVNode)("",!0):((0,h.openBlock)(),(0,h.createElementBlock)("div",Hs,[(0,h.createElementVNode)("div",No,[(0,h.createVNode)(ji,{label:"hex",modelValue:Yt.hex,onChange:Yt.inputChange},null,8,["modelValue","onChange"])]),(0,h.createElementVNode)("div",So,[(0,h.createVNode)(ji,{label:"r",modelValue:ze.colors.rgba.r,onChange:Yt.inputChange},null,8,["modelValue","onChange"])]),(0,h.createElementVNode)("div",Si,[(0,h.createVNode)(ji,{label:"g",modelValue:ze.colors.rgba.g,onChange:Yt.inputChange},null,8,["modelValue","onChange"])]),(0,h.createElementVNode)("div",Ja,[(0,h.createVNode)(ji,{label:"b",modelValue:ze.colors.rgba.b,onChange:Yt.inputChange},null,8,["modelValue","onChange"])]),$n.disableAlpha?(0,h.createCommentVNode)("",!0):((0,h.openBlock)(),(0,h.createElementBlock)("div",ad,[(0,h.createVNode)(ji,{label:"a",modelValue:ze.colors.a,"arrow-offset":.01,max:1,onChange:Yt.inputChange},null,8,["modelValue","arrow-offset","onChange"])]))])),(0,h.createElementVNode)("div",Wf,[((0,h.openBlock)(!0),(0,h.createElementBlock)(h.Fragment,null,(0,h.renderList)($n.presetColors,Ko=>((0,h.openBlock)(),(0,h.createElementBlock)(h.Fragment,null,[ze.isTransparent(Ko)?((0,h.openBlock)(),(0,h.createElementBlock)("div",{key:"else-"+Ko,"aria-label":"Color:"+Ko,class:"vc-sketch-presets-color",onClick:sf=>Yt.handlePreset(Ko)},[(0,h.createVNode)(Pi)],8,za)):((0,h.openBlock)(),(0,h.createElementBlock)("div",{class:"vc-sketch-presets-color","aria-label":"Color:"+Ko,key:"if-"+Ko,style:(0,h.normalizeStyle)({background:Ko}),onClick:sf=>Yt.handlePreset(Ko)},null,12,hu))],64))),256))])],2)}const qc={class:"vc-alpha"},jf={class:"vc-alpha-checkboard-wrap"},Qa=[(0,h.createElementVNode)("div",{class:"vc-alpha-picker"},null,-1)];function Te(ze,an,$n,Ds,Eo,Yt){const Ys=(0,h.resolveComponent)("checkboard");return(0,h.openBlock)(),(0,h.createElementBlock)("div",qc,[(0,h.createElementVNode)("div",jf,[(0,h.createVNode)(Ys)]),(0,h.createElementVNode)("div",{class:"vc-alpha-gradient",style:(0,h.normalizeStyle)({background:Yt.gradientColor})},null,4),(0,h.createElementVNode)("div",{class:"vc-alpha-container",ref:"container",onMousedown:an[0]||(an[0]=(...ko)=>Yt.handleMouseDown&&Yt.handleMouseDown(...ko)),onTouchmove:an[1]||(an[1]=(...ko)=>Yt.handleChange&&Yt.handleChange(...ko)),onTouchstart:an[2]||(an[2]=(...ko)=>Yt.handleChange&&Yt.handleChange(...ko))},[(0,h.createElementVNode)("div",{class:"vc-alpha-pointer",style:(0,h.normalizeStyle)({left:Yt.colors.a*100+"%"})},Qa,4)],544)])}function We(ze,an,$n,Ds,Eo,Yt){return(0,h.openBlock)(),(0,h.createElementBlock)("div",{class:"vc-checkerboard",style:(0,h.normalizeStyle)(Yt.bgStyle)},null,4)}const rt={};var zt={name:"Checkboard",props:{size:{type:[Number,String],default:8},white:{type:String,default:"#fff"},grey:{type:String,default:"#e6e6e6"}},computed:{bgStyle(){return{"background-image":"url("+jt(this.white,this.grey,this.size)+")"}}}};function pn(ze,an,$n){if(typeof document>"u")return null;const Ds=document.createElement("canvas");Ds.width=Ds.height=$n*2;const Eo=Ds.getContext("2d");return Eo?(Eo.fillStyle=ze,Eo.fillRect(0,0,Ds.width,Ds.height),Eo.fillStyle=an,Eo.fillRect(0,0,$n,$n),Eo.translate($n,$n),Eo.fillRect(0,0,$n,$n),Ds.toDataURL()):null}function jt(ze,an,$n){const Ds=ze+","+an+","+$n;if(rt[Ds])return rt[Ds];{const Eo=pn(ze,an,$n);return rt[Ds]=Eo,Eo}}i(3205);var eo=(0,q.Z)(zt,[["render",We]]),Us={name:"Alpha",props:{modelValue:Object,onChange:Function},components:{checkboard:eo},computed:{colors(){return this.modelValue},gradientColor(){const ze=this.colors.rgba,an=[ze.r,ze.g,ze.b].join(",");return"linear-gradient(to right, rgba("+an+", 0) 0%, rgba("+an+", 1) 100%)"}},methods:{handleChange(ze,an){!an&&ze.preventDefault();const $n=this.$refs.container;if(!$n)return;const Ds=$n.clientWidth,Eo=$n.getBoundingClientRect().left+window.pageXOffset,Ys=(ze.pageX||(ze.touches?ze.touches[0].pageX:0))-Eo;let ko;Ys<0?ko=0:Ys>Ds?ko=1:ko=Math.round(Ys*100/Ds)/100,this.colors.a!==ko&&this.$emit("change",{h:this.colors.hsl.h,s:this.colors.hsl.s,l:this.colors.hsl.l,a:ko,source:"rgba"})},handleMouseDown(ze){this.handleChange(ze,!0),window.addEventListener("mousemove",this.handleChange),window.addEventListener("mouseup",this.handleMouseUp)},handleMouseUp(){this.unbindEventListeners()},unbindEventListeners(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}}};i(6320);var ke=(0,q.Z)(Us,[["render",Te]]);const Je=["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF","rgba(0,0,0,0)"];var xt={name:"Sketch",mixins:[Z],components:{saturation:Nu,hue:pt,alpha:ke,"ed-in":lo,checkboard:eo},props:{presetColors:{type:Array,default(){return Je}},disableAlpha:{type:Boolean,default:!1},disableFields:{type:Boolean,default:!1}},computed:{hex(){let ze;return this.colors.a<1?ze=this.colors.hex8:ze=this.colors.hex,ze.replace("#","")},activeColor(){const ze=this.colors.rgba;return"rgba("+[ze.r,ze.g,ze.b,ze.a].join(",")+")"}},methods:{handlePreset(ze){this.colorChange({hex:ze,source:"hex"})},childChange(ze){this.colorChange(ze)},inputChange(ze){ze&&(ze.hex?this.isValidHex(ze.hex)&&this.colorChange({hex:ze.hex,source:"hex"}):(ze.r||ze.g||ze.b||ze.a)&&this.colorChange({r:ze.r||this.colors.rgba.r,g:ze.g||this.colors.rgba.g,b:ze.b||this.colors.rgba.b,a:ze.a||this.colors.rgba.a,source:"rgba"}))}}};i(5815);var wn=(0,q.Z)(xt,[["render",ia]]);const Vo={class:"vc-chrome-saturation-wrap"},Wa={class:"vc-chrome-body"},Gt={class:"vc-chrome-controls"},Zl={class:"vc-chrome-color-wrap"},Er=["aria-label"],ef={class:"vc-chrome-sliders"},Oi={class:"vc-chrome-hue-wrap"},fo={key:0,class:"vc-chrome-alpha-wrap"},mc={key:0,class:"vc-chrome-fields-wrap"},Ia={class:"vc-chrome-fields"},Oc={class:"vc-chrome-field"},Wi={class:"vc-chrome-fields"},Dd={class:"vc-chrome-field"},p0={class:"vc-chrome-field"},Hv={class:"vc-chrome-field"},jr={key:0,class:"vc-chrome-field"},Zb={class:"vc-chrome-fields"},ja={class:"vc-chrome-field"},hc={class:"vc-chrome-field"},Gc={class:"vc-chrome-field"},Zf={key:0,class:"vc-chrome-field"},Uv={class:"vc-chrome-toggle-icon"},Zp=[(0,h.createElementVNode)("path",{fill:"#333",d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"},null,-1)],tf={class:"vc-chrome-toggle-icon-highlight"};function nf(ze,an,$n,Ds,Eo,Yt){const Ys=(0,h.resolveComponent)("saturation"),ko=(0,h.resolveComponent)("checkboard"),ei=(0,h.resolveComponent)("hue"),Pi=(0,h.resolveComponent)("alpha"),ji=(0,h.resolveComponent)("ed-in");return(0,h.openBlock)(),(0,h.createElementBlock)("div",{role:"application","aria-label":"Chrome color picker",class:(0,h.normalizeClass)(["vc-chrome",$n.disableAlpha?"vc-chrome__disable-alpha":""])},[(0,h.createElementVNode)("div",Vo,[(0,h.createVNode)(Ys,{modelValue:ze.colors,"onUpdate:modelValue":an[0]||(an[0]=Ko=>ze.colors=Ko),onChange:Yt.childChange},null,8,["modelValue","onChange"])]),(0,h.createElementVNode)("div",Wa,[(0,h.createElementVNode)("div",Gt,[(0,h.createElementVNode)("div",Zl,[(0,h.createElementVNode)("div",{"aria-label":"current color is ".concat(ze.colors.hex),class:"vc-chrome-active-color",style:(0,h.normalizeStyle)({background:Yt.activeColor})},null,12,Er),$n.disableAlpha?(0,h.createCommentVNode)("",!0):((0,h.openBlock)(),(0,h.createBlock)(ko,{key:0}))]),(0,h.createElementVNode)("div",ef,[(0,h.createElementVNode)("div",Oi,[(0,h.createVNode)(ei,{modelValue:ze.colors,"onUpdate:modelValue":an[1]||(an[1]=Ko=>ze.colors=Ko),onChange:Yt.childChange},null,8,["modelValue","onChange"])]),$n.disableAlpha?(0,h.createCommentVNode)("",!0):((0,h.openBlock)(),(0,h.createElementBlock)("div",fo,[(0,h.createVNode)(Pi,{modelValue:ze.colors,"onUpdate:modelValue":an[2]||(an[2]=Ko=>ze.colors=Ko),onChange:Yt.childChange},null,8,["modelValue","onChange"])]))])]),$n.disableFields?(0,h.createCommentVNode)("",!0):((0,h.openBlock)(),(0,h.createElementBlock)("div",mc,[(0,h.withDirectives)((0,h.createElementVNode)("div",Ia,[(0,h.createElementVNode)("div",Oc,[Yt.hasAlpha?(0,h.createCommentVNode)("",!0):((0,h.openBlock)(),(0,h.createBlock)(ji,{key:0,label:"hex",modelValue:ze.colors.hex,onChange:Yt.inputChange},null,8,["modelValue","onChange"])),Yt.hasAlpha?((0,h.openBlock)(),(0,h.createBlock)(ji,{key:1,label:"hex",modelValue:ze.colors.hex8,onChange:Yt.inputChange},null,8,["modelValue","onChange"])):(0,h.createCommentVNode)("",!0)])],512),[[h.vShow,Eo.fieldsIndex===0]]),(0,h.withDirectives)((0,h.createElementVNode)("div",Wi,[(0,h.createElementVNode)("div",Dd,[(0,h.createVNode)(ji,{label:"r",modelValue:ze.colors.rgba.r,onChange:Yt.inputChange},null,8,["modelValue","onChange"])]),(0,h.createElementVNode)("div",p0,[(0,h.createVNode)(ji,{label:"g",modelValue:ze.colors.rgba.g,onChange:Yt.inputChange},null,8,["modelValue","onChange"])]),(0,h.createElementVNode)("div",Hv,[(0,h.createVNode)(ji,{label:"b",modelValue:ze.colors.rgba.b,onChange:Yt.inputChange},null,8,["modelValue","onChange"])]),$n.disableAlpha?(0,h.createCommentVNode)("",!0):((0,h.openBlock)(),(0,h.createElementBlock)("div",jr,[(0,h.createVNode)(ji,{label:"a",modelValue:ze.colors.a,"arrow-offset":.01,max:1,onChange:Yt.inputChange},null,8,["modelValue","arrow-offset","onChange"])]))],512),[[h.vShow,Eo.fieldsIndex===1]]),(0,h.withDirectives)((0,h.createElementVNode)("div",Zb,[(0,h.createElementVNode)("div",ja,[(0,h.createVNode)(ji,{label:"h",modelValue:Yt.hsl.h,onChange:Yt.inputChange},null,8,["modelValue","onChange"])]),(0,h.createElementVNode)("div",hc,[(0,h.createVNode)(ji,{label:"s",modelValue:Yt.hsl.s,onChange:Yt.inputChange},null,8,["modelValue","onChange"])]),(0,h.createElementVNode)("div",Gc,[(0,h.createVNode)(ji,{label:"l",modelValue:Yt.hsl.l,onChange:Yt.inputChange},null,8,["modelValue","onChange"])]),$n.disableAlpha?(0,h.createCommentVNode)("",!0):((0,h.openBlock)(),(0,h.createElementBlock)("div",Zf,[(0,h.createVNode)(ji,{label:"a",modelValue:ze.colors.a,"arrow-offset":.01,max:1,onChange:Yt.inputChange},null,8,["modelValue","arrow-offset","onChange"])]))],512),[[h.vShow,Eo.fieldsIndex===2]]),(0,h.createElementVNode)("div",{class:"vc-chrome-toggle-btn",role:"button","aria-label":"Change another color definition",onClick:an[6]||(an[6]=(...Ko)=>Yt.toggleViews&&Yt.toggleViews(...Ko))},[(0,h.createElementVNode)("div",Uv,[((0,h.openBlock)(),(0,h.createElementBlock)("svg",{style:{width:"24px",height:"24px"},viewBox:"0 0 24 24",onMouseover:an[3]||(an[3]=(...Ko)=>Yt.showHighlight&&Yt.showHighlight(...Ko)),onMouseenter:an[4]||(an[4]=(...Ko)=>Yt.showHighlight&&Yt.showHighlight(...Ko)),onMouseout:an[5]||(an[5]=(...Ko)=>Yt.hideHighlight&&Yt.hideHighlight(...Ko))},Zp,32))]),(0,h.withDirectives)((0,h.createElementVNode)("div",tf,null,512),[[h.vShow,Eo.highlight]])])]))])],2)}var Wh={name:"Chrome",mixins:[Z],props:{disableAlpha:{type:Boolean,default:!1},disableFields:{type:Boolean,default:!1}},components:{saturation:Nu,hue:pt,alpha:ke,"ed-in":lo,checkboard:eo},data(){return{fieldsIndex:0,highlight:!1}},computed:{hsl(){const{h:ze,s:an,l:$n}=this.colors.hsl;return{h:ze.toFixed(),s:"".concat((an*100).toFixed(),"%"),l:"".concat(($n*100).toFixed(),"%")}},activeColor(){const ze=this.colors.rgba;return"rgba("+[ze.r,ze.g,ze.b,ze.a].join(",")+")"},hasAlpha(){return this.colors.a<1}},methods:{childChange(ze){this.colorChange(ze)},inputChange(ze){if(ze){if(ze.hex)this.isValidHex(ze.hex)&&this.colorChange({hex:ze.hex,source:"hex"});else if(ze.r||ze.g||ze.b||ze.a)this.colorChange({r:ze.r||this.colors.rgba.r,g:ze.g||this.colors.rgba.g,b:ze.b||this.colors.rgba.b,a:ze.a||this.colors.rgba.a,source:"rgba"});else if(ze.h||ze.s||ze.l){const an=ze.s?ze.s.replace("%","")/100:this.colors.hsl.s,$n=ze.l?ze.l.replace("%","")/100:this.colors.hsl.l;this.colorChange({h:ze.h||this.colors.hsl.h,s:an,l:$n,source:"hsl"})}}},toggleViews(){if(this.fieldsIndex>=2){this.fieldsIndex=0;return}this.fieldsIndex++},showHighlight(){this.highlight=!0},hideHighlight(){this.highlight=!1}}};i(3647);var Aa=(0,q.Z)(Wh,[["render",nf]]);const qp=(0,h.createElementVNode)("div",{class:"vc-twitter-triangle-shadow"},null,-1),m0=(0,h.createElementVNode)("div",{class:"vc-twitter-triangle"},null,-1),qf={class:"vc-twitter-body"},Rc=["onClick"],el=(0,h.createElementVNode)("div",{class:"vc-twitter-hash"},"#",-1),Tl=(0,h.createElementVNode)("div",{class:"vc-twitter-clear"},null,-1);function ql(ze,an,$n,Ds,Eo,Yt){const Ys=(0,h.resolveComponent)("editable-input");return(0,h.openBlock)(),(0,h.createElementBlock)("div",{class:(0,h.normalizeClass)(["vc-twitter",{"vc-twitter-hide-triangle ":$n.triangle==="hide","vc-twitter-top-left-triangle ":$n.triangle==="top-left","vc-twitter-top-right-triangle ":$n.triangle==="top-right"}]),style:(0,h.normalizeStyle)({width:typeof $n.width=="number"?"".concat($n.width,"px"):$n.width})},[qp,m0,(0,h.createElementVNode)("div",qf,[((0,h.openBlock)(!0),(0,h.createElementBlock)(h.Fragment,null,(0,h.renderList)($n.defaultColors,(ko,ei)=>((0,h.openBlock)(),(0,h.createElementBlock)("span",{class:"vc-twitter-swatch",style:(0,h.normalizeStyle)({background:ko,boxShadow:"0 0 4px ".concat(Yt.equal(ko)?ko:"transparent")}),key:ei,onClick:Pi=>Yt.handlerClick(ko)},null,12,Rc))),128)),el,(0,h.createVNode)(Ys,{label:"#",modelValue:Yt.hex,onChange:Yt.inputChange},null,8,["modelValue","onChange"]),Tl])],6)}const ld=["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"];var Gp={name:"Twitter",mixins:[Z],components:{editableInput:lo},props:{width:{type:[String,Number],default:276},defaultColors:{type:Array,default(){return ld}},triangle:{default:"top-left",validator(ze){return["hide","top-left","top-right"].includes(ze)}}},computed:{hsv(){const ze=this.colors.hsv;return{h:ze.h.toFixed(),s:(ze.s*100).toFixed(),v:(ze.v*100).toFixed()}},hex(){const ze=this.colors.hex;return ze&&ze.replace("#","")}},methods:{equal(ze){return ze.toLowerCase()===this.colors.hex.toLowerCase()},handlerClick(ze){this.colorChange({hex:ze,source:"hex"})},inputChange(ze){ze&&(ze["#"]?this.isValidHex(ze["#"])&&this.colorChange({hex:ze["#"],source:"hex"}):ze.r||ze.g||ze.b||ze.a?this.colorChange({r:ze.r||this.colors.rgba.r,g:ze.g||this.colors.rgba.g,b:ze.b||this.colors.rgba.b,a:ze.a||this.colors.rgba.a,source:"rgba"}):(ze.h||ze.s||ze.v)&&this.colorChange({h:ze.h||this.colors.hsv.h,s:ze.s/100||this.colors.hsv.s,v:ze.v/100||this.colors.hsv.v,source:"hsv"}))}}};i(1113);var Hm=(0,q.Z)(Gp,[["render",ql]]);const Y1=d.i8,Gf={version:Y1,Compact:ue,Grayscale:Ue,Twitter:Hm,Material:Xs,Slider:ts,Swatches:Hn,Photoshop:Fr,Sketch:wn,Chrome:Aa,Alpha:ke,Checkboard:eo,EditableInput:lo,Hue:pt,Saturation:Nu,ColorMixin:Z};typeof process=="object"&&String(process)==="[object process]"||(window.VueColor=Gf);var X1=Gf,qb=X1})(),e.exports=a})()}(Ite)),Ite.exports}var nje=tje();const sje={name:"FieldColor",components:{"color-picker":nje.Chrome,Tooltip:Tc,HelpButton:Id,FieldError:Gd},extends:Lm,methods:{setValue:function(e){e.hex!==this.currentValue&&(this.currentValue=e.hex)}}},oje={class:"pkpFormField pkpFormField--color"},rje={class:"pkpFormField__heading--legend"},ije={class:"aria-hidden align-middle"},aje={class:"-screenReader"},lje={key:1,class:"align-middle"},cje={key:2,class:"pkpFormFieldLabel__required"},uje={class:"-screenReader"},dje=["id"],fje=["id"],pje={class:"pkpFormField__control"};function mje(e,t,n,i,a,l){const f=Xe("Tooltip"),d=Xe("HelpButton"),h=Xe("color-picker"),b=Xe("FieldError"),S=Hr("strip-unsafe-html");return L(),Q("fieldset",oje,[H("legend",rje,[e.localeLabel?(L(),Q(bt,{key:0},[H("span",ije,ee(e.localeLabel),1),t[0]||(t[0]=D()),H("span",aje,ee(e.multilingualLabel),1)],64)):(L(),Q("span",lje,ee(e.label),1)),t[2]||(t[2]=D()),e.isRequired?(L(),Q("span",cje,[t[1]||(t[1]=D("\n *\n ")),H("span",uje,ee(e.t("common.required")),1)])):we("",!0),t[3]||(t[3]=D()),e.isPrimaryLocale&&e.tooltip?(L(),Ee(f,{key:3,"aria-hidden":"true",tooltip:e.tooltip,label:""},null,8,["tooltip"])):we("",!0),t[4]||(t[4]=D()),e.isPrimaryLocale&&e.tooltip?Gn((L(),Q("span",{key:4,id:e.describedByTooltipId,class:"-screenReader"},null,8,dje)),[[S,e.tooltip]]):we("",!0),t[5]||(t[5]=D()),e.isPrimaryLocale&&e.helpTopic?(L(),Ee(d,{key:5,id:e.describedByHelpId,topic:e.helpTopic,section:e.helpSection,label:e.t("help.help")},null,8,["id","topic","section","label"])):we("",!0)]),t[7]||(t[7]=D()),e.isPrimaryLocale&&e.description?Gn((L(),Q("div",{key:0,id:e.describedByDescriptionId,class:"pkpFormField__description semantic-defaults"},null,8,fje)),[[S,e.description]]):we("",!0),t[8]||(t[8]=D()),H("div",pje,[pe(h,{"model-value":e.currentValue,"disable-alpha":!0,"onUpdate:modelValue":l.setValue},null,8,["model-value","onUpdate:modelValue"]),t[6]||(t[6]=D()),e.errors&&e.errors.length?(L(),Ee(b,{key:0,id:e.describedByErrorId,messages:e.errors},null,8,["id","messages"])):we("",!0)])])}const I3e=wt(sje,[["render",mje]]);function hje(e){const{name:t,label:n=null,identifier:i=null,...a}=e;return{value:e,label:n!=null?n:t,identifier:i,...a?{extraItems:a}:{}}}const A3e={name:"FieldControlledVocab",extends:lC,props:{allowCustom:{type:Boolean,default:!0}},data(){return{allSuggestions:[],suggestionsLoading:!1}},methods:{getSuggestions(){if(!this.inputValue){this.suggestions=[];return}this.suggestionsLoading||(this.loadSuggestions(this.setSuggestions),this.setSuggestions())},loadSuggestions:Uh(function(e){var t;this.suggestionsLoading=!0,$.ajax({url:this.apiUrl,type:"GET",context:this,data:{term:(t=this.inputValue)!=null?t:null,...this.isMultilingual?{locale:this.localeKey}:{}},error(n){this.ajaxErrorCallback(n)},success(n){this.allSuggestions=n.map(i=>hje(i)),this.suggestionsLoading=!1,e&&e.apply(this)}})},250),selectSuggestion(e){e?this.select(e):this.inputValue&&this.select({value:{name:this.inputValue},label:this.inputValue})},setSuggestions:Uh(function(){const e=new RegExp(this.inputValue.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"gi");this.suggestions=this.allSuggestions.filter(t=>!this.inputValue||this.inputValue!==t.value.name&&t.value.name.match(e))},250)},watch:{value(e,t){!e||e===t||JSON.stringify(e)!==JSON.stringify(t)&&this.loadSuggestions(()=>{const n=this.isMultilingual?e[this.localeKey]:e;if(!Array.isArray(n)){this.setSelected([]);return}this.setSelected(this.allSuggestions.filter(i=>n.includes(i.value)))})}}},gje={name:"FieldPubId",components:{FormFieldLabel:i0,Tooltip:Tc,PkpButton:ms,Icon:Vs,FieldError:Gd,HelpButton:Id},extends:Lm,props:{assignIdLabel:{type:String,required:!0},clearIdLabel:{type:String,required:!0},contextInitials:{type:String,default(){return""}},isPForPress:{type:Boolean,default(){return!1}},issueNumber:{type:[String,Number],default(){return""}},issueVolume:{type:[String,Number],default(){return""}},missingPartsLabel:{type:String,required:!0},pages:{type:String,default(){return""}},pattern:{type:String,required:!0},prefix:{type:String,required:!0},publisherId:{type:String,default(){return""}},separator:{type:String,default(){return""}},submissionId:{type:Number,default(){return 0}},publicationId:{type:Number,default(){return 0}},year:{type:[String,Number],default(){return""}}},computed:{canGenerateId(){return(this.issueNumber||!this.pattern.includes("%i"))&&(this.issueVolume||!this.pattern.includes("%v"))&&(!this.isPForPress&&(this.contextInitials||!this.pattern.includes("%j"))&&(this.pages||!this.pattern.includes("%p"))||this.isPForPress&&(this.contextInitials||!this.pattern.includes("%j")))&&(this.publisherId||!this.pattern.includes("%x"))&&(this.submissionId||!this.pattern.includes("%a"))&&(this.submissionId||!this.pattern.includes("%m"))&&(this.publicationId||!this.pattern.includes("%b"))&&(this.year||!this.pattern.includes("%Y"))}},methods:{assignId(){this.currentValue=this.generateId()},generateId(){let e=this.prefix+this.separator+this.pattern.replace("%i",this.issueNumber).replace("%v",this.issueVolume).replace("%x",this.publisherId).replace("%Y",this.year);return this.isPForPress?e=e.replace("%p",this.contextInitials).replace("%m",this.submissionId):e=e.replace("%j",this.contextInitials).replace("%a",this.submissionId).replace("%b",this.publicationId).replace("%p",this.pages),e}}},vje={class:"pkpFormField pkpFormField--pubid"},bje={class:"pkpFormField__heading"},yje=["id"],_je=["id"],Sje={class:"pkpFormField__control"},Cje=["id","name","aria-describedby","aria-invalid","disabled","required"],wje=["id"],Eje={class:"align-middle"};function kje(e,t,n,i,a,l){const f=Xe("FormFieldLabel"),d=Xe("Tooltip"),h=Xe("HelpButton"),b=Xe("PkpButton"),S=Xe("Icon"),k=Xe("FieldError"),T=Hr("strip-unsafe-html");return L(),Q("div",vje,[H("div",bje,[pe(f,{"control-id":e.controlId,label:e.label,"is-required":e.isRequired,"required-label":e.t("common.required"),class:"align-middle"},null,8,["control-id","label","is-required","required-label"]),t[2]||(t[2]=D()),e.tooltip?(L(),Ee(d,{key:0,"aria-hidden":"true",tooltip:e.tooltip,label:""},null,8,["tooltip"])):we("",!0),t[3]||(t[3]=D()),e.tooltip?Gn((L(),Q("span",{key:1,id:e.describedByTooltipId,class:"-screenReader"},null,8,yje)),[[T,e.tooltip]]):we("",!0),t[4]||(t[4]=D()),e.helpTopic?(L(),Ee(h,{key:2,id:e.describedByHelpId,topic:e.helpTopic,section:e.helpSection,label:e.t("help.help")},null,8,["id","topic","section","label"])):we("",!0)]),t[9]||(t[9]=D()),e.description?Gn((L(),Q("div",{key:0,id:e.describedByDescriptionId,class:"pkpFormField__description semantic-defaults"},null,8,_je)),[[T,e.description]]):we("",!0),t[10]||(t[10]=D()),H("div",Sje,[Gn(H("input",{id:e.controlId,ref:"input","onUpdate:modelValue":t[0]||(t[0]=O=>e.currentValue=O),class:"pkpFormField__input pkpFormField--text__input pkpFormField--pubid__input",name:e.localizedName,"aria-describedby":e.describedByIds,"aria-invalid":e.errors&&e.errors.length,disabled:!!n.pattern,required:e.isRequired},null,8,Cje),[[lu,e.currentValue]]),t[6]||(t[6]=D()),n.pattern&&l.canGenerateId&&!e.currentValue?(L(),Ee(b,{key:0,class:"pkpFormField--pubid__button",onClick:l.assignId},{default:te(()=>[D(ee(n.assignIdLabel),1)]),_:1},8,["onClick"])):n.pattern&&e.currentValue?(L(),Ee(b,{key:1,class:"pkpFormField--pubid__button","is-warnable":!0,onClick:t[1]||(t[1]=()=>e.currentValue="")},{default:te(()=>[D(ee(n.clearIdLabel),1)]),_:1})):we("",!0),t[7]||(t[7]=D()),n.pattern&&!l.canGenerateId&&!e.currentValue?(L(),Q("div",{key:2,id:e.describedByDescriptionId,class:"mt-1 text-base-normal"},[pe(S,{icon:"Error",class:"h-4 w-4",inline:!0}),t[5]||(t[5]=D()),H("span",Eje,ee(n.missingPartsLabel),1)],8,wje)):we("",!0),t[8]||(t[8]=D()),e.errors&&e.errors.length?(L(),Ee(k,{key:3,id:e.describedByErrorId,messages:e.errors},null,8,["id","messages"])):we("",!0)])])}const Ate=wt(gje,[["render",kje]]),xje={name:"FieldHtml",components:{Tooltip:Tc,HelpButton:Id},extends:Lm},Tje={class:"pkpFormField pkpFormField--html"},Ije={class:"pkpFormField__heading"},Aje={class:"pkpFormFieldLabel align-middle"},Oje={key:1,class:"-screenReader"},Rje={class:"pkpFormField__control pkpFormField__control--html semantic-defaults"};function Dje(e,t,n,i,a,l){const f=Xe("Tooltip"),d=Xe("HelpButton"),h=Hr("strip-unsafe-html");return L(),Q("div",Tje,[H("div",Ije,[H("span",Aje,ee(e.label),1),t[0]||(t[0]=D()),e.tooltip?(L(),Ee(f,{key:0,"aria-hidden":"true",tooltip:e.tooltip,label:""},null,8,["tooltip"])):we("",!0),t[1]||(t[1]=D()),e.tooltip?Gn((L(),Q("span",Oje,null,512)),[[h,e.tooltip]]):we("",!0),t[2]||(t[2]=D()),e.helpTopic?(L(),Ee(d,{key:2,topic:e.helpTopic,section:e.helpSection,label:e.t("help.help")},null,8,["topic","section","label"])):we("",!0)]),t[3]||(t[3]=D()),Gn(H("div",Rje,null,512),[[h,e.description]])])}const O3e=wt(xje,[["render",Dje]]),Lje={name:"FieldMetadataSetting",components:{Tooltip:Tc,HelpButton:Id,FieldError:Gd},extends:aC,props:{disabledValue:{type:Number,required:!0},enabledOnlyValue:{type:String,required:!0},value:{type:[Number,String],required:!0},submissionOptions:{type:Array,required:!0}},data(){return{isEnabled:this.disabledValue!==this.value}},watch:{isEnabled:function(e,t){e!==t&&(this.selectedValue=e?this.enabledOnlyValue:this.disabledValue)}}},Pje={class:"pkpFormField pkpFormField--options pkpFormField--metadata"},Mje={class:"pkpFormField--options__legend"},Nje={class:"align-middle"},Fje=["id"],$je=["id"],Bje={class:"pkpFormField__control"},Vje=["value","aria-describedby","aria-invalid","disabled"],Hje={class:"pkpFormField--options__optionLabel"},Uje={key:0,class:"pkpFormField--metadata__submissionOptions"},zje=["value","aria-invalid","disabled"],Wje={class:"pkpFormField--options__optionLabel"};function jje(e,t,n,i,a,l){const f=Xe("Tooltip"),d=Xe("HelpButton"),h=Xe("FieldError"),b=Hr("strip-unsafe-html");return L(),Q("fieldset",Pje,[H("legend",Mje,[H("span",Nje,ee(e.label),1),t[2]||(t[2]=D()),e.tooltip?(L(),Ee(f,{key:0,"aria-hidden":"true",tooltip:e.tooltip,label:""},null,8,["tooltip"])):we("",!0),t[3]||(t[3]=D()),e.tooltip?Gn((L(),Q("span",{key:1,id:e.describedByTooltipId,class:"-screenReader"},null,8,Fje)),[[b,e.tooltip]]):we("",!0),t[4]||(t[4]=D()),e.helpTopic?(L(),Ee(d,{key:2,id:e.describedByHelpId,topic:e.helpTopic,section:e.helpSection,label:e.t("help.help")},null,8,["id","topic","section","label"])):we("",!0)]),t[8]||(t[8]=D()),e.description?Gn((L(),Q("div",{key:0,id:e.describedByDescriptionId,class:"pkpFormField__description pkpFormField--options__description semantic-defaults"},null,8,$je)),[[b,e.description]]):we("",!0),t[9]||(t[9]=D()),e.errors&&e.errors.length?(L(),Ee(h,{key:1,id:e.describedByErrorId,messages:e.errors},null,8,["id","messages"])):we("",!0),t[10]||(t[10]=D()),H("div",Bje,[(L(!0),Q(bt,null,Sn(e.options,S=>(L(),Q("label",{key:S.value,class:"pkpFormField--options__option"},[Gn(H("input",{"onUpdate:modelValue":t[0]||(t[0]=k=>a.isEnabled=k),class:"pkpFormField--options__input",type:"checkbox",value:S.value,"aria-describedby":e.describedByIds,"aria-invalid":e.errors&&e.errors.length,disabled:S.disabled},null,8,Vje),[[Iv,a.isEnabled]]),t[5]||(t[5]=D()),Gn(H("span",Hje,null,512),[[b,S.label]])]))),128)),t[7]||(t[7]=D()),a.isEnabled?(L(),Q("div",Uje,[(L(!0),Q(bt,null,Sn(n.submissionOptions,S=>(L(),Q("label",{key:"submission"+S.value,class:"pkpFormField--options__option"},[Gn(H("input",{"onUpdate:modelValue":t[1]||(t[1]=k=>e.selectedValue=k),class:"pkpFormField--options__input pkpFormField--metadata__submissionInput",type:"radio",value:S.value,"aria-invalid":e.errors&&e.errors.length,disabled:S.disabled},null,8,zje),[[PS,e.selectedValue]]),t[6]||(t[6]=D()),Gn(H("span",Wje,null,512),[[b,S.label]])]))),128))])):we("",!0)])])}const R3e=wt(Lje,[["render",jje]]),Zje={name:"FieldOrcid",components:{Icon:Vs,PkpButton:ms,HelpButton:Id,Tooltip:Tc},extends:Lm,props:{orcid:{type:String,required:!0,default:""},authorId:{type:Number,required:!0,default:0},isVerified:{type:Boolean,required:!0,default:!1},orcidVerificationRequested:{type:Boolean,required:!0},orcidDisplayValue:{type:String,required:!0,default:""}},data(){return{orcidValue:"",verificationRequested:this.orcidVerificationRequested,isButtonDisabled:!1}},computed:{hasAuthor:function(){return!!this.authorId},hasOrcid:function(){return this.orcidValue.length!==0},orcidDisplayText:function(){return this.hasOrcid?'<a target="_blank" class="underline" href="'.concat(this.orcidValue,'">').concat(this.orcidDisplayValue,"</a>"):this.orcidValue}},created(){this.orcidValue=this.orcid},methods:{handleEmailRequest:async function(){this.isButtonDisabled=!0,this.hasAuthor?await this.sendEmailRequest():this.includePostSaveEmailRequest(),this.isButtonDisabled=!1},sendEmailRequest:async function(){const{apiUrl:e}=to("orcid/requestAuthorVerification/".concat(this.authorId)),{isSuccess:t,fetch:n}=fr(e,{method:"POST",expectValidationError:!0});await n(),t&&(this.verificationRequested=!0)},includePostSaveEmailRequest:function(){this.currentValue="shouldRequestVerification",this.verificationRequested=!0},openSendAuthorEmailDialog:function(){const{openDialog:e}=Ms();e({name:"sendAuthorEmail",title:this.t("orcid.field.authorEmailModal.title"),message:this.t("orcid.field.authorEmailModal.message")+(this.hasAuthor?"":"<br>"+this.t("orcid.field.authorEmailModal.message.noAuthor")),actions:[{label:this.t("common.yes"),isPrimary:!0,callback:async t=>{await this.handleEmailRequest(),t()}},{label:this.t("common.no"),isWarnable:!0,callback:t=>{t()}}],modalStyle:"primary",close:()=>{}})},deleteOrcid:async function(){this.isButtonDisabled=!0;const{apiUrl:e}=to("orcid/deleteForAuthor/".concat(this.authorId)),{isSuccess:t,fetch:n}=fr(e,{method:"POST",expectValidationError:!0});await n(),t&&(this.orcidValue=""),this.isButtonDisabled=!1},openDeleteDialog:function(){const{openDialog:e}=Ms();e({name:"deleteOrcid",title:this.t("orcid.field.deleteOrcidModal.title"),message:this.t("orcid.field.deleteOrcidModal.message"),actions:[{label:this.t("common.yes"),isWarnable:!0,callback:async t=>{await this.deleteOrcid(),t()}},{label:this.t("common.no"),callback:t=>{t()}}],modalStyle:"negative",close:()=>{}})}}},qje={class:"pkpFormField pkpFormField--html"},Gje={class:"pkpFormField__heading"},Kje={class:"pkpFormFieldLabel align-middle"},Yje={key:1,class:"-screenReader"},Xje={key:0,class:"pkpFormField__description"},Jje={key:2,class:"pkpFormField__control pkpFormField__control--html semantic-defaults"},Qje={class:"inline-flex"};function eZe(e,t,n,i,a,l){const f=Xe("Tooltip"),d=Xe("HelpButton"),h=Xe("Icon"),b=Xe("PkpButton"),S=Hr("strip-unsafe-html");return L(),Q("div",qje,[H("div",Gje,[H("span",Kje,ee(e.label),1),t[0]||(t[0]=D()),e.tooltip?(L(),Ee(f,{key:0,"aria-hidden":"true",tooltip:e.tooltip,label:""},null,8,["tooltip"])):we("",!0),t[1]||(t[1]=D()),e.tooltip?Gn((L(),Q("span",Yje,null,512)),[[S,e.tooltip]]):we("",!0),t[2]||(t[2]=D()),e.helpTopic?(L(),Ee(d,{key:2,topic:e.helpTopic,section:e.helpSection,label:e.t("help.help")},null,8,["topic","section","label"])):we("",!0)]),t[8]||(t[8]=D()),!n.isVerified&&l.hasOrcid?Gn((L(),Q("div",Xje,null,512)),[[S,e.t("orcid.field.unverified.shouldRequest")]]):we("",!0),t[9]||(t[9]=D()),H("div",null,[n.isVerified&&l.hasOrcid?(L(),Ee(h,{key:0,class:Rn(["mr-2","h-6 w-6"]),icon:"Orcid",inline:!0})):we("",!0),t[4]||(t[4]=D()),!n.isVerified&&l.hasOrcid?(L(),Ee(h,{key:1,class:Rn(["mr-2","w-6"]),icon:"OrcidUnauthenticated",inline:!0})):we("",!0),t[5]||(t[5]=D()),l.hasOrcid?Gn((L(),Q("div",Jje,null,512)),[[S,l.orcidDisplayText]]):we("",!0),t[6]||(t[6]=D()),l.hasOrcid?(L(),Ee(b,{key:3,class:"pkpFormField__control--html__button","is-warnable":!0,"is-disabled":a.isButtonDisabled,onClick:l.openDeleteDialog},{default:te(()=>[D(ee(e.t("common.delete")),1)]),_:1},8,["is-disabled","onClick"])):we("",!0),t[7]||(t[7]=D()),H("div",Qje,[l.hasOrcid?we("",!0):(L(),Ee(b,{key:0,disabled:a.verificationRequested||a.isButtonDisabled,icon:a.verificationRequested?"Complete":null,"is-link":a.verificationRequested,onClick:l.openSendAuthorEmailDialog},{default:te(()=>[D(ee(a.verificationRequested?e.t("orcid.field.verification.requested"):e.t("orcid.field.verification.request")),1)]),_:1},8,["disabled","icon","is-link","onClick"])),t[3]||(t[3]=D()),!l.hasOrcid&&a.verificationRequested?(L(),Ee(b,{key:1,"is-link":!0,onClick:l.openSendAuthorEmailDialog},{default:te(()=>[D(ee(e.t("orcid.field.verification.resendRequest")),1)]),_:1},8,["onClick"])):we("",!0)])])])}const D3e=wt(Zje,[["render",eZe]]);var Ote={exports:{}},L3e;function tZe(){return L3e||(L3e=1,function(e){(function(){var t=function(s){if(s===null)return"null";if(s===void 0)return"undefined";var r=typeof s;return r==="object"&&(Array.prototype.isPrototypeOf(s)||s.constructor&&s.constructor.name==="Array")?"array":r==="object"&&(String.prototype.isPrototypeOf(s)||s.constructor&&s.constructor.name==="String")?"string":r},n=function(s){return["undefined","boolean","number","string","function","xml","null"].indexOf(s)!==-1},i=function(s,r){var c=Array.prototype.slice.call(s);return c.sort(r)},a=function(s,r){return l(function(c,p){return s.eq(r(c),r(p))})},l=function(s){return{eq:s}},f=l(function(s,r){return s===r}),d=f,h=function(s){return l(function(r,c){if(r.length!==c.length)return!1;for(var p=r.length,g=0;g<p;g++)if(!s.eq(r[g],c[g]))return!1;return!0})},b=function(s,r){return a(h(s),function(c){return i(c,r)})},S=function(s){return l(function(r,c){var p=Object.keys(r),g=Object.keys(c);if(!b(d).eq(p,g))return!1;for(var _=p.length,E=0;E<_;E++){var R=p[E];if(!s.eq(r[R],c[R]))return!1}return!0})},k=l(function(s,r){if(s===r)return!0;var c=t(s),p=t(r);return c!==p?!1:n(c)?s===r:c==="array"?h(k).eq(s,r):c==="object"?S(k).eq(s,r):!1});const T=Object.getPrototypeOf,O=(s,r,c)=>{var p;return c(s,r.prototype)?!0:((p=s.constructor)===null||p===void 0?void 0:p.name)===r.name},P=s=>{const r=typeof s;return s===null?"null":r==="object"&&Array.isArray(s)?"array":r==="object"&&O(s,String,(c,p)=>p.isPrototypeOf(c))?"string":r},B=s=>r=>P(r)===s,W=s=>r=>typeof r===s,Z=s=>r=>s===r,Y=(s,r)=>q(s)&&O(s,r,(c,p)=>T(c)===p),z=B("string"),q=B("object"),ne=s=>Y(s,Object),ue=B("array"),J=Z(null),ce=W("boolean"),ge=Z(void 0),de=s=>s==null,he=s=>!de(s),ie=W("function"),Be=W("number"),$e=(s,r)=>{if(ue(s)){for(let c=0,p=s.length;c<p;++c)if(!r(s[c]))return!1;return!0}return!1},Ue=()=>{},V=(s,r)=>(...c)=>s(r.apply(null,c)),Ye=(s,r)=>c=>s(r(c)),Fe=s=>()=>s,St=s=>s,Dt=(s,r)=>s===r;function He(s,...r){return(...c)=>{const p=r.concat(c);return s.apply(null,p)}}const ft=s=>r=>!s(r),ht=s=>()=>{throw new Error(s)},At=s=>s(),hn=s=>{s()},ct=Fe(!1),Ht=Fe(!0);class ye{constructor(r,c){this.tag=r,this.value=c}static some(r){return new ye(!0,r)}static none(){return ye.singletonNone}fold(r,c){return this.tag?c(this.value):r()}isSome(){return this.tag}isNone(){return!this.tag}map(r){return this.tag?ye.some(r(this.value)):ye.none()}bind(r){return this.tag?r(this.value):ye.none()}exists(r){return this.tag&&r(this.value)}forall(r){return!this.tag||r(this.value)}filter(r){return!this.tag||r(this.value)?this:ye.none()}getOr(r){return this.tag?this.value:r}or(r){return this.tag?this:r}getOrThunk(r){return this.tag?this.value:r()}orThunk(r){return this.tag?this:r()}getOrDie(r){if(this.tag)return this.value;throw new Error(r!=null?r:"Called getOrDie on None")}static from(r){return he(r)?ye.some(r):ye.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(r){this.tag&&r(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?"some(".concat(this.value,")"):"none()"}}ye.singletonNone=new ye(!1);const lo=Array.prototype.slice,jn=Array.prototype.indexOf,so=Array.prototype.push,Xs=(s,r)=>jn.call(s,r),ot=(s,r)=>{const c=Xs(s,r);return c===-1?ye.none():ye.some(c)},Qe=(s,r)=>Xs(s,r)>-1,Ot=(s,r)=>{for(let c=0,p=s.length;c<p;c++){const g=s[c];if(r(g,c))return!0}return!1},Nt=(s,r)=>{const c=s.length,p=new Array(c);for(let g=0;g<c;g++){const _=s[g];p[g]=r(_,g)}return p},Ve=(s,r)=>{for(let c=0,p=s.length;c<p;c++){const g=s[c];r(g,c)}},dn=(s,r)=>{for(let c=s.length-1;c>=0;c--){const p=s[c];r(p,c)}},kn=(s,r)=>{const c=[],p=[];for(let g=0,_=s.length;g<_;g++){const E=s[g];(r(E,g)?c:p).push(E)}return{pass:c,fail:p}},Bt=(s,r)=>{const c=[];for(let p=0,g=s.length;p<g;p++){const _=s[p];r(_,p)&&c.push(_)}return c},Le=(s,r,c)=>(dn(s,(p,g)=>{c=r(c,p,g)}),c),je=(s,r,c)=>(Ve(s,(p,g)=>{c=r(c,p,g)}),c),Ze=(s,r,c)=>{for(let p=0,g=s.length;p<g;p++){const _=s[p];if(r(_,p))return ye.some(_);if(c(_,p))break}return ye.none()},pt=(s,r)=>Ze(s,r,ct),Vt=(s,r)=>{for(let c=0,p=s.length;c<p;c++){const g=s[c];if(r(g,c))return ye.some(c)}return ye.none()},sn=s=>{const r=[];for(let c=0,p=s.length;c<p;++c){if(!ue(s[c]))throw new Error("Arr.flatten item "+c+" was not an array, input: "+s);so.apply(r,s[c])}return r},Wn=(s,r)=>sn(Nt(s,r)),ts=(s,r)=>{for(let c=0,p=s.length;c<p;++c){const g=s[c];if(r(g,c)!==!0)return!1}return!0},Zn=s=>{const r=lo.call(s,0);return r.reverse(),r},yo=(s,r)=>Bt(s,c=>!Qe(r,c)),Qs=(s,r)=>{const c={};for(let p=0,g=s.length;p<g;p++){const _=s[p];c[String(_)]=r(_,p)}return c},Rs=(s,r)=>{const c=lo.call(s,0);return c.sort(r),c},xr=(s,r)=>r>=0&&r<s.length?ye.some(s[r]):ye.none(),Po=s=>xr(s,0),jo=s=>xr(s,s.length-1),Mo=ie(Array.from)?Array.from:s=>lo.call(s),Do=(s,r)=>{for(let c=0;c<s.length;c++){const p=r(s[c],c);if(p.isSome())return p}return ye.none()},er=(s,r)=>{const c=[],p=ie(r)?g=>Ot(c,_=>r(_,g)):g=>Qe(c,g);for(let g=0,_=s.length;g<_;g++){const E=s[g];p(E)||c.push(E)}return c},Zs=Object.keys,Xa=Object.hasOwnProperty,bn=(s,r)=>{const c=Zs(s);for(let p=0,g=c.length;p<g;p++){const _=c[p],E=s[_];r(E,_)}},qs=(s,r)=>Qr(s,(c,p)=>({k:p,v:r(c,p)})),Qr=(s,r)=>{const c={};return bn(s,(p,g)=>{const _=r(p,g);c[_.k]=_.v}),c},lt=s=>(r,c)=>{s[c]=r},yt=(s,r,c,p)=>{bn(s,(g,_)=>{(r(g,_)?c:p)(g,_)})},_n=(s,r)=>{const c={},p={};return yt(s,r,lt(c),lt(p)),{t:c,f:p}},us=(s,r)=>{const c={};return yt(s,r,lt(c),Ue),c},Zo=(s,r)=>{const c=[];return bn(s,(p,g)=>{c.push(r(p,g))}),c},br=s=>Zo(s,St),Vn=(s,r)=>Kt(s,r)?ye.from(s[r]):ye.none(),Kt=(s,r)=>Xa.call(s,r),Ps=(s,r)=>Kt(s,r)&&s[r]!==void 0&&s[r]!==null,Bo=(s,r,c=k)=>S(c).eq(s,r),Nr=s=>{const r={};return Ve(s,c=>{r[c]={}}),Zs(r)},uc=s=>s.length!==void 0,Hi=Array.isArray,ir=s=>{if(Hi(s))return s;{const r=[];for(let c=0,p=s.length;c<p;c++)r[c]=s[c];return r}},Wr=(s,r,c)=>{if(!s)return!1;if(c=c||s,uc(s)){for(let p=0,g=s.length;p<g;p++)if(r.call(c,s[p],p,s)===!1)return!1}else for(const p in s)if(Kt(s,p)&&r.call(c,s[p],p,s)===!1)return!1;return!0},mi=(s,r)=>{const c=[];return Wr(s,(p,g)=>{c.push(r(p,g,s))}),c},dc=(s,r)=>{const c=[];return Wr(s,(p,g)=>{(!r||r(p,g,s))&&c.push(p)}),c},Ti=(s,r)=>{if(s){for(let c=0,p=s.length;c<p;c++)if(s[c]===r)return c}return-1},_i=(s,r,c,p)=>{let g=ge(c)?s[0]:c;for(let _=0;_<s.length;_++)g=r.call(p,g,s[_],_);return g},yr=(s,r,c)=>{for(let p=0,g=s.length;p<g;p++)if(r.call(c,s[p],p,s))return p;return-1},Ui=s=>s[s.length-1],Es=s=>{let r=!1,c;return(...p)=>(r||(r=!0,c=s.apply(null,p)),c)},_t=(s,r,c,p)=>{const g=s.isiOS()&&/ipad/i.test(c)===!0,_=s.isiOS()&&!g,E=s.isiOS()||s.isAndroid(),R=E||p("(pointer:coarse)"),N=g||!_&&E&&p("(min-device-width:768px)"),j=_||E&&!N,ae=r.isSafari()&&s.isiOS()&&/safari/i.test(c)===!1,fe=!j&&!N&&!ae;return{isiPad:Fe(g),isiPhone:Fe(_),isTablet:Fe(N),isPhone:Fe(j),isTouch:Fe(R),isAndroid:s.isAndroid,isiOS:s.isiOS,isWebView:Fe(ae),isDesktop:Fe(fe)}},Hn=(s,r)=>{for(let c=0;c<s.length;c++){const p=s[c];if(p.test(r))return p}},Cs=(s,r)=>{const c=Hn(s,r);if(!c)return{major:0,minor:0};const p=g=>Number(r.replace(c,"$"+g));return Xt(p(1),p(2))},_r=(s,r)=>{const c=String(r).toLowerCase();return s.length===0?fn():Cs(s,c)},fn=()=>Xt(0,0),Xt=(s,r)=>({major:s,minor:r}),Ii={nu:Xt,detect:_r,unknown:fn},kl=(s,r)=>Do(r.brands,c=>{const p=c.brand.toLowerCase();return pt(s,g=>{var _;return p===((_=g.brand)===null||_===void 0?void 0:_.toLowerCase())}).map(g=>({current:g.name,version:Ii.nu(parseInt(c.version,10),0)}))}),ll=(s,r)=>{const c=String(r).toLowerCase();return pt(s,p=>p.search(c))},_o=(s,r)=>ll(s,r).map(c=>{const p=Ii.detect(c.versionRegexes,r);return{current:c.name,version:p}}),Qn=(s,r)=>ll(s,r).map(c=>{const p=Ii.detect(c.versionRegexes,r);return{current:c.name,version:p}}),js=(s,r)=>s.substring(r),Ao=(s,r,c)=>r===""||s.length>=r.length&&s.substr(c,c+r.length)===r,Tr=(s,r)=>hr(s,r)?js(s,r.length):s,Go=(s,r,c=0,p)=>{const g=s.indexOf(r,c);return g!==-1?ge(p)?!0:g+r.length<=p:!1},hr=(s,r)=>Ao(s,r,0),Ai=(s,r)=>Ao(s,r,s.length-r.length),fc=s=>r=>r.replace(s,""),tr=fc(/^\s+|\s+$/g),xl=fc(/^\s+/g),cl=fc(/\s+$/g),gr=s=>s.length>0,hi=s=>!gr(s),ii=(s,r)=>r<=0?"":new Array(r+1).join(s),Mu=(s,r=10)=>{const c=parseInt(s,r);return isNaN(c)?ye.none():ye.some(c)},Ac=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,ba=s=>r=>Go(r,s),ar=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:s=>Go(s,"edge/")&&Go(s,"chrome")&&Go(s,"safari")&&Go(s,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Ac],search:s=>Go(s,"chrome")&&!Go(s,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:s=>Go(s,"msie")||Go(s,"trident")},{name:"Opera",versionRegexes:[Ac,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:ba("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:ba("firefox")},{name:"Safari",versionRegexes:[Ac,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:s=>(Go(s,"safari")||Go(s,"mobile/"))&&Go(s,"applewebkit")}],zf=[{name:"Windows",search:ba("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:s=>Go(s,"iphone")||Go(s,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:ba("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:ba("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:ba("linux"),versionRegexes:[]},{name:"Solaris",search:ba("sunos"),versionRegexes:[]},{name:"FreeBSD",search:ba("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:ba("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],ya={browsers:Fe(ar),oses:Fe(zf)},Nu="Edge",co="Chromium",uo="IE",Fr="Opera",zi="Firefox",lr="Safari",pc=()=>ai({current:void 0,version:Ii.unknown()}),ai=s=>{const r=s.current,c=s.version,p=g=>()=>r===g;return{current:r,version:c,isEdge:p(Nu),isChromium:p(co),isIE:p(uo),isOpera:p(Fr),isFirefox:p(zi),isSafari:p(lr)}},mu={unknown:pc,nu:ai},jl="Windows",bs="iOS",Hs="Android",No="Linux",So="macOS",Si="Solaris",Ja="FreeBSD",ad="ChromeOS",Wf=()=>hu({current:void 0,version:Ii.unknown()}),hu=s=>{const r=s.current,c=s.version,p=g=>()=>r===g;return{current:r,version:c,isWindows:p(jl),isiOS:p(bs),isAndroid:p(Hs),isMacOS:p(So),isLinux:p(No),isSolaris:p(Si),isFreeBSD:p(Ja),isChromeOS:p(ad)}},za={unknown:Wf,nu:hu},qc={detect:(s,r,c)=>{const p=ya.browsers(),g=ya.oses(),_=r.bind(N=>kl(p,N)).orThunk(()=>_o(p,s)).fold(mu.unknown,mu.nu),E=Qn(g,s).fold(za.unknown,za.nu),R=_t(E,_,s,c);return{browser:_,os:E,deviceType:R}}},jf=s=>window.matchMedia(s).matches;let Vm=Es(()=>qc.detect(window.navigator.userAgent,ye.from(window.navigator.userAgentData),jf));const Qa=()=>Vm(),Te=window.navigator.userAgent,We=Qa(),rt=We.browser,zt=We.os,pn=We.deviceType,jt=Te.indexOf("Windows Phone")!==-1,ns={transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",documentMode:rt.isIE()?document.documentMode||7:10,cacheSuffix:null,container:null,canHaveCSP:!rt.isIE(),windowsPhone:jt,browser:{current:rt.current,version:rt.version,isChromium:rt.isChromium,isEdge:rt.isEdge,isFirefox:rt.isFirefox,isIE:rt.isIE,isOpera:rt.isOpera,isSafari:rt.isSafari},os:{current:zt.current,version:zt.version,isAndroid:zt.isAndroid,isChromeOS:zt.isChromeOS,isFreeBSD:zt.isFreeBSD,isiOS:zt.isiOS,isLinux:zt.isLinux,isMacOS:zt.isMacOS,isSolaris:zt.isSolaris,isWindows:zt.isWindows},deviceType:{isDesktop:pn.isDesktop,isiPad:pn.isiPad,isiPhone:pn.isiPhone,isPhone:pn.isPhone,isTablet:pn.isTablet,isTouch:pn.isTouch,isWebView:pn.isWebView}},eo=/^\s*|\s*$/g,Us=s=>de(s)?"":(""+s).replace(eo,""),be=(s,r)=>r?r==="array"&&Hi(s)?!0:typeof s===r:s!==void 0,ke=(s,r,c={})=>{const p=z(s)?s.split(r||","):s||[];let g=p.length;for(;g--;)c[p[g]]={};return c},Je=Kt,xt=(s,...r)=>{for(let c=0;c<r.length;c++){const p=r[c];for(const g in p)if(Kt(p,g)){const _=p[g];_!==void 0&&(s[g]=_)}}return s},es=function(s,r,c,p){p=p||this,s&&(c&&(s=s[c]),Wr(s,(g,_)=>r.call(p,g,_,c)===!1?!1:(es(g,r,c,p),!0)))},Gt={trim:Us,isArray:Hi,is:be,toArray:ir,makeMap:ke,each:Wr,map:mi,grep:dc,inArray:Ti,hasOwn:Je,extend:xt,walk:es,resolve:(s,r=window)=>{const c=s.split(".");for(let p=0,g=c.length;p<g&&(r=r[c[p]],!!r);p++);return r},explode:(s,r)=>ue(s)?s:s===""?[]:mi(s.split(r||","),Us),_addCacheSuffix:s=>{const r=ns.cacheSuffix;return r&&(s+=(s.indexOf("?")===-1?"?":"&")+r),s}},Zl=(s,r,c=Dt)=>s.exists(p=>c(p,r)),Er=(s,r,c=Dt)=>Oi(s,r,c).getOr(s.isNone()&&r.isNone()),ef=s=>{const r=[],c=p=>{r.push(p)};for(let p=0;p<s.length;p++)s[p].each(c);return r},Oi=(s,r,c)=>s.isSome()&&r.isSome()?ye.some(c(s.getOrDie(),r.getOrDie())):ye.none(),fo=(s,r,c,p)=>s.isSome()&&r.isSome()&&c.isSome()?ye.some(p(s.getOrDie(),r.getOrDie(),c.getOrDie())):ye.none(),mc=(s,r)=>s?ye.some(r):ye.none(),Ia=typeof window<"u"?window:Function("return this;")(),Oc=(s,r)=>{let c=r!=null?r:Ia;for(let p=0;p<s.length&&c!==void 0&&c!==null;++p)c=c[s[p]];return c},Wi=(s,r)=>{const c=s.split(".");return Oc(c,r)},Dd=(s,r)=>Wi(s,r),p0=(s,r)=>{const c=Dd(s,r);if(c==null)throw new Error(s+" not available on this browser");return c},Hv=Object.getPrototypeOf,jr=s=>p0("HTMLElement",s),Zb=s=>{const r=Wi("ownerDocument.defaultView",s);return q(s)&&(jr(r).prototype.isPrototypeOf(s)||/^HTML\w*Element$/.test(Hv(s).constructor.name))},ja=8,hc=9,Gc=11,Zf=1,Uv=3,oo=s=>s.dom.nodeName.toLowerCase(),Zp=s=>s.dom.nodeType,tf=s=>r=>Zp(r)===s,nf=s=>Zp(s)===ja||oo(s)==="#comment",Wh=s=>li(s)&&Zb(s.dom),li=tf(Zf),Aa=tf(Uv),qp=tf(hc),m0=tf(Gc),qf=s=>r=>li(r)&&oo(r)===s,Rc=(s,r,c)=>{if(z(c)||ce(c)||Be(c))s.setAttribute(r,c+"");else throw console.error("Invalid call to Attribute.set. Key ",r,":: Value ",c,":: Element ",s),new Error("Attribute value was not simple")},el=(s,r,c)=>{Rc(s.dom,r,c)},Tl=(s,r)=>{const c=s.dom;bn(r,(p,g)=>{Rc(c,g,p)})},ql=(s,r)=>{const c=s.dom.getAttribute(r);return c===null?void 0:c},ld=(s,r)=>ye.from(ql(s,r)),Gp=(s,r)=>{const c=s.dom;return c&&c.hasAttribute?c.hasAttribute(r):!1},gi=(s,r)=>{s.dom.removeAttribute(r)},Hm=s=>{const r=s.dom.attributes;return r==null||r.length===0},Y1=s=>je(s.dom.attributes,(r,c)=>(r[c.name]=c.value,r),{}),Gf=(s,r)=>{const c=ql(s,r);return c===void 0||c===""?[]:c.split(" ")},X1=(s,r,c)=>{const g=Gf(s,r).concat([c]);return el(s,r,g.join(" ")),!0},qb=(s,r,c)=>{const p=Bt(Gf(s,r),g=>g!==c);return p.length>0?el(s,r,p.join(" ")):gi(s,r),!1},ze=s=>s.dom.classList!==void 0,an=s=>Gf(s,"class"),$n=(s,r)=>X1(s,"class",r),Ds=(s,r)=>qb(s,"class",r),Eo=(s,r)=>Qe(an(s),r)?Ds(s,r):$n(s,r),Yt=(s,r)=>{ze(s)?s.dom.classList.add(r):$n(s,r)},Ys=s=>{(ze(s)?s.dom.classList:an(s)).length===0&&gi(s,"class")},ko=(s,r)=>{ze(s)?s.dom.classList.remove(r):Ds(s,r),Ys(s)},ei=(s,r)=>{const c=ze(s)?s.dom.classList.toggle(r):Eo(s,r);return Ys(s),c},Pi=(s,r)=>ze(s)&&s.dom.classList.contains(r),ji=(s,r)=>{const p=(r||document).createElement("div");if(p.innerHTML=s,!p.hasChildNodes()||p.childNodes.length>1){const g="HTML does not have a single root node";throw console.error(g,s),new Error(g)}return jh(p.childNodes[0])},Ko=(s,r)=>{const p=(r||document).createElement(s);return jh(p)},sf=(s,r)=>{const p=(r||document).createTextNode(s);return jh(p)},jh=s=>{if(s==null)throw new Error("Node cannot be null or undefined");return{dom:s}},et={fromHtml:ji,fromTag:Ko,fromText:sf,fromDom:jh,fromPoint:(s,r,c)=>ye.from(s.dom.elementFromPoint(r,c)).map(jh)},Zh=(s,r)=>{const c=[],p=_=>(c.push(_),r(_));let g=r(s);do g=g.bind(p);while(g.isSome());return c},Kc=(s,r)=>{const c=s.dom;if(c.nodeType!==Zf)return!1;{const p=c;if(p.matches!==void 0)return p.matches(r);if(p.msMatchesSelector!==void 0)return p.msMatchesSelector(r);if(p.webkitMatchesSelector!==void 0)return p.webkitMatchesSelector(r);if(p.mozMatchesSelector!==void 0)return p.mozMatchesSelector(r);throw new Error("Browser lacks native selectors")}},wC=s=>s.nodeType!==Zf&&s.nodeType!==hc&&s.nodeType!==Gc||s.childElementCount===0,$5=(s,r)=>{const c=r===void 0?document:r.dom;return wC(c)?[]:Nt(c.querySelectorAll(s),et.fromDom)},J1=(s,r)=>{const c=r===void 0?document:r.dom;return wC(c)?ye.none():ye.from(c.querySelector(s)).map(et.fromDom)},Yo=(s,r)=>s.dom===r.dom,Zi=(s,r)=>{const c=s.dom,p=r.dom;return c===p?!1:c.contains(p)},gu=s=>et.fromDom(s.dom.ownerDocument),Kp=s=>qp(s)?s:gu(s),B5=s=>et.fromDom(Kp(s).dom.documentElement),qh=s=>et.fromDom(Kp(s).dom.defaultView),Yc=s=>ye.from(s.dom.parentNode).map(et.fromDom),zv=s=>ye.from(s.dom.parentElement).map(et.fromDom),h0=(s,r)=>{const c=ie(r)?r:ct;let p=s.dom;const g=[];for(;p.parentNode!==null&&p.parentNode!==void 0;){const _=p.parentNode,E=et.fromDom(_);if(g.push(E),c(E)===!0)break;p=_}return g},Gh=s=>{const r=c=>Bt(c,p=>!Yo(s,p));return Yc(s).map(Il).map(r).getOr([])},Um=s=>ye.from(s.dom.previousSibling).map(et.fromDom),g0=s=>ye.from(s.dom.nextSibling).map(et.fromDom),cd=s=>Zn(Zh(s,Um)),v0=s=>Zh(s,g0),Il=s=>Nt(s.dom.childNodes,et.fromDom),zm=(s,r)=>{const c=s.dom.childNodes;return ye.from(c[r]).map(et.fromDom)},of=s=>zm(s,0),Dc=s=>zm(s,s.dom.childNodes.length-1),Kh=s=>s.dom.childNodes.length,EC=s=>{const r=s.dom.head;if(r==null)throw new Error("Head is not available yet");return et.fromDom(r)},Wv=s=>m0(s)&&he(s.dom.host),Kf=s=>et.fromDom(s.dom.getRootNode()),Q1=s=>Wv(s)?s:EC(Kp(s)),V5=s=>Wv(s)?s:et.fromDom(Kp(s).dom.body),jv=s=>{const r=Kf(s);return Wv(r)?ye.some(r):ye.none()},H5=s=>et.fromDom(s.dom.host),_9=s=>{if(he(s.target)){const r=et.fromDom(s.target);if(li(r)&&U5(r)&&s.composed&&s.composedPath){const c=s.composedPath();if(c)return Po(c)}}return ye.from(s.target)},U5=s=>he(s.dom.shadowRoot),Yp=s=>{const r=Aa(s)?s.dom.parentNode:s.dom;if(r==null||r.ownerDocument===null)return!1;const c=r.ownerDocument;return jv(et.fromDom(r)).fold(()=>c.body.contains(r),Ye(Yp,H5))};var Kb=(s,r,c,p,g)=>s(c,p)?ye.some(c):ie(g)&&g(c)?ye.none():r(c,p,g);const Yf=(s,r,c)=>{let p=s.dom;const g=ie(c)?c:ct;for(;p.parentNode;){p=p.parentNode;const _=et.fromDom(p);if(r(_))return ye.some(_);if(g(_))break}return ye.none()},qi=(s,r,c)=>Kb((g,_)=>_(g),Yf,s,r,c),tl=(s,r)=>{const c=s.dom;return c.parentNode?Fu(et.fromDom(c.parentNode),p=>!Yo(s,p)&&r(p)):ye.none()},Fu=(s,r)=>{const c=g=>r(et.fromDom(g));return pt(s.dom.childNodes,c).map(et.fromDom)},b0=(s,r)=>{const c=p=>{for(let g=0;g<p.childNodes.length;g++){const _=et.fromDom(p.childNodes[g]);if(r(_))return ye.some(_);const E=c(p.childNodes[g]);if(E.isSome())return E}return ye.none()};return c(s.dom)},y0=(s,r,c)=>Yf(s,p=>Kc(p,r),c),ul=(s,r)=>J1(r,s),ds=(s,r,c)=>Kb((g,_)=>Kc(g,_),y0,s,r,c),Yb=s=>ds(s,"[contenteditable]"),Wm=(s,r=!1)=>Yp(s)?s.dom.isContentEditable:Yb(s).fold(Fe(r),c=>$u(c)==="true"),$u=s=>s.dom.contentEditable,vr=(s,r)=>{s.dom.contentEditable=r?"true":"false"},Yh=s=>s.style!==void 0&&ie(s.style.getPropertyValue),_0=(s,r,c)=>{if(!z(c))throw console.error("Invalid call to CSS.set. Property ",r,":: Value ",c,":: Element ",s),new Error("CSS value must be a string: "+c);Yh(s)&&s.style.setProperty(r,c)},Zv=(s,r)=>{Yh(s)&&s.style.removeProperty(r)},z5=(s,r,c)=>{const p=s.dom;_0(p,r,c)},no=(s,r)=>{const c=s.dom;bn(r,(p,g)=>{_0(c,g,p)})},Oa=(s,r)=>{const c=s.dom,g=window.getComputedStyle(c).getPropertyValue(r);return g===""&&!Yp(s)?eg(c,r):g},eg=(s,r)=>Yh(s)?s.style.getPropertyValue(r):"",vu=(s,r)=>{const c=s.dom,p=eg(c,r);return ye.from(p).filter(g=>g.length>0)},Xc=s=>{const r={},c=s.dom;if(Yh(c))for(let p=0;p<c.style.length;p++){const g=c.style.item(p);r[g]=c.style[g]}return r},ud=(s,r)=>{const c=s.dom;Zv(c,r),Zl(ld(s,"style").map(tr),"")&&gi(s,"style")},Al=s=>s.dom.offsetWidth,Jc=(s,r)=>{Yc(s).each(p=>{p.dom.insertBefore(r.dom,s.dom)})},dd=(s,r)=>{g0(s).fold(()=>{Yc(s).each(g=>{Ri(g,r)})},p=>{Jc(p,r)})},qv=(s,r)=>{of(s).fold(()=>{Ri(s,r)},p=>{s.dom.insertBefore(r.dom,p.dom)})},Ri=(s,r)=>{s.dom.appendChild(r.dom)},Gv=(s,r)=>{Jc(s,r),Ri(r,s)},_a=(s,r)=>{Ve(r,(c,p)=>{const g=p===0?s:r[p-1];dd(g,c)})},jm=(s,r)=>{Ve(r,c=>{Ri(s,c)})},Zm=s=>{s.dom.textContent="",Ve(Il(s),r=>{ti(r)})},ti=s=>{const r=s.dom;r.parentNode!==null&&r.parentNode.removeChild(r)},Xp=s=>{const r=Il(s);r.length>0&&_a(s,r),ti(s)},S9=(s,r)=>{const p=(r||document).createElement("div");return p.innerHTML=s,Il(et.fromDom(p))},Xb=s=>Nt(s,et.fromDom),Gi=s=>s.dom.innerHTML,S0=(s,r)=>{const p=gu(s).dom,g=et.fromDom(p.createDocumentFragment()),_=S9(r,p);jm(g,_),Zm(s),Ri(s,g)},Xf=s=>{const r=et.fromTag("div"),c=et.fromDom(s.dom.cloneNode(!0));return Ri(r,c),Gi(r)},xo=(s,r,c,p,g,_,E)=>({target:s,x:r,y:c,stop:p,prevent:g,kill:_,raw:E}),tg=s=>{const r=et.fromDom(_9(s).getOr(s.target)),c=()=>s.stopPropagation(),p=()=>s.preventDefault(),g=V(p,c);return xo(r,s.clientX,s.clientY,c,p,g,s)},Kv=(s,r)=>c=>{s(c)&&r(tg(c))},G=(s,r,c,p,g)=>{const _=Kv(c,p);return s.dom.addEventListener(r,_,g),{unbind:He(Ce,s,r,_,g)}},le=(s,r,c,p)=>G(s,r,c,p,!1),Ce=(s,r,c,p)=>{s.dom.removeEventListener(r,c,p)},Ke=(s,r)=>({left:s,top:r,translate:(p,g)=>Ke(s+p,r+g)}),st=Ke,rn=s=>{const r=s.getBoundingClientRect();return st(r.left,r.top)},ks=(s,r)=>s!==void 0?s:r!==void 0?r:0,ro=s=>{const r=s.dom.ownerDocument,c=r.body,p=r.defaultView,g=r.documentElement;if(c===s.dom)return st(c.offsetLeft,c.offsetTop);const _=ks(p==null?void 0:p.pageYOffset,g.scrollTop),E=ks(p==null?void 0:p.pageXOffset,g.scrollLeft),R=ks(g.clientTop,c.clientTop),N=ks(g.clientLeft,c.clientLeft);return Js(s).translate(E-N,_-R)},Js=s=>{const r=s.dom,p=r.ownerDocument.body;return p===r?st(p.offsetLeft,p.offsetTop):Yp(s)?rn(r):st(0,0)},cs=s=>{const r=s!==void 0?s.dom:document,c=r.body.scrollLeft||r.documentElement.scrollLeft,p=r.body.scrollTop||r.documentElement.scrollTop;return st(c,p)},Di=(s,r,c)=>{const g=(c!==void 0?c.dom:document).defaultView;g&&g.scrollTo(s,r)},Ra=(s,r)=>{Qa().browser.isSafari()&&ie(s.dom.scrollIntoViewIfNeeded)?s.dom.scrollIntoViewIfNeeded(!1):s.dom.scrollIntoView(r)},Lc=s=>{const r=s===void 0?window:s;return Qa().browser.isFirefox()?ye.none():ye.from(r.visualViewport)},qm=(s,r,c,p)=>({x:s,y:r,width:c,height:p,right:s+c,bottom:r+p}),kC=s=>{const r=s===void 0?window:s,c=r.document,p=cs(et.fromDom(c));return Lc(r).fold(()=>{const g=r.document.documentElement,_=g.clientWidth,E=g.clientHeight;return qm(p.left,p.top,_,E)},g=>qm(Math.max(g.pageLeft,p.left),Math.max(g.pageTop,p.top),g.width,g.height))},C0=(s,r)=>Bt(Il(s),r),W5=(s,r)=>{let c=[];return Ve(Il(s),p=>{r(p)&&(c=c.concat([p])),c=c.concat(W5(p,r))}),c},Pc=(s,r)=>$5(r,s),j5=(s,r,c)=>Yf(s,r,c).isSome(),C9=(s,r)=>tl(s,r).isSome(),Z5=(s,r)=>b0(s,r).isSome();class Gl{constructor(r,c){this.node=r,this.rootNode=c,this.current=this.current.bind(this),this.next=this.next.bind(this),this.prev=this.prev.bind(this),this.prev2=this.prev2.bind(this)}current(){return this.node}next(r){return this.node=this.findSibling(this.node,"firstChild","nextSibling",r),this.node}prev(r){return this.node=this.findSibling(this.node,"lastChild","previousSibling",r),this.node}prev2(r){return this.node=this.findPreviousNode(this.node,r),this.node}findSibling(r,c,p,g){if(r){if(!g&&r[c])return r[c];if(r!==this.rootNode){let _=r[p];if(_)return _;for(let E=r.parentNode;E&&E!==this.rootNode;E=E.parentNode)if(_=E[p],_)return _}}}findPreviousNode(r,c){if(r){const p=r.previousSibling;if(this.rootNode&&p===this.rootNode)return;if(p){if(!c){for(let _=p.lastChild;_;_=_.lastChild)if(!_.lastChild)return _}return p}const g=r.parentNode;if(g&&g!==this.rootNode)return g}}}const Jb="\uFEFF",Za=" ",xC=s=>s===Jb,bu=s=>s.replace(/\uFEFF/g,""),Ns=/^[ \t\r\n]*$/,Jf=s=>Ns.test(s),Yv=s=>{for(const r of s)if(!xC(r))return!1;return!0},q5=s=>" \f \v".indexOf(s)!==-1,w9=s=>s==="\n"||s==="\r",G5=(s,r)=>r<s.length&&r>=0?w9(s[r]):!1,Qf=(s,r=4,c=!0,p=!0)=>{const g=ii(" ",r),_=s.replace(/\t/g,g);return je(_,(R,N)=>q5(N)||N===Za?R.pcIsSpace||R.str===""&&c||R.str.length===_.length-1&&p||G5(_,R.str.length+1)?{pcIsSpace:!1,str:R.str+Za}:{pcIsSpace:!0,str:R.str+" "}:{pcIsSpace:w9(N),str:R.str+N},{pcIsSpace:!1,str:""}).str},Gm=s=>r=>!!r&&r.nodeType===s,ng=s=>!!s&&!Object.getPrototypeOf(s),Ln=Gm(1),rf=s=>Ln(s)&&Wh(et.fromDom(s)),TC=s=>Ln(s)&&s.namespaceURI==="http://www.w3.org/2000/svg",w0=s=>{const r=s.toLowerCase();return c=>he(c)&&c.nodeName.toLowerCase()===r},ep=s=>{const r=s.map(c=>c.toLowerCase());return c=>{if(c&&c.nodeName){const p=c.nodeName.toLowerCase();return Qe(r,p)}return!1}},Qb=(s,r)=>{const c=r.toLowerCase().split(" ");return p=>{if(Ln(p)){const g=p.ownerDocument.defaultView;if(g)for(let _=0;_<c.length;_++){const E=g.getComputedStyle(p,null);if((E?E.getPropertyValue(s):null)===c[_])return!0}}return!1}},sg=s=>r=>Ln(r)&&r.hasAttribute(s),E0=s=>Ln(s)&&s.hasAttribute("data-mce-bogus"),ey=s=>Ln(s)&&s.getAttribute("data-mce-bogus")==="all",Jp=s=>Ln(s)&&s.tagName==="TABLE",E9=s=>r=>!!(rf(r)&&(r.contentEditable===s||r.getAttribute("data-mce-contenteditable")===s)),Ki=ep(["textarea","input"]),un=Gm(3),yu=Gm(4),Qp=Gm(7),dl=Gm(8),Xv=Gm(9),fl=Gm(11),nr=w0("br"),K5=w0("img"),Zt=E9("true"),cr=E9("false"),IC=s=>rf(s)&&s.isContentEditable&&he(s.parentElement)&&!s.parentElement.isContentEditable,Da=ep(["td","th"]),tp=ep(["td","th","caption"]),Kl=ep(["video","audio","object","embed"]),SR=w0("li"),Km=w0("details"),k9=w0("summary"),Bu={skipBogus:!0,includeZwsp:!1,checkRootAsContent:!1},ur=(s,r,c)=>{const p=et.fromDom(r),g=et.fromDom(s),_=c.getWhitespaceElements();return j5(g,R=>Kt(_,oo(R)),He(Yo,p))},Ym=s=>Ln(s)&&s.nodeName==="A"&&!s.hasAttribute("href")&&(s.hasAttribute("name")||s.hasAttribute("id")),ty=(s,r)=>Ln(s)&&Kt(r.getNonEmptyElements(),s.nodeName),aa=sg("data-mce-bookmark"),Y5=s=>zv(et.fromDom(s)).exists(r=>!Wm(r)),Xh=(s,r,c)=>Jf(s.data)&&!ur(s,r,c),x9=(s,r,c,p)=>un(s)&&!Xh(s,r,c)&&(!p.includeZwsp||!Yv(s.data)),Vu=(s,r,c,p)=>ie(p.isContent)&&p.isContent(r)||ty(r,s)||aa(r)||Ym(r)||x9(r,c,s,p)||cr(r)||Zt(r)&&Y5(r),em=(s,r,c)=>{const p={...Bu,...c};if(p.checkRootAsContent&&Vu(s,r,r,p))return!1;let g=r.firstChild,_=0;if(!g)return!0;const E=new Gl(g,r);do{if(p.skipBogus&&Ln(g)){const R=g.getAttribute("data-mce-bogus");if(R){g=E.next(R==="all");continue}}if(dl(g)){g=E.next(!0);continue}if(nr(g)){_++,g=E.next();continue}if(Vu(s,g,r,p))return!1;g=E.next()}while(g);return _<=1},mt=(s,r,c)=>em(s,r.dom,{checkRootAsContent:!0,...c}),Ld=(s,r,c)=>Vu(s,r,r,{includeZwsp:Bu.includeZwsp,...c}),pl=s=>{let r=s;return{get:()=>r,set:g=>{r=g}}},Li=s=>{const r=pl(ye.none()),c=()=>r.get().each(s);return{clear:()=>{c(),r.set(ye.none())},isSet:()=>r.get().isSome(),get:()=>r.get(),set:R=>{c(),r.set(ye.some(R))}}},np=s=>{const r=pl(ye.none()),c=()=>r.get().each(R=>clearInterval(R));return{clear:()=>{c(),r.set(ye.none())},isSet:()=>r.get().isSome(),get:()=>r.get(),set:R=>{c(),r.set(ye.some(setInterval(R,s)))}}},la=()=>{const s=Li(Ue);return{...s,on:c=>s.get().each(c)}},Kr=s=>{const r=s.toLowerCase();return r==="svg"?"svg":r==="math"?"math":"html"},k0=s=>Kr(s)!=="html",og=s=>k0(s.nodeName),Jh=s=>Kr(s.nodeName),pU=["svg","math"],sp=()=>{const s=la(),r=()=>s.get().map(Jh).getOr("html");return{track:g=>(og(g)?s.set(g):s.get().exists(_=>!_.contains(g))&&s.clear(),r()),current:r,reset:()=>{s.clear()}}},X5="data-mce-block",CR=s=>Bt(Zs(s),r=>!/[A-Z]/.test(r)),AC=s=>Nt(CR(s),r=>{const c=CSS.escape(r);return"".concat(c,":")+Nt(pU,p=>"not(".concat(p," ").concat(c,")")).join(":")}).join(","),T9=(s,r)=>he(r.querySelector(s))?(r.setAttribute(X5,"true"),r.getAttribute("data-mce-selected")==="inline-boundary"&&r.removeAttribute("data-mce-selected"),!0):(r.removeAttribute(X5),!1),I9=(s,r)=>{const c=AC(s.getTransparentElements()),p=AC(s.getBlockElements());return Bt(r.querySelectorAll(c),g=>T9(p,g))},rg=(s,r,c)=>{var p;const g=c?"lastChild":"firstChild";for(let _=r[g];_;_=_[g])if(em(s,_,{checkRootAsContent:!0})){(p=_.parentNode)===null||p===void 0||p.removeChild(_);return}},ny=(s,r,c)=>{const p=document.createRange(),g=r.parentNode;if(g){p.setStartBefore(r),p.setEndBefore(c);const _=p.extractContents();rg(s,_,!0),p.setStartAfter(c),p.setEndAfter(r);const E=p.extractContents();rg(s,E,!1),em(s,_,{checkRootAsContent:!0})||g.insertBefore(_,r),em(s,c,{checkRootAsContent:!0})||g.insertBefore(c,r),em(s,E,{checkRootAsContent:!0})||g.insertBefore(E,r),g.removeChild(r)}},OC=(s,r,c)=>{const p=s.getBlockElements(),g=et.fromDom(r),_=R=>oo(R)in p,E=R=>Yo(R,g);Ve(Xb(c),R=>{Yf(R,_,E).each(N=>{const j=C0(R,ae=>_(ae)&&!s.isValidChild(oo(N),oo(ae)));if(j.length>0){const ae=zv(N);Ve(j,fe=>{Yf(fe,_,E).each(ve=>{ny(s,ve.dom,fe.dom)})}),ae.each(fe=>I9(s,fe.dom))}})})},RC=(s,r,c)=>{Ve([...c,...af(s,r)?[r]:[]],p=>Ve(Pc(et.fromDom(p),p.nodeName.toLowerCase()),g=>{O9(s,g.dom)&&Xp(g)}))},J5=(s,r)=>{const c=I9(s,r);OC(s,r,c),RC(s,r,c)},A9=(s,r)=>{if(DC(s,r)){const c=AC(s.getBlockElements());T9(c,r)}},Qh=(s,r,c)=>{const p=_=>Yo(_,et.fromDom(r)),g=h0(et.fromDom(c),p);xr(g,g.length-2).filter(li).fold(()=>J5(s,r),_=>J5(s,_.dom))},Jv=s=>s.hasAttribute(X5),Q5=(s,r)=>Kt(s.getTransparentElements(),r),DC=(s,r)=>Ln(r)&&Q5(s,r.nodeName),af=(s,r)=>DC(s,r)&&Jv(r),O9=(s,r)=>DC(s,r)&&!Jv(r),e4=(s,r)=>r.type===1&&Q5(s,r.name)&&z(r.attr(X5)),wR=Qa().browser,R9=s=>pt(s,li),Ol=s=>wR.isFirefox()&&oo(s)==="table"?R9(Il(s)).filter(r=>oo(r)==="caption").bind(r=>R9(v0(r)).map(c=>{const p=c.dom.offsetTop,g=r.dom.offsetTop,_=r.dom.offsetHeight;return p<=g?-_:0})).getOr(0):0,op=(s,r)=>s.children&&Qe(s.children,r),Qv=(s,r,c)=>{let p=0,g=0;const _=s.ownerDocument;if(c=c||s,r){if(c===s&&r.getBoundingClientRect&&Oa(et.fromDom(s),"position")==="static"){const R=r.getBoundingClientRect();return p=R.left+(_.documentElement.scrollLeft||s.scrollLeft)-_.documentElement.clientLeft,g=R.top+(_.documentElement.scrollTop||s.scrollTop)-_.documentElement.clientTop,{x:p,y:g}}let E=r;for(;E&&E!==c&&E.nodeType&&!op(E,c);){const R=E;p+=R.offsetLeft||0,g+=R.offsetTop||0,E=R.offsetParent}for(E=r.parentNode;E&&E!==c&&E.nodeType&&!op(E,c);)p-=E.scrollLeft||0,g-=E.scrollTop||0,E=E.parentNode;g+=Ol(et.fromDom(r))}return{x:p,y:g}},e1=(s,r={})=>{let c=0;const p={},g=et.fromDom(s),_=Kp(g),E=tt=>{r.referrerPolicy=tt},R=tt=>{r.contentCssCors=tt},N=tt=>{Ri(Q1(g),tt)},j=tt=>{const ut=Q1(g);ul(ut,"#"+tt).each(ti)},ae=tt=>Vn(p,tt).getOrThunk(()=>({id:"mce-u"+c++,passed:[],failed:[],count:0})),fe=tt=>new Promise((ut,gt)=>{let Tt;const Jt=Gt._addCacheSuffix(tt),vn=ae(Jt);p[Jt]=vn,vn.count++;const qn=(Bn,hs)=>{Ve(Bn,hn),vn.status=hs,vn.passed=[],vn.failed=[],Tt&&(Tt.onload=null,Tt.onerror=null,Tt=null)},Ut=()=>qn(vn.passed,2),Et=()=>qn(vn.failed,3);if(ut&&vn.passed.push(ut),gt&&vn.failed.push(gt),vn.status===1)return;if(vn.status===2){Ut();return}if(vn.status===3){Et();return}vn.status=1;const Qt=et.fromTag("link",_.dom);Tl(Qt,{rel:"stylesheet",type:"text/css",id:vn.id}),r.contentCssCors&&el(Qt,"crossOrigin","anonymous"),r.referrerPolicy&&el(Qt,"referrerpolicy",r.referrerPolicy),Tt=Qt.dom,Tt.onload=Ut,Tt.onerror=Et,N(Qt),el(Qt,"href",Jt)}),ve=(tt,ut)=>{const gt=ae(tt);p[tt]=gt,gt.count++;const Tt=et.fromTag("style",_.dom);Tl(Tt,{rel:"stylesheet",type:"text/css",id:gt.id,"data-mce-key":tt}),Tt.dom.innerHTML=ut,N(Tt)},xe=tt=>Promise.allSettled(Nt(tt,gt=>fe(gt).then(Fe(gt)))).then(gt=>{const Tt=kn(gt,Jt=>Jt.status==="fulfilled");return Tt.fail.length>0?Promise.reject(Nt(Tt.fail,Jt=>Jt.reason)):Nt(Tt.pass,Jt=>Jt.value)}),De=tt=>{const ut=Gt._addCacheSuffix(tt);Vn(p,ut).each(gt=>{--gt.count===0&&(delete p[ut],j(gt.id))})};return{load:fe,loadRawCss:ve,loadAll:xe,unload:De,unloadRawCss:tt=>{Vn(p,tt).each(ut=>{--ut.count===0&&(delete p[tt],j(ut.id))})},unloadAll:tt=>{Ve(tt,ut=>{De(ut)})},_setReferrerPolicy:E,_setContentCssCors:R}},fd=(()=>{const s=new WeakMap;return{forElement:(c,p)=>{const _=Kf(c).dom;return ye.from(s.get(_)).getOrThunk(()=>{const E=e1(_,p);return s.set(_,E),E})}}})(),t4=s=>s.nodeName.toLowerCase()==="span",sy=(s,r)=>he(s)&&(Ld(r,s)||r.isInline(s.nodeName.toLowerCase())),oy=(s,r,c)=>{const p=new Gl(s,r).prev(!1),g=new Gl(s,r).next(!1),_=ge(p)||sy(p,c),E=ge(g)||sy(g,c);return _&&E},rp=s=>t4(s)&&s.getAttribute("data-mce-type")==="bookmark",ip=(s,r,c)=>un(s)&&s.data.length>0&&oy(s,r,c),D9=s=>Ln(s)?s.childNodes.length>0:!1,gc=s=>fl(s)||Xv(s),n4=(s,r,c,p)=>{var g;const _=p||r;if(Ln(r)&&rp(r))return r;const E=r.childNodes;for(let R=E.length-1;R>=0;R--)n4(s,E[R],c,_);if(Ln(r)){const R=r.childNodes;R.length===1&&rp(R[0])&&((g=r.parentNode)===null||g===void 0||g.insertBefore(R[0],r))}return!gc(r)&&!Ld(c,r)&&!D9(r)&&!ip(r,_,c)&&s.remove(r),r},Xm=Gt.makeMap,t1=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Jm=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,kR=/[<>&\"\']/g,e2=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,xR={128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},ig={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"},ca={"<":"<",">":">","&":"&",""":'"',"'":"'"},L9=s=>{const r=et.fromTag("div").dom;return r.innerHTML=s,r.textContent||r.innerText||s},Qm=(s,r)=>{const c={};if(s){const p=s.split(",");r=r||10;for(let g=0;g<p.length;g+=2){const _=String.fromCharCode(parseInt(p[g],r));if(!ig[_]){const E="&"+p[g+1]+";";c[_]=E,c[E]=_}}return c}else return},n1=Qm("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32),x0=(s,r)=>s.replace(r?t1:Jm,c=>ig[c]||c),ap=s=>(""+s).replace(kR,r=>ig[r]||r),Mc=(s,r)=>s.replace(r?t1:Jm,c=>c.length>1?"&#"+((c.charCodeAt(0)-55296)*1024+(c.charCodeAt(1)-56320)+65536)+";":ig[c]||"&#"+c.charCodeAt(0)+";"),T0=(s,r,c)=>{const p=c||n1;return s.replace(r?t1:Jm,g=>ig[g]||p[g]||g)},eh={encodeRaw:x0,encodeAllRaw:ap,encodeNumeric:Mc,encodeNamed:T0,getEncodeFunc:(s,r)=>{const c=Qm(r)||n1,p=(E,R)=>E.replace(R?t1:Jm,N=>ig[N]!==void 0?ig[N]:c[N]!==void 0?c[N]:N.length>1?"&#"+((N.charCodeAt(0)-55296)*1024+(N.charCodeAt(1)-56320)+65536)+";":"&#"+N.charCodeAt(0)+";"),g=(E,R)=>T0(E,R,c),_=Xm(s.replace(/\+/g,","));return _.named&&_.numeric?p:_.named?r?g:T0:_.numeric?Mc:x0},decode:s=>s.replace(e2,(r,c)=>c?(c.charAt(0).toLowerCase()==="x"?c=parseInt(c.substr(1),16):c=parseInt(c,10),c>65535?(c-=65536,String.fromCharCode(55296+(c>>10),56320+(c&1023))):xR[c]||String.fromCharCode(c)):ca[r]||n1[r]||L9(r))},Yl=(s,r)=>(s=Gt.trim(s),s?s.split(r||" "):[]),iy=s=>new RegExp("^"+s.replace(/([?+*])/g,".$1")+"$"),TR=s=>q(s)&&s.source&&Object.prototype.toString.call(s)==="[object RegExp]",IR=s=>{const r=c=>ue(c)?Nt(c,r):TR(c)?new RegExp(c.source,c.flags):q(c)?qs(c,r):c;return r(s)},LC=s=>{const r=/^(~)?(.+)$/;return Wn(Yl(s,","),c=>{const p=r.exec(c);if(p){const _=p[1]==="~"?"span":"div",E=p[2];return[{cloneName:_,name:E}]}else return[]})},t2=s=>Object.freeze(["id","accesskey","class","dir","lang","style","tabindex","title","role",...s!=="html4"?["contenteditable","contextmenu","draggable","dropzone","hidden","spellcheck","translate","itemprop","itemscope","itemtype"]:[],...s!=="html5-strict"?["xml:lang"]:[]]),lp=s=>{let r,c;r="address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul",c="a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var #text #comment",s!=="html4"&&(r+=" article aside details dialog figure main header footer hgroup section nav "+"a ins del canvas map",c+=" audio canvas command data datalist mark meter output picture progress time wbr video ruby bdi keygen svg"),s!=="html5-strict"&&(c=[c,"acronym applet basefont big font strike tt"].join(" "),r=[r,"center dir isindex noframes"].join(" "));const p=[r,c].join(" ");return{blockContent:r,phrasingContent:c,flowContent:p}},cp=s=>{const{blockContent:r,phrasingContent:c,flowContent:p}=lp(s),g=_=>Object.freeze(_.split(" "));return Object.freeze({blockContent:g(r),phrasingContent:g(c),flowContent:g(p)})},ag={html4:Es(()=>cp("html4")),html5:Es(()=>cp("html5")),"html5-strict":Es(()=>cp("html5-strict"))},I0=(s,r)=>{const{blockContent:c,phrasingContent:p,flowContent:g}=ag[s]();return r==="blocks"?ye.some(c):r==="phrasing"?ye.some(p):r==="flow"?ye.some(g):ye.none()},ay=s=>{const r=t2(s),{phrasingContent:c,flowContent:p}=lp(s),g={},_=(N,j,ae)=>{g[N]={attributes:Qs(j,Fe({})),attributesOrder:j,children:Qs(ae,Fe({}))}},E=(N,j="",ae="")=>{const fe=Yl(ae),ve=Yl(N);let xe=ve.length;const De=[...r,...Yl(j)];for(;xe--;)_(ve[xe],De.slice(),fe)},R=(N,j)=>{const ae=Yl(N),fe=Yl(j);let ve=ae.length;for(;ve--;){const xe=g[ae[ve]];for(let De=0,Oe=fe.length;De<Oe;De++)xe.attributes[fe[De]]={},xe.attributesOrder.push(fe[De])}};return s!=="html5-strict"&&(Ve(Yl("acronym applet basefont big font strike tt"),ae=>{E(ae,"",c)}),Ve(Yl("center dir isindex noframes"),ae=>{E(ae,"",p)})),E("html","manifest","head body"),E("head","","base command link meta noscript script style title"),E("title hr noscript br"),E("base","href target"),E("link","href rel media hreflang type sizes hreflang"),E("meta","name http-equiv content charset"),E("style","media type scoped"),E("script","src async defer type charset"),E("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",p),E("dd div","",p),E("address dt caption","",s==="html4"?c:p),E("h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn","",c),E("blockquote","cite",p),E("ol","reversed start type","li"),E("ul","","li"),E("li","value",p),E("dl","","dt dd"),E("a","href target rel media hreflang type",s==="html4"?c:p),E("q","cite",c),E("ins del","cite datetime",p),E("img","src sizes srcset alt usemap ismap width height"),E("iframe","src name width height",p),E("embed","src type width height"),E("object","data type typemustmatch name usemap form width height",[p,"param"].join(" ")),E("param","name value"),E("map","name",[p,"area"].join(" ")),E("area","alt coords shape href target rel media hreflang type"),E("table","border","caption colgroup thead tfoot tbody tr"+(s==="html4"?" col":"")),E("colgroup","span","col"),E("col","span"),E("tbody thead tfoot","","tr"),E("tr","","td th"),E("td","colspan rowspan headers",p),E("th","colspan rowspan headers scope abbr",p),E("form","accept-charset action autocomplete enctype method name novalidate target",p),E("fieldset","disabled form name",[p,"legend"].join(" ")),E("label","form for",c),E("input","accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min multiple name pattern readonly required size src step type value width"),E("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value",s==="html4"?p:c),E("select","disabled form multiple name required size","option optgroup"),E("optgroup","disabled label","option"),E("option","disabled label selected value"),E("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),E("menu","type label",[p,"li"].join(" ")),E("noscript","",p),s!=="html4"&&(E("wbr"),E("ruby","",[c,"rt rp"].join(" ")),E("figcaption","",p),E("mark rt rp bdi","",c),E("summary","",[c,"h1 h2 h3 h4 h5 h6"].join(" ")),E("canvas","width height",p),E("data","value",c),E("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",[p,"track source"].join(" ")),E("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",[p,"track source"].join(" ")),E("picture","","img source"),E("source","src srcset type media sizes"),E("track","kind src srclang label default"),E("datalist","",[c,"option"].join(" ")),E("article section nav aside main header footer","",p),E("hgroup","","h1 h2 h3 h4 h5 h6"),E("figure","",[p,"figcaption"].join(" ")),E("time","datetime",c),E("dialog","open",p),E("command","type label icon disabled checked radiogroup command"),E("output","for form name",c),E("progress","value max",c),E("meter","value min max low high optimum",c),E("details","open",[p,"summary"].join(" ")),E("keygen","autofocus challenge disabled form keytype name"),_("svg","id tabindex lang xml:space class style x y width height viewBox preserveAspectRatio zoomAndPan transform".split(" "),[])),s!=="html5-strict"&&(R("script","language xml:space"),R("style","xml:space"),R("object","declare classid code codebase codetype archive standby align border hspace vspace"),R("embed","align name hspace vspace"),R("param","valuetype type"),R("a","charset name rev shape coords"),R("br","clear"),R("applet","codebase archive code object alt name width height align hspace vspace"),R("img","name longdesc align border hspace vspace"),R("iframe","longdesc frameborder marginwidth marginheight scrolling align"),R("font basefont","size color face"),R("input","usemap align"),R("select"),R("textarea"),R("h1 h2 h3 h4 h5 h6 div p legend caption","align"),R("ul","type compact"),R("li","type"),R("ol dl menu dir","compact"),R("pre","width xml:space"),R("hr","align noshade size width"),R("isindex","prompt"),R("table","summary width frame rules cellspacing cellpadding align bgcolor"),R("col","width align char charoff valign"),R("colgroup","width align char charoff valign"),R("thead","align char charoff valign"),R("tr","align char charoff valign bgcolor"),R("th","axis align char charoff valign nowrap bgcolor width height"),R("form","accept"),R("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),R("tfoot","align char charoff valign"),R("tbody","align char charoff valign"),R("area","nohref"),R("body","background bgcolor text link vlink alink")),s!=="html4"&&(R("input button select textarea","autofocus"),R("input textarea","placeholder"),R("a","download"),R("link script img","crossorigin"),R("img","loading"),R("iframe","sandbox seamless allow allowfullscreen loading referrerpolicy")),s!=="html4"&&Ve([g.video,g.audio],N=>{delete N.children.audio,delete N.children.video}),Ve(Yl("a form meter progress dfn"),N=>{g[N]&&delete g[N].children[N]}),delete g.caption.children.table,delete g.script,g},n2=s=>s==="-"?"remove":"add",s1=s=>{const r=/^(@?)([A-Za-z0-9_\-.\u00b7\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u037d\u037f-\u1fff\u200c-\u200d\u203f-\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]+)$/;return ye.from(r.exec(s)).map(c=>({preset:c[1]==="@",name:c[2]}))},lg=s=>{const r=/^([+\-]?)([A-Za-z0-9_\-.\u00b7\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u037d\u037f-\u1fff\u200c-\u200d\u203f-\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]+)\[([^\]]+)]$/;return Wn(Yl(s,","),c=>{const p=r.exec(c);if(p){const g=p[1],_=g?n2(g):"replace",E=p[2],R=Wn(Yl(p[3],"|"),N=>s1(N).toArray());return[{operation:_,name:E,validChildren:R}]}else return[]})},ly=(s,r)=>{const c=/^([!\-])?(\w+[\\:]:\w+|[^=~<]+)?(?:([=~<])(.*))?$/,p=/[*?+]/,{attributes:g,attributesOrder:_}=r;return Ve(Yl(s,"|"),E=>{const R=c.exec(E);if(R){const N={},j=R[1],ae=R[2].replace(/[\\:]:/g,":"),fe=R[3],ve=R[4];if(j==="!"&&(r.attributesRequired=r.attributesRequired||[],r.attributesRequired.push(ae),N.required=!0),j==="-"){delete g[ae],_.splice(Gt.inArray(_,ae),1);return}if(fe&&(fe==="="?(r.attributesDefault=r.attributesDefault||[],r.attributesDefault.push({name:ae,value:ve}),N.defaultValue=ve):fe==="~"?(r.attributesForced=r.attributesForced||[],r.attributesForced.push({name:ae,value:ve}),N.forcedValue=ve):fe==="<"&&(N.validValues=Gt.makeMap(ve,"?"))),p.test(ae)){const xe=N;r.attributePatterns=r.attributePatterns||[],xe.pattern=iy(ae),r.attributePatterns.push(xe)}else g[ae]||_.push(ae),g[ae]=N}})},s4=(s,r)=>{bn(s.attributes,(c,p)=>{r.attributes[p]=c}),r.attributesOrder.push(...s.attributesOrder)},o4=(s,r)=>{const c=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)])?$/;return Wn(Yl(r,","),p=>{const g=c.exec(p);if(g){const _=g[1],E=g[2],R=g[3],N=g[4],j=g[5],ae={attributes:{},attributesOrder:[]};if(s.each(fe=>s4(fe,ae)),_==="#"?ae.paddEmpty=!0:_==="-"&&(ae.removeEmpty=!0),N==="!"&&(ae.removeEmptyAttrs=!0),j&&ly(j,ae),R&&(ae.outputName=E),E==="@")if(s.isNone())s=ye.some(ae);else return[];return[R?{name:E,element:ae,aliasName:R}:{name:E,element:ae}]}else return[]})},vo={},ps=Gt.makeMap,_u=Gt.each,r4=Gt.extend,i4=Gt.explode,a4=(s,r={})=>{const c=ps(s," ",ps(s.toUpperCase()," "));return r4(c,r)},PC=s=>a4("td th li dt dd figcaption caption details summary",s.getTextBlockElements()),ni=(s,r)=>{if(s){const c={};return z(s)&&(s={"*":s}),_u(s,(p,g)=>{c[g]=c[g.toUpperCase()]=r==="map"?ps(p,/[, ]/):i4(p,/[, ]/)}),c}else return},o1=(s={})=>{var r;const c={},p={};let g=[];const _={},E={},R=(ys,zo,Ea)=>{const $l=s[ys];if($l)return ps($l,/[, ]/,ps($l.toUpperCase(),/[, ]/));{let Bl=vo[ys];return Bl||(Bl=a4(zo,Ea),vo[ys]=Bl),Bl}},N=(r=s.schema)!==null&&r!==void 0?r:"html5",j=ay(N);s.verify_html===!1&&(s.valid_elements="*[*]");const ae=ni(s.valid_styles),fe=ni(s.invalid_styles,"map"),ve=ni(s.valid_classes,"map"),xe=R("whitespace_elements","pre script noscript style textarea video audio iframe object code"),De=R("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),Oe=R("void_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),Ne=R("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls allowfullscreen"),tt="td th iframe video audio object script code",ut=R("non_empty_elements",tt+" pre svg textarea summary",Oe),gt=R("move_caret_before_on_enter_elements",tt+" table",Oe),Tt="h1 h2 h3 h4 h5 h6",Jt=R("text_block_elements",Tt+" p div address pre form blockquote center dir fieldset header footer article section hgroup aside main nav figure"),vn=R("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex option datalist select optgroup figcaption details summary html body multicol listing",Jt),qn=R("text_inline_elements","span strong b em i font s strike u var cite dfn code mark q sup sub samp"),Ut=R("transparent_elements","a ins del canvas map"),Et=R("wrap_block_elements","pre "+Tt);_u("script noscript iframe noframes noembed title style textarea xmp plaintext".split(" "),ys=>{E[ys]=new RegExp("</"+ys+"[^>]*>","gi")});const Qt=ys=>{const zo=ye.from(c["@"]),Ea=/[*?+]/;Ve(o4(zo,ys!=null?ys:""),({name:$l,element:Bl,aliasName:rl})=>{if(rl&&(c[rl]=Bl),Ea.test($l)){const Xi=Bl;Xi.pattern=iy($l),g.push(Xi)}else c[$l]=Bl})},Bn=ys=>{g=[],Ve(Zs(c),zo=>{delete c[zo]}),Qt(ys)},hs=(ys,zo)=>{var Ea,$l;delete vo.text_block_elements,delete vo.block_elements;const Bl=zo.extends?!Tu(zo.extends):!1,rl=zo.extends;if(p[ys]=rl?p[rl]:{},_[ys]=rl!=null?rl:ys,ut[ys.toUpperCase()]={},ut[ys]={},Bl||(vn[ys.toUpperCase()]={},vn[ys]={}),rl&&!c[ys]&&c[rl]){const Xi=IR(c[rl]);delete Xi.removeEmptyAttrs,delete Xi.removeEmpty,c[ys]=Xi}else c[ys]={attributesOrder:[],attributes:{}};if(ue(zo.attributes)){const Xi=Ju=>{Ji.attributesOrder.push(Ju),Ji.attributes[Ju]={}},Ji=(Ea=c[ys])!==null&&Ea!==void 0?Ea:{};delete Ji.attributesDefault,delete Ji.attributesForced,delete Ji.attributePatterns,delete Ji.attributesRequired,Ji.attributesOrder=[],Ji.attributes={},Ve(zo.attributes,Ju=>{const Cm=t2(N);s1(Ju).each(({preset:wh,name:Eh})=>{wh?Eh==="global"&&Ve(Cm,Xi):Xi(Eh)})}),c[ys]=Ji}if(ce(zo.padEmpty)){const Xi=($l=c[ys])!==null&&$l!==void 0?$l:{};Xi.paddEmpty=zo.padEmpty,c[ys]=Xi}if(ue(zo.children)){const Xi={},Ji=Cm=>{Xi[Cm]={}},Ju=Cm=>{I0(N,Cm).each(wh=>{Ve(wh,Ji)})};Ve(zo.children,Cm=>{s1(Cm).each(({preset:wh,name:Eh})=>{wh?Ju(Eh):Ji(Eh)})}),p[ys]=Xi}rl&&bn(p,(Xi,Ji)=>{Xi[rl]&&(p[Ji]=Xi=r4({},p[Ji]),Xi[ys]=Xi[rl])})},mo=ys=>{Ve(LC(ys!=null?ys:""),({name:zo,cloneName:Ea})=>{hs(zo,{extends:Ea})})},bo=ys=>{q(ys)?bn(ys,(zo,Ea)=>hs(Ea,zo)):z(ys)&&mo(ys)},dr=ys=>{Ve(lg(ys!=null?ys:""),({operation:zo,name:Ea,validChildren:$l})=>{const Bl=zo==="replace"?{"#comment":{}}:p[Ea],rl=Ji=>{zo==="remove"?delete Bl[Ji]:Bl[Ji]={}},Xi=Ji=>{I0(N,Ji).each(Ju=>{Ve(Ju,rl)})};Ve($l,({preset:Ji,name:Ju})=>{Ji?Xi(Ju):rl(Ju)}),p[Ea]=Bl})},Vr=ys=>{const zo=c[ys];if(zo)return zo;let Ea=g.length;for(;Ea--;){const $l=g[Ea];if($l.pattern.test(ys))return $l}},Na=()=>{s.valid_elements?(Bn(s.valid_elements),_u(j,(ys,zo)=>{p[zo]=ys.children})):(_u(j,(ys,zo)=>{c[zo]={attributes:ys.attributes,attributesOrder:ys.attributesOrder},p[zo]=ys.children}),_u(Yl("strong/b em/i"),ys=>{const zo=Yl(ys,"/");c[zo[1]].outputName=zo[0]}),_u(qn,(ys,zo)=>{c[zo]&&(s.padd_empty_block_inline_children&&(c[zo].paddInEmptyBlock=!0),c[zo].removeEmpty=!0)}),_u(Yl("ol ul blockquote a table tbody"),ys=>{c[ys]&&(c[ys].removeEmpty=!0)}),_u(Yl("p h1 h2 h3 h4 h5 h6 th td pre div address caption li summary"),ys=>{c[ys]&&(c[ys].paddEmpty=!0)}),_u(Yl("span"),ys=>{c[ys].removeEmptyAttrs=!0})),delete c.svg,bo(s.custom_elements),dr(s.valid_children),Qt(s.extended_valid_elements),dr("+ol[ul|ol],+ul[ul|ol]"),_u({dd:"dl",dt:"dl",li:"ul ol",td:"tr",th:"tr",tr:"tbody thead tfoot",tbody:"table",thead:"table",tfoot:"table",legend:"fieldset",area:"map",param:"video audio object"},(ys,zo)=>{c[zo]&&(c[zo].parentsRequired=Yl(ys))}),s.invalid_elements&&_u(i4(s.invalid_elements),ys=>{c[ys]&&delete c[ys]}),Vr("span")||Qt("span[!data-mce-type|*]")},Fl=Fe(ae),sc=Fe(fe),Tn=Fe(ve),gs=Fe(Ne),rr=Fe(vn),Un=Fe(Jt),nn=Fe(qn),Nn=Fe(Object.seal(Oe)),Os=Fe(De),Zr=Fe(ut),Oo=Fe(gt),Vc=Fe(xe),_m=Fe(Ut),x1=Fe(Et),ru=Fe(Object.seal(E)),Tp=(ys,zo)=>{const Ea=p[ys.toLowerCase()];return!!(Ea&&Ea[zo.toLowerCase()])},Ip=(ys,zo)=>{const Ea=Vr(ys);if(Ea)if(zo){if(Ea.attributes[zo])return!0;const $l=Ea.attributePatterns;if($l){let Bl=$l.length;for(;Bl--;)if($l[Bl].pattern.test(zo))return!0}}else return!0;return!1},Tu=ys=>Kt(rr(),ys),Xu=ys=>!hr(ys,"#")&&Ip(ys)&&!Tu(ys),Sm=ys=>Kt(x1(),ys)||Xu(ys),yv=Fe(_);return Na(),{type:N,children:p,elements:c,getValidStyles:Fl,getValidClasses:Tn,getBlockElements:rr,getInvalidStyles:sc,getVoidElements:Nn,getTextBlockElements:Un,getTextInlineElements:nn,getBoolAttrs:gs,getElementRule:Vr,getSelfClosingElements:Os,getNonEmptyElements:Zr,getMoveCaretBeforeOnEnterElements:Oo,getWhitespaceElements:Vc,getTransparentElements:_m,getSpecialElements:ru,isValidChild:Tp,isValid:Ip,isBlock:Tu,isInline:Xu,isWrapper:Sm,getCustomElements:yv,addValidElements:Qt,setValidElements:Bn,addCustomElements:bo,addValidChildren:dr}},AR=s=>({value:P9(s)}),P9=s=>Tr(s,"#").toUpperCase(),Wt=s=>{const r=s.toString(16);return(r.length===1?"0"+r:r).toUpperCase()},MC=s=>{const r=Wt(s.red)+Wt(s.green)+Wt(s.blue);return AR(r)},NC=/^\s*rgb\s*\(\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*(\d+)\s*\)\s*$/i,s2=/^\s*rgba\s*\(\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*((?:\d?\.\d+|\d+)%?)\s*\)\s*$/i,OR=(s,r,c,p)=>({red:s,green:r,blue:c,alpha:p}),A0=(s,r,c,p)=>{const g=parseInt(s,10),_=parseInt(r,10),E=parseInt(c,10),R=parseFloat(p);return OR(g,_,E,R)},cy=s=>NC.test(s)?"rgb":s2.test(s)?"rgba":"other",cg=s=>{const r=NC.exec(s);if(r!==null)return ye.some(A0(r[1],r[2],r[3],"1"));const c=s2.exec(s);return c!==null?ye.some(A0(c[1],c[2],c[3],c[4])):ye.none()},l4=s=>"rgba(".concat(s.red,",").concat(s.green,",").concat(s.blue,",").concat(s.alpha,")"),th=s=>cg(s).map(MC).map(r=>"#"+r.value).getOr(s),$r=(s={},r)=>{const c=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,p=/\s*([^:]+):\s*([^;]+);?/g,g=/\s+$/,_={};let E,R;const N=Jb;r&&(E=r.getValidStyles(),R=r.getInvalidStyles());const j=("\\\" \\' \\; \\: ; : "+N).split(" ");for(let fe=0;fe<j.length;fe++)_[j[fe]]=N+fe,_[N+fe]=j[fe];const ae={parse:fe=>{const ve={};let xe=!1;const De=s.url_converter,Oe=s.url_converter_scope||ae,Ne=(Ut,Et,Qt)=>{const Bn=ve[Ut+"-top"+Et];if(!Bn)return;const hs=ve[Ut+"-right"+Et];if(!hs)return;const mo=ve[Ut+"-bottom"+Et];if(!mo)return;const bo=ve[Ut+"-left"+Et];if(!bo)return;const dr=[Bn,hs,mo,bo];let Vr=dr.length-1;for(;Vr--&&dr[Vr]===dr[Vr+1];);Vr>-1&&Qt||(ve[Ut+Et]=Vr===-1?dr[0]:dr.join(" "),delete ve[Ut+"-top"+Et],delete ve[Ut+"-right"+Et],delete ve[Ut+"-bottom"+Et],delete ve[Ut+"-left"+Et])},tt=Ut=>{const Et=ve[Ut];if(!Et)return;const Qt=Et.indexOf(",")>-1?[Et]:Et.split(" ");let Bn=Qt.length;for(;Bn--;)if(Qt[Bn]!==Qt[0])return!1;return ve[Ut]=Qt[0],!0},ut=(Ut,Et,Qt,Bn)=>{tt(Et)&&tt(Qt)&&tt(Bn)&&(ve[Ut]=ve[Et]+" "+ve[Qt]+" "+ve[Bn],delete ve[Et],delete ve[Qt],delete ve[Bn])},gt=Ut=>(xe=!0,_[Ut]),Tt=(Ut,Et)=>(xe&&(Ut=Ut.replace(/\uFEFF[0-9]/g,Qt=>_[Qt])),Et||(Ut=Ut.replace(/\\([\'\";:])/g,"$1")),Ut),Jt=Ut=>String.fromCharCode(parseInt(Ut.slice(1),16)),vn=Ut=>Ut.replace(/\\[0-9a-f]+/gi,Jt),qn=(Ut,Et,Qt,Bn,hs,mo)=>{if(hs=hs||mo,hs)return hs=Tt(hs),"'"+hs.replace(/\'/g,"\\'")+"'";if(Et=Tt(Et||Qt||Bn||""),!s.allow_script_urls){const bo=Et.replace(/[\s\r\n]+/g,"");if(/(java|vb)script:/i.test(bo)||!s.allow_svg_data_urls&&/^data:image\/svg/i.test(bo))return""}return De&&(Et=De.call(Oe,Et,"style")),"url('"+Et.replace(/\'/g,"\\'")+"')"};if(fe){fe=fe.replace(/[\u0000-\u001F]/g,""),fe=fe.replace(/\\[\"\';:\uFEFF]/g,gt).replace(/\"[^\"]+\"|\'[^\']+\'/g,Et=>Et.replace(/[;:]/g,gt));let Ut;for(;Ut=p.exec(fe);){p.lastIndex=Ut.index+Ut[0].length;let Et=Ut[1].replace(g,"").toLowerCase(),Qt=Ut[2].replace(g,"");if(Et&&Qt){if(Et=vn(Et),Qt=vn(Qt),Et.indexOf(N)!==-1||Et.indexOf('"')!==-1||!s.allow_script_urls&&(Et==="behavior"||/expression\s*\(|\/\*|\*\//.test(Qt)))continue;Et==="font-weight"&&Qt==="700"?Qt="bold":(Et==="color"||Et==="background-color")&&(Qt=Qt.toLowerCase()),cy(Qt)==="rgb"&&cg(Qt).each(Bn=>{Qt=th(l4(Bn)).toLowerCase()}),Qt=Qt.replace(c,qn),ve[Et]=xe?Tt(Qt,!0):Qt}}Ne("border","",!0),Ne("border","-width"),Ne("border","-color"),Ne("border","-style"),Ne("padding",""),Ne("margin",""),ut("border","border-width","border-style","border-color"),ve.border==="medium none"&&delete ve.border,ve["border-image"]==="none"&&delete ve["border-image"]}return ve},serialize:(fe,ve)=>{let xe="";const De=(Ne,tt)=>{const ut=tt[Ne];if(ut)for(let gt=0,Tt=ut.length;gt<Tt;gt++){const Jt=ut[gt],vn=fe[Jt];vn&&(xe+=(xe.length>0?" ":"")+Jt+": "+vn+";")}},Oe=(Ne,tt)=>{if(!R||!tt)return!0;let ut=R["*"];return ut&&ut[Ne]?!1:(ut=R[tt],!(ut&&ut[Ne]))};return ve&&E?(De("*",E),De(ve,E)):bn(fe,(Ne,tt)=>{Ne&&Oe(tt,ve)&&(xe+=(xe.length>0?" ":"")+tt+": "+Ne+";")}),xe}};return ae},nh={keyLocation:!0,layerX:!0,layerY:!0,returnValue:!0,webkitMovementX:!0,webkitMovementY:!0,keyIdentifier:!0,mozPressure:!0},M9=s=>s instanceof Event||ie(s.initEvent),r1=s=>s.isDefaultPrevented===Ht||s.isDefaultPrevented===ct,RR=s=>de(s.preventDefault)||M9(s),c4=(s,r)=>{const c=r!=null?r:{};for(const p in s)Kt(nh,p)||(c[p]=s[p]);return he(s.composedPath)&&(c.composedPath=()=>s.composedPath()),he(s.getModifierState)&&(c.getModifierState=p=>s.getModifierState(p)),he(s.getTargetRanges)&&(c.getTargetRanges=()=>s.getTargetRanges()),c},uy=(s,r,c,p)=>{var g;const _=c4(r,p);return _.type=s,de(_.target)&&(_.target=(g=_.srcElement)!==null&&g!==void 0?g:c),RR(r)&&(_.preventDefault=()=>{_.defaultPrevented=!0,_.isDefaultPrevented=Ht,ie(r.preventDefault)&&r.preventDefault()},_.stopPropagation=()=>{_.cancelBubble=!0,_.isPropagationStopped=Ht,ie(r.stopPropagation)&&r.stopPropagation()},_.stopImmediatePropagation=()=>{_.isImmediatePropagationStopped=Ht,_.stopPropagation()},r1(_)||(_.isDefaultPrevented=_.defaultPrevented===!0?Ht:ct,_.isPropagationStopped=_.cancelBubble===!0?Ht:ct,_.isImmediatePropagationStopped=ct)),_},DR="mce-data-",up=/^(?:mouse|contextmenu)|click/,u4=(s,r,c,p)=>{s.addEventListener(r,c,p||!1)},o2=(s,r,c,p)=>{s.removeEventListener(r,c,p||!1)},FC=s=>he(s)&&up.test(s.type),O0=(s,r)=>{const c=uy(s.type,s,document,r);if(FC(s)&&ge(s.pageX)&&!ge(s.clientX)){const p=c.target.ownerDocument||document,g=p.documentElement,_=p.body,E=c;E.pageX=s.clientX+(g&&g.scrollLeft||_&&_.scrollLeft||0)-(g&&g.clientLeft||_&&_.clientLeft||0),E.pageY=s.clientY+(g&&g.scrollTop||_&&_.scrollTop||0)-(g&&g.clientTop||_&&_.clientTop||0)}return c},d4=(s,r,c)=>{const p=s.document,g={type:"ready"};if(c.domLoaded){r(g);return}const _=()=>p.readyState==="complete"||p.readyState==="interactive"&&p.body,E=()=>{o2(s,"DOMContentLoaded",E),o2(s,"load",E),c.domLoaded||(c.domLoaded=!0,r(g)),s=null};_()?E():u4(s,"DOMContentLoaded",E),c.domLoaded||u4(s,"load",E)};class i1{constructor(){this.domLoaded=!1,this.events={},this.count=1,this.expando=DR+(+new Date).toString(32),this.hasFocusIn="onfocusin"in document.documentElement,this.count=1}bind(r,c,p,g){const _=this;let E;const R=window,N=ve=>{_.executeHandlers(O0(ve||R.event),j)};if(!r||un(r)||dl(r))return p;let j;r[_.expando]?j=r[_.expando]:(j=_.count++,r[_.expando]=j,_.events[j]={}),g=g||r;const ae=c.split(" ");let fe=ae.length;for(;fe--;){let ve=ae[fe],xe=N,De=!1,Oe=!1;if(ve==="DOMContentLoaded"&&(ve="ready"),_.domLoaded&&ve==="ready"&&r.readyState==="complete"){p.call(g,O0({type:ve}));continue}!_.hasFocusIn&&(ve==="focusin"||ve==="focusout")&&(De=!0,Oe=ve==="focusin"?"focus":"blur",xe=Ne=>{const tt=O0(Ne||R.event);tt.type=tt.type==="focus"?"focusin":"focusout",_.executeHandlers(tt,j)}),E=_.events[j][ve],E?ve==="ready"&&_.domLoaded?p(O0({type:ve})):E.push({func:p,scope:g}):(_.events[j][ve]=E=[{func:p,scope:g}],E.fakeName=Oe,E.capture=De,E.nativeHandler=xe,ve==="ready"?d4(r,xe,_):u4(r,Oe||ve,xe,De))}return r=E=null,p}unbind(r,c,p){if(!r||un(r)||dl(r))return this;const g=r[this.expando];if(g){let _=this.events[g];if(c){const E=c.split(" ");let R=E.length;for(;R--;){const N=E[R],j=_[N];if(j){if(p){let ae=j.length;for(;ae--;)if(j[ae].func===p){const fe=j.nativeHandler,ve=j.fakeName,xe=j.capture,De=j.slice(0,ae).concat(j.slice(ae+1));De.nativeHandler=fe,De.fakeName=ve,De.capture=xe,_[N]=De}}(!p||j.length===0)&&(delete _[N],o2(r,j.fakeName||N,j.nativeHandler,j.capture))}}}else bn(_,(E,R)=>{o2(r,E.fakeName||R,E.nativeHandler,E.capture)}),_={};for(const E in _)if(Kt(_,E))return this;delete this.events[g];try{delete r[this.expando]}catch{r[this.expando]=null}}return this}fire(r,c,p){return this.dispatch(r,c,p)}dispatch(r,c,p){if(!r||un(r)||dl(r))return this;const g=O0({type:c,target:r},p);do{const _=r[this.expando];_&&this.executeHandlers(g,_),r=r.parentNode||r.ownerDocument||r.defaultView||r.parentWindow}while(r&&!g.isPropagationStopped());return this}clean(r){if(!r||un(r)||dl(r))return this;if(r[this.expando]&&this.unbind(r),r.getElementsByTagName||(r=r.document),r&&r.getElementsByTagName){this.unbind(r);const c=r.getElementsByTagName("*");let p=c.length;for(;p--;)r=c[p],r[this.expando]&&this.unbind(r)}return this}destroy(){this.events={}}cancel(r){return r&&(r.preventDefault(),r.stopImmediatePropagation()),!1}executeHandlers(r,c){const p=this.events[c],g=p&&p[r.type];if(g)for(let _=0,E=g.length;_<E;_++){const R=g[_];if(R&&R.func.call(R.scope,r)===!1&&r.preventDefault(),r.isImmediatePropagationStopped())return}}}i1.Event=new i1;const $C=Gt.each,BC=Gt.grep,lf="data-mce-style",Pd=Gt.makeMap("fill-opacity font-weight line-height opacity orphans widows z-index zoom"," "),cn=(s,r,c)=>{de(c)||c===""?gi(s,r):el(s,r,c)},N9=s=>s.replace(/[A-Z]/g,r=>"-"+r.toLowerCase()),Sa=(s,r)=>{let c=0;if(s)for(let p=s.nodeType,g=s.previousSibling;g;g=g.previousSibling){const _=g.nodeType;r&&un(g)&&(_===p||!g.data.length)||(c++,p=_)}return c},F9=(s,r)=>{const c=ql(r,"style"),p=s.serialize(s.parse(c),oo(r));cn(r,lf,p)},$9=(s,r)=>Be(s)?Kt(Pd,r)?s+"":s+"px":s,dy=(s,r,c)=>{const p=N9(r);de(c)||c===""?ud(s,p):z5(s,p,$9(c,p))},VC=(s,r,c)=>{const p=r.keep_values,g={set:(E,R,N)=>{const j=et.fromDom(E);ie(r.url_converter)&&he(R)&&(R=r.url_converter.call(r.url_converter_scope||c(),String(R),N,E));const ae="data-mce-"+N;cn(j,ae,R),cn(j,N,R)},get:(E,R)=>{const N=et.fromDom(E);return ql(N,"data-mce-"+R)||ql(N,R)}},_={style:{set:(E,R)=>{const N=et.fromDom(E);p&&cn(N,lf,R),gi(N,"style"),z(R)&&no(N,s.parse(R))},get:E=>{const R=et.fromDom(E),N=ql(R,lf)||ql(R,"style");return s.serialize(s.parse(N),oo(R))}}};return p&&(_.href=_.src=g),_},vi=(s,r={})=>{const c={},p=window,g={};let _=0;const E=!0,R=!0,N=fd.forElement(et.fromDom(s),{contentCssCors:r.contentCssCors,referrerPolicy:r.referrerPolicy}),j=[],ae=r.schema?r.schema:o1({}),fe=$r({url_converter:r.url_converter,url_converter_scope:r.url_converter_scope},r.schema),ve=r.ownEvents?new i1:i1.Event,xe=ae.getBlockElements(),De=Ct=>z(Ct)?Kt(xe,Ct):Ln(Ct)&&(Kt(xe,Ct.nodeName)||af(ae,Ct)),Oe=Ct=>Ct&&s&&z(Ct)?s.getElementById(Ct):Ct,Ne=Ct=>{const Rt=Oe(Ct);return he(Rt)?et.fromDom(Rt):null},tt=(Ct,Rt,xn="")=>{let yn;const Ts=Ne(Ct);if(he(Ts)&&li(Ts)){const Xo=J7[Rt];Xo&&Xo.get?yn=Xo.get(Ts.dom,Rt):yn=ql(Ts,Rt)}return he(yn)?yn:xn},ut=Ct=>{const Rt=Oe(Ct);return de(Rt)?[]:Rt.attributes},gt=(Ct,Rt,xn)=>{gs(Ct,yn=>{if(Ln(yn)){const Ts=et.fromDom(yn),Xo=xn===""?null:xn,ka=ql(Ts,Rt),T1=J7[Rt];T1&&T1.set?T1.set(Ts.dom,Xo,Rt):cn(Ts,Rt,Xo),ka!==Xo&&r.onSetAttrib&&r.onSetAttrib({attrElm:Ts.dom,attrName:Rt,attrValue:Xo})}})},Tt=(Ct,Rt)=>Ct.cloneNode(Rt),Jt=()=>r.root_element||s.body,vn=Ct=>{const Rt=kC(Ct);return{x:Rt.x,y:Rt.y,w:Rt.width,h:Rt.height}},qn=(Ct,Rt)=>Qv(s.body,Oe(Ct),Rt),Ut=(Ct,Rt,xn)=>{gs(Ct,yn=>{const Ts=et.fromDom(yn);dy(Ts,Rt,xn),r.update_styles&&F9(fe,Ts)})},Et=(Ct,Rt)=>{gs(Ct,xn=>{const yn=et.fromDom(xn);bn(Rt,(Ts,Xo)=>{dy(yn,Xo,Ts)}),r.update_styles&&F9(fe,yn)})},Qt=(Ct,Rt,xn)=>{const yn=Oe(Ct);if(!(de(yn)||!rf(yn)&&!TC(yn)))return xn?Oa(et.fromDom(yn),N9(Rt)):(Rt=Rt.replace(/-(\D)/g,(Ts,Xo)=>Xo.toUpperCase()),Rt==="float"&&(Rt="cssFloat"),yn.style?yn.style[Rt]:void 0)},Bn=Ct=>{const Rt=Oe(Ct);if(!Rt)return{w:0,h:0};let xn=Qt(Rt,"width"),yn=Qt(Rt,"height");return(!xn||xn.indexOf("px")===-1)&&(xn="0"),(!yn||yn.indexOf("px")===-1)&&(yn="0"),{w:parseInt(xn,10)||Rt.offsetWidth||Rt.clientWidth,h:parseInt(yn,10)||Rt.offsetHeight||Rt.clientHeight}},hs=Ct=>{const Rt=Oe(Ct),xn=qn(Rt),yn=Bn(Rt);return{x:xn.x,y:xn.y,w:yn.w,h:yn.h}},mo=(Ct,Rt)=>{if(!Ct)return!1;const xn=ue(Ct)?Ct:[Ct];return Ot(xn,yn=>Kc(et.fromDom(yn),Rt))},bo=(Ct,Rt,xn,yn)=>{const Ts=[];let Xo=Oe(Ct);yn=yn===void 0;const ka=xn||(Jt().nodeName!=="BODY"?Jt().parentNode:null);if(z(Rt))if(Rt==="*")Rt=Ln;else{const T1=Rt;Rt=wm=>mo(wm,T1)}for(;Xo&&!(Xo===ka||de(Xo.nodeType)||Xv(Xo)||fl(Xo));){if(!Rt||Rt(Xo))if(yn)Ts.push(Xo);else return[Xo];Xo=Xo.parentNode}return yn?Ts:null},dr=(Ct,Rt,xn)=>{const yn=bo(Ct,Rt,xn,!1);return yn&&yn.length>0?yn[0]:null},Vr=(Ct,Rt,xn)=>{let yn=Rt;if(Ct){z(Rt)&&(yn=Ts=>mo(Ts,Rt));for(let Ts=Ct[xn];Ts;Ts=Ts[xn])if(ie(yn)&&yn(Ts))return Ts}return null},Na=(Ct,Rt)=>Vr(Ct,Rt,"nextSibling"),Fl=(Ct,Rt)=>Vr(Ct,Rt,"previousSibling"),sc=Ct=>ie(Ct.querySelectorAll),Tn=(Ct,Rt)=>{var xn,yn;const Ts=(yn=(xn=Oe(Rt))!==null&&xn!==void 0?xn:r.root_element)!==null&&yn!==void 0?yn:s;return sc(Ts)?Mo(Ts.querySelectorAll(Ct)):[]},gs=function(Ct,Rt,xn){const yn=xn!=null?xn:this;if(ue(Ct)){const Ts=[];return $C(Ct,(Xo,ka)=>{const T1=Oe(Xo);T1&&Ts.push(Rt.call(yn,T1,ka))}),Ts}else{const Ts=Oe(Ct);return Ts?Rt.call(yn,Ts):!1}},rr=(Ct,Rt)=>{gs(Ct,xn=>{bn(Rt,(yn,Ts)=>{gt(xn,Ts,yn)})})},Un=(Ct,Rt)=>{gs(Ct,xn=>{const yn=et.fromDom(xn);S0(yn,Rt)})},nn=(Ct,Rt,xn,yn,Ts)=>gs(Ct,Xo=>{const ka=z(Rt)?s.createElement(Rt):Rt;return he(xn)&&rr(ka,xn),yn&&(!z(yn)&&yn.nodeType?ka.appendChild(yn):z(yn)&&Un(ka,yn)),Ts?ka:Xo.appendChild(ka)}),Nn=(Ct,Rt,xn)=>nn(s.createElement(Ct),Ct,Rt,xn,!0),Os=eh.decode,Zr=eh.encodeAllRaw,Oo=(Ct,Rt,xn="")=>{let yn="<"+Ct;for(const Ts in Rt)Ps(Rt,Ts)&&(yn+=" "+Ts+'="'+Zr(Rt[Ts])+'"');return hi(xn)&&Kt(ae.getVoidElements(),Ct)?yn+" />":yn+">"+xn+"</"+Ct+">"},Vc=Ct=>{const Rt=s.createElement("div"),xn=s.createDocumentFragment();xn.appendChild(Rt),Ct&&(Rt.innerHTML=Ct);let yn;for(;yn=Rt.firstChild;)xn.appendChild(yn);return xn.removeChild(Rt),xn},_m=(Ct,Rt)=>gs(Ct,xn=>{const yn=et.fromDom(xn);return Rt&&Ve(Il(yn),Ts=>{Aa(Ts)&&Ts.dom.length===0?ti(Ts):Jc(yn,Ts)}),ti(yn),yn.dom}),x1=Ct=>gs(Ct,Rt=>{const xn=Rt.attributes;for(let yn=xn.length-1;yn>=0;yn--)Rt.removeAttributeNode(xn.item(yn))}),ru=Ct=>fe.parse(Ct),Tp=(Ct,Rt)=>fe.serialize(Ct,Rt),Ip=Ct=>{if(Sv!==vi.DOM&&s===document){if(c[Ct])return;c[Ct]=!0}let Rt=s.getElementById("mceDefaultStyles");if(!Rt){Rt=s.createElement("style"),Rt.id="mceDefaultStyles",Rt.type="text/css";const xn=s.head;xn.firstChild?xn.insertBefore(Rt,xn.firstChild):xn.appendChild(Rt)}Rt.styleSheet?Rt.styleSheet.cssText+=Ct:Rt.appendChild(s.createTextNode(Ct))},Tu=Ct=>{Ct||(Ct=""),Ve(Ct.split(","),Rt=>{g[Rt]=!0,N.load(Rt).catch(Ue)})},Xu=(Ct,Rt,xn)=>{gs(Ct,yn=>{if(Ln(yn)){const Ts=et.fromDom(yn),Xo=Rt.split(" ");Ve(Xo,ka=>{he(xn)?(xn?Yt:ko)(Ts,ka):ei(Ts,ka)})}})},Sm=(Ct,Rt)=>{Xu(Ct,Rt,!0)},yv=(Ct,Rt)=>{Xu(Ct,Rt,!1)},ys=(Ct,Rt)=>{const xn=Ne(Ct),yn=Rt.split(" ");return he(xn)&&ts(yn,Ts=>Pi(xn,Ts))},zo=Ct=>{gs(Ct,Rt=>ud(et.fromDom(Rt),"display"))},Ea=Ct=>{gs(Ct,Rt=>z5(et.fromDom(Rt),"display","none"))},$l=Ct=>{const Rt=Ne(Ct);return he(Rt)&&Zl(vu(Rt,"display"),"none")},Bl=Ct=>(Ct||"mce_")+_++,rl=Ct=>{const Rt=Ne(Ct);return he(Rt)?Ln(Rt.dom)?Rt.dom.outerHTML:Xf(Rt):""},Xi=(Ct,Rt)=>{gs(Ct,xn=>{Ln(xn)&&(xn.outerHTML=Rt)})},Ji=(Ct,Rt)=>{const xn=Oe(Rt);return gs(Ct,yn=>{const Ts=xn==null?void 0:xn.parentNode,Xo=xn==null?void 0:xn.nextSibling;return Ts&&(Xo?Ts.insertBefore(yn,Xo):Ts.appendChild(yn)),yn})},Ju=(Ct,Rt,xn)=>gs(Rt,yn=>{var Ts;const Xo=ue(Rt)?Ct.cloneNode(!0):Ct;return xn&&$C(BC(yn.childNodes),ka=>{Xo.appendChild(ka)}),(Ts=yn.parentNode)===null||Ts===void 0||Ts.replaceChild(Xo,yn),yn}),Cm=(Ct,Rt)=>{if(Ct.nodeName!==Rt.toUpperCase()){const xn=Nn(Rt);return $C(ut(Ct),yn=>{gt(xn,yn.nodeName,tt(Ct,yn.nodeName))}),Ju(xn,Ct,!0),xn}else return Ct},wh=(Ct,Rt)=>{let xn=Ct;for(;xn;){let yn=Rt;for(;yn&&xn!==yn;)yn=yn.parentNode;if(xn===yn)break;xn=xn.parentNode}return!xn&&Ct.ownerDocument?Ct.ownerDocument.documentElement:xn},Eh=(Ct,Rt,xn)=>ne(Rt)?em(ae,Ct,{...xn,isContent:Ts=>{const Xo=Ts.nodeName.toLowerCase();return!!Rt[Xo]}}):em(ae,Ct,xn),L3=()=>s.createRange(),P3=(Ct,Rt,xn)=>{let yn=L3(),Ts,Xo;if(Ct&&Rt&&Ct.parentNode&&Rt.parentNode){const ka=Ct.parentNode;return yn.setStart(ka,Sa(Ct)),yn.setEnd(Rt.parentNode,Sa(Rt)),Ts=yn.extractContents(),yn=L3(),yn.setStart(Rt.parentNode,Sa(Rt)+1),yn.setEnd(ka,Sa(Ct)+1),Xo=yn.extractContents(),ka.insertBefore(n4(Sv,Ts,ae),Ct),xn?ka.insertBefore(xn,Ct):ka.insertBefore(Rt,Ct),ka.insertBefore(n4(Sv,Xo,ae),Ct),_m(Ct),xn||Rt}else return},M3=(Ct,Rt,xn,yn)=>{if(ue(Ct)){let Ts=Ct.length;const Xo=[];for(;Ts--;)Xo[Ts]=M3(Ct[Ts],Rt,xn,yn);return Xo}else return r.collect&&(Ct===s||Ct===p)&&j.push([Ct,Rt,xn,yn]),ve.bind(Ct,Rt,xn,yn||Sv)},kh=(Ct,Rt,xn)=>{if(ue(Ct)){let yn=Ct.length;const Ts=[];for(;yn--;)Ts[yn]=kh(Ct[yn],Rt,xn);return Ts}else{if(j.length>0&&(Ct===s||Ct===p)){let yn=j.length;for(;yn--;){const[Ts,Xo,ka]=j[yn];Ct===Ts&&(!Rt||Rt===Xo)&&(!xn||xn===ka)&&ve.unbind(Ts,Xo,ka)}}return ve.unbind(Ct,Rt,xn)}},_v=(Ct,Rt,xn)=>ve.dispatch(Ct,Rt,xn),bS=(Ct,Rt,xn)=>ve.dispatch(Ct,Rt,xn),N3=Ct=>{if(Ct&&rf(Ct)){const Rt=Ct.getAttribute("data-mce-contenteditable");return Rt&&Rt!=="inherit"?Rt:Ct.contentEditable!=="inherit"?Ct.contentEditable:null}else return null},Sv={doc:s,settings:r,win:p,files:g,stdMode:E,boxModel:R,styleSheetLoader:N,boundEvents:j,styles:fe,schema:ae,events:ve,isBlock:De,root:null,clone:Tt,getRoot:Jt,getViewPort:vn,getRect:hs,getSize:Bn,getParent:dr,getParents:bo,get:Oe,getNext:Na,getPrev:Fl,select:Tn,is:mo,add:nn,create:Nn,createHTML:Oo,createFragment:Vc,remove:_m,setStyle:Ut,getStyle:Qt,setStyles:Et,removeAllAttribs:x1,setAttrib:gt,setAttribs:rr,getAttrib:tt,getPos:qn,parseStyle:ru,serializeStyle:Tp,addStyle:Ip,loadCSS:Tu,addClass:Sm,removeClass:yv,hasClass:ys,toggleClass:Xu,show:zo,hide:Ea,isHidden:$l,uniqueId:Bl,setHTML:Un,getOuterHTML:rl,setOuterHTML:Xi,decode:Os,encode:Zr,insertAfter:Ji,replace:Ju,rename:Cm,findCommonAncestor:wh,run:gs,getAttribs:ut,isEmpty:Eh,createRng:L3,nodeIndex:Sa,split:P3,bind:M3,unbind:kh,fire:bS,dispatch:_v,getContentEditable:N3,getContentEditableParent:Ct=>{const Rt=Jt();let xn=null;for(let yn=Ct;yn&&yn!==Rt&&(xn=N3(yn),xn===null);yn=yn.parentNode);return xn},isEditable:Ct=>{if(he(Ct)){const Rt=Ln(Ct)?Ct:Ct.parentElement;return he(Rt)&&rf(Rt)&&Wm(et.fromDom(Rt))}else return!1},destroy:()=>{if(j.length>0){let Ct=j.length;for(;Ct--;){const[Rt,xn,yn]=j[Ct];ve.unbind(Rt,xn,yn)}}bn(g,(Ct,Rt)=>{N.unload(Rt),delete g[Rt]})},isChildOf:(Ct,Rt)=>Ct===Rt||Rt.contains(Ct),dumpRng:Ct=>"startContainer: "+Ct.startContainer.nodeName+", startOffset: "+Ct.startOffset+", endContainer: "+Ct.endContainer.nodeName+", endOffset: "+Ct.endOffset},J7=VC(fe,r,Fe(Sv));return Sv};vi.DOM=vi(document),vi.nodeIndex=Sa;const HC=vi.DOM,r2=0,fy=1,py=2,UC=3;class pd{constructor(r={}){this.states={},this.queue=[],this.scriptLoadedCallbacks={},this.queueLoadedCallbacks=[],this.loading=!1,this.settings=r}_setReferrerPolicy(r){this.settings.referrerPolicy=r}loadScript(r){return new Promise((c,p)=>{const g=HC;let _;const E=()=>{g.remove(j),_&&(_.onerror=_.onload=_=null)},R=()=>{E(),c()},N=()=>{E(),p("Failed to load script: "+r)},j=g.uniqueId();_=document.createElement("script"),_.id=j,_.type="text/javascript",_.src=Gt._addCacheSuffix(r),this.settings.referrerPolicy&&g.setAttrib(_,"referrerpolicy",this.settings.referrerPolicy),_.onload=R,_.onerror=N,(document.getElementsByTagName("head")[0]||document.body).appendChild(_)})}isDone(r){return this.states[r]===py}markDone(r){this.states[r]=py}add(r){const c=this;return c.queue.push(r),c.states[r]===void 0&&(c.states[r]=r2),new Promise((g,_)=>{c.scriptLoadedCallbacks[r]||(c.scriptLoadedCallbacks[r]=[]),c.scriptLoadedCallbacks[r].push({resolve:g,reject:_})})}load(r){return this.add(r)}remove(r){delete this.states[r],delete this.scriptLoadedCallbacks[r]}loadQueue(){const r=this.queue;return this.queue=[],this.loadScripts(r)}loadScripts(r){const c=this,p=(N,j)=>{Vn(c.scriptLoadedCallbacks,j).each(ae=>{Ve(ae,fe=>fe[N](j))}),delete c.scriptLoadedCallbacks[j]},g=N=>{const j=Bt(N,ae=>ae.status==="rejected");return j.length>0?Promise.reject(Wn(j,({reason:ae})=>ue(ae)?ae:[ae])):Promise.resolve()},_=N=>Promise.allSettled(Nt(N,j=>c.states[j]===py?(p("resolve",j),Promise.resolve()):c.states[j]===UC?(p("reject",j),Promise.reject(j)):(c.states[j]=fy,c.loadScript(j).then(()=>{c.states[j]=py,p("resolve",j);const ae=c.queue;return ae.length>0?(c.queue=[],_(ae).then(g)):Promise.resolve()},()=>(c.states[j]=UC,p("reject",j),Promise.reject(j)))))),E=N=>(c.loading=!0,_(N).then(j=>{c.loading=!1;const ae=c.queueLoadedCallbacks.shift();return ye.from(ae).each(hn),g(j)})),R=Nr(r);return c.loading?new Promise((N,j)=>{c.queueLoadedCallbacks.push(()=>{E(R).then(N,j)})}):E(R)}}pd.ScriptLoader=new pd;const sa=(s,r)=>{const c=s.indexOf(r);return c!==-1&&s.indexOf(r,c+1)>c},B9=s=>q(s)&&Kt(s,"raw"),ua=s=>ue(s)&&s.length>1,my={},Nc=pl("en"),ug=()=>Vn(my,Nc.get()),Hu={getData:()=>qs(my,s=>({...s})),setCode:s=>{s&&Nc.set(s)},getCode:()=>Nc.get(),add:(s,r)=>{let c=my[s];c||(my[s]=c={});const p=Nt(Zs(r),g=>g.toLowerCase());bn(r,(g,_)=>{const E=_.toLowerCase();E!==_&&sa(p,E)?(Kt(r,E)||(c[E]=g),c[_]=g):c[E]=g})},translate:s=>{const r=ug().getOr({}),c=E=>ie(E)?Object.prototype.toString.call(E):p(E)?"":""+E,p=E=>E===""||E===null||E===void 0,g=E=>{const R=c(E);return Kt(r,R)?c(r[R]):Vn(r,R.toLowerCase()).map(c).getOr(R)},_=E=>E.replace(/{context:\w+}$/,"");if(p(s))return"";if(B9(s))return c(s.raw);if(ua(s)){const E=s.slice(1),R=g(s[0]).replace(/\{([0-9]+)\}/g,(N,j)=>Kt(E,j)?c(E[j]):N);return _(R)}return _(g(s))},isRtl:()=>ug().bind(s=>Vn(s,"_dir")).exists(s=>s==="rtl"),hasCode:s=>Kt(my,s)},vc=()=>{const s=[],r={},c={},p=[],g=(Oe,Ne)=>{const tt=Bt(p,ut=>ut.name===Oe&&ut.state===Ne);Ve(tt,ut=>ut.resolve())},_=Oe=>Kt(r,Oe),E=Oe=>Kt(c,Oe),R=Oe=>{if(c[Oe])return c[Oe].instance},N=(Oe,Ne)=>{const tt=Hu.getCode(),ut=","+(Ne||"")+",";!tt||Ne&&ut.indexOf(","+tt+",")===-1||pd.ScriptLoader.add(r[Oe]+"/langs/"+tt+".js")},j=(Oe,Ne)=>{vc.languageLoad!==!1&&(_(Oe)?N(Oe,Ne):De(Oe,"loaded").then(()=>N(Oe,Ne)))},ae=(Oe,Ne)=>(s.push(Ne),c[Oe]={instance:Ne},g(Oe,"added"),Ne),fe=Oe=>{delete r[Oe],delete c[Oe]},ve=(Oe,Ne)=>z(Ne)?z(Oe)?{prefix:"",resource:Ne,suffix:""}:{prefix:Oe.prefix,resource:Ne,suffix:Oe.suffix}:Ne,xe=(Oe,Ne)=>{if(r[Oe])return Promise.resolve();let tt=z(Ne)?Ne:Ne.prefix+Ne.resource+Ne.suffix;tt.indexOf("/")!==0&&tt.indexOf("://")===-1&&(tt=vc.baseURL+"/"+tt),r[Oe]=tt.substring(0,tt.lastIndexOf("/"));const ut=()=>(g(Oe,"loaded"),Promise.resolve());return c[Oe]?ut():pd.ScriptLoader.add(tt).then(ut)},De=(Oe,Ne="added")=>Ne==="added"&&E(Oe)||Ne==="loaded"&&_(Oe)?Promise.resolve():new Promise(tt=>{p.push({name:Oe,state:Ne,resolve:tt})});return{items:s,urls:r,lookup:c,get:R,requireLangPack:j,add:ae,remove:fe,createUrl:ve,load:xe,waitFor:De}};vc.languageLoad=!0,vc.baseURL="",vc.PluginManager=vc(),vc.ThemeManager=vc(),vc.ModelManager=vc();const i2=(s,r)=>{let c=null;return{cancel:()=>{J(c)||(clearTimeout(c),c=null)},throttle:(..._)=>{J(c)&&(c=setTimeout(()=>{c=null,s.apply(null,_)},r))}}},f4=(s,r)=>{let c=null;const p=()=>{J(c)||(clearTimeout(c),c=null)};return{cancel:p,throttle:(..._)=>{p(),c=setTimeout(()=>{c=null,s.apply(null,_)},r)}}},PR=(s,r,c)=>y0(s,r,c).isSome(),hy=Fe("mce-annotation"),dg=Fe("data-mce-annotation"),R0=Fe("data-mce-annotation-uid"),sh=Fe("data-mce-annotation-active"),fg=Fe("data-mce-annotation-classes"),pg=Fe("data-mce-annotation-attrs"),gy=s=>r=>Yo(r,s),V9=(s,r)=>{const c=s.selection.getRng(),p=et.fromDom(c.startContainer),g=et.fromDom(s.getBody()),_=r.fold(()=>"."+hy(),N=>"[".concat(dg(),'="').concat(N,'"]')),E=zm(p,c.startOffset).getOr(p);return ds(E,_,gy(g)).bind(N=>ld(N,"".concat(R0())).bind(j=>ld(N,"".concat(dg())).map(ae=>{const fe=D0(s,j);return{uid:j,name:ae,elements:fe}})))},H9=s=>li(s)&&Pi(s,hy()),p4=(s,r)=>Gp(s,"data-mce-bogus")||PR(s,'[data-mce-bogus="all"]',gy(r)),D0=(s,r)=>{const c=et.fromDom(s.getBody()),p=Pc(c,"[".concat(R0(),'="').concat(r,'"]'));return Bt(p,g=>!p4(g,c))},a2=(s,r)=>{const c=et.fromDom(s.getBody()),p=Pc(c,"[".concat(dg(),'="').concat(r,'"]')),g={};return Ve(p,_=>{if(!p4(_,c)){const E=ql(_,R0()),R=Vn(g,E).getOr([]);g[E]=R.concat([_])}}),g},m4=(s,r)=>{const c=pl({}),p=()=>({listeners:[],previous:la()}),g=(fe,ve)=>{_(fe,xe=>(ve(xe),xe))},_=(fe,ve)=>{const xe=c.get(),De=Vn(xe,fe).getOrThunk(p),Oe=ve(De);xe[fe]=Oe,c.set(xe)},E=(fe,ve,xe)=>{g(fe,De=>{Ve(De.listeners,Oe=>Oe(!0,fe,{uid:ve,nodes:Nt(xe,Ne=>Ne.dom)}))})},R=fe=>{g(fe,ve=>{Ve(ve.listeners,xe=>xe(!1,fe))})},N=(fe,ve)=>{Ve(D0(s,fe),xe=>{ve?el(xe,sh(),"true"):gi(xe,sh())})},j=f4(()=>{const fe=Rs(r.getNames());Ve(fe,ve=>{_(ve,xe=>{const De=xe.previous.get();return V9(s,ye.some(ve)).fold(()=>{De.each(Oe=>{R(ve),xe.previous.clear(),N(Oe,!1)})},({uid:Oe,name:Ne,elements:tt})=>{Zl(De,Oe)||(De.each(ut=>N(ut,!1)),E(Ne,Oe,tt),xe.previous.set(Oe),N(Oe,!0))}),{previous:xe.previous,listeners:xe.listeners}})})},30);return s.on("remove",()=>{j.cancel()}),s.on("NodeChange",()=>{j.throttle()}),{addListener:(fe,ve)=>{_(fe,xe=>({previous:xe.previous,listeners:xe.listeners.concat([ve])}))}}},U9=(s,r)=>{const c=dg(),p=_=>ye.from(_.attr(c)).bind(r.lookup),g=_=>{var E,R;_.attr(R0(),null),_.attr(dg(),null),_.attr(sh(),null);const N=ye.from(_.attr(pg())).map(ve=>ve.split(",")).getOr([]),j=ye.from(_.attr(fg())).map(ve=>ve.split(",")).getOr([]);Ve(N,ve=>_.attr(ve,null));const ae=(R=(E=_.attr("class"))===null||E===void 0?void 0:E.split(" "))!==null&&R!==void 0?R:[],fe=yo(ae,[hy()].concat(j));_.attr("class",fe.length>0?fe.join(" "):null),_.attr(fg(),null),_.attr(pg(),null)};s.serializer.addTempAttr(sh()),s.serializer.addAttributeFilter(c,_=>{for(const E of _)p(E).each(R=>{R.persistent===!1&&(E.name==="span"?E.unwrap():g(E))})})},z9=()=>{const s={};return{register:(g,_)=>{s[g]={name:g,settings:_}},lookup:g=>Vn(s,g).map(_=>_.settings),getNames:()=>Zs(s)}},vy=(s,r,c)=>Math.min(Math.max(s,r),c),W9=()=>window.crypto.getRandomValues(new Uint32Array(1))[0]/4294967295;let j9=0;const L0=s=>{const c=new Date().getTime(),p=Math.floor(W9()*1e9);return j9++,s+"_"+p+j9+String(c)},zC=(s,r)=>{Ve(r,c=>{Yt(s,c)})},Z9=(s,r)=>{Ve(r,c=>{ko(s,c)})},h4=(s,r)=>et.fromDom(s.dom.cloneNode(r)),oh=s=>h4(s,!1),q9=s=>h4(s,!0),MR=(s,r)=>{const c=et.fromTag(r),p=Y1(s);return Tl(c,p),c},by=(s,r)=>{const c=MR(s,r);dd(s,c);const p=Il(s);return jm(c,p),ti(s),c},l2=(s,r,c=ct)=>{const p=new Gl(s,r),g=_=>{let E;do E=p[_]();while(E&&!un(E)&&!c(E));return ye.from(E).filter(un)};return{current:()=>ye.from(p.current()).filter(un),next:()=>g("next"),prev:()=>g("prev"),prev2:()=>g("prev2")}},mg=(s,r)=>{const c=r||(E=>s.isBlock(E)||nr(E)||cr(E)),p=(E,R,N,j)=>{if(un(E)){const ae=j(E,R,E.data);if(ae!==-1)return ye.some({container:E,offset:ae})}return N().bind(ae=>p(ae.container,ae.offset,N,j))};return{backwards:(E,R,N,j)=>{const ae=l2(E,j!=null?j:s.getRoot(),c);return p(E,R,()=>ae.prev().map(fe=>({container:fe,offset:fe.length})),N).getOrNull()},forwards:(E,R,N,j)=>{const ae=l2(E,j!=null?j:s.getRoot(),c);return p(E,R,()=>ae.next().map(fe=>({container:fe,offset:0})),N).getOrNull()}}},g4=((s,r)=>{const c=_=>{if(!s(_))throw new Error("Can only get "+r+" value of a "+r+" node");return p(_).getOr("")},p=_=>s(_)?ye.from(_.dom.nodeValue):ye.none();return{get:c,getOption:p,set:(_,E)=>{if(!s(_))throw new Error("Can only set raw "+r+" value of a "+r+" node");_.dom.nodeValue=E}}})(Aa,"text"),c2=s=>g4.get(s),NR=s=>g4.getOption(s),G9=(s,r)=>g4.set(s,r),FR=["td","th"],bU=["thead","tbody","tfoot"],yU=["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"],yy=["li","dd","dt"],_U=["ul","ol","dl"],v4=["pre","script","textarea","style"],hg=s=>{let r;return c=>(r=r||Qs(s,Ht),Kt(r,oo(c)))},_y=s=>oo(s)==="table",Mi=s=>li(s)&&oo(s)==="br",K9=hg(yU),u2=hg(_U),d2=hg(yy),$R=hg(bU),Uu=hg(FR),zu=hg(v4),Y9=s=>{const r=[];let c=s.dom;for(;c;)r.push(et.fromDom(c)),c=c.lastChild;return r},P0=s=>{const r=Pc(s,"br"),c=Bt(Y9(s).slice(-1),Mi);r.length===c.length&&Ve(c,ti)},gg=()=>{const s=et.fromTag("br");return el(s,"data-mce-bogus","1"),s},vg=s=>{Zm(s),Ri(s,gg())},BR=(s,r)=>{Dc(s).each(c=>{Um(c).each(p=>{r.isBlock(oo(s))&&Mi(c)&&r.isBlock(oo(p))&&ti(c)})})},ml=Jb,b4=xC,Md=bu,jC=s=>s.insertContent(ml,{preserve_zwsp:!0}),X9=Ln,bg=un,M0=s=>(bg(s)&&(s=s.parentNode),X9(s)&&s.hasAttribute("data-mce-caret")),nm=s=>bg(s)&&b4(s.data),uf=s=>M0(s)||nm(s),ZC=s=>s.firstChild!==s.lastChild||!nr(s.firstChild),Sy=(s,r)=>{var c;const g=((c=s.ownerDocument)!==null&&c!==void 0?c:document).createTextNode(ml),_=s.parentNode;if(r){const E=s.previousSibling;if(bg(E)){if(uf(E))return E;if(Nd(E))return E.splitText(E.data.length-1)}_==null||_.insertBefore(g,s)}else{const E=s.nextSibling;if(bg(E)){if(uf(E))return E;if(Qc(E))return E.splitText(1),E}s.nextSibling?_==null||_.insertBefore(g,s.nextSibling):_==null||_.appendChild(g)}return g},sm=s=>{const r=s.container();return un(r)?r.data.charAt(s.offset())===ml||s.isAtStart()&&nm(r.previousSibling):!1},f2=s=>{const r=s.container();return un(r)?r.data.charAt(s.offset()-1)===ml||s.isAtEnd()&&nm(r.nextSibling):!1},Ho=(s,r,c)=>{var p;const _=((p=r.ownerDocument)!==null&&p!==void 0?p:document).createElement(s);_.setAttribute("data-mce-caret",c?"before":"after"),_.setAttribute("data-mce-bogus","all"),_.appendChild(gg().dom);const E=r.parentNode;return c?E==null||E.insertBefore(_,r):r.nextSibling?E==null||E.insertBefore(_,r.nextSibling):E==null||E.appendChild(_),_},Qc=s=>bg(s)&&s.data[0]===ml,Nd=s=>bg(s)&&s.data[s.data.length-1]===ml,qC=s=>{var r;const c=s.getElementsByTagName("br"),p=c[c.length-1];E0(p)&&((r=p.parentNode)===null||r===void 0||r.removeChild(p))},ci=s=>s&&s.hasAttribute("data-mce-caret")?(qC(s),s.removeAttribute("data-mce-caret"),s.removeAttribute("data-mce-bogus"),s.removeAttribute("style"),s.removeAttribute("data-mce-style"),s.removeAttribute("_moz_abspos"),s):null,GC=s=>M0(s.startContainer),yg=Math.round,N0=s=>s?{left:yg(s.left),top:yg(s.top),bottom:yg(s.bottom),right:yg(s.right),width:yg(s.width),height:yg(s.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0},J9=(s,r)=>(s=N0(s),r||(s.left=s.left+s.width),s.right=s.left,s.width=0,s),Q9=(s,r)=>s.left===r.left&&s.top===r.top&&s.bottom===r.bottom&&s.right===r.right,bi=(s,r,c)=>s>=0&&s<=Math.min(r.height,c.height)/2,p2=(s,r)=>{const c=Math.min(r.height/2,s.height/2);return s.bottom-c<r.top?!0:s.top>r.bottom?!1:bi(r.top-s.bottom,s,r)},Cy=(s,r)=>s.top>r.bottom?!0:s.bottom<r.top?!1:bi(r.bottom-s.top,s,r),eE=(s,r,c)=>r>=s.left&&r<=s.right&&c>=s.top&&c<=s.bottom,m2=s=>je(s,(r,c)=>r.fold(()=>ye.some(c),p=>{const g=Math.min(c.left,p.left),_=Math.min(c.top,p.top),E=Math.max(c.right,p.right),R=Math.max(c.bottom,p.bottom);return ye.some({top:_,right:E,bottom:R,left:g,width:E-g,height:R-_})}),ye.none()),df=(s,r,c)=>{const p=Math.max(Math.min(r,s.left+s.width),s.left),g=Math.max(Math.min(c,s.top+s.height),s.top);return Math.sqrt((r-p)*(r-p)+(c-g)*(c-g))},VR=(s,r)=>Math.max(0,Math.min(s.bottom,r.bottom)-Math.max(s.top,r.top)),wy=s=>{const r=s.startContainer,c=s.startOffset;return r===s.endContainer&&r.hasChildNodes()&&s.endOffset===c+1?r.childNodes[c]:null},Pn=(s,r)=>{if(Ln(s)&&s.hasChildNodes()){const c=s.childNodes,p=vy(r,0,c.length-1);return c[p]}else return s},HR=(s,r)=>{if(!(r<0&&Ln(s)&&s.hasChildNodes()))return Pn(s,r)},UR=new RegExp("[̀-ͯ҃-҇҈-҉֑-ֽֿׁ-ׂׄ-ׇׅؐ-ًؚ-ٰٟۖ-ۜ۟-ۤۧ-۪ۨ-ܑۭܰ-݊ަ-ް߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣣ-ंऺ़ु-ै्॑-ॗॢ-ॣঁ়াু-ৄ্ৗৢ-ৣਁ-ਂ਼ੁ-ੂੇ-ੈੋ-੍ੑੰ-ੱੵઁ-ં઼ુ-ૅે-ૈ્ૢ-ૣଁ଼ାିୁ-ୄ୍ୖୗୢ-ୣஂாீ்ௗఀా-ీె-ైొ-్ౕ-ౖౢ-ౣಁ಼ಿೂೆೌ-್ೕ-ೖೢ-ೣഁാു-ൄ്ൗൢ-ൣ්ාි-ුූෟัิ-ฺ็-๎ັິ-ູົ-ຼ່-ໍ༘-ཱ༹༙༵༷-ཾྀ-྄྆-྇ྍ-ྗྙ-ྼ࿆ိ-ူဲ-့္-်ွ-ှၘ-ၙၞ-ၠၱ-ၴႂႅ-ႆႍႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒ-ᝓᝲ-ᝳ឴-឵ិ-ួំ៉-៓៝᠋-᠍ᢩᤠ-ᤢᤧ-ᤨᤲ᤹-᤻ᨗ-ᨘᨛᩖᩘ-ᩞ᩠ᩢᩥ-ᩬᩳ-᩿᩼᪰-᪽᪾ᬀ-ᬃ᬴ᬶ-ᬺᬼᭂ᭫-᭳ᮀ-ᮁᮢ-ᮥᮨ-ᮩ᮫-ᮭ᯦ᯨ-ᯩᯭᯯ-ᯱᰬ-ᰳᰶ-᰷᳐-᳔᳒-᳢᳠-᳨᳭᳴᳸-᳹᷀-᷵᷼-᷿-⃐-⃜⃝-⃠⃡⃢-⃤⃥-⃰⳯-⵿⳱ⷠ-〪ⷿ-〭〮-゙〯-゚꙯꙰-꙲ꙴ-꙽ꚞ-ꚟ꛰-꛱ꠂ꠆ꠋꠥ-ꠦ꣄꣠-꣱ꤦ-꤭ꥇ-ꥑꦀ-ꦂ꦳ꦶ-ꦹꦼꧥꨩ-ꨮꨱ-ꨲꨵ-ꨶꩃꩌꩼꪰꪲ-ꪴꪷ-ꪸꪾ-꪿꫁ꫬ-ꫭ꫶ꯥꯨ꯭ﬞ︀-️︠-゙︯-゚]"),KC=s=>z(s)&&s.charCodeAt(0)>=768&&UR.test(s),tE=(...s)=>r=>{for(let c=0;c<s.length;c++)if(s[c](r))return!0;return!1},zR=(...s)=>r=>{for(let c=0;c<s.length;c++)if(!s[c](r))return!1;return!0},Ey=Zt,F0=cr,$0=nr,WR=un,ky=ep(["script","style","textarea"]),nE=ep(["img","input","textarea","hr","iframe","video","audio","object","embed"]),xy=ep(["table"]),jR=uf,Su=s=>jR(s)?!1:WR(s)?!ky(s.parentNode):nE(s)||$0(s)||xy(s)||om(s),ZR=s=>Ln(s)&&s.getAttribute("unselectable")==="true",om=s=>!ZR(s)&&F0(s),qR=(s,r)=>{for(let c=s.parentNode;c&&c!==r;c=c.parentNode){if(om(c))return!1;if(Ey(c))return!0}return!0},GR=s=>om(s)?!je(Mo(s.getElementsByTagName("*")),(r,c)=>r||Ey(c),!1):!1,KR=s=>nE(s)||GR(s),YC=(s,r)=>Su(s)&&qR(s,r),sE=Ln,YR=Su,oE=Qb("display","block table"),XR=Qb("float","left right"),B0=zR(sE,YR,ft(XR)),y4=ft(Qb("white-space","pre pre-line pre-wrap")),h2=un,XC=nr,rE=vi.nodeIndex,l1=HR,_4=s=>s?s.createRange():vi.DOM.createRng(),S4=s=>z(s)&&/[\r\n\t ]/.test(s),JC=s=>!!s.setStart&&!!s.setEnd,QC=s=>{const r=s.startContainer,c=s.startOffset;if(S4(s.toString())&&y4(r.parentNode)&&un(r)){const p=r.data;if(S4(p[c-1])||S4(p[c+1]))return!0}return!1},V0=s=>{const r=s.ownerDocument,c=_4(r),p=r.createTextNode(Za),g=s.parentNode;g.insertBefore(p,s),c.setStart(p,0),c.setEnd(p,1);const _=N0(c.getBoundingClientRect());return g.removeChild(p),_},JR=s=>{const r=s.startContainer,c=s.endContainer,p=s.startOffset,g=s.endOffset;if(r===c&&un(c)&&p===0&&g===1){const _=s.cloneRange();return _.setEndAfter(c),H0(_)}else return null},e6=s=>s.left===0&&s.right===0&&s.top===0&&s.bottom===0,H0=s=>{var r;let c;const p=s.getClientRects();return p.length>0?c=N0(p[0]):c=N0(s.getBoundingClientRect()),!JC(s)&&XC(s)&&e6(c)?V0(s):e6(c)&&JC(s)&&(r=JR(s))!==null&&r!==void 0?r:c},Xl=(s,r)=>{const c=J9(s,r);return c.width=1,c.right=c.left+1,c},QR=s=>{const r=[],c=E=>{E.height!==0&&(r.length>0&&Q9(E,r[r.length-1])||r.push(E))},p=(E,R)=>{const N=_4(E.ownerDocument);if(R<E.data.length){if(KC(E.data[R]))return;if(KC(E.data[R-1])&&(N.setStart(E,R),N.setEnd(E,R+1),!QC(N))){c(Xl(H0(N),!1));return}}R>0&&(N.setStart(E,R-1),N.setEnd(E,R),QC(N)||c(Xl(H0(N),!1))),R<E.data.length&&(N.setStart(E,R),N.setEnd(E,R+1),QC(N)||c(Xl(H0(N),!0)))},g=s.container(),_=s.offset();if(h2(g))return p(g,_),r;if(sE(g))if(s.isAtEnd()){const E=l1(g,_);h2(E)&&p(E,E.data.length),B0(E)&&!XC(E)&&c(Xl(H0(E),!1))}else{const E=l1(g,_);if(h2(E)&&p(E,0),B0(E)&&s.isAtEnd())return c(Xl(H0(E),!1)),r;const R=l1(s.container(),s.offset()-1);B0(R)&&!XC(R)&&(oE(R)||oE(E)||!B0(E))&&c(Xl(H0(R),!1)),B0(E)&&c(Xl(H0(E),!0))}return r},$t=(s,r,c)=>{const p=()=>(h2(s),r===0),g=()=>h2(s)?r>=s.data.length:r>=s.childNodes.length,_=()=>{const ae=_4(s.ownerDocument);return ae.setStart(s,r),ae.setEnd(s,r),ae},E=()=>(c||(c=QR($t(s,r))),c),R=()=>E().length>0,N=ae=>ae&&s===ae.container()&&r===ae.offset(),j=ae=>l1(s,ae?r-1:r);return{container:Fe(s),offset:Fe(r),toRange:_,getClientRects:E,isVisible:R,isAtStart:p,isAtEnd:g,isEqual:N,getNode:j}};$t.fromRangeStart=s=>$t(s.startContainer,s.startOffset),$t.fromRangeEnd=s=>$t(s.endContainer,s.endOffset),$t.after=s=>$t(s.parentNode,rE(s)+1),$t.before=s=>$t(s.parentNode,rE(s)),$t.isAbove=(s,r)=>Oi(Po(r.getClientRects()),jo(s.getClientRects()),p2).getOr(!1),$t.isBelow=(s,r)=>Oi(jo(r.getClientRects()),Po(s.getClientRects()),Cy).getOr(!1),$t.isAtStart=s=>s?s.isAtStart():!1,$t.isAtEnd=s=>s?s.isAtEnd():!1,$t.isTextPosition=s=>s?un(s.container()):!1,$t.isElementPosition=s=>!$t.isTextPosition(s);const rh=(s,r)=>{un(r)&&r.data.length===0&&s.remove(r)},eD=(s,r,c)=>{r.insertNode(c),rh(s,c.previousSibling),rh(s,c.nextSibling)},C4=(s,r,c)=>{const p=ye.from(c.firstChild),g=ye.from(c.lastChild);r.insertNode(c),p.each(_=>rh(s,_.previousSibling)),g.each(_=>rh(s,_.nextSibling))},g2=(s,r,c)=>{fl(c)?C4(s,r,c):eD(s,r,c)},dp=un,iE=E0,aE=vi.nodeIndex,w4=s=>{const r=s.parentNode;return iE(r)?w4(r):r},E4=s=>s?_i(s.childNodes,(r,c)=>(iE(c)&&c.nodeName!=="BR"?r=r.concat(E4(c)):r.push(c),r),[]):[],k4=(s,r)=>{let c=s;for(;(c=c.previousSibling)&&dp(c);)r+=c.data.length;return r},lE=s=>r=>s===r,tD=s=>{let r,c;r=E4(w4(s)),c=yr(r,lE(s),s),r=r.slice(0,c+1);const p=_i(r,(g,_,E)=>(dp(_)&&dp(r[E-1])&&g++,g),0);return r=dc(r,ep([s.nodeName])),c=yr(r,lE(s),s),c-p},Cu=s=>(dp(s)?"text()":s.nodeName.toLowerCase())+"["+tD(s)+"]",x4=(s,r,c)=>{const p=[];for(let g=r.parentNode;g&&g!==s;g=g.parentNode)p.push(g);return p},cE=(s,r)=>{let c=[],p=r.container(),g=r.offset(),_;if(dp(p))_=k4(p,g);else{const R=p.childNodes;g>=R.length?(_="after",g=R.length-1):_="before",p=R[g]}c.push(Cu(p));let E=x4(s,p);return E=dc(E,ft(E0)),c=c.concat(mi(E,R=>Cu(R))),c.reverse().join("/")+","+_},nD=(s,r,c)=>{let p=E4(s);return p=dc(p,(g,_)=>!dp(g)||!dp(p[_-1])),p=dc(p,ep([r])),p[c]},sD=(s,r)=>{let c=s,p=0;for(;dp(c);){const g=c.data.length;if(r>=p&&r<=p+g){s=c,r=r-p;break}if(!dp(c.nextSibling)){s=c,r=g;break}p+=g,c=c.nextSibling}return dp(s)&&r>s.data.length&&(r=s.data.length),$t(s,r)},uE=(s,r)=>{if(!r)return null;const c=r.split(","),p=c[0].split("/"),g=c.length>1?c[1]:"before",_=_i(p,(E,R)=>{const N=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(R);return N?(N[1]==="text()"&&(N[1]="#text"),nD(E,N[1],parseInt(N[2],10))):null},s);if(!_)return null;if(!dp(_)&&_.parentNode){let E;return g==="after"?E=aE(_)+1:E=aE(_),$t(_.parentNode,E)}return sD(_,parseInt(g,10))},T4=cr,oD=(s,r,c)=>{let p=s(r.data.slice(0,c)).length;for(let g=r.previousSibling;g&&un(g);g=g.previousSibling)p+=s(g.data).length;return p},dE=(s,r,c,p,g)=>{const _=g?p.startContainer:p.endContainer;let E=g?p.startOffset:p.endOffset;const R=[],N=s.getRoot();if(un(_))R.push(c?oD(r,_,E):E);else{let j=0;const ae=_.childNodes;E>=ae.length&&ae.length&&(j=1,E=Math.max(0,ae.length-1)),R.push(s.nodeIndex(ae[E],c)+j)}for(let j=_;j&&j!==N;j=j.parentNode)R.push(s.nodeIndex(j,c));return R},Ci=(s,r,c,p)=>{const g=r.dom,_=dE(g,s,c,p,!0),E=r.isForward(),R=GC(p)?{isFakeCaret:!0}:{};if(r.isCollapsed())return{start:_,forward:E,...R};{const N=dE(g,s,c,p,!1);return{start:_,end:N,forward:E,...R}}},v2=(s,r,c)=>{let p=0;return Gt.each(s.select(r),g=>{if(g.getAttribute("data-mce-bogus")!=="all"){if(g===c)return!1;p++;return}}),p},fE=(s,r)=>{let c=r?s.startContainer:s.endContainer,p=r?s.startOffset:s.endOffset;if(Ln(c)&&c.nodeName==="TR"){const g=c.childNodes;c=g[Math.min(r?p:p-1,g.length-1)],c&&(p=r?0:c.childNodes.length,r?s.setStart(c,p):s.setEnd(c,p))}},pE=s=>(fE(s,!0),fE(s,!1),s),I4=(s,r)=>{if(Ln(s)&&(s=Pn(s,r),T4(s)))return s;if(uf(s)){un(s)&&M0(s)&&(s=s.parentNode);let c=s.previousSibling;if(T4(c)||(c=s.nextSibling,T4(c)))return c}},Fc=s=>I4(s.startContainer,s.startOffset)||I4(s.endContainer,s.endOffset),md=(s,r,c)=>{const p=c.getNode(),g=c.getRng();if(p.nodeName==="IMG"||T4(p)){const E=p.nodeName;return{name:E,index:v2(c.dom,E,p)}}const _=Fc(g);if(_){const E=_.tagName;return{name:E,index:v2(c.dom,E,_)}}return Ci(s,c,r,g)},mE=s=>{const r=s.getRng();return{start:cE(s.dom.getRoot(),$t.fromRangeStart(r)),end:cE(s.dom.getRoot(),$t.fromRangeEnd(r)),forward:s.isForward()}},hE=s=>({rng:s.getRng(),forward:s.isForward()}),t6=(s,r,c)=>{const p={"data-mce-type":"bookmark",id:r,style:"overflow:hidden;line-height:0px"};return c?s.create("span",p,""):s.create("span",p)},Ty=(s,r)=>{const c=s.dom;let p=s.getRng();const g=c.uniqueId(),_=s.isCollapsed(),E=s.getNode(),R=E.nodeName,N=s.isForward();if(R==="IMG")return{name:R,index:v2(c,R,E)};const j=pE(p.cloneRange());if(!_){j.collapse(!1);const fe=t6(c,g+"_end",r);g2(c,j,fe)}p=pE(p),p.collapse(!0);const ae=t6(c,g+"_start",r);return g2(c,p,ae),s.moveToBookmark({id:g,keep:!0,forward:N}),{id:g,forward:N}},gE=(s,r,c=!1)=>r===2?md(Md,c,s):r===3?mE(s):r?hE(s):Ty(s,!1),n6=He(md,St,!0),s6=s=>{const r=_=>_(s),c=Fe(s),p=()=>g,g={tag:!0,inner:s,fold:(_,E)=>E(s),isValue:Ht,isError:ct,map:_=>Wu.value(_(s)),mapError:p,bind:r,exists:r,forall:r,getOr:c,or:p,getOrThunk:c,orThunk:p,getOrDie:c,each:_=>{_(s)},toOptional:()=>ye.some(s)};return g},vE=s=>{const r=()=>c,c={tag:!1,inner:s,fold:(p,g)=>p(s),isValue:ct,isError:Ht,map:r,mapError:p=>Wu.error(p(s)),bind:r,exists:ct,forall:Ht,getOr:St,or:St,getOrThunk:At,orThunk:At,getOrDie:ht(String(s)),each:Ue,toOptional:ye.none};return c},Wu={value:s6,error:vE,fromOption:(s,r)=>s.fold(()=>vE(r),s6)},sr={generate:s=>{if(!ue(s))throw new Error("cases must be an array");if(s.length===0)throw new Error("there must be at least one case");const r=[],c={};return Ve(s,(p,g)=>{const _=Zs(p);if(_.length!==1)throw new Error("one and only one name per case");const E=_[0],R=p[E];if(c[E]!==void 0)throw new Error("duplicate key detected:"+E);if(E==="cata")throw new Error("cannot have a case named cata (sorry)");if(!ue(R))throw new Error("case arguments must be an array");r.push(E),c[E]=(...N)=>{const j=N.length;if(j!==R.length)throw new Error("Wrong number of arguments to case "+E+". Expected "+R.length+" ("+R+"), got "+j);return{fold:(...fe)=>{if(fe.length!==s.length)throw new Error("Wrong number of arguments to fold. Expected "+s.length+", got "+fe.length);return fe[g].apply(null,N)},match:fe=>{const ve=Zs(fe);if(r.length!==ve.length)throw new Error("Wrong number of arguments to match. Expected: "+r.join(",")+"\nActual: "+ve.join(","));if(!ts(r,De=>Qe(ve,De)))throw new Error("Not all branches were specified when using match. Specified: "+ve.join(", ")+"\nRequired: "+r.join(", "));return fe[E].apply(null,N)},log:fe=>{console.log(fe,{constructors:r,constructor:E,params:N})}}}}),c}};sr.generate([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);const fp=s=>{const r=[],c=[];return Ve(s,p=>{p.fold(g=>{r.push(g)},g=>{c.push(g)})}),{errors:r,values:c}},b2=s=>s.type==="inline-command"||s.type==="inline-format",yE=s=>s.type==="block-command"||s.type==="block-format",o6=(s,r)=>(s.type==="block-command"||s.type==="block-format")&&s.trigger===r,_E=s=>{var r;const c=g=>Wu.error({message:g,pattern:s}),p=(g,_,E)=>{if(s.format!==void 0){let R;if(ue(s.format)){if(!ts(s.format,z))return c(g+" pattern has non-string items in the `format` array");R=s.format}else if(z(s.format))R=[s.format];else return c(g+" pattern has non-string `format` parameter");return Wu.value(_(R))}else return s.cmd!==void 0?z(s.cmd)?Wu.value(E(s.cmd,s.value)):c(g+" pattern has non-string `cmd` parameter"):c(g+" pattern is missing both `format` and `cmd` parameters")};if(!q(s))return c("Raw pattern is not an object");if(!z(s.start))return c("Raw pattern is missing `start` parameter");if(s.end!==void 0){if(!z(s.end))return c("Inline pattern has non-string `end` parameter");if(s.start.length===0&&s.end.length===0)return c("Inline pattern has empty `start` and `end` parameters");let g=s.start,_=s.end;return _.length===0&&(_=g,g=""),p("Inline",E=>({type:"inline-format",start:g,end:_,format:E}),(E,R)=>({type:"inline-command",start:g,end:_,cmd:E,value:R}))}else{if(s.replacement!==void 0)return z(s.replacement)?s.start.length===0?c("Replacement pattern has empty `start` parameter"):Wu.value({type:"inline-command",start:"",end:s.start,cmd:"mceInsertContent",value:s.replacement}):c("Replacement pattern has non-string `replacement` parameter");{const g=(r=s.trigger)!==null&&r!==void 0?r:"space";return s.start.length===0?c("Block pattern has empty `start` parameter"):p("Block",_=>({type:"block-format",start:s.start,format:_[0],trigger:g}),(_,E)=>({type:"block-command",start:s.start,cmd:_,value:E,trigger:g}))}}},_g=s=>Bt(s,yE),Rl=s=>Bt(s,b2),ah=(s,r)=>({inlinePatterns:Rl(s),blockPatterns:_g(s),dynamicPatternsLookup:r}),y2=(s,r)=>({...s,blockPatterns:Bt(s.blockPatterns,c=>o6(c,r))}),SE=s=>{const r=fp(Nt(s,_E));return Ve(r.errors,c=>console.error(c.message,c.pattern)),r.values},rD=s=>r=>{const c=s(r);return SE(c)},A4=(s,r)=>s.dispatch("PreProcess",r),r6=(s,r)=>s.dispatch("PostProcess",r),i6=s=>{s.dispatch("remove")},a6=s=>{s.dispatch("detach")},CE=(s,r)=>{s.dispatch("SwitchMode",{mode:r})},wE=(s,r,c,p,g)=>{s.dispatch("ObjectResizeStart",{target:r,width:c,height:p,origin:g})},EE=(s,r,c,p,g)=>{s.dispatch("ObjectResized",{target:r,width:c,height:p,origin:g})},kE=s=>{s.dispatch("PreInit")},iD=s=>{s.dispatch("PostRender")},bc=s=>{s.dispatch("Init")},aD=(s,r)=>{s.dispatch("PlaceholderToggle",{state:r})},c1=(s,r,c)=>{s.dispatch(r,c)},l6=(s,r,c,p)=>{s.dispatch("FormatApply",{format:r,node:c,vars:p})},c6=(s,r,c,p)=>{s.dispatch("FormatRemove",{format:r,node:c,vars:p})},xE=(s,r)=>s.dispatch("BeforeSetContent",r),O4=(s,r)=>s.dispatch("SetContent",r),u6=(s,r)=>s.dispatch("BeforeGetContent",r),d6=(s,r)=>s.dispatch("GetContent",r),lD=(s,r)=>{s.dispatch("AutocompleterStart",r)},cD=(s,r)=>{s.dispatch("AutocompleterUpdate",r)},La=(s,r)=>{s.dispatch("AutocompleterUpdateActiveRange",r)},qa=s=>{s.dispatch("AutocompleterEnd")},Jl=(s,r,c)=>s.dispatch("PastePreProcess",{content:r,internal:c}),Pa=(s,r,c)=>s.dispatch("PastePostProcess",{node:r,internal:c}),hl=(s,r)=>s.dispatch("PastePlainTextToggle",{state:r}),nl=(s,r)=>s.dispatch("EditableRootStateChange",{state:r}),f6=(s,r)=>s.dispatch("DisabledStateChange",{state:r}),Iy=Qa().deviceType,Ay=Iy.isTouch(),Dl=vi.DOM,TE=s=>{const r=s.indexOf("=")>0?s.split(/[;,](?![^=;,]*(?:[;,]|$))/):s.split(",");return je(r,(c,p)=>{const g=p.split("="),_=g[0],E=g.length>1?g[1]:_;return c[tr(_)]=tr(E),c},{})},R4=s=>Y(s,RegExp),Yn=s=>r=>r.options.get(s),U0=s=>z(s)||q(s),p6=(s,r="")=>c=>{const p=z(c);if(p)if(c.indexOf("=")!==-1){const g=TE(c);return{value:Vn(g,s.id).getOr(r),valid:p}}else return{value:c,valid:p};else return{valid:!1,message:"Must be a string."}},SU=s=>{const r=s.options.register;r("id",{processor:"string",default:s.id}),r("selector",{processor:"string"}),r("target",{processor:"object"}),r("suffix",{processor:"string"}),r("cache_suffix",{processor:"string"}),r("base_url",{processor:"string"}),r("referrer_policy",{processor:"string",default:""}),r("language_load",{processor:"boolean",default:!0}),r("inline",{processor:"boolean",default:!1}),r("iframe_attrs",{processor:"object",default:{}}),r("doctype",{processor:"string",default:"<!DOCTYPE html>"}),r("document_base_url",{processor:"string",default:s.documentBaseUrl}),r("body_id",{processor:p6(s,"tinymce"),default:"tinymce"}),r("body_class",{processor:p6(s),default:""}),r("content_security_policy",{processor:"string",default:""}),r("br_in_pre",{processor:"boolean",default:!0}),r("forced_root_block",{processor:c=>{const p=z(c)&&gr(c);return p?{value:c,valid:p}:{valid:!1,message:"Must be a non-empty string."}},default:"p"}),r("forced_root_block_attrs",{processor:"object",default:{}}),r("newline_behavior",{processor:c=>{const p=Qe(["block","linebreak","invert","default"],c);return p?{value:c,valid:p}:{valid:!1,message:"Must be one of: block, linebreak, invert or default."}},default:"default"}),r("br_newline_selector",{processor:"string",default:".mce-toc h2,figcaption,caption"}),r("no_newline_selector",{processor:"string",default:""}),r("keep_styles",{processor:"boolean",default:!0}),r("end_container_on_empty_block",{processor:c=>ce(c)?{valid:!0,value:c}:z(c)?{valid:!0,value:c}:{valid:!1,message:"Must be boolean or a string"},default:"blockquote"}),r("font_size_style_values",{processor:"string",default:"xx-small,x-small,small,medium,large,x-large,xx-large"}),r("font_size_legacy_values",{processor:"string",default:"xx-small,small,medium,large,x-large,xx-large,300%"}),r("font_size_classes",{processor:"string",default:""}),r("automatic_uploads",{processor:"boolean",default:!0}),r("images_reuse_filename",{processor:"boolean",default:!1}),r("images_replace_blob_uris",{processor:"boolean",default:!0}),r("icons",{processor:"string",default:""}),r("icons_url",{processor:"string",default:""}),r("images_upload_url",{processor:"string",default:""}),r("images_upload_base_path",{processor:"string",default:""}),r("images_upload_credentials",{processor:"boolean",default:!1}),r("images_upload_handler",{processor:"function"}),r("language",{processor:"string",default:"en"}),r("language_url",{processor:"string",default:""}),r("entity_encoding",{processor:"string",default:"named"}),r("indent",{processor:"boolean",default:!0}),r("indent_before",{processor:"string",default:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,details,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist"}),r("indent_after",{processor:"string",default:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,details,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist"}),r("indent_use_margin",{processor:"boolean",default:!1}),r("indentation",{processor:"string",default:"40px"}),r("content_css",{processor:c=>{const p=c===!1||z(c)||$e(c,z);return p?z(c)?{value:Nt(c.split(","),tr),valid:p}:ue(c)?{value:c,valid:p}:c===!1?{value:[],valid:p}:{value:c,valid:p}:{valid:!1,message:"Must be false, a string or an array of strings."}},default:Ly(s)?[]:["default"]}),r("content_style",{processor:"string"}),r("content_css_cors",{processor:"boolean",default:!1}),r("font_css",{processor:c=>{const p=z(c)||$e(c,z);return p?{value:ue(c)?c:Nt(c.split(","),tr),valid:p}:{valid:!1,message:"Must be a string or an array of strings."}},default:[]}),r("inline_boundaries",{processor:"boolean",default:!0}),r("inline_boundaries_selector",{processor:"string",default:"a[href],code,span.mce-annotation"}),r("object_resizing",{processor:c=>{const p=ce(c)||z(c);return p?c===!1||Iy.isiPhone()||Iy.isiPad()?{value:"",valid:p}:{value:c===!0?"table,img,figure.image,div,video,iframe":c,valid:p}:{valid:!1,message:"Must be boolean or a string"}},default:!Ay}),r("resize_img_proportional",{processor:"boolean",default:!0}),r("event_root",{processor:"string"}),r("service_message",{processor:"string"}),r("theme",{processor:c=>c===!1||z(c)||ie(c),default:"silver"}),r("theme_url",{processor:"string"}),r("formats",{processor:"object"}),r("format_empty_lines",{processor:"boolean",default:!1}),r("format_noneditable_selector",{processor:"string",default:""}),r("preview_styles",{processor:c=>{const p=c===!1||z(c);return p?{value:c===!1?"":c,valid:p}:{valid:!1,message:"Must be false or a string"}},default:"font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow"}),r("custom_ui_selector",{processor:"string",default:""}),r("hidden_input",{processor:"boolean",default:!0}),r("submit_patch",{processor:"boolean",default:!0}),r("encoding",{processor:"string"}),r("add_form_submit_trigger",{processor:"boolean",default:!0}),r("add_unload_trigger",{processor:"boolean",default:!0}),r("custom_undo_redo_levels",{processor:"number",default:0}),r("disable_nodechange",{processor:"boolean",default:!1}),r("disabled",{processor:c=>ce(c)?(s.initialized&&wg(s)!==c&&Promise.resolve().then(()=>{f6(s,c)}),{valid:!0,value:c}):{valid:!1,message:"The value must be a boolean."},default:!1}),r("readonly",{processor:"boolean",default:!1}),r("editable_root",{processor:"boolean",default:!0}),r("plugins",{processor:"string[]",default:[]}),r("external_plugins",{processor:"object"}),r("forced_plugins",{processor:"string[]"}),r("model",{processor:"string",default:s.hasPlugin("rtc")?"plugin":"dom"}),r("model_url",{processor:"string"}),r("block_unsupported_drop",{processor:"boolean",default:!0}),r("visual",{processor:"boolean",default:!0}),r("visual_table_class",{processor:"string",default:"mce-item-table"}),r("visual_anchor_class",{processor:"string",default:"mce-item-anchor"}),r("iframe_aria_text",{processor:"string",default:"Rich Text Area".concat(s.hasPlugin("help")?". Press ALT-0 for help.":"")}),r("setup",{processor:"function"}),r("init_instance_callback",{processor:"function"}),r("url_converter",{processor:"function",default:s.convertURL}),r("url_converter_scope",{processor:"object",default:s}),r("urlconverter_callback",{processor:"function"}),r("allow_conditional_comments",{processor:"boolean",default:!1}),r("allow_html_data_urls",{processor:"boolean",default:!1}),r("allow_svg_data_urls",{processor:"boolean"}),r("allow_html_in_named_anchor",{processor:"boolean",default:!1}),r("allow_script_urls",{processor:"boolean",default:!1}),r("allow_unsafe_link_target",{processor:"boolean",default:!1}),r("allow_mathml_annotation_encodings",{processor:c=>{const p=$e(c,z);return p?{value:c,valid:p}:{valid:!1,message:"Must be an array of strings."}},default:[]}),r("convert_fonts_to_spans",{processor:"boolean",default:!0,deprecated:!0}),r("fix_list_elements",{processor:"boolean",default:!1}),r("preserve_cdata",{processor:"boolean",default:!1}),r("remove_trailing_brs",{processor:"boolean",default:!0}),r("pad_empty_with_br",{processor:"boolean",default:!1}),r("inline_styles",{processor:"boolean",default:!0,deprecated:!0}),r("element_format",{processor:"string",default:"html"}),r("entities",{processor:"string"}),r("schema",{processor:"string",default:"html5"}),r("convert_urls",{processor:"boolean",default:!0}),r("relative_urls",{processor:"boolean",default:!0}),r("remove_script_host",{processor:"boolean",default:!0}),r("custom_elements",{processor:U0}),r("extended_valid_elements",{processor:"string"}),r("invalid_elements",{processor:"string"}),r("invalid_styles",{processor:U0}),r("valid_children",{processor:"string"}),r("valid_classes",{processor:U0}),r("valid_elements",{processor:"string"}),r("valid_styles",{processor:U0}),r("verify_html",{processor:"boolean",default:!0}),r("auto_focus",{processor:c=>z(c)||c===!0}),r("browser_spellcheck",{processor:"boolean",default:!1}),r("protect",{processor:"array"}),r("images_file_types",{processor:"string",default:"jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp"}),r("deprecation_warnings",{processor:"boolean",default:!0}),r("a11y_advanced_options",{processor:"boolean",default:!1}),r("api_key",{processor:"string"}),r("license_key",{processor:"string"}),r("paste_block_drop",{processor:"boolean",default:!1}),r("paste_data_images",{processor:"boolean",default:!0}),r("paste_preprocess",{processor:"function"}),r("paste_postprocess",{processor:"function"}),r("paste_webkit_styles",{processor:"string",default:"none"}),r("paste_remove_styles_if_webkit",{processor:"boolean",default:!0}),r("paste_merge_formats",{processor:"boolean",default:!0}),r("smart_paste",{processor:"boolean",default:!0}),r("paste_as_text",{processor:"boolean",default:!1}),r("paste_tab_spaces",{processor:"number",default:4}),r("text_patterns",{processor:c=>$e(c,q)||c===!1?{value:SE(c===!1?[]:c),valid:!0}:{valid:!1,message:"Must be an array of objects or false."},default:[{start:"*",end:"*",format:"italic"},{start:"**",end:"**",format:"bold"},{start:"#",format:"h1",trigger:"space"},{start:"##",format:"h2",trigger:"space"},{start:"###",format:"h3",trigger:"space"},{start:"####",format:"h4",trigger:"space"},{start:"#####",format:"h5",trigger:"space"},{start:"######",format:"h6",trigger:"space"},{start:"1.",cmd:"InsertOrderedList",trigger:"space"},{start:"*",cmd:"InsertUnorderedList",trigger:"space"},{start:"-",cmd:"InsertUnorderedList",trigger:"space"},{start:">",cmd:"mceBlockQuote",trigger:"space"},{start:"---",cmd:"InsertHorizontalRule",trigger:"space"}]}),r("text_patterns_lookup",{processor:c=>ie(c)?{value:rD(c),valid:!0}:{valid:!1,message:"Must be a single function"},default:c=>[]}),r("noneditable_class",{processor:"string",default:"mceNonEditable"}),r("editable_class",{processor:"string",default:"mceEditable"}),r("noneditable_regexp",{processor:c=>$e(c,R4)?{value:c,valid:!0}:R4(c)?{value:[c],valid:!0}:{valid:!1,message:"Must be a RegExp or an array of RegExp."},default:[]}),r("table_tab_navigation",{processor:"boolean",default:!0}),r("highlight_on_focus",{processor:"boolean",default:!0}),r("xss_sanitization",{processor:"boolean",default:!0}),r("details_initial_state",{processor:c=>{const p=Qe(["inherited","collapsed","expanded"],c);return p?{value:c,valid:p}:{valid:!1,message:"Must be one of: inherited, collapsed, or expanded."}},default:"inherited"}),r("details_serialized_state",{processor:c=>{const p=Qe(["inherited","collapsed","expanded"],c);return p?{value:c,valid:p}:{valid:!1,message:"Must be one of: inherited, collapsed, or expanded."}},default:"inherited"}),r("init_content_sync",{processor:"boolean",default:!1}),r("newdocument_content",{processor:"string",default:""}),r("sandbox_iframes",{processor:"boolean",default:!0}),r("sandbox_iframes_exclusions",{processor:"string[]",default:["youtube.com","youtu.be","vimeo.com","player.vimeo.com","dailymotion.com","embed.music.apple.com","open.spotify.com","giphy.com","dai.ly","codepen.io"]}),r("convert_unsafe_embeds",{processor:"boolean",default:!0}),s.on("ScriptsLoaded",()=>{r("directionality",{processor:"string",default:Hu.isRtl()?"rtl":void 0}),r("placeholder",{processor:"string",default:Dl.getAttrib(s.getElement(),"placeholder")})})},uD=Yn("iframe_attrs"),dD=Yn("doctype"),ju=Yn("document_base_url"),D4=Yn("body_id"),IE=Yn("body_class"),eu=Yn("content_security_policy"),lh=Yn("br_in_pre"),gl=Yn("forced_root_block"),ff=Yn("forced_root_block_attrs"),tu=Yn("newline_behavior"),m6=Yn("br_newline_selector"),L4=Yn("no_newline_selector"),h6=Yn("keep_styles"),AE=Yn("end_container_on_empty_block"),P4=Yn("automatic_uploads"),OE=Yn("images_reuse_filename"),RE=Yn("images_replace_blob_uris"),DE=Yn("icons"),fD=Yn("icons_url"),pD=Yn("images_upload_url"),mD=Yn("images_upload_base_path"),g6=Yn("images_upload_credentials"),M4=Yn("images_upload_handler"),LE=Yn("content_css_cors"),Oy=Yn("referrer_policy"),_2=Yn("language"),Sg=Yn("language_url"),N4=Yn("indent_use_margin"),hD=Yn("indentation"),PE=Yn("content_css"),gD=Yn("content_style"),ME=Yn("font_css"),NE=Yn("directionality"),wu=Yn("inline_boundaries_selector"),F4=Yn("object_resizing"),FE=Yn("resize_img_proportional"),v6=Yn("placeholder"),Ry=Yn("event_root"),vD=Yn("service_message"),S2=Yn("theme"),bD=Yn("theme_url"),b6=Yn("model"),yD=Yn("model_url"),Dy=Yn("inline_boundaries"),_D=Yn("formats"),SD=Yn("preview_styles"),$4=Yn("format_empty_lines"),$E=Yn("format_noneditable_selector"),y6=Yn("custom_ui_selector"),Ly=Yn("inline"),BE=Yn("hidden_input"),_6=Yn("submit_patch"),S6=Yn("add_form_submit_trigger"),C6=Yn("add_unload_trigger"),z0=Yn("custom_undo_redo_levels"),VE=Yn("disable_nodechange"),w6=Yn("readonly"),HE=Yn("editable_root"),UE=Yn("content_css_cors"),Eu=Yn("plugins"),B4=Yn("external_plugins"),V4=Yn("block_unsupported_drop"),E6=Yn("visual"),k6=Yn("visual_table_class"),ch=Yn("visual_anchor_class"),H4=Yn("iframe_aria_text"),CD=Yn("setup"),Cg=Yn("init_instance_callback"),U4=Yn("urlconverter_callback"),ku=Yn("auto_focus"),CU=Yn("browser_spellcheck"),C2=Yn("protect"),wD=Yn("paste_block_drop"),Py=Yn("paste_data_images"),ED=Yn("paste_preprocess"),kD=Yn("paste_postprocess"),zE=Yn("newdocument_content"),WE=Yn("paste_webkit_styles"),z4=Yn("paste_remove_styles_if_webkit"),xD=Yn("paste_merge_formats"),TD=Yn("smart_paste"),My=Yn("paste_as_text"),x6=Yn("paste_tab_spaces"),T6=Yn("allow_html_data_urls"),jE=Yn("text_patterns"),ZE=Yn("text_patterns_lookup"),W4=Yn("noneditable_class"),wU=Yn("editable_class"),w2=Yn("noneditable_regexp"),ose=Yn("preserve_cdata"),Ny=Yn("highlight_on_focus"),Fy=Yn("xss_sanitization"),j4=Yn("init_content_sync"),ID=s=>s.options.isSet("text_patterns_lookup"),qE=s=>Gt.explode(s.options.get("font_size_style_values")),AD=s=>Gt.explode(s.options.get("font_size_classes")),I6=s=>s.options.get("encoding")==="xml",A6=s=>Gt.explode(s.options.get("images_file_types")),u1=Yn("table_tab_navigation"),$y=Yn("details_initial_state"),OD=Yn("details_serialized_state"),O6=Yn("sandbox_iframes"),GE=s=>s.options.get("sandbox_iframes_exclusions"),EU=Yn("convert_unsafe_embeds"),KE=Yn("license_key"),R6=Yn("api_key"),wg=Yn("disabled"),RD=Ln,D6=un,L6=s=>{const r=s.parentNode;r&&r.removeChild(s)},P6=s=>{const r=Md(s);return{count:s.length-r.length,text:r}},Z4=s=>{let r;for(;(r=s.data.lastIndexOf(ml))!==-1;)s.deleteData(r,1)},M6=(s,r)=>(W0(s),r),q4=(s,r)=>{const c=P6(s.data.substr(0,r.offset())),p=P6(s.data.substr(r.offset()));return(c.text+p.text).length>0?(Z4(s),$t(s,r.offset()-c.count)):r},E2=(s,r)=>{const c=r.container(),p=ot(Mo(c.childNodes),s).map(g=>g<r.offset()?$t(c,r.offset()-1):r).getOr(r);return W0(s),p},N6=(s,r)=>D6(s)&&r.container()===s?q4(s,r):M6(s,r),DD=(s,r)=>r.container()===s.parentNode?E2(s,r):M6(s,r),LD=(s,r)=>$t.isTextPosition(r)?N6(s,r):DD(s,r),W0=s=>{RD(s)&&uf(s)&&(ZC(s)?s.removeAttribute("data-mce-caret"):L6(s)),D6(s)&&(Z4(s),s.data.length===0&&L6(s))},By=cr,YE=Kl,xu=Da,kU="*[contentEditable=false],video,audio,embed,object",PD=(s,r,c)=>{const p=J9(r.getBoundingClientRect(),c);let g,_;if(s.tagName==="BODY"){const R=s.ownerDocument.documentElement;g=s.scrollLeft||R.scrollLeft,_=s.scrollTop||R.scrollTop}else{const R=s.getBoundingClientRect();g=s.scrollLeft-R.left,_=s.scrollTop-R.top}p.left+=g,p.right+=g,p.top+=_,p.bottom+=_,p.width=1;let E=r.offsetWidth-r.clientWidth;return E>0&&(c&&(E*=-1),p.left+=E,p.right+=E),p},k2=s=>{var r,c;const p=Pc(et.fromDom(s),kU);for(let g=0;g<p.length;g++){const _=p[g].dom;let E=_.previousSibling;if(Nd(E)){const R=E.data;R.length===1?(r=E.parentNode)===null||r===void 0||r.removeChild(E):E.deleteData(R.length-1,1)}E=_.nextSibling,Qc(E)&&(E.data.length===1?(c=E.parentNode)===null||c===void 0||c.removeChild(E):E.deleteData(0,1))}},XE=(s,r,c,p)=>{const g=la();let _,E;const R=gl(s),N=s.dom,j=(Oe,Ne)=>{let tt;if(ae(),xu(Ne))return null;if(c(Ne)){const ut=Ho(R,Ne,Oe),gt=PD(r,Ne,Oe);N.setStyle(ut,"top",gt.top),N.setStyle(ut,"caret-color","transparent"),E=ut;const Tt=N.create("div",{class:"mce-visual-caret","data-mce-bogus":"all"});N.setStyles(Tt,{...gt}),N.add(r,Tt),g.set({caret:Tt,element:Ne,before:Oe}),Oe&&N.addClass(Tt,"mce-visual-caret-before"),fe(),tt=Ne.ownerDocument.createRange(),tt.setStart(ut,0),tt.setEnd(ut,0)}else return E=Sy(Ne,Oe),tt=Ne.ownerDocument.createRange(),Vy(E.nextSibling)?(tt.setStart(E,0),tt.setEnd(E,0)):(tt.setStart(E,1),tt.setEnd(E,1)),tt;return tt},ae=()=>{k2(r),E&&(W0(E),E=null),g.on(Oe=>{N.remove(Oe.caret),g.clear()}),_&&(clearInterval(_),_=void 0)},fe=()=>{_=setInterval(()=>{g.on(Oe=>{p()?N.toggleClass(Oe.caret,"mce-visual-caret-hidden"):N.addClass(Oe.caret,"mce-visual-caret-hidden")})},500)};return{show:j,hide:ae,getCss:()=>".mce-visual-caret {position: absolute;background-color: black;background-color: currentcolor;}.mce-visual-caret-hidden {display: none;}*[data-mce-caret] {position: absolute;left: -1000px;right: auto;top: 0;margin: 0;padding: 0;}",reposition:()=>{g.on(Oe=>{const Ne=PD(r,Oe.element,Oe.before);N.setStyles(Oe.caret,{...Ne})})},destroy:()=>clearInterval(_)}},JE=()=>ns.browser.isFirefox(),Vy=s=>By(s)||YE(s),Eg=s=>(Vy(s)||Jp(s)&&JE())&&zv(et.fromDom(s)).exists(Wm),F6=Zt,QE=cr,MD=Kl,ek=Qb("display","block table table-cell table-row table-caption list-item"),Hy=uf,tk=M0,Uy=Ln,x2=un,$6=Su,T2=s=>s===1,j0=s=>s===-1,Z0=(s,r)=>{let c;for(;c=s(r);)if(!tk(c))return c;return null},d1=(s,r,c,p,g)=>{const _=new Gl(s,p),E=QE(s)||tk(s);let R;if(j0(r)){if(E&&(R=Z0(_.prev.bind(_),!0),c(R)))return R;for(;R=Z0(_.prev.bind(_),g);)if(c(R))return R}if(T2(r)){if(E&&(R=Z0(_.next.bind(_),!0),c(R)))return R;for(;R=Z0(_.next.bind(_),g);)if(c(R))return R}return null},B6=(s,r)=>{const c=g=>F6(g.dom),p=g=>g.dom===r;return Yf(et.fromDom(s),c,p).map(g=>g.dom).getOr(r)},uh=(s,r)=>{for(;s&&s!==r;){if(ek(s))return s;s=s.parentNode}return null},pp=(s,r,c)=>uh(s.container(),c)===uh(r.container(),c),dh=(s,r)=>{if(!r)return ye.none();const c=r.container(),p=r.offset();return Uy(c)?ye.from(c.childNodes[p+s]):ye.none()},V6=(s,r)=>{var c;const g=((c=r.ownerDocument)!==null&&c!==void 0?c:document).createRange();return s?(g.setStartBefore(r),g.setEndBefore(r)):(g.setStartAfter(r),g.setEndAfter(r)),g},rm=(s,r,c)=>uh(r,s)===uh(c,s),H6=(s,r,c)=>{const p=s?"previousSibling":"nextSibling";let g=c;for(;g&&g!==r;){let _=g[p];if(_&&Hy(_)&&(_=_[p]),QE(_)||MD(_)){if(rm(r,_,g))return _;break}if($6(_))break;g=g.parentNode}return null},q0=He(V6,!0),I2=He(V6,!1),nk=(s,r,c)=>{let p;const g=He(H6,!0,r),_=He(H6,!1,r),E=c.startContainer,R=c.startOffset;if(M0(E)){const N=x2(E)?E.parentNode:E,j=N.getAttribute("data-mce-caret");if(j==="before"&&(p=N.nextSibling,Eg(p)))return q0(p);if(j==="after"&&(p=N.previousSibling,Eg(p)))return I2(p)}if(!c.collapsed)return c;if(un(E)){if(Hy(E)){if(s===1){if(p=_(E),p)return q0(p);if(p=g(E),p)return I2(p)}if(s===-1){if(p=g(E),p)return I2(p);if(p=_(E),p)return q0(p)}return c}if(Nd(E)&&R>=E.data.length-1)return s===1&&(p=_(E),p)?q0(p):c;if(Qc(E)&&R<=1)return s===-1&&(p=g(E),p)?I2(p):c;if(R===E.data.length)return p=_(E),p?q0(p):c;if(R===0)return p=g(E),p?I2(p):c}return c},sk=(s,r)=>dh(s?0:-1,r).filter(QE),zy=(s,r,c)=>{const p=nk(s,r,c);return s===-1?$t.fromRangeStart(p):$t.fromRangeEnd(p)},G4=s=>ye.from(s.getNode()).map(et.fromDom),ND=s=>ye.from(s.getNode(!0)).map(et.fromDom),Wy=(s,r)=>{let c=r;for(;c=s(c);)if(c.isVisible())return c;return c},K4=(s,r)=>{const c=pp(s,r);return!c&&nr(s.getNode())?!0:c},ok=cr,mp=un,rk=Ln,Y4=nr,G0=Su,ik=KR,jy=YC,xU=(s,r)=>{const c=[];let p=s;for(;p&&p!==r;)c.push(p),p=p.parentNode;return c},ak=(s,r)=>s.hasChildNodes()&&r<s.childNodes.length?s.childNodes[r]:null,yc=(s,r)=>{if(T2(s)){if(G0(r.previousSibling)&&!mp(r.previousSibling))return $t.before(r);if(mp(r))return $t(r,0)}if(j0(s)){if(G0(r.nextSibling)&&!mp(r.nextSibling))return $t.after(r);if(mp(r))return $t(r,r.data.length)}return j0(s)?Y4(r)?$t.before(r):$t.after(r):$t.before(r)},X4=(s,r)=>{const c=r.nextSibling;return c&&G0(c)?mp(c)?$t(c,0):$t.before(c):kg(1,$t.after(r),s)},kg=(s,r,c)=>{let p,g,_,E;if(!rk(c)||!r)return null;if(r.isEqual($t.after(c))&&c.lastChild){if(E=$t.after(c.lastChild),j0(s)&&G0(c.lastChild)&&rk(c.lastChild))return Y4(c.lastChild)?$t.before(c.lastChild):E}else E=r;const R=E.container();let N=E.offset();if(mp(R)){if(j0(s)&&N>0)return $t(R,--N);if(T2(s)&&N<R.length)return $t(R,++N);p=R}else{if(j0(s)&&N>0&&(g=ak(R,N-1),G0(g)))return!ik(g)&&(_=d1(g,s,jy,g),_)?mp(_)?$t(_,_.data.length):$t.after(_):mp(g)?$t(g,g.data.length):$t.before(g);if(T2(s)&&N<R.childNodes.length&&(g=ak(R,N),G0(g)))return Y4(g)?X4(c,g):!ik(g)&&(_=d1(g,s,jy,g),_)?mp(_)?$t(_,0):$t.before(_):mp(g)?$t(g,0):$t.after(g);p=g||E.getNode()}if(p&&(T2(s)&&E.isAtEnd()||j0(s)&&E.isAtStart())&&(p=d1(p,s,Ht,c,!0),jy(p,c)))return yc(s,p);g=p&&d1(p,s,jy,c);const j=Ui(Bt(xU(R,c),ok));return j&&(!g||!j.contains(g))?(T2(s)?E=$t.after(j):E=$t.before(j),E):g?yc(s,g):null},Fd=s=>({next:r=>kg(1,r,s),prev:r=>kg(-1,r,s)}),lk=(s,r,c)=>{const p=s?$t.before(c):$t.after(c);return $d(s,r,p)},J4=s=>nr(s)?$t.before(s):$t.after(s),Zy=s=>$t.isTextPosition(s)?s.offset()===0:Su(s.getNode()),ck=s=>{if($t.isTextPosition(s)){const r=s.container();return s.offset()===r.data.length}else return Su(s.getNode(!0))},qy=(s,r)=>!$t.isTextPosition(s)&&!$t.isTextPosition(r)&&s.getNode()===r.getNode(!0),uk=s=>!$t.isTextPosition(s)&&nr(s.getNode()),K0=(s,r,c)=>s?!qy(r,c)&&!uk(r)&&ck(r)&&Zy(c):!qy(c,r)&&Zy(r)&&ck(c),$d=(s,r,c)=>{const p=Fd(r);return ye.from(s?p.next(c):p.prev(c))},xg=(s,r,c)=>$d(s,r,c).bind(p=>pp(c,p,r)&&K0(s,c,p)?$d(s,r,p):ye.some(p)),im=(s,r,c,p)=>xg(s,r,c).bind(g=>p(g)?im(s,r,g,p):ye.some(g)),hp=(s,r)=>{const c=s?r.firstChild:r.lastChild;return un(c)?ye.some($t(c,s?0:c.data.length)):c?Su(c)?ye.some(s?$t.before(c):J4(c)):lk(s,r,c):ye.none()},_c=He($d,!0),Ql=He($d,!1),sl=He(hp,!0),gp=He(hp,!1),Q4="_mce_caret",Bd=s=>Ln(s)&&s.id===Q4,Y0=(s,r)=>{let c=r;for(;c&&c!==s;){if(Bd(c))return c;c=c.parentNode}return null},e_=s=>z(s.start),dk=s=>Kt(s,"rng"),fk=s=>Kt(s,"id"),pk=s=>Kt(s,"name"),mk=s=>Gt.isArray(s.start),t_=s=>!pk(s)&&ce(s.forward)?s.forward:!0,hk=(s,r)=>(Ln(r)&&s.isBlock(r)&&!r.innerHTML&&(r.innerHTML='<br data-mce-bogus="1" />'),r),gk=(s,r)=>{const c=ye.from(uE(s.getRoot(),r.start)),p=ye.from(uE(s.getRoot(),r.end));return Oi(c,p,(g,_)=>{const E=s.createRng();return E.setStart(g.container(),g.offset()),E.setEnd(_.container(),_.offset()),{range:E,forward:t_(r)}})},A2=(s,r)=>{var c;const g=((c=s.ownerDocument)!==null&&c!==void 0?c:document).createTextNode(ml);s.appendChild(g),r.setStart(g,0),r.setEnd(g,0)},vk=s=>!s.hasChildNodes(),FD=(s,r)=>gp(s).fold(ct,c=>(r.setStart(c.container(),c.offset()),r.setEnd(c.container(),c.offset()),!0)),$D=(s,r,c)=>vk(r)&&Y0(s,r)?(A2(r,c),!0):!1,bk=(s,r,c,p)=>{const g=c[r?"start":"end"],_=s.getRoot();if(g){let E=_,R=g[0];for(let N=g.length-1;E&&N>=1;N--){const j=E.childNodes;if($D(_,E,p))return!0;if(g[N]>j.length-1)return $D(_,E,p)?!0:FD(E,p);E=j[g[N]]}un(E)&&(R=Math.min(g[0],E.data.length)),Ln(E)&&(R=Math.min(g[0],E.childNodes.length)),r?p.setStart(E,R):p.setEnd(E,R)}return!0},O2=s=>un(s)&&s.data.length>0,BD=(s,r,c)=>{const p=s.get(c.id+"_"+r),g=p==null?void 0:p.parentNode,_=c.keep;if(p&&g){let E,R;if(r==="start"?_?p.hasChildNodes()?(E=p.firstChild,R=1):O2(p.nextSibling)?(E=p.nextSibling,R=0):O2(p.previousSibling)?(E=p.previousSibling,R=p.previousSibling.data.length):(E=g,R=s.nodeIndex(p)+1):(E=g,R=s.nodeIndex(p)):_?p.hasChildNodes()?(E=p.firstChild,R=1):O2(p.previousSibling)?(E=p.previousSibling,R=p.previousSibling.data.length):(E=g,R=s.nodeIndex(p)):(E=g,R=s.nodeIndex(p)),!_){const N=p.previousSibling,j=p.nextSibling;Gt.each(Gt.grep(p.childNodes),fe=>{un(fe)&&(fe.data=fe.data.replace(/\uFEFF/g,""))});let ae;for(;ae=s.get(c.id+"_"+r);)s.remove(ae,!0);if(un(j)&&un(N)&&!ns.browser.isOpera()){const fe=N.data.length;N.appendData(j.data),s.remove(j),E=N,R=fe}}return ye.some($t(E,R))}else return ye.none()},VD=(s,r)=>{const c=s.createRng();return bk(s,!0,r,c)&&bk(s,!1,r,c)?ye.some({range:c,forward:t_(r)}):ye.none()},Uo=(s,r)=>{const c=BD(s,"start",r),p=BD(s,"end",r);return Oi(c,p.or(c),(g,_)=>{const E=s.createRng();return E.setStart(hk(s,g.container()),g.offset()),E.setEnd(hk(s,_.container()),_.offset()),{range:E,forward:t_(r)}})},Tg=(s,r)=>ye.from(s.select(r.name)[r.index]).map(c=>{const p=s.createRng();return p.selectNode(c),{range:p,forward:!0}}),f1=(s,r)=>{const c=s.dom;if(r){if(mk(r))return VD(c,r);if(e_(r))return gk(c,r);if(fk(r))return Uo(c,r);if(pk(r))return Tg(c,r);if(dk(r))return ye.some({range:r.rng,forward:t_(r)})}return ye.none()},n_=(s,r,c)=>gE(s,r,c),U6=(s,r)=>{f1(s,r).each(({range:c,forward:p})=>{s.setRng(c,p)})},hd=s=>Ln(s)&&s.tagName==="SPAN"&&s.getAttribute("data-mce-type")==="bookmark",X0=(s=>r=>s===r)(Za),fh=s=>s!==""&&" \f\n\r \v".indexOf(s)!==-1,Gy=s=>!fh(s)&&!X0(s)&&!xC(s),yk=s=>{const r=[];if(s)for(let c=0;c<s.rangeCount;c++)r.push(s.getRangeAt(c));return r},UD=s=>Wn(s,r=>{const c=wy(r);return c?[et.fromDom(c)]:[]}),TU=s=>yk(s).length>1,_k=s=>Bt(UD(s),Uu),IU=s=>Pc(s,"td[data-mce-selected],th[data-mce-selected]"),Sk=(s,r)=>{const c=IU(r);return c.length>0?c:_k(s)},J0=s=>Sk(yk(s.selection.getSel()),et.fromDom(s.getBody())),Q0=(s,r)=>y0(s,"table",r),ev=s=>{const r=s.startContainer,c=s.startOffset;return un(r)?c===0?ye.some(et.fromDom(r)):ye.none():ye.from(r.childNodes[c]).map(et.fromDom)},AU=s=>{const r=s.endContainer,c=s.endOffset;return un(r)?c===r.data.length?ye.some(et.fromDom(r)):ye.none():ye.from(r.childNodes[c-1]).map(et.fromDom)},z6=s=>of(s).fold(Fe([s]),r=>[s].concat(z6(r))),R2=s=>Dc(s).fold(Fe([s]),r=>oo(r)==="br"?Um(r).map(c=>[s].concat(R2(c))).getOr([]):[s].concat(R2(r))),W6=(s,r)=>Oi(ev(r),AU(r),(c,p)=>{const g=pt(z6(s),He(Yo,c)),_=pt(R2(s),He(Yo,p));return g.isSome()&&_.isSome()}).getOr(!1),j6=(s,r,c,p)=>{const g=c,_=new Gl(c,g),E=us(s.schema.getMoveCaretBeforeOnEnterElements(),(N,j)=>!Qe(["td","th","table"],j.toLowerCase()));let R=c;do{if(un(R)&&Gt.trim(R.data).length!==0){p?r.setStart(R,0):r.setEnd(R,R.data.length);return}if(E[R.nodeName]){p?r.setStartBefore(R):R.nodeName==="BR"?r.setEndBefore(R):r.setEndAfter(R);return}}while(R=p?_.next():_.prev());g.nodeName==="BODY"&&(p?r.setStart(g,0):r.setEnd(g,g.childNodes.length))},D2=s=>{const r=s.selection.getSel();return he(r)&&r.rangeCount>0},Z6=(s,r)=>{const c=J0(s);c.length>0?Ve(c,p=>{const g=p.dom,_=s.dom.createRng();_.setStartBefore(g),_.setEndAfter(g),r(_,!0)}):r(s.selection.getRng(),!1)},Ck=(s,r,c)=>{const p=Ty(s,r);c(p),s.moveToBookmark(p)},Ig=s=>Be(s==null?void 0:s.nodeType),q6=s=>Ln(s)&&!hd(s)&&!Bd(s)&&!E0(s),zD=(s,r)=>{if(q6(r)&&!/^(TD|TH)$/.test(r.nodeName)){const c=s.getAttrib(r,"data-mce-selected"),p=parseInt(c,10);return!isNaN(p)&&p>0}else return!1},wk=(s,r,c)=>{const{selection:p,dom:g}=s,_=p.getNode(),E=cr(_);Ck(p,!0,()=>{r()}),E&&cr(_)&&g.isChildOf(_,s.getBody())?s.selection.select(_):c(p.getStart())&&p1(g,p)},p1=(s,r)=>{var c,p;const g=r.getRng(),{startContainer:_,startOffset:E}=g,R=r.getNode();if(!zD(s,R)&&Ln(_)){const N=_.childNodes,j=s.getRoot();let ae;if(E<N.length){const fe=N[E];ae=new Gl(fe,(c=s.getParent(fe,s.isBlock))!==null&&c!==void 0?c:j)}else{const fe=N[N.length-1];ae=new Gl(fe,(p=s.getParent(fe,s.isBlock))!==null&&p!==void 0?p:j),ae.next(!0)}for(let fe=ae.current();fe;fe=ae.next()){if(s.getContentEditable(fe)==="false")return;if(un(fe)&&!K6(fe)){g.setStart(fe,0),r.setRng(g);return}}}},Ek=(s,r,c)=>{if(s){const p=r?"nextSibling":"previousSibling";for(s=s[p];s;s=s[p])if(Ln(s)||!K6(s))return s}},G6=(s,r)=>!!s.getTextBlockElements()[r.nodeName.toLowerCase()]||af(s,r),Ag=(s,r,c)=>s.schema.isValidChild(r,c),K6=(s,r=!1)=>{if(he(s)&&un(s)){const c=r?s.data.replace(/ /g," "):s.data;return Jf(c)}else return!1},Dn=s=>he(s)&&un(s)&&s.length===0,Ll=(s,r)=>{const c="[data-mce-cef-wrappable]",p=$E(s),g=hi(p)?c:"".concat(c,",").concat(p);return Kc(et.fromDom(r),g)},s_=(s,r)=>{const c=s.dom;return q6(r)&&c.getContentEditable(r)==="false"&&Ll(s,r)&&c.select('[contenteditable="true"]',r).length===0},Ca=(s,r)=>ie(s)?s(r):(he(r)&&(s=s.replace(/%(\w+)/g,(c,p)=>r[p]||c)),s),Vd=(s,r)=>(s=s||"",r=r||"",s=""+(s.nodeName||s),r=""+(r.nodeName||r),s.toLowerCase()===r.toLowerCase()),o_=(s,r)=>{if(de(s))return null;{let c=String(s);return(r==="color"||r==="backgroundColor")&&(c=th(c)),r==="fontWeight"&&s===700&&(c="bold"),r==="fontFamily"&&(c=c.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),c}},tv=(s,r,c)=>{const p=s.getStyle(r,c);return o_(p,c)},r_=(s,r)=>{let c;return s.getParent(r,p=>Ln(p)?(c=s.getStyle(p,"text-decoration"),!!c&&c!=="none"):!1),c},i_=(s,r,c)=>s.getParents(r,c,s.getRoot()),Y6=(s,r,c)=>{const p=s.formatter.get(r);return he(p)&&Ot(p,c)},kk=(s,r)=>Y6(s,r,p=>{const g=_=>ie(_)||_.length>1&&_.charAt(0)==="%";return Ot(["styles","attributes"],_=>Vn(p,_).exists(E=>{const R=ue(E)?E:br(E);return Ot(R,g)}))}),WD=(s,r,c)=>{const p=["inline","block","selector","attributes","styles","classes"],g=_=>us(_,(E,R)=>Ot(p,N=>N===R));return Y6(s,r,_=>{const E=g(_);return Y6(s,c,R=>{const N=g(R);return Bo(E,N)})})},ph=s=>Ps(s,"block"),jD=s=>ph(s)&&s.wrapper===!0,X6=s=>ph(s)&&s.wrapper!==!0,pf=s=>Ps(s,"selector"),vl=s=>Ps(s,"inline"),a_=s=>pf(s)&&vl(s)&&Zl(Vn(s,"mixed"),!0),L2=s=>pf(s)&&s.expand!==!1&&!vl(s),J6=s=>{const r=[];let c=s;for(;c;){if(un(c)&&c.data!==ml||c.childNodes.length>1)return[];Ln(c)&&r.push(c),c=c.firstChild}return r},mh=s=>J6(s).length>0,m1=s=>Bd(s.dom)&&mh(s.dom),Og=hd,Ky=i_,Zu=K6,nv=G6,ZD=s=>nr(s)&&s.getAttribute("data-mce-bogus")&&!s.nextSibling,P2=(s,r)=>{let c=r;for(;c;){if(Ln(c)&&s.getContentEditable(c))return s.getContentEditable(c)==="false"?c:r;c=c.parentNode}return r},xk=(s,r,c,p)=>{const g=r.data;if(s){for(let _=c;_>0;_--)if(p(g.charAt(_-1)))return _}else for(let _=c;_<g.length;_++)if(p(g.charAt(_)))return _;return-1},Tk=(s,r,c)=>xk(s,r,c,p=>X0(p)||fh(p)),Ik=(s,r,c)=>xk(s,r,c,Gy),Ak=(s,r,c,p,g,_)=>{let E;const R=s.getParent(c,fe=>IC(fe)||s.isBlock(fe)),N=he(R)?R:r,j=(fe,ve,xe)=>{const De=mg(s),Oe=g?De.backwards:De.forwards;return ye.from(Oe(fe,ve,(Ne,tt)=>Og(Ne.parentNode)?-1:(E=Ne,xe(g,Ne,tt)),N))};return j(c,p,Tk).bind(fe=>_?j(fe.container,fe.offset+(g?-1:0),Ik):ye.some(fe)).orThunk(()=>E?ye.some({container:E,offset:g?0:E.length}):ye.none())},Yy=(s,r,c,p,g)=>{const _=p[g];un(p)&&hi(p.data)&&_&&(p=_);const E=Ky(s,p);for(let R=0;R<E.length;R++)for(let N=0;N<r.length;N++){const j=r[N];if(!(he(j.collapsed)&&j.collapsed!==c.collapsed)&&pf(j)&&s.is(E[R],j.selector))return E[R]}return p},Sc=(s,r,c,p)=>{var g;let _=c;const E=s.getRoot(),R=r[0];if(ph(R)&&(_=R.wrapper?null:s.getParent(c,R.block,E)),!_){const N=(g=s.getParent(c,"LI,TD,TH,SUMMARY"))!==null&&g!==void 0?g:E;_=s.getParent(un(c)?c.parentNode:c,j=>j!==E&&nv(s.schema,j),N)}if(_&&ph(R)&&R.wrapper&&(_=Ky(s,_,"ul,ol").reverse()[0]||_),!_)for(_=c;_&&_[p]&&!s.isBlock(_[p])&&(_=_[p],!Vd(_,"br")););return _||c},mf=(s,r,c,p)=>{const g=c.parentNode;return he(c[p])?!1:g===r||de(g)||s.isBlock(g)?!0:mf(s,r,g,p)},qu=(s,r,c,p,g,_)=>{let E=c;const R=g?"previousSibling":"nextSibling",N=s.getRoot();if(un(c)&&!Zu(c)&&(g?p>0:p<c.data.length))return c;for(;E;){if(IC(E))return c;if(!r[0].block_expand&&s.isBlock(E))return _?E:c;for(let j=E[R];j;j=j[R]){const ae=un(j)&&!mf(s,N,j,R);if(!Og(j)&&!ZD(j)&&!Zu(j,ae))return E}if(E===N||E.parentNode===N){c=E;break}E=E.parentNode}return c},sv=s=>Og(s.parentNode)||Og(s),h1=(s,r,c,p={})=>{const{includeTrailingSpace:g=!1,expandToBlock:_=!0}=p,E=s.getParent(r.commonAncestorContainer,xe=>IC(xe)),R=he(E)?E:s.getRoot();let{startContainer:N,startOffset:j,endContainer:ae,endOffset:fe}=r;const ve=c[0];return Ln(N)&&N.hasChildNodes()&&(N=Pn(N,j),un(N)&&(j=0)),Ln(ae)&&ae.hasChildNodes()&&(ae=Pn(ae,r.collapsed?fe:fe-1),un(ae)&&(fe=ae.data.length)),N=P2(s,N),ae=P2(s,ae),sv(N)&&(N=Og(N)?N:N.parentNode,r.collapsed?N=N.previousSibling||N:N=N.nextSibling||N,un(N)&&(j=r.collapsed?N.length:0)),sv(ae)&&(ae=Og(ae)?ae:ae.parentNode,r.collapsed?ae=ae.nextSibling||ae:ae=ae.previousSibling||ae,un(ae)&&(fe=r.collapsed?0:ae.length)),r.collapsed&&(Ak(s,R,N,j,!0,g).each(({container:Oe,offset:Ne})=>{N=Oe,j=Ne}),Ak(s,R,ae,fe,!1,g).each(({container:Oe,offset:Ne})=>{ae=Oe,fe=Ne})),(vl(ve)||ve.block_expand)&&((!vl(ve)||!un(N)||j===0)&&(N=qu(s,c,N,j,!0,_)),(!vl(ve)||!un(ae)||fe===ae.data.length)&&(ae=qu(s,c,ae,fe,!1,_))),L2(ve)&&(N=Yy(s,c,r,N,"previousSibling"),ae=Yy(s,c,r,ae,"nextSibling")),(ph(ve)||pf(ve))&&(N=Sc(s,c,N,"previousSibling"),ae=Sc(s,c,ae,"nextSibling"),ph(ve)&&(s.isBlock(N)||(N=qu(s,c,N,j,!0,_),un(N)&&(j=0)),s.isBlock(ae)||(ae=qu(s,c,ae,fe,!1,_),un(ae)&&(fe=ae.data.length)))),Ln(N)&&N.parentNode&&(j=s.nodeIndex(N),N=N.parentNode),Ln(ae)&&ae.parentNode&&(fe=s.nodeIndex(ae)+1,ae=ae.parentNode),{startContainer:N,startOffset:j,endContainer:ae,endOffset:fe}},Xy=(s,r,c)=>{var p;const g=r.startOffset,_=Pn(r.startContainer,g),E=r.endOffset,R=Pn(r.endContainer,E-1),N=Ne=>{const tt=Ne[0];un(tt)&&tt===_&&g>=tt.data.length&&Ne.splice(0,1);const ut=Ne[Ne.length-1];return E===0&&Ne.length>0&&ut===R&&un(ut)&&Ne.splice(Ne.length-1,1),Ne},j=(Ne,tt,ut)=>{const gt=[];for(;Ne&&Ne!==ut;Ne=Ne[tt])gt.push(Ne);return gt},ae=(Ne,tt)=>s.getParent(Ne,ut=>ut.parentNode===tt,tt),fe=(Ne,tt,ut)=>{const gt=ut?"nextSibling":"previousSibling";for(let Tt=Ne,Jt=Tt.parentNode;Tt&&Tt!==tt;Tt=Jt){Jt=Tt.parentNode;const vn=j(Tt===Ne?Tt:Tt[gt],gt);vn.length&&(ut||vn.reverse(),c(N(vn)))}};if(_===R)return c(N([_]));const ve=(p=s.findCommonAncestor(_,R))!==null&&p!==void 0?p:s.getRoot();if(s.isChildOf(_,R))return fe(_,ve,!0);if(s.isChildOf(R,_))return fe(R,ve);const xe=ae(_,ve)||_,De=ae(R,ve)||R;fe(_,xe,!0);const Oe=j(xe===_?xe:xe.nextSibling,"nextSibling",De===R?De.nextSibling:De);Oe.length&&c(N(Oe)),fe(R,De)},Q6=['pre[class*=language-][contenteditable="false"]',"figure.image","div[data-ephox-embed-iri]","div.tiny-pageembed","div.mce-toc","div[data-mce-toc]"],qD=s=>Aa(s)&&c2(s)===ml,e8=(s,r,c,p)=>Yc(r).fold(()=>"skipping",g=>p==="br"||qD(r)?"valid":H9(r)?"existing":Bd(r.dom)?"caret":Ot(Q6,_=>Kc(r,_))?"valid-block":!Ag(s,c,p)||!Ag(s,oo(g),c)?"invalid-child":"valid"),GD=(s,r)=>{const c=h1(s.dom,r,[{inline:"span"}]);r.setStart(c.startContainer,c.startOffset),r.setEnd(c.endContainer,c.endOffset),s.selection.setRng(r)},l_=(s,r,c,p,g,_)=>{const{uid:E=r,...R}=c;Yt(s,hy()),el(s,"".concat(R0()),E),el(s,"".concat(dg()),p);const{attributes:N={},classes:j=[]}=g(E,R);if(Tl(s,N),zC(s,j),_){j.length>0&&el(s,"".concat(fg()),j.join(","));const ae=Zs(N);ae.length>0&&el(s,"".concat(pg()),ae.join(","))}},t8=s=>{ko(s,hy()),gi(s,"".concat(R0())),gi(s,"".concat(dg())),gi(s,"".concat(sh()));const r=ld(s,"".concat(pg())).map(p=>p.split(",")).getOr([]),c=ld(s,"".concat(fg())).map(p=>p.split(",")).getOr([]);Ve(r,p=>gi(s,p)),Z9(s,c),gi(s,"".concat(fg())),gi(s,"".concat(pg()))},Ok=(s,r,c,p,g)=>{const _=et.fromTag("span",s);return l_(_,r,c,p,g,!1),_},c_=(s,r,c,p,g,_)=>{const E=[],R=Ok(s.getDoc(),c,_,p,g),N=la(),j=()=>{N.clear()},ae=()=>N.get().getOrThunk(()=>{const De=oh(R);return E.push(De),N.set(De),De}),fe=De=>{Ve(De,ve)},ve=De=>{switch(e8(s,De,"span",oo(De))){case"invalid-child":{j();const Ne=Il(De);fe(Ne),j();break}case"valid-block":{j(),l_(De,c,_,p,g,!0);break}case"valid":{const Ne=ae();Gv(De,Ne);break}}},xe=De=>{const Oe=Nt(De,et.fromDom);fe(Oe)};return Xy(s.dom,r,De=>{j(),xe(De)}),E},n8=(s,r,c,p)=>{s.undoManager.transact(()=>{const g=s.selection,_=g.getRng(),E=J0(s).length>0,R=L0("mce-annotation");if(_.collapsed&&!E&&GD(s,_),g.getRng().collapsed&&!E){const N=Ok(s.getDoc(),R,p,r,c.decorate);S0(N,Za),g.getRng().insertNode(N.dom),g.select(N.dom)}else Ck(g,!1,()=>{Z6(s,N=>{c_(s,N,R,r,c.decorate,p)})})})},Yr=s=>{const r=z9();U9(s,r);const c=m4(s,r),p=qf("span"),g=_=>{Ve(_,E=>{p(E)?Xp(E):t8(E)})};return{register:(_,E)=>{r.register(_,E)},annotate:(_,E)=>{r.lookup(_).each(R=>{n8(s,_,R,E)})},annotationChanged:(_,E)=>{c.addListener(_,E)},remove:_=>{V9(s,ye.some(_)).each(({elements:E})=>{const R=s.selection.getBookmark();g(E),s.selection.moveToBookmark(R)})},removeAll:_=>{const E=s.selection.getBookmark();bn(a2(s,_),(R,N)=>{g(R)}),s.selection.moveToBookmark(E)},getAll:_=>{const E=a2(s,_);return qs(E,R=>Nt(R,N=>N.dom))}}},am=s=>({getBookmark:He(n_,s),moveToBookmark:He(U6,s)});am.isBookmarkNode=hd;const Rk=(s,r,c)=>c.collapsed?!1:Ot(c.getClientRects(),p=>eE(p,s,r)),Dk=()=>et.fromDom(document),s8=(s,r=!1)=>s.dom.focus({preventScroll:r}),u_=s=>{const r=Kf(s).dom;return s.dom===r.activeElement},o8=(s=Dk())=>ye.from(s.dom.activeElement).map(et.fromDom),M2=s=>o8(Kf(s)).filter(r=>s.dom.contains(r.dom)),Lk={create:(s,r,c,p)=>({start:s,soffset:r,finish:c,foffset:p})},d_=sr.generate([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),KD=(s,r,c,p)=>s.fold(r,c,p),Jy=s=>s.fold(St,St,St),Pk=d_.before,r8=d_.on,Mk=d_.after,g1={before:Pk,on:r8,after:Mk,cata:KD,getStart:Jy},f_=sr.generate([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Gu=s=>f_.exact(s.start,s.soffset,s.finish,s.foffset),$c=s=>s.match({domRange:r=>et.fromDom(r.startContainer),relative:(r,c)=>g1.getStart(r),exact:(r,c,p,g)=>r}),N2=f_.domRange,RU=f_.relative,YD=f_.exact,i8=s=>{const r=$c(s);return qh(r)},Lo=Lk.create,F2={domRange:N2,relative:RU,exact:YD,exactFromRange:Gu,getWin:i8,range:Lo},a8=(s,r)=>{const c=Aa(r)?c2(r).length:Il(r).length+1;return s>c?c:s<0?0:s},l8=s=>F2.range(s.start,a8(s.soffset,s.start),s.finish,a8(s.foffset,s.finish)),Nk=(s,r)=>!ng(r.dom)&&(Zi(s,r)||Yo(s,r)),Fk=s=>r=>Nk(s,r.start)&&Nk(s,r.finish),XD=s=>s.inline||ns.browser.isFirefox(),DU=s=>F2.range(et.fromDom(s.startContainer),s.startOffset,et.fromDom(s.endContainer),s.endOffset),JD=s=>{const r=s.getSelection();return(!r||r.rangeCount===0?ye.none():ye.from(r.getRangeAt(0))).map(DU)},QD=s=>{const r=qh(s);return JD(r.dom).filter(Fk(s))},p_=(s,r)=>ye.from(r).filter(Fk(s)).map(l8),c8=s=>{const r=document.createRange();try{return r.setStart(s.start.dom,s.soffset),r.setEnd(s.finish.dom,s.foffset),ye.some(r)}catch{return ye.none()}},m_=s=>{const r=XD(s)?QD(et.fromDom(s.getBody())):ye.none();s.bookmark=r.isSome()?r:s.bookmark},eL=s=>(s.bookmark?s.bookmark:ye.none()).bind(c=>p_(et.fromDom(s.getBody()),c)).bind(c8),LU=s=>{eL(s).each(r=>s.selection.setRng(r))},u8={isEditorUIElement:s=>{const r=s.className.toString();return r.indexOf("tox-")!==-1||r.indexOf("mce-")!==-1}},tL=(s,r)=>(Be(r)||(r=0),setTimeout(s,r)),nL=(s,r)=>(Be(r)||(r=0),setInterval(s,r)),Xn={setEditorTimeout:(s,r,c)=>tL(()=>{s.removed||r()},c),setEditorInterval:(s,r,c)=>{const p=nL(()=>{s.removed?clearInterval(p):r()},c);return p}},$k=s=>s.type==="nodechange"&&s.selectionChange,Bk=(s,r)=>{const c=()=>{r.throttle()};vi.DOM.bind(document,"mouseup",c),s.on("remove",()=>{vi.DOM.unbind(document,"mouseup",c)})},d8=(s,r)=>{s.on("mouseup touchend",c=>{r.throttle()})},Qy=(s,r)=>{d8(s,r),s.on("keyup NodeChange AfterSetSelectionRange",c=>{$k(c)||m_(s)})},sL=s=>{const r=i2(()=>{m_(s)},0);s.on("init",()=>{s.inline&&Bk(s,r),Qy(s,r)}),s.on("remove",()=>{r.cancel()})};let $2;const f8=vi.DOM,oL=s=>Ln(s)&&u8.isEditorUIElement(s),e3=s=>{const r=s.classList;return r!==void 0?r.contains("tox-edit-area")||r.contains("tox-edit-area__iframe")||r.contains("mce-content-body"):!1},h_=(s,r)=>{const c=y6(s);return f8.getParent(r,g=>oL(g)||(c?s.dom.is(g,c):!1))!==null},p8=s=>{try{const r=Kf(et.fromDom(s.getElement()));return o8(r).fold(()=>document.body,c=>c.dom)}catch{return document.body}},y=(s,r)=>{const c=r.editor;sL(c);const p=(g,_)=>{if(Ny(g)&&g.inline!==!0){const E=et.fromDom(g.getContainer());_(E,"tox-edit-focus")}};c.on("focusin",()=>{const g=s.focusedEditor;e3(p8(c))&&p(c,Yt),g!==c&&(g&&g.dispatch("blur",{focusedEditor:c}),s.setActive(c),s.focusedEditor=c,c.dispatch("focus",{blurredEditor:g}),c.focus(!0))}),c.on("focusout",()=>{Xn.setEditorTimeout(c,()=>{const g=s.focusedEditor;(!e3(p8(c))||g!==c)&&p(c,ko),!h_(c,p8(c))&&g===c&&(c.dispatch("blur",{focusedEditor:null}),s.focusedEditor=null)})}),$2||($2=g=>{const _=s.activeEditor;_&&_9(g).each(E=>{const R=E;R.ownerDocument===document&&R!==document.body&&!h_(_,R)&&s.focusedEditor===_&&(_.dispatch("blur",{focusedEditor:null}),s.focusedEditor=null)})},f8.bind(document,"focusin",$2))},w=(s,r)=>{s.focusedEditor===r.editor&&(s.focusedEditor=null),!s.activeEditor&&$2&&(f8.unbind(document,"focusin",$2),$2=null)},A=s=>{s.on("AddEditor",He(y,s)),s.on("RemoveEditor",He(w,s))},M=(s,r)=>s.dom.getParent(r,c=>s.dom.getContentEditable(c)==="true"),K=(s,r)=>s.dom.getParent(r,c=>s.dom.getContentEditable(c)==="false")!==null,re=s=>s.collapsed?ye.from(Pn(s.startContainer,s.startOffset)).map(et.fromDom):ye.none(),_e=(s,r)=>re(r).bind(c=>$R(c)?ye.some(c):Zi(s,c)?ye.none():ye.some(s)),Ae=(s,r)=>{_e(et.fromDom(s.getBody()),r).bind(c=>sl(c.dom)).fold(()=>{s.selection.normalize()},c=>s.selection.setRng(c.toRange()))},Re=s=>{if(s.setActive)try{s.setActive()}catch{s.focus()}else s.focus()},nt=s=>u_(s)||M2(s).isSome(),vt=s=>he(s.iframeElement)&&u_(et.fromDom(s.iframeElement)),tn=s=>{const r=s.getBody();return r&&nt(et.fromDom(r))},An=s=>{const r=Kf(et.fromDom(s.getElement()));return o8(r).filter(c=>!e3(c.dom)&&h_(s,c.dom)).isSome()},mn=s=>s.inline?tn(s):vt(s),gn=s=>mn(s)||An(s),ss=s=>{const r=s.selection,c=s.getBody();let p=r.getRng();s.quirks.refreshContentEditable();const g=E=>{eL(E).each(R=>{E.selection.setRng(R),p=R})};!mn(s)&&s.hasEditableRoot()&&g(s);const _=M(s,r.getNode());if(_&&s.dom.isChildOf(_,c)){K(s,_)||Re(c),Re(_),s.hasEditableRoot()||g(s),Ae(s,p),on(s);return}s.inline||(ns.browser.isOpera()||Re(c),s.getWin().focus()),(ns.browser.isFirefox()||s.inline)&&(Re(c),Ae(s,p)),on(s)},on=s=>s.editorManager.setActive(s),ws=(s,r)=>{s.removed||(r?on(s):ss(s))},qt={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,ESC:27,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,modifierPressed:s=>s.shiftKey||s.ctrlKey||s.altKey||qt.metaKeyPressed(s),metaKeyPressed:s=>ns.os.isMacOS()||ns.os.isiOS()?s.metaKey:s.ctrlKey&&!s.altKey},Fn="data-mce-selected",Sr="table,img,figure.image,hr,video,span.mce-preview-object,details",Cr=Math.abs,ls=Math.round,Xr={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]},nu=s=>s.type==="longpress"||s.type.indexOf("touch")===0,Rg=(s,r)=>{const c=r.dom,p=r.getDoc(),g=document,_=r.getBody();let E,R,N,j,ae,fe,ve,xe,De,Oe,Ne,tt,ut,gt,Tt;const Jt=nn=>he(nn)&&(K5(nn)||c.is(nn,"figure.image")),vn=nn=>Kl(nn)||c.hasClass(nn,"mce-preview-object"),qn=(nn,Nn)=>{if(nu(nn)){const Os=nn.touches[0];return Jt(nn.target)&&!Rk(Os.clientX,Os.clientY,Nn)}else return Jt(nn.target)&&!Rk(nn.clientX,nn.clientY,Nn)},Ut=nn=>{const Nn=nn.target;qn(nn,r.selection.getRng())&&!nn.isDefaultPrevented()&&r.selection.select(Nn)},Et=nn=>c.hasClass(nn,"mce-preview-object")&&he(nn.firstElementChild)?[nn,nn.firstElementChild]:c.is(nn,"figure.image")?[nn.querySelector("img")]:[nn],Qt=nn=>{const Nn=F4(r);return!Nn||r.mode.isReadOnly()||nn.getAttribute("data-mce-resize")==="false"||nn===r.getBody()?!1:c.hasClass(nn,"mce-preview-object")&&he(nn.firstElementChild)?Kc(et.fromDom(nn.firstElementChild),Nn):Kc(et.fromDom(nn),Nn)},Bn=(nn,Nn)=>{if(vn(Nn))return nn.create("img",{src:ns.transparentSrc});if(Jp(Nn)){const Zr=hr(j.name,"n")?Po:jo,Oo=Nn.cloneNode(!0);return Zr(nn.select("tr",Oo)).each(Vc=>{const _m=nn.select("td,th",Vc);nn.setStyle(Vc,"height",null),Ve(_m,x1=>nn.setStyle(x1,"height",null))}),Oo}else return Nn.cloneNode(!0)},hs=(nn,Nn,Os)=>{if(he(Os)){const Zr=Et(nn);Ve(Zr,Oo=>{Oo.style[Nn]||!r.schema.isValid(Oo.nodeName.toLowerCase(),Nn)?c.setStyle(Oo,Nn,Os):c.setAttrib(Oo,Nn,""+Os)})}},mo=(nn,Nn,Os)=>{hs(nn,"width",Nn),hs(nn,"height",Os)},bo=nn=>{let Nn,Os,Zr,Oo,Vc;Nn=nn.screenX-fe,Os=nn.screenY-ve,tt=Nn*j[2]+xe,ut=Os*j[3]+De,tt=tt<5?5:tt,ut=ut<5?5:ut,(Jt(E)||vn(E))&&FE(r)!==!1?Zr=!qt.modifierPressed(nn):Zr=qt.modifierPressed(nn),Zr&&(Cr(Nn)>Cr(Os)?(ut=ls(tt*Oe),tt=ls(ut/Oe)):(tt=ls(ut/Oe),ut=ls(tt*Oe))),mo(R,tt,ut),Oo=j.startPos.x+Nn,Vc=j.startPos.y+Os,Oo=Oo>0?Oo:0,Vc=Vc>0?Vc:0,c.setStyles(N,{left:Oo,top:Vc,display:"block"}),N.innerHTML=tt+" × "+ut,Nn=_.scrollWidth-gt,Os=_.scrollHeight-Tt,Nn+Os!==0&&c.setStyles(N,{left:Oo-Nn,top:Vc-Os}),Ne||(wE(r,E,xe,De,"corner-"+j.name),Ne=!0)},dr=()=>{const nn=Ne;Ne=!1,nn&&(hs(E,"width",tt),hs(E,"height",ut)),c.unbind(p,"mousemove",bo),c.unbind(p,"mouseup",dr),g!==p&&(c.unbind(g,"mousemove",bo),c.unbind(g,"mouseup",dr)),c.remove(R),c.remove(N),c.remove(ae),Vr(E),nn&&(EE(r,E,tt,ut,"corner-"+j.name),c.setAttrib(E,"style",c.getAttrib(E,"style"))),r.nodeChanged()},Vr=nn=>{gs();const Nn=c.getPos(nn,_),Os=Nn.x,Zr=Nn.y,Oo=nn.getBoundingClientRect(),Vc=Oo.width||Oo.right-Oo.left,_m=Oo.height||Oo.bottom-Oo.top;E!==nn&&(Fl(),E=nn,tt=ut=0);const x1=r.dispatch("ObjectSelected",{target:nn});Qt(nn)&&!x1.isDefaultPrevented()?bn(Xr,(ru,Tp)=>{const Ip=Xu=>{const Sm=Et(E)[0];fe=Xu.screenX,ve=Xu.screenY,xe=Sm.clientWidth,De=Sm.clientHeight,Oe=De/xe,j=ru,j.name=Tp,j.startPos={x:Vc*ru[0]+Os,y:_m*ru[1]+Zr},gt=_.scrollWidth,Tt=_.scrollHeight,ae=c.add(_,"div",{class:"mce-resize-backdrop","data-mce-bogus":"all"}),c.setStyles(ae,{position:"fixed",left:"0",top:"0",width:"100%",height:"100%"}),R=Bn(c,E),c.addClass(R,"mce-clonedresizable"),c.setAttrib(R,"data-mce-bogus","all"),R.contentEditable="false",c.setStyles(R,{left:Os,top:Zr,margin:0}),mo(R,Vc,_m),R.removeAttribute(Fn),_.appendChild(R),c.bind(p,"mousemove",bo),c.bind(p,"mouseup",dr),g!==p&&(c.bind(g,"mousemove",bo),c.bind(g,"mouseup",dr)),N=c.add(_,"div",{class:"mce-resize-helper","data-mce-bogus":"all"},xe+" × "+De)};let Tu=c.get("mceResizeHandle"+Tp);Tu&&c.remove(Tu),Tu=c.add(_,"div",{id:"mceResizeHandle"+Tp,"data-mce-bogus":"all",class:"mce-resizehandle",unselectable:!0,style:"cursor:"+Tp+"-resize; margin:0; padding:0"}),c.bind(Tu,"mousedown",Xu=>{Xu.stopImmediatePropagation(),Xu.preventDefault(),Ip(Xu)}),ru.elm=Tu,c.setStyles(Tu,{left:Vc*ru[0]+Os-Tu.offsetWidth/2,top:_m*ru[1]+Zr-Tu.offsetHeight/2})}):Fl(!1)},Na=i2(Vr,0),Fl=(nn=!0)=>{Na.cancel(),gs(),E&&nn&&E.removeAttribute(Fn),bn(Xr,(Nn,Os)=>{const Zr=c.get("mceResizeHandle"+Os);Zr&&(c.unbind(Zr),c.remove(Zr))})},sc=(nn,Nn)=>c.isChildOf(nn,Nn),Tn=nn=>{if(Ne||r.removed||r.composing)return;const Nn=nn.type==="mousedown"?nn.target:s.getNode(),Os=ds(et.fromDom(Nn),Sr).map(Oo=>Oo.dom).filter(Oo=>c.isEditable(Oo.parentElement)||Oo.nodeName==="IMG"&&c.isEditable(Oo)).getOrUndefined(),Zr=he(Os)?c.getAttrib(Os,Fn,"1"):"1";if(Ve(c.select("img[".concat(Fn,"],hr[").concat(Fn,"]")),Oo=>{Oo.removeAttribute(Fn)}),he(Os)&&sc(Os,_)&&gn(r)){rr();const Oo=s.getStart(!0);if(sc(Oo,Os)&&sc(s.getEnd(!0),Os)){c.setAttrib(Os,Fn,Zr),Na.throttle(Os);return}}Fl()},gs=()=>{bn(Xr,nn=>{nn.elm&&(c.unbind(nn.elm),delete nn.elm)})},rr=()=>{try{r.getDoc().execCommand("enableObjectResizing",!1,"false")}catch{}};return r.on("init",()=>{rr(),r.on("NodeChange ResizeEditor ResizeWindow ResizeContent drop",Tn),r.on("keyup compositionend",nn=>{E&&E.nodeName==="TABLE"&&Tn(nn)}),r.on("hide blur",Fl),r.on("contextmenu longpress",Ut,!0)}),r.on("remove",gs),{isResizable:Qt,showResizeRect:Vr,hideResizeRect:Fl,updateResizeRect:Tn,destroy:()=>{Na.cancel(),E=R=ae=null}}},vp=(s,r)=>{r.fold(c=>{s.setStartBefore(c.dom)},(c,p)=>{s.setStart(c.dom,p)},c=>{s.setStartAfter(c.dom)})},To=(s,r)=>{r.fold(c=>{s.setEndBefore(c.dom)},(c,p)=>{s.setEnd(c.dom,p)},c=>{s.setEndAfter(c.dom)})},Rr=(s,r,c)=>{const p=s.document.createRange();return vp(p,r),To(p,c),p},Cc=(s,r,c,p,g)=>{const _=s.document.createRange();return _.setStart(r.dom,c),_.setEnd(p.dom,g),_},bl=sr.generate([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),hf=(s,r,c)=>r(et.fromDom(c.startContainer),c.startOffset,et.fromDom(c.endContainer),c.endOffset),wc=(s,r)=>r.match({domRange:c=>({ltr:Fe(c),rtl:ye.none}),relative:(c,p)=>({ltr:Es(()=>Rr(s,c,p)),rtl:Es(()=>ye.some(Rr(s,p,c)))}),exact:(c,p,g,_)=>({ltr:Es(()=>Cc(s,c,p,g,_)),rtl:Es(()=>ye.some(Cc(s,g,_,c,p)))})}),bp=(s,r)=>{const c=r.ltr();return c.collapsed?r.rtl().filter(g=>g.collapsed===!1).map(g=>bl.rtl(et.fromDom(g.endContainer),g.endOffset,et.fromDom(g.startContainer),g.startOffset)).getOrThunk(()=>hf(s,bl.ltr,c)):hf(s,bl.ltr,c)},su=(s,r)=>{const c=wc(s,r);return bp(s,c)};bl.ltr,bl.rtl;const m8=(s,r,c)=>{var p;return ye.from((p=s.caretPositionFromPoint)===null||p===void 0?void 0:p.call(s,r,c)).bind(g=>{if(g.offsetNode===null)return ye.none();const _=s.createRange();return _.setStart(g.offsetNode,g.offset),_.collapse(),ye.some(_)})},t3=(s,r,c)=>{var p;return ye.from((p=s.caretRangeFromPoint)===null||p===void 0?void 0:p.call(s,r,c))},hh=(s,r,c)=>s.caretPositionFromPoint?m8(s,r,c):s.caretRangeFromPoint?t3(s,r,c):ye.none(),yl=(s,r,c)=>{const p=s.document;return hh(p,r,c).map(g=>Lk.create(et.fromDom(g.startContainer),g.startOffset,et.fromDom(g.endContainer),g.endOffset))},v1=(s,r)=>{const c=oo(s);return c==="input"?g1.after(s):Qe(["br","img"],c)?r===0?g1.before(s):g1.after(s):g1.on(s,r)},rL=(s,r)=>{const c=s.fold(g1.before,v1,g1.after),p=r.fold(g1.before,v1,g1.after);return F2.relative(c,p)},h8=(s,r,c,p)=>{const g=v1(s,r),_=v1(c,p);return F2.relative(g,_)},iL=s=>s.match({domRange:r=>{const c=et.fromDom(r.startContainer),p=et.fromDom(r.endContainer);return h8(c,r.startOffset,p,r.endOffset)},relative:rL,exact:h8}),g8=(s,r)=>{const p=document.createDocumentFragment();return Ve(s,g=>{p.appendChild(g.dom)}),et.fromDom(p)},v8=s=>{const r=F2.getWin(s).dom,c=(g,_,E,R)=>Cc(r,g,_,E,R),p=iL(s);return su(r,p).match({ltr:c,rtl:c})},Vk=(s,r,c)=>yl(s,r,c),n3=(s,r,c)=>{const p=qh(et.fromDom(c));return Vk(p.dom,s,r).map(g=>{const _=c.createRange();return _.setStart(g.start.dom,g.soffset),_.setEnd(g.finish.dom,g.foffset),_}).getOrUndefined()},aL=(s,r)=>he(s)&&he(r)&&s.startContainer===r.startContainer&&s.startOffset===r.startOffset&&s.endContainer===r.endContainer&&s.endOffset===r.endOffset,PU=(s,r,c)=>{let p=s;for(;p&&p!==r;){if(c(p))return p;p=p.parentNode}return null},Hk=(s,r,c)=>PU(s,r,c)!==null,lL=(s,r,c)=>Hk(s,r,p=>p.nodeName===c),cL=(s,r)=>uf(s)&&!Hk(s,r,Bd),uL=(s,r,c)=>{const p=r.parentNode;if(p){const g=new Gl(r,s.getParent(p,s.isBlock)||s.getRoot());let _;for(;_=g[c?"prev":"next"]();)if(nr(_))return!0}return!1},MU=(s,r)=>{var c;return((c=s.previousSibling)===null||c===void 0?void 0:c.nodeName)===r},NU=(s,r)=>{let c=r;for(;c&&c!==s;){if(cr(c))return!0;c=c.parentNode}return!1},g_=(s,r,c,p,g)=>{const _=s.getRoot(),E=s.schema.getNonEmptyElements(),R=g.parentNode;let N,j;if(!R)return ye.none();const ae=s.getParent(R,s.isBlock)||_;if(p&&nr(g)&&r&&s.isEmpty(ae))return ye.some($t(R,s.nodeIndex(g)));const fe=new Gl(g,ae);for(;j=fe[p?"prev":"next"]();){if(s.getContentEditableParent(j)==="false"||cL(j,_))return ye.none();if(un(j)&&j.data.length>0)return lL(j,_,"A")?ye.none():ye.some($t(j,p?j.data.length:0));if(s.isBlock(j)||E[j.nodeName.toLowerCase()])return ye.none();N=j}return dl(N)?ye.none():c&&N?ye.some($t(N,0)):ye.none()},FU=(s,r,c,p)=>{const g=s.getRoot();let _,E=!1,R=c?p.startContainer:p.endContainer,N=c?p.startOffset:p.endOffset;const j=Ln(R)&&N===R.childNodes.length,ae=s.schema.getNonEmptyElements();let fe=c;if(uf(R))return ye.none();if(Ln(R)&&N>R.childNodes.length-1&&(fe=!1),Xv(R)&&(R=g,N=0),R===g){if(fe&&(_=R.childNodes[N>0?N-1:0],_&&(uf(_)||ae[_.nodeName]||Jp(_))))return ye.none();if(R.hasChildNodes()){if(N=Math.min(!fe&&N>0?N-1:N,R.childNodes.length-1),R=R.childNodes[N],N=un(R)&&j?R.data.length:0,!r&&R===g.lastChild&&Jp(R)||NU(g,R)||uf(R)||Km(R))return ye.none();if(R.hasChildNodes()&&!Jp(R)){_=R;const ve=new Gl(R,g);do{if(cr(_)||uf(_)){E=!1;break}if(un(_)&&_.data.length>0){N=fe?0:_.data.length,R=_,E=!0;break}if(ae[_.nodeName.toLowerCase()]&&!tp(_)){N=s.nodeIndex(_),R=_.parentNode,fe||N++,E=!0;break}}while(_=fe?ve.next():ve.prev())}}}return r&&(un(R)&&N===0&&g_(s,j,r,!0,R).each(ve=>{R=ve.container(),N=ve.offset(),E=!0}),Ln(R)&&(_=R.childNodes[N],_||(_=R.childNodes[N-1]),_&&nr(_)&&!MU(_,"A")&&!uL(s,_,!1)&&!uL(s,_,!0)&&g_(s,j,r,!0,_).each(ve=>{R=ve.container(),N=ve.offset(),E=!0}))),fe&&!r&&un(R)&&N===R.data.length&&g_(s,j,r,!1,R).each(ve=>{R=ve.container(),N=ve.offset(),E=!0}),E&&R?ye.some($t(R,N)):ye.none()},b8=(s,r)=>{const c=r.collapsed,p=r.cloneRange(),g=$t.fromRangeStart(r);return FU(s,c,!0,p).each(_=>{(!c||!$t.isAbove(g,_))&&p.setStart(_.container(),_.offset())}),c||FU(s,c,!1,p).each(_=>{p.setEnd(_.container(),_.offset())}),c&&p.collapse(!0),aL(r,p)?ye.none():ye.some(p)},Uk=(s,r)=>s.splitText(r),y8=s=>{let r=s.startContainer,c=s.startOffset,p=s.endContainer,g=s.endOffset;if(r===p&&un(r)){if(c>0&&c<r.data.length)if(p=Uk(r,c),r=p.previousSibling,g>c){g=g-c;const _=Uk(p,g).previousSibling;r=p=_,g=_.data.length,c=0}else g=0}else if(un(r)&&c>0&&c<r.data.length&&(r=Uk(r,c),c=0),un(p)&&g>0&&g<p.data.length){const _=Uk(p,g).previousSibling;p=_,g=_.data.length}return{startContainer:r,startOffset:c,endContainer:p,endOffset:g}},B2=s=>({walk:(_,E)=>Xy(s,_,E),split:y8,expand:(_,E={type:"word"})=>{if(E.type==="word"){const R=h1(s,_,[{inline:"span"}],{includeTrailingSpace:!1,expandToBlock:!1}),N=s.createRng();return N.setStart(R.startContainer,R.startOffset),N.setEnd(R.endContainer,R.endOffset),N}return _},normalize:_=>b8(s,_).fold(ct,E=>(_.setStart(E.startContainer,E.startOffset),_.setEnd(E.endContainer,E.endOffset),!0))});B2.compareRanges=aL,B2.getCaretRangeFromPoint=n3,B2.getSelectedNode=wy,B2.getNode=Pn;const $U=((s,r)=>{const c=(R,N)=>{if(!Be(N)&&!N.match(/^[0-9]+$/))throw new Error(s+".set accepts only positive integer values. Value was "+N);const j=R.dom;Yh(j)&&(j.style[s]=N+"px")},p=R=>{const N=r(R);if(N<=0||N===null){const j=Oa(R,s);return parseFloat(j)||0}return N},g=p,_=(R,N)=>je(N,(j,ae)=>{const fe=Oa(R,ae),ve=fe===void 0?0:parseInt(fe,10);return isNaN(ve)?j:j+ve},0);return{set:c,get:p,getOuter:g,aggregate:_,max:(R,N,j)=>{const ae=_(R,j);return N>ae?N-ae:0}}})("height",s=>{const r=s.dom;return Yp(s)?r.getBoundingClientRect().height:r.offsetHeight}),BU=s=>$U.get(s),VU=(s,r)=>s.view(r).fold(Fe([]),p=>{const g=s.owner(p),_=VU(s,g);return[p].concat(_)}),ise=(s,r)=>{const c=r.owner(s);return VU(r,c)};var ase=Object.freeze({__proto__:null,view:s=>{var r;return(s.dom===document?ye.none():ye.from((r=s.dom.defaultView)===null||r===void 0?void 0:r.frameElement)).map(et.fromDom)},owner:s=>Kp(s)});const lse=s=>{const r=Dk(),c=cs(r),p=ise(s,ase),g=Js(s),_=Le(p,(E,R)=>{const N=Js(R);return{left:E.left+N.left,top:E.top+N.top}},{left:0,top:0});return st(_.left+g.left+c.left,_.top+g.top+c.top)},dL=s=>oo(s)==="textarea",cse=(s,r)=>s.dispatch("ScrollIntoView",r).isDefaultPrevented(),zk=(s,r)=>{s.dispatch("AfterScrollIntoView",r)},HU=(s,r)=>{const c=Il(s);if(c.length===0||dL(s))return{element:s,offset:r};if(r<c.length&&!dL(c[r]))return{element:c[r],offset:0};{const p=c[c.length-1];return dL(p)?{element:s,offset:r}:oo(p)==="img"?{element:p,offset:1}:Aa(p)?{element:p,offset:c2(p).length}:{element:p,offset:Il(p).length}}},UU=(s,r)=>{const c=ro(s),p=BU(s);return{element:s,bottom:c.top+p,height:p,pos:c,cleanup:r}},zU=(s,r)=>{const c=HU(s,r),p=et.fromHtml('<span data-mce-bogus="all" style="display: inline-block;">'+ml+"</span>");return Jc(c.element,p),UU(p,()=>ti(p))},WU=s=>UU(et.fromDom(s),Ue),jU=(s,r,c,p)=>{dse(s,(g,_)=>use(s,r,c,p),c)},ZU=(s,r,c,p,g)=>{const _={elm:p.element.dom,alignToTop:g};if(cse(s,_))return;const E=cs(r).top;c(s,r,E,p,g),zk(s,_)},use=(s,r,c,p)=>{const g=et.fromDom(s.getBody()),_=et.fromDom(s.getDoc());Al(g);const E=zU(et.fromDom(c.startContainer),c.startOffset);ZU(s,_,r,E,p),E.cleanup()},qU=(s,r,c,p)=>{const g=et.fromDom(s.getDoc());ZU(s,g,c,WU(r),p)},dse=(s,r,c)=>{const p=c.startContainer,g=c.startOffset,_=c.endContainer,E=c.endOffset;r(et.fromDom(p),et.fromDom(_));const R=s.dom.createRng();R.setStart(p,g),R.setEnd(_,E),s.selection.setRng(c)},Wk=(s,r,c,p,g)=>{const _=r.pos;if(p)Di(_.left,_.top,g);else{const E=_.top-c+r.height;Di(-s.getBody().getBoundingClientRect().left,E,g)}},fL=(s,r,c,p,g,_)=>{const E=p+c,R=g.pos.top,N=g.bottom,j=N-R>=p;R<c?Wk(s,g,p,_!==!1,r):R>E?Wk(s,g,p,j?_!==!1:_===!0,r):N>E&&!j&&Wk(s,g,p,_===!0,r)},_8=(s,r,c,p,g)=>{const _=qh(r).dom.innerHeight;fL(s,r,c,_,p,g)},GU=(s,r,c,p,g)=>{const _=qh(r).dom.innerHeight;fL(s,r,c,_,p,g);const E=lse(p.element),R=kC(window);E.top<R.y?Ra(p.element,g!==!1):E.top>R.bottom&&Ra(p.element,g===!0)},fse=(s,r,c)=>jU(s,_8,r,c),pL=(s,r,c)=>qU(s,r,_8,c),pse=(s,r,c)=>jU(s,GU,r,c),KU=(s,r,c)=>qU(s,r,GU,c),YU=(s,r,c)=>{(s.inline?pL:KU)(s,r,c)},v_=(s,r,c)=>{(s.inline?fse:pse)(s,r,c)},XU=(s,r)=>r.collapsed?s.isEditable(r.startContainer):s.isEditable(r.startContainer)&&s.isEditable(r.endContainer),JU=(s,r,c,p,g)=>{const _=c?r.startContainer:r.endContainer,E=c?r.startOffset:r.endOffset;return ye.from(_).map(et.fromDom).map(R=>!p||!r.collapsed?zm(R,g(R,E)).getOr(R):R).bind(R=>li(R)?ye.some(R):Yc(R).filter(li)).map(R=>R.dom).getOr(s)},QU=(s,r,c=!1)=>JU(s,r,!0,c,(p,g)=>Math.min(Kh(p),g)),ez=(s,r,c=!1)=>JU(s,r,!1,c,(p,g)=>g>0?g-1:g),S8=(s,r)=>{const c=s;for(;s&&un(s)&&s.length===0;)s=r?s.nextSibling:s.previousSibling;return s||c},tz=(s,r)=>{if(!r)return s;let c=r.startContainer,p=r.endContainer;const g=r.startOffset,_=r.endOffset;let E=r.commonAncestorContainer;r.collapsed||(c===p&&_-g<2&&c.hasChildNodes()&&(E=c.childNodes[g]),un(c)&&un(p)&&(c.length===g?c=S8(c.nextSibling,!0):c=c.parentNode,_===0?p=S8(p.previousSibling,!1):p=p.parentNode,c&&c===p&&(E=c)));const R=un(E)?E.parentNode:E;return rf(R)?R:s},nz=(s,r,c,p)=>{const g=[],_=s.getRoot(),E=s.getParent(c||QU(_,r,r.collapsed),s.isBlock),R=s.getParent(p||ez(_,r,r.collapsed),s.isBlock);if(E&&E!==_&&g.push(E),E&&R&&E!==R){let N;const j=new Gl(E,_);for(;(N=j.next())&&N!==R;)s.isBlock(N)&&g.push(N)}return R&&E!==R&&R!==_&&g.push(R),g},sz=(s,r,c)=>ye.from(r).bind(p=>ye.from(p.parentNode).map(g=>{const _=s.nodeIndex(p),E=s.createRng();return E.setStart(g,_),E.setEnd(g,_+1),c&&(j6(s,E,p,!0),j6(s,E,p,!1)),E})),jk=(s,r)=>Nt(r,c=>{const p=s.dispatch("GetSelectionRange",{range:c});return p.range!==c?p.range:c}),mse={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11},Zk=(s,r,c)=>{const p=c?"lastChild":"firstChild",g=c?"prev":"next";if(s[p])return s[p];if(s!==r){let _=s[g];if(_)return _;for(let E=s.parent;E&&E!==r;E=E.parent)if(_=E[g],_)return _}},hse=s=>{var r;const c=(r=s.value)!==null&&r!==void 0?r:"";if(!Jf(c))return!1;const p=s.parent;return!(p&&(p.name!=="span"||p.attr("style"))&&/^[ ]+$/.test(c))},oz=s=>{const r=s.name==="a"&&!s.attr("href")&&s.attr("id");return s.attr("name")||s.attr("id")&&!s.firstChild||s.attr("data-mce-bookmark")||r};class gd{static create(r,c){const p=new gd(r,mse[r]||1);return c&&bn(c,(g,_)=>{p.attr(_,g)}),p}constructor(r,c){this.name=r,this.type=c,c===1&&(this.attributes=[],this.attributes.map={})}replace(r){const c=this;return r.parent&&r.remove(),c.insert(r,c),c.remove(),c}attr(r,c){const p=this;if(!z(r))return he(r)&&bn(r,(_,E)=>{p.attr(E,_)}),p;const g=p.attributes;if(g){if(c!==void 0){if(c===null){if(r in g.map){delete g.map[r];let _=g.length;for(;_--;)if(g[_].name===r)return g.splice(_,1),p}return p}if(r in g.map){let _=g.length;for(;_--;)if(g[_].name===r){g[_].value=c;break}}else g.push({name:r,value:c});return g.map[r]=c,p}return g.map[r]}}clone(){const r=this,c=new gd(r.name,r.type),p=r.attributes;if(p){const g=[];g.map={};for(let _=0,E=p.length;_<E;_++){const R=p[_];R.name!=="id"&&(g[g.length]={name:R.name,value:R.value},g.map[R.name]=R.value)}c.attributes=g}return c.value=r.value,c}wrap(r){const c=this;return c.parent&&(c.parent.insert(r,c),r.append(c)),c}unwrap(){const r=this;for(let c=r.firstChild;c;){const p=c.next;r.insert(c,r,!0),c=p}r.remove()}remove(){const r=this,c=r.parent,p=r.next,g=r.prev;return c&&(c.firstChild===r?(c.firstChild=p,p&&(p.prev=null)):g&&(g.next=p),c.lastChild===r?(c.lastChild=g,g&&(g.next=null)):p&&(p.prev=g),r.parent=r.next=r.prev=null),r}append(r){const c=this;r.parent&&r.remove();const p=c.lastChild;return p?(p.next=r,r.prev=p,c.lastChild=r):c.lastChild=c.firstChild=r,r.parent=c,r}insert(r,c,p){r.parent&&r.remove();const g=c.parent||this;return p?(c===g.firstChild?g.firstChild=r:c.prev&&(c.prev.next=r),r.prev=c.prev,r.next=c,c.prev=r):(c===g.lastChild?g.lastChild=r:c.next&&(c.next.prev=r),r.next=c.next,r.prev=c,c.next=r),r.parent=g,r}getAll(r){const c=this,p=[];for(let g=c.firstChild;g;g=Zk(g,c))g.name===r&&p.push(g);return p}children(){const r=this,c=[];for(let p=r.firstChild;p;p=p.next)c.push(p);return c}empty(){const r=this;if(r.firstChild){const c=[];for(let g=r.firstChild;g;g=Zk(g,r))c.push(g);let p=c.length;for(;p--;){const g=c[p];g.parent=g.firstChild=g.lastChild=g.next=g.prev=null}}return r.firstChild=r.lastChild=null,r}isEmpty(r,c={},p){var g;const _=this;let E=_.firstChild;if(oz(_))return!1;if(E)do{if(E.type===1){if(E.attr("data-mce-bogus"))continue;if(r[E.name]||oz(E))return!1}if(E.type===8||E.type===3&&!hse(E)||E.type===3&&E.parent&&c[E.parent.name]&&Jf((g=E.value)!==null&&g!==void 0?g:"")||p&&p(E))return!1}while(E=Zk(E,_));return!0}walk(r){return Zk(this,null,r)}}const gse=Gt.makeMap("NOSCRIPT STYLE SCRIPT XMP IFRAME NOEMBED NOFRAMES PLAINTEXT"," "),rz=s=>z(s.nodeValue)&&s.nodeValue.includes(ml),iz=s=>"".concat(s.length===0?"":"".concat(Nt(s,r=>"[".concat(r,"]")).join(","),","),'[data-mce-bogus="all"]'),vse=(s,r)=>r.querySelectorAll(iz(s)),az=s=>document.createTreeWalker(s,NodeFilter.SHOW_COMMENT,r=>rz(r)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP),lz=s=>document.createTreeWalker(s,NodeFilter.SHOW_TEXT,r=>{if(rz(r)){const c=r.parentNode;return c&&Kt(gse,c.nodeName)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}else return NodeFilter.FILTER_SKIP}),bse=s=>az(s).nextNode()!==null,qk=s=>lz(s).nextNode()!==null,cz=(s,r)=>r.querySelector(iz(s))!==null,uz=(s,r)=>{Ve(vse(s,r),c=>{const p=et.fromDom(c);ql(p,"data-mce-bogus")==="all"?ti(p):Ve(s,g=>{Gp(p,g)&&gi(p,g)})})},dz=s=>{let r=s.nextNode();for(;r!==null;)r.nodeValue=null,r=s.nextNode()},yse=V(dz,az),_se=V(dz,lz),fz=(s,r)=>{const c=[{condition:He(cz,r),action:He(uz,r)},{condition:bse,action:yse},{condition:qk,action:_se}];let p=s,g=!1;return Ve(c,({condition:_,action:E})=>{_(p)&&(g||(p=s.cloneNode(!0),g=!0),E(p))}),p},pz=s=>{const r=Pc(s,"[data-mce-bogus]");Ve(r,c=>{ql(c,"data-mce-bogus")==="all"?ti(c):Mi(c)?(Jc(c,et.fromText(Jb)),ti(c)):Xp(c)})},mz=s=>{const r=Pc(s,"input");Ve(r,c=>{gi(c,"name")})},hz=(s,r)=>{const c=gl(s),p=new RegExp("^(<".concat(c,"[^>]*>( | |\\s| |<br \\/>|)<\\/").concat(c,">[\r\n]*|<br \\/>[\r\n]*)$"));return r.replace(p,"")},Sse=(s,r)=>{const c=s.getDoc(),p=Kf(et.fromDom(s.getBody())),g=et.fromTag("div",c);el(g,"data-mce-bogus","all"),no(g,{position:"fixed",left:"-9999999px",top:"0"}),S0(g,r.innerHTML),pz(g),mz(g);const _=V5(p);Ri(_,g);const E=Md(g.dom.innerText);return ti(g),E},gz=(s,r,c)=>{let p;return r.format==="raw"?p=Gt.trim(Md(fz(c,s.serializer.getTempAttrs()).innerHTML)):r.format==="text"?p=Sse(s,c):r.format==="tree"?p=s.serializer.serialize(c,r):p=hz(s,s.serializer.serialize(c,r)),r.format!=="text"&&!zu(et.fromDom(c))&&z(p)?Gt.trim(p):p},vz=(s,r)=>ye.from(s.getBody()).fold(Fe(r.format==="tree"?new gd("body",11):""),c=>gz(s,r,c)),bz=Gt.makeMap,yz=s=>{const r=[];s=s||{};const c=s.indent,p=bz(s.indent_before||""),g=bz(s.indent_after||""),_=eh.getEncodeFunc(s.entity_encoding||"raw",s.entities),E=s.element_format!=="xhtml";return{start:(R,N,j)=>{if(c&&p[R]&&r.length>0){const ae=r[r.length-1];ae.length>0&&ae!=="\n"&&r.push("\n")}if(r.push("<",R),N)for(let ae=0,fe=N.length;ae<fe;ae++){const ve=N[ae];r.push(" ",ve.name,'="',_(ve.value,!0),'"')}if(!j||E?r[r.length]=">":r[r.length]=" />",j&&c&&g[R]&&r.length>0){const ae=r[r.length-1];ae.length>0&&ae!=="\n"&&r.push("\n")}},end:R=>{let N;r.push("</",R,">"),c&&g[R]&&r.length>0&&(N=r[r.length-1],N.length>0&&N!=="\n"&&r.push("\n"))},text:(R,N)=>{R.length>0&&(r[r.length]=N?R:_(R))},cdata:R=>{r.push("<![CDATA[",R,"]]>")},comment:R=>{r.push("<!--",R,"-->")},pi:(R,N)=>{N?r.push("<?",R," ",_(N),"?>"):r.push("<?",R,"?>"),c&&r.push("\n")},doctype:R=>{r.push("<!DOCTYPE",R,">",c?"\n":"")},reset:()=>{r.length=0},getContent:()=>r.join("").replace(/\n$/,"")}},V2=(s={},r=o1())=>{const c=yz(s);return s.validate="validate"in s?s.validate:!0,{serialize:g=>{const _=s.validate,E={3:N=>{var j;c.text((j=N.value)!==null&&j!==void 0?j:"",N.raw)},8:N=>{var j;c.comment((j=N.value)!==null&&j!==void 0?j:"")},7:N=>{c.pi(N.name,N.value)},10:N=>{var j;c.doctype((j=N.value)!==null&&j!==void 0?j:"")},4:N=>{var j;c.cdata((j=N.value)!==null&&j!==void 0?j:"")},11:N=>{let j=N;if(j=j.firstChild)do R(j);while(j=j.next)}};c.reset();const R=N=>{var j;const ae=E[N.type];if(ae)ae(N);else{const fe=N.name,ve=fe in r.getVoidElements();let xe=N.attributes;if(_&&xe&&xe.length>1){const De=[];De.map={};const Oe=r.getElementRule(N.name);if(Oe){for(let Ne=0,tt=Oe.attributesOrder.length;Ne<tt;Ne++){const ut=Oe.attributesOrder[Ne];if(ut in xe.map){const gt=xe.map[ut];De.map[ut]=gt,De.push({name:ut,value:gt})}}for(let Ne=0,tt=xe.length;Ne<tt;Ne++){const ut=xe[Ne].name;if(!(ut in De.map)){const gt=xe.map[ut];De.map[ut]=gt,De.push({name:ut,value:gt})}}xe=De}}if(c.start(fe,xe,ve),k0(fe))z(N.value)&&c.text(N.value,!0),c.end(fe);else if(!ve){let De=N.firstChild;if(De){(fe==="pre"||fe==="textarea")&&De.type===3&&((j=De.value)===null||j===void 0?void 0:j[0])==="\n"&&c.text("\n",!0);do R(De);while(De=De.next)}c.end(fe)}}};return g.type===1&&!s.inner?R(g):g.type===3?E[3](g):E[11](g),c.getContent()}}},_z=new Set;Ve(["margin","margin-left","margin-right","margin-top","margin-bottom","padding","padding-left","padding-right","padding-top","padding-bottom","border","border-width","border-style","border-color","background","background-attachment","background-clip","background-image","background-origin","background-position","background-repeat","background-size","float","position","left","right","top","bottom","z-index","display","transform","width","max-width","min-width","height","max-height","min-height","overflow","overflow-x","overflow-y","text-overflow","vertical-align","transition","transition-delay","transition-duration","transition-property","transition-timing-function"],r=>{_z.add(r)});const Sz=new Set;Ve(["background-color"],r=>{Sz.add(r)});const Cz=["font","text-decoration","text-emphasis"],Cse=(s,r)=>s.parseStyle(s.getAttrib(r,"style")),b_=(s,r)=>Zs(Cse(s,r)),wse=s=>_z.has(s),Ese=s=>Sz.has(s),wz=(s,r)=>Ot(b_(s,r),c=>wse(c)),kse=(s,r)=>wz(s,r)&&Ot(b_(s,r),c=>Ese(c)),xse=s=>Bt(s,r=>Ot(Cz,c=>hr(r,c))),Tse=(s,r,c)=>{const p=b_(s,r),g=b_(s,c),_=E=>{var R,N;const j=(R=s.getStyle(r,E))!==null&&R!==void 0?R:"",ae=(N=s.getStyle(c,E))!==null&&N!==void 0?N:"";return gr(j)&&gr(ae)&&j!==ae};return Ot(p,E=>{const R=N=>Ot(N,j=>j===E);if(!R(g)&&R(Cz)){const N=xse(g);return Ot(N,_)}else return _(E)})},Ez=(s,r,c)=>ye.from(c.container()).filter(un).exists(p=>{const g=s?0:-1;return r(p.data.charAt(c.offset()+g))}),mL=He(Ez,!0,fh),hL=He(Ez,!1,fh),Ise=s=>{const r=s.container();return un(r)&&(r.data.length===0||b4(r.data)&&am.isBookmarkNode(r.parentNode))},H2=(s,r)=>c=>dh(s?0:-1,c).filter(r).isSome(),fs=s=>K5(s)&&Oa(et.fromDom(s),"display")==="block",gL=s=>cr(s)&&!ey(s),kz=H2(!0,fs),Ase=H2(!1,fs),s3=H2(!0,Kl),C8=H2(!1,Kl),xz=H2(!0,Jp),vL=H2(!1,Jp),U2=H2(!0,gL),z2=H2(!1,gL),Gk=s=>s.slice(0,-1),Tz=(s,r,c)=>Zi(r,s)?Gk(h0(s,p=>c(p)||Yo(p,r))):[],Ose=(s,r)=>Tz(s,r,ct),ov=(s,r)=>[s].concat(Ose(s,r)),Bs=(s,r,c)=>im(s,r,c,Ise),Rse=s=>r=>s.isBlock(oo(r)),zs=(s,r,c)=>pt(ov(et.fromDom(r.container()),s),Rse(c)),bL=(s,r,c,p)=>Bs(s,r.dom,c).forall(g=>zs(r,c,p).fold(()=>!pp(g,c,r.dom),_=>!pp(g,c,r.dom)&&Zi(_,et.fromDom(g.container())))),Dse=(s,r,c,p)=>zs(r,c,p).fold(()=>Bs(s,r.dom,c).forall(g=>!pp(g,c,r.dom)),g=>Bs(s,g.dom,c).isNone()),Iz=He(Dse,!1),Az=He(Dse,!0),lCe=He(bL,!1),cCe=He(bL,!0),Lse=s=>G4(s).exists(Mi),Kk=(s,r,c,p)=>{const g=Bt(ov(et.fromDom(c.container()),r),E=>p.isBlock(oo(E))),_=Po(g).getOr(r);return $d(s,_.dom,c).filter(Lse)},As=(s,r,c)=>G4(r).exists(Mi)||Kk(!0,s,r,c).isSome(),Yk=(s,r,c)=>ND(r).exists(Mi)||Kk(!1,s,r,c).isSome(),Oz=He(Kk,!1),Pse=He(Kk,!0),y_=s=>$t.isTextPosition(s)&&!s.isAtStart()&&!s.isAtEnd(),yL=(s,r,c)=>{const p=Bt(ov(et.fromDom(r.container()),s),g=>c.isBlock(oo(g)));return Po(p).getOr(s)},Rz=(s,r,c)=>y_(r)?hL(r):hL(r)||Ql(yL(s,r,c).dom,r).exists(hL),Dz=(s,r,c)=>y_(r)?mL(r):mL(r)||_c(yL(s,r,c).dom,r).exists(mL),Mse=s=>Qe(["pre","pre-wrap"],s),Xk=s=>G4(s).bind(r=>qi(r,li)).exists(r=>Mse(Oa(r,"white-space"))),Nse=(s,r)=>Ql(s.dom,r).isNone(),uCe=(s,r)=>_c(s.dom,r).isNone(),dCe=(s,r,c)=>Nse(s,r)||uCe(s,r)||Iz(s,r,c)||Az(s,r,c)||Yk(s,r,c)||As(s,r,c),Fse=s=>he(s)&&cr(s)&&ek(s),Lz=(s,r)=>c=>Fse(new Gl(c,s)[r]()),$se=(s,r)=>{const c=_c(s.dom,r).getOr(r),p=Lz(s.dom,"next");return r.isAtEnd()&&(p(r.container())||p(c.container()))},Bse=(s,r)=>{const c=Ql(s.dom,r).getOr(r),p=Lz(s.dom,"prev");return r.isAtStart()&&(p(r.container())||p(c.container()))},_L=(s,r,c)=>Xk(r)?!1:dCe(s,r,c)||Rz(s,r,c)||Dz(s,r,c),w8=(s,r,c)=>Xk(r)?!1:Iz(s,r,c)||lCe(s,r,c)||Yk(s,r,c)||Rz(s,r,c)||Bse(s,r),po=s=>{const r=s.container(),c=s.offset();return un(r)&&c<r.data.length?$t(r,c+1):s},__=(s,r,c)=>Xk(r)?!1:Az(s,r,c)||cCe(s,r,c)||As(s,r,c)||Dz(s,r,c)||$se(s,r),S_=(s,r,c)=>w8(s,r,c)||__(s,po(r),c),SL=(s,r)=>X0(s.charAt(r)),CL=(s,r)=>fh(s.charAt(r)),Pz=s=>{const r=s.container();return un(r)&&Go(r.data,Za)},Mz=s=>{const r=s.split("");return Nt(r,(c,p)=>X0(c)&&p>0&&p<r.length-1&&Gy(r[p-1])&&Gy(r[p+1])?" ":c).join("")},wL=(s,r,c,p)=>{const g=r.data,_=$t(r,0);return!c&&SL(g,0)&&!S_(s,_,p)?(r.data=" "+g.slice(1),!0):c&&CL(g,0)&&w8(s,_,p)?(r.data=Za+g.slice(1),!0):!1},Vse=s=>{const r=s.data,c=Mz(r);return c!==r?(s.data=c,!0):!1},EL=(s,r,c,p)=>{const g=r.data,_=$t(r,g.length-1);return!c&&SL(g,g.length-1)&&!S_(s,_,p)?(r.data=g.slice(0,-1)+" ",!0):c&&CL(g,g.length-1)&&__(s,_,p)?(r.data=g.slice(0,-1)+Za,!0):!1},Hse=(s,r,c)=>{const p=r.container();if(!un(p))return ye.none();if(Pz(r)){const g=wL(s,p,!1,c)||Vse(p)||EL(s,p,!1,c);return mc(g,r)}else if(S_(s,r,c)){const g=wL(s,p,!0,c)||EL(s,p,!0,c);return mc(g,r)}else return ye.none()},Use=s=>{const r=et.fromDom(s.getBody());s.selection.isCollapsed()&&Hse(r,$t.fromRangeStart(s.selection.getRng()),s.schema).each(c=>{s.selection.setRng(c.toRange())})},Nz=(s,r,c,p)=>{if(c===0)return;const g=et.fromDom(s),_=Yf(g,j=>p.isBlock(oo(j))).getOr(g),E=s.data.slice(r,r+c),R=r+c>=s.data.length&&__(_,$t(s,s.data.length),p),N=r===0&&w8(_,$t(s,0),p);s.replaceData(r,c,Qf(E,4,N,R))},Jk=(s,r,c)=>{const p=s.data.slice(r),g=p.length-xl(p).length;Nz(s,r,g,c)},kL=(s,r,c)=>{const p=s.data.slice(0,r),g=p.length-cl(p).length;Nz(s,r-g,g,c)},xL=(s,r,c,p,g=!0)=>{const _=cl(s.data).length,E=g?s:r,R=g?r:s;return g?E.appendData(R.data):E.insertData(0,R.data),ti(et.fromDom(R)),p&&Jk(E,_,c),E},zse=(s,r)=>{const c=s.container(),p=s.offset();return!$t.isTextPosition(s)&&c===r.parentNode&&p>$t.before(r).offset()},Wse=(s,r)=>zse(r,s)?$t(r.container(),r.offset()-1):r,TL=s=>un(s)?$t(s,0):$t.before(s),IL=s=>un(s)?$t(s,s.data.length):$t.after(s),Fz=s=>Su(s.previousSibling)?ye.some(IL(s.previousSibling)):s.previousSibling?gp(s.previousSibling):ye.none(),$z=s=>Su(s.nextSibling)?ye.some(TL(s.nextSibling)):s.nextSibling?sl(s.nextSibling):ye.none(),jse=(s,r)=>ye.from(r.previousSibling?r.previousSibling:r.parentNode).bind(c=>Ql(s,$t.before(c))).orThunk(()=>_c(s,$t.after(r))),Zse=(s,r)=>_c(s,$t.after(r)).orThunk(()=>Ql(s,$t.before(r))),qse=(s,r)=>Fz(r).orThunk(()=>$z(r)).orThunk(()=>jse(s,r)),Gse=(s,r)=>$z(r).orThunk(()=>Fz(r)).orThunk(()=>Zse(s,r)),Kse=(s,r,c)=>s?Gse(r,c):qse(r,c),Yse=(s,r,c)=>Kse(s,r,c).map(He(Wse,c)),AL=(s,r,c)=>{c.fold(()=>{s.focus()},p=>{s.selection.setRng(p.toRange(),r)})},Xse=s=>r=>r.dom===s,Jse=(s,r)=>r&&Kt(s.schema.getBlockElements(),oo(r)),o3=(s,r,c)=>{if(mt(s,r)){const p=et.fromHtml('<br data-mce-bogus="1">');return c?Ve(Il(r),g=>{m1(g)||ti(g)}):Zm(r),Ri(r,p),ye.some($t.before(p.dom))}else return ye.none()},Qse=(s,r,c,p)=>{const g=Um(s).filter(Aa),_=g0(s).filter(Aa);return ti(s),fo(g,_,r,(E,R,N)=>{const j=E.dom,ae=R.dom,fe=j.data.length;return xL(j,ae,c,p),N.container()===ae?$t(j,fe):N}).orThunk(()=>(p&&(g.each(E=>kL(E.dom,E.dom.length,c)),_.each(E=>Jk(E.dom,0,c))),r))},Bz=(s,r)=>Kt(s.schema.getTextInlineElements(),oo(r)),r3=(s,r,c,p=!0,g=!1)=>{const _=Yse(r,s.getBody(),c.dom),E=Yf(c,He(Jse,s),Xse(s.getBody())),R=Qse(c,_,s.schema,Bz(s,c));s.dom.isEmpty(s.getBody())?(s.setContent(""),s.selection.setCursorLocation()):E.bind(N=>o3(s.schema,N,g)).fold(()=>{p&&AL(s,r,R)},N=>{p&&AL(s,r,ye.some(N))})},eoe=/[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/,Vz=s=>eoe.test(s),W2=(s,r)=>Kc(et.fromDom(r),wu(s))&&!af(s.schema,r)&&s.dom.isEditable(r),OL=s=>{var r;return vi.DOM.getStyle(s,"direction",!0)==="rtl"||Vz((r=s.textContent)!==null&&r!==void 0?r:"")},Hz=(s,r,c)=>Bt(vi.DOM.getParents(c.container(),"*",r),s),Pl=(s,r,c)=>{const p=Hz(s,r,c);return ye.from(p[p.length-1])},toe=(s,r,c)=>{const p=uh(r,s),g=uh(c,s);return he(p)&&p===g},noe=s=>sm(s)||f2(s),lm=(s,r)=>{const c=r.container(),p=r.offset();return s?nm(c)?un(c.nextSibling)?$t(c.nextSibling,0):$t.after(c):sm(r)?$t(c,p+1):r:nm(c)?un(c.previousSibling)?$t(c.previousSibling,c.previousSibling.data.length):$t.before(c):f2(r)?$t(c,p-1):r},Uz=He(lm,!0),zz=He(lm,!1),j2=(s,r)=>{const c=p=>p.stopImmediatePropagation();s.on("beforeinput input",c,!0),s.getDoc().execCommand(r),s.off("beforeinput input",c)},soe=s=>{s.execCommand("delete")},Qk=s=>j2(s,"Delete"),Ni=s=>j2(s,"ForwardDelete"),ex=s=>r=>Zl(Yc(r),s,Yo),E8=s=>K9(s)||d2(s),tx=(s,r)=>Zi(s,r)?qi(r,E8,ex(s)):ye.none(),Z2=(s,r=!0)=>{s.dom.isEmpty(s.getBody())&&s.setContent("",{no_selection:!r})},yp=(s,r,c)=>Oi(sl(c),gp(c),(p,g)=>{const _=lm(!0,p),E=lm(!1,g),R=lm(!1,r);return s?_c(c,R).exists(N=>N.isEqual(E)&&r.isEqual(_)):Ql(c,R).exists(N=>N.isEqual(_)&&r.isEqual(E))}).getOr(!0),C_=s=>(nf(s)?Um(s):Dc(s)).bind(C_).orThunk(()=>ye.some(s)),Br=(s,r,c,p=!0)=>{var g;r.deleteContents();const _=C_(c).getOr(c),E=et.fromDom((g=s.dom.getParent(_.dom,s.dom.isBlock))!==null&&g!==void 0?g:c.dom);if(E.dom===s.getBody()?Z2(s,p):mt(s.schema,E,{checkRootAsContent:!1})&&(vg(E),p&&s.selection.setCursorLocation(E.dom,0)),!Yo(c,E)){const R=Zl(Yc(E),c)?[]:Gh(E);Ve(R.concat(Il(c)),N=>{!Yo(N,E)&&!Zi(N,E)&&mt(s.schema,N)&&ti(N)})}},k8=s=>r=>Yo(s,r),nx=s=>Pc(s,"td,th"),RL=(s,r)=>Q0(et.fromDom(s),r),sx=s=>Oi(s.startTable,s.endTable,(r,c)=>{const p=Z5(r,_=>Yo(_,c)),g=Z5(c,_=>Yo(_,r));return!p&&!g?s:{...s,startTable:p?ye.none():s.startTable,endTable:g?ye.none():s.endTable,isSameTable:!1,isMultiTable:!1}}).getOr(s),DL=s=>sx(s),LL=(s,r)=>{const c=RL(s.startContainer,r),p=RL(s.endContainer,r),g=c.isSome(),_=p.isSome(),E=Oi(c,p,Yo).getOr(!1);return DL({startTable:c,endTable:p,isStartInTable:g,isEndInTable:_,isSameTable:E,isMultiTable:!E&&g&&_})},x8=(s,r)=>({start:s,end:r}),PL=(s,r,c)=>({rng:s,table:r,cells:c}),q2=sr.generate([{singleCellTable:["rng","cell"]},{fullTable:["table"]},{partialTable:["cells","outsideDetails"]},{multiTable:["startTableCells","endTableCells","betweenRng"]}]),w_=(s,r)=>ds(et.fromDom(s),"td,th",r),ML=s=>!Yo(s.start,s.end),NL=(s,r)=>Q0(s.start,r).bind(c=>Q0(s.end,r).bind(p=>mc(Yo(c,p),c))),Wz=(s,r)=>!ML(s)&&NL(s,r).exists(c=>{const p=c.dom.rows;return p.length===1&&p[0].cells.length===1}),jz=(s,r)=>{const c=w_(s.startContainer,r),p=w_(s.endContainer,r);return Oi(c,p,x8)},Zz=s=>r=>Q0(r,s).bind(c=>jo(nx(c)).map(p=>x8(r,p))),E_=s=>r=>Q0(r,s).bind(c=>Po(nx(c)).map(p=>x8(p,r))),ox=s=>r=>NL(r,s).map(c=>PL(r,c,nx(c))),rx=(s,r,c,p)=>{if(c.collapsed||!s.forall(ML))return ye.none();if(r.isSameTable){const g=s.bind(ox(p));return ye.some({start:g,end:g})}else{const g=w_(c.startContainer,p),_=w_(c.endContainer,p),E=g.bind(Zz(p)).bind(ox(p)),R=_.bind(E_(p)).bind(ox(p));return ye.some({start:E,end:R})}},qz=(s,r)=>Vt(s,c=>Yo(c,r)),FL=s=>Oi(qz(s.cells,s.rng.start),qz(s.cells,s.rng.end),(r,c)=>s.cells.slice(r,c+1)),Gz=(s,r,c)=>s.exists(p=>Wz(p,c)&&W6(p.start,r)),$L=(s,r)=>{const{startTable:c,endTable:p}=r,g=s.cloneRange();return c.each(_=>g.setStartAfter(_.dom)),p.each(_=>g.setEndBefore(_.dom)),g},Kz=(s,r,c,p)=>rx(s,r,c,p).bind(({start:g,end:_})=>g.or(_)).bind(g=>{const{isSameTable:_}=r,E=FL(g).getOr([]);if(_&&g.cells.length===E.length)return ye.some(q2.fullTable(g.table));if(E.length>0){if(_)return ye.some(q2.partialTable(E,ye.none()));{const R=$L(c,r);return ye.some(q2.partialTable(E,ye.some({...r,rng:R})))}}else return ye.none()}),ix=(s,r,c,p)=>rx(s,r,c,p).bind(({start:g,end:_})=>{const E=g.bind(FL).getOr([]),R=_.bind(FL).getOr([]);if(E.length>0&&R.length>0){const N=$L(c,r);return ye.some(q2.multiTable(E,R,N))}else return ye.none()}),Yz=(s,r)=>{const c=k8(s),p=jz(r,c),g=LL(r,c);return Gz(p,r,c)?p.map(_=>q2.singleCellTable(r,_.start)):g.isMultiTable?ix(p,g,r,c):Kz(p,g,r,c)},BL=s=>Ve(s,r=>{gi(r,"contenteditable"),vg(r)}),Xz=(s,r)=>ye.from(s.dom.getParent(r,s.dom.isBlock)).map(et.fromDom),Jz=(s,r,c)=>{c.each(p=>{r?ti(p):(vg(p),s.selection.setCursorLocation(p.dom,0))})},ax=(s,r,c,p)=>{const g=c.cloneRange();p?(g.setStart(c.startContainer,c.startOffset),g.setEndAfter(r.dom.lastChild)):(g.setStartBefore(r.dom.firstChild),g.setEnd(c.endContainer,c.endOffset)),lx(s,g,r,!1).each(_=>_())},VL=s=>{const r=J0(s),c=et.fromDom(s.selection.getNode());Da(c.dom)&&mt(s.schema,c)?s.selection.setCursorLocation(c.dom,0):s.selection.collapse(!0),r.length>1&&Ot(r,p=>Yo(p,c))&&el(c,"data-mce-selected","1")},HL=(s,r,c)=>ye.some(()=>{const p=s.selection.getRng(),g=c.bind(({rng:_,isStartInTable:E})=>{const R=Xz(s,E?_.endContainer:_.startContainer);_.deleteContents(),Jz(s,E,R.filter(He(mt,s.schema)));const N=E?r[0]:r[r.length-1];return ax(s,N,p,E),mt(s.schema,N)?ye.none():ye.some(E?r.slice(1):r.slice(0,-1))}).getOr(r);BL(g),VL(s)}),Qz=(s,r,c,p)=>ye.some(()=>{const g=s.selection.getRng(),_=r[0],E=c[c.length-1];ax(s,_,g,!0),ax(s,E,g,!1);const R=mt(s.schema,_)?r:r.slice(1),N=mt(s.schema,E)?c:c.slice(0,-1);BL(R.concat(N)),p.deleteContents(),VL(s)}),lx=(s,r,c,p=!0)=>ye.some(()=>{Br(s,r,c,p)}),eW=(s,r)=>ye.some(()=>r3(s,!1,r)),UL=(s,r,c)=>Yz(r,c).bind(p=>p.fold(He(lx,s),He(eW,s),He(HL,s),He(Qz,s))),tW=(s,r)=>T8(s,r),nW=(s,r,c,p)=>cx(r,p).fold(()=>UL(s,r,c),g=>tW(s,g)),sW=(s,r,c)=>{const p=et.fromDom(s.getBody()),g=s.selection.getRng();return c.length!==0?HL(s,c,ye.none()):nW(s,p,g,r)},zL=(s,r)=>pt(ov(r,s),Uu),cx=(s,r)=>pt(ov(r,s),qf("caption")),oW=(s,r,c,p,g)=>xg(c,s.getBody(),g).bind(_=>zL(r,et.fromDom(_.getNode())).bind(E=>Yo(E,p)?ye.none():ye.some(Ue))),T8=(s,r)=>ye.some(()=>{vg(r),s.selection.setCursorLocation(r.dom,0)}),WL=(s,r,c,p)=>sl(s.dom).bind(g=>gp(s.dom).map(_=>r?c.isEqual(g)&&p.isEqual(_):c.isEqual(_)&&p.isEqual(g))).getOr(!0),ux=(s,r)=>T8(s,r),rW=(s,r,c)=>cx(s,et.fromDom(c.getNode())).fold(()=>ye.some(Ue),p=>mc(!Yo(p,r),Ue)),ooe=(s,r,c,p,g)=>xg(c,s.getBody(),g).fold(()=>ye.some(Ue),_=>WL(p,c,g,_)?ux(s,p):rW(r,p,_)),iW=(s,r,c,p)=>{const g=$t.fromRangeStart(s.selection.getRng());return zL(c,p).bind(_=>mt(s.schema,_,{checkRootAsContent:!1})?T8(s,_):oW(s,c,r,_,g))},dx=(s,r,c,p)=>{const g=$t.fromRangeStart(s.selection.getRng());return mt(s.schema,p)?T8(s,p):ooe(s,c,r,p,g)},fx=(s,r)=>s?xz(r):vL(r),I8=(s,r)=>{const c=$t.fromRangeStart(s.selection.getRng());return fx(r,c)||$d(r,s.getBody(),c).exists(p=>fx(r,p))},jL=(s,r,c)=>{const p=et.fromDom(s.getBody());return cx(p,c).fold(()=>iW(s,r,p,c).orThunk(()=>mc(I8(s,r),Ue)),g=>dx(s,r,p,g))},px=(s,r)=>{const c=et.fromDom(s.selection.getStart(!0)),p=J0(s);return s.selection.isCollapsed()&&p.length===0?jL(s,r,c):sW(s,c,p)},gh=(s,r)=>{let c=r;for(;c&&c!==s;){if(Zt(c)||cr(c))return c;c=c.parentNode}return null},ZL=["data-ephox-","data-mce-","data-alloy-","data-snooker-","_"],qL=Gt.each,G2=s=>{const r=s.dom,c=new Set(s.serializer.getTempAttrs()),p=(_,E)=>{if(_.nodeName!==E.nodeName||_.nodeType!==E.nodeType)return!1;const R=j=>{const ae={};return qL(r.getAttribs(j),fe=>{const ve=fe.nodeName.toLowerCase();ve!=="style"&&!g(ve)&&(ae[ve]=r.getAttrib(j,ve))}),ae},N=(j,ae)=>{for(const fe in j)if(Kt(j,fe)){const ve=ae[fe];if(ge(ve)||j[fe]!==ve)return!1;delete ae[fe]}for(const fe in ae)if(Kt(ae,fe))return!1;return!0};return Ln(_)&&Ln(E)&&(!N(R(_),R(E))||!N(r.parseStyle(r.getAttrib(_,"style")),r.parseStyle(r.getAttrib(E,"style"))))?!1:!hd(_)&&!hd(E)},g=_=>Ot(ZL,E=>hr(_,E))||c.has(_);return{compare:p,isAttributeInternal:g}},rv=s=>["h1","h2","h3","h4","h5","h6"].includes(s.name),aW=s=>s.name==="summary",roe=(s,r)=>{let c=s;for(;c=c.walk();)r(c)},lW=(s,r,c,p)=>{const g=c.name;for(let _=0,E=s.length;_<E;_++){const R=s[_];if(R.name===g){const N=p.nodes[g];N?N.nodes.push(c):p.nodes[g]={filter:R,nodes:[c]}}}if(c.attributes)for(let _=0,E=r.length;_<E;_++){const R=r[_],N=R.name;if(N in c.attributes.map){const j=p.attributes[N];j?j.nodes.push(c):p.attributes[N]={filter:R,nodes:[c]}}}},cW=(s,r,c)=>{const p={nodes:{},attributes:{}};return c.firstChild&&roe(c,g=>{lW(s,r,g,p)}),p},GL=(s,r)=>{const c=(p,g)=>{bn(p,_=>{const E=Mo(_.nodes);Ve(_.filter.callbacks,R=>{for(let N=E.length-1;N>=0;N--){const j=E[N];(!(g?j.attr(_.filter.name)!==void 0:j.name===_.filter.name)||de(j.parent))&&E.splice(N,1)}E.length>0&&R(E,_.filter.name,r)})})};c(s.nodes,!1),c(s.attributes,!0)},KL=(s,r,c,p={})=>{const g=cW(s,r,c);GL(g,p)},YL=(s,r,c,p)=>{if((s.pad_empty_with_br||r.insert)&&c(p)){const _=new gd("br",1);r.insert&&_.attr("data-mce-bogus","1"),p.empty().append(_)}else p.empty().append(new gd("#text",3)).value=Za},K2=s=>{var r;return Y2(s,"#text")&&((r=s==null?void 0:s.firstChild)===null||r===void 0?void 0:r.value)===Za},Y2=(s,r)=>{const c=s==null?void 0:s.firstChild;return he(c)&&c===s.lastChild&&c.name===r},fCe=(s,r)=>{const c=s.getElementRule(r.name);return(c==null?void 0:c.paddEmpty)===!0},_l=(s,r,c,p)=>p.isEmpty(r,c,g=>fCe(s,g)),ioe=(s,r)=>he(s)&&(r(s)||s.name==="br"),aoe=s=>{let r;for(let c=s;c;c=c.parent){const p=c.attr("contenteditable");if(p==="false")break;p==="true"&&(r=c)}return ye.from(r)},b1=(s,r,c=s.parent)=>{if(r.getSpecialElements()[s.name])s.empty().remove();else{const p=s.children();for(const g of p)c&&!r.isValidChild(c.name,g.name)&&b1(g,r,c);s.unwrap()}},or=(s,r,c,p=Ue)=>{const g=r.getTextBlockElements(),_=r.getNonEmptyElements(),E=r.getWhitespaceElements(),R=Gt.makeMap("tr,td,th,tbody,thead,tfoot,table,summary"),N=new Set,j=ae=>ae!==c&&!R[ae.name];for(let ae=0;ae<s.length;ae++){const fe=s[ae];let ve,xe,De;if(!fe.parent||N.has(fe))continue;if(g[fe.name]&&fe.parent.name==="li"){let Ne=fe.next;for(;Ne&&g[Ne.name];){Ne.name="li",N.add(Ne),fe.parent.insert(Ne,fe.parent);Ne=Ne.next}fe.unwrap();continue}const Oe=[fe];for(ve=fe.parent;ve&&!r.isValidChild(ve.name,fe.name)&&j(ve);ve=ve.parent)Oe.push(ve);if(ve&&Oe.length>1)if(XL(r,fe,ve))b1(fe,r);else{Oe.reverse(),xe=Oe[0].clone(),p(xe);let Ne=xe;for(let tt=0;tt<Oe.length-1;tt++){r.isValidChild(Ne.name,Oe[tt].name)&&tt>0?(De=Oe[tt].clone(),p(De),Ne.append(De)):De=Ne;for(let ut=Oe[tt].firstChild;ut&&ut!==Oe[tt+1];){const gt=ut.next;De.append(ut),ut=gt}Ne=De}_l(r,_,E,xe)?ve.insert(fe,Oe[0],!0):(ve.insert(xe,Oe[0],!0),ve.insert(fe,xe)),ve=Oe[0],(_l(r,_,E,ve)||Y2(ve,"br"))&&ve.empty().remove()}else if(fe.parent){if(fe.name==="li"){let Ne=fe.prev;if(Ne&&(Ne.name==="ul"||Ne.name==="ol")){Ne.append(fe);continue}if(Ne=fe.next,Ne&&(Ne.name==="ul"||Ne.name==="ol")&&Ne.firstChild){Ne.insert(fe,Ne.firstChild,!0);continue}const tt=new gd("ul",1);p(tt),fe.wrap(tt);continue}if(r.isValidChild(fe.parent.name,"div")&&r.isValidChild("div",fe.name)){const Ne=new gd("div",1);p(Ne),fe.wrap(Ne)}else b1(fe,r)}}},pCe=(s,r)=>{let c=s;for(;c;){if(c.name===r)return!0;c=c.parent}return!1},XL=(s,r,c=r.parent)=>c?s.children[r.name]&&!s.isValidChild(c.name,r.name)||r.name==="a"&&pCe(c,"a")?!0:aW(c)&&rv(r)?!((c==null?void 0:c.firstChild)===r&&(c==null?void 0:c.lastChild)===r):!1:!1,loe=(s,r,c,p)=>{const g=document.createRange();return g.setStart(s,r),g.setEnd(c,p),g},si=s=>{const r=$t.fromRangeStart(s),c=$t.fromRangeEnd(s),p=s.commonAncestorContainer;return $d(!1,p,c).map(g=>!pp(r,c,p)&&pp(r,g,p)?loe(r.container(),r.offset(),g.container(),g.offset()):s).getOr(s)},mx=s=>s.collapsed?s:si(s),A8=s=>he(s.firstChild)&&s.firstChild===s.lastChild,O8=s=>s.name==="br"||s.value===Za,R8=(s,r)=>s.getBlockElements()[r.name]&&A8(r)&&O8(r.firstChild),D8=(s,r)=>{const c=s.getNonEmptyElements();return he(r)&&(r.isEmpty(c)||R8(s,r))},uW=(s,r)=>{let c=r.firstChild,p=r.lastChild;return c&&c.name==="meta"&&(c=c.next),p&&p.attr("id")==="mce_marker"&&(p=p.prev),D8(s,p)&&(p=p==null?void 0:p.prev),!c||c!==p?!1:c.name==="ul"||c.name==="ol"},mCe=s=>{var r,c;const p=s.firstChild,g=s.lastChild;return p&&p.nodeName==="META"&&((r=p.parentNode)===null||r===void 0||r.removeChild(p)),g&&g.id==="mce_marker"&&((c=g.parentNode)===null||c===void 0||c.removeChild(g)),s},hCe=(s,r,c)=>{const p=r.serialize(c),g=s.createFragment(p);return mCe(g)},gCe=s=>{var r;return Bt((r=s==null?void 0:s.childNodes)!==null&&r!==void 0?r:[],c=>c.nodeName==="LI")},vCe=s=>s.data===Za||nr(s),coe=s=>he(s==null?void 0:s.firstChild)&&s.firstChild===s.lastChild&&vCe(s.firstChild),bCe=s=>!s.firstChild||coe(s),uoe=s=>s.length>0&&bCe(s[s.length-1])?s.slice(0,-1):s,JL=(s,r)=>{const c=s.getParent(r,s.isBlock);return c&&c.nodeName==="LI"?c:null},yCe=(s,r)=>!!JL(s,r),doe=(s,r)=>{const c=r.cloneRange(),p=r.cloneRange();return c.setStartBefore(s),p.setEndAfter(s),[c.cloneContents(),p.cloneContents()]},Yi=(s,r)=>{const c=$t.before(s),g=Fd(r).next(c);return g?g.toRange():null},QL=(s,r)=>{const c=$t.after(s),g=Fd(r).prev(c);return g?g.toRange():null},dW=(s,r,c,p)=>{const g=doe(s,p),_=s.parentNode;return _&&(_.insertBefore(g[0],s),Gt.each(r,E=>{_.insertBefore(E,s)}),_.insertBefore(g[1],s),_.removeChild(s)),QL(r[r.length-1],c)},foe=(s,r,c)=>{const p=s.parentNode;return p&&Gt.each(r,g=>{p.insertBefore(g,s)}),Yi(s,c)},poe=(s,r,c,p)=>(p.insertAfter(r.reverse(),s),QL(r[0],c)),moe=(s,r,c,p)=>{const g=hCe(r,s,p),_=JL(r,c.startContainer),E=uoe(gCe(g.firstChild)),R=1,N=2,j=r.getRoot(),ae=fe=>{const ve=$t.fromRangeStart(c),xe=Fd(r.getRoot()),De=fe===R?xe.prev(ve):xe.next(ve),Oe=De==null?void 0:De.getNode();return Oe?JL(r,Oe)!==_:!0};return _?ae(R)?foe(_,E,j):ae(N)?poe(_,E,j,r):dW(_,E,j,c):null},gf=["pre"],vh=(s,r,c,p)=>{var g;const _=r.firstChild,E=r.lastChild,R=E.attr("data-mce-type")==="bookmark"?E.prev:E,N=_===R,j=Qe(gf,_.name);if(N&&j){const ae=_.attr("contenteditable")!=="false",fe=((g=s.getParent(c,s.isBlock))===null||g===void 0?void 0:g.nodeName.toLowerCase())===_.name,ve=ye.from(gh(p,c)).forall(Zt);return ae&&fe&&ve}else return!1},hx=Da,eP=(s,r,c)=>{if(he(c)){const p=s.getParent(r.endContainer,hx);return c===p&&W6(et.fromDom(c),r)}else return!1},tP=(s,r)=>{if(s.isBlock(r)&&s.isEditable(r)){const c=r.childNodes;return c.length===1&&nr(c[0])||c.length===0}else return!1},gx=(s,r,c)=>{var p;c.getAttribute("data-mce-bogus")==="all"?(p=c.parentNode)===null||p===void 0||p.insertBefore(s.dom.createFragment(r),c):tP(s.dom,c)?s.dom.setHTML(c,r):s.selection.setContent(r,{no_events:!0})},hoe=(s,r,c)=>{ye.from(s.getParent(r,"td,th")).map(et.fromDom).each(p=>BR(p,c))},fW=(s,r)=>{const c=s.schema.getTextInlineElements(),p=s.dom;if(r){const g=s.getBody(),_=G2(s),E="*[data-mce-fragment]",R=p.select(E);Gt.each(R,N=>{const j=ve=>he(c[ve.nodeName.toLowerCase()]),ae=ve=>ve.childNodes.length===1;if((ve=>!(wz(p,ve)||kse(p,ve)))(N)&&j(N)&&ae(N)){const ve=b_(p,N),xe=(tt,ut)=>ts(tt,gt=>Qe(ut,gt)),De=tt=>ae(N)&&p.is(tt,E)&&j(tt)&&(tt.nodeName===N.nodeName&&xe(ve,b_(p,tt))||De(tt.children[0])),Oe=tt=>he(tt)&&tt!==g&&(_.compare(N,tt)||Oe(tt.parentElement)),Ne=tt=>he(tt)&&tt!==g&&p.is(tt,E)&&(Tse(p,N,tt)||Ne(tt.parentElement));(De(N.children[0])||Oe(N.parentElement)&&!Ne(N.parentElement))&&p.remove(N,!0)}})}},L8=s=>{let r=s;for(;r=r.walk();)r.type===1&&r.attr("data-mce-fragment","1")},goe=s=>{Gt.each(s.getElementsByTagName("*"),r=>{r.removeAttribute("data-mce-fragment")})},vx=s=>!!s.getAttribute("data-mce-fragment"),nP=(s,r)=>he(r)&&!s.schema.getVoidElements()[r.nodeName],pW=(s,r)=>{var c,p,g;let _;const E=s.dom,R=s.selection;if(!r)return;R.scrollIntoView(r);const N=gh(s.getBody(),r);if(N&&E.getContentEditable(N)==="false"){E.remove(r),R.select(N);return}let j=E.createRng();const ae=r.previousSibling;if(un(ae)){j.setStart(ae,(p=(c=ae.nodeValue)===null||c===void 0?void 0:c.length)!==null&&p!==void 0?p:0);const xe=r.nextSibling;un(xe)&&(ae.appendData(xe.data),(g=xe.parentNode)===null||g===void 0||g.removeChild(xe))}else j.setStartBefore(r),j.setEndBefore(r);const fe=xe=>{let De=$t.fromRangeStart(xe);return De=Fd(s.getBody()).next(De),De==null?void 0:De.toRange()},ve=E.getParent(r,E.isBlock);if(E.remove(r),ve&&E.isEmpty(ve)){const xe=hx(ve);Zm(et.fromDom(ve)),j.setStart(ve,0),j.setEnd(ve,0),!xe&&!vx(ve)&&(_=fe(j))?(j=_,E.remove(ve)):E.add(ve,E.create("br",xe?{}:{"data-mce-bogus":"1"}))}R.setRng(j)},P8=s=>{const r=s.dom,c=mx(s.selection.getRng());s.selection.setRng(c);const p=r.getParent(c.startContainer,hx);eP(r,c,p)?lx(s,c,et.fromDom(p)):c.startContainer===c.endContainer&&c.endOffset-c.startOffset===1&&un(c.startContainer.childNodes[c.startOffset])?c.deleteContents():s.getDoc().execCommand("Delete",!1)},voe=s=>{for(let r=s;r;r=r.walk())if(r.attr("id")==="mce_marker")return ye.some(r);return ye.none()},boe=(s,r,c)=>{var p;return Ot(c.children(),rv)&&((p=s.getParent(r,s.isBlock))===null||p===void 0?void 0:p.nodeName)==="SUMMARY"},y1=(s,r,c)=>{var p,g;const _=s.selection,E=s.dom,R=s.parser,N=c.merge,j=V2({validate:!0},s.schema),ae='<span id="mce_marker" data-mce-type="bookmark"></span>';c.preserve_zwsp||(r=Md(r)),r.indexOf("{$caret}")===-1&&(r+="{$caret}"),r=r.replace(/\{\$caret\}/,ae);let fe=_.getRng();const ve=fe.startContainer,xe=s.getBody();ve===xe&&_.isCollapsed()&&E.isBlock(xe.firstChild)&&nP(s,xe.firstChild)&&E.isEmpty(xe.firstChild)&&(fe=E.createRng(),fe.setStart(xe.firstChild,0),fe.setEnd(xe.firstChild,0),_.setRng(fe)),_.isCollapsed()||P8(s);const De=_.getNode(),Oe={context:De.nodeName.toLowerCase(),data:c.data,insert:!0},Ne=R.parse(r,Oe);if(c.paste===!0&&uW(s.schema,Ne)&&yCe(E,De))return fe=moe(j,E,_.getRng(),Ne),fe&&_.setRng(fe),r;c.paste===!0&&vh(E,Ne,De,s.getBody())&&((p=Ne.firstChild)===null||p===void 0||p.unwrap()),L8(Ne);let tt=Ne.lastChild;if(tt&&tt.attr("id")==="mce_marker"){const ut=tt;for(tt=tt.prev;tt&&tt.name!=="table";tt=tt.walk(!0))if(tt.type===3||!E.isBlock(tt.name)){tt.parent&&s.schema.isValidChild(tt.parent.name,"span")&&tt.parent.insert(ut,tt,tt.name==="br");break}}if(s._selectionOverrides.showBlockCaretContainer(De),!Oe.invalid&&!boe(E,De,Ne))r=j.serialize(Ne),gx(s,r,De);else{s.selection.setContent(ae);let ut=_.getNode(),gt;const Tt=s.getBody();for(Xv(ut)?ut=gt=Tt:gt=ut;gt&>!==Tt;)ut=gt,gt=gt.parentNode;r=ut===Tt?Tt.innerHTML:E.getOuterHTML(ut);const Jt=R.parse(r),vn=voe(Jt),qn=vn.bind(aoe).getOr(Jt);vn.each(Bn=>Bn.replace(Ne));const Ut=Ne.children(),Et=(g=Ne.parent)!==null&&g!==void 0?g:Jt;Ne.unwrap();const Qt=Bt(Ut,Bn=>XL(s.schema,Bn,Et));or(Qt,s.schema,qn),KL(R.getNodeFilters(),R.getAttributeFilters(),Jt),r=j.serialize(Jt),ut===Tt?E.setHTML(Tt,r):E.setOuterHTML(ut,r)}return fW(s,N),pW(s,E.get("mce_marker")),goe(s.getBody()),hoe(E,_.getStart(),s.schema),Qh(s.schema,s.getBody(),_.getStart()),r},Ku=s=>s instanceof gd,M8=s=>{mn(s)&&sl(s.getBody()).each(r=>{const c=r.getNode(),p=Jp(c)?sl(c).getOr(r):r;s.selection.setRng(p.toRange())})},vd=(s,r,c)=>{s.dom.setHTML(s.getBody(),r),c!==!0&&M8(s)},yoe=(s,r,c,p)=>{if(c=Md(c),c.length===0||/^\s+$/.test(c)){const g='<br data-mce-bogus="1">';r.nodeName==="TABLE"?c="<tr><td>"+g+"</td></tr>":/^(UL|OL)$/.test(r.nodeName)&&(c="<li>"+g+"</li>");const _=gl(s);return s.schema.isValidChild(r.nodeName.toLowerCase(),_.toLowerCase())?(c=g,c=s.dom.createHTML(_,ff(s),c)):c||(c=g),vd(s,c,p.no_selection),{content:c,html:c}}else{p.format!=="raw"&&(c=V2({validate:!1},s.schema).serialize(s.parser.parse(c,{isRootContent:!0,insert:!0})));const g=zu(et.fromDom(r))?c:Gt.trim(c);return vd(s,g,p.no_selection),{content:g,html:g}}},ui=(s,r,c,p)=>{KL(s.parser.getNodeFilters(),s.parser.getAttributeFilters(),c);const g=V2({validate:!1},s.schema).serialize(c),_=Md(zu(et.fromDom(r))?g:Gt.trim(g));return vd(s,_,p.no_selection),{content:c,html:_}},_oe=(s,r,c)=>ye.from(s.getBody()).map(p=>Ku(r)?ui(s,p,r,c):yoe(s,p,r,c)).getOr({content:r,html:Ku(c.content)?"":c.content}),X2=s=>ie(s)?s:ct,N8=(s,r,c)=>{let p=s.dom;const g=X2(c);for(;p.parentNode;){p=p.parentNode;const _=et.fromDom(p),E=r(_);if(E.isSome())return E;if(g(_))break}return ye.none()},bx=(s,r,c)=>{const p=r(s),g=X2(c);return p.orThunk(()=>g(s)?ye.none():N8(s,r,g))},F8=Vd,yx=(s,r,c)=>{const p=s.formatter.get(c);if(p)for(let g=0;g<p.length;g++){const _=p[g];if(pf(_)&&_.inherit===!1&&s.dom.is(r,_.selector))return!0}return!1},sP=(s,r,c,p,g)=>{const _=s.dom.getRoot();if(r===_)return!1;const E=s.dom.getParent(r,R=>yx(s,R,c)?!0:R.parentNode===_||!!_1(s,R,c,p,!0));return!!_1(s,E,c,p,g)},k_=(s,r,c)=>vl(c)&&F8(r,c.inline)||ph(c)&&F8(r,c.block)?!0:pf(c)?Ln(r)&&s.is(r,c.selector):!1,mW=(s,r,c,p,g,_)=>{const E=c[p],R=p==="attributes";if(ie(c.onmatch))return c.onmatch(r,c,p);if(E){if(uc(E)){for(let N=0;N<E.length;N++)if(R?s.getAttrib(r,E[N]):tv(s,r,E[N]))return!0}else for(const N in E)if(Kt(E,N)){const j=R?s.getAttrib(r,N):tv(s,r,N),ae=Ca(E[N],_),fe=de(j)||hi(j);if(fe&&de(ae))continue;if(g&&fe&&!c.exact||(!g||c.exact)&&!F8(j,o_(ae,N)))return!1}}return!0},_1=(s,r,c,p,g)=>{const _=s.formatter.get(c),E=s.dom;if(_&&Ln(r))for(let R=0;R<_.length;R++){const N=_[R];if(k_(s.dom,r,N)&&mW(E,r,N,"attributes",g,p)&&mW(E,r,N,"styles",g,p)){const j=N.classes;if(j){for(let ae=0;ae<j.length;ae++)if(!s.dom.hasClass(r,Ca(j[ae],p)))return}return N}}},_x=(s,r,c,p,g)=>{if(p)return sP(s,p,r,c,g);if(p=s.selection.getNode(),sP(s,p,r,c,g))return!0;const _=s.selection.getStart();return!!(_!==p&&sP(s,_,r,c,g))},oP=(s,r,c)=>{const p=[],g={},_=s.selection.getStart();return s.dom.getParent(_,E=>{for(let R=0;R<r.length;R++){const N=r[R];!g[N]&&_1(s,E,N,c)&&(g[N]=!0,p.push(N))}},s.dom.getRoot()),p},hW=(s,r)=>{const c=g=>Yo(g,et.fromDom(s.getBody())),p=(g,_)=>_1(s,g.dom,_)?ye.some(_):ye.none();return ye.from(s.selection.getStart(!0)).bind(g=>bx(et.fromDom(g),_=>Do(r,E=>p(_,E)),c)).getOrNull()},Sx=(s,r)=>{const c=s.formatter.get(r),p=s.dom;if(c&&s.selection.isEditable()){const g=s.selection.getStart(),_=i_(p,g);for(let E=c.length-1;E>=0;E--){const R=c[E];if(!pf(R))return!0;for(let N=_.length-1;N>=0;N--)if(p.is(_[N],R.selector))return!0}}return!1},Soe=(s,r,c)=>je(c,(p,g)=>{const _=kk(s,g);return s.formatter.matchNode(r,g,{},_)?p.concat([g]):p},[]),$8=ml,Coe=(s,r)=>s.importNode(r,!0),gW=s=>{if(s){const r=new Gl(s,s);for(let c=r.current();c;c=r.next())if(un(c))return c}return null},rP=s=>{const r=et.fromTag("span");return Tl(r,{id:Q4,"data-mce-bogus":"1","data-mce-type":"format-caret"}),s&&Ri(r,et.fromText($8)),r},vW=s=>{const r=gW(s);return r&&r.data.charAt(0)===$8&&r.deleteData(0,1),r},iP=(s,r,c)=>{const p=s.dom,g=s.selection;if(mh(r))r3(s,!1,et.fromDom(r),c,!0);else{const _=g.getRng(),E=p.getParent(r,p.isBlock),R=_.startContainer,N=_.startOffset,j=_.endContainer,ae=_.endOffset,fe=vW(r);p.remove(r,!0),R===fe&&N>0&&_.setStart(fe,N-1),j===fe&&ae>0&&_.setEnd(fe,ae-1),E&&p.isEmpty(E)&&vg(et.fromDom(E)),g.setRng(_)}},aP=(s,r,c)=>{const p=s.dom,g=s.selection;if(r)iP(s,r,c);else if(r=Y0(s.getBody(),g.getStart()),!r)for(;r=p.get(Q4);)iP(s,r,c)},bW=(s,r,c)=>{var p,g;const _=s.dom,E=_.getParent(c,He(G6,s.schema));E&&_.isEmpty(E)?(p=c.parentNode)===null||p===void 0||p.replaceChild(r,c):(P0(et.fromDom(c)),_.isEmpty(c)?(g=c.parentNode)===null||g===void 0||g.replaceChild(r,c):_.insertAfter(r,c))},yW=(s,r)=>(s.appendChild(r),r),lP=(s,r)=>{var c;const p=Le(s,(_,E)=>yW(_,E.cloneNode(!1)),r),g=(c=p.ownerDocument)!==null&&c!==void 0?c:document;return yW(p,g.createTextNode($8))},B8=(s,r,c,p,g,_)=>{const E=s.formatter,R=s.dom,N=Bt(Zs(E.get()),fe=>fe!==p&&!Go(fe,"removeformat")),j=Soe(s,c,N);if(Bt(j,fe=>!WD(s,fe,p)).length>0){const fe=c.cloneNode(!1);return R.add(r,fe),E.remove(p,g,fe,_),R.remove(fe),ye.some(fe)}else return ye.none()},_W=s=>G9(s,c2(s).replace(new RegExp("".concat(Za,"$"))," ")),SW=(s,r)=>{const c=()=>{r!==null&&!s.dom.isEmpty(r)&&Um(et.fromDom(r)).each(p=>{Aa(p)?_W(p):b0(p,g=>Aa(g)).each(g=>{Aa(g)&&_W(g)})})};s.once("input",p=>{p.data&&!fh(p.data)&&(p.isComposing?s.once("compositionend",()=>{c()}):c())})},CW=(s,r,c)=>{let p;const g=s.selection,_=s.formatter.get(r);if(!_)return;const E=g.getRng();let R=E.startOffset;const j=E.startContainer.nodeValue;p=Y0(s.getBody(),g.getStart());const ae=/[^\s\u00a0\u00ad\u200b\ufeff]/;if(j&&R>0&&R<j.length&&ae.test(j.charAt(R))&&ae.test(j.charAt(R-1))){const fe=g.getBookmark();E.collapse(!0);let ve=h1(s.dom,E,_);ve=y8(ve),s.formatter.apply(r,c,ve),g.moveToBookmark(fe)}else{let fe=p?gW(p):null;(!p||(fe==null?void 0:fe.data)!==$8)&&(p=Coe(s.getDoc(),rP(!0).dom),fe=p.firstChild,E.insertNode(p),R=1,SW(s,p)),s.formatter.apply(r,c,p),g.setCursorLocation(fe,R)}},wW=(s,r,c,p)=>{const g=s.dom,_=s.selection;let E=!1;const R=s.formatter.get(r);if(!R)return;const N=_.getRng(),j=N.startContainer,ae=N.startOffset;let fe=j;un(j)&&(ae!==j.data.length&&(E=!0),fe=fe.parentNode);const ve=[];let xe;for(;fe;){if(_1(s,fe,r,c,p)){xe=fe;break}fe.nextSibling&&(E=!0),ve.push(fe),fe=fe.parentNode}if(xe)if(E){const De=_.getBookmark();N.collapse(!0);let Oe=h1(g,N,R,{includeTrailingSpace:!0});Oe=y8(Oe),s.formatter.remove(r,c,Oe,p),_.moveToBookmark(De)}else{const De=Y0(s.getBody(),xe),Oe=he(De)?g.getParents(xe.parentNode,Ht,De):[],Ne=rP(!1).dom;bW(s,Ne,De!=null?De:xe);const tt=B8(s,Ne,xe,r,c,p),ut=lP([...ve,...tt.toArray(),...Oe],Ne);De&&iP(s,De,he(De)),_.setCursorLocation(ut,1),SW(s,Ne),g.isEmpty(xe)&&g.remove(xe)}},woe=(s,r,c)=>{const p=s.selection,g=s.getBody();aP(s,null,c),(r===8||r===46)&&p.isCollapsed()&&p.getStart().innerHTML===$8&&aP(s,Y0(g,p.getStart()),!0),(r===37||r===39)&&aP(s,Y0(g,p.getStart()),!0)},EW=s=>un(s)&&Ai(s.data,Za),cm=s=>{s.on("mouseup keydown",r=>{woe(s,r.keyCode,EW(s.selection.getRng().endContainer))})},kW=s=>{const r=rP(!1),c=lP(s,r.dom);return{caretContainer:r,caretPosition:$t(c,0)}},cP=(s,r)=>{const{caretContainer:c,caretPosition:p}=kW(r);return Jc(et.fromDom(s),c),ti(et.fromDom(s)),p},uP=(s,r)=>{const{caretContainer:c,caretPosition:p}=kW(r);return s.insertNode(c.dom),p},Cx=(s,r)=>{if(Bd(r.dom))return!1;const c=s.schema.getTextInlineElements();return Kt(c,oo(r))&&!Bd(r.dom)&&!E0(r.dom)},x_={},dP=ep(["pre"]),Eoe=(s,r)=>{x_[s]||(x_[s]=[]),x_[s].push(r)},koe=(s,r)=>{Kt(x_,s)&&Ve(x_[s],c=>{c(r)})};Eoe("pre",s=>{const r=s.selection.getRng(),c=g=>_=>{const E=_.previousSibling;return dP(E)&&Qe(g,E)},p=(g,_)=>{const E=et.fromDom(_),R=Kp(E).dom;ti(E),jm(et.fromDom(g),[et.fromTag("br",R),et.fromTag("br",R),...Il(E)])};if(!r.collapsed){const g=s.selection.getSelectedBlocks(),_=Bt(Bt(g,dP),c(g));Ve(_,E=>{p(E.previousSibling,E)})}});const fP=["fontWeight","fontStyle","color","fontSize","fontFamily"],xW=s=>q(s.styles)&&Ot(Zs(s.styles),r=>Qe(fP,r)),_p=s=>pt(s,r=>vl(r)&&r.inline==="span"&&xW(r)),TW=(s,r)=>{const c=s.get(r);return ue(c)?_p(c):ye.none()},IW=(s,r)=>Ql(r,$t.fromRangeStart(s)).isNone(),xoe=(s,r)=>_c(r,$t.fromRangeEnd(s)).exists(c=>!nr(c.getNode())||_c(r,c).isSome())===!1,wx=s=>r=>SR(r)&&s.isEditable(r),Toe=s=>{const r=s.getSelectedBlocks(),c=s.getRng();if(s.isCollapsed())return[];if(r.length===1)return IW(c,r[0])&&xoe(c,r[0])?r:[];{const p=Po(r).filter(E=>IW(c,E)).toArray(),g=jo(r).filter(E=>xoe(c,E)).toArray(),_=r.slice(1,-1);return p.concat(_).concat(g)}},_Ce=s=>Bt(Toe(s),wx(s.dom)),AW=s=>Bt(s.getSelectedBlocks(),wx(s.dom)),V8=Gt.each,um=s=>Ln(s)&&!hd(s)&&!Bd(s)&&!E0(s),Ex=(s,r)=>{for(let c=s;c;c=c[r]){if(un(c)&&gr(c.data))return s;if(Ln(c)&&!hd(c))return c}return s},H8=(s,r,c)=>{const p=G2(s),g=rf(r)&&s.dom.isEditable(r),_=rf(c)&&s.dom.isEditable(c);if(g&&_){const E=Ex(r,"previousSibling"),R=Ex(c,"nextSibling");if(p.compare(E,R)){for(let N=E.nextSibling;N&&N!==R;){const j=N;N=N.nextSibling,E.appendChild(j)}return s.dom.remove(R),Gt.each(Gt.grep(R.childNodes),N=>{E.appendChild(N)}),E}}return c},kx=(s,r,c,p)=>{var g;if(p&&r.merge_siblings!==!1){const _=(g=H8(s,Ek(p),p))!==null&&g!==void 0?g:p;H8(s,_,Ek(_,!0))}},Ioe=(s,r,c)=>{if(r.clear_child_styles){const p=r.links?"*:not(a)":"*";V8(s.select(p,c),g=>{um(g)&&s.isEditable(g)&&V8(r.styles,(_,E)=>{s.setStyle(g,E,"")})})}},xx=(s,r,c)=>{V8(s.childNodes,p=>{um(p)&&(r(p)&&c(p),p.hasChildNodes()&&xx(p,r,c))})},Aoe=(s,r)=>{r.nodeName==="SPAN"&&s.getAttribs(r).length===0&&s.remove(r,!0)},pP=(s,r)=>c=>!!(c&&tv(s,c,r)),Tx=(s,r,c)=>p=>{s.setStyle(p,r,c),p.getAttribute("style")===""&&p.removeAttribute("style"),Aoe(s,p)},i3=sr.generate([{keep:[]},{rename:["name"]},{removed:[]}]),OW=/^(src|href|style)$/,mP=Gt.each,Dg=Vd,RW=s=>/^(TR|TH|TD)$/.test(s.nodeName),DW=(s,r,c)=>s.isChildOf(r,c)&&r!==c&&!s.isBlock(c),hP=(s,r,c)=>{let p=r[c?"startContainer":"endContainer"],g=r[c?"startOffset":"endOffset"];if(Ln(p)){const _=p.childNodes.length-1;!c&&g&&g--,p=p.childNodes[g>_?_:g]}return un(p)&&c&&g>=p.data.length&&(p=new Gl(p,s.getBody()).next()||p),un(p)&&!c&&g===0&&(p=new Gl(p,s.getBody()).prev()||p),p},LW=(s,r)=>{const c=r?"firstChild":"lastChild",p=s[c];return RW(s)&&p?s.nodeName==="TR"&&p[c]||p:s},gP=(s,r,c,p)=>{var g;const _=s.create(c,p);return(g=r.parentNode)===null||g===void 0||g.insertBefore(_,r),_.appendChild(r),_},PW=(s,r,c,p,g)=>{const _=et.fromDom(r),E=et.fromDom(s.create(p,g)),R=c?v0(_):cd(_);return jm(E,R),c?(Jc(_,E),qv(E,_)):(dd(_,E),Ri(E,_)),E.dom},Ooe=(s,r)=>r.links&&s.nodeName==="A",MW=(s,r,c)=>{const p=r.parentNode;let g;const _=s.dom,E=gl(s);ph(c)&&p===_.getRoot()&&(!c.list_block||!Dg(r,c.list_block))&&Ve(Mo(r.childNodes),R=>{Ag(s,E,R.nodeName.toLowerCase())?g?g.appendChild(R):(g=gP(_,R,E),_.setAttribs(g,ff(s))):g=null}),!(a_(c)&&!Dg(c.inline,r))&&_.remove(r,!0)},vP=(s,r,c)=>Be(s)?{name:r,value:null}:{name:s,value:Ca(r,c)},NW=(s,r)=>{s.getAttrib(r,"style")===""&&(r.removeAttribute("style"),r.removeAttribute("data-mce-style"))},Ix=(s,r,c,p,g)=>{let _=!1;mP(c.styles,(E,R)=>{const{name:N,value:j}=vP(R,E,p),ae=o_(j,N);(c.remove_similar||J(j)||!Ln(g)||Dg(tv(s,g,N),ae))&&s.setStyle(r,N,""),_=!0}),_&&NW(s,r)},a3=(s,r,c)=>{r==="removeformat"?Ve(AW(s.selection),p=>{Ve(fP,g=>s.dom.setStyle(p,g,"")),NW(s.dom,p)}):TW(s.formatter,r).each(p=>{Ve(AW(s.selection),g=>Ix(s.dom,g,p,c,null))})},FW=(s,r,c,p,g)=>{const _=s.dom,E=G2(s),R=s.schema;if(vl(r)&&Q5(R,r.inline)&&af(R,p)&&p.parentElement===s.getBody())return MW(s,p,r),i3.removed();if(!r.ceFalseOverride&&p&&_.getContentEditableParent(p)==="false"||p&&!k_(_,p,r)&&!Ooe(p,r))return i3.keep();const N=p,j=r.preserve_attributes;if(vl(r)&&r.remove==="all"&&ue(j)){const ae=Bt(_.getAttribs(N),fe=>Qe(j,fe.name.toLowerCase()));if(_.removeAllAttribs(N),Ve(ae,fe=>_.setAttrib(N,fe.name,fe.value)),ae.length>0)return i3.rename("span")}if(r.remove!=="all"){Ix(_,N,r,c,g),mP(r.attributes,(fe,ve)=>{const{name:xe,value:De}=vP(ve,fe,c);if(r.remove_similar||J(De)||!Ln(g)||Dg(_.getAttrib(g,xe),De)){if(xe==="class"){const Oe=_.getAttrib(N,xe);if(Oe){let Ne="";if(Ve(Oe.split(/\s+/),tt=>{/mce\-\w+/.test(tt)&&(Ne+=(Ne?" ":"")+tt)}),Ne){_.setAttrib(N,xe,Ne);return}}}if(OW.test(xe)&&N.removeAttribute("data-mce-"+xe),xe==="style"&&ep(["li"])(N)&&_.getStyle(N,"list-style-type")==="none"){N.removeAttribute(xe),_.setStyle(N,"list-style-type","none");return}xe==="class"&&N.removeAttribute("className"),N.removeAttribute(xe)}}),mP(r.classes,fe=>{fe=Ca(fe,c),(!Ln(g)||_.hasClass(g,fe))&&_.removeClass(N,fe)});const ae=_.getAttribs(N);for(let fe=0;fe<ae.length;fe++){const ve=ae[fe].nodeName;if(!E.isAttributeInternal(ve))return i3.keep()}}return r.remove!=="none"?(MW(s,N,r),i3.removed()):i3.keep()},Roe=(s,r,c,p,g)=>{let _;return r.parentNode&&Ve(i_(s.dom,r.parentNode).reverse(),E=>{if(!_&&Ln(E)&&E.id!=="_start"&&E.id!=="_end"){const R=_1(s,E,c,p,g);R&&R.split!==!1&&(_=E)}}),_},Ax=(s,r,c,p)=>FW(s,r,c,p,p).fold(Fe(p),g=>(s.dom.createFragment().appendChild(p),s.dom.rename(p,g)),Fe(null)),$W=(s,r,c,p,g,_,E,R)=>{var N,j;let ae,fe;const ve=s.dom;if(c){const xe=c.parentNode;for(let De=p.parentNode;De&&De!==xe;De=De.parentNode){let Oe=ve.clone(De,!1);for(let Ne=0;Ne<r.length&&(Oe=Ax(s,r[Ne],R,Oe),Oe!==null);Ne++);Oe&&(ae&&Oe.appendChild(ae),fe||(fe=Oe),ae=Oe)}(!E.mixed||!ve.isBlock(c))&&(p=(N=ve.split(c,p))!==null&&N!==void 0?N:p),ae&&fe&&((j=g.parentNode)===null||j===void 0||j.insertBefore(ae,g),fe.appendChild(g),vl(E)&&kx(s,E,R,ae))}return p},BW=(s,r,c,p,g)=>{const _=s.formatter.get(r),E=_[0],R=s.dom,N=s.selection,j=Oe=>{const Ne=Roe(s,Oe,r,c,g);return $W(s,_,Ne,Oe,Oe,!0,E,c)},ae=Oe=>hd(Oe)&&Ln(Oe)&&(Oe.id==="_start"||Oe.id==="_end"),fe=Oe=>Ot(_,Ne=>T_(s,Ne,c,Oe,Oe)),ve=Oe=>{const Ne=Mo(Oe.childNodes),ut=fe(Oe)||Ot(_,Jt=>k_(R,Oe,Jt)),gt=Oe.parentNode;if(!ut&&he(gt)&&L2(E)&&fe(gt),E.deep&&Ne.length)for(let Jt=0;Jt<Ne.length;Jt++)ve(Ne[Jt]);Ve(["underline","line-through","overline"],Jt=>{Ln(Oe)&&s.dom.getStyle(Oe,"text-decoration")===Jt&&Oe.parentNode&&r_(R,Oe.parentNode)===Jt&&T_(s,{deep:!1,exact:!0,inline:"span",styles:{textDecoration:Jt}},void 0,Oe)})},xe=Oe=>{const Ne=R.get(Oe?"_start":"_end");if(Ne){let tt=Ne[Oe?"firstChild":"lastChild"];return ae(tt)&&(tt=tt[Oe?"firstChild":"lastChild"]),un(tt)&&tt.data.length===0&&(tt=Oe?Ne.previousSibling||Ne.nextSibling:Ne.nextSibling||Ne.previousSibling),R.remove(Ne,!0),tt}else return null},De=Oe=>{let Ne,tt,ut=h1(R,Oe,_,{includeTrailingSpace:Oe.collapsed});if(E.split){if(ut=y8(ut),Ne=hP(s,ut,!0),tt=hP(s,ut),Ne!==tt){if(Ne=LW(Ne,!0),tt=LW(tt,!1),DW(R,Ne,tt)){const Tt=ye.from(Ne.firstChild).getOr(Ne);j(PW(R,Tt,!0,"span",{id:"_start","data-mce-type":"bookmark"})),xe(!0);return}if(DW(R,tt,Ne)){const Tt=ye.from(tt.lastChild).getOr(tt);j(PW(R,Tt,!1,"span",{id:"_end","data-mce-type":"bookmark"})),xe(!1);return}Ne=gP(R,Ne,"span",{id:"_start","data-mce-type":"bookmark"}),tt=gP(R,tt,"span",{id:"_end","data-mce-type":"bookmark"});const gt=R.createRng();gt.setStartAfter(Ne),gt.setEndBefore(tt),Xy(R,gt,Tt=>{Ve(Tt,Jt=>{!hd(Jt)&&!hd(Jt.parentNode)&&j(Jt)})}),j(Ne),j(tt),Ne=xe(!0),tt=xe()}else Ne=tt=j(Ne);ut.startContainer=Ne.parentNode?Ne.parentNode:Ne,ut.startOffset=R.nodeIndex(Ne),ut.endContainer=tt.parentNode?tt.parentNode:tt,ut.endOffset=R.nodeIndex(tt)+1}Xy(R,ut,gt=>{Ve(gt,ve)})};if(p){if(Ig(p)){const Oe=R.createRng();Oe.setStartBefore(p),Oe.setEndAfter(p),De(Oe)}else De(p);c6(s,r,p,c);return}!N.isCollapsed()||!vl(E)||J0(s).length?(wk(s,()=>Z6(s,De),Oe=>vl(E)&&_x(s,r,c,Oe)),s.nodeChanged()):wW(s,r,c,g),a3(s,r,c),c6(s,r,p,c)},VW=(s,r,c,p,g)=>{(p||s.selection.isEditable())&&BW(s,r,c,p,g)},T_=(s,r,c,p,g)=>FW(s,r,c,p,g).fold(ct,_=>(s.dom.rename(p,_),!0),Ht),HW=Gt.each,iv=(s,r,c,p)=>{const g=_=>{if(rf(_)&&Ln(_.parentNode)&&s.isEditable(_)){const E=r_(s,_.parentNode);s.getStyle(_,"color")&&E?s.setStyle(_,"text-decoration",E):s.getStyle(_,"text-decoration")===E&&s.setStyle(_,"text-decoration",null)}};r.styles&&(r.styles.color||r.styles.textDecoration)&&(Gt.walk(p,g,"childNodes"),g(p))},UW=(s,r,c,p)=>{if(r.styles&&r.styles.backgroundColor){const g=pP(s,"fontSize");xx(p,_=>g(_)&&s.isEditable(_),Tx(s,"backgroundColor",Ca(r.styles.backgroundColor,c)))}},zW=(s,r,c,p)=>{if(vl(r)&&(r.inline==="sub"||r.inline==="sup")){const g=pP(s,"fontSize");xx(p,E=>g(E)&&s.isEditable(E),Tx(s,"fontSize",""));const _=Bt(s.select(r.inline==="sup"?"sub":"sup",p),s.isEditable);s.remove(_,!0)}},WW=(s,r,c,p)=>{HW(r,g=>{vl(g)&&HW(s.dom.select(g.inline,p),_=>{um(_)&&T_(s,g,c,_,g.exact?_:null)}),Ioe(s.dom,g,p)})},Ox=(s,r,c,p,g)=>{const _=g.parentNode;_1(s,_,c,p)&&T_(s,r,p,g)||r.merge_with_parents&&_&&s.dom.getParent(_,E=>_1(s,E,c,p)?(T_(s,r,p,g),!0):!1)},U8=Gt.each,Doe=(s,r,c,p)=>{if($4(s)&&vl(r)&&c.parentNode){const g=PC(s.schema),_=C9(et.fromDom(c),E=>Bd(E.dom));return Ps(g,p)&&em(s.schema,c.parentNode,{skipBogus:!1,includeZwsp:!0})&&!_}else return!1},bP=(s,r,c,p)=>{if(U8(c.styles,(g,_)=>{s.setStyle(r,_,Ca(g,p))}),c.styles){const g=s.getAttrib(r,"style");g&&s.setAttrib(r,"data-mce-style",g)}},Loe=(s,r,c,p)=>{const g=s.formatter.get(r),_=g[0],E=!p&&s.selection.isCollapsed(),R=s.dom,N=s.selection,j=(De,Oe=_)=>{ie(Oe.onformat)&&Oe.onformat(De,Oe,c,p),bP(R,De,Oe,c),U8(Oe.attributes,(Ne,tt)=>{R.setAttrib(De,tt,Ca(Ne,c))}),U8(Oe.classes,Ne=>{const tt=Ca(Ne,c);R.hasClass(De,tt)||R.addClass(De,tt)})},ae=(De,Oe)=>{let Ne=!1;return U8(De,tt=>pf(tt)?R.getContentEditable(Oe)==="false"&&!tt.ceFalseOverride||he(tt.collapsed)&&tt.collapsed!==E?!0:R.is(Oe,tt.selector)&&!Bd(Oe)?(j(Oe,tt),Ne=!0,!1):!0:!1),Ne},fe=De=>{if(z(De)){const Oe=R.create(De);return j(Oe),Oe}else return null},ve=(De,Oe,Ne)=>{const tt=[];let ut=!0;const gt=_.inline||_.block,Tt=fe(gt),Jt=Ut=>jD(_)&&_1(s,Ut,r,c),vn=(Ut,Et,Qt)=>{const Bn=X6(_)&&G6(s.schema,Ut)&&Ag(s,Et,gt);return Qt&&Bn},qn=(Ut,Et,Qt,Bn)=>{const hs=Ut.nodeName.toLowerCase(),mo=Ag(s,gt,hs)&&Ag(s,Et,gt),bo=!Ne&&un(Ut)&&b4(Ut.data),dr=Bd(Ut),Vr=!vl(_)||!De.isBlock(Ut);return(Qt||Bn)&&mo&&!bo&&!dr&&Vr};Xy(De,Oe,Ut=>{let Et;const Qt=Bn=>{let hs=!1,mo=ut,bo=!1;const dr=Bn.parentNode,Vr=dr.nodeName.toLowerCase(),Na=De.getContentEditable(Bn);he(Na)&&(mo=ut,ut=Na==="true",hs=!0,bo=s_(s,Bn));const Fl=ut&&!hs;if(nr(Bn)&&!Doe(s,_,Bn,Vr)){Et=null,ph(_)&&De.remove(Bn);return}if(Jt(Bn)){Et=null;return}if(vn(Bn,Vr,Fl)){const sc=De.rename(Bn,gt);j(sc),tt.push(sc),Et=null;return}if(pf(_)){let sc=ae(g,Bn);if(!sc&&he(dr)&&L2(_)&&(sc=ae(g,dr)),!vl(_)||sc){Et=null;return}}he(Tt)&&qn(Bn,Vr,Fl,bo)?(Et||(Et=De.clone(Tt,!1),dr.insertBefore(Et,Bn),tt.push(Et)),bo&&hs&&(ut=mo),Et.appendChild(Bn)):(Et=null,Ve(Mo(Bn.childNodes),Qt),hs&&(ut=mo),Et=null)};Ve(Ut,Qt)}),_.links===!0&&Ve(tt,Ut=>{const Et=Qt=>{Qt.nodeName==="A"&&j(Qt,_),Ve(Mo(Qt.childNodes),Et)};Et(Ut)}),Ve(tt,Ut=>{const Et=hs=>{let mo=0;return Ve(hs.childNodes,bo=>{!Dn(bo)&&!hd(bo)&&mo++}),mo},Qt=hs=>pt(hs.childNodes,q6).filter(bo=>De.getContentEditable(bo)!=="false"&&k_(De,bo,_)).map(bo=>{const dr=De.clone(bo,!1);return j(dr),De.replace(dr,hs,!0),De.remove(bo,!0),dr}).getOr(hs),Bn=Et(Ut);if((tt.length>1||!De.isBlock(Ut))&&Bn===0){De.remove(Ut,!0);return}(vl(_)||ph(_)&&_.wrapper)&&(!_.exact&&Bn===1&&(Ut=Qt(Ut)),WW(s,g,c,Ut),Ox(s,_,r,c,Ut),UW(De,_,c,Ut),iv(De,_,c,Ut),zW(De,_,c,Ut),kx(s,_,c,Ut))})},xe=Ig(p)?p:N.getNode();if(R.getContentEditable(xe)==="false"&&!s_(s,xe)){p=xe,ae(g,p),l6(s,r,p,c);return}if(_){if(p)if(Ig(p)){if(!ae(g,p)){const De=R.createRng();De.setStartBefore(p),De.setEndAfter(p),ve(R,h1(R,De,g),!0)}}else ve(R,p,!0);else!E||!vl(_)||J0(s).length?(N.setRng(mx(N.getRng())),wk(s,()=>{Z6(s,(De,Oe)=>{const Ne=Oe?De:h1(R,De,g);ve(R,Ne,!1)})},Ht),s.nodeChanged()):CW(s,r,c),TW(s.formatter,r).each(De=>{Ve(_Ce(s.selection),Oe=>bP(R,Oe,De,c))});koe(r,s)}l6(s,r,p,c)},jW=(s,r,c,p)=>{(p||s.selection.isEditable())&&Loe(s,r,c,p)},z8=s=>Kt(s,"vars"),ZW=(s,r)=>{s.set({}),r.on("NodeChange",c=>{yP(r,c.element,s.get())}),r.on("FormatApply FormatRemove",c=>{const p=ye.from(c.node).map(g=>Ig(g)?g:g.startContainer).bind(g=>Ln(g)?ye.some(g):ye.from(g.parentElement)).getOrThunk(()=>Rx(r));yP(r,p,s.get())})},Rx=s=>s.selection.getStart(),qW=(s,r,c,p,g)=>Ze(r,R=>{const N=s.formatter.matchNode(R,c,g!=null?g:{},p);return!ge(N)},R=>yx(s,R,c)?!0:p?!1:he(s.formatter.matchNode(R,c,g,!0))),GW=(s,r)=>{const c=r!=null?r:Rx(s);return Bt(i_(s.dom,c),p=>Ln(p)&&!E0(p))},yP=(s,r,c)=>{const p=GW(s,r);bn(c,(g,_)=>{const E=R=>{const N=qW(s,p,_,R.similar,z8(R)?R.vars:void 0),j=N.isSome();if(R.state.get()!==j){R.state.set(j);const ae=N.getOr(r);z8(R)?R.callback(j,{node:ae,format:_,parents:p}):Ve(R.callbacks,fe=>fe(j,{node:ae,format:_,parents:p}))}};Ve([g.withSimilar,g.withoutSimilar],E),Ve(g.withVars,E)})},_P=(s,r,c,p,g,_)=>{const E=r.get();Ve(c.split(","),R=>{const N=Vn(E,R).getOrThunk(()=>{const ae={withSimilar:{state:pl(!1),similar:!0,callbacks:[]},withoutSimilar:{state:pl(!1),similar:!1,callbacks:[]},withVars:[]};return E[R]=ae,ae}),j=()=>{const ae=GW(s);return qW(s,ae,R,g,_).isSome()};if(ge(_)){const ae=g?N.withSimilar:N.withoutSimilar;ae.callbacks.push(p),ae.callbacks.length===1&&ae.state.set(j())}else N.withVars.push({state:pl(j()),similar:g,vars:_,callback:p})}),r.set(E)},KW=(s,r,c)=>{const p=s.get();Ve(r.split(","),g=>Vn(p,g).each(_=>{p[g]={withSimilar:{..._.withSimilar,callbacks:Bt(_.withSimilar.callbacks,E=>E!==c)},withoutSimilar:{..._.withoutSimilar,callbacks:Bt(_.withoutSimilar.callbacks,E=>E!==c)},withVars:Bt(_.withVars,E=>E.callback!==c)}})),s.set(p)},Poe=(s,r,c,p,g,_)=>(_P(s,r,c,p,g,_),{unbind:()=>KW(r,c,p)}),Moe=(s,r,c,p)=>{const g=s.formatter.get(r);g&&(_x(s,r,c,p)&&(!("toggle"in g[0])||g[0].toggle)?VW(s,r,c,p):jW(s,r,c,p))},YW=Gt.explode,W8=()=>{const s={};return{addFilter:(g,_)=>{Ve(YW(g),E=>{Kt(s,E)||(s[E]={name:E,callbacks:[]}),s[E].callbacks.push(_)})},getFilters:()=>br(s),removeFilter:(g,_)=>{Ve(YW(g),E=>{if(Kt(s,E))if(he(_)){const R=s[E],N=Bt(R.callbacks,j=>j!==_);N.length>0?R.callbacks=N:delete s[E]}else delete s[E]})}}},av=(s,r)=>{Ve(r,c=>{s.attr(c,null)})},Noe=(s,r,c)=>{s.addNodeFilter("font",p=>{Ve(p,g=>{const _=r.parse(g.attr("style")),E=g.attr("color"),R=g.attr("face"),N=g.attr("size");E&&(_.color=E),R&&(_["font-family"]=R),N&&Mu(N).each(j=>{_["font-size"]=c[j-1]}),g.name="span",g.attr("style",r.serialize(_)),av(g,["color","face","size"])})})},SP=(s,r,c)=>{s.addNodeFilter("strike",p=>{const g=r.type!=="html4";Ve(p,_=>{if(g)_.name="s";else{const E=c.parse(_.attr("style"));E["text-decoration"]="line-through",_.name="span",_.attr("style",c.serialize(E))}})})},Ga=(s,r,c)=>{var p;const g=$r();r.convert_fonts_to_spans&&Noe(s,g,Gt.explode((p=r.font_size_legacy_values)!==null&&p!==void 0?p:"")),SP(s,c,g)},CP=(s,r,c)=>{r.inline_styles&&Ga(s,r,c)},wP=s=>fetch(s).then(r=>r.ok?r.blob():Promise.reject()).catch(()=>Promise.reject({message:"Cannot convert ".concat(s," to Blob. Resource might not exist or is inaccessible."),uriType:"blob"})),lv=s=>{const r=/([a-z0-9+\/=\s]+)/i.exec(s);return r?r[1]:""},XW=s=>{try{return decodeURIComponent(s)}catch{return s}},Dx=s=>{const[r,...c]=s.split(","),p=c.join(","),g=/data:([^/]+\/[^;]+)(;.+)?/.exec(r);if(g){const _=g[2]===";base64",E=XW(p),R=_?lv(E):E;return ye.some({type:g[1],data:R,base64Encoded:_})}else return ye.none()},I_=(s,r,c=!0)=>{let p=r;if(c)try{p=atob(r)}catch{return ye.none()}const g=new Uint8Array(p.length);for(let _=0;_<g.length;_++)g[_]=p.charCodeAt(_);return ye.some(new Blob([g],{type:s}))},Foe=s=>new Promise((r,c)=>{Dx(s).bind(({type:p,data:g,base64Encoded:_})=>I_(p,g,_)).fold(()=>c("Invalid data URI"),r)}),$oe=s=>hr(s,"blob:")?wP(s):hr(s,"data:")?Foe(s):Promise.reject("Unknown URI format"),l3=s=>new Promise((r,c)=>{const p=new FileReader;p.onloadend=()=>{r(p.result)},p.onerror=()=>{var g;c((g=p.error)===null||g===void 0?void 0:g.message)},p.readAsDataURL(s)});let Boe=0;const c3=s=>"blobid"+Boe++,JW=(s,r,c)=>Dx(s).bind(({data:p,type:g,base64Encoded:_})=>{if(r&&!_)return ye.none();{const E=_?p:btoa(p);return c(E,g)}}),cv=(s,r,c)=>{const p=s.create(c3(),r,c);return s.add(p),p},QW=(s,r,c=!1)=>JW(r,c,(p,g)=>ye.from(s.getByData(p,g)).orThunk(()=>I_(g,p).map(_=>cv(s,_,p)))),dm=(s,r)=>{const c=()=>Promise.reject("Invalid data URI");if(hr(r,"blob:")){const p=s.getByUri(r);return he(p)?Promise.resolve(p):$oe(r).then(g=>l3(g).then(_=>JW(_,!1,E=>ye.some(cv(s,g,E))).getOrThunk(c)))}else return hr(r,"data:")?QW(s,r).fold(c,p=>Promise.resolve(p)):Promise.reject("Unknown image data format")},j8=/^(?:(?:(?:[A-Za-z][A-Za-z\d.+-]{0,14}:\/\/(?:[-.~*+=!&;:'%@?^${}(),\w]+@)?|www\.|[-;:&=+$,.\w]+@)([A-Za-z\d-]+(?:\.[A-Za-z\d-]+)*))(?::\d+)?(?:\/(?:[-.~*+=!;:'%@$(),\/\w]*[-~*+=%@$()\/\w])?)?(?:\?(?:[-.~*+=!&;:'%@?^${}(),\/\w]+)?)?(?:#(?:[-.~*+=!&;:'%@?^${}(),\/\w]+)?)?)$/,EP=s=>ye.from(s.match(j8)).bind(r=>xr(r,1)).map(r=>hr(r,"www.")?r.substring(4):r),Lx=(s,r)=>{ye.from(s.attr("src")).bind(EP).forall(c=>!Qe(r,c))&&s.attr("sandbox","")},kP=(s,r)=>hr(s,"".concat(r,"/")),Px=s=>ge(s)?"iframe":kP(s,"image")?"img":kP(s,"video")?"video":kP(s,"audio")?"audio":"iframe",Voe=({type:s,src:r,width:c,height:p}={},g,_)=>{const E=Px(s),R=new gd(E,1);return R.attr(E==="audio"?{src:r}:{src:r,width:c,height:p}),(E==="audio"||E==="video")&&R.attr("controls",""),E==="iframe"&&g&&Lx(R,_),R},bh=s=>he(s.attr("data-mce-bogus")),Mx=s=>s.attr("src")===ns.transparentSrc||he(s.attr("data-mce-placeholder")),ej=(s,r)=>{const{blob_cache:c}=r;if(c){const p=g=>{const _=g.attr("src");Mx(g)||bh(g)||de(_)||QW(c,_,!0).each(E=>{g.attr("src",E.blobUri())})};s.addAttributeFilter("src",g=>Ve(g,p))}},xP=(s,r)=>{var c,p;const g=s.schema;s.addAttributeFilter("href",N=>{let j=N.length;const ae=ve=>ve.split(" ").filter(De=>De.length>0).concat(["noopener"]).sort().join(" "),fe=ve=>{const xe=ve?Gt.trim(ve):"";return/\b(noopener)\b/g.test(xe)?xe:ae(xe)};if(!r.allow_unsafe_link_target)for(;j--;){const ve=N[j];ve.name==="a"&&ve.attr("target")==="_blank"&&ve.attr("rel",fe(ve.attr("rel")))}}),r.allow_html_in_named_anchor||s.addAttributeFilter("id,name",N=>{let j=N.length,ae,fe,ve,xe;for(;j--;)if(xe=N[j],xe.name==="a"&&xe.firstChild&&!xe.attr("href"))for(ve=xe.parent,ae=xe.lastChild;ae&&ve;)fe=ae.prev,ve.insert(ae,xe),ae=fe}),r.fix_list_elements&&s.addNodeFilter("ul,ol",N=>{let j=N.length,ae,fe;for(;j--;)if(ae=N[j],fe=ae.parent,fe&&(fe.name==="ul"||fe.name==="ol"))if(ae.prev&&ae.prev.name==="li")ae.prev.append(ae);else{const ve=new gd("li",1);ve.attr("style","list-style-type: none"),ae.wrap(ve)}});const _=g.getValidClasses();r.validate&&_&&s.addAttributeFilter("class",N=>{var j;let ae=N.length;for(;ae--;){const fe=N[ae],ve=(j=fe.attr("class"))!==null&&j!==void 0?j:"",xe=Gt.explode(ve," ");let De="";for(let Oe=0;Oe<xe.length;Oe++){const Ne=xe[Oe];let tt=!1,ut=_["*"];ut&&ut[Ne]&&(tt=!0),ut=_[fe.name],!tt&&ut&&ut[Ne]&&(tt=!0),tt&&(De&&(De+=" "),De+=Ne)}De.length||(De=null),fe.attr("class",De)}}),ej(s,r);const E=(c=r.sandbox_iframes)!==null&&c!==void 0?c:!1,R=er((p=r.sandbox_iframes_exclusions)!==null&&p!==void 0?p:[]);r.convert_unsafe_embeds&&s.addNodeFilter("object,embed",N=>Ve(N,j=>{j.replace(Voe({type:j.attr("type"),src:j.name==="object"?j.attr("data"):j.attr("src"),width:j.attr("width"),height:j.attr("height")},E,R))})),E&&s.addNodeFilter("iframe",N=>Ve(N,j=>Lx(j,R)))};/*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */const{entries:Nx,setPrototypeOf:u3,isFrozen:TP,getPrototypeOf:Hoe,getOwnPropertyDescriptor:tj}=Object;let{freeze:vf,seal:yh,create:nj}=Object,{apply:IP,construct:d3}=typeof Reflect<"u"&&Reflect;vf||(vf=function(r){return r}),yh||(yh=function(r){return r}),IP||(IP=function(r,c,p){return r.apply(c,p)}),d3||(d3=function(r,c){return new r(...c)});const Fx=yf(Array.prototype.forEach),sj=yf(Array.prototype.lastIndexOf),$x=yf(Array.prototype.pop),Z8=yf(Array.prototype.push),oj=yf(Array.prototype.splice),f3=yf(String.prototype.toLowerCase),AP=yf(String.prototype.toString),rj=yf(String.prototype.match),q8=yf(String.prototype.replace),Uoe=yf(String.prototype.indexOf),zoe=yf(String.prototype.trim),fm=yf(Object.prototype.hasOwnProperty),bf=yf(RegExp.prototype.test),G8=Woe(TypeError);function yf(s){return function(r){for(var c=arguments.length,p=new Array(c>1?c-1:0),g=1;g<c;g++)p[g-1]=arguments[g];return IP(s,r,p)}}function Woe(s){return function(){for(var r=arguments.length,c=new Array(r),p=0;p<r;p++)c[p]=arguments[p];return d3(s,c)}}function di(s,r){let c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:f3;u3&&u3(s,null);let p=r.length;for(;p--;){let g=r[p];if(typeof g=="string"){const _=c(g);_!==g&&(TP(r)||(r[p]=_),g=_)}s[g]=!0}return s}function joe(s){for(let r=0;r<s.length;r++)fm(s,r)||(s[r]=null);return s}function p3(s){const r=nj(null);for(const[c,p]of Nx(s))fm(s,c)&&(Array.isArray(p)?r[c]=joe(p):p&&typeof p=="object"&&p.constructor===Object?r[c]=p3(p):r[c]=p);return r}function K8(s,r){for(;s!==null;){const p=tj(s,r);if(p){if(p.get)return yf(p.get);if(typeof p.value=="function")return yf(p.value)}s=Hoe(s)}function c(){return null}return c}const ij=vf(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),OP=vf(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),RP=vf(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Zoe=vf(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),DP=vf(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),aj=vf(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),lj=vf(["#text"]),m3=vf(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),LP=vf(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),cj=vf(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Bx=vf(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),qoe=yh(/\{\{[\w\W]*|[\w\W]*\}\}/gm),uj=yh(/<%[\w\W]*|[\w\W]*%>/gm),Goe=yh(/\$\{[\w\W]*/gm),Koe=yh(/^data-[\-\w.\u00B7-\uFFFF]+$/),Yoe=yh(/^aria-[\-\w]+$/),dj=yh(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Xoe=yh(/^(?:\w+script|data):/i),Joe=yh(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),fj=yh(/^html$/i),Qoe=yh(/^[a-z][.\w]*(-[.\w]+)+$/i);var pj=Object.freeze({__proto__:null,ARIA_ATTR:Yoe,ATTR_WHITESPACE:Joe,CUSTOM_ELEMENT:Qoe,DATA_ATTR:Koe,DOCTYPE_NAME:fj,ERB_EXPR:uj,IS_ALLOWED_URI:dj,IS_SCRIPT_OR_DATA:Xoe,MUSTACHE_EXPR:qoe,TMPLIT_EXPR:Goe});const Y8={element:1,text:3,progressingInstruction:7,comment:8,document:9},PP=function(){return typeof window>"u"?null:window},mj=function(r,c){if(typeof r!="object"||typeof r.createPolicy!="function")return null;let p=null;const g="data-tt-policy-suffix";c&&c.hasAttribute(g)&&(p=c.getAttribute(g));const _="dompurify"+(p?"#"+p:"");try{return r.createPolicy(_,{createHTML(E){return E},createScriptURL(E){return E}})}catch{return console.warn("TrustedTypes policy "+_+" could not be created."),null}},ere=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function A_(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:PP();const r=Ro=>A_(Ro);if(r.version="3.2.4",r.removed=[],!s||!s.document||s.document.nodeType!==Y8.document||!s.Element)return r.isSupported=!1,r;let{document:c}=s;const p=c,g=p.currentScript,{DocumentFragment:_,HTMLTemplateElement:E,Node:R,Element:N,NodeFilter:j,NamedNodeMap:ae=s.NamedNodeMap||s.MozNamedAttrMap,HTMLFormElement:fe,DOMParser:ve,trustedTypes:xe}=s,De=N.prototype,Oe=K8(De,"cloneNode"),Ne=K8(De,"remove"),tt=K8(De,"nextSibling"),ut=K8(De,"childNodes"),gt=K8(De,"parentNode");if(typeof E=="function"){const Ro=c.createElement("template");Ro.content&&Ro.content.ownerDocument&&(c=Ro.content.ownerDocument)}let Tt,Jt="";const{implementation:vn,createNodeIterator:qn,createDocumentFragment:Ut,getElementsByTagName:Et}=c,{importNode:Qt}=p;let Bn=ere();r.isSupported=typeof Nx=="function"&&typeof gt=="function"&&vn&&vn.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:hs,ERB_EXPR:mo,TMPLIT_EXPR:bo,DATA_ATTR:dr,ARIA_ATTR:Vr,IS_SCRIPT_OR_DATA:Na,ATTR_WHITESPACE:Fl,CUSTOM_ELEMENT:sc}=pj;let{IS_ALLOWED_URI:Tn}=pj,gs=null;const rr=di({},[...ij,...OP,...RP,...DP,...lj]);let Un=null;const nn=di({},[...m3,...LP,...cj,...Bx]);let Nn=Object.seal(nj(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Os=null,Zr=null,Oo=!0,Vc=!0,_m=!1,x1=!0,ru=!1,Tp=!0,Ip=!1,Tu=!1,Xu=!1,Sm=!1,yv=!1,ys=!1,zo=!0,Ea=!1;const $l="user-content-";let Bl=!0,rl=!1,Xi={},Ji=null;const Ju=di({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Cm=null;const wh=di({},["audio","video","img","source","image","track"]);let Eh=null;const L3=di({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),P3="http://www.w3.org/1998/Math/MathML",M3="http://www.w3.org/2000/svg",kh="http://www.w3.org/1999/xhtml";let _v=kh,bS=!1,N3=null;const f$=di({},[P3,M3,kh],AP);let F3=di({},["mi","mo","mn","ms","mtext"]),$3=di({},["annotation-xml"]);const X7=di({},["title","style","font","a","script"]);let B3=null;const Sv=["application/xhtml+xml","text/html"],J7="text/html";let Ct=null,Rt=null;const xn=c.createElement("form"),yn=function(Lt){return Lt instanceof RegExp||Lt instanceof Function},Ts=function(){let Lt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Rt&&Rt===Lt)){if((!Lt||typeof Lt!="object")&&(Lt={}),Lt=p3(Lt),B3=Sv.indexOf(Lt.PARSER_MEDIA_TYPE)===-1?J7:Lt.PARSER_MEDIA_TYPE,Ct=B3==="application/xhtml+xml"?AP:f3,gs=fm(Lt,"ALLOWED_TAGS")?di({},Lt.ALLOWED_TAGS,Ct):rr,Un=fm(Lt,"ALLOWED_ATTR")?di({},Lt.ALLOWED_ATTR,Ct):nn,N3=fm(Lt,"ALLOWED_NAMESPACES")?di({},Lt.ALLOWED_NAMESPACES,AP):f$,Eh=fm(Lt,"ADD_URI_SAFE_ATTR")?di(p3(L3),Lt.ADD_URI_SAFE_ATTR,Ct):L3,Cm=fm(Lt,"ADD_DATA_URI_TAGS")?di(p3(wh),Lt.ADD_DATA_URI_TAGS,Ct):wh,Ji=fm(Lt,"FORBID_CONTENTS")?di({},Lt.FORBID_CONTENTS,Ct):Ju,Os=fm(Lt,"FORBID_TAGS")?di({},Lt.FORBID_TAGS,Ct):{},Zr=fm(Lt,"FORBID_ATTR")?di({},Lt.FORBID_ATTR,Ct):{},Xi=fm(Lt,"USE_PROFILES")?Lt.USE_PROFILES:!1,Oo=Lt.ALLOW_ARIA_ATTR!==!1,Vc=Lt.ALLOW_DATA_ATTR!==!1,_m=Lt.ALLOW_UNKNOWN_PROTOCOLS||!1,x1=Lt.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ru=Lt.SAFE_FOR_TEMPLATES||!1,Tp=Lt.SAFE_FOR_XML!==!1,Ip=Lt.WHOLE_DOCUMENT||!1,Sm=Lt.RETURN_DOM||!1,yv=Lt.RETURN_DOM_FRAGMENT||!1,ys=Lt.RETURN_TRUSTED_TYPE||!1,Xu=Lt.FORCE_BODY||!1,zo=Lt.SANITIZE_DOM!==!1,Ea=Lt.SANITIZE_NAMED_PROPS||!1,Bl=Lt.KEEP_CONTENT!==!1,rl=Lt.IN_PLACE||!1,Tn=Lt.ALLOWED_URI_REGEXP||dj,_v=Lt.NAMESPACE||kh,F3=Lt.MATHML_TEXT_INTEGRATION_POINTS||F3,$3=Lt.HTML_INTEGRATION_POINTS||$3,Nn=Lt.CUSTOM_ELEMENT_HANDLING||{},Lt.CUSTOM_ELEMENT_HANDLING&&yn(Lt.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Nn.tagNameCheck=Lt.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Lt.CUSTOM_ELEMENT_HANDLING&&yn(Lt.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Nn.attributeNameCheck=Lt.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Lt.CUSTOM_ELEMENT_HANDLING&&typeof Lt.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Nn.allowCustomizedBuiltInElements=Lt.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ru&&(Vc=!1),yv&&(Sm=!0),Xi&&(gs=di({},lj),Un=[],Xi.html===!0&&(di(gs,ij),di(Un,m3)),Xi.svg===!0&&(di(gs,OP),di(Un,LP),di(Un,Bx)),Xi.svgFilters===!0&&(di(gs,RP),di(Un,LP),di(Un,Bx)),Xi.mathMl===!0&&(di(gs,DP),di(Un,cj),di(Un,Bx))),Lt.ADD_TAGS&&(gs===rr&&(gs=p3(gs)),di(gs,Lt.ADD_TAGS,Ct)),Lt.ADD_ATTR&&(Un===nn&&(Un=p3(Un)),di(Un,Lt.ADD_ATTR,Ct)),Lt.ADD_URI_SAFE_ATTR&&di(Eh,Lt.ADD_URI_SAFE_ATTR,Ct),Lt.FORBID_CONTENTS&&(Ji===Ju&&(Ji=p3(Ji)),di(Ji,Lt.FORBID_CONTENTS,Ct)),Bl&&(gs["#text"]=!0),Ip&&di(gs,["html","head","body"]),gs.table&&(di(gs,["tbody"]),delete Os.tbody),Lt.TRUSTED_TYPES_POLICY){if(typeof Lt.TRUSTED_TYPES_POLICY.createHTML!="function")throw G8('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Lt.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw G8('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Tt=Lt.TRUSTED_TYPES_POLICY,Jt=Tt.createHTML("")}else Tt===void 0&&(Tt=mj(xe,g)),Tt!==null&&typeof Jt=="string"&&(Jt=Tt.createHTML(""));vf&&vf(Lt),Rt=Lt}},Xo=di({},[...OP,...RP,...Zoe]),ka=di({},[...DP,...aj]),T1=function(Lt){let vs=gt(Lt);(!vs||!vs.tagName)&&(vs={namespaceURI:_v,tagName:"template"});const ho=f3(Lt.tagName),Vl=f3(vs.tagName);return N3[Lt.namespaceURI]?Lt.namespaceURI===M3?vs.namespaceURI===kh?ho==="svg":vs.namespaceURI===P3?ho==="svg"&&(Vl==="annotation-xml"||F3[Vl]):!!Xo[ho]:Lt.namespaceURI===P3?vs.namespaceURI===kh?ho==="math":vs.namespaceURI===M3?ho==="math"&&$3[Vl]:!!ka[ho]:Lt.namespaceURI===kh?vs.namespaceURI===M3&&!$3[Vl]||vs.namespaceURI===P3&&!F3[Vl]?!1:!ka[ho]&&(X7[ho]||!Xo[ho]):!!(B3==="application/xhtml+xml"&&N3[Lt.namespaceURI]):!1},wm=function(Lt){Z8(r.removed,{element:Lt});try{gt(Lt).removeChild(Lt)}catch{Ne(Lt)}},Q7=function(Lt,vs){try{Z8(r.removed,{attribute:vs.getAttributeNode(Lt),from:vs})}catch{Z8(r.removed,{attribute:null,from:vs})}if(vs.removeAttribute(Lt),Lt==="is")if(Sm||yv)try{wm(vs)}catch{}else try{vs.setAttribute(Lt,"")}catch{}},p$=function(Lt){let vs=null,ho=null;if(Xu)Lt="<remove></remove>"+Lt;else{const Iu=rj(Lt,/^[\r\n\t ]+/);ho=Iu&&Iu[0]}B3==="application/xhtml+xml"&&_v===kh&&(Lt='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Lt+"</body></html>");const Vl=Tt?Tt.createHTML(Lt):Lt;if(_v===kh)try{vs=new ve().parseFromString(Vl,B3)}catch{}if(!vs||!vs.documentElement){vs=vn.createDocument(_v,"template",null);try{vs.documentElement.innerHTML=bS?Jt:Vl}catch{}}const Sd=vs.body||vs.documentElement;return Lt&&ho&&Sd.insertBefore(c.createTextNode(ho),Sd.childNodes[0]||null),_v===kh?Et.call(vs,Ip?"html":"body")[0]:Ip?vs.documentElement:Sd},ew=function(Lt){return qn.call(Lt.ownerDocument||Lt,Lt,j.SHOW_ELEMENT|j.SHOW_COMMENT|j.SHOW_TEXT|j.SHOW_PROCESSING_INSTRUCTION|j.SHOW_CDATA_SECTION,null)},m$=function(Lt){return Lt instanceof fe&&(typeof Lt.nodeName!="string"||typeof Lt.textContent!="string"||typeof Lt.removeChild!="function"||!(Lt.attributes instanceof ae)||typeof Lt.removeAttribute!="function"||typeof Lt.setAttribute!="function"||typeof Lt.namespaceURI!="string"||typeof Lt.insertBefore!="function"||typeof Lt.hasChildNodes!="function")},h$=function(Lt){return typeof R=="function"&&Lt instanceof R};function Cv(Ro,Lt,vs){Fx(Ro,ho=>{ho.call(r,Lt,vs,Rt)})}const g$=function(Lt){let vs=null;if(Cv(Bn.beforeSanitizeElements,Lt,null),m$(Lt))return wm(Lt),!0;const ho=Ct(Lt.nodeName);if(Cv(Bn.uponSanitizeElement,Lt,{tagName:ho,allowedTags:gs}),Lt.hasChildNodes()&&!h$(Lt.firstElementChild)&&bf(/<[/\w]/g,Lt.innerHTML)&&bf(/<[/\w]/g,Lt.textContent)||Lt.nodeType===Y8.progressingInstruction||Tp&&Lt.nodeType===Y8.comment&&bf(/<[/\w]/g,Lt.data))return wm(Lt),!0;if(!gs[ho]||Os[ho]){if(!Os[ho]&&_X(ho)&&(Nn.tagNameCheck instanceof RegExp&&bf(Nn.tagNameCheck,ho)||Nn.tagNameCheck instanceof Function&&Nn.tagNameCheck(ho)))return!1;if(Bl&&!Ji[ho]){const Vl=gt(Lt)||Lt.parentNode,Sd=ut(Lt)||Lt.childNodes;if(Sd&&Vl){const Iu=Sd.length;for(let Ap=Iu-1;Ap>=0;--Ap){const zg=Oe(Sd[Ap],!0);zg.__removalCount=(Lt.__removalCount||0)+1,Vl.insertBefore(zg,tt(Lt))}}}return wm(Lt),!0}return Lt instanceof N&&!T1(Lt)||(ho==="noscript"||ho==="noembed"||ho==="noframes")&&bf(/<\/no(script|embed|frames)/i,Lt.innerHTML)?(wm(Lt),!0):(ru&&Lt.nodeType===Y8.text&&(vs=Lt.textContent,Fx([hs,mo,bo],Vl=>{vs=q8(vs,Vl," ")}),Lt.textContent!==vs&&(Z8(r.removed,{element:Lt.cloneNode()}),Lt.textContent=vs)),Cv(Bn.afterSanitizeElements,Lt,null),!1)},HI=function(Lt,vs,ho){if(zo&&(vs==="id"||vs==="name")&&(ho in c||ho in xn))return!1;if(!(Vc&&!Zr[vs]&&bf(dr,vs))){if(!(Oo&&bf(Vr,vs))){if(!Un[vs]||Zr[vs]){if(!(_X(Lt)&&(Nn.tagNameCheck instanceof RegExp&&bf(Nn.tagNameCheck,Lt)||Nn.tagNameCheck instanceof Function&&Nn.tagNameCheck(Lt))&&(Nn.attributeNameCheck instanceof RegExp&&bf(Nn.attributeNameCheck,vs)||Nn.attributeNameCheck instanceof Function&&Nn.attributeNameCheck(vs))||vs==="is"&&Nn.allowCustomizedBuiltInElements&&(Nn.tagNameCheck instanceof RegExp&&bf(Nn.tagNameCheck,ho)||Nn.tagNameCheck instanceof Function&&Nn.tagNameCheck(ho))))return!1}else if(!Eh[vs]){if(!bf(Tn,q8(ho,Fl,""))){if(!((vs==="src"||vs==="xlink:href"||vs==="href")&&Lt!=="script"&&Uoe(ho,"data:")===0&&Cm[Lt])){if(!(_m&&!bf(Na,q8(ho,Fl,"")))){if(ho)return!1}}}}}}return!0},_X=function(Lt){return Lt!=="annotation-xml"&&rj(Lt,sc)},SX=function(Lt){Cv(Bn.beforeSanitizeAttributes,Lt,null);const{attributes:vs}=Lt;if(!vs||m$(Lt))return;const ho={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Un,forceKeepAttr:void 0};let Vl=vs.length;for(;Vl--;){const Sd=vs[Vl],{name:Iu,namespaceURI:Ap,value:zg}=Sd,tw=Ct(Iu);let Cd=Iu==="value"?zg:zoe(zg);const o=Cd;if(ho.attrName=tw,ho.attrValue=Cd,ho.keepAttr=!0,ho.forceKeepAttr=void 0,Cv(Bn.uponSanitizeAttribute,Lt,ho),Cd=ho.attrValue,Ea&&(tw==="id"||tw==="name")&&(Q7(Iu,Lt),Cd=$l+Cd),Tp&&bf(/((--!?|])>)|<\/(style|title)/i,Cd)){Q7(Iu,Lt);continue}if(ho.forceKeepAttr)continue;if(!ho.keepAttr){Q7(Iu,Lt);continue}if(!x1&&bf(/\/>/i,Cd)){Q7(Iu,Lt);continue}ru&&Fx([hs,mo,bo],m=>{Cd=q8(Cd,m," ")});const u=Ct(Lt.nodeName);if(!HI(u,tw,Cd)){Q7(Iu,Lt);continue}if(Tt&&typeof xe=="object"&&typeof xe.getAttributeType=="function"&&!Ap)switch(xe.getAttributeType(u,tw)){case"TrustedHTML":{Cd=Tt.createHTML(Cd);break}case"TrustedScriptURL":{Cd=Tt.createScriptURL(Cd);break}}if(Cd!==o)try{Ap?Lt.setAttributeNS(Ap,Iu,Cd):Lt.setAttribute(Iu,Cd),m$(Lt)?wm(Lt):$x(r.removed)}catch{}}Cv(Bn.afterSanitizeAttributes,Lt,null)},CX=function Ro(Lt){let vs=null;const ho=ew(Lt);for(Cv(Bn.beforeSanitizeShadowDOM,Lt,null);vs=ho.nextNode();)Cv(Bn.uponSanitizeShadowNode,vs,null),g$(vs),SX(vs),vs.content instanceof _&&Ro(vs.content);Cv(Bn.afterSanitizeShadowDOM,Lt,null)};return r.sanitize=function(Ro){let Lt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},vs=null,ho=null,Vl=null,Sd=null;if(bS=!Ro,bS&&(Ro="<!-->"),typeof Ro!="string"&&!h$(Ro))if(typeof Ro.toString=="function"){if(Ro=Ro.toString(),typeof Ro!="string")throw G8("dirty is not a string, aborting")}else throw G8("toString is not a function");if(!r.isSupported)return Ro;if(Tu||Ts(Lt),r.removed=[],typeof Ro=="string"&&(rl=!1),rl){if(Ro.nodeName){const zg=Ct(Ro.nodeName);if(!gs[zg]||Os[zg])throw G8("root node is forbidden and cannot be sanitized in-place")}}else if(Ro instanceof R)vs=p$("<!---->"),ho=vs.ownerDocument.importNode(Ro,!0),ho.nodeType===Y8.element&&ho.nodeName==="BODY"||ho.nodeName==="HTML"?vs=ho:vs.appendChild(ho);else{if(!Sm&&!ru&&!Ip&&Ro.indexOf("<")===-1)return Tt&&ys?Tt.createHTML(Ro):Ro;if(vs=p$(Ro),!vs)return Sm?null:ys?Jt:""}vs&&Xu&&wm(vs.firstChild);const Iu=ew(rl?Ro:vs);for(;Vl=Iu.nextNode();)g$(Vl),SX(Vl),Vl.content instanceof _&&CX(Vl.content);if(rl)return Ro;if(Sm){if(yv)for(Sd=Ut.call(vs.ownerDocument);vs.firstChild;)Sd.appendChild(vs.firstChild);else Sd=vs;return(Un.shadowroot||Un.shadowrootmode)&&(Sd=Qt.call(p,Sd,!0)),Sd}let Ap=Ip?vs.outerHTML:vs.innerHTML;return Ip&&gs["!doctype"]&&vs.ownerDocument&&vs.ownerDocument.doctype&&vs.ownerDocument.doctype.name&&bf(fj,vs.ownerDocument.doctype.name)&&(Ap="<!DOCTYPE "+vs.ownerDocument.doctype.name+">\n"+Ap),ru&&Fx([hs,mo,bo],zg=>{Ap=q8(Ap,zg," ")}),Tt&&ys?Tt.createHTML(Ap):Ap},r.setConfig=function(){let Ro=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ts(Ro),Tu=!0},r.clearConfig=function(){Rt=null,Tu=!1},r.isValidAttribute=function(Ro,Lt,vs){Rt||Ts({});const ho=Ct(Ro),Vl=Ct(Lt);return HI(ho,Vl,vs)},r.addHook=function(Ro,Lt){typeof Lt=="function"&&Z8(Bn[Ro],Lt)},r.removeHook=function(Ro,Lt){if(Lt!==void 0){const vs=sj(Bn[Ro],Lt);return vs===-1?void 0:oj(Bn[Ro],vs,1)[0]}return $x(Bn[Ro])},r.removeHooks=function(Ro){Bn[Ro]=[]},r.removeAllHooks=function(){Bn=ere()},r}var MP=A_();const tre=Gt.each,SCe=Gt.trim,CCe=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],wCe={ftp:21,http:80,https:443,mailto:25},pm=["img","video"],Vx=(s,r)=>he(s)?!s:he(r)?!Qe(pm,r):!0,S1=s=>{try{return decodeURIComponent(s)}catch{return unescape(s)}},_h=(s,r,c)=>{const p=S1(r).replace(/\s/g,"");return s.allow_script_urls?!1:/((java|vb)script|mhtml):/i.test(p)?!0:s.allow_html_data_urls?!1:/^data:image\//i.test(p)?Vx(s.allow_svg_data_urls,c)&&/^data:image\/svg\+xml/i.test(p):/^data:/i.test(p)};class mm{static parseDataUri(r){let c;const p=decodeURIComponent(r).split(","),g=/data:([^;]+)/.exec(p[0]);return g&&(c=g[1]),{type:c,data:p[1]}}static isDomSafe(r,c,p={}){if(p.allow_script_urls)return!0;{const g=eh.decode(r).replace(/[\s\u0000-\u001F]+/g,"");return!_h(p,g,c)}}static getDocumentBaseUrl(r){var c;let p;return r.protocol.indexOf("http")!==0&&r.protocol!=="file:"?p=(c=r.href)!==null&&c!==void 0?c:"":p=r.protocol+"//"+r.host+r.pathname,/^[^:]+:\/\/\/?[^\/]+\//.test(p)&&(p=p.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(p)||(p+="/")),p}constructor(r,c={}){this.path="",this.directory="",r=SCe(r),this.settings=c;const p=c.base_uri,g=this;if(/^([\w\-]+):([^\/]{2})/i.test(r)||/^\s*#/.test(r)){g.source=r;return}const _=r.indexOf("//")===0;if(r.indexOf("/")===0&&!_&&(r=(p&&p.protocol||"http")+"://mce_host"+r),!/^[\w\-]*:?\/\//.test(r)){const R=p?p.path:new mm(document.location.href).directory;if((p==null?void 0:p.protocol)==="")r="//mce_host"+g.toAbsPath(R,r);else{const N=/([^#?]*)([#?]?.*)/.exec(r);N&&(r=(p&&p.protocol||"http")+"://mce_host"+g.toAbsPath(R,N[1])+N[2])}}r=r.replace(/@@/g,"(mce_at)");const E=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?(\[[a-zA-Z0-9:.%]+\]|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(r);E&&tre(CCe,(R,N)=>{let j=E[N];j&&(j=j.replace(/\(mce_at\)/g,"@@")),g[R]=j}),p&&(g.protocol||(g.protocol=p.protocol),g.userInfo||(g.userInfo=p.userInfo),!g.port&&g.host==="mce_host"&&(g.port=p.port),(!g.host||g.host==="mce_host")&&(g.host=p.host),g.source=""),_&&(g.protocol="")}setPath(r){const c=/^(.*?)\/?(\w+)?$/.exec(r);c&&(this.path=c[0],this.directory=c[1],this.file=c[2]),this.source="",this.getURI()}toRelative(r){if(r==="./")return r;const c=new mm(r,{base_uri:this});if(c.host!=="mce_host"&&this.host!==c.host&&c.host||this.port!==c.port||this.protocol!==c.protocol&&c.protocol!=="")return c.getURI();const p=this.getURI(),g=c.getURI();if(p===g||p.charAt(p.length-1)==="/"&&p.substr(0,p.length-1)===g)return p;let _=this.toRelPath(this.path,c.path);return c.query&&(_+="?"+c.query),c.anchor&&(_+="#"+c.anchor),_}toAbsolute(r,c){const p=new mm(r,{base_uri:this});return p.getURI(c&&this.isSameOrigin(p))}isSameOrigin(r){if(this.host==r.host&&this.protocol==r.protocol){if(this.port==r.port)return!0;const c=this.protocol?wCe[this.protocol]:null;if(c&&(this.port||c)==(r.port||c))return!0}return!1}toRelPath(r,c){let p=0,g="",_,E;const R=r.substring(0,r.lastIndexOf("/")).split("/"),N=c.split("/");if(R.length>=N.length){for(_=0,E=R.length;_<E;_++)if(_>=N.length||R[_]!==N[_]){p=_+1;break}}if(R.length<N.length){for(_=0,E=N.length;_<E;_++)if(_>=R.length||R[_]!==N[_]){p=_+1;break}}if(p===1)return c;for(_=0,E=R.length-(p-1);_<E;_++)g+="../";for(_=p-1,E=N.length;_<E;_++)_!==p-1?g+="/"+N[_]:g+=N[_];return g}toAbsPath(r,c){let p=0;const g=/\/$/.test(c)?"/":"",_=r.split("/"),E=c.split("/"),R=[];tre(_,fe=>{fe&&R.push(fe)});const N=[];for(let fe=E.length-1;fe>=0;fe--)if(!(E[fe].length===0||E[fe]===".")){if(E[fe]===".."){p++;continue}if(p>0){p--;continue}N.push(E[fe])}const j=R.length-p;let ae;return j<=0?ae=Zn(N).join("/"):ae=R.slice(0,j).join("/")+"/"+Zn(N).join("/"),ae.indexOf("/")!==0&&(ae="/"+ae),g&&ae.lastIndexOf("/")!==ae.length-1&&(ae+=g),ae}getURI(r=!1){let c;return(!this.source||r)&&(c="",r||(this.protocol?c+=this.protocol+"://":c+="//",this.userInfo&&(c+=this.userInfo+"@"),this.host&&(c+=this.host),this.port&&(c+=":"+this.port)),this.path&&(c+=this.path),this.query&&(c+="?"+this.query),this.anchor&&(c+="#"+this.anchor),this.source=c),this.source}}const X8=Gt.makeMap("src,href,data,background,action,formaction,poster,xlink:href"),NP="data-mce-type";let FP=0;const nre=(s,r,c,p,g)=>{var _,E,R,N;const j=r.validate,ae=c.getSpecialElements();s.nodeType===ja&&!r.allow_conditional_comments&&/^\[if/i.test((_=s.nodeValue)!==null&&_!==void 0?_:"")&&(s.nodeValue=" "+s.nodeValue);const fe=(E=g==null?void 0:g.tagName)!==null&&E!==void 0?E:s.nodeName.toLowerCase();if(p!=="html"&&c.isValid(p)){he(g)&&(g.allowedTags[fe]=!0);return}if(s.nodeType!==Zf||fe==="body")return;const ve=et.fromDom(s),xe=Gp(ve,NP),De=ql(ve,"data-mce-bogus");if(!xe&&z(De)){De==="all"?ti(ve):Xp(ve);return}const Oe=c.getElementRule(fe);if(j&&!Oe){Kt(ae,fe)?ti(ve):Xp(ve);return}else he(g)&&(g.allowedTags[fe]=!0);if(j&&Oe&&!xe){if(Ve((R=Oe.attributesForced)!==null&&R!==void 0?R:[],Ne=>{el(ve,Ne.name,Ne.value==="{$uid}"?"mce_".concat(FP++):Ne.value)}),Ve((N=Oe.attributesDefault)!==null&&N!==void 0?N:[],Ne=>{Gp(ve,Ne.name)||el(ve,Ne.name,Ne.value==="{$uid}"?"mce_".concat(FP++):Ne.value)}),Oe.attributesRequired&&!Ot(Oe.attributesRequired,Ne=>Gp(ve,Ne))){Xp(ve);return}if(Oe.removeEmptyAttrs&&Hm(ve)){Xp(ve);return}Oe.outputName&&Oe.outputName!==fe&&by(ve,Oe.outputName)}},sre=(s,r,c,p,g)=>{const _=s.tagName.toLowerCase(),{attrName:E,attrValue:R}=g;g.keepAttr=O_(r,c,p,_,E,R),g.keepAttr?(g.allowedAttributes[E]=!0,wa(E,c)&&(g.attrValue=E),r.allow_svg_data_urls&&hr(R,"data:image/svg+xml")&&(g.forceKeepAttr=!0)):$P(s,E)&&(g.forceKeepAttr=!0)},O_=(s,r,c,p,g,_)=>c!=="html"&&!k0(p)?!0:!(g in X8&&_h(s,_,p))&&(!s.validate||r.isValid(p,g)||hr(g,"data-")||hr(g,"aria-")),$P=(s,r)=>s.hasAttribute(NP)&&(r==="id"||r==="class"||r==="style"),wa=(s,r)=>s in r.getBoolAttrs(),ore=(s,r,c,p)=>{const{attributes:g}=s;for(let _=g.length-1;_>=0;_--){const E=g[_],R=E.name,N=E.value;!O_(r,c,p,s.tagName.toLowerCase(),R,N)&&!$P(s,R)?s.removeAttribute(R):wa(R,c)&&s.setAttribute(R,R)}},rre=(s,r,c)=>{const p=MP();return p.addHook("uponSanitizeElement",(g,_)=>{nre(g,s,r,c.track(g),_)}),p.addHook("uponSanitizeAttribute",(g,_)=>{sre(g,s,r,c.current(),_)}),p},R_=(s,r)=>{const p={...{IN_PLACE:!0,ALLOW_UNKNOWN_PROTOCOLS:!0,ALLOWED_TAGS:["#comment","#cdata-section","body"],ALLOWED_ATTR:[],SAFE_FOR_XML:!1}};return p.PARSER_MEDIA_TYPE=r,s.allow_script_urls?p.ALLOWED_URI_REGEXP=/.*/:s.allow_html_data_urls&&(p.ALLOWED_URI_REGEXP=/^(?!(\w+script|mhtml):)/i),p},D_=s=>{const r=["type","href","role","arcrole","title","show","actuate","label","from","to"].map(p=>"xlink:".concat(p)),c={IN_PLACE:!0,USE_PROFILES:{html:!0,svg:!0,svgFilters:!0},ALLOWED_ATTR:r};MP().sanitize(s,c)},L_=(s,r)=>{const c={IN_PLACE:!0,USE_PROFILES:{mathMl:!0}},p=MP(),g=r.allow_mathml_annotation_encodings,_=ue(g)&&g.length>0,E=R=>{const N=R.getAttribute("encoding");return _&&z(N)&&Qe(g,N)};p.addHook("uponSanitizeElement",(R,N)=>{var j;const ae=(j=N.tagName)!==null&&j!==void 0?j:R.nodeName.toLowerCase();if(_&&ae==="semantics"&&(N.allowedTags[ae]=!0),ae==="annotation"){const fe=R,ve=E(fe);N.allowedTags[ae]=ve,ve||fe.remove()}}),p.sanitize(s,c)},BP=s=>r=>{const c=Jh(r);if(c==="svg")D_(r);else if(c==="math")L_(r,s);else throw new Error("Not a namespace element")},VP=(s,r)=>{const c=sp();if(s.sanitize){const p=rre(s,r,c);return{sanitizeHtmlElement:(_,E)=>{p.sanitize(_,R_(s,E)),p.removed=[],c.reset()},sanitizeNamespaceElement:BP(s)}}else return{sanitizeHtmlElement:(_,E)=>{const R=document.createNodeIterator(_,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_COMMENT|NodeFilter.SHOW_TEXT);let N;for(;N=R.nextNode();){const j=c.track(N);nre(N,s,r,j),Ln(N)&&ore(N,s,r,j)}c.reset()},sanitizeNamespaceElement:Ue}},HP=Gt.makeMap,UP=Gt.extend,hj=(s,r,c,p)=>{const g=s.name,_=g in c&&g!=="title"&&g!=="textarea"&&g!=="noscript",E=r.childNodes;for(let R=0,N=E.length;R<N;R++){const j=E[R],ae=new gd(j.nodeName.toLowerCase(),j.nodeType);if(Ln(j)){const fe=j.attributes;for(let ve=0,xe=fe.length;ve<xe;ve++){const De=fe[ve];ae.attr(De.name,De.value)}k0(ae.name)&&(p(j),ae.value=j.innerHTML)}else un(j)?(ae.value=j.data,_&&(ae.raw=!0)):(dl(j)||yu(j)||Qp(j))&&(ae.value=j.data);k0(ae.name)||hj(ae,j,c,p),s.append(ae)}},ire=(s,r,c)=>{const p=[];for(let g=s,_=g;g;_=g,g=g.walk()){const E=g;Ve(r,R=>R(E)),de(E.parent)&&E!==s?g=_:p.push(E)}for(let g=p.length-1;g>=0;g--){const _=p[g];Ve(c,E=>E(_))}},gj=(s,r,c,p)=>{const g=c.validate,_=r.getNonEmptyElements(),E=r.getWhitespaceElements(),R=UP(HP("script,style,head,html,body,title,meta,param"),r.getBlockElements()),N=PC(r),j=/[ \t\r\n]+/g,ae=/^[ \t\r\n]+/,fe=/[ \t\r\n]+$/,ve=ut=>{let gt=ut.parent;for(;he(gt);){if(gt.name in E)return!0;gt=gt.parent}return!1},xe=ut=>{let gt=ut;for(;he(gt);){if(gt.name in N)return _l(r,_,E,gt);gt=gt.parent}return!1},De=ut=>ut.name in R||e4(r,ut)||k0(ut.name)&&ut.parent===s,Oe=(ut,gt)=>{const Tt=gt?ut.prev:ut.next;return he(Tt)||de(ut.parent)?!1:De(ut.parent)&&(ut.parent!==s||p.isRootContent===!0)};return[ut=>{var gt;if(ut.type===3&&!ve(ut)){let Tt=(gt=ut.value)!==null&>!==void 0?gt:"";Tt=Tt.replace(j," "),(ioe(ut.prev,De)||Oe(ut,!0))&&(Tt=Tt.replace(ae,"")),Tt.length===0||Tt===" "&&ut.prev&&ut.prev.type===ja&&ut.next&&ut.next.type===ja?ut.remove():ut.value=Tt}},ut=>{var gt;if(ut.type===1){const Tt=r.getElementRule(ut.name);if(g&&Tt){const Jt=_l(r,_,E,ut);Tt.paddInEmptyBlock&&Jt&&xe(ut)?YL(c,p,De,ut):Tt.removeEmpty&&Jt?De(ut)?ut.remove():ut.unwrap():Tt.paddEmpty&&(Jt||K2(ut))&&YL(c,p,De,ut)}}else if(ut.type===3&&!ve(ut)){let Tt=(gt=ut.value)!==null&>!==void 0?gt:"";(ut.next&&De(ut.next)||Oe(ut,!1))&&(Tt=Tt.replace(fe,"")),Tt.length===0?ut.remove():ut.value=Tt}}]},are=(s,r)=>{var c;const p=(c=r.forced_root_block)!==null&&c!==void 0?c:s.forced_root_block;return p===!1?"":p===!0?"p":p},P_=(s={},r=o1())=>{const c=W8(),p=W8(),g={validate:!0,root_name:"body",sanitize:!0,...s},_=new DOMParser,E=VP(g,r),R=(gt,Tt,Jt="html")=>{const vn=Jt==="xhtml"?"application/xhtml+xml":"text/html",qn=Kt(r.getSpecialElements(),Tt.toLowerCase()),Ut=qn?"<".concat(Tt,">").concat(gt,"</").concat(Tt,">"):gt,Et=()=>Jt==="xhtml"?'<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'.concat(Ut,"</body></html>"):/^[\s]*<head/i.test(gt)||/^[\s]*<html/i.test(gt)||/^[\s]*<!DOCTYPE/i.test(gt)?"<html>".concat(Ut,"</html>"):"<body>".concat(Ut,"</body>"),Qt=_.parseFromString(Et(),vn).body;return E.sanitizeHtmlElement(Qt,vn),qn?Qt.firstChild:Qt},N=c.addFilter,j=c.getFilters,ae=c.removeFilter,fe=p.addFilter,ve=p.getFilters,xe=p.removeFilter,De=(gt,Tt)=>{XL(r,gt)&&Tt.push(gt)},Oe=(gt,Tt)=>{const Jt=z(Tt.attr(NP)),vn=Tt.type===1&&!Kt(gt,Tt.name)&&!e4(r,Tt)&&!k0(Tt.name);return Tt.type===3||vn&&!Jt},Ne=(gt,Tt)=>{const Jt=UP(HP("script,style,head,html,body,title,meta,param"),r.getBlockElements()),vn=/^[ \t\r\n]+/,qn=/[ \t\r\n]+$/;let Ut=gt.firstChild,Et=null;const Qt=Bn=>{var hs,mo;Bn&&(Ut=Bn.firstChild,Ut&&Ut.type===3&&(Ut.value=(hs=Ut.value)===null||hs===void 0?void 0:hs.replace(vn,"")),Ut=Bn.lastChild,Ut&&Ut.type===3&&(Ut.value=(mo=Ut.value)===null||mo===void 0?void 0:mo.replace(qn,"")))};if(r.isValidChild(gt.name,Tt.toLowerCase())){for(;Ut;){const Bn=Ut.next;Oe(Jt,Ut)?(Et||(Et=new gd(Tt,1),Et.attr(g.forced_root_block_attrs),gt.insert(Et,Ut)),Et.append(Ut)):(Qt(Et),Et=null),Ut=Bn}Qt(Et)}},ut={schema:r,addAttributeFilter:fe,getAttributeFilters:ve,removeAttributeFilter:xe,addNodeFilter:N,getNodeFilters:j,removeNodeFilter:ae,parse:(gt,Tt={})=>{var Jt;const vn=g.validate,qn=(Jt=Tt.context)!==null&&Jt!==void 0?Jt:g.root_name,Ut=R(gt,qn,Tt.format);J5(r,Ut);const Et=new gd(qn,11);hj(Et,Ut,r.getSpecialElements(),E.sanitizeNamespaceElement),Ut.innerHTML="";const[Qt,Bn]=gj(Et,r,g,Tt),hs=[],mo=vn?Na=>De(Na,hs):Ue,bo={nodes:{},attributes:{}},dr=Na=>lW(j(),ve(),Na,bo);if(ire(Et,[Qt,dr],[Bn,mo]),hs.reverse(),vn&&hs.length>0)if(Tt.context){const{pass:Na,fail:Fl}=kn(hs,sc=>sc.parent===Et);or(Fl,r,Et,dr),Tt.invalid=Na.length>0}else or(hs,r,Et,dr);const Vr=are(g,Tt);return Vr&&(Et.name==="body"||Tt.isRootContent)&&Ne(Et,Vr),Tt.invalid||GL(bo,Tt),Et}};return xP(ut,g),CP(ut,g,r),ut},lre=s=>Ku(s)?V2({validate:!1}).serialize(s):s,vj=(s,r,c)=>{const p=lre(s),g=r(p);if(g.isDefaultPrevented())return g;if(Ku(s))if(g.content!==p){const _=P_({validate:!1,forced_root_block:!1,...c}).parse(g.content,{context:s.name});return{...g,content:_}}else return{...g,content:s};else return g},bj=s=>({sanitize:Fy(s),sandbox_iframes:O6(s),sandbox_iframes_exclusions:GE(s)}),zP=(s,r)=>{if(r.no_events)return Wu.value(r);{const c=u6(s,r);return c.isDefaultPrevented()?Wu.error(d6(s,{content:"",...c}).content):Wu.value(c)}},yj=(s,r,c)=>c.no_events?r:vj(r,g=>d6(s,{...c,content:g}),bj(s)).content,h3=(s,r)=>{if(r.no_events)return Wu.value(r);{const c=vj(r.content,p=>xE(s,{...r,content:p}),bj(s));return c.isDefaultPrevented()?(O4(s,c),Wu.error(void 0)):Wu.value(c)}},Hx=(s,r,c)=>{c.no_events||O4(s,{...c,content:r})},WP=(s,r,c)=>({element:s,width:r,rows:c}),jP=(s,r)=>({element:s,cells:r}),cre=(s,r)=>({x:s,y:r}),ZP=(s,r)=>ld(s,r).bind(Mu).getOr(1),ure=(s,r,c,p,g)=>{const _=ZP(g,"rowspan"),E=ZP(g,"colspan"),R=s.rows;for(let N=c;N<c+_;N++){R[N]||(R[N]=jP(q9(p),[]));for(let j=r;j<r+E;j++){const ae=R[N].cells;ae[j]=N===c&&j===r?g:oh(g)}}},dre=(s,r,c)=>{const p=s.rows;return!!(p[c]?p[c].cells:[])[r]},_j=(s,r,c)=>{for(;dre(s,r,c);)r++;return r},qP=s=>je(s,(r,c)=>c.cells.length>r?c.cells.length:r,0),GP=(s,r)=>{const c=s.rows;for(let p=0;p<c.length;p++){const g=c[p].cells;for(let _=0;_<g.length;_++)if(Yo(g[_],r))return ye.some(cre(_,p))}return ye.none()},KP=(s,r,c,p,g)=>{const _=[],E=s.rows;for(let R=c;R<=g;R++){const N=E[R].cells,j=r<p?N.slice(r,p+1):N.slice(p,r+1);_.push(jP(E[R].element,j))}return _},Sj=(s,r,c)=>{const p=r.x,g=r.y,_=c.x,E=c.y,R=g<E?KP(s,p,g,_,E):KP(s,p,E,_,g);return WP(s.element,qP(R),R)},Cj=(s,r)=>{const c=oh(s.element),p=et.fromTag("tbody");return jm(p,r),Ri(c,p),c},fre=s=>Nt(s.rows,r=>{const c=Nt(r.cells,g=>{const _=q9(g);return gi(_,"colspan"),gi(_,"rowspan"),_}),p=oh(r.element);return jm(p,c),p}),pre=s=>{const r=WP(oh(s),0,[]);return Ve(Pc(s,"tr"),(c,p)=>{Ve(Pc(c,"td,th"),(g,_)=>{ure(r,_j(r,_,p),p,c,g)})}),WP(r.element,qP(r.rows),r.rows)},mre=s=>Cj(s,fre(s)),YP=(s,r,c)=>GP(s,r).bind(p=>GP(s,c).map(g=>Sj(s,p,g))),J8=s=>pt(s,r=>oo(r)==="ul"||oo(r)==="ol"),wj=(s,r)=>pt(s,c=>oo(c)==="li"&&W6(c,r)).fold(Fe([]),c=>J8(s).map(p=>{const g=et.fromTag(oo(p)),_=us(Xc(p),(E,R)=>hr(R,"list-style"));return no(g,_),[et.fromTag("li"),g]}).getOr([])),Ej=(s,r)=>{const c=je(r,(p,g)=>(Ri(g,p),g),s);return r.length>0?g8([c]):c},Ux=s=>d2(s)?Yc(s).filter(u2).fold(Fe([]),r=>[s,r]):u2(s)?[s]:[],hre=(s,r,c)=>{const p=et.fromDom(r.commonAncestorContainer),g=ov(p,s),_=Bt(g,N=>c.isWrapper(oo(N))),E=wj(g,r),R=_.concat(E.length?E:Ux(p));return Nt(R,oh)},kj=()=>g8([]),g3=(s,r,c)=>Ej(et.fromDom(r.cloneContents()),hre(s,r,c)),XP=(s,r)=>y0(r,"table",He(Yo,s)),xj=(s,r)=>XP(s,r[0]).bind(c=>{const p=r[0],g=r[r.length-1],_=pre(c);return YP(_,p,g).map(E=>g8([mre(E)]))}).getOrThunk(kj),Q8=(s,r,c)=>r.length>0&&r[0].collapsed?kj():g3(s,r[0],c),Tj=(s,r,c)=>{const p=Sk(r,s);return p.length>0?xj(s,p):Q8(s,r,c)},M_=(s,r)=>r>=0&&r<s.length&&fh(s.charAt(r)),JP=s=>Md(s.innerText),Ij=s=>s.map(r=>r.nodeName).getOr("div").toLowerCase(),gre=s=>ye.from(s.selection.getRng()).map(r=>{var c;const p=ye.from(s.dom.getParent(r.commonAncestorContainer,s.dom.isBlock)),g=s.getBody(),_=Ij(p),E=et.fromDom(r.cloneContents());pz(E),mz(E);const R=s.dom.add(g,_,{"data-mce-bogus":"all",style:"overflow: hidden; opacity: 0;"},E.dom),N=JP(R),j=Md((c=R.textContent)!==null&&c!==void 0?c:"");if(s.dom.remove(R),M_(j,0)||M_(j,j.length-1)){const ae=p.getOr(g),fe=JP(ae),ve=fe.indexOf(N);if(ve===-1)return N;{const xe=M_(fe,ve-1),De=M_(fe,ve+N.length);return(xe?" ":"")+N+(De?" ":"")}}else return N}).getOr(""),vre=(s,r)=>{const c=s.selection.getRng(),p=s.dom.create("body"),g=s.selection.getSel(),_=jk(s,yk(g)),E=r.contextual?Tj(et.fromDom(s.getBody()),_,s.schema).dom:c.cloneContents();return E&&p.appendChild(E),s.selection.serializer.serialize(p,r)},bre=(s,r)=>{if(r.format==="text")return gre(s);{const c=vre(s,r);return r.format==="tree"?c:s.selection.isCollapsed()?"":c}},QP=(s,r)=>({...s,format:r,get:!0,selection:!0,getInner:!0}),yre=(s,r,c={})=>{const p=QP(c,r);return zP(s,p).fold(St,g=>{const _=bre(s,g);return yj(s,_,g)})},zx=0,Aj=1,Oj=2,_re=(s,r)=>{const c=s.length+r.length+2,p=new Array(c),g=new Array(c),_=(ae,fe,ve)=>({start:ae,end:fe,diag:ve}),E=(ae,fe,ve,xe,De)=>{const Oe=N(ae,fe,ve,xe);if(Oe===null||Oe.start===fe&&Oe.diag===fe-xe||Oe.end===ae&&Oe.diag===ae-ve){let Ne=ae,tt=ve;for(;Ne<fe||tt<xe;)Ne<fe&&tt<xe&&s[Ne]===r[tt]?(De.push([zx,s[Ne]]),++Ne,++tt):fe-ae>xe-ve?(De.push([Oj,s[Ne]]),++Ne):(De.push([Aj,r[tt]]),++tt)}else{E(ae,Oe.start,ve,Oe.start-Oe.diag,De);for(let Ne=Oe.start;Ne<Oe.end;++Ne)De.push([zx,s[Ne]]);E(Oe.end,fe,Oe.end-Oe.diag,xe,De)}},R=(ae,fe,ve,xe)=>{let De=ae;for(;De-fe<xe&&De<ve&&s[De]===r[De-fe];)++De;return _(ae,De,fe)},N=(ae,fe,ve,xe)=>{const De=fe-ae,Oe=xe-ve;if(De===0||Oe===0)return null;const Ne=De-Oe,tt=Oe+De,ut=(tt%2===0?tt:tt+1)/2;p[1+ut]=ae,g[1+ut]=fe+1;let gt,Tt,Jt,vn,qn;for(gt=0;gt<=ut;++gt){for(Tt=-gt;Tt<=gt;Tt+=2){for(Jt=Tt+ut,Tt===-gt||Tt!==gt&&p[Jt-1]<p[Jt+1]?p[Jt]=p[Jt+1]:p[Jt]=p[Jt-1]+1,vn=p[Jt],qn=vn-ae+ve-Tt;vn<fe&&qn<xe&&s[vn]===r[qn];)p[Jt]=++vn,++qn;if(Ne%2!==0&&Ne-gt<=Tt&&Tt<=Ne+gt&&g[Jt-Ne]<=p[Jt])return R(g[Jt-Ne],Tt+ae-ve,fe,xe)}for(Tt=Ne-gt;Tt<=Ne+gt;Tt+=2){for(Jt=Tt+ut-Ne,Tt===Ne-gt||Tt!==Ne+gt&&g[Jt+1]<=g[Jt-1]?g[Jt]=g[Jt+1]-1:g[Jt]=g[Jt-1],vn=g[Jt]-1,qn=vn-ae+ve-Tt;vn>=ae&&qn>=ve&&s[vn]===r[qn];)g[Jt]=vn--,qn--;if(Ne%2===0&&-gt<=Tt&&Tt<=gt&&g[Jt]<=p[Jt+Ne])return R(g[Jt],Tt+ae-ve,fe,xe)}}return null},j=[];return E(0,s.length,0,r.length,j),j},Rj=s=>Ln(s)?s.outerHTML:un(s)?eh.encodeRaw(s.data,!1):dl(s)?"<!--"+s.data+"-->":"",Sre=s=>{let r;const c=document.createElement("div"),p=document.createDocumentFragment();for(s&&(c.innerHTML=s);r=c.firstChild;)p.appendChild(r);return p},Cre=(s,r,c)=>{const p=Sre(r);if(s.hasChildNodes()&&c<s.childNodes.length){const g=s.childNodes[c];s.insertBefore(p,g)}else s.appendChild(p)},wre=(s,r)=>{if(s.hasChildNodes()&&r<s.childNodes.length){const c=s.childNodes[r];s.removeChild(c)}},Ere=(s,r)=>{let c=0;Ve(s,p=>{p[0]===zx?c++:p[0]===Aj?(Cre(r,p[1],c),c++):p[0]===Oj&&wre(r,c)})},kre=(s,r)=>Bt(Nt(Mo(s.childNodes),V(Md,Rj)),c=>c.length>0),xre=(s,r)=>{const c=Nt(Mo(r.childNodes),Rj);return Ere(_re(c,s),r),r},Tre=Es(()=>document.implementation.createHTMLDocument("undo")),Dj=s=>s.querySelector("iframe")!==null,Ire=s=>({type:"fragmented",fragments:s,content:"",bookmark:null,beforeBookmark:null}),Wx=s=>({type:"complete",fragments:null,content:s,bookmark:null,beforeBookmark:null}),Bc=s=>{const r=s.serializer.getTempAttrs(),c=fz(s.getBody(),r);return Dj(c)?Ire(kre(c)):Wx(Md(c.innerHTML))},eM=(s,r,c)=>{const p=c?r.beforeBookmark:r.bookmark;r.type==="fragmented"?xre(r.fragments,s.getBody()):s.setContent(r.content,{format:"raw",no_selection:he(p)&&mk(p)?!p.isFakeCaret:!0}),p&&(s.selection.moveToBookmark(p),s.selection.scrollIntoView())},N_=s=>s.type==="fragmented"?s.fragments.join(""):s.content,J2=s=>{const r=et.fromTag("body",Tre());return S0(r,N_(s)),Ve(Pc(r,"*[data-mce-bogus]"),Xp),Gi(r)},Lj=(s,r)=>N_(s)===N_(r),_f=(s,r)=>J2(s)===J2(r),uv=(s,r)=>!s||!r?!1:Lj(s,r)?!0:_f(s,r),jx=s=>s.get()===0,Zx=(s,r,c)=>{jx(c)&&(s.typing=r)},tM=(s,r)=>{s.typing&&(Zx(s,!1,r),s.add())},Are=s=>{s.typing&&(s.typing=!1,s.add())},Pj=(s,r,c)=>{jx(r)&&c.set(n6(s.selection))},e7=(s,r,c,p,g,_,E)=>{const R=Bc(s),N=Gt.extend(_||{},R);if(!jx(p)||s.removed)return null;const j=r.data[c.get()];if(s.dispatch("BeforeAddUndo",{level:N,lastLevel:j,originalEvent:E}).isDefaultPrevented()||j&&uv(j,N))return null;r.data[c.get()]&&g.get().each(ve=>{r.data[c.get()].beforeBookmark=ve});const ae=z0(s);if(ae&&r.data.length>ae){for(let ve=0;ve<r.data.length-1;ve++)r.data[ve]=r.data[ve+1];r.data.length--,c.set(r.data.length)}N.bookmark=n6(s.selection),c.get()<r.data.length-1&&(r.data.length=c.get()+1),r.data.push(N),c.set(r.data.length-1);const fe={level:N,lastLevel:j,originalEvent:E};return c.get()>0?(s.setDirty(!0),s.dispatch("AddUndo",fe),s.dispatch("change",fe)):s.dispatch("AddUndo",fe),N},nM=(s,r,c)=>{r.data=[],c.set(0),r.typing=!1,s.dispatch("ClearUndos")},Ore=(s,r,c,p,g)=>{if(r.transact(p)){const _=r.data[c.get()].bookmark,E=r.data[c.get()-1];eM(s,E,!0),r.transact(g)&&(r.data[c.get()-1].beforeBookmark=_)}},Mj=(s,r,c)=>{let p;return r.get()<c.length-1&&(r.set(r.get()+1),p=c[r.get()],eM(s,p,!1),s.setDirty(!0),s.dispatch("Redo",{level:p})),p},Rre=(s,r,c,p)=>{let g;return r.typing&&(r.add(),r.typing=!1,Zx(r,!1,c)),p.get()>0&&(p.set(p.get()-1),g=r.data[p.get()],eM(s,g,!0),s.setDirty(!0),s.dispatch("Undo",{level:g})),g},sM=s=>{s.clear(),s.add()},oM=(s,r,c)=>c.get()>0||r.typing&&r.data[0]&&!uv(Bc(s),r.data[0]),Dre=(s,r)=>r.get()<s.data.length-1&&!s.typing,Lre=(s,r,c)=>(tM(s,r),s.beforeChange(),s.ignore(c),s.add()),Nj=(s,r)=>{try{s.set(s.get()+1),r()}finally{s.set(s.get()-1)}},C1=(s,r)=>{const c=s.dom,p=he(r)?r:s.getBody();Ve(c.select("table,a",p),g=>{switch(g.nodeName){case"TABLE":const _=k6(s),E=c.getAttrib(g,"border");(!E||E==="0")&&s.hasVisual?c.addClass(g,_):c.removeClass(g,_);break;case"A":if(!c.getAttrib(g,"href")){const R=c.getAttrib(g,"name")||g.id,N=ch(s);R&&s.hasVisual?c.addClass(g,N):c.removeClass(g,N)}break}}),s.dispatch("VisualAid",{element:r,hasVisual:s.hasVisual})},qx=s=>({init:{bindEvents:Ue},undoManager:{beforeChange:(r,c)=>Pj(s,r,c),add:(r,c,p,g,_,E)=>e7(s,r,c,p,g,_,E),undo:(r,c,p)=>Rre(s,r,c,p),redo:(r,c)=>Mj(s,r,c),clear:(r,c)=>nM(s,r,c),reset:r=>sM(r),hasUndo:(r,c)=>oM(s,r,c),hasRedo:(r,c)=>Dre(r,c),transact:(r,c,p)=>Lre(r,c,p),ignore:(r,c)=>Nj(r,c),extra:(r,c,p,g)=>Ore(s,r,c,p,g)},formatter:{match:(r,c,p,g)=>_x(s,r,c,p,g),matchAll:(r,c)=>oP(s,r,c),matchNode:(r,c,p,g)=>_1(s,r,c,p,g),canApply:r=>Sx(s,r),closest:r=>hW(s,r),apply:(r,c,p)=>jW(s,r,c,p),remove:(r,c,p,g)=>VW(s,r,c,p,g),toggle:(r,c,p)=>Moe(s,r,c,p),formatChanged:(r,c,p,g,_)=>Poe(s,r,c,p,g,_)},editor:{getContent:r=>vz(s,r),setContent:(r,c)=>_oe(s,r,c),insertContent:(r,c)=>y1(s,r,c),addVisual:r=>C1(s,r)},selection:{getContent:(r,c)=>yre(s,r,c)},autocompleter:{addDecoration:Ue,removeDecoration:Ue},raw:{getModel:()=>ye.none()}}),Pre=s=>{const r=j=>q(j)?j:{},{init:c,undoManager:p,formatter:g,editor:_,selection:E,autocompleter:R,raw:N}=s;return{init:{bindEvents:c.bindEvents},undoManager:{beforeChange:p.beforeChange,add:p.add,undo:p.undo,redo:p.redo,clear:p.clear,reset:p.reset,hasUndo:p.hasUndo,hasRedo:p.hasRedo,transact:(j,ae,fe)=>p.transact(fe),ignore:(j,ae)=>p.ignore(ae),extra:(j,ae,fe,ve)=>p.extra(fe,ve)},formatter:{match:(j,ae,fe,ve)=>g.match(j,r(ae),ve),matchAll:g.matchAll,matchNode:g.matchNode,canApply:j=>g.canApply(j),closest:j=>g.closest(j),apply:(j,ae,fe)=>g.apply(j,r(ae)),remove:(j,ae,fe,ve)=>g.remove(j,r(ae)),toggle:(j,ae,fe)=>g.toggle(j,r(ae)),formatChanged:(j,ae,fe,ve,xe)=>g.formatChanged(ae,fe,ve,xe)},editor:{getContent:j=>_.getContent(j),setContent:(j,ae)=>({content:_.setContent(j,ae),html:""}),insertContent:(j,ae)=>(_.insertContent(j),""),addVisual:_.addVisual},selection:{getContent:(j,ae)=>E.getContent(ae)},autocompleter:{addDecoration:R.addDecoration,removeDecoration:R.removeDecoration},raw:{getModel:()=>ye.some(N.getRawModel())}}},Gx=()=>{const s=Fe(null),r=Fe("");return{init:{bindEvents:Ue},undoManager:{beforeChange:Ue,add:s,undo:s,redo:s,clear:Ue,reset:Ue,hasUndo:ct,hasRedo:ct,transact:s,ignore:Ue,extra:Ue},formatter:{match:ct,matchAll:Fe([]),matchNode:Fe(void 0),canApply:ct,closest:r,apply:Ue,remove:Ue,toggle:Ue,formatChanged:Fe({unbind:Ue})},editor:{getContent:r,setContent:Fe({content:"",html:""}),insertContent:Fe(""),addVisual:Ue},selection:{getContent:r},autocompleter:{addDecoration:Ue,removeDecoration:Ue},raw:{getModel:Fe(ye.none())}}},Sh=s=>Kt(s.plugins,"rtc"),Fj=s=>Vn(s.plugins,"rtc").bind(r=>ye.from(r.setup)),$j=s=>{const r=s;return Fj(s).fold(()=>(r.rtcInstance=qx(s),ye.none()),c=>(r.rtcInstance=Gx(),ye.some(()=>c().then(p=>(r.rtcInstance=Pre(p),p.rtc.isRemote)))))},Kx=s=>s.rtcInstance?s.rtcInstance:qx(s),ec=s=>{const r=s.rtcInstance;if(r)return r;throw new Error("Failed to get RTC instance not yet initialized.")},Mre=(s,r,c)=>{ec(s).undoManager.beforeChange(r,c)},Nre=(s,r,c,p,g,_,E)=>ec(s).undoManager.add(r,c,p,g,_,E),Fre=(s,r,c,p)=>ec(s).undoManager.undo(r,c,p),$re=(s,r,c)=>ec(s).undoManager.redo(r,c),Bj=(s,r,c)=>{ec(s).undoManager.clear(r,c)},Bre=(s,r)=>{ec(s).undoManager.reset(r)},Vre=(s,r,c)=>ec(s).undoManager.hasUndo(r,c),Hre=(s,r,c)=>ec(s).undoManager.hasRedo(r,c),Vj=(s,r,c,p)=>ec(s).undoManager.transact(r,c,p),rM=(s,r,c)=>{ec(s).undoManager.ignore(r,c)},iM=(s,r,c,p,g)=>{ec(s).undoManager.extra(r,c,p,g)},Hj=(s,r,c,p,g)=>ec(s).formatter.match(r,c,p,g),aM=(s,r,c)=>ec(s).formatter.matchAll(r,c),Uj=(s,r,c,p,g)=>ec(s).formatter.matchNode(r,c,p,g),zj=(s,r)=>ec(s).formatter.canApply(r),lM=(s,r)=>ec(s).formatter.closest(r),Wj=(s,r,c,p)=>{ec(s).formatter.apply(r,c,p)},jj=(s,r,c,p,g)=>{ec(s).formatter.remove(r,c,p,g)},Zj=(s,r,c,p)=>{ec(s).formatter.toggle(r,c,p)},Ure=(s,r,c,p,g,_)=>ec(s).formatter.formatChanged(r,c,p,g,_),cM=(s,r)=>Kx(s).editor.getContent(r),zre=(s,r,c)=>Kx(s).editor.setContent(r,c),Yx=(s,r,c)=>Kx(s).editor.insertContent(r,c),Wre=(s,r,c)=>ec(s).selection.getContent(r,c),jre=(s,r)=>ec(s).editor.addVisual(r),qj=s=>ec(s).init.bindEvents(),Gj=(s,r={})=>{const c=r.format?r.format:"html";return Wre(s,c,r)},uM=s=>s.dom.length===0?(ti(s),ye.none()):ye.some(s),Zre=(s,r)=>s.filter(c=>am.isBookmarkNode(c.dom)).bind(r?g0:Um),qre=(s,r,c,p,g)=>{const _=s.dom,E=r.dom,R=p?_.length:E.length;p?(xL(_,E,g,!1,!p),c.setStart(E,R)):(xL(E,_,g,!1,!p),c.setEnd(E,R))},Gre=(s,r,c)=>{Yc(s).each(p=>{const g=s.dom;r&&w8(p,$t(g,0),c)?Jk(g,0,c):!r&&__(p,$t(g,g.length),c)&&kL(g,g.length,c)})},Kj=(s,r,c,p,g)=>{s.bind(_=>((p?kL:Jk)(_.dom,p?_.dom.length:0,g),r.filter(Aa).map(R=>qre(_,R,c,p,g)))).orThunk(()=>Zre(r,p).or(r).filter(Aa).map(E=>Gre(E,p,g)))},Kre=(s,r,c)=>{const p=ye.from(r.firstChild).map(et.fromDom),g=ye.from(r.lastChild).map(et.fromDom);s.deleteContents(),s.insertNode(r);const _=p.bind(Um).filter(Aa).bind(uM),E=g.bind(g0).filter(Aa).bind(uM);Kj(_,p,s,!0,c),Kj(E,g,s,!1,c),s.collapse(!1)},Yj=(s,r)=>({format:"html",...s,set:!0,selection:!0,content:r}),ECe=(s,r)=>{if(r.format!=="raw"){const c=s.selection.getRng(),p=s.dom.getParent(c.commonAncestorContainer,s.dom.isBlock),g=p?{context:p.nodeName.toLowerCase()}:{},_=s.parser.parse(r.content,{forced_root_block:!1,...g,...r});return V2({validate:!1},s.schema).serialize(_)}else return r.content},Yre=(s,r,c={})=>{const p=Yj(c,r);h3(s,p).each(g=>{const _=ECe(s,g),E=s.selection.getRng();Kre(E,E.createContextualFragment(_),s.schema),s.selection.setRng(E),v_(s,E),Hx(s,_,g)})},Xj=(s,r,c)=>{if(Kt(s,r)){const p=Bt(s[r],g=>g!==c);p.length===0?delete s[r]:s[r]=p}};var Xre=(s,r)=>{let c,p;const g=(R,N)=>pt(N,j=>s.is(j,R)),_=R=>s.getParents(R,void 0,s.getRoot()),E=()=>{c={},p={},r.on("NodeChange",R=>{const N=R.element,j=_(N),ae={};bn(c,(fe,ve)=>{g(ve,j).each(xe=>{p[ve]||(Ve(fe,De=>{De(!0,{node:xe,selector:ve,parents:j})}),p[ve]=fe),ae[ve]=fe})}),bn(p,(fe,ve)=>{ae[ve]||(delete p[ve],Ve(fe,xe=>{xe(!1,{node:N,selector:ve,parents:j})}))})})};return{selectorChangedWithUnbind:(R,N)=>(c||E(),c[R]||(c[R]=[]),c[R].push(N),g(R,_(r.selection.getStart())).each(()=>{p[R]=c[R]}),{unbind:()=>{Xj(c,R,N),Xj(p,R,N)}})}};const Jj=s=>!!(s&&s.ownerDocument)&&Zi(et.fromDom(s.ownerDocument),et.fromDom(s)),Jre=s=>s?Jj(s.startContainer)&&Jj(s.endContainer):!1,Qj=(s,r,c,p)=>{let g,_;const{selectorChangedWithUnbind:E}=Xre(s,p),R=(Tn,gs)=>{const rr=s.createRng();he(Tn)&&he(gs)?(rr.setStart(Tn,gs),rr.setEnd(Tn,gs),Tt(rr),tt(!1)):(j6(s,rr,p.getBody(),!0),Tt(rr))},N=Tn=>Gj(p,Tn),j=(Tn,gs)=>Yre(p,Tn,gs),ae=Tn=>QU(p.getBody(),gt(),Tn),fe=Tn=>ez(p.getBody(),gt(),Tn),ve=(Tn,gs)=>Fl.getBookmark(Tn,gs),xe=Tn=>Fl.moveToBookmark(Tn),De=(Tn,gs)=>(sz(s,Tn,gs).each(Tt),Tn),Oe=()=>{const Tn=gt(),gs=ut();return!Tn||Tn.item?!1:Tn.compareEndPoints?Tn.compareEndPoints("StartToEnd",Tn)===0:!gs||Tn.collapsed},Ne=()=>{if(p.mode.isReadOnly())return!1;const Tn=gt(),gs=p.getBody().querySelectorAll('[data-mce-selected="1"]');return gs.length>0?ts(gs,rr=>s.isEditable(rr.parentElement)):XU(s,Tn)},tt=Tn=>{const gs=gt();gs.collapse(!!Tn),Tt(gs)},ut=()=>r.getSelection?r.getSelection():r.document.selection,gt=()=>{let Tn;const gs=(Un,nn,Nn)=>{try{return nn.compareBoundaryPoints(Un,Nn)}catch{return-1}},rr=r.document;if(he(p.bookmark)&&!mn(p)){const Un=eL(p);if(Un.isSome())return Un.map(nn=>jk(p,[nn])[0]).getOr(rr.createRange())}try{const Un=ut();Un&&!ng(Un.anchorNode)&&(Un.rangeCount>0?Tn=Un.getRangeAt(0):Tn=rr.createRange(),Tn=jk(p,[Tn])[0])}catch{}if(Tn||(Tn=rr.createRange()),Xv(Tn.startContainer)&&Tn.collapsed){const Un=s.getRoot();Tn.setStart(Un,0),Tn.setEnd(Un,0)}return g&&_&&(gs(Tn.START_TO_START,Tn,g)===0&&gs(Tn.END_TO_END,Tn,g)===0?Tn=_:(g=null,_=null)),Tn},Tt=(Tn,gs)=>{if(!Jre(Tn))return;const rr=ut();if(Tn=p.dispatch("SetSelectionRange",{range:Tn,forward:gs}).range,rr){_=Tn;try{rr.removeAllRanges(),rr.addRange(Tn)}catch{}gs===!1&&rr.extend&&(rr.collapse(Tn.endContainer,Tn.endOffset),rr.extend(Tn.startContainer,Tn.startOffset)),g=rr.rangeCount>0?rr.getRangeAt(0):null}if(!Tn.collapsed&&Tn.startContainer===Tn.endContainer&&(rr!=null&&rr.setBaseAndExtent)&&Tn.endOffset-Tn.startOffset<2&&Tn.startContainer.hasChildNodes()){const nn=Tn.startContainer.childNodes[Tn.startOffset];nn&&nn.nodeName==="IMG"&&(rr.setBaseAndExtent(Tn.startContainer,Tn.startOffset,Tn.endContainer,Tn.endOffset),(rr.anchorNode!==Tn.startContainer||rr.focusNode!==Tn.endContainer)&&rr.setBaseAndExtent(nn,0,nn,1))}p.dispatch("AfterSetSelectionRange",{range:Tn,forward:gs})},Jt=Tn=>(j(s.getOuterHTML(Tn)),Tn),vn=()=>tz(p.getBody(),gt()),qn=(Tn,gs)=>nz(s,gt(),Tn,gs),Ut=()=>{const Tn=ut(),gs=Tn==null?void 0:Tn.anchorNode,rr=Tn==null?void 0:Tn.focusNode;if(!Tn||!gs||!rr||ng(gs)||ng(rr))return!0;const Un=s.createRng(),nn=s.createRng();try{Un.setStart(gs,Tn.anchorOffset),Un.collapse(!0),nn.setStart(rr,Tn.focusOffset),nn.collapse(!0)}catch{return!0}return Un.compareBoundaryPoints(Un.START_TO_START,nn)<=0},Na={dom:s,win:r,serializer:c,editor:p,expand:(Tn={type:"word"})=>Tt(B2(s).expand(gt(),Tn)),collapse:tt,setCursorLocation:R,getContent:N,setContent:j,getBookmark:ve,moveToBookmark:xe,select:De,isCollapsed:Oe,isEditable:Ne,isForward:Ut,setNode:Jt,getNode:vn,getSel:ut,setRng:Tt,getRng:gt,getStart:ae,getEnd:fe,getSelectedBlocks:qn,normalize:()=>{const Tn=gt(),gs=ut();if(!TU(gs)&&D2(p)){const rr=b8(s,Tn);return rr.each(Un=>{Tt(Un,Ut())}),rr.getOr(Tn)}return Tn},selectorChanged:(Tn,gs)=>(E(Tn,gs),Na),selectorChangedWithUnbind:E,getScrollContainer:()=>{let Tn,gs=s.getRoot();for(;gs&&gs.nodeName!=="BODY";){if(gs.scrollHeight>gs.clientHeight){Tn=gs;break}gs=gs.parentNode}return Tn},scrollIntoView:(Tn,gs)=>{he(Tn)?YU(p,Tn,gs):v_(p,gt(),gs)},placeCaretAt:(Tn,gs)=>Tt(n3(Tn,gs,p.getDoc())),getBoundingClientRect:()=>{const Tn=gt();return Tn.collapsed?$t.fromRangeStart(Tn).getClientRects()[0]:Tn.getBoundingClientRect()},destroy:()=>{r=g=_=null,sc.destroy()}},Fl=am(Na),sc=Rg(Na,p);return Na.bookmarkManager=Fl,Na.controlSelection=sc,Na},Qre=(s,r,c)=>{r.addNodeFilter("br",(p,g,_)=>{const E=Gt.extend({},c.getBlockElements()),R=c.getNonEmptyElements(),N=c.getWhitespaceElements();E.body=1;const j=ae=>ae.name in E||e4(c,ae);for(let ae=0,fe=p.length;ae<fe;ae++){let ve=p[ae],xe=ve.parent;if(xe&&j(xe)&&ve===xe.lastChild){let De=ve.prev;for(;De;){const Oe=De.name;if(Oe!=="span"||De.attr("data-mce-type")!=="bookmark"){Oe==="br"&&(ve=null);break}De=De.prev}if(ve&&(ve.remove(),_l(c,R,N,xe))){const Oe=c.getElementRule(xe.name);Oe&&(Oe.removeEmpty?xe.remove():Oe.paddEmpty&&YL(s,_,j,xe))}}else{let De=ve;for(;xe&&xe.firstChild===De&&xe.lastChild===De&&(De=xe,!E[xe.name]);)xe=xe.parent;if(De===xe){const Oe=new gd("#text",3);Oe.value=Za,ve.replace(Oe)}}}})},eZ=(s,r,c)=>{s.addAttributeFilter("data-mce-tabindex",(p,g)=>{let _=p.length;for(;_--;){const E=p[_];E.attr("tabindex",E.attr("data-mce-tabindex")),E.attr(g,null)}}),s.addAttributeFilter("src,href,style",(p,g)=>{const _="data-mce-"+g,E=r.url_converter,R=r.url_converter_scope;let N=p.length;for(;N--;){const j=p[N];let ae=j.attr(_);ae!==void 0?(j.attr(g,ae.length>0?ae:null),j.attr(_,null)):(ae=j.attr(g),g==="style"?ae=c.serializeStyle(c.parseStyle(ae),j.name):E&&(ae=E.call(R,ae,g,j.name)),j.attr(g,ae.length>0?ae:null))}}),s.addAttributeFilter("class",p=>{let g=p.length;for(;g--;){const _=p[g];let E=_.attr("class");E&&(E=E.replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),_.attr("class",E.length>0?E:null))}}),s.addAttributeFilter("data-mce-type",(p,g,_)=>{let E=p.length;for(;E--;){const R=p[E];R.attr("data-mce-type")==="bookmark"&&!_.cleanup&&(ye.from(R.firstChild).exists(j=>{var ae;return!b4((ae=j.value)!==null&&ae!==void 0?ae:"")})?R.unwrap():R.remove())}}),s.addNodeFilter("script,style",(p,g)=>{var _;const E=N=>N.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"");let R=p.length;for(;R--;){const N=p[R],j=N.firstChild,ae=(_=j==null?void 0:j.value)!==null&&_!==void 0?_:"";if(g==="script"){const fe=N.attr("type");fe&&N.attr("type",fe==="mce-no/type"?null:fe.replace(/^mce\-/,"")),r.element_format==="xhtml"&&j&&ae.length>0&&(j.value="// <![CDATA[\n"+E(ae)+"\n// ]]>")}else r.element_format==="xhtml"&&j&&ae.length>0&&(j.value="<!--\n"+E(ae)+"\n-->")}}),s.addNodeFilter("#comment",p=>{let g=p.length;for(;g--;){const _=p[g],E=_.value;r.preserve_cdata&&(E==null?void 0:E.indexOf("[CDATA["))===0?(_.name="#cdata",_.type=4,_.value=c.decode(E.replace(/^\[CDATA\[|\]\]$/g,""))):(E==null?void 0:E.indexOf("mce:protected "))===0&&(_.name="#text",_.type=3,_.raw=!0,_.value=unescape(E).substr(14))}}),s.addNodeFilter("xml:namespace,input",(p,g)=>{let _=p.length;for(;_--;){const E=p[_];E.type===7?E.remove():E.type===1&&g==="input"&&!E.attr("type")&&E.attr("type","text")}}),s.addAttributeFilter("data-mce-type",p=>{Ve(p,g=>{g.attr("data-mce-type")==="format-caret"&&(g.isEmpty(s.schema.getNonEmptyElements())?g.remove():g.unwrap())})}),s.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected,data-mce-expando,data-mce-block,data-mce-type,data-mce-resize,data-mce-placeholder",(p,g)=>{let _=p.length;for(;_--;)p[_].attr(g,null)}),r.remove_trailing_brs&&Qre(r,s,s.schema)},eie=s=>{const r=p=>(p==null?void 0:p.name)==="br",c=s.lastChild;if(r(c)){const p=c.prev;r(p)&&(c.remove(),p.remove())}},tie=(s,r,c)=>{let p;const g=s.dom;let _=r.cloneNode(!0);const E=document.implementation;if(E.createHTMLDocument){const R=E.createHTMLDocument("");Gt.each(_.nodeName==="BODY"?_.childNodes:[_],N=>{R.body.appendChild(R.importNode(N,!0))}),_.nodeName!=="BODY"?_=R.body.firstChild:_=R.body,p=g.doc,g.doc=R}return A4(s,{...c,node:_}),p&&(g.doc=p),_},nie=(s,r)=>he(s)&&s.hasEventListeners("PreProcess")&&!r.no_events,sie=(s,r,c)=>nie(s,c)?tie(s,r,c):r,oie=(s,r,c)=>{Gt.inArray(r,c)===-1&&(s.addAttributeFilter(c,(p,g)=>{let _=p.length;for(;_--;)p[_].attr(g,null)}),r.push(c))},kCe=(s,r,c)=>!r.no_events&&s?r6(s,{...r,content:c}).content:c,xCe=(s,r,c)=>{const p=Md(c.getInner?r.innerHTML:s.getOuterHTML(r));return c.selection||zu(et.fromDom(r))?p:Gt.trim(p)},rie=(s,r,c)=>{const p=c.selection?{forced_root_block:!1,...c}:c,g=s.parse(r,p);return eie(g),g},iie=(s,r,c)=>V2(s,r).serialize(c),TCe=(s,r,c,p,g)=>{const _=iie(r,c,p);return kCe(s,g,_)},aie=(s,r)=>{const c=["data-mce-selected"],p={entity_encoding:"named",remove_trailing_brs:!0,pad_empty_with_br:!1,...s},g=r&&r.dom?r.dom:vi.DOM,_=r&&r.schema?r.schema:o1(p),E=P_(p,_);eZ(E,p,g);const R=(N,j={})=>{const ae={format:"html",...j},fe=sie(r,N,ae),ve=xCe(g,fe,ae),xe=rie(E,ve,ae);return ae.format==="tree"?xe:TCe(r,p,_,xe,ae)};return{schema:_,addNodeFilter:E.addNodeFilter,addAttributeFilter:E.addAttributeFilter,serialize:R,addRules:_.addValidElements,setRules:_.setValidElements,addTempAttr:He(oie,E,c),getTempAttrs:Fe(c),getNodeFilters:E.getNodeFilters,getAttributeFilters:E.getAttributeFilters,removeNodeFilter:E.removeNodeFilter,removeAttributeFilter:E.removeAttributeFilter}},da=(s,r)=>{const c=aie(s,r);return{schema:c.schema,addNodeFilter:c.addNodeFilter,addAttributeFilter:c.addAttributeFilter,serialize:c.serialize,addRules:c.addRules,setRules:c.setRules,addTempAttr:c.addTempAttr,getTempAttrs:c.getTempAttrs,getNodeFilters:c.getNodeFilters,getAttributeFilters:c.getAttributeFilters,removeNodeFilter:c.removeNodeFilter,removeAttributeFilter:c.removeAttributeFilter}},dM="html",ICe=(s,r)=>({...s,format:r,get:!0,getInner:!0}),lie=(s,r={})=>{const c=r.format?r.format:dM,p=ICe(r,c);return zP(s,p).fold(St,g=>{const _=cM(s,g);return yj(s,_,g)})},cie="html",F_=(s,r)=>({format:cie,...s,set:!0,content:r}),tZ=(s,r,c={})=>{const p=F_(c,r);return h3(s,p).map(g=>{const _=zre(s,g.content,g);return Hx(s,_.html,g),_.content}).getOr(r)},ACe="autoresize_on_init,content_editable_state,padd_empty_with_br,block_elements,boolean_attributes,editor_deselector,editor_selector,elements,file_browser_callback_types,filepicker_validator_handler,force_hex_style_colors,force_p_newlines,gecko_spellcheck,images_dataimg_filter,media_scripts,mode,move_caret_before_on_enter_elements,non_empty_elements,self_closing_elements,short_ended_elements,special,spellchecker_select_languages,spellchecker_whitelist,tab_focus,tabfocus_elements,table_responsive_width,text_block_elements,text_inline_elements,toolbar_drawer,types,validate,whitespace_elements,paste_enable_default_filters,paste_filter_drop,paste_word_valid_elements,paste_retain_style_properties,paste_convert_word_fake_lists,template_cdate_classes,template_mdate_classes,template_selected_content_classes,template_preview_replace_values,template_replace_values,templates,template_cdate_format,template_mdate_format".split(","),ou=[],nZ="bbcode,colorpicker,contextmenu,fullpage,legacyoutput,spellchecker,template,textcolor,rtc".split(","),fM=[],pM=(s,r)=>{const c=Bt(r,p=>Kt(s,p));return Rs(c)},uie=s=>{const r=pM(s,ACe),c=s.forced_root_block;return(c===!1||c==="")&&r.push("forced_root_block (false only)"),Rs(r)},die=s=>pM(s,ou),t7=(s,r)=>{const c=Gt.makeMap(s.plugins," "),g=Bt(r,_=>Kt(c,_));return Rs(g)},fie=s=>t7(s,nZ),mM=s=>t7(s,fM.map(r=>r.name)),pie=(s,r)=>{const c=uie(s),p=fie(r),g=p.length>0,_=c.length>0,E=r.theme==="mobile";if(g||_||E){const R="\n- ",N=E?"\n\nThemes:".concat(R,"mobile"):"",j=g?"\n\nPlugins:".concat(R).concat(p.join(R)):"",ae=_?"\n\nOptions:".concat(R).concat(c.join(R)):"";console.warn("The following deprecated features are currently enabled and have been removed in TinyMCE 7.0. These features will no longer work and should be removed from the TinyMCE configuration. See https://www.tiny.cloud/docs/tinymce/7/migration-from-6x/ for more information."+N+j+ae)}},sZ=s=>pt(fM,r=>r.name===s).fold(()=>s,r=>r.replacedWith?"".concat(s,", replaced by ").concat(r.replacedWith):s),oZ=(s,r)=>{const c=die(s),p=mM(r),g=p.length>0,_=c.length>0;if(g||_){const E="\n- ",R=g?"\n\nPlugins:".concat(E).concat(p.map(sZ).join(E)):"",N=_?"\n\nOptions:".concat(E).concat(c.join(E)):"";console.warn("The following deprecated features are currently enabled but will be removed soon."+R+N)}},hM=(s,r)=>{pie(s,r),oZ(s,r)},n7=vi.DOM,gM=s=>{n7.setStyle(s.id,"display",s.orgDisplay)},Xx=s=>ye.from(s).each(r=>r.destroy()),mie=s=>{const r=s;r.contentAreaContainer=r.formElement=r.container=r.editorContainer=null,r.bodyElement=r.contentDocument=r.contentWindow=null,r.iframeElement=r.targetElm=null;const c=s.selection;if(c){const p=c.dom;r.selection=c.win=c.dom=p.doc=null}},hie=s=>{const r=s.formElement;r&&(r._mceOldSubmit&&(r.submit=r._mceOldSubmit,delete r._mceOldSubmit),n7.unbind(r,"submit reset",s.formEventDelegate))},Sp=s=>{if(!s.removed){const{_selectionOverrides:r,editorUpload:c}=s,p=s.getBody(),g=s.getElement();p&&s.save({is_removing:!0}),s.removed=!0,s.unbindAllNativeEvents(),s.hasHiddenInput&&he(g==null?void 0:g.nextSibling)&&n7.remove(g.nextSibling),i6(s),s.editorManager.remove(s),!s.inline&&p&&gM(s),a6(s),n7.remove(s.getContainer()),Xx(r),Xx(c),s.destroy()}},gie=(s,r)=>{const{selection:c,dom:p}=s;if(!s.destroyed){if(!r&&!s.removed){s.remove();return}r||(s.editorManager.off("beforeunload",s._beforeUnload),s.theme&&s.theme.destroy&&s.theme.destroy(),Xx(c),Xx(p)),hie(s),mie(s),s.destroyed=!0}},Jx=(()=>{const s={};return{add:(g,_)=>{s[g]=_},get:g=>s[g]?s[g]:{icons:{}},has:g=>Kt(s,g)}})(),$_=vc.ModelManager,rZ=(s,r)=>r.dom[s],vM=(s,r)=>parseInt(Oa(r,s),10),vie=He(rZ,"clientWidth"),bie=He(rZ,"clientHeight"),yie=He(vM,"margin-top"),Qx=He(vM,"margin-left"),_ie=s=>s.dom.getBoundingClientRect(),Sie=(s,r,c)=>{const p=vie(s),g=bie(s);return r>=0&&c>=0&&r<=p&&c<=g},iZ=(s,r,c,p)=>{const g=_ie(r),_=s?g.left+r.dom.clientLeft+Qx(r):0,E=s?g.top+r.dom.clientTop+yie(r):0,R=c-_,N=p-E;return{x:R,y:N}},bM=(s,r,c)=>{const p=et.fromDom(s.getBody()),g=s.inline?p:B5(p),_=iZ(s.inline,g,r,c);return Sie(g,_.x,_.y)},Cie=s=>ye.from(s).map(et.fromDom),wie=s=>{const r=s.inline?s.getBody():s.getContentAreaContainer();return Cie(r).map(Yp).getOr(!1)};var RCe=()=>{const s=()=>{throw new Error("Theme did not provide a NotificationManager implementation.")};return{open:s,close:s,getArgs:s}};const aZ=s=>{const r=[],c=()=>{const ve=s.theme;return ve&&ve.getNotificationManagerImpl?ve.getNotificationManagerImpl():RCe()},p=()=>ye.from(r[0]),g=(ve,xe)=>ve.type===xe.type&&ve.text===xe.text&&!ve.progressBar&&!ve.timeout&&!xe.progressBar&&!xe.timeout,_=()=>{p().each(ve=>{ve.reposition()})},E=ve=>{r.push(ve)},R=ve=>{Vt(r,xe=>xe===ve).each(xe=>{r.splice(xe,1)})},N=(ve,xe=!0)=>s.removed||!wie(s)?{}:(xe&&s.dispatch("BeforeOpenNotification",{notification:ve}),pt(r,De=>g(c().getArgs(De),ve)).getOrThunk(()=>{s.editorManager.setActive(s);const De=c().open(ve,()=>{R(De)},()=>gn(s));return E(De),_(),s.dispatch("OpenNotification",{notification:{...De}}),De})),j=()=>{p().each(ve=>{c().close(ve),R(ve),_()})},ae=Fe(r);return(ve=>{ve.on("SkinLoaded",()=>{const xe=vD(ve);xe&&N({text:xe,type:"warning",timeout:0},!1),_()}),ve.on("show ResizeEditor ResizeWindow NodeChange ToggleView FullscreenStateChanged",()=>{requestAnimationFrame(_)}),ve.on("remove",()=>{Ve(r.slice(),xe=>{c().close(xe)})}),ve.on("keydown",xe=>{var De;const Oe=((De=xe.key)===null||De===void 0?void 0:De.toLowerCase())==="f12"||xe.keyCode===123;xe.altKey&&Oe&&(xe.preventDefault(),p().map(Ne=>et.fromDom(Ne.getEl())).each(Ne=>s8(Ne)))})})(s),{open:N,close:j,getNotifications:ae}},Lg=vc.PluginManager,Q2=vc.ThemeManager;var lZ=()=>{const s=()=>{throw new Error("Theme did not provide a WindowManager implementation.")};return{open:s,openUrl:s,alert:s,confirm:s,close:s}};const cZ=s=>{let r=[];const c=()=>{const Oe=s.theme;return Oe&&Oe.getWindowManagerImpl?Oe.getWindowManagerImpl():lZ()},p=(Oe,Ne)=>(...tt)=>Ne?Ne.apply(Oe,tt):void 0,g=Oe=>{s.dispatch("OpenWindow",{dialog:Oe})},_=Oe=>{s.dispatch("CloseWindow",{dialog:Oe})},E=Oe=>{r.push(Oe),g(Oe)},R=Oe=>{_(Oe),r=Bt(r,Ne=>Ne!==Oe),r.length===0&&s.focus()},N=()=>ye.from(r[r.length-1]),j=Oe=>{s.editorManager.setActive(s),m_(s),s.ui.show();const Ne=Oe();return E(Ne),Ne},ae=(Oe,Ne)=>j(()=>c().open(Oe,Ne,R)),fe=Oe=>j(()=>c().openUrl(Oe,R)),ve=(Oe,Ne,tt)=>{const ut=c();ut.alert(Oe,p(tt||ut,Ne))},xe=(Oe,Ne,tt)=>{const ut=c();ut.confirm(Oe,p(tt||ut,Ne))},De=()=>{N().each(Oe=>{c().close(Oe),R(Oe)})};return s.on("remove",()=>{Ve(r,Oe=>{c().close(Oe)})}),{open:ae,openUrl:fe,alert:ve,confirm:xe,close:De}},yM=(s,r)=>{s.notificationManager.open({type:"error",text:r})},eT=(s,r)=>{s._skinLoaded?yM(s,r):s.on("SkinLoaded",()=>{yM(s,r)})},Eie=(s,r)=>{eT(s,Hu.translate(["Failed to upload image: {0}",r]))},s7=(s,r,c)=>{c1(s,r,{message:c}),console.error(c)},o7=(s,r,c)=>c?"Failed to load ".concat(s,": ").concat(c," from url ").concat(r):"Failed to load ".concat(s," url: ").concat(r),uZ=(s,r,c)=>{s7(s,"PluginLoadError",o7("plugin",r,c))},kie=(s,r,c)=>{s7(s,"IconsLoadError",o7("icons",r,c))},xie=(s,r,c)=>{s7(s,"LanguageLoadError",o7("language",r,c))},r7=(s,r,c)=>{s7(s,"ThemeLoadError",o7("theme",r,c))},dZ=(s,r,c)=>{s7(s,"ModelLoadError",o7("model",r,c))},fZ=(s,r,c)=>{const p=Hu.translate(["Failed to initialize plugin: {0}",r]);c1(s,"PluginLoadError",{message:p}),tT(p,c),eT(s,p)},tT=(s,...r)=>{const c=window.console;c&&(c.error?c.error(s,...r):c.log(s,...r))},Tie=s=>{ye.from(s.selection.getNode()).each(r=>{r.removeAttribute("data-mce-selected")})},_M=(s,r,c)=>{try{s.getDoc().execCommand(r,!1,String(c))}catch{}},pZ=(s,r)=>{_M(s,"StyleWithCSS",r),_M(s,"enableInlineTableEditing",r),_M(s,"enableObjectResizing",r)},Iie=s=>{s.selection.setRng(s.selection.getRng())},mZ=(s,r,c)=>{Pi(s,r)&&!c?ko(s,r):c&&Yt(s,r)},hZ=s=>{const r=et.fromDom(s.getBody());mZ(r,"mce-content-readonly",!0),s.selection.controlSelection.hideResizeRect(),s._selectionOverrides.hideFakeCaret(),Tie(s)},gZ=s=>{const r=et.fromDom(s.getBody());mZ(r,"mce-content-readonly",!1),s.hasEditableRoot()&&vr(r,!0),pZ(s,!1),gn(s)&&s.focus(),Iie(s),s.nodeChanged()},eb=s=>wg(s),bd="data-mce-contenteditable",SM=s=>{Ve(Pc(s,'*[contenteditable="true"]'),r=>{el(r,bd,"true"),vr(r,!1)})},Aie=s=>{Ve(Pc(s,"*[".concat(bd,'="true"]')),r=>{gi(r,bd),vr(r,!0)})},vZ=(s,r)=>{const c=et.fromDom(s.getBody());r?(hZ(s),vr(c,!1),SM(c)):(Aie(c),gZ(s))},Oie=s=>{s.serializer?bZ(s):s.on("PreInit",()=>{bZ(s)})},bZ=s=>{s.parser.addAttributeFilter("contenteditable",r=>{eb(s)&&Ve(r,c=>{c.attr(bd,c.attr("contenteditable")),c.attr("contenteditable","false")})}),s.serializer.addAttributeFilter(bd,r=>{eb(s)&&Ve(r,c=>{c.attr("contenteditable",c.attr(bd))})}),s.serializer.addTempAttr(bd)},Co=s=>s.type==="click",Rie=["copy"],i7=s=>Qe(Rie,s.type),Die=(s,r)=>ds(r,"a",p=>Yo(p,et.fromDom(s.getBody()))).bind(p=>ld(p,"href")),Lie=(s,r)=>{if(Co(r)&&!qt.metaKeyPressed(r)){const c=et.fromDom(r.target);Die(s,c).each(p=>{if(r.preventDefault(),/^#/.test(p)){const g=s.dom.select("".concat(p,',[name="').concat(Tr(p,"#"),'"]'));g.length&&s.selection.scrollIntoView(g[0],!0)}else window.open(p,"_blank","rel=noopener noreferrer,menubar=yes,toolbar=yes,location=yes,status=yes,resizable=yes,scrollbars=yes")})}else i7(r)&&s.dispatch(r.type,r)},Pie=s=>{s.on("ShowCaret ObjectSelected",r=>{eb(s)&&r.preventDefault()}),s.on("DisabledStateChange",r=>{r.isDefaultPrevented()||vZ(s,r.state)})},yZ=s=>{Oie(s),Pie(s)},tb=s=>/^[a-z0-9\-]+$/i.test(s),Yu=s=>"content/"+s+"/content.css",_Z=s=>tinymce.Resource.has(Yu(s)),a7=s=>w1(s,PE(s)),nb=s=>w1(s,ME(s)),w1=(s,r)=>{const c=s.editorManager.baseURL+"/skins/content",p=s.editorManager.suffix,g="content".concat(p,".css");return Nt(r,_=>_Z(_)?_:tb(_)&&!s.inline?"".concat(c,"/").concat(_,"/").concat(g):s.documentBaseURI.toAbsolute(_))},l7=s=>{s.contentCSS=s.contentCSS.concat(a7(s),nb(s))},CM=s=>s?Mo(s.getElementsByTagName("img")):[],wM=(s,r)=>{const c={};return{findAll:(g,_=Ht)=>{const E=Bt(CM(g),N=>{const j=N.src;return N.hasAttribute("data-mce-bogus")||N.hasAttribute("data-mce-placeholder")||!j||j===ns.transparentSrc?!1:hr(j,"blob:")?!s.isUploaded(j)&&_(N):hr(j,"data:")?_(N):!1}),R=Nt(E,N=>{const j=N.src;if(Kt(c,j))return c[j].then(ae=>z(ae)?ae:{image:N,blobInfo:ae.blobInfo});{const ae=dm(r,j).then(fe=>(delete c[j],{image:N,blobInfo:fe})).catch(fe=>(delete c[j],fe));return c[j]=ae,ae}});return Promise.all(R)}}},EM=()=>{let c={};const p=(ve,xe)=>({status:ve,resultUri:xe}),g=ve=>ve in c;return{hasBlobUri:g,getResultUri:ve=>{const xe=c[ve];return xe?xe.resultUri:null},isPending:ve=>g(ve)?c[ve].status===1:!1,isUploaded:ve=>g(ve)?c[ve].status===2:!1,markPending:ve=>{c[ve]=p(1,null)},markUploaded:(ve,xe)=>{c[ve]=p(2,xe)},removeFailed:ve=>{delete c[ve]},destroy:()=>{c={}}}};let SZ=0;const Mie=()=>{const s=()=>Math.round(W9()*4294967295).toString(36);return"s"+new Date().getTime().toString(36)+s()+s()+s()},Nie=s=>s+SZ+++Mie(),CZ=()=>{let s=[];const r=fe=>({"image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/png":"png","image/apng":"apng","image/avif":"avif","image/svg+xml":"svg","image/webp":"webp","image/bmp":"bmp","image/tiff":"tiff"})[fe.toLowerCase()]||"dat",c=(fe,ve,xe,De,Oe)=>{if(z(fe))return p({id:fe,name:De,filename:Oe,blob:ve,base64:xe});if(q(fe))return p(fe);throw new Error("Unknown input type")},p=fe=>{if(!fe.blob||!fe.base64)throw new Error("blob and base64 representations of the image are required for BlobInfo to be created");const ve=fe.id||Nie("blobid"),xe=fe.name||ve,De=fe.blob;return{id:Fe(ve),name:Fe(xe),filename:Fe(fe.filename||xe+"."+r(De.type)),blob:Fe(De),base64:Fe(fe.base64),blobUri:Fe(fe.blobUri||URL.createObjectURL(De)),uri:Fe(fe.uri)}},g=fe=>{E(fe.id())||s.push(fe)},_=fe=>pt(s,fe).getOrUndefined(),E=fe=>_(ve=>ve.id()===fe);return{create:c,add:g,get:E,getByUri:fe=>_(ve=>ve.blobUri()===fe),getByData:(fe,ve)=>_(xe=>xe.base64()===fe&&xe.blob().type===ve),findFirst:_,removeByUri:fe=>{s=Bt(s,ve=>ve.blobUri()===fe?(URL.revokeObjectURL(ve.blobUri()),!1):!0)},destroy:()=>{Ve(s,fe=>{URL.revokeObjectURL(fe.blobUri())}),s=[]}}},wZ=(s,r)=>{const c={},p=(Oe,Ne)=>Oe?Oe.replace(/\/$/,"")+"/"+Ne.replace(/^\//,""):Ne,g=(Oe,Ne)=>new Promise((tt,ut)=>{const gt=new XMLHttpRequest;gt.open("POST",r.url),gt.withCredentials=r.credentials,gt.upload.onprogress=Jt=>{Ne(Jt.loaded/Jt.total*100)},gt.onerror=()=>{ut("Image upload failed due to a XHR Transport error. Code: "+gt.status)},gt.onload=()=>{if(gt.status<200||gt.status>=300){ut("HTTP Error: "+gt.status);return}const Jt=JSON.parse(gt.responseText);if(!Jt||!z(Jt.location)){ut("Invalid JSON: "+gt.responseText);return}tt(p(r.basePath,Jt.location))};const Tt=new FormData;Tt.append("file",Oe.blob(),Oe.filename()),gt.send(Tt)}),_=ie(r.handler)?r.handler:g,E=()=>new Promise(Oe=>{Oe([])}),R=(Oe,Ne)=>({url:Ne,blobInfo:Oe,status:!0}),N=(Oe,Ne)=>({url:"",blobInfo:Oe,status:!1,error:Ne}),j=(Oe,Ne)=>{Gt.each(c[Oe],tt=>{tt(Ne)}),delete c[Oe]},ae=(Oe,Ne,tt)=>(s.markPending(Oe.blobUri()),new Promise(ut=>{let gt,Tt;try{const Jt=()=>{gt&&(gt.close(),Tt=Ue)},vn=Ut=>{Jt(),s.markUploaded(Oe.blobUri(),Ut),j(Oe.blobUri(),R(Oe,Ut)),ut(R(Oe,Ut))},qn=Ut=>{Jt(),s.removeFailed(Oe.blobUri()),j(Oe.blobUri(),N(Oe,Ut)),ut(N(Oe,Ut))};Tt=Ut=>{Ut<0||Ut>100||ye.from(gt).orThunk(()=>ye.from(tt).map(At)).each(Et=>{gt=Et,Et.progressBar.value(Ut)})},Ne(Oe,Tt).then(vn,Ut=>{qn(z(Ut)?{message:Ut}:Ut)})}catch(Jt){ut(N(Oe,Jt))}})),fe=Oe=>Oe===g,ve=Oe=>{const Ne=Oe.blobUri();return new Promise(tt=>{c[Ne]=c[Ne]||[],c[Ne].push(tt)})},xe=(Oe,Ne)=>(Oe=Gt.grep(Oe,tt=>!s.isUploaded(tt.blobUri())),Promise.all(Gt.map(Oe,tt=>s.isPending(tt.blobUri())?ve(tt):ae(tt,_,Ne))));return{upload:(Oe,Ne)=>!r.url&&fe(_)?E():xe(Oe,Ne)}},kM=s=>()=>s.notificationManager.open({text:s.translate("Image uploading..."),type:"info",timeout:-1,progressBar:!0}),xM=(s,r)=>wZ(r,{url:pD(s),basePath:mD(s),credentials:g6(s),handler:M4(s)}),TM=s=>{const r=EM(),c=xM(s,r);return{upload:(p,g=!0)=>c.upload(p,g?kM(s):void 0)}},DCe=(s,r)=>s.dom.isEmpty(r.dom)&&he(s.schema.getTextBlockElements()[oo(r)]),Fie=s=>r=>{DCe(s,r)&&Ri(r,et.fromHtml('<br data-mce-bogus="1" />'))},LCe=s=>{const r=CZ();let c,p;const g=EM(),_=[],E=gt=>Tt=>s.selection?gt(Tt):[],R=gt=>gt+(gt.indexOf("?")===-1?"?":"&")+new Date().getTime(),N=(gt,Tt,Jt)=>{let vn=0;do vn=gt.indexOf(Tt,vn),vn!==-1&&(gt=gt.substring(0,vn)+Jt+gt.substr(vn+Tt.length),vn+=Jt.length-Tt.length+1);while(vn!==-1);return gt},j=(gt,Tt,Jt)=>{const vn='src="'.concat(Jt,'"').concat(Jt===ns.transparentSrc?' data-mce-placeholder="1"':"");return gt=N(gt,'src="'.concat(Tt,'"'),vn),gt=N(gt,'data-mce-src="'+Tt+'"','data-mce-src="'+Jt+'"'),gt},ae=(gt,Tt)=>{Ve(s.undoManager.data,Jt=>{Jt.type==="fragmented"?Jt.fragments=Nt(Jt.fragments,vn=>j(vn,gt,Tt)):Jt.content=j(Jt.content,gt,Tt)})},fe=(gt,Tt)=>{const Jt=s.convertURL(Tt,"src");ae(gt.src,Tt),Tl(et.fromDom(gt),{src:OE(s)?R(Tt):Tt,"data-mce-src":Jt})},ve=()=>(c||(c=xM(s,g)),Ne().then(E(gt=>{const Tt=Nt(gt,Jt=>Jt.blobInfo);return c.upload(Tt,kM(s)).then(E(Jt=>{const vn=[];let qn=!1;const Ut=Nt(Jt,(Et,Qt)=>{const{blobInfo:Bn,image:hs}=gt[Qt];let mo=!1;return Et.status&&RE(s)?(Et.url&&!Go(hs.src,Et.url)&&(qn=!0),r.removeByUri(hs.src),Sh(s)||fe(hs,Et.url)):Et.error&&(Et.error.remove&&(ae(hs.src,ns.transparentSrc),vn.push(hs),mo=!0),Eie(s,Et.error.message)),{element:hs,status:Et.status,uploadUri:Et.url,blobInfo:Bn,removed:mo}});return vn.length>0&&!Sh(s)?s.undoManager.transact(()=>{Ve(Xb(vn),Et=>{const Qt=Yc(Et);ti(Et),Qt.each(Fie(s)),r.removeByUri(Et.dom.src)})}):qn&&s.undoManager.dispatchChange(),Ut}))}))),xe=()=>P4(s)?ve():Promise.resolve([]),De=gt=>ts(_,Tt=>Tt(gt)),Oe=gt=>{_.push(gt)},Ne=()=>(p||(p=wM(g,r)),p.findAll(s.getBody(),De).then(E(gt=>{const Tt=Bt(gt,Jt=>z(Jt)?(eT(s,Jt),!1):Jt.uriType!=="blob");return Sh(s)||Ve(Tt,Jt=>{ae(Jt.image.src,Jt.blobInfo.blobUri()),Jt.image.src=Jt.blobInfo.blobUri(),Jt.image.removeAttribute("data-mce-src")}),Tt}))),tt=()=>{r.destroy(),g.destroy(),p=c=null},ut=gt=>gt.replace(/src="(blob:[^"]+)"/g,(Tt,Jt)=>{const vn=g.getResultUri(Jt);if(vn)return'src="'+vn+'"';let qn=r.getByUri(Jt);return qn||(qn=je(s.editorManager.get(),(Ut,Et)=>Ut||Et.editorUpload&&Et.editorUpload.blobCache.getByUri(Jt),void 0)),qn?'src="data:'+qn.blob().type+";base64,"+qn.base64()+'"':Tt});return s.on("SetContent",()=>{P4(s)?xe():Ne()}),s.on("RawSaveContent",gt=>{gt.content=ut(gt.content)}),s.on("GetContent",gt=>{gt.source_view||gt.format==="raw"||gt.format==="tree"||(gt.content=ut(gt.content))}),s.on("PostRender",()=>{s.parser.addNodeFilter("img",gt=>{Ve(gt,Tt=>{const Jt=Tt.attr("src");if(!Jt||r.getByUri(Jt))return;const vn=g.getResultUri(Jt);vn&&Tt.attr("src",vn)})})}),{blobCache:r,addFilter:Oe,uploadImages:ve,uploadImagesAuto:xe,scanForImages:Ne,destroy:tt}},$ie=s=>{const r=s.dom,c=s.schema.type,p={valigntop:[{selector:"td,th",styles:{verticalAlign:"top"}}],valignmiddle:[{selector:"td,th",styles:{verticalAlign:"middle"}}],valignbottom:[{selector:"td,th",styles:{verticalAlign:"bottom"}}],alignleft:[{selector:"figure.image",collapsed:!1,classes:"align-left",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li,pre",styles:{textAlign:"left"},inherit:!1,preview:!1},{selector:"img,audio,video",collapsed:!1,styles:{float:"left"},preview:"font-family font-size"},{selector:".mce-placeholder",styles:{float:"left"},ceFalseOverride:!0},{selector:"table",collapsed:!1,styles:{marginLeft:"0px",marginRight:"auto"},onformat:g=>{r.setStyle(g,"float",null)},preview:"font-family font-size"},{selector:".mce-preview-object,[data-ephox-embed-iri]",ceFalseOverride:!0,styles:{float:"left"}}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li,pre",styles:{textAlign:"center"},inherit:!1,preview:"font-family font-size"},{selector:"figure.image",collapsed:!1,classes:"align-center",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"img,audio,video",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"},preview:!1},{selector:".mce-placeholder",styles:{display:"block",marginLeft:"auto",marginRight:"auto"},ceFalseOverride:!0},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"},preview:"font-family font-size"},{selector:".mce-preview-object",ceFalseOverride:!0,styles:{display:"table",marginLeft:"auto",marginRight:"auto"},preview:!1},{selector:"[data-ephox-embed-iri]",ceFalseOverride:!0,styles:{marginLeft:"auto",marginRight:"auto"},preview:!1}],alignright:[{selector:"figure.image",collapsed:!1,classes:"align-right",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li,pre",styles:{textAlign:"right"},inherit:!1,preview:"font-family font-size"},{selector:"img,audio,video",collapsed:!1,styles:{float:"right"},preview:"font-family font-size"},{selector:".mce-placeholder",styles:{float:"right"},ceFalseOverride:!0},{selector:"table",collapsed:!1,styles:{marginRight:"0px",marginLeft:"auto"},onformat:g=>{r.setStyle(g,"float",null)},preview:"font-family font-size"},{selector:".mce-preview-object,[data-ephox-embed-iri]",ceFalseOverride:!0,styles:{float:"right"},preview:!1}],alignjustify:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li,pre",styles:{textAlign:"justify"},inherit:!1,preview:"font-family font-size"}],bold:[{inline:"strong",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all",preserve_attributes:["class","style"]}],italic:[{inline:"em",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all",preserve_attributes:["class","style"]}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all",preserve_attributes:["class","style"]}],strikethrough:(()=>{const g={inline:"span",styles:{textDecoration:"line-through"},exact:!0},_={inline:"strike",remove:"all",preserve_attributes:["class","style"]},E={inline:"s",remove:"all",preserve_attributes:["class","style"]};return c!=="html4"?[E,g,_]:[g,E,_]})(),forecolor:{inline:"span",styles:{color:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},fontname:{inline:"span",toggle:!1,styles:{fontFamily:"%value"},clear_child_styles:!0},fontsize:{inline:"span",toggle:!1,styles:{fontSize:"%value"},clear_child_styles:!0},lineheight:{selector:"h1,h2,h3,h4,h5,h6,p,li,td,th,div",styles:{lineHeight:"%value"}},fontsize_class:{inline:"span",attributes:{class:"%value"}},blockquote:{block:"blockquote",wrapper:!0,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},code:{inline:"code"},samp:{inline:"samp"},link:{inline:"a",selector:"a",remove:"all",split:!0,deep:!0,onmatch:(g,_,E)=>Ln(g)&&g.hasAttribute("href"),onformat:(g,_,E)=>{Gt.each(E,(R,N)=>{r.setAttrib(g,N,R)})}},lang:{inline:"span",clear_child_styles:!0,remove_similar:!0,attributes:{lang:"%value","data-mce-lang":g=>{var _;return(_=g==null?void 0:g.customValue)!==null&&_!==void 0?_:null}}},removeformat:[{selector:"b,strong,em,i,font,u,strike,s,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins,small",remove:"all",split:!0,expand:!1,block_expand:!0,deep:!0},{selector:"span",attributes:["style","class"],remove:"empty",split:!0,expand:!1,deep:!0},{selector:"*",attributes:["style","class"],split:!1,expand:!1,deep:!0}]};return Gt.each("p h1 h2 h3 h4 h5 h6 div address pre dt dd".split(/\s/),g=>{p[g]={block:g,remove:"all"}}),p},EZ={remove_similar:!0,inherit:!1},Sf={selector:"td,th",...EZ},PCe={tablecellbackgroundcolor:{styles:{backgroundColor:"%value"},...Sf},tablecellverticalalign:{styles:{"vertical-align":"%value"},...Sf},tablecellbordercolor:{styles:{borderColor:"%value"},...Sf},tablecellclass:{classes:["%value"],...Sf},tableclass:{selector:"table",classes:["%value"],...EZ},tablecellborderstyle:{styles:{borderStyle:"%value"},...Sf},tablecellborderwidth:{styles:{borderWidth:"%value"},...Sf}},MCe=Fe(PCe),Bie=s=>{const r={},c=E=>he(E)?r[E]:r,p=E=>Kt(r,E),g=(E,R)=>{E&&(z(E)?(ue(R)||(R=[R]),Ve(R,N=>{ge(N.deep)&&(N.deep=!pf(N)),ge(N.split)&&(N.split=!pf(N)||vl(N)),ge(N.remove)&&pf(N)&&!vl(N)&&(N.remove="none"),pf(N)&&vl(N)&&(N.mixed=!0,N.block_expand=!0),z(N.classes)&&(N.classes=N.classes.split(/\s+/))}),r[E]=R):bn(E,(N,j)=>{g(j,N)}))},_=E=>(E&&r[E]&&delete r[E],r);return g($ie(s)),g(MCe()),g(_D(s)),{get:c,has:p,register:g,unregister:_}},sb=Gt.each,hm=vi.DOM,nT=s=>he(s)&&q(s),IM=(s,r)=>{const c=r&&r.schema||o1({}),p=(N,j)=>{j.classes.length>0&&hm.addClass(N,j.classes.join(" ")),hm.setAttribs(N,j.attrs)},g=N=>{const j=z(N)?{name:N,classes:[],attrs:{}}:N,ae=hm.create(j.name);return p(ae,j),ae},_=(N,j)=>{const ae=c.getElementRule(N.nodeName.toLowerCase()),fe=ae==null?void 0:ae.parentsRequired;return fe&&fe.length?j&&Qe(fe,j)?j:fe[0]:!1},E=(N,j,ae)=>{let fe;const ve=j[0],xe=nT(ve)?ve.name:void 0,De=_(N,xe);if(De)xe===De?(fe=ve,j=j.slice(1)):fe=De;else if(ve)fe=ve,j=j.slice(1);else if(!ae)return N;const Oe=fe?g(fe):hm.create("div");Oe.appendChild(N),ae&&Gt.each(ae,tt=>{const ut=g(tt);Oe.insertBefore(ut,N)});const Ne=nT(fe)?fe.siblings:void 0;return E(Oe,j,Ne)},R=hm.create("div");if(s.length>0){const N=s[0],j=g(N),ae=nT(N)?N.siblings:void 0;R.appendChild(E(j,s.slice(1),ae))}return R},kZ=s=>{s=Gt.trim(s);let r="div";const c={name:r,classes:[],attrs:{},selector:s};return s!=="*"&&(r=s.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g,(p,g,_,E,R)=>{switch(g){case"#":c.attrs.id=_;break;case".":c.classes.push(_);break;case":":Gt.inArray("checked disabled enabled read-only required".split(" "),_)!==-1&&(c.attrs[_]=_);break}if(E==="["){const N=R.match(/([\w\-]+)(?:\=\"([^\"]+))?/);N&&(c.attrs[N[1]]=N[2])}return""})),c.name=r||"div",c},Vie=s=>z(s)?(s=s.split(/\s*,\s*/)[0],s=s.replace(/\s*(~\+|~|\+|>)\s*/g,"$1"),Gt.map(s.split(/(?:>|\s+(?![^\[\]]+\]))/),r=>{const c=Gt.map(r.split(/(?:~\+|~|\+)/),kZ),p=c.pop();return c.length&&(p.siblings=c),p}).reverse()):[],Hie=(s,r)=>{let c="",p=SD(s);if(p==="")return"";const g=ve=>z(ve)?ve.replace(/%(\w+)/g,""):"",_=(ve,xe)=>hm.getStyle(xe!=null?xe:s.getBody(),ve,!0);if(z(r)){const ve=s.formatter.get(r);if(!ve)return"";r=ve[0]}if("preview"in r){const ve=r.preview;if(ve===!1)return"";p=ve||p}let E=r.block||r.inline||"span",R;const N=Vie(r.selector);N.length>0?(N[0].name||(N[0].name=E),E=r.selector,R=IM(N,s)):R=IM([E],s);const j=hm.select(E,R)[0]||R.firstChild;sb(r.styles,(ve,xe)=>{const De=g(ve);De&&hm.setStyle(j,xe,De)}),sb(r.attributes,(ve,xe)=>{const De=g(ve);De&&hm.setAttrib(j,xe,De)}),sb(r.classes,ve=>{const xe=g(ve);hm.hasClass(j,xe)||hm.addClass(j,xe)}),s.dispatch("PreviewFormats"),hm.setStyles(R,{position:"absolute",left:-65535}),s.getBody().appendChild(R);const ae=_("fontSize"),fe=/px$/.test(ae)?parseInt(ae,10):0;return sb(p.split(" "),ve=>{let xe=_(ve,j);if(!(ve==="background-color"&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(xe)&&(xe=_(ve),th(xe).toLowerCase()==="#ffffff"))&&!(ve==="color"&&th(xe).toLowerCase()==="#000000")){if(ve==="font-size"&&/em|%$/.test(xe)){if(fe===0)return;xe=parseFloat(xe)/(/%$/.test(xe)?100:1)*fe+"px"}ve==="border"&&xe&&(c+="padding:0 2px;"),c+=ve+":"+xe+";"}}),s.dispatch("AfterPreviewFormats"),hm.remove(R),c},ob=s=>{s.addShortcut("meta+b","","Bold"),s.addShortcut("meta+i","","Italic"),s.addShortcut("meta+u","","Underline");for(let r=1;r<=6;r++)s.addShortcut("access+"+r,"",["FormatBlock",!1,"h"+r]);s.addShortcut("access+7","",["FormatBlock",!1,"p"]),s.addShortcut("access+8","",["FormatBlock",!1,"div"]),s.addShortcut("access+9","",["FormatBlock",!1,"address"])},xZ=s=>{const r=Bie(s),c=pl({});return ob(s),cm(s),Sh(s)||ZW(c,s),{get:r.get,has:r.has,register:r.register,unregister:r.unregister,apply:(p,g,_)=>{Wj(s,p,g,_)},remove:(p,g,_,E)=>{jj(s,p,g,_,E)},toggle:(p,g,_)=>{Zj(s,p,g,_)},match:(p,g,_,E)=>Hj(s,p,g,_,E),closest:p=>lM(s,p),matchAll:(p,g)=>aM(s,p,g),matchNode:(p,g,_,E)=>Uj(s,p,g,_,E),canApply:p=>zj(s,p),formatChanged:(p,g,_,E)=>Ure(s,c,p,g,_,E),getCssText:He(Hie,s)}},TZ=s=>{switch(s.toLowerCase()){case"undo":case"redo":case"mcefocus":return!0;default:return!1}},Uie=(s,r,c)=>{const p=pl(!1),g=N=>{Zx(r,!1,c),r.add({},N)};s.on("init",()=>{r.add()}),s.on("BeforeExecCommand",N=>{const j=N.command;TZ(j)||(tM(r,c),r.beforeChange())}),s.on("ExecCommand",N=>{const j=N.command;TZ(j)||g(N)}),s.on("ObjectResizeStart cut",()=>{r.beforeChange()}),s.on("SaveContent ObjectResized blur",g),s.on("dragend",g),s.on("keyup",N=>{const j=N.keyCode;if(N.isDefaultPrevented())return;const ae=ns.os.isMacOS()&&N.key==="Meta";(j>=33&&j<=36||j>=37&&j<=40||j===45||N.ctrlKey||ae)&&(g(),s.nodeChanged()),(j===46||j===8)&&s.nodeChanged(),p.get()&&r.typing&&!uv(Bc(s),r.data[0])&&(s.isDirty()||s.setDirty(!0),s.dispatch("TypingUndo"),p.set(!1),s.nodeChanged())}),s.on("keydown",N=>{const j=N.keyCode;if(N.isDefaultPrevented())return;if(j>=33&&j<=36||j>=37&&j<=40||j===45){r.typing&&g(N);return}const ae=N.ctrlKey&&!N.altKey||N.metaKey;if((j<16||j>20)&&j!==224&&j!==91&&!r.typing&&!ae){r.beforeChange(),Zx(r,!0,c),r.add({},N),p.set(!0);return}(ns.os.isMacOS()?N.metaKey:N.ctrlKey&&!N.altKey)&&r.beforeChange()}),s.on("mousedown",N=>{r.typing&&g(N)});const _=N=>N.inputType==="insertReplacementText",E=N=>N.inputType==="insertText"&&N.data===null,R=N=>N.inputType==="insertFromPaste"||N.inputType==="insertFromDrop";s.on("input",N=>{N.inputType&&(_(N)||E(N)||R(N))&&g(N)}),s.on("AddUndo Undo Redo ClearUndos",N=>{N.isDefaultPrevented()||s.nodeChanged()})},zie=s=>{s.addShortcut("meta+z","","Undo"),s.addShortcut("meta+y,meta+shift+z","","Redo")},IZ=s=>{const r=la(),c=pl(0),p=pl(0),g={data:[],typing:!1,beforeChange:()=>{Mre(s,c,r)},add:(_,E)=>Nre(s,g,p,c,r,_,E),dispatchChange:()=>{s.setDirty(!0);const _=Bc(s);_.bookmark=n6(s.selection),s.dispatch("change",{level:_,lastLevel:xr(g.data,p.get()).getOrUndefined()})},undo:()=>Fre(s,g,c,p),redo:()=>$re(s,p,g.data),clear:()=>{Bj(s,g,p)},reset:()=>{Bre(s,g)},hasUndo:()=>Vre(s,g,p),hasRedo:()=>Hre(s,g,p),transact:_=>Vj(s,g,c,_),ignore:_=>{rM(s,c,_)},extra:(_,E)=>{iM(s,g,p,_,E)}};return Sh(s)||Uie(s,g,c),zie(s),g},Wie=[9,27,qt.HOME,qt.END,19,20,44,144,145,33,34,45,16,17,18,91,92,93,qt.DOWN,qt.UP,qt.LEFT,qt.RIGHT].concat(ns.browser.isFirefox()?[224]:[]),AZ="data-mce-placeholder",OZ=s=>s.type==="keydown"||s.type==="keyup",RZ=s=>{const r=s.keyCode;return r===qt.BACKSPACE||r===qt.DELETE},sT=s=>{if(OZ(s)){const r=s.keyCode;return!RZ(s)&&(qt.metaKeyPressed(s)||s.altKey||r>=112&&r<=123||Qe(Wie,r))}else return!1},jie=s=>OZ(s)&&!(RZ(s)||s.type==="keyup"&&s.keyCode===229),Zie=(s,r,c)=>{if(s.isEmpty(r,void 0,{skipBogus:!1,includeZwsp:!0})){const p=r.firstElementChild;return p?s.getStyle(r.firstElementChild,"padding-left")||s.getStyle(r.firstElementChild,"padding-right")?!1:c===p.nodeName.toLowerCase():!0}else return!1},NCe=s=>{var r;const c=s.dom,p=gl(s),g=(r=v6(s))!==null&&r!==void 0?r:"",_=(E,R)=>{if(sT(E))return;const N=s.getBody(),j=jie(E)?!1:Zie(c,N,p);(c.getAttrib(N,AZ)!==""!==j||R)&&(c.setAttrib(N,AZ,j?g:null),aD(s,j),s.on(j?"keydown":"keyup",_),s.off(j?"keyup":"keydown",_))};gr(g)&&s.on("init",E=>{_(E,!0),s.on("change SetContent ExecCommand",_),s.on("paste",R=>Xn.setEditorTimeout(s,()=>_(R)))})},c7=(s,r)=>({block:s,position:r}),qie=(s,r)=>({from:s,to:r}),u7=(s,r)=>{const c=et.fromDom(s),p=et.fromDom(r.container());return tx(c,p).map(g=>c7(g,r))},Gie=s=>!(Zi(s.to.block,s.from.block)||Zi(s.from.block,s.to.block)),Kie=s=>!Yo(s.from.block,s.to.block),DZ=(s,r)=>qi(r,g=>Uu(g)||Zt(g.dom),g=>Yo(g,s)).filter(li).getOr(s),Yie=(s,r)=>{const c=et.fromDom(s);return Yo(DZ(c,r.from.block),DZ(c,r.to.block))},v3=s=>cr(s.from.block.dom)===!1&&cr(s.to.block.dom)===!1,b3=s=>{const r=c=>K9(c)||Jv(c.dom)||d2(c);return r(s.from.block)&&r(s.to.block)},oT=(s,r,c,p)=>nr(p.position.getNode())&&!mt(s,p.block)?hp(!1,p.block.dom).bind(g=>g.isEqual(p.position)?$d(c,r,g).bind(_=>u7(r,_)):ye.some(p)).getOr(p):p,rT=(s,r,c,p)=>{const g=u7(r,$t.fromRangeStart(p)),_=g.bind(E=>$d(c,r,E.position).bind(R=>u7(r,R).map(N=>oT(s,r,c,N))));return Oi(g,_,qie).filter(E=>Kie(E)&&Yie(r,E)&&v3(E)&&b3(E)&&Gie(E))},y3=(s,r,c,p)=>p.collapsed?rT(s,r,c,p):ye.none(),_3=(s,r)=>{const c=Il(s);return Vt(c,p=>r.isBlock(oo(p))).fold(Fe(c),p=>c.slice(0,p))},d7=(s,r)=>{const c=_3(s,r);return Ve(c,ti),c},f7=(s,r,c)=>{const p=ov(c,r);return pt(p.reverse(),g=>mt(s,g)).each(ti)},LZ=(s,r)=>Bt(cd(r),c=>!mt(s,c)).length===0,AM=(s,r,c,p,g)=>{if(mt(p,c))return vg(c),sl(c.dom);LZ(p,g)&&mt(p,r)&&Jc(g,et.fromTag("br"));const _=Ql(c.dom,$t.before(g.dom));return Ve(d7(r,p),E=>{Jc(g,E)}),f7(p,s,r),_},OM=(s,r)=>s.isInline(oo(r)),PZ=(s,r,c,p)=>{if(mt(p,c)){if(mt(p,r)){const E=Le((R=>{const N=(j,ae)=>of(j).fold(()=>ae,fe=>OM(p,fe)?N(fe,ae.concat(oh(fe))):ae);return N(R,[])})(c),(R,N)=>(Gv(R,N),N),gg());Zm(r),Ri(r,E)}return ti(c),sl(r.dom)}const g=gp(c.dom);return Ve(d7(r,p),_=>{Ri(c,_)}),f7(p,s,r),g},MZ=(s,r)=>{const c=ov(r,s);return ye.from(c[c.length-1])},B_=(s,r)=>Zi(r,s)?MZ(r,s):ye.none(),RM=(s,r)=>{hp(s,r.dom).bind(c=>ye.from(c.getNode())).map(et.fromDom).filter(Mi).each(ti)},DM=(s,r,c,p)=>(RM(!0,r),RM(!1,c),B_(r,c).fold(He(PZ,s,r,c,p),He(AM,s,r,c,p))),LM=(s,r,c,p,g)=>r?DM(s,p,c,g):DM(s,c,p,g),V_=(s,r)=>{const c=et.fromDom(s.getBody());return y3(s.schema,c.dom,r,s.selection.getRng()).map(g=>()=>{LM(c,r,g.from.block,g.to.block,s.schema).each(_=>{s.selection.setRng(_.toRange())})})},NZ=(s,r,c)=>{const p=r.getRng();return Oi(tx(s,et.fromDom(p.startContainer)),tx(s,et.fromDom(p.endContainer)),(g,_)=>Yo(g,_)?ye.none():ye.some(()=>{p.deleteContents(),LM(s,!0,g,_,c).each(E=>{r.setRng(E.toRange())})})).getOr(ye.none())},PM=(s,r)=>{const c=et.fromDom(r),p=He(Yo,s);return Yf(c,Uu,p).isSome()},FZ=(s,r)=>PM(s,r.startContainer)||PM(s,r.endContainer),$Z=(s,r)=>{const c=Ql(s.dom,$t.fromRangeStart(r)).isNone(),p=_c(s.dom,$t.fromRangeEnd(r)).isNone();return!FZ(s,r)&&c&&p},dv=s=>ye.some(()=>{s.setContent(""),s.selection.setCursorLocation()}),rb=s=>{const r=et.fromDom(s.getBody()),c=s.selection.getRng();return $Z(r,c)?dv(s):NZ(r,s.selection,s.schema)},Cp=(s,r)=>s.selection.isCollapsed()?ye.none():rb(s),fv=(s,r,c,p,g)=>ye.from(r._selectionOverrides.showCaret(s,c,p,g)),Xie=s=>{const r=s.ownerDocument.createRange();return r.selectNode(s),r},p7=(s,r)=>s.dispatch("BeforeObjectSelected",{target:r}).isDefaultPrevented()?ye.none():ye.some(Xie(r)),Jie=(s,r,c)=>{const p=nk(1,s.getBody(),r),g=$t.fromRangeStart(p),_=g.getNode();if(Vy(_))return fv(1,s,_,!g.isAtEnd(),!1);const E=g.getNode(!0);if(Vy(E))return fv(1,s,E,!1,!1);const R=gh(s.dom.getRoot(),g.getNode());return Vy(R)?fv(1,s,R,!1,c):ye.none()},MM=(s,r,c)=>r.collapsed?Jie(s,r,c).getOr(r):r,Qie=s=>U2(s)||s3(s),eae=s=>z2(s)||C8(s),tae=(s,r)=>{un(r)&&r.data.length===0&&s.remove(r)},BZ=(s,r,c,p,g,_)=>{fv(p,s,_.getNode(!g),g,!0).each(E=>{if(r.collapsed){const R=r.cloneRange();g?R.setEnd(E.startContainer,E.startOffset):R.setStart(E.endContainer,E.endOffset),R.deleteContents()}else r.deleteContents();s.selection.setRng(E)}),tae(s.dom,c)},nae=(s,r)=>{const c=s.selection.getRng();if(!un(c.commonAncestorContainer))return ye.none();const p=r?1:-1,g=Fd(s.getBody()),_=He(Wy,r?g.next:g.prev),E=r?Qie:eae,R=zy(p,s.getBody(),c),N=_(R),j=N&&lm(r,N);if(!j||!K4(R,j))return ye.none();if(E(j))return ye.some(()=>BZ(s,c,R.getNode(),p,r,j));const ae=_(j);return ae&&E(ae)&&K4(j,ae)?ye.some(()=>BZ(s,c,R.getNode(),p,r,ae)):ye.none()},NM=(s,r)=>nae(s,r),FM=(s,r)=>{const c=s.getBody();return r?sl(c).filter(U2):gp(c).filter(z2)},m7=s=>{const r=s.selection.getRng();return!r.collapsed&&(FM(s,!0).exists(c=>c.isEqual($t.fromRangeStart(r)))||FM(s,!1).exists(c=>c.isEqual($t.fromRangeEnd(r))))},$M=s=>he(s)&&(Uu(et.fromDom(s))||d2(et.fromDom(s))),Cf=sr.generate([{remove:["element"]},{moveToElement:["element"]},{moveToPosition:["position"]}]),sae=(s,r)=>{const c=r.getNode(!s),p=s?"after":"before";return Ln(c)&&c.getAttribute("data-mce-caret")===p},oae=(s,r,c,p,g)=>{const _=E=>g.isInline(E.nodeName.toLowerCase())&&!pp(c,p,s);return sk(!r,c).fold(()=>sk(r,p).fold(ct,_),_)},BM=(s,r,c,p,g)=>{const _=g.getNode(!c);return tx(et.fromDom(r),et.fromDom(p.getNode())).map(E=>mt(s,E)?Cf.remove(E.dom):Cf.moveToElement(_)).orThunk(()=>ye.some(Cf.moveToElement(_)))},VM=(s,r,c,p)=>$d(r,s,c).bind(g=>$M(g.getNode())||oae(s,r,c,g,p)?ye.none():r&&cr(g.getNode())||!r&&cr(g.getNode(!0))?BM(p,s,r,c,g):r&&z2(c)||!r&&U2(c)?ye.some(Cf.moveToPosition(g)):ye.none()),HM=(s,r)=>de(r)?ye.none():s&&cr(r.nextSibling)?ye.some(Cf.moveToElement(r.nextSibling)):!s&&cr(r.previousSibling)?ye.some(Cf.moveToElement(r.previousSibling)):ye.none(),VZ=(s,r,c)=>c.fold(p=>ye.some(Cf.remove(p)),p=>ye.some(Cf.moveToElement(p)),p=>pp(r,p,s)?ye.none():ye.some(Cf.moveToPosition(p))),HZ=(s,r,c,p)=>sae(r,c)?HM(r,c.getNode(!r)).orThunk(()=>VM(s,r,c,p)):VM(s,r,c,p).bind(g=>VZ(s,c,g)),UM=(s,r,c,p)=>{const g=nk(r?1:-1,s,c),_=$t.fromRangeStart(g),E=et.fromDom(s);return!r&&z2(_)?ye.some(Cf.remove(_.getNode(!0))):r&&U2(_)?ye.some(Cf.remove(_.getNode())):!r&&U2(_)&&Yk(E,_,p)?Oz(E,_,p).map(R=>Cf.remove(R.getNode())):r&&z2(_)&&As(E,_,p)?Pse(E,_,p).map(R=>Cf.remove(R.getNode())):HZ(s,r,_,p)},rae=(s,r)=>c=>(s._selectionOverrides.hideFakeCaret(),r3(s,r,et.fromDom(c)),!0),iae=(s,r)=>c=>{const p=r?$t.before(c):$t.after(c);return s.selection.setRng(p.toRange()),!0},Pg=s=>r=>(s.selection.setRng(r.toRange()),!0),gm=(s,r)=>ye.from(gh(s.getBody(),r)),iT=(s,r)=>{const c=s.selection.getNode();return gm(s,c).filter(cr).fold(()=>UM(s.getBody(),r,s.selection.getRng(),s.schema).map(p=>()=>p.fold(rae(s,r),iae(s,r),Pg(s))),()=>ye.some(Ue))},UZ=s=>{Ve(Pc(s,".mce-offscreen-selection"),ti)},aT=(s,r)=>{const c=s.selection.getNode();return cr(c)&&!Da(c)?gm(s,c.parentNode).filter(cr).fold(()=>ye.some(()=>{UZ(et.fromDom(s.getBody())),r3(s,r,et.fromDom(s.selection.getNode())),Z2(s)}),()=>ye.some(Ue)):m7(s)?ye.some(()=>{Br(s,s.selection.getRng(),et.fromDom(s.getBody()))}):ye.none()},zM=s=>{const r=s.dom,c=s.selection,p=gh(s.getBody(),c.getNode());if(Zt(p)&&r.isBlock(p)&&r.isEmpty(p)){const g=r.create("br",{"data-mce-bogus":"1"});r.setHTML(p,""),p.appendChild(g),c.setRng($t.before(g).toRange())}return!0},lT=(s,r)=>s.selection.isCollapsed()?iT(s,r):aT(s,r),WM=s=>s.hasOwnProperty("text"),jM=s=>s.hasOwnProperty("marker"),ZM=(s,r)=>{const c=(_,E)=>{if(un(_))return{text:_,offset:E};{const R=r(),N=_.childNodes;return E<N.length?(_.insertBefore(R,N[E]),{marker:R,before:!0}):(_.appendChild(R),{marker:R,before:!1})}},p=c(s.endContainer,s.endOffset);return{start:c(s.startContainer,s.startOffset),end:p}},qM=s=>{var r,c;const{start:p,end:g}=s,_=new window.Range;return WM(p)?_.setStart(p.text,p.offset):jM(p)&&(p.before?_.setStartBefore(p.marker):_.setStartAfter(p.marker),(r=p.marker.parentNode)===null||r===void 0||r.removeChild(p.marker)),WM(g)?_.setEnd(g.text,g.offset):jM(g)&&(g.before?_.setEndBefore(g.marker):_.setEndAfter(g.marker),(c=g.marker.parentNode)===null||c===void 0||c.removeChild(g.marker)),_},H_=(s,r)=>{var c;const p=s.dom,g=p.getParent(s.selection.getStart(),p.isBlock),_=p.getParent(s.selection.getEnd(),p.isBlock),E=s.getBody();if(((c=g==null?void 0:g.nodeName)===null||c===void 0?void 0:c.toLowerCase())==="div"&&g&&_&&g===E.firstChild&&_===E.lastChild&&!p.isEmpty(E)){const N=g.cloneNode(!1),j=()=>{if(r?Ni(s):Qk(s),E.firstChild!==g){const ae=ZM(s.selection.getRng(),()=>document.createElement("span"));Array.from(E.childNodes).forEach(fe=>N.appendChild(fe)),E.appendChild(N),s.selection.setRng(qM(ae))}};return ye.some(j)}return ye.none()},GM=(s,r)=>{const c=$t.fromRangeStart(s.selection.getRng());return $d(r,s.getBody(),c).filter(p=>r?kz(p):Ase(p)).bind(p=>dh(r?0:-1,p)).map(p=>()=>s.selection.select(p))},KM=(s,r)=>s.selection.isCollapsed()?GM(s,r):ye.none(),U_=un,zZ=s=>U_(s)&&s.data[0]===ml,WZ=s=>U_(s)&&s.data[s.data.length-1]===ml,YM=s=>{var r;return((r=s.ownerDocument)!==null&&r!==void 0?r:document).createTextNode(ml)},aae=s=>{var r;if(U_(s.previousSibling))return WZ(s.previousSibling)||s.previousSibling.appendData(ml),s.previousSibling;if(U_(s))return zZ(s)||s.insertData(0,ml),s;{const c=YM(s);return(r=s.parentNode)===null||r===void 0||r.insertBefore(c,s),c}},lae=s=>{var r,c;if(U_(s.nextSibling))return zZ(s.nextSibling)||s.nextSibling.insertData(0,ml),s.nextSibling;if(U_(s))return WZ(s)||s.appendData(ml),s;{const p=YM(s);return s.nextSibling?(r=s.parentNode)===null||r===void 0||r.insertBefore(p,s.nextSibling):(c=s.parentNode)===null||c===void 0||c.appendChild(p),p}},z_=(s,r)=>s?aae(r):lae(r),cae=He(z_,!0),uae=He(z_,!1),jZ=(s,r)=>un(s.container())?z_(r,s.container()):z_(r,s.getNode()),ZZ=(s,r)=>{const c=r.get();return c&&s.container()===c&&nm(c)},XM=(s,r)=>r.fold(c=>{W0(s.get());const p=cae(c);return s.set(p),ye.some($t(p,p.length-1))},c=>sl(c).map(p=>{if(ZZ(p,s)){const g=s.get();return $t(g,1)}else{W0(s.get());const g=jZ(p,!0);return s.set(g),$t(g,1)}}),c=>gp(c).map(p=>{if(ZZ(p,s)){const g=s.get();return $t(g,g.length-1)}else{W0(s.get());const g=jZ(p,!1);return s.set(g),$t(g,g.length-1)}}),c=>{W0(s.get());const p=uae(c);return s.set(p),ye.some($t(p,1))}),qZ=(s,r)=>{for(let c=0;c<s.length;c++){const p=s[c].apply(null,r);if(p.isSome())return p}return ye.none()},yd=sr.generate([{before:["element"]},{start:["element"]},{end:["element"]},{after:["element"]}]),h7=(s,r)=>{const c=uh(r,s);return c||s},JM=(s,r,c)=>{const p=Uz(c),g=h7(r,p.container());return Pl(s,g,p).fold(()=>_c(g,p).bind(He(Pl,s,g)).map(_=>yd.before(_)),ye.none)},dae=(s,r)=>Y0(s,r)===null,GZ=(s,r,c)=>Pl(s,r,c).filter(He(dae,r)),fae=(s,r,c)=>{const p=zz(c);return GZ(s,r,p).bind(g=>Ql(g,p).isNone()?ye.some(yd.start(g)):ye.none())},pae=(s,r,c)=>{const p=Uz(c);return GZ(s,r,p).bind(g=>_c(g,p).isNone()?ye.some(yd.end(g)):ye.none())},KZ=(s,r,c)=>{const p=zz(c),g=h7(r,p.container());return Pl(s,g,p).fold(()=>Ql(g,p).bind(He(Pl,s,g)).map(_=>yd.after(_)),ye.none)},YZ=s=>!OL(g7(s)),Mg=(s,r,c)=>qZ([JM,fae,pae,KZ],[s,r,c]).filter(YZ),g7=s=>s.fold(St,St,St,St),XZ=s=>s.fold(Fe("before"),Fe("start"),Fe("end"),Fe("after")),cT=s=>s.fold(yd.before,yd.before,yd.after,yd.after),QM=s=>s.fold(yd.start,yd.start,yd.end,yd.end),mae=(s,r)=>XZ(s)===XZ(r)&&g7(s)===g7(r),hae=(s,r,c,p,g,_)=>Oi(Pl(r,c,p),Pl(r,c,g),(E,R)=>E!==R&&toe(c,E,R)?yd.after(s?E:R):_).getOr(_),gae=(s,r)=>s.fold(Ht,c=>!mae(c,r)),vae=(s,r,c,p,g)=>{const _=lm(s,g);return $d(s,c,_).map(He(lm,s)).fold(()=>p.map(cT),N=>Mg(r,c,N).map(He(hae,s,r,c,_,N)).filter(He(gae,p))).filter(YZ)},uT=(s,r)=>s?r.fold(V(ye.some,yd.start),ye.none,V(ye.some,yd.after),ye.none):r.fold(ye.none,V(ye.some,yd.before),ye.none,V(ye.some,yd.end)),dT=(s,r,c,p)=>{const g=lm(s,p),_=Mg(r,c,g);return Mg(r,c,g).bind(He(uT,s)).orThunk(()=>vae(s,r,c,_,p))},bae=s=>ie(s.selection.getSel().modify),JZ=(s,r,c)=>{const p=s?1:-1;return r.setRng($t(c.container(),c.offset()+p).toRange()),r.getSel().modify("move",s?"forward":"backward","word"),!0},fT=(s,r)=>{const c=r.selection.getRng(),p=s?$t.fromRangeEnd(c):$t.fromRangeStart(c);return bae(r)?s&&sm(p)?JZ(!0,r.selection,p):!s&&f2(p)?JZ(!1,r.selection,p):!1:!1};var Ng;(function(s){s[s.Br=0]="Br",s[s.Block=1]="Block",s[s.Wrap=2]="Wrap",s[s.Eol=3]="Eol"})(Ng||(Ng={}));const pT=(s,r)=>s===-1?Zn(r):r,yae=(s,r,c)=>s===1?r.next(c):r.prev(c),_ae=(s,r,c,p)=>nr(p.getNode(r===1))?Ng.Br:pp(c,p)===!1?Ng.Block:Ng.Wrap,QZ=(s,r,c,p)=>{const g=Fd(c);let _=p;const E=[];for(;_;){const R=yae(r,g,_);if(!R)break;if(nr(R.getNode(!1)))return r===1?{positions:pT(r,E).concat([R]),breakType:Ng.Br,breakAt:ye.some(R)}:{positions:pT(r,E),breakType:Ng.Br,breakAt:ye.some(R)};if(!R.isVisible()){_=R;continue}if(s(_,R)){const N=_ae(c,r,_,R);return{positions:pT(r,E),breakType:N,breakAt:ye.some(R)}}E.push(R),_=R}return{positions:pT(r,E),breakType:Ng.Eol,breakAt:ye.none()}},eq=(s,r,c,p)=>r(c,p).breakAt.map(g=>{const _=r(c,g).positions;return s===-1?_.concat(g):[g].concat(_)}).getOr([]),eN=(s,r)=>je(s,(c,p)=>c.fold(()=>ye.some(p),g=>Oi(Po(g.getClientRects()),Po(p.getClientRects()),(_,E)=>{const R=Math.abs(r-_.left);return Math.abs(r-E.left)<=R?p:g}).or(c)),ye.none()),mT=(s,r)=>Po(r.getClientRects()).bind(c=>eN(s,c.left)),v7=He(QZ,$t.isAbove,-1),b7=He(QZ,$t.isBelow,1),tq=He(eq,-1,v7),Sae=He(eq,1,b7),vm=(s,r)=>v7(s,r).breakAt.isNone(),hT=(s,r)=>b7(s,r).breakAt.isNone(),nq=s=>sl(s).map(r=>[r].concat(b7(s,r).positions)).getOr([]),sq=s=>gp(s).map(r=>v7(s,r).positions.concat(r)).getOr([]),Cae=(s,r)=>mT(tq(s,r),r),oq=(s,r)=>mT(Sae(s,r),r),wae=cr,tN=(s,r)=>Math.abs(s.left-r),rq=(s,r)=>Math.abs(s.right-r),Eae=s=>Ps(s,"node"),iq=(s,r)=>_i(s,(c,p)=>{const g=Math.min(tN(c,r),rq(c,r)),_=Math.min(tN(p,r),rq(p,r));return _===g&&Eae(p)&&wae(p.node)||_<g?p:c}),W_=s=>{const r=c=>Nt(c,p=>{const g=N0(p);return g.node=s,g});if(Ln(s))return r(s.getClientRects());if(un(s)){const c=s.ownerDocument.createRange();return c.setStart(s,0),c.setEnd(s,s.data.length),r(c.getClientRects())}else return[]},nN=s=>Wn(s,W_);var ib;(function(s){s[s.Up=-1]="Up",s[s.Down=1]="Down"})(ib||(ib={}));const aq=(s,r,c,p)=>{let g=p;for(;g=d1(g,s,YC,r);)if(c(g))return},gT=(s,r,c,p,g,_)=>{let E=0;const R=[],N=fe=>{let ve=nN([fe]);s===ib.Up&&(ve=ve.reverse());for(let xe=0;xe<ve.length;xe++){const De=ve[xe];if(!c(De,j)){if(R.length>0&&r(De,Ui(R))&&E++,De.line=E,g(De))return!0;R.push(De)}}return!1},j=Ui(_.getClientRects());if(!j)return R;const ae=_.getNode();return ae&&(N(ae),aq(s,p,N,ae)),R},kae=(s,r)=>r.line>s,xae=(s,r)=>r.line===s,Tae=He(gT,ib.Up,p2,Cy),Iae=He(gT,ib.Down,Cy,p2),Aae=s=>Ui(s.getClientRects()),FCe=(s,r,c,p)=>{const g=Fd(r);let _,E,R,N;const j=[];let ae=0;s===ib.Down?(_=g.next,E=Cy,R=p2,N=$t.after(p)):(_=g.prev,E=p2,R=Cy,N=$t.before(p));const fe=Aae(N);do{if(!N.isVisible())continue;const ve=Aae(N);if(R(ve,fe))continue;j.length>0&&E(ve,Ui(j))&&ae++;const xe=N0(ve);if(xe.position=N,xe.line=ae,c(xe))return j;j.push(xe)}while(N=_(N));return j},Oae=s=>r=>kae(s,r),wp=s=>r=>xae(s,r),pv=(s,r)=>{s.selection.setRng(r),v_(s,s.selection.getRng())},sN=(s,r,c)=>ye.some(MM(s,r,c)),ab=(s,r,c,p,g,_)=>{const E=r===1,R=Fd(s.getBody()),N=He(Wy,E?R.next:R.prev),j=E?p:g;if(!c.collapsed){const De=wy(c);if(_(De))return fv(r,s,De,r===-1,!1);if(m7(s)){const Oe=c.cloneRange();return Oe.collapse(r===-1),ye.from(Oe)}}const ae=zy(r,s.getBody(),c);if(j(ae))return p7(s,ae.getNode(!E));let fe=N(ae);const ve=GC(c);if(fe)fe=lm(E,fe);else return ve?ye.some(c):ye.none();if(j(fe))return fv(r,s,fe.getNode(!E),E,!1);const xe=N(fe);return xe&&j(xe)&&K4(fe,xe)?fv(r,s,xe.getNode(!E),E,!1):ve?sN(s,fe.toRange(),!1):ye.none()},oN=(s,r,c,p,g,_)=>{const E=zy(r,s.getBody(),c),R=Ui(E.getClientRects()),N=r===ib.Down,j=s.getBody();if(!R)return ye.none();if(m7(s)){const Ne=N?$t.fromRangeEnd(c):$t.fromRangeStart(c);return(N?oq:Cae)(j,Ne).orThunk(()=>ye.from(Ne)).map(ut=>ut.toRange())}const fe=(N?Iae:Tae)(j,Oae(1),E),ve=Bt(fe,wp(1)),xe=R.left,De=iq(ve,xe);if(De&&_(De.node)){const Ne=Math.abs(xe-De.left),tt=Math.abs(xe-De.right);return fv(r,s,De.node,Ne<tt,!1)}let Oe;if(p(E)?Oe=E.getNode():g(E)?Oe=E.getNode(!0):Oe=wy(c),Oe){const Ne=FCe(r,j,Oae(1),Oe);let tt=iq(Bt(Ne,wp(1)),xe);if(tt||(tt=Ui(Bt(Ne,wp(0))),tt))return sN(s,tt.position.toRange(),!1)}return ve.length===0?rN(s,N).filter(N?g:p).map(Ne=>MM(s,Ne.toRange(),!1)):ye.none()},rN=(s,r)=>{const c=s.selection.getRng(),p=r?$t.fromRangeEnd(c):$t.fromRangeStart(c),g=B6(p.container(),s.getBody());if(r){const _=b7(g,p);return jo(_.positions)}else{const _=v7(g,p);return Po(_.positions)}},y7=(s,r,c)=>rN(s,r).filter(c).exists(p=>(s.selection.setRng(p.toRange()),!0)),vT=(s,r)=>{const c=s.dom.createRng();c.setStart(r.container(),r.offset()),c.setEnd(r.container(),r.offset()),s.selection.setRng(c)},lq=(s,r)=>{s?r.setAttribute("data-mce-selected","inline-boundary"):r.removeAttribute("data-mce-selected")},cq=(s,r,c)=>XM(r,c).map(p=>(vT(s,p),c)),Rae=(s,r,c)=>{const p=$t.fromRangeStart(s);if(s.collapsed)return p;{const g=$t.fromRangeEnd(s);return c?Ql(r,g).getOr(g):_c(r,p).getOr(p)}},uq=(s,r,c)=>{const p=s.getBody(),g=Rae(s.selection.getRng(),p,c),_=He(W2,s);return dT(c,_,p,g).bind(R=>cq(s,r,R))},Dae=(s,r,c)=>{const p=Nt(Pc(et.fromDom(r.getRoot()),'*[data-mce-selected="inline-boundary"]'),E=>E.dom),g=Bt(p,s),_=Bt(c,s);Ve(yo(g,_),He(lq,!1)),Ve(yo(_,g),He(lq,!0))},mv=(s,r)=>{const c=r.get();if(s.selection.isCollapsed()&&!s.composing&&c){const p=$t.fromRangeStart(s.selection.getRng());$t.isTextPosition(p)&&!noe(p)&&(vT(s,LD(c,p)),r.set(null))}},iN=(s,r,c,p)=>{if(r.selection.isCollapsed()){const g=Bt(p,s);Ve(g,_=>{const E=$t.fromRangeStart(r.selection.getRng());Mg(s,r.getBody(),E).bind(R=>cq(r,c,R))})}},dq=(s,r,c)=>Dy(s)?uq(s,r,c).isSome():!1,fq=(s,r,c)=>Dy(r)?fT(s,r):!1,Lae=s=>{const r=pl(null),c=He(W2,s);return s.on("NodeChange",p=>{Dy(s)&&(Dae(c,s.dom,p.parents),mv(s,r),iN(c,s,r,p.parents))}),r},Pae=He(fq,!0),Mae=He(fq,!1),j_=(s,r,c)=>{if(Dy(s)){const p=rN(s,r).getOrThunk(()=>{const g=s.selection.getRng();return r?$t.fromRangeEnd(g):$t.fromRangeStart(g)});return Mg(He(W2,s),s.getBody(),p).exists(g=>{const _=cT(g);return XM(c,_).exists(E=>(vT(s,E),!0))})}else return!1},aN=(s,r)=>{const c=document.createRange();return c.setStart(s.container(),s.offset()),c.setEnd(r.container(),r.offset()),c},lN=s=>Oi(sl(s),gp(s),(r,c)=>{const p=lm(!0,r),g=lm(!1,c);return _c(s,p).forall(_=>_.isEqual(g))}).getOr(!0),cN=(s,r)=>c=>XM(r,c).map(p=>()=>vT(s,p)),uN=(s,r,c,p)=>{const g=s.getBody(),_=He(W2,s);s.undoManager.ignore(()=>{s.selection.setRng(aN(c,p)),Qk(s),Mg(_,g,$t.fromRangeStart(s.selection.getRng())).map(QM).bind(cN(s,r)).each(hn)}),s.nodeChanged()},pq=(s,r)=>{const c=uh(r,s);return c||s},Nae=(s,r,c,p)=>{const g=pq(s.getBody(),p.container()),_=He(W2,s),E=Mg(_,g,p);return E.bind(N=>c?N.fold(Fe(ye.some(QM(N))),ye.none,Fe(ye.some(cT(N))),ye.none):N.fold(ye.none,Fe(ye.some(cT(N))),ye.none,Fe(ye.some(QM(N))))).map(cN(s,r)).getOrThunk(()=>{const N=xg(c,g,p),j=N.bind(ae=>Mg(_,g,ae));return Oi(E,j,()=>Pl(_,g,p).bind(ae=>lN(ae)?ye.some(()=>{r3(s,c,et.fromDom(ae))}):ye.none())).getOrThunk(()=>j.bind(()=>N.map(ae=>()=>{c?uN(s,r,p,ae):uN(s,r,ae,p)})))})},S3=(s,r,c)=>{if(s.selection.isCollapsed()&&Dy(s)){const p=$t.fromRangeStart(s.selection.getRng());return Nae(s,r,c,p)}return ye.none()},bT=s=>Kh(s)>1,dN=(s,r)=>{const c=et.fromDom(s.getBody()),p=et.fromDom(s.selection.getStart()),g=ov(p,c);return Vt(g,r).fold(Fe(g),_=>g.slice(0,_))},mq=s=>Kh(s)===1,hq=s=>dN(s,r=>s.schema.isBlock(oo(r))||bT(r)),gq=s=>dN(s,r=>s.schema.isBlock(oo(r))),_7=(s,r)=>{const c=He(Cx,s);return Wn(r,p=>c(p)?[p.dom]:[])},yT=s=>{const r=gq(s);return _7(s,r)},S7=(s,r,c,p)=>{const g=_7(r,p);if(g.length===0)r3(r,s,c);else{const _=cP(c.dom,g);r.selection.setRng(_.toRange())}},Fae=(s,r)=>{const c=Bt(hq(s),mq);return jo(c).bind(p=>{const g=$t.fromRangeStart(s.selection.getRng());return yp(r,g,p.dom)&&!m1(p)?ye.some(()=>S7(r,s,p,c)):ye.none()})},vq=(s,r)=>{const c=r.parentElement;return nr(r)&&!J(c)&&s.dom.isEmpty(c)},$ae=s=>m1(et.fromDom(s)),bq=(s,r)=>{const c=s.selection.getStart(),p=vq(s,c)||$ae(c)?cP(c,r):uP(s.selection.getRng(),r);s.selection.setRng(p.toRange())},yq=(s,r)=>{const c=yo(r,yT(s));c.length>0&&bq(s,c)},_q=s=>un(s.startContainer),Sq=s=>s.startOffset===0&&_q(s),$Ce=(s,r)=>{const c=r.startContainer.parentElement;return!J(c)&&Cx(s,et.fromDom(c))},Bae=s=>{const r=s.startContainer.parentNode,c=s.endContainer.parentNode;return!J(r)&&!J(c)&&r.isEqualNode(c)},Vae=s=>{const r=s.endContainer;return s.endOffset===(un(r)?r.length:r.childNodes.length)},Hae=s=>Bae(s)&&Vae(s),Uae=s=>!s.endContainer.isEqualNode(s.commonAncestorContainer),zae=s=>Hae(s)||Uae(s),Wae=s=>{const r=s.selection.getRng();return Sq(r)&&$Ce(s,r)&&zae(r)},jae=s=>{if(Wae(s)){const r=yT(s);return ye.some(()=>{Qk(s),yq(s,r)})}else return ye.none()},fN=(s,r)=>s.selection.isCollapsed()?Fae(s,r):jae(s),Cq=(s,r)=>j5(s,c=>Bd(c.dom),c=>r.isBlock(oo(c))),Zae=s=>Cq(et.fromDom(s.selection.getStart()),s.schema),lb=s=>{const r=s.selection.getRng();return r.collapsed&&(_q(r)||s.dom.isEmpty(r.startContainer))&&!Zae(s)},Z_=s=>(lb(s)&&bq(s,[]),!0),C7=(s,r,c)=>he(c)?ye.some(()=>{s._selectionOverrides.hideFakeCaret(),r3(s,r,et.fromDom(c))}):ye.none(),wq=(s,r)=>{const c=r?s3:C8,g=zy(r?1:-1,s.getBody(),s.selection.getRng());return c(g)?C7(s,r,g.getNode(!r)):ye.from(lm(r,g)).filter(_=>c(_)&&K4(g,_)).bind(_=>C7(s,r,_.getNode(!r)))},pN=(s,r)=>{const c=s.selection.getNode();return Kl(c)?C7(s,r,c):ye.none()},Fg=(s,r)=>s.selection.isCollapsed()?wq(s,r):pN(s,r),Eq=s=>qi(s,r=>Zt(r.dom)||cr(r.dom)).exists(r=>Zt(r.dom)),wf=s=>Mu(s!=null?s:"").getOr(0),cb=(s,r)=>{const c=s||_y(r)?"margin":"padding",p=Oa(r,"direction")==="rtl"?"-right":"-left";return c+p},mN=(s,r,c,p,g,_)=>{const E=cb(c,et.fromDom(_)),R=wf(s.getStyle(_,E));if(r==="outdent"){const N=Math.max(0,R-p);s.setStyle(_,E,N?N+g:"")}else{const N=R+p+g;s.setStyle(_,E,N)}},qae=(s,r)=>ts(r,c=>{const p=cb(N4(s),c),g=vu(c,p).map(wf).getOr(0);return s.dom.getContentEditable(c.dom)!=="false"&&g>0}),hN=s=>{const r=xq(s);return!s.mode.isReadOnly()&&(r.length>1||qae(s,r))},kq=s=>u2(s)||d2(s),Gae=s=>Yc(s).exists(kq),xq=s=>Bt(Xb(s.selection.getSelectedBlocks()),r=>!kq(r)&&!Gae(r)&&Eq(r)),Tq=(s,r)=>{var c,p;if(s.mode.isReadOnly())return;const{dom:g}=s,_=hD(s),E=(p=(c=/[a-z%]+$/i.exec(_))===null||c===void 0?void 0:c[0])!==null&&p!==void 0?p:"px",R=wf(_),N=N4(s);Ve(xq(s),j=>{mN(g,r,N,R,E,j.dom)})},Kae=s=>Tq(s,"indent"),gN=s=>Tq(s,"outdent"),Iq=s=>{if(s.selection.isCollapsed()&&hN(s)){const r=s.dom,c=s.selection.getRng(),p=$t.fromRangeStart(c),g=r.getParent(c.startContainer,r.isBlock);if(g!==null&&Iz(et.fromDom(g),p,s.schema))return ye.some(()=>gN(s))}return ye.none()},Aq=(s,r,c)=>Do([Iq,lT,NM,(p,g)=>S3(p,r,g),V_,px,KM,Fg,Cp,fN,H_],p=>p(s,c)).filter(p=>s.selection.isEditable()),q_=(s,r)=>{Aq(s,r,!1).fold(()=>{s.selection.isEditable()&&(Qk(s),Z2(s))},hn)},_T=(s,r)=>{Aq(s,r,!0).fold(()=>{s.selection.isEditable()&&Ni(s)},hn)},Oq=(s,r)=>{s.addCommand("delete",()=>{q_(s,r)}),s.addCommand("forwardDelete",()=>{_T(s,r)})},vN=5,bN=400,Rq=s=>s.touches===void 0||s.touches.length!==1?ye.none():ye.some(s.touches[0]),Yae=(s,r)=>{const c=Math.abs(s.clientX-r.x),p=Math.abs(s.clientY-r.y);return c>vN||p>vN},Xae=s=>{const r=la(),c=pl(!1),p=f4(g=>{s.dispatch("longpress",{...g,type:"longpress"}),c.set(!0)},bN);s.on("touchstart",g=>{Rq(g).each(_=>{p.cancel();const E={x:_.clientX,y:_.clientY,target:g.target};p.throttle(g),c.set(!1),r.set(E)})},!0),s.on("touchmove",g=>{p.cancel(),Rq(g).each(_=>{r.on(E=>{Yae(_,E)&&(r.clear(),c.set(!1),s.dispatch("longpresscancel"))})})},!0),s.on("touchend touchcancel",g=>{p.cancel(),g.type!=="touchcancel"&&r.get().filter(_=>_.target.isEqualNode(g.target)).each(()=>{c.get()?g.preventDefault():s.dispatch("tap",{...g,type:"tap"})})},!0)},yN=(s,r)=>Kt(s,r.nodeName),Jae=(s,r)=>un(r)?!0:Ln(r)?!yN(s.getBlockElements(),r)&&!hd(r)&&!af(s,r)&&!og(r):!1,Qae=(s,r,c)=>Ot(Ose(et.fromDom(c),et.fromDom(r)),p=>yN(s,p.dom)),ele=(s,r)=>{if(un(r)){if(r.data.length===0)return!0;if(/^\s+$/.test(r.data))return!r.nextSibling||yN(s,r.nextSibling)||og(r.nextSibling)}return!1},ST=s=>s.dom.create(gl(s),ff(s)),tle=s=>{const r=s.dom,c=s.selection,p=s.schema,g=p.getBlockElements(),_=c.getStart(),E=s.getBody();let R,N,j=null;const ae=gl(s);if(!_||!Ln(_))return;const fe=E.nodeName.toLowerCase();if(!p.isValidChild(fe,ae.toLowerCase())||Qae(g,E,_))return;if(E.firstChild===E.lastChild&&nr(E.firstChild)){R=ST(s),R.appendChild(gg().dom),E.replaceChild(R,E.firstChild),s.selection.setCursorLocation(R,0),s.nodeChanged();return}let ve=E.firstChild;for(;ve;)if(Ln(ve)&&A9(p,ve),Jae(p,ve)){if(ele(g,ve)){N=ve,ve=ve.nextSibling,r.remove(N);continue}if(!R){if(!j&&s.hasFocus()&&(j=ZM(s.selection.getRng(),()=>document.createElement("span"))),!ve.parentNode){ve=null;break}R=ST(s),E.insertBefore(R,ve)}N=ve,ve=ve.nextSibling,R.appendChild(N)}else R=null,ve=ve.nextSibling;j&&(s.selection.setRng(qM(j)),s.nodeChanged())},Dq=(s,r,c)=>{const p=et.fromDom(ST(s)),g=gg();Ri(p,g),c(r,p);const _=document.createRange();return _.setStartBefore(g.dom),_.setEndBefore(g.dom),_},Ma=s=>{s.on("NodeChange",()=>tle(s))},_N=s=>r=>(" "+r.attr("class")+" ").indexOf(s)!==-1,CT=(s,r,c)=>function(p){const g=arguments,_=g[g.length-2],E=_>0?r.charAt(_-1):"";if(E==='"')return p;if(E===">"){const R=r.lastIndexOf("<",_);if(R!==-1&&r.substring(R,_).indexOf('contenteditable="false"')!==-1)return p}return'<span class="'+c+'" data-mce-content="'+s.dom.encode(g[0])+'">'+s.dom.encode(typeof g[1]=="string"?g[1]:g[0])+"</span>"},Lq=(s,r,c)=>{let p=r.length,g=c.content;if(c.format!=="raw"){for(;p--;)g=g.replace(r[p],CT(s,g,W4(s)));c.content=g}},wT=(s,r)=>ts(s,c=>{const p=r.match(c);return p!==null&&p[0].length===r.length}),nle=s=>{const r="contenteditable",c=" "+Gt.trim(wU(s))+" ",p=" "+Gt.trim(W4(s))+" ",g=_N(c),_=_N(p),E=w2(s);E.length>0&&s.on("BeforeSetContent",R=>{Lq(s,E,R)}),s.parser.addAttributeFilter("class",R=>{let N=R.length;for(;N--;){const j=R[N];g(j)?j.attr(r,"true"):_(j)&&j.attr(r,"false")}}),s.serializer.addAttributeFilter(r,R=>{let N=R.length;for(;N--;){const j=R[N];if(!g(j)&&!_(j))continue;const ae=j.attr("data-mce-content");E.length>0&&ae?wT(E,ae)?(j.name="#text",j.type=3,j.raw=!0,j.value=ae):j.remove():j.attr(r,null)}})},Pq=s=>ul(et.fromDom(s.getBody()),"*[data-mce-caret]").map(r=>r.dom).getOrNull(),Mq=(s,r)=>{r.hasAttribute("data-mce-caret")&&(ci(r),s.selection.setRng(s.selection.getRng()),s.selection.scrollIntoView(r))},sle=(s,r)=>{const c=Pq(s);if(c){if(r.type==="compositionstart"){r.preventDefault(),r.stopPropagation(),Mq(s,c);return}ZC(c)&&(Mq(s,c),s.undoManager.add())}},ole=s=>{s.on("keyup compositionstart",He(sle,s))},SN=cr,rle=(s,r,c)=>ab(r,s,c,U2,z2,SN),ile=(s,r,c)=>oN(r,s,c,_=>U2(_)||xz(_),_=>z2(_)||vL(_),SN),w7=s=>{const r=s.dom.create(gl(s));return r.innerHTML='<br data-mce-bogus="1">',r},$g=(s,r,c)=>{const p=Fd(s.getBody()),g=He(Wy,r===1?p.next:p.prev);if(c.collapsed){const _=s.dom.getParent(c.startContainer,"PRE");if(!_)return;if(!g($t.fromRangeStart(c))){const R=et.fromDom(w7(s));r===1?dd(et.fromDom(_),R):Jc(et.fromDom(_),R),s.selection.select(R.dom,!0),s.selection.collapse()}}},C3=(s,r)=>{const c=r?1:-1,p=s.selection.getRng();return rle(c,s,p).orThunk(()=>($g(s,c,p),ye.none()))},ET=(s,r)=>{const c=r?1:-1,p=s.selection.getRng();return ile(c,s,p).orThunk(()=>($g(s,c,p),ye.none()))},CN=(s,r)=>{const c=r?s.getEnd(!0):s.getStart(!0);return OL(c)?!r:r},kT=(s,r)=>C3(s,CN(s.selection,r)).exists(c=>(pv(s,c),!0)),wN=(s,r)=>ET(s,r).exists(c=>(pv(s,c),!0)),Nq=(s,r)=>y7(s,r,r?z2:U2),E7=(s,r)=>FM(s,!r).map(c=>{const p=c.toRange(),g=s.selection.getRng();return r?p.setStart(g.startContainer,g.startOffset):p.setEnd(g.endContainer,g.endOffset),p}).exists(c=>(pv(s,c),!0)),Fq=s=>Qe(["figcaption"],oo(s)),ale=(s,r,c)=>{const p=He(Yo,r);return qi(et.fromDom(s.container()),g=>c.isBlock(oo(g)),p).filter(Fq)},lle=(s,r,c)=>r?hT(s.dom,c):vm(s.dom,c),cle=(s,r)=>{const c=et.fromDom(s.getBody()),p=$t.fromRangeStart(s.selection.getRng());return ale(p,c,s.schema).exists(()=>{if(lle(c,r,p)){const _=Dq(s,c,r?Ri:qv);return s.selection.setRng(_),!0}else return!1})},$q=(s,r)=>s.selection.isCollapsed()?cle(s,r):!1,ule=(s,r,c)=>{const p=s.selection.getRng(),g=$t.fromRangeStart(p);return s.getBody().firstChild===r&&vm(c,g)?(s.execCommand("InsertNewBlockBefore"),!0):!1},dle=(s,r)=>{const c=s.selection.getRng(),p=$t.fromRangeStart(c);return s.getBody().lastChild===r&&hT(r,p)?(s.execCommand("InsertNewBlockAfter"),!0):!1},Bq=(s,r)=>r?ye.from(s.dom.getParent(s.selection.getNode(),"details")).map(c=>dle(s,c)).getOr(!1):ye.from(s.dom.getParent(s.selection.getNode(),"summary")).bind(c=>ye.from(s.dom.getParent(c,"details")).map(p=>ule(s,p,c))).getOr(!1),EN=(s,r)=>Bq(s,r),fle={shiftKey:!1,altKey:!1,ctrlKey:!1,metaKey:!1,keyCode:0},BCe=s=>Nt(s,r=>({...fle,...r})),VCe=s=>Nt(s,r=>({...fle,...r})),Vq=(s,r)=>r.keyCode===s.keyCode&&r.shiftKey===s.shiftKey&&r.altKey===s.altKey&&r.ctrlKey===s.ctrlKey&&r.metaKey===s.metaKey,HCe=(s,r)=>Wn(BCe(s),c=>Vq(c,r)?[c]:[]),UCe=(s,r)=>Wn(VCe(s),c=>Vq(c,r)?[c]:[]),Ws=(s,...r)=>()=>s.apply(null,r),k7=(s,r)=>pt(HCe(s,r),c=>c.action()),ple=(s,r)=>Do(UCe(s,r),c=>c.action()),Hq=(s,r)=>{const c=r?1:-1,p=s.selection.getRng();return ab(s,c,p,s3,C8,Kl).exists(g=>(pv(s,g),!0))},_d=(s,r)=>{const c=r?1:-1,p=s.selection.getRng();return oN(s,c,p,s3,C8,Kl).exists(g=>(pv(s,g),!0))},kN=(s,r)=>y7(s,r,r?C8:s3),G_=sr.generate([{none:["current"]},{first:["current"]},{middle:["current","target"]},{last:["current"]}]),K_={...G_,none:s=>G_.none(s)},Uq=(s,r)=>xN(s,r,Ht),xN=(s,r,c)=>Wn(Il(s),p=>Kc(p,r)?c(p)?[p]:[]:xN(p,r,c)),TN=(s,r,c=ct)=>{if(c(r))return ye.none();if(Qe(s,oo(r)))return ye.some(r);const p=g=>Kc(g,"table")||c(g);return y0(r,s.join(","),p)},zq=(s,r)=>TN(["td","th"],s,r),mle=s=>Uq(s,"th,td"),IN=(s,r)=>ds(s,"table",r),AN=(s,r,c,p,g=Ht)=>{const _=p===1;if(!_&&c<=0)return K_.first(s[0]);if(_&&c>=s.length-1)return K_.last(s[s.length-1]);{const E=c+p,R=s[E];return g(R)?K_.middle(r,R):AN(s,r,E,p,g)}},Wq=(s,r)=>IN(s,r).bind(c=>{const p=mle(c);return Vt(p,_=>Yo(s,_)).map(_=>({index:_,all:p}))}),hle=(s,r,c)=>Wq(s,c).fold(()=>K_.none(s),g=>AN(g.all,s,g.index,1,r)),ON=(s,r,c)=>Wq(s,c).fold(()=>K_.none(),g=>AN(g.all,s,g.index,-1,r)),gle=s=>NR(s).filter(r=>r.trim().length!==0||r.indexOf(Za)>-1).isSome(),vle=s=>Wh(s)&&ql(s,"contenteditable")==="false",WCe=["img","br"],ble=s=>gle(s)||Qe(WCe,oo(s))||vle(s),jq=s=>b0(s,ble),jCe=(s,r)=>({left:s.left-r,top:s.top-r,right:s.right+r*2,bottom:s.bottom+r*2,width:s.width+r,height:s.height+r}),yle=(s,r)=>Wn(r,c=>{const p=jCe(N0(c.getBoundingClientRect()),-1);return[{x:p.left,y:s(p),cell:c},{x:p.right,y:s(p),cell:c}]}),_le=(s,r,c)=>je(s,(p,g)=>p.fold(()=>ye.some(g),_=>{const E=Math.sqrt(Math.abs(_.x-r)+Math.abs(_.y-c)),R=Math.sqrt(Math.abs(g.x-r)+Math.abs(g.y-c));return ye.some(R<E?g:_)}),ye.none()),Zq=(s,r,c,p,g)=>{const _=Pc(et.fromDom(c),"td,th,caption").map(R=>R.dom),E=Bt(yle(s,_),R=>r(R,g));return _le(E,p,g).map(R=>R.cell)},RN=s=>s.bottom,xT=s=>s.top,qq=(s,r)=>s.y<r,Gq=(s,r)=>s.y>r,Sle=He(Zq,RN,qq),Cle=He(Zq,xT,Gq),DN=(s,r)=>Po(r.getClientRects()).bind(c=>Sle(s,c.left,c.top)).bind(c=>mT(sq(c),r)),wle=(s,r)=>jo(r.getClientRects()).bind(c=>Cle(s,c.left,c.top)).bind(c=>mT(nq(c),r)),Ele=(s,r,c)=>c.breakAt.exists(p=>s(r,p).breakAt.isSome()),kle=s=>s.breakType===Ng.Wrap&&s.positions.length===0,xle=s=>s.breakType===Ng.Br&&s.positions.length===1,bm=(s,r,c)=>{const p=s(r,c);return kle(p)||!nr(c.getNode())&&xle(p)?!Ele(s,r,p):p.breakAt.isNone()},Kq=He(bm,v7),Yq=He(bm,b7),ZCe=(s,r,c)=>{const p=$t.fromRangeStart(r);return hp(!s,c).exists(g=>g.isEqual(p))},qCe=(s,r,c,p)=>{const g=s.selection.getRng(),_=r?1:-1;return JE()&&ZCe(r,g,c)?(fv(_,s,c,!r,!1).each(E=>{pv(s,E)}),!0):!1},GCe=(s,r,c)=>DN(r,c).orThunk(()=>Po(c.getClientRects()).bind(p=>eN(tq(s,$t.before(r)),p.left))).getOr($t.before(r)),KCe=(s,r,c)=>wle(r,c).orThunk(()=>Po(c.getClientRects()).bind(p=>eN(Sae(s,$t.after(r)),p.left))).getOr($t.after(r)),Xq=(s,r)=>{const c=r.getNode(s);return Jp(c)?ye.some(c):ye.none()},TT=(s,r,c)=>{r.undoManager.transact(()=>{const p=s?dd:Jc,g=Dq(r,et.fromDom(c),p);pv(r,g)})},Jq=(s,r,c)=>{const p=Xq(!!r,c),g=r===!1;p.fold(()=>pv(s,c.toRange()),_=>hp(g,s.getBody()).filter(E=>E.isEqual(c)).fold(()=>pv(s,c.toRange()),E=>TT(r,s,_)))},LN=(s,r,c,p)=>{const g=s.selection.getRng(),_=$t.fromRangeStart(g),E=s.getBody();if(!r&&Kq(p,_)){const R=GCe(E,c,_);return Jq(s,r,R),!0}else if(r&&Yq(p,_)){const R=KCe(E,c,_);return Jq(s,r,R),!0}else return!1},PN=(s,r,c)=>ye.from(s.dom.getParent(s.selection.getNode(),"td,th")).bind(p=>ye.from(s.dom.getParent(p,"table")).map(g=>c(s,r,g,p))).getOr(!1),MN=(s,r)=>PN(s,r,qCe),IT=(s,r)=>PN(s,r,LN),Tle=s=>{const r=F2.exact(s,0,s,0);return v8(r)},Qq=(s,r,c)=>c.fold(ye.none,ye.none,(p,g)=>jq(g).map(_=>Tle(_)),p=>s.mode.isReadOnly()?ye.none():(s.execCommand("mceTableInsertRowAfter"),eG(s,r,p))),eG=(s,r,c)=>Qq(s,r,hle(c,Wm)),Ile=(s,r,c)=>Qq(s,r,ON(c,Wm)),x7=(s,r)=>{const c=["table","li","dl"],p=et.fromDom(s.getBody()),g=R=>{const N=oo(R);return Yo(R,p)||Qe(c,N)},_=s.selection.getRng(),E=et.fromDom(r?_.endContainer:_.startContainer);return zq(E,g).map(R=>(IN(R,g).each(ae=>{s.model.table.clearSelectedCells(ae.dom)}),s.selection.collapse(!r),(r?eG:Ile)(s,g,R).each(ae=>{s.selection.setRng(ae)}),!0)).getOr(!1)},Ale=(s,r,c)=>{const p=ns.os.isMacOS()||ns.os.isiOS();k7([{keyCode:qt.RIGHT,action:Ws(kT,s,!0)},{keyCode:qt.LEFT,action:Ws(kT,s,!1)},{keyCode:qt.UP,action:Ws(wN,s,!1)},{keyCode:qt.DOWN,action:Ws(wN,s,!0)},...p?[{keyCode:qt.UP,action:Ws(E7,s,!1),metaKey:!0,shiftKey:!0},{keyCode:qt.DOWN,action:Ws(E7,s,!0),metaKey:!0,shiftKey:!0}]:[],{keyCode:qt.RIGHT,action:Ws(MN,s,!0)},{keyCode:qt.LEFT,action:Ws(MN,s,!1)},{keyCode:qt.UP,action:Ws(IT,s,!1)},{keyCode:qt.DOWN,action:Ws(IT,s,!0)},{keyCode:qt.UP,action:Ws(IT,s,!1)},{keyCode:qt.UP,action:Ws(EN,s,!1)},{keyCode:qt.DOWN,action:Ws(EN,s,!0)},{keyCode:qt.RIGHT,action:Ws(Hq,s,!0)},{keyCode:qt.LEFT,action:Ws(Hq,s,!1)},{keyCode:qt.UP,action:Ws(_d,s,!1)},{keyCode:qt.DOWN,action:Ws(_d,s,!0)},{keyCode:qt.RIGHT,action:Ws(dq,s,r,!0)},{keyCode:qt.LEFT,action:Ws(dq,s,r,!1)},{keyCode:qt.RIGHT,ctrlKey:!p,altKey:p,action:Ws(Pae,s,r)},{keyCode:qt.LEFT,ctrlKey:!p,altKey:p,action:Ws(Mae,s,r)},{keyCode:qt.UP,action:Ws($q,s,!1)},{keyCode:qt.DOWN,action:Ws($q,s,!0)}],c).each(g=>{c.preventDefault()})},Ole=(s,r)=>{s.on("keydown",c=>{c.isDefaultPrevented()||Ale(s,r,c)})},E1=(s,r)=>({container:s,offset:r}),Y_=vi.DOM,AT=s=>r=>s===r?-1:0,Rle=s=>r=>s.isBlock(r)||Qe(["BR","IMG","HR","INPUT"],r.nodeName)||s.getContentEditable(r)==="false",OT=(s,r,c)=>{if(un(s)&&r>=0)return ye.some(E1(s,r));{const p=mg(Y_);return ye.from(p.backwards(s,r,AT(s),c)).map(g=>E1(g.container,g.container.data.length))}},Dle=(s,r,c)=>{if(un(s)&&r>=s.length)return ye.some(E1(s,r));{const p=mg(Y_);return ye.from(p.forwards(s,r,AT(s),c)).map(g=>E1(g.container,0))}},NN=(s,r,c)=>{if(!un(s))return ye.none();const p=s.data;if(r>=0&&r<=p.length)return ye.some(E1(s,r));{const g=mg(Y_);return ye.from(g.backwards(s,r,AT(s),c)).bind(_=>{const E=_.container.data;return NN(_.container,r+E.length,c)})}},tG=(s,r,c)=>{if(!un(s))return ye.none();const p=s.data;if(r<=p.length)return ye.some(E1(s,r));{const g=mg(Y_);return ye.from(g.forwards(s,r,AT(s),c)).bind(_=>tG(_.container,r-p.length,c))}},FN=(s,r,c,p,g)=>{const _=mg(s,Rle(s));return ye.from(_.backwards(r,c,p,g))},Lle=s=>s.collapsed&&un(s.startContainer),Ple=s=>Md(s.toString().replace(/\u00A0/g," ")),RT=s=>s!==""&&" \uFEFF\f\n\r \v".indexOf(s)!==-1,Mle=(s,r)=>s.substring(r.length),nG=(s,r,c,p=!1)=>{let g;const _=c.charAt(0);for(g=r-1;g>=0;g--){const E=s.charAt(g);if(!p&&RT(E))return ye.none();if(_===E&&Go(s,c,g,r))break}return ye.some(g)},$N=(s,r,c,p=!1)=>{if(!Lle(r))return ye.none();const g={text:"",offset:0},_=(R,N,j)=>(g.text=j+g.text,g.offset+=N,nG(g.text,g.offset,c,p).getOr(N)),E=s.getParent(r.startContainer,s.isBlock)||s.getRoot();return FN(s,r.startContainer,r.startOffset,_,E).bind(R=>{const N=r.cloneRange();if(N.setStart(R.container,R.offset),N.setEnd(r.endContainer,r.endOffset),N.collapsed)return ye.none();const j=Ple(N);return j.lastIndexOf(c)!==0?ye.none():ye.some({text:Mle(j,c),range:N,trigger:c})})},Nle=s=>s.nodeType===Uv,Fle=s=>s.nodeType===Zf,sG=s=>{if(Nle(s))return E1(s,s.data.length);{const r=s.childNodes;return r.length>0?sG(r[r.length-1]):E1(s,r.length)}},oG=(s,r)=>{const c=s.childNodes;return c.length>0&&r<c.length?oG(c[r],0):c.length>0&&Fle(s)&&c.length===r?sG(c[c.length-1]):E1(s,r)},$le=(s,r)=>{var c;const p=(c=s.getParent(r.container,s.isBlock))!==null&&c!==void 0?c:s.getRoot();return FN(s,r.container,r.offset,(g,_)=>_===0?-1:_,p).filter(g=>{const _=g.container.data.charAt(g.offset-1);return!RT(_)}).isSome()},Ml=s=>r=>{const c=oG(r.startContainer,r.startOffset);return!$le(s,c)},Ble=(s,r,c)=>Do(c.triggers,p=>$N(s,r,p)),Vle=(s,r)=>{const c=r(),p=s.selection.getRng();return Ble(s.dom,p,c).bind(g=>rG(s,r,g))},rG=(s,r,c,p={})=>{var g;const _=r(),R=(g=s.selection.getRng().startContainer.nodeValue)!==null&&g!==void 0?g:"",N=Bt(_.lookupByTrigger(c.trigger),ae=>c.text.length>=ae.minChars&&ae.matches.getOrThunk(()=>Ml(s.dom))(c.range,R,c.text));if(N.length===0)return ye.none();const j=Promise.all(Nt(N,ae=>ae.fetch(c.text,ae.maxResults,p).then(ve=>({matchText:c.text,items:ve,columns:ae.columns,onAction:ae.onAction,highlightOn:ae.highlightOn}))));return ye.some({lookupData:j,context:c})};var Ep;(function(s){s[s.Error=0]="Error",s[s.Value=1]="Value"})(Ep||(Ep={}));const T7=(s,r,c)=>s.stype===Ep.Error?r(s.serror):c(s.svalue),iG=s=>{const r=[],c=[];return Ve(s,p=>{T7(p,g=>c.push(g),g=>r.push(g))}),{values:r,errors:c}},ub=(s,r)=>s.stype===Ep.Error?{stype:Ep.Error,serror:r(s.serror)}:s,BN=(s,r)=>s.stype===Ep.Value?{stype:Ep.Value,svalue:r(s.svalue)}:s,aG=(s,r)=>s.stype===Ep.Value?r(s.svalue):s,VN=(s,r)=>s.stype===Ep.Error?r(s.serror):s,DT=s=>({stype:Ep.Value,svalue:s}),LT=s=>({stype:Ep.Error,serror:s}),tc={fromResult:s=>s.fold(LT,DT),toResult:s=>T7(s,Wu.error,Wu.value),svalue:DT,partition:iG,serror:LT,bind:aG,bindError:VN,map:BN,mapError:ub,fold:T7},w3=s=>q(s)&&Zs(s).length>100?" removed due to size":JSON.stringify(s,null,2),I7=s=>{const r=s.length>10?s.slice(0,10).concat([{path:[],getErrorInfo:Fe("... (only showing first ten failures)")}]):s;return Nt(r,c=>"Failed path: ("+c.path.join(" > ")+")\n"+c.getErrorInfo())},Ef=(s,r)=>tc.serror([{path:s,getErrorInfo:r}]),A7=(s,r,c)=>Ef(s,()=>'Could not find valid *required* value for "'+r+'" in '+w3(c)),lG=(s,r)=>Ef(s,()=>'Choice schema did not contain choice key: "'+r+'"'),cG=(s,r,c)=>Ef(s,()=>'The chosen schema: "'+c+'" did not exist in branches: '+w3(r)),Ule=(s,r)=>Ef(s,Fe(r)),uG=(s,r,c,p)=>Vn(c,p).fold(()=>cG(s,c,p),_=>_.extract(s.concat(["branch: "+p]),r)),zle=(s,r)=>({extract:(g,_)=>Vn(_,s).fold(()=>lG(g,s),R=>uG(g,_,r,R)),toString:()=>"chooseOn("+s+"). Possible values: "+Zs(r)}),Wle=(s,r)=>r,O7=(s,r)=>ne(s)&&ne(r)?PT(s,r):r,dG=s=>(...r)=>{if(r.length===0)throw new Error("Can't merge zero objects");const c={};for(let p=0;p<r.length;p++){const g=r[p];for(const _ in g)Kt(g,_)&&(c[_]=s(c[_],g[_]))}return c},PT=dG(O7),fG=dG(Wle),UN=()=>({tag:"required",process:{}}),jle=s=>({tag:"defaultedThunk",process:s}),pG=s=>jle(Fe(s)),Zle=()=>({tag:"option",process:{}}),qle=(s,r)=>s.length>0?tc.svalue(PT(r,fG.apply(void 0,s))):tc.svalue(r),mG=s=>V(tc.serror,sn)(s),hG={consolidateObj:(s,r)=>{const c=tc.partition(s);return c.errors.length>0?mG(c.errors):qle(c.values,r)},consolidateArr:s=>{const r=tc.partition(s);return r.errors.length>0?mG(r.errors):tc.svalue(r.values)}},Gle=(s,r,c,p)=>({tag:"field",key:s,newKey:r,presence:c,prop:p}),Kle=(s,r)=>({tag:"custom",newKey:s,instantiator:r}),zN=(s,r,c)=>{switch(s.tag){case"field":return r(s.key,s.newKey,s.presence,s.prop);case"custom":return c(s.newKey,s.instantiator)}},MT=s=>{const r=(p,g)=>tc.bindError(s(g),_=>Ule(p,_)),c=Fe("val");return{extract:r,toString:c}},gG=MT(tc.svalue),Yle=(s,r,c,p)=>Vn(r,c).fold(()=>A7(s,c,r),p),vG=(s,r,c,p)=>{const g=Vn(s,r).getOrThunk(()=>c(s));return p(g)},Xle=(s,r,c)=>c(Vn(s,r)),Jle=(s,r,c,p)=>{const g=Vn(s,r).map(_=>_===!0?c(s):_);return p(g)},bG=(s,r,c,p,g)=>{const _=R=>g.extract(r.concat([p]),R),E=R=>R.fold(()=>tc.svalue(ye.none()),N=>{const j=g.extract(r.concat([p]),N);return tc.map(j,ye.some)});switch(s.tag){case"required":return Yle(r,c,p,_);case"defaultedThunk":return vG(c,p,s.process,_);case"option":return Xle(c,p,E);case"defaultedOptionThunk":return Jle(c,p,s.process,E);case"mergeWithThunk":return vG(c,p,Fe({}),R=>{const N=PT(s.process(c),R);return _(N)})}},Qle=(s,r,c)=>{const p={},g=[];for(const _ of c)zN(_,(E,R,N,j)=>{const ae=bG(N,s,r,E,j);tc.fold(ae,fe=>{g.push(...fe)},fe=>{p[R]=fe})},(E,R)=>{p[E]=R(r)});return g.length>0?tc.serror(g):tc.svalue(p)},R7=s=>({extract:(p,g)=>Qle(p,g,s),toString:()=>"obj{\n"+Nt(s,g=>zN(g,(_,E,R,N)=>_+" -> "+N.toString(),(_,E)=>"state("+_+")")).join("\n")+"}"}),WN=s=>({extract:(p,g)=>{const _=Nt(g,(E,R)=>s.extract(p.concat(["["+R+"]"]),E));return hG.consolidateArr(_)},toString:()=>"array("+s.toString()+")"}),yG=(s,r)=>{const c=St;return{extract:(_,E)=>{const R=[];for(const N of s){const j=N.extract(_,E);if(j.stype===Ep.Value)return{stype:Ep.Value,svalue:c(j.svalue)};R.push(j)}return hG.consolidateArr(R)},toString:()=>"oneOf("+Nt(s,_=>_.toString()).join(", ")+")"}},_G=V(WN,R7),ece=s=>MT(r=>s(r).fold(tc.serror,tc.svalue)),tce=(s,r,c)=>{const p=r.extract([s],c);return tc.mapError(p,g=>({input:c,errors:g}))},nce=(s,r,c)=>tc.toResult(tce(s,r,c)),sce=s=>"Errors: \n"+I7(s.errors).join("\n")+"\n\nInput object: "+w3(s.input),NT=(s,r)=>zle(s,qs(r,R7)),oce=Fe(gG),FT=(s,r)=>MT(c=>{const p=typeof c;return s(c)?tc.svalue(c):tc.serror("Expected type: ".concat(r," but got: ").concat(p))}),SG=FT(Be,"number"),X_=FT(z,"string"),rce=FT(ce,"boolean"),$T=FT(ie,"function"),J_=Gle,CG=Kle,wG=s=>ece(r=>Qe(s,r)?Wu.value(r):Wu.error('Unsupported value: "'.concat(r,'", choose one of "').concat(s.join(", "),'".'))),BT=(s,r)=>J_(s,s,UN(),r),jN=s=>BT(s,X_),ZN=(s,r)=>J_(s,s,UN(),wG(r)),EG=s=>BT(s,$T),kG=(s,r)=>J_(s,s,UN(),WN(r)),qN=(s,r)=>J_(s,s,Zle(),r),E3=s=>qN(s,X_),ice=s=>qN(s,$T),ace=(s,r)=>J_(s,s,pG(r),oce()),Q_=(s,r,c)=>J_(s,s,pG(r),c),lce=(s,r)=>Q_(s,r,SG),VT=(s,r)=>Q_(s,r,X_),D7=(s,r,c)=>Q_(s,r,wG(c)),HT=(s,r)=>Q_(s,r,rce),Bg=(s,r)=>Q_(s,r,$T),cce=(s,r,c)=>Q_(s,r,WN(c)),xG=jN("type"),TG=EG("fetch"),GN=EG("onAction"),uce=Bg("onSetup",()=>Ue),dce=E3("text"),IG=E3("icon"),fce=E3("tooltip"),KN=E3("label"),pce=HT("active",!1),mce=HT("enabled",!0),AG=HT("primary",!1),OG=s=>ace("columns",s),L7=s=>VT("type",s),hce=R7([xG,jN("trigger"),lce("minChars",1),OG(1),lce("maxResults",10),ice("matches"),TG,GN,cce("highlightOn",[],X_)]),gce=s=>nce("Autocompleter",hce,s),YN=[mce,fce,IG,dce,uce,VT("context","mode:design")],RG=[pce].concat(YN),ol=[Bg("predicate",ct),D7("scope","node",["node","editor"]),D7("position","selection",["node","selection","line"])],Vg=YN.concat([L7("contextformbutton"),VT("align","end"),AG,GN,CG("original",St)]),vce=RG.concat([L7("contextformbutton"),VT("align","end"),AG,GN,CG("original",St)]),JCe=YN.concat([L7("contextformbutton")]),bce=RG.concat([L7("contextformtogglebutton")]),yce=NT("type",{contextformbutton:Vg,contextformtogglebutton:vce}),XN=[KN,kG("commands",yce),qN("launch",NT("type",{contextformbutton:JCe,contextformtogglebutton:bce})),Bg("onInput",Ue),Bg("onSetup",Ue)],_ce=[...ol,...XN,ZN("type",["contextform"]),Bg("initValue",Fe("")),E3("placeholder")],DG=[...ol,...XN,ZN("type",["contextsliderform"]),Bg("initValue",Fe(0)),Bg("min",Fe(0)),Bg("max",Fe(100))],eS=[...ol,...XN,ZN("type",["contextsizeinputform"]),Bg("initValue",Fe({width:"",height:""}))];NT("type",{contextform:_ce,contextsliderform:DG,contextsizeinputform:eS}),R7([L7("contexttoolbar"),BT("items",yG([X_,_G([E3("name"),E3("label"),kG("items",X_)])]))].concat(ol));const QCe=s=>{const r=s.ui.registry.getAll().popups,c=qs(r,E=>gce(E).fold(R=>{throw new Error(sce(R))},St)),p=Nr(Zo(c,E=>E.trigger)),g=br(c);return{dataset:c,triggers:p,lookupByTrigger:E=>Bt(g,R=>R.trigger===E)}},Sce=(s,r)=>{const c=f4(r.load,50);s.on("input",p=>{p.inputType==="insertCompositionText"&&!s.composing||c.throttle()}),s.on("keydown",p=>{const g=p.which;g===8?c.throttle():g===27?(c.cancel(),r.cancelIfNecessary()):(g===38||g===40)&&c.cancel()},!0),s.on("remove",c.cancel)},Cce=s=>{const r=la(),c=pl(!1),p=r.isSet,g=()=>{p()&&(qa(s),c.set(!1),r.clear())},_=fe=>{p()||r.set({trigger:fe.trigger,matchLength:fe.text.length})},E=Es(()=>QCe(s)),R=fe=>r.get().map(ve=>$N(s.dom,s.selection.getRng(),ve.trigger,!0).bind(xe=>rG(s,E,xe,fe))).getOrThunk(()=>Vle(s,E)),N=fe=>{R(fe).fold(g,ve=>{_(ve.context),ve.lookupData.then(xe=>{r.get().map(De=>{const Oe=ve.context;De.trigger===Oe.trigger&&(r.set({...De,matchLength:Oe.text.length}),c.get()?(La(s,{range:Oe.range}),cD(s,{lookupData:xe})):(c.set(!0),La(s,{range:Oe.range}),lD(s,{lookupData:xe})))})})})},j=(fe,ve)=>{const xe=fe.compareBoundaryPoints(window.Range.START_TO_START,ve),De=fe.compareBoundaryPoints(window.Range.END_TO_END,ve);return xe>=0&&De<=0},ae=()=>r.get().bind(({trigger:fe})=>{const ve=s.selection.getRng();return $N(s.dom,ve,fe,c.get()).filter(({range:xe})=>j(ve,xe)).map(({range:xe})=>xe)});s.addCommand("mceAutocompleterReload",(fe,ve)=>{const xe=q(ve)?ve.fetchOptions:{};N(xe)}),s.addCommand("mceAutocompleterClose",g),s.addCommand("mceAutocompleterRefreshActiveRange",()=>{ae().each(fe=>{La(s,{range:fe})})}),s.editorCommands.addQueryStateHandler("mceAutoCompleterInRange",()=>ae().isSome()),Sce(s,{cancelIfNecessary:g,load:N})},wce=Qa().browser.isSafari(),LG=s=>vg(et.fromDom(s)),JN=(s,r)=>{var c;return s.startOffset===0&&s.endOffset===((c=r.textContent)===null||c===void 0?void 0:c.length)},UT=(s,r)=>ye.from(s.getParent(r.container(),"details")),zT=(s,r)=>UT(s,r).isSome(),Ug=(s,r)=>{const c=ye.from(s.getParent(r.startContainer,"details")),p=ye.from(s.getParent(r.endContainer,"details"));if(c.isSome()||p.isSome()){const g=c.bind(_=>ye.from(s.select("summary",_)[0]));return ye.some({startSummary:g,startDetails:c,endDetails:p})}else return ye.none()},PG=(s,r)=>sl(r).exists(c=>c.isEqual(s)),MG=(s,r)=>gp(r).exists(c=>nr(c.getNode())&&Ql(r,c).exists(p=>p.isEqual(s))||c.isEqual(s)),Ece=(s,r)=>r.startSummary.exists(c=>PG(s,c)),WT=(s,r)=>r.startSummary.exists(c=>MG(s,c)),QN=(s,r)=>r.startDetails.exists(c=>Ql(c,s).forall(p=>r.startSummary.exists(g=>!g.contains(s.container())&&g.contains(p.container())))),NG=(s,r,c)=>c.startDetails.exists(p=>_c(s,r).forall(g=>!p.contains(g.container()))),eF=(s,r)=>{const c=r.getNode();ge(c)||s.selection.setCursorLocation(c,r.offset())},FG=(s,r,c)=>{const p=s.dom.getParent(r.container(),"details");if(p&&!p.open){const g=s.dom.select("summary",p)[0];g&&(c?sl(g):gp(g)).each(E=>eF(s,E))}else eF(s,r)},kce=(s,r)=>{const c=N=>N.contains(s.startContainer),p=N=>N.contains(s.endContainer),g=r.startSummary.exists(c),_=r.startSummary.exists(p),E=r.startDetails.forall(N=>r.endDetails.forall(j=>N!==j));return(g||_)&&!(g&&_)||E},$G=(s,r,c)=>{const{dom:p,selection:g}=s,_=s.getBody();if(c==="character"){const E=$t.fromRangeStart(g.getRng()),R=p.getParent(E.container(),p.isBlock),N=UT(p,E),j=R&&p.isEmpty(R),ae=J(R==null?void 0:R.previousSibling),fe=J(R==null?void 0:R.nextSibling);return j&&(r?fe:ae)&&xg(!r,_,E).exists(De=>zT(p,De)&&!Er(N,UT(p,De)))?!0:xg(r,_,E).fold(ct,ve=>{const xe=UT(p,ve);if(zT(p,ve)&&!Er(N,xe)){if(r||FG(s,ve,!1),R&&j){if(r&&ae)return!0;if(!r&&fe)return!0;FG(s,ve,r),s.dom.remove(R)}return!0}else return!1})}else return!1},xce=(s,r,c,p)=>{const _=s.selection.getRng(),E=$t.fromRangeStart(_),R=s.getBody();return p==="selection"?kce(_,r):c?WT(E,r)||NG(R,E,r):Ece(E,r)||QN(E,r)},Tce=(s,r,c)=>Ug(s.dom,s.selection.getRng()).fold(()=>$G(s,r,c),p=>xce(s,p,r,c)||$G(s,r,c)),BG=(s,r,c)=>{const p=s.selection,g=p.getNode(),_=p.getRng(),E=$t.fromRangeStart(_);return k9(g)?(c==="selection"&&JN(_,g)||yp(r,E,g)?LG(g):s.undoManager.transact(()=>{const R=p.getSel();let{anchorNode:N,anchorOffset:j,focusNode:ae,focusOffset:fe}=R!=null?R:{};const ve=()=>{he(N)&&he(j)&&he(ae)&&he(fe)&&(R==null||R.setBaseAndExtent(N,j,ae,fe))},xe=()=>{N=R==null?void 0:R.anchorNode,j=R==null?void 0:R.anchorOffset,ae=R==null?void 0:R.focusNode,fe=R==null?void 0:R.focusOffset},De=(Ne,tt)=>{Ve(Ne.childNodes,ut=>{Ig(ut)&&tt.appendChild(ut)})},Oe=s.dom.create("span",{"data-mce-bogus":"1"});De(g,Oe),g.appendChild(Oe),ve(),(c==="word"||c==="line")&&(R==null||R.modify("extend",r?"right":"left",c)),!p.isCollapsed()&&JN(p.getRng(),Oe)?LG(g):(s.execCommand(r?"ForwardDelete":"Delete"),xe(),De(Oe,g),ve()),s.dom.remove(Oe)}),!0):!1},k3=(s,r,c)=>Tce(s,r,c)||wce&&BG(s,r,c)?ye.some(Ue):ye.none(),VG=s=>(r,c,p={})=>{const g=r.getBody(),_={bubbles:!0,composed:!0,data:null,isComposing:!1,detail:0,view:null,target:g,currentTarget:g,eventPhase:Event.AT_TARGET,originalTarget:g,explicitOriginalTarget:g,isTrusted:!1,srcElement:g,cancelable:!1,preventDefault:Ue,inputType:c},E=c4(new InputEvent(s));return r.dispatch(s,{...E,..._,...p})},P7=VG("input"),jT=VG("beforeinput"),HG=Qa(),tF=HG.os,nF=tF.isMacOS()||tF.isiOS(),Ice=HG.browser.isFirefox(),t6e=(s,r,c)=>{const p=c.keyCode===qt.BACKSPACE?"deleteContentBackward":"deleteContentForward",g=s.selection.isCollapsed(),_=g?"character":"selection",E=R=>g?R?"word":"line":"selection";ple([{keyCode:qt.BACKSPACE,action:Ws(Iq,s)},{keyCode:qt.BACKSPACE,action:Ws(lT,s,!1)},{keyCode:qt.DELETE,action:Ws(lT,s,!0)},{keyCode:qt.BACKSPACE,action:Ws(NM,s,!1)},{keyCode:qt.DELETE,action:Ws(NM,s,!0)},{keyCode:qt.BACKSPACE,action:Ws(S3,s,r,!1)},{keyCode:qt.DELETE,action:Ws(S3,s,r,!0)},{keyCode:qt.BACKSPACE,action:Ws(px,s,!1)},{keyCode:qt.DELETE,action:Ws(px,s,!0)},{keyCode:qt.BACKSPACE,action:Ws(k3,s,!1,_)},{keyCode:qt.DELETE,action:Ws(k3,s,!0,_)},...nF?[{keyCode:qt.BACKSPACE,altKey:!0,action:Ws(k3,s,!1,E(!0))},{keyCode:qt.DELETE,altKey:!0,action:Ws(k3,s,!0,E(!0))},{keyCode:qt.BACKSPACE,metaKey:!0,action:Ws(k3,s,!1,E(!1))}]:[{keyCode:qt.BACKSPACE,ctrlKey:!0,action:Ws(k3,s,!1,E(!0))},{keyCode:qt.DELETE,ctrlKey:!0,action:Ws(k3,s,!0,E(!0))}],{keyCode:qt.BACKSPACE,action:Ws(KM,s,!1)},{keyCode:qt.DELETE,action:Ws(KM,s,!0)},{keyCode:qt.BACKSPACE,action:Ws(Fg,s,!1)},{keyCode:qt.DELETE,action:Ws(Fg,s,!0)},{keyCode:qt.BACKSPACE,action:Ws(Cp,s,!1)},{keyCode:qt.DELETE,action:Ws(Cp,s,!0)},{keyCode:qt.BACKSPACE,action:Ws(V_,s,!1)},{keyCode:qt.DELETE,action:Ws(V_,s,!0)},{keyCode:qt.BACKSPACE,action:Ws(fN,s,!1)},{keyCode:qt.DELETE,action:Ws(fN,s,!0)},{keyCode:qt.BACKSPACE,action:Ws(H_,s,!1)},{keyCode:qt.DELETE,action:Ws(H_,s,!0)}],c).filter(R=>s.selection.isEditable()).each(R=>{c.preventDefault(),jT(s,p).isDefaultPrevented()||(R(),P7(s,p))})},sF=(s,r,c)=>k7([{keyCode:qt.BACKSPACE,action:Ws(zM,s)},{keyCode:qt.DELETE,action:Ws(zM,s)},...nF?[{keyCode:qt.BACKSPACE,altKey:!0,action:Ws(Z_,s)},{keyCode:qt.DELETE,altKey:!0,action:Ws(Z_,s)},...c?[{keyCode:Ice?224:91,action:Ws(Z_,s)}]:[]]:[{keyCode:qt.BACKSPACE,ctrlKey:!0,action:Ws(Z_,s)},{keyCode:qt.DELETE,ctrlKey:!0,action:Ws(Z_,s)}]],r),Ace=(s,r)=>{let c=!1;s.on("keydown",p=>{c=p.keyCode===qt.BACKSPACE,p.isDefaultPrevented()||t6e(s,r,p)}),s.on("keyup",p=>{p.isDefaultPrevented()||sF(s,p,c),c=!1})},Oce=s=>{for(;s;){if(Ln(s)||un(s)&&s.data&&/[\r\n\s]/.test(s.data))return s;s=s.nextSibling}return null},tS=(s,r)=>{const c=s.dom,p=s.schema.getMoveCaretBeforeOnEnterElements();if(!r)return;if(/^(LI|DT|DD)$/.test(r.nodeName)){const _=Oce(r.firstChild);_&&/^(UL|OL|DL)$/.test(_.nodeName)&&r.insertBefore(c.doc.createTextNode(Za),r.firstChild)}const g=c.createRng();if(r.normalize(),r.hasChildNodes()){const _=new Gl(r,r);let E=r,R;for(;R=_.current();){if(un(R)){g.setStart(R,0),g.setEnd(R,0);break}if(p[R.nodeName.toLowerCase()]){g.setStartBefore(R),g.setEndBefore(R);break}E=R,R=_.next()}R||(g.setStart(E,0),g.setEnd(E,0))}else nr(r)?r.nextSibling&&c.isBlock(r.nextSibling)?(g.setStartBefore(r),g.setEndBefore(r)):(g.setStartAfter(r),g.setEndAfter(r)):(g.setStart(r,0),g.setEnd(r,0));s.selection.setRng(g),v_(s,g)},nS=(s,r)=>{const c=s.getRoot();let p,g=r;for(;g!==c&&g&&s.getContentEditable(g)!=="false";){if(s.getContentEditable(g)==="true"){p=g;break}g=g.parentNode}return g!==c?p:c},oF=s=>ye.from(s.dom.getParent(s.selection.getStart(!0),s.dom.isBlock)),UG=s=>oF(s).fold(Fe(""),r=>r.nodeName.toUpperCase()),Rce=s=>oF(s).filter(r=>d2(et.fromDom(r))).isSome(),rF=s=>{s.innerHTML='<br data-mce-bogus="1">'},n6e=(s,r,c)=>{const p=s.dom;ye.from(c.style).map(p.parseStyle).each(N=>{const ae={...Xc(et.fromDom(r)),...N};p.setStyles(r,ae)});const g=ye.from(c.class).map(N=>N.split(/\s+/)),_=ye.from(r.className).map(N=>Bt(N.split(/\s+/),j=>j!==""));Oi(g,_,(N,j)=>{const ae=Bt(j,ve=>!Qe(N,ve)),fe=[...N,...ae];p.setAttrib(r,"class",fe.join(" "))});const E=["style","class"],R=us(c,(N,j)=>!Qe(E,j));p.setAttribs(r,R)},nc=(s,r)=>{if(gl(s).toLowerCase()===r.tagName.toLowerCase()){const p=ff(s);n6e(s,r,p)}},zG=(s,r,c,p,g=!0,_,E)=>{const R=s.dom,N=s.schema,j=gl(s),ae=c?c.nodeName.toUpperCase():"";let fe=r;const ve=N.getTextInlineElements();let xe;_||ae==="TABLE"||ae==="HR"?xe=R.create(_||j,E||{}):xe=c.cloneNode(!1);let De=xe;if(!g)R.setAttrib(xe,"style",null),R.setAttrib(xe,"class",null);else do if(ve[fe.nodeName]){if(Bd(fe)||hd(fe))continue;const Oe=fe.cloneNode(!1);R.setAttrib(Oe,"id",""),xe.hasChildNodes()?(Oe.appendChild(xe.firstChild),xe.appendChild(Oe)):(De=Oe,xe.appendChild(Oe))}while((fe=fe.parentNode)&&fe!==p);return nc(s,xe),rF(De),xe},Dce=(s,r)=>s.dom.getParent(r,Km),Lce=(s,r,c)=>{let p=r;for(;p&&p!==s&&J(p.nextSibling);){const g=p.parentElement;if(!g||!c(g))return Km(g);p=g}return!1},Pce=(s,r,c)=>!r&&c.nodeName.toLowerCase()===gl(s)&&s.dom.isEmpty(c)&&Lce(s.getBody(),c,p=>Kt(s.schema.getTextBlockElements(),p.nodeName.toLowerCase())),Mce=(s,r,c)=>{var p,g,_;const E=r(gl(s)),R=Dce(s,c);R&&(s.dom.insertAfter(E,R),tS(s,E),((_=(g=(p=c.parentElement)===null||p===void 0?void 0:p.childNodes)===null||g===void 0?void 0:g.length)!==null&&_!==void 0?_:0)>1&&s.dom.remove(c))},Nce=(s,r)=>s.firstChild&&s.firstChild.nodeName===r,Fce=s=>{var r;return((r=s.parentNode)===null||r===void 0?void 0:r.firstChild)===s},M7=(s,r)=>{const c=s==null?void 0:s.parentNode;return he(c)&&c.nodeName===r},WG=s=>he(s)&&/^(OL|UL|LI)$/.test(s.nodeName),iF=s=>he(s)&&/^(LI|DT|DD)$/.test(s.nodeName),aF=s=>WG(s)&&WG(s.parentNode),sS=s=>{const r=s.parentNode;return iF(r)?r:s},ZT=(s,r,c)=>{let p=s[c?"firstChild":"lastChild"];for(;p&&!Ln(p);)p=p[c?"nextSibling":"previousSibling"];return p===r},$ce=s=>je(Zo(Xc(et.fromDom(s)),(r,c)=>"".concat(c,": ").concat(r,";")),(r,c)=>r+c,""),s6e=(s,r,c,p,g)=>{const _=s.dom,E=s.selection.getRng(),R=c.parentNode;if(c===s.getBody()||!R)return;aF(c)&&(g="LI");const N=iF(p)?$ce(p):void 0;let j=iF(p)&&N?r(g,{style:$ce(p)}):r(g);if(ZT(c,p,!0)&&ZT(c,p,!1))if(M7(c,"LI")){const ae=sS(c);_.insertAfter(j,ae),Fce(c)?_.remove(ae):_.remove(c)}else _.replace(j,c);else if(ZT(c,p,!0))M7(c,"LI")?(_.insertAfter(j,sS(c)),j.appendChild(_.doc.createTextNode(" ")),j.appendChild(c)):R.insertBefore(j,c),_.remove(p);else if(ZT(c,p,!1))_.insertAfter(j,sS(c)),_.remove(p);else{c=sS(c);const ae=E.cloneRange();ae.setStartAfter(p),ae.setEndAfter(c);const fe=ae.extractContents();if(g==="LI"&&Nce(fe,"LI")){const ve=Bt(Nt(j.children,et.fromDom),ft(qf("br")));j=fe.firstChild,_.insertAfter(fe,c),Ve(ve,xe=>qv(et.fromDom(j),xe)),N&&j.setAttribute("style",N)}else _.insertAfter(fe,c),_.insertAfter(j,c);_.remove(p)}tS(s,j)},o6e=s=>{Ve(W5(et.fromDom(s),Aa),r=>{const c=r.dom;c.nodeValue=Md(c.data)})},Bce=(s,r)=>{const c=s.dom.getParent(r,"ol,ul,dl");return c!==null&&s.dom.getContentEditableParent(c)==="false"},Vce=(s,r)=>r&&r.nodeName==="A"&&s.isEmpty(r),jG=(s,r)=>s.nodeName===r||s.previousSibling&&s.previousSibling.nodeName===r,Hce=(s,r)=>s.nodeName===r||s.nextSibling&&s.nextSibling.nodeName===r,ym=(s,r)=>he(r)&&s.isBlock(r)&&!/^(TD|TH|CAPTION|FORM)$/.test(r.nodeName)&&!/^(fixed|absolute)/i.test(r.style.position)&&s.isEditable(r.parentNode)&&s.getContentEditable(r)!=="false",Uce=(s,r,c)=>{var p;const g=[];if(!c)return;let _=c;for(;_=_.firstChild;){if(s.isBlock(_))return;Ln(_)&&!r[_.nodeName.toLowerCase()]&&g.push(_)}let E=g.length;for(;E--;)_=g[E],(!_.hasChildNodes()||_.firstChild===_.lastChild&&((p=_.firstChild)===null||p===void 0?void 0:p.nodeValue)===""||Vce(s,_))&&s.remove(_)},qT=(s,r,c)=>un(r)?s?c===1&&r.data.charAt(c-1)===ml?0:c:c===r.data.length-1&&r.data.charAt(c)===ml?r.data.length:c:c,zce=s=>{const r=s.cloneRange();return r.setStart(s.startContainer,qT(!0,s.startContainer,s.startOffset)),r.setEnd(s.endContainer,qT(!1,s.endContainer,s.endOffset)),r},Wce=s=>{let r=s;do un(r)&&(r.data=r.data.replace(/^[\r\n]+/,"")),r=r.firstChild;while(r)},jce=(s,r,c,p,g)=>{var _,E;const R=s.dom,N=(_=nS(R,p))!==null&&_!==void 0?_:R.getRoot();let j=R.getParent(p,R.isBlock);if(!j||!ym(R,j)){if(j=j||N,!j.hasChildNodes()){const xe=R.create(r);return nc(s,xe),j.appendChild(xe),c.setStart(xe,0),c.setEnd(xe,0),xe}let ae=p;for(;ae&&ae.parentNode!==j;)ae=ae.parentNode;let fe;for(;ae&&!R.isBlock(ae);)fe=ae,ae=ae.previousSibling;const ve=(E=fe==null?void 0:fe.parentElement)===null||E===void 0?void 0:E.nodeName;if(fe&&ve&&s.schema.isValidChild(ve,r.toLowerCase())){const xe=fe.parentNode,De=R.create(r);for(nc(s,De),xe.insertBefore(De,fe),ae=fe;ae&&!R.isBlock(ae);){const Oe=ae.nextSibling;De.appendChild(ae),ae=Oe}c.setStart(p,g),c.setEnd(p,g)}}return p},Zce=(s,r)=>{r.normalize();const c=r.lastChild;(!c||Ln(c)&&/^(left|right)$/gi.test(s.getStyle(c,"float",!0)))&&s.add(r,"br")},qce=(s,r)=>{const c=AE(s);return de(r)?!1:z(c)?Qe(Gt.explode(c),r.nodeName.toLowerCase()):c},GT={insert:(s,r)=>{let c,p,g,_,E=!1;const R=s.dom,N=s.schema,j=N.getNonEmptyElements(),ae=s.selection.getRng(),fe=gl(s),ve=et.fromDom(ae.startContainer),xe=zm(ve,ae.startOffset),De=xe.exists(Qt=>Wh(Qt)&&!Wm(Qt)),Oe=ae.collapsed&&De,Ne=(Qt,Bn)=>zG(s,c,vn,Jt,h6(s),Qt,Bn),tt=Qt=>{const Bn=qT(Qt,c,p);if(un(c)&&(Qt?Bn>0:Bn<c.data.length))return!1;if((c.parentNode===vn||c===vn)&&E&&!Qt||Qt&&Ln(c)&&c===vn.firstChild)return!0;if(jG(c,"TABLE")||jG(c,"HR"))return Hce(c,"BR")?!Qt:E&&!Qt||!E&&Qt;const hs=new Gl(c,vn);un(c)&&(Qt&&Bn===0?hs.prev():!Qt&&Bn===c.data.length&&hs.next());let mo;for(;mo=hs.current();){if(Ln(mo)){if(!mo.getAttribute("data-mce-bogus")){const bo=mo.nodeName.toLowerCase();if(j[bo]&&bo!=="br")return!1}}else if(un(mo)&&!Jf(mo.data))return!1;Qt?hs.prev():hs.next()}return!0},ut=()=>{let Qt;return/^(H[1-6]|PRE|FIGURE)$/.test(g)&&qn!=="HGROUP"?Qt=Ne(fe):Qt=Ne(),qce(s,_)&&ym(R,_)&&R.isEmpty(vn,void 0,{includeZwsp:!0})?Qt=R.split(_,vn):R.insertAfter(Qt,vn),tS(s,Qt),Qt};b8(R,ae).each(Qt=>{ae.setStart(Qt.startContainer,Qt.startOffset),ae.setEnd(Qt.endContainer,Qt.endOffset)}),c=ae.startContainer,p=ae.startOffset;const gt=!!(r&&r.shiftKey),Tt=!!(r&&r.ctrlKey);Ln(c)&&c.hasChildNodes()&&!Oe&&(E=p>c.childNodes.length-1,c=c.childNodes[Math.min(p,c.childNodes.length-1)]||c,E&&un(c)?p=c.data.length:p=0);const Jt=nS(R,c);if(!Jt||Bce(s,c))return;gt||(c=jce(s,fe,ae,c,p));let vn=R.getParent(c,R.isBlock)||R.getRoot();_=he(vn==null?void 0:vn.parentNode)?R.getParent(vn.parentNode,R.isBlock):null,g=vn?vn.nodeName.toUpperCase():"";const qn=_?_.nodeName.toUpperCase():"";if(qn==="LI"&&!Tt){const Qt=_;vn=Qt,_=Qt.parentNode,g=qn}if(Ln(_)&&Pce(s,gt,vn))return Mce(s,Ne,vn);if(/^(LI|DT|DD)$/.test(g)&&Ln(_)&&R.isEmpty(vn)){s6e(s,Ne,_,vn,fe);return}if(!Oe&&(vn===s.getBody()||!ym(R,vn)))return;const Ut=vn.parentNode;let Et;if(Oe)Et=Ne(fe),xe.fold(()=>{Ri(ve,et.fromDom(Et))},Qt=>{Jc(Qt,et.fromDom(Et))}),s.selection.setCursorLocation(Et,0);else if(M0(vn))Et=ci(vn),R.isEmpty(vn)&&rF(vn),nc(s,Et),tS(s,Et);else if(tt(!1))Et=ut();else if(tt(!0)&&Ut){const Qt=$t.fromRangeStart(ae),Bn=vL(Qt),hs=et.fromDom(vn),bo=Yk(hs,Qt,s.schema)?Oz(hs,Qt,s.schema).bind(Vr=>ye.from(Vr.getNode())):ye.none();Et=Ut.insertBefore(Ne(),vn);const dr=jG(vn,"HR")||Bn?Et:bo.getOr(vn);tS(s,dr)}else{const Qt=zce(ae).cloneRange();Qt.setEndAfter(vn);const Bn=Qt.extractContents();o6e(Bn),Wce(Bn),Et=Bn.firstChild,R.insertAfter(Bn,vn),Uce(R,j,Et),Zce(R,vn),R.isEmpty(vn)&&rF(vn),Et.normalize(),R.isEmpty(Et)?(R.remove(Et),ut()):(nc(s,Et),tS(s,Et))}R.setAttrib(Et,"id",""),s.dispatch("NewBlock",{newBlock:Et})},fakeEventName:"insertParagraph"},ZG=(s,r,c)=>{const p=new Gl(r,c);let g;const _=s.getNonEmptyElements();for(;g=p.next();)if(_[g.nodeName.toLowerCase()]||un(g)&&g.length>0)return!0;return!1},N7=(s,r,c)=>{const p=s.dom.createRng();c?(p.setStartBefore(r),p.setEndBefore(r)):(p.setStartAfter(r),p.setEndAfter(r)),s.selection.setRng(p),v_(s,p)},Gce=(s,r)=>{const c=s.selection,p=s.dom,g=c.getRng();let _,E=!1;b8(p,g).each(xe=>{g.setStart(xe.startContainer,xe.startOffset),g.setEnd(xe.endContainer,xe.endOffset)});let R=g.startOffset,N=g.startContainer;if(Ln(N)&&N.hasChildNodes()){const xe=R>N.childNodes.length-1;N=N.childNodes[Math.min(R,N.childNodes.length-1)]||N,xe&&un(N)?R=N.data.length:R=0}let j=p.getParent(N,p.isBlock);const ae=j&&j.parentNode?p.getParent(j.parentNode,p.isBlock):null,fe=ae?ae.nodeName.toUpperCase():"",ve=!!(r&&r.ctrlKey);fe==="LI"&&!ve&&(j=ae),un(N)&&R>=N.data.length&&(ZG(s.schema,N,j||p.getRoot())||(_=p.create("br"),g.insertNode(_),g.setStartAfter(_),g.setEndAfter(_),E=!0)),_=p.create("br"),g2(p,g,_),N7(s,_,E),s.undoManager.add()},Kce=(s,r)=>{const c=et.fromTag("br");Jc(et.fromDom(r),c),s.undoManager.add()},Yce=(s,r)=>{Jce(s.getBody(),r)||dd(et.fromDom(r),et.fromTag("br"));const c=et.fromTag("br");dd(et.fromDom(r),c),N7(s,c.dom,!1),s.undoManager.add()},Xce=s=>nr(s.getNode()),Jce=(s,r)=>Xce($t.after(r))?!0:_c(s,$t.after(r)).map(c=>nr(c.getNode())).getOr(!1),lF=s=>s&&s.nodeName==="A"&&"href"in s,Qce=s=>s.fold(ct,lF,lF,ct),qG=s=>{const r=He(W2,s),c=$t.fromRangeStart(s.selection.getRng());return Mg(r,s.getBody(),c).filter(Qce)},GG=(s,r)=>{r.fold(Ue,He(Kce,s),He(Yce,s),Ue)},KT={insert:(s,r)=>{const c=qG(s);c.isSome()?c.each(He(GG,s)):Gce(s,r)},fakeEventName:"insertLineBreak"},KG=(s,r)=>oF(s).filter(c=>r.length>0&&Kc(et.fromDom(c),r)).isSome(),eue=s=>KG(s,m6(s)),YT=s=>KG(s,L4(s)),kp=sr.generate([{br:[]},{block:[]},{none:[]}]),cF=(s,r)=>YT(s),XT=s=>(r,c)=>Rce(r)===s,uF=(s,r)=>(c,p)=>UG(c)===s.toUpperCase()===r,tue=s=>{const r=nS(s.dom,s.selection.getStart());return de(r)},JT=s=>uF("pre",s),db=()=>uF("summary",!0),QT=s=>(r,c)=>lh(r)===s,nue=(s,r)=>eue(s),eI=(s,r)=>r,tI=s=>{const r=gl(s),c=nS(s.dom,s.selection.getStart());return he(c)&&s.schema.isValidChild(c.nodeName,r)},YG=s=>{const r=s.selection.getRng(),c=et.fromDom(r.startContainer),g=zm(c,r.startOffset).map(_=>Wh(_)&&!Wm(_));return r.collapsed&&g.getOr(!0)},xp=(s,r)=>(c,p)=>je(s,(_,E)=>_&&E(c,p),!0)?ye.some(r):ye.none(),sue=(s,r)=>qZ([xp([cF],kp.none()),xp([JT(!0),tue],kp.none()),xp([db()],kp.br()),xp([JT(!0),QT(!1),eI],kp.br()),xp([JT(!0),QT(!1)],kp.block()),xp([JT(!0),QT(!0),eI],kp.block()),xp([JT(!0),QT(!0)],kp.br()),xp([XT(!0),eI],kp.br()),xp([XT(!0)],kp.block()),xp([nue],kp.br()),xp([eI],kp.br()),xp([tI],kp.block()),xp([YG],kp.block())],[s,!!(r&&r.shiftKey)]).getOr(kp.none()),F7=(s,r,c)=>{r.mode.isReadOnly()||(r.selection.isCollapsed()||soe(r),!(he(c)&&jT(r,s.fakeEventName).isDefaultPrevented())&&(s.insert(r,c),he(c)&&P7(r,s.fakeEventName)))},XG=(s,r)=>{if(s.mode.isReadOnly())return;const c=()=>F7(KT,s,r),p=()=>F7(GT,s,r),g=sue(s,r);switch(tu(s)){case"linebreak":g.fold(c,c,Ue);break;case"block":g.fold(p,p,Ue);break;case"invert":g.fold(p,c,Ue);break;default:g.fold(c,p,Ue);break}},JG=Qa(),oue=JG.os.isiOS()&&JG.browser.isSafari(),nI=(s,r)=>{r.isDefaultPrevented()||(r.preventDefault(),Are(s.undoManager),s.undoManager.transact(()=>{XG(s,r)}))},dF=s=>{if(!s.collapsed)return!1;const r=s.startContainer;if(un(r)){const c=/^[\uAC00-\uD7AF\u1100-\u11FF\u3130-\u318F\uA960-\uA97F\uD7B0-\uD7FF]$/,p=r.data.charAt(s.startOffset-1);return c.test(p)}else return!1},rue=s=>{let r=ye.none();const c=g=>{r=ye.some(g.selection.getBookmark()),g.undoManager.add()},p=(g,_)=>{g.undoManager.undo(),r.fold(Ue,E=>g.selection.moveToBookmark(E)),nI(g,_),r=ye.none()};s.on("keydown",g=>{g.keyCode===qt.ENTER&&(oue&&dF(s.selection.getRng())?c(s):nI(s,g))}),s.on("keyup",g=>{g.keyCode===qt.ENTER&&r.each(()=>p(s,g))})},fF=(s,r,c)=>{const p=ns.os.isMacOS()||ns.os.isiOS();k7([{keyCode:qt.END,action:Ws(Nq,s,!0)},{keyCode:qt.HOME,action:Ws(Nq,s,!1)},...p?[]:[{keyCode:qt.HOME,action:Ws(E7,s,!1),ctrlKey:!0,shiftKey:!0},{keyCode:qt.END,action:Ws(E7,s,!0),ctrlKey:!0,shiftKey:!0}],{keyCode:qt.END,action:Ws(kN,s,!0)},{keyCode:qt.HOME,action:Ws(kN,s,!1)},{keyCode:qt.END,action:Ws(j_,s,!0,r)},{keyCode:qt.HOME,action:Ws(j_,s,!1,r)}],c).each(g=>{c.preventDefault()})},QG=(s,r)=>{s.on("keydown",c=>{c.isDefaultPrevented()||fF(s,r,c)})},sI=s=>{s.on("input",r=>{r.isComposing||Use(s)})},eK=Qa(),tK=(s,r,c)=>{k7([{keyCode:qt.PAGE_UP,action:Ws(j_,s,!1,r)},{keyCode:qt.PAGE_DOWN,action:Ws(j_,s,!0,r)}],c)},nK=s=>s.stopImmediatePropagation(),sK=s=>s.keyCode===qt.PAGE_UP||s.keyCode===qt.PAGE_DOWN,$7=(s,r,c)=>{c&&!s.get()?r.on("NodeChange",nK,!0):!c&&s.get()&&r.off("NodeChange",nK),s.set(c)},oK=(s,r)=>{if(eK.os.isMacOS())return;const c=pl(!1);s.on("keydown",p=>{sK(p)&&$7(c,s,!0)}),s.on("keyup",p=>{p.isDefaultPrevented()||tK(s,r,p),sK(p)&&c.get()&&($7(c,s,!1),s.nodeChanged())})},rK=(s,r)=>s===r||s.contains(r),iue=(s,r)=>!rK(s.getBody(),r.startContainer)||!rK(s.getBody(),r.endContainer)?!0:XU(s.dom,r),iK=s=>{s.on("beforeinput",r=>{(!s.selection.isEditable()||Ot(r.getTargetRanges(),c=>!iue(s,c)))&&r.preventDefault()})},aK=(s,r)=>{const c=r.container(),p=r.offset();return un(c)?(c.insertData(p,s),ye.some($t(c,p+s.length))):G4(r).map(g=>{const _=et.fromText(s);return r.isAtEnd()?dd(g,_):Jc(g,_),$t(_.dom,s.length)})},lK=He(aK,Za),cK=He(aK," "),aue=(s,r,c)=>_L(s,r,c)?lK(r):cK(r),lue=s=>r=>r.fold(c=>Ql(s.dom,$t.before(c)),c=>sl(c),c=>gp(c),c=>_c(s.dom,$t.after(c))),uK=(s,r,c)=>p=>_L(s,p,c)?lK(r):cK(r),dK=s=>r=>{s.selection.setRng(r.toRange()),s.nodeChanged()},fK=(s,r)=>s.isEditable(s.getParent(r,"summary")),cue=s=>{const r=$t.fromRangeStart(s.selection.getRng()),c=et.fromDom(s.getBody());if(s.selection.isCollapsed()){const p=He(W2,s),g=$t.fromRangeStart(s.selection.getRng());return Mg(p,s.getBody(),g).bind(lue(c)).map(_=>()=>uK(c,r,s.schema)(_).each(dK(s)))}else return ye.none()},uue=s=>{const r=()=>{const c=et.fromDom(s.getBody());s.selection.isCollapsed()||s.getDoc().execCommand("Delete");const p=$t.fromRangeStart(s.selection.getRng());aue(c,p,s.schema).each(dK(s))};return mc(ns.browser.isFirefox()&&s.selection.isEditable()&&fK(s.dom,s.selection.getRng().startContainer),r)},due=(s,r)=>{ple([{keyCode:qt.SPACEBAR,action:Ws(cue,s)},{keyCode:qt.SPACEBAR,action:Ws(uue,s)}],r).each(c=>{r.preventDefault(),jT(s,"insertText",{data:" "}).isDefaultPrevented()||(c(),P7(s,"insertText",{data:" "}))})},fue=s=>{s.on("keydown",r=>{r.isDefaultPrevented()||due(s,r)})},pue=s=>u1(s)?[{keyCode:qt.TAB,action:Ws(x7,s,!0)},{keyCode:qt.TAB,shiftKey:!0,action:Ws(x7,s,!1)}]:[],oS=(s,r)=>{k7([...pue(s)],r).each(c=>{r.preventDefault()})},mue=s=>{s.on("keydown",r=>{r.isDefaultPrevented()||oS(s,r)})},hue=s=>{if(s.addShortcut("Meta+P","","mcePrint"),Cce(s),Sh(s))return pl(null);{const r=Lae(s);return iK(s),ole(s),Ole(s,r),Ace(s,r),rue(s),fue(s),sI(s),mue(s),QG(s,r),oK(s,r),r}};class pK{constructor(r){this.lastPath=[],this.editor=r;let c;const p=this;"onselectionchange"in r.getDoc()||r.on("NodeChange click mouseup keyup focus",g=>{const _=r.selection.getRng(),E={startContainer:_.startContainer,startOffset:_.startOffset,endContainer:_.endContainer,endOffset:_.endOffset};(g.type==="nodechange"||!aL(E,c))&&r.dispatch("SelectionChange"),c=E}),r.on("contextmenu",()=>{m_(r),r.dispatch("SelectionChange")}),r.on("SelectionChange",()=>{const g=r.selection.getStart(!0);g&&D2(r)&&!p.isSameElementPath(g)&&r.dom.isChildOf(g,r.getBody())&&r.nodeChanged({selectionChange:!0})}),r.on("mouseup",g=>{!g.isDefaultPrevented()&&D2(r)&&(r.selection.getNode().nodeName==="IMG"?Xn.setEditorTimeout(r,()=>{r.nodeChanged()}):r.nodeChanged())})}nodeChanged(r={}){const c=this.editor,p=c.selection;let g;if(c.initialized&&p&&!VE(c)&&!wg(c)){const _=c.getBody();g=p.getStart(!0)||_,(g.ownerDocument!==c.getDoc()||!c.dom.isChildOf(g,_))&&(g=_);const E=[];c.dom.getParent(g,R=>R===_?!0:(E.push(R),!1)),c.dispatch("NodeChange",{...r,element:g,parents:E})}}isSameElementPath(r){let c;const p=this.editor,g=Zn(p.dom.getParents(r,Ht,p.getBody()));if(g.length===this.lastPath.length){for(c=g.length;c>=0&&g[c]===this.lastPath[c];c--);if(c===-1)return this.lastPath=g,!0}return this.lastPath=g,!1}}const mK=L0("image"),gue=s=>{const r=s;return ye.from(r[mK])},vue=(s,r)=>{const c=s;c[mK]=r},oI=L0("event"),bue=s=>{const r=s;return ye.from(r[oI])},rI=s=>r=>{const c=r;c[oI]=s},c6e=(s,r)=>rI(r)(s),B7=rI(0),yue=rI(2),_ue=rI(1),Sue=(s=>r=>{const c=r;return ye.from(c[oI]).exists(p=>p===s)})(0),Cue=()=>Object.freeze({length:0,item:s=>null}),pF=L0("mode"),wue=s=>{const r=s;return ye.from(r[pF])},iI=s=>r=>{const c=r;c[pF]=s},hK=(s,r)=>iI(r)(s),gK=iI(0),mF=iI(2),Eue=iI(1),vK=s=>r=>{const c=r;return ye.from(c[pF]).exists(p=>p===s)},Dr=vK(0),bK=vK(1),yK=(s,r)=>({...r,get length(){return r.length},add:(c,p)=>{if(Dr(s))if(z(c)){if(!ge(p))return r.add(c,p)}else return r.add(c);return null},remove:c=>{Dr(s)&&r.remove(c)},clear:()=>{Dr(s)&&r.clear()}}),kue=["none","copy","link","move"],hF=["none","copy","copyLink","copyMove","link","linkMove","move","all","uninitialized"],aI=()=>{const s=new window.DataTransfer;let r="move",c="all";const p={get dropEffect(){return r},set dropEffect(g){Qe(kue,g)&&(r=g)},get effectAllowed(){return c},set effectAllowed(g){Sue(p)&&Qe(hF,g)&&(c=g)},get items(){return yK(p,s.items)},get files(){return bK(p)?Cue():s.files},get types(){return s.types},setDragImage:(g,_,E)=>{Dr(p)&&(vue(p,{image:g,x:_,y:E}),s.setDragImage(g,_,E))},getData:g=>bK(p)?"":s.getData(g),setData:(g,_)=>{Dr(p)&&s.setData(g,_)},clearData:g=>{Dr(p)&&s.clearData(g)}};return gK(p),p},xue=s=>{const r=aI(),c=wue(s);return mF(s),B7(r),r.dropEffect=s.dropEffect,r.effectAllowed=s.effectAllowed,gue(s).each(p=>r.setDragImage(p.image,p.x,p.y)),Ve(s.types,p=>{p!=="Files"&&r.setData(p,s.getData(p))}),Ve(s.files,p=>r.items.add(p)),bue(s).each(p=>{c6e(r,p)}),c.each(p=>{hK(s,p),hK(r,p)}),r},Tue=s=>{const r=s.getData("text/html");return r===""?ye.none():ye.some(r)},_K=(s,r)=>s.setData("text/html",r),gF="x-tinymce/html",x3=Fe(gF),vF="<!-- "+gF+" -->",Iue=s=>vF+s,bF=s=>s.replace(vF,""),SK=s=>s.indexOf(vF)!==-1,Aue=s=>!/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(s),Oue=(s,r)=>{let c="<"+s;const p=Zo(r,(g,_)=>_+'="'+eh.encodeAllRaw(g)+'"');return p.length&&(c+=" "+p.join(" ")),c+">"},Rue=(s,r,c)=>{const p=s.split(/\n\n/),g=Oue(r,c),_="</"+r+">",E=Nt(p,N=>N.split(/\n/).join("<br />")),R=N=>g+N+_;return E.length===1?E[0]:Nt(E,R).join("")},yF="%MCEPASTEBIN%",Due=(s,r)=>{const{dom:c,selection:p}=s,g=s.getBody();r.set(p.getRng());const _=c.add(s.getBody(),"div",{id:"mcepastebin",class:"mce-pastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: fixed; top: 50%; width: 10px; height: 10px; overflow: hidden; opacity: 0"},yF);ns.browser.isFirefox()&&c.setStyle(_,"left",c.getStyle(g,"direction",!0)==="rtl"?65535:-65535),c.bind(_,"beforedeactivate focusin focusout",E=>{E.stopPropagation()}),_.focus(),p.select(_,!0)},Lue=(s,r)=>{const c=s.dom;if(fb(s)){let p;const g=r.get();for(;p=fb(s);)c.remove(p),c.unbind(p);g&&s.selection.setRng(g)}r.set(null)},fb=s=>s.dom.get("mcepastebin"),Pue=s=>he(s)&&s.id==="mcepastebin",rS=s=>{const r=s.dom,c=(E,R)=>{E.appendChild(R),r.remove(R,!0)},[p,...g]=Bt(s.getBody().childNodes,Pue);Ve(g,E=>{c(p,E)});const _=r.select("div[id=mcepastebin]",p);for(let E=_.length-1;E>=0;E--){const R=r.create("div");p.insertBefore(R,_[E]),c(R,_[E])}return p?p.innerHTML:""},iS=s=>s===yF,Mue=s=>{const r=pl(null);return{create:()=>Due(s,r),remove:()=>Lue(s,r),getEl:()=>fb(s),getHtml:()=>rS(s),getLastRng:r.get}},CK=(s,r)=>(Gt.each(r,c=>{Y(c,RegExp)?s=s.replace(c,""):s=s.replace(c[0],c[1])}),s),aS=s=>{const r=o1(),c=P_({},r);let p="";const g=r.getVoidElements(),_=Gt.makeMap("script noscript style textarea video audio iframe object"," "),E=r.getBlockElements(),R=N=>{const j=N.name,ae=N;if(j==="br"){p+="\n";return}if(j!=="wbr"){if(g[j]&&(p+=" "),_[j]){p+=" ";return}if(N.type===3&&(p+=N.value),!(N.name in r.getVoidElements())){let fe=N.firstChild;if(fe)do R(fe);while(fe=fe.next)}E[j]&&ae.next&&(p+="\n",j==="p"&&(p+="\n"))}};return s=CK(s,[/<!\[[^\]]+\]>/g]),R(c.parse(s)),p},wK=s=>(s=CK(s,[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/ig,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,(c,p,g)=>!p&&!g?" ":Za],/<br class="Apple-interchange-newline">/g,/<br>$/i]),s),_F=s=>{let r=0;return()=>s+r++},Nue=s=>{const r=s.toLowerCase(),c={jpg:"jpeg",jpe:"jpeg",jfi:"jpeg",jif:"jpeg",jfif:"jpeg",pjpeg:"jpeg",pjp:"jpeg",svg:"svg+xml"};return Gt.hasOwn(c,r)?"image/"+c[r]:"image/"+r},EK=(s,r)=>{const c=P_({sanitize:Fy(s),sandbox_iframes:O6(s),sandbox_iframes_exclusions:GE(s),convert_unsafe_embeds:EU(s)},s.schema);c.addNodeFilter("meta",g=>{Gt.each(g,_=>{_.remove()})});const p=c.parse(r,{forced_root_block:!1,isRootContent:!0});return V2({validate:!0},s.schema).serialize(p)},SF=(s,r)=>({content:s,cancelled:r}),CF=(s,r,c)=>{const p=s.dom.create("div",{style:"display:none"},r),g=Pa(s,p,c);return SF(g.node.innerHTML,g.isDefaultPrevented())},kK=(s,r,c)=>{const p=Jl(s,r,c),g=EK(s,p.content);return s.hasEventListeners("PastePostProcess")&&!p.isDefaultPrevented()?CF(s,g,c):SF(g,p.isDefaultPrevented())},Fue=(s,r,c)=>kK(s,r,c),wF=(s,r)=>(s.insertContent(r,{merge:xD(s),paste:!0}),!0),lI=s=>/^https?:\/\/[\w\-\/+=.,!;:&%@^~(){}?#]+$/i.test(s),$ue=(s,r)=>lI(r)&&Ot(A6(s),c=>Ai(r.toLowerCase(),".".concat(c.toLowerCase()))),xK=(s,r,c)=>(s.undoManager.extra(()=>{c(s,r)},()=>{s.insertContent('<img src="'+r+'">')}),!0),EF=(s,r,c)=>(s.undoManager.extra(()=>{c(s,r)},()=>{s.execCommand("mceInsertLink",!1,r)}),!0),TK=(s,r,c)=>!s.selection.isCollapsed()&&lI(r)?EF(s,r,c):!1,Bue=(s,r,c)=>$ue(s,r)?xK(s,r,c):!1,Vue=(s,r)=>{Gt.each([TK,Bue,wF],c=>!c(s,r,wF))},Hue=(s,r,c)=>{c||!TD(s)?wF(s,r):Vue(s,r)},IK=_F("mceclip"),kF=s=>{const r=aI();return _K(r,s),mF(r),r},AK=(s,r,c,p,g)=>{const _=Fue(s,r,c);if(!_.cancelled){const E=_.content,R=()=>Hue(s,E,p);g?jT(s,"insertFromPaste",{dataTransfer:kF(E)}).isDefaultPrevented()||(R(),P7(s,"insertFromPaste")):R()}},V7=(s,r,c,p)=>{const g=c||SK(r);AK(s,bF(r),g,!1,p)},cI=(s,r,c)=>{const p=s.dom.encode(r).replace(/\r\n/g,"\n"),g=Qf(p,x6(s)),_=Rue(g,gl(s),ff(s));AK(s,_,!1,!0,c)},OK=s=>{const r={};if(s&&s.types)for(let c=0;c<s.types.length;c++){const p=s.types[c];try{r[p]=s.getData(p)}catch{r[p]=""}}return r},hv=(s,r)=>r in s&&s[r].length>0,RK=s=>hv(s,"text/html")||hv(s,"text/plain"),Uue=(s,r)=>{const c=r.match(/([\s\S]+?)(?:\.[a-z0-9.]+)$/i);return he(c)?s.dom.encode(c[1]):void 0},zue=(s,r,c,p)=>{const g=IK(),_=OE(s)&&he(c.name),E=_?Uue(s,c.name):g,R=_?c.name:void 0,N=r.create(g,c,p,E,R);return r.add(N),N},Wue=(s,r)=>{Dx(r.uri).each(({data:c,type:p,base64Encoded:g})=>{const _=g?c:btoa(c),E=r.file,R=s.editorUpload.blobCache,N=R.getByData(_,p),j=N!=null?N:zue(s,R,E,_);V7(s,'<img src="'.concat(j.blobUri(),'">'),!1,!0)})},jue=s=>s.type==="paste",uI=s=>Promise.all(Nt(s,r=>l3(r).then(c=>({file:r,uri:c})))),Zue=s=>{const r=A6(s);return c=>hr(c.type,"image/")&&Ot(r,p=>Nue(p)===c.type)},DK=(s,r)=>{const c=r.items?Wn(Mo(r.items),g=>g.kind==="file"?[g.getAsFile()]:[]):[],p=r.files?Mo(r.files):[];return Bt(c.length>0?c:p,Zue(s))},LK=(s,r,c)=>{const p=jue(r)?r.clipboardData:r.dataTransfer;if(Py(s)&&p){const g=DK(s,p);if(g.length>0)return r.preventDefault(),uI(g).then(_=>{c&&s.selection.setRng(c),Ve(_,E=>{Wue(s,E)})}),!0}return!1},que=s=>{var r,c;return ns.os.isAndroid()&&((c=(r=s.clipboardData)===null||r===void 0?void 0:r.items)===null||c===void 0?void 0:c.length)===0},PK=s=>qt.metaKeyPressed(s)&&s.keyCode===86||s.shiftKey&&s.keyCode===45,dI=(s,r,c,p,g)=>{let _=wK(c);const E=hv(r,x3())||SK(c),R=!E&&Aue(_),N=lI(_);(iS(_)||!_.length||R&&!N)&&(p=!0),(p||N)&&(hv(r,"text/plain")&&R?_=r["text/plain"]:_=aS(_)),!iS(_)&&(p?cI(s,_,g):V7(s,_,E,g))},Gue=(s,r,c)=>{let p;const g=()=>r.getLastRng()||s.selection.getRng();s.on("keydown",_=>{PK(_)&&!_.isDefaultPrevented()&&(p=_.shiftKey&&_.keyCode===86)}),s.on("paste",_=>{if(_.isDefaultPrevented()||que(_))return;const E=c.get()==="text"||p;p=!1;const R=OK(_.clipboardData);!RK(R)&&LK(s,_,g())||(hv(R,"text/html")?(_.preventDefault(),dI(s,R,R["text/html"],E,!0)):hv(R,"text/plain")&&hv(R,"text/uri-list")?(_.preventDefault(),dI(s,R,R["text/plain"],E,!0)):(r.create(),Xn.setEditorTimeout(s,()=>{const N=r.getHtml();r.remove(),dI(s,R,N,E,!1)},0)))})},Kue=s=>{const r=g=>hr(g,"webkit-fake-url"),c=g=>hr(g,"data:"),p=g=>{var _;return((_=g.data)===null||_===void 0?void 0:_.paste)===!0};s.parser.addNodeFilter("img",(g,_,E)=>{if(!Py(s)&&p(E))for(const R of g){const N=R.attr("src");z(N)&&!R.attr("data-mce-object")&&N!==ns.transparentSrc&&(r(N)||!T6(s)&&c(N))&&R.remove()}})},Yue=(s,r,c)=>{Gue(s,r,c),Kue(s)},Xue=(s,r)=>{r.get()==="text"?(r.set("html"),hl(s,!1)):(r.set("text"),hl(s,!0)),s.focus()},Jue=(s,r)=>{s.addCommand("mceTogglePlainTextPaste",()=>{Xue(s,r)}),s.addCommand("mceInsertClipboardContent",(c,p)=>{p.html&&V7(s,p.html,p.internal,!1),p.text&&cI(s,p.text,!1)})},MK=(s,r,c)=>{if(s)try{return s.clearData(),s.setData("text/html",r),s.setData("text/plain",c),s.setData(x3(),r),!0}catch{return!1}else return!1},NK=(s,r,c,p)=>{MK(s.clipboardData,r.html,r.text)?(s.preventDefault(),p()):c(r.html,p)},FK=s=>(r,c)=>{const{dom:p,selection:g}=s,_=p.create("div",{contenteditable:"false","data-mce-bogus":"all"}),E=p.create("div",{contenteditable:"true"},r);p.setStyles(_,{position:"fixed",top:"0",left:"-3000px",width:"1000px",overflow:"hidden"}),_.appendChild(E),p.add(s.getBody(),_);const R=g.getRng();E.focus();const N=p.createRng();N.selectNodeContents(E),g.setRng(N),Xn.setEditorTimeout(s,()=>{g.setRng(R),p.remove(_),c()},0)},$K=s=>({html:Iue(s.selection.getContent({contextual:!0})),text:s.selection.getContent({format:"text"})}),Que=s=>!!s.dom.getParent(s.selection.getStart(),"td[data-mce-selected],th[data-mce-selected]",s.getBody()),BK=s=>!s.selection.isCollapsed()||Que(s),ede=s=>r=>{!r.isDefaultPrevented()&&BK(s)&&s.selection.isEditable()&&NK(r,$K(s),FK(s),()=>{if(ns.browser.isChromium()||ns.browser.isFirefox()){const c=s.selection.getRng();Xn.setEditorTimeout(s,()=>{s.selection.setRng(c),s.execCommand("Delete")},0)}else s.execCommand("Delete")})},tde=s=>r=>{!r.isDefaultPrevented()&&BK(s)&&NK(r,$K(s),FK(s),Ue)},nde=s=>{s.on("cut",ede(s)),s.on("copy",tde(s))},xF=(s,r)=>{var c,p;return B2.getCaretRangeFromPoint((c=r.clientX)!==null&&c!==void 0?c:0,(p=r.clientY)!==null&&p!==void 0?p:0,s.getDoc())},VK=s=>{const r=s["text/plain"];return r?r.indexOf("file://")===0:!1},HK=(s,r)=>{s.focus(),r&&s.selection.setRng(r)},sde=s=>Ot(s.files,r=>/^image\//.test(r.type)),ode=(s,r,c,p)=>{const g=s.getParent(c,E=>af(r,E));if(!J(s.getParent(c,"summary")))return!0;if(g&&Kt(p,"text/html")){const E=new DOMParser().parseFromString(p["text/html"],"text/html").body;return!J(E.querySelector(g.nodeName.toLowerCase()))}else return!1},rde=s=>{s.on("input",r=>{const c=p=>J(p.querySelector("summary"));if(r.inputType==="deleteByDrag"){const p=Bt(s.dom.select("details"),c);Ve(p,g=>{nr(g.firstChild)&&g.firstChild.remove();const _=s.dom.create("summary");_.appendChild(gg().dom),g.prepend(_)})}})},ide=(s,r)=>{wD(s)&&s.on("dragend dragover draggesture dragdrop drop drag",c=>{c.preventDefault(),c.stopPropagation()}),Py(s)||s.on("drop",c=>{const p=c.dataTransfer;p&&sde(p)&&c.preventDefault()}),s.on("drop",c=>{if(c.isDefaultPrevented())return;const p=xF(s,c);if(de(p))return;const g=OK(c.dataTransfer),_=hv(g,x3());if((!RK(g)||VK(g))&&LK(s,c,p))return;const E=g[x3()],R=E||g["text/html"]||g["text/plain"],N=ode(s.dom,s.schema,p.startContainer,g),j=r.get();j&&!N||R&&(c.preventDefault(),Xn.setEditorTimeout(s,()=>{s.undoManager.transact(()=>{(E||j&&N)&&s.execCommand("Delete"),HK(s,p);const ae=wK(R);g["text/html"]?V7(s,ae,_,!0):cI(s,ae,!0)})}))}),s.on("dragstart",c=>{r.set(!0)}),s.on("dragover dragend",c=>{Py(s)&&!r.get()&&(c.preventDefault(),HK(s,xF(s,c))),c.type==="dragend"&&r.set(!1)}),rde(s)},ade=s=>{const r=g=>_=>{g(s,_)},c=ED(s);ie(c)&&s.on("PastePreProcess",r(c));const p=kD(s);ie(p)&&s.on("PastePostProcess",r(p))},lde=(s,r)=>{s.on("PastePreProcess",c=>{c.content=r(s,c.content,c.internal)})},fI=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,TF=s=>Gt.trim(s).replace(fI,th).toLowerCase(),cde=(s,r,c)=>{const p=WE(s);if(c||p==="all"||!z4(s))return r;const g=p?p.split(/[, ]/):[];if(g&&p!=="none"){const _=s.dom,E=s.selection.getNode();r=r.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,(R,N,j,ae)=>{const fe=_.parseStyle(_.decode(j)),ve={};for(let De=0;De<g.length;De++){const Oe=fe[g[De]];let Ne=Oe,tt=_.getStyle(E,g[De],!0);/color/.test(g[De])&&(Ne=TF(Ne),tt=TF(tt)),tt!==Ne&&(ve[g[De]]=Oe)}const xe=_.serializeStyle(ve,"span");return xe?N+' style="'+xe+'"'+ae:N+ae})}else r=r.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return r=r.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,(_,E,R,N)=>E+' style="'+R+'"'+N),r},UK=s=>{(ns.browser.isChromium()||ns.browser.isSafari())&&lde(s,cde)},zK=s=>{const r=pl(!1),c=pl(My(s)?"text":"html"),p=Mue(s);UK(s),Jue(s,c),ade(s),s.addQueryStateHandler("mceTogglePlainTextPaste",()=>c.get()==="text"),s.on("PreInit",()=>{nde(s),ide(s,r),Yue(s,p,c)})},IF=s=>{s.on("click",r=>{s.dom.getParent(r.target,"details")&&r.preventDefault()})},ude=s=>{s.parser.addNodeFilter("details",r=>{const c=$y(s);Ve(r,p=>{c==="expanded"?p.attr("open","open"):c==="collapsed"&&p.attr("open",null)})}),s.serializer.addNodeFilter("details",r=>{const c=OD(s);Ve(r,p=>{c==="expanded"?p.attr("open","open"):c==="collapsed"&&p.attr("open",null)})})},WK=s=>{IF(s),ude(s)},dde=nr,AF=un,fde=s=>cr(s.dom),jK=s=>Zt(s.dom),ZK=s=>r=>Yo(et.fromDom(s),r),pde=(s,r,c)=>qi(et.fromDom(s),p=>jK(p)||c.isBlock(oo(p)),ZK(r)).getOr(et.fromDom(r)).dom,qK=(s,r)=>qi(et.fromDom(s),fde,ZK(r)),lS=(s,r,c)=>{const p=new Gl(s,r),g=c?p.next.bind(p):p.prev.bind(p);let _=s;for(let E=c?s:g();E&&!dde(E);E=g())Su(E)&&(_=E);return _},mde=(s,r,c)=>{const g=$t.fromRangeStart(s).getNode(),_=pde(g,r,c),E=lS(g,_,!1),R=lS(g,_,!0),N=document.createRange();return qK(E,_).fold(()=>{AF(E)?N.setStart(E,0):N.setStartBefore(E)},j=>N.setStartBefore(j.dom)),qK(R,_).fold(()=>{AF(R)?N.setEnd(R,R.data.length):N.setEndAfter(R)},j=>N.setEndAfter(j.dom)),N},hde=s=>{const r=mde(s.selection.getRng(),s.getBody(),s.schema);s.selection.setRng(mx(r))},GK=s=>{s.on("mousedown",r=>{r.detail>=3&&(r.preventDefault(),hde(s))})};var cS;(function(s){s.Before="before",s.After="after"})(cS||(cS={}));const gde=(s,r)=>Math.abs(s.left-r),vde=(s,r)=>Math.abs(s.right-r),bde=(s,r)=>s>=r.top&&s<=r.bottom,yde=(s,r)=>s.top<r.bottom&&s.bottom>r.top,pI=(s,r)=>{const c=VR(s,r)/Math.min(s.height,r.height);return yde(s,r)&&c>.5},KK=(s,r)=>{const c=Bt(s,p=>bde(r,p));return m2(c).fold(()=>[[],s],p=>{const{pass:g,fail:_}=kn(s,E=>pI(E,p));return[g,_]})},YK=(s,r)=>({node:s.node,position:gde(s,r)<vde(s,r)?cS.Before:cS.After}),_de=(s,r,c)=>r>s.left&&r<s.right?0:Math.min(Math.abs(s.left-r),Math.abs(s.right-r)),OF=(s,r,c,p)=>{const g=fe=>Su(fe.node)?ye.some(fe):Ln(fe.node)?OF(Mo(fe.node.childNodes),r,c,!1):ye.none(),_=(fe,ve,xe)=>g(ve).filter(De=>Math.abs(xe(fe,r,c)-xe(De,r,c))<2&&un(De.node)),E=(fe,ve)=>{const xe=Rs(fe,(De,Oe)=>ve(De,r,c)-ve(Oe,r,c));return Do(xe,g).map(De=>p&&!un(De.node)&&xe.length>1?_(De,xe[1],ve).getOr(De):De)},[R,N]=KK(nN(s),c),{pass:j,fail:ae}=kn(N,fe=>fe.top<c);return E(R,_de).orThunk(()=>E(ae,df)).orThunk(()=>E(j,df))},Sde=(s,r,c,p)=>{const g=(_,E)=>{const R=j=>Ln(j)&&j.classList.contains("mce-drag-container"),N=Bt(_.dom.childNodes,ft(R));return E.fold(()=>OF(N,c,p,!0),j=>{const ae=Bt(N,fe=>fe!==j.dom);return OF(ae,c,p,!0)}).orThunk(()=>(Yo(_,s)?ye.none():zv(_)).bind(ae=>g(ae,ye.some(_))))};return g(r,ye.none())},d6e=(s,r,c)=>{const p=et.fromDom(s),g=Kp(p),E=et.fromPoint(g,r,c).filter(R=>Zi(p,R)).getOr(p);return Sde(p,E,r,c)},XK=(s,r,c)=>d6e(s,r,c).filter(p=>Eg(p.node)).map(p=>YK(p,r)),RF=s=>{var r,c;const p=s.getBoundingClientRect(),g=s.ownerDocument,_=g.documentElement,E=g.defaultView;return{top:p.top+((r=E==null?void 0:E.scrollY)!==null&&r!==void 0?r:0)-_.clientTop,left:p.left+((c=E==null?void 0:E.scrollX)!==null&&c!==void 0?c:0)-_.clientLeft}},DF=s=>s.inline?RF(s.getBody()):{left:0,top:0},mI=s=>{const r=s.getBody();return s.inline?{left:r.scrollLeft,top:r.scrollTop}:{left:0,top:0}},Cde=s=>{const r=s.getBody(),c=s.getDoc().documentElement,p={left:r.scrollLeft,top:r.scrollTop},g={left:r.scrollLeft||c.scrollLeft,top:r.scrollTop||c.scrollTop};return s.inline?p:g},wde=(s,r)=>{if(r.target.ownerDocument!==s.getDoc()){const c=RF(s.getContentAreaContainer()),p=Cde(s);return{left:r.pageX-c.left+p.left,top:r.pageY-c.top+p.top}}return{left:r.pageX,top:r.pageY}},JK=(s,r,c)=>({pageX:c.left-s.left+r.left,pageY:c.top-s.top+r.top}),Ede=(s,r)=>JK(DF(s),mI(s),wde(s,r)),hI=s=>({target:s,srcElement:s}),QK=(s,r,c,p)=>({...r,dataTransfer:p,type:s,...hI(c)}),kde=(s,r,c)=>{const p=ht("Function not supported on simulated event.");return{bubbles:!0,cancelBubble:!1,cancelable:!0,composed:!1,currentTarget:null,defaultPrevented:!1,eventPhase:0,isTrusted:!0,returnValue:!1,timeStamp:0,type:s,composedPath:p,initEvent:p,preventDefault:Ue,stopImmediatePropagation:Ue,stopPropagation:Ue,AT_TARGET:window.Event.AT_TARGET,BUBBLING_PHASE:window.Event.BUBBLING_PHASE,CAPTURING_PHASE:window.Event.CAPTURING_PHASE,NONE:window.Event.NONE,altKey:!1,button:0,buttons:0,clientX:0,clientY:0,ctrlKey:!1,layerX:0,layerY:0,metaKey:!1,movementX:0,movementY:0,offsetX:0,offsetY:0,pageX:0,pageY:0,relatedTarget:null,screenX:0,screenY:0,shiftKey:!1,x:0,y:0,detail:0,view:null,which:0,initUIEvent:p,initMouseEvent:p,getModifierState:p,dataTransfer:c,...hI(r)}},xde=(s,r)=>{const c=xue(s);return r==="dragstart"?(B7(c),gK(c)):r==="drop"?(yue(c),mF(c)):(_ue(c),Eue(c)),c},eY=(s,r,c,p)=>{const g=xde(c,s);return ge(p)?kde(s,r,g):QK(s,p,r,g)},tY=32,f6e=100,gI=8,vI=16,nY=cr,sY=tE(nY,Zt),Tde=(s,r,c)=>nY(c)&&c!==r&&s.isEditable(c.parentElement),LF=(s,r,c)=>de(r)||r===c||s.dom.isChildOf(r,c)?!1:s.dom.isEditable(r),Ide=(s,r,c,p)=>{const g=s.dom,_=r.cloneNode(!0);g.setStyles(_,{width:c,height:p}),g.setAttrib(_,"data-mce-selected",null);const E=g.create("div",{class:"mce-drag-container","data-mce-bogus":"all",unselectable:"on",contenteditable:"false"});return g.setStyles(E,{position:"absolute",opacity:.5,overflow:"hidden",border:0,padding:0,margin:0,width:c,height:p}),g.setStyles(_,{margin:0,boxSizing:"border-box"}),E.appendChild(_),E},oY=(s,r)=>{s.parentNode!==r&&r.appendChild(s)},uS=(s,r)=>c=>()=>{const p=s==="left"?c.scrollX:c.scrollY;c.scroll({[s]:p+r,behavior:"smooth"})},bI=uS("left",-32),yI=uS("left",tY),rY=uS("top",-32),k1=uS("top",tY),iY=(s,r,c,p,g,_,E,R,N,j,ae,fe)=>{let ve=0,xe=0;s.style.left=r.pageX+"px",s.style.top=r.pageY+"px",r.pageX+c>g&&(ve=r.pageX+c-g),r.pageY+p>_&&(xe=r.pageY+p-_),s.style.width=c-ve+"px",s.style.height=p-xe+"px";const De=N.clientHeight,Oe=N.clientWidth,Ne=E+N.getBoundingClientRect().top,tt=R+N.getBoundingClientRect().left;ae.on(ut=>{ut.intervalId.clear(),ut.dragging&&fe&&(E+gI>=De?ut.intervalId.set(k1(j)):E-gI<=0?ut.intervalId.set(rY(j)):R+gI>=Oe?ut.intervalId.set(yI(j)):R-gI<=0?ut.intervalId.set(bI(j)):Ne+vI>=window.innerHeight?ut.intervalId.set(k1(window)):Ne-vI<=0?ut.intervalId.set(rY(window)):tt+vI>=window.innerWidth?ut.intervalId.set(yI(window)):tt-vI<=0&&ut.intervalId.set(bI(window)))})},aY=s=>{s&&s.parentNode&&s.parentNode.removeChild(s)},Ade=(s,r)=>{const c=s.getParent(r.parentNode,s.isBlock);aY(r),c&&c!==s.getRoot()&&s.isEmpty(c)&&vg(et.fromDom(c))},Ode=s=>s.button===0,Rde=(s,r)=>({pageX:r.pageX-s.relX,pageY:r.pageY+5}),lY=(s,r)=>c=>{if(Ode(c)){const p=pt(r.dom.getParents(c.target),sY).getOr(null);if(he(p)&&Tde(r.dom,r.getBody(),p)){const g=r.dom.getPos(p),_=r.getBody(),E=r.getDoc().documentElement;s.set({element:p,dataTransfer:aI(),dragging:!1,screenX:c.screenX,screenY:c.screenY,maxX:(r.inline?_.scrollWidth:E.offsetWidth)-2,maxY:(r.inline?_.scrollHeight:E.offsetHeight)-2,relX:c.pageX-g.x,relY:c.pageY-g.y,width:p.offsetWidth,height:p.offsetHeight,ghost:Ide(r,p,p.offsetWidth,p.offsetHeight),intervalId:np(f6e)})}}},Dde=(s,r,c)=>{s._selectionOverrides.hideFakeCaret(),XK(s.getBody(),r,c).fold(()=>s.selection.placeCaretAt(r,c),p=>{const g=s._selectionOverrides.showCaret(1,p.node,p.position===cS.Before,!1);g?s.selection.setRng(g):s.selection.placeCaretAt(r,c)})},dS=(s,r,c,p,g)=>{r==="dragstart"&&_K(p,s.dom.getOuterHTML(c));const _=eY(r,c,p,g);return s.dispatch(r,_)},Lde=(s,r)=>{const c=i2((g,_)=>Dde(r,g,_),0);r.on("remove",c.cancel);const p=s;return g=>s.on(_=>{const E=Math.max(Math.abs(g.screenX-_.screenX),Math.abs(g.screenY-_.screenY));if(!_.dragging&&E>10){const R=dS(r,"dragstart",_.element,_.dataTransfer,g);if(he(R.dataTransfer)&&(_.dataTransfer=R.dataTransfer),R.isDefaultPrevented())return;_.dragging=!0,r.focus()}if(_.dragging){const R=g.currentTarget===r.getDoc().documentElement,N=Rde(_,Ede(r,g));oY(_.ghost,r.getBody()),iY(_.ghost,N,_.width,_.height,_.maxX,_.maxY,g.clientY,g.clientX,r.getContentAreaContainer(),r.getWin(),p,R),c.throttle(g.clientX,g.clientY)}})},Pde=s=>{const r=s.getSel();if(he(r)){const p=r.getRangeAt(0).startContainer;return un(p)?p.parentNode:p}else return null},PF=(s,r)=>c=>{s.on(p=>{var g;if(p.intervalId.clear(),p.dragging){if(LF(r,Pde(r.selection),p.element)){const _=(g=r.getDoc().elementFromPoint(c.clientX,c.clientY))!==null&&g!==void 0?g:r.getBody();dS(r,"drop",_,p.dataTransfer,c).isDefaultPrevented()||r.undoManager.transact(()=>{Ade(r.dom,p.element),Tue(p.dataTransfer).each(R=>r.insertContent(R)),r._selectionOverrides.hideFakeCaret()})}dS(r,"dragend",r.getBody(),p.dataTransfer,c)}}),cY(s)},MF=(s,r,c)=>{s.on(p=>{p.intervalId.clear(),p.dragging&&c.fold(()=>dS(r,"dragend",p.element,p.dataTransfer),g=>dS(r,"dragend",p.element,p.dataTransfer,g))}),cY(s)},p6e=(s,r)=>c=>MF(s,r,ye.some(c)),cY=s=>{s.on(r=>{r.intervalId.clear(),aY(r.ghost)}),s.clear()},uY=s=>{const r=la(),c=vi.DOM,p=document,g=lY(r,s),_=Lde(r,s),E=PF(r,s),R=p6e(r,s);s.on("mousedown",g),s.on("mousemove",_),s.on("mouseup",E),c.bind(p,"mousemove",_),c.bind(p,"mouseup",R),s.on("remove",()=>{c.unbind(p,"mousemove",_),c.unbind(p,"mouseup",R)}),s.on("keydown",N=>{N.keyCode===qt.ESC&&MF(r,s,ye.none())})},Mde=s=>{const r=g=>{if(!g.isDefaultPrevented()){const _=g.dataTransfer;_&&(Qe(_.types,"Files")||_.files.length>0)&&(g.preventDefault(),g.type==="drop"&&eT(s,"Dropped file type is not supported"))}},c=g=>{h_(s,g.target)&&r(g)},p=()=>{const g=vi.DOM,_=s.dom,E=document,R=s.inline?s.getBody():s.getDoc(),N=["drop","dragover"];Ve(N,j=>{g.bind(E,j,c),_.bind(R,j,r)}),s.on("remove",()=>{Ve(N,j=>{g.unbind(E,j,c),_.unbind(R,j,r)})})};s.on("init",()=>{Xn.setEditorTimeout(s,p,0)})},NF=s=>{uY(s),V4(s)&&Mde(s)},Nde=s=>{const r=i2(()=>{if(!s.removed&&s.getBody().contains(document.activeElement)){const c=s.selection.getRng();if(c.collapsed){const p=MM(s,c,!1);s.selection.setRng(p)}}},0);s.on("focus",()=>{r.throttle()}),s.on("blur",()=>{r.cancel()})},Fde=s=>{s.on("init",()=>{s.on("focusin",r=>{const c=r.target;if(Kl(c)){const p=gh(s.getBody(),c),g=cr(p)?p:c;s.selection.getNode()!==g&&p7(s,g).each(_=>s.selection.setRng(_))}})})},H7=cr,FF=(s,r)=>gh(s.getBody(),r),_I=s=>{const r=s.selection,c=s.dom,p=s.getBody(),g=XE(s,p,c.isBlock,()=>mn(s)),_="sel-"+c.uniqueId(),E="data-mce-selected";let R;const N=qn=>he(qn)&&c.hasClass(qn,"mce-offscreen-selection"),j=qn=>qn!==p&&(H7(qn)||Kl(qn))&&c.isChildOf(qn,p)&&c.isEditable(qn.parentNode),ae=qn=>{qn&&r.setRng(qn)},fe=(qn,Ut,Et,Qt=!0)=>s.dispatch("ShowCaret",{target:Ut,direction:qn,before:Et}).isDefaultPrevented()?null:(Qt&&r.scrollIntoView(Ut,qn===-1),g.show(Et,Ut)),ve=qn=>{qn.hasAttribute("data-mce-caret")&&(ci(qn),r.scrollIntoView(qn))},xe=()=>{s.on("click",Ut=>{c.isEditable(Ut.target)||(Ut.preventDefault(),s.focus())}),s.on("blur NewBlock",Tt),s.on("ResizeWindow FullscreenStateChanged",g.reposition),s.on("tap",Ut=>{const Et=Ut.target,Qt=FF(s,Et);H7(Qt)?(Ut.preventDefault(),p7(s,Qt).each(gt)):j(Et)&&p7(s,Et).each(gt)},!0),s.on("mousedown",Ut=>{const Et=Ut.target;if(Et!==p&&Et.nodeName!=="HTML"&&!c.isChildOf(Et,p)||!bM(s,Ut.clientX,Ut.clientY))return;Tt(),vn();const Qt=FF(s,Et);H7(Qt)?(Ut.preventDefault(),p7(s,Qt).each(gt)):XK(p,Ut.clientX,Ut.clientY).each(Bn=>{Ut.preventDefault();const hs=fe(1,Bn.node,Bn.position===cS.Before,!1);ae(hs),rf(Qt)?Qt.focus():s.getBody().focus()})}),s.on("keypress",Ut=>{qt.modifierPressed(Ut)||H7(r.getNode())&&Ut.preventDefault()}),s.on("GetSelectionRange",Ut=>{let Et=Ut.range;if(R){if(!R.parentNode){R=null;return}Et=Et.cloneRange(),Et.selectNode(R),Ut.range=Et}}),s.on("SetSelectionRange",Ut=>{Ut.range=Ne(Ut.range);const Et=gt(Ut.range,Ut.forward);Et&&(Ut.range=Et)});const qn=Ut=>Ln(Ut)&&Ut.id==="mcepastebin";s.on("AfterSetSelectionRange",Ut=>{const Et=Ut.range,Qt=Et.startContainer.parentElement;!Oe(Et)&&!qn(Qt)&&vn(),N(Qt)||Tt()}),NF(s),Nde(s),Fde(s)},De=qn=>uf(qn)||Qc(qn)||Nd(qn),Oe=qn=>De(qn.startContainer)||De(qn.endContainer),Ne=qn=>{const Ut=s.schema.getVoidElements(),Et=c.createRng(),Qt=qn.startContainer,Bn=qn.startOffset,hs=qn.endContainer,mo=qn.endOffset;return Kt(Ut,Qt.nodeName.toLowerCase())?Bn===0?Et.setStartBefore(Qt):Et.setStartAfter(Qt):Et.setStart(Qt,Bn),Kt(Ut,hs.nodeName.toLowerCase())?mo===0?Et.setEndBefore(hs):Et.setEndAfter(hs):Et.setEnd(hs,mo),Et},tt=(qn,Ut)=>{const Et=et.fromDom(s.getBody()),Qt=s.getDoc(),Bn=ul(Et,"#"+_).getOrThunk(()=>{const bo=et.fromHtml('<div data-mce-bogus="all" class="mce-offscreen-selection"></div>',Qt);return el(bo,"id",_),Ri(Et,bo),bo}),hs=c.createRng();Zm(Bn),jm(Bn,[et.fromText(Za,Qt),et.fromDom(Ut),et.fromText(Za,Qt)]),hs.setStart(Bn.dom.firstChild,1),hs.setEnd(Bn.dom.lastChild,0),no(Bn,{top:c.getPos(qn,s.getBody()).y+"px"}),s8(Bn);const mo=r.getSel();return mo&&(mo.removeAllRanges(),mo.addRange(hs)),hs},ut=qn=>{const Ut=qn.cloneNode(!0),Et=s.dispatch("ObjectSelected",{target:qn,targetClone:Ut});if(Et.isDefaultPrevented())return null;const Qt=tt(qn,Et.targetClone),Bn=et.fromDom(qn);return Ve(Pc(et.fromDom(s.getBody()),"*[".concat(E,"]")),hs=>{Yo(Bn,hs)||gi(hs,E)}),c.getAttrib(qn,E)||qn.setAttribute(E,"1"),R=qn,vn(),Qt},gt=(qn,Ut)=>{if(!qn)return null;if(qn.collapsed){if(!Oe(qn)){const hs=Ut?1:-1,mo=zy(hs,p,qn),bo=mo.getNode(!Ut);if(he(bo)){if(Eg(bo))return fe(hs,bo,Ut?!mo.isAtEnd():!1,!1);if(nm(bo)&&cr(bo.nextSibling)){const Vr=c.createRng();return Vr.setStart(bo,0),Vr.setEnd(bo,0),Vr}}const dr=mo.getNode(Ut);if(he(dr)){if(Eg(dr))return fe(hs,dr,Ut?!1:!mo.isAtEnd(),!1);if(nm(dr)&&cr(dr.previousSibling)){const Vr=c.createRng();return Vr.setStart(dr,1),Vr.setEnd(dr,1),Vr}}}return null}let Et=qn.startContainer,Qt=qn.startOffset;const Bn=qn.endOffset;if(un(Et)&&Qt===0&&H7(Et.parentNode)&&(Et=Et.parentNode,Qt=c.nodeIndex(Et),Et=Et.parentNode),!Ln(Et))return null;if(Bn===Qt+1&&Et===qn.endContainer){const hs=Et.childNodes[Qt];if(j(hs))return ut(hs)}return null},Tt=()=>{R&&R.removeAttribute(E),ul(et.fromDom(s.getBody()),"#"+_).each(ti),R=null},Jt=()=>{g.destroy(),R=null},vn=()=>{g.hide()};return Sh(s)||xe(),{showCaret:fe,showBlockCaretContainer:ve,hideFakeCaret:vn,destroy:Jt}},dY=(s,r)=>{let c=r;for(let p=s.previousSibling;un(p);p=p.previousSibling)c+=p.data.length;return c},$F=(s,r,c,p,g)=>{if(un(c)&&(p<0||p>c.data.length))return[];const _=g&&un(c)?[dY(c,p)]:[p];let E=c;for(;E!==r&&E.parentNode;)_.push(s.nodeIndex(E,g)),E=E.parentNode;return E===r?_.reverse():[]},BF=(s,r,c,p,g,_,E=!1)=>{const R=$F(s,r,c,p,E),N=$F(s,r,g,_,E);return{start:R,end:N}},fY=(s,r)=>{const c=r.slice(),p=c.pop();return Be(p)?je(c,(_,E)=>_.bind(R=>ye.from(R.childNodes[E])),ye.some(s)).bind(_=>un(_)&&(p<0||p>_.data.length)?ye.none():ye.some({node:_,offset:p})):ye.none()},VF=(s,r)=>fY(s,r.start).bind(({node:c,offset:p})=>fY(s,r.end).map(({node:g,offset:_})=>{const E=document.createRange();return E.setStart(c,p),E.setEnd(g,_),E})),$de=(s,r,c,p=!1)=>BF(s,r,c.startContainer,c.startOffset,c.endContainer,c.endOffset,p),fS=(s,r,c)=>{if(r&&s.isEmpty(r)&&!c(r)){const p=r.parentNode;s.remove(r,un(r.firstChild)&&Jf(r.firstChild.data)),fS(s,p,c)}},SI=(s,r,c,p=!0)=>{const g=r.startContainer.parentNode,_=r.endContainer.parentNode;r.deleteContents(),p&&!c(r.startContainer)&&(un(r.startContainer)&&r.startContainer.data.length===0&&s.remove(r.startContainer),un(r.endContainer)&&r.endContainer.data.length===0&&s.remove(r.endContainer),fS(s,g,c),g!==_&&fS(s,_,c))},pS=(s,r)=>ye.from(s.dom.getParent(r.startContainer,s.dom.isBlock)),HF=(s,r,c)=>{const p=s.dynamicPatternsLookup({text:c,block:r});return{...s,blockPatterns:_g(p).concat(s.blockPatterns),inlinePatterns:Rl(p).concat(s.inlinePatterns)}},UF=(s,r,c,p)=>{const g=s.createRng();return g.setStart(r,0),g.setEnd(c,p),g.toString()},pY=(s,r)=>s.create("span",{"data-mce-type":"bookmark",id:r}),CI=(s,r)=>{const c=s.createRng();return c.setStartAfter(r.start),c.setEndBefore(r.end),c},mY=(s,r,c)=>{const p=VF(s.getRoot(),c).getOrDie("Unable to resolve path range"),g=p.startContainer,_=p.endContainer,E=p.endOffset===0?_:_.splitText(p.endOffset),R=p.startOffset===0?g:g.splitText(p.startOffset),N=R.parentNode,j=E.parentNode;return{prefix:r,end:j.insertBefore(pY(s,r+"-end"),E),start:N.insertBefore(pY(s,r+"-start"),R)}},hY=(s,r,c)=>{fS(s,s.get(r.prefix+"-end"),c),fS(s,s.get(r.prefix+"-start"),c)},U7=s=>s.start.length===0,Bde=s=>(r,c)=>{const g=r.data.substring(0,c),_=g.lastIndexOf(s.charAt(s.length-1)),E=g.lastIndexOf(s);return E!==-1?E+s.length:_!==-1?_+1:-1},gY=(s,r,c,p)=>{const g=r.start;return FN(s,p.container,p.offset,Bde(g),c).bind(E=>{var R,N;const j=(N=(R=c.textContent)===null||R===void 0?void 0:R.indexOf(g))!==null&&N!==void 0?N:-1;if(j!==-1&&E.offset>=j+g.length){const fe=s.createRng();return fe.setStart(E.container,E.offset-g.length),fe.setEnd(E.container,E.offset),ye.some(fe)}else{const fe=E.offset-g.length;return NN(E.container,fe,c).map(ve=>{const xe=s.createRng();return xe.setStart(ve.container,ve.offset),xe.setEnd(E.container,E.offset),xe}).filter(ve=>ve.toString()===g).orThunk(()=>gY(s,r,c,E1(E.container,0)))}})},vY=(s,r,c,p,g,_=!1)=>{if(r.start.length===0&&!_){const E=s.createRng();return E.setStart(c,p),E.setEnd(c,p),ye.some(E)}return OT(c,p,g).bind(E=>gY(s,r,g,E).bind(N=>{var j;if(_){if(N.endContainer===E.container&&N.endOffset===E.offset)return ye.none();if(E.offset===0&&((j=N.endContainer.textContent)===null||j===void 0?void 0:j.length)===N.endOffset)return ye.none()}return ye.some(N)}))},Vde=(s,r,c,p)=>{const g=s.dom,_=g.getRoot(),E=c.pattern,R=c.position.container,N=c.position.offset;return NN(R,N-c.pattern.end.length,r).bind(j=>{const ae=BF(g,_,j.container,j.offset,R,N,p);if(U7(E))return ye.some({matches:[{pattern:E,startRng:ae,endRng:ae}],position:j});{const fe=wI(s,c.remainingPatterns,j.container,j.offset,r,p),ve=fe.getOr({matches:[],position:j}),xe=ve.position;return vY(g,E,xe.container,xe.offset,r,fe.isNone()).map(Oe=>{const Ne=$de(g,_,Oe,p);return{matches:ve.matches.concat([{pattern:E,startRng:Ne,endRng:ae}]),position:E1(Oe.startContainer,Oe.startOffset)}})}})},wI=(s,r,c,p,g,_)=>{const E=s.dom;return OT(c,p,E.getRoot()).bind(R=>{const N=UF(E,g,c,p);for(let j=0;j<r.length;j++){const ae=r[j];if(!Ai(N,ae.end))continue;const fe=r.slice();fe.splice(j,1);const ve=Vde(s,g,{pattern:ae,remainingPatterns:fe,position:R},_);if(ve.isNone()&&p>0)return wI(s,r,c,p-1,g,_);if(ve.isSome())return ve}return ye.none()})},bY=(s,r,c)=>{s.selection.setRng(c),r.type==="inline-format"?Ve(r.format,p=>{s.formatter.apply(p)}):s.execCommand(r.cmd,!1,r.value)},Hde=(s,r,c,p)=>{const g=CI(s.dom,c);SI(s.dom,g,p),bY(s,r,g)},Ude=(s,r,c,p,g)=>{const _=s.dom,E=CI(_,p),R=CI(_,c);SI(_,R,g),SI(_,E,g);const N={prefix:c.prefix,start:c.end,end:p.start},j=CI(_,N);bY(s,r,j)},zde=(s,r)=>{const c=L0("mce_textpattern"),p=Le(r,(g,_)=>{const E=mY(s,c+"_end".concat(g.length),_.endRng);return g.concat([{..._,endMarker:E}])},[]);return Le(p,(g,_)=>{const E=p.length-g.length-1,R=U7(_.pattern)?_.endMarker:mY(s,c+"_start".concat(E),_.startRng);return g.concat([{..._,startMarker:R}])},[])},Wde=s=>Rs(s,(r,c)=>c.end.length-r.end.length),jde=(s,r)=>{const c=ts(s,p=>Ot(r,g=>p.pattern.start===g.pattern.start&&p.pattern.end===g.pattern.end));return s.length===r.length?c?s:r:s.length>r.length?s:r},zF=(s,r,c,p,g,_)=>{const E=wI(s,g.inlinePatterns,c,p,r,_).fold(()=>[],N=>N.matches),R=wI(s,Wde(g.inlinePatterns),c,p,r,_).fold(()=>[],N=>N.matches);return jde(E,R)},yY=(s,r)=>{if(r.length===0)return;const c=s.dom,p=s.selection.getBookmark(),g=zde(c,r);Ve(g,_=>{const E=c.getParent(_.startMarker.start,c.isBlock),R=N=>N===E;U7(_.pattern)?Hde(s,_.pattern,_.endMarker,R):Ude(s,_.pattern,_.startMarker,_.endMarker,R),hY(c,_.endMarker,R),hY(c,_.startMarker,R)}),s.selection.moveToBookmark(p)},EI=(s,r,c)=>Dle(r,0,r).map(p=>{const g=p.container;return tG(g,c.start.length,r).each(_=>{const E=s.createRng();E.setStart(g,0),E.setEnd(_.container,_.offset),SI(s,E,R=>R===r)}),g}),_Y=s=>(r,c)=>{const p=r.dom,g=c.pattern,_=VF(p.getRoot(),c.range).getOrDie("Unable to resolve path range"),E=(R,N)=>{const j=N.get(R);return ue(j)&&Po(j).exists(ae=>Kt(ae,"block"))};return pS(r,_).each(R=>{g.type==="block-format"?E(g.format,r.formatter)&&r.undoManager.transact(()=>{s(r.dom,R,g),r.formatter.apply(g.format)}):g.type==="block-command"&&r.undoManager.transact(()=>{s(r.dom,R,g),r.execCommand(g.cmd,!1,g.value)})}),!0},Zde=s=>Rs(s,(r,c)=>c.start.length-r.start.length),SY=s=>(r,c)=>{const p=Zde(r),g=c.replace(Za," ");return pt(p,_=>s(_,c,g))},CY=(s,r)=>(c,p,g,_,E)=>{var R;E===void 0&&(E=(R=p.textContent)!==null&&R!==void 0?R:"");const N=c.dom,j=gl(c);return N.is(p,j)?s(g.blockPatterns,E).map(ae=>r&&Gt.trim(E).length===ae.start.length?[]:[{pattern:ae,range:BF(N,N.getRoot(),p,0,p,0,_)}]).getOr([]):[]},qde=s=>/^\s[^\s]/.test(s),kI=_Y((s,r,c)=>{EI(s,r,c).each(p=>{const g=et.fromDom(p),_=c2(g);qde(_)&&G9(g,_.slice(1))})}),Gde=SY((s,r,c)=>r.indexOf(s.start)===0||c.indexOf(s.start)===0),Kde=CY(Gde,!0),Yde=(s,r)=>{const c=s.selection.getRng();return pS(s,c).map(p=>{var g;const _=Math.max(0,c.startOffset),E=HF(r,p,(g=p.textContent)!==null&&g!==void 0?g:""),R=zF(s,p,c.startContainer,_,E,!0),N=Kde(s,p,E,!0);return{inlineMatches:R,blockMatches:N}}).filter(({inlineMatches:p,blockMatches:g})=>g.length>0||p.length>0)},Xde=(s,r)=>{if(r.length===0)return;const c=s.selection.getBookmark();Ve(r,p=>kI(s,p)),s.selection.moveToBookmark(c)},Jde=_Y(EI),Qde=SY((s,r,c)=>r===s.start||c===s.start),efe=CY(Qde,!1),tfe=(s,r)=>{const c=s.selection.getRng();return pS(s,c).map(p=>{const g=Math.max(0,c.startOffset),_=UF(s.dom,p,c.startContainer,g),E=HF(r,p,_);return efe(s,p,E,!1,_)}).filter(p=>p.length>0)},nfe=(s,r)=>{Ve(r,c=>Jde(s,c))},wY=(s,r)=>Yde(s,r).fold(ct,({inlineMatches:c,blockMatches:p})=>(s.undoManager.add(),s.undoManager.extra(()=>{s.execCommand("mceInsertNewLine")},()=>{jC(s),yY(s,c),Xde(s,p);const g=s.selection.getRng(),_=OT(g.startContainer,g.startOffset,s.dom.getRoot());s.execCommand("mceInsertNewLine"),_.each(E=>{const R=E.container;R.data.charAt(E.offset-1)===Jb&&(R.deleteData(E.offset-1,1),fS(s.dom,R.parentNode,N=>N===s.dom.getRoot()))})}),!0)),sfe=(s,r)=>{const c=s.selection.getRng();pS(s,c).map(p=>{const g=Math.max(0,c.startOffset-1),_=UF(s.dom,p,c.startContainer,g),E=HF(r,p,_),R=zF(s,p,c.startContainer,g,E,!1);R.length>0&&s.undoManager.transact(()=>{yY(s,R)})})},EY=(s,r)=>tfe(s,r).fold(ct,c=>(s.undoManager.transact(()=>{nfe(s,c)}),!0)),kY=(s,r,c)=>{for(let p=0;p<s.length;p++)if(c(s[p],r))return!0;return!1},ofe=(s,r)=>kY(s,r,(c,p)=>c===p.keyCode&&!qt.modifierPressed(p)),xY=(s,r)=>kY(s,r,(c,p)=>c.charCodeAt(0)===p.charCode),z7=s=>{const r=[",",".",";",":","!","?"],c=[32],p=()=>ah(jE(s).filter(E=>E.type==="inline-command"||E.type==="block-command"?s.queryCommandSupported(E.cmd):!0),ZE(s)),g=()=>ID(s);s.on("keydown",E=>{if(E.keyCode===13&&!qt.modifierPressed(E)&&s.selection.isCollapsed()&&s.selection.isEditable()){const R=y2(p(),"enter");(R.inlinePatterns.length>0||R.blockPatterns.length>0||g())&&wY(s,R)&&E.preventDefault()}},!0),s.on("keydown",E=>{if(E.keyCode===32&&s.selection.isCollapsed()&&s.selection.isEditable()){const R=y2(p(),"space");(R.blockPatterns.length>0||g())&&EY(s,R)&&E.preventDefault()}},!0);const _=()=>{if(s.selection.isCollapsed()&&s.selection.isEditable()){const E=y2(p(),"space");(E.inlinePatterns.length>0||g())&&sfe(s,E)}};s.on("keyup",E=>{ofe(c,E)&&_()}),s.on("keypress",E=>{xY(r,E)&&Xn.setEditorTimeout(s,_)})},rfe=s=>{z7(s)},TY=s=>{const r=Gt.each,c=qt.BACKSPACE,p=qt.DELETE,g=s.dom,_=s.selection,E=s.parser,R=ns.browser,N=R.isFirefox(),j=R.isChromium()||R.isSafari(),ae=ns.deviceType.isiPhone()||ns.deviceType.isiPad(),fe=ns.os.isMacOS()||ns.os.isiOS(),ve=(Un,nn)=>{try{s.getDoc().execCommand(Un,!1,String(nn))}catch{}},xe=Un=>Un.isDefaultPrevented(),De=()=>{const Un=Nn=>{const Os=g.create("body"),Zr=Nn.cloneContents();return Os.appendChild(Zr),_.serializer.serialize(Os,{format:"html"})},nn=Nn=>{const Os=Un(Nn),Zr=g.createRng();Zr.selectNode(s.getBody());const Oo=Un(Zr);return Os===Oo};s.on("keydown",Nn=>{const Os=Nn.keyCode;if(!xe(Nn)&&(Os===p||Os===c)&&s.selection.isEditable()){const Zr=s.selection.isCollapsed(),Oo=s.getBody();if(Zr&&!em(s.schema,Oo)||!Zr&&!nn(s.selection.getRng()))return;Nn.preventDefault(),s.setContent(""),Oo.firstChild&&g.isBlock(Oo.firstChild)?s.selection.setCursorLocation(Oo.firstChild,0):s.selection.setCursorLocation(Oo,0),s.nodeChanged()}})},Oe=()=>{s.shortcuts.add("meta+a",null,"SelectAll")},Ne=()=>{s.inline||g.bind(s.getDoc(),"mousedown mouseup",Un=>{let nn;if(Un.target===s.getDoc().documentElement)if(nn=_.getRng(),s.getBody().focus(),Un.type==="mousedown"){if(uf(nn.startContainer))return;_.placeCaretAt(Un.clientX,Un.clientY)}else _.setRng(nn)})},tt=()=>{s.on("keydown",Un=>{if(!xe(Un)&&Un.keyCode===c){if(!s.getBody().getElementsByTagName("hr").length)return;if(_.isCollapsed()&&_.getRng().startOffset===0){const nn=_.getNode(),Nn=nn.previousSibling;if(nn.nodeName==="HR"){g.remove(nn),Un.preventDefault();return}Nn&&Nn.nodeName&&Nn.nodeName.toLowerCase()==="hr"&&(g.remove(Nn),Un.preventDefault())}}})},ut=()=>{Range.prototype.getClientRects||s.on("mousedown",Un=>{if(!xe(Un)&&Un.target.nodeName==="HTML"){const nn=s.getBody();nn.blur(),Xn.setEditorTimeout(s,()=>{nn.focus()})}})},gt=()=>{const Un=ch(s);s.on("click",nn=>{const Nn=nn.target;/^(IMG|HR)$/.test(Nn.nodeName)&&g.isEditable(Nn)&&(nn.preventDefault(),s.selection.select(Nn),s.nodeChanged()),Nn.nodeName==="A"&&g.hasClass(Nn,Un)&&Nn.childNodes.length===0&&g.isEditable(Nn.parentNode)&&(nn.preventDefault(),_.select(Nn))})},Tt=()=>{const Un=()=>{const Nn=g.getAttribs(_.getStart().cloneNode(!1));return()=>{const Os=_.getStart();Os!==s.getBody()&&(g.setAttrib(Os,"style",null),r(Nn,Zr=>{Os.setAttributeNode(Zr.cloneNode(!0))}))}},nn=()=>!_.isCollapsed()&&g.getParent(_.getStart(),g.isBlock)!==g.getParent(_.getEnd(),g.isBlock);s.on("keypress",Nn=>{let Os;return!xe(Nn)&&(Nn.keyCode===8||Nn.keyCode===46)&&nn()?(Os=Un(),s.getDoc().execCommand("delete",!1),Os(),Nn.preventDefault(),!1):!0}),g.bind(s.getDoc(),"cut",Nn=>{if(!xe(Nn)&&nn()){const Os=Un();Xn.setEditorTimeout(s,()=>{Os()})}})},Jt=()=>{s.on("keydown",Un=>{if(!xe(Un)&&Un.keyCode===c&&_.isCollapsed()&&_.getRng().startOffset===0){const nn=_.getNode().previousSibling;if(nn&&nn.nodeName&&nn.nodeName.toLowerCase()==="table")return Un.preventDefault(),!1}return!0})},vn=()=>{s.on("keydown",Un=>{if(xe(Un)||Un.keyCode!==qt.BACKSPACE)return;let nn=_.getRng();const Nn=nn.startContainer,Os=nn.startOffset,Zr=g.getRoot();let Oo=Nn;if(!(!nn.collapsed||Os!==0)){for(;Oo.parentNode&&Oo.parentNode.firstChild===Oo&&Oo.parentNode!==Zr;)Oo=Oo.parentNode;Oo.nodeName==="BLOCKQUOTE"&&(s.formatter.toggle("blockquote",void 0,Oo),nn=g.createRng(),nn.setStart(Nn,0),nn.setEnd(Nn,0),_.setRng(nn))}})},qn=()=>{const Un=()=>{ve("StyleWithCSS",!1),ve("enableInlineTableEditing",!1),F4(s)||ve("enableObjectResizing",!1)};w6(s)||s.on("BeforeExecCommand mousedown",Un)},Ut=()=>{const Un=()=>{r(g.select("a:not([data-mce-block])"),nn=>{var Nn;let Os=nn.parentNode;const Zr=g.getRoot();if((Os==null?void 0:Os.lastChild)===nn){for(;Os&&!g.isBlock(Os);){if(((Nn=Os.parentNode)===null||Nn===void 0?void 0:Nn.lastChild)!==Os||Os===Zr)return;Os=Os.parentNode}g.add(Os,"br",{"data-mce-bogus":1})}})};s.on("SetContent ExecCommand",nn=>{(nn.type==="setcontent"||nn.command==="mceInsertLink")&&Un()})},Et=()=>{s.on("init",()=>{ve("DefaultParagraphSeparator",gl(s))})},Qt=Un=>{const nn=Un.getBody(),Nn=Un.selection.getRng();return Nn.startContainer===Nn.endContainer&&Nn.startContainer===nn&&Nn.startOffset===0&&Nn.endOffset===nn.childNodes.length},Bn=()=>{s.on("keyup focusin mouseup",Un=>{!qt.modifierPressed(Un)&&!Qt(s)&&_.normalize()},!0)},hs=()=>{s.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")},mo=()=>{s.inline||s.on("keydown",()=>{document.activeElement===document.body&&s.getWin().focus()})},bo=()=>{s.inline||(s.contentStyles.push("body {min-height: 150px}"),s.on("click",Un=>{let nn;Un.target.nodeName==="HTML"&&(nn=s.selection.getRng(),s.getBody().focus(),s.selection.setRng(nn),s.selection.normalize(),s.nodeChanged())}))},dr=()=>{fe&&s.on("keydown",Un=>{qt.metaKeyPressed(Un)&&!Un.shiftKey&&(Un.keyCode===37||Un.keyCode===39)&&(Un.preventDefault(),s.selection.getSel().modify("move",Un.keyCode===37?"backward":"forward","lineboundary"))})},Vr=()=>{s.on("click",Un=>{let nn=Un.target;do if(nn.tagName==="A"){Un.preventDefault();return}while(nn=nn.parentNode)}),s.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")},Na=()=>{s.on("init",()=>{s.dom.bind(s.getBody(),"submit",Un=>{Un.preventDefault()})})},Fl=()=>{E.addNodeFilter("br",Un=>{let nn=Un.length;for(;nn--;)Un[nn].attr("class")==="Apple-interchange-newline"&&Un[nn].remove()})},sc=Ue,Tn=()=>{if(!N||s.removed)return!1;const Un=s.selection.getSel();return!Un||!Un.rangeCount||Un.rangeCount===0},gs=()=>{j&&(Ne(),gt(),Na(),Oe(),ae&&(mo(),bo(),Vr())),N&&(ut(),qn(),hs(),dr())},rr=()=>{vn(),De(),ns.windowsPhone||Bn(),j&&(Ne(),gt(),Et(),Na(),Jt(),Fl(),ae?(mo(),bo(),Vr()):Oe()),N&&(tt(),ut(),Tt(),qn(),Ut(),hs(),dr(),Jt())};return Sh(s)?gs():rr(),{refreshContentEditable:sc,isHidden:Tn}},ife=s=>s.toLowerCase()==="gpl",afe=s=>s.length>=64&&s.length<=255,lfe=s=>ife(s)||afe(s)?"VALID":"INVALID",cfe=s=>{const r=KE(s);!z(R6(s))&&(ge(r)||lfe(r)==="INVALID")&&console.warn("TinyMCE is running in evaluation mode. Provide a valid license key or add license_key: 'gpl' to the init config to agree to the open source license terms. Read more at https://www.tiny.cloud/license-key/")},xI=vi.DOM,ufe=(s,r)=>{const c=et.fromDom(s.getBody()),p=Q1(Kf(c)),g=et.fromTag("style");el(g,"type","text/css"),Ri(g,et.fromText(r)),Ri(p,g),s.on("remove",()=>{ti(g)})},IY=s=>s.inline?s.getElement().nodeName.toLowerCase():void 0,WF=s=>us(s,r=>ge(r)===!1),AY=s=>{const r=s.options.get,c=s.editorUpload.blobCache;return WF({allow_conditional_comments:r("allow_conditional_comments"),allow_html_data_urls:r("allow_html_data_urls"),allow_svg_data_urls:r("allow_svg_data_urls"),allow_html_in_named_anchor:r("allow_html_in_named_anchor"),allow_script_urls:r("allow_script_urls"),allow_mathml_annotation_encodings:r("allow_mathml_annotation_encodings"),allow_unsafe_link_target:r("allow_unsafe_link_target"),convert_unsafe_embeds:r("convert_unsafe_embeds"),convert_fonts_to_spans:r("convert_fonts_to_spans"),fix_list_elements:r("fix_list_elements"),font_size_legacy_values:r("font_size_legacy_values"),forced_root_block:r("forced_root_block"),forced_root_block_attrs:r("forced_root_block_attrs"),preserve_cdata:r("preserve_cdata"),inline_styles:r("inline_styles"),root_name:IY(s),sandbox_iframes:r("sandbox_iframes"),sandbox_iframes_exclusions:GE(s),sanitize:r("xss_sanitization"),validate:!0,blob_cache:c,document:s.getDoc()})},OY=s=>{const r=s.options.get;return WF({custom_elements:r("custom_elements"),extended_valid_elements:r("extended_valid_elements"),invalid_elements:r("invalid_elements"),invalid_styles:r("invalid_styles"),schema:r("schema"),valid_children:r("valid_children"),valid_classes:r("valid_classes"),valid_elements:r("valid_elements"),valid_styles:r("valid_styles"),verify_html:r("verify_html"),padd_empty_block_inline_children:r("format_empty_lines")})},dfe=s=>{const r=s.options.get;return{...AY(s),...OY(s),...WF({remove_trailing_brs:r("remove_trailing_brs"),pad_empty_with_br:r("pad_empty_with_br"),url_converter:r("url_converter"),url_converter_scope:r("url_converter_scope"),element_format:r("element_format"),entities:r("entities"),entity_encoding:r("entity_encoding"),indent:r("indent"),indent_after:r("indent_after"),indent_before:r("indent_before")})}},ffe=s=>{const r=P_(AY(s),s.schema);return r.addAttributeFilter("src,href,style,tabindex",(c,p)=>{const g=s.dom,_="data-mce-"+p;let E=c.length;for(;E--;){const R=c[E];let N=R.attr(p);if(N&&!R.attr(_)){if(N.indexOf("data:")===0||N.indexOf("blob:")===0)continue;p==="style"?(N=g.serializeStyle(g.parseStyle(N),R.name),N.length||(N=null),R.attr(_,N),R.attr(p,N)):p==="tabindex"?(R.attr(_,N),R.attr(p,null)):R.attr(_,s.convertURL(N,p,R.name))}}}),r.addNodeFilter("script",c=>{let p=c.length;for(;p--;){const g=c[p],_=g.attr("type")||"no/type";_.indexOf("mce-")!==0&&g.attr("type","mce-"+_)}}),ose(s)&&r.addNodeFilter("#cdata",c=>{var p;let g=c.length;for(;g--;){const _=c[g];_.type=8,_.name="#comment",_.value="[CDATA["+s.dom.encode((p=_.value)!==null&&p!==void 0?p:"")+"]]"}}),r.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",c=>{let p=c.length;const g=s.schema.getNonEmptyElements();for(;p--;){const _=c[p];_.isEmpty(g)&&_.getAll("br").length===0&&_.append(new gd("br",1))}}),r},pfe=s=>{const r=ku(s);r&&Xn.setEditorTimeout(s,()=>{let c;r===!0?c=s:c=s.editorManager.get(r),c&&!c.destroyed&&(c.focus(),c.selection.scrollIntoView())},100)},mfe=s=>{const r=s.dom.getRoot();!s.inline&&(!D2(s)||s.selection.getStart(!0)===r)&&sl(r).each(c=>{const p=c.getNode(),g=Jp(p)?sl(p).getOr(c):c;s.selection.setRng(g.toRange())})},hfe=s=>{s.bindPendingEventDelegates(),s.initialized=!0,bc(s),s.focus(!0),mfe(s),s.nodeChanged({initial:!0});const r=Cg(s);ie(r)&&r.call(s,s),pfe(s),eb(s)&&vZ(s,!0)},jF=s=>s.inline?s.ui.styleSheetLoader:s.dom.styleSheetLoader,RY=(s,r,c)=>{const{pass:p,fail:g}=kn(r,R=>tinymce.Resource.has(Yu(R))),E=[...p.map(R=>{const N=tinymce.Resource.get(Yu(R));return z(N)?Promise.resolve(jF(s).loadRawCss(R,N)):Promise.resolve()}),jF(s).loadAll(g)];return s.inline?E:E.concat([s.ui.styleSheetLoader.loadAll(c)])},TI=s=>{const r=jF(s),c=ME(s),p=s.contentCSS,g=()=>{r.unloadAll(p),s.inline||s.ui.styleSheetLoader.unloadAll(c)},_=()=>{s.removed?g():s.on("remove",g)};if(s.contentStyles.length>0){let N="";Gt.each(s.contentStyles,j=>{N+=j+"\r\n"}),s.dom.addStyle(N)}const E=Promise.all(RY(s,p,c)).then(_).catch(_),R=gD(s);return R&&ufe(s,R),E},DY=s=>{const r=s.getDoc(),c=s.getBody();kE(s),CU(s)||(r.body.spellcheck=!1,xI.setAttrib(c,"spellcheck","false")),s.quirks=TY(s),iD(s);const p=NE(s);p!==void 0&&(c.dir=p);const g=C2(s);g&&s.on("BeforeSetContent",_=>{Gt.each(g,E=>{_.content=_.content.replace(E,R=>"<!--mce:protected "+escape(R)+"-->")})}),s.on("SetContent",()=>{s.addVisual(s.getBody())}),s.on("compositionstart compositionend",_=>{s.composing=_.type==="compositionstart"})},LY=s=>{Sh(s)||s.load({initial:!0,format:"html"}),s.startContent=s.getContent({format:"raw"})},ZF=s=>{s.removed!==!0&&(LY(s),hfe(s))},gfe=s=>{let r=!1;const c=setTimeout(()=>{r||s.setProgressState(!0)},500);return()=>{clearTimeout(c),r=!0,s.setProgressState(!1)}},PY=s=>{const r=s.getElement();let c=s.getDoc();s.inline&&(xI.addClass(r,"mce-content-body"),s.contentDocument=c=document,s.contentWindow=window,s.bodyElement=r,s.contentAreaContainer=r);const p=s.getBody();p.disabled=!0,s.readonly=w6(s),s._editableRoot=HE(s),!wg(s)&&s.hasEditableRoot()&&(s.inline&&xI.getStyle(p,"position",!0)==="static"&&(p.style.position="relative"),p.contentEditable="true"),p.disabled=!1,s.editorUpload=LCe(s),s.schema=o1(OY(s)),s.dom=vi(c,{keep_values:!0,url_converter:s.convertURL,url_converter_scope:s,update_styles:!0,root_element:s.inline?s.getBody():null,collect:s.inline,schema:s.schema,contentCssCors:LE(s),referrerPolicy:Oy(s),onSetAttrib:E=>{s.dispatch("SetAttrib",E)}}),s.parser=ffe(s),s.serializer=da(dfe(s),s),s.selection=Qj(s.dom,s.getWin(),s.serializer,s),s.annotator=Yr(s),s.formatter=xZ(s),s.undoManager=IZ(s),s._nodeChangeDispatcher=new pK(s),s._selectionOverrides=_I(s),Xae(s),WK(s),nle(s),Sh(s)||(GK(s),rfe(s));const g=hue(s);Oq(s,g),Ma(s),NCe(s),zK(s);const _=$j(s);DY(s),cfe(s),_.fold(()=>{const E=gfe(s);TI(s).then(()=>{ZF(s),E()})},E=>{s.setProgressState(!0),TI(s).then(()=>{E().then(R=>{s.setProgressState(!1),ZF(s),qj(s)},R=>{s.notificationManager.open({type:"error",text:String(R)}),ZF(s),qj(s)})})})},MY=Ht,NY=(s,r,c)=>le(s,r,MY,c),qF=vi.DOM,vfe=(s,r,c,p)=>{const g=et.fromTag("iframe");return p.each(_=>el(g,"tabindex",_)),Tl(g,c),Tl(g,{id:s+"_ifr",frameBorder:"0",allowTransparency:"true",title:r}),Yt(g,"tox-edit-area__iframe"),g},GF=s=>{let r=dD(s)+"<html><head>";ju(s)!==s.documentBaseUrl&&(r+='<base href="'+s.documentBaseURI.getURI()+'" />'),r+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';const c=D4(s),p=IE(s),g=s.translate(H4(s));return eu(s)&&(r+='<meta http-equiv="Content-Security-Policy" content="'+eu(s)+'" />'),r+="</head>"+'<body id="'.concat(c,'" class="mce-content-body ').concat(p,'" data-id="').concat(s.id,'" aria-label="').concat(g,'">')+"<br></body></html>",r},II=(s,r)=>{const c=ns.browser.isFirefox()?H4(s):"Rich Text Area",p=s.translate(c),g=ld(et.fromDom(s.getElement()),"tabindex").bind(Mu),_=vfe(s.id,p,uD(s),g).dom;_.onload=()=>{_.onload=null,s.dispatch("load")},s.contentAreaContainer=r.iframeContainer,s.iframeElement=_,s.iframeHTML=GF(s),qF.add(r.iframeContainer,_)},AI=s=>{const r=s.iframeElement,c=()=>{s.contentDocument=r.contentDocument,PY(s)};if(j4(s)||ns.browser.isFirefox()){const p=s.getDoc();p.open(),p.write(s.iframeHTML),p.close(),c()}else{const p=NY(et.fromDom(r),"load",()=>{p.unbind(),c()});r.srcdoc=s.iframeHTML}},gv=(s,r)=>{II(s,r),r.editorContainer&&(r.editorContainer.style.display=s.orgDisplay,s.hidden=qF.isHidden(r.editorContainer)),s.getElement().style.display="none",qF.setAttrib(s.id,"aria-hidden","true"),s.getElement().style.visibility=s.orgVisibility,AI(s)},W7=vi.DOM,mS=(s,r,c)=>{const p=Lg.get(c),g=Lg.urls[c]||s.documentBaseUrl.replace(/\/$/,"");if(c=Gt.trim(c),p&&Gt.inArray(r,c)===-1){if(s.plugins[c])return;try{const _=p(s,g)||{};s.plugins[c]=_,ie(_.init)&&(_.init(s,g),r.push(c))}catch(_){fZ(s,c,_)}}},FY=s=>s.replace(/^\-/,""),bfe=s=>{const r=[];Ve(Eu(s),c=>{mS(s,r,FY(c))})},yfe=s=>{const r=Gt.trim(DE(s)),c=s.ui.registry.getAll().icons,p={...Jx.get("default").icons,...Jx.get(r).icons};bn(p,(g,_)=>{Kt(c,_)||s.ui.registry.addIcon(_,g)})},$Y=s=>{const r=S2(s);if(z(r)){const c=Q2.get(r);s.theme=c(s,Q2.urls[r])||{},ie(s.theme.init)&&s.theme.init(s,Q2.urls[r]||s.documentBaseUrl.replace(/\/$/,""))}else s.theme={}},_fe=s=>{const r=b6(s),c=$_.get(r);s.model=c(s,$_.urls[r])},KF=s=>{const r=s.theme.renderUI;return r?r():YF(s)},OI=s=>{const r=s.getElement(),p=S2(s)(s,r);return p.editorContainer.nodeType&&(p.editorContainer.id=p.editorContainer.id||s.id+"_parent"),p.iframeContainer&&p.iframeContainer.nodeType&&(p.iframeContainer.id=p.iframeContainer.id||s.id+"_iframecontainer"),p.height=p.iframeHeight?p.iframeHeight:r.offsetHeight,p},vv=(s,r)=>({editorContainer:s,iframeContainer:r,api:{}}),T3=s=>{const r=W7.create("div");return W7.insertAfter(r,s),vv(r,r)},YF=s=>{const r=s.getElement();return s.inline?vv(null):T3(r)},Sfe=s=>{const r=s.getElement();return s.orgDisplay=r.style.display,z(S2(s))?KF(s):ie(S2(s))?OI(s):YF(s)},Cfe=(s,r)=>{const c={show:ye.from(r.show).getOr(Ue),hide:ye.from(r.hide).getOr(Ue),isEnabled:ye.from(r.isEnabled).getOr(Ht),setEnabled:p=>{p&&(s.mode.get()==="readonly"||eb(s))||ye.from(r.setEnabled).each(_=>_(p))}};s.ui={...s.ui,...c}},wfe=async s=>{s.dispatch("ScriptsLoaded"),yfe(s),$Y(s),_fe(s),bfe(s);const r=await Sfe(s);Cfe(s,ye.from(r.api).getOr({})),s.editorContainer=r.editorContainer,l7(s),s.inline?PY(s):gv(s,{editorContainer:r.editorContainer,iframeContainer:r.iframeContainer})},I3=vi.DOM,BY=s=>s.charAt(0)==="-",Efe=(s,r)=>{const c=_2(r),p=Sg(r);if(!Hu.hasCode(c)&&c!=="en"){const g=gr(p)?p:"".concat(r.editorManager.baseURL,"/langs/").concat(c,".js");s.add(g).catch(()=>{xie(r,g,c)})}},VY=(s,r)=>{const c=S2(s);if(z(c)&&!BY(c)&&!Kt(Q2.urls,c)){const p=bD(s),g=p?s.documentBaseURI.toAbsolute(p):"themes/".concat(c,"/theme").concat(r,".js");Q2.load(c,g).catch(()=>{r7(s,g,c)})}},kfe=(s,r)=>{const c=b6(s);if(c!=="plugin"&&!Kt($_.urls,c)){const p=yD(s),g=z(p)?s.documentBaseURI.toAbsolute(p):"models/".concat(c,"/model").concat(r,".js");$_.load(c,g).catch(()=>{dZ(s,g,c)})}},xfe=s=>ye.from(fD(s)).filter(gr).map(r=>({url:r,name:ye.none()})),HY=(s,r,c)=>ye.from(r).filter(p=>gr(p)&&!Jx.has(p)).map(p=>({url:"".concat(s.editorManager.baseURL,"/icons/").concat(p,"/icons").concat(c,".js"),name:ye.some(p)})),h6e=(s,r,c)=>{const p=HY(r,"default",c),g=xfe(r).orThunk(()=>HY(r,DE(r),""));Ve(ef([p,g]),_=>{s.add(_.url).catch(()=>{kie(r,_.url,_.name.getOrUndefined())})})},Tfe=(s,r)=>{const c=(p,g)=>{Lg.load(p,g).catch(()=>{uZ(s,g,p)})};bn(B4(s),(p,g)=>{c(g,p),s.options.set("plugins",Eu(s).concat(g))}),Ve(Eu(s),p=>{p=Gt.trim(p),p&&!Lg.urls[p]&&!BY(p)&&c(p,"plugins/".concat(p,"/plugin").concat(r,".js"))})},XF=s=>{const r=S2(s);return!z(r)||he(Q2.get(r))},Ife=s=>{const r=b6(s);return he($_.get(r))},Afe=(s,r)=>{const c=pd.ScriptLoader,p=()=>{!s.removed&&XF(s)&&Ife(s)&&wfe(s)};VY(s,r),kfe(s,r),Efe(c,s),h6e(c,s,r),Tfe(s,r),c.loadQueue().then(p,p)},UY=(s,r)=>fd.forElement(s,{contentCssCors:UE(r),referrerPolicy:Oy(r)}),Ofe=s=>{const r=s.id;Hu.setCode(_2(s));const c=()=>{I3.unbind(window,"ready",c),s.render()};if(!i1.Event.domLoaded){I3.bind(window,"ready",c);return}if(!s.getElement())return;const p=et.fromDom(s.getElement()),g=Y1(p);s.on("remove",()=>{dn(p.dom.attributes,E=>gi(p,E.name)),Tl(p,g)}),s.ui.styleSheetLoader=UY(p,s),Ly(s)?s.inline=!0:(s.orgVisibility=s.getElement().style.visibility,s.getElement().style.visibility="hidden");const _=s.getElement().form||I3.getParent(r,"form");_&&(s.formElement=_,BE(s)&&!Ki(s.getElement())&&(I3.insertAfter(I3.create("input",{type:"hidden",name:r}),r),s.hasHiddenInput=!0),s.formEventDelegate=E=>{s.dispatch(E.type,E)},I3.bind(_,"submit reset",s.formEventDelegate),s.on("reset",()=>{s.resetContent()}),_6(s)&&!_.submit.nodeType&&!_.submit.length&&!_._mceOldSubmit&&(_._mceOldSubmit=_.submit,_.submit=()=>(s.editorManager.triggerSave(),s.setDirty(!1),_._mceOldSubmit(_)))),s.windowManager=cZ(s),s.notificationManager=aZ(s),I6(s)&&s.on("GetContent",E=>{E.save&&(E.content=I3.encode(E.content))}),S6(s)&&s.on("submit",()=>{s.initialized&&s.save()}),C6(s)&&(s._beforeUnload=()=>{s.initialized&&!s.destroyed&&!s.isHidden()&&s.save({format:"raw",no_events:!0,set_dirty:!1})},s.editorManager.on("BeforeUnload",s._beforeUnload)),s.editorManager.add(s),Afe(s,s.suffix)},zY=(s,r)=>{s._editableRoot!==r&&(s._editableRoot=r,eb(s)||(s.getBody().contentEditable=String(s.hasEditableRoot()),s.nodeChanged()),nl(s,r))},Rfe=s=>s._editableRoot,JF=(s,r)=>({sections:Fe(s),options:Fe(r)}),WY=Qa().deviceType,jY=WY.isPhone(),Dfe=WY.isTablet(),j7=s=>{if(de(s))return[];{const r=ue(s)?s:s.split(/[ ,]/),c=Nt(r,tr);return Bt(c,gr)}},ZY=(s,r)=>{const c=_n(r,(p,g)=>Qe(s,g));return JF(c.t,c.f)},QF=(s,r,c={})=>{const p=s.sections(),g=Vn(p,r).getOr({});return Gt.extend({},c,g)},RI=(s,r)=>Kt(s.sections(),r),e$=(s,r)=>RI(s,r)?s.sections()[r]:{},Lfe=(s,r)=>({...{table_grid:!1,object_resizing:!1,resize:!1,toolbar_mode:Vn(s,"toolbar_mode").getOr("scrolling"),toolbar_sticky:!1},...r?{menubar:!1}:{}}),g6e=(s,r)=>{var c;const p=(c=r.external_plugins)!==null&&c!==void 0?c:{};return s&&s.external_plugins?Gt.extend({},s.external_plugins,p):p},v6e=(s,r)=>[...j7(s),...j7(r)],Pfe=(s,r,c,p)=>s&&RI(r,"mobile")?p:c,qY=(s,r,c,p)=>{const g=j7(c.forced_plugins),_=j7(p.plugins),E=e$(r,"mobile"),R=E.plugins?j7(E.plugins):_,N=Pfe(s,r,_,R),j=v6e(g,N);return Gt.extend(p,{forced_plugins:g,plugins:j})},Mfe=(s,r)=>s&&RI(r,"mobile"),Nfe=(s,r,c,p,g)=>{var _;const E=s?{mobile:Lfe((_=g.mobile)!==null&&_!==void 0?_:{},r)}:{},R=ZY(["mobile"],PT(E,g)),N=Gt.extend(c,p,R.options(),Mfe(s,R)?QF(R,"mobile"):{},{external_plugins:g6e(p,R.options())});return qY(s,R,p,N)},Ffe=(s,r)=>{const c=fG(r);return Nfe(jY||Dfe,jY,c,s,c)},b6e=(s,r)=>jre(s,r),y6e=s=>{const r=(p,g)=>{s.formatter.toggle(p,g),s.nodeChanged()},c=p=>()=>{Ve("left,center,right,justify".split(","),g=>{p!==g&&s.formatter.remove("align"+g)}),p!=="none"&&r("align"+p)};s.editorCommands.addCommands({JustifyLeft:c("left"),JustifyCenter:c("center"),JustifyRight:c("right"),JustifyFull:c("justify"),JustifyNone:c("none")})},GY=s=>{const r=c=>()=>{const p=s.selection,g=p.isCollapsed()?[s.dom.getParent(p.getNode(),s.dom.isBlock)]:p.getSelectedBlocks();return Ot(g,_=>he(s.formatter.matchNode(_,c)))};s.editorCommands.addCommands({JustifyLeft:r("alignleft"),JustifyCenter:r("aligncenter"),JustifyRight:r("alignright"),JustifyFull:r("alignjustify")},"state")},KY=s=>{y6e(s),GY(s)},$fe=s=>{s.editorCommands.addCommands({"Cut,Copy,Paste":r=>{const c=s.getDoc();let p;try{c.execCommand(r)}catch{p=!0}if(r==="paste"&&!c.queryCommandEnabled(r)&&(p=!0),p||!c.queryCommandSupported(r)){let g=s.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");(ns.os.isMacOS()||ns.os.isiOS())&&(g=g.replace(/Ctrl\+/g,"⌘+")),s.notificationManager.open({text:g,type:"error"})}}})},Bfe=(s,r,c,p)=>{const g=et.fromDom(s.getRoot());return w8(g,$t.fromRangeStart(r),p)?c=c.replace(/^ /," "):c=c.replace(/^ /," "),__(g,$t.fromRangeEnd(r),p)?c=c.replace(/( | )(<br( \/)>)?$/," "):c=c.replace(/ (<br( \/)?>)?$/," "),c},Vfe=s=>{if(typeof s!="string"){const r=Gt.extend({paste:s.paste,data:{paste:s.paste}},s);return{content:s.content,details:r}}return{content:s,details:{}}},_6e=(s,r)=>{const c=s.selection,p=s.dom;return/^ | $/.test(r)?Bfe(p,c.getRng(),r,s.schema):r},t$=(s,r)=>{if(s.selection.isEditable()){const{content:c,details:p}=Vfe(r);h3(s,{...p,content:_6e(s,c),format:"html",set:!1,selection:!0}).each(g=>{const _=Yx(s,g.content,p);Hx(s,_,g),s.addVisual()})}},S6e=s=>{s.editorCommands.addCommands({mceCleanup:()=>{const r=s.selection.getBookmark();s.setContent(s.getContent()),s.selection.moveToBookmark(r)},insertImage:(r,c,p)=>{t$(s,s.dom.createHTML("img",{src:p}))},insertHorizontalRule:()=>{s.execCommand("mceInsertContent",!1,"<hr>")},insertText:(r,c,p)=>{t$(s,s.dom.encode(p))},insertHTML:(r,c,p)=>{t$(s,p)},mceInsertContent:(r,c,p)=>{t$(s,p)},mceSetContent:(r,c,p)=>{s.setContent(p)},mceReplaceContent:(r,c,p)=>{s.execCommand("mceInsertContent",!1,p.replace(/\{\$selection\}/g,s.selection.getContent({format:"text"})))},mceNewDocument:()=>{s.setContent(zE(s))}})},Hfe={"font-size":"size","font-family":"face"},C6e=qf("font"),Ufe=(s,r,c)=>{const p=_=>vu(_,s).orThunk(()=>C6e(_)?Vn(Hfe,s).bind(E=>ld(_,E)):ye.none()),g=_=>Yo(et.fromDom(r),_);return bx(et.fromDom(c),_=>p(_),g)},A3=s=>s.replace(/[\'\"\\]/g,"").replace(/,\s+/g,","),n$=(s,r)=>ye.from(vi.DOM.getStyle(r,s,!0)),Z7=s=>(r,c)=>ye.from(c).map(et.fromDom).filter(li).bind(p=>Ufe(s,r,p.dom).or(n$(s,p.dom))).getOr(""),YY=Z7("font-size"),XY=V(A3,Z7("font-family")),JY=s=>sl(s.getBody()).bind(r=>{const c=r.container();return ye.from(un(c)?c.parentNode:c)}),zfe=s=>ye.from(s.selection.getRng()).bind(r=>{const c=s.getBody();return r.startContainer===c&&r.startOffset===0?ye.none():ye.from(s.selection.getStart(!0))}),Wfe=(s,r)=>zfe(s).orThunk(He(JY,s)).map(et.fromDom).filter(li).bind(r),s$=(s,r)=>Wfe(s,Ye(ye.some,r)),QY=(s,r)=>{if(/^[0-9.]+$/.test(r)){const c=parseInt(r,10);if(c>=1&&c<=7){const p=qE(s),g=AD(s);return g.length>0?g[c-1]||r:p[c-1]||r}else return r}else return r},jfe=s=>{const r=s.split(/\s*,\s*/);return Nt(r,c=>c.indexOf(" ")!==-1&&!(hr(c,'"')||hr(c,"'"))?"'".concat(c,"'"):c).join(",")},Zfe=(s,r)=>{const c=QY(s,r);s.formatter.toggle("fontname",{value:jfe(c)}),s.nodeChanged()},pb=s=>s$(s,r=>XY(s.getBody(),r.dom)).getOr(""),qfe=(s,r)=>{s.formatter.toggle("fontsize",{value:QY(s,r)}),s.nodeChanged()},eX=s=>s$(s,r=>YY(s.getBody(),r.dom)).getOr(""),Gfe=s=>s$(s,r=>{const c=et.fromDom(s.getBody()),p=bx(r,_=>vu(_,"line-height"),He(Yo,c)),g=()=>{const _=parseFloat(Oa(r,"line-height")),E=parseFloat(Oa(r,"font-size"));return String(_/E)};return p.getOrThunk(g)}).getOr(""),DI=(s,r)=>{s.formatter.toggle("lineheight",{value:String(r)}),s.nodeChanged()},Kfe=s=>{const r=(c,p)=>{s.formatter.toggle(c,p),s.nodeChanged()};s.editorCommands.addCommands({"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":c=>{r(c)},"ForeColor,HiliteColor":(c,p,g)=>{r(c,{value:g})},BackColor:(c,p,g)=>{r("hilitecolor",{value:g})},FontName:(c,p,g)=>{Zfe(s,g)},FontSize:(c,p,g)=>{qfe(s,g)},LineHeight:(c,p,g)=>{DI(s,g)},Lang:(c,p,g)=>{var _;r(c,{value:g.code,customValue:(_=g.customCode)!==null&&_!==void 0?_:null})},RemoveFormat:c=>{s.formatter.remove(c)},mceBlockQuote:()=>{r("blockquote")},FormatBlock:(c,p,g)=>{r(z(g)?g:"p")},mceToggleFormat:(c,p,g)=>{r(g)}})},Yfe=s=>{const r=c=>s.formatter.match(c);s.editorCommands.addCommands({"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":c=>r(c),mceBlockQuote:()=>r("blockquote")},"state"),s.editorCommands.addQueryValueHandler("FontName",()=>pb(s)),s.editorCommands.addQueryValueHandler("FontSize",()=>eX(s)),s.editorCommands.addQueryValueHandler("LineHeight",()=>Gfe(s))},Xfe=s=>{Kfe(s),Yfe(s)},tX=s=>{s.editorCommands.addCommands({mceAddUndoLevel:()=>{s.undoManager.add()},mceEndUndoLevel:()=>{s.undoManager.add()},Undo:()=>{s.undoManager.undo()},Redo:()=>{s.undoManager.redo()}})},Jfe=s=>{s.editorCommands.addCommands({Indent:()=>{Kae(s)},Outdent:()=>{gN(s)}}),s.editorCommands.addCommands({Outdent:()=>hN(s)},"state")},Qfe=s=>{const r=(c,p,g)=>{if(s.mode.isReadOnly())return;const _=z(g)?{href:g}:g,E=s.dom.getParent(s.selection.getNode(),"a");q(_)&&z(_.href)&&(_.href=_.href.replace(/ /g,"%20"),(!E||!_.href)&&s.formatter.remove("link"),_.href&&s.formatter.apply("link",_,E))};s.editorCommands.addCommands({unlink:()=>{if(s.selection.isEditable()){if(s.selection.isCollapsed()){const c=s.dom.getParent(s.selection.getStart(),"a");c&&s.dom.remove(c,!0);return}s.formatter.remove("link")}},mceInsertLink:r,createLink:r})},epe=(s,r,c,p)=>{const g=s.dom,_=R=>g.isBlock(R)&&R.parentElement===c,E=_(r)?r:g.getParent(p,_,c);return ye.from(E).map(et.fromDom)},nX=(s,r)=>{if(s.mode.isReadOnly())return;const c=s.dom,p=s.selection.getRng(),g=r?s.selection.getStart():s.selection.getEnd(),_=r?p.startContainer:p.endContainer,E=nS(c,_);if(!E||!E.isContentEditable)return;const R=r?Jc:dd,N=gl(s);epe(s,g,E,_).each(j=>{const ae=zG(s,_,j.dom,E,!1,N);R(j,et.fromDom(ae)),s.selection.setCursorLocation(ae,0),s.dispatch("NewBlock",{newBlock:ae}),P7(s,"insertParagraph")})},o$=s=>nX(s,!0),tpe=s=>nX(s,!1),npe=s=>{s.editorCommands.addCommands({InsertNewBlockBefore:()=>{o$(s)},InsertNewBlockAfter:()=>{tpe(s)}})},Nl=s=>{s.editorCommands.addCommands({insertParagraph:()=>{F7(GT,s)},mceInsertNewLine:(r,c,p)=>{XG(s,p)},InsertLineBreak:(r,c,p)=>{F7(KT,s)}})},spe=s=>{s.editorCommands.addCommands({mceSelectNodeDepth:(r,c,p)=>{let g=0;s.dom.getParent(s.selection.getNode(),_=>Ln(_)&&g++===p?(s.selection.select(_),!1):!0,s.getBody())},mceSelectNode:(r,c,p)=>{s.selection.select(p)},selectAll:()=>{const r=s.dom.getParent(s.selection.getStart(),Zt);if(r){const c=s.dom.createRng();c.selectNodeContents(r),s.selection.setRng(c)}}})},ope=s=>{s.editorCommands.addCommands({mceRemoveNode:(r,c,p)=>{const g=p!=null?p:s.selection.getNode();if(g!==s.getBody()){const _=s.selection.getBookmark();s.dom.remove(g,!0),s.selection.moveToBookmark(_)}},mcePrint:()=>{s.getWin().print()},mceFocus:(r,c,p)=>{ws(s,p===!0)},mceToggleVisualAid:()=>{s.hasVisual=!s.hasVisual,s.addVisual()}})},r$=s=>{KY(s),$fe(s),tX(s),spe(s),S6e(s),Qfe(s),Jfe(s),npe(s),Nl(s),Xfe(s),ope(s)},sX=["toggleview"],LI=s=>Qe(sX,s.toLowerCase());class oX{constructor(r){this.commands={state:{},exec:{},value:{}},this.editor=r}execCommand(r,c=!1,p,g){const _=this.editor,E=r.toLowerCase(),R=g==null?void 0:g.skip_focus;if(_.removed||(E!=="mcefocus"&&(!/^(mceAddUndoLevel|mceEndUndoLevel)$/i.test(E)&&!R?_.focus():LU(_)),_.dispatch("BeforeExecCommand",{command:r,ui:c,value:p}).isDefaultPrevented()))return!1;const j=this.commands.exec[E];return ie(j)?(j(E,c,p),_.dispatch("ExecCommand",{command:r,ui:c,value:p}),!0):!1}queryCommandState(r){if(!LI(r)&&this.editor.quirks.isHidden()||this.editor.removed)return!1;const c=r.toLowerCase(),p=this.commands.state[c];return ie(p)?p(c):!1}queryCommandValue(r){if(!LI(r)&&this.editor.quirks.isHidden()||this.editor.removed)return"";const c=r.toLowerCase(),p=this.commands.value[c];return ie(p)?p(c):""}addCommands(r,c="exec"){const p=this.commands;bn(r,(g,_)=>{Ve(_.toLowerCase().split(","),E=>{p[c][E]=g})})}addCommand(r,c,p){const g=r.toLowerCase();this.commands.exec[g]=(_,E,R)=>c.call(p!=null?p:this.editor,E,R)}queryCommandSupported(r){const c=r.toLowerCase();return!!this.commands.exec[c]}addQueryStateHandler(r,c,p){this.commands.state[r.toLowerCase()]=()=>c.call(p!=null?p:this.editor)}addQueryValueHandler(r,c,p){this.commands.value[r.toLowerCase()]=()=>c.call(p!=null?p:this.editor)}}const rpe=Gt.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input beforeinput contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchmove touchend touchcancel"," ");class i${static isNative(r){return!!rpe[r.toLowerCase()]}constructor(r){this.bindings={},this.settings=r||{},this.scope=this.settings.scope||this,this.toggleEvent=this.settings.toggleEvent||ct}fire(r,c){return this.dispatch(r,c)}dispatch(r,c){const p=r.toLowerCase(),g=uy(p,c!=null?c:{},this.scope);this.settings.beforeFire&&this.settings.beforeFire(g);const _=this.bindings[p];if(_)for(let E=0,R=_.length;E<R;E++){const N=_[E];if(!N.removed){if(N.once&&this.off(p,N.func),g.isImmediatePropagationStopped())return g;if(N.func.call(this.scope,g)===!1)return g.preventDefault(),g}}return g}on(r,c,p,g){if(c===!1&&(c=ct),c){const _={func:c,removed:!1};g&&Gt.extend(_,g);const E=r.toLowerCase().split(" ");let R=E.length;for(;R--;){const N=E[R];let j=this.bindings[N];j||(j=[],this.toggleEvent(N,!0)),p?j=[_,...j]:j=[...j,_],this.bindings[N]=j}}return this}off(r,c){if(r){const p=r.toLowerCase().split(" ");let g=p.length;for(;g--;){const _=p[g];let E=this.bindings[_];if(!_)return bn(this.bindings,(R,N)=>{this.toggleEvent(N,!1),delete this.bindings[N]}),this;if(E){if(!c)E.length=0;else{const R=kn(E,N=>N.func===c);E=R.fail,this.bindings[_]=E,Ve(R.pass,N=>{N.removed=!0})}E.length||(this.toggleEvent(r,!1),delete this.bindings[_])}}}else bn(this.bindings,(p,g)=>{this.toggleEvent(g,!1)}),this.bindings={};return this}once(r,c,p){return this.on(r,c,p,{once:!0})}has(r){r=r.toLowerCase();const c=this.bindings[r];return!(!c||c.length===0)}}const q7=s=>(s._eventDispatcher||(s._eventDispatcher=new i$({scope:s,toggleEvent:(r,c)=>{i$.isNative(r)&&s.toggleNativeEvent&&s.toggleNativeEvent(r,c)}})),s._eventDispatcher),a$={fire(s,r,c){return this.dispatch(s,r,c)},dispatch(s,r,c){const p=this;if(p.removed&&s!=="remove"&&s!=="detach")return uy(s.toLowerCase(),r!=null?r:{},p);const g=q7(p).dispatch(s,r);if(c!==!1&&p.parent){let _=p.parent();for(;_&&!g.isPropagationStopped();)_.dispatch(s,g,!1),_=_.parent?_.parent():void 0}return g},on(s,r,c){return q7(this).on(s,r,c)},off(s,r){return q7(this).off(s,r)},once(s,r){return q7(this).once(s,r)},hasEventListeners(s){return q7(this).has(s)}},PI=vi.DOM;let O3;const MI=(s,r)=>{if(r==="selectionchange")return s.getDoc();if(!s.inline&&/^(?:mouse|touch|click|contextmenu|drop|dragover|dragend)/.test(r))return s.getDoc().documentElement;const c=Ry(s);return c?(s.eventRoot||(s.eventRoot=PI.select(c)[0]),s.eventRoot):s.getBody()},hS=s=>!s.hidden&&!eb(s),Ch=(s,r,c)=>{hS(s)?s.dispatch(r,c):eb(s)&&Lie(s,c)},rX=(s,r)=>{if(s.delegates||(s.delegates={}),s.delegates[r]||s.removed)return;const c=MI(s,r);if(Ry(s)){if(O3||(O3={},s.editorManager.on("removeEditor",()=>{s.editorManager.activeEditor||O3&&(bn(O3,(g,_)=>{s.dom.unbind(MI(s,_))}),O3=null)})),O3[r])return;const p=g=>{const _=g.target,E=s.editorManager.get();let R=E.length;for(;R--;){const N=E[R].getBody();(N===_||PI.isChildOf(_,N))&&Ch(E[R],r,g)}};O3[r]=p,PI.bind(c,r,p)}else{const p=g=>{Ch(s,r,g)};PI.bind(c,r,p),s.delegates[r]=p}},iX={...a$,bindPendingEventDelegates(){const s=this;Gt.each(s._pendingNativeEvents,r=>{rX(s,r)})},toggleNativeEvent(s,r){const c=this;s==="focus"||s==="blur"||c.removed||(r?c.initialized?rX(c,s):c._pendingNativeEvents?c._pendingNativeEvents.push(s):c._pendingNativeEvents=[s]:c.initialized&&c.delegates&&(c.dom.unbind(MI(c,s),s,c.delegates[s]),delete c.delegates[s]))},unbindAllNativeEvents(){const s=this,r=s.getBody(),c=s.dom;s.delegates&&(bn(s.delegates,(p,g)=>{s.dom.unbind(MI(s,g),g,p)}),delete s.delegates),!s.inline&&r&&c&&(r.onload=null,c.unbind(s.getWin()),c.unbind(s.getDoc())),c&&(c.unbind(r),c.unbind(s.getContainer()))}},ipe=s=>z(s)?{value:s.split(/[ ,]/),valid:!0}:$e(s,z)?{value:s,valid:!0}:{valid:!1,message:"The value must be a string[] or a comma/space separated string."},ape=s=>{const r=(()=>{switch(s){case"array":return ue;case"boolean":return ce;case"function":return ie;case"number":return Be;case"object":return q;case"string":return z;case"string[]":return ipe;case"object[]":return c=>$e(c,q);case"regexp":return c=>Y(c,RegExp);default:return Ht}})();return c=>l$(c,r,"The value must be a ".concat(s,"."))},lpe=s=>z(s.processor),aX=(s,r)=>{const c=hi(r.message)?"":". ".concat(r.message);return s+c},lX=s=>s.valid,l$=(s,r,c="")=>{const p=r(s);return ce(p)?p?{value:s,valid:!0}:{valid:!1,message:c}:p},cpe=(s,r,c)=>{if(!ge(r)){const p=l$(r,c);if(lX(p))return p.value;console.error(aX('Invalid default value passed for the "'.concat(s,'" option'),p))}},w6e=(s,r,c=r)=>{const p={},g={},_=(xe,De,Oe)=>{const Ne=l$(De,Oe);return lX(Ne)?(g[xe]=Ne.value,!0):(console.warn(aX("Invalid value passed for the ".concat(xe," option"),Ne)),!1)},E=(xe,De)=>{const Oe=lpe(De)?ape(De.processor):De.processor,Ne=cpe(xe,De.default,Oe);p[xe]={...De,default:Ne,processor:Oe},Vn(g,xe).orThunk(()=>Vn(r,xe)).each(ut=>_(xe,ut,Oe))},R=xe=>Kt(p,xe);return{register:E,isRegistered:R,get:xe=>Vn(g,xe).orThunk(()=>Vn(p,xe).map(De=>De.default)).getOrUndefined(),set:(xe,De)=>{if(R(xe)){const Oe=p[xe];return Oe.immutable?(console.error('"'.concat(xe,'" is an immutable option and cannot be updated')),!1):_(xe,De,Oe.processor)}else return console.warn('"'.concat(xe,'" is not a registered option. Ensure the option has been registered before setting a value.')),!1},unset:xe=>{const De=R(xe);return De&&delete g[xe],De},isSet:xe=>Kt(g,xe),debug:()=>{try{console.log(JSON.parse(JSON.stringify(c,(xe,De)=>ce(De)||Be(De)||z(De)||J(De)||ue(De)||ne(De)?De:Object.prototype.toString.call(De))))}catch(xe){console.error(xe)}}}},upe=(s,r)=>{s.dom.contentEditable="true"},dpe=(s,r)=>{const c=et.fromDom(s.getBody());r?(s.readonly=!0,s.hasEditableRoot()&&upe(c),hZ(s)):(s.readonly=!1,gZ(s))},G7=s=>s.readonly,fpe=s=>{s.on("beforeinput paste cut dragend dragover draggesture dragdrop drop drag",r=>{G7(s)&&r.preventDefault()}),s.on("BeforeExecCommand",r=>{(r.command==="Undo"||r.command==="Redo")&&G7(s)&&r.preventDefault()}),s.on("input",r=>{if(!r.isComposing&&G7(s)){const c=s.undoManager.add();he(c)&&s.undoManager.undo()}}),s.on("compositionend",()=>{if(G7(s)){const r=s.undoManager.add();he(r)&&s.undoManager.undo()}})},ppe=["design","readonly"],cX=(s,r,c,p)=>{const g=c[r.get()],_=c[p];try{_.activate()}catch(E){console.error("problem while activating editor mode ".concat(p,":"),E);return}g.deactivate(),g.editorReadOnly!==_.editorReadOnly&&dpe(s,_.editorReadOnly),r.set(p),CE(s,p)},mpe=(s,r,c,p)=>{if(!(p===c.get()||s.initialized&&eb(s))){if(!Kt(r,p))throw new Error("Editor mode '".concat(p,"' is invalid"));s.initialized?cX(s,c,r,p):s.on("init",()=>cX(s,c,r,p))}},hpe=(s,r,c)=>{if(Qe(ppe,r))throw new Error("Cannot override default mode ".concat(r));return{...s,[r]:{...c,deactivate:()=>{try{c.deactivate()}catch(p){console.error("problem while deactivating editor mode ".concat(r,":"),p)}}}}},gpe=s=>{const r=pl("design"),c=pl({design:{activate:Ue,deactivate:Ue,editorReadOnly:!1},readonly:{activate:Ue,deactivate:Ue,editorReadOnly:!0}});return fpe(s),yZ(s),{isReadOnly:()=>G7(s),set:p=>mpe(s,c.get(),r,p),get:()=>r.get(),register:(p,g)=>{c.set(hpe(c.get(),p,g))}}},c$=Gt.each,u$=Gt.explode,vpe={f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123},uX=Gt.makeMap("alt,ctrl,shift,meta,access"),bpe=s=>s in uX,ype=s=>{const r={},c=ns.os.isMacOS()||ns.os.isiOS();c$(u$(s.toLowerCase(),"+"),_=>{bpe(_)?r[_]=!0:/^[0-9]{2,}$/.test(_)?r.keyCode=parseInt(_,10):(r.charCode=_.charCodeAt(0),r.keyCode=vpe[_]||_.toUpperCase().charCodeAt(0))});const p=[r.keyCode];let g;for(g in uX)r[g]?p.push(g):r[g]=!1;return r.id=p.join(","),r.access&&(r.alt=!0,c?r.ctrl=!0:r.shift=!0),r.meta&&(c?r.meta=!0:(r.ctrl=!0,r.meta=!1)),r};class dX{constructor(r){this.shortcuts={},this.pendingPatterns=[],this.editor=r;const c=this;r.on("keyup keypress keydown",p=>{(c.hasModifier(p)||c.isFunctionKey(p))&&!p.isDefaultPrevented()&&(c$(c.shortcuts,g=>{c.matchShortcut(p,g)&&(c.pendingPatterns=g.subpatterns.slice(0),p.type==="keydown"&&c.executeShortcutAction(g))}),c.matchShortcut(p,c.pendingPatterns[0])&&(c.pendingPatterns.length===1&&p.type==="keydown"&&c.executeShortcutAction(c.pendingPatterns[0]),c.pendingPatterns.shift()))})}add(r,c,p,g){const _=this,E=_.normalizeCommandFunc(p);return c$(u$(Gt.trim(r)),R=>{const N=_.createShortcut(R,c,E,g);_.shortcuts[N.id]=N}),!0}remove(r){const c=this.createShortcut(r);return this.shortcuts[c.id]?(delete this.shortcuts[c.id],!0):!1}normalizeCommandFunc(r){const c=this,p=r;return typeof p=="string"?()=>{c.editor.execCommand(p,!1,null)}:Gt.isArray(p)?()=>{c.editor.execCommand(p[0],p[1],p[2])}:p}createShortcut(r,c,p,g){const _=Gt.map(u$(r,">"),ype);return _[_.length-1]=Gt.extend(_[_.length-1],{func:p,scope:g||this.editor}),Gt.extend(_[0],{desc:this.editor.translate(c),subpatterns:_.slice(1)})}hasModifier(r){return r.altKey||r.ctrlKey||r.metaKey}isFunctionKey(r){return r.type==="keydown"&&r.keyCode>=112&&r.keyCode<=123}matchShortcut(r,c){return!c||c.ctrl!==r.ctrlKey||c.meta!==r.metaKey||c.alt!==r.altKey||c.shift!==r.shiftKey?!1:r.keyCode===c.keyCode||r.charCode&&r.charCode===c.charCode?(r.preventDefault(),!0):!1}executeShortcutAction(r){return r.func?r.func.call(r.scope):null}}const _pe=()=>{const s={},r={},c={},p={},g={},_={},E={},R={},N={},j=(xe,De)=>(Oe,Ne)=>{xe[Oe.toLowerCase()]={...Ne,type:De}},ae=(xe,De)=>(Oe,Ne)=>{xe[Oe.toLowerCase()]={type:De,...Ne}},fe=(xe,De)=>p[xe.toLowerCase()]=De,ve=(xe,De)=>E[xe.toLowerCase()]=De;return{addButton:j(s,"button"),addGroupToolbarButton:j(s,"grouptoolbarbutton"),addToggleButton:j(s,"togglebutton"),addMenuButton:j(s,"menubutton"),addSplitButton:j(s,"splitbutton"),addMenuItem:j(r,"menuitem"),addNestedMenuItem:j(r,"nestedmenuitem"),addToggleMenuItem:j(r,"togglemenuitem"),addAutocompleter:j(c,"autocompleter"),addContextMenu:j(g,"contextmenu"),addContextToolbar:j(_,"contexttoolbar"),addContextForm:ae(_,"contextform"),addSidebar:j(R,"sidebar"),addView:j(N,"views"),addIcon:fe,addContext:ve,getAll:()=>({buttons:s,menuItems:r,icons:p,popups:c,contextMenus:g,contextToolbars:_,sidebars:R,views:N,contexts:E})}},Spe=()=>{const s=_pe();return{addAutocompleter:s.addAutocompleter,addButton:s.addButton,addContextForm:s.addContextForm,addContextMenu:s.addContextMenu,addContextToolbar:s.addContextToolbar,addIcon:s.addIcon,addMenuButton:s.addMenuButton,addMenuItem:s.addMenuItem,addNestedMenuItem:s.addNestedMenuItem,addSidebar:s.addSidebar,addSplitButton:s.addSplitButton,addToggleButton:s.addToggleButton,addGroupToolbarButton:s.addGroupToolbarButton,addToggleMenuItem:s.addToggleMenuItem,addView:s.addView,addContext:s.addContext,getAll:s.getAll}},R3=vi.DOM,fX=Gt.extend,Cpe=Gt.each;class NI{constructor(r,c,p){this.plugins={},this.contentCSS=[],this.contentStyles=[],this.loadedCSS={},this.isNotDirty=!1,this.composing=!1,this.destroyed=!1,this.hasHiddenInput=!1,this.iframeElement=null,this.initialized=!1,this.readonly=!1,this.removed=!1,this.startContent="",this._pendingNativeEvents=[],this._skinLoaded=!1,this._editableRoot=!0,this.editorManager=p,this.documentBaseUrl=p.documentBaseURL,fX(this,iX);const g=this;this.id=r,this.hidden=!1;const _=Ffe(p.defaultOptions,c);this.options=w6e(g,_,c),SU(g);const E=this.options.get;E("deprecation_warnings")&&hM(c,_);const R=E("suffix");R&&(p.suffix=R),this.suffix=p.suffix;const N=E("base_url");N&&p._setBaseUrl(N),this.baseUri=p.baseURI;const j=Oy(g);j&&(pd.ScriptLoader._setReferrerPolicy(j),vi.DOM.styleSheetLoader._setReferrerPolicy(j));const ae=UE(g);he(ae)&&vi.DOM.styleSheetLoader._setContentCssCors(ae),vc.languageLoad=E("language_load"),vc.baseURL=p.baseURL,this.setDirty(!1),this.documentBaseURI=new mm(ju(g),{base_uri:this.baseUri}),this.baseURI=this.baseUri,this.inline=Ly(g),this.hasVisual=E6(g),this.shortcuts=new dX(this),this.editorCommands=new oX(this),r$(this);const fe=E("cache_suffix");fe&&(ns.cacheSuffix=fe.replace(/^[\?\&]+/,"")),this.ui={registry:Spe(),styleSheetLoader:void 0,show:Ue,hide:Ue,setEnabled:Ue,isEnabled:Ht},this.mode=gpe(g),p.dispatch("SetupEditor",{editor:this});const ve=CD(g);ie(ve)&&ve.call(g,g)}render(){Ofe(this)}focus(r){this.execCommand("mceFocus",!1,r)}hasFocus(){return mn(this)}translate(r){return Hu.translate(r)}getParam(r,c,p){const g=this.options;return g.isRegistered(r)||(he(p)?g.register(r,{processor:p,default:c}):g.register(r,{processor:Ht,default:c})),!g.isSet(r)&&!ge(c)?c:g.get(r)}hasPlugin(r,c){return Qe(Eu(this),r)?c?Lg.get(r)!==void 0:!0:!1}nodeChanged(r){this._nodeChangeDispatcher.nodeChanged(r)}addCommand(r,c,p){this.editorCommands.addCommand(r,c,p)}addQueryStateHandler(r,c,p){this.editorCommands.addQueryStateHandler(r,c,p)}addQueryValueHandler(r,c,p){this.editorCommands.addQueryValueHandler(r,c,p)}addShortcut(r,c,p,g){this.shortcuts.add(r,c,p,g)}execCommand(r,c,p,g){return this.editorCommands.execCommand(r,c,p,g)}queryCommandState(r){return this.editorCommands.queryCommandState(r)}queryCommandValue(r){return this.editorCommands.queryCommandValue(r)}queryCommandSupported(r){return this.editorCommands.queryCommandSupported(r)}show(){const r=this;r.hidden&&(r.hidden=!1,r.inline?r.getBody().contentEditable="true":(R3.show(r.getContainer()),R3.hide(r.id)),r.load(),r.dispatch("show"))}hide(){const r=this;r.hidden||(r.save(),r.inline?(r.getBody().contentEditable="false",r===r.editorManager.focusedEditor&&(r.editorManager.focusedEditor=null)):(R3.hide(r.getContainer()),R3.setStyle(r.id,"display",r.orgDisplay)),r.hidden=!0,r.dispatch("hide"))}isHidden(){return this.hidden}setProgressState(r,c){this.dispatch("ProgressState",{state:r,time:c})}load(r={}){const c=this,p=c.getElement();if(c.removed)return"";if(p){const g={...r,load:!0},_=Ki(p)?p.value:p.innerHTML,E=c.setContent(_,g);return g.no_events||c.dispatch("LoadContent",{...g,element:p}),E}else return""}save(r={}){const c=this;let p=c.getElement();if(!p||!c.initialized||c.removed)return"";const g={...r,save:!0,element:p};let _=c.getContent(g);const E={...g,content:_};if(E.no_events||c.dispatch("SaveContent",E),E.format==="raw"&&c.dispatch("RawSaveContent",E),_=E.content,Ki(p))p.value=_;else{(r.is_removing||!c.inline)&&(p.innerHTML=_);const R=R3.getParent(c.id,"form");R&&Cpe(R.elements,N=>N.name===c.id?(N.value=_,!1):!0)}return E.element=g.element=p=null,E.set_dirty!==!1&&c.setDirty(!1),_}setContent(r,c){return tZ(this,r,c)}getContent(r){return lie(this,r)}insertContent(r,c){c&&(r=fX({content:r},c)),this.execCommand("mceInsertContent",!1,r)}resetContent(r){r===void 0?tZ(this,this.startContent,{format:"raw"}):tZ(this,r),this.undoManager.reset(),this.setDirty(!1),this.nodeChanged()}isDirty(){return!this.isNotDirty}setDirty(r){const c=!this.isNotDirty;this.isNotDirty=!r,r&&r!==c&&this.dispatch("dirty")}getContainer(){const r=this;return r.container||(r.container=r.editorContainer||R3.get(r.id+"_parent")),r.container}getContentAreaContainer(){return this.contentAreaContainer}getElement(){return this.targetElm||(this.targetElm=R3.get(this.id)),this.targetElm}getWin(){const r=this;if(!r.contentWindow){const c=r.iframeElement;c&&(r.contentWindow=c.contentWindow)}return r.contentWindow}getDoc(){const r=this;if(!r.contentDocument){const c=r.getWin();c&&(r.contentDocument=c.document)}return r.contentDocument}getBody(){var r,c;const p=this.getDoc();return(c=(r=this.bodyElement)!==null&&r!==void 0?r:p==null?void 0:p.body)!==null&&c!==void 0?c:null}convertURL(r,c,p){const g=this,_=g.options.get,E=U4(g);if(ie(E))return E.call(g,r,p,!0,c);if(!_("convert_urls")||p==="link"||q(p)&&p.nodeName==="LINK"||r.indexOf("file:")===0||r.length===0)return r;const R=new mm(r);return R.protocol!=="http"&&R.protocol!=="https"&&R.protocol!==""?r:_("relative_urls")?g.documentBaseURI.toRelative(r):(r=g.documentBaseURI.toAbsolute(r,_("remove_script_host")),r)}addVisual(r){b6e(this,r)}setEditableRoot(r){zY(this,r)}hasEditableRoot(){return Rfe(this)}remove(){Sp(this)}destroy(r){gie(this,r)}uploadImages(){return this.editorUpload.uploadImages()}_scanForImages(){return this.editorUpload.scanForImages()}}const gS=vi.DOM,K7=Gt.each;let pX=!1,FI,Hd=[];const $I=s=>{const r=s.type;K7(bv.get(),c=>{switch(r){case"scroll":c.dispatch("ScrollWindow",s);break;case"resize":c.dispatch("ResizeWindow",s);break}})},mX=s=>{if(s!==pX){const r=vi.DOM;s?(r.bind(window,"resize",$I),r.bind(window,"scroll",$I)):(r.unbind(window,"resize",$I),r.unbind(window,"scroll",$I)),pX=s}},hX=s=>{const r=Hd;return Hd=Bt(Hd,c=>s!==c),bv.activeEditor===s&&(bv.activeEditor=Hd.length>0?Hd[0]:null),bv.focusedEditor===s&&(bv.focusedEditor=null),r.length!==Hd.length},wpe=s=>{s&&s.initialized&&!(s.getContainer()||s.getBody()).parentNode&&(hX(s),s.unbindAllNativeEvents(),s.destroy(!0),s.removed=!0)},Epe=document.compatMode!=="CSS1Compat",bv={...a$,baseURI:null,baseURL:null,defaultOptions:{},documentBaseURL:null,suffix:null,majorVersion:"7",minorVersion:"7.1",releaseDate:"2025-03-05",i18n:Hu,activeEditor:null,focusedEditor:null,setup(){const s=this;let r="",c="",p=mm.getDocumentBaseUrl(document.location);/^[^:]+:\/\/\/?[^\/]+\//.test(p)&&(p=p.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(p)||(p+="/"));const g=window.tinymce||window.tinyMCEPreInit;if(g)r=g.base||g.baseURL,c=g.suffix;else{const _=document.getElementsByTagName("script");for(let E=0;E<_.length;E++){const R=_[E].src||"";if(R==="")continue;const N=R.substring(R.lastIndexOf("/"));if(/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(R)){N.indexOf(".min")!==-1&&(c=".min"),r=R.substring(0,R.lastIndexOf("/"));break}}if(!r&&document.currentScript){const E=document.currentScript.src;E.indexOf(".min")!==-1&&(c=".min"),r=E.substring(0,E.lastIndexOf("/"))}}s.baseURL=new mm(p).toAbsolute(r),s.documentBaseURL=p,s.baseURI=new mm(s.baseURL),s.suffix=c,A(s)},overrideDefaults(s){const r=s.base_url;r&&this._setBaseUrl(r);const c=s.suffix;c&&(this.suffix=c),this.defaultOptions=s;const p=s.plugin_base_urls;p!==void 0&&bn(p,(g,_)=>{vc.PluginManager.urls[_]=g})},init(s){const r=this;let c;const p=Gt.makeMap("area base basefont br col frame hr img input isindex link meta param embed source wbr track colgroup option table tbody tfoot thead tr th td script noscript style textarea video audio iframe object menu"," "),g=(ae,fe)=>ae.inline&&fe.tagName.toLowerCase()in p,_=ae=>{let fe=ae.id;return fe||(fe=Vn(ae,"name").filter(ve=>!gS.get(ve)).getOrThunk(gS.uniqueId),ae.setAttribute("id",fe)),fe},E=ae=>{const fe=s[ae];if(fe)return fe.apply(r,[])},R=ae=>ns.browser.isIE()||ns.browser.isEdge()?(tT("TinyMCE does not support the browser you are using. For a list of supported browsers please see: https://www.tiny.cloud/docs/tinymce/7/support/#supportedwebbrowsers"),[]):Epe?(tT("Failed to initialize the editor as the document is not in standards mode. TinyMCE requires standards mode."),[]):z(ae.selector)?gS.select(ae.selector):he(ae.target)?[ae.target]:[];let N=ae=>{c=ae};const j=()=>{let ae=0;const fe=[];let ve;const xe=(De,Oe,Ne)=>{const tt=new NI(De,Oe,r);fe.push(tt),tt.on("init",()=>{++ae===ve.length&&N(fe)}),tt.targetElm=tt.targetElm||Ne,tt.render()};gS.unbind(window,"ready",j),E("onpageload"),ve=er(R(s)),Gt.each(ve,De=>{wpe(r.get(De.id))}),ve=Gt.grep(ve,De=>!r.get(De.id)),ve.length===0?N([]):K7(ve,De=>{g(s,De)?tT("Could not initialize inline editor on invalid inline target element",De):xe(_(De),s,De)})};return gS.bind(window,"ready",j),new Promise(ae=>{c?ae(c):N=fe=>{ae(fe)}})},get(s){return arguments.length===0?Hd.slice(0):z(s)?pt(Hd,r=>r.id===s).getOr(null):Be(s)&&Hd[s]?Hd[s]:null},add(s){const r=this,c=r.get(s.id);return c===s||(c===null&&Hd.push(s),mX(!0),r.activeEditor=s,r.dispatch("AddEditor",{editor:s}),FI||(FI=p=>{const g=r.dispatch("BeforeUnload");if(g.returnValue)return p.preventDefault(),p.returnValue=g.returnValue,g.returnValue},window.addEventListener("beforeunload",FI))),s},createEditor(s,r){return this.add(new NI(s,r,this))},remove(s){const r=this;let c;if(!s){for(let p=Hd.length-1;p>=0;p--)r.remove(Hd[p]);return}if(z(s)){K7(gS.select(s),p=>{c=r.get(p.id),c&&r.remove(c)});return}return c=s,J(r.get(c.id))?null:(hX(c)&&r.dispatch("RemoveEditor",{editor:c}),Hd.length===0&&window.removeEventListener("beforeunload",FI),c.remove(),mX(Hd.length>0),c)},execCommand(s,r,c){var p;const g=this,_=q(c)?(p=c.id)!==null&&p!==void 0?p:c.index:c;switch(s){case"mceAddEditor":{if(!g.get(_)){const E=c.options;new NI(_,E,g).render()}return!0}case"mceRemoveEditor":{const E=g.get(_);return E&&E.remove(),!0}case"mceToggleEditor":{const E=g.get(_);return E?(E.isHidden()?E.show():E.hide(),!0):(g.execCommand("mceAddEditor",!1,c),!0)}}return g.activeEditor?g.activeEditor.execCommand(s,r,c):!1},triggerSave:()=>{K7(Hd,s=>{s.save()})},addI18n:(s,r)=>{Hu.add(s,r)},translate:s=>Hu.translate(s),setActive(s){const r=this.activeEditor;this.activeEditor!==s&&(r&&r.dispatch("deactivate",{relatedTarget:s}),s.dispatch("activate",{relatedTarget:r})),this.activeEditor=s},_setBaseUrl(s){this.baseURL=new mm(this.documentBaseURL).toAbsolute(s.replace(/\/+$/,"")),this.baseURI=new mm(this.baseURL)}};bv.setup();const kpe=(()=>{const s=la(),r=_=>({items:_,types:Zs(_),getType:E=>Vn(_,E).getOrUndefined()}),c=_=>{s.set(_)},p=()=>s.get().getOrUndefined(),g=s.clear;return{FakeClipboardItem:r,write:c,read:p,clear:g}})(),gX=Math.min,vS=Math.max,BI=Math.round,vX=(s,r,c)=>{let p=r.x,g=r.y;const _=s.w,E=s.h,R=r.w,N=r.h,j=(c||"").split("");return j[0]==="b"&&(g+=N),j[1]==="r"&&(p+=R),j[0]==="c"&&(g+=BI(N/2)),j[1]==="c"&&(p+=BI(R/2)),j[3]==="b"&&(g-=E),j[4]==="r"&&(p-=_),j[3]==="c"&&(g-=BI(E/2)),j[4]==="c"&&(p-=BI(_/2)),D3(p,g,_,E)},xpe=(s,r,c,p)=>{for(let g=0;g<p.length;g++){const _=vX(s,r,p[g]);if(_.x>=c.x&&_.x+_.w<=c.w+c.x&&_.y>=c.y&&_.y+_.h<=c.h+c.y)return p[g]}return null},Tpe=(s,r,c)=>D3(s.x-r,s.y-c,s.w+r*2,s.h+c*2),bX=(s,r)=>{const c=vS(s.x,r.x),p=vS(s.y,r.y),g=gX(s.x+s.w,r.x+r.w),_=gX(s.y+s.h,r.y+r.h);return g-c<0||_-p<0?null:D3(c,p,g-c,_-p)},k6e=(s,r,c)=>{let p=s.x,g=s.y,_=s.x+s.w,E=s.y+s.h;const R=r.x+r.w,N=r.y+r.h,j=vS(0,r.x-p),ae=vS(0,r.y-g),fe=vS(0,_-R),ve=vS(0,E-N);return p+=j,g+=ae,c&&(_+=j,E+=ae,p-=fe,g-=ve),_-=fe,E-=ve,D3(p,g,_-p,E-g)},D3=(s,r,c,p)=>({x:s,y:r,w:c,h:p}),yX={inflate:Tpe,relativePosition:vX,findBestRelativePosition:xpe,intersect:bX,clamp:k6e,create:D3,fromClientRect:s=>D3(s.left,s.top,s.width,s.height)},Ipe=(s,r,c=1e3)=>{let p=!1,g=null;const _=j=>(...ae)=>{p||(p=!0,g!==null&&(clearTimeout(g),g=null),j.apply(null,ae))},E=_(s),R=_(r);return{start:(...j)=>{!p&&g===null&&(g=setTimeout(()=>R.apply(null,j),c))},resolve:E,reject:R}},Ape=(()=>{const s={},r={},c={};return{load:(N,j)=>{const ae='Script at URL "'.concat(j,'" failed to load'),fe='Script at URL "'.concat(j,"\" did not call `tinymce.Resource.add('").concat(N,"', data)` within 1 second");if(s[N]!==void 0)return s[N];{const ve=new Promise((xe,De)=>{const Oe=Ipe(xe,De);r[N]=Oe.resolve,pd.ScriptLoader.loadScript(j).then(()=>Oe.start(fe),()=>Oe.reject(ae))});return s[N]=ve,ve}},add:(N,j)=>{r[N]!==void 0&&(r[N](j),delete r[N]),s[N]=Promise.resolve(j),c[N]=j},has:N=>N in c,get:N=>c[N],unload:N=>{delete s[N],delete c[N]}}})(),Ope=()=>(()=>{let s={},r=[];const c={getItem:p=>{const g=s[p];return g||null},setItem:(p,g)=>{r.push(p),s[p]=String(g)},key:p=>r[p],removeItem:p=>{r=r.filter(g=>g===p),delete s[p]},clear:()=>{r=[],s={}},length:0};return Object.defineProperty(c,"length",{get:()=>r.length,configurable:!1,enumerable:!1}),c})();let Y7;try{const s="__storage_test__";Y7=window.localStorage,Y7.setItem(s,s),Y7.removeItem(s)}catch{Y7=Ope()}var Rpe=Y7;const d$={geom:{Rect:yX},util:{Delay:Xn,Tools:Gt,VK:qt,URI:mm,EventDispatcher:i$,Observable:a$,I18n:Hu,LocalStorage:Rpe,ImageUploader:TM},dom:{EventUtils:i1,TreeWalker:Gl,TextSeeker:mg,DOMUtils:vi,ScriptLoader:pd,RangeUtils:B2,Serializer:da,StyleSheetLoader:e1,ControlSelection:Rg,BookmarkManager:am,Selection:Qj,Event:i1.Event},html:{Styles:$r,Entities:eh,Node:gd,Schema:o1,DomParser:P_,Writer:yz,Serializer:V2},Env:ns,AddOnManager:vc,Annotator:Yr,Formatter:xZ,UndoManager:IZ,EditorCommands:oX,WindowManager:cZ,NotificationManager:aZ,EditorObservable:iX,Shortcuts:dX,Editor:NI,FocusManager:u8,EditorManager:bv,DOM:vi.DOM,ScriptLoader:pd.ScriptLoader,PluginManager:Lg,ThemeManager:Q2,ModelManager:$_,IconManager:Jx,Resource:Ape,FakeClipboard:kpe,trim:Gt.trim,isArray:Gt.isArray,is:Gt.is,toArray:Gt.toArray,makeMap:Gt.makeMap,each:Gt.each,map:Gt.map,grep:Gt.grep,inArray:Gt.inArray,extend:Gt.extend,walk:Gt.walk,resolve:Gt.resolve,explode:Gt.explode,_addCacheSuffix:Gt._addCacheSuffix},VI=Gt.extend(bv,d$),Dpe=s=>{try{e.exports=s}catch{}};(s=>{window.tinymce=s,window.tinyMCE=s})(VI),Dpe(VI)})()}(Ote)),Ote.exports}tZe();var P3e={},M3e={},N3e;function nZe(){return N3e||(N3e=1,tinymce.IconManager.add("default",{icons:{"accessibility-check":'<svg width="24" height="24"><path d="M12 2a2 2 0 0 1 2 2 2 2 0 0 1-2 2 2 2 0 0 1-2-2c0-1.1.9-2 2-2Zm8 7h-5v12c0 .6-.4 1-1 1a1 1 0 0 1-1-1v-5c0-.6-.4-1-1-1a1 1 0 0 0-1 1v5c0 .6-.4 1-1 1a1 1 0 0 1-1-1V9H4a1 1 0 1 1 0-2h16c.6 0 1 .4 1 1s-.4 1-1 1Z" fill-rule="nonzero"/></svg>',"accordion-toggle":'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 15c0-.6.4-1 1-1h6c.6 0 1 .4 1 1s-.4 1-1 1h-6a1 1 0 0 1-1-1Z"/><path opacity=".2" fill-rule="evenodd" clip-rule="evenodd" d="M4 15c0-.6.4-1 1-1h6c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1-1-1Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M12 19c0-.6.4-1 1-1h6c.6 0 1 .4 1 1s-.4 1-1 1h-6a1 1 0 0 1-1-1Z"/><path opacity=".2" fill-rule="evenodd" clip-rule="evenodd" d="M4 19c0-.6.4-1 1-1h6c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1-1-1Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M12.3 7.3a1 1 0 0 1 1.4 0L16 9.6l2.3-2.3a1 1 0 1 1 1.4 1.4L16 12.4l-3.7-3.7a1 1 0 0 1 0-1.4ZM4.3 11.7a1 1 0 0 1 0-1.4L6.6 8 4.3 5.7a1 1 0 0 1 1.4-1.4L9.4 8l-3.7 3.7a1 1 0 0 1-1.4 0Z"/></svg>',accordion:'<svg width="24" height="24"><rect x="12" y="7" width="10" height="2" rx="1"/><rect x="12" y="11" width="10" height="2" rx="1"/><rect x="12" y="15" width="6" height="2" rx="1"/><path fill-rule="evenodd" clip-rule="evenodd" d="M2.3 7.3a1 1 0 0 1 1.4 0L6 9.6l2.3-2.3a1 1 0 0 1 1.4 1.4L6 12.4 2.3 8.7a1 1 0 0 1 0-1.4Z"/></svg>',"action-next":'<svg width="24" height="24"><path fill-rule="nonzero" d="M5.7 7.3a1 1 0 0 0-1.4 1.4l7.7 7.7 7.7-7.7a1 1 0 1 0-1.4-1.4L12 13.6 5.7 7.3Z"/></svg>',"action-prev":'<svg width="24" height="24"><path fill-rule="nonzero" d="M18.3 15.7a1 1 0 0 0 1.4-1.4L12 6.6l-7.7 7.7a1 1 0 0 0 1.4 1.4L12 9.4l6.3 6.3Z"/></svg>',addtag:'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M15 5a2 2 0 0 1 1.6.8L21 12l-4.4 6.2a2 2 0 0 1-1.6.8h-3v-2h3l3.5-5L15 7H5v3H3V7c0-1.1.9-2 2-2h10Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M6 12a1 1 0 0 0-1 1v2H3a1 1 0 1 0 0 2h2v2a1 1 0 1 0 2 0v-2h2a1 1 0 1 0 0-2H7v-2c0-.6-.4-1-1-1Z"/></svg>',"ai-prompt":'<svg width="24" height="24"><g clip-path="url(#a)"><path fill-rule="evenodd" clip-rule="evenodd" d="M15 6.7a1 1 0 0 0-1.4 0l-9.9 10a1 1 0 0 0 0 1.3l2.1 2.1c.4.4 1 .4 1.4 0l10-9.9c.3-.3.3-1 0-1.4l-2.2-2Zm1.4 2.8-2-2-3 2.7 2.2 2.2 2.8-2.9Z"/><path d="m18.5 7.3-.7-1.5-1.5-.8 1.5-.7.7-1.5.7 1.5 1.5.7-1.5.8-.7 1.5ZM18.5 16.5l-.7-1.6-1.5-.7 1.5-.7.7-1.6.7 1.6 1.5.7-1.5.7-.7 1.6ZM9.7 7.3 9 5.8 7.5 5 9 4.3l.7-1.5.7 1.5L12 5l-1.5.8-.7 1.5Z"/></g><defs><clipPath id="a"><path d="M0 0h24v24H0z"/></clipPath></defs></svg>',ai:'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M5 3a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3V6a3 3 0 0 0-3-3H5Zm6.8 11.5.5 1.2a68.3 68.3 0 0 0 .7 1.1l.4.1c.3 0 .5 0 .7-.3.2-.1.3-.3.3-.6l-.3-1-2.6-6.2a20.4 20.4 0 0 0-.5-1.3l-.5-.4-.7-.2c-.2 0-.5 0-.6.2-.2 0-.4.2-.5.4l-.3.6-.3.7L5.7 15l-.2.6-.1.4c0 .3 0 .5.3.7l.6.2c.3 0 .5 0 .7-.2l.4-1 .5-1.2h3.9ZM9.8 9l1.5 4h-3l1.5-4Zm5.6-.9v7.6c0 .4 0 .7.2 1l.7.2c.3 0 .6 0 .8-.3l.2-.9V8.1c0-.4 0-.7-.2-.9a1 1 0 0 0-.8-.3c-.2 0-.5.1-.7.3l-.2 1Z"/></svg>',"align-center":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm3 4h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 1 1 0-2Zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2Zm-3-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Z" fill-rule="evenodd"/></svg>',"align-justify":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Z" fill-rule="evenodd"/></svg>',"align-left":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm0 4h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Zm0-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Z" fill-rule="evenodd"/></svg>',"align-none":'<svg width="24" height="24"><path d="M14.2 5 13 7H5a1 1 0 1 1 0-2h9.2Zm4 0h.8a1 1 0 0 1 0 2h-2l1.2-2Zm-6.4 4-1.2 2H5a1 1 0 0 1 0-2h6.8Zm4 0H19a1 1 0 0 1 0 2h-4.4l1.2-2Zm-6.4 4-1.2 2H5a1 1 0 0 1 0-2h4.4Zm4 0H19a1 1 0 0 1 0 2h-6.8l1.2-2ZM7 17l-1.2 2H5a1 1 0 0 1 0-2h2Zm4 0h8a1 1 0 0 1 0 2H9.8l1.2-2Zm5.2-13.5 1.3.7-9.7 16.3-1.3-.7 9.7-16.3Z" fill-rule="evenodd"/></svg>',"align-right":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm6 4h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm-6-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Z" fill-rule="evenodd"/></svg>',"arrow-left":'<svg width="24" height="24"><path d="m5.6 13 12 6a1 1 0 0 0 1.4-1V6a1 1 0 0 0-1.4-.9l-12 6a1 1 0 0 0 0 1.8Z" fill-rule="evenodd"/></svg>',"arrow-right":'<svg width="24" height="24"><path d="m18.5 13-12 6A1 1 0 0 1 5 18V6a1 1 0 0 1 1.4-.9l12 6a1 1 0 0 1 0 1.8Z" fill-rule="evenodd"/></svg>',bold:'<svg width="24" height="24"><path d="M7.8 19c-.3 0-.5 0-.6-.2l-.2-.5V5.7c0-.2 0-.4.2-.5l.6-.2h5c1.5 0 2.7.3 3.5 1 .7.6 1.1 1.4 1.1 2.5a3 3 0 0 1-.6 1.9c-.4.6-1 1-1.6 1.2.4.1.9.3 1.3.6s.8.7 1 1.2c.4.4.5 1 .5 1.6 0 1.3-.4 2.3-1.3 3-.8.7-2.1 1-3.8 1H7.8Zm5-8.3c.6 0 1.2-.1 1.6-.5.4-.3.6-.7.6-1.3 0-1.1-.8-1.7-2.3-1.7H9.3v3.5h3.4Zm.5 6c.7 0 1.3-.1 1.7-.4.4-.4.6-.9.6-1.5s-.2-1-.7-1.4c-.4-.3-1-.4-2-.4H9.4v3.8h4Z" fill-rule="evenodd"/></svg>',bookmark:'<svg width="24" height="24"><path d="M6 4v17l6-4 6 4V4c0-.6-.4-1-1-1H7a1 1 0 0 0-1 1Z" fill-rule="nonzero"/></svg>',"border-style":'<svg width="24" height="24"><g fill-rule="evenodd"><rect width="18" height="2" x="3" y="6" rx="1"/><rect width="2.8" height="2" x="3" y="16" rx="1"/><rect width="2.8" height="2" x="6.8" y="16" rx="1"/><rect width="2.8" height="2" x="10.6" y="16" rx="1"/><rect width="2.8" height="2" x="14.4" y="16" rx="1"/><rect width="2.8" height="2" x="18.2" y="16" rx="1"/><rect width="8" height="2" x="3" y="11" rx="1"/><rect width="8" height="2" x="13" y="11" rx="1"/></g></svg>',"border-width":'<svg width="24" height="24"><g fill-rule="evenodd"><rect width="18" height="5" x="3" y="5" rx="1"/><rect width="18" height="3.5" x="3" y="11.5" rx="1"/><rect width="18" height="2" x="3" y="17" rx="1"/></g></svg>',brightness:'<svg width="24" height="24"><path d="M12 17c.3 0 .5.1.7.3.2.2.3.4.3.7v1c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3 1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7v-1c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3Zm0-10a1 1 0 0 1-.7-.3A1 1 0 0 1 11 6V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3.3 0 .5.1.7.3.2.2.3.4.3.7v1c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3Zm7 4c.3 0 .5.1.7.3.2.2.3.4.3.7 0 .3-.1.5-.3.7a1 1 0 0 1-.7.3h-1a1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h1ZM7 12c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3H5a1 1 0 0 1-.7-.3A1 1 0 0 1 4 12c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h1c.3 0 .5.1.7.3.2.2.3.4.3.7Zm10 3.5.7.8c.2.1.3.4.3.6 0 .3-.1.6-.3.8a1 1 0 0 1-.8.3 1 1 0 0 1-.6-.3l-.8-.7a1 1 0 0 1-.3-.8c0-.2.1-.5.3-.7a1 1 0 0 1 1.4 0Zm-10-7-.7-.8a1 1 0 0 1-.3-.6c0-.3.1-.6.3-.8.2-.2.5-.3.8-.3.2 0 .5.1.7.3l.7.7c.2.2.3.5.3.8 0 .2-.1.5-.3.7a1 1 0 0 1-.7.3 1 1 0 0 1-.8-.3Zm10 0a1 1 0 0 1-.8.3 1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7c0-.3.1-.6.3-.8l.8-.7c.1-.2.4-.3.6-.3.3 0 .6.1.8.3.2.2.3.5.3.8 0 .2-.1.5-.3.7l-.7.7Zm-10 7c.2-.2.5-.3.8-.3.2 0 .5.1.7.3a1 1 0 0 1 0 1.4l-.8.8a1 1 0 0 1-.6.3 1 1 0 0 1-.8-.3 1 1 0 0 1-.3-.8c0-.2.1-.5.3-.6l.7-.8ZM12 8a4 4 0 0 1 3.7 2.4 4 4 0 0 1 0 3.2A4 4 0 0 1 12 16a4 4 0 0 1-3.7-2.4 4 4 0 0 1 0-3.2A4 4 0 0 1 12 8Zm0 6.5c.7 0 1.3-.2 1.8-.7.5-.5.7-1.1.7-1.8s-.2-1.3-.7-1.8c-.5-.5-1.1-.7-1.8-.7s-1.3.2-1.8.7c-.5.5-.7 1.1-.7 1.8s.2 1.3.7 1.8c.5.5 1.1.7 1.8.7Z" fill-rule="evenodd"/></svg>',browse:'<svg width="24" height="24"><path d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-4v-2h4V8H5v10h4v2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm-8 9.4-2.3 2.3a1 1 0 1 1-1.4-1.4l4-4a1 1 0 0 1 1.4 0l4 4a1 1 0 0 1-1.4 1.4L13 13.4V20a1 1 0 0 1-2 0v-6.6Z" fill-rule="nonzero"/></svg>',cancel:'<svg width="24" height="24"><path d="M12 4.6a7.4 7.4 0 1 1 0 14.8 7.4 7.4 0 0 1 0-14.8ZM12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18Zm0 8L14.8 8l1 1.1-2.7 2.8 2.7 2.7-1.1 1.1-2.7-2.7-2.7 2.7-1-1.1 2.6-2.7-2.7-2.7 1-1.1 2.8 2.7Z" fill-rule="nonzero"/></svg>',"cell-background-color":'<svg width="24" height="24"><path d="m15.7 2 1.6 1.6-2.7 2.6 5.9 5.8c.7.7.7 1.7 0 2.4l-6.3 6.1a1.7 1.7 0 0 1-2.4 0l-6.3-6.1c-.7-.7-.7-1.7 0-2.4L15.7 2ZM18 12l-4.5-4L9 12h9ZM4 16s2 2.4 2 3.8C6 21 5.1 22 4 22s-2-1-2-2.2C2 18.4 4 16 4 16Z"/></svg>',"cell-border-color":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M5 13v5h2v2H5a2 2 0 0 1-2-2v-5h2zm8-7V4h6a2 2 0 0 1 2 2h-8z" opacity=".2"/><path fill-rule="nonzero" d="M13 4v2H5v7H3V6c0-1.1.9-2 2-2h8zm-2.6 14.1.1-.1.1.1.2.3.2.2.2.2c.4.6.8 1.2.8 1.7 0 .8-.7 1.5-1.5 1.5S9 21.3 9 20.5c0-.5.4-1.1.8-1.7l.2-.2.2-.2.2-.3z"/><path d="m13 11-2 2H5v-2h6V6h2z"/><path fill-rule="nonzero" d="m18.4 8 1 1-1.8 1.9 4 4c.5.4.5 1.1 0 1.6l-4.3 4.2a1.2 1.2 0 0 1-1.6 0l-4.4-4.2c-.4-.5-.4-1.2 0-1.7l7-6.8Zm1.6 7-3-3-3 3h6Z"/></g></svg>',"change-case":'<svg width="24" height="24"><path d="M18.4 18.2v-.6c-.5.8-1.3 1.2-2.4 1.2-2.2 0-3.3-1.6-3.3-4.8 0-3.1 1-4.7 3.3-4.7 1.1 0 1.8.3 2.4 1.1v-.6c0-.5.4-.8.8-.8s.8.3.8.8v8.4c0 .5-.4.8-.8.8a.8.8 0 0 1-.8-.8zm-2-7.4c-1.3 0-1.8.9-1.8 3.2 0 2.4.5 3.3 1.7 3.3 1.3 0 1.8-.9 1.8-3.2 0-2.4-.5-3.3-1.7-3.3zM10 15.7H5.5l-.8 2.6a1 1 0 0 1-1 .7h-.2a.7.7 0 0 1-.7-1l4-12a1 1 0 0 1 2 0l4 12a.7.7 0 0 1-.8 1h-.2a1 1 0 0 1-1-.7l-.8-2.6zm-.3-1.5-2-6.5-1.9 6.5h3.9z" fill-rule="evenodd"/></svg>',"character-count":'<svg width="24" height="24"><path d="M4 11.5h16v1H4v-1Zm4.8-6.8V10H7.7V5.8h-1v-1h2ZM11 8.3V9h2v1h-3V7.7l2-1v-.9h-2v-1h3v2.4l-2 1Zm6.3-3.4V10h-3.1V9h2.1V8h-2.1V6.8h2.1v-1h-2.1v-1h3.1ZM5.8 16.4c0-.5.2-.8.5-1 .2-.2.6-.3 1.2-.3l.8.1c.2 0 .4.2.5.3l.4.4v2.8l.2.3H8.2V18.7l-.6.3H7c-.4 0-.7 0-1-.2a1 1 0 0 1-.3-.9c0-.3 0-.6.3-.8.3-.2.7-.4 1.2-.4l.6-.2h.3v-.2l-.1-.2a.8.8 0 0 0-.5-.1 1 1 0 0 0-.4 0l-.3.4h-1Zm2.3.8h-.2l-.2.1-.4.1a1 1 0 0 0-.4.2l-.2.2.1.3.5.1h.4l.4-.4v-.6Zm2-3.4h1.2v1.7l.5-.3h.5c.5 0 .9.1 1.2.5.3.4.5.8.5 1.4 0 .6-.2 1.1-.5 1.5-.3.4-.7.6-1.3.6l-.6-.1-.4-.4v.4h-1.1v-5.4Zm1.1 3.3c0 .3 0 .6.2.8a.7.7 0 0 0 1.2 0l.2-.8c0-.4 0-.6-.2-.8a.7.7 0 0 0-.6-.3l-.6.3-.2.8Zm6.1-.5c0-.2 0-.3-.2-.4a.8.8 0 0 0-.5-.2c-.3 0-.5.1-.6.3l-.2.9c0 .3 0 .6.2.8.1.2.3.3.6.3.2 0 .4 0 .5-.2l.2-.4h1.1c0 .5-.3.8-.6 1.1a2 2 0 0 1-1.3.4c-.5 0-1-.2-1.3-.6a2 2 0 0 1-.5-1.4c0-.6.1-1.1.5-1.5.3-.4.8-.5 1.4-.5.5 0 1 0 1.2.3.4.3.5.7.5 1.2h-1v-.1Z" fill-rule="evenodd"/></svg>',"checklist-rtl":'<svg width="24" height="24"><path d="M5 17h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2zm14.2 11c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 20c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 14c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 8c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8z" fill-rule="evenodd"/></svg>',checklist:'<svg width="24" height="24"><path d="M11 17h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm0-6h8a1 1 0 0 1 0 2h-8a1 1 0 0 1 0-2ZM7.2 16c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 20c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8Zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 14c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8Zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 8c-.2.3-.7.4-1 0L3.8 6.9a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8Z" fill-rule="evenodd"/></svg>',checkmark:'<svg width="24" height="24"><path d="M18.2 5.4a1 1 0 0 1 1.6 1.2l-8 12a1 1 0 0 1-1.5.1l-5-5a1 1 0 1 1 1.4-1.4l4.1 4.1 7.4-11Z" fill-rule="nonzero"/></svg>',"chevron-down":'<svg width="10" height="10"><path d="M8.7 2.2c.3-.3.8-.3 1 0 .4.4.4.9 0 1.2L5.7 7.8c-.3.3-.9.3-1.2 0L.2 3.4a.8.8 0 0 1 0-1.2c.3-.3.8-.3 1.1 0L5 6l3.7-3.8Z" fill-rule="nonzero"/></svg>',"chevron-left":'<svg width="10" height="10"><path d="M7.8 1.3 4 5l3.8 3.7c.3.3.3.8 0 1-.4.4-.9.4-1.2 0L2.2 5.7a.8.8 0 0 1 0-1.2L6.6.2C7 0 7.4 0 7.8.2c.3.3.3.8 0 1.1Z" fill-rule="nonzero"/></svg>',"chevron-right":'<svg width="10" height="10"><path d="M2.2 1.3a.8.8 0 0 1 0-1c.4-.4.9-.4 1.2 0l4.4 4.1c.3.4.3.9 0 1.2L3.4 9.8c-.3.3-.8.3-1.2 0a.8.8 0 0 1 0-1.1L6 5 2.2 1.3Z" fill-rule="nonzero"/></svg>',"chevron-up":'<svg width="10" height="10"><path d="M8.7 7.8 5 4 1.3 7.8c-.3.3-.8.3-1 0a.8.8 0 0 1 0-1.2l4.1-4.4c.3-.3.9-.3 1.2 0l4.2 4.4c.3.3.3.9 0 1.2-.3.3-.8.3-1.1 0Z" fill-rule="nonzero"/></svg>',close:'<svg width="24" height="24"><path d="M17.3 8.2 13.4 12l3.9 3.8a1 1 0 0 1-1.5 1.5L12 13.4l-3.8 3.9a1 1 0 0 1-1.5-1.5l3.9-3.8-3.9-3.8a1 1 0 0 1 1.5-1.5l3.8 3.9 3.8-3.9a1 1 0 0 1 1.5 1.5Z" fill-rule="evenodd"/></svg>',"code-sample":'<svg width="24" height="26"><path d="M7.1 11a2.8 2.8 0 0 1-.8 2 2.8 2.8 0 0 1 .8 2v1.7c0 .3.1.6.4.8.2.3.5.4.8.4.3 0 .4.2.4.4v.8c0 .2-.1.4-.4.4-.7 0-1.4-.3-2-.8-.5-.6-.8-1.3-.8-2V15c0-.3-.1-.6-.4-.8-.2-.3-.5-.4-.8-.4a.4.4 0 0 1-.4-.4v-.8c0-.2.2-.4.4-.4.3 0 .6-.1.8-.4.3-.2.4-.5.4-.8V9.3c0-.7.3-1.4.8-2 .6-.5 1.3-.8 2-.8.3 0 .4.2.4.4v.8c0 .2-.1.4-.4.4-.3 0-.6.1-.8.4-.3.2-.4.5-.4.8V11Zm9.8 0V9.3c0-.3-.1-.6-.4-.8-.2-.3-.5-.4-.8-.4a.4.4 0 0 1-.4-.4V7c0-.2.1-.4.4-.4.7 0 1.4.3 2 .8.5.6.8 1.3.8 2V11c0 .3.1.6.4.8.2.3.5.4.8.4.2 0 .4.2.4.4v.8c0 .2-.2.4-.4.4-.3 0-.6.1-.8.4-.3.2-.4.5-.4.8v1.7c0 .7-.3 1.4-.8 2-.6.5-1.3.8-2 .8a.4.4 0 0 1-.4-.4v-.8c0-.2.1-.4.4-.4.3 0 .6-.1.8-.4.3-.2.4-.5.4-.8V15a2.8 2.8 0 0 1 .8-2 2.8 2.8 0 0 1-.8-2Zm-3.3-.4c0 .4-.1.8-.5 1.1-.3.3-.7.5-1.1.5-.4 0-.8-.2-1.1-.5-.4-.3-.5-.7-.5-1.1 0-.5.1-.9.5-1.2.3-.3.7-.4 1.1-.4.4 0 .8.1 1.1.4.4.3.5.7.5 1.2ZM12 13c.4 0 .8.1 1.1.5.4.3.5.7.5 1.1 0 1-.1 1.6-.5 2a3 3 0 0 1-1.1 1c-.4.3-.8.4-1.1.4a.5.5 0 0 1-.5-.5V17a3 3 0 0 0 1-.2l.6-.6c-.6 0-1-.2-1.3-.5-.2-.3-.3-.7-.3-1 0-.5.1-1 .5-1.2.3-.4.7-.5 1.1-.5Z" fill-rule="evenodd"/></svg>',"color-levels":'<svg width="24" height="24"><path d="M17.5 11.4A9 9 0 0 1 18 14c0 .5 0 1-.2 1.4 0 .4-.3.9-.5 1.3a6.2 6.2 0 0 1-3.7 3 5.7 5.7 0 0 1-3.2 0A5.9 5.9 0 0 1 7.6 18a6.2 6.2 0 0 1-1.4-2.6 6.7 6.7 0 0 1 0-2.8c0-.4.1-.9.3-1.3a13.6 13.6 0 0 1 2.3-4A20 20 0 0 1 12 4a26.4 26.4 0 0 1 3.2 3.4 18.2 18.2 0 0 1 2.3 4Zm-2 4.5c.4-.7.5-1.4.5-2a7.3 7.3 0 0 0-1-3.2c.2.6.2 1.2.2 1.9a4.5 4.5 0 0 1-1.3 3 5.3 5.3 0 0 1-2.3 1.5 4.9 4.9 0 0 1-2 .1 4.3 4.3 0 0 0 2.4.8 4 4 0 0 0 2-.6 4 4 0 0 0 1.5-1.5Z" fill-rule="evenodd"/></svg>',"color-picker":'<svg width="24" height="24"><path d="M12 3a9 9 0 0 0 0 18 1.5 1.5 0 0 0 1.1-2.5c-.2-.3-.4-.6-.4-1 0-.8.7-1.5 1.5-1.5H16a5 5 0 0 0 5-5c0-4.4-4-8-9-8Zm-5.5 9a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3Zm3-4a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3Zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3Zm3 4a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3Z" fill-rule="nonzero"/></svg>',"color-swatch-remove-color":'<svg width="24" height="24"><path stroke="#000" stroke-width="2" d="M21 3 3 21" fill-rule="evenodd"/></svg>',"color-swatch":'<svg width="24" height="24"><rect x="3" y="3" width="18" height="18" rx="1" fill-rule="evenodd"/></svg>',"comment-add":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="m9 19 3-2h7c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H5a1 1 0 0 0-1 1v10c0 .6.4 1 1 1h4v2Zm-2 4v-4H5a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h14a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3h-6.4L7 23Z"/><path d="M13 10h2a1 1 0 0 1 0 2h-2v2a1 1 0 0 1-2 0v-2H9a1 1 0 0 1 0-2h2V8a1 1 0 0 1 2 0v2Z"/></g></svg>',comment:'<svg width="24" height="24"><path fill-rule="nonzero" d="m9 19 3-2h7c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H5a1 1 0 0 0-1 1v10c0 .6.4 1 1 1h4v2Zm-2 4v-4H5a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h14a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3h-6.4L7 23Z"/></svg>',contrast:'<svg width="24" height="24"><path d="M12 4a7.8 7.8 0 0 1 5.7 2.3A8 8 0 1 1 12 4Zm-6 8a6 6 0 0 0 6 6V6a6 6 0 0 0-6 6Z" fill-rule="evenodd"/></svg>',copy:'<svg width="24" height="24"><path d="M16 3H6a2 2 0 0 0-2 2v11h2V5h10V3Zm1 4a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V9c0-1.2.9-2 2-2h7Zm0 12V9h-7v10h7Z" fill-rule="nonzero"/></svg>',crop:'<svg width="24" height="24"><path d="M17 8v7h2c.6 0 1 .4 1 1s-.4 1-1 1h-2v2c0 .6-.4 1-1 1a1 1 0 0 1-1-1v-2H7V9H5a1 1 0 1 1 0-2h2V5c0-.6.4-1 1-1s1 .4 1 1v2h7l3-3 1 1-3 3ZM9 9v5l5-5H9Zm1 6h5v-5l-5 5Z" fill-rule="evenodd"/></svg>',"cut-column":'<svg width="24" height="24"><path fill-rule="evenodd" d="M7.2 4.5c.9 0 1.6.4 2.2 1A3.7 3.7 0 0 1 10.5 8v.5l1 1 4-4 1-.5a3.3 3.3 0 0 1 2 0c.4 0 .7.3 1 .5L17 8h4v13h-6V10l-1.5 1.5.5.5v4l-2.5-2.5-1 1v.5c0 .4 0 .8-.3 1.2-.2.5-.4.9-.8 1.2-.6.7-1.3 1-2.2 1-.8.2-1.5 0-2-.6l-.5-.8-.2-1c0-.4 0-.8.3-1.2A3.9 3.9 0 0 1 7 12.7c.5-.2 1-.3 1.5-.2l1-1-1-1c-.5 0-1 0-1.5-.2-.5-.1-1-.4-1.4-.9-.4-.3-.6-.7-.8-1.2L4.5 7c0-.4 0-.7.2-1 0-.3.3-.6.5-.8.5-.5 1.2-.8 2-.7Zm12.3 5h-3v10h3v-10ZM8 13.8h-.3l-.4.2a2.8 2.8 0 0 0-.7.4v.1a2.8 2.8 0 0 0-.6.8l-.1.4v.7l.2.5.5.2h.7a2.6 2.6 0 0 0 .8-.3 2.4 2.4 0 0 0 .7-.7 2.5 2.5 0 0 0 .3-.8 1.5 1.5 0 0 0 0-.8 1 1 0 0 0-.2-.4 1 1 0 0 0-.5-.2H8Zm3.5-3.7c-.4 0-.7.1-1 .4-.3.3-.4.6-.4 1s.1.7.4 1c.3.3.6.4 1 .4s.7-.1 1-.4c.3-.3.4-.6.4-1s-.1-.7-.4-1c-.3-.3-.6-.4-1-.4ZM7 5.8h-.4a1 1 0 0 0-.5.3 1 1 0 0 0-.2.5v.7a2.5 2.5 0 0 0 .3.8l.2.3h.1l.4.4.4.2.4.1h.7L9 9l.2-.4a1.6 1.6 0 0 0 0-.8 2.6 2.6 0 0 0-.3-.8A2.5 2.5 0 0 0 7.7 6l-.4-.1H7Z"/></svg>',"cut-row":'<svg width="24" height="24"><path fill-rule="evenodd" d="M22 3v5H9l3 3 2-2h4l-4 4 1 1h.5c.4 0 .8 0 1.2.3.5.2.9.4 1.2.8.7.6 1 1.3 1 2.2.2.8 0 1.5-.6 2l-.8.5-1 .2c-.4 0-.8 0-1.2-.3a3.9 3.9 0 0 1-2.1-2.2c-.2-.5-.3-1-.2-1.5l-1-1-1 1c0 .5 0 1-.2 1.5-.1.5-.4 1-.9 1.4-.3.4-.7.6-1.2.8l-1.2.3c-.4 0-.7 0-1-.2-.3 0-.6-.3-.8-.5-.5-.5-.8-1.2-.7-2 0-.9.4-1.6 1-2.2A3.7 3.7 0 0 1 8.6 14H9l1-1-4-4-.5-1a3.3 3.3 0 0 1 0-2c0-.4.3-.7.5-1l2 2V3h14ZM8.5 15.3h-.3a2.6 2.6 0 0 0-.8.4 2.5 2.5 0 0 0-.9 1.1l-.1.4v.7l.2.5.5.2h.7a2.5 2.5 0 0 0 .8-.3L9 18V18l.4-.4.2-.4.1-.4v-.7a1 1 0 0 0-.2-.5 1 1 0 0 0-.4-.2h-.5Zm7 0H15a1 1 0 0 0-.4.3 1 1 0 0 0-.2.5 1.5 1.5 0 0 0 0 .7v.4a2.8 2.8 0 0 0 .5.7h.1a2.8 2.8 0 0 0 .8.6l.4.1h.7l.5-.2.2-.5v-.7a2.6 2.6 0 0 0-.3-.8 2.4 2.4 0 0 0-.7-.7 2.5 2.5 0 0 0-.8-.3h-.3ZM12 11.6c-.4 0-.7.1-1 .4-.3.3-.4.6-.4 1s.1.7.4 1c.3.3.6.4 1 .4s.7-.1 1-.4c.3-.3.4-.6.4-1s-.1-.7-.4-1c-.3-.3-.6-.4-1-.4Zm8.5-7.1h-11v2h11v-2Z"/></svg>',cut:'<svg width="24" height="24"><path d="M18 15c.6.7 1 1.4 1 2.3 0 .8-.2 1.5-.7 2l-.8.5-1 .2c-.4 0-.8 0-1.2-.3a3.9 3.9 0 0 1-2.1-2.2c-.2-.5-.3-1-.2-1.5l-1-1-1 1c0 .5 0 1-.2 1.5-.1.5-.4 1-.9 1.4-.3.4-.7.6-1.2.8l-1.2.3c-.4 0-.7 0-1-.2-.3 0-.6-.3-.8-.5-.5-.5-.8-1.2-.7-2 0-.9.4-1.6 1-2.2A3.7 3.7 0 0 1 8.6 14H9l1-1-4-4-.5-1a3.3 3.3 0 0 1 0-2c0-.4.3-.7.5-1l6 6 6-6 .5 1a3.3 3.3 0 0 1 0 2c0 .4-.3.7-.5 1l-4 4 1 1h.5c.4 0 .8 0 1.2.3.5.2.9.4 1.2.8Zm-8.5 2.2.1-.4v-.7a1 1 0 0 0-.2-.5 1 1 0 0 0-.4-.2 1.6 1.6 0 0 0-.8 0 2.6 2.6 0 0 0-.8.3 2.5 2.5 0 0 0-.9 1.1l-.1.4v.7l.2.5.5.2h.7a2.5 2.5 0 0 0 .8-.3 2.8 2.8 0 0 0 1-1Zm2.5-2.8c.4 0 .7-.1 1-.4.3-.3.4-.6.4-1s-.1-.7-.4-1c-.3-.3-.6-.4-1-.4s-.7.1-1 .4c-.3.3-.4.6-.4 1s.1.7.4 1c.3.3.6.4 1 .4Zm5.4 4 .2-.5v-.7a2.6 2.6 0 0 0-.3-.8 2.4 2.4 0 0 0-.7-.7 2.5 2.5 0 0 0-.8-.3 1.5 1.5 0 0 0-.8 0 1 1 0 0 0-.4.2 1 1 0 0 0-.2.5 1.5 1.5 0 0 0 0 .7v.4l.3.4.3.4a2.8 2.8 0 0 0 .8.5l.4.1h.7l.5-.2Z" fill-rule="evenodd"/></svg>',"document-properties":'<svg width="24" height="24"><path d="M14.4 3H7a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h10a2 2 0 0 0 2-2V7.6L14.4 3ZM17 19H7V5h6v4h4v10Z" fill-rule="nonzero"/></svg>',drag:'<svg width="24" height="24"><path d="M13 5h2v2h-2V5Zm0 4h2v2h-2V9ZM9 9h2v2H9V9Zm4 4h2v2h-2v-2Zm-4 0h2v2H9v-2Zm0 4h2v2H9v-2Zm4 0h2v2h-2v-2ZM9 5h2v2H9V5Z" fill-rule="evenodd"/></svg>',"duplicate-column":'<svg width="24" height="24"><path d="M17 6v16h-7V6h7Zm-2 2h-3v12h3V8Zm-2-6v2H8v15H6V2h7Z"/></svg>',"duplicate-row":'<svg width="24" height="24"><path d="M22 11v7H6v-7h16Zm-2 2H8v3h12v-3Zm-1-6v2H4v5H2V7h17Z"/></svg>',duplicate:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M16 3v2H6v11H4V5c0-1.1.9-2 2-2h10Zm3 8h-2V9h-7v10h9a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V9c0-1.2.9-2 2-2h7a2 2 0 0 1 2 2v2Z"/><path d="M17 14h1a1 1 0 0 1 0 2h-1v1a1 1 0 0 1-2 0v-1h-1a1 1 0 0 1 0-2h1v-1a1 1 0 0 1 2 0v1Z"/></g></svg>',"edit-block":'<svg width="24" height="24"><path fill-rule="nonzero" d="m19.8 8.8-9.4 9.4c-.2.2-.5.4-.9.4l-5.4 1.2 1.2-5.4.5-.8 9.4-9.4c.7-.7 1.8-.7 2.5 0l2.1 2.1c.7.7.7 1.8 0 2.5Zm-2-.2 1-.9v-.3l-2.2-2.2a.3.3 0 0 0-.3 0l-1 1L18 8.5Zm-1 1-2.5-2.4-6 6 2.5 2.5 6-6Zm-7 7.1-2.6-2.4-.3.3-.1.2-.7 3 3.1-.6h.1l.4-.5Z"/></svg>',"edit-image":'<svg width="24" height="24"><path d="M18 16h2V7a2 2 0 0 0-2-2H7v2h11v9ZM6 17h15a1 1 0 0 1 0 2h-1v1a1 1 0 0 1-2 0v-1H6a2 2 0 0 1-2-2V7H3a1 1 0 1 1 0-2h1V4a1 1 0 1 1 2 0v13Zm3-5.3 1.3 2 3-4.7 3.7 6H7l2-3.3Z" fill-rule="nonzero"/></svg>',"embed-page":'<svg width="24" height="24"><path d="M19 6V5H5v14h2A13 13 0 0 1 19 6Zm0 1.4c-.8.8-1.6 2.4-2.2 4.6H19V7.4Zm0 5.6h-2.4c-.4 1.8-.6 3.8-.6 6h3v-6Zm-4 6c0-2.2.2-4.2.6-6H13c-.7 1.8-1.1 3.8-1.1 6h3Zm-4 0c0-2.2.4-4.2 1-6H9.6A12 12 0 0 0 8 19h3ZM4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1Zm11.8 9c.4-1.9 1-3.4 1.8-4.5a9.2 9.2 0 0 0-4 4.5h2.2Zm-3.4 0a12 12 0 0 1 2.8-4 12 12 0 0 0-5 4h2.2Z" fill-rule="nonzero"/></svg>',embed:'<svg width="24" height="24"><path d="M4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1Zm1 2v14h14V5H5Zm4.8 2.6 5.6 4a.5.5 0 0 1 0 .8l-5.6 4A.5.5 0 0 1 9 16V8a.5.5 0 0 1 .8-.4Z" fill-rule="nonzero"/></svg>',emoji:'<svg width="24" height="24"><path d="M9 11c.6 0 1-.4 1-1s-.4-1-1-1a1 1 0 0 0-1 1c0 .6.4 1 1 1Zm6 0c.6 0 1-.4 1-1s-.4-1-1-1a1 1 0 0 0-1 1c0 .6.4 1 1 1Zm-3 5.5c2.1 0 4-1.5 4.4-3.5H7.6c.5 2 2.3 3.5 4.4 3.5ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm0 14.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13Z" fill-rule="nonzero"/></svg>',export:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M14.4 3 18 7v1h-5V5H7v14h9a1 1 0 0 1 2 0c0 1-.8 2-1.9 2H7c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2h7.5Z"/><path d="M18.1 12c.5 0 .9.4.9 1 0 .5-.3 1-.8 1h-7.3c-.5 0-.9-.4-.9-1 0-.5.3-1 .8-1h7.3Z"/><path d="M16.4 9.2a1 1 0 0 1 1.4.2l2.4 3.6-2.4 3.6a1 1 0 0 1-1.7-1v-.2l1.7-2.4-1.6-2.4a1 1 0 0 1 .2-1.4Z"/></g></svg>',fill:'<svg width="24" height="26"><path d="m16.6 12-9-9-1.4 1.4 2.4 2.4-5.2 5.1c-.5.6-.5 1.6 0 2.2L9 19.6a1.5 1.5 0 0 0 2.2 0l5.5-5.5c.5-.6.5-1.6 0-2.2ZM5.2 13 10 8.2l4.8 4.8H5.2ZM19 14.5s-2 2.2-2 3.5c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.3-2-3.5-2-3.5Z" fill-rule="nonzero"/></svg>',"flip-horizontally":'<svg width="24" height="24"><path d="M14 19h2v-2h-2v2Zm4-8h2V9h-2v2ZM4 7v10c0 1.1.9 2 2 2h3v-2H6V7h3V5H6a2 2 0 0 0-2 2Zm14-2v2h2a2 2 0 0 0-2-2Zm-7 16h2V3h-2v18Zm7-6h2v-2h-2v2Zm-4-8h2V5h-2v2Zm4 12a2 2 0 0 0 2-2h-2v2Z" fill-rule="nonzero"/></svg>',"flip-vertically":'<svg width="24" height="24"><path d="M5 14v2h2v-2H5Zm8 4v2h2v-2h-2Zm4-14H7a2 2 0 0 0-2 2v3h2V6h10v3h2V6a2 2 0 0 0-2-2Zm2 14h-2v2a2 2 0 0 0 2-2ZM3 11v2h18v-2H3Zm6 7v2h2v-2H9Zm8-4v2h2v-2h-2ZM5 18c0 1.1.9 2 2 2v-2H5Z" fill-rule="nonzero"/></svg>',footnote:'<svg width="24" height="24"><path d="M19 13c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2h14Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M19 4v6h-1V5h-1.5V4h2.6Z"/><path d="M12 18c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2h7ZM14 8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2h9Z"/></svg>',"format-code":'<svg width="24" height="24"><path d="m10 22 2-7H6l9-13h2l-2 8h7L12 22h-2ZM6 2h7l-1.4 2H6V2Zm4.2 4H4v2h4.8l1.4-2Zm-2.7 4H2v2h4l1.5-2Z"/></svg>',"format-painter":'<svg width="24" height="24"><path d="M18 5V4c0-.5-.4-1-1-1H5a1 1 0 0 0-1 1v4c0 .6.5 1 1 1h12c.6 0 1-.4 1-1V7h1v4H9v9c0 .6.4 1 1 1h2c.6 0 1-.4 1-1v-7h8V5h-3Z" fill-rule="nonzero"/></svg>',format:'<svg width="24" height="24"><path fill-rule="evenodd" d="M17 5a1 1 0 0 1 0 2h-4v11a1 1 0 0 1-2 0V7H7a1 1 0 1 1 0-2h10Z"/></svg>',fullscreen:'<svg width="24" height="24"><path d="m15.3 10-1.2-1.3 2.9-3h-2.3a.9.9 0 1 1 0-1.7H19c.5 0 .9.4.9.9v4.4a.9.9 0 1 1-1.8 0V7l-2.9 3Zm0 4 3 3v-2.3a.9.9 0 1 1 1.7 0V19c0 .5-.4.9-.9.9h-4.4a.9.9 0 1 1 0-1.8H17l-3-2.9 1.3-1.2ZM10 15.4l-2.9 3h2.3a.9.9 0 1 1 0 1.7H5a.9.9 0 0 1-.9-.9v-4.4a.9.9 0 1 1 1.8 0V17l2.9-3 1.2 1.3ZM8.7 10 5.7 7v2.3a.9.9 0 0 1-1.7 0V5c0-.5.4-.9.9-.9h4.4a.9.9 0 0 1 0 1.8H7l3 2.9-1.3 1.2Z" fill-rule="nonzero"/></svg>',gallery:'<svg width="24" height="24"><path fill-rule="nonzero" d="m5 15.7 2.3-2.2c.3-.3.7-.3 1 0L11 16l5.1-5c.3-.4.8-.4 1 0l2 1.9V8H5v7.7ZM5 18V19h3l1.8-1.9-2-2L5 17.9Zm14-3-2.5-2.4-6.4 6.5H19v-4ZM4 6h16c.6 0 1 .4 1 1v13c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V7c0-.6.4-1 1-1Zm6 7a2 2 0 1 1 0-4 2 2 0 0 1 0 4ZM4.5 4h15a.5.5 0 1 1 0 1h-15a.5.5 0 0 1 0-1Zm2-2h11a.5.5 0 1 1 0 1h-11a.5.5 0 0 1 0-1Z"/></svg>',gamma:'<svg width="24" height="24"><path d="M4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1Zm1 2v14h14V5H5Zm6.5 11.8V14L9.2 8.7a5.1 5.1 0 0 0-.4-.8l-.1-.2H8v-1l.3-.1.3-.1h.7a1 1 0 0 1 .6.5l.1.3a8.5 8.5 0 0 1 .3.6l1.9 4.6 2-5.2a1 1 0 0 1 1-.6.5.5 0 0 1 .5.6L13 14v2.8a.7.7 0 0 1-1.4 0Z" fill-rule="nonzero"/></svg>',help:'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M12 5.5a6.5 6.5 0 0 0-6 9 6.3 6.3 0 0 0 1.4 2l1 1a6.3 6.3 0 0 0 3.6 1 6.5 6.5 0 0 0 6-9 6.3 6.3 0 0 0-1.4-2l-1-1a6.3 6.3 0 0 0-3.6-1ZM12 4a7.8 7.8 0 0 1 5.7 2.3A8 8 0 1 1 12 4Z"/><path d="M9.6 9.7a.7.7 0 0 1-.7-.8c0-1.1 1.5-1.8 3.2-1.8 1.8 0 3.2.8 3.2 2.4 0 1.4-.4 2.1-1.5 2.8-.2 0-.3.1-.3.2a2 2 0 0 0-.8.8.8.8 0 0 1-1.4-.6c.3-.7.8-1 1.3-1.5l.4-.2c.7-.4.8-.6.8-1.5 0-.5-.6-.9-1.7-.9-.5 0-1 .1-1.4.3-.2 0-.3.1-.3.2v-.2c0 .4-.4.8-.8.8Z" fill-rule="nonzero"/><circle cx="12" cy="16" r="1"/></g></svg>',"highlight-bg-color":'<svg width="24" height="24"><g fill-rule="evenodd"><path class="tox-icon-highlight-bg-color__color" d="M3 18h18v3H3z"/><path fill-rule="nonzero" d="M7.7 16.7H3l3.3-3.3-.7-.8L10.2 8l4 4.1-4 4.2c-.2.2-.6.2-.8 0l-.6-.7-1.1 1.1zm5-7.5L11 7.4l3-2.9a2 2 0 0 1 2.6 0L18 6c.7.7.7 2 0 2.7l-2.9 2.9-1.8-1.8-.5-.6"/></g></svg>',home:'<svg width="24" height="24"><path fill-rule="nonzero" d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/></svg>',"horizontal-rule":'<svg width="24" height="24"><path d="M4 11h16v2H4z" fill-rule="evenodd"/></svg>',"image-options":'<svg width="24" height="24"><path d="M6 10a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2Zm12 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2Zm-6 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2Z" fill-rule="nonzero"/></svg>',image:'<svg width="24" height="24"><path d="m5 15.7 3.3-3.2c.3-.3.7-.3 1 0L12 15l4.1-4c.3-.4.8-.4 1 0l2 1.9V5H5v10.7ZM5 18V19h3l2.8-2.9-2-2L5 17.9Zm14-3-2.5-2.4-6.4 6.5H19v-4ZM4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1Zm6 8a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z" fill-rule="nonzero"/></svg>',indent:'<svg width="24" height="24"><path d="M7 5h12c.6 0 1 .4 1 1s-.4 1-1 1H7a1 1 0 1 1 0-2Zm5 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2Zm0 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2Zm-5 4h12a1 1 0 0 1 0 2H7a1 1 0 0 1 0-2Zm-2.6-3.8L6.2 12l-1.8-1.2a1 1 0 0 1 1.2-1.6l3 2a1 1 0 0 1 0 1.6l-3 2a1 1 0 1 1-1.2-1.6Z" fill-rule="evenodd"/></svg>',info:'<svg width="24" height="24"><path d="M12 4a7.8 7.8 0 0 1 5.7 2.3A8 8 0 1 1 12 4Zm-1 3v2h2V7h-2Zm3 10v-1h-1v-5h-3v1h1v4h-1v1h4Z" fill-rule="evenodd"/></svg>',"insert-character":'<svg width="24" height="24"><path d="M15 18h4l1-2v4h-6v-3.3l1.4-1a6 6 0 0 0 1.8-2.9 6.3 6.3 0 0 0-.1-4.1 5.8 5.8 0 0 0-3-3.2c-.6-.3-1.3-.5-2.1-.5a5.1 5.1 0 0 0-3.9 1.8 6.3 6.3 0 0 0-1.3 6 6.2 6.2 0 0 0 1.8 3l1.4.9V20H4v-4l1 2h4v-.5l-2-1L5.4 15A6.5 6.5 0 0 1 4 11c0-1 .2-1.9.6-2.7A7 7 0 0 1 6.3 6C7.1 5.4 8 5 9 4.5c1-.3 2-.5 3.1-.5a8.8 8.8 0 0 1 5.7 2 7 7 0 0 1 1.7 2.3 6 6 0 0 1 .2 4.8c-.2.7-.6 1.3-1 1.9a7.6 7.6 0 0 1-3.6 2.5v.5Z" fill-rule="evenodd"/></svg>',"insert-time":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M12 19a7 7 0 1 0 0-14 7 7 0 0 0 0 14Zm0 2a9 9 0 1 1 0-18 9 9 0 0 1 0 18Z"/><path d="M16 12h-3V7c0-.6-.4-1-1-1a1 1 0 0 0-1 1v7h5c.6 0 1-.4 1-1s-.4-1-1-1Z"/></g></svg>',invert:'<svg width="24" height="24"><path d="M18 19.3 16.5 18a5.8 5.8 0 0 1-3.1 1.9 6.1 6.1 0 0 1-5.5-1.6A5.8 5.8 0 0 1 6 14v-.3l.1-1.2A13.9 13.9 0 0 1 7.7 9l-3-3 .7-.8 2.8 2.9 9 8.9 1.5 1.6-.7.6Zm0-5.5v.3l-.1 1.1-.4 1-1.2-1.2a4.3 4.3 0 0 0 .2-1v-.2c0-.4 0-.8-.2-1.3l-.5-1.4a14.8 14.8 0 0 0-3-4.2L12 6a26.1 26.1 0 0 0-2.2 2.5l-1-1a20.9 20.9 0 0 1 2.9-3.3L12 4l1 .8a22.2 22.2 0 0 1 4 5.4c.6 1.2 1 2.4 1 3.6Z" fill-rule="evenodd"/></svg>',italic:'<svg width="24" height="24"><path d="m16.7 4.7-.1.9h-.3c-.6 0-1 0-1.4.3-.3.3-.4.6-.5 1.1l-2.1 9.8v.6c0 .5.4.8 1.4.8h.2l-.2.8H8l.2-.8h.2c1.1 0 1.8-.5 2-1.5l2-9.8.1-.5c0-.6-.4-.8-1.4-.8h-.3l.2-.9h5.8Z" fill-rule="evenodd"/></svg>',language:'<svg width="24" height="24"><path d="M12 3a9 9 0 1 1 0 18 9 9 0 0 1 0-18Zm4.3 13.3c-.5 1-1.2 2-2 2.9a7.5 7.5 0 0 0 3.2-2.1l-.2-.2a6 6 0 0 0-1-.6Zm-8.6 0c-.5.2-.9.5-1.2.8.9 1 2 1.7 3.2 2a10 10 0 0 1-2-2.8Zm3.6-.8c-.8 0-1.6.1-2.2.3.5 1 1.2 1.9 2.1 2.7Zm1.5 0v3c.9-.8 1.6-1.7 2.1-2.7-.6-.2-1.4-.3-2.1-.3Zm-6-2.7H4.5c.2 1 .5 2.1 1 3h.3l1.3-1a10 10 0 0 1-.3-2Zm12.7 0h-2.3c0 .7-.1 1.4-.3 2l1.6 1.1c.5-1 .9-2 1-3.1Zm-3.8 0h-3V14c1 0 2 .1 2.7.4.2-.5.3-1 .3-1.6Zm-4.4 0h-3l.3 1.6c.8-.3 1.7-.4 2.7-.4v-1.3Zm-5.5-5c-.7 1-1.1 2.2-1.3 3.5h2.3c0-1 .2-1.8.5-2.6l-1.5-1Zm2.9 1.4v.1c-.2.6-.4 1.3-.4 2h3V9.4c-1 0-1.8-.1-2.6-.3Zm6.6 0h-.1l-2.4.3v1.8h3l-.5-2.1Zm3-1.4-.3.1-1.3.8c.3.8.5 1.6.5 2.6h2.3a7.5 7.5 0 0 0-1.3-3.5Zm-9 0 2 .2V5.5a9 9 0 0 0-2 2.2Zm3.5-2.3V8c.6 0 1.3 0 1.9-.2a9 9 0 0 0-2-2.3Zm-3-.7h-.1c-1.1.4-2.1 1-3 1.8l1.2.7a10 10 0 0 1 1.9-2.5Zm4.4 0 .1.1a10 10 0 0 1 1.8 2.4l1.1-.7a7.5 7.5 0 0 0-3-1.8Z"/></svg>',"line-height":'<svg width="24" height="24"><path d="M21 5a1 1 0 0 1 .1 2H13a1 1 0 0 1-.1-2H21zm0 4a1 1 0 0 1 .1 2H13a1 1 0 0 1-.1-2H21zm0 4a1 1 0 0 1 .1 2H13a1 1 0 0 1-.1-2H21zm0 4a1 1 0 0 1 .1 2H13a1 1 0 0 1-.1-2H21zM7 3.6l3.7 3.7a1 1 0 0 1-1.3 1.5h-.1L8 7.3v9.2l1.3-1.3a1 1 0 0 1 1.3 0h.1c.4.4.4 1 0 1.3v.1L7 20.4l-3.7-3.7a1 1 0 0 1 1.3-1.5h.1L6 16.7V7.4L4.7 8.7a1 1 0 0 1-1.3 0h-.1a1 1 0 0 1 0-1.3v-.1L7 3.6z"/></svg>',line:'<svg width="24" height="24"><path d="m15 9-8 8H4v-3l8-8 3 3Zm1-1-3-3 1-1h1c-.2 0 0 0 0 0l2 2s0 .2 0 0v1l-1 1ZM4 18h16v2H4v-2Z" fill-rule="evenodd"/></svg>',link:'<svg width="24" height="24"><path d="M6.2 12.3a1 1 0 0 1 1.4 1.4l-2 2a2 2 0 1 0 2.6 2.8l4.8-4.8a1 1 0 0 0 0-1.4 1 1 0 1 1 1.4-1.3 2.9 2.9 0 0 1 0 4L9.6 20a3.9 3.9 0 0 1-5.5-5.5l2-2Zm11.6-.6a1 1 0 0 1-1.4-1.4l2-2a2 2 0 1 0-2.6-2.8L11 10.3a1 1 0 0 0 0 1.4A1 1 0 1 1 9.6 13a2.9 2.9 0 0 1 0-4L14.4 4a3.9 3.9 0 0 1 5.5 5.5l-2 2Z" fill-rule="nonzero"/></svg>',"list-bull-circle":'<svg width="48" height="48"><g fill-rule="evenodd"><path d="M11 16a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm0 1a3 3 0 1 1 0-6 3 3 0 0 1 0 6ZM11 26a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm0 1a3 3 0 1 1 0-6 3 3 0 0 1 0 6ZM11 36a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm0 1a3 3 0 1 1 0-6 3 3 0 0 1 0 6Z" fill-rule="nonzero"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',"list-bull-default":'<svg width="48" height="48"><g fill-rule="evenodd"><circle cx="11" cy="14" r="3"/><circle cx="11" cy="24" r="3"/><circle cx="11" cy="34" r="3"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',"list-bull-square":'<svg width="48" height="48"><g fill-rule="evenodd"><path d="M8 11h6v6H8zM8 21h6v6H8zM8 31h6v6H8z"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',"list-num-default-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M37.4 17v-4.8h-.1l-1.5 1v-1.1l1.6-1.1h1.2v6zM33.3 17.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm1.7 5.7c0-1.2 1-2 2.2-2 1.3 0 2.1.8 2.1 1.8 0 .7-.3 1.2-1.3 2.2l-1.2 1v.2h2.6v1h-4.3v-.9l2-1.9c.8-.8 1-1.1 1-1.5 0-.5-.4-.8-1-.8-.5 0-.9.3-.9.9H35zm-1.7 4.3c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm3.2 7.3v-1h.7c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7s-1 .3-1 .8H35c0-1.1 1-1.8 2.2-1.8 1.2 0 2.1.6 2.1 1.6 0 .7-.4 1.2-1 1.3v.1c.7.1 1.3.7 1.3 1.4 0 1-1 1.9-2.4 1.9-1.3 0-2.2-.8-2.3-2h1.2c0 .6.5 1 1.1 1 .6 0 1-.4 1-1 0-.5-.3-.8-1-.8h-.7zm-3.3 2.7c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7z"/></g></svg>',"list-num-default":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10 17v-4.8l-1.5 1v-1.1l1.6-1h1.2V17h-1.2Zm3.6.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7Zm-5 5.7c0-1.2.8-2 2.1-2s2.1.8 2.1 1.8c0 .7-.3 1.2-1.4 2.2l-1.1 1v.2h2.6v1H8.6v-.9l2-1.9c.8-.8 1-1.1 1-1.5 0-.5-.4-.8-1-.8-.5 0-.9.3-.9.9H8.5Zm6.3 4.3c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7ZM10 34.4v-1h.7c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7s-1 .3-1 .8H8.6c0-1.1 1-1.8 2.2-1.8 1.3 0 2.1.6 2.1 1.6 0 .7-.4 1.2-1 1.3v.1c.8.1 1.3.7 1.3 1.4 0 1-1 1.9-2.4 1.9-1.3 0-2.2-.8-2.3-2h1.2c0 .6.5 1 1.1 1 .7 0 1-.4 1-1 0-.5-.3-.8-1-.8h-.7Zm4.7 2.7c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7Z"/></g></svg>',"list-num-lower-alpha-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M36.5 16c-.9 0-1.5-.5-1.5-1.3s.6-1.3 1.8-1.4h1v-.4c0-.4-.2-.6-.7-.6-.4 0-.7.1-.8.4h-1.1c0-.8.8-1.4 2-1.4S39 12 39 13V16h-1.2v-.6c-.3.4-.8.7-1.4.7Zm.4-.8c.6 0 1-.4 1-.9V14h-1c-.5.1-.7.3-.7.6 0 .4.3.6.7.6ZM33.1 16.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7ZM37.7 26c-.7 0-1.2-.2-1.5-.7v.7H35v-6.3h1.2v2.5c.3-.5.8-.9 1.5-.9 1.1 0 1.8 1 1.8 2.4 0 1.5-.7 2.4-1.8 2.4Zm-.5-3.6c-.6 0-1 .5-1 1.3s.4 1.4 1 1.4c.7 0 1-.6 1-1.4 0-.8-.3-1.3-1-1.3ZM33.2 26.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zm6 7h-1c-.1-.5-.4-.8-1-.8s-1 .5-1 1.4c0 1 .4 1.4 1 1.4.5 0 .9-.2 1-.7h1c0 1-.8 1.7-2 1.7-1.4 0-2.2-.9-2.2-2.4s.8-2.4 2.2-2.4c1.2 0 2 .7 2 1.7zm-6.1 3c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-alpha":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10.3 15.2c.5 0 1-.4 1-.9V14h-1c-.5.1-.8.3-.8.6 0 .4.3.6.8.6Zm-.4.9c-1 0-1.5-.6-1.5-1.4 0-.8.6-1.3 1.7-1.4h1.1v-.4c0-.4-.2-.6-.7-.6-.5 0-.8.1-.9.4h-1c0-.8.8-1.4 2-1.4 1.1 0 1.8.6 1.8 1.6V16h-1.1v-.6h-.1c-.2.4-.7.7-1.3.7Zm4.6 0c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7Zm-3.2 10c-.6 0-1.2-.3-1.4-.8v.7H8.5v-6.3H10v2.5c.3-.5.8-.9 1.4-.9 1.2 0 1.9 1 1.9 2.4 0 1.5-.7 2.4-1.9 2.4Zm-.4-3.7c-.7 0-1 .5-1 1.3s.3 1.4 1 1.4c.6 0 1-.6 1-1.4 0-.8-.4-1.3-1-1.3Zm4 3.7c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7Zm-2.2 7h-1.2c0-.5-.4-.8-.9-.8-.6 0-1 .5-1 1.4 0 1 .4 1.4 1 1.4.5 0 .8-.2 1-.7h1c0 1-.8 1.7-2 1.7-1.4 0-2.2-.9-2.2-2.4s.8-2.4 2.2-2.4c1.2 0 2 .7 2 1.7Zm1.8 3c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7Z"/></g></svg>',"list-num-lower-greek-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M37.4 16c-1.2 0-2-.8-2-2.3 0-1.5.8-2.4 2-2.4.6 0 1 .4 1.3 1v-.9H40v3.2c0 .4.1.5.4.5h.2v.9h-.6c-.6 0-1-.2-1-.7h-.2c-.2.4-.7.8-1.3.8Zm.3-1c.6 0 1-.5 1-1.3s-.4-1.3-1-1.3-1 .5-1 1.3.4 1.4 1 1.4ZM33.3 16.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7ZM36 21.9c0-1.5.8-2.3 2.1-2.3 1.2 0 2 .6 2 1.6 0 .6-.3 1-.9 1.3.9.3 1.3.8 1.3 1.7 0 1.2-.7 1.9-1.8 1.9-.6 0-1.1-.3-1.4-.8v2.2H36V22Zm1.8 1.2v-1h.3c.5 0 .9-.2.9-.7 0-.5-.3-.8-.9-.8-.5 0-.8.3-.8 1v2.2c0 .8.4 1.3 1 1.3s1-.4 1-1-.4-1-1.2-1h-.3ZM33.3 26.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7ZM37.1 34.6 34.8 30h1.4l1.7 3.5 1.7-3.5h1.1l-2.2 4.6v.1c.5.8.7 1.4.7 1.8 0 .4-.2.8-.4 1-.2.2-.6.3-1 .3-.9 0-1.3-.4-1.3-1.2 0-.5.2-1 .5-1.7l.1-.2Zm.7 1a2 2 0 0 0-.4.9c0 .3.1.4.4.4.3 0 .4-.1.4-.4 0-.2-.1-.6-.4-1ZM33.3 36.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7Z"/></g></svg>',"list-num-lower-greek":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10.5 15c.7 0 1-.5 1-1.3s-.3-1.3-1-1.3c-.5 0-.9.5-.9 1.3s.4 1.4 1 1.4Zm-.3 1c-1.1 0-1.8-.8-1.8-2.3 0-1.5.7-2.4 1.8-2.4.7 0 1.1.4 1.3 1h.1v-.9h1.2v3.2c0 .4.1.5.4.5h.2v.9h-.6c-.6 0-1-.2-1.1-.7h-.1c-.2.4-.7.8-1.4.8Zm5 .1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7Zm-4.9 7v-1h.3c.6 0 1-.2 1-.7 0-.5-.4-.8-1-.8-.5 0-.8.3-.8 1v2.2c0 .8.4 1.3 1.1 1.3.6 0 1-.4 1-1s-.5-1-1.3-1h-.3ZM8.6 22c0-1.5.7-2.3 2-2.3 1.2 0 2 .6 2 1.6 0 .6-.3 1-.8 1.3.8.3 1.3.8 1.3 1.7 0 1.2-.8 1.9-1.9 1.9-.6 0-1.1-.3-1.3-.8v2.2H8.5V22Zm6.2 4.2c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7Zm-4.5 8.5L8 30h1.4l1.7 3.5 1.7-3.5h1.1l-2.2 4.6v.1c.5.8.7 1.4.7 1.8 0 .4-.1.8-.4 1-.2.2-.6.3-1 .3-.9 0-1.3-.4-1.3-1.2 0-.5.2-1 .5-1.7l.1-.2Zm.7 1a2 2 0 0 0-.4.9c0 .3.1.4.4.4.3 0 .4-.1.4-.4 0-.2-.1-.6-.4-1Zm4.5.5c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7Z"/></g></svg>',"list-num-lower-roman-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M32.9 16v-1.2h-1.3V16H33Zm0 10v-1.2h-1.3V26H33Zm0 10v-1.2h-1.3V36H33Z"/><path fill-rule="nonzero" d="M36 21h-1.5v5H36zM36 31h-1.5v5H36zM39 21h-1.5v5H39zM39 31h-1.5v5H39zM42 31h-1.5v5H42zM36 11h-1.5v5H36zM36 19h-1.5v1H36zM36 29h-1.5v1H36zM39 19h-1.5v1H39zM39 29h-1.5v1H39zM42 29h-1.5v1H42zM36 9h-1.5v1H36z"/></g></svg>',"list-num-lower-roman":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M15.1 16v-1.2h1.3V16H15Zm0 10v-1.2h1.3V26H15Zm0 10v-1.2h1.3V36H15Z"/><path fill-rule="nonzero" d="M12 21h1.5v5H12zM12 31h1.5v5H12zM9 21h1.5v5H9zM9 31h1.5v5H9zM6 31h1.5v5H6zM12 11h1.5v5H12zM12 19h1.5v1H12zM12 29h1.5v1H12zM9 19h1.5v1H9zM9 29h1.5v1H9zM6 29h1.5v1H6zM12 9h1.5v1H12z"/></g></svg>',"list-num-upper-alpha-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="m39.3 17-.5-1.4h-2l-.5 1.4H35l2-6h1.6l2 6h-1.3Zm-1.6-4.7-.7 2.3h1.6l-.8-2.3ZM33.4 17c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7Zm4.7 9.9h-2.7v-6H38c1.2 0 1.9.6 1.9 1.5 0 .6-.5 1.2-1 1.3.7.1 1.3.7 1.3 1.5 0 1-.8 1.7-2 1.7Zm-1.4-5v1.5h1c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7h-1Zm0 4h1.1c.7 0 1.1-.3 1.1-.8 0-.6-.4-.9-1.1-.9h-1.1V26ZM33 27.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7Zm4.9 10c-1.8 0-2.8-1.1-2.8-3.1s1-3.1 2.8-3.1c1.4 0 2.5.9 2.6 2.2h-1.3c0-.7-.6-1.1-1.3-1.1-1 0-1.6.7-1.6 2s.6 2 1.6 2c.7 0 1.2-.4 1.4-1h1.2c-.1 1.3-1.2 2.2-2.6 2.2Zm-4.5 0c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7Z"/></g></svg>',"list-num-upper-alpha":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="m12.6 17-.5-1.4h-2L9.5 17H8.3l2-6H12l2 6h-1.3ZM11 12.3l-.7 2.3h1.6l-.8-2.3Zm4.7 4.8c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7ZM11.4 27H8.7v-6h2.6c1.2 0 1.9.6 1.9 1.5 0 .6-.5 1.2-1 1.3.7.1 1.3.7 1.3 1.5 0 1-.8 1.7-2 1.7ZM10 22v1.5h1c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7h-1Zm0 4H11c.7 0 1.1-.3 1.1-.8 0-.6-.4-.9-1.1-.9H10V26Zm5.4 1.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7Zm-4.1 10c-1.8 0-2.8-1.1-2.8-3.1s1-3.1 2.8-3.1c1.4 0 2.5.9 2.6 2.2h-1.3c0-.7-.6-1.1-1.3-1.1-1 0-1.6.7-1.6 2s.6 2 1.6 2c.7 0 1.2-.4 1.4-1h1.2c-.1 1.3-1.2 2.2-2.6 2.2Zm4.5 0c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7Z"/></g></svg>',"list-num-upper-roman-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M31.6 17v-1.2H33V17h-1.3Zm0 10v-1.2H33V27h-1.3Zm0 10v-1.2H33V37h-1.3Z"/><path fill-rule="nonzero" d="M34.5 20H36v7h-1.5zM34.5 30H36v7h-1.5zM37.5 20H39v7h-1.5zM37.5 30H39v7h-1.5zM40.5 30H42v7h-1.5zM34.5 10H36v7h-1.5z"/></g></svg>',"list-num-upper-roman":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M15.1 17v-1.2h1.3V17H15Zm0 10v-1.2h1.3V27H15Zm0 10v-1.2h1.3V37H15Z"/><path fill-rule="nonzero" d="M12 20h1.5v7H12zM12 30h1.5v7H12zM9 20h1.5v7H9zM9 30h1.5v7H9zM6 30h1.5v7H6zM12 10h1.5v7H12z"/></g></svg>',lock:'<svg width="24" height="24"><path d="M16.3 11c.2 0 .3 0 .5.2l.2.6v7.4c0 .3 0 .4-.2.6l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 0 1-.2-.6v-7.4c0-.3 0-.4.2-.6l.5-.2H8V8c0-.8.3-1.5.9-2.1.6-.6 1.3-.9 2.1-.9h2c.8 0 1.5.3 2.1.9.6.6.9 1.3.9 2.1v3h.3ZM10 8v3h4V8a1 1 0 0 0-.3-.7A1 1 0 0 0 13 7h-2a1 1 0 0 0-.7.3 1 1 0 0 0-.3.7Z" fill-rule="evenodd"/></svg>',ltr:'<svg width="24" height="24"><path d="M11 5h7a1 1 0 0 1 0 2h-1v11a1 1 0 0 1-2 0V7h-2v11a1 1 0 0 1-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 0 1 7.8 10a3.3 3.3 0 0 1 0-2.8 3.4 3.4 0 0 1 1.8-1.8L11 5ZM4.4 16.2 6.2 15l-1.8-1.2a1 1 0 0 1 1.2-1.6l3 2a1 1 0 0 1 0 1.6l-3 2a1 1 0 1 1-1.2-1.6Z" fill-rule="evenodd"/></svg>',"math-equation":'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M9 4.8c.1-.5.5-.8 1-.8h10a1 1 0 1 1 0 2h-9.2L8.3 19.2a1 1 0 0 1-1.7.4l-3.4-4.2a1 1 0 0 1 1.6-1.2l2 2.5L9 4.8Zm9.7 5.5c.4.4.4 1 0 1.4L17 13.5l1.8 1.8a1 1 0 1 1-1.4 1.4L15.5 15l-1.8 1.8a1 1 0 0 1-1.4-1.4l1.8-1.8-1.8-1.8a1 1 0 0 1 1.4-1.4l1.8 1.8 1.8-1.8a1 1 0 0 1 1.4 0Z"/></svg>',mentions:'<svg height="24" width="24"><path d="M12 21a8.8 8.8 0 0 1-3.5-.7 9 9 0 0 1-2.9-2 9 9 0 0 1-1.9-2.8A8.8 8.8 0 0 1 3 12c0-1.3.2-2.4.7-3.5a9 9 0 0 1 4.8-4.8A8.8 8.8 0 0 1 12 3c1.3 0 2.4.2 3.5.7a9.1 9.1 0 0 1 4.8 4.8A8.7 8.7 0 0 1 21 12v1.4a3 3 0 0 1-.9 2.2 3 3 0 0 1-2.2.9c-.5 0-1-.1-1.5-.4a3.8 3.8 0 0 1-1.1-1 4.8 4.8 0 0 1-1.5 1 4.3 4.3 0 0 1-1.8.4c-1.2 0-2.3-.4-3.2-1.3-.9-.9-1.3-2-1.3-3.2s.4-2.3 1.3-3.2c.9-.9 2-1.3 3.2-1.3s2.3.4 3.2 1.3c.9.9 1.3 2 1.3 3.2v1.4c0 .4.1.7.4 1 .3.3.6.4 1 .4s.7-.1 1-.4c.3-.3.4-.6.4-1V12c0-2-.7-3.8-2.1-5.2S14 4.7 12 4.7s-3.8.7-5.2 2.1S4.7 10 4.7 12s.7 3.8 2.1 5.2 3.2 2.1 5.2 2.1h4.5V21zm0-6.2c.8 0 1.4-.3 2-.8a2.7 2.7 0 0 0 .8-2c0-.8-.3-1.4-.8-2a2.7 2.7 0 0 0-2-.8c-.8 0-1.4.3-2 .8a2.7 2.7 0 0 0-.8 2c0 .8.3 1.4.8 2a2.7 2.7 0 0 0 2 .8z"/></svg>',minus:'<svg width="24" height="24"><path d="M19 11a1 1 0 0 1 .1 2H5a1 1 0 0 1-.1-2H19Z"/></svg>',"more-drawer":'<svg width="24" height="24"><path d="M6 10a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2Zm12 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2Zm-6 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2Z" fill-rule="nonzero"/></svg>',"new-document":'<svg width="24" height="24"><path d="M14.4 3H7a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h10a2 2 0 0 0 2-2V7.6L14.4 3ZM17 19H7V5h6v4h4v10Z" fill-rule="nonzero"/></svg>',"new-tab":'<svg width="24" height="24"><path d="m15 13 2-2v8H5V7h8l-2 2H7v8h8v-4Zm4-8v5.5l-2-2-5.6 5.5H10v-1.4L15.5 7l-2-2H19Z" fill-rule="evenodd"/></svg>',"non-breaking":'<svg width="24" height="24"><path d="M11 11H8a1 1 0 1 1 0-2h3V6c0-.6.4-1 1-1s1 .4 1 1v3h3c.6 0 1 .4 1 1s-.4 1-1 1h-3v3c0 .6-.4 1-1 1a1 1 0 0 1-1-1v-3Zm10 4v5H3v-5c0-.6.4-1 1-1s1 .4 1 1v3h14v-3c0-.6.4-1 1-1s1 .4 1 1Z" fill-rule="evenodd"/></svg>',notice:'<svg width="24" height="24"><path d="M15.5 4 20 8.5v7L15.5 20h-7L4 15.5v-7L8.5 4h7ZM13 17v-2h-2v2h2Zm0-4V7h-2v6h2Z" fill-rule="evenodd" clip-rule="evenodd"/></svg>',"ordered-list-rtl":'<svg width="24" height="24"><path d="M6 17h8a1 1 0 0 1 0 2H6a1 1 0 0 1 0-2Zm0-6h8a1 1 0 0 1 0 2H6a1 1 0 0 1 0-2Zm0-6h8a1 1 0 0 1 0 2H6a1 1 0 1 1 0-2Zm13-1v3.5a.5.5 0 1 1-1 0V5h-.5a.5.5 0 1 1 0-1H19Zm-1 8.8.2.2h1.3a.5.5 0 1 1 0 1h-1.6a1 1 0 0 1-.9-1V13c0-.4.3-.8.6-1l1.2-.4.2-.3a.2.2 0 0 0-.2-.2h-1.3a.5.5 0 0 1-.5-.5c0-.3.2-.5.5-.5h1.6c.5 0 .9.4.9 1v.1c0 .4-.3.8-.6 1l-1.2.4-.2.3Zm2 4.2v2c0 .6-.4 1-1 1h-1.5a.5.5 0 0 1 0-1h1.2a.3.3 0 1 0 0-.6h-1.3a.4.4 0 1 1 0-.8h1.3a.3.3 0 0 0 0-.6h-1.2a.5.5 0 1 1 0-1H19c.6 0 1 .4 1 1Z" fill-rule="evenodd"/></svg>',"ordered-list":'<svg width="24" height="24"><path d="M10 17h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 1 1 0-2ZM6 4v3.5c0 .3-.2.5-.5.5a.5.5 0 0 1-.5-.5V5h-.5a.5.5 0 0 1 0-1H6Zm-1 8.8.2.2h1.3c.3 0 .5.2.5.5s-.2.5-.5.5H4.9a1 1 0 0 1-.9-1V13c0-.4.3-.8.6-1l1.2-.4.2-.3a.2.2 0 0 0-.2-.2H4.5a.5.5 0 0 1-.5-.5c0-.3.2-.5.5-.5h1.6c.5 0 .9.4.9 1v.1c0 .4-.3.8-.6 1l-1.2.4-.2.3ZM7 17v2c0 .6-.4 1-1 1H4.5a.5.5 0 0 1 0-1h1.2c.2 0 .3-.1.3-.3 0-.2-.1-.3-.3-.3H4.4a.4.4 0 1 1 0-.8h1.3c.2 0 .3-.1.3-.3 0-.2-.1-.3-.3-.3H4.5a.5.5 0 1 1 0-1H6c.6 0 1 .4 1 1Z" fill-rule="evenodd"/></svg>',orientation:'<svg width="24" height="24"><path d="M7.3 6.4 1 13l6.4 6.5 6.5-6.5-6.5-6.5ZM3.7 13l3.6-3.7L11 13l-3.7 3.7-3.6-3.7ZM12 6l2.8 2.7c.3.3.3.8 0 1-.3.4-.9.4-1.2 0L9.2 5.7a.8.8 0 0 1 0-1.2L13.6.2c.3-.3.9-.3 1.2 0 .3.3.3.8 0 1.1L12 4h1a9 9 0 1 1-4.3 16.9l1.5-1.5A7 7 0 1 0 13 6h-1Z" fill-rule="nonzero"/></svg>',outdent:'<svg width="24" height="24"><path d="M7 5h12c.6 0 1 .4 1 1s-.4 1-1 1H7a1 1 0 1 1 0-2Zm5 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2Zm0 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2Zm-5 4h12a1 1 0 0 1 0 2H7a1 1 0 0 1 0-2Zm1.6-3.8a1 1 0 0 1-1.2 1.6l-3-2a1 1 0 0 1 0-1.6l3-2a1 1 0 0 1 1.2 1.6L6.8 12l1.8 1.2Z" fill-rule="evenodd"/></svg>',"export-pdf":'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M7 3h7.4L19 7.6V17h-2V9h-4V5H7v3H5V5c0-1.1.9-2 2-2Z"/><path d="M2.6 15.2v-1.9h1c.6 0 1-.2 1.4-.5.3-.3.5-.7.5-1.2s-.2-.9-.5-1.2a2 2 0 0 0-1.3-.4H1v5.2h1.6Zm.4-3h-.4v-1.1h.5l.6.1.2.5c0 .1 0 .3-.2.4l-.7.1Zm5.7 3 1-.1c.3 0 .5-.2.7-.4l.5-.8c.2-.3.2-.7.2-1.3v-1l-.5-.8c-.2-.3-.4-.5-.7-.6L8.7 10H6.3v5.2h2.4Zm-.4-1.1H8v-3h.4c.5 0 .8.2 1 .4l.2 1.1-.1 1-.3.3-.8.2Zm5.3 1.2V13h2v-1h-2v-1H16V10h-4v5.2h1.6Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M15 17a1 1 0 1 0-2 0v3.1l-1.4-1a1 1 0 1 0-1.2 1.7l3.6 2.4 3.6-2.4a1 1 0 0 0-1.2-1.6l-1.4 1V17Z"/></svg>',"export-word":'<svg width="24" height="24"><path d="M9.5 7A1.5 1.5 0 0 1 11 8.4v7.1A1.5 1.5 0 0 1 9.6 17H2.5A1.5 1.5 0 0 1 1 15.6V8.5A1.5 1.5 0 0 1 2.4 7h7.1Zm-1 2.8-1 2.6-1-2.5v-.1a.6.6 0 0 0-1 0l-.1.1-.9 2.5-1-2.5v-.1a.6.6 0 0 0-1 .4v.1l1.5 4v.1a.6.6 0 0 0 1 0v-.1l1-2.5.9 2.5v.1a.6.6 0 0 0 1 0H8l1.6-4v-.2a.6.6 0 0 0-1.1-.4Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M7 3h7.4L19 7.6V17h-2V9h-4V5H5c0-1.1.9-2 2-2ZM15 17a1 1 0 1 0-2 0v3.1l-1.4-1a1 1 0 1 0-1.2 1.7l3.6 2.4 3.6-2.4a1 1 0 0 0-1.2-1.6l-1.4 1V17Z"/></svg>',"import-word":'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M7 3h7.4L19 7.6V15h-2V9h-4V5H5c0-1.1.9-2 2-2Z"/><path d="M9.5 7A1.5 1.5 0 0 1 11 8.4v7.1A1.5 1.5 0 0 1 9.6 17H2.5A1.5 1.5 0 0 1 1 15.6V8.5A1.5 1.5 0 0 1 2.4 7h7.1Zm-1 2.8-1 2.6-1-2.5v-.1a.6.6 0 0 0-1 0l-.1.1-.9 2.5-1-2.5v-.1a.6.6 0 0 0-1 .4v.1l1.5 4v.1a.6.6 0 0 0 1 0v-.1l1-2.5.9 2.5v.1a.6.6 0 0 0 1 0H8l1.6-4v-.2a.6.6 0 0 0-1.1-.4Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M11.4 18.2a1 1 0 0 0 1.2 1.6l1.4-1V22a1 1 0 1 0 2 0v-3.1l1.4 1a1 1 0 0 0 1.2-1.7L15 15.8l-3.6 2.4Z"/></svg>',"page-break":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M5 11c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2Zm3 0h1c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2Zm4 0c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2Zm3 0h1c.6 0 1 .4 1 1s-.4 1-1 1h-1a1 1 0 0 1 0-2Zm4 0c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2ZM7 3v5h10V3c0-.6.4-1 1-1s1 .4 1 1v7H5V3c0-.6.4-1 1-1s1 .4 1 1ZM6 22a1 1 0 0 1-1-1v-7h14v7c0 .6-.4 1-1 1a1 1 0 0 1-1-1v-5H7v5c0 .6-.4 1-1 1Z"/></g></svg>',paragraph:'<svg width="24" height="24"><path fill-rule="evenodd" d="M10 5h7a1 1 0 0 1 0 2h-1v11a1 1 0 0 1-2 0V7h-2v11a1 1 0 0 1-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 0 1 6.8 10a3.3 3.3 0 0 1 0-2.8 3.4 3.4 0 0 1 1.8-1.8L10 5Z"/></svg>',"paste-column-after":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 0 1 2.8 2H18c1 0 2 .8 2 1.9V7h-2V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v13h7v2H6c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2H9.2A3 3 0 0 1 12 1Zm8 7v12h-6V8h6Zm-1.5 1.5h-3v9h3v-9ZM12 3a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z"/></svg>',"paste-column-before":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 0 1 2.8 2H18c1 0 2 .8 2 1.9V18c0 1-.8 2-1.9 2H11v-2h7V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v2H4V5c0-1 .8-2 1.9-2H9.2A3 3 0 0 1 12 1Zm-2 7v12H4V8h6ZM8.5 9.5h-3v9h3v-9ZM12 3a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z"/></svg>',"paste-row-after":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 0 1 2.8 2H18c1 0 2 .8 2 1.9V11h-2V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v13h14c0 1-.8 2-1.9 2H6c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2H9.2A3 3 0 0 1 12 1Zm10 11v5H8v-5h14Zm-1.5 1.5h-11v2h11v-2ZM12 3a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z"/></svg>',"paste-row-before":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 0 1 2.8 2H18c1 0 2 .8 2 1.9V7h-2V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v13h12v-4h2v4c0 1-.8 2-1.9 2H6c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2H9.2A3 3 0 0 1 12 1Zm10 7v5H8V8h14Zm-1.5 1.5h-11v2h11v-2ZM12 3a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z"/></svg>',"paste-text":'<svg width="24" height="24"><path d="M18 9V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v13h3V9h9ZM9 20H6a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h3.2A3 3 0 0 1 12 1a3 3 0 0 1 2.8 2H18a2 2 0 0 1 2 2v4h1v12H9v-1Zm1.5-9.5v9h9v-9h-9ZM12 3a1 1 0 0 0-1 1c0 .5.4 1 1 1s1-.5 1-1-.4-1-1-1Zm0 9h6v2h-.5l-.5-1h-1v4h.8v1h-3.6v-1h.8v-4h-1l-.5 1H12v-2Z" fill-rule="nonzero"/></svg>',paste:'<svg width="24" height="24"><path d="M18 9V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v13h3V9h9ZM9 20H6a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h3.2A3 3 0 0 1 12 1a3 3 0 0 1 2.8 2H18a2 2 0 0 1 2 2v4h1v12H9v-1Zm1.5-9.5v9h9v-9h-9ZM12 3a1 1 0 0 0-1 1c0 .5.4 1 1 1s1-.5 1-1-.4-1-1-1Z" fill-rule="nonzero"/></svg>',"permanent-pen":'<svg width="24" height="24"><path d="M10.5 17.5 8 20H3v-3l3.5-3.5a2 2 0 0 1 0-3L14 3l1 1-7.3 7.3a1 1 0 0 0 0 1.4l3.6 3.6c.4.4 1 .4 1.4 0L20 9l1 1-7.6 7.6a2 2 0 0 1-2.8 0l-.1-.1Z" fill-rule="nonzero"/></svg>',plus:'<svg width="24" height="24"><path d="M12 4c.5 0 1 .4 1 .9V11h6a1 1 0 0 1 .1 2H13v6a1 1 0 0 1-2 .1V13H5a1 1 0 0 1-.1-2H11V5c0-.6.4-1 1-1Z"/></svg>',preferences:'<svg width="24" height="24"><path d="m20.1 13.5-1.9.2a5.8 5.8 0 0 1-.6 1.5l1.2 1.5c.4.4.3 1 0 1.4l-.7.7a1 1 0 0 1-1.4 0l-1.5-1.2a6.2 6.2 0 0 1-1.5.6l-.2 1.9c0 .5-.5.9-1 .9h-1a1 1 0 0 1-1-.9l-.2-1.9a5.8 5.8 0 0 1-1.5-.6l-1.5 1.2a1 1 0 0 1-1.4 0l-.7-.7a1 1 0 0 1 0-1.4l1.2-1.5a6.2 6.2 0 0 1-.6-1.5l-1.9-.2a1 1 0 0 1-.9-1v-1c0-.5.4-1 .9-1l1.9-.2a5.8 5.8 0 0 1 .6-1.5L5.2 7.3a1 1 0 0 1 0-1.4l.7-.7a1 1 0 0 1 1.4 0l1.5 1.2a6.2 6.2 0 0 1 1.5-.6l.2-1.9c0-.5.5-.9 1-.9h1c.5 0 1 .4 1 .9l.2 1.9a5.8 5.8 0 0 1 1.5.6l1.5-1.2a1 1 0 0 1 1.4 0l.7.7c.3.4.4 1 0 1.4l-1.2 1.5a6.2 6.2 0 0 1 .6 1.5l1.9.2c.5 0 .9.5.9 1v1c0 .5-.4 1-.9 1ZM12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z" fill-rule="evenodd"/></svg>',preview:'<svg width="24" height="24"><path d="M3.5 12.5c.5.8 1.1 1.6 1.8 2.3 2 2 4.2 3.2 6.7 3.2s4.7-1.2 6.7-3.2a16.2 16.2 0 0 0 2.1-2.8 15.7 15.7 0 0 0-2.1-2.8c-2-2-4.2-3.2-6.7-3.2a9.3 9.3 0 0 0-6.7 3.2A16.2 16.2 0 0 0 3.2 12c0 .2.2.3.3.5Zm-2.4-1 .7-1.2L4 7.8C6.2 5.4 8.9 4 12 4c3 0 5.8 1.4 8.1 3.8a18.2 18.2 0 0 1 2.8 3.7v1l-.7 1.2-2.1 2.5c-2.3 2.4-5 3.8-8.1 3.8-3 0-5.8-1.4-8.1-3.8a18.2 18.2 0 0 1-2.8-3.7 1 1 0 0 1 0-1Zm12-3.3a2 2 0 1 0 2.7 2.6 4 4 0 1 1-2.6-2.6Z" fill-rule="nonzero"/></svg>',print:'<svg width="24" height="24"><path d="M18 8H6a3 3 0 0 0-3 3v6h2v3h14v-3h2v-6a3 3 0 0 0-3-3Zm-1 10H7v-4h10v4Zm.5-5c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5 1.5.7 1.5 1.5-.7 1.5-1.5 1.5Zm.5-8H6v2h12V5Z" fill-rule="nonzero"/></svg>',quote:'<svg width="24" height="24"><path d="M7.5 17h.9c.4 0 .7-.2.9-.6L11 13V8c0-.6-.4-1-1-1H6a1 1 0 0 0-1 1v4c0 .6.4 1 1 1h2l-1.3 2.7a1 1 0 0 0 .8 1.3Zm8 0h.9c.4 0 .7-.2.9-.6L19 13V8c0-.6-.4-1-1-1h-4a1 1 0 0 0-1 1v4c0 .6.4 1 1 1h2l-1.3 2.7a1 1 0 0 0 .8 1.3Z" fill-rule="nonzero"/></svg>',redo:'<svg width="24" height="24"><path d="M17.6 10H12c-2.8 0-4.4 1.4-4.9 3.5-.4 2 .3 4 1.4 4.6a1 1 0 1 1-1 1.8c-2-1.2-2.9-4.1-2.3-6.8.6-3 3-5.1 6.8-5.1h5.6l-3.3-3.3a1 1 0 1 1 1.4-1.4l5 5a1 1 0 0 1 0 1.4l-5 5a1 1 0 0 1-1.4-1.4l3.3-3.3Z" fill-rule="nonzero"/></svg>',reload:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="m5 22.1-1.2-4.7v-.2a1 1 0 0 1 1-1l5 .4a1 1 0 1 1-.2 2l-2.2-.2a7.8 7.8 0 0 0 8.4.2 7.5 7.5 0 0 0 3.5-6.4 1 1 0 1 1 2 0 9.5 9.5 0 0 1-4.5 8 9.9 9.9 0 0 1-10.2 0l.4 1.4a1 1 0 1 1-2 .5ZM13.6 7.4c0-.5.5-1 1-.9l2.8.2a8 8 0 0 0-9.5-1 7.5 7.5 0 0 0-3.6 7 1 1 0 0 1-2 0 9.5 9.5 0 0 1 4.5-8.6 10 10 0 0 1 10.9.3l-.3-1a1 1 0 0 1 2-.5l1.1 4.8a1 1 0 0 1-1 1.2l-5-.4a1 1 0 0 1-.9-1Z"/></g></svg>',"remove-formatting":'<svg width="24" height="24"><path d="M13.2 6a1 1 0 0 1 0 .2l-2.6 10a1 1 0 0 1-1 .8h-.2a.8.8 0 0 1-.8-1l2.6-10H8a1 1 0 1 1 0-2h9a1 1 0 0 1 0 2h-3.8ZM5 18h7a1 1 0 0 1 0 2H5a1 1 0 0 1 0-2Zm13 1.5L16.5 18 15 19.5a.7.7 0 0 1-1-1l1.5-1.5-1.5-1.5a.7.7 0 0 1 1-1l1.5 1.5 1.5-1.5a.7.7 0 0 1 1 1L17.5 17l1.5 1.5a.7.7 0 0 1-1 1Z" fill-rule="evenodd"/></svg>',remove:'<svg width="24" height="24"><path d="M16 7h3a1 1 0 0 1 0 2h-1v9a3 3 0 0 1-3 3H9a3 3 0 0 1-3-3V9H5a1 1 0 1 1 0-2h3V6a3 3 0 0 1 3-3h2a3 3 0 0 1 3 3v1Zm-2 0V6c0-.6-.4-1-1-1h-2a1 1 0 0 0-1 1v1h4Zm2 2H8v9c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V9Zm-7 3a1 1 0 0 1 2 0v4a1 1 0 0 1-2 0v-4Zm4 0a1 1 0 0 1 2 0v4a1 1 0 0 1-2 0v-4Z" fill-rule="nonzero"/></svg>',"resize-handle":'<svg width="10" height="10"><g fill-rule="nonzero"><path d="M8.1 1.1A.5.5 0 1 1 9 2l-7 7A.5.5 0 1 1 1 8l7-7ZM8.1 5.1A.5.5 0 1 1 9 6l-3 3A.5.5 0 1 1 5 8l3-3Z"/></g></svg>',resize:'<svg width="24" height="24"><path d="M4 5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h6c.3 0 .5.1.7.3.2.2.3.4.3.7 0 .3-.1.5-.3.7a1 1 0 0 1-.7.3H7.4L18 16.6V13c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3.3 0 .5.1.7.3.2.2.3.4.3.7v6c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3h-6a1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h3.6L6 7.4V11c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3 1 1 0 0 1-.7-.3A1 1 0 0 1 4 11V5Z" fill-rule="evenodd"/></svg>',"restore-draft":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M17 13c0 .6-.4 1-1 1h-4V8c0-.6.4-1 1-1s1 .4 1 1v4h2c.6 0 1 .4 1 1Z"/><path d="M4.7 10H9a1 1 0 0 1 0 2H3a1 1 0 0 1-1-1V5a1 1 0 1 1 2 0v3l2.5-2.4a9.2 9.2 0 0 1 10.8-1.5A9 9 0 0 1 13.4 21c-2.4.1-4.7-.7-6.5-2.2a1 1 0 1 1 1.3-1.5 7.2 7.2 0 0 0 11.6-3.7 7 7 0 0 0-3.5-7.7A7.2 7.2 0 0 0 8 7L4.7 10Z" fill-rule="nonzero"/></g></svg>',"revision-history":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M17 13c0 .6-.4 1-1 1h-4V8c0-.6.4-1 1-1s1 .4 1 1v4h2c.6 0 1 .4 1 1Z"/><path d="M4.7 10H9a1 1 0 0 1 0 2H3a1 1 0 0 1-1-1V5a1 1 0 1 1 2 0v3l2.5-2.4a9.2 9.2 0 0 1 10.8-1.5A9 9 0 0 1 13.4 21c-2.4.1-4.7-.7-6.5-2.2a1 1 0 1 1 1.3-1.5 7.2 7.2 0 0 0 11.6-3.7 7 7 0 0 0-3.5-7.7A7.2 7.2 0 0 0 8 7L4.7 10Z" fill-rule="nonzero"/></g></svg>',"rotate-left":'<svg width="24" height="24"><path d="M4.7 10H9a1 1 0 0 1 0 2H3a1 1 0 0 1-1-1V5a1 1 0 1 1 2 0v3l2.5-2.4a9.2 9.2 0 0 1 10.8-1.5A9 9 0 0 1 13.4 21c-2.4.1-4.7-.7-6.5-2.2a1 1 0 1 1 1.3-1.5 7.2 7.2 0 0 0 11.6-3.7 7 7 0 0 0-3.5-7.7A7.2 7.2 0 0 0 8 7L4.7 10Z" fill-rule="nonzero"/></svg>',"rotate-right":'<svg width="24" height="24"><path d="M20 8V5a1 1 0 0 1 2 0v6c0 .6-.4 1-1 1h-6a1 1 0 0 1 0-2h4.3L16 7A7.2 7.2 0 0 0 7.7 6a7 7 0 0 0 3 13.1c1.9.1 3.7-.5 5-1.7a1 1 0 0 1 1.4 1.5A9.2 9.2 0 0 1 2.2 14c-.9-3.9 1-8 4.5-9.9 3.5-1.9 8-1.3 10.8 1.5L20 8Z" fill-rule="nonzero"/></svg>',rtl:'<svg width="24" height="24"><path d="M8 5h8v2h-2v12h-2V7h-2v12H8v-7c-.5 0-1 0-1.4-.3A3.4 3.4 0 0 1 4.8 10a3.3 3.3 0 0 1 0-2.8 3.4 3.4 0 0 1 1.8-1.8L8 5Zm12 11.2a1 1 0 1 1-1 1.6l-3-2a1 1 0 0 1 0-1.6l3-2a1 1 0 1 1 1 1.6L18.4 15l1.8 1.2Z" fill-rule="evenodd"/></svg>',save:'<svg width="24" height="24"><path d="M5 16h14a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-2c0-1.1.9-2 2-2Zm0 2v2h14v-2H5Zm10 0h2v2h-2v-2Zm-4-6.4L8.7 9.3a1 1 0 1 0-1.4 1.4l4 4c.4.4 1 .4 1.4 0l4-4a1 1 0 1 0-1.4-1.4L13 11.6V4a1 1 0 0 0-2 0v7.6Z" fill-rule="nonzero"/></svg>',search:'<svg width="24" height="24"><path d="M16 17.3a8 8 0 1 1 1.4-1.4l4.3 4.4a1 1 0 0 1-1.4 1.4l-4.4-4.3Zm-5-.3a6 6 0 1 0 0-12 6 6 0 0 0 0 12Z" fill-rule="nonzero"/></svg>',"select-all":'<svg width="24" height="24"><path d="M3 5h2V3a2 2 0 0 0-2 2Zm0 8h2v-2H3v2Zm4 8h2v-2H7v2ZM3 9h2V7H3v2Zm10-6h-2v2h2V3Zm6 0v2h2a2 2 0 0 0-2-2ZM5 21v-2H3c0 1.1.9 2 2 2Zm-2-4h2v-2H3v2ZM9 3H7v2h2V3Zm2 18h2v-2h-2v2Zm8-8h2v-2h-2v2Zm0 8a2 2 0 0 0 2-2h-2v2Zm0-12h2V7h-2v2Zm0 8h2v-2h-2v2Zm-4 4h2v-2h-2v2Zm0-16h2V3h-2v2ZM7 17h10V7H7v10Zm2-8h6v6H9V9Z" fill-rule="nonzero"/></svg>',selected:'<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2Zm3.6 10.9L7 12.3a.7.7 0 0 0-1 1L9.6 17 18 8.6a.7.7 0 0 0 0-1 .7.7 0 0 0-1 0l-7.4 7.3Z"/></svg>',send:'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="m13.3 22 7-18.3-18.3 7L9 15l4.3 7ZM18 6.8l-.7-.7L9.4 14l.7.7L18 6.8Z"/></svg>',settings:'<svg width="24" height="24"><path d="M11 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8v.3c0 .2 0 .3-.2.5l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 0 1-.2-.6V8H5a1 1 0 1 1 0-2h2v-.3c0-.2 0-.3.2-.5l.5-.2h2.5c.3 0 .4 0 .6.2l.2.5V6ZM8 8h2V6H8v2Zm9 2.8v.2h2c.6 0 1 .4 1 1s-.4 1-1 1h-2v.3c0 .2 0 .3-.2.5l-.6.2h-2.4c-.3 0-.4 0-.6-.2a.7.7 0 0 1-.2-.6V13H5a1 1 0 0 1 0-2h8v-.3c0-.2 0-.3.2-.5l.6-.2h2.4c.3 0 .4 0 .6.2l.2.6ZM14 13h2v-2h-2v2Zm-3 2.8v.2h8c.6 0 1 .4 1 1s-.4 1-1 1h-8v.3c0 .2 0 .3-.2.5l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 0 1-.2-.6V18H5a1 1 0 0 1 0-2h2v-.3c0-.2 0-.3.2-.5l.5-.2h2.5c.3 0 .4 0 .6.2l.2.6ZM8 18h2v-2H8v2Z" fill-rule="evenodd"/></svg>',sharpen:'<svg width="24" height="24"><path d="m16 6 4 4-8 9-8-9 4-4h8Zm-4 10.2 5.5-6.2-.1-.1H12v-.3h5.1l-.2-.2H12V9h4.6l-.2-.2H12v-.3h4.1l-.2-.2H12V8h3.6l-.2-.2H8.7L6.5 10l.1.1H12v.3H6.9l.2.2H12v.3H7.3l.2.2H12v.3H7.7l.3.2h4v.3H8.2l.2.2H12v.3H8.6l.3.2H12v.3H9l.3.2H12v.3H9.5l.2.2H12v.3h-2l.2.2H12v.3h-1.6l.2.2H12v.3h-1.1l.2.2h.9v.3h-.7l.2.2h.5v.3h-.3l.3.2Z" fill-rule="evenodd"/></svg>',sourcecode:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M9.8 15.7c.3.3.3.8 0 1-.3.4-.9.4-1.2 0l-4.4-4.1a.8.8 0 0 1 0-1.2l4.4-4.2c.3-.3.9-.3 1.2 0 .3.3.3.8 0 1.1L6 12l3.8 3.7ZM14.2 15.7c-.3.3-.3.8 0 1 .4.4.9.4 1.2 0l4.4-4.1c.3-.3.3-.9 0-1.2l-4.4-4.2a.8.8 0 0 0-1.2 0c-.3.3-.3.8 0 1.1L18 12l-3.8 3.7Z"/></g></svg>',"spell-check":'<svg width="24" height="24"><path d="M6 8v3H5V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h2c.3 0 .5.1.7.3.2.2.3.4.3.7v6H8V8H6Zm0-3v2h2V5H6Zm13 0h-3v5h3v1h-3a1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h3v1Zm-5 1.5-.1.7c-.1.2-.3.3-.6.3.3 0 .5.1.6.3l.1.7V10c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3h-3V4h3c.3 0 .5.1.7.3.2.2.3.4.3.7v1.5ZM13 10V8h-2v2h2Zm0-3V5h-2v2h2Zm3 5 1 1-6.5 7L7 15.5l1.3-1 2.2 2.2L16 12Z" fill-rule="evenodd"/></svg>',"strike-through":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M15.6 8.5c-.5-.7-1-1.1-1.3-1.3-.6-.4-1.3-.6-2-.6-2.7 0-2.8 1.7-2.8 2.1 0 1.6 1.8 2 3.2 2.3 4.4.9 4.6 2.8 4.6 3.9 0 1.4-.7 4.1-5 4.1A6.2 6.2 0 0 1 7 16.4l1.5-1.1c.4.6 1.6 2 3.7 2 1.6 0 2.5-.4 3-1.2.4-.8.3-2-.8-2.6-.7-.4-1.6-.7-2.9-1-1-.2-3.9-.8-3.9-3.6C7.6 6 10.3 5 12.4 5c2.9 0 4.2 1.6 4.7 2.4l-1.5 1.1Z"/><path d="M5 11h14a1 1 0 0 1 0 2H5a1 1 0 0 1 0-2Z" fill-rule="nonzero"/></g></svg>',subscript:'<svg width="24" height="24"><path d="m10.4 10 4.6 4.6-1.4 1.4L9 11.4 4.4 16 3 14.6 7.6 10 3 5.4 4.4 4 9 8.6 13.6 4 15 5.4 10.4 10ZM21 19h-5v-1l1-.8 1.7-1.6c.3-.4.5-.8.5-1.2 0-.3 0-.6-.2-.7-.2-.2-.5-.3-.9-.3a2 2 0 0 0-.8.2l-.7.3-.4-1.1 1-.6 1.2-.2c.8 0 1.4.3 1.8.7.4.4.6.9.6 1.5s-.2 1.1-.5 1.6a8 8 0 0 1-1.3 1.3l-.6.6h2.6V19Z" fill-rule="nonzero"/></svg>',superscript:'<svg width="24" height="24"><path d="M15 9.4 10.4 14l4.6 4.6-1.4 1.4L9 15.4 4.4 20 3 18.6 7.6 14 3 9.4 4.4 8 9 12.6 13.6 8 15 9.4Zm5.9 1.6h-5v-1l1-.8 1.7-1.6c.3-.5.5-.9.5-1.3 0-.3 0-.5-.2-.7-.2-.2-.5-.3-.9-.3l-.8.2-.7.4-.4-1.2c.2-.2.5-.4 1-.5.3-.2.8-.2 1.2-.2.8 0 1.4.2 1.8.6.4.4.6 1 .6 1.6 0 .5-.2 1-.5 1.5l-1.3 1.4-.6.5h2.6V11Z" fill-rule="nonzero"/></svg>',"table-caption":'<svg width="24" height="24"><g fill-rule="nonzero"><rect width="12" height="2" x="3" y="4" rx="1"/><path d="M19 8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-8c0-1.1.9-2 2-2h14ZM5 15v3h6v-3H5Zm14 0h-6v3h6v-3Zm0-5h-6v3h6v-3ZM5 13h6v-3H5v3Z"/></g></svg>',"table-cell-classes":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M13 4v9H3V6c0-1.1.9-2 2-2h8Zm-2 2H5v5h6V6Z"/><path fill-rule="nonzero" d="M13 4h6a2 2 0 0 1 2 2v7h-8v-2h6V6h-6V4Z" opacity=".2"/><path d="m18 20-2.6 1.6.7-3-2.4-2 3.1-.2 1.2-2.9 1.2 2.9 3.1.2-2.4 2 .7 3z"/><path fill-rule="nonzero" d="M3 13v5c0 1.1.9 2 2 2h8v-7h-2v5H5v-5H3Z" opacity=".2"/></g></svg>',"table-cell-properties":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm-8 9H5v5h6v-5Zm8 0h-6v5h6v-5Zm-8-7H5v5h6V6Z"/></svg>',"table-cell-select-all":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm0 2H5v12h14V6Z"/><path d="M13 6v5h6v2h-6v5h-2v-5H5v-2h6V6h2Z" opacity=".2"/></g></svg>',"table-cell-select-inner":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm0 2H5v12h14V6Z" opacity=".2"/><path d="M13 6v5h6v2h-6v5h-2v-5H5v-2h6V6h2Z"/></g></svg>',"table-classes":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v7h-8v7H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm-8 9H5v5h6v-5Zm8-7h-6v5h6V6Zm-8 0H5v5h6V6Z"/><path d="m18 20-2.6 1.6.7-3-2.4-2 3.1-.2 1.2-2.9 1.2 2.9 3.1.2-2.4 2 .7 3z"/></g></svg>',"table-delete-column":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm-4 4h-2V6h-2v2H9V6H5v12h4v-2h2v2h2v-2h2v2h4V6h-4v2Zm.3.5 1 1.2-3 2.3 3 2.3-1 1.2L12 13l-3.3 2.6-1-1.2 3-2.3-3-2.3 1-1.2L12 11l3.3-2.5Z"/></svg>',"table-delete-row":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm0 2H5v3h2.5v2H5v2h2.5v2H5v3h14v-3h-2.5v-2H19v-2h-2.5V9H19V6Zm-4.7 1.8 1.2 1L13 12l2.6 3.3-1.2 1-2.3-3-2.3 3-1.2-1L11 12 8.5 8.7l1.2-1 2.3 3 2.3-3Z"/></svg>',"table-delete-table":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14ZM5 6v12h14V6H5Z"/><path d="m14.4 8.6 1.1 1-2.4 2.4 2.4 2.4-1.1 1.1-2.4-2.4-2.4 2.4-1-1.1 2.3-2.4-2.3-2.4 1-1 2.4 2.3z"/></g></svg>',"table-insert-column-after":'<svg width="24" height="24"><path fill-rule="nonzero" d="M20 4c.6 0 1 .4 1 1v2a1 1 0 0 1-2 0V6h-8v12h8v-1a1 1 0 0 1 2 0v2c0 .5-.4 1-.9 1H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h15ZM9 13H5v5h4v-5Zm7-5c.5 0 1 .4 1 .9V11h2a1 1 0 0 1 .1 2H17v2a1 1 0 0 1-2 .1V13h-2a1 1 0 0 1-.1-2H15V9c0-.6.4-1 1-1ZM9 6H5v5h4V6Z"/></svg>',"table-insert-column-before":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a1 1 0 0 1-1-1v-2a1 1 0 0 1 2 0v1h8V6H5v1a1 1 0 1 1-2 0V5c0-.6.4-1 1-1h15Zm0 9h-4v5h4v-5ZM8 8c.5 0 1 .4 1 .9V11h2a1 1 0 0 1 .1 2H9v2a1 1 0 0 1-2 .1V13H5a1 1 0 0 1-.1-2H7V9c0-.6.4-1 1-1Zm11-2h-4v5h4V6Z"/></svg>',"table-insert-row-above":'<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4a1 1 0 1 1 0 2H5v6h14V6h-1a1 1 0 0 1 0-2h2c.6 0 1 .4 1 1v13a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5c0-.6.4-1 1-1h2Zm5 10H5v4h6v-4Zm8 0h-6v4h6v-4ZM12 3c.5 0 1 .4 1 .9V6h2a1 1 0 0 1 0 2h-2v2a1 1 0 0 1-2 .1V8H9a1 1 0 0 1 0-2h2V4c0-.6.4-1 1-1Z"/></svg>',"table-insert-row-after":'<svg width="24" height="24"><path fill-rule="nonzero" d="M12 13c.5 0 1 .4 1 .9V16h2a1 1 0 0 1 .1 2H13v2a1 1 0 0 1-2 .1V18H9a1 1 0 0 1-.1-2H11v-2c0-.6.4-1 1-1Zm6 7a1 1 0 0 1 0-2h1v-6H5v6h1a1 1 0 0 1 0 2H4a1 1 0 0 1-1-1V6c0-1.1.9-2 2-2h14a2 2 0 0 1 2 2v13c0 .5-.4 1-.9 1H18ZM11 6H5v4h6V6Zm8 0h-6v4h6V6Z"/></svg>',"table-left-header":'<svg width="24" height="24"><path d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm0 9h-4v5h4v-5Zm-6 0H9v5h4v-5Zm0-7H9v5h4V6Zm6 0h-4v5h4V6Z"/></svg>',"table-merge-cells":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14ZM5 15.5V18h3v-2.5H5Zm14-5h-9V18h9v-7.5ZM19 6h-4v2.5h4V6ZM8 6H5v2.5h3V6Zm5 0h-3v2.5h3V6Zm-8 7.5h3v-3H5v3Z"/></svg>',"table-row-numbering-rtl":'<svg width="24" height="24"><path d="M6 4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2h12a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2H6Zm0 12h8v3H6v-3Zm11 0c.6 0 1 .4 1 1v1a1 1 0 0 1-2 0v-1c0-.6.4-1 1-1ZM6 11h8v3H6v-3Zm11 0c.6 0 1 .4 1 1v1a1 1 0 0 1-2 0v-1c0-.6.4-1 1-1ZM6 6h8v3H6V6Zm11 0c.6 0 1 .4 1 1v1a1 1 0 1 1-2 0V7c0-.6.4-1 1-1Z"/></svg>',"table-row-numbering":'<svg width="24" height="24"><path d="M18 4a2 2 0 0 1 2 2v13a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h12Zm0 12h-8v3h8v-3ZM7 16a1 1 0 0 0-1 1v1a1 1 0 0 0 2 0v-1c0-.6-.4-1-1-1Zm11-5h-8v3h8v-3ZM7 11a1 1 0 0 0-1 1v1a1 1 0 0 0 2 0v-1c0-.6-.4-1-1-1Zm11-5h-8v3h8V6ZM7 6a1 1 0 0 0-1 1v1a1 1 0 1 0 2 0V7c0-.6-.4-1-1-1Z"/></svg>',"table-row-properties":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14ZM5 15v3h6v-3H5Zm14 0h-6v3h6v-3Zm0-9h-6v3h6V6ZM5 9h6V6H5v3Z"/></svg>',"table-split-cells":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14ZM8 15.5H5V18h3v-2.5Zm11-5h-9V18h9v-7.5Zm-2.5 1 1 1-2 2 2 2-1 1-2-2-2 2-1-1 2-2-2-2 1-1 2 2 2-2Zm-8.5-1H5v3h3v-3ZM19 6h-4v2.5h4V6ZM8 6H5v2.5h3V6Zm5 0h-3v2.5h3V6Z"/></svg>',"table-top-header":'<svg width="24" height="24"><path d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm-8 11H5v3h6v-3Zm8 0h-6v3h6v-3Zm0-5h-6v3h6v-3ZM5 13h6v-3H5v3Z"/></svg>',table:'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14ZM5 14v4h6v-4H5Zm14 0h-6v4h6v-4Zm0-6h-6v4h6V8ZM5 12h6V8H5v4Z"/></svg>',"template-add":'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M9 12v4H5a2 2 0 0 0-2 2v3h9.3a6 6 0 0 1-.3-2H5v-1h7a6 6 0 0 1 .8-2H11v-5l-.8-.6a3 3 0 1 1 3.6 0l-.8.6v4.7a6 6 0 0 1 2-1.9V12a5 5 0 1 0-6 0Z"/><path d="M18 15c.5 0 1 .4 1 .9V18h2a1 1 0 0 1 .1 2H19v2a1 1 0 0 1-2 .1V20h-2a1 1 0 0 1-.1-2H17v-2c0-.6.4-1 1-1Z"/></svg>',template:'<svg width="24" height="24"><path d="M19 19v-1H5v1h14ZM9 16v-4a5 5 0 1 1 6 0v4h4a2 2 0 0 1 2 2v3H3v-3c0-1.1.9-2 2-2h4Zm4 0v-5l.8-.6a3 3 0 1 0-3.6 0l.8.6v5h2Z" fill-rule="nonzero"/></svg>',"temporary-placeholder":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M9 7.6V6h2.5V4.5a.5.5 0 1 1 1 0V6H15v1.6a8 8 0 1 1-6 0Zm-2.6 5.3a.5.5 0 0 0 .3.6c.3 0 .6 0 .6-.3l.1-.2a5 5 0 0 1 3.3-2.8c.3-.1.4-.4.4-.6-.1-.3-.4-.5-.6-.4a6 6 0 0 0-4.1 3.7Z"/><circle cx="14" cy="4" r="1"/><circle cx="12" cy="2" r="1"/><circle cx="10" cy="4" r="1"/></g></svg>',"text-color":'<svg width="24" height="24"><g fill-rule="evenodd"><path class="tox-icon-text-color__color" d="M3 18h18v3H3z"/><path d="M8.7 16h-.8a.5.5 0 0 1-.5-.6l2.7-9c.1-.3.3-.4.5-.4h2.8c.2 0 .4.1.5.4l2.7 9a.5.5 0 0 1-.5.6h-.8a.5.5 0 0 1-.4-.4l-.7-2.2c0-.3-.3-.4-.5-.4h-3.4c-.2 0-.4.1-.5.4l-.7 2.2c0 .3-.2.4-.4.4Zm2.6-7.6-.6 2a.5.5 0 0 0 .5.6h1.6a.5.5 0 0 0 .5-.6l-.6-2c0-.3-.3-.4-.5-.4h-.4c-.2 0-.4.1-.5.4Z"/></g></svg>',"text-size-decrease":'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M14 5a1 1 0 1 1 0 2h-4v11a1 1 0 1 1-2 0V7H4a1 1 0 0 1 0-2h10ZM14 12a1 1 0 1 0 0 2h6a1 1 0 1 0 0-2h-6Z"/></svg>',"text-size-increase":'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M14 5a1 1 0 1 1 0 2h-4v11a1 1 0 1 1-2 0V7H4a1 1 0 0 1 0-2h10ZM17 9a1 1 0 0 0-1 1v2h-2a1 1 0 1 0 0 2h2v2a1 1 0 1 0 2 0v-2h2a1 1 0 1 0 0-2h-2v-2c0-.6-.4-1-1-1Z"/></svg>',toc:'<svg width="24" height="24"><path d="M5 5c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 1 1 0-2Zm3 0h11c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 1 1 0-2Zm-3 8c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2Zm3 0h11c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2Zm0-4c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 1 1 0-2Zm3 0h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm-3 8c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2Zm3 0h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Z" fill-rule="evenodd"/></svg>',translate:'<svg width="24" height="24"><path d="m12.7 14.3-.3.7-.4.7-2.2-2.2-3.1 3c-.3.4-.8.4-1 0a.7.7 0 0 1 0-1l3.1-3A12.4 12.4 0 0 1 6.7 9H8a10.1 10.1 0 0 0 1.7 2.4c.5-.5 1-1.1 1.4-1.8l.9-2H4.7a.7.7 0 1 1 0-1.5h4.4v-.7c0-.4.3-.8.7-.8.4 0 .7.4.7.8v.7H15c.4 0 .8.3.8.7 0 .4-.4.8-.8.8h-1.4a12.3 12.3 0 0 1-1 2.4 13.5 13.5 0 0 1-1.7 2.3l1.9 1.8Zm4.3-3 2.7 7.3a.5.5 0 0 1-.4.7 1 1 0 0 1-1-.7l-.6-1.5h-3.4l-.6 1.5a1 1 0 0 1-1 .7.5.5 0 0 1-.4-.7l2.7-7.4a1 1 0 0 1 2 0Zm-2.2 4.4h2.4L16 12.5l-1.2 3.2Z" fill-rule="evenodd"/></svg>',typography:'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M17 5a1 1 0 1 1 0 2h-4v11a1 1 0 1 1-2 0V7H7a1 1 0 0 1 0-2h10Z"/><path d="m17.5 14 .8-1.7 1.7-.8-1.7-.8-.8-1.7-.8 1.7-1.7.8 1.7.8.8 1.7ZM7 14l1 2 2 1-2 1-1 2-1-2-2-1 2-1 1-2Z"/></svg>',underline:'<svg width="24" height="24"><path d="M16 5c.6 0 1 .4 1 1v5.5a4 4 0 0 1-.4 1.8l-1 1.4a5.3 5.3 0 0 1-5.5 1 5 5 0 0 1-1.6-1c-.5-.4-.8-.9-1.1-1.4a4 4 0 0 1-.4-1.8V6c0-.6.4-1 1-1s1 .4 1 1v5.5c0 .3 0 .6.2 1l.6.7a3.3 3.3 0 0 0 2.2.8 3.4 3.4 0 0 0 2.2-.8c.3-.2.4-.5.6-.8l.2-.9V6c0-.6.4-1 1-1ZM8 17h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2Z" fill-rule="evenodd"/></svg>',undo:'<svg width="24" height="24"><path d="M6.4 8H12c3.7 0 6.2 2 6.8 5.1.6 2.7-.4 5.6-2.3 6.8a1 1 0 0 1-1-1.8c1.1-.6 1.8-2.7 1.4-4.6-.5-2.1-2.1-3.5-4.9-3.5H6.4l3.3 3.3a1 1 0 1 1-1.4 1.4l-5-5a1 1 0 0 1 0-1.4l5-5a1 1 0 0 1 1.4 1.4L6.4 8Z" fill-rule="nonzero"/></svg>',unlink:'<svg width="24" height="24"><path d="M6.2 12.3a1 1 0 0 1 1.4 1.4l-2 2a2 2 0 1 0 2.6 2.8l4.8-4.8a1 1 0 0 0 0-1.4 1 1 0 1 1 1.4-1.3 2.9 2.9 0 0 1 0 4L9.6 20a3.9 3.9 0 0 1-5.5-5.5l2-2Zm11.6-.6a1 1 0 0 1-1.4-1.4l2.1-2a2 2 0 1 0-2.7-2.8L11 10.3a1 1 0 0 0 0 1.4A1 1 0 1 1 9.6 13a2.9 2.9 0 0 1 0-4L14.4 4a3.9 3.9 0 0 1 5.5 5.5l-2 2ZM7.6 6.3a.8.8 0 0 1-1 1.1L3.3 4.2a.7.7 0 1 1 1-1l3.2 3.1ZM5.1 8.6a.8.8 0 0 1 0 1.5H3a.8.8 0 0 1 0-1.5H5Zm5-3.5a.8.8 0 0 1-1.5 0V3a.8.8 0 0 1 1.5 0V5Zm6 11.8a.8.8 0 0 1 1-1l3.2 3.2a.8.8 0 0 1-1 1L16 17Zm-2.2 2a.8.8 0 0 1 1.5 0V21a.8.8 0 0 1-1.5 0V19Zm5-3.5a.7.7 0 1 1 0-1.5H21a.8.8 0 0 1 0 1.5H19Z" fill-rule="nonzero"/></svg>',unlock:'<svg width="24" height="24"><path d="M16 5c.8 0 1.5.3 2.1.9.6.6.9 1.3.9 2.1v3h-2V8a1 1 0 0 0-.3-.7A1 1 0 0 0 16 7h-2a1 1 0 0 0-.7.3 1 1 0 0 0-.3.7v3h.3c.2 0 .3 0 .5.2l.2.6v7.4c0 .3 0 .4-.2.6l-.6.2H4.8c-.3 0-.4 0-.6-.2a.7.7 0 0 1-.2-.6v-7.4c0-.3 0-.4.2-.6l.5-.2H11V8c0-.8.3-1.5.9-2.1.6-.6 1.3-.9 2.1-.9h2Z" fill-rule="evenodd"/></svg>',"unordered-list":'<svg width="24" height="24"><path d="M11 5h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm0 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm0 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2ZM4.5 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1Zm0 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1Zm0 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1Z" fill-rule="evenodd"/></svg>',unselected:'<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2Zm0 1a1 1 0 0 0-1 1v12c0 .6.4 1 1 1h12c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H6Z"/></svg>',upload:'<svg width="24" height="24"><path d="M18 19v-2a1 1 0 0 1 2 0v3c0 .6-.4 1-1 1H5a1 1 0 0 1-1-1v-3a1 1 0 0 1 2 0v2h12ZM11 6.4 8.7 8.7a1 1 0 0 1-1.4-1.4l4-4a1 1 0 0 1 1.4 0l4 4a1 1 0 1 1-1.4 1.4L13 6.4V16a1 1 0 0 1-2 0V6.4Z" fill-rule="nonzero"/></svg>',"add-file":'<svg height="24" width="24"><path d="M2 7h2V4h3V2H4a2 2 0 0 0-2 2zm20 0h-2V4h-3V2h3a2 2 0 0 1 2 2zm0 2h-2v6h2zm0 8h-2v3h-3v2h3a2 2 0 0 0 2-2zM2 9h2v6H2zm0 8h2v3h3v2H4a2 2 0 0 1-2-2zm7 5v-2h6v2zm6-20v2H9V2zM6 17h12l-4-5-3 3.8-2-2.6z"/><path d="M2 7h2V4h3V2H4a2 2 0 0 0-2 2zm20 0h-2V4h-3V2h3a2 2 0 0 1 2 2zm0 2h-2v6h2zm0 8h-2v3h-3v2h3a2 2 0 0 0 2-2zM2 9h2v6H2zm0 8h2v3h3v2H4a2 2 0 0 1-2-2zm7 5v-2h6v2zm6-20v2H9V2zM6 17h12l-4-5-3 3.8-2-2.6z"/><path d="M6 17h12l-4-5-3 3.8-2-2.6z"/><path d="M6 17h12l-4-5-3 3.8-2-2.6z"/><path d="M6 17h12l-4-5-3 3.8-2-2.6z"/><path d="M6 17h12l-4-5-3 3.8-2-2.6z"/></svg>',adjustments:'<svg width="24" height="24"><path d="M16 11a3 3 0 1 1 2.8-4H21v2h-2.2a3 3 0 0 1-2.8 2Zm0-2a1 1 0 1 1 0-2 1 1 0 0 1 0 2ZM3 9h8V7H3v2Zm5 10a3 3 0 1 0-2.8-4H3v2h2.2A3 3 0 0 0 8 19Zm0-2a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm13 0h-8v-2h8v2Z"/></svg>',"alt-text":'<svg width="24" height="24"><path d="M3 20a2 2 0 0 1-1.4-.6A2 2 0 0 1 1 18V6c0-.6.2-1 .6-1.4A2 2 0 0 1 3 4h18c.6 0 1 .2 1.4.6.4.4.6.9.6 1.4v12c0 .6-.2 1-.6 1.4a2 2 0 0 1-1.4.6H3Zm0-2h18V6H3v12Zm1.5-3H6v-1.5h1.5V15H9v-5a1 1 0 0 0-.3-.7A1 1 0 0 0 8 9H5.5a1 1 0 0 0-.7.3 1 1 0 0 0-.3.7v5ZM6 12v-1.5h1.5V12H6Z"/><path d="M11 15V9h1.3v4.5h2V15H11Zm5.8-4.5V15h1.4v-4.5h1.3V9h-4v1.5h1.3Z"/></svg>',blur:'<svg width="24" height="24"><path d="M19.3 9.3a1 1 0 0 0-.3.7c0 .3.1.5.3.7.2.2.4.3.7.3s.5-.1.7-.3a1 1 0 0 0 .3-.7 1 1 0 0 0-.3-.7A1 1 0 0 0 20 9a1 1 0 0 0-.7.3Zm-16 0a1 1 0 0 0-.3.7c0 .3.1.5.3.7.2.2.4.3.7.3s.5-.1.7-.3A1 1 0 0 0 5 10a1 1 0 0 0-.3-.7A1 1 0 0 0 4 9a1 1 0 0 0-.7.3Zm16 6a1 1 0 0 0-.3.7c0 .3.1.5.3.7.2.2.4.3.7.3s.5-.1.7-.3a1 1 0 0 0 .3-.7 1 1 0 0 0-.3-.7 1 1 0 0 0-.7-.3 1 1 0 0 0-.7.3Zm-16 0a1 1 0 0 0-.3.7c0 .3.1.5.3.7.2.2.4.3.7.3s.5-.1.7-.3A1 1 0 0 0 5 16a1 1 0 0 0-.3-.7A1 1 0 0 0 4 15a1 1 0 0 0-.7.3Zm5-11A1 1 0 0 0 8 5a1 1 0 0 0 1 1c.3 0 .5-.1.7-.3A1 1 0 0 0 10 5a1 1 0 0 0-.3-.7A1 1 0 0 0 9 4a1 1 0 0 0-.7.3Zm6 0a1 1 0 0 0-.3.7 1 1 0 0 0 1 1c.3 0 .5-.1.7-.3A1 1 0 0 0 16 5a1 1 0 0 0-.3-.7A1 1 0 0 0 15 4a1 1 0 0 0-.7.3Zm-6 16a1 1 0 0 0-.3.7c0 .3.1.5.3.7.2.2.4.3.7.3s.5-.1.7-.3a1 1 0 0 0 .3-.7 1 1 0 0 0-.3-.7A1 1 0 0 0 9 20a1 1 0 0 0-.7.3Zm6 0a1 1 0 0 0-.3.7c0 .3.1.5.3.7.2.2.4.3.7.3s.5-.1.7-.3a1 1 0 0 0 .3-.7 1 1 0 0 0-.3-.7 1 1 0 0 0-.7-.3 1 1 0 0 0-.7.3ZM7.6 8.6A2 2 0 0 0 7 10c0 .6.2 1 .6 1.4.4.4.8.6 1.4.6s1-.2 1.4-.6c.4-.4.6-.8.6-1.4s-.2-1-.6-1.4A2 2 0 0 0 9 8a2 2 0 0 0-1.4.6Zm0 6A2 2 0 0 0 7 16c0 .6.2 1 .6 1.4.4.4.8.6 1.4.6s1-.2 1.4-.6c.4-.4.6-.8.6-1.4s-.2-1-.6-1.4A2 2 0 0 0 9 14a2 2 0 0 0-1.4.6Zm6-6A2 2 0 0 0 13 10c0 .6.2 1 .6 1.4.4.4.8.6 1.4.6s1-.2 1.4-.6c.4-.4.6-.8.6-1.4s-.2-1-.6-1.4A2 2 0 0 0 15 8a2 2 0 0 0-1.4.6Zm0 6A2 2 0 0 0 13 16c0 .6.2 1 .6 1.4.4.4.8.6 1.4.6s1-.2 1.4-.6c.4-.4.6-.8.6-1.4s-.2-1-.6-1.4A2 2 0 0 0 15 14a2 2 0 0 0-1.4.6Z"/></svg>',box:'<svg width="24" height="24"><path d="M3.8 7a1 1 0 0 0-.7.6l-.1 3V13.8a3.5 3.5 0 0 0 4 2.7c.8-.2 1.4-.5 2-1l.3-.3.3.2c.7.7 1.4 1 2.4 1.1 1.2 0 2.4-.6 3-1.6.9-1.2.8-2.8 0-4a3.7 3.7 0 0 0-2-1.2c-.4-.1-1.2-.1-1.6 0a3.4 3.4 0 0 0-1.7 1l-.3.2-.2-.1c-.4-.5-1.2-1-2-1.1-.6-.2-1.5 0-2 .2H5V9c0-1.3 0-1.3-.3-1.6a1 1 0 0 0-1-.3Zm12 2.6c-.3.2-.5.4-.6.8v.6l.9 1 .7 1v.1l-.8 1-.7 1a1 1 0 0 0 0 .7 1 1 0 0 0 1.3.6c.2 0 .3-.2 1-1l.5-.7.6.8.7.8c.4.3 1 .3 1.3 0l.2-.3a1 1 0 0 0 0-.8l-.8-1.2-.7-1a26 26 0 0 0 1.5-2 .8.8 0 0 0 .1-.4c0-.4-.1-.7-.5-.9H20c-.4 0-.5 0-1.2.8l-.7.8-.6-.7-.7-.9a1 1 0 0 0-1 0Zm-9 2 .4.1c.3.1.6.5.7.8l.1.6v.6c-.6 1-2 1.2-2.7.3-.3-.3-.3-.5-.3-1v-.5c.3-.5.7-.8 1.1-1a1.5 1.5 0 0 1 .7 0Zm5.7 0c.4 0 .8.4 1 .8l.2.6-.1.7c-.5.9-1.6 1.1-2.4.6a1.4 1.4 0 0 1-.6-1.1 1.4 1.4 0 0 1 .5-1.2 1.5 1.5 0 0 1 1.4-.4Z"/></svg>',camera:'<svg height="24" width="24"><g clip-rule="evenodd" fill-rule="evenodd"><path d="M10 5.4a1 1 0 0 1 .8-.4h4.4a1 1 0 0 1 .8.4l1.2 1.8h2.3A2.5 2.5 0 0 1 22 9.6v8a2.5 2.5 0 0 1-2.5 2.5h-13A2.5 2.5 0 0 1 4 17.6v-8a2.5 2.5 0 0 1 2.5-2.4h2.3zM11.4 7l-1.2 1.7a1 1 0 0 1-.8.5h-3a.5.5 0 0 0-.4.4v8a.5.5 0 0 0 .5.5h13a.5.5 0 0 0 .5-.5v-8a.5.5 0 0 0-.5-.4h-2.9a1 1 0 0 1-.8-.5L14.6 7z"/><path d="M13 11.4a2 2 0 1 0 0 3.8 2 2 0 0 0 0-3.8zm-4 1.9a4 4 0 1 1 8 0 4 4 0 0 1-8 0z"/></g></svg>',caption:'<svg height="24" width="24"><path d="M6 16h8v-2H6zm10 0h2v-2h-2zM4 20a2 2 0 0 1-1.5-.6A2 2 0 0 1 2 18V6c0-.6.2-1 .6-1.4A2 2 0 0 1 4 4h16c.6 0 1 .2 1.4.6.4.4.6.9.6 1.4v12c0 .6-.2 1-.6 1.4a2 2 0 0 1-1.4.6zm0-2h16V6H4z"/></svg>',dropbox:'<svg height="24" width="24"><path clip-rule="evenodd" d="m6.4 9.3-3-2a1 1 0 0 1 0-1.6l4-2.5a1 1 0 0 1 1 0L12 5.5l3.6-2.3a1 1 0 0 1 1 0l4 2.5a1 1 0 0 1 0 1.7l-3 1.9 3 1.9a1 1 0 0 1 0 1.6l-2.9 1.9V16c0 .3-.1.6-.4.8l-4.5 3a1 1 0 0 1-1.2 0l-4.4-3a1 1 0 0 1-.5-.9v-1l-3.2-2.2a1 1 0 0 1 0-1.6zm3 0L12 7.5l2.6 1.8L12 11zM8.9 15v.4l3.3 2.3 3.4-2.3v-.2L12 13l-3.1 2zm-1-10-2 1.4 2 1.3 2-1.3zm8.2 0-2 1.4 2 1.3 2-1.3zm-2 6.9 2-1.3 2 1.3-2 1.3-2-1.3zm-8.3 0 2-1.3L10 12l-2 1.3-2-1.3z" fill-rule="evenodd"/></svg>',evernote:'<svg width="24" height="24"><path fill-rule="evenodd" d="m9.5 3-.3.1-2.6 2.6C3.8 8.5 4 8.2 4 8.7c0 1.3.3 3 .6 4.3.5 2 1.1 3.2 2 3.7l1.2.3c1 .2 1.5.2 2.2.2 1.3 0 1.7 0 2.2-.4.3-.2.3-.4.4-1a38.4 38.4 0 0 1 .3-.4l.3.1 1.8.1h1.6v-1.8H14l-.1-.2a6.8 6.8 0 0 1-.5-1c-.2-.4-.3-.6-.5-.7a.8.8 0 0 0-.5-.1.9.9 0 0 0-.8.5l-.4 1.6-.3 1.5H9.4l-2-.3a1 1 0 0 1-.1-.2A10.1 10.1 0 0 1 6 9.7v-.2h4l.5-.5V5H12c.4.2.7.7.8 1.1a1 1 0 0 0 .2.6c.2.2.3.2 1 .3 1.2 0 2 .2 2.5.6.4.2.8.7 1 1.2.3 1.2.5 4 .3 6.4 0 1.8-.4 3.4-.8 4h-.7a8 8 0 0 1-.8 0c-.2 0-.3-.3-.2-.5a.5.5 0 0 1 .4-.3h.9v-1.8H16c-.7 0-.9 0-1.2.2-.9.4-1.4 1.2-1.4 2.1l.1.4.1.2a1 1 0 0 1 .1.2c.3.7.8 1.2 1.4 1.3l1.2.1h1.2a2 2 0 0 0 1-.8 9 9 0 0 0 1.1-4.3c.2-3 0-6.3-.4-7.7A4.3 4.3 0 0 0 16 5.3a7 7 0 0 0-1.3-.2 7.2 7.2 0 0 1-.4 0 5.5 5.5 0 0 1 0-.3c-.2-.5-.6-1-1.2-1.4a3 3 0 0 0-.5-.2c-.4-.2-.5-.2-1.8-.2a26.5 26.5 0 0 0-1.3 0Zm-.8 4v.7H7.2l.7-.8.8-.7v.7Zm7 3.5c-.4 0-.7.5-.9 1v.7h.3c.7 0 1.1.2 1.5.6l.3.2.3-.6V11a1 1 0 0 0-.6-.4 2 2 0 0 0-.8 0Z" clip-rule="evenodd"/></svg>',exposure:'<svg width="24" height="24"><path d="M5 21a2 2 0 0 1-1.4-.6A2 2 0 0 1 3 19V5c0-.6.2-1 .6-1.4A2 2 0 0 1 5 3h14c.6 0 1 .2 1.4.6.4.4.6.8.6 1.4v14c0 .6-.2 1-.6 1.4a2 2 0 0 1-1.4.6H5Zm0-2h14V5L5 19Zm9.5-1v-2h-2v-1.5h2v-2H16v2h2V16h-2v2h-1.5ZM6 8.5h5V7H6v1.5Z"/></svg>',fb:'<svg width="24" height="24"><path fill-rule="evenodd" d="M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-11 6.7V14H8.1v-2.5h2v-1C10 8.2 11.5 7 12.8 7H16v2.5h-2.4c-.8 0-1 .7-1 1.3v.7h3.2l-1 2.5h-2v5a7 7 0 1 0-2.8-.2Z" clip-rule="evenodd"/></svg>',flickr:'<svg width="24" height="24"><path d="M8.2 15.3c1.7 0 3.1-1.4 3.1-3.1A3.2 3.2 0 0 0 8.1 9 3.2 3.2 0 0 0 5 12.2c0 1.7 1.4 3 3.2 3Zm7.6 0c1.7 0 3.2-1.4 3.2-3.1a3.2 3.2 0 0 0-6.3 0c0 1.7 1.4 3 3.1 3Z"/></svg>',folder:'<svg width="24" height="24"><path fill-rule="evenodd" d="M5.6 6a.6.6 0 0 0-.6.6v11.2a.6.6 0 0 0 .6.6h12.8a.6.6 0 0 0 .6-.6V9a.6.6 0 0 0-.6-.6h-7.2a1 1 0 0 1-.8-.4L9 6H5.6ZM3.8 4.8A2.6 2.6 0 0 1 5.6 4h4a1 1 0 0 1 .8.4l1.3 2h6.7A2.6 2.6 0 0 1 21 9v8.8a2.6 2.6 0 0 1-2.6 2.6H5.6A2.6 2.6 0 0 1 3 17.8V6.6c0-.7.3-1.4.8-1.8Z" clip-rule="evenodd"/></svg>',"google-drive":'<svg height="24" width="24"><path clip-rule="evenodd" d="M8.7 4.5a1 1 0 0 1 .9-.5h4.8a1 1 0 0 1 .9.5l5.6 9.7a1 1 0 0 1 0 1l-2.4 4.2a1 1 0 0 1-.9.5H6.4a1 1 0 0 1-.9-.5l-2.4-4.2a1 1 0 0 1 0-1zM10.2 6l-4.5 7.7h2.5L12.7 6h-2.5zm4.2 1 4.4 7.7-1.2 2.2-4.4-7.7zM12 11.2l-1.5 2.5h3zm2.6 4.5H5.7L7 17.9h8.9l-1.3-2.2z" fill-rule="evenodd"/></svg>',"google-photos":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12.4 3c-.8 0-1.4.7-1.4 1.4v3.2a5 5 0 0 0-8 4c0 .8.6 1.4 1.4 1.4h3.2a5 5 0 0 0-1 3 5 5 0 0 0 5 5c.8 0 1.4-.6 1.4-1.4v-3.2a5 5 0 0 0 8-4c0-.8-.7-1.4-1.4-1.4h-3.2a5 5 0 0 0-4-8Zm.6 8V5a3 3 0 0 1 2.4 3 3 3 0 0 1-2.4 3Zm-2 0H5a3 3 0 0 1 3-2.4 3 3 0 0 1 3 2.4Zm2 2a3 3 0 0 0 3 2.4 3 3 0 0 0 3-2.4h-6Zm-4.4 3a3 3 0 0 1 2.4-3v6a3 3 0 0 1-2.4-3Z" clip-rule="evenodd"/></svg>',grayscale:'<svg height="24" width="24"><g clip-rule="evenodd" fill-rule="evenodd"><path d="M12 15v2a5 5 0 0 0 0-10v2a3 3 0 1 0 0 6zm0 0a3 3 0 1 0 0-6z"/><path d="M5 21a2 2 0 0 1-1.4-.6A2 2 0 0 1 3 19V5c0-.6.2-1 .6-1.4A2 2 0 0 1 5 3h14c.6 0 1 .2 1.4.6.4.4.6.8.6 1.4v14c0 .6-.2 1-.6 1.4a2 2 0 0 1-1.4.6zm7-2h7V5h-7v2a5 5 0 0 0 0 10z"/></g></svg>',huddle:'<svg height="24" width="24"><path d="M10.3 5.6V8h.8v-2l3.5 2 4.3-2.5L14.6 3l-4.3 2.6zM14.6 8v5.2l4.3-2.6V5.6L14.6 8zM6 13.3v2.5h.9v-2l3.4 2 4.3-2.5-4.3-2.6zm4.3 2.6V21l4.3-2.6v-5.1l-4.3 2.6z"/></svg>',"image-decorative":'<svg width="24" height="24"><path d="M12 10c.3 0 .5-.1.7-.3A1 1 0 0 0 13 9a1 1 0 0 0-.3-.7A1 1 0 0 0 12 8a1 1 0 0 0-.7.3 1 1 0 0 0-.3.7 1 1 0 0 0 1 1Zm0 6a3 3 0 0 1-1.8-.5A3 3 0 0 1 9.1 14a2 2 0 0 0-.2 0 3 3 0 0 1-2.5-1 3 3 0 0 1-.9-2.2A3 3 0 0 1 6.2 9a3.4 3.4 0 0 1-.5-1 3 3 0 0 1-.2-1 3 3 0 0 1 1-2.2A3 3 0 0 1 8.8 4H9a3 3 0 0 1 1.1-1.4A3 3 0 0 1 12 2a3 3 0 0 1 1.8.5c.5.4.9.9 1.1 1.5h.2a3 3 0 0 1 2.5.8 3 3 0 0 1 .9 2.3c0 .3 0 .7-.2 1a2.8 2.8 0 0 1-.5.9l.5 1 .2 1a3 3 0 0 1-1 2.2 3 3 0 0 1-2.4.9 1.8 1.8 0 0 0-.2 0 3 3 0 0 1-1.1 1.4 3 3 0 0 1-1.8.5Zm0 7a8.7 8.7 0 0 1 .7-3.5 9.2 9.2 0 0 1 2-2.8 9.2 9.2 0 0 1 2.8-2A8.6 8.6 0 0 1 21 14a8.6 8.6 0 0 1-.7 3.5 9.2 9.2 0 0 1-2 2.8 9.2 9.2 0 0 1-2.8 2 8.6 8.6 0 0 1-3.5.7Zm2.5-2.5a6.8 6.8 0 0 0 2.4-1.5 6.8 6.8 0 0 0 1.7-2.6c-1 .4-1.8 1-2.6 1.7a6.8 6.8 0 0 0-1.5 2.4ZM12 23a8.6 8.6 0 0 0-.7-3.5 9.2 9.2 0 0 0-2-2.9 9.2 9.2 0 0 0-2.8-1.9A8.6 8.6 0 0 0 3 14a8.7 8.7 0 0 0 .7 3.5 9.2 9.2 0 0 0 2 2.9 9.2 9.2 0 0 0 2.8 1.9 8.6 8.6 0 0 0 3.5.7Zm-2.5-2.5A6.8 6.8 0 0 1 7.2 19a6.8 6.8 0 0 1-1.6-2.6c.9.4 1.7 1 2.5 1.7a6.8 6.8 0 0 1 1.6 2.4Zm5.9-8.4c.3 0 .5-.1.8-.4.2-.2.3-.5.3-.8 0-.2 0-.4-.2-.6a1.3 1.3 0 0 0-.5-.4l-.8-.4a3 3 0 0 1-.2.5 3.8 3.8 0 0 1-.2.5 2.5 2.5 0 0 1-.3.4 4 4 0 0 1-.4.4l.8.6a.8.8 0 0 0 .3.1h.4ZM15 8.5l.8-.4.5-.4.2-.6a1.1 1.1 0 0 0-.3-.8 1 1 0 0 0-.8-.4 1.1 1.1 0 0 0-.7.2l-.8.6.4.4.3.4a3.9 3.9 0 0 1 .4 1Zm-4-2.3a2.7 2.7 0 0 1 1-.2 2.7 2.7 0 0 1 1 .2l.2-1.1c0-.3-.1-.6-.4-.8A1.2 1.2 0 0 0 12 4c-.3 0-.6.1-.8.3-.3.2-.4.5-.3.8v1.1Zm1 7.8c.3 0 .6-.1.8-.3.3-.2.4-.5.3-.8v-1.1a2.7 2.7 0 0 1-1.1.2 2.7 2.7 0 0 1-1-.2l-.2 1.1c0 .3.1.6.4.8.2.2.5.3.8.3ZM9 8.5a3 3 0 0 1 .4-1l.3-.4.4-.4-.8-.6A.9.9 0 0 0 9 6a1.2 1.2 0 0 0-.3 0c-.4 0-.6 0-.9.3a1.1 1.1 0 0 0-.3.8c0 .2 0 .4.2.6l.5.4.9.4Zm-.3 3.6H9l.3-.2.8-.6a5.5 5.5 0 0 1-.4-.4 2.1 2.1 0 0 1-.3-.4 3.8 3.8 0 0 1-.2-.5 3 3 0 0 1-.1-.5l-1 .4-.4.4a1.1 1.1 0 0 0-.2.6c0 .3.2.6.4.8.2.2.4.4.7.4Z"/></svg>',"image-enhancements":'<svg height="24" width="24"><path d="M5.3 21a2 2 0 0 1-1.5-.6 2 2 0 0 1-.6-1.4V5c0-.6.2-1 .6-1.4A2 2 0 0 1 5.2 3H13v2H5.2v14h14v-8h2v8c0 .6-.1 1-.5 1.4a2 2 0 0 1-1.4.6z"/><path d="M11 9a4 4 0 0 0 4 4 4 4 0 0 0-4 4 4 4 0 0 0-4-4 4 4 0 0 0 4-4zm5.5-6c.2 2.1 2.2 4.1 4.5 4.5-2.3.4-4.3 2.4-4.5 4.5A5.2 5.2 0 0 0 12 7.5 5.2 5.2 0 0 0 16.5 3z"/></svg>',instagram:'<svg height="24" width="24"><path clip-rule="evenodd" d="M10.1 9a4 4 0 1 1 4.4 6.6A4 4 0 0 1 10.1 9zm2.2 1.3a2 2 0 1 0 0 4 2 2 0 0 0 0-4z" fill-rule="evenodd"/><path d="M16 9.3a1.3 1.3 0 1 0 0-2.6 1.3 1.3 0 0 0 0 2.6z"/><path clip-rule="evenodd" d="M3 6a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v12a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3zm3-1a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1z" fill-rule="evenodd"/></svg>',onedrive:'<svg height="24" width="24"><path d="M4 13.7h1zm16 .7h-1zm-11.7-4A4.4 4.4 0 0 1 12.1 8V6a6.4 6.4 0 0 0-5.6 3.4l1.8 1zM12.1 8c2 0 3.6 1.4 4 2.8l2-.5A6.3 6.3 0 0 0 12 6v2zm8.1 6.8-9.8-5.5-1 1.8 9.8 5.5 1-1.8zm-9.8-5.5A5 5 0 0 0 3 13.7h2A3 3 0 0 1 9.5 11l1-1.8zM3 13.7a5 5 0 0 0 1 2.8l1.5-1.1a3 3 0 0 1-.5-1.7zm15.8 1.6a2.3 2.3 0 0 1-2 1.4v2a4.3 4.3 0 0 0 3.9-2.6zm-2 1.4H8v2h8.7zm-8.8 0a3 3 0 0 1-2.5-1.3L4 16.5a5 5 0 0 0 4 2.2v-2zm12.7-.6c.2-.6.3-1.1.3-1.7h-2c0 .3 0 .6-.2.9zm.3-1.7c0-3-3.1-5.1-6-4l.8 1.9a2.3 2.3 0 0 1 3.2 2h2zm-6-4L4.4 15l.8 1.9 10.7-4.6-.7-1.8z"/></svg>',"revert-changes":'<svg height="24" width="24"><path d="m8.9 18.8.4 3.2H13v-2h-2v-2.6a4.6 4.6 0 0 1-1.6-.6 5.9 5.9 0 0 1-1.3-1l-2.5 1-1-1.7 2.2-1.6a4 4 0 0 1-.2-.7 5.9 5.9 0 0 1 0-.8v-.8l.2-.8-2.2-1.6 1-1.7 2.5 1a6 6 0 0 1 1.2-.9l1.4-.6.4-2.6h2l.3 2.6A5.6 5.6 0 0 1 16 8.2l2.5-1 1 1.6-2.2 1.7.2.7v.8a5 5 0 0 1 0 1h2a2.6 2.6 0 0 0 0-.5V11.3l2.6-2-2.8-4.7-3 1.3a8.2 8.2 0 0 0-.5-.4 3.8 3.8 0 0 0-.6-.3L14.8 2H9.3l-.4 3.2a5 5 0 0 0-1.2.7l-3-1.3L2 9.4l2.6 2V12.6l-2.6 2 2.7 4.7 3-1.3a8 8 0 0 0 1.2.7z"/><path d="m14.5 20.3 2.1-2-2.1-2.2 1.4-1.4 2.1 2.1 2.1-2 1.4 1.3-2 2.1 2 2.1-1.4 1.4-2.1-2-2.1 2zM12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"/></svg>',saturation:'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 20.5a6 6 0 1 1-5.9-10.2 6 6 0 1 1 11.8 0A6 6 0 1 1 12 20.5Zm-1.1-7.7a6 6 0 0 0-.2.3 4.3 4.3 0 0 1-2-1.3c.9.1 1.6.5 2.2 1Zm2.4.3a6 6 0 0 0-.2-.3 4.3 4.3 0 0 1 2.2-1 4.3 4.3 0 0 1-2 1.3ZM12.2 15a6.3 6.3 0 0 1-.4 0 4.3 4.3 0 0 0 .2 2.5 4.3 4.3 0 0 0 .2-2.5Zm.9 4.2a6 6 0 0 0 .8-4.5 6 6 0 0 0 3.4-2.8 4.3 4.3 0 0 1-1.3 8.4 4.3 4.3 0 0 1-2.9-1.1Zm-2.2 0a4.3 4.3 0 1 1-4.2-7.3 6 6 0 0 0 3.4 2.8 6 6 0 0 0 .8 4.5Zm-3-9.2a4.3 4.3 0 1 1 8.3 0 6 6 0 0 0-4.2 1.5A6 6 0 0 0 7.8 10Z" clip-rule="evenodd"/></svg>',"transform-image":'<svg height="24" width="24"><path d="M3 21v-6h2V9H3V3h6v2h6V3h6v6h-2v6h2v6h-6v-2H9v2zm6-4h6v-2h2V9h-2V7H9v2H7v6h2zM5 7h2V5H5zm12 0h2V5h-2zm0 12h2v-2h-2zM5 19h2v-2H5z"/></svg>',vibrance:'<svg height="24" width="24"><path clip-rule="evenodd" d="M12 20 22 4H2zm2.6-8 1.3-2H8l1.3 2h5.2zm-1.2 2h-2.8l1.4 2.2zm5-8L17 8H7L5.6 6h12.8z" fill-rule="evenodd"/></svg>',vk:'<svg width="24" height="24"><path fill-rule="evenodd" d="M14.8 17.4a2 2 0 0 1-1.3.7 8 8 0 0 1-7.7-3.6c-1.4-2-2.2-4.4-2.6-5.7L3 8.6A2 2 0 0 1 5 6h2.5c.4 0 .8.1 1.2.4A2 2 0 0 1 9.8 6h3.5a2 2 0 0 1 1.4.6 2 2 0 0 1 1.5-.6h2.4a2 2 0 0 1 2 2.5c-.5 1.5-1.2 2.6-1.8 3.6a12.5 12.5 0 0 1 2 3.2A2 2 0 0 1 19 18h-2.6a2 2 0 0 1-1.3-.5 6.9 6.9 0 0 1-.3-.2Zm.5-2.5-1.2-1a3 3 0 0 0-.8-.2v2.4h-1.7a5.6 5.6 0 0 1-.3 0c-3-.7-4.7-3.7-5.6-6.1A38.1 38.1 0 0 1 5 8.1V8h2.5a80.5 80.5 0 0 1 1.2 2.5c.6 1.2 1.2 2 2 2.1V9l-.9-1h3.5v4.1a5 5 0 0 0 .4-.3c.7-.7 1.2-1.4 1.6-2.2l.2-.3.7-1.3h2.4a8.5 8.5 0 0 1-.8 2l-1.3 2-.3.3a10.5 10.5 0 0 1 2.8 3.8h-2.6l-.8-.9a20.6 20.6 0 0 0-.3-.3Z" clip-rule="evenodd"/></svg>',warmth:'<svg height="24" width="24"><path d="M12 21.1c-1.4 0-2.6-.5-3.6-1.5s-1.5-2.1-1.5-3.5c0-.8.2-1.6.6-2.2A5 5 0 0 1 8.9 12v-6c0-.8.3-1.5 1-2.1a2.9 2.9 0 0 1 2-.9c.9 0 1.6.3 2.2.9.5.6.8 1.3.8 2.1v6a5 5 0 0 1 1.5 1.8A4.9 4.9 0 0 1 17 16c0 1.4-.5 2.6-1.4 3.5s-2.2 1.5-3.6 1.5zm-3-5h6c0-.5-.2-1-.4-1.4a3 3 0 0 0-.9-1l-.8-.6v-7a1 1 0 0 0-.3-.7A1 1 0 0 0 12 5a1 1 0 0 0-.7.3 1 1 0 0 0-.3.7v7l-.8.6a2.9 2.9 0 0 0-.9 1 3 3 0 0 0-.3 1.4z"/></svg>',user:'<svg width="24" height="24"><path d="M12 24a12 12 0 1 1 0-24 12 12 0 0 1 0 24Zm-8.7-5.3a11 11 0 0 0 17.4 0C19.4 16.3 14.6 15 12 15c-2.6 0-7.4 1.3-8.7 3.7ZM12 13c2.2 0 4-2 4-4.5S14.2 4 12 4 8 6 8 8.5 9.8 13 12 13Z" fill-rule="nonzero"/></svg>',"vertical-align":'<svg width="24" height="24"><g fill-rule="nonzero"><rect width="18" height="2" x="3" y="11" rx="1"/><path d="M12 2c.6 0 1 .4 1 1v4l2-1.3a1 1 0 0 1 1.2 1.5l-.1.1-4.1 3-4-3a1 1 0 0 1 1-1.7l2 1.5V3c0-.6.4-1 1-1zm0 11.8 4 2.9a1 1 0 0 1-1 1.7l-2-1.5V21c0 .5-.4 1-.9 1H12a1 1 0 0 1-1-1v-4l-2 1.3a1 1 0 0 1-1.2-.1l-.1-.1a1 1 0 0 1 .1-1.3l.1-.1 4.1-3z"/></g></svg>',visualblocks:'<svg width="24" height="24"><path d="M9 19v2H7v-2h2Zm-4 0v2a2 2 0 0 1-2-2h2Zm8 0v2h-2v-2h2Zm8 0a2 2 0 0 1-2 2v-2h2Zm-4 0v2h-2v-2h2ZM15 7a1 1 0 0 1 0 2v7a1 1 0 0 1-2 0V9h-1v7a1 1 0 0 1-2 0v-4a2.5 2.5 0 0 1-.2-5H15ZM5 15v2H3v-2h2Zm16 0v2h-2v-2h2ZM5 11v2H3v-2h2Zm16 0v2h-2v-2h2ZM5 7v2H3V7h2Zm16 0v2h-2V7h2ZM5 3v2H3c0-1.1.9-2 2-2Zm8 0v2h-2V3h2Zm6 0a2 2 0 0 1 2 2h-2V3ZM9 3v2H7V3h2Zm8 0v2h-2V3h2Z" fill-rule="evenodd"/></svg>',visualchars:'<svg width="24" height="24"><path d="M10 5h7a1 1 0 0 1 0 2h-1v11a1 1 0 0 1-2 0V7h-2v11a1 1 0 0 1-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 0 1 6.8 10a3.3 3.3 0 0 1 0-2.8 3.4 3.4 0 0 1 1.8-1.8L10 5Z" fill-rule="evenodd"/></svg>',warning:'<svg width="24" height="24"><path d="M19.8 18.3c.2.5.3.9 0 1.2-.1.3-.5.5-1 .5H5.2c-.5 0-.9-.2-1-.5-.3-.3-.2-.7 0-1.2L11 4.7l.5-.5.5-.2c.2 0 .3 0 .5.2.2 0 .3.3.5.5l6.8 13.6ZM12 18c.3 0 .5-.1.7-.3.2-.2.3-.4.3-.7a1 1 0 0 0-.3-.7 1 1 0 0 0-.7-.3 1 1 0 0 0-.7.3 1 1 0 0 0-.3.7c0 .3.1.5.3.7.2.2.4.3.7.3Zm.7-3 .3-4a1 1 0 0 0-.3-.7 1 1 0 0 0-.7-.3 1 1 0 0 0-.7.3 1 1 0 0 0-.3.7l.3 4h1.4Z" fill-rule="evenodd"/></svg>',"zoom-in":'<svg width="24" height="24"><path d="M16 17.3a8 8 0 1 1 1.4-1.4l4.3 4.4a1 1 0 0 1-1.4 1.4l-4.4-4.3Zm-5-.3a6 6 0 1 0 0-12 6 6 0 0 0 0 12Zm-1-9a1 1 0 0 1 2 0v6a1 1 0 0 1-2 0V8Zm-2 4a1 1 0 0 1 0-2h6a1 1 0 0 1 0 2H8Z" fill-rule="nonzero"/></svg>',"zoom-out":'<svg width="24" height="24"><path d="M16 17.3a8 8 0 1 1 1.4-1.4l4.3 4.4a1 1 0 0 1-1.4 1.4l-4.4-4.3Zm-5-.3a6 6 0 1 0 0-12 6 6 0 0 0 0 12Zm-3-5a1 1 0 0 1 0-2h6a1 1 0 0 1 0 2H8Z" fill-rule="nonzero"/></svg>'}})),M3e}var F3e;function sZe(){return F3e||(F3e=1,nZe()),P3e}sZe();var $3e={},B3e={},V3e;function oZe(){return V3e||(V3e=1,function(){const e=Object.getPrototypeOf,t=(o,u,m)=>{var v;return m(o,u.prototype)?!0:((v=o.constructor)===null||v===void 0?void 0:v.name)===u.name},n=o=>{const u=typeof o;return o===null?"null":u==="object"&&Array.isArray(o)?"array":u==="object"&&t(o,String,(m,v)=>v.isPrototypeOf(m))?"string":u},i=o=>u=>n(u)===o,a=o=>u=>typeof u===o,l=o=>u=>o===u,f=(o,u)=>h(o)&&t(o,u,(m,v)=>e(m)===v),d=i("string"),h=i("object"),b=o=>f(o,Object),S=i("array"),k=l(null),T=a("boolean"),O=l(void 0),P=o=>o==null,B=o=>!P(o),W=a("function"),Z=a("number"),Y=(o,u)=>{if(S(o)){for(let m=0,v=o.length;m<v;++m)if(!u(o[m]))return!1;return!0}return!1},z=()=>{},q=o=>()=>o(),ne=(o,u)=>(...m)=>o(u.apply(null,m)),ue=(o,u)=>m=>o(u(m)),J=o=>()=>o,ce=o=>o,ge=(o,u)=>o===u;function de(o,...u){return(...m)=>{const v=u.concat(m);return o.apply(null,v)}}const he=o=>u=>!o(u),ie=o=>()=>{throw new Error(o)},Be=o=>o(),$e=J(!1),Ue=J(!0);class V{constructor(u,m){this.tag=u,this.value=m}static some(u){return new V(!0,u)}static none(){return V.singletonNone}fold(u,m){return this.tag?m(this.value):u()}isSome(){return this.tag}isNone(){return!this.tag}map(u){return this.tag?V.some(u(this.value)):V.none()}bind(u){return this.tag?u(this.value):V.none()}exists(u){return this.tag&&u(this.value)}forall(u){return!this.tag||u(this.value)}filter(u){return!this.tag||u(this.value)?this:V.none()}getOr(u){return this.tag?this.value:u}or(u){return this.tag?this:u}getOrThunk(u){return this.tag?this.value:u()}orThunk(u){return this.tag?this:u()}getOrDie(u){if(this.tag)return this.value;throw new Error(u!=null?u:"Called getOrDie on None")}static from(u){return B(u)?V.some(u):V.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(u){this.tag&&u(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?"some(".concat(this.value,")"):"none()"}}V.singletonNone=new V(!1);const Ye=Array.prototype.slice,Fe=Array.prototype.indexOf,St=Array.prototype.push,Dt=(o,u)=>Fe.call(o,u),He=(o,u)=>{const m=Dt(o,u);return m===-1?V.none():V.some(m)},ft=(o,u)=>Dt(o,u)>-1,ht=(o,u)=>{for(let m=0,v=o.length;m<v;m++){const C=o[m];if(u(C,m))return!0}return!1},At=(o,u)=>{const m=[];for(let v=0;v<o;v++)m.push(u(v));return m},hn=(o,u)=>{const m=[];for(let v=0;v<o.length;v+=u){const C=Ye.call(o,v,v+u);m.push(C)}return m},ct=(o,u)=>{const m=o.length,v=new Array(m);for(let C=0;C<m;C++){const x=o[C];v[C]=u(x,C)}return v},Ht=(o,u)=>{for(let m=0,v=o.length;m<v;m++){const C=o[m];u(C,m)}},ye=(o,u)=>{for(let m=o.length-1;m>=0;m--){const v=o[m];u(v,m)}},lo=(o,u)=>{const m=[],v=[];for(let C=0,x=o.length;C<x;C++){const I=o[C];(u(I,C)?m:v).push(I)}return{pass:m,fail:v}},jn=(o,u)=>{const m=[];for(let v=0,C=o.length;v<C;v++){const x=o[v];u(x,v)&&m.push(x)}return m},so=(o,u,m)=>(ye(o,(v,C)=>{m=u(m,v,C)}),m),Xs=(o,u,m)=>(Ht(o,(v,C)=>{m=u(m,v,C)}),m),ot=(o,u,m)=>{for(let v=0,C=o.length;v<C;v++){const x=o[v];if(u(x,v))return V.some(x);if(m(x,v))break}return V.none()},Qe=(o,u)=>ot(o,u,$e),Ot=(o,u)=>{for(let m=0,v=o.length;m<v;m++){const C=o[m];if(u(C,m))return V.some(m)}return V.none()},Nt=o=>{const u=[];for(let m=0,v=o.length;m<v;++m){if(!S(o[m]))throw new Error("Arr.flatten item "+m+" was not an array, input: "+o);St.apply(u,o[m])}return u},Ve=(o,u)=>Nt(ct(o,u)),dn=(o,u)=>{for(let m=0,v=o.length;m<v;++m){const C=o[m];if(u(C,m)!==!0)return!1}return!0},kn=o=>{const u=Ye.call(o,0);return u.reverse(),u},Bt=(o,u)=>jn(o,m=>!ft(u,m)),Le=(o,u)=>{const m={};for(let v=0,C=o.length;v<C;v++){const x=o[v];m[String(x)]=u(x,v)}return m},je=o=>[o],Ze=(o,u)=>{const m=Ye.call(o,0);return m.sort(u),m},pt=(o,u)=>u>=0&&u<o.length?V.some(o[u]):V.none(),Vt=o=>pt(o,0),sn=o=>pt(o,o.length-1),Wn=W(Array.from)?Array.from:o=>Ye.call(o),ts=(o,u)=>{for(let m=0;m<o.length;m++){const v=u(o[m],m);if(v.isSome())return v}return V.none()},Zn=Object.keys,yo=Object.hasOwnProperty,Qs=(o,u)=>{const m=Zn(o);for(let v=0,C=m.length;v<C;v++){const x=m[v],I=o[x];u(I,x)}},Rs=(o,u)=>xr(o,(m,v)=>({k:v,v:u(m,v)})),xr=(o,u)=>{const m={};return Qs(o,(v,C)=>{const x=u(v,C);m[x.k]=x.v}),m},Po=o=>(u,m)=>{o[m]=u},jo=(o,u,m,v)=>{Qs(o,(C,x)=>{(u(C,x)?m:v)(C,x)})},Mo=(o,u)=>{const m={},v={};return jo(o,u,Po(m),Po(v)),{t:m,f:v}},Do=(o,u)=>{const m={};return jo(o,u,Po(m),z),m},er=(o,u)=>{const m=[];return Qs(o,(v,C)=>{m.push(u(v,C))}),m},Zs=(o,u)=>{const m=Zn(o);for(let v=0,C=m.length;v<C;v++){const x=m[v],I=o[x];if(u(I,x,o))return V.some(I)}return V.none()},Xa=o=>er(o,ce),bn=(o,u)=>qs(o,u)?V.from(o[u]):V.none(),qs=(o,u)=>yo.call(o,u),Qr=(o,u)=>qs(o,u)&&o[u]!==void 0&&o[u]!==null,lt=(o,u,m=ge)=>o.exists(v=>m(v,u)),yt=(o,u,m=ge)=>Zo(o,u,m).getOr(o.isNone()&&u.isNone()),_n=o=>{const u=[],m=v=>{u.push(v)};for(let v=0;v<o.length;v++)o[v].each(m);return u},us=o=>{const u=[];for(let m=0;m<o.length;m++){const v=o[m];if(v.isSome())u.push(v.getOrDie());else return V.none()}return V.some(u)},Zo=(o,u,m)=>o.isSome()&&u.isSome()?V.some(m(o.getOrDie(),u.getOrDie())):V.none(),br=(o,u,m,v)=>o.isSome()&&u.isSome()&&m.isSome()?V.some(v(o.getOrDie(),u.getOrDie(),m.getOrDie())):V.none(),Vn=(o,u)=>o!=null?V.some(u(o)):V.none(),Kt=(o,u)=>o?V.some(u):V.none(),Ps=(o,u)=>o+u,Bo=(o,u)=>o.substring(u),Nr=(o,u,m)=>u===""||o.length>=u.length&&o.substr(m,m+u.length)===u,uc=(o,u)=>Wr(o,u)?Bo(o,u.length):o,Hi=(o,u)=>mi(o,u)?o:Ps(o,u),ir=(o,u,m=0,v)=>{const C=o.indexOf(u,m);return C!==-1?O(v)?!0:C+u.length<=v:!1},Wr=(o,u)=>Nr(o,u,0),mi=(o,u)=>Nr(o,u,o.length-u.length),Ti=(o=>u=>u.replace(o,""))(/^\s+|\s+$/g),_i=o=>o.length>0,yr=o=>!_i(o),Ui=o=>{const u=parseFloat(o);return isNaN(u)?V.none():V.some(u)},Es=o=>o.style!==void 0&&W(o.style.getPropertyValue),_t=(o,u)=>{const v=(u||document).createElement("div");if(v.innerHTML=o,!v.hasChildNodes()||v.childNodes.length>1){const C="HTML does not have a single root node";throw console.error(C,o),new Error(C)}return _r(v.childNodes[0])},Hn=(o,u)=>{const v=(u||document).createElement(o);return _r(v)},Cs=(o,u)=>{const v=(u||document).createTextNode(o);return _r(v)},_r=o=>{if(o==null)throw new Error("Node cannot be null or undefined");return{dom:o}},Xt={fromHtml:_t,fromTag:Hn,fromText:Cs,fromDom:_r,fromPoint:(o,u,m)=>V.from(o.dom.elementFromPoint(u,m)).map(_r)},Ii=typeof window<"u"?window:Function("return this;")(),kl=(o,u)=>{let m=u!=null?u:Ii;for(let v=0;v<o.length&&m!==void 0&&m!==null;++v)m=m[o[v]];return m},ll=(o,u)=>{const m=o.split(".");return kl(m,u)},_o=(o,u)=>ll(o,u),Qn=(o,u)=>{const m=_o(o,u);if(m==null)throw new Error(o+" not available on this browser");return m},js=Object.getPrototypeOf,Ao=o=>Qn("HTMLElement",o),Tr=o=>{const u=ll("ownerDocument.defaultView",o);return h(o)&&(Ao(u).prototype.isPrototypeOf(o)||/^HTML\w*Element$/.test(js(o).constructor.name))},Go=9,hr=11,Ai=1,fc=3,tr=o=>o.dom.nodeName.toLowerCase(),xl=o=>o.dom.nodeType,cl=o=>u=>xl(u)===o,gr=o=>hi(o)&&Tr(o.dom),hi=cl(Ai),ii=cl(fc),Mu=cl(Go),Ac=cl(hr),ba=o=>u=>hi(u)&&tr(u)===o,ar=(o,u)=>{const m=o.dom;if(m.nodeType!==Ai)return!1;{const v=m;if(v.matches!==void 0)return v.matches(u);if(v.msMatchesSelector!==void 0)return v.msMatchesSelector(u);if(v.webkitMatchesSelector!==void 0)return v.webkitMatchesSelector(u);if(v.mozMatchesSelector!==void 0)return v.mozMatchesSelector(u);throw new Error("Browser lacks native selectors")}},zf=o=>o.nodeType!==Ai&&o.nodeType!==Go&&o.nodeType!==hr||o.childElementCount===0,ya=(o,u)=>{const m=u===void 0?document:u.dom;return zf(m)?[]:ct(m.querySelectorAll(o),Xt.fromDom)},Nu=(o,u)=>{const m=u===void 0?document:u.dom;return zf(m)?V.none():V.from(m.querySelector(o)).map(Xt.fromDom)},co=(o,u)=>o.dom===u.dom,uo=(o,u)=>{const m=o.dom,v=u.dom;return m===v?!1:m.contains(v)},Fr=o=>Xt.fromDom(o.dom.ownerDocument),zi=o=>Mu(o)?o:Fr(o),lr=o=>Xt.fromDom(zi(o).dom.documentElement),pc=o=>Xt.fromDom(zi(o).dom.defaultView),ai=o=>V.from(o.dom.parentNode).map(Xt.fromDom),mu=o=>ai(o),jl=o=>V.from(o.dom.parentElement).map(Xt.fromDom),bs=(o,u)=>{const m=W(u)?u:$e;let v=o.dom;const C=[];for(;v.parentNode!==null&&v.parentNode!==void 0;){const x=v.parentNode,I=Xt.fromDom(x);if(C.push(I),m(I)===!0)break;v=x}return C},Hs=o=>V.from(o.dom.offsetParent).map(Xt.fromDom),No=o=>V.from(o.dom.nextSibling).map(Xt.fromDom),So=o=>ct(o.dom.childNodes,Xt.fromDom),Si=(o,u)=>{const m=o.dom.childNodes;return V.from(m[u]).map(Xt.fromDom)},Ja=o=>Si(o,0),ad=(o,u)=>({element:o,offset:u}),Wf=(o,u)=>{const m=So(o);return m.length>0&&u<m.length?ad(m[u],0):ad(o,u)},hu=o=>Ac(o)&&B(o.dom.host),za=o=>Xt.fromDom(o.dom.getRootNode()),ia=o=>hu(o)?o:Xt.fromDom(zi(o).dom.body),qc=o=>jf(o).isSome(),jf=o=>{const u=za(o);return hu(u)?V.some(u):V.none()},Vm=o=>Xt.fromDom(o.dom.host),Qa=o=>{if(B(o.target)){const u=Xt.fromDom(o.target);if(hi(u)&&Te(u)&&o.composed&&o.composedPath){const m=o.composedPath();if(m)return Vt(m)}}return V.from(o.target)},Te=o=>B(o.dom.shadowRoot),We=o=>{const u=ii(o)?o.dom.parentNode:o.dom;if(u==null||u.ownerDocument===null)return!1;const m=u.ownerDocument;return jf(Xt.fromDom(u)).fold(()=>m.body.contains(u),ue(We,Vm))},rt=()=>zt(Xt.fromDom(document)),zt=o=>{const u=o.dom.body;if(u==null)throw new Error("Body is not available yet");return Xt.fromDom(u)},pn=(o,u,m)=>{if(d(m)||T(m)||Z(m))o.setAttribute(u,m+"");else throw console.error("Invalid call to Attribute.set. Key ",u,":: Value ",m,":: Element ",o),new Error("Attribute value was not simple")},jt=(o,u,m)=>{pn(o.dom,u,m)},ns=(o,u)=>{const m=o.dom;Qs(u,(v,C)=>{pn(m,C,v)})},eo=(o,u)=>{const m=o.dom.getAttribute(u);return m===null?void 0:m},Us=(o,u)=>V.from(eo(o,u)),be=(o,u)=>{const m=o.dom;return m&&m.hasAttribute?m.hasAttribute(u):!1},ke=(o,u)=>{o.dom.removeAttribute(u)},Je=o=>Xs(o.dom.attributes,(u,m)=>(u[m.name]=m.value,u),{}),xt=(o,u,m)=>{if(!d(m))throw console.error("Invalid call to CSS.set. Property ",u,":: Value ",m,":: Element ",o),new Error("CSS value must be a string: "+m);Es(o)&&o.style.setProperty(u,m)},es=(o,u)=>{Es(o)&&o.style.removeProperty(u)},wn=(o,u,m)=>{const v=o.dom;xt(v,u,m)},Vo=(o,u)=>{const m=o.dom;Qs(u,(v,C)=>{xt(m,C,v)})},Wa=(o,u)=>{const m=o.dom;Qs(u,(v,C)=>{v.fold(()=>{es(m,C)},x=>{xt(m,C,x)})})},Gt=(o,u)=>{const m=o.dom,C=window.getComputedStyle(m).getPropertyValue(u);return C===""&&!We(o)?Zl(m,u):C},Zl=(o,u)=>Es(o)?o.style.getPropertyValue(u):"",Er=(o,u)=>{const m=o.dom,v=Zl(m,u);return V.from(v).filter(C=>C.length>0)},ef=o=>{const u={},m=o.dom;if(Es(m))for(let v=0;v<m.style.length;v++){const C=m.style.item(v);u[C]=m.style[C]}return u},Oi=(o,u,m)=>{const v=Xt.fromTag(o);return wn(v,u,m),Er(v,u).isSome()},fo=(o,u)=>{const m=o.dom;es(m,u),lt(Us(o,"style").map(Ti),"")&&ke(o,"style")},mc=o=>o.dom.offsetWidth,Ia=(o,u)=>{const m=(F,U)=>{if(!Z(U)&&!U.match(/^[0-9]+$/))throw new Error(o+".set accepts only positive integer values. Value was "+U);const X=F.dom;Es(X)&&(X.style[o]=U+"px")},v=F=>{const U=u(F);if(U<=0||U===null){const X=Gt(F,o);return parseFloat(X)||0}return U},C=v,x=(F,U)=>Xs(U,(X,oe)=>{const me=Gt(F,oe),Se=me===void 0?0:parseInt(me,10);return isNaN(Se)?X:X+Se},0);return{set:m,get:v,getOuter:C,aggregate:x,max:(F,U,X)=>{const oe=x(F,X);return U>oe?U-oe:0}}},Oc=Ia("height",o=>{const u=o.dom;return We(o)?u.getBoundingClientRect().height:u.offsetHeight}),Wi=o=>Oc.get(o),Dd=o=>Oc.getOuter(o),p0=(o,u)=>{const m=["margin-top","border-top-width","padding-top","padding-bottom","border-bottom-width","margin-bottom"],v=Oc.max(o,u,m);wn(o,"max-height",v+"px")},Hv=(o,u)=>({left:o,top:u,translate:(v,C)=>Hv(o+v,u+C)}),jr=Hv,Zb=o=>{const u=o.getBoundingClientRect();return jr(u.left,u.top)},ja=(o,u)=>o!==void 0?o:u!==void 0?u:0,hc=o=>{const u=o.dom.ownerDocument,m=u.body,v=u.defaultView,C=u.documentElement;if(m===o.dom)return jr(m.offsetLeft,m.offsetTop);const x=ja(v==null?void 0:v.pageYOffset,C.scrollTop),I=ja(v==null?void 0:v.pageXOffset,C.scrollLeft),F=ja(C.clientTop,m.clientTop),U=ja(C.clientLeft,m.clientLeft);return Gc(o).translate(I-U,x-F)},Gc=o=>{const u=o.dom,v=u.ownerDocument.body;return v===u?jr(v.offsetLeft,v.offsetTop):We(o)?Zb(u):jr(0,0)},Zf=Ia("width",o=>o.dom.offsetWidth),Uv=(o,u)=>Zf.set(o,u),oo=o=>Zf.get(o),Zp=o=>Zf.getOuter(o),tf=(o,u)=>{const m=["margin-left","border-left-width","padding-left","padding-right","border-right-width","margin-right"],v=Zf.max(o,u,m);wn(o,"max-width",v+"px")},nf=o=>{let u=!1,m;return(...v)=>(u||(u=!0,m=o.apply(null,v)),m)},Wh=(o,u,m,v)=>{const C=o.isiOS()&&/ipad/i.test(m)===!0,x=o.isiOS()&&!C,I=o.isiOS()||o.isAndroid(),F=I||v("(pointer:coarse)"),U=C||!x&&I&&v("(min-device-width:768px)"),X=x||I&&!U,oe=u.isSafari()&&o.isiOS()&&/safari/i.test(m)===!1,me=!X&&!U&&!oe;return{isiPad:J(C),isiPhone:J(x),isTablet:J(U),isPhone:J(X),isTouch:J(F),isAndroid:o.isAndroid,isiOS:o.isiOS,isWebView:J(oe),isDesktop:J(me)}},li=(o,u)=>{for(let m=0;m<o.length;m++){const v=o[m];if(v.test(u))return v}},Aa=(o,u)=>{const m=li(o,u);if(!m)return{major:0,minor:0};const v=C=>Number(u.replace(m,"$"+C));return qf(v(1),v(2))},qp=(o,u)=>{const m=String(u).toLowerCase();return o.length===0?m0():Aa(o,m)},m0=()=>qf(0,0),qf=(o,u)=>({major:o,minor:u}),Rc={nu:qf,detect:qp,unknown:m0},el=(o,u)=>ts(u.brands,m=>{const v=m.brand.toLowerCase();return Qe(o,C=>{var x;return v===((x=C.brand)===null||x===void 0?void 0:x.toLowerCase())}).map(C=>({current:C.name,version:Rc.nu(parseInt(m.version,10),0)}))}),Tl=(o,u)=>{const m=String(u).toLowerCase();return Qe(o,v=>v.search(m))},ql=(o,u)=>Tl(o,u).map(m=>{const v=Rc.detect(m.versionRegexes,u);return{current:m.name,version:v}}),ld=(o,u)=>Tl(o,u).map(m=>{const v=Rc.detect(m.versionRegexes,u);return{current:m.name,version:v}}),Gp=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,gi=o=>u=>ir(u,o),Hm=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:o=>ir(o,"edge/")&&ir(o,"chrome")&&ir(o,"safari")&&ir(o,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Gp],search:o=>ir(o,"chrome")&&!ir(o,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:o=>ir(o,"msie")||ir(o,"trident")},{name:"Opera",versionRegexes:[Gp,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:gi("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:gi("firefox")},{name:"Safari",versionRegexes:[Gp,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:o=>(ir(o,"safari")||ir(o,"mobile/"))&&ir(o,"applewebkit")}],Y1=[{name:"Windows",search:gi("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:o=>ir(o,"iphone")||ir(o,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:gi("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:gi("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:gi("linux"),versionRegexes:[]},{name:"Solaris",search:gi("sunos"),versionRegexes:[]},{name:"FreeBSD",search:gi("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:gi("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Gf={browsers:J(Hm),oses:J(Y1)},X1="Edge",qb="Chromium",ze="IE",an="Opera",$n="Firefox",Ds="Safari",Eo=()=>Yt({current:void 0,version:Rc.unknown()}),Yt=o=>{const u=o.current,m=o.version,v=C=>()=>u===C;return{current:u,version:m,isEdge:v(X1),isChromium:v(qb),isIE:v(ze),isOpera:v(an),isFirefox:v($n),isSafari:v(Ds)}},Ys={unknown:Eo,nu:Yt},ko="Windows",ei="iOS",Pi="Android",ji="Linux",Ko="macOS",sf="Solaris",jh="FreeBSD",Gb="ChromeOS",et=()=>Zh({current:void 0,version:Rc.unknown()}),Zh=o=>{const u=o.current,m=o.version,v=C=>()=>u===C;return{current:u,version:m,isWindows:v(ko),isiOS:v(ei),isAndroid:v(Pi),isMacOS:v(Ko),isLinux:v(ji),isSolaris:v(sf),isFreeBSD:v(jh),isChromeOS:v(Gb)}},Kc={unknown:et,nu:Zh},$5={detect:(o,u,m)=>{const v=Gf.browsers(),C=Gf.oses(),x=u.bind(U=>el(v,U)).orThunk(()=>ql(v,o)).fold(Ys.unknown,Ys.nu),I=ld(C,o).fold(Kc.unknown,Kc.nu),F=Wh(I,x,o,m);return{browser:x,os:I,deviceType:F}}},J1=o=>window.matchMedia(o).matches;let Yo=nf(()=>$5.detect(window.navigator.userAgent,V.from(window.navigator.userAgentData),J1));const Zi=()=>Yo(),gu=(o,u,m,v,C,x,I)=>({target:o,x:u,y:m,stop:v,prevent:C,kill:x,raw:I}),Kp=o=>{const u=Xt.fromDom(Qa(o).getOr(o.target)),m=()=>o.stopPropagation(),v=()=>o.preventDefault(),C=ne(v,m);return gu(u,o.clientX,o.clientY,m,v,C,o)},B5=(o,u)=>m=>{o(m)&&u(Kp(m))},qh=(o,u,m,v,C)=>{const x=B5(m,v);return o.dom.addEventListener(u,x,C),{unbind:de(h0,o,u,x,C)}},Yc=(o,u,m,v)=>qh(o,u,m,v,!1),zv=(o,u,m,v)=>qh(o,u,m,v,!0),h0=(o,u,m,v)=>{o.dom.removeEventListener(u,m,v)},Gh=(o,u)=>{ai(o).each(v=>{v.dom.insertBefore(u.dom,o.dom)})},Um=(o,u)=>{No(o).fold(()=>{ai(o).each(C=>{cd(C,u)})},v=>{Gh(v,u)})},g0=(o,u)=>{Ja(o).fold(()=>{cd(o,u)},v=>{o.dom.insertBefore(u.dom,v.dom)})},cd=(o,u)=>{o.dom.appendChild(u.dom)},v0=(o,u,m)=>{Si(o,m).fold(()=>{cd(o,u)},v=>{Gh(v,u)})},Il=(o,u)=>{Ht(u,m=>{cd(o,m)})},zm=o=>{o.dom.textContent="",Ht(So(o),u=>{of(u)})},of=o=>{const u=o.dom;u.parentNode!==null&&u.parentNode.removeChild(u)},Dc=o=>{const u=o!==void 0?o.dom:document,m=u.body.scrollLeft||u.documentElement.scrollLeft,v=u.body.scrollTop||u.documentElement.scrollTop;return jr(m,v)},Kh=(o,u,m)=>{const C=(m!==void 0?m.dom:document).defaultView;C&&C.scrollTo(o,u)},EC=o=>{const u=o===void 0?window:o;return Zi().browser.isFirefox()?V.none():V.from(u.visualViewport)},Wv=(o,u,m,v)=>({x:o,y:u,width:m,height:v,right:o+m,bottom:u+v}),Kf=o=>{const u=o===void 0?window:o,m=u.document,v=Dc(Xt.fromDom(m));return EC(u).fold(()=>{const C=u.document.documentElement,x=C.clientWidth,I=C.clientHeight;return Wv(v.left,v.top,x,I)},C=>Wv(Math.max(C.pageLeft,v.left),Math.max(C.pageTop,v.top),C.width,C.height))},Q1=()=>Xt.fromDom(document),V5=(o,u)=>o.view(u).fold(J([]),v=>{const C=o.owner(v),x=V5(o,C);return[v].concat(x)}),jv=(o,u)=>{const m=u.owner(o),v=V5(u,m);return V.some(v)};var U5=Object.freeze({__proto__:null,view:o=>{var u;return(o.dom===document?V.none():V.from((u=o.dom.defaultView)===null||u===void 0?void 0:u.frameElement)).map(Xt.fromDom)},owner:o=>Fr(o)});const Yp=o=>{const u=Q1(),m=Dc(u);return jv(o,U5).fold(de(hc,o),C=>{const x=Gc(o),I=so(C,(F,U)=>{const X=Gc(U);return{left:F.left+X.left,top:F.top+X.top}},{left:0,top:0});return jr(I.left+x.left+m.left,I.top+x.top+m.top)})},Kb=(o,u,m)=>({point:o,width:u,height:m}),Yf=(o,u,m,v)=>({x:o,y:u,width:m,height:v}),qi=(o,u,m,v)=>({x:o,y:u,width:m,height:v,right:o+m,bottom:u+v}),tl=o=>{const u=hc(o),m=Zp(o),v=Dd(o);return qi(u.left,u.top,m,v)},Fu=o=>{const u=Yp(o),m=Zp(o),v=Dd(o);return qi(u.left,u.top,m,v)},b0=(o,u)=>{const m=Math.max(o.x,u.x),v=Math.max(o.y,u.y),C=Math.min(o.right,u.right),x=Math.min(o.bottom,u.bottom),I=C-m,F=x-v;return qi(m,v,I,F)},y0=(o,u)=>Xs(u,(m,v)=>b0(m,v),o),ul=()=>Kf(window),ds=o=>{let u=o;return{get:()=>u,set:C=>{u=C}}},Yb=o=>{const u=ds(V.none()),m=()=>u.get().each(o);return{clear:()=>{m(),u.set(V.none())},isSet:()=>u.get().isSome(),get:()=>u.get(),set:F=>{m(),u.set(V.some(F))}}},Wm=()=>Yb(o=>o.destroy()),$u=()=>Yb(o=>o.unbind()),vr=()=>{const o=Yb(z);return{...o,on:m=>o.get().each(m)}};var Yh=tinymce.util.Tools.resolve("tinymce.ThemeManager");const _0=o=>{const u=x=>x(o),m=J(o),v=()=>C,C={tag:!0,inner:o,fold:(x,I)=>I(o),isValue:Ue,isError:$e,map:x=>no.value(x(o)),mapError:v,bind:u,exists:u,forall:u,getOr:m,or:v,getOrThunk:m,orThunk:v,getOrDie:m,each:x=>{x(o)},toOptional:()=>V.some(o)};return C},Zv=o=>{const u=()=>m,m={tag:!1,inner:o,fold:(v,C)=>v(o),isValue:$e,isError:Ue,map:u,mapError:v=>no.error(v(o)),bind:u,exists:$e,forall:Ue,getOr:ce,or:ce,getOrThunk:Be,orThunk:Be,getOrDie:ie(String(o)),each:z,toOptional:V.none};return m},no={value:_0,error:Zv,fromOption:(o,u)=>o.fold(()=>Zv(u),_0)};var Oa;(function(o){o[o.Error=0]="Error",o[o.Value=1]="Value"})(Oa||(Oa={}));const eg=(o,u,m)=>o.stype===Oa.Error?u(o.serror):m(o.svalue),vu=o=>{const u=[],m=[];return Ht(o,v=>{eg(v,C=>m.push(C),C=>u.push(C))}),{values:u,errors:m}},Xc=(o,u)=>o.stype===Oa.Error?{stype:Oa.Error,serror:u(o.serror)}:o,ud=(o,u)=>o.stype===Oa.Value?{stype:Oa.Value,svalue:u(o.svalue)}:o,Al=(o,u)=>o.stype===Oa.Value?u(o.svalue):o,Jc=(o,u)=>o.stype===Oa.Error?u(o.serror):o,dd=o=>({stype:Oa.Value,svalue:o}),qv=o=>({stype:Oa.Error,serror:o}),_a={fromResult:o=>o.fold(qv,dd),toResult:o=>eg(o,no.error,no.value),svalue:dd,partition:vu,serror:qv,bind:Al,bindError:Jc,map:ud,mapError:Xc,fold:eg},jm=(o,u,m,v)=>({tag:"field",key:o,newKey:u,presence:m,prop:v}),Zm=(o,u)=>({tag:"custom",newKey:o,instantiator:u}),ti=(o,u,m)=>{switch(o.tag){case"field":return u(o.key,o.newKey,o.presence,o.prop);case"custom":return m(o.newKey,o.instantiator)}},Xp=(o,u)=>u,S9=(o,u)=>b(o)&&b(u)?Gi(o,u):u,Xb=o=>(...u)=>{if(u.length===0)throw new Error("Can't merge zero objects");const m={};for(let v=0;v<u.length;v++){const C=u[v];for(const x in C)qs(C,x)&&(m[x]=o(m[x],C[x]))}return m},Gi=Xb(S9),S0=Xb(Xp),Xf=()=>({tag:"required",process:{}}),xo=o=>({tag:"defaultedThunk",process:o}),tg=o=>xo(J(o)),Kv=()=>({tag:"option",process:{}}),G=o=>({tag:"mergeWithThunk",process:o}),le=o=>G(J(o)),Ce=(o,u)=>o.length>0?_a.svalue(Gi(u,S0.apply(void 0,o))):_a.svalue(u),Ke=o=>ne(_a.serror,Nt)(o),ks={consolidateObj:(o,u)=>{const m=_a.partition(o);return m.errors.length>0?Ke(m.errors):Ce(m.values,u)},consolidateArr:o=>{const u=_a.partition(o);return u.errors.length>0?Ke(u.errors):_a.svalue(u.values)}},ro=o=>h(o)&&Zn(o).length>100?" removed due to size":JSON.stringify(o,null,2),Js=o=>{const u=o.length>10?o.slice(0,10).concat([{path:[],getErrorInfo:J("... (only showing first ten failures)")}]):o;return ct(u,m=>"Failed path: ("+m.path.join(" > ")+")\n"+m.getErrorInfo())},cs=(o,u)=>_a.serror([{path:o,getErrorInfo:u}]),Di=(o,u,m)=>cs(o,()=>'Could not find valid *required* value for "'+u+'" in '+ro(m)),Ra=(o,u)=>cs(o,()=>'Choice schema did not contain choice key: "'+u+'"'),Lc=(o,u,m)=>cs(o,()=>'The chosen schema: "'+m+'" did not exist in branches: '+ro(u)),qm=(o,u)=>cs(o,()=>"There are unsupported fields: ["+u.join(", ")+"] specified"),kC=(o,u)=>cs(o,J(u)),C0=o=>{const u=(v,C)=>_a.bindError(o(C),x=>kC(v,x)),m=J("val");return{extract:u,toString:m}},W5=C0(_a.svalue),Pc=(o,u,m,v)=>bn(u,m).fold(()=>Di(o,m,u),v),j5=(o,u,m,v)=>{const C=bn(o,u).getOrThunk(()=>m(o));return v(C)},C9=(o,u,m)=>m(bn(o,u)),Z5=(o,u,m,v)=>{const C=bn(o,u).map(x=>x===!0?m(o):x);return v(C)},Gl=(o,u,m,v,C)=>{const x=F=>C.extract(u.concat([v]),F),I=F=>F.fold(()=>_a.svalue(V.none()),U=>{const X=C.extract(u.concat([v]),U);return _a.map(X,V.some)});switch(o.tag){case"required":return Pc(u,m,v,x);case"defaultedThunk":return j5(m,v,o.process,x);case"option":return C9(m,v,I);case"defaultedOptionThunk":return Z5(m,v,o.process,I);case"mergeWithThunk":return j5(m,v,J({}),F=>{const U=Gi(o.process(m),F);return x(U)})}},Jb=(o,u,m)=>{const v={},C=[];for(const x of m)ti(x,(I,F,U,X)=>{const oe=Gl(U,o,u,I,X);_a.fold(oe,me=>{C.push(...me)},me=>{v[F]=me})},(I,F)=>{v[I]=F(u)});return C.length>0?_a.serror(C):_a.svalue(v)},Za=o=>({extract:(v,C)=>o().extract(v,C),toString:()=>o().toString()}),xC=o=>Zn(Do(o,B)),bu=o=>{const u=Ns(o),m=so(o,(C,x)=>ti(x,I=>Gi(C,{[I]:!0}),J(C)),{});return{extract:(C,x)=>{const I=T(x)?[]:xC(x),F=jn(I,U=>!Qr(m,U));return F.length===0?u.extract(C,x):qm(C,F)},toString:u.toString}},Ns=o=>({extract:(v,C)=>Jb(v,C,o),toString:()=>"obj{\n"+ct(o,C=>ti(C,(x,I,F,U)=>x+" -> "+U.toString(),(x,I)=>"state("+x+")")).join("\n")+"}"}),Jf=o=>({extract:(v,C)=>{const x=ct(C,(I,F)=>o.extract(v.concat(["["+F+"]"]),I));return ks.consolidateArr(x)},toString:()=>"array("+o.toString()+")"}),Yv=(o,u)=>{const m=u!==void 0?u:ce;return{extract:(x,I)=>{const F=[];for(const U of o){const X=U.extract(x,I);if(X.stype===Oa.Value)return{stype:Oa.Value,svalue:m(X.svalue)};F.push(X)}return ks.consolidateArr(F)},toString:()=>"oneOf("+ct(o,x=>x.toString()).join(", ")+")"}},q5=(o,u)=>{const m=(x,I)=>Jf(C0(o)).extract(x,I);return{extract:(x,I)=>{const F=Zn(I),U=m(x,F);return _a.bind(U,X=>{const oe=ct(X,me=>jm(me,me,Xf(),u));return Ns(oe).extract(x,I)})},toString:()=>"setOf("+u.toString()+")"}},w9=(o,u)=>{const m=nf(u);return{extract:(x,I)=>m().extract(x,I),toString:()=>m().toString()}},G5=ne(Jf,Ns),Qf=J(W5),Gm=(o,u)=>C0(m=>{const v=typeof m;return o(m)?_a.svalue(m):_a.serror("Expected type: ".concat(u," but got: ").concat(v))}),ng=Gm(Z,"number"),Ln=Gm(d,"string"),rf=Gm(T,"boolean"),TC=Gm(W,"function"),w0=o=>{if(Object(o)!==o)return!0;switch({}.toString.call(o).slice(8,-1)){case"Boolean":case"Number":case"String":case"Date":case"RegExp":case"Blob":case"FileList":case"ImageData":case"ImageBitmap":case"ArrayBuffer":return!0;case"Array":case"Object":return Object.keys(o).every(u=>w0(o[u]));default:return!1}},ep=C0(o=>w0(o)?_a.svalue(o):_a.serror("Expected value to be acceptable for sending via postMessage")),Qb=(o,u,m,v)=>bn(m,v).fold(()=>Lc(o,m,v),x=>x.extract(o.concat(["branch: "+v]),u)),sg=(o,u)=>({extract:(C,x)=>bn(x,o).fold(()=>Ra(C,o),F=>Qb(C,x,u,F)),toString:()=>"chooseOn("+o+"). Possible values: "+Zn(u)}),E0=()=>Jf(W5),ey=o=>C0(u=>o(u).fold(_a.serror,_a.svalue)),Jp=(o,u)=>q5(m=>_a.fromResult(o(m)),u),E9=(o,u,m)=>{const v=u.extract([o],m);return _a.mapError(v,C=>({input:m,errors:C}))},Ki=(o,u,m)=>_a.toResult(E9(o,u,m)),un=o=>o.fold(u=>{throw new Error(Qp(u))},ce),yu=(o,u,m)=>un(Ki(o,u,m)),Qp=o=>"Errors: \n"+Js(o.errors).join("\n")+"\n\nInput object: "+ro(o.input),dl=(o,u)=>sg(o,Rs(u,Ns)),Xv=(o,u)=>w9(o,u),fl=jm,nr=Zm,K5=o=>ey(u=>ft(o,u)?no.value(u):no.error('Unsupported value: "'.concat(u,'", choose one of "').concat(o.join(", "),'".'))),Zt=o=>fl(o,o,Xf(),Qf()),cr=(o,u)=>fl(o,o,Xf(),u),IC=o=>cr(o,ng),Da=o=>cr(o,Ln),tp=(o,u)=>fl(o,o,Xf(),K5(u)),Kl=o=>cr(o,TC),SR=(o,u)=>fl(o,o,Kv(),C0(m=>_a.serror("The field: "+o+" is forbidden. "+u))),Km=(o,u)=>fl(o,o,Xf(),Ns(u)),k9=(o,u)=>fl(o,o,Xf(),G5(u)),Bu=(o,u)=>fl(o,o,Xf(),Jf(u)),ur=o=>fl(o,o,Kv(),Qf()),Ym=(o,u)=>fl(o,o,Kv(),u),ty=o=>Ym(o,ng),aa=o=>Ym(o,Ln),Y5=(o,u)=>Ym(o,K5(u)),Xh=o=>Ym(o,TC),x9=(o,u)=>Ym(o,Jf(u)),Vu=(o,u)=>Ym(o,Ns(u)),em=(o,u)=>Ym(o,bu(u)),mt=(o,u)=>fl(o,o,tg(u),Qf()),Ld=(o,u,m)=>fl(o,o,tg(u),m),pl=(o,u)=>Ld(o,u,ng),Li=(o,u)=>Ld(o,u,Ln),np=(o,u,m)=>Ld(o,u,K5(m)),la=(o,u)=>Ld(o,u,rf),Kr=(o,u)=>Ld(o,u,TC),k0=(o,u)=>Ld(o,u,ep),og=(o,u,m)=>Ld(o,u,Jf(m)),Jh=(o,u,m)=>Ld(o,u,Ns(m)),sp={generate:o=>{if(!S(o))throw new Error("cases must be an array");if(o.length===0)throw new Error("there must be at least one case");const u=[],m={};return Ht(o,(v,C)=>{const x=Zn(v);if(x.length!==1)throw new Error("one and only one name per case");const I=x[0],F=v[I];if(m[I]!==void 0)throw new Error("duplicate key detected:"+I);if(I==="cata")throw new Error("cannot have a case named cata (sorry)");if(!S(F))throw new Error("case arguments must be an array");u.push(I),m[I]=(...U)=>{const X=U.length;if(X!==F.length)throw new Error("Wrong number of arguments to case "+I+". Expected "+F.length+" ("+F+"), got "+X);return{fold:(...me)=>{if(me.length!==o.length)throw new Error("Wrong number of arguments to fold. Expected "+o.length+", got "+me.length);return me[C].apply(null,U)},match:me=>{const Se=Zn(me);if(u.length!==Se.length)throw new Error("Wrong number of arguments to match. Expected: "+u.join(",")+"\nActual: "+Se.join(","));if(!dn(u,Pe=>ft(Se,Pe)))throw new Error("Not all branches were specified when using match. Specified: "+Se.join(", ")+"\nRequired: "+u.join(", "));return me[I].apply(null,U)},log:me=>{console.log(me,{constructors:u,constructor:I,params:U})}}}}),m}};sp.generate([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);const X5=o=>{const u=[],m=[];return Ht(o,v=>{v.fold(C=>{u.push(C)},C=>{m.push(C)})}),{errors:u,values:m}},CR=(o,u)=>{const m={};return Qs(o,(v,C)=>{ft(u,C)||(m[C]=v)}),m},AC=(o,u)=>({[o]:u}),T9=o=>{const u={};return Ht(o,m=>{u[m.key]=m.value}),u},I9=(o,u)=>CR(o,u),rg=(o,u)=>AC(o,u),ny=o=>T9(o),OC=(o,u)=>o.length===0?no.value(u):no.value(Gi(u,S0.apply(void 0,o))),RC=o=>no.error(Nt(o)),J5=(o,u)=>{const m=X5(o);return m.errors.length>0?RC(m.errors):OC(m.values,u)},A9=o=>W(o)?o:$e,Qh=(o,u,m)=>{let v=o.dom;const C=A9(m);for(;v.parentNode;){v=v.parentNode;const x=Xt.fromDom(v),I=u(x);if(I.isSome())return I;if(C(x))break}return V.none()},Jv=(o,u,m)=>{const v=u(o),C=A9(m);return v.orThunk(()=>C(o)?V.none():Qh(o,u,C))},Q5=(o,u)=>co(o.element,u.event.target),DC={can:Ue,abort:$e,run:z},af=o=>{if(!Qr(o,"can")&&!Qr(o,"abort")&&!Qr(o,"run"))throw new Error("EventHandler defined by: "+JSON.stringify(o,null,2)+" does not have can, abort, or run!");return{...DC,...o}},O9=(o,u)=>(...m)=>Xs(o,(v,C)=>v&&u(C).apply(void 0,m),!0),e4=(o,u)=>(...m)=>Xs(o,(v,C)=>v||u(C).apply(void 0,m),!1),wR=o=>W(o)?{can:Ue,abort:$e,run:o}:o,R9=o=>{const u=O9(o,C=>C.can),m=e4(o,C=>C.abort);return{can:u,abort:m,run:(...C)=>{Ht(o,x=>{x.run.apply(void 0,C)})}}},Ol=J,op=Ol("touchstart"),Qv=Ol("touchmove"),e1=Ol("touchend"),ER=Ol("touchcancel"),fd=Ol("mousedown"),t4=Ol("mousemove"),sy=Ol("mouseout"),oy=Ol("mouseup"),rp=Ol("mouseover"),ip=Ol("focusin"),D9=Ol("focusout"),gc=Ol("keydown"),n4=Ol("keyup"),Xm=Ol("input"),t1=Ol("change"),Jm=Ol("click"),kR=Ol("transitioncancel"),e2=Ol("transitionend"),xR=Ol("transitionstart"),ig=Ol("selectstart"),ca=o=>J("alloy."+o),L9={tap:ca("tap")},Qm=ca("focus"),n1=ca("blur.post"),x0=ca("paste.post"),ap=ca("receive"),Mc=ca("execute"),T0=ca("focus.item"),ry=L9.tap,mU=ca("longpress"),eh=ca("sandbox.close"),Yl=ca("typeahead.cancel"),iy=ca("system.init"),TR=ca("system.touchmove"),IR=ca("system.touchend"),LC=ca("system.scroll"),t2=ca("system.resize"),lp=ca("system.attached"),cp=ca("system.detached"),ag=ca("system.dismissRequested"),I0=ca("system.repositionRequested"),ay=ca("focusmanager.shifted"),n2=ca("slotcontainer.visibility"),s1=ca("system.external.element.scroll"),lg=ca("change.tab"),ly=ca("dismiss.tab"),s4=ca("highlight"),o4=ca("dehighlight"),vo=(o,u)=>{i4(o,o.element,u,{})},ps=(o,u,m)=>{i4(o,o.element,u,m)},_u=o=>{vo(o,Mc())},r4=(o,u,m)=>{i4(o,u,m,{})},i4=(o,u,m,v)=>{const C={target:u,...v};o.getSystem().triggerEvent(m,u,C)},a4=(o,u,m,v)=>{const C={...v,target:u};o.getSystem().triggerEvent(m,u,C)},PC=(o,u,m,v)=>{o.getSystem().triggerEvent(m,u,v.event)},ni=o=>ny(o),o1=(o,u)=>({key:o,value:af({abort:u})}),AR=(o,u)=>({key:o,value:af({can:u})}),P9=o=>({key:o,value:af({run:(u,m)=>{m.event.prevent()}})}),Wt=(o,u)=>({key:o,value:af({run:u})}),MC=(o,u,m)=>({key:o,value:af({run:(v,C)=>{u.apply(void 0,[v,C].concat(m))}})}),NC=o=>u=>Wt(o,u),s2=o=>u=>({key:o,value:af({run:(m,v)=>{Q5(m,v)&&u(m,v)}})}),OR=(o,u)=>Wt(o,(m,v)=>{m.getSystem().getByUid(u).each(C=>{PC(C,C.element,o,v)})}),A0=(o,u,m)=>{const v=u.partUids[m];return OR(o,v)},cy=(o,u)=>Wt(o,(m,v)=>{const C=v.event,x=m.getSystem().getByDom(C.target).getOrThunk(()=>Jv(C.target,F=>m.getSystem().getByDom(F).toOptional(),$e).getOr(m));u(m,x,v)}),cg=o=>Wt(o,(u,m)=>{m.cut()}),l4=o=>Wt(o,(u,m)=>{m.stop()}),th=(o,u)=>s2(o)(u),$r=s2(lp()),nh=s2(cp()),M9=s2(iy()),r1=NC(Mc()),RR=(o,u,m)=>{const v=m.toString(),C=v.indexOf(")")+1,x=v.indexOf("("),I=v.substring(x+1,C-1).split(/,\s*/);return o.toFunctionAnnotation=()=>({name:u,parameters:c4(I.slice(0,1).concat(I.slice(3)))}),o},c4=o=>ct(o,u=>mi(u,"/*")?u.substring(0,u.length-2):u),uy=(o,u)=>{const m=o.toString(),v=m.indexOf(")")+1,C=m.indexOf("("),x=m.substring(C+1,v-1).split(/,\s*/);return o.toFunctionAnnotation=()=>({name:u,parameters:c4(x)}),o},DR=(o,u)=>{const m=u.toString(),v=m.indexOf(")")+1,C=m.indexOf("("),x=m.substring(C+1,v-1).split(/,\s*/);return o.toFunctionAnnotation=()=>({name:"OVERRIDE",parameters:c4(x.slice(1))}),o},up=o=>({classes:O(o.classes)?[]:o.classes,attributes:O(o.attributes)?{}:o.attributes,styles:O(o.styles)?{}:o.styles}),u4=(o,u)=>({...o,attributes:{...o.attributes,...u.attributes},styles:{...o.styles,...u.styles},classes:o.classes.concat(u.classes)}),o2=(o,u,m)=>r1(v=>{m(v,o,u)}),FC=(o,u,m)=>M9((v,C)=>{m(v,o,u)}),O0=(o,u,m,v,C,x)=>{const I=bu(o),F=Vu(u,[em("config",o)]);return BC(I,F,u,m,v,C,x)},d4=(o,u,m,v,C,x)=>{const I=o,F=Vu(u,[Ym("config",o)]);return BC(I,F,u,m,v,C,x)},i1=(o,u,m)=>RR((C,...x)=>{const I=[C].concat(x);return C.config({name:J(o)}).fold(()=>{throw new Error("We could not find any behaviour configuration for: "+o+". Using API: "+m)},F=>{const U=Array.prototype.slice.call(I,1);return u.apply(void 0,[C,F.config,F.state].concat(U))})},m,u),$C=o=>({key:o,value:void 0}),BC=(o,u,m,v,C,x,I)=>{const F=me=>Qr(me,m)?me[m]():V.none(),U=Rs(C,(me,Se)=>i1(m,me,Se)),oe={...Rs(x,(me,Se)=>uy(me,Se)),...U,revoke:de($C,m),config:me=>{const Se=yu(m+"-config",o,me);return{key:m,value:{config:Se,me:oe,configAsRaw:nf(()=>yu(m+"-config",o,me)),initialConfig:me,state:I}}},schema:J(u),exhibit:(me,Se)=>Zo(F(me),bn(v,"exhibit"),(Ie,Pe)=>Pe(Se,Ie.config,Ie.state)).getOrThunk(()=>up({})),name:J(m),handlers:me=>F(me).map(Se=>bn(v,"events").getOr(()=>({}))(Se.config,Se.state)).getOr({})};return oe},lf={init:()=>Pd({readState:J("No State required")})},Pd=o=>o,cn=o=>ny(o),N9=bu([Zt("fields"),Zt("name"),mt("active",{}),mt("apis",{}),mt("state",lf),mt("extra",{})]),Sa=o=>{const u=yu("Creating behaviour: "+o.name,N9,o);return O0(u.fields,u.name,u.active,u.apis,u.extra,u.state)},F9=bu([Zt("branchKey"),Zt("branches"),Zt("name"),mt("active",{}),mt("apis",{}),mt("state",lf),mt("extra",{})]),$9=o=>{const u=yu("Creating behaviour: "+o.name,F9,o);return d4(dl(u.branchKey,u.branches),u.name,u.active,u.apis,u.extra,u.state)},dy=J(void 0),VC=(o,u)=>{const m=eo(o,u);return m===void 0||m===""?[]:m.split(" ")},vi=(o,u,m)=>{const C=VC(o,u).concat([m]);return jt(o,u,C.join(" ")),!0},HC=(o,u,m)=>{const v=jn(VC(o,u),C=>C!==m);return v.length>0?jt(o,u,v.join(" ")):ke(o,u),!1},r2=o=>o.dom.classList!==void 0,fy=o=>VC(o,"class"),py=(o,u)=>vi(o,"class",u),UC=(o,u)=>HC(o,"class",u),pd=(o,u)=>ft(fy(o),u)?UC(o,u):py(o,u),sa=(o,u)=>{r2(o)?o.dom.classList.add(u):py(o,u)},B9=o=>{(r2(o)?o.dom.classList:fy(o)).length===0&&ke(o,"class")},ua=(o,u)=>{r2(o)?o.dom.classList.remove(u):UC(o,u),B9(o)},my=(o,u)=>{const m=r2(o)?o.dom.classList.toggle(u):pd(o,u);return B9(o),m},Nc=(o,u)=>r2(o)&&o.dom.classList.contains(u),ug=(o,u)=>{Ht(u,m=>{sa(o,m)})},cf=(o,u)=>{Ht(u,m=>{ua(o,m)})},a1=(o,u)=>{Ht(u,m=>{my(o,m)})},hU=(o,u)=>dn(u,m=>Nc(o,m)),gU=o=>{const u=o.dom.classList,m=new Array(u.length);for(let v=0;v<u.length;v++){const C=u.item(v);C!==null&&(m[v]=C)}return m},LR=o=>r2(o)?gU(o):fy(o),tm=(o,u,m,v,C)=>{const x=I=>I+"px";return{position:o,left:u.map(x),top:m.map(x),right:v.map(x),bottom:C.map(x)}},vU=o=>({...o,position:V.some(o.position)}),Hu=(o,u)=>{Wa(o,vU(u))},vc=o=>(lt(Er(o,"position"),"fixed")?V.none():Hs(o)).orThunk(()=>{const v=Xt.fromTag("span");return ai(o).bind(C=>{cd(C,v);const x=Hs(v);return of(v),x})}),i2=o=>vc(o).map(hc).getOrThunk(()=>jr(0,0)),f4=(o,u)=>{const m=o.element;sa(m,u.transitionClass),ua(m,u.fadeOutClass),sa(m,u.fadeInClass),u.onShow(o)},PR=(o,u)=>{const m=o.element;sa(m,u.transitionClass),ua(m,u.fadeInClass),sa(m,u.fadeOutClass),u.onHide(o)},hy=(o,u)=>o.y<u.bottom&&o.bottom>u.y,dg=(o,u)=>o.y>=u.y,R0=(o,u)=>o.bottom<=u.bottom,sh=(o,u,m)=>({location:"top",leftX:u,topY:m.bounds.y-o.y}),fg=(o,u,m)=>({location:"bottom",leftX:u,bottomY:o.bottom-m.bounds.bottom}),pg=o=>o.box.x-o.win.x,gy=(o,u,m)=>{const v=u.win,C=u.box,x=pg(u);return ts(o,I=>{switch(I){case"bottom":return R0(C,m.bounds)?V.none():V.some(fg(v,x,m));case"top":return dg(C,m.bounds)?V.none():V.some(sh(v,x,m));default:return V.none()}}).getOr({location:"no-dock"})},V9=(o,u,m)=>dn(o,v=>{switch(v){case"bottom":return R0(u,m.bounds);case"top":return dg(u,m.bounds)}}),H9=(o,u)=>{const m=u.optScrollEnv.fold(J(o.bounds.y),v=>v.scrollElmTop+(o.bounds.y-v.currentScrollTop));return jr(o.bounds.x,m)},p4=(o,u)=>{const m=u.optScrollEnv.fold(J(o.y),v=>o.y+v.currentScrollTop-v.scrollElmTop);return jr(o.x,m)},D0=(o,u,m)=>m.getInitialPos().map(v=>{const C=H9(v,u);return{box:qi(C.left,C.top,oo(o),Wi(o)),location:v.location}}),a2=(o,u,m,v,C)=>{const x=p4(u,m),I=qi(x.left,x.top,u.width,u.height);v.setInitialPos({style:ef(o),position:Gt(o,"position")||"static",bounds:I,location:C.location})},m4=(o,u,m,v,C)=>{v.getInitialPos().fold(()=>a2(o,u,m,v,C),()=>z)},U9=(o,u,m)=>m.getInitialPos().bind(v=>{var C;switch(m.clearInitialPos(),v.position){case"static":return V.some({morph:"static"});case"absolute":const x=vc(o).getOr(rt()),I=tl(x),F=(C=x.dom.scrollTop)!==null&&C!==void 0?C:0;return V.some({morph:"absolute",positionCss:tm("absolute",bn(v.style,"left").map(U=>u.x-I.x),bn(v.style,"top").map(U=>u.y-I.y+F),bn(v.style,"right").map(U=>I.right-u.right),bn(v.style,"bottom").map(U=>I.bottom-u.bottom))});default:return V.none()}}),z9=(o,u,m)=>D0(o,u,m).filter(({box:v})=>V9(m.getModes(),v,u)).bind(({box:v})=>U9(o,v,m)),vy=o=>{switch(o.location){case"top":return V.some({morph:"fixed",positionCss:tm("fixed",V.some(o.leftX),V.some(o.topY),V.none(),V.none())});case"bottom":return V.some({morph:"fixed",positionCss:tm("fixed",V.some(o.leftX),V.none(),V.none(),V.some(o.bottomY))});default:return V.none()}},W9=(o,u,m)=>{const v=tl(o),C=ul(),x=gy(m.getModes(),{win:C,box:v},u);return x.location==="top"||x.location==="bottom"?(a2(o,v,u,m,x),vy(x)):V.none()},j9=(o,u,m)=>z9(o,u,m).orThunk(()=>u.optScrollEnv.bind(v=>D0(o,u,m)).bind(({box:v,location:C})=>{const x=ul(),I=pg({win:x,box:v}),F=C==="top"?sh(x,I,u):fg(x,I,u);return vy(F)})),L0=(o,u,m)=>{const v=o.element;return lt(Er(v,"position"),"fixed")?j9(v,u,m):W9(v,u,m)},zC=(o,u,m)=>{const v=o.element;return D0(v,u,m).bind(({box:C})=>U9(v,C,m))},Z9=(o,u,m,v)=>{const C=tl(o),x=ul(),I=pg({win:x,box:C}),F=v(x,I,u);return F.location==="bottom"||F.location==="top"?(m4(o,C,u,m,F),vy(F)):V.none()},h4=(o,u,m)=>{m.setDocked(!1),Ht(["left","right","top","bottom","position"],v=>fo(o.element,v)),u.onUndocked(o)},oh=(o,u,m,v)=>{const C=v.position==="fixed";m.setDocked(C),Hu(o.element,v),(C?u.onDocked:u.onUndocked)(o)},q9=(o,u,m,v,C=!1)=>{u.contextual.each(x=>{x.lazyContext(o).each(I=>{const F=hy(I,v.bounds);F!==m.isVisible()&&(m.setVisible(F),C&&!F?(ug(o.element,[x.fadeOutClass]),x.onHide(o)):(F?f4:PR)(o,x))})})},MR=(o,u,m,v,C)=>{q9(o,u,m,v,!0),oh(o,u,m,C.positionCss)},by=(o,u,m,v,C)=>{switch(C.morph){case"static":return h4(o,u,m);case"absolute":return oh(o,u,m,C.positionCss);case"fixed":return MR(o,u,m,v,C)}},l2=(o,u,m)=>{const v=u.lazyViewport(o);q9(o,u,m,v),L0(o,v,m).each(C=>{by(o,u,m,v,C)})},mg=(o,u,m)=>{const v=o.element;m.setDocked(!1);const C=u.lazyViewport(o);zC(o,C,m).each(x=>{switch(x.morph){case"static":{h4(o,u,m);break}case"absolute":{oh(o,u,m,x.positionCss);break}}}),m.setVisible(!0),u.contextual.each(x=>{cf(v,[x.fadeInClass,x.fadeOutClass,x.transitionClass]),x.onShow(o)}),WC(o,u,m)},WC=(o,u,m)=>{o.getSystem().isConnected()&&l2(o,u,m)},g4=(o,u,m)=>{m.isDocked()&&mg(o,u,m)},c2=o=>(u,m,v)=>{const C=m.lazyViewport(u);Z9(u.element,C,v,o).each(I=>{MR(u,m,v,C,I)})},NR=c2(sh),G9=c2(fg);var yy=Object.freeze({__proto__:null,refresh:WC,reset:g4,isDocked:(o,u,m)=>m.isDocked(),getModes:(o,u,m)=>m.getModes(),setModes:(o,u,m,v)=>m.setModes(v),forceDockToTop:NR,forceDockToBottom:G9}),v4=Object.freeze({__proto__:null,events:(o,u)=>ni([th(e2(),(m,v)=>{o.contextual.each(C=>{Nc(m.element,C.transitionClass)&&(cf(m.element,[C.transitionClass,C.fadeInClass]),(u.isVisible()?C.onShown:C.onHidden)(m)),v.stop()})}),Wt(LC(),(m,v)=>{WC(m,o,u)}),Wt(s1(),(m,v)=>{WC(m,o,u)}),Wt(t2(),(m,v)=>{g4(m,o,u)})])});const hg=(o,u)=>{const v=(u||document).createElement("div");return v.innerHTML=o,So(Xt.fromDom(v))},_y=o=>o.dom.innerHTML,Mi=(o,u)=>{const v=Fr(o).dom,C=Xt.fromDom(v.createDocumentFragment()),x=hg(u,v);Il(C,x),zm(o),cd(o,C)},K9=o=>{const u=Xt.fromTag("div"),m=Xt.fromDom(o.dom.cloneNode(!0));return cd(u,m),_y(u)},u2=(o,u)=>Xt.fromDom(o.dom.cloneNode(u)),d2=o=>u2(o,!1),$R=o=>u2(o,!0),Uu=o=>{if(hu(o))return"#shadow-root";{const u=d2(o);return K9(u)}},zu=o=>Uu(o),Y9="unknown";var P0;(function(o){o[o.STOP=0]="STOP",o[o.NORMAL=1]="NORMAL",o[o.LOGGING=2]="LOGGING"})(P0||(P0={}));const gg=ds({}),vg=(o,u)=>{const m=[],v=new Date().getTime();return{logEventCut:(C,x,I)=>{m.push({outcome:"cut",target:x,purpose:I})},logEventStopped:(C,x,I)=>{m.push({outcome:"stopped",target:x,purpose:I})},logNoParent:(C,x,I)=>{m.push({outcome:"no-parent",target:x,purpose:I})},logEventNoHandlers:(C,x)=>{m.push({outcome:"no-handlers-left",target:x})},logEventResponse:(C,x,I)=>{m.push({outcome:"response",purpose:I,target:x})},write:()=>{const C=new Date().getTime();ft(["mousemove","mouseover","mouseout",iy()],o)||console.log(o,{event:o,time:C-v,target:u.dom,sequence:ct(m,x=>ft(["cut","stopped","response"],x.outcome)?"{"+x.purpose+"} "+x.outcome+" at ("+zu(x.target)+")":x.outcome)})}}},BR=(o,u,m)=>{switch(bn(gg.get(),o).orThunk(()=>{const C=Zn(gg.get());return ts(C,x=>o.indexOf(x)>-1?V.some(gg.get()[x]):V.none())}).getOr(P0.NORMAL)){case P0.NORMAL:return m(X9());case P0.LOGGING:{const C=vg(o,u),x=m(C);return C.write(),x}case P0.STOP:return!0}},ml=["alloy/data/Fields","alloy/debugging/Debugging"],b4=()=>{const o=new Error;if(o.stack!==void 0){const u=o.stack.split("\n");return Qe(u,m=>m.indexOf("alloy")>0&&!ht(ml,v=>m.indexOf(v)>-1)).getOr(Y9)}else return Y9},Md={logEventCut:z,logEventStopped:z,logNoParent:z,logEventNoHandlers:z,logEventResponse:z,write:z},jC=(o,u,m)=>BR(o,u,m),X9=J(Md),bg=J([Zt("menu"),Zt("selectedMenu")]),M0=J([Zt("item"),Zt("selectedItem")]);J(Ns(M0().concat(bg())));const nm=J(Ns(M0())),uf=Km("initSize",[Zt("numColumns"),Zt("numRows")]),ZC=()=>cr("markers",nm()),Sy=()=>Km("markers",[Zt("backgroundMenu")].concat(bg()).concat(M0())),sm=o=>Km("markers",ct(o,Zt)),f2=(o,u,m)=>(b4(),fl(u,u,m,ey(v=>no.value((...C)=>v.apply(void 0,C))))),Ho=o=>f2("onHandler",o,tg(z)),Qc=o=>f2("onKeyboardHandler",o,tg(V.none)),Nd=o=>f2("onHandler",o,Xf()),qC=o=>f2("onKeyboardHandler",o,Xf()),ci=(o,u)=>nr(o,J(u)),GC=o=>nr(o,ce),yg=J(uf);var N0=[Vu("contextual",[Da("fadeInClass"),Da("fadeOutClass"),Da("transitionClass"),Kl("lazyContext"),Ho("onShow"),Ho("onShown"),Ho("onHide"),Ho("onHidden")]),Kr("lazyViewport",()=>({bounds:ul(),optScrollEnv:V.none()})),og("modes",["top","bottom"],Ln),Ho("onDocked"),Ho("onUndocked")],Q9=Object.freeze({__proto__:null,init:o=>{const u=ds(!1),m=ds(!0),v=vr(),C=ds(o.modes),x=()=>"docked: ".concat(u.get(),", visible: ").concat(m.get(),", modes: ").concat(C.get().join(","));return Pd({isDocked:u.get,setDocked:u.set,getInitialPos:v.get,setInitialPos:v.set,clearInitialPos:v.clear,isVisible:m.get,setVisible:m.set,getModes:C.get,setModes:C.set,readState:x})}});const bi=Sa({fields:N0,name:"docking",active:v4,apis:yy,state:Q9}),p2=(o,u,m)=>co(u,o.element)&&!co(u,m),Cy=ni([AR(Qm(),(o,u)=>{const m=u.event,v=m.originator,C=m.target;return p2(o,v,C)?(console.warn(Qm()+" did not get interpreted by the desired target. \nOriginator: "+zu(v)+"\nTarget: "+zu(C)+"\nCheck the "+Qm()+" event handlers"),!1):!0})]);var eE=Object.freeze({__proto__:null,events:Cy});const m2=(o,u,m,v)=>{const C=o+u;return C>v?m:C<m?v:C},df=(o,u,m)=>Math.min(Math.max(o,u),m),VR=()=>window.crypto.getRandomValues(new Uint32Array(1))[0]/4294967295;let wy=0;const Pn=o=>{const m=new Date().getTime(),v=Math.floor(VR()*1e9);return wy++,o+"_"+v+wy+String(m)},HR=J("alloy-id-"),UR=J("data-alloy-id"),KC=HR(),tE=UR(),zR=(o,u)=>{const m=Pn(KC+o);return Ey(u,m),m},Ey=(o,u)=>{Object.defineProperty(o.dom,tE,{value:u,writable:!0})},F0=o=>{const u=hi(o)?o.dom[tE]:null;return V.from(u)},$0=o=>Pn(o),WR=ce,ky=o=>{const u=C=>"The component must be in a context to execute: ".concat(C)+(o?"\n"+zu(o().element)+" is not in context.":""),m=C=>()=>{throw new Error(u(C))},v=C=>()=>{console.warn(u(C))};return{debugInfo:J("fake"),triggerEvent:v("triggerEvent"),triggerFocus:v("triggerFocus"),triggerEscape:v("triggerEscape"),broadcast:v("broadcast"),broadcastOn:v("broadcastOn"),broadcastEvent:v("broadcastEvent"),build:m("build"),buildOrPatch:m("buildOrPatch"),addToWorld:m("addToWorld"),removeFromWorld:m("removeFromWorld"),addToGui:m("addToGui"),removeFromGui:m("removeFromGui"),getByUid:m("getByUid"),getByDom:m("getByDom"),isConnected:$e}},nE=ky(),xy=Pn("alloy-premade"),jR=o=>(Object.defineProperty(o.element.dom,xy,{value:o.uid,writable:!0}),rg(xy,o)),Su=o=>qs(o.dom,xy),ZR=o=>bn(o,xy),om=o=>DR((u,...m)=>o(u.getApis(),u,...m),o),qR=(o,u)=>{const m=ct(u,C=>Vu(C.name(),[Zt("config"),mt("state",lf)])),v=Ki("component.behaviours",Ns(m),o.behaviours).fold(C=>{throw new Error(Qp(C)+"\nComplete spec:\n"+JSON.stringify(o,null,2))},ce);return{list:u,data:Rs(v,C=>{const x=C.map(I=>({config:I.config,state:I.state.init(I.config)}));return J(x)})}},GR=o=>o.list,KR=o=>o.data,YC=(o,u)=>{const m={};return Qs(o,(v,C)=>{Qs(v,(x,I)=>{const F=bn(m,I).getOr([]);m[I]=F.concat([u(C,x)])})}),m},sE=(o,u,m,v)=>{const C={...u};Ht(m,oe=>{C[oe.name()]=oe.exhibit(o,v)});const x=YC(C,(oe,me)=>({name:oe,modification:me})),I=oe=>so(oe,(me,Se)=>({...Se.modification,...me}),{}),F=so(x.classes,(oe,me)=>me.modification.concat(oe),[]),U=I(x.attributes),X=I(x.styles);return up({classes:F,attributes:U,styles:X})},YR=(o,u,m,v)=>{try{const C=Ze(m,(x,I)=>{const F=x[u],U=I[u],X=v.indexOf(F),oe=v.indexOf(U);if(X===-1)throw new Error("The ordering for "+o+" does not have an entry for "+F+".\nOrder specified: "+JSON.stringify(v,null,2));if(oe===-1)throw new Error("The ordering for "+o+" does not have an entry for "+U+".\nOrder specified: "+JSON.stringify(v,null,2));return X<oe?-1:oe<X?1:0});return no.value(C)}catch(C){return no.error([C])}},oE=(o,u)=>({handler:o,purpose:u}),XR=(o,u)=>({cHandler:o,purpose:u}),B0=(o,u)=>XR(de.apply(void 0,[o.handler].concat(u)),o.purpose),y4=o=>o.cHandler,h2=(o,u)=>({name:o,handler:u}),XC=(o,u)=>{const m={};return Ht(o,v=>{m[v.name()]=v.handlers(u)}),m},rE=(o,u,m)=>{const v={...m,...XC(u,o)};return YC(v,h2)},l1=(o,u,m,v)=>{const C=rE(o,m,v);return QC(C,u)},_4=o=>{const u=wR(o);return(m,v,...C)=>{const x=[m,v].concat(C);u.abort.apply(void 0,x)?v.stop():u.can.apply(void 0,x)&&u.run.apply(void 0,x)}},S4=(o,u)=>no.error(["The event ("+o+') has more than one behaviour that listens to it.\nWhen this occurs, you must specify an event ordering for the behaviours in your spec (e.g. [ "listing", "toggling" ]).\nThe behaviours that can trigger it are: '+JSON.stringify(ct(u,m=>m.name),null,2)]),JC=(o,u,m)=>{const v=u[m];return v?YR("Event: "+m,"name",o,v).map(C=>{const x=ct(C,I=>I.handler);return R9(x)}):S4(m,o)},QC=(o,u)=>{const m=er(o,(v,C)=>(v.length===1?no.value(v[0].handler):JC(v,u,C)).map(I=>{const F=_4(I),U=v.length>1?jn(u[C],X=>ht(v,oe=>oe.name===X)).join(" > "):v[0].name;return rg(C,oE(F,U))}));return J5(m,{})},V0="alloy.base.behaviour",JR=Ns([fl("dom","dom",Xf(),Ns([Zt("tag"),mt("styles",{}),mt("classes",[]),mt("attributes",{}),ur("value"),ur("innerHtml")])),Zt("components"),Zt("uid"),mt("events",{}),mt("apis",{}),fl("eventOrder","eventOrder",le({[Mc()]:["disabling",V0,"toggling","typeaheadevents"],[Qm()]:[V0,"focusing","keying"],[iy()]:[V0,"disabling","toggling","representing","tooltipping"],[Xm()]:[V0,"representing","streaming","invalidating"],[cp()]:[V0,"representing","item-events","toolbar-button-events","tooltipping"],[fd()]:["focusing",V0,"item-type-events"],[op()]:["focusing",V0,"item-type-events"],[rp()]:["item-type-events","tooltipping"],[ap()]:["receiving","reflecting","tooltipping"]}),Qf()),ur("domModification")]),e6=o=>Ki("custom.definition",JR,o),H0=o=>({...o.dom,uid:o.uid,domChildren:ct(o.components,u=>u.element)}),Xl=o=>o.domModification.fold(()=>up({}),up),QR=o=>o.events,$t=o=>o.dom.value,rh=(o,u)=>{if(u===void 0)throw new Error("Value.set was undefined");o.dom.value=u},eD=(o,u,m)=>Si(o,u).map(C=>{if(m.exists(I=>!co(I,C))){const I=m.map(tr).getOr("span"),F=Xt.fromTag(I);return Gh(C,F),F}else return C}),C4=(o,u,m)=>{m.fold(()=>cd(o,u),v=>{co(v,u)||(Gh(v,u),of(v))})},g2=(o,u,m)=>{const v=ct(u,m),C=So(o);return Ht(C.slice(v.length),of),v},dp=(o,u,m,v)=>{const C=Si(o,u),x=v(m,C),I=eD(o,u,C);return C4(o,x.element,I),x},iE=(o,u,m)=>g2(o,u,(v,C)=>dp(o,C,v,m)),aE=(o,u)=>g2(o,u,(m,v)=>{const C=Si(o,v);return C4(o,m,C),m}),w4=(o,u)=>{const m=Zn(o),v=Zn(u),C=Bt(v,m),x=Mo(o,(I,F)=>!qs(u,F)||I!==u[F]).t;return{toRemove:C,toSet:x}},E4=(o,u)=>{const{class:m,style:v,...C}=Je(u),{toSet:x,toRemove:I}=w4(o.attributes,C),F=()=>{Ht(I,it=>ke(u,it)),ns(u,x)},U=ef(u),{toSet:X,toRemove:oe}=w4(o.styles,U),me=()=>{Ht(oe,it=>fo(u,it)),Vo(u,X)},Se=LR(u),Ie=Bt(Se,o.classes),Pe=Bt(o.classes,Se),Me=()=>{ug(u,Pe),cf(u,Ie)},at=it=>{Mi(u,it)},qe=()=>{const it=o.domChildren;aE(u,it)},dt=()=>{const it=u,It=o.value.getOrUndefined();It!==$t(it)&&rh(it,It!=null?It:"")};return F(),Me(),me(),o.innerHtml.fold(qe,at),dt(),u},k4=o=>{const u=Xt.fromTag(o.tag);ns(u,o.attributes),ug(u,o.classes),Vo(u,o.styles),o.innerHtml.each(v=>Mi(u,v));const m=o.domChildren;return Il(u,m),o.value.each(v=>{rh(u,v)}),u},lE=(o,u)=>{try{const m=E4(o,u);return V.some(m)}catch{return V.none()}},tD=o=>o.innerHtml.isSome()&&o.domChildren.length>0,Cu=(o,u)=>{const m=C=>tr(C)===o.tag&&!tD(o)&&!Su(C),v=u.filter(m).bind(C=>lE(o,C)).getOrThunk(()=>k4(o));return Ey(v,o.uid),v},x4=o=>{const u=bn(o,"behaviours").getOr({});return Ve(Zn(u),m=>{const v=u[m];return B(v)?[v.me]:[]})},cE=(o,u)=>qR(o,u),nD=o=>{const u=x4(o);return cE(o,u)},sD=(o,u,m)=>{const v=H0(o),C=Xl(o),x={"alloy.base.modification":C},I=u.length>0?sE(m,x,u,v):C;return u4(v,I)},uE=(o,u,m)=>{const v={"alloy.base.behaviour":QR(o)};return l1(m,o.eventOrder,u,v).getOrDie()},T4=(o,u)=>{const m=()=>it,v=ds(nE),C=un(e6(o)),x=nD(o),I=GR(x),F=KR(x),U=sD(C,I,F),X=Cu(U,u),oe=uE(C,I,F),me=ds(C.components),Se=It=>{v.set(It)},Ie=()=>{v.set(ky(m))},Pe=()=>{const It=So(X),Mt=Ve(It,en=>v.get().getByDom(en).fold(()=>[],je));me.set(Mt)},Me=It=>{const Mt=F;return(W(Mt[It.name()])?Mt[It.name()]:()=>{throw new Error("Could not find "+It.name()+" in "+JSON.stringify(o,null,2))})()},at=It=>W(F[It.name()]),qe=()=>C.apis,dt=It=>F[It]().map(Mt=>Mt.state.readState()).getOr("not enabled"),it={uid:o.uid,getSystem:v.get,config:Me,hasConfigured:at,spec:o,readState:dt,getApis:qe,connect:Se,disconnect:Ie,element:X,syncComponents:Pe,components:me.get,events:oe};return it},oD=(o,u)=>{const m=bn(o,"components").getOr([]);return u.fold(()=>ct(m,Fc),v=>ct(m,(C,x)=>I4(C,Si(v,x))))},dE=(o,u)=>{const{events:m,...v}=WR(o),C=oD(v,u),x={...v,events:{...eE,...m},components:C};return no.value(T4(x,u))},Ci=o=>{const u=Xt.fromText(o);return v2({element:u})},v2=o=>{const u=yu("external.component",bu([Zt("element"),ur("uid")]),o),m=ds(ky()),v=F=>{m.set(F)},C=()=>{m.set(ky(()=>I))},x=u.uid.getOrThunk(()=>$0("external"));Ey(u.element,x);const I={uid:x,getSystem:m.get,config:V.none,hasConfigured:$e,connect:v,disconnect:C,getApis:()=>({}),element:u.element,spec:o,readState:J("No state"),syncComponents:z,components:J([]),events:{}};return jR(I)},fE=$0,pE=o=>qs(o,"uid"),I4=(o,u)=>ZR(o).getOrThunk(()=>{const m=pE(o)?o:{uid:fE(""),...o};return dE(m,u).getOrDie()}),Fc=o=>I4(o,V.none()),md=jR;var mE=(o,u,m,v,C)=>o(m,v)?V.some(m):W(C)&&C(m)?V.none():u(m,v,C);const hE=(o,u,m)=>{let v=o.dom;const C=W(m)?m:$e;for(;v.parentNode;){v=v.parentNode;const x=Xt.fromDom(v);if(u(x))return V.some(x);if(C(x))break}return V.none()},t6=(o,u,m)=>mE((C,x)=>x(C),hE,o,u,m),Ty=(o,u)=>{const m=o.dom;return m.parentNode?gE(Xt.fromDom(m.parentNode),v=>!co(o,v)&&u(v)):V.none()},gE=(o,u)=>{const m=C=>u(Xt.fromDom(C));return Qe(o.dom.childNodes,m).map(Xt.fromDom)},n6=(o,u)=>{const m=v=>{for(let C=0;C<v.childNodes.length;C++){const x=Xt.fromDom(v.childNodes[C]);if(u(x))return V.some(x);const I=m(v.childNodes[C]);if(I.isSome())return I}return V.none()};return m(o.dom)},s6=(o,u,m)=>t6(o,u,m).isSome(),vE=o=>Nu(o),ih=(o,u,m)=>hE(o,v=>ar(v,u),m),Wu=(o,u)=>Ty(o,m=>ar(m,u)),bE=(o,u)=>gE(o,m=>ar(m,u)),sr=(o,u)=>Nu(u,o),fp=(o,u,m)=>mE((C,x)=>ar(C,x),ih,o,u,m),b2="aria-controls",yE=o=>t6(o,m=>{if(!hi(m))return!1;const v=eo(m,"id");return v!==void 0&&v.indexOf(b2)>-1}).bind(m=>{const v=eo(m,"id"),C=za(m);return sr(C,"[".concat(b2,'="').concat(v,'"]'))}),o6=()=>{const o=Pn(b2);return{id:o,link:v=>{jt(v,b2,o)},unlink:v=>{ke(v,b2)}}},_E=(o,u)=>yE(u).exists(m=>_g(o,m)),_g=(o,u)=>s6(u,m=>co(m,o.element),$e)||_E(o,u),Rl=(o,u,m,v,C,x,I,F=!1)=>({x:o,y:u,bubble:m,direction:v,placement:C,restriction:x,label:"".concat(I,"-").concat(C),alwaysFit:F}),ah=sp.generate([{southeast:[]},{southwest:[]},{northeast:[]},{northwest:[]},{south:[]},{north:[]},{east:[]},{west:[]}]),y2=(o,u,m,v,C,x,I,F,U)=>o.fold(u,m,v,C,x,I,F,U),SE=(o,u,m,v)=>o.fold(u,u,v,v,u,v,m,m),rD=(o,u,m,v)=>o.fold(u,v,u,v,m,m,u,v),A4=ah.southeast,r6=ah.southwest,i6=ah.northeast,a6=ah.northwest,CE=ah.south,wE=ah.north,EE=ah.east,kE=ah.west,iD=(o,u)=>{switch(u){case 1:return o.x;case 0:return o.x+o.width;case 2:return o.y;case 3:return o.y+o.height}},bc=(o,u)=>Le(["left","right","top","bottom"],m=>bn(u,m).map(v=>iD(o,v))),aD=(o,u,m)=>{const v=(U,X)=>u[U].map(oe=>{const me=U==="top"||U==="bottom",Se=me?m.top:m.left,Pe=(U==="left"||U==="top"?Math.max:Math.min)(oe,X)+Se;return me?df(Pe,o.y,o.bottom):df(Pe,o.x,o.right)}).getOr(X),C=v("left",o.x),x=v("top",o.y),I=v("right",o.right),F=v("bottom",o.bottom);return qi(C,x,I-C,F-x)},c1="layout",l6=o=>o.x,c6=(o,u)=>o.x+o.width/2-u.width/2,xE=(o,u)=>o.x+o.width-u.width,O4=(o,u)=>o.y-u.height,u6=o=>o.y+o.height,d6=(o,u)=>o.y+o.height/2-u.height/2,lD=o=>o.x+o.width,cD=(o,u)=>o.x-u.width,La=(o,u,m)=>Rl(l6(o),u6(o),m.southeast(),A4(),"southeast",bc(o,{left:1,top:3}),c1),qa=(o,u,m)=>Rl(xE(o,u),u6(o),m.southwest(),r6(),"southwest",bc(o,{right:0,top:3}),c1),Jl=(o,u,m)=>Rl(l6(o),O4(o,u),m.northeast(),i6(),"northeast",bc(o,{left:1,bottom:2}),c1),Pa=(o,u,m)=>Rl(xE(o,u),O4(o,u),m.northwest(),a6(),"northwest",bc(o,{right:0,bottom:2}),c1),hl=(o,u,m)=>Rl(c6(o,u),O4(o,u),m.north(),wE(),"north",bc(o,{bottom:2}),c1),nl=(o,u,m)=>Rl(c6(o,u),u6(o),m.south(),CE(),"south",bc(o,{top:3}),c1),f6=(o,u,m)=>Rl(lD(o),d6(o,u),m.east(),EE(),"east",bc(o,{left:0}),c1),Iy=(o,u,m)=>Rl(cD(o,u),d6(o,u),m.west(),kE(),"west",bc(o,{right:1}),c1),Ay=()=>[La,qa,Jl,Pa,nl,hl,f6,Iy],Dl=()=>[qa,La,Pa,Jl,nl,hl,f6,Iy],TE=()=>[Jl,Pa,La,qa,hl,nl],R4=()=>[Pa,Jl,qa,La,hl,nl],Yn=()=>[La,qa,Jl,Pa,nl,hl],U0=()=>[qa,La,Pa,Jl,nl,hl],p6=(o,u)=>u.universal?o:jn(o,m=>ft(u.channels,m));var uD=Object.freeze({__proto__:null,events:o=>ni([Wt(ap(),(u,m)=>{const v=o.channels,C=Zn(v),x=m,I=p6(C,x);Ht(I,F=>{const U=v[F],X=U.schema,oe=yu("channel["+F+"] data\nReceiver: "+zu(u.element),X,x.data);U.onReceive(u,oe)})})])}),dD=[cr("channels",Jp(no.value,bu([Nd("onReceive"),mt("schema",Qf())])))];const ju=Sa({fields:dD,name:"receiving",active:uD});var IE=Object.freeze({__proto__:null,exhibit:(o,u)=>up({classes:[],styles:u.useFixed()?{}:{position:"relative"}})});const eu=(o,u=!1)=>o.dom.focus({preventScroll:u}),lh=o=>o.dom.blur(),gl=o=>{const u=za(o).dom;return o.dom===u.activeElement},ff=(o=Q1())=>V.from(o.dom.activeElement).map(Xt.fromDom),tu=o=>ff(za(o)).filter(u=>o.dom.contains(u.dom)),m6=(o,u)=>{const m=za(u),v=ff(m).bind(x=>{const I=F=>co(x,F);return I(u)?V.some(u):n6(u,I)}),C=o(u);return v.each(x=>{ff(m).filter(I=>co(I,x)).fold(()=>{eu(x)},z)}),C},L4=sp.generate([{none:[]},{relative:["x","y","width","height"]},{fixed:["x","y","width","height"]}]),h6=(o,u,m,v,C,x)=>{const I=u.rect,F=I.x-m,U=I.y-v,X=I.width,oe=I.height,me=C-(F+X),Se=x-(U+oe),Ie=V.some(F),Pe=V.some(U),Me=V.some(me),at=V.some(Se),qe=V.none();return y2(u.direction,()=>tm(o,Ie,Pe,qe,qe),()=>tm(o,qe,Pe,Me,qe),()=>tm(o,Ie,qe,qe,at),()=>tm(o,qe,qe,Me,at),()=>tm(o,Ie,Pe,qe,qe),()=>tm(o,Ie,qe,qe,at),()=>tm(o,Ie,Pe,qe,qe),()=>tm(o,qe,Pe,Me,qe))},AE=(o,u)=>o.fold(()=>{const m=u.rect;return tm("absolute",V.some(m.x),V.some(m.y),V.none(),V.none())},(m,v,C,x)=>h6("absolute",u,m,v,C,x),(m,v,C,x)=>h6("fixed",u,m,v,C,x)),P4=(o,u)=>{const m=de(Yp,u),v=o.fold(m,m,()=>{const I=Dc();return Yp(u).translate(-I.left,-I.top)}),C=Zp(u),x=Dd(u);return qi(v.left,v.top,C,x)},OE=(o,u)=>u.fold(()=>o.fold(ul,ul,qi),m=>o.fold(J(m),J(m),()=>{const v=RE(o,m.x,m.y);return qi(v.left,v.top,m.width,m.height)})),RE=(o,u,m)=>{const v=jr(u,m),C=()=>{const x=Dc();return v.translate(-x.left,-x.top)};return o.fold(J(v),J(v),C)},DE=(o,u,m,v)=>o.fold(u,m,v);L4.none;const fD=L4.relative,pD=L4.fixed,mD=(o,u)=>({anchorBox:o,origin:u}),g6=(o,u)=>mD(o,u),M4="data-alloy-placement",LE=(o,u)=>{jt(o,M4,u)},Oy=o=>Us(o,M4),_2=o=>ke(o,M4),Sg=sp.generate([{fit:["reposition"]},{nofit:["reposition","visibleW","visibleH","isVisible"]}]),N4=(o,u)=>{const{x:m,y:v,right:C,bottom:x}=u,{x:I,y:F,right:U,bottom:X,width:oe,height:me}=o,Se=I>=m&&I<=C,Ie=F>=v&&F<=x,Pe=Se&&Ie,Me=U<=C&&U>=m,at=X<=x&&X>=v,qe=Me&&at,dt=Math.min(oe,I>=m?C-I:U-m),it=Math.min(me,F>=v?x-F:X-v);return{originInBounds:Pe,sizeInBounds:qe,visibleW:dt,visibleH:it}},hD=(o,u)=>{const{x:m,y:v,right:C,bottom:x}=u,{x:I,y:F,width:U,height:X}=o,oe=Math.max(m,C-U),me=Math.max(v,x-X),Se=df(I,m,oe),Ie=df(F,v,me),Pe=Math.min(Se+U,C)-Se,Me=Math.min(Ie+X,x)-Ie;return qi(Se,Ie,Pe,Me)},PE=(o,u,m)=>{const v=J(u.bottom-m.y),C=J(m.bottom-u.y),x=SE(o,C,C,v),I=J(u.right-m.x),F=J(m.right-u.x);return{maxWidth:rD(o,F,F,I),maxHeight:x}},gD=(o,u,m,v)=>{const C=o.bubble,x=C.offset,I=aD(v,o.restriction,x),F=o.x+x.left,U=o.y+x.top,X=qi(F,U,u,m),{originInBounds:oe,sizeInBounds:me,visibleW:Se,visibleH:Ie}=N4(X,I),Pe=oe&&me,Me=Pe?X:hD(X,I),at=Me.width>0&&Me.height>0,{maxWidth:qe,maxHeight:dt}=PE(o.direction,Me,v),it={rect:Me,maxHeight:dt,maxWidth:qe,direction:o.direction,placement:o.placement,classes:{on:C.classesOn,off:C.classesOff},layout:o.label,testY:U};return Pe||o.alwaysFit?Sg.fit(it):Sg.nofit(it,Se,Ie,at)},ME=(o,u,m,v,C,x)=>{const I=v.width,F=v.height,U=(oe,me,Se,Ie,Pe)=>{const Me=oe(m,v,C,o,x),at=gD(Me,I,F,x);return at.fold(J(at),(qe,dt,it,It)=>(Pe===It?it>Ie||dt>Se:!Pe&&It)?at:Sg.nofit(me,Se,Ie,Pe))};return Xs(u,(oe,me)=>{const Se=de(U,me);return oe.fold(J(oe),Se)},Sg.nofit({rect:m,maxHeight:v.height,maxWidth:v.width,direction:A4(),placement:"southeast",classes:{on:[],off:[]},layout:"none",testY:m.y},-1,-1,!1)).fold(ce,ce)},NE=Ue,wu=(o,u,m)=>Yc(o,u,NE,m),F4=(o,u,m)=>zv(o,u,NE,m),FE=Kp,v6=["top","bottom","right","left"],Ry="data-alloy-transition-timer",vD=(o,u)=>hU(o,u.classes),S2=(o,u,m)=>m.exists(v=>{const C=o.mode;return C==="all"?!0:v[C]!==u[C]}),bD=(o,u)=>{const m=v=>parseFloat(v).toFixed(3);return Zs(u,(v,C)=>{const x=o[C].map(m),I=v.map(m);return!yt(x,I)}).isSome()},b6=o=>{const u=x=>{const F=Gt(o,x).split(/\s*,\s*/);return jn(F,_i)},m=x=>{if(d(x)&&/^[\d.]+/.test(x)){const I=parseFloat(x);return mi(x,"ms")?I:I*1e3}else return 0},v=u("transition-delay"),C=u("transition-duration");return Xs(C,(x,I,F)=>{const U=m(v[F])+m(I);return Math.max(x,U)},0)},yD=(o,u)=>{const m=$u(),v=$u();let C;const x=X=>{var oe;const me=(oe=X.raw.pseudoElement)!==null&&oe!==void 0?oe:"";return co(X.target,o)&&yr(me)&&ft(v6,X.raw.propertyName)},I=X=>{if(P(X)||x(X)){m.clear(),v.clear();const oe=X==null?void 0:X.raw.type;(P(oe)||oe===e2())&&(clearTimeout(C),ke(o,Ry),cf(o,u.classes))}},F=wu(o,xR(),X=>{x(X)&&(F.unbind(),m.set(wu(o,e2(),I)),v.set(wu(o,kR(),I)))}),U=b6(o);requestAnimationFrame(()=>{C=setTimeout(I,U+17),jt(o,Ry,C)})},Dy=(o,u)=>{ug(o,u.classes),Us(o,Ry).each(m=>{clearTimeout(parseInt(m,10)),ke(o,Ry)}),yD(o,u)},_D=(o,u,m,v,C,x)=>{const I=S2(v,C,x);if(I||vD(o,v)){wn(o,"position",m.position);const F=P4(u,o),U=AE(u,{...C,rect:F}),X=Le(v6,oe=>U[oe]);bD(m,X)&&(Wa(o,X),I&&Dy(o,v),mc(o))}else cf(o,v.classes)},SD=o=>({width:Zp(o),height:Dd(o)}),$4=(o,u,m,v)=>{fo(u,"max-height"),fo(u,"max-width");const C=SD(u);return ME(u,v.preference,o,C,m,v.bounds)},$E=(o,u)=>{const m=u.classes;cf(o,m.off),ug(o,m.on)},y6=(o,u,m)=>{const v=m.maxHeightFunction;v(o,u.maxHeight)},Ly=(o,u,m)=>{const v=m.maxWidthFunction;v(o,u.maxWidth)},BE=(o,u,m)=>{const v=AE(m.origin,u);m.transition.each(C=>{_D(o,m.origin,v,C,u,m.lastPlacement)}),Hu(o,v)},_6=(o,u)=>{LE(o,u.placement)},S6=(o,u)=>{p0(o,Math.floor(u))},C6=J((o,u)=>{S6(o,u),Vo(o,{"overflow-x":"hidden","overflow-y":"auto"})}),z0=J((o,u)=>{S6(o,u)}),VE=(o,u,m)=>o[u]===void 0?m:o[u],w6=(o,u,m,v,C,x,I,F)=>{const U=VE(I,"maxHeightFunction",C6()),X=VE(I,"maxWidthFunction",z),oe=o.anchorBox,me=o.origin,Se={bounds:OE(me,x),origin:me,preference:v,maxHeightFunction:U,maxWidthFunction:X,lastPlacement:C,transition:F};return HE(oe,u,m,Se)},HE=(o,u,m,v)=>{const C=$4(o,u,m,v);return BE(u,C,v),_6(u,C),$E(u,C),y6(u,C,v),Ly(u,C,v),{layout:C.layout,placement:C.placement}},UE=["valignCentre","alignLeft","alignRight","alignCentre","top","bottom","left","right","inset"],Eu=(o,u,m,v=1)=>{const C=o*v,x=u*v,I=U=>bn(m,U).getOr([]),F=(U,X,oe)=>{const me=Bt(UE,oe);return{offset:jr(U,X),classesOn:Ve(oe,I),classesOff:Ve(me,I)}};return{southeast:()=>F(-o,u,["top","alignLeft"]),southwest:()=>F(o,u,["top","alignRight"]),south:()=>F(-o/2,u,["top","alignCentre"]),northeast:()=>F(-o,-u,["bottom","alignLeft"]),northwest:()=>F(o,-u,["bottom","alignRight"]),north:()=>F(-o/2,-u,["bottom","alignCentre"]),east:()=>F(o,-u/2,["valignCentre","left"]),west:()=>F(-o,-u/2,["valignCentre","right"]),insetNortheast:()=>F(C,x,["top","alignLeft","inset"]),insetNorthwest:()=>F(-C,x,["top","alignRight","inset"]),insetNorth:()=>F(-C/2,x,["top","alignCentre","inset"]),insetSoutheast:()=>F(C,-x,["bottom","alignLeft","inset"]),insetSouthwest:()=>F(-C,-x,["bottom","alignRight","inset"]),insetSouth:()=>F(-C/2,-x,["bottom","alignCentre","inset"]),insetEast:()=>F(-C,-x/2,["valignCentre","right","inset"]),insetWest:()=>F(C,-x/2,["valignCentre","left","inset"])}},B4=()=>Eu(0,0,{}),V4=ce,E6=(o,u)=>m=>k6(m)==="rtl"?u:o,k6=o=>Gt(o,"direction")==="rtl"?"rtl":"ltr";var ch;(function(o){o.TopToBottom="toptobottom",o.BottomToTop="bottomtotop"})(ch||(ch={}));const H4="data-alloy-vertical-dir",CD=o=>s6(o,u=>hi(u)&&eo(u,"data-alloy-vertical-dir")===ch.BottomToTop),Cg=()=>Vu("layouts",[Zt("onLtr"),Zt("onRtl"),ur("onBottomLtr"),ur("onBottomRtl")]),U4=(o,u,m,v,C,x,I)=>{const F=I.map(CD).getOr(!1),U=u.layouts.map(Ie=>Ie.onLtr(o)),X=u.layouts.map(Ie=>Ie.onRtl(o)),oe=F?u.layouts.bind(Ie=>Ie.onBottomLtr.map(Pe=>Pe(o))).or(U).getOr(C):U.getOr(m),me=F?u.layouts.bind(Ie=>Ie.onBottomRtl.map(Pe=>Pe(o))).or(X).getOr(x):X.getOr(v);return E6(oe,me)(o)},ku=(o,u,m)=>{const v=u.hotspot,C=P4(m,v.element),x=U4(o.element,u,Yn(),U0(),TE(),R4(),V.some(u.hotspot.element));return V.some(V4({anchorBox:C,bubble:u.bubble.getOr(B4()),overrides:u.overrides,layouts:x}))};var CU=[Zt("hotspot"),ur("bubble"),mt("overrides",{}),Cg(),ci("placement",ku)];const C2=(o,u,m)=>{const v=RE(m,u.x,u.y),C=qi(v.left,v.top,u.width,u.height),x=U4(o.element,u,Ay(),Dl(),Ay(),Dl(),V.none());return V.some(V4({anchorBox:C,bubble:u.bubble,overrides:u.overrides,layouts:x}))};var wD=[Zt("x"),Zt("y"),mt("height",0),mt("width",0),mt("bubble",B4()),mt("overrides",{}),Cg(),ci("placement",C2)];const Py=sp.generate([{screen:["point"]},{absolute:["point","scrollLeft","scrollTop"]}]),ED=o=>o.fold(ce,(u,m,v)=>u.translate(-m,-v)),kD=o=>o.fold(ce,ce),zE=o=>Xs(o,(u,m)=>u.translate(m.left,m.top),jr(0,0)),WE=o=>{const u=ct(o,ED);return zE(u)},z4=o=>{const u=ct(o,kD);return zE(u)},xD=Py.screen,TD=Py.absolute,My=(o,u,m)=>{const v=pc(m.root).dom,C=x=>{const I=Fr(x),F=Fr(o.element);return co(I,F)};return V.from(v.frameElement).map(Xt.fromDom).filter(C).map(hc)},x6=(o,u,m)=>{const v=Fr(o.element),C=Dc(v),x=My(o,u,m).getOr(C);return TD(x,C.left,C.top)},T6=(o,u,m,v)=>{const C=xD(jr(o,u));return V.some(Kb(C,m,v))},jE=(o,u,m,v,C)=>o.map(x=>{const I=[u,x.point],F=DE(v,()=>z4(I),()=>z4(I),()=>WE(I)),U=Yf(F.left,F.top,x.width,x.height),X=m.showAbove?TE():Yn(),oe=m.showAbove?R4():U0(),me=U4(C,m,X,oe,X,oe,V.none());return V4({anchorBox:U,bubble:m.bubble.getOr(B4()),overrides:m.overrides,layouts:me})}),ZE=(o,u,m)=>{const v=x6(o,m,u);return u.node.filter(We).bind(C=>{const x=C.dom.getBoundingClientRect(),I=T6(x.left,x.top,x.width,x.height),F=u.node.getOr(o.element);return jE(I,v,u,m,F)})};var W4=[Zt("node"),Zt("root"),ur("bubble"),Cg(),mt("overrides",{}),mt("showAbove",!1),ci("placement",ZE)];const wU="\uFEFF",w2=" ",Ny={create:(o,u,m,v)=>({start:o,soffset:u,finish:m,foffset:v})},Fy=sp.generate([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),j4=(o,u,m,v)=>o.fold(u,m,v),ID=o=>o.fold(ce,ce,ce),qE=Fy.before,AD=Fy.on,I6=Fy.after,A6={before:qE,on:AD,after:I6,cata:j4,getStart:ID},u1=sp.generate([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),$y=o=>u1.exact(o.start,o.soffset,o.finish,o.foffset),OD=o=>o.match({domRange:u=>Xt.fromDom(u.startContainer),relative:(u,m)=>A6.getStart(u),exact:(u,m,v,C)=>u}),O6=u1.domRange,GE=u1.relative,EU=u1.exact,KE=o=>{const u=OD(o);return pc(u)},R6=Ny.create,wg={domRange:O6,relative:GE,exact:EU,exactFromRange:$y,getWin:KE,range:R6},RD=(o,u)=>{u.fold(m=>{o.setStartBefore(m.dom)},(m,v)=>{o.setStart(m.dom,v)},m=>{o.setStartAfter(m.dom)})},D6=(o,u)=>{u.fold(m=>{o.setEndBefore(m.dom)},(m,v)=>{o.setEnd(m.dom,v)},m=>{o.setEndAfter(m.dom)})},L6=(o,u,m)=>{const v=o.document.createRange();return RD(v,u),D6(v,m),v},P6=(o,u,m,v,C)=>{const x=o.document.createRange();return x.setStart(u.dom,m),x.setEnd(v.dom,C),x},Z4=o=>({left:o.left,top:o.top,right:o.right,bottom:o.bottom,width:o.width,height:o.height}),M6=o=>{const u=o.getClientRects(),m=u.length>0?u[0]:o.getBoundingClientRect();return m.width>0||m.height>0?V.some(m).map(Z4):V.none()},q4=o=>{const u=o.getBoundingClientRect();return u.width>0||u.height>0?V.some(u).map(Z4):V.none()},E2=sp.generate([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),N6=(o,u,m)=>u(Xt.fromDom(m.startContainer),m.startOffset,Xt.fromDom(m.endContainer),m.endOffset),DD=(o,u)=>u.match({domRange:m=>({ltr:J(m),rtl:V.none}),relative:(m,v)=>({ltr:nf(()=>L6(o,m,v)),rtl:nf(()=>V.some(L6(o,v,m)))}),exact:(m,v,C,x)=>({ltr:nf(()=>P6(o,m,v,C,x)),rtl:nf(()=>V.some(P6(o,C,x,m,v)))})}),LD=(o,u)=>{const m=u.ltr();return m.collapsed?u.rtl().filter(C=>C.collapsed===!1).map(C=>E2.rtl(Xt.fromDom(C.endContainer),C.endOffset,Xt.fromDom(C.startContainer),C.startOffset)).getOrThunk(()=>N6(o,E2.ltr,m)):N6(o,E2.ltr,m)},W0=(o,u)=>{const m=DD(o,u);return LD(o,m)},By=(o,u)=>W0(o,u).match({ltr:(v,C,x,I)=>{const F=o.document.createRange();return F.setStart(v.dom,C),F.setEnd(x.dom,I),F},rtl:(v,C,x,I)=>{const F=o.document.createRange();return F.setStart(x.dom,I),F.setEnd(v.dom,C),F}});E2.ltr,E2.rtl;const YE=(o,u,m)=>jn(bs(o,m),u),xu=(o,u)=>ya(u,o),kU=(o,u,m,v)=>{const x=Fr(o).dom.createRange();return x.setStart(o.dom,u),x.setEnd(m.dom,v),x},PD=(o,u,m,v)=>{const C=kU(o,u,m,v),x=co(o,m)&&u===v;return C.collapsed&&!x},k2=o=>V.from(o.getSelection()),XE=o=>{if(o.rangeCount>0){const u=o.getRangeAt(0),m=o.getRangeAt(o.rangeCount-1);return V.some(Ny.create(Xt.fromDom(u.startContainer),u.startOffset,Xt.fromDom(m.endContainer),m.endOffset))}else return V.none()},JE=o=>{if(o.anchorNode===null||o.focusNode===null)return XE(o);{const u=Xt.fromDom(o.anchorNode),m=Xt.fromDom(o.focusNode);return PD(u,o.anchorOffset,m,o.focusOffset)?V.some(Ny.create(u,o.anchorOffset,m,o.focusOffset)):XE(o)}},Vy=o=>k2(o).filter(u=>u.rangeCount>0).bind(JE),Eg=(o,u)=>{const m=By(o,u);return M6(m)},F6=(o,u)=>{const m=By(o,u);return q4(m)},MD=((o,u)=>{const m=x=>{if(!o(x))throw new Error("Can only get "+u+" value of a "+u+" node");return v(x).getOr("")},v=x=>o(x)?V.from(x.dom.nodeValue):V.none();return{get:m,getOption:v,set:(x,I)=>{if(!o(x))throw new Error("Can only set raw "+u+" value of a "+u+" node");x.dom.nodeValue=I}}})(ii,"text"),ek=o=>MD.get(o),Hy=(o,u)=>({element:o,offset:u}),tk=(o,u)=>{const m=So(o);if(m.length===0)return Hy(o,u);if(u<m.length)return Hy(m[u],0);{const v=m[m.length-1],C=ii(v)?ek(v).length:So(v).length;return Hy(v,C)}},Uy=(o,u)=>ii(o)?Hy(o,u):tk(o,u),x2=o=>o.foffset!==void 0,$6=(o,u)=>u.getSelection.getOrThunk(()=>()=>Vy(o))().map(v=>{if(x2(v)){const C=Uy(v.start,v.soffset),x=Uy(v.finish,v.foffset);return wg.range(C.element,C.offset,x.element,x.offset)}else return v}),T2=(o,u,m)=>{const v=pc(u.root).dom,C=x6(o,m,u),x=$6(v,u).bind(U=>{if(x2(U))return F6(v,wg.exactFromRange(U)).orThunk(()=>{const oe=Xt.fromText(wU);Gh(U.start,oe);const me=Eg(v,wg.exact(oe,0,oe,1));return of(oe),me}).bind(oe=>T6(oe.left,oe.top,oe.width,oe.height));{const X=Rs(U,me=>me.dom.getBoundingClientRect()),oe={left:Math.min(X.firstCell.left,X.lastCell.left),right:Math.max(X.firstCell.right,X.lastCell.right),top:Math.min(X.firstCell.top,X.lastCell.top),bottom:Math.max(X.firstCell.bottom,X.lastCell.bottom)};return T6(oe.left,oe.top,oe.right-oe.left,oe.bottom-oe.top)}}),F=$6(v,u).bind(U=>x2(U)?hi(U.start)?V.some(U.start):jl(U.start):V.some(U.firstCell)).getOr(o.element);return jE(x,C,u,m,F)};var j0=[ur("getSelection"),Zt("root"),ur("bubble"),Cg(),mt("overrides",{}),mt("showAbove",!1),ci("placement",T2)];const Z0="link-layout",d1=o=>o.x+o.width,B6=(o,u)=>o.x-u.width,uh=(o,u)=>o.y-u.height+o.height,pp=o=>o.y,dh=(o,u,m)=>Rl(d1(o),pp(o),m.southeast(),A4(),"southeast",bc(o,{left:0,top:2}),Z0),V6=(o,u,m)=>Rl(B6(o,u),pp(o),m.southwest(),r6(),"southwest",bc(o,{right:1,top:2}),Z0),rm=(o,u,m)=>Rl(d1(o),uh(o,u),m.northeast(),i6(),"northeast",bc(o,{left:0,bottom:3}),Z0),H6=(o,u,m)=>Rl(B6(o,u),uh(o,u),m.northwest(),a6(),"northwest",bc(o,{right:1,bottom:3}),Z0),q0=()=>[dh,V6,rm,H6],I2=()=>[V6,dh,H6,rm],nk=(o,u,m)=>{const v=P4(m,u.item.element),C=U4(o.element,u,q0(),I2(),q0(),I2(),V.none());return V.some(V4({anchorBox:v,bubble:B4(),overrides:u.overrides,layouts:C}))};var sk=[Zt("item"),Cg(),mt("overrides",{}),ci("placement",nk)],zy=dl("type",{selection:j0,node:W4,hotspot:CU,submenu:sk,makeshift:wD});const G4=[Bu("classes",Ln),np("mode","all",["all","layout","placement"])],ND=[mt("useFixed",$e),ur("getBounds")],Wy=[cr("anchor",zy),Vu("transition",G4)],K4=()=>{const o=document.documentElement;return pD(0,0,o.clientWidth,o.clientHeight)},ok=o=>{const u=hc(o.element),m=o.element.dom.getBoundingClientRect();return fD(u.left,u.top,m.width,m.height)},mp=(o,u,m,v,C,x)=>{const I=g6(u.anchorBox,o);return w6(I,v.element,u.bubble,u.layouts,C,m,u.overrides,x)},rk=(o,u,m,v,C)=>{const x=V.none();Y4(o,u,m,v,C,x)},Y4=(o,u,m,v,C,x)=>{const I=yu("placement.info",Ns(Wy),C),F=I.anchor,U=v.element,X=m.get(v.uid);m6(()=>{wn(U,"position","fixed");const oe=Er(U,"visibility");wn(U,"visibility","hidden");const me=u.useFixed()?K4():ok(o);F.placement(o,F,me).each(Se=>{const Ie=x.orThunk(()=>u.getBounds.map(Be)),Pe=mp(me,Se,Ie,v,X,I.transition);m.set(v.uid,Pe)}),oe.fold(()=>{fo(U,"visibility")},Se=>{wn(U,"visibility",Se)}),Er(U,"left").isNone()&&Er(U,"top").isNone()&&Er(U,"right").isNone()&&Er(U,"bottom").isNone()&<(Er(U,"position"),"fixed")&&fo(U,"position")},U)};var jy=Object.freeze({__proto__:null,position:rk,positionWithinBounds:Y4,getMode:(o,u,m)=>u.useFixed()?"fixed":"absolute",reset:(o,u,m,v)=>{const C=v.element;Ht(["position","left","right","top","bottom"],x=>fo(C,x)),_2(C),m.clear(v.uid)}}),ak=Object.freeze({__proto__:null,init:()=>{let o={};return Pd({readState:()=>o,clear:C=>{B(C)?delete o[C]:o={}},set:(C,x)=>{o[C]=x},get:C=>bn(o,C)})}});const yc=Sa({fields:ND,name:"positioning",active:IE,apis:jy,state:ak}),X4=o=>o.getSystem().isConnected(),kg=o=>{vo(o,cp());const u=o.components();Ht(u,kg)},Fd=o=>{const u=o.components();Ht(u,Fd),vo(o,lp())},lk=(o,u)=>{o.getSystem().addToWorld(u),We(o.element)&&Fd(u)},J4=o=>{kg(o),o.getSystem().removeFromWorld(o)},Zy=(o,u)=>{cd(o.element,u.element)},ck=o=>{Ht(o.components(),u=>of(u.element)),zm(o.element),o.syncComponents()},qy=(o,u,m)=>{const v=o.components();ck(o);const C=m(u),x=Bt(v,C);Ht(x,I=>{kg(I),o.getSystem().removeFromWorld(I)}),Ht(C,I=>{X4(I)?Zy(o,I):(o.getSystem().addToWorld(I),Zy(o,I),We(o.element)&&Fd(I))}),o.syncComponents()},uk=(o,u,m)=>{const v=o.components(),C=Ve(u,F=>ZR(F).toArray());Ht(v,F=>{ft(C,F)||J4(F)});const x=m(u),I=Bt(v,x);Ht(I,F=>{X4(F)&&J4(F)}),Ht(x,F=>{X4(F)||lk(o,F)}),o.syncComponents()},K0=(o,u)=>{$d(o,u,cd)},$d=(o,u,m)=>{o.getSystem().addToWorld(u),m(o.element,u.element),We(o.element)&&Fd(u),o.syncComponents()},xg=o=>{kg(o),of(o.element),o.getSystem().removeFromWorld(o)},im=o=>{const u=ai(o.element).bind(m=>o.getSystem().getByDom(m).toOptional());xg(o),u.each(m=>{m.syncComponents()})},hp=o=>{const u=o.components();Ht(u,xg),zm(o.element),o.syncComponents()},_c=(o,u)=>{sl(o,u,cd)},Ql=(o,u)=>{sl(o,u,Um)},sl=(o,u,m)=>{m(o,u.element);const v=So(u.element);Ht(v,C=>{u.getByDom(C).each(Fd)})},gp=o=>{const u=So(o.element);Ht(u,m=>{o.getByDom(m).each(kg)}),of(o.element)},Q4=(o,u,m,v)=>{m.get().each(I=>{hp(o)});const C=u.getAttachPoint(o);K0(C,o);const x=o.getSystem().build(v);return K0(o,x),m.set(x),x},Bd=(o,u,m,v)=>{const C=Q4(o,u,m,v);return u.onOpen(o,C),C},Y0=(o,u,m,v)=>m.get().map(()=>Q4(o,u,m,v)),e_=(o,u,m,v,C)=>{gk(o,u),Bd(o,u,m,v),C(),vk(o,u)},dk=(o,u,m)=>{m.get().each(v=>{hp(o),im(o),u.onClose(o,v),m.clear()})},fk=(o,u,m)=>m.isOpen(),pk=(o,u,m,v)=>fk(o,u,m)&&m.get().exists(C=>u.isPartOf(o,C,v)),mk=(o,u,m)=>m.get(),t_=(o,u,m,v)=>{Er(o.element,u).fold(()=>{ke(o.element,m)},C=>{jt(o.element,m,C)}),wn(o.element,u,v)},hk=(o,u,m)=>{Us(o.element,m).fold(()=>fo(o.element,u),v=>wn(o.element,u,v))},gk=(o,u,m)=>{const v=u.getAttachPoint(o);wn(o.element,"position",yc.getMode(v)),t_(o,"visibility",u.cloakVisibilityAttr,"hidden")},A2=o=>ht(["top","left","right","bottom"],u=>Er(o,u).isSome()),vk=(o,u,m)=>{A2(o.element)||fo(o.element,"position"),hk(o,"visibility",u.cloakVisibilityAttr)};var FD=Object.freeze({__proto__:null,cloak:gk,decloak:vk,open:Bd,openWhileCloaked:e_,close:dk,isOpen:fk,isPartOf:pk,getState:mk,setContent:Y0}),bk=Object.freeze({__proto__:null,events:(o,u)=>ni([Wt(eh(),(m,v)=>{dk(m,o,u)})])}),O2=[Ho("onOpen"),Ho("onClose"),Zt("isPartOf"),Zt("getAttachPoint"),mt("cloakVisibilityAttr","data-precloak-visibility")],VD=Object.freeze({__proto__:null,init:()=>{const o=vr(),u=J("not-implemented");return Pd({readState:u,isOpen:o.isSet,clear:o.clear,set:o.set,get:o.get})}});const Uo=Sa({fields:O2,name:"sandboxing",active:bk,apis:FD,state:VD}),Tg=J("dismiss.popups"),f1=J("reposition.popups"),n_=J("mouse.released"),U6=bu([mt("isExtraPart",$e),Vu("fireEventInstead",[mt("event",ag())])]),hd=o=>{const u=yu("Dismissal",U6,o);return{[Tg()]:{schema:bu([Zt("target")]),onReceive:(m,v)=>{Uo.isOpen(m)&&(Uo.isPartOf(m,v.target)||u.isExtraPart(m,v.target)||u.fireEventInstead.fold(()=>Uo.close(m),x=>vo(m,x.event)))}}}},HD=bu([Vu("fireEventInstead",[mt("event",I0())]),Kl("doReposition")]),X0=o=>{const u=yu("Reposition",HD,o);return{[f1()]:{onReceive:m=>{Uo.isOpen(m)&&u.fireEventInstead.fold(()=>u.doReposition(m),v=>vo(m,v.event))}}}},fh=(o,u,m)=>{u.store.manager.onLoad(o,u,m)},Gy=(o,u,m)=>{u.store.manager.onUnload(o,u,m)};var _k=Object.freeze({__proto__:null,onLoad:fh,onUnload:Gy,setValue:(o,u,m,v)=>{u.store.manager.setValue(o,u,m,v)},getValue:(o,u,m)=>u.store.manager.getValue(o,u,m),getState:(o,u,m)=>m}),Sk=Object.freeze({__proto__:null,events:(o,u)=>{const m=o.resetOnDom?[$r((v,C)=>{fh(v,o,u)}),nh((v,C)=>{Gy(v,o,u)})]:[FC(o,u,fh)];return ni(m)}});const J0=()=>{const o=ds(null),u=()=>({mode:"memory",value:o.get()}),m=()=>o.get()===null,v=()=>{o.set(null)};return Pd({set:o.set,get:o.get,isNotSet:m,clear:v,readState:u})},Q0=()=>Pd({readState:z}),ev=()=>{const o=ds({}),u=ds({});return Pd({readState:()=>({mode:"dataset",dataByValue:o.get(),dataByText:u.get()}),lookup:I=>bn(o.get(),I).orThunk(()=>bn(u.get(),I)),update:I=>{const F=o.get(),U=u.get(),X={},oe={};Ht(I,me=>{X[me.value]=me,bn(me,"meta").each(Se=>{bn(Se,"text").each(Ie=>{oe[Ie]=me})})}),o.set({...F,...X}),u.set({...U,...oe})},clear:()=>{o.set({}),u.set({})}})};var z6=Object.freeze({__proto__:null,memory:J0,dataset:ev,manual:Q0,init:o=>o.store.manager.state(o)});const R2=(o,u,m,v)=>{const C=u.store;m.update([v]),C.setValue(o,v),u.onSetValue(o,v)},W6=(o,u,m)=>{const v=u.store,C=v.getDataKey(o);return m.lookup(C).getOrThunk(()=>v.getFallbackEntry(C))},j6=(o,u,m)=>{u.store.initialValue.each(C=>{R2(o,u,m,C)})},D2=(o,u,m)=>{m.clear()};var Z6=[ur("initialValue"),Zt("getFallbackEntry"),Zt("getDataKey"),Zt("setValue"),ci("manager",{setValue:R2,getValue:W6,onLoad:j6,onUnload:D2,state:ev})];const Ck=(o,u,m)=>u.store.getValue(o),Ig=(o,u,m,v)=>{u.store.setValue(o,v),u.onSetValue(o,v)},q6=(o,u,m)=>{u.store.initialValue.each(v=>{u.store.setValue(o,v)})};var zD=[Zt("getValue"),mt("setValue",z),ur("initialValue"),ci("manager",{setValue:Ig,getValue:Ck,onLoad:q6,onUnload:z,state:lf.init})];const wk=(o,u,m,v)=>{m.set(v),u.onSetValue(o,v)},p1=(o,u,m)=>m.get(),Ek=(o,u,m)=>{u.store.initialValue.each(v=>{m.isNotSet()&&m.set(v)})},G6=(o,u,m)=>{m.clear()};var Ag=[ur("initialValue"),ci("manager",{setValue:wk,getValue:p1,onLoad:Ek,onUnload:G6,state:J0})],K6=[Ld("store",{mode:"memory"},dl("mode",{memory:Ag,manual:zD,dataset:Z6})),Ho("onSetValue"),mt("resetOnDom",!1)];const Dn=Sa({fields:K6,name:"representing",active:Sk,apis:_k,extra:{setValueFrom:(o,u)=>{const m=Dn.getValue(u);Dn.setValue(o,m)}},state:z6}),Ll=(o,u)=>Jh(o,{},ct(u,m=>SR(m.name(),"Cannot configure "+m.name()+" for "+o)).concat([nr("dump",ce)])),s_=o=>o.dump,Ca=(o,u)=>({...cn(u),...o.dump}),Vd={field:Ll,augment:Ca,get:s_},o_="placeholder",tv=sp.generate([{single:["required","valueThunk"]},{multiple:["required","valueThunks"]}]),r_=o=>qs(o,"uiType"),i_=(o,u,m,v)=>o.exists(C=>C!==m.owner)?tv.single(!0,J(m)):bn(v,m.name).fold(()=>{throw new Error("Unknown placeholder component: "+m.name+"\nKnown: ["+Zn(v)+"]\nNamespace: "+o.getOr("none")+"\nSpec: "+JSON.stringify(m,null,2))},C=>C.replace()),Y6=(o,u,m,v)=>r_(m)&&m.uiType===o_?i_(o,u,m,v):tv.single(!1,J(m)),kk=(o,u,m,v)=>Y6(o,u,m,v).fold((x,I)=>{const F=r_(m)?I(u,m.config,m.validated):I(u),U=bn(F,"components").getOr([]),X=Ve(U,oe=>kk(o,u,oe,v));return[{...F,components:X}]},(x,I)=>{if(r_(m)){const F=I(u,m.config,m.validated);return m.validated.preprocess.getOr(ce)(F)}else return I(u)}),WD=(o,u,m,v)=>Ve(m,C=>kk(o,u,C,v)),ph=(o,u)=>{let m=!1;const v=()=>m,C=()=>{if(m)throw new Error("Trying to use the same placeholder more than once: "+o);return m=!0,u},x=()=>u.fold((I,F)=>I,(I,F)=>I);return{name:J(o),required:x,used:v,replace:C}},jD=(o,u,m,v)=>{const C=Rs(v,(I,F)=>ph(F,I)),x=WD(o,u,m,C);return Qs(C,I=>{if(I.used()===!1&&I.required())throw new Error("Placeholder: "+I.name()+" was not found in components list\nNamespace: "+o.getOr("none")+"\nComponents: "+JSON.stringify(u.components,null,2))}),x},X6=tv.single,pf=tv.multiple,vl=J(o_),a_=sp.generate([{required:["data"]},{external:["data"]},{optional:["data"]},{group:["data"]}]),L2=mt("factory",{sketch:ce}),J6=mt("schema",[]),mh=Zt("name"),m1=fl("pname","pname",xo(o=>"<alloy."+Pn(o.name)+">"),Qf()),Og=nr("schema",()=>[ur("preprocess")]),Ky=mt("defaults",J({})),Zu=mt("overrides",J({})),nv=Ns([L2,J6,mh,m1,Ky,Zu]),ZD=Ns([L2,J6,mh,Ky,Zu]),P2=Ns([L2,J6,mh,m1,Ky,Zu]),xk=Ns([L2,Og,mh,Zt("unit"),m1,Ky,Zu]),Tk=o=>o.fold(V.some,V.none,V.some,V.some),Ik=o=>{const u=m=>m.name;return o.fold(u,u,u,u)},Ak=o=>o.fold(ce,ce,ce,ce),Yy=(o,u)=>m=>{const v=yu("Converting part type",u,m);return o(v)},Sc=Yy(a_.required,nv),mf=Yy(a_.external,ZD),qu=Yy(a_.optional,P2),sv=Yy(a_.group,xk),h1=J("entirety");var Xy=Object.freeze({__proto__:null,required:Sc,external:mf,optional:qu,group:sv,asNamedPart:Tk,name:Ik,asCommon:Ak,original:h1});const Q6=(o,u,m,v)=>Gi(u.defaults(o,m,v),m,{uid:o.partUids[u.name]},u.overrides(o,m,v)),qD=(o,u,m)=>{const v={},C={};return Ht(m,x=>{x.fold(I=>{v[I.pname]=X6(!0,(F,U,X)=>I.factory.sketch(Q6(F,I,U,X)))},I=>{const F=u.parts[I.name];C[I.name]=J(I.factory.sketch(Q6(u,I,F[h1()]),F))},I=>{v[I.pname]=X6(!1,(F,U,X)=>I.factory.sketch(Q6(F,I,U,X)))},I=>{v[I.pname]=pf(!0,(F,U,X)=>{const oe=F[I.name];return ct(oe,me=>I.factory.sketch(Gi(I.defaults(F,me,X),me,I.overrides(F,me))))})})}),{internals:J(v),externals:J(C)}},e8=(o,u)=>{const m={};return Ht(u,v=>{Tk(v).each(C=>{const x=GD(o,C.pname);m[C.name]=I=>{const F=yu("Part: "+C.name+" in "+o,Ns(C.schema),I);return{...x,config:I,validated:F}}})}),m},GD=(o,u)=>({uiType:vl(),owner:o,name:u}),l_=(o,u,m)=>({uiType:vl(),owner:o,name:u,config:m,validated:{}}),t8=o=>Ve(o,u=>u.fold(V.none,V.some,V.none,V.none).map(m=>Km(m.name,m.schema.concat([GC(h1())]))).toArray()),Ok=o=>ct(o,Ik),c_=(o,u,m)=>qD(o,u,m),n8=(o,u,m)=>jD(V.some(o),u,u.components,m),Yr=(o,u,m)=>{const v=u.partUids[m];return o.getSystem().getByUid(v).toOptional()},am=(o,u,m)=>Yr(o,u,m).getOrDie("Could not find part: "+m),Rk=(o,u,m)=>{const v={},C=u.partUids,x=o.getSystem();return Ht(m,I=>{v[I]=J(x.getByUid(C[I]))}),v},Dk=(o,u)=>{const m=o.getSystem();return Rs(u.partUids,(v,C)=>J(m.getByUid(v)))},s8=o=>Zn(o.partUids),u_=(o,u,m)=>{const v={},C=u.partUids,x=o.getSystem();return Ht(m,I=>{v[I]=J(x.getByUid(C[I]).getOrDie())}),v},o8=(o,u)=>{const m=Ok(u);return ny(ct(m,v=>({key:v,value:o+"-"+v})))},M2=o=>fl("partUids","partUids",G(u=>o8(u.uid,o)),Qf());var OU=Object.freeze({__proto__:null,generate:e8,generateOne:l_,schemas:t8,names:Ok,substitutes:c_,components:n8,defaultUids:o8,defaultUidsSchema:M2,getAllParts:Dk,getAllPartNames:s8,getPart:Yr,getPartOrDie:am,getParts:Rk,getPartsOrDie:u_});const Lk=(o,u)=>(o.length>0?[Km("parts",o)]:[]).concat([Zt("uid"),mt("dom",{}),mt("components",[]),GC("originalSpec"),mt("debug.sketcher",{})]).concat(u),d_=(o,u,m,v,C)=>{const x=Lk(v,C);return yu(o+" [SpecSchema]",bu(x.concat(u)),m)},KD=(o,u,m,v)=>{const C=r8(v),x=d_(o,u,C,[],[]);return m(x,C)},Jy=(o,u,m,v,C)=>{const x=r8(C),I=t8(m),F=M2(m),U=d_(o,u,x,I,[F]),X=c_(o,U,m),oe=n8(o,U,X.internals());return v(U,oe,x,X.externals())},Pk=o=>qs(o,"uid"),r8=o=>Pk(o)?o:{...o,uid:$0("uid")},Mk=o=>o.uid!==void 0,g1=bu([Zt("name"),Zt("factory"),Zt("configFields"),mt("apis",{}),mt("extraApis",{})]),f_=bu([Zt("name"),Zt("factory"),Zt("configFields"),Zt("partFields"),mt("apis",{}),mt("extraApis",{})]),Gu=o=>{const u=yu("Sketcher for "+o.name,g1,o),m=x=>KD(u.name,u.configFields,u.factory,x),v=Rs(u.apis,om),C=Rs(u.extraApis,(x,I)=>uy(x,I));return{name:u.name,configFields:u.configFields,sketch:m,...v,...C}},$c=o=>{const u=yu("Sketcher for "+o.name,f_,o),m=I=>Jy(u.name,u.configFields,u.partFields,u.factory,I),v=e8(u.name,u.partFields),C=Rs(u.apis,om),x=Rs(u.extraApis,(I,F)=>uy(I,F));return{name:u.name,partFields:u.partFields,configFields:u.configFields,sketch:m,parts:v,...C,...x}},N2=o=>ba("input")(o)&&eo(o,"type")!=="radio"||ba("textarea")(o);var YD=Object.freeze({__proto__:null,getCurrent:(o,u,m)=>u.find(o)});const i8=[Zt("find")],Lo=Sa({fields:i8,name:"composing",apis:YD}),F2=["input","button","textarea","select"],a8=(o,u,m)=>{(u.disabled()?p_:c8)(o,u)},l8=(o,u)=>u.useNative===!0&&ft(F2,tr(o.element)),Nk=o=>be(o.element,"disabled"),Fk=o=>{jt(o.element,"disabled","disabled")},XD=o=>{ke(o.element,"disabled")},DU=o=>eo(o.element,"aria-disabled")==="true",JD=o=>{jt(o.element,"aria-disabled","true")},QD=o=>{jt(o.element,"aria-disabled","false")},p_=(o,u,m)=>{u.disableClass.each(C=>{sa(o.element,C)}),(l8(o,u)?Fk:JD)(o),u.onDisabled(o)},c8=(o,u,m)=>{u.disableClass.each(C=>{ua(o.element,C)}),(l8(o,u)?XD:QD)(o),u.onEnabled(o)},m_=(o,u)=>l8(o,u)?Nk(o):DU(o);var LU=Object.freeze({__proto__:null,enable:c8,disable:p_,isDisabled:m_,onLoad:a8,set:(o,u,m,v)=>{(v?p_:c8)(o,u)}}),tL=Object.freeze({__proto__:null,exhibit:(o,u)=>up({classes:u.disabled()?u.disableClass.toArray():[]}),events:(o,u)=>ni([o1(Mc(),(m,v)=>m_(m,o)),FC(o,u,a8)])}),nL=[Kr("disabled",$e),mt("useNative",!0),ur("disableClass"),Ho("onDisabled"),Ho("onEnabled")];const Xn=Sa({fields:nL,name:"disabling",active:tL,apis:LU}),$k=(o,u,m,v)=>{const C=xu(o.element,"."+u.highlightClass);Ht(C,x=>{ht(v,F=>co(F.element,x))||(ua(x,u.highlightClass),o.getSystem().getByDom(x).each(F=>{u.onDehighlight(o,F),vo(F,o4())}))})},Bk=(o,u,m)=>$k(o,u,m,[]),d8=(o,u,m,v)=>{e3(o,u,m,v)&&(ua(v.element,u.highlightClass),u.onDehighlight(o,v),vo(v,o4()))},Qy=(o,u,m,v)=>{$k(o,u,m,[v]),e3(o,u,m,v)||(sa(v.element,u.highlightClass),u.onHighlight(o,v),vo(v,s4()))},sL=(o,u,m)=>{y(o,u).each(v=>{Qy(o,u,m,v)})},$2=(o,u,m)=>{w(o,u).each(v=>{Qy(o,u,m,v)})},f8=(o,u,m,v)=>{p8(o,u,m,v).fold(C=>{throw C},C=>{Qy(o,u,m,C)})},oL=(o,u,m,v)=>{const C=re(o,u);Qe(C,v).each(I=>{Qy(o,u,m,I)})},e3=(o,u,m,v)=>Nc(v.element,u.highlightClass),h_=(o,u,m)=>sr(o.element,"."+u.highlightClass).bind(v=>o.getSystem().getByDom(v).toOptional()),p8=(o,u,m,v)=>{const C=xu(o.element,"."+u.itemClass);return V.from(C[v]).fold(()=>no.error(new Error("No element found with index "+v)),o.getSystem().getByDom)},y=(o,u,m)=>sr(o.element,"."+u.itemClass).bind(v=>o.getSystem().getByDom(v).toOptional()),w=(o,u,m)=>{const v=xu(o.element,"."+u.itemClass);return(v.length>0?V.some(v[v.length-1]):V.none()).bind(x=>o.getSystem().getByDom(x).toOptional())},A=(o,u,m,v)=>{const C=xu(o.element,"."+u.itemClass);return Ot(C,I=>Nc(I,u.highlightClass)).bind(I=>{const F=m2(I,v,0,C.length-1);return o.getSystem().getByDom(C[F]).toOptional()})},M=(o,u,m)=>A(o,u,m,-1),K=(o,u,m)=>A(o,u,m,1),re=(o,u,m)=>{const v=xu(o.element,"."+u.itemClass);return _n(ct(v,C=>o.getSystem().getByDom(C).toOptional()))};var _e=Object.freeze({__proto__:null,dehighlightAll:Bk,dehighlight:d8,highlight:Qy,highlightFirst:sL,highlightLast:$2,highlightAt:f8,highlightBy:oL,isHighlighted:e3,getHighlighted:h_,getFirst:y,getLast:w,getPrevious:M,getNext:K,getCandidates:re}),Ae=[Zt("highlightClass"),Zt("itemClass"),Ho("onHighlight"),Ho("onDehighlight")];const Re=Sa({fields:Ae,name:"highlighting",apis:_e}),nt=[8],vt=[9],tn=[13],An=[27],mn=[32],gn=[37],ss=[38],on=[39],ws=[40],qt=(o,u,m)=>{const v=kn(o.slice(0,u)),C=kn(o.slice(u+1));return Qe(v.concat(C),m)},Fn=(o,u,m)=>{const v=kn(o.slice(0,u));return Qe(v,m)},Sr=(o,u,m)=>{const v=o.slice(0,u),C=o.slice(u+1);return Qe(C.concat(v),m)},Cr=(o,u,m)=>{const v=o.slice(u+1);return Qe(v,m)},ls=o=>u=>{const m=u.raw;return ft(o,m.which)},Xr=o=>u=>dn(o,m=>m(u)),nu=o=>o.raw.shiftKey===!0,Rg=o=>o.raw.ctrlKey===!0,vp=he(nu),To=(o,u)=>({matches:o,classification:u}),Rr=(o,u)=>Qe(o,v=>v.matches(u)).map(v=>v.classification),Cc=(o,u,m)=>{u.exists(C=>m.exists(x=>co(x,C)))||ps(o,ay(),{prevFocus:u,newFocus:m})},bl=()=>{const o=m=>tu(m.element);return{get:o,set:(m,v)=>{const C=o(m);m.getSystem().triggerFocus(v,m.element);const x=o(m);Cc(m,C,x)}}},hf=()=>{const o=m=>Re.getHighlighted(m).map(v=>v.element);return{get:o,set:(m,v)=>{const C=o(m);m.getSystem().getByDom(v).fold(z,I=>{Re.highlight(m,I)});const x=o(m);Cc(m,C,x)}}};var wc;(function(o){o.OnFocusMode="onFocus",o.OnEnterOrSpaceMode="onEnterOrSpace",o.OnApiMode="onApi"})(wc||(wc={}));const bp=(o,u,m,v,C)=>{const x=()=>o.concat([mt("focusManager",bl()),Ld("focusInside","onFocus",ey(X=>ft(["onFocus","onEnterOrSpace","onApi"],X)?no.value(X):no.error("Invalid value for focusInside"))),ci("handler",U),ci("state",u),ci("sendFocusIn",C)]),I=(X,oe,me,Se,Ie)=>{const Pe=me(X,oe,Se,Ie);return Rr(Pe,oe.event).bind(Me=>Me(X,oe,Se,Ie))},U={schema:x,processKey:I,toEvents:(X,oe)=>{const me=X.focusInside!==wc.OnFocusMode?V.none():C(X).map(Pe=>Wt(Qm(),(Me,at)=>{Pe(Me,X,oe),at.stop()})),Se=(Pe,Me)=>{const at=ls(mn.concat(tn))(Me.event);X.focusInside===wc.OnEnterOrSpaceMode&&at&&Q5(Pe,Me)&&C(X).each(qe=>{qe(Pe,X,oe),Me.stop()})},Ie=[Wt(gc(),(Pe,Me)=>{I(Pe,Me,m,X,oe).fold(()=>{Se(Pe,Me)},at=>{Me.stop()})}),Wt(n4(),(Pe,Me)=>{I(Pe,Me,v,X,oe).each(at=>{Me.stop()})})];return ni(me.toArray().concat(Ie))}};return U},su=o=>{const u=[ur("onEscape"),ur("onEnter"),mt("selector",'[data-alloy-tabstop="true"]:not(:disabled)'),mt("firstTabstop",0),mt("useTabstopAt",Ue),ur("visibilitySelector")].concat([o]),m=(qe,dt)=>{const it=qe.visibilitySelector.bind(It=>fp(dt,It)).getOr(dt);return Wi(it)>0},v=(qe,dt)=>{const it=xu(qe.element,dt.selector),It=jn(it,Mt=>m(dt,Mt));return V.from(It[dt.firstTabstop])},C=(qe,dt)=>dt.focusManager.get(qe).bind(it=>fp(it,dt.selector)),x=(qe,dt)=>m(qe,dt)&&qe.useTabstopAt(dt),I=(qe,dt,it)=>{v(qe,dt).each(It=>{dt.focusManager.set(qe,It)})},F=(qe,dt,it,It,Mt)=>Mt(dt,it,en=>x(It,en)).fold(()=>It.cyclic?V.some(!0):V.none(),en=>(It.focusManager.set(qe,en),V.some(!0))),U=(qe,dt,it,It)=>{const Mt=jn(xu(qe.element,it.selector),en=>m(it,en));return C(qe,it).bind(en=>Ot(Mt,de(co,en)).bind(Ft=>F(qe,Mt,Ft,it,It)))},X=(qe,dt,it)=>{const It=it.cyclic?qt:Fn;return U(qe,dt,it,It)},oe=(qe,dt,it)=>{const It=it.cyclic?Sr:Cr;return U(qe,dt,it,It)},me=qe=>mu(qe).bind(Ja).exists(dt=>co(dt,qe)),Se=(qe,dt,it)=>C(qe,it).filter(It=>!it.useTabstopAt(It)).bind(It=>(me(It)?X:oe)(qe,dt,it)),Ie=(qe,dt,it)=>it.onEnter.bind(It=>It(qe,dt)),Pe=(qe,dt,it)=>it.onEscape.bind(It=>It(qe,dt)),Me=J([To(Xr([nu,ls(vt)]),X),To(ls(vt),oe),To(Xr([vp,ls(tn)]),Ie)]),at=J([To(ls(An),Pe),To(ls(vt),Se)]);return bp(u,lf.init,Me,at,()=>V.some(I))};var m8=su(nr("cyclic",$e)),t3=su(nr("cyclic",Ue));const hh=(o,u,m)=>(r4(o,m,Mc()),V.some(!0)),yl=(o,u,m)=>N2(m)&&ls(mn)(u.event)?V.none():hh(o,u,m),v1=(o,u)=>V.some(!0),rL=[mt("execute",yl),mt("useSpace",!1),mt("useEnter",!0),mt("useControlEnter",!1),mt("useDown",!1)],h8=(o,u,m)=>m.execute(o,u,o.element),iL=(o,u,m,v)=>{const C=m.useSpace&&!N2(o.element)?mn:[],x=m.useEnter?tn:[],I=m.useDown?ws:[],F=C.concat(x).concat(I);return[To(ls(F),h8)].concat(m.useControlEnter?[To(Xr([Rg,ls(tn)]),h8)]:[])},g8=(o,u,m,v)=>m.useSpace&&!N2(o.element)?[To(ls(mn),v1)]:[];var v8=bp(rL,lf.init,iL,g8,()=>V.none());const Vk=()=>{const o=vr();return Pd({readState:()=>o.get().map(C=>({numRows:String(C.numRows),numColumns:String(C.numColumns)})).getOr({numRows:"?",numColumns:"?"}),setGridSize:(C,x)=>{o.set({numRows:C,numColumns:x})},getNumRows:()=>o.get().map(C=>C.numRows),getNumColumns:()=>o.get().map(C=>C.numColumns)})};var aL=Object.freeze({__proto__:null,flatgrid:Vk,init:o=>o.state(o)});const PU=o=>(u,m,v,C)=>{const x=o(u.element);return uL(x,u,m,v,C)},Hk=(o,u)=>{const m=E6(o,u);return PU(m)},lL=(o,u)=>{const m=E6(u,o);return PU(m)},cL=o=>(u,m,v,C)=>uL(o,u,m,v,C),uL=(o,u,m,v,C)=>v.focusManager.get(u).bind(I=>o(u.element,I,v,C)).map(I=>(v.focusManager.set(u,I),!0)),MU=cL,NU=cL,g_=cL,FU=o=>o.offsetWidth<=0&&o.offsetHeight<=0,b8=o=>!FU(o.dom),Uk=(o,u)=>Ot(o,u).map(m=>({index:m,candidates:o})),y8=(o,u,m)=>{const v=I=>co(I,u),C=xu(o,m),x=jn(C,b8);return Uk(x,v)},B2=(o,u)=>Ot(o,m=>co(u,m)),rse=(o,u,m,v)=>{const C=Math.floor(u/m),x=u%m;return v(C,x).bind(I=>{const F=I.row*m+I.column;return F>=0&&F<o.length?V.some(o[F]):V.none()})},$U=(o,u,m,v,C)=>rse(o,u,v,(x,I)=>{const U=x===m-1?o.length-x*v:v,X=m2(I,C,0,U-1);return V.some({row:x,column:X})}),BU=(o,u,m,v,C)=>rse(o,u,v,(x,I)=>{const F=m2(x,C,0,m-1),X=F===m-1?o.length-F*v:v,oe=df(I,0,X-1);return V.some({row:F,column:oe})}),VU=(o,u,m,v)=>$U(o,u,m,v,1),ise=(o,u,m,v)=>$U(o,u,m,v,-1),iCe=(o,u,m,v)=>BU(o,u,m,v,-1),aCe=(o,u,m,v)=>BU(o,u,m,v,1),ase=[Zt("selector"),mt("execute",yl),Qc("onEscape"),mt("captureTab",!1),yg()],lse=(o,u,m)=>{sr(o.element,u.selector).each(v=>{u.focusManager.set(o,v)})},dL=(o,u)=>u.focusManager.get(o).bind(m=>fp(m,u.selector)),cse=(o,u,m,v)=>dL(o,m).bind(C=>m.execute(o,u,C)),zk=o=>(u,m,v,C)=>y8(u,m,v.selector).bind(x=>o(x.candidates,x.index,C.getNumRows().getOr(v.initSize.numRows),C.getNumColumns().getOr(v.initSize.numColumns))),HU=(o,u,m)=>m.captureTab?V.some(!0):V.none(),UU=(o,u,m)=>m.onEscape(o,u),zU=zk(ise),WU=zk(VU),jU=zk(iCe),ZU=zk(aCe),use=J([To(ls(gn),Hk(zU,WU)),To(ls(on),lL(zU,WU)),To(ls(ss),MU(jU)),To(ls(ws),NU(ZU)),To(Xr([nu,ls(vt)]),HU),To(Xr([vp,ls(vt)]),HU),To(ls(mn.concat(tn)),cse)]),qU=J([To(ls(An),UU),To(ls(mn),v1)]);var dse=bp(ase,Vk,use,qU,()=>V.some(lse));const Wk=(o,u,m,v,C)=>{const x=F=>tr(F)==="button"&&eo(F,"disabled")==="disabled",I=(F,U,X)=>C(F,U,v,0,X.length-1,X[U],oe=>x(X[oe])?I(F,oe,X):V.from(X[oe]));return y8(o,m,u).bind(F=>{const U=F.index,X=F.candidates;return I(U,U,X)})},fL=(o,u,m,v)=>Wk(o,u,m,v,(C,x,I,F,U,X,oe)=>{const me=df(x+I,F,U);return me===C?V.from(X):oe(me)}),_8=(o,u,m,v)=>Wk(o,u,m,v,(C,x,I,F,U,X,oe)=>{const me=m2(x,I,F,U);return me===C?V.none():oe(me)}),GU=[Zt("selector"),mt("getInitial",V.none),mt("execute",yl),Qc("onEscape"),mt("executeOnMove",!1),mt("allowVertical",!0),mt("allowHorizontal",!0),mt("cycles",!0)],fse=(o,u)=>u.focusManager.get(o).bind(m=>fp(m,u.selector)),pL=(o,u,m)=>fse(o,m).bind(v=>m.execute(o,u,v)),pse=(o,u,m)=>{u.getInitial(o).orThunk(()=>sr(o.element,u.selector)).each(v=>{u.focusManager.set(o,v)})},KU=(o,u,m)=>(m.cycles?_8:fL)(o,m.selector,u,-1),YU=(o,u,m)=>(m.cycles?_8:fL)(o,m.selector,u,1),v_=o=>(u,m,v,C)=>o(u,m,v,C).bind(()=>v.executeOnMove?pL(u,m,v):V.some(!0)),XU=(o,u,m)=>m.onEscape(o,u),JU=(o,u,m,v)=>{const C=[...m.allowHorizontal?gn:[]].concat(m.allowVertical?ss:[]),x=[...m.allowHorizontal?on:[]].concat(m.allowVertical?ws:[]);return[To(ls(C),v_(Hk(KU,YU))),To(ls(x),v_(lL(KU,YU))),To(ls(tn),pL),To(ls(mn),pL)]},QU=J([To(ls(mn),v1),To(ls(An),XU)]);var ez=bp(GU,lf.init,JU,QU,()=>V.some(pse));const S8=(o,u,m)=>V.from(o[u]).bind(v=>V.from(v[m]).map(C=>({rowIndex:u,columnIndex:m,cell:C}))),tz=(o,u,m,v)=>{const x=o[u].length,I=m2(m,v,0,x-1);return S8(o,u,I)},nz=(o,u,m,v)=>{const C=m2(m,v,0,o.length-1),x=o[C].length,I=df(u,0,x-1);return S8(o,C,I)},sz=(o,u,m,v)=>{const x=o[u].length,I=df(m+v,0,x-1);return S8(o,u,I)},jk=(o,u,m,v)=>{const C=df(m+v,0,o.length-1),x=o[C].length,I=df(u,0,x-1);return S8(o,C,I)},mse=(o,u,m)=>tz(o,u,m,1),Zk=(o,u,m)=>tz(o,u,m,-1),hse=(o,u,m)=>nz(o,m,u,-1),oz=(o,u,m)=>nz(o,m,u,1),gd=(o,u,m)=>sz(o,u,m,-1),gse=(o,u,m)=>sz(o,u,m,1),rz=(o,u,m)=>jk(o,m,u,-1),iz=(o,u,m)=>jk(o,m,u,1),vse=[Km("selectors",[Zt("row"),Zt("cell")]),mt("cycles",!0),mt("previousSelector",V.none),mt("execute",yl)],az=(o,u,m)=>{u.previousSelector(o).orThunk(()=>{const C=u.selectors;return sr(o.element,C.cell)}).each(C=>{u.focusManager.set(o,C)})},lz=(o,u,m)=>tu(o.element).bind(v=>m.execute(o,u,v)),bse=(o,u)=>ct(o,m=>xu(m,u.selectors.cell)),qk=(o,u)=>(m,v,C)=>{const x=C.cycles?o:u;return fp(v,C.selectors.row).bind(I=>{const F=xu(I,C.selectors.cell);return B2(F,v).bind(U=>{const X=xu(m,C.selectors.row);return B2(X,I).bind(oe=>{const me=bse(X,C);return x(me,oe,U).map(Se=>Se.cell)})})})},cz=qk(Zk,gd),uz=qk(mse,gse),dz=qk(hse,rz),yse=qk(oz,iz),_se=J([To(ls(gn),Hk(cz,uz)),To(ls(on),lL(cz,uz)),To(ls(ss),MU(dz)),To(ls(ws),NU(yse)),To(ls(mn.concat(tn)),lz)]),fz=J([To(ls(mn),v1)]);var pz=bp(vse,lf.init,_se,fz,()=>V.some(az));const mz=[Zt("selector"),mt("execute",yl),mt("moveOnTab",!1)],hz=(o,u,m)=>m.focusManager.get(o).bind(v=>m.execute(o,u,v)),Sse=(o,u,m)=>{sr(o.element,u.selector).each(v=>{u.focusManager.set(o,v)})},gz=(o,u,m)=>_8(o,m.selector,u,-1),vz=(o,u,m)=>_8(o,m.selector,u,1),bz=(o,u,m,v)=>m.moveOnTab?g_(gz)(o,u,m,v):V.none(),yz=(o,u,m,v)=>m.moveOnTab?g_(vz)(o,u,m,v):V.none(),V2=J([To(ls(ss),g_(gz)),To(ls(ws),g_(vz)),To(Xr([nu,ls(vt)]),bz),To(Xr([vp,ls(vt)]),yz),To(ls(tn),hz),To(ls(mn),hz)]),_z=J([To(ls(mn),v1)]);var Sz=bp(mz,lf.init,V2,_z,()=>V.some(Sse));const Cz=[Qc("onSpace"),Qc("onEnter"),Qc("onShiftEnter"),Qc("onLeft"),Qc("onRight"),Qc("onTab"),Qc("onShiftTab"),Qc("onUp"),Qc("onDown"),Qc("onEscape"),mt("stopSpaceKeyup",!1),ur("focusIn")],Cse=(o,u,m)=>[To(ls(mn),m.onSpace),To(Xr([vp,ls(tn)]),m.onEnter),To(Xr([nu,ls(tn)]),m.onShiftEnter),To(Xr([nu,ls(vt)]),m.onShiftTab),To(Xr([vp,ls(vt)]),m.onTab),To(ls(ss),m.onUp),To(ls(ws),m.onDown),To(ls(gn),m.onLeft),To(ls(on),m.onRight),To(ls(mn),m.onSpace)],b_=(o,u,m)=>[...m.stopSpaceKeyup?[To(ls(mn),v1)]:[],To(ls(An),m.onEscape)];var wse=bp(Cz,lf.init,Cse,b_,o=>o.focusIn);const Ese=m8.schema(),wz=t3.schema(),kse=ez.schema(),xse=dse.schema(),Tse=pz.schema(),Ez=v8.schema(),mL=Sz.schema(),hL=wse.schema();var Ise=Object.freeze({__proto__:null,acyclic:Ese,cyclic:wz,flow:kse,flatgrid:xse,matrix:Tse,execution:Ez,menu:mL,special:hL});const H2=o=>Qr(o,"setGridSize"),fs=$9({branchKey:"mode",branches:Ise,name:"keying",active:{events:(o,u)=>o.handler.toEvents(o,u)},apis:{focusIn:(o,u,m)=>{u.sendFocusIn(u).fold(()=>{o.getSystem().triggerFocus(o.element,o.element)},v=>{v(o,u,m)})},setGridSize:(o,u,m,v,C)=>{H2(m)?m.setGridSize(v,C):console.error("Layout does not support setGridSize")}},state:aL}),gL=(o,u)=>{m6(()=>{qy(o,u,()=>ct(u,o.getSystem().build))},o.element)},kz=(o,u)=>{m6(()=>{uk(o,u,()=>iE(o.element,u,o.getSystem().buildOrPatch))},o.element)},Ase=(o,u,m,v)=>{J4(u);const C=dp(o.element,m,v,o.getSystem().buildOrPatch);lk(o,C),o.syncComponents()},s3=(o,u,m)=>{const v=o.getSystem().build(m);$d(o,v,u)},C8=(o,u,m,v)=>{im(u),s3(o,(C,x)=>v0(C,x,m),v)},xz=(o,u,m,v)=>(u.reuseDom?kz:gL)(o,v),vL=(o,u,m,v)=>{s3(o,cd,v)},U2=(o,u,m,v)=>{s3(o,g0,v)},z2=(o,u,m,v)=>{const C=Gk(o);Qe(C,I=>co(v.element,I.element)).each(im)},Gk=(o,u)=>o.components(),Tz=(o,u,m,v,C)=>{const x=Gk(o);return V.from(x[v]).map(I=>(C.fold(()=>im(I),F=>{(u.reuseDom?Ase:C8)(o,I,v,F)}),I))};var ov=Object.freeze({__proto__:null,append:vL,prepend:U2,remove:z2,replaceAt:Tz,replaceBy:(o,u,m,v,C)=>{const x=Gk(o);return Ot(x,v).bind(I=>Tz(o,u,m,I,C))},set:xz,contents:Gk});const Bs=Sa({fields:[la("reuseDom",!0)],name:"replacing",apis:ov}),Rse=(o,u)=>{const m=ni(u);return Sa({fields:[Zt("enabled")],name:o,active:{events:J(m)}})},zs=(o,u)=>{const m=Rse(o,u);return{key:o,value:{config:{},me:m,configAsRaw:J({}),initialConfig:{},state:lf}}},bL=(o,u)=>{u.ignore||(eu(o.element),u.onFocus(o))};var Az=Object.freeze({__proto__:null,focus:bL,blur:(o,u)=>{u.ignore||lh(o.element)},isFocused:o=>gl(o.element)}),Lse=Object.freeze({__proto__:null,exhibit:(o,u)=>{const m=u.ignore?{}:{attributes:{tabindex:"-1"}};return up(m)},events:o=>ni([Wt(Qm(),(u,m)=>{bL(u,o),m.stop()})].concat(o.stopMousedown?[Wt(fd(),(u,m)=>{m.event.prevent()})]:[]))}),Kk=[Ho("onFocus"),mt("stopMousedown",!1),mt("ignore",!1)];const As=Sa({fields:Kk,name:"focusing",active:Lse,apis:Az}),Yk=o=>({init:()=>{const m=ds(o);return{get:()=>m.get(),set:F=>m.set(F),clear:()=>m.set(o),readState:()=>m.get()}}}),Oz=(o,u,m)=>{const v=u.aria;v.update(o,v,m.get())},Pse=(o,u,m)=>{u.toggleClass.each(v=>{m.get()?sa(o.element,v):ua(o.element,v)})},y_=(o,u,m,v)=>{const C=m.get();m.set(v),Pse(o,u,m),Oz(o,u,m),C!==v&&u.onToggled(o,v)},yL=(o,u,m)=>{y_(o,u,m,!m.get())},Rz=(o,u,m)=>{y_(o,u,m,!0)},Dz=(o,u,m)=>{y_(o,u,m,!1)},Mse=(o,u,m)=>m.get(),Xk=(o,u,m)=>{y_(o,u,m,u.selected)};var Nse=Object.freeze({__proto__:null,onLoad:Xk,toggle:yL,isOn:Mse,on:Rz,off:Dz,set:y_}),Fse=Object.freeze({__proto__:null,exhibit:()=>up({}),events:(o,u)=>{const m=o2(o,u,yL),v=FC(o,u,Xk);return ni(Nt([o.toggleOnExecute?[m]:[],[v]]))}});const Lz=(o,u,m)=>{jt(o.element,"aria-pressed",m),u.syncWithExpanded&&_L(o,u,m)},$se=(o,u,m)=>{jt(o.element,"aria-selected",m)},Bse=(o,u,m)=>{jt(o.element,"aria-checked",m)},_L=(o,u,m)=>{jt(o.element,"aria-expanded",m)};var w8=[mt("selected",!1),ur("toggleClass"),mt("toggleOnExecute",!0),Ho("onToggled"),Ld("aria",{mode:"none"},dl("mode",{pressed:[mt("syncWithExpanded",!1),ci("update",Lz)],checked:[ci("update",Bse)],expanded:[ci("update",_L)],selected:[ci("update",$se)],none:[ci("update",z)]}))];const po=Sa({fields:w8,name:"toggling",active:Fse,apis:Nse,state:Yk(!1)}),__=()=>{const o=(u,m)=>{m.stop(),_u(u)};return[Wt(Jm(),o),Wt(ry(),o),cg(op()),cg(fd())]},S_=o=>{const u=m=>r1((v,C)=>{m(v),C.stop()});return ni(Nt([o.map(u).toArray(),__()]))},SL="alloy.item-hover",CL="alloy.item-focus",Pz="alloy.item-toggled",Mz=o=>{(tu(o.element).isNone()||As.isFocused(o))&&(As.isFocused(o)||As.focus(o),ps(o,SL,{item:o}))},wL=o=>{ps(o,CL,{item:o})},Vse=(o,u)=>{ps(o,Pz,{item:o,state:u})},EL=J(SL),Hse=J(CL),Use=J(Pz),Nz=o=>o.role.fold(()=>o.toggling.map(u=>u.exclusive?"menuitemradio":"menuitemcheckbox").getOr("menuitem"),ce),Jk=(o,u)=>({aria:{mode:u?"selected":"checked"},...Do(o,(m,v)=>v!=="exclusive"),onToggled:(m,v)=>{W(o.onToggled)&&o.onToggled(m,v),Vse(m,v)}}),kL=o=>({dom:o.dom,domModification:{...o.domModification,attributes:{role:Nz(o),...o.domModification.attributes,"aria-haspopup":o.hasSubmenu,...o.hasSubmenu?{"aria-expanded":!1}:{}}},behaviours:Vd.augment(o.itemBehaviours,[o.toggling.fold(po.revoke,u=>po.config(Jk(u,o.role.exists(m=>m==="option")))),As.config({ignore:o.ignoreFocus,stopMousedown:o.ignoreFocus,onFocus:u=>{wL(u)}}),fs.config({mode:"execution"}),Dn.config({store:{mode:"memory",initialValue:o.data}}),zs("item-type-events",[...__(),Wt(rp(),Mz),Wt(T0(),As.focus)])]),components:o.components,eventOrder:o.eventOrder}),xL=[Zt("data"),Zt("components"),Zt("dom"),mt("hasSubmenu",!1),ur("toggling"),ur("role"),Vd.field("itemBehaviours",[po,As,fs,Dn]),mt("ignoreFocus",!1),mt("domModification",{}),ci("builder",kL),mt("eventOrder",{})],zse=o=>({dom:o.dom,components:o.components,events:ni([l4(T0())])}),Wse=[Zt("dom"),Zt("components"),ci("builder",zse)],TL=J("item-widget"),IL=J([Sc({name:"widget",overrides:o=>({behaviours:cn([Dn.config({store:{mode:"manual",getValue:u=>o.data,setValue:z}})])})})]),Fz=o=>{const u=c_(TL(),o,IL()),m=n8(TL(),o,u.internals()),v=x=>Yr(x,o,"widget").map(I=>(fs.focusIn(I),I)),C=(x,I)=>N2(I.event.target)?V.none():(o.autofocus&&I.setSource(x.element),V.none());return{dom:o.dom,components:m,domModification:o.domModification,events:ni([r1((x,I)=>{v(x).each(F=>{I.stop()})}),Wt(rp(),Mz),Wt(T0(),(x,I)=>{o.autofocus?v(x):As.focus(x)})]),behaviours:Vd.augment(o.widgetBehaviours,[Dn.config({store:{mode:"memory",initialValue:o.data}}),As.config({ignore:o.ignoreFocus,onFocus:x=>{wL(x)}}),fs.config({mode:"special",focusIn:o.autofocus?x=>{v(x)}:dy(),onLeft:C,onRight:C,onEscape:(x,I)=>!As.isFocused(x)&&!o.autofocus?(As.focus(x),V.some(!0)):(o.autofocus&&I.setSource(x.element),V.none())})])}},$z=[Zt("uid"),Zt("data"),Zt("components"),Zt("dom"),mt("autofocus",!1),mt("ignoreFocus",!1),Vd.field("widgetBehaviours",[Dn,As,fs]),mt("domModification",{}),M2(IL()),ci("builder",Fz)],jse=dl("type",{widget:$z,item:xL,separator:Wse}),Zse=(o,u)=>({mode:"flatgrid",selector:"."+o.markers.item,initSize:{numColumns:u.initSize.numColumns,numRows:u.initSize.numRows},focusManager:o.focusManager}),qse=(o,u)=>({mode:"matrix",selectors:{row:u.rowSelector,cell:"."+o.markers.item},previousSelector:u.previousSelector,focusManager:o.focusManager}),Gse=(o,u)=>({mode:"menu",selector:"."+o.markers.item,moveOnTab:u.moveOnTab,focusManager:o.focusManager}),Kse=J([sv({factory:{sketch:o=>{const u=yu("menu.spec item",jse,o);return u.builder(u)}},name:"items",unit:"item",defaults:(o,u)=>qs(u,"uid")?u:{...u,uid:$0("item")},overrides:(o,u)=>({type:u.type,ignoreFocus:o.fakeFocus,domModification:{classes:[o.markers.item]}})})]),Yse=J([aa("role"),Zt("value"),Zt("items"),Zt("dom"),Zt("components"),mt("eventOrder",{}),Ll("menuBehaviours",[Re,Dn,Lo,fs]),Ld("movement",{mode:"menu",moveOnTab:!0},dl("mode",{grid:[yg(),ci("config",Zse)],matrix:[ci("config",qse),Zt("rowSelector"),mt("previousSelector",V.none)],menu:[mt("moveOnTab",!0),ci("config",Gse)]})),ZC(),mt("fakeFocus",!1),mt("focusManager",bl()),Ho("onHighlight"),Ho("onDehighlight"),mt("showMenuRole",!0)]),AL=J("alloy.menu-focus"),Xse=(o,u)=>{const m=xu(o.element,'[role="menuitemradio"][aria-checked="true"]');Ht(m,v=>{co(v,u.element)||o.getSystem().getByDom(v).each(C=>{po.off(C)})})},Jse=(o,u,m,v)=>({uid:o.uid,dom:o.dom,markers:o.markers,behaviours:Ca(o.menuBehaviours,[Re.config({highlightClass:o.markers.selectedItem,itemClass:o.markers.item,onHighlight:o.onHighlight,onDehighlight:o.onDehighlight}),Dn.config({store:{mode:"memory",initialValue:o.value}}),Lo.config({find:V.some}),fs.config(o.movement.config(o,o.movement))]),events:ni([Wt(Hse(),(C,x)=>{const I=x.event;C.getSystem().getByDom(I.target).each(F=>{Re.highlight(C,F),x.stop(),ps(C,AL(),{menu:C,item:F})})}),Wt(EL(),(C,x)=>{const I=x.event.item;Re.highlight(C,I)}),Wt(Use(),(C,x)=>{const{item:I,state:F}=x.event;F&&eo(I.element,"role")==="menuitemradio"&&Xse(C,I)})]),components:u,eventOrder:o.eventOrder,...o.showMenuRole?{domModification:{attributes:{role:o.role.getOr("menu")}}}:{}}),o3=$c({name:"Menu",configFields:Yse(),partFields:Kse(),factory:Jse}),Qse=o=>xr(o,(u,m)=>({k:u,v:m})),Bz=(o,u,m,v)=>bn(m,v).bind(C=>bn(o,C).bind(x=>{const I=Bz(o,u,m,x);return V.some([x].concat(I))})).getOr([]),r3=(o,u)=>{const m={};Qs(o,(I,F)=>{Ht(I,U=>{m[U]=F})});const v=u,C=Qse(u),x=Rs(C,(I,F)=>[F].concat(Bz(m,v,C,F)));return Rs(m,I=>bn(x,I).getOr([I]))},eoe=()=>{const o=ds({}),u=ds({}),m=ds({}),v=vr(),C=ds({}),x=()=>{o.set({}),u.set({}),m.set({}),v.clear()},I=()=>v.get().isNone(),F=(Mt,en)=>{u.set({...u.get(),[Mt]:{type:"prepared",menu:en}})},U=(Mt,en,In,Ft)=>{v.set(Mt),o.set(In),u.set(en),C.set(Ft);const Mn=r3(Ft,In);m.set(Mn)},X=Mt=>Zs(o.get(),(en,In)=>en===Mt),oe=(Mt,en,In)=>Me(Mt).bind(Ft=>X(Mt).bind(Mn=>en(Mn).map(En=>({triggeredMenu:Ft,triggeringItem:En,triggeringPath:In})))),me=(Mt,en)=>{const In=jn(qe(Mt).toArray(),Ft=>Me(Ft).isSome());return bn(m.get(),Mt).bind(Ft=>{const Mn=kn(In.concat(Ft)),En=Ve(Mn,(zn,go)=>oe(zn,en,Mn.slice(0,go+1)).fold(()=>lt(v.get(),zn)?[]:[V.none()],fi=>[V.some(fi)]));return us(En)})},Se=Mt=>bn(o.get(),Mt).map(en=>{const In=bn(m.get(),Mt).getOr([]);return[en].concat(In)}),Ie=Mt=>bn(m.get(),Mt).bind(en=>en.length>1?V.some(en.slice(1)):V.none()),Pe=Mt=>bn(m.get(),Mt),Me=Mt=>at(Mt).bind(Vz),at=Mt=>bn(u.get(),Mt),qe=Mt=>bn(o.get(),Mt);return{setMenuBuilt:F,setContents:U,expand:Se,refresh:Pe,collapse:Ie,lookupMenu:at,lookupItem:qe,otherMenus:Mt=>{const en=C.get();return Bt(Zn(en),Mt)},getPrimary:()=>v.get().bind(Me),getMenus:()=>u.get(),clear:x,isClear:I,getTriggeringPath:me}},Vz=o=>o.type==="prepared"?V.some(o.menu):V.none(),W2={init:eoe,extractPreparedMenu:Vz},OL=Pn("tiered-menu-item-highlight"),Hz=Pn("tiered-menu-item-dehighlight");var Pl;(function(o){o[o.HighlightMenuAndItem=0]="HighlightMenuAndItem",o[o.HighlightJustMenu=1]="HighlightJustMenu",o[o.HighlightNone=2]="HighlightNone"})(Pl||(Pl={}));const toe=(o,u)=>{const m=vr(),v=(ln,On,Fs)=>Rs(Fs,(ao,_s)=>{const Gs=()=>o3.sketch({...ao,value:_s,markers:o.markers,fakeFocus:o.fakeFocus,onHighlight:(qr,Lr)=>{ps(qr,OL,{menuComp:qr,itemComp:Lr})},onDehighlight:(qr,Lr)=>{ps(qr,Hz,{menuComp:qr,itemComp:Lr})},focusManager:o.fakeFocus?hf():bl()});return _s===On?{type:"prepared",menu:ln.getSystem().build(Gs())}:{type:"notbuilt",nbMenu:Gs}}),C=W2.init(),x=ln=>{const On=v(ln,o.data.primary,o.data.menus),Fs=U();return C.setContents(o.data.primary,On,o.data.expansions,Fs),C.getPrimary()},I=ln=>Dn.getValue(ln).value,F=(ln,On,Fs)=>ts(On,ao=>{if(!ao.getSystem().isConnected())return V.none();const _s=Re.getCandidates(ao);return Qe(_s,Gs=>I(Gs)===Fs)}),U=ln=>Rs(o.data.menus,(On,Fs)=>Ve(On.items,ao=>ao.type==="separator"?[]:[ao.data.value])),X=Re.highlight,oe=(ln,On)=>{X(ln,On),Re.getHighlighted(On).orThunk(()=>Re.getFirst(On)).each(Fs=>{o.fakeFocus?Re.highlight(On,Fs):r4(ln,Fs.element,T0())})},me=(ln,On)=>_n(ct(On,Fs=>ln.lookupMenu(Fs).bind(ao=>ao.type==="prepared"?V.some(ao.menu):V.none()))),Se=(ln,On,Fs)=>{const ao=me(On,On.otherMenus(Fs));Ht(ao,_s=>{cf(_s.element,[o.markers.backgroundMenu]),o.stayInDom||Bs.remove(ln,_s)})},Ie=ln=>m.get().getOrThunk(()=>{const On={},Fs=xu(ln.element,".".concat(o.markers.item)),ao=jn(Fs,_s=>eo(_s,"aria-haspopup")==="true");return Ht(ao,_s=>{ln.getSystem().getByDom(_s).each(Gs=>{const qr=I(Gs);On[qr]=Gs})}),m.set(On),On}),Pe=(ln,On)=>{const Fs=Ie(ln);Qs(Fs,(ao,_s)=>{const Gs=ft(On,_s);jt(ao.element,"aria-expanded",Gs)})},Me=(ln,On,Fs)=>V.from(Fs[0]).bind(ao=>On.lookupMenu(ao).bind(_s=>{if(_s.type==="notbuilt")return V.none();{const Gs=_s.menu,qr=me(On,Fs.slice(1));return Ht(qr,Lr=>{sa(Lr.element,o.markers.backgroundMenu)}),We(Gs.element)||Bs.append(ln,md(Gs)),cf(Gs.element,[o.markers.backgroundMenu]),oe(ln,Gs),Se(ln,On,Fs),V.some(Gs)}}));let at;(function(ln){ln[ln.HighlightSubmenu=0]="HighlightSubmenu",ln[ln.HighlightParent=1]="HighlightParent"})(at||(at={}));const qe=(ln,On,Fs)=>{if(Fs.type==="notbuilt"){const ao=ln.getSystem().build(Fs.nbMenu());return C.setMenuBuilt(On,ao),ao}else return Fs.menu},dt=(ln,On,Fs=at.HighlightSubmenu)=>{if(On.hasConfigured(Xn)&&Xn.isDisabled(On))return V.some(On);{const ao=I(On);return C.expand(ao).bind(_s=>(Pe(ln,_s),V.from(_s[0]).bind(Gs=>C.lookupMenu(Gs).bind(qr=>{const Lr=qe(ln,Gs,qr);return We(Lr.element)||Bs.append(ln,md(Lr)),o.onOpenSubmenu(ln,On,Lr,kn(_s)),Fs===at.HighlightSubmenu?(Re.highlightFirst(Lr),Me(ln,C,_s)):(Re.dehighlightAll(Lr),V.some(On))}))))}},it=(ln,On)=>{const Fs=I(On);return C.collapse(Fs).bind(ao=>(Pe(ln,ao),Me(ln,C,ao).map(_s=>(o.onCollapseMenu(ln,On,_s),_s))))},It=(ln,On)=>{const Fs=I(On);return C.refresh(Fs).bind(ao=>(Pe(ln,ao),Me(ln,C,ao)))},Mt=(ln,On)=>N2(On.element)?V.none():dt(ln,On,at.HighlightSubmenu),en=(ln,On)=>N2(On.element)?V.none():it(ln,On),In=(ln,On)=>it(ln,On).orThunk(()=>o.onEscape(ln,On).map(()=>ln)),Ft=ln=>(On,Fs)=>fp(Fs.getSource(),".".concat(o.markers.item)).bind(ao=>On.getSystem().getByDom(ao).toOptional().bind(_s=>ln(On,_s).map(Ue))),Mn=ni([Wt(AL(),(ln,On)=>{const Fs=On.event.item;C.lookupItem(I(Fs)).each(()=>{const ao=On.event.menu;Re.highlight(ln,ao);const _s=I(On.event.item);C.refresh(_s).each(Gs=>Se(ln,C,Gs))})}),r1((ln,On)=>{const Fs=On.event.target;ln.getSystem().getByDom(Fs).each(ao=>{I(ao).indexOf("collapse-item")===0&&it(ln,ao),dt(ln,ao,at.HighlightSubmenu).fold(()=>{o.onExecute(ln,ao)},z)})}),$r((ln,On)=>{x(ln).each(Fs=>{Bs.append(ln,md(Fs)),o.onOpenMenu(ln,Fs),o.highlightOnOpen===Pl.HighlightMenuAndItem?oe(ln,Fs):o.highlightOnOpen===Pl.HighlightJustMenu&&X(ln,Fs)})}),Wt(OL,(ln,On)=>{o.onHighlightItem(ln,On.event.menuComp,On.event.itemComp)}),Wt(Hz,(ln,On)=>{o.onDehighlightItem(ln,On.event.menuComp,On.event.itemComp)}),...o.navigateOnHover?[Wt(EL(),(ln,On)=>{const Fs=On.event.item;It(ln,Fs),dt(ln,Fs,at.HighlightParent),o.onHover(ln,Fs)})]:[]]),En=ln=>Re.getHighlighted(ln).bind(Re.getHighlighted),zn=ln=>{En(ln).each(On=>{it(ln,On)})},go=ln=>{C.getPrimary().each(On=>{oe(ln,On)})},fi=ln=>V.from(ln.components()[0]).filter(On=>eo(On.element,"role")==="menu"),rs={collapseMenu:zn,highlightPrimary:go,repositionMenus:ln=>{C.getPrimary().bind(Fs=>En(ln).bind(ao=>{const _s=I(ao),Gs=Xa(C.getMenus()),qr=_n(ct(Gs,W2.extractPreparedMenu));return C.getTriggeringPath(_s,Lr=>F(ln,qr,Lr))}).map(ao=>({primary:Fs,triggeringPath:ao}))).fold(()=>{fi(ln).each(Fs=>{o.onRepositionMenu(ln,Fs,[])})},({primary:Fs,triggeringPath:ao})=>{o.onRepositionMenu(ln,Fs,ao)})}};return{uid:o.uid,dom:o.dom,markers:o.markers,behaviours:Ca(o.tmenuBehaviours,[fs.config({mode:"special",onRight:Ft(Mt),onLeft:Ft(en),onEscape:Ft(In),focusIn:(ln,On)=>{C.getPrimary().each(Fs=>{r4(ln,Fs.element,T0())})}}),Re.config({highlightClass:o.markers.selectedMenu,itemClass:o.markers.menu}),Lo.config({find:ln=>Re.getHighlighted(ln)}),Bs.config({})]),eventOrder:o.eventOrder,apis:rs,events:Mn}},noe=J("collapse-item"),lm=(o,u,m)=>({primary:o,menus:u,expansions:m}),Uz=(o,u)=>({primary:o,menus:rg(o,u),expansions:{}}),zz=o=>({value:Pn(noe()),meta:{text:o}}),j2=Gu({name:"TieredMenu",configFields:[qC("onExecute"),qC("onEscape"),Nd("onOpenMenu"),Nd("onOpenSubmenu"),Ho("onRepositionMenu"),Ho("onCollapseMenu"),mt("highlightOnOpen",Pl.HighlightMenuAndItem),Km("data",[Zt("primary"),Zt("menus"),Zt("expansions")]),mt("fakeFocus",!1),Ho("onHighlightItem"),Ho("onDehighlightItem"),Ho("onHover"),Sy(),Zt("dom"),mt("navigateOnHover",!0),mt("stayInDom",!1),Ll("tmenuBehaviours",[fs,Re,Lo,Bs]),mt("eventOrder",{})],apis:{collapseMenu:(o,u)=>{o.collapseMenu(u)},highlightPrimary:(o,u)=>{o.highlightPrimary(u)},repositionMenus:(o,u)=>{o.repositionMenus(u)}},factory:toe,extraApis:{tieredData:lm,singleData:Uz,collapseItem:zz}}),soe=(o,u,m,v,C)=>{const x=()=>o.lazySink(u),I=v.type==="horizontal"?{layouts:{onLtr:()=>Yn(),onRtl:()=>U0()}}:{},F=X=>X.length===2,U=X=>F(X)?I:{};return j2.sketch({dom:{tag:"div"},data:v.data,markers:v.menu.markers,highlightOnOpen:v.menu.highlightOnOpen,fakeFocus:v.menu.fakeFocus,onEscape:()=>(Uo.close(u),o.onEscape.map(X=>X(u)),V.some(!0)),onExecute:()=>V.some(!0),onOpenMenu:(X,oe)=>{yc.positionWithinBounds(x().getOrDie(),oe,m,C())},onOpenSubmenu:(X,oe,me,Se)=>{const Ie=x().getOrDie();yc.position(Ie,me,{anchor:{type:"submenu",item:oe,...U(Se)}})},onRepositionMenu:(X,oe,me)=>{const Se=x().getOrDie();yc.positionWithinBounds(Se,oe,m,C()),Ht(me,Ie=>{const Pe=U(Ie.triggeringPath);yc.position(Se,Ie.triggeredMenu,{anchor:{type:"submenu",item:Ie.triggeringItem,...Pe}})})}})},Qk=(o,u)=>{const m=(Se,Ie)=>o.getRelated(Se).exists(Me=>_g(Me,Ie)),v=(Se,Ie)=>{Uo.setContent(Se,Ie)},C=(Se,Ie,Pe)=>{const Me=V.none;x(Se,Ie,Pe,Me)},x=(Se,Ie,Pe,Me)=>{const at=o.lazySink(Se).getOrDie();Uo.openWhileCloaked(Se,Ie,()=>yc.positionWithinBounds(at,Se,Pe,Me())),Dn.setValue(Se,V.some({mode:"position",config:Pe,getBounds:Me}))},I=(Se,Ie,Pe)=>{F(Se,Ie,Pe,V.none)},F=(Se,Ie,Pe,Me)=>{const at=soe(o,Se,Ie,Pe,Me);Uo.open(Se,at),Dn.setValue(Se,V.some({mode:"menu",menu:at}))},U=Se=>{Uo.isOpen(Se)&&(Dn.setValue(Se,V.none()),Uo.close(Se))},X=Se=>Uo.getState(Se),oe=Se=>{Uo.isOpen(Se)&&Dn.getValue(Se).each(Ie=>{switch(Ie.mode){case"menu":Uo.getState(Se).each(j2.repositionMenus);break;case"position":const Pe=o.lazySink(Se).getOrDie();yc.positionWithinBounds(Pe,Se,Ie.config,Ie.getBounds());break}})},me={setContent:v,showAt:C,showWithinBounds:x,showMenuAt:I,showMenuWithinBounds:F,hide:U,getContent:X,reposition:oe,isOpen:Uo.isOpen};return{uid:o.uid,dom:o.dom,behaviours:Ca(o.inlineBehaviours,[Uo.config({isPartOf:(Se,Ie,Pe)=>_g(Ie,Pe)||m(Se,Pe),getAttachPoint:Se=>o.lazySink(Se).getOrDie(),onOpen:Se=>{o.onShow(Se)},onClose:Se=>{o.onHide(Se)}}),Dn.config({store:{mode:"memory",initialValue:V.none()}}),ju.config({channels:{...hd({isExtraPart:u.isExtraPart,...o.fireDismissalEventInstead.map(Se=>({fireEventInstead:{event:Se.event}})).getOr({})}),...X0({...o.fireRepositionEventInstead.map(Se=>({fireEventInstead:{event:Se.event}})).getOr({}),doReposition:oe})}})]),eventOrder:o.eventOrder,apis:me}},Ni=Gu({name:"InlineView",configFields:[Zt("lazySink"),Ho("onShow"),Ho("onHide"),Xh("onEscape"),Ll("inlineBehaviours",[Uo,Dn,ju]),Vu("fireDismissalEventInstead",[mt("event",ag())]),Vu("fireRepositionEventInstead",[mt("event",I0())]),mt("getRelated",V.none),mt("isExtraPart",$e),mt("eventOrder",V.none)],factory:Qk,apis:{showAt:(o,u,m,v)=>{o.showAt(u,m,v)},showWithinBounds:(o,u,m,v,C)=>{o.showWithinBounds(u,m,v,C)},showMenuAt:(o,u,m,v)=>{o.showMenuAt(u,m,v)},showMenuWithinBounds:(o,u,m,v,C)=>{o.showMenuWithinBounds(u,m,v,C)},hide:(o,u)=>{o.hide(u)},isOpen:(o,u)=>o.isOpen(u),getContent:(o,u)=>o.getContent(u),setContent:(o,u,m)=>{o.setContent(u,m)},reposition:(o,u)=>{o.reposition(u)}}});var ex=tinymce.util.Tools.resolve("tinymce.util.Delay"),E8=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),tx=tinymce.util.Tools.resolve("tinymce.EditorManager"),Z2=tinymce.util.Tools.resolve("tinymce.Env"),yp;(function(o){o.default="wrap",o.floating="floating",o.sliding="sliding",o.scrolling="scrolling"})(yp||(yp={}));var C_;(function(o){o.auto="auto",o.top="top",o.bottom="bottom"})(C_||(C_={}));const Br=o=>u=>u.options.get(o),k8=o=>u=>V.from(o(u)),nx=o=>{const u=Z2.deviceType.isPhone(),m=Z2.deviceType.isTablet()||u,v=o.options.register,C=I=>d(I)||I===!1,x=I=>d(I)||Z(I);v("skin",{processor:I=>d(I)||I===!1,default:"oxide"}),v("skin_url",{processor:"string"}),v("height",{processor:x,default:Math.max(o.getElement().offsetHeight,400)}),v("width",{processor:x,default:E8.DOM.getStyle(o.getElement(),"width")}),v("min_height",{processor:"number",default:100}),v("min_width",{processor:"number"}),v("max_height",{processor:"number"}),v("max_width",{processor:"number"}),v("style_formats",{processor:"object[]"}),v("style_formats_merge",{processor:"boolean",default:!1}),v("style_formats_autohide",{processor:"boolean",default:!1}),v("line_height_formats",{processor:"string",default:"1 1.1 1.2 1.3 1.4 1.5 2"}),v("font_family_formats",{processor:"string",default:"Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats"}),v("font_size_formats",{processor:"string",default:"8pt 10pt 12pt 14pt 18pt 24pt 36pt"}),v("font_size_input_default_unit",{processor:"string",default:"pt"}),v("block_formats",{processor:"string",default:"Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre"}),v("content_langs",{processor:"object[]"}),v("removed_menuitems",{processor:"string",default:""}),v("menubar",{processor:I=>d(I)||T(I),default:!u}),v("menu",{processor:"object",default:{}}),v("toolbar",{processor:I=>T(I)||d(I)||S(I)?{value:I,valid:!0}:{valid:!1,message:"Must be a boolean, string or array."},default:!0}),At(9,I=>{v("toolbar"+(I+1),{processor:"string"})}),v("toolbar_mode",{processor:"string",default:m?"scrolling":"floating"}),v("toolbar_groups",{processor:"object",default:{}}),v("toolbar_location",{processor:"string",default:C_.auto}),v("toolbar_persist",{processor:"boolean",default:!1}),v("toolbar_sticky",{processor:"boolean",default:o.inline}),v("toolbar_sticky_offset",{processor:"number",default:0}),v("fixed_toolbar_container",{processor:"string",default:""}),v("fixed_toolbar_container_target",{processor:"object"}),v("ui_mode",{processor:"string",default:"combined"}),v("file_picker_callback",{processor:"function"}),v("file_picker_validator_handler",{processor:"function"}),v("file_picker_types",{processor:"string"}),v("typeahead_urls",{processor:"boolean",default:!0}),v("anchor_top",{processor:C,default:"#top"}),v("anchor_bottom",{processor:C,default:"#bottom"}),v("draggable_modal",{processor:"boolean",default:!1}),v("statusbar",{processor:"boolean",default:!0}),v("elementpath",{processor:"boolean",default:!0}),v("branding",{processor:"boolean",default:!0}),v("promotion",{processor:"boolean",default:!0}),v("resize",{processor:I=>I==="both"||T(I),default:!Z2.deviceType.isTouch()}),v("sidebar_show",{processor:"string"}),v("help_accessibility",{processor:"boolean",default:o.hasPlugin("help")}),v("default_font_stack",{processor:"string[]",default:[]})},RL=Br("readonly"),sx=Br("disabled"),DL=Br("height"),LL=Br("width"),x8=k8(Br("min_width")),PL=k8(Br("min_height")),q2=k8(Br("max_width")),w_=k8(Br("max_height")),ML=k8(Br("style_formats")),NL=Br("style_formats_merge"),Wz=Br("style_formats_autohide"),jz=Br("content_langs"),Zz=Br("removed_menuitems"),E_=Br("toolbar_mode"),ox=Br("toolbar_groups"),rx=Br("toolbar_location"),qz=Br("fixed_toolbar_container"),FL=Br("fixed_toolbar_container_target"),Gz=Br("toolbar_persist"),$L=Br("toolbar_sticky_offset"),Kz=Br("menubar"),ix=Br("toolbar"),Yz=Br("file_picker_callback"),BL=Br("file_picker_validator_handler"),Xz=Br("font_size_input_default_unit"),Jz=Br("file_picker_types"),ax=Br("typeahead_urls"),VL=Br("anchor_top"),HL=Br("anchor_bottom"),Qz=Br("draggable_modal"),lx=Br("statusbar"),eW=Br("elementpath"),UL=Br("branding"),tW=Br("resize"),nW=Br("paste_as_text"),sW=Br("sidebar_show"),zL=Br("promotion"),cx=Br("help_accessibility"),oW=Br("default_font_stack"),T8=Br("skin"),WL=o=>o.options.get("skin")===!1,ux=o=>o.options.get("menubar")!==!1,rW=o=>{const u=o.options.get("skin_url");if(WL(o))return u;if(u)return o.documentBaseURI.toAbsolute(u);{const m=o.options.get("skin");return tx.baseURL+"/skins/ui/"+m}},ooe=o=>V.from(o.options.get("skin_url")),iW=o=>o.options.get("line_height_formats").split(" "),dx=o=>{const u=ix(o),m=d(u),v=S(u)&&u.length>0;return!I8(o)&&(v||m||u===!0)},fx=o=>{const u=At(9,v=>o.options.get("toolbar"+(v+1))),m=jn(u,d);return Kt(m.length>0,m)},I8=o=>fx(o).fold(()=>{const u=ix(o);return Y(u,d)&&u.length>0},Ue),jL=o=>rx(o)===C_.bottom,px=o=>{var u;if(!o.inline)return V.none();const m=(u=qz(o))!==null&&u!==void 0?u:"";if(m.length>0)return sr(rt(),m);const v=FL(o);return B(v)?V.some(Xt.fromDom(v)):V.none()},gh=o=>o.inline&&px(o).isSome(),ZL=o=>px(o).getOrThunk(()=>ia(za(Xt.fromDom(o.getElement())))),qL=o=>o.inline&&!ux(o)&&!dx(o)&&!I8(o),G2=o=>(o.options.get("toolbar_sticky")||o.inline)&&!gh(o)&&!qL(o),rv=o=>!gh(o)&&o.options.get("ui_mode")==="split",aW=o=>{const u=o.options.get("menu");return Rs(u,m=>({...m,items:m.items}))};var roe=Object.freeze({__proto__:null,get ToolbarMode(){return yp},get ToolbarLocation(){return C_},register:nx,getSkinUrl:rW,getSkinUrlOption:ooe,isReadOnly:RL,isDisabled:sx,getSkin:T8,isSkinDisabled:WL,getHeightOption:DL,getWidthOption:LL,getMinWidthOption:x8,getMinHeightOption:PL,getMaxWidthOption:q2,getMaxHeightOption:w_,getUserStyleFormats:ML,shouldMergeStyleFormats:NL,shouldAutoHideStyleFormats:Wz,getLineHeightFormats:iW,getContentLanguages:jz,getRemovedMenuItems:Zz,isMenubarEnabled:ux,isMultipleToolbars:I8,isToolbarEnabled:dx,isToolbarPersist:Gz,getMultipleToolbarsOption:fx,getUiContainer:ZL,useFixedContainer:gh,isSplitUiMode:rv,getToolbarMode:E_,isDraggableModal:Qz,isDistractionFree:qL,isStickyToolbar:G2,getStickyToolbarOffset:$L,getToolbarLocation:rx,isToolbarLocationBottom:jL,getToolbarGroups:ox,getMenus:aW,getMenubar:Kz,getToolbar:ix,getFilePickerCallback:Yz,getFilePickerTypes:Jz,useTypeaheadUrls:ax,getAnchorTop:VL,getAnchorBottom:HL,getFilePickerValidatorHandler:BL,getFontSizeInputDefaultUnit:Xz,useStatusBar:lx,useElementPath:eW,promotionEnabled:zL,useBranding:UL,getResize:tW,getPasteAsText:nW,getSidebarShow:sW,useHelpAccessibility:cx,getDefaultFontStack:oW});const lW=["visible","hidden","clip"],cW=o=>Ti(o).length>0&&!ft(lW,o),GL=o=>{if(gr(o)){const u=Gt(o,"overflow-x"),m=Gt(o,"overflow-y");return cW(u)||cW(m)}else return!1},KL=o=>o.plugins.fullscreen&&o.plugins.fullscreen.isFullscreen(),YL=(o,u)=>{const m=YE(u,GL),v=m.length===0?jf(u).map(Vm).map(C=>YE(C,GL)).getOr([]):m;return Vt(v).map(C=>({element:C,others:v.slice(1),isFullscreen:()=>KL(o)}))},K2=(o,u)=>rv(o)?YL(o,u):V.none(),Y2=o=>{const u=[...ct(o.others,tl),ul()];return o.isFullscreen()?ul():y0(tl(o.element),u)},_l=Gu({name:"Button",factory:o=>{const u=S_(o.action),m=o.dom.tag,v=x=>bn(o.dom,"attributes").bind(I=>bn(I,x)),C=()=>{if(m==="button"){const x=v("type").getOr("button"),I=v("role").map(F=>({role:F})).getOr({});return{type:x,...I}}else return{role:o.role.getOr(v("role").getOr("button"))}};return{uid:o.uid,dom:o.dom,components:o.components,events:u,behaviours:Vd.augment(o.buttonBehaviours,[As.config({}),fs.config({mode:"execution",useSpace:!0,useEnter:!0})]),domModification:{attributes:C()},eventOrder:o.eventOrder}},configFields:[mt("uid",void 0),Zt("dom"),mt("components",[]),Vd.field("buttonBehaviours",[As,fs]),ur("action"),ur("role"),mt("eventOrder",{})]}),ioe=o=>{const u=o.dom.attributes!==void 0?o.dom.attributes:[];return Xs(u,(m,v)=>v.name==="class"?m:{...m,[v.name]:v.value},{})},aoe=o=>Array.prototype.slice.call(o.dom.classList,0),b1=o=>{const u=Xt.fromHtml(o),m=So(u),v=ioe(u),C=aoe(u),x=m.length===0?{}:{innerHtml:_y(u)};return{tag:tr(u),classes:C,attributes:v,...x}},or=o=>{const u=Mk(o)&&Qr(o,"uid")?o.uid:$0("memento");return{get:x=>x.getSystem().getByUid(u).getOrDie(),getOpt:x=>x.getSystem().getByUid(u).toOptional(),asSpec:()=>({...o,uid:u})}};var XL=Object.freeze({__proto__:null,exhibit:(o,u)=>up({attributes:ny([{key:u.tabAttr,value:"true"}])})}),loe=[mt("tabAttr","data-alloy-tabstop")];const si=Sa({fields:loe,name:"tabstopping",active:XL}),mx=Pn("tooltip.exclusive"),A8=Pn("tooltip.show"),O8=Pn("tooltip.hide"),R8=Pn("tooltip.immediateHide"),D8=Pn("tooltip.immediateShow"),uW=(o,u,m)=>{o.getSystem().broadcastOn([mx],{})};var coe=Object.freeze({__proto__:null,hideAllExclusive:uW,immediateOpenClose:(o,u,m,v)=>vo(o,v?D8:R8),isEnabled:(o,u,m)=>m.isEnabled(),setComponents:(o,u,m,v)=>{m.getTooltip().each(C=>{C.getSystem().isConnected()&&Bs.set(C,v)})},setEnabled:(o,u,m,v)=>m.setEnabled(v)}),uoe=Object.freeze({__proto__:null,events:(o,u)=>{const m=I=>{u.getTooltip().each(F=>{F.getSystem().isConnected()&&(im(F),o.onHide(I,F),u.clearTooltip())}),u.clearTimer()},v=I=>{if(!u.isShowing()&&u.isEnabled()){uW(I);const F=o.lazySink(I).getOrDie(),U=I.getSystem().build({dom:o.tooltipDom,components:o.tooltipComponents,events:ni(o.mode==="normal"?[Wt(rp(),X=>{vo(I,A8)}),Wt(sy(),X=>{vo(I,O8)})]:[]),behaviours:cn([Bs.config({})])});u.setTooltip(U),K0(F,U),o.onShow(I,U),yc.position(F,U,{anchor:o.anchor(I)})}},C=I=>{u.getTooltip().each(F=>{const U=o.lazySink(I).getOrDie();yc.position(U,F,{anchor:o.anchor(I)})})},x=()=>{switch(o.mode){case"normal":return[Wt(ip(),I=>{vo(I,D8)}),Wt(n1(),I=>{vo(I,R8)}),Wt(rp(),I=>{vo(I,A8)}),Wt(sy(),I=>{vo(I,O8)})];case"follow-highlight":return[Wt(s4(),(I,F)=>{vo(I,A8)}),Wt(o4(),I=>{vo(I,O8)})];case"children-normal":return[Wt(ip(),(I,F)=>{tu(I.element).each(U=>{ar(F.event.target,"[data-mce-tooltip]")&&u.getTooltip().fold(()=>{vo(I,D8)},X=>{u.isShowing()&&(o.onShow(I,X),C(I))})})}),Wt(n1(),I=>{tu(I.element).fold(()=>{vo(I,R8)},z)}),Wt(rp(),I=>{sr(I.element,"[data-mce-tooltip]:hover").each(F=>{u.getTooltip().fold(()=>{vo(I,A8)},U=>{u.isShowing()&&(o.onShow(I,U),C(I))})})}),Wt(sy(),I=>{sr(I.element,"[data-mce-tooltip]:hover").fold(()=>{vo(I,O8)},z)})];default:return[Wt(ip(),(I,F)=>{tu(I.element).each(U=>{ar(F.event.target,"[data-mce-tooltip]")&&u.getTooltip().fold(()=>{vo(I,D8)},X=>{u.isShowing()&&(o.onShow(I,X),C(I))})})}),Wt(n1(),I=>{tu(I.element).fold(()=>{vo(I,R8)},z)})]}};return ni(Nt([[M9(I=>{o.onSetup(I)}),Wt(A8,I=>{u.resetTimer(()=>{v(I)},o.delayForShow())}),Wt(O8,I=>{u.resetTimer(()=>{m(I)},o.delayForHide())}),Wt(D8,I=>{u.resetTimer(()=>{v(I)},0)}),Wt(R8,I=>{u.resetTimer(()=>{m(I)},0)}),Wt(ap(),(I,F)=>{const U=F;U.universal||ft(U.channels,mx)&&m(I)}),nh(I=>{m(I)})],x()]))}}),JL=[Zt("lazySink"),Zt("tooltipDom"),mt("exclusive",!0),mt("tooltipComponents",[]),Kr("delayForShow",J(300)),Kr("delayForHide",J(100)),Kr("onSetup",z),np("mode","normal",["normal","follow-highlight","children-keyboard-focus","children-normal"]),mt("anchor",o=>({type:"hotspot",hotspot:o,layouts:{onLtr:J([nl,hl,La,Jl,qa,Pa]),onRtl:J([nl,hl,La,Jl,qa,Pa])},bubble:Eu(0,-2,{})})),Ho("onHide"),Ho("onShow")],doe=Object.freeze({__proto__:null,init:()=>{const o=ds(!0),u=vr(),m=vr(),v=()=>{u.on(clearTimeout)},C=(I,F)=>{v(),u.set(setTimeout(I,F))},x=J("not-implemented");return Pd({getTooltip:m.get,isShowing:m.isSet,setTooltip:m.set,clearTooltip:m.clear,clearTimer:v,resetTimer:C,readState:x,isEnabled:()=>o.get(),setEnabled:I=>o.set(I)})}});const Yi=Sa({fields:JL,name:"tooltipping",active:uoe,state:doe,apis:coe});/*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */const{entries:QL,setPrototypeOf:dW,isFrozen:foe,getPrototypeOf:poe,getOwnPropertyDescriptor:moe}=Object;let{freeze:gf,seal:vh,create:hx}=Object,{apply:eP,construct:tP}=typeof Reflect<"u"&&Reflect;gf||(gf=function(u){return u}),vh||(vh=function(u){return u}),eP||(eP=function(u,m,v){return u.apply(m,v)}),tP||(tP=function(u,m){return new u(...m)});const gx=vd(Array.prototype.forEach),hoe=vd(Array.prototype.lastIndexOf),fW=vd(Array.prototype.pop),L8=vd(Array.prototype.push),goe=vd(Array.prototype.splice),vx=vd(String.prototype.toLowerCase),nP=vd(String.prototype.toString),pW=vd(String.prototype.match),P8=vd(String.prototype.replace),voe=vd(String.prototype.indexOf),boe=vd(String.prototype.trim),y1=vd(Object.prototype.hasOwnProperty),Ku=vd(RegExp.prototype.test),M8=yoe(TypeError);function vd(o){return function(u){for(var m=arguments.length,v=new Array(m>1?m-1:0),C=1;C<m;C++)v[C-1]=arguments[C];return eP(o,u,v)}}function yoe(o){return function(){for(var u=arguments.length,m=new Array(u),v=0;v<u;v++)m[v]=arguments[v];return tP(o,m)}}function ui(o,u){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:vx;dW&&dW(o,null);let v=u.length;for(;v--;){let C=u[v];if(typeof C=="string"){const x=m(C);x!==C&&(foe(u)||(u[v]=x),C=x)}o[C]=!0}return o}function _oe(o){for(let u=0;u<o.length;u++)y1(o,u)||(o[u]=null);return o}function X2(o){const u=hx(null);for(const[m,v]of QL(o))y1(o,m)&&(Array.isArray(v)?u[m]=_oe(v):v&&typeof v=="object"&&v.constructor===Object?u[m]=X2(v):u[m]=v);return u}function N8(o,u){for(;o!==null;){const v=moe(o,u);if(v){if(v.get)return vd(v.get);if(typeof v.value=="function")return vd(v.value)}o=poe(o)}function m(){return null}return m}const bx=gf(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),F8=gf(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),yx=gf(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),sP=gf(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),k_=gf(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),mW=gf(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),_1=gf(["#text"]),_x=gf(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),oP=gf(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),hW=gf(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Sx=gf(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Soe=vh(/\{\{[\w\W]*|[\w\W]*\}\}/gm),$8=vh(/<%[\w\W]*|[\w\W]*%>/gm),Coe=vh(/\$\{[\w\W]*/gm),gW=vh(/^data-[\-\w.\u00B7-\uFFFF]+$/),rP=vh(/^aria-[\-\w]+$/),vW=vh(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),iP=vh(/^(?:\w+script|data):/i),aP=vh(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),bW=vh(/^html$/i),yW=vh(/^[a-z][.\w]*(-[.\w]+)+$/i);var lP=Object.freeze({__proto__:null,ARIA_ATTR:rP,ATTR_WHITESPACE:aP,CUSTOM_ELEMENT:yW,DATA_ATTR:gW,DOCTYPE_NAME:bW,ERB_EXPR:$8,IS_ALLOWED_URI:vW,IS_SCRIPT_OR_DATA:iP,MUSTACHE_EXPR:Soe,TMPLIT_EXPR:Coe});const B8={element:1,text:3,progressingInstruction:7,comment:8,document:9},_W=function(){return typeof window>"u"?null:window},SW=function(u,m){if(typeof u!="object"||typeof u.createPolicy!="function")return null;let v=null;const C="data-tt-policy-suffix";m&&m.hasAttribute(C)&&(v=m.getAttribute(C));const x="dompurify"+(v?"#"+v:"");try{return u.createPolicy(x,{createHTML(I){return I},createScriptURL(I){return I}})}catch{return console.warn("TrustedTypes policy "+x+" could not be created."),null}},CW=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function wW(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:_W();const u=Fo=>wW(Fo);if(u.version="3.2.4",u.removed=[],!o||!o.document||o.document.nodeType!==B8.document||!o.Element)return u.isSupported=!1,u;let{document:m}=o;const v=m,C=v.currentScript,{DocumentFragment:x,HTMLTemplateElement:I,Node:F,Element:U,NodeFilter:X,NamedNodeMap:oe=o.NamedNodeMap||o.MozNamedAttrMap,HTMLFormElement:me,DOMParser:Se,trustedTypes:Ie}=o,Pe=U.prototype,Me=N8(Pe,"cloneNode"),at=N8(Pe,"remove"),qe=N8(Pe,"nextSibling"),dt=N8(Pe,"childNodes"),it=N8(Pe,"parentNode");if(typeof I=="function"){const Fo=m.createElement("template");Fo.content&&Fo.content.ownerDocument&&(m=Fo.content.ownerDocument)}let It,Mt="";const{implementation:en,createNodeIterator:In,createDocumentFragment:Ft,getElementsByTagName:Mn}=m,{importNode:En}=v;let zn=CW();u.isSupported=typeof QL=="function"&&typeof it=="function"&&en&&en.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:go,ERB_EXPR:fi,TMPLIT_EXPR:Jo,DATA_ATTR:rs,ARIA_ATTR:ln,IS_SCRIPT_OR_DATA:On,ATTR_WHITESPACE:Fs,CUSTOM_ELEMENT:ao}=lP;let{IS_ALLOWED_URI:_s}=lP,Gs=null;const qr=ui({},[...bx,...F8,...yx,...k_,..._1]);let Lr=null;const Ud=ui({},[..._x,...oP,...hW,...Sx]);let Qi=Object.seal(hx(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Op=null,iu=null,Rp=!0,Dp=!0,xh=!1,nw=!0,Wg=!1,v$=!0,V3=!1,b$=!1,Ppe=!1,UI=!1,wX=!1,EX=!1,I6e=!0,A6e=!1;const Z0t="user-content-";let Mpe=!0,y$=!1,zI={},WI=null;const O6e=ui({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let R6e=null;const D6e=ui({},["audio","video","img","source","image","track"]);let Npe=null;const L6e=ui({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),kX="http://www.w3.org/1998/Math/MathML",xX="http://www.w3.org/2000/svg",H3="http://www.w3.org/1999/xhtml";let jI=H3,Fpe=!1,$pe=null;const q0t=ui({},[kX,xX,H3],nP);let TX=ui({},["mi","mo","mn","ms","mtext"]),IX=ui({},["annotation-xml"]);const G0t=ui({},["title","style","font","a","script"]);let _$=null;const K0t=["application/xhtml+xml","text/html"],Y0t="text/html";let zd=null,ZI=null;const X0t=m.createElement("form"),P6e=function(Pt){return Pt instanceof RegExp||Pt instanceof Function},Bpe=function(){let Pt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(ZI&&ZI===Pt)){if((!Pt||typeof Pt!="object")&&(Pt={}),Pt=X2(Pt),_$=K0t.indexOf(Pt.PARSER_MEDIA_TYPE)===-1?Y0t:Pt.PARSER_MEDIA_TYPE,zd=_$==="application/xhtml+xml"?nP:vx,Gs=y1(Pt,"ALLOWED_TAGS")?ui({},Pt.ALLOWED_TAGS,zd):qr,Lr=y1(Pt,"ALLOWED_ATTR")?ui({},Pt.ALLOWED_ATTR,zd):Ud,$pe=y1(Pt,"ALLOWED_NAMESPACES")?ui({},Pt.ALLOWED_NAMESPACES,nP):q0t,Npe=y1(Pt,"ADD_URI_SAFE_ATTR")?ui(X2(L6e),Pt.ADD_URI_SAFE_ATTR,zd):L6e,R6e=y1(Pt,"ADD_DATA_URI_TAGS")?ui(X2(D6e),Pt.ADD_DATA_URI_TAGS,zd):D6e,WI=y1(Pt,"FORBID_CONTENTS")?ui({},Pt.FORBID_CONTENTS,zd):O6e,Op=y1(Pt,"FORBID_TAGS")?ui({},Pt.FORBID_TAGS,zd):{},iu=y1(Pt,"FORBID_ATTR")?ui({},Pt.FORBID_ATTR,zd):{},zI=y1(Pt,"USE_PROFILES")?Pt.USE_PROFILES:!1,Rp=Pt.ALLOW_ARIA_ATTR!==!1,Dp=Pt.ALLOW_DATA_ATTR!==!1,xh=Pt.ALLOW_UNKNOWN_PROTOCOLS||!1,nw=Pt.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Wg=Pt.SAFE_FOR_TEMPLATES||!1,v$=Pt.SAFE_FOR_XML!==!1,V3=Pt.WHOLE_DOCUMENT||!1,UI=Pt.RETURN_DOM||!1,wX=Pt.RETURN_DOM_FRAGMENT||!1,EX=Pt.RETURN_TRUSTED_TYPE||!1,Ppe=Pt.FORCE_BODY||!1,I6e=Pt.SANITIZE_DOM!==!1,A6e=Pt.SANITIZE_NAMED_PROPS||!1,Mpe=Pt.KEEP_CONTENT!==!1,y$=Pt.IN_PLACE||!1,_s=Pt.ALLOWED_URI_REGEXP||vW,jI=Pt.NAMESPACE||H3,TX=Pt.MATHML_TEXT_INTEGRATION_POINTS||TX,IX=Pt.HTML_INTEGRATION_POINTS||IX,Qi=Pt.CUSTOM_ELEMENT_HANDLING||{},Pt.CUSTOM_ELEMENT_HANDLING&&P6e(Pt.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Qi.tagNameCheck=Pt.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Pt.CUSTOM_ELEMENT_HANDLING&&P6e(Pt.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Qi.attributeNameCheck=Pt.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Pt.CUSTOM_ELEMENT_HANDLING&&typeof Pt.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Qi.allowCustomizedBuiltInElements=Pt.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Wg&&(Dp=!1),wX&&(UI=!0),zI&&(Gs=ui({},_1),Lr=[],zI.html===!0&&(ui(Gs,bx),ui(Lr,_x)),zI.svg===!0&&(ui(Gs,F8),ui(Lr,oP),ui(Lr,Sx)),zI.svgFilters===!0&&(ui(Gs,yx),ui(Lr,oP),ui(Lr,Sx)),zI.mathMl===!0&&(ui(Gs,k_),ui(Lr,hW),ui(Lr,Sx))),Pt.ADD_TAGS&&(Gs===qr&&(Gs=X2(Gs)),ui(Gs,Pt.ADD_TAGS,zd)),Pt.ADD_ATTR&&(Lr===Ud&&(Lr=X2(Lr)),ui(Lr,Pt.ADD_ATTR,zd)),Pt.ADD_URI_SAFE_ATTR&&ui(Npe,Pt.ADD_URI_SAFE_ATTR,zd),Pt.FORBID_CONTENTS&&(WI===O6e&&(WI=X2(WI)),ui(WI,Pt.FORBID_CONTENTS,zd)),Mpe&&(Gs["#text"]=!0),V3&&ui(Gs,["html","head","body"]),Gs.table&&(ui(Gs,["tbody"]),delete Op.tbody),Pt.TRUSTED_TYPES_POLICY){if(typeof Pt.TRUSTED_TYPES_POLICY.createHTML!="function")throw M8('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Pt.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw M8('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');It=Pt.TRUSTED_TYPES_POLICY,Mt=It.createHTML("")}else It===void 0&&(It=SW(Ie,C)),It!==null&&typeof Mt=="string"&&(Mt=It.createHTML(""));gf&&gf(Pt),ZI=Pt}},M6e=ui({},[...F8,...yx,...sP]),N6e=ui({},[...k_,...mW]),J0t=function(Pt){let Ss=it(Pt);(!Ss||!Ss.tagName)&&(Ss={namespaceURI:jI,tagName:"template"});const wo=vx(Pt.tagName),Ec=vx(Ss.tagName);return $pe[Pt.namespaceURI]?Pt.namespaceURI===xX?Ss.namespaceURI===H3?wo==="svg":Ss.namespaceURI===kX?wo==="svg"&&(Ec==="annotation-xml"||TX[Ec]):!!M6e[wo]:Pt.namespaceURI===kX?Ss.namespaceURI===H3?wo==="math":Ss.namespaceURI===xX?wo==="math"&&IX[Ec]:!!N6e[wo]:Pt.namespaceURI===H3?Ss.namespaceURI===xX&&!IX[Ec]||Ss.namespaceURI===kX&&!TX[Ec]?!1:!N6e[wo]&&(G0t[wo]||!M6e[wo]):!!(_$==="application/xhtml+xml"&&$pe[Pt.namespaceURI]):!1},mb=function(Pt){L8(u.removed,{element:Pt});try{it(Pt).removeChild(Pt)}catch{at(Pt)}},S$=function(Pt,Ss){try{L8(u.removed,{attribute:Ss.getAttributeNode(Pt),from:Ss})}catch{L8(u.removed,{attribute:null,from:Ss})}if(Ss.removeAttribute(Pt),Pt==="is")if(UI||wX)try{mb(Ss)}catch{}else try{Ss.setAttribute(Pt,"")}catch{}},F6e=function(Pt){let Ss=null,wo=null;if(Ppe)Pt="<remove></remove>"+Pt;else{const Wd=pW(Pt,/^[\r\n\t ]+/);wo=Wd&&Wd[0]}_$==="application/xhtml+xml"&&jI===H3&&(Pt='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Pt+"</body></html>");const Ec=It?It.createHTML(Pt):Pt;if(jI===H3)try{Ss=new Se().parseFromString(Ec,_$)}catch{}if(!Ss||!Ss.documentElement){Ss=en.createDocument(jI,"template",null);try{Ss.documentElement.innerHTML=Fpe?Mt:Ec}catch{}}const Lp=Ss.body||Ss.documentElement;return Pt&&wo&&Lp.insertBefore(m.createTextNode(wo),Lp.childNodes[0]||null),jI===H3?Mn.call(Ss,V3?"html":"body")[0]:V3?Ss.documentElement:Lp},$6e=function(Pt){return In.call(Pt.ownerDocument||Pt,Pt,X.SHOW_ELEMENT|X.SHOW_COMMENT|X.SHOW_TEXT|X.SHOW_PROCESSING_INSTRUCTION|X.SHOW_CDATA_SECTION,null)},Vpe=function(Pt){return Pt instanceof me&&(typeof Pt.nodeName!="string"||typeof Pt.textContent!="string"||typeof Pt.removeChild!="function"||!(Pt.attributes instanceof oe)||typeof Pt.removeAttribute!="function"||typeof Pt.setAttribute!="function"||typeof Pt.namespaceURI!="string"||typeof Pt.insertBefore!="function"||typeof Pt.hasChildNodes!="function")},B6e=function(Pt){return typeof F=="function"&&Pt instanceof F};function U3(Fo,Pt,Ss){gx(Fo,wo=>{wo.call(u,Pt,Ss,ZI)})}const V6e=function(Pt){let Ss=null;if(U3(zn.beforeSanitizeElements,Pt,null),Vpe(Pt))return mb(Pt),!0;const wo=zd(Pt.nodeName);if(U3(zn.uponSanitizeElement,Pt,{tagName:wo,allowedTags:Gs}),Pt.hasChildNodes()&&!B6e(Pt.firstElementChild)&&Ku(/<[/\w]/g,Pt.innerHTML)&&Ku(/<[/\w]/g,Pt.textContent)||Pt.nodeType===B8.progressingInstruction||v$&&Pt.nodeType===B8.comment&&Ku(/<[/\w]/g,Pt.data))return mb(Pt),!0;if(!Gs[wo]||Op[wo]){if(!Op[wo]&&U6e(wo)&&(Qi.tagNameCheck instanceof RegExp&&Ku(Qi.tagNameCheck,wo)||Qi.tagNameCheck instanceof Function&&Qi.tagNameCheck(wo)))return!1;if(Mpe&&!WI[wo]){const Ec=it(Pt)||Pt.parentNode,Lp=dt(Pt)||Pt.childNodes;if(Lp&&Ec){const Wd=Lp.length;for(let Th=Wd-1;Th>=0;--Th){const hb=Me(Lp[Th],!0);hb.__removalCount=(Pt.__removalCount||0)+1,Ec.insertBefore(hb,qe(Pt))}}}return mb(Pt),!0}return Pt instanceof U&&!J0t(Pt)||(wo==="noscript"||wo==="noembed"||wo==="noframes")&&Ku(/<\/no(script|embed|frames)/i,Pt.innerHTML)?(mb(Pt),!0):(Wg&&Pt.nodeType===B8.text&&(Ss=Pt.textContent,gx([go,fi,Jo],Ec=>{Ss=P8(Ss,Ec," ")}),Pt.textContent!==Ss&&(L8(u.removed,{element:Pt.cloneNode()}),Pt.textContent=Ss)),U3(zn.afterSanitizeElements,Pt,null),!1)},H6e=function(Pt,Ss,wo){if(I6e&&(Ss==="id"||Ss==="name")&&(wo in m||wo in X0t))return!1;if(!(Dp&&!iu[Ss]&&Ku(rs,Ss))){if(!(Rp&&Ku(ln,Ss))){if(!Lr[Ss]||iu[Ss]){if(!(U6e(Pt)&&(Qi.tagNameCheck instanceof RegExp&&Ku(Qi.tagNameCheck,Pt)||Qi.tagNameCheck instanceof Function&&Qi.tagNameCheck(Pt))&&(Qi.attributeNameCheck instanceof RegExp&&Ku(Qi.attributeNameCheck,Ss)||Qi.attributeNameCheck instanceof Function&&Qi.attributeNameCheck(Ss))||Ss==="is"&&Qi.allowCustomizedBuiltInElements&&(Qi.tagNameCheck instanceof RegExp&&Ku(Qi.tagNameCheck,wo)||Qi.tagNameCheck instanceof Function&&Qi.tagNameCheck(wo))))return!1}else if(!Npe[Ss]){if(!Ku(_s,P8(wo,Fs,""))){if(!((Ss==="src"||Ss==="xlink:href"||Ss==="href")&&Pt!=="script"&&voe(wo,"data:")===0&&R6e[Pt])){if(!(xh&&!Ku(On,P8(wo,Fs,"")))){if(wo)return!1}}}}}}return!0},U6e=function(Pt){return Pt!=="annotation-xml"&&pW(Pt,ao)},z6e=function(Pt){U3(zn.beforeSanitizeAttributes,Pt,null);const{attributes:Ss}=Pt;if(!Ss||Vpe(Pt))return;const wo={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Lr,forceKeepAttr:void 0};let Ec=Ss.length;for(;Ec--;){const Lp=Ss[Ec],{name:Wd,namespaceURI:Th,value:hb}=Lp,C$=zd(Wd);let kf=Wd==="value"?hb:boe(hb);const evt=kf;if(wo.attrName=C$,wo.attrValue=kf,wo.keepAttr=!0,wo.forceKeepAttr=void 0,U3(zn.uponSanitizeAttribute,Pt,wo),kf=wo.attrValue,A6e&&(C$==="id"||C$==="name")&&(S$(Wd,Pt),kf=Z0t+kf),v$&&Ku(/((--!?|])>)|<\/(style|title)/i,kf)){S$(Wd,Pt);continue}if(wo.forceKeepAttr)continue;if(!wo.keepAttr){S$(Wd,Pt);continue}if(!nw&&Ku(/\/>/i,kf)){S$(Wd,Pt);continue}Wg&&gx([go,fi,Jo],j6e=>{kf=P8(kf,j6e," ")});const W6e=zd(Pt.nodeName);if(!H6e(W6e,C$,kf)){S$(Wd,Pt);continue}if(It&&typeof Ie=="object"&&typeof Ie.getAttributeType=="function"&&!Th)switch(Ie.getAttributeType(W6e,C$)){case"TrustedHTML":{kf=It.createHTML(kf);break}case"TrustedScriptURL":{kf=It.createScriptURL(kf);break}}if(kf!==evt)try{Th?Pt.setAttributeNS(Th,Wd,kf):Pt.setAttribute(Wd,kf),Vpe(Pt)?mb(Pt):fW(u.removed)}catch{}}U3(zn.afterSanitizeAttributes,Pt,null)},Q0t=function Fo(Pt){let Ss=null;const wo=$6e(Pt);for(U3(zn.beforeSanitizeShadowDOM,Pt,null);Ss=wo.nextNode();)U3(zn.uponSanitizeShadowNode,Ss,null),V6e(Ss),z6e(Ss),Ss.content instanceof x&&Fo(Ss.content);U3(zn.afterSanitizeShadowDOM,Pt,null)};return u.sanitize=function(Fo){let Pt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ss=null,wo=null,Ec=null,Lp=null;if(Fpe=!Fo,Fpe&&(Fo="<!-->"),typeof Fo!="string"&&!B6e(Fo))if(typeof Fo.toString=="function"){if(Fo=Fo.toString(),typeof Fo!="string")throw M8("dirty is not a string, aborting")}else throw M8("toString is not a function");if(!u.isSupported)return Fo;if(b$||Bpe(Pt),u.removed=[],typeof Fo=="string"&&(y$=!1),y$){if(Fo.nodeName){const hb=zd(Fo.nodeName);if(!Gs[hb]||Op[hb])throw M8("root node is forbidden and cannot be sanitized in-place")}}else if(Fo instanceof F)Ss=F6e("<!---->"),wo=Ss.ownerDocument.importNode(Fo,!0),wo.nodeType===B8.element&&wo.nodeName==="BODY"||wo.nodeName==="HTML"?Ss=wo:Ss.appendChild(wo);else{if(!UI&&!Wg&&!V3&&Fo.indexOf("<")===-1)return It&&EX?It.createHTML(Fo):Fo;if(Ss=F6e(Fo),!Ss)return UI?null:EX?Mt:""}Ss&&Ppe&&mb(Ss.firstChild);const Wd=$6e(y$?Fo:Ss);for(;Ec=Wd.nextNode();)V6e(Ec),z6e(Ec),Ec.content instanceof x&&Q0t(Ec.content);if(y$)return Fo;if(UI){if(wX)for(Lp=Ft.call(Ss.ownerDocument);Ss.firstChild;)Lp.appendChild(Ss.firstChild);else Lp=Ss;return(Lr.shadowroot||Lr.shadowrootmode)&&(Lp=En.call(v,Lp,!0)),Lp}let Th=V3?Ss.outerHTML:Ss.innerHTML;return V3&&Gs["!doctype"]&&Ss.ownerDocument&&Ss.ownerDocument.doctype&&Ss.ownerDocument.doctype.name&&Ku(bW,Ss.ownerDocument.doctype.name)&&(Th="<!DOCTYPE "+Ss.ownerDocument.doctype.name+">\n"+Th),Wg&&gx([go,fi,Jo],hb=>{Th=P8(Th,hb," ")}),It&&EX?It.createHTML(Th):Th},u.setConfig=function(){let Fo=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Bpe(Fo),b$=!0},u.clearConfig=function(){ZI=null,b$=!1},u.isValidAttribute=function(Fo,Pt,Ss){ZI||Bpe({});const wo=zd(Fo),Ec=zd(Pt);return H6e(wo,Ec,Ss)},u.addHook=function(Fo,Pt){typeof Pt=="function"&&L8(zn[Fo],Pt)},u.removeHook=function(Fo,Pt){if(Pt!==void 0){const Ss=hoe(zn[Fo],Pt);return Ss===-1?void 0:goe(zn[Fo],Ss,1)[0]}return fW(zn[Fo])},u.removeHooks=function(Fo){zn[Fo]=[]},u.removeAllHooks=function(){zn=CW()},u}var woe=wW();const EW=o=>woe().sanitize(o);var cm=tinymce.util.Tools.resolve("tinymce.util.I18n");const kW={indent:!0,outdent:!0,"table-insert-column-after":!0,"table-insert-column-before":!0,"paste-column-after":!0,"paste-column-before":!0,"unordered-list":!0,"list-bull-circle":!0,"list-bull-default":!0,"list-bull-square":!0},cP="temporary-placeholder",uP=o=>()=>bn(o,cP).getOr("!not found!"),Cx=(o,u)=>{const m=o.toLowerCase();if(cm.isRtl()){const v=Hi(m,"-rtl");return qs(u,v)?v:m}else return m},x_=(o,u)=>bn(u,Cx(o,u)),dP=(o,u)=>{const m=u();return x_(o,m).getOrThunk(uP(m))},Eoe=(o,u,m)=>{const v=u();return x_(o,v).or(m).getOrThunk(uP(v))},koe=o=>cm.isRtl()?qs(kW,o):!1,fP=()=>zs("add-focusable",[$r(o=>{bE(o.element,"svg").each(u=>jt(u,"focusable","false"))})]),xW=(o,u,m,v)=>{var C,x;const I=koe(u)?["tox-icon--flip"]:[],F=bn(m,Cx(u,m)).or(v).getOrThunk(uP(m));return{dom:{tag:o.tag,attributes:(C=o.attributes)!==null&&C!==void 0?C:{},classes:o.classes.concat(I),innerHtml:F},behaviours:cn([...(x=o.behaviours)!==null&&x!==void 0?x:[],fP()])}},_p=(o,u,m,v=V.none())=>xW(u,o,m(),v),TW=(o,u,m)=>{const v=m(),C=Qe(o,x=>qs(v,Cx(x,v)));return xW(u,C.getOr(cP),v,V.none())},IW={success:"checkmark",error:"warning",err:"error",warning:"warning",warn:"warning",info:"info"},wx=Gu({name:"Notification",factory:o=>{const u=Pn("notification-text"),m=or({dom:b1("<p id=".concat(u,">").concat(EW(o.backstageProvider.translate(o.text)),"</p>")),behaviours:cn([Bs.config({})])}),v=Pe=>({dom:{tag:"div",classes:["tox-bar"],styles:{width:"".concat(Pe,"%")}}}),C=Pe=>({dom:{tag:"div",classes:["tox-text"],innerHtml:"".concat(Pe,"%")}}),x=or({dom:{tag:"div",classes:o.progress?["tox-progress-bar","tox-progress-indicator"]:["tox-progress-bar"]},components:[{dom:{tag:"div",classes:["tox-bar-container"]},components:[v(0)]},C(0)],behaviours:cn([Bs.config({})])}),U={updateProgress:(Pe,Me)=>{Pe.getSystem().isConnected()&&x.getOpt(Pe).each(at=>{Bs.set(at,[{dom:{tag:"div",classes:["tox-bar-container"]},components:[v(Me)]},C(Me)])})},updateText:(Pe,Me)=>{if(Pe.getSystem().isConnected()){const at=m.get(Pe);Bs.set(at,[Ci(Me)])}}},X=Nt([o.icon.toArray(),[o.level],V.from(IW[o.level]).toArray()]),oe=or(_l.sketch({dom:{tag:"button",classes:["tox-notification__dismiss","tox-button","tox-button--naked","tox-button--icon"],attributes:{"aria-label":o.backstageProvider.translate("Close")}},components:[_p("close",{tag:"span",classes:["tox-icon"]},o.iconProvider)],buttonBehaviours:cn([si.config({}),Yi.config({...o.backstageProvider.tooltips.getConfig({tooltipText:o.backstageProvider.translate("Close")})})]),action:Pe=>{o.onAction(Pe)}})),me=TW(X,{tag:"div",classes:["tox-notification__icon"]},o.iconProvider),Se={dom:{tag:"div",classes:["tox-notification__body"]},components:[m.asSpec()],behaviours:cn([Bs.config({})])},Ie=[me,Se];return{uid:o.uid,dom:{tag:"div",attributes:{role:"alert","aria-labelledby":u},classes:["tox-notification","tox-notification--in","tox-notification--".concat(o.level)]},behaviours:cn([si.config({}),As.config({}),fs.config({mode:"special",onEscape:Pe=>(o.onAction(Pe),V.some(!0))})]),components:Ie.concat(o.progress?[x.asSpec()]:[]).concat([oe.asSpec()]),apis:U}},configFields:[np("level","info",["success","error","warning","warn","info"]),Zt("progress"),ur("icon"),Zt("onAction"),Zt("text"),Zt("iconProvider"),Zt("backstageProvider")],apis:{updateProgress:(o,u,m)=>{o.updateProgress(u,m)},updateText:(o,u,m)=>{o.updateText(u,m)}}});var Toe=(o,u,m,v)=>{const C=u.backstage.shared,x=()=>Xt.fromDom(o.queryCommandValue("ToggleView")===""?o.getContentAreaContainer():o.getContainer()),I=()=>{const me=tl(x());return V.some(me)},F=me=>{I().each(Se=>{Ht(me,Ie=>{fo(Ie.element,"width"),oo(Ie.element)>Se.width&&wn(Ie.element,"width",Se.width+"px")})})};return{open:(me,Se,Ie)=>{const Pe=()=>{const it=In=>{Bs.remove(In,at),qe()},It=(In,Ft)=>{So(In.element).length===0?Mt(In,Ft):en(In,Ft)},Mt=(In,Ft)=>{Ni.hide(In),v.clear(),Ft&&o.focus()},en=(In,Ft)=>{Ft&&fs.focusIn(In)};v.on(In=>{Se();const Ft=Ie();it(In),It(In,Ft)})},Me=()=>!G2(o)||!C.header.isPositionedAtTop(),at=Fc(wx.sketch({text:me.text,level:ft(["success","error","warning","warn","info"],me.type)?me.type:void 0,progress:me.progressBar===!0,icon:me.icon,onAction:Pe,iconProvider:C.providers.icons,backstageProvider:C.providers}));if(v.isSet()){const it=md(at);v.on(It=>{Bs.append(It,it),Ni.reposition(It),at.hasConfigured(bi)&&bi.refresh(It),F(It.components())})}else{const it=Fc(Ni.sketch({dom:{tag:"div",classes:["tox-notifications-container"],attributes:{"aria-label":"Notifications",role:"region"}},lazySink:C.getSink,fireDismissalEventInstead:{},...C.header.isPositionedAtTop()?{}:{fireRepositionEventInstead:{}},inlineBehaviours:cn([fs.config({mode:"cyclic",selector:".tox-notification, .tox-notification a, .tox-notification button"}),Bs.config({}),...Me()?[bi.config({contextual:{lazyContext:()=>V.some(tl(x())),fadeInClass:"tox-notification-container-dock-fadein",fadeOutClass:"tox-notification-container-dock-fadeout",transitionClass:"tox-notification-container-dock-transition"},modes:["top"],lazyViewport:In=>K2(o,In.element).map(Mn=>({bounds:Y2(Mn),optScrollEnv:V.some({currentScrollTop:Mn.element.dom.scrollTop,scrollElmTop:hc(Mn.element).top})})).getOrThunk(()=>({bounds:ul(),optScrollEnv:V.none()}))})]:[]])})),It=md(at),Mt={maxHeightFunction:z0()},en={...C.anchors.banner(),overrides:Mt};v.set(it),m.add(it),Ni.showWithinBounds(it,It,{anchor:en},I)}Z(me.timeout)&&me.timeout>0&&ex.setEditorTimeout(o,()=>{Pe()},me.timeout);const qe=()=>{v.on(it=>{Ni.reposition(it),it.hasConfigured(bi)&&bi.refresh(it),F(it.components())})};return{close:Pe,reposition:qe,text:it=>{wx.updateText(at,it)},settings:me,getEl:()=>at.element.dom,progressBar:{value:it=>{wx.updateProgress(at,it)}}}},close:me=>{me.close()},getArgs:me=>me.settings}};const AW={setup:(o,u)=>{const m=(C,x)=>{ps(C,gc(),{raw:x})},v=()=>o.getMenu().bind(Re.getHighlighted);u.on("keydown",C=>{const x=C.which;o.isActive()&&(o.isMenuOpen()?x===13?(v().each(_u),C.preventDefault()):x===40?(v().fold(()=>{o.getMenu().each(Re.highlightFirst)},I=>{m(I,C)}),C.preventDefault(),C.stopImmediatePropagation()):(x===37||x===38||x===39)&&v().each(I=>{m(I,C),C.preventDefault(),C.stopImmediatePropagation()}):(x===13||x===38||x===40)&&o.cancelIfNecessary())}),u.on("NodeChange",()=>{o.isActive()&&!o.isProcessingAction()&&!u.queryCommandState("mceAutoCompleterInRange")&&o.cancelIfNecessary()})}};var V8;(function(o){o[o.CLOSE_ON_EXECUTE=0]="CLOSE_ON_EXECUTE",o[o.BUBBLE_TO_SANDBOX=1]="BUBBLE_TO_SANDBOX"})(V8||(V8={}));var um=V8;const Ex="tox-menu-nav__js",H8="tox-collection__item",kx="tox-swatch",Ioe={normal:Ex,color:kx},xx="tox-collection__item--enabled",Aoe="tox-collection__group-heading",pP="tox-collection__item-icon",Tx="tox-collection__item-label",i3="tox-collection__item-accessory",OW="tox-collection__item-caret",mP="tox-collection__item-checkmark",Dg="tox-collection__item--active",RW="tox-collection__item-container",DW="tox-collection__item-container--column",hP="tox-collection__item-container--row",LW="tox-collection__item-container--align-right",gP="tox-collection__item-container--align-left",PW="tox-collection__item-container--valign-top",Ooe="tox-collection__item-container--valign-middle",MW="tox-collection__item-container--valign-bottom",vP=o=>bn(Ioe,o).getOr(Ex),NW=o=>o==="color"?"tox-swatches":"tox-menu",Ix=o=>({backgroundMenu:"tox-background-menu",selectedMenu:"tox-selected-menu",selectedItem:"tox-collection__item--active",hasIcons:"tox-menu--has-icons",menu:NW(o),tieredMenu:"tox-tiered-menu"}),a3=o=>{const u=Ix(o);return{backgroundMenu:u.backgroundMenu,selectedMenu:u.selectedMenu,menu:u.menu,selectedItem:u.selectedItem,item:vP(o)}},FW=(o,u,m)=>{const v=Ix(m);return{tag:"div",classes:Nt([[v.menu,"tox-menu-".concat(u,"-column")],o?[v.hasIcons]:[]])}},Roe=[o3.parts.items({})],Ax=(o,u,m)=>{const v=Ix(m);return{dom:{tag:"div",classes:Nt([[v.tieredMenu]])},markers:a3(m)}},$W=J([Li("type","text"),ur("data"),mt("inputAttributes",{}),mt("inputStyles",{}),mt("tag","input"),mt("inputClasses",[]),Ho("onSetValue"),Kr("fromInputValue",ce),Kr("toInputValue",ce),mt("styles",{}),mt("eventOrder",{}),Ll("inputBehaviours",[Dn,As]),mt("selectOnFocus",!0)]),BW=o=>cn([As.config({onFocus:o.selectOnFocus?u=>{const m=u.element,v=$t(m);o.type!=="range"&&m.dom.setSelectionRange(0,v.length)}:z})]),VW=o=>({...BW(o),...Ca(o.inputBehaviours,[Dn.config({store:{mode:"manual",...o.data.map(u=>({initialValue:u})).getOr({}),getValue:u=>o.fromInputValue($t(u.element)),setValue:(u,m)=>{$t(u.element)!==m&&rh(u.element,o.toInputValue(m))}},onSetValue:o.onSetValue})])}),T_=o=>({tag:o.tag,attributes:{type:o.type,...o.inputAttributes},styles:o.inputStyles,classes:o.inputClasses}),HW=(o,u)=>({uid:o.uid,dom:T_(o),components:[],behaviours:VW(o),eventOrder:o.eventOrder}),iv=Gu({name:"Input",configFields:$W(),factory:HW}),UW=Pn("refetch-trigger-event"),zW=Pn("redirect-menu-item-interaction"),WW="tox-menu__searcher",Ox=o=>sr(o.element,".".concat(WW)).bind(u=>o.getSystem().getByDom(u).toOptional()),U8=Ox,Doe=(o,u)=>{Dn.setValue(o,u.fetchPattern),o.element.dom.selectionStart=u.selectionStart,o.element.dom.selectionEnd=u.selectionEnd},bP=o=>{const u=Dn.getValue(o),m=o.element.dom.selectionStart,v=o.element.dom.selectionEnd;return{fetchPattern:u,selectionStart:m,selectionEnd:v}},Loe=(o,u)=>{Us(u.element,"id").each(m=>jt(o.element,"aria-activedescendant",m))},jW=o=>{const u=(C,x)=>(x.cut(),V.none()),m=(C,x)=>{const I={interactionEvent:x.event,eventType:x.event.raw.type};return ps(C,zW,I),V.some(!0)},v="searcher-events";return{dom:{tag:"div",classes:[H8]},components:[iv.sketch({inputClasses:[WW,"tox-textfield"],inputAttributes:{...o.placeholder.map(C=>({placeholder:o.i18n(C)})).getOr({}),type:"search","aria-autocomplete":"list"},inputBehaviours:cn([zs(v,[Wt(Xm(),C=>{vo(C,UW)}),Wt(gc(),(C,x)=>{x.event.raw.key==="Escape"&&x.stop()})]),fs.config({mode:"special",onLeft:u,onRight:u,onSpace:u,onEnter:m,onEscape:m,onUp:m,onDown:m})]),eventOrder:{keydown:[v,fs.name()]}})]}},z8="tox-collection--results__js",ZW=o=>{var u;return o.dom?{...o,dom:{...o.dom,attributes:{...(u=o.dom.attributes)!==null&&u!==void 0?u:{},id:Pn("aria-item-search-result-id"),"aria-selected":"false"}}}:o},Rx=(o,u)=>m=>{const v=hn(m,u);return ct(v,C=>({dom:o,components:C}))},qW=o=>({dom:{tag:"div",classes:["tox-menu","tox-swatches-menu"]},components:[{dom:{tag:"div",classes:["tox-swatches"]},components:[o3.parts.items({preprocess:o!=="auto"?Rx({tag:"div",classes:["tox-swatches__row"]},o):ce})]}]}),GW=o=>({dom:{tag:"div",classes:["tox-menu","tox-collection","tox-collection--toolbar","tox-collection--toolbar-lg"]},components:[o3.parts.items({preprocess:Rx({tag:"div",classes:["tox-collection__group"]},o)})]}),yP=(o,u)=>{const m=[];let v=[];return Ht(o,(C,x)=>{u(C,x)?(v.length>0&&m.push(v),v=[],(qs(C.dom,"innerHtml")||C.components&&C.components.length>0)&&v.push(C)):v.push(C)}),v.length>0&&m.push(v),ct(m,C=>({dom:{tag:"div",classes:["tox-collection__group"]},components:C}))},_P=(o,u,m)=>o3.parts.items({preprocess:v=>{const C=ct(v,m);return o!=="auto"&&o>1?Rx({tag:"div",classes:["tox-collection__group"]},o)(C):yP(C,(x,I)=>u[I].type==="separator")}}),KW=(o,u,m=!0)=>({dom:{tag:"div",classes:["tox-menu","tox-collection"].concat(o===1?["tox-collection--list"]:["tox-collection--grid"])},components:[_P(o,u,ce)]}),Poe=(o,u,m=!0)=>{const v=Pn("aria-controls-search-results");return{dom:{tag:"div",classes:["tox-menu","tox-collection",z8].concat(o===1?["tox-collection--list"]:["tox-collection--grid"]),attributes:{id:v}},components:[_P(o,u,ZW)]}},Moe=(o,u,m)=>{const v=Pn("aria-controls-search-results");return{dom:{tag:"div",classes:["tox-menu","tox-collection"].concat(o===1?["tox-collection--list"]:["tox-collection--grid"])},components:[jW({i18n:cm.translate,placeholder:m.placeholder}),{dom:{tag:"div",classes:[...o===1?["tox-collection--list"]:["tox-collection--grid"],z8],attributes:{id:v}},components:[_P(o,u,ZW)]}]}},YW=(o,u=!0)=>({dom:{tag:"div",classes:["tox-collection","tox-collection--horizontal"]},components:[o3.parts.items({preprocess:m=>yP(m,(v,C)=>o[C].type==="separator")})]}),W8=o=>ht(o,u=>"icon"in u&&u.icon!==void 0),av=o=>(console.error(Qp(o)),console.log(o),V.none()),Noe=(o,u,m,v,C)=>{const x=YW(m);return{value:o,dom:x.dom,components:x.components,items:m}},SP=(o,u,m,v,C)=>{const x=()=>C.menuType!=="searchable"?KW(v,m):C.searchMode.searchMode==="search-with-field"?Moe(v,m,C.searchMode):Poe(v,m);if(C.menuType==="color"){const I=qW(v);return{value:o,dom:I.dom,components:I.components,items:m}}else if(C.menuType==="normal"&&v==="auto"){const I=KW(v,m);return{value:o,dom:I.dom,components:I.components,items:m}}else if(C.menuType==="normal"||C.menuType==="searchable"){const I=x();return{value:o,dom:I.dom,components:I.components,items:m}}else if(C.menuType==="listpreview"&&v!=="auto"){const I=GW(v);return{value:o,dom:I.dom,components:I.components,items:m}}else return{value:o,dom:FW(u,v,C.menuType),components:Roe,items:m}},Ga=Da("type"),CP=Da("name"),wP=Da("label"),lv=Da("text"),XW=Da("title"),Dx=Da("icon"),I_=Da("value"),Foe=Kl("fetch"),$oe=Kl("getSubmenuItems"),l3=Kl("onAction"),Boe=Kl("onItemAction"),c3=Kr("onSetup",()=>z),JW=aa("name"),cv=aa("text"),QW=aa("role"),dm=aa("icon"),j8=aa("tooltip"),EP=aa("label"),Lx=aa("shortcut"),kP=Xh("select"),Px=la("active",!1),Voe=la("borderless",!1),bh=la("enabled",!0),Mx=la("primary",!1),ej=o=>mt("columns",o),xP=mt("meta",{}),Nx=Kr("onAction",z),u3=o=>Li("type",o),TP=o=>fl("name","name",xo(()=>Pn("".concat(o,"-name"))),Ln),Hoe=o=>fl("value","value",xo(()=>Pn("".concat(o,"-value"))),Qf()),tj=Ns([Ga,cv]),vf=o=>Ki("separatormenuitem",tj,o),yh=Ns([u3("autocompleteitem"),Px,bh,xP,I_,cv,dm]),nj=o=>Ki("Autocompleter.Separator",tj,o),IP=o=>Ki("Autocompleter.Item",yh,o),d3=[bh,j8,dm,cv,c3,Li("context","mode:design")],Fx=Ns([Ga,l3,Lx].concat(d3)),sj=o=>Ki("toolbarbutton",Fx,o),$x=[Px].concat(d3),Z8=Ns($x.concat([Ga,l3,Lx])),oj=o=>Ki("ToggleButton",Z8,o),f3=[Kr("predicate",$e),np("scope","node",["node","editor"]),np("position","selection",["node","selection","line"])],AP=d3.concat([u3("contextformbutton"),Li("align","end"),Mx,l3,nr("original",ce)]),rj=$x.concat([u3("contextformbutton"),Li("align","end"),Mx,l3,nr("original",ce)]),q8=d3.concat([u3("contextformbutton")]),Uoe=$x.concat([u3("contextformtogglebutton")]),zoe=dl("type",{contextformbutton:AP,contextformtogglebutton:rj}),fm=[EP,Bu("commands",zoe),Ym("launch",dl("type",{contextformbutton:q8,contextformtogglebutton:Uoe})),Kr("onInput",z),Kr("onSetup",z)],bf=[...f3,...fm,tp("type",["contextform"]),Kr("initValue",J("")),aa("placeholder")],G8=[...f3,...fm,tp("type",["contextsliderform"]),Kr("initValue",J(0)),Kr("min",J(0)),Kr("max",J(100))],yf=[...f3,...fm,tp("type",["contextsizeinputform"]),Kr("initValue",J({width:"",height:""}))],Woe=dl("type",{contextform:bf,contextsliderform:G8,contextsizeinputform:yf}),di=o=>Ki("ContextForm",Woe,o),joe=Ns([u3("contexttoolbar"),cr("items",Yv([Ln,G5([aa("name"),aa("label"),Bu("items",Ln)])]))].concat(f3)),p3=o=>({name:o.name.getOrUndefined(),label:o.label.getOrUndefined(),items:o.items}),K8=o=>({...o,items:d(o.items)?o.items:ct(o.items,p3)}),ij=o=>Ki("ContextToolbar",joe,o),OP=[Ga,Da("src"),aa("alt"),og("classes",[],Ln)],RP=Ns(OP),Zoe=[Ga,lv,JW,og("classes",["tox-collection__item-label"],Ln)],DP=Ns(Zoe),aj=Za(()=>sg("type",{cardimage:RP,cardtext:DP,cardcontainer:lj})),lj=Ns([Ga,Li("direction","horizontal"),Li("align","left"),Li("valign","middle"),Bu("items",aj)]),m3=[bh,cv,QW,Lx,Hoe("menuitem"),xP,Li("context","mode:design")],LP=Ns([Ga,EP,Bu("items",aj),c3,Nx].concat(m3)),cj=o=>Ki("cardmenuitem",LP,o),Bx=Ns([Ga,Px,dm].concat(m3)),qoe=o=>Ki("choicemenuitem",Bx,o),uj=[Ga,Da("fancytype"),Nx],Goe=[mt("initData",{})].concat(uj),Koe=[Xh("select"),Jh("initData",{},[la("allowCustomColors",!0),Li("storageKey","default"),x9("colors",Qf())])].concat(uj),Yoe=dl("fancytype",{inserttable:Goe,colorswatch:Koe}),dj=o=>Ki("fancymenuitem",Yoe,o),Xoe=Ns([Ga,c3,Nx,dm].concat(m3)),Joe=o=>Ki("menuitem",Xoe,o),fj=Ns([Ga,$oe,c3,dm].concat(m3)),Qoe=o=>Ki("nestedmenuitem",fj,o),pj=Ns([Ga,dm,Px,c3,l3].concat(m3)),Y8=o=>Ki("togglemenuitem",pj,o),PP=(o,u,m)=>{const v=xu(o.element,"."+m);if(v.length>0){const C=Ot(v,x=>{const I=x.dom.getBoundingClientRect().top,F=v[0].dom.getBoundingClientRect().top;return Math.abs(I-F)>u}).getOr(v.length);return V.some({numColumns:C,numRows:Math.ceil(v.length/C)})}else return V.none()},mj=(o,u)=>cn([zs(o,u)]),A_={namedEvents:mj,unnamedEvents:o=>mj(Pn("unnamed-events"),o)},MP=o=>o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),pm={item:o=>Xn.config({disabled:o,disableClass:"tox-collection__item--state-disabled"}),button:o=>Xn.config({disabled:o}),splitButton:o=>Xn.config({disabled:o,disableClass:"tox-tbtn--disabled"}),toolbarButton:o=>Xn.config({disabled:o,disableClass:"tox-tbtn--disabled",useNative:!1})},Vx=(o,u)=>{const m=o.getApi(u);return v=>{v(m)}},S1=(o,u)=>$r(m=>{W(o.onBeforeSetup)&&o.onBeforeSetup(m),Vx(o,m)(C=>{const x=o.onSetup(C);W(x)&&u.set(x)})}),_h=(o,u)=>nh(m=>Vx(o,m)(u.get())),mm="silver.uistate",X8="setDisabled",NP="setEnabled",FP="init",sre=["switchmode",FP],O_=(o,u)=>{const m=o.mainUi.outerContainer,v=[o.mainUi.mothership,...o.uiMotherships];u===X8&&Ht(v,C=>{C.broadcastOn([Tg()],{target:m.element})}),Ht(v,C=>{C.broadcastOn([mm],u)})},$P=(o,u)=>{o.on("init SwitchMode",m=>{O_(u,m.type)}),o.on("DisabledStateChange",m=>{if(!m.isDefaultPrevented()){const v=m.state?X8:FP;O_(u,v),m.state||o.nodeChanged()}}),o.on("NodeChange",m=>{const v=o.ui.isEnabled()?m.type:X8;O_(u,v)}),RL(o)&&o.mode.set("readonly")},wa=o=>ju.config({channels:{[mm]:{onReceive:(u,m)=>{if(m===X8||m===NP){Xn.set(u,m===X8);return}const{contextType:v,shouldDisable:C}=o();v==="mode"&&!ft(sre,m)||Xn.set(u,C)}}}}),ore=(o,u)=>r1((m,v)=>{Vx(o,m)(o.onAction),!o.triggersSubmenu&&u===um.CLOSE_ON_EXECUTE&&(m.getSystem().isConnected()&&vo(m,eh()),v.stop())}),rre={[Mc()]:["disabling","alloy.base.behaviour","toggling","item-events"]},R_=_n,D_=(o,u,m,v)=>{const C=ds(z);return{type:"item",dom:u.dom,components:R_(u.optComponents),data:o.data,eventOrder:rre,hasSubmenu:o.triggersSubmenu,itemBehaviours:cn([zs("item-events",[ore(o,m),S1(o,C),_h(o,C)]),pm.item(()=>!o.enabled||v.checkUiComponentContext(o.context).shouldDisable),wa(()=>v.checkUiComponentContext(o.context)),Bs.config({})].concat(o.itemBehaviours))}},L_=o=>({value:o.value,meta:{text:o.text.getOr(""),...o.meta}}),BP=o=>{const u=Z2.os.isMacOS()||Z2.os.isiOS(),C=u?{alt:"⌥",ctrl:"⌃",shift:"⇧",meta:"⌘",access:"⌃⌥"}:{meta:"Ctrl",access:"Shift+Alt"},x=o.split("+"),I=ct(x,F=>{const U=F.toLowerCase().trim();return qs(C,U)?C[U]:F});return u?I.join(""):I.join("+")},VP=(o,u,m=[pP])=>_p(o,{tag:"div",classes:m},u),HP=o=>({dom:{tag:"div",classes:[Tx]},components:[Ci(cm.translate(o))]}),UP=(o,u)=>({dom:{tag:"div",classes:u,innerHtml:o}}),hj=(o,u)=>({dom:{tag:"div",classes:[Tx]},components:[{dom:{tag:o.tag,styles:o.styles},components:[Ci(cm.translate(u))]}]}),ire=o=>({dom:{tag:"div",classes:[i3]},components:[Ci(BP(o))]}),gj=o=>VP("checkmark",o,[mP]),are=o=>VP("chevron-right",o,[OW]),P_=o=>VP("chevron-down",o,[OW]),lre=(o,u)=>{const m=o.direction==="vertical"?DW:hP,v=o.align==="left"?gP:LW;return{dom:{tag:"div",classes:[RW,m,v,(()=>{switch(o.valign){case"top":return PW;case"middle":return Ooe;case"bottom":return MW}})()]},components:u}},vj=(o,u,m)=>({dom:{tag:"img",classes:u,attributes:{src:o,alt:m.getOr("")}}}),bj=(o,u,m)=>{const v="custom",C="remove",x=o.value,I=o.iconContent.map(X=>Eoe(X,u.icons,m)),F=o.ariaLabel.map(X=>({"aria-label":u.translate(X),"data-mce-name":X})).getOr({});return{dom:(()=>{const X=kx,oe=I.getOr(""),me={tag:"div",attributes:F,classes:[X]};return x===v?{...me,tag:"button",classes:[...me.classes,"tox-swatches__picker-btn"],innerHtml:oe}:x===C?{...me,classes:[...me.classes,"tox-swatch--remove"],innerHtml:oe}:B(x)?{...me,attributes:{...me.attributes,"data-mce-color":x},styles:{"background-color":x},innerHtml:oe}:me})(),optComponents:[]}},zP=o=>{const u=o.map(m=>({attributes:{id:Pn("menu-item"),"aria-label":cm.translate(m)}})).getOr({});return{tag:"div",classes:[Ex,H8],...u}},yj=(o,u,m,v)=>{const C={tag:"div",classes:[pP]},x=Se=>_p(Se,C,u.icons,v),I=()=>V.some({dom:C}),F=m?o.iconContent.map(x).orThunk(I):V.none(),U=o.checkMark,X=V.from(o.meta).fold(()=>HP,Se=>qs(Se,"style")?de(hj,Se.style):HP),oe=o.htmlContent.fold(()=>o.textContent.map(X),Se=>V.some(UP(Se,[Tx])));return{dom:zP(o.ariaLabel),optComponents:[F,oe,o.shortcutContent.map(ire),U,o.caret]}},h3=(o,u,m,v=V.none())=>o.presets==="color"?bj(o,u,v):yj(o,u,m,v),Hx=(o,u,m)=>bn(o,"tooltipWorker").map(v=>[Yi.config({lazySink:u.getSink,tooltipDom:{tag:"div",classes:["tox-tooltip-worker-container"]},tooltipComponents:[],anchor:C=>({type:"submenu",item:C,overrides:{maxHeightFunction:z0}}),mode:"follow-highlight",onShow:(C,x)=>{v(I=>{Yi.setComponents(C,[v2({element:Xt.fromDom(I)})])})}})]).getOrThunk(()=>m.map(v=>[Yi.config({...u.providers.tooltips.getConfig({tooltipText:v}),mode:"follow-highlight"})]).getOr([])),WP=o=>E8.DOM.encode(o),jP=(o,u)=>{const m=cm.translate(o),v=WP(m);if(u.length>0){const C=new RegExp(MP(u),"gi");return v.replace(C,x=>'<span class="tox-autocompleter-highlight">'.concat(x,"</span>"))}else return v},cre=(o,u,m,v,C,x,I,F=!0)=>{const U=h3({presets:v,textContent:V.none(),htmlContent:m?o.text.map(oe=>jP(oe,u)):V.none(),ariaLabel:o.text,iconContent:o.icon,shortcutContent:V.none(),checkMark:V.none(),caret:V.none(),value:o.value},I.providers,F,o.icon),X=o.text.filter(oe=>!m&&oe!=="");return D_({context:"mode:design",data:L_(o),enabled:o.enabled,getApi:J({}),onAction:oe=>C(o.value,o.meta),onSetup:J(z),triggersSubmenu:!1,itemBehaviours:Hx(o,I,X)},U,x,I.providers)},ZP=(o,u)=>ct(o,m=>{switch(m.type){case"cardcontainer":return lre(m,ZP(m.items,u));case"cardimage":return vj(m.src,m.classes,m.alt);case"cardtext":const C=m.name.exists(x=>ft(u.cardText.highlightOn,x))?V.from(u.cardText.matchText).getOr(""):"";return UP(jP(m.text,C),m.classes)}}),ure=(o,u,m,v)=>{const C=I=>({isEnabled:()=>!Xn.isDisabled(I),setEnabled:F=>{Xn.set(I,!F),Ht(xu(I.element,"*"),U=>{I.getSystem().getByDom(U).each(X=>{X.hasConfigured(Xn)&&Xn.set(X,!F)})})}}),x={dom:zP(o.label),optComponents:[V.some({dom:{tag:"div",classes:[RW,hP]},components:ZP(o.items,v)})]};return D_({context:"mode:design",data:L_({text:V.none(),...o}),enabled:o.enabled,getApi:C,onAction:o.onAction,onSetup:o.onSetup,triggersSubmenu:!1,itemBehaviours:V.from(v.itemBehaviours).getOr([])},x,u,m.providers)},dre=(o,u,m,v,C,x,I,F=!0)=>{const U=me=>({setActive:Se=>{po.set(me,Se)},isActive:()=>po.isOn(me),isEnabled:()=>!Xn.isDisabled(me),setEnabled:Se=>Xn.set(me,!Se)}),X=h3({presets:m,textContent:u?o.text:V.none(),htmlContent:V.none(),ariaLabel:o.text,iconContent:o.icon,shortcutContent:u?o.shortcut:V.none(),checkMark:u?V.some(gj(I.icons)):V.none(),caret:V.none(),value:o.value},I,F),oe=o.text.filter(J(!u)).map(me=>Yi.config(I.tooltips.getConfig({tooltipText:I.translate(me)})));return Gi(D_({context:o.context,data:L_(o),enabled:o.enabled,getApi:U,onAction:me=>v(o.value),onSetup:me=>(me.setActive(C),z),triggersSubmenu:!1,itemBehaviours:[...oe.toArray()]},X,x,I),{toggling:{toggleClass:xx,toggleOnExecute:!1,selected:o.active,exclusive:!0}})},_j=e8(TL(),IL()),qP=o=>({value:Cj(o)}),GP=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,KP=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Sj=o=>GP.test(o)||KP.test(o),Cj=o=>uc(o,"#").toUpperCase(),fre=o=>Sj(o)?V.some({value:Cj(o)}):V.none(),pre=o=>({value:o.value.replace(GP,(m,v,C,x)=>v+v+C+C+x+x)}),mre=o=>{const u=pre(o),m=KP.exec(u.value);return m===null?["FFFFFF","FF","FF","FF"]:m},YP=o=>{const u=o.toString(16);return(u.length===1?"0"+u:u).toUpperCase()},J8=o=>{const u=YP(o.red)+YP(o.green)+YP(o.blue);return qP(u)},wj=Math.min,Ej=Math.max,Ux=Math.round,hre=/^\s*rgb\s*\(\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*(\d+)\s*\)\s*$/i,kj=/^\s*rgba\s*\(\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*((?:\d?\.\d+|\d+)%?)\s*\)\s*$/i,g3=(o,u,m,v)=>({red:o,green:u,blue:m,alpha:v}),XP=o=>{const u=parseInt(o,10);return u.toString()===o&&u>=0&&u<=255},xj=o=>{let u,m,v;const C=(o.hue||0)%360;let x=o.saturation/100,I=o.value/100;if(x=Ej(0,wj(x,1)),I=Ej(0,wj(I,1)),x===0)return u=m=v=Ux(255*I),g3(u,m,v,1);const F=C/60,U=I*x,X=U*(1-Math.abs(F%2-1)),oe=I-U;switch(Math.floor(F)){case 0:u=U,m=X,v=0;break;case 1:u=X,m=U,v=0;break;case 2:u=0,m=U,v=X;break;case 3:u=0,m=X,v=U;break;case 4:u=X,m=0,v=U;break;case 5:u=U,m=0,v=X;break;default:u=m=v=0}return u=Ux(255*(u+oe)),m=Ux(255*(m+oe)),v=Ux(255*(v+oe)),g3(u,m,v,1)},Q8=o=>{const u=mre(o),m=parseInt(u[1],16),v=parseInt(u[2],16),C=parseInt(u[3],16);return g3(m,v,C,1)},Tj=(o,u,m,v)=>{const C=parseInt(o,10),x=parseInt(u,10),I=parseInt(m,10),F=parseFloat(v);return g3(C,x,I,F)},M_=o=>{const u=hre.exec(o);if(u!==null)return V.some(Tj(u[1],u[2],u[3],"1"));const m=kj.exec(o);return m!==null?V.some(Tj(m[1],m[2],m[3],m[4])):V.none()},JP=o=>"rgba(".concat(o.red,",").concat(o.green,",").concat(o.blue,",").concat(o.alpha,")"),Ij=g3(255,0,0,1),gre=o=>{o.dispatch("SkinLoaded")},vre=(o,u)=>{o.dispatch("SkinLoadError",u)},bre=o=>{o.dispatch("ResizeEditor")},QP=(o,u)=>{o.dispatch("ResizeContent",u)},yre=(o,u)=>{o.dispatch("ScrollContent",u)},zx=(o,u)=>{o.dispatch("TextColorChange",u)},Aj=(o,u)=>{o.dispatch("AfterProgressState",{state:u})},Oj=(o,u)=>o.dispatch("ResolveName",{name:u.nodeName.toLowerCase(),target:u}),_re=(o,u)=>{o.dispatch("ToggleToolbarDrawer",{state:u})},Rj=(o,u)=>{o.dispatch("StylesTextUpdate",u)},Sre=(o,u)=>{o.dispatch("AlignTextUpdate",u)},Cre=(o,u)=>{o.dispatch("FontSizeTextUpdate",u)},wre=(o,u)=>{o.dispatch("FontSizeInputTextUpdate",u)},Ere=(o,u)=>{o.dispatch("BlocksTextUpdate",u)},kre=(o,u)=>{o.dispatch("FontFamilyTextUpdate",u)},xre=o=>{o.dispatch("ToggleSidebar")},Tre=o=>{o.dispatch("ToggleView")},Dj=o=>{o.dispatch("ContextToolbarClose")},Ire=o=>{o.dispatch("ContextFormSlideBack")},Wx=(o,u)=>()=>{o(),u()},Bc=o=>J2(o,"NodeChange",u=>{u.setEnabled(o.selection.isEditable())}),eM=(o,u)=>m=>{const v=$u(),C=()=>{m.setActive(o.formatter.match(u));const x=o.formatter.formatChanged(u,m.setActive);v.set(x)};return o.initialized?C():o.once("init",C),()=>{o.off("init",C),v.clear()}},N_=(o,u)=>m=>{const v=Bc(o)(m),C=eM(o,u)(m);return()=>{v(),C()}},J2=(o,u,m)=>v=>{const C=()=>m(v),x=()=>{m(v),o.on(u,C)};return o.initialized?x():o.once("init",x),()=>{o.off("init",x),o.off(u,C)}},Lj=o=>u=>()=>{o.undoManager.transact(()=>{o.focus(),o.execCommand("mceToggleFormat",!1,u.format)})},_f=(o,u)=>()=>o.execCommand(u);var uv=tinymce.util.Tools.resolve("tinymce.util.LocalStorage");const jx={},Zx=(o,u=10)=>{const m=uv.getItem(o),v=d(m)?JSON.parse(m):[],x=(X=>u-X.length<0?X.slice(0,u):X)(v),I=X=>{He(x,X).each(F),x.unshift(X),x.length>u&&x.pop(),uv.setItem(o,JSON.stringify(x))},F=X=>{x.splice(X,1)};return{add:I,state:()=>x.slice(0)}},tM=o=>bn(jx,o).getOrThunk(()=>{const u="tinymce-custom-colors-".concat(o),m=uv.getItem(u);if(P(m)){const C=uv.getItem("tinymce-custom-colors");uv.setItem(u,B(C)?C:"[]")}const v=Zx(u,10);return jx[o]=v,v}),Are=o=>ct(tM(o).state(),u=>({type:"choiceitem",text:u,icon:"checkmark",value:u})),Pj=(o,u)=>{tM(o).add(u)},e7=(o,u,m)=>({hue:o,saturation:u,value:m}),nM=o=>{let u=0,m=0,v=0;const C=o.red/255,x=o.green/255,I=o.blue/255,F=Math.min(C,Math.min(x,I)),U=Math.max(C,Math.max(x,I));if(F===U)return v=F,e7(0,0,v*100);const X=C===F?x-I:I===F?C-x:I-C;return u=C===F?3:I===F?1:5,u=60*(u-X/(U-F)),m=(U-F)/U,v=U,e7(Math.round(u),Math.round(m*100),Math.round(v*100))},Ore=o=>nM(Q8(o)),Mj=o=>J8(xj(o)),Rre=o=>fre(o).orThunk(()=>M_(o).map(J8)).getOrThunk(()=>{const u=document.createElement("canvas");u.height=1,u.width=1;const m=u.getContext("2d");m.clearRect(0,0,u.width,u.height),m.fillStyle="#FFFFFF",m.fillStyle=o,m.fillRect(0,0,1,1);const v=m.getImageData(0,0,1,1).data,C=v[0],x=v[1],I=v[2],F=v[3];return J8(g3(C,x,I,F))}),sM="forecolor",oM="hilitecolor",Dre=5,Lre=o=>Nj(o.map((u,m)=>m%2===0?"#"+Rre(u).value:u)),Nj=o=>{const u=[];for(let m=0;m<o.length;m+=2)u.push({text:o[m+1],value:o[m],icon:"checkmark",type:"choiceitem"});return u},C1=o=>u=>u.options.get(o),qx="#000000",Pre=o=>{const u=o.options.register,m=x=>Y(x,d)?{value:Lre(x),valid:!0}:{valid:!1,message:"Must be an array of strings."},v=x=>Y(x,d)?{value:Nj(x),valid:!0}:{valid:!1,message:"Must be an array of strings."},C=x=>Z(x)&&x>0?{value:x,valid:!0}:{valid:!1,message:"Must be a positive number."};u("color_map",{processor:m,default:["#BFEDD2","Light Green","#FBEEB8","Light Yellow","#F8CAC6","Light Red","#ECCAFA","Light Purple","#C2E0F4","Light Blue","#2DC26B","Green","#F1C40F","Yellow","#E03E2D","Red","#B96AD9","Purple","#3598DB","Blue","#169179","Dark Turquoise","#E67E23","Orange","#BA372A","Dark Red","#843FA1","Dark Purple","#236FA1","Dark Blue","#ECF0F1","Light Gray","#CED4D9","Medium Gray","#95A5A6","Gray","#7E8C8D","Dark Gray","#34495E","Navy Blue","#000000","Black","#ffffff","White"]}),u("color_map_raw",{processor:v}),u("color_map_background",{processor:m}),u("color_map_foreground",{processor:m}),u("color_cols",{processor:C,default:Sh(o)}),u("color_cols_foreground",{processor:C,default:Fj(o,sM)}),u("color_cols_background",{processor:C,default:Fj(o,oM)}),u("custom_colors",{processor:"boolean",default:!0}),u("color_default_foreground",{processor:"string",default:qx}),u("color_default_background",{processor:"string",default:qx})},Gx=(o,u)=>u===sM&&o.options.isSet("color_map_foreground")?C1("color_map_foreground")(o):u===oM&&o.options.isSet("color_map_background")?C1("color_map_background")(o):o.options.isSet("color_map_raw")?C1("color_map_raw")(o):C1("color_map")(o),Sh=(o,u="default")=>Math.max(Dre,Math.ceil(Math.sqrt(Gx(o,u).length))),Fj=(o,u)=>{const m=C1("color_cols")(o),v=Sh(o,u);return m===Sh(o)?v:m},$j=(o,u="default")=>Math.round(u===sM?C1("color_cols_foreground")(o):u===oM?C1("color_cols_background")(o):C1("color_cols")(o)),Kx=C1("custom_colors"),ec=C1("color_default_foreground"),Mre=C1("color_default_background"),Nre="rgba(0, 0, 0, 0)",Fre=o=>M_(o).exists(u=>u.alpha!==0),$re=o=>Jv(o,u=>{if(hi(u)){const m=Gt(u,"background-color");return Kt(Fre(m),m)}else return V.none()}).getOr(Nre),Bj=(o,u)=>{const m=Xt.fromDom(o.selection.getStart()),v=u==="hilitecolor"?$re(m):Gt(m,"color");return M_(v).map(C=>"#"+J8(C).value)},Bre=(o,u,m)=>{o.undoManager.transact(()=>{o.focus(),o.formatter.apply(u,{value:m}),o.nodeChanged()})},Vre=(o,u)=>{o.undoManager.transact(()=>{o.focus(),o.formatter.remove(u,{value:null},void 0,!0),o.nodeChanged()})},Hre=o=>{o.addCommand("mceApplyTextcolor",(u,m)=>{Bre(o,u,m)}),o.addCommand("mceRemoveTextcolor",u=>{Vre(o,u)})},Vj=o=>{const u="choiceitem",m={type:u,text:"Remove color",icon:"color-swatch-remove-color",value:"remove"};return o?[m,{type:u,text:"Custom color",icon:"color-picker",value:"custom"}]:[m]},rM=(o,u,m,v)=>{m==="custom"?Zj(o)(x=>{x.each(I=>{Pj(u,I),o.execCommand("mceApplyTextcolor",u,I),v(I)})},Bj(o,u).getOr(qx)):m==="remove"?(v(""),o.execCommand("mceRemoveTextcolor",u)):(v(m),o.execCommand("mceApplyTextcolor",u,m))},iM=(o,u,m)=>o.concat(Are(u).concat(Vj(m))),Hj=(o,u,m)=>v=>{v(iM(o,u,m))},aM=(o,u,m)=>{const v=u==="forecolor"?"tox-icon-text-color__color":"tox-icon-highlight-bg-color__color";o.setIconFill(v,m)},Uj=(o,u)=>{o.setTooltip(u)},zj=(o,u)=>m=>{const v=Bj(o,u);return lt(v,m.toUpperCase())},lM=(o,u,m)=>{if(yr(m))return u==="forecolor"?"Text color":"Background color";const v=u==="forecolor"?"Text color {0}":"Background color {0}",C=iM(Gx(o,u),u,!1),x=Qe(C,I=>I.value===m).getOr({text:""}).text;return o.translate([v,o.translate(x)])},Wj=(o,u,m,v)=>{o.ui.registry.addSplitButton(u,{tooltip:lM(o,m,v.get()),presets:"color",icon:u==="forecolor"?"text-color":"highlight-bg-color",select:zj(o,m),columns:$j(o,m),fetch:Hj(Gx(o,m),m,Kx(o)),onAction:C=>{rM(o,m,v.get(),z)},onItemAction:(C,x)=>{rM(o,m,x,I=>{v.set(I),zx(o,{name:u,color:I})})},onSetup:C=>{aM(C,u,v.get());const x=I=>{I.name===u&&(aM(C,I.name,I.color),Uj(C,lM(o,m,I.color)))};return o.on("TextColorChange",x),Wx(Bc(o)(C),()=>{o.off("TextColorChange",x)})}})},jj=(o,u,m,v,C)=>{o.ui.registry.addNestedMenuItem(u,{text:v,icon:u==="forecolor"?"text-color":"highlight-bg-color",onSetup:x=>(Uj(x,lM(o,m,C.get())),aM(x,u,C.get()),Bc(o)(x)),getSubmenuItems:()=>[{type:"fancymenuitem",fancytype:"colorswatch",select:zj(o,m),initData:{storageKey:m},onAction:x=>{rM(o,m,x.value,I=>{C.set(I),zx(o,{name:u,color:I})})}}]})},Zj=o=>(u,m)=>{let v=!1;const C=F=>{const X=F.getData().colorpicker;v?(u(V.from(X)),F.close()):o.windowManager.alert(o.translate(["Invalid hex color code: {0}",X]))},x=(F,U)=>{U.name==="hex-valid"&&(v=U.value)},I={colorpicker:m};o.windowManager.open({title:"Color Picker",size:"normal",body:{type:"panel",items:[{type:"colorpicker",name:"colorpicker",label:"Color"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:I,onAction:x,onSubmit:C,onClose:z,onCancel:()=>{u(V.none())}})},Ure=o=>{Hre(o);const u=ec(o),m=Mre(o),v=ds(u),C=ds(m);Wj(o,"forecolor","forecolor",v),Wj(o,"backcolor","hilitecolor",C),jj(o,"forecolor","forecolor","Text color",v),jj(o,"backcolor","hilitecolor","Background color",C)},cM=(o,u,m,v,C,x,I,F)=>{const U=W8(u),oe=zre(u,m,v,C!=="color"?"normal":"color",x,I,F);return SP(o,U,oe,v,{menuType:C})},zre=(o,u,m,v,C,x,I)=>_n(ct(o,F=>F.type==="choiceitem"?qoe(F).fold(av,U=>V.some(dre(U,m===1,v,u,x(U.value),C,I,W8(o)))):V.none())),Yx=(o,u)=>{const m=a3(u);return o===1?{mode:"menu",moveOnTab:!0}:o==="auto"?{mode:"grid",selector:"."+m.item,initSize:{numColumns:1,numRows:1}}:{mode:"matrix",rowSelector:"."+(u==="color"?"tox-swatches__row":"tox-collection__group"),previousSelector:C=>u==="color"?sr(C.element,"[aria-checked=true]"):V.none()}},Wre=(o,u)=>o===1?{mode:"menu",moveOnTab:!1,selector:".tox-collection__item"}:o==="auto"?{mode:"flatgrid",selector:".tox-collection__item",initSize:{numColumns:1,numRows:1}}:{mode:"matrix",selectors:{row:u==="color"?".tox-swatches__row":".tox-collection__group",cell:u==="color"?".".concat(kx):".".concat(H8)}},jre=(o,u)=>{const m=qj(o,u),v=u.colorinput.getColorCols(o.initData.storageKey),C="color",I={...cM(Pn("menu-value"),m,F=>{o.onAction({value:F})},v,C,um.CLOSE_ON_EXECUTE,o.select.getOr($e),u.shared.providers),markers:a3(C),movement:Yx(v,C),showMenuRole:!1};return{type:"widget",data:{value:Pn("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[_j.widget(o3.sketch(I))]}},qj=(o,u)=>{const m=o.initData.allowCustomColors&&u.colorinput.hasCustomColors();return o.initData.colors.fold(()=>iM(u.colorinput.getColors(o.initData.storageKey),o.initData.storageKey,m),v=>v.concat(Vj(m)))},Gj=Pn("cell-over"),uM=Pn("cell-execute"),Zre=o=>(u,m)=>o.shared.providers.translate(["{0} columns, {1} rows",m,u]),qre=(o,u,m)=>{const v=I=>ps(I,Gj,{row:o,col:u}),C=I=>ps(I,uM,{row:o,col:u}),x=(I,F)=>{F.stop(),C(I)};return Fc({dom:{tag:"div",attributes:{role:"button","aria-label":m}},behaviours:cn([zs("insert-table-picker-cell",[Wt(rp(),As.focus),Wt(Mc(),C),Wt(Jm(),x),Wt(ry(),x)]),po.config({toggleClass:"tox-insert-table-picker__selected",toggleOnExecute:!1}),As.config({onFocus:v})])})},Gre=(o,u,m)=>{const v=[];for(let C=0;C<u;C++){const x=[];for(let I=0;I<m;I++){const F=o(C+1,I+1);x.push(qre(C,I,F))}v.push(x)}return v},Kj=(o,u,m,v,C)=>{for(let x=0;x<v;x++)for(let I=0;I<C;I++)po.set(o[x][I],x<=u&&I<=m)},Kre=o=>Ve(o,u=>ct(u,md)),Yj=(o,u)=>Ci("".concat(u,"x").concat(o)),Yre={inserttable:(o,u)=>{const C=Zre(u),x=Gre(C,10,10),I=Yj(0,0),F=or({dom:{tag:"span",classes:["tox-insert-table-picker__label"]},components:[I],behaviours:cn([Bs.config({})])});return{type:"widget",data:{value:Pn("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[_j.widget({dom:{tag:"div",classes:["tox-insert-table-picker"]},components:Kre(x).concat(F.asSpec()),behaviours:cn([zs("insert-table-picker",[$r(U=>{Bs.set(F.get(U),[I])}),cy(Gj,(U,X,oe)=>{const{row:me,col:Se}=oe.event;Kj(x,me,Se,10,10),Bs.set(F.get(U),[Yj(me+1,Se+1)])}),cy(uM,(U,X,oe)=>{const{row:me,col:Se}=oe.event;vo(U,eh()),o.onAction({numRows:me+1,numColumns:Se+1})})]),fs.config({initSize:{numRows:10,numColumns:10},mode:"flatgrid",selector:'[role="button"]'})])})]}},colorswatch:jre},Xj=(o,u)=>bn(Yre,o.fancytype).map(m=>m(o,u)),Xre=(o,u,m,v=!0,C=!1)=>{const x=C?P_(m.icons):are(m.icons),I=U=>({isEnabled:()=>!Xn.isDisabled(U),setEnabled:X=>Xn.set(U,!X),setIconFill:(X,oe)=>{sr(U.element,'svg path[class="'.concat(X,'"], rect[class="').concat(X,'"]')).each(me=>{jt(me,"fill",oe)})},setTooltip:X=>{const oe=m.translate(X);jt(U.element,"aria-label",oe)}}),F=h3({presets:"normal",iconContent:o.icon,textContent:o.text,htmlContent:V.none(),ariaLabel:o.text,caret:V.some(x),checkMark:V.none(),shortcutContent:o.shortcut},m,v);return D_({context:o.context,data:L_(o),getApi:I,enabled:o.enabled,onAction:z,onSetup:o.onSetup,triggersSubmenu:!0,itemBehaviours:[]},F,u,m)},Jj=(o,u,m,v=!0)=>{const C=I=>({isEnabled:()=>!Xn.isDisabled(I),setEnabled:F=>Xn.set(I,!F)}),x=h3({presets:"normal",iconContent:o.icon,textContent:o.text,htmlContent:V.none(),ariaLabel:o.text,caret:V.none(),checkMark:V.none(),shortcutContent:o.shortcut},m,v);return D_({context:o.context,data:L_(o),getApi:C,enabled:o.enabled,onAction:o.onAction,onSetup:o.onSetup,triggersSubmenu:!1,itemBehaviours:[]},x,u,m)},Jre=o=>({type:"separator",dom:{tag:"div",classes:[H8,Aoe]},components:o.text.map(Ci).toArray()}),Qj=(o,u,m,v=!0)=>{const C=I=>({setActive:F=>{po.set(I,F)},isActive:()=>po.isOn(I),isEnabled:()=>!Xn.isDisabled(I),setEnabled:F=>Xn.set(I,!F)}),x=h3({iconContent:o.icon,textContent:o.text,htmlContent:V.none(),ariaLabel:o.text,checkMark:V.some(gj(m.icons)),caret:V.none(),shortcutContent:o.shortcut,presets:"normal",meta:o.meta},m,v);return Gi(D_({context:o.context,data:L_(o),enabled:o.enabled,getApi:C,onAction:o.onAction,onSetup:o.onSetup,triggersSubmenu:!1,itemBehaviours:[]},x,u,m),{toggling:{toggleClass:xx,toggleOnExecute:!1,selected:o.active},role:o.role.getOrUndefined()})},Qre=cre,eZ=Jre,eie=Jj,tie=Xre,nie=Qj,sie=Xj,oie=ure;var rie=Object.freeze({__proto__:null,getCoupled:(o,u,m,v)=>m.getOrCreate(o,u,v),getExistingCoupled:(o,u,m,v)=>m.getExisting(o,u,v)}),iie=[cr("others",Jp(no.value,Qf()))],aie=Object.freeze({__proto__:null,init:()=>{const o={},u=(x,I)=>{if(Zn(x.others).length===0)throw new Error("Cannot find any known coupled components");return bn(o,I)},m=(x,I,F)=>u(I,F).getOrThunk(()=>{const X=bn(I.others,F).getOrDie("No information found for coupled component: "+F)(x),oe=x.getSystem().build(X);return o[F]=oe,oe}),v=(x,I,F)=>u(I,F).orThunk(()=>(bn(I.others,F).getOrDie("No information found for coupled component: "+F),V.none())),C=J({});return Pd({readState:C,getExisting:v,getOrCreate:m})}});const da=Sa({fields:iie,name:"coupling",apis:rie,state:aie}),dM=o=>{let u=V.none(),m=[];const v=X=>dM(oe=>{C(me=>{oe(X(me))})}),C=X=>{I()?U(X):m.push(X)},x=X=>{I()||(u=V.some(X),F(m),m=[])},I=()=>u.isSome(),F=X=>{Ht(X,U)},U=X=>{u.each(oe=>{setTimeout(()=>{X(oe)},0)})};return o(x),{get:C,map:v,isReady:I}},lie={nu:dM,pure:o=>dM(u=>{u(o)})},cie=o=>{setTimeout(()=>{throw o},0)},F_=o=>{const u=U=>{o().then(U,cie)};return{map:U=>F_(()=>o().then(U)),bind:U=>F_(()=>o().then(X=>U(X).toPromise())),anonBind:U=>F_(()=>o().then(()=>U.toPromise())),toLazy:()=>lie.nu(u),toCached:()=>{let U=null;return F_(()=>(U===null&&(U=o()),U))},toPromise:o,get:u}},ou={nu:o=>F_(()=>new Promise(o)),pure:o=>F_(()=>Promise.resolve(o))},nZ=J("sink"),fM=J(qu({name:nZ(),overrides:J({dom:{tag:"div"},behaviours:cn([yc.config({useFixed:Ue})]),events:ni([cg(gc()),cg(fd()),cg(Jm())])})})),pM=(o,u)=>{const m=o.getHotspot(u).getOr(u),v="hotspot",C=o.getAnchorOverrides();return o.layouts.fold(()=>({type:v,hotspot:m,overrides:C}),x=>({type:v,hotspot:m,overrides:C,layouts:x}))},uie=(o,u,m)=>{const v=o.fetch;return v(m).map(u)},die=(o,u,m,v,C,x,I)=>{const F=uie(o,u,v),U=sZ(v,o);return F.map(X=>X.bind(oe=>{const me=oe.menus[oe.primary];return V.from(me).each(Se=>{o.listRole.each(Ie=>{Se.role=Ie})}),V.from(j2.sketch({...x.menu(),uid:$0(""),data:oe,highlightOnOpen:I,onOpenMenu:(Se,Ie)=>{const Pe=U().getOrDie();yc.position(Pe,Ie,{anchor:m}),Uo.decloak(C)},onOpenSubmenu:(Se,Ie,Pe)=>{const Me=U().getOrDie();yc.position(Me,Pe,{anchor:{type:"submenu",item:Ie}}),Uo.decloak(C)},onRepositionMenu:(Se,Ie,Pe)=>{const Me=U().getOrDie();yc.position(Me,Ie,{anchor:m}),Ht(Pe,at=>{yc.position(Me,at.triggeredMenu,{anchor:{type:"submenu",item:at.triggeringItem}})})},onEscape:()=>(As.focus(v),Uo.close(C),V.some(!0))}))}))},t7=(o,u,m,v,C,x,I)=>{const F=pM(o,m);return die(o,u,F,m,v,C,I).map(X=>(X.fold(()=>{Uo.isOpen(v)&&Uo.close(v)},oe=>{Uo.cloak(v),Uo.open(v,oe),x(v)}),v))},fie=(o,u,m,v,C,x,I)=>(Uo.close(v),ou.pure(v)),mM=(o,u,m,v,C,x)=>{const I=da.getCoupled(m,"sandbox");return(Uo.isOpen(I)?fie:t7)(o,u,m,I,v,C,x)},pie=(o,u,m)=>{const v=Lo.getCurrent(u).getOr(u),C=oo(o.element);m?wn(v.element,"min-width",C+"px"):Uv(v.element,C)},sZ=(o,u)=>o.getSystem().getByUid(u.uid+"-"+nZ()).map(m=>()=>no.value(m)).getOrThunk(()=>u.lazySink.fold(()=>()=>no.error(new Error("No internal sink is specified, nor could an external sink be found")),m=>()=>m(o))),oZ=o=>{Uo.getState(o).each(u=>{j2.repositionMenus(u)})},hM=(o,u,m)=>{const v=o6(),C=(F,U)=>{const X=pM(o,u);v.link(u.element),o.matchWidth&&pie(X.hotspot,U,o.useMinWidth),o.onOpen(X,F,U),m!==void 0&&m.onOpen!==void 0&&m.onOpen(F,U)},x=(F,U)=>{v.unlink(u.element),I().getOr(U).element.dom.dispatchEvent(new window.FocusEvent("focusout")),m!==void 0&&m.onClose!==void 0&&m.onClose(F,U)},I=sZ(u,o);return{dom:{tag:"div",classes:o.sandboxClasses,attributes:{id:v.id}},behaviours:Vd.augment(o.sandboxBehaviours,[Dn.config({store:{mode:"memory",initialValue:u}}),Uo.config({onOpen:C,onClose:x,isPartOf:(F,U,X)=>_g(U,X)||_g(u,X),getAttachPoint:()=>I().getOrDie()}),Lo.config({find:F=>Uo.getState(F).bind(U=>Lo.getCurrent(U))}),ju.config({channels:{...hd({isExtraPart:$e}),...X0({doReposition:oZ})}})])}},n7=o=>{const u=da.getCoupled(o,"sandbox");oZ(u)},gM=()=>[mt("sandboxClasses",[]),Vd.field("sandboxBehaviours",[Lo,ju,Uo,Dn])],Xx=J([Zt("dom"),Zt("fetch"),Ho("onOpen"),Qc("onExecute"),mt("getHotspot",V.some),mt("getAnchorOverrides",J({})),Cg(),Ll("dropdownBehaviours",[po,da,fs,As]),Zt("toggleClass"),mt("eventOrder",{}),ur("lazySink"),mt("matchWidth",!1),mt("useMinWidth",!1),ur("role"),ur("listRole")].concat(gM())),mie=J([mf({schema:[Sy(),mt("fakeFocus",!1)],name:"menu",defaults:o=>({onExecute:o.onExecute})}),fM()]),hie=(o,u,m,v)=>{const C=oe=>bn(o.dom,"attributes").bind(me=>bn(me,oe)),x=oe=>{Uo.getState(oe).each(me=>{j2.highlightPrimary(me)})},I=(oe,me,Se)=>mM(o,ce,oe,v,me,Se),F=oe=>{I(oe,x,Pl.HighlightMenuAndItem).get(z)},U={expand:oe=>{po.isOn(oe)||I(oe,z,Pl.HighlightNone).get(z)},open:oe=>{po.isOn(oe)||I(oe,z,Pl.HighlightMenuAndItem).get(z)},refetch:oe=>da.getExistingCoupled(oe,"sandbox").fold(()=>I(oe,z,Pl.HighlightMenuAndItem).map(z),Se=>t7(o,ce,oe,Se,v,z,Pl.HighlightMenuAndItem).map(z)),isOpen:po.isOn,close:oe=>{po.isOn(oe)&&I(oe,z,Pl.HighlightMenuAndItem).get(z)},repositionMenus:oe=>{po.isOn(oe)&&n7(oe)}},X=(oe,me)=>(_u(oe),V.some(!0));return{uid:o.uid,dom:o.dom,components:u,behaviours:Ca(o.dropdownBehaviours,[po.config({toggleClass:o.toggleClass,aria:{mode:"expanded"}}),da.config({others:{sandbox:oe=>hM(o,oe,{onOpen:()=>po.on(oe),onClose:()=>po.off(oe)})}}),fs.config({mode:"special",onSpace:X,onEnter:X,onDown:(oe,me)=>{if(Sp.isOpen(oe)){const Se=da.getCoupled(oe,"sandbox");x(Se)}else Sp.open(oe);return V.some(!0)},onEscape:(oe,me)=>Sp.isOpen(oe)?(Sp.close(oe),V.some(!0)):V.none()}),As.config({})]),events:S_(V.some(F)),eventOrder:{...o.eventOrder,[Mc()]:["disabling","toggling","alloy.base.behaviour"]},apis:U,domModification:{attributes:{"aria-haspopup":o.listRole.getOr("true"),...o.role.fold(()=>({}),oe=>({role:oe})),...o.dom.tag==="button"?{type:C("type").getOr("button")}:{}}}}},Sp=$c({name:"Dropdown",configFields:Xx(),partFields:mie(),factory:hie,apis:{open:(o,u)=>o.open(u),refetch:(o,u)=>o.refetch(u),expand:(o,u)=>o.expand(u),close:(o,u)=>o.close(u),isOpen:(o,u)=>o.isOpen(u),repositionMenus:(o,u)=>o.repositionMenus(u)}}),gie=o=>{switch(o.searchMode){case"no-search":return{menuType:"normal"};default:return{menuType:"searchable",searchMode:o}}},OCe=o=>{const u=Dn.getValue(o),m=Ox(o).map(bP);Sp.refetch(u).get(()=>{const v=da.getCoupled(u,"sandbox");m.each(C=>Ox(v).each(x=>Doe(x,C)))})},Jx=(o,u)=>{$_(o).each(m=>{a4(o,m.element,u.event.eventType,u.event.interactionEvent)})},$_=o=>Uo.getState(o).bind(Re.getHighlighted).bind(Re.getHighlighted),rZ=o=>Nc(o.element,z8)?V.some(o.element):sr(o.element,"."+z8),vM=(o,u,m)=>{U8(o).each(v=>{Loe(v,m),rZ(u).each(x=>{Us(x,"id").each(I=>jt(v.element,"aria-controls",I))})}),jt(m.element,"aria-selected","true")},vie=(o,u,m)=>{jt(m.element,"aria-selected","false")},bie=o=>{U8(o).each(u=>As.focus(u))},yie=o=>da.getExistingCoupled(o,"sandbox").bind(Ox).map(bP).map(m=>m.fetchPattern).getOr("");var Qx;(function(o){o[o.ContentFocus=0]="ContentFocus",o[o.UiFocus=1]="UiFocus"})(Qx||(Qx={}));const _ie=(o,u,m,v,C)=>{const x=m.shared.providers,I=F=>C?{...F,shortcut:V.none(),icon:F.text.isSome()?V.none():F.icon}:F;switch(o.type){case"menuitem":return Joe(o).fold(av,F=>V.some(eie(I(F),u,x,v)));case"nestedmenuitem":return Qoe(o).fold(av,F=>V.some(tie(I(F),u,x,v,C)));case"togglemenuitem":return Y8(o).fold(av,F=>V.some(nie(I(F),u,x,v)));case"separator":return vf(o).fold(av,F=>V.some(eZ(F)));case"fancymenuitem":return dj(o).fold(av,F=>sie(F,m));default:return console.error("Unknown item in general menu",o),V.none()}},Sie=(o,u,m,v,C,x,I)=>{const F=v===1,U=!F||W8(o);return _n(ct(o,X=>{switch(X.type){case"separator":return nj(X).fold(av,oe=>V.some(eZ(oe)));case"cardmenuitem":return cj(X).fold(av,oe=>V.some(oie({...oe,onAction:me=>{oe.onAction(me),m(oe.value,oe.meta)}},C,x,{itemBehaviours:Hx(oe.meta,x,V.none()),cardText:{matchText:u,highlightOn:I}})));case"autocompleteitem":default:return IP(X).fold(av,oe=>V.some(Qre(oe,u,F,"normal",m,C,x,U)))}}))},iZ=(o,u,m,v,C,x)=>{const I=W8(u),F=_n(ct(u,oe=>{const me=Ie=>C?!qs(Ie,"text"):I,Se=Ie=>_ie(Ie,m,v,me(Ie),C);return oe.type==="nestedmenuitem"&&oe.getSubmenuItems().length<=0?Se({...oe,enabled:!1}):Se(oe)})),U=gie(x);return(C?Noe:SP)(o,I,F,1,U)},bM=o=>j2.singleData(o.value,o),Cie=(o,u,m,v)=>{const C=Yx(u,v),x=a3(v);return{data:bM({...o,movement:C,menuBehaviours:A_.unnamedEvents(u!=="auto"?[]:[$r((I,F)=>{PP(I,4,x.item).each(({numColumns:U,numRows:X})=>{fs.setGridSize(I,X,U)})})])}),menu:{markers:a3(v),fakeFocus:m===Qx.ContentFocus}}},wie=o=>Ny.create(Xt.fromDom(o.startContainer),o.startOffset,Xt.fromDom(o.endContainer),o.endOffset),aZ={register:(o,u)=>{const m=Pn("autocompleter"),v=ds(!1),C=ds(!1),x=vr(),I=Fc(Ni.sketch({dom:{tag:"div",classes:["tox-autocompleter"],attributes:{id:m}},components:[],fireDismissalEventInstead:{},inlineBehaviours:cn([zs("dismissAutocompleter",[Wt(ag(),()=>me()),Wt(s4(),(qe,dt)=>{Us(dt.event.target,"id").each(it=>jt(Xt.fromDom(o.getBody()),"aria-activedescendant",it))})])]),lazySink:u.getSink})),F=()=>Ni.isOpen(I),U=C.get,X=()=>{if(F()){Ni.hide(I),o.dom.remove(m,!1);const qe=Xt.fromDom(o.getBody());Us(qe,"aria-owns").filter(dt=>dt===m).each(()=>{ke(qe,"aria-owns"),ke(qe,"aria-activedescendant")})}},oe=()=>Ni.getContent(I).bind(qe=>pt(qe.components(),0)),me=()=>o.execCommand("mceAutocompleterClose"),Se=qe=>{const dt=ts(qe,it=>V.from(it.columns)).getOr(1);return Ve(qe,it=>{const It=it.items;return Sie(It,it.matchText,(Mt,en)=>{const In={hide:()=>me(),reload:Ft=>{X(),o.execCommand("mceAutocompleterReload",!1,{fetchOptions:Ft})}};o.execCommand("mceAutocompleterRefreshActiveRange"),x.get().each(Ft=>{v.set(!0),it.onAction(In,Ft,Mt,en),v.set(!1)})},dt,um.BUBBLE_TO_SANDBOX,u,it.highlightOn)})},Ie=(qe,dt)=>{const it=ts(qe,It=>V.from(It.columns)).getOr(1);Ni.showMenuAt(I,{anchor:{type:"selection",getSelection:()=>x.get().map(wie),root:Xt.fromDom(o.getBody())}},Cie(SP("autocompleter-value",!0,dt,it,{menuType:"normal"}),it,Qx.ContentFocus,"normal")),oe().each(Re.highlightFirst)},Pe=qe=>{const dt=Se(qe);dt.length>0?(Ie(qe,dt),jt(Xt.fromDom(o.getBody()),"aria-owns",m),o.inline||Me()):X()},Me=()=>{o.dom.get(m)&&o.dom.remove(m,!1);const qe=o.getDoc().documentElement,dt=o.selection.getNode(),it=$R(I.element);Vo(it,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",top:"".concat(dt.offsetTop,"px"),left:"".concat(dt.offsetLeft,"px")}),o.dom.add(qe,it.dom),sr(it,'[role="menu"]').each(It=>{fo(It,"position"),fo(It,"max-height")})};o.on("AutocompleterStart",({lookupData:qe})=>{C.set(!0),v.set(!1),Pe(qe)}),o.on("AutocompleterUpdate",({lookupData:qe})=>Pe(qe)),o.on("AutocompleterUpdateActiveRange",({range:qe})=>x.set(qe)),o.on("AutocompleterEnd",()=>{X(),C.set(!1),v.set(!1),x.clear()});const at={cancelIfNecessary:me,isMenuOpen:F,isActive:U,isProcessingAction:v.get,getMenu:oe};AW.setup(at,o)}},Lg=(o,u,m)=>fp(o,u,m).isSome(),Q2=(o,u)=>{let m=null;return{cancel:()=>{m!==null&&(clearTimeout(m),m=null)},schedule:(...x)=>{m=setTimeout(()=>{o.apply(null,x),m=null},u)}}},lZ=5,cZ=400,yM=o=>{const u=o.raw;return u.touches===void 0||u.touches.length!==1?V.none():V.some(u.touches[0])},eT=(o,u)=>{const m=Math.abs(o.clientX-u.x),v=Math.abs(o.clientY-u.y);return m>lZ||v>lZ},Eie=o=>{const u=vr(),m=ds(!1),v=Q2(X=>{o.triggerEvent(mU(),X),m.set(!0)},cZ),C=X=>(yM(X).each(oe=>{v.cancel();const me={x:oe.clientX,y:oe.clientY,target:X.target};v.schedule(X),m.set(!1),u.set(me)}),V.none()),x=X=>(v.cancel(),yM(X).each(oe=>{u.on(me=>{eT(oe,me)&&u.clear()})}),V.none()),I=X=>{v.cancel();const oe=me=>co(me.target,X.target);return u.get().filter(oe).map(me=>m.get()?(X.prevent(),!1):o.triggerEvent(ry(),X))},F=ny([{key:op(),value:C},{key:Qv(),value:x},{key:e1(),value:I}]);return{fireIfReady:(X,oe)=>bn(F,oe).bind(me=>me(X))}},s7=o=>o.raw.which===nt[0]&&!ft(["input","textarea"],tr(o.target))&&!Lg(o.target,'[contenteditable="true"]'),o7=(o,u)=>{const m={stopBackspace:!0,...u},v=["touchstart","touchmove","touchend","touchcancel","gesturestart","mousedown","mouseup","mouseover","mousemove","mouseout","click"],C=Eie(m),x=ct(v.concat(["selectstart","input","contextmenu","change","transitionend","transitioncancel","drag","dragstart","dragend","dragenter","dragleave","dragover","drop","keyup"]),Ie=>wu(o,Ie,Pe=>{C.fireIfReady(Pe,Ie).each(at=>{at&&Pe.kill()}),m.triggerEvent(Ie,Pe)&&Pe.kill()})),I=vr(),F=wu(o,"paste",Ie=>{C.fireIfReady(Ie,"paste").each(Me=>{Me&&Ie.kill()}),m.triggerEvent("paste",Ie)&&Ie.kill(),I.set(setTimeout(()=>{m.triggerEvent(x0(),Ie)},0))}),U=wu(o,"keydown",Ie=>{m.triggerEvent("keydown",Ie)?Ie.kill():m.stopBackspace&&s7(Ie)&&Ie.prevent()}),X=wu(o,"focusin",Ie=>{m.triggerEvent("focusin",Ie)&&Ie.kill()}),oe=vr(),me=wu(o,"focusout",Ie=>{m.triggerEvent("focusout",Ie)&&Ie.kill(),oe.set(setTimeout(()=>{m.triggerEvent(n1(),Ie)},0))});return{unbind:()=>{Ht(x,Ie=>{Ie.unbind()}),U.unbind(),X.unbind(),me.unbind(),F.unbind(),I.on(clearTimeout),oe.on(clearTimeout)}}},uZ=(o,u)=>{const m=bn(o,"target").getOr(u);return ds(m)},kie=(o,u)=>{const m=ds(!1),v=ds(!1);return{stop:()=>{m.set(!0)},cut:()=>{v.set(!0)},isStopped:m.get,isCut:v.get,event:o,setSource:u.set,getSource:u.get}},xie=o=>{const u=ds(!1);return{stop:()=>{u.set(!0)},cut:z,isStopped:u.get,isCut:$e,event:o,setSource:ie("Cannot set source of a broadcasted event"),getSource:ie("Cannot get source of a broadcasted event")}},r7=sp.generate([{stopped:[]},{resume:["element"]},{complete:[]}]),dZ=(o,u,m,v,C,x)=>{const I=o(u,v),F=kie(m,C);return I.fold(()=>(x.logEventNoHandlers(u,v),r7.complete()),U=>{const X=U.descHandler;return y4(X)(F),F.isStopped()?(x.logEventStopped(u,U.element,X.purpose),r7.stopped()):F.isCut()?(x.logEventCut(u,U.element,X.purpose),r7.complete()):ai(U.element).fold(()=>(x.logNoParent(u,U.element,X.purpose),r7.complete()),me=>(x.logEventResponse(u,U.element,X.purpose),r7.resume(me)))})},fZ=(o,u,m,v,C,x)=>dZ(o,u,m,v,C,x).fold(Ue,I=>fZ(o,u,m,I,C,x),$e),tT=(o,u,m,v,C)=>{const x=uZ(m,v);return dZ(o,u,m,v,x,C)},Tie=(o,u,m)=>{const v=xie(u);return Ht(o,C=>{const x=C.descHandler;y4(x)(v)}),v.isStopped()},_M=(o,u,m,v)=>pZ(o,u,m,m.target,v),pZ=(o,u,m,v,C)=>{const x=uZ(m,v);return fZ(o,u,m,v,x,C)},Iie=(o,u)=>({element:o,descHandler:u}),mZ=(o,u)=>({id:o,descHandler:u}),hZ=()=>{const o={},u=(I,F,U)=>{Qs(U,(X,oe)=>{const me=o[oe]!==void 0?o[oe]:{};me[F]=B0(X,I),o[oe]=me})},m=(I,F)=>F0(F).bind(U=>bn(I,U)).map(U=>Iie(F,U));return{registerId:u,unregisterId:I=>{Qs(o,(F,U)=>{qs(F,I)&&delete F[I]})},filterByType:I=>bn(o,I).map(F=>er(F,(U,X)=>mZ(X,U))).getOr([]),find:(I,F,U)=>bn(o,F).bind(X=>Jv(U,oe=>m(X,oe),I))}},gZ=()=>{const o=hZ(),u={},m=X=>{const oe=X.element;return F0(oe).getOrThunk(()=>zR("uid-",X.element))},v=(X,oe)=>{const me=u[oe];if(me===X)x(X);else throw new Error('The tagId "'+oe+'" is already used by: '+zu(me.element)+"\nCannot use it for: "+zu(X.element)+"\nThe conflicting element is"+(We(me.element)?" ":" not ")+"already in the DOM")},C=X=>{const oe=m(X);Qr(u,oe)&&v(X,oe);const me=[X];o.registerId(me,oe,X.events),u[oe]=X},x=X=>{F0(X.element).each(oe=>{delete u[oe],o.unregisterId(oe)})};return{find:(X,oe,me)=>o.find(X,oe,me),filter:X=>o.filterByType(X),register:C,unregister:x,getById:X=>bn(u,X)}},bd=Gu({name:"Container",factory:o=>{const{attributes:u,...m}=o.dom;return{uid:o.uid,dom:{tag:"div",attributes:{role:"presentation",...u},...m},components:o.components,behaviours:s_(o.containerBehaviours),events:o.events,domModification:o.domModification,eventOrder:o.eventOrder}},configFields:[mt("components",[]),Ll("containerBehaviours",[]),mt("events",{}),mt("domModification",{}),mt("eventOrder",{})]}),SM=o=>{const u=qe=>ai(o.element).fold(Ue,dt=>co(qe,dt)),m=gZ(),v=(qe,dt)=>m.find(u,qe,dt),C=o7(o.element,{triggerEvent:(qe,dt)=>jC(qe,dt.target,it=>_M(v,qe,dt,it))}),x={debugInfo:J("real"),triggerEvent:(qe,dt,it)=>{jC(qe,dt,It=>pZ(v,qe,it,dt,It))},triggerFocus:(qe,dt)=>{F0(qe).fold(()=>{eu(qe)},it=>{jC(Qm(),qe,It=>(tT(v,Qm(),{originator:dt,kill:z,prevent:z,target:qe},qe,It),!1))})},triggerEscape:(qe,dt)=>{x.triggerEvent("keydown",qe.element,dt.event)},getByUid:qe=>Me(qe),getByDom:qe=>at(qe),build:Fc,buildOrPatch:I4,addToGui:qe=>{U(qe)},removeFromGui:qe=>{X(qe)},addToWorld:qe=>{I(qe)},removeFromWorld:qe=>{F(qe)},broadcast:qe=>{Se(qe)},broadcastOn:(qe,dt)=>{Ie(qe,dt)},broadcastEvent:(qe,dt)=>{Pe(qe,dt)},isConnected:Ue},I=qe=>{qe.connect(x),ii(qe.element)||(m.register(qe),Ht(qe.components(),I),x.triggerEvent(iy(),qe.element,{target:qe.element}))},F=qe=>{ii(qe.element)||(Ht(qe.components(),F),m.unregister(qe)),qe.disconnect()},U=qe=>{K0(o,qe)},X=qe=>{im(qe)},oe=()=>{C.unbind(),of(o.element)},me=qe=>{const dt=m.filter(ap());Ht(dt,it=>{const It=it.descHandler;y4(It)(qe)})},Se=qe=>{me({universal:!0,data:qe})},Ie=(qe,dt)=>{me({universal:!1,channels:qe,data:dt})},Pe=(qe,dt)=>{const it=m.filter(qe);return Tie(it,dt)},Me=qe=>m.getById(qe).fold(()=>no.error(new Error('Could not find component with uid: "'+qe+'" in system.')),no.value),at=qe=>{const dt=F0(qe).getOr("not found");return Me(dt)};return I(o),{root:o,element:o.element,destroy:oe,add:U,remove:X,getByUid:Me,getByDom:at,addToWorld:I,removeFromWorld:F,broadcast:Se,broadcastOn:Ie,broadcastEvent:Pe}},Aie=(o,u)=>({dom:{tag:"div",classes:["tox-bar","tox-form__controls-h-stack"]},components:ct(o.items,u.interpreter)}),vZ=J([mt("prefix","form-field"),Ll("fieldBehaviours",[Lo,Dn])]),Oie=J([qu({schema:[Zt("dom")],name:"label"}),qu({factory:{sketch:o=>({uid:o.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:o.text}})},schema:[Zt("text")],name:"aria-descriptor"}),Sc({factory:{sketch:o=>{const u=I9(o,["factory"]);return o.factory.sketch(u)}},schema:[Zt("factory")],name:"field"})]),bZ=(o,u,m,v)=>{const C=Ca(o.fieldBehaviours,[Lo.config({find:F=>Yr(F,o,"field")}),Dn.config({store:{mode:"manual",getValue:F=>Lo.getCurrent(F).bind(Dn.getValue),setValue:(F,U)=>{Lo.getCurrent(F).each(X=>{Dn.setValue(X,U)})}}})]),x=ni([$r((F,U)=>{const X=Rk(F,o,["label","field","aria-descriptor"]);X.field().each(oe=>{const me=Pn(o.prefix);X.label().each(Se=>{jt(Se.element,"for",me),jt(oe.element,"id",me)}),X["aria-descriptor"]().each(Se=>{const Ie=Pn(o.prefix);jt(Se.element,"id",Ie),jt(oe.element,"aria-describedby",Ie)})})})]),I={getField:F=>Yr(F,o,"field"),getLabel:F=>Yr(F,o,"label")};return{uid:o.uid,dom:o.dom,components:u,behaviours:C,events:x,apis:I}},Co=$c({name:"FormField",configFields:vZ(),partFields:Oie(),factory:bZ,apis:{getField:(o,u)=>o.getField(u),getLabel:(o,u)=>o.getLabel(u)}});var Rie=tinymce.util.Tools.resolve("tinymce.html.Entities");const i7=(o,u,m,v)=>{const C=Lie(o,u,m,v);return Co.sketch(C)},Die=(o,u)=>i7(o,u,[],[]),Lie=(o,u,m,v)=>({dom:yZ(m),components:o.toArray().concat([u]),fieldBehaviours:cn(v)}),Pie=()=>yZ([]),yZ=o=>({tag:"div",classes:["tox-form__group"].concat(o)}),tb=(o,u)=>Co.parts.label({dom:{tag:"label",classes:["tox-label"]},components:[Ci(u.translate(o))]}),Yu=Pn("form-component-change"),_Z=Pn("form-component-input"),a7=Pn("form-close"),nb=Pn("form-cancel"),w1=Pn("form-action"),l7=Pn("form-submit"),CM=Pn("form-block"),wM=Pn("form-unblock"),EM=Pn("form-tabchange"),SZ=Pn("form-resize"),Mie=(o,u,m)=>{const v=o.label.map(Ie=>tb(Ie,u)),C=u.icons(),x=Ie=>{var Pe;return(Pe=C[Ie])!==null&&Pe!==void 0?Pe:Ie},I=Ie=>(Pe,Me)=>{fp(Me.event.target,"[data-collection-item-value]").each(at=>{Ie(Pe,Me,at,eo(at,"data-collection-item-value"))})},F=(Ie,Pe)=>{const at=u.checkUiComponentContext("mode:design").shouldDisable||u.isDisabled()?" tox-collection__item--state-disabled":"",qe=ct(Pe,It=>{const Mt=cm.translate(It.text),en=o.columns===1?'<div class="tox-collection__item-label">'.concat(Mt,"</div>"):"",In='<div class="tox-collection__item-icon">'.concat(x(It.icon),"</div>"),Ft={_:" "," - ":" ","-":" "},Mn=Mt.replace(/\_| \- |\-/g,En=>Ft[En]);return'<div data-mce-tooltip="'.concat(Mn,'" class="tox-collection__item').concat(at,'" tabindex="-1" data-collection-item-value="').concat(Rie.encodeAllRaw(It.value),'" aria-label="').concat(Mn,'">').concat(In).concat(en,"</div>")}),dt=o.columns!=="auto"&&o.columns>1?hn(qe,o.columns):[qe],it=ct(dt,It=>'<div class="tox-collection__group">'.concat(It.join(""),"</div>"));Mi(Ie.element,it.join(""))},U=I((Ie,Pe,Me,at)=>{Pe.stop(),u.checkUiComponentContext("mode:design").shouldDisable||u.isDisabled()||ps(Ie,w1,{name:o.name,value:at})}),X=[Wt(rp(),I((Ie,Pe,Me)=>{eu(Me,!0)})),Wt(Jm(),U),Wt(ry(),U),Wt(ip(),I((Ie,Pe,Me)=>{sr(Ie.element,"."+Dg).each(at=>{ua(at,Dg)}),sa(Me,Dg)})),Wt(D9(),I(Ie=>{sr(Ie.element,"."+Dg).each(Pe=>{ua(Pe,Dg),lh(Pe)})})),r1(I((Ie,Pe,Me,at)=>{ps(Ie,w1,{name:o.name,value:at})}))],oe=(Ie,Pe)=>ct(xu(Ie.element,".tox-collection__item"),Pe),me=Co.parts.field({dom:{tag:"div",classes:["tox-collection"].concat(o.columns!==1?["tox-collection--grid"]:["tox-collection--list"])},components:[],factory:{sketch:ce},behaviours:cn([Xn.config({disabled:()=>u.checkUiComponentContext(o.context).shouldDisable,onDisabled:Ie=>{oe(Ie,Pe=>{sa(Pe,"tox-collection__item--state-disabled"),jt(Pe,"aria-disabled",!0)})},onEnabled:Ie=>{oe(Ie,Pe=>{ua(Pe,"tox-collection__item--state-disabled"),ke(Pe,"aria-disabled")})}}),wa(()=>u.checkUiComponentContext(o.context)),Bs.config({}),Yi.config({...u.tooltips.getConfig({tooltipText:"",onShow:Ie=>{sr(Ie.element,"."+Dg+"[data-mce-tooltip]").each(Pe=>{Us(Pe,"data-mce-tooltip").each(Me=>{Yi.setComponents(Ie,u.tooltips.getComponents({tooltipText:Me}))})})}}),mode:"children-keyboard-focus",anchor:Ie=>({type:"node",node:sr(Ie.element,"."+Dg).orThunk(()=>vE(".tox-collection__item")),root:Ie.element,layouts:{onLtr:J([nl,hl,La,Jl,qa,Pa]),onRtl:J([nl,hl,La,Jl,qa,Pa])},bubble:Eu(0,-2,{})})}),Dn.config({store:{mode:"memory",initialValue:m.getOr([])},onSetValue:(Ie,Pe)=>{F(Ie,Pe),o.columns==="auto"&&PP(Ie,5,"tox-collection__item").each(({numRows:Me,numColumns:at})=>{fs.setGridSize(Ie,Me,at)}),vo(Ie,SZ)}}),si.config({}),fs.config(Wre(o.columns,"normal")),zs("collection-events",X)]),eventOrder:{[Mc()]:["disabling","alloy.base.behaviour","collection-events"],[ip()]:["collection-events","tooltipping"]}});return i7(v,me,["tox-form__group--collection"],[])},Nie=["input","textarea"],CZ=o=>{const u=tr(o);return ft(Nie,u)},wZ=(o,u)=>{const m=u.getRoot(o).getOr(o.element);ua(m,u.invalidClass),u.notify.each(v=>{CZ(o.element)&&jt(o.element,"aria-invalid",!1),v.getContainer(o).each(C=>{Mi(C,v.validHtml)}),v.onValid(o)})},kM=(o,u,m,v)=>{const C=u.getRoot(o).getOr(o.element);sa(C,u.invalidClass),u.notify.each(x=>{CZ(o.element)&&jt(o.element,"aria-invalid",!0),x.getContainer(o).each(I=>{Mi(I,v)}),x.onInvalid(o,v)})},xM=(o,u,m)=>u.validator.fold(()=>ou.pure(no.value(!0)),v=>v.validate(o)),TM=(o,u,m)=>(u.notify.each(v=>{v.onValidate(o)}),xM(o,u).map(v=>o.getSystem().isConnected()?v.fold(C=>(kM(o,u,m,C),no.error(C)),C=>(wZ(o,u),no.value(C))):no.error("No longer in system")));var Fie=Object.freeze({__proto__:null,markValid:wZ,markInvalid:kM,query:xM,run:TM,isInvalid:(o,u)=>{const m=u.getRoot(o).getOr(o.element);return Nc(m,u.invalidClass)}}),$ie=Object.freeze({__proto__:null,events:(o,u)=>o.validator.map(m=>ni([Wt(m.onEvent,v=>{TM(v,o,u).get(ce)})].concat(m.validateOnLoad?[$r(v=>{TM(v,o,u).get(z)})]:[]))).getOr({})}),EZ=[Zt("invalidClass"),mt("getRoot",V.none),Vu("notify",[mt("aria","alert"),mt("getContainer",V.none),mt("validHtml",""),Ho("onValid"),Ho("onInvalid"),Ho("onValidate")]),Vu("validator",[Zt("validate"),mt("onEvent","input"),mt("validateOnLoad",!0)])];const Sf=Sa({fields:EZ,name:"invalidating",active:$ie,apis:Fie,extra:{validation:o=>u=>{const m=Dn.getValue(u);return ou.pure(o(m))}}});var Bie=Object.freeze({__proto__:null,events:()=>ni([o1(ig(),Ue)]),exhibit:()=>up({styles:{"-webkit-user-select":"none","user-select":"none","-ms-user-select":"none","-moz-user-select":"-moz-none"},attributes:{unselectable:"on"}})});const sb=Sa({fields:[],name:"unselecting",active:Bie}),hm=(o,u)=>Sp.sketch({dom:o.dom,components:o.components,toggleClass:"mce-active",dropdownBehaviours:cn([pm.button(()=>u.providers.isDisabled()||u.providers.checkUiComponentContext(o.context).shouldDisable),wa(()=>u.providers.checkUiComponentContext(o.context)),sb.config({}),si.config({})]),layouts:o.layouts,sandboxClasses:["tox-dialog__popups"],lazySink:u.getSink,fetch:m=>ou.nu(v=>o.fetch(v)).map(v=>V.from(bM(Gi(cM(Pn("menu-value"),v,C=>{o.onItemAction(m,C)},o.columns,o.presets,um.CLOSE_ON_EXECUTE,$e,u.providers),{movement:Yx(o.columns,o.presets)})))),parts:{menu:Ax(!1,1,o.presets)}}),nT=Pn("color-input-change"),IM=Pn("color-swatch-change"),kZ=Pn("color-picker-cancel"),Vie=(o,u,m,v)=>{const C=Co.parts.field({factory:iv,inputClasses:["tox-textfield"],data:v,onSetValue:X=>Sf.run(X).get(z),inputBehaviours:cn([Xn.config({disabled:()=>u.providers.isDisabled()||u.providers.checkUiComponentContext(o.context).shouldDisable}),wa(()=>u.providers.checkUiComponentContext(o.context)),si.config({}),Sf.config({invalidClass:"tox-textbox-field-invalid",getRoot:X=>jl(X.element),notify:{onValid:X=>{const oe=Dn.getValue(X);ps(X,nT,{color:oe})}},validator:{validateOnLoad:!1,validate:X=>{const oe=Dn.getValue(X);if(oe.length===0)return ou.pure(no.value(!0));{const me=Xt.fromTag("span");wn(me,"background-color",oe);const Se=Er(me,"background-color").fold(()=>no.error("blah"),Ie=>no.value(oe));return ou.pure(Se)}}}})]),selectOnFocus:!1}),x=o.label.map(X=>tb(X,u.providers)),I=(X,oe)=>{ps(X,IM,{value:oe})},F=(X,oe)=>{U.getOpt(X).each(me=>{oe==="custom"?m.colorPicker(Se=>{Se.fold(()=>vo(me,kZ),Ie=>{I(me,Ie),Pj(o.storageKey,Ie)})},"#ffffff"):oe==="remove"?I(me,""):I(me,oe)})},U=or(hm({dom:{tag:"span",attributes:{"aria-label":u.providers.translate("Color swatch")}},layouts:{onRtl:()=>[qa,La,nl],onLtr:()=>[La,qa,nl]},components:[],fetch:Hj(m.getColors(o.storageKey),o.storageKey,m.hasCustomColors()),columns:m.getColorCols(o.storageKey),presets:"color",onItemAction:F,context:o.context},u));return Co.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:x.toArray().concat([{dom:{tag:"div",classes:["tox-color-input"]},components:[C,U.asSpec()]}]),fieldBehaviours:cn([zs("form-field-events",[Wt(nT,(X,oe)=>{U.getOpt(X).each(me=>{wn(me.element,"background-color",oe.event.color)}),ps(X,Yu,{name:o.name})}),Wt(IM,(X,oe)=>{Co.getField(X).each(me=>{Dn.setValue(me,oe.event.value),Lo.getCurrent(X).each(As.focus)})}),Wt(kZ,(X,oe)=>{Co.getField(X).each(me=>{Lo.getCurrent(X).each(As.focus)})})])])})},Hie=qu({schema:[Zt("dom")],name:"label"}),ob=o=>qu({name:""+o+"-edge",overrides:u=>u.model.manager.edgeActions[o].fold(()=>({}),v=>({events:ni([MC(op(),(C,x,I)=>v(C,I),[u]),MC(fd(),(C,x,I)=>v(C,I),[u]),MC(t4(),(C,x,I)=>{I.mouseIsDown.get()&&v(C,I)},[u])])}))}),xZ=ob("top-left"),TZ=ob("top"),Uie=ob("top-right"),zie=ob("right"),IZ=ob("bottom-right"),Wie=ob("bottom"),AZ=ob("bottom-left"),OZ=ob("left"),RZ=Sc({name:"thumb",defaults:J({dom:{styles:{position:"absolute"}}}),overrides:o=>({events:ni([A0(op(),o,"spectrum"),A0(Qv(),o,"spectrum"),A0(e1(),o,"spectrum"),A0(fd(),o,"spectrum"),A0(t4(),o,"spectrum"),A0(oy(),o,"spectrum")])})}),sT=o=>nu(o.event),jie=Sc({schema:[nr("mouseIsDown",()=>ds(!1))],name:"spectrum",overrides:o=>{const m=o.model.manager,v=(C,x)=>m.getValueFromEvent(x).map(I=>m.setValueFrom(C,o,I));return{behaviours:cn([fs.config({mode:"special",onLeft:(C,x)=>m.onLeft(C,o,sT(x)),onRight:(C,x)=>m.onRight(C,o,sT(x)),onUp:(C,x)=>m.onUp(C,o,sT(x)),onDown:(C,x)=>m.onDown(C,o,sT(x))}),si.config({}),As.config({})]),events:ni([Wt(op(),v),Wt(Qv(),v),Wt(fd(),v),Wt(t4(),(C,x)=>{o.mouseIsDown.get()&&v(C,x)})])}}});var Zie=[Hie,OZ,zie,TZ,Wie,xZ,Uie,AZ,IZ,RZ,jie];const c7=J("slider.change.value"),qie=o=>o.type.indexOf("touch")!==-1,u7=o=>{const u=o.event.raw;if(qie(u)){const m=u;return m.touches!==void 0&&m.touches.length===1?V.some(m.touches[0]).map(v=>jr(v.clientX,v.clientY)):V.none()}else{const m=u;return m.clientX!==void 0?V.some(m).map(v=>jr(v.clientX,v.clientY)):V.none()}},Gie="top",Kie="right",DZ="bottom",Yie="left",v3=o=>o.model.minX,b3=o=>o.model.minY,oT=o=>o.model.minX-1,rT=o=>o.model.minY-1,y3=o=>o.model.maxX,_3=o=>o.model.maxY,d7=o=>o.model.maxX+1,f7=o=>o.model.maxY+1,LZ=(o,u,m)=>u(o)-m(o),AM=o=>LZ(o,y3,v3),OM=o=>LZ(o,_3,b3),PZ=o=>AM(o)/2,MZ=o=>OM(o)/2,B_=(o,u)=>u?o.stepSize*o.speedMultiplier:o.stepSize,RM=o=>o.snapToGrid,DM=o=>o.snapStart,LM=o=>o.rounded,V_=(o,u)=>o[u+"-edge"]!==void 0,NZ=o=>V_(o,Yie),PM=o=>V_(o,Kie),FZ=o=>V_(o,Gie),$Z=o=>V_(o,DZ),dv=o=>o.model.value.get(),rb=(o,u)=>({x:o,y:u}),Cp=(o,u)=>{ps(o,c7(),{value:u})},fv=(o,u)=>{Cp(o,rb(oT(u),rT(u)))},Xie=(o,u)=>{Cp(o,rT(u))},p7=(o,u)=>{Cp(o,rb(PZ(u),rT(u)))},Jie=(o,u)=>{Cp(o,rb(d7(u),rT(u)))},MM=(o,u)=>{Cp(o,d7(u))},Qie=(o,u)=>{Cp(o,rb(d7(u),MZ(u)))},eae=(o,u)=>{Cp(o,rb(d7(u),f7(u)))},tae=(o,u)=>{Cp(o,f7(u))},BZ=(o,u)=>{Cp(o,rb(PZ(u),f7(u)))},nae=(o,u)=>{Cp(o,rb(oT(u),f7(u)))},NM=(o,u)=>{Cp(o,oT(u))},FM=(o,u)=>{Cp(o,rb(oT(u),MZ(u)))},m7=(o,u,m,v)=>o<u?o:o>m?m:o===u?u-1:Math.max(u,o-v),$M=(o,u,m,v)=>o>m?o:o<u?u:o===m?m+1:Math.min(m,o+v),Cf=(o,u,m)=>Math.max(u,Math.min(m,o)),sae=(o,u,m,v,C)=>C.fold(()=>{const x=o-u,I=Math.round(x/v)*v;return Cf(u+I,u-1,m+1)},x=>{const I=(o-x)%v,F=Math.round(I/v),U=Math.floor((o-x)/v),X=Math.floor((m-x)/v),oe=Math.min(X,U+F),me=x+oe*v;return Math.max(x,me)}),oae=(o,u,m)=>Math.min(m,Math.max(o,u))-u,BM=o=>{const{min:u,max:m,range:v,value:C,step:x,snap:I,snapStart:F,rounded:U,hasMinEdge:X,hasMaxEdge:oe,minBound:me,maxBound:Se,screenRange:Ie}=o,Pe=X?u-1:u,Me=oe?m+1:m;if(C<me)return Pe;if(C>Se)return Me;{const at=oae(C,me,Se),qe=Cf(at/Ie*v+u,Pe,Me);return I&&qe>=u&&qe<=m?sae(qe,u,m,x,F):U?Math.round(qe):qe}},VM=o=>{const{min:u,max:m,range:v,value:C,hasMinEdge:x,hasMaxEdge:I,maxBound:F,maxOffset:U,centerMinEdge:X,centerMaxEdge:oe}=o;return C<u?x?0:X:C>m?I?F:oe:(C-u)/v*U},HM="top",VZ="right",HZ="bottom",UM="left",rae="width",iae="height",Pg=o=>o.element.dom.getBoundingClientRect(),gm=(o,u)=>o[u],iT=o=>{const u=Pg(o);return gm(u,UM)},UZ=o=>{const u=Pg(o);return gm(u,VZ)},aT=o=>{const u=Pg(o);return gm(u,HM)},zM=o=>{const u=Pg(o);return gm(u,HZ)},lT=o=>{const u=Pg(o);return gm(u,rae)},WM=o=>{const u=Pg(o);return gm(u,iae)},jM=(o,u,m)=>(o+u)/2-m,ZM=(o,u)=>{const m=Pg(o),v=Pg(u),C=gm(m,UM),x=gm(m,VZ),I=gm(v,UM);return jM(C,x,I)},qM=(o,u)=>{const m=Pg(o),v=Pg(u),C=gm(m,HM),x=gm(m,HZ),I=gm(v,HM);return jM(C,x,I)},H_=(o,u)=>{ps(o,c7(),{value:u})},GM=(o,u,m)=>{const v={min:v3(u),max:y3(u),range:AM(u),value:m,step:B_(u),snap:RM(u),snapStart:DM(u),rounded:LM(u),hasMinEdge:NZ(u),hasMaxEdge:PM(u),minBound:iT(o),maxBound:UZ(o),screenRange:lT(o)};return BM(v)},KM=(o,u,m)=>{const v=GM(o,u,m);return H_(o,v),v},U_=(o,u)=>{const m=v3(u);H_(o,m)},zZ=(o,u)=>{const m=y3(u);H_(o,m)},WZ=(o,u,m,v)=>{const x=(o>0?$M:m7)(dv(m),v3(m),y3(m),B_(m,v));return H_(u,x),V.some(x)},YM=o=>(u,m,v)=>WZ(o,u,m,v).map(Ue),aae=o=>u7(o).map(m=>m.left),lae=(o,u,m,v,C)=>{const I=lT(o),F=v.bind(oe=>V.some(ZM(oe,o))).getOr(0),U=C.bind(oe=>V.some(ZM(oe,o))).getOr(I),X={min:v3(u),max:y3(u),range:AM(u),value:m,hasMinEdge:NZ(u),hasMaxEdge:PM(u),minBound:iT(o),maxBound:UZ(o),maxOffset:I,centerMinEdge:F,centerMaxEdge:U};return VM(X)},z_=(o,u,m,v,C,x)=>{const I=lae(u,x,m,v,C);return iT(u)-iT(o)+I},cae=(o,u,m,v)=>{const C=dv(m),x=z_(o,v.getSpectrum(o),C,v.getLeftEdge(o),v.getRightEdge(o),m),I=oo(u.element)/2;wn(u.element,"left",x-I+"px")},uae=YM(-1),jZ=YM(1),ZZ=V.none,XM=V.none,qZ={"top-left":V.none(),top:V.none(),"top-right":V.none(),right:V.some(MM),"bottom-right":V.none(),bottom:V.none(),"bottom-left":V.none(),left:V.some(NM)};var yd=Object.freeze({__proto__:null,setValueFrom:KM,setToMin:U_,setToMax:zZ,findValueOfOffset:GM,getValueFromEvent:aae,findPositionOfValue:z_,setPositionFromValue:cae,onLeft:uae,onRight:jZ,onUp:ZZ,onDown:XM,edgeActions:qZ});const h7=(o,u)=>{ps(o,c7(),{value:u})},JM=(o,u,m)=>{const v={min:b3(u),max:_3(u),range:OM(u),value:m,step:B_(u),snap:RM(u),snapStart:DM(u),rounded:LM(u),hasMinEdge:FZ(u),hasMaxEdge:$Z(u),minBound:aT(o),maxBound:zM(o),screenRange:WM(o)};return BM(v)},dae=(o,u,m)=>{const v=JM(o,u,m);return h7(o,v),v},GZ=(o,u)=>{const m=b3(u);h7(o,m)},fae=(o,u)=>{const m=_3(u);h7(o,m)},pae=(o,u,m,v)=>{const x=(o>0?$M:m7)(dv(m),b3(m),_3(m),B_(m,v));return h7(u,x),V.some(x)},KZ=o=>(u,m,v)=>pae(o,u,m,v).map(Ue),YZ=o=>u7(o).map(m=>m.top),Mg=(o,u,m,v,C)=>{const I=WM(o),F=v.bind(oe=>V.some(qM(oe,o))).getOr(0),U=C.bind(oe=>V.some(qM(oe,o))).getOr(I),X={min:b3(u),max:_3(u),range:OM(u),value:m,hasMinEdge:FZ(u),hasMaxEdge:$Z(u),minBound:aT(o),maxBound:zM(o),maxOffset:I,centerMinEdge:F,centerMaxEdge:U};return VM(X)},g7=(o,u,m,v,C,x)=>{const I=Mg(u,x,m,v,C);return aT(u)-aT(o)+I},XZ=(o,u,m,v)=>{const C=dv(m),x=g7(o,v.getSpectrum(o),C,v.getTopEdge(o),v.getBottomEdge(o),m),I=Wi(u.element)/2;wn(u.element,"top",x-I+"px")},cT=V.none,QM=V.none,mae=KZ(-1),hae=KZ(1),gae={"top-left":V.none(),top:V.some(Xie),"top-right":V.none(),right:V.none(),"bottom-right":V.none(),bottom:V.some(tae),"bottom-left":V.none(),left:V.none()};var vae=Object.freeze({__proto__:null,setValueFrom:dae,setToMin:GZ,setToMax:fae,findValueOfOffset:JM,getValueFromEvent:YZ,findPositionOfValue:g7,setPositionFromValue:XZ,onLeft:cT,onRight:QM,onUp:mae,onDown:hae,edgeActions:gae});const uT=(o,u)=>{ps(o,c7(),{value:u})},dT=(o,u)=>({x:o,y:u}),bae=(o,u,m)=>{const v=GM(o,u,m.left),C=JM(o,u,m.top),x=dT(v,C);return uT(o,x),x},JZ=(o,u,m,v,C)=>{const x=o>0?$M:m7,I=u?dv(v).x:x(dv(v).x,v3(v),y3(v),B_(v,C)),F=u?x(dv(v).y,b3(v),_3(v),B_(v,C)):dv(v).y;return uT(m,dT(I,F)),V.some(I)},fT=(o,u)=>(m,v,C)=>JZ(o,u,m,v,C).map(Ue),Ng=(o,u)=>{const m=v3(u),v=b3(u);uT(o,dT(m,v))},pT=(o,u)=>{const m=y3(u),v=_3(u);uT(o,dT(m,v))},yae=o=>u7(o),_ae=(o,u,m,v)=>{const C=dv(m),x=z_(o,v.getSpectrum(o),C.x,v.getLeftEdge(o),v.getRightEdge(o),m),I=g7(o,v.getSpectrum(o),C.y,v.getTopEdge(o),v.getBottomEdge(o),m),F=oo(u.element)/2,U=Wi(u.element)/2;wn(u.element,"left",x-F+"px"),wn(u.element,"top",I-U+"px")},QZ=fT(-1,!1),eq=fT(1,!1),eN=fT(-1,!0),mT=fT(1,!0),v7={"top-left":V.some(fv),top:V.some(p7),"top-right":V.some(Jie),right:V.some(Qie),"bottom-right":V.some(eae),bottom:V.some(BZ),"bottom-left":V.some(nae),left:V.some(FM)};var b7=Object.freeze({__proto__:null,setValueFrom:bae,setToMin:Ng,setToMax:pT,getValueFromEvent:yae,setPositionFromValue:_ae,onLeft:QZ,onRight:eq,onUp:eN,onDown:mT,edgeActions:v7});const tq=[mt("stepSize",1),mt("speedMultiplier",10),mt("onChange",z),mt("onChoose",z),mt("onInit",z),mt("onDragStart",z),mt("onDragEnd",z),mt("snapToGrid",!1),mt("rounded",!0),ur("snapStart"),cr("model",dl("mode",{x:[mt("minX",0),mt("maxX",100),nr("value",o=>ds(o.mode.minX)),Zt("getInitialValue"),ci("manager",yd)],y:[mt("minY",0),mt("maxY",100),nr("value",o=>ds(o.mode.minY)),Zt("getInitialValue"),ci("manager",vae)],xy:[mt("minX",0),mt("maxX",100),mt("minY",0),mt("maxY",100),nr("value",o=>ds({x:o.mode.minX,y:o.mode.minY})),Zt("getInitialValue"),ci("manager",b7)]})),Ll("sliderBehaviours",[fs,Dn]),nr("mouseIsDown",()=>ds(!1))],vm=$c({name:"Slider",configFields:tq,partFields:Zie,factory:(o,u,m,v)=>{const C=Mt=>am(Mt,o,"thumb"),x=Mt=>am(Mt,o,"spectrum"),I=Mt=>Yr(Mt,o,"left-edge"),F=Mt=>Yr(Mt,o,"right-edge"),U=Mt=>Yr(Mt,o,"top-edge"),X=Mt=>Yr(Mt,o,"bottom-edge"),oe=o.model,me=oe.manager,Se=(Mt,en)=>{me.setPositionFromValue(Mt,en,o,{getLeftEdge:I,getRightEdge:F,getTopEdge:U,getBottomEdge:X,getSpectrum:x})},Ie=(Mt,en)=>{oe.value.set(en);const In=C(Mt);Se(Mt,In)},Pe=(Mt,en)=>{Ie(Mt,en);const In=C(Mt);return o.onChange(Mt,In,en),V.some(!0)},Me=Mt=>{me.setToMin(Mt,o)},at=Mt=>{me.setToMax(Mt,o)},qe=Mt=>{const en=()=>{Yr(Mt,o,"thumb").each(Ft=>{const Mn=oe.value.get();o.onChoose(Mt,Ft,Mn)})},In=o.mouseIsDown.get();o.mouseIsDown.set(!1),In&&en()},dt=(Mt,en)=>{en.stop(),o.mouseIsDown.set(!0),o.onDragStart(Mt,C(Mt))},it=(Mt,en)=>{en.stop(),o.onDragEnd(Mt,C(Mt)),qe(Mt)},It=Mt=>{Yr(Mt,o,"spectrum").map(fs.focusIn)};return{uid:o.uid,dom:o.dom,components:u,behaviours:Ca(o.sliderBehaviours,[fs.config({mode:"special",focusIn:It}),Dn.config({store:{mode:"manual",getValue:Mt=>oe.value.get(),setValue:Ie}}),ju.config({channels:{[n_()]:{onReceive:qe}}})]),events:ni([Wt(c7(),(Mt,en)=>{Pe(Mt,en.event.value)}),$r((Mt,en)=>{const In=oe.getInitialValue();oe.value.set(In);const Ft=C(Mt);Se(Mt,Ft);const Mn=x(Mt);o.onInit(Mt,Ft,Mn,oe.value.get())}),Wt(op(),dt),Wt(e1(),it),Wt(fd(),(Mt,en)=>{It(Mt),dt(Mt,en)}),Wt(oy(),it)]),apis:{resetToMin:Me,resetToMax:at,setValue:Ie,refresh:Se},domModification:{styles:{position:"relative"}}}},apis:{setValue:(o,u,m)=>{o.setValue(u,m)},resetToMin:(o,u)=>{o.resetToMin(u)},resetToMax:(o,u)=>{o.resetToMax(u)},refresh:(o,u)=>{o.refresh(u)}}}),hT=Pn("rgb-hex-update"),nq=Pn("slider-update"),sq=Pn("palette-update"),Cae=(o,u)=>{const m=vm.parts.spectrum({dom:{tag:"div",classes:[u("hue-slider-spectrum")],attributes:{role:"presentation"}}}),v=vm.parts.thumb({dom:{tag:"div",classes:[u("hue-slider-thumb")],attributes:{role:"presentation"}}});return vm.sketch({dom:{tag:"div",classes:[u("hue-slider")],attributes:{role:"slider","aria-valuemin":0,"aria-valuemax":360,"aria-valuenow":120}},rounded:!1,model:{mode:"y",getInitialValue:J(0)},components:[m,v],sliderBehaviours:cn([As.config({})]),onChange:(C,x,I)=>{jt(C.element,"aria-valuenow",Math.floor(360-I*3.6)),ps(C,nq,{value:I})}})},oq="form",wae=[Ll("formBehaviours",[Dn])],tN=o=>"<alloy.field."+o+">",rq=o=>{const u=(()=>{const x=[];return{field:(F,U)=>(x.push(F),l_(oq,tN(F),U)),record:J(x)}})(),m=o(u),v=u.record(),C=ct(v,x=>Sc({name:x,pname:tN(x)}));return Jy(oq,wae,C,iq,m)},Eae=(o,u)=>o.fold(()=>no.error(u),no.value),iq=(o,u)=>({uid:o.uid,dom:o.dom,components:u,behaviours:Ca(o.formBehaviours,[Dn.config({store:{mode:"manual",getValue:m=>{const v=Dk(m,o);return Rs(v,(C,x)=>C().bind(I=>{const F=Lo.getCurrent(I);return Eae(F,new Error("Cannot find a current component to extract the value from for form part '".concat(x,"': ")+zu(I.element)))}).map(Dn.getValue))},setValue:(m,v)=>{Qs(v,(C,x)=>{Yr(m,o,x).each(I=>{Lo.getCurrent(I).each(F=>{Dn.setValue(F,C)})})})}}})]),apis:{getField:(m,v)=>Yr(m,o,v).bind(Lo.getCurrent)}}),W_={getField:om((o,u,m)=>o.getField(u,m)),sketch:rq},nN=Pn("valid-input"),ib=Pn("invalid-input"),aq=Pn("validating-input"),gT="colorcustom.rgb.",kae={isEnabled:Ue,setEnabled:z,immediatelyShow:z,immediatelyHide:z},xae=(o,u,m,v,C,x)=>{const I=(Me,at)=>{const qe=at.get();Me!==qe.isEnabled()&&(qe.setEnabled(Me),Me?qe.immediatelyShow():qe.immediatelyHide())},F=(Me,at,qe)=>Sf.config({invalidClass:u("invalid"),notify:{onValidate:dt=>{ps(dt,aq,{type:Me})},onValid:dt=>{I(!1,qe),ps(dt,nN,{type:Me,value:Dn.getValue(dt)})},onInvalid:dt=>{I(!0,qe),ps(dt,ib,{type:Me,value:Dn.getValue(dt)})}},validator:{validate:dt=>{const it=Dn.getValue(dt),It=at(it)?no.value(!0):no.error(o("aria.input.invalid"));return ou.pure(It)},validateOnLoad:!1}}),U=(Me,at,qe,dt,it)=>{const It=ds(kae),Mt=o(gT+"range"),en=Co.parts.label({dom:{tag:"label"},components:[Ci(qe)]}),In=Co.parts.field({data:it,factory:iv,inputAttributes:{type:"text","aria-label":dt,...at==="hex"?{"aria-live":"polite"}:{}},inputClasses:[u("textfield")],inputBehaviours:cn([F(at,Me,It),si.config({}),Yi.config({...C({tooltipText:"",onSetup:Jo=>{It.set({isEnabled:()=>Yi.isEnabled(Jo),setEnabled:rs=>Yi.setEnabled(Jo,rs),immediatelyShow:()=>Yi.immediateOpenClose(Jo,!0),immediatelyHide:()=>Yi.immediateOpenClose(Jo,!1)}),Yi.setEnabled(Jo,!1)},onShow:(Jo,rs)=>{Yi.setComponents(Jo,[{dom:{tag:"p",classes:[u("rgb-warning-note")]},components:[Ci(o(at==="hex"?"colorcustom.rgb.invalidHex":"colorcustom.rgb.invalid"))]}])}})})]),onSetValue:Jo=>{Sf.isInvalid(Jo)&&Sf.run(Jo).get(z)}}),Ft=Pn("aria-invalid"),Mn=or(x("invalid",V.some(Ft),"warning")),En=or({dom:{tag:"div",classes:[u("invalid-icon")]},components:[Mn.asSpec()]}),zn=[en,In,En.asSpec()],go=at!=="hex"?[Co.parts["aria-descriptor"]({text:Mt})]:[],fi=zn.concat(go);return{dom:{tag:"div",attributes:{role:"presentation"},classes:[u("rgb-container")]},components:fi}},X=(Me,at)=>{const qe=J8(at);return W_.getField(Me,"hex").each(dt=>{As.isFocused(dt)||Dn.setValue(Me,{hex:qe.value})}),qe},oe=(Me,at)=>{const qe=at.red,dt=at.green,it=at.blue;Dn.setValue(Me,{red:qe,green:dt,blue:it})},me=or({dom:{tag:"div",classes:[u("rgba-preview")],styles:{"background-color":"white"},attributes:{role:"presentation"}}}),Se=(Me,at)=>{me.getOpt(Me).each(qe=>{wn(qe.element,"background-color","#"+at.value)})};return Gu({factory:()=>{const Me={red:ds(V.some(255)),green:ds(V.some(255)),blue:ds(V.some(255)),hex:ds(V.some("ffffff"))},at=(rs,ln)=>{const On=Q8(ln);oe(rs,On),It(On)},qe=rs=>Me[rs].get(),dt=(rs,ln)=>{Me[rs].set(ln)},it=()=>qe("red").bind(rs=>qe("green").bind(ln=>qe("blue").map(On=>g3(rs,ln,On,1)))),It=rs=>{const ln=rs.red,On=rs.green,Fs=rs.blue;dt("red",V.some(ln)),dt("green",V.some(On)),dt("blue",V.some(Fs))},Mt=(rs,ln)=>{const On=ln.event;On.type!=="hex"?dt(On.type,V.none()):v(rs)},en=(rs,ln)=>{m(rs);const On=qP(ln);dt("hex",V.some(On.value));const Fs=Q8(On);oe(rs,Fs),It(Fs),ps(rs,hT,{hex:On}),Se(rs,On)},In=(rs,ln,On)=>{const Fs=parseInt(On,10);dt(ln,V.some(Fs)),it().each(ao=>{const _s=X(rs,ao);ps(rs,hT,{hex:_s}),Se(rs,_s)})},Ft=rs=>rs.type==="hex",Mn=(rs,ln)=>{const On=ln.event;Ft(On)?en(rs,On.value):In(rs,On.type,On.value)},En=rs=>({label:o(gT+rs+".label"),description:o(gT+rs+".description")}),zn=En("red"),go=En("green"),fi=En("blue"),Jo=En("hex");return Gi(W_.sketch(rs=>({dom:{tag:"form",classes:[u("rgb-form")],attributes:{"aria-label":o("aria.color.picker")}},components:[rs.field("red",Co.sketch(U(XP,"red",zn.label,zn.description,255))),rs.field("green",Co.sketch(U(XP,"green",go.label,go.description,255))),rs.field("blue",Co.sketch(U(XP,"blue",fi.label,fi.description,255))),rs.field("hex",Co.sketch(U(Sj,"hex",Jo.label,Jo.description,"ffffff"))),me.asSpec()],formBehaviours:cn([Sf.config({invalidClass:u("form-invalid")}),zs("rgb-form-events",[Wt(nN,Mn),Wt(ib,Mt),Wt(aq,Mt)])])})),{apis:{updateHex:(rs,ln)=>{Dn.setValue(rs,{hex:ln.value}),at(rs,ln),Se(rs,ln)}}})},name:"RgbForm",configFields:[],apis:{updateHex:(Me,at,qe)=>{Me.updateHex(at,qe)}},extraApis:{}})},Tae=(o,u)=>{const m=vm.parts.spectrum({dom:{tag:"canvas",attributes:{role:"presentation"},classes:[u("sv-palette-spectrum")]}}),v=vm.parts.thumb({dom:{tag:"div",attributes:{role:"presentation"},classes:[u("sv-palette-thumb")],innerHtml:"<div class=".concat(u("sv-palette-inner-thumb"),' role="presentation"></div>')}}),C=(X,oe)=>{const{width:me,height:Se}=X,Ie=X.getContext("2d");if(Ie===null)return;Ie.fillStyle=oe,Ie.fillRect(0,0,me,Se);const Pe=Ie.createLinearGradient(0,0,me,0);Pe.addColorStop(0,"rgba(255,255,255,1)"),Pe.addColorStop(1,"rgba(255,255,255,0)"),Ie.fillStyle=Pe,Ie.fillRect(0,0,me,Se);const Me=Ie.createLinearGradient(0,0,0,Se);Me.addColorStop(0,"rgba(0,0,0,0)"),Me.addColorStop(1,"rgba(0,0,0,1)"),Ie.fillStyle=Me,Ie.fillRect(0,0,me,Se)},x=(X,oe)=>{const me=X.components()[0].element.dom,Se=e7(oe,100,100),Ie=xj(Se);C(me,JP(Ie))},I=(X,oe)=>{const me=nM(Q8(oe));vm.setValue(X,{x:me.saturation,y:100-me.value}),jt(X.element,"aria-valuetext",o(["Saturation {0}%, Brightness {1}%",me.saturation,me.value]))};return Gu({factory:X=>{const oe=J({x:0,y:0}),me=(Pe,Me,at)=>{Z(at)||jt(Pe.element,"aria-valuetext",o(["Saturation {0}%, Brightness {1}%",Math.floor(at.x),Math.floor(100-at.y)])),ps(Pe,sq,{value:at})},Se=(Pe,Me,at,qe)=>{C(at.element.dom,JP(Ij))},Ie=cn([Lo.config({find:V.some}),As.config({})]);return vm.sketch({dom:{tag:"div",attributes:{role:"slider","aria-valuetext":o(["Saturation {0}%, Brightness {1}%",0,0])},classes:[u("sv-palette")]},model:{mode:"xy",getInitialValue:oe},rounded:!1,components:[m,v],onChange:me,onInit:Se,sliderBehaviours:Ie})},name:"SaturationBrightnessPalette",configFields:[],apis:{setHue:(X,oe,me)=>{x(oe,me)},setThumb:(X,oe,me)=>{I(oe,me)}},extraApis:{}})},Iae=(o,u,m,v)=>{const C=I=>{const F=xae(o,u,I.onValidHex,I.onInvalidHex,m,v),U=Tae(o,u),X=Ft=>(100-Ft)/100*360,oe=Ft=>100-Ft/360*100,me={paletteRgba:ds(Ij),paletteHue:ds(0)},Se=or(Cae(o,u)),Ie=or(U.sketch({})),Pe=or(F.sketch({})),Me=(Ft,Mn,En)=>{Ie.getOpt(Ft).each(zn=>{U.setHue(zn,En)})},at=(Ft,Mn)=>{Pe.getOpt(Ft).each(En=>{F.updateHex(En,Mn)})},qe=(Ft,Mn,En)=>{Se.getOpt(Ft).each(zn=>{vm.setValue(zn,oe(En))})},dt=(Ft,Mn)=>{Ie.getOpt(Ft).each(En=>{U.setThumb(En,Mn)})},it=(Ft,Mn)=>{const En=Q8(Ft);me.paletteRgba.set(En),me.paletteHue.set(Mn)},It=(Ft,Mn,En,zn)=>{it(Mn,En),Ht(zn,go=>{go(Ft,Mn,En)})},Mt=()=>{const Ft=[at];return(Mn,En)=>{const zn=En.event.value,go=me.paletteHue.get(),fi=e7(go,zn.x,100-zn.y),Jo=Mj(fi);It(Mn,Jo,go,Ft)}},en=()=>{const Ft=[Me,at];return(Mn,En)=>{const zn=X(En.event.value),go=me.paletteRgba.get(),fi=nM(go),Jo=e7(zn,fi.saturation,fi.value),rs=Mj(Jo);It(Mn,rs,zn,Ft)}},In=()=>{const Ft=[Me,qe,dt];return(Mn,En)=>{const zn=En.event.hex,go=Ore(zn);It(Mn,zn,go.hue,Ft)}};return{uid:I.uid,dom:I.dom,components:[Ie.asSpec(),Se.asSpec(),Pe.asSpec()],behaviours:cn([zs("colour-picker-events",[Wt(hT,In()),Wt(sq,Mt()),Wt(nq,en())]),Lo.config({find:Ft=>Pe.getOpt(Ft)}),fs.config({mode:"acyclic"})])}};return Gu({name:"ColourPicker",configFields:[Zt("dom"),mt("onValidHex",z),mt("onInvalidHex",z)],factory:C})},wp={self:()=>Lo.config({find:V.some}),memento:o=>Lo.config({find:o.getOpt}),childAt:o=>Lo.config({find:u=>Si(u.element,o).bind(m=>u.getSystem().getByDom(m).toOptional())})},pv=Ns([mt("preprocess",ce),mt("postprocess",ce)]),sN=(o,u)=>{const m=yu("RepresentingConfigs.memento processors",pv,u);return Dn.config({store:{mode:"manual",getValue:v=>{const C=o.get(v),x=Dn.getValue(C);return m.postprocess(x)},setValue:(v,C)=>{const x=m.preprocess(C),I=o.get(v);Dn.setValue(I,x)}}})},ab=(o,u,m)=>Dn.config({store:{mode:"manual",...o.map(v=>({initialValue:v})).getOr({}),getValue:u,setValue:m}}),oN=(o,u,m)=>ab(o,v=>u(v.element),(v,C)=>m(v.element,C)),rN=o=>oN(o,_y,Mi),y7=o=>Dn.config({store:{mode:"memory",initialValue:o}}),vT={"colorcustom.rgb.red.label":"R","colorcustom.rgb.red.description":"Red channel","colorcustom.rgb.green.label":"G","colorcustom.rgb.green.description":"Green channel","colorcustom.rgb.blue.label":"B","colorcustom.rgb.blue.description":"Blue channel","colorcustom.rgb.hex.label":"#","colorcustom.rgb.hex.description":"Hex color code","colorcustom.rgb.range":"Range 0 to 255","colorcustom.rgb.invalid":"Numbers only, 0 to 255","colorcustom.rgb.invalidHex":"Hexadecimal only, 000000 to FFFFFF","aria.color.picker":"Color Picker","aria.input.invalid":"Invalid input"},lq=o=>u=>d(u)?o.translate(vT[u]):o.translate(u),cq=(o,u,m)=>{const v=X=>"tox-"+X,C=(X,oe,me=X,Se=X)=>_p(me,{tag:"div",classes:["tox-icon","tox-control-wrap__status-icon-"+X],attributes:{title:u.translate(Se),"aria-live":"polite",...oe.fold(()=>({}),Ie=>({id:Ie}))}},u.icons),x=Iae(lq(u),v,u.tooltips.getConfig,C),I=X=>{ps(X,w1,{name:"hex-valid",value:!0})},F=X=>{ps(X,w1,{name:"hex-valid",value:!1})},U=or(x.sketch({dom:{tag:"div",classes:[v("color-picker-container")],attributes:{role:"presentation"}},onValidHex:I,onInvalidHex:F}));return{dom:{tag:"div"},components:[U.asSpec()],behaviours:cn([ab(m,X=>{const oe=U.get(X);return Lo.getCurrent(oe).bind(Ie=>Dn.getValue(Ie).hex).map(Ie=>"#"+uc(Ie,"#")).getOr("")},(X,oe)=>{const me=/^#([a-fA-F0-9]{3}(?:[a-fA-F0-9]{3})?)/,Se=V.from(me.exec(oe)).bind(Me=>pt(Me,1)),Ie=U.get(X);Lo.getCurrent(Ie).fold(()=>{console.log("Can not find form")},Me=>{Dn.setValue(Me,{hex:Se.getOr("")}),W_.getField(Me,"hex").each(at=>{vo(at,Xm())})})}),wp.self()])}};var Rae=tinymce.util.Tools.resolve("tinymce.Resource");const uq=o=>qs(o,"init"),Dae=o=>{const u=vr(),m=or({dom:{tag:o.tag}}),v=vr(),C=!uq(o)&&o.onFocus.isSome()?[As.config({onFocus:x=>{o.onFocus.each(I=>{I(x.element.dom)})}}),si.config({})]:[];return{dom:{tag:"div",classes:["tox-custom-editor"]},behaviours:cn([zs("custom-editor-events",[$r(x=>{m.getOpt(x).each(I=>{(uq(o)?o.init(I.element.dom):Rae.load(o.scriptId,o.scriptUrl).then(F=>F(I.element.dom,o.settings))).then(F=>{v.on(U=>{F.setValue(U)}),v.clear(),u.set(F)})})})]),ab(V.none(),()=>u.get().fold(()=>v.get().getOr(""),x=>x.getValue()),(x,I)=>{u.get().fold(()=>v.set(I),F=>F.setValue(I))}),wp.self()].concat(C)),components:[m.asSpec()]}};var mv=tinymce.util.Tools.resolve("tinymce.util.Tools");const iN=Pn("browse.files.event"),dq=(o,u)=>{const m=mv.explode(u.getOption("images_file_types")),v=C=>ht(m,x=>mi(C.name.toLowerCase(),".".concat(x.toLowerCase())));return jn(Wn(o),v)},fq=(o,u,m)=>{const v=(Se,Ie)=>{Ie.stop()},C=Se=>(Ie,Pe)=>{Ht(Se,Me=>{Me(Ie,Pe)})},x=(Se,Ie)=>{var Pe;if(!Xn.isDisabled(Se)){const Me=Ie.event.raw;ps(Se,iN,{files:(Pe=Me.dataTransfer)===null||Pe===void 0?void 0:Pe.files})}},I=(Se,Ie)=>{const Pe=Ie.event.raw.target;ps(Se,iN,{files:Pe.files})},F=(Se,Ie)=>{Ie&&(Dn.setValue(Se,dq(Ie,u)),ps(Se,Yu,{name:o.name}))},U=or({dom:{tag:"input",attributes:{type:"file",accept:"image/*"},styles:{display:"none"}},behaviours:cn([zs("input-file-events",[cg(Jm()),cg(ry())])])}),X=o.label.map(Se=>tb(Se,u)),oe=Co.parts.field({factory:_l,dom:{tag:"button",styles:{position:"relative"},classes:["tox-button","tox-button--secondary"]},components:[Ci(u.translate("Browse for an image")),U.asSpec()],action:Se=>{U.get(Se).element.dom.click()},buttonBehaviours:cn([wp.self(),y7(m.getOr([])),si.config({}),pm.button(()=>u.checkUiComponentContext(o.context).shouldDisable),wa(()=>u.checkUiComponentContext(o.context))])}),me={dom:{tag:"div",classes:["tox-dropzone-container"]},behaviours:cn([Xn.config({disabled:()=>u.checkUiComponentContext(o.context).shouldDisable}),wa(()=>u.checkUiComponentContext(o.context)),po.config({toggleClass:"dragenter",toggleOnExecute:!1}),zs("dropzone-events",[Wt("dragenter",C([v,po.toggle])),Wt("dragleave",C([v,po.toggle])),Wt("dragover",v),Wt("drop",C([v,x])),Wt(t1(),I)])]),components:[{dom:{tag:"div",classes:["tox-dropzone"],styles:{}},components:[{dom:{tag:"p"},components:[Ci(u.translate("Drop an image here"))]},oe]}]};return i7(X,me,["tox-form__group--stretched"],[zs("handle-files",[Wt(iN,(Se,Ie)=>{Co.getField(Se).each(Pe=>{F(Pe,Ie.event.files)})})])])},Lae=(o,u)=>({dom:{tag:"div",classes:["tox-form__grid","tox-form__grid--".concat(o.columns,"col")]},components:ct(o.items,u.interpreter)}),Pae=(o,u)=>{let m=null,v=null;return{cancel:()=>{k(m)||(clearTimeout(m),m=null,v=null)},throttle:(...I)=>{v=I,k(m)&&(m=setTimeout(()=>{const F=v;m=null,v=null,o.apply(null,F)},u))}}},Mae=(o,u)=>{let m=null;return{cancel:()=>{k(m)||(clearTimeout(m),m=null)},throttle:(...x)=>{k(m)&&(m=setTimeout(()=>{m=null,o.apply(null,x)},u))}}},j_=(o,u)=>{let m=null;const v=()=>{k(m)||(clearTimeout(m),m=null)};return{cancel:v,throttle:(...x)=>{v(),m=setTimeout(()=>{m=null,o.apply(null,x)},u)}}},aN=Pn("alloy-fake-before-tabstop"),lN=Pn("alloy-fake-after-tabstop"),cN=o=>({dom:{tag:"div",styles:{width:"1px",height:"1px",outline:"none"},attributes:{tabindex:"0"},classes:o},behaviours:cn([As.config({ignore:!0}),si.config({})])}),uN=(o,u)=>({dom:{tag:"div",classes:["tox-navobj",...o.getOr([])]},components:[cN([aN]),u,cN([lN])],behaviours:cn([wp.childAt(1)])}),pq=(o,u)=>{ps(o,gc(),{raw:{which:9,shiftKey:u}})},Nae=(o,u)=>{const m=u.element;Nc(m,aN)?pq(o,!0):Nc(m,lN)&&pq(o,!1)},S3=o=>Lg(o,["."+aN,"."+lN].join(","),$e),bT=Pn("update-dialog"),dN=Pn("update-title"),mq=Pn("update-body"),hq=Pn("update-footer"),gq=Pn("body-send-message"),_7=Pn("dialog-focus-shifted"),yT=Zi().browser,S7=yT.isSafari(),Fae=yT.isFirefox(),vq=S7||Fae,$ae=yT.isChromium(),bq=({scrollTop:o,scrollHeight:u,clientHeight:m})=>Math.ceil(o)+m>=u,yq=(o,u)=>o.scrollTo(0,u==="bottom"?99999999:u),_q=(o,u)=>{const m=o.body;return V.from(!/^<!DOCTYPE (html|HTML)/.test(u)&&(!$ae&&!S7||B(m)&&(m.scrollTop!==0||Math.abs(m.scrollHeight-m.clientHeight)>1))?m:o.documentElement)},Sq=(o,u,m)=>{const v=o.dom;V.from(v.contentDocument).fold(m,C=>{let x=0;const I=_q(C,u).map(U=>(x=U.scrollTop,U)).forall(bq),F=()=>{const U=v.contentWindow;B(U)&&(I?yq(U,"bottom"):!I&&vq&&x!==0&&yq(U,x))};S7&&v.addEventListener("load",F,{once:!0}),C.open(),C.write(u),C.close(),S7||F()})},Bae=Kt(vq,S7?500:200).map(o=>Pae(Sq,o)),Vae=(o,u)=>{const m=ds(o.getOr(""));return{getValue:v=>m.get(),setValue:(v,C)=>{if(m.get()!==C){const x=v.element,I=()=>jt(x,"srcdoc",C);u?Bae.fold(J(Sq),F=>F.throttle)(x,C,I):I()}m.set(C)}}},Hae=(o,u,m)=>{const v="tox-dialog__iframe",C=o.transparent?[]:["".concat(v,"--opaque")],x=o.border?["tox-navobj-bordered"]:[],I={...o.label.map(me=>({title:me})).getOr({}),...m.map(me=>({srcdoc:me})).getOr({}),...o.sandboxed?{sandbox:"allow-scripts allow-same-origin"}:{}},F=Vae(m,o.streamContent),U=o.label.map(me=>tb(me,u)),X=me=>uN(V.from(x),{uid:me.uid,dom:{tag:"iframe",attributes:I,classes:[v,...C]},behaviours:cn([si.config({}),As.config({}),ab(m,F.getValue,F.setValue),ju.config({channels:{[_7]:{onReceive:(Se,Ie)=>{Ie.newFocus.each(Pe=>{jl(Se.element).each(Me=>{(co(Se.element,Pe)?sa:ua)(Me,"tox-navobj-bordered-focus")})})}}}})])}),oe=Co.parts.field({factory:{sketch:X}});return i7(U,oe,["tox-form__group--stretched"],[])},Uae=o=>new Promise((u,m)=>{const v=()=>{x(),u(o)},C=[wu(o,"load",v),wu(o,"error",()=>{x(),m("Unable to load data from image: "+o.dom.src)})],x=()=>Ht(C,I=>I.unbind());o.dom.complete&&v()}),zae=(o,u,m,v,C)=>{const x=m*C,I=v*C,F=Math.max(0,o/2-x/2),U=Math.max(0,u/2-I/2);return{left:F.toString()+"px",top:U.toString()+"px",width:x.toString()+"px",height:I.toString()+"px"}},Wae=(o,u,m)=>{const v=oo(o),C=Wi(o);return Math.min(v/u,C/m,1)},jae=(o,u)=>{const m=ds(u.getOr({url:""})),v=or({dom:{tag:"img",classes:["tox-imagepreview__image"],attributes:u.map(U=>({src:U.url})).getOr({})}}),C=or({dom:{tag:"div",classes:["tox-imagepreview__container"],attributes:{role:"presentation"}},components:[v.asSpec()]}),x=(U,X)=>{const oe={url:X.url};X.zoom.each(Se=>oe.zoom=Se),X.cachedWidth.each(Se=>oe.cachedWidth=Se),X.cachedHeight.each(Se=>oe.cachedHeight=Se),m.set(oe);const me=()=>{const{cachedWidth:Se,cachedHeight:Ie,zoom:Pe}=oe;if(!O(Se)&&!O(Ie)){if(O(Pe)){const at=Wae(U.element,Se,Ie);oe.zoom=at}const Me=zae(oo(U.element),Wi(U.element),Se,Ie,oe.zoom);C.getOpt(U).each(at=>{Vo(at.element,Me)})}};v.getOpt(U).each(Se=>{const Ie=Se.element;X.url!==eo(Ie,"src")&&(jt(Ie,"src",X.url),ua(U.element,"tox-imagepreview__loaded")),me(),Uae(Ie).then(Pe=>{U.getSystem().isConnected()&&(sa(U.element,"tox-imagepreview__loaded"),oe.cachedWidth=Pe.dom.naturalWidth,oe.cachedHeight=Pe.dom.naturalHeight,me())})})},I={};o.height.each(U=>I.height=U);const F=u.map(U=>({url:U.url,zoom:V.from(U.zoom),cachedWidth:V.from(U.cachedWidth),cachedHeight:V.from(U.cachedHeight)}));return{dom:{tag:"div",classes:["tox-imagepreview"],styles:I,attributes:{role:"presentation"}},components:[C.asSpec()],behaviours:cn([wp.self(),ab(F,()=>m.get(),x)])}},fN=(o,u,m)=>{const v="tox-label",C=o.align==="center"?["".concat(v,"--center")]:[],x=o.align==="end"?["".concat(v,"--end")]:[],I=or({dom:{tag:"label",classes:[v,...C,...x]},components:[Ci(u.providers.translate(o.label))]}),F=ct(o.items,u.interpreter);return{dom:{tag:"div",classes:["tox-form__group"]},components:[I.asSpec(),...F],behaviours:cn([wp.self(),Bs.config({}),rN(V.none()),fs.config({mode:"acyclic"}),zs("label",[$r(U=>{o.for.each(X=>{m(X).each(oe=>{I.getOpt(U).each(me=>{var Se;const Ie=(Se=eo(oe.element,"id"))!==null&&Se!==void 0?Se:Pn("form-field");jt(oe.element,"id",Ie),jt(me.element,"for",Ie)})})})})])])}},Cq=Pn("toolbar.button.execute"),Zae=o=>r1((u,m)=>{Vx(o,u)(v=>{ps(u,Cq,{buttonApi:v}),o.onAction(v)})}),lb=Pn("common-button-display-events"),Z_={[Mc()]:["disabling","alloy.base.behaviour","toggling","toolbar-button-events","tooltipping"],[lp()]:["toolbar-button-events",lb],[cp()]:["toolbar-button-events","dropdown-events","tooltipping"],[fd()]:["focusing","alloy.base.behaviour",lb]},C7=o=>wn(o.element,"width",Gt(o.element,"width")),wq=(o,u,m)=>_p(o,{tag:"span",classes:["tox-icon","tox-tbtn__icon-wrap"],behaviours:m},u),pN=(o,u)=>wq(o,u,[]),Fg=(o,u)=>wq(o,u,[Bs.config({})]),Eq=(o,u,m)=>({dom:{tag:"span",classes:["".concat(u,"__select-label")]},components:[Ci(m.translate(o))],behaviours:cn([Bs.config({})])}),wf=Pn("update-menu-text"),cb=Pn("update-menu-icon"),mN=(o,u,m,v)=>{const C=ds(z),x=o.text.map(Me=>or(Eq(Me,u,m.providers))),I=o.icon.map(Me=>or(Fg(Me,m.providers.icons))),F=(Me,at)=>{const qe=Dn.getValue(Me);return As.focus(qe),ps(qe,"keydown",{raw:at.event.raw}),Sp.close(qe),V.some(!0)},U=o.role.fold(()=>({}),Me=>({role:Me})),X=V.from(o.listRole).map(Me=>({listRole:Me})).getOr({}),oe=o.ariaLabel.fold(()=>({}),Me=>({"aria-label":m.providers.translate(Me)})),me=_p("chevron-down",{tag:"div",classes:["".concat(u,"__select-chevron")]},m.providers.icons),Se=Pn("common-button-display-events"),Ie="dropdown-events";return or(Sp.sketch({...o.uid?{uid:o.uid}:{},...U,...X,dom:{tag:"button",classes:[u,"".concat(u,"--select")].concat(ct(o.classes,Me=>"".concat(u,"--").concat(Me))),attributes:{...oe,...B(v)?{"data-mce-name":v}:{}}},components:R_([I.map(Me=>Me.asSpec()),x.map(Me=>Me.asSpec()),V.some(me)]),matchWidth:!0,useMinWidth:!0,onOpen:(Me,at,qe)=>{o.searchable&&bie(qe)},dropdownBehaviours:cn([...o.dropdownBehaviours,pm.button(()=>o.disabled||m.providers.checkUiComponentContext(o.context).shouldDisable),wa(()=>m.providers.checkUiComponentContext(o.context)),sb.config({}),Bs.config({}),...o.tooltip.map(Me=>Yi.config(m.providers.tooltips.getConfig({tooltipText:m.providers.translate(Me)}))).toArray(),zs(Ie,[S1(o,C),_h(o,C)]),zs(Se,[$r((Me,at)=>{o.listRole!=="listbox"&&C7(Me)})]),zs("update-dropdown-width-variable",[Wt(t2(),(Me,at)=>Sp.close(Me))]),zs("menubutton-update-display-text",[Wt(wf,(Me,at)=>{x.bind(qe=>qe.getOpt(Me)).each(qe=>{Bs.set(qe,[Ci(m.providers.translate(at.event.text))])})}),Wt(cb,(Me,at)=>{I.bind(qe=>qe.getOpt(Me)).each(qe=>{Bs.set(qe,[Fg(at.event.icon,m.providers.icons)])})})])]),eventOrder:Gi(Z_,{[fd()]:["focusing","alloy.base.behaviour","item-type-events","normal-dropdown-events"],[lp()]:["toolbar-button-events",Yi.name(),Ie,Se]}),sandboxBehaviours:cn([fs.config({mode:"special",onLeft:F,onRight:F}),zs("dropdown-sandbox-events",[Wt(UW,(Me,at)=>{OCe(Me),at.stop()}),Wt(zW,(Me,at)=>{Jx(Me,at),at.stop()})])]),lazySink:m.getSink,toggleClass:"".concat(u,"--active"),parts:{menu:{...Ax(!1,o.columns,o.presets),fakeFocus:o.searchable,...o.listRole==="listbox"?{}:{onHighlightItem:vM,onCollapseMenu:(Me,at,qe)=>{Re.getHighlighted(qe).each(dt=>{vM(Me,qe,dt)})},onDehighlightItem:vie}}},getAnchorOverrides:()=>({maxHeightFunction:(Me,at)=>{C6()(Me,at-10)}}),fetch:Me=>ou.nu(de(o.fetch,Me))})).asSpec()},qae=o=>d(o),hN=o=>o.type==="separator",kq=o=>qs(o,"getSubmenuItems"),Gae={type:"separator"},xq=(o,u)=>{const m=Xs(o,(v,C)=>qae(C)?C===""?v:C==="|"?v.length>0&&!hN(v[v.length-1])?v.concat([Gae]):v:qs(u,C.toLowerCase())?v.concat([u[C.toLowerCase()]]):v:v.concat([C]),[]);return m.length>0&&hN(m[m.length-1])&&m.pop(),m},Tq=(o,u)=>{const m=o.getSubmenuItems(),v=gN(m,u),C=Gi(v.menus,{[o.value]:v.items}),x=Gi(v.expansions,{[o.value]:o.value});return{item:o,menus:C,expansions:x}},Kae=o=>{const u=bn(o,"value").getOrThunk(()=>Pn("generated-menu-item"));return Gi({value:u},o)},gN=(o,u)=>{const m=xq(d(o)?o.split(" "):o,u);return so(m,(v,C)=>{if(kq(C)){const x=Kae(C),I=Tq(x,u);return{menus:Gi(v.menus,I.menus),items:[I.item,...v.items],expansions:Gi(v.expansions,I.expansions)}}else return{...v,items:[C,...v.items]}},{menus:{},expansions:{},items:[]})},Iq=o=>o.search.fold(()=>({searchMode:"no-search"}),u=>({searchMode:"search-with-field",placeholder:u.placeholder})),Aq=o=>o.search.fold(()=>({searchMode:"no-search"}),u=>({searchMode:"search-with-results"})),q_=(o,u,m,v)=>{const C=Pn("primary-menu"),x=gN(o,m.shared.providers.menuItems());if(x.items.length===0)return V.none();const I=Iq(v),F=iZ(C,x.items,u,m,v.isHorizontalMenu,I),U=Aq(v),X=Rs(x.menus,(me,Se)=>iZ(Se,me,u,m,!1,U)),oe=Gi(X,rg(C,F));return V.from(j2.tieredData(C,oe,x.expansions))},_T=o=>!qs(o,"items"),Oq="data-value",vN=(o,u,m,v,C)=>ct(m,x=>_T(x)?{type:"togglemenuitem",...C?{}:{role:"option"},text:x.text,value:x.value,active:x.value===v,onAction:()=>{Dn.setValue(o,x.value),ps(o,Yu,{name:u}),As.focus(o)}}:{type:"nestedmenuitem",text:x.text,getSubmenuItems:()=>vN(o,u,x.items,v,C)}),bN=(o,u)=>ts(o,m=>_T(m)?Kt(m.value===u,m):bN(m.items,u)),Rq=(o,u,m)=>{const v=ht(o.items,X=>!_T(X)),C=u.shared.providers,x=m.bind(X=>bN(o.items,X)).orThunk(()=>Vt(o.items).filter(_T)),I=o.label.map(X=>tb(X,C)),F=Co.parts.field({dom:{},factory:{sketch:X=>mN({context:o.context,uid:X.uid,text:x.map(oe=>oe.text),icon:V.none(),tooltip:V.none(),role:Kt(!v,"combobox"),...v?{}:{listRole:"listbox"},ariaLabel:o.label,fetch:(oe,me)=>{const Se=vN(oe,o.name,o.items,Dn.getValue(oe),v);me(q_(Se,um.CLOSE_ON_EXECUTE,u,{isHorizontalMenu:!1,search:V.none()}))},onSetup:J(z),getApi:J({}),columns:1,presets:"normal",classes:[],dropdownBehaviours:[si.config({}),ab(x.map(oe=>oe.value),oe=>eo(oe.element,Oq),(oe,me)=>{bN(o.items,me).each(Se=>{jt(oe.element,Oq,Se.value),ps(oe,wf,{text:Se.text})})})]},"tox-listbox",u.shared)}}),U={dom:{tag:"div",classes:["tox-listboxfield"]},components:[F]};return Co.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:Nt([I.toArray(),[U]]),fieldBehaviours:cn([Xn.config({disabled:()=>!o.enabled||C.checkUiComponentContext(o.context).shouldDisable,onDisabled:X=>{Co.getField(X).each(Xn.disable)},onEnabled:X=>{Co.getField(X).each(Xn.enable)}})])})},Yae=(o,u)=>({dom:{tag:"div",classes:o.classes},components:ct(o.items,u.shared.interpreter)}),Xae=(o,u)=>{const m=ct(o.options,C=>({dom:{tag:"option",value:C.value,innerHtml:C.text}})),v=o.data.map(C=>rg("initialValue",C)).getOr({});return{uid:o.uid,dom:{tag:"select",classes:o.selectClasses,attributes:o.selectAttributes},components:m,behaviours:Ca(o.selectBehaviours,[As.config({}),Dn.config({store:{mode:"manual",getValue:C=>$t(C.element),setValue:(C,x)=>{const I=Vt(o.options);Qe(o.options,U=>U.value===x).isSome()?rh(C.element,x):C.element.dom.selectedIndex===-1&&x===""&&I.each(U=>rh(C.element,U.value))},...v}})])}},yN=Gu({name:"HtmlSelect",configFields:[Zt("options"),Ll("selectBehaviours",[As,Dn]),mt("selectClasses",[]),mt("selectAttributes",{}),ur("data")],factory:Xae}),Jae=(o,u,m)=>{const v=ct(o.items,U=>({text:u.translate(U.text),value:U.value})),C=o.label.map(U=>tb(U,u)),x=Co.parts.field({dom:{},...m.map(U=>({data:U})).getOr({}),selectAttributes:{size:o.size},options:v,factory:yN,selectBehaviours:cn([Xn.config({disabled:()=>!o.enabled||u.checkUiComponentContext(o.context).shouldDisable}),si.config({}),zs("selectbox-change",[Wt(t1(),(U,X)=>{ps(U,Yu,{name:o.name})})])])}),I=o.size>1?V.none():V.some(_p("chevron-down",{tag:"div",classes:["tox-selectfield__icon-js"]},u.icons)),F={dom:{tag:"div",classes:["tox-selectfield"]},components:Nt([[x],I.toArray()])};return Co.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:Nt([C.toArray(),[F]]),fieldBehaviours:cn([Xn.config({disabled:()=>!o.enabled||u.checkUiComponentContext(o.context).shouldDisable,onDisabled:U=>{Co.getField(U).each(Xn.disable)},onEnabled:U=>{Co.getField(U).each(Xn.enable)}}),wa(()=>u.checkUiComponentContext(o.context))])})},Qae=J([mt("field1Name","field1"),mt("field2Name","field2"),Nd("onLockedChange"),sm(["lockClass"]),mt("locked",!1),Vd.field("coupledFieldBehaviours",[Lo,Dn]),Kr("onInput",z)]),ele=(o,u,m)=>Yr(o,u,m).bind(Lo.getCurrent),ST=(o,u)=>Sc({factory:Co,name:o,overrides:m=>({fieldBehaviours:cn([zs("coupled-input-behaviour",[Wt(Xm(),v=>{ele(v,m,u).each(C=>{Yr(v,m,"lock").each(x=>{po.isOn(x)&&m.onLockedChange(v,C,x),m.onInput(v)})})})])])})}),tle=J([ST("field1","field2"),ST("field2","field1"),Sc({factory:_l,schema:[Zt("dom")],name:"lock",overrides:o=>({buttonBehaviours:cn([po.config({selected:o.locked,toggleClass:o.markers.lockClass,aria:{mode:"pressed"}})])})})]),Dq=(o,u,m,v)=>({uid:o.uid,dom:o.dom,components:u,behaviours:Vd.augment(o.coupledFieldBehaviours,[Lo.config({find:V.some}),Dn.config({store:{mode:"manual",getValue:C=>{const x=u_(C,o,["field1","field2"]);return{[o.field1Name]:Dn.getValue(x.field1()),[o.field2Name]:Dn.getValue(x.field2())}},setValue:(C,x)=>{const I=u_(C,o,["field1","field2"]);Qr(x,o.field1Name)&&Dn.setValue(I.field1(),x[o.field1Name]),Qr(x,o.field2Name)&&Dn.setValue(I.field2(),x[o.field2Name])}}})]),apis:{getField1:C=>Yr(C,o,"field1"),getField2:C=>Yr(C,o,"field2"),getLock:C=>Yr(C,o,"lock")}}),Ma=$c({name:"FormCoupledInputs",configFields:Qae(),partFields:tle(),factory:Dq,apis:{getField1:(o,u)=>o.getField1(u),getField2:(o,u)=>o.getField2(u),getLock:(o,u)=>o.getLock(u)}}),_N=o=>{const u={"":0,px:0,pt:1,mm:1,pc:2,ex:2,em:2,ch:2,rem:2,cm:3,in:4,"%":4},m=C=>C in u?u[C]:1;let v=o.value.toFixed(m(o.unit));return v.indexOf(".")!==-1&&(v=v.replace(/\.?0*$/,"")),v+o.unit},CT=o=>{const m=/^\s*(\d+(?:\.\d+)?)\s*(|cm|mm|in|px|pt|pc|em|ex|ch|rem|vw|vh|vmin|vmax|%)\s*$/.exec(o);if(m!==null){const v=parseFloat(m[1]),C=m[2];return no.value({value:v,unit:C})}else return no.error(o)},Lq=(o,u)=>{const m={"":96,px:96,pt:72,cm:2.54,pc:12,mm:25.4,in:1},v=C=>qs(m,C);return o.unit===u?V.some(o.value):v(o.unit)&&v(u)?m[o.unit]===m[u]?V.some(o.value):V.some(o.value/m[o.unit]*m[u]):V.none()},wT=o=>V.none(),nle=(o,u)=>m=>Lq(m,u).map(v=>({value:v*o,unit:u})),Pq=(o,u)=>{const m=CT(o).toOptional(),v=CT(u).toOptional();return Zo(m,v,(C,x)=>Lq(C,x.unit).map(I=>x.value/I).map(I=>nle(I,x.unit)).getOr(wT)).getOr(wT)},Mq=(o,u)=>{let m=wT;const v=Pn("ratio-event"),C=Me=>_p(Me,{tag:"span",classes:["tox-icon","tox-lock-icon__"+Me]},u.icons),x=()=>!o.enabled||u.checkUiComponentContext(o.context).shouldDisable,I=wa(()=>u.checkUiComponentContext(o.context)),F=o.label.getOr("Constrain proportions"),U=u.translate(F),X=Ma.parts.lock({dom:{tag:"button",classes:["tox-lock","tox-button","tox-button--naked","tox-button--icon"],attributes:{"aria-label":U,"data-mce-name":F}},components:[C("lock"),C("unlock")],buttonBehaviours:cn([Xn.config({disabled:x}),I,si.config({}),Yi.config(u.tooltips.getConfig({tooltipText:U}))])}),oe=Me=>({dom:{tag:"div",classes:["tox-form__group"]},components:Me}),me=Me=>Co.parts.field({factory:iv,inputClasses:["tox-textfield"],inputBehaviours:cn([Xn.config({disabled:x}),I,si.config({}),zs("size-input-events",[Wt(ip(),(at,qe)=>{ps(at,v,{isField1:Me})}),Wt(t1(),(at,qe)=>{ps(at,Yu,{name:o.name})})])]),selectOnFocus:!1}),Se=Me=>({dom:{tag:"label",classes:["tox-label"]},components:[Ci(u.translate(Me))]}),Ie=Ma.parts.field1(oe([Co.parts.label(Se("Width")),me(!0)])),Pe=Ma.parts.field2(oe([Co.parts.label(Se("Height")),me(!1)]));return Ma.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:[{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:[Ie,Pe,oe([Se(w2),X])]}],field1Name:"width",field2Name:"height",locked:!0,markers:{lockClass:"tox-locked"},onLockedChange:(Me,at,qe)=>{CT(Dn.getValue(Me)).each(dt=>{m(dt).each(it=>{Dn.setValue(at,_N(it))})})},coupledFieldBehaviours:cn([Xn.config({disabled:x,onDisabled:Me=>{Ma.getField1(Me).bind(Co.getField).each(Xn.disable),Ma.getField2(Me).bind(Co.getField).each(Xn.disable),Ma.getLock(Me).each(Xn.disable)},onEnabled:Me=>{Ma.getField1(Me).bind(Co.getField).each(Xn.enable),Ma.getField2(Me).bind(Co.getField).each(Xn.enable),Ma.getLock(Me).each(Xn.enable)}}),wa(()=>u.checkUiComponentContext("mode:design")),zs("size-input-events2",[Wt(v,(Me,at)=>{const qe=at.event.isField1,dt=qe?Ma.getField1(Me):Ma.getField2(Me),it=qe?Ma.getField2(Me):Ma.getField1(Me),It=dt.map(Dn.getValue).getOr(""),Mt=it.map(Dn.getValue).getOr("");m=Pq(It,Mt)})])])})},sle=(o,u,m)=>{const v=vm.parts.label({dom:{tag:"label",classes:["tox-label"]},components:[Ci(u.translate(o.label))]}),C=vm.parts.spectrum({dom:{tag:"div",classes:["tox-slider__rail"],attributes:{role:"presentation"}}}),x=vm.parts.thumb({dom:{tag:"div",classes:["tox-slider__handle"],attributes:{role:"presentation"}}});return vm.sketch({dom:{tag:"div",classes:["tox-slider"],attributes:{role:"presentation"}},model:{mode:"x",minX:o.min,maxX:o.max,getInitialValue:J(m.getOrThunk(()=>(Math.abs(o.max)-Math.abs(o.min))/2))},components:[v,C,x],sliderBehaviours:cn([wp.self(),As.config({})]),onChoose:(I,F,U)=>{ps(I,Yu,{name:o.name,value:U})},onChange:(I,F,U)=>{ps(I,Yu,{name:o.name,value:U})}})},ole=(o,u)=>{const m=F=>({dom:{tag:"th",innerHtml:u.translate(F)}}),v=F=>({dom:{tag:"thead"},components:[{dom:{tag:"tr"},components:ct(F,m)}]}),C=F=>({dom:{tag:"td",innerHtml:u.translate(F)}}),x=F=>({dom:{tag:"tr"},components:ct(F,C)}),I=F=>({dom:{tag:"tbody"},components:ct(F,x)});return{dom:{tag:"table",classes:["tox-dialog__table"]},components:[v(o.header),I(o.cells)],behaviours:cn([si.config({}),As.config({})])}},SN=(o,u)=>{const m=o.label.map(Ie=>tb(Ie,u)),v=[Xn.config({disabled:()=>o.disabled||u.checkUiComponentContext(o.context).shouldDisable}),wa(()=>u.checkUiComponentContext(o.context)),fs.config({mode:"execution",useEnter:o.multiline!==!0,useControlEnter:o.multiline===!0,execute:Ie=>(vo(Ie,l7),V.some(!0))}),zs("textfield-change",[Wt(Xm(),(Ie,Pe)=>{ps(Ie,Yu,{name:o.name})}),Wt(x0(),(Ie,Pe)=>{ps(Ie,Yu,{name:o.name})})]),si.config({})],C=o.validation.map(Ie=>Sf.config({getRoot:Pe=>jl(Pe.element),invalidClass:"tox-invalid",validator:{validate:Pe=>{const Me=Dn.getValue(Pe),at=Ie.validator(Me);return ou.pure(at===!0?no.value(Me):no.error(at))},validateOnLoad:Ie.validateOnLoad}})).toArray(),x=o.placeholder.fold(J({}),Ie=>({placeholder:u.translate(Ie)})),I=o.inputMode.fold(J({}),Ie=>({inputmode:Ie})),F={...x,...I,"data-mce-name":o.name},U=Co.parts.field({tag:o.multiline===!0?"textarea":"input",...o.data.map(Ie=>({data:Ie})).getOr({}),inputAttributes:F,inputClasses:[o.classname],inputBehaviours:cn(Nt([v,C])),selectOnFocus:!1,factory:iv}),X=o.multiline?{dom:{tag:"div",classes:["tox-textarea-wrap"]},components:[U]}:U,me=(o.flex?["tox-form__group--stretched"]:[]).concat(o.maximized?["tox-form-group--maximize"]:[]),Se=[Xn.config({disabled:()=>o.disabled||u.checkUiComponentContext(o.context).shouldDisable,onDisabled:Ie=>{Co.getField(Ie).each(Xn.disable)},onEnabled:Ie=>{Co.getField(Ie).each(Xn.enable)}}),wa(()=>u.checkUiComponentContext(o.context))];return i7(m,X,me,Se)},rle=(o,u,m)=>SN({name:o.name,multiline:!1,label:o.label,inputMode:o.inputMode,placeholder:o.placeholder,flex:!1,disabled:!o.enabled,classname:"tox-textfield",validation:V.none(),maximized:o.maximized,data:m,context:o.context},u),ile=(o,u,m)=>SN({name:o.name,multiline:!0,label:o.label,inputMode:V.none(),placeholder:o.placeholder,flex:!0,disabled:!o.enabled,classname:"tox-textarea",validation:V.none(),maximized:o.maximized,data:m,context:o.context},u),w7=(o,u)=>u.getAnimationRoot.fold(()=>o.element,m=>m(o)),$g=o=>o.dimension.property,C3=(o,u)=>o.dimension.getDimension(u),ET=(o,u)=>{const m=w7(o,u);cf(m,[u.shrinkingClass,u.growingClass])},CN=(o,u)=>{ua(o.element,u.openClass),sa(o.element,u.closedClass),wn(o.element,$g(u),"0px"),mc(o.element)},kT=(o,u)=>{ua(o.element,u.closedClass),sa(o.element,u.openClass),fo(o.element,$g(u))},wN=(o,u,m,v)=>{m.setCollapsed(),wn(o.element,$g(u),C3(u,o.element)),ET(o,u),CN(o,u),u.onStartShrink(o),u.onShrunk(o)},Nq=(o,u,m,v)=>{const C=v.getOrThunk(()=>C3(u,o.element));m.setCollapsed(),wn(o.element,$g(u),C),mc(o.element);const x=w7(o,u);ua(x,u.growingClass),sa(x,u.shrinkingClass),CN(o,u),u.onStartShrink(o)},E7=(o,u,m)=>{const v=C3(u,o.element);(v==="0px"?wN:Nq)(o,u,m,V.some(v))},Fq=(o,u,m)=>{const v=w7(o,u),C=Nc(v,u.shrinkingClass),x=C3(u,o.element);kT(o,u);const I=C3(u,o.element);(C?()=>{wn(o.element,$g(u),x),mc(o.element)}:()=>{CN(o,u)})(),ua(v,u.shrinkingClass),sa(v,u.growingClass),kT(o,u),wn(o.element,$g(u),I),m.setExpanded(),u.onStartGrow(o)},ale=(o,u,m)=>{if(m.isExpanded()){fo(o.element,$g(u));const v=C3(u,o.element);wn(o.element,$g(u),v)}},lle=(o,u,m)=>{m.isExpanded()||Fq(o,u,m)},cle=(o,u,m)=>{m.isExpanded()&&E7(o,u,m)},$q=(o,u,m)=>{m.isExpanded()&&wN(o,u,m)},ule=(o,u,m)=>m.isExpanded(),dle=(o,u,m)=>m.isCollapsed(),Bq=(o,u,m)=>{const v=w7(o,u);return Nc(v,u.growingClass)===!0},EN=(o,u,m)=>{const v=w7(o,u);return Nc(v,u.shrinkingClass)===!0};var Vq=Object.freeze({__proto__:null,refresh:ale,grow:lle,shrink:cle,immediateShrink:$q,hasGrown:ule,hasShrunk:dle,isGrowing:Bq,isShrinking:EN,isTransitioning:(o,u,m)=>Bq(o,u)||EN(o,u),toggleGrow:(o,u,m)=>{(m.isExpanded()?E7:Fq)(o,u,m)},disableTransitions:ET,immediateGrow:(o,u,m)=>{m.isExpanded()||(kT(o,u),wn(o.element,$g(u),C3(u,o.element)),ET(o,u),m.setExpanded(),u.onStartGrow(o),u.onGrown(o))}}),Ws=Object.freeze({__proto__:null,exhibit:(o,u,m)=>{const v=u.expanded;return up(v?{classes:[u.openClass],styles:{}}:{classes:[u.closedClass],styles:rg(u.dimension.property,"0px")})},events:(o,u)=>ni([th(e2(),(m,v)=>{v.event.raw.propertyName===o.dimension.property&&(ET(m,o),u.isExpanded()&&fo(m.element,o.dimension.property),(u.isExpanded()?o.onGrown:o.onShrunk)(m))})])}),k7=[Zt("closedClass"),Zt("openClass"),Zt("shrinkingClass"),Zt("growingClass"),ur("getAnimationRoot"),Ho("onShrunk"),Ho("onStartShrink"),Ho("onGrown"),Ho("onStartGrow"),mt("expanded",!1),cr("dimension",dl("property",{width:[ci("property","width"),ci("getDimension",o=>oo(o)+"px")],height:[ci("property","height"),ci("getDimension",o=>Wi(o)+"px")]}))],Hq=Object.freeze({__proto__:null,init:o=>{const u=ds(o.expanded),m=()=>"expanded: "+u.get();return Pd({isExpanded:()=>u.get()===!0,isCollapsed:()=>u.get()===!1,setCollapsed:de(u.set,!1),setExpanded:de(u.set,!0),readState:m})}});const _d=Sa({fields:k7,name:"sliding",active:Ws,apis:Vq,state:Hq}),kN=o=>({isEnabled:()=>!Xn.isDisabled(o),setEnabled:u=>Xn.set(o,!u),setActive:u=>{const m=o.element;u?(sa(m,"tox-tbtn--enabled"),jt(m,"aria-pressed",!0)):(ua(m,"tox-tbtn--enabled"),ke(m,"aria-pressed"))},isActive:()=>Nc(o.element,"tox-tbtn--enabled"),setText:u=>{ps(o,wf,{text:u})},setIcon:u=>ps(o,cb,{icon:u})}),G_=(o,u,m,v,C=!0,x)=>mN({text:o.text,icon:o.icon,tooltip:o.tooltip,ariaLabel:o.tooltip,searchable:o.search.isSome(),role:v,fetch:(I,F)=>{const U={pattern:o.search.isSome()?yie(I):""};o.fetch(X=>{F(q_(X,um.CLOSE_ON_EXECUTE,m,{isHorizontalMenu:!1,search:o.search}))},U,kN(I))},onSetup:o.onSetup,getApi:kN,columns:1,presets:"normal",classes:[],dropdownBehaviours:[...C?[si.config({})]:[]],context:o.context},u,m.shared,x),zCe=(o,u,m)=>{const v=x=>I=>{const F=!I.isActive();I.setActive(F),x.storage.set(F),m.shared.getSink().each(U=>{u().getOpt(U).each(X=>{eu(X.element),ps(X,w1,{name:x.name,value:x.storage.get()})})})},C=x=>I=>{I.setActive(x.storage.get())};return x=>{x(ct(o,I=>{const F=I.text.fold(()=>({}),U=>({text:U}));return{type:I.type,active:!1,...F,context:I.context,onAction:v(I),onSetup:C(I)}}))}},K_=o=>({dom:{tag:"span",classes:["tox-tree__label"],attributes:{"aria-label":o}},components:[Ci(o)]}),Uq=(o,u,m)=>{o.customStateIcon.each(v=>u.push(zq(v,m.shared.providers.icons,o.customStateIconTooltip.fold(()=>[],C=>[Yi.config(m.shared.providers.tooltips.getConfig({tooltipText:C}))]),["tox-icon-custom-state"])))},xN=Pn("leaf-label-event-id"),TN=({leaf:o,onLeafAction:u,visible:m,treeId:v,selectedId:C,backstage:x})=>{const I=o.menu.map(U=>G_(U,"tox-mbtn",x,V.none(),m)),F=[K_(o.title)];return Uq(o,F,x),I.each(U=>F.push(U)),_l.sketch({dom:{tag:"div",classes:["tox-tree--leaf__label","tox-trbtn"].concat(m?["tox-tree--leaf__label--visible"]:[])},components:F,role:"treeitem",action:U=>{u(o.id),U.getSystem().broadcastOn(["update-active-item-".concat(v)],{value:o.id})},eventOrder:{[gc()]:[xN,"keying"]},buttonBehaviours:cn([...m?[si.config({})]:[],po.config({toggleClass:"tox-trbtn--enabled",toggleOnExecute:!1,aria:{mode:"selected"}}),ju.config({channels:{["update-active-item-".concat(v)]:{onReceive:(U,X)=>{(X.value===o.id?po.on:po.off)(U)}}}}),zs(xN,[$r((U,X)=>{C.each(oe=>{(oe===o.id?po.on:po.off)(U)})}),Wt(gc(),(U,X)=>{const oe=X.event.raw.code==="ArrowLeft",me=X.event.raw.code==="ArrowRight";oe?(ih(U.element,".tox-tree--directory").each(Se=>{U.getSystem().getByDom(Se).each(Ie=>{bE(Se,".tox-tree--directory__label").each(Pe=>{Ie.getSystem().getByDom(Pe).each(As.focus)})})}),X.stop()):me&&X.stop()})])])})},zq=(o,u,m,v,C)=>_p(o,{tag:"span",classes:["tox-tree__icon-wrap","tox-icon"].concat(v||[]),behaviours:m,attributes:C},u),mle=(o,u)=>zq(o,u,[]),IN=Pn("directory-label-event-id"),AN=({directory:o,visible:u,noChildren:m,backstage:v})=>{const C=o.menu.map(F=>G_(F,"tox-mbtn",v,V.none())),x=[{dom:{tag:"div",classes:["tox-chevron"]},components:[mle("chevron-right",v.shared.providers.icons)]},K_(o.title)];Uq(o,x,v),C.each(F=>{x.push(F)});const I=F=>{ih(F.element,".tox-tree--directory").each(U=>{F.getSystem().getByDom(U).each(X=>{const oe=!po.isOn(X);po.toggle(X),ps(F,"expand-tree-node",{expanded:oe,node:o.id})})})};return _l.sketch({dom:{tag:"div",classes:["tox-tree--directory__label","tox-trbtn"].concat(u?["tox-tree--directory__label--visible"]:[])},components:x,action:I,eventOrder:{[gc()]:[IN,"keying"]},buttonBehaviours:cn([...u?[si.config({})]:[],zs(IN,[Wt(gc(),(F,U)=>{const X=U.event.raw.code==="ArrowRight",oe=U.event.raw.code==="ArrowLeft";X&&m&&U.stop(),(X||oe)&&ih(F.element,".tox-tree--directory").each(me=>{F.getSystem().getByDom(me).each(Se=>{!po.isOn(Se)&&X||po.isOn(Se)&&oe?(I(F),U.stop()):oe&&!po.isOn(Se)&&(ih(Se.element,".tox-tree--directory").each(Ie=>{bE(Ie,".tox-tree--directory__label").each(Pe=>{Se.getSystem().getByDom(Pe).each(As.focus)})}),U.stop())})})})])])})},Wq=({children:o,onLeafAction:u,visible:m,treeId:v,expandedIds:C,selectedId:x,backstage:I})=>({dom:{tag:"div",classes:["tox-tree--directory__children"]},components:o.map(F=>F.type==="leaf"?TN({leaf:F,selectedId:x,onLeafAction:u,visible:m,treeId:v,backstage:I}):ON({directory:F,expandedIds:C,selectedId:x,onLeafAction:u,labelTabstopping:m,treeId:v,backstage:I})),behaviours:cn([_d.config({dimension:{property:"height"},closedClass:"tox-tree--directory__children--closed",openClass:"tox-tree--directory__children--open",growingClass:"tox-tree--directory__children--growing",shrinkingClass:"tox-tree--directory__children--shrinking",expanded:m}),Bs.config({})])}),hle=Pn("directory-event-id"),ON=({directory:o,onLeafAction:u,labelTabstopping:m,treeId:v,backstage:C,expandedIds:x,selectedId:I})=>{const{children:F}=o,U=ds(x),X=me=>F.map(Se=>Se.type==="leaf"?TN({leaf:Se,selectedId:I,onLeafAction:u,visible:me,treeId:v,backstage:C}):ON({directory:Se,expandedIds:U.get(),selectedId:I,onLeafAction:u,labelTabstopping:me,treeId:v,backstage:C})),oe=x.includes(o.id);return{dom:{tag:"div",classes:["tox-tree--directory"],attributes:{role:"treeitem"}},components:[AN({directory:o,visible:m,noChildren:o.children.length===0,backstage:C}),Wq({children:F,expandedIds:x,selectedId:I,onLeafAction:u,visible:oe,treeId:v,backstage:C})],behaviours:cn([zs(hle,[$r((me,Se)=>{po.set(me,oe)}),Wt("expand-tree-node",(me,Se)=>{const{expanded:Ie,node:Pe}=Se.event;U.set(Ie?[...U.get(),Pe]:U.get().filter(Me=>Me!==Pe))})]),po.config({...o.children.length>0?{aria:{mode:"expanded"}}:{},toggleClass:"tox-tree--directory--expanded",onToggled:(me,Se)=>{const Ie=me.components()[1],Pe=X(Se);Se?_d.grow(Ie):_d.shrink(Ie),Bs.set(Ie,Pe)}})])}},gle=Pn("tree-event-id"),vle=(o,u)=>{const m=o.onLeafAction.getOr(z),v=o.onToggleExpand.getOr(z),C=o.defaultExpandedIds,x=ds(C),I=ds(o.defaultSelectedId),F=Pn("tree-id"),U=(X,oe)=>o.items.map(me=>me.type==="leaf"?TN({leaf:me,selectedId:X,onLeafAction:m,visible:!0,treeId:F,backstage:u}):ON({directory:me,selectedId:X,onLeafAction:m,expandedIds:oe,labelTabstopping:!0,treeId:F,backstage:u}));return{dom:{tag:"div",classes:["tox-tree"],attributes:{role:"tree"}},components:U(I.get(),x.get()),behaviours:cn([fs.config({mode:"flow",selector:".tox-tree--leaf__label--visible, .tox-tree--directory__label--visible",cycles:!1}),zs(gle,[Wt("expand-tree-node",(X,oe)=>{const{expanded:me,node:Se}=oe.event;x.set(me?[...x.get(),Se]:x.get().filter(Ie=>Ie!==Se)),v(x.get(),{expanded:me,node:Se})})]),ju.config({channels:{["update-active-item-".concat(F)]:{onReceive:(X,oe)=>{I.set(V.some(oe.value)),Bs.set(X,U(V.some(oe.value),x.get()))}}}}),Bs.config({})])}};var ble=Object.freeze({__proto__:null,events:(o,u)=>{const v=o.stream.streams.setup(o,u);return ni([Wt(o.event,v),nh(()=>u.cancel())].concat(o.cancelEvent.map(C=>[Wt(C,()=>u.cancel())]).getOr([])))}});const jq=o=>{const u=ds(null);return Pd({readState:()=>({timer:u.get()!==null?"set":"unset"}),setTimer:x=>{u.set(x)},cancel:()=>{const x=u.get();x!==null&&x.cancel()}})};var yle=Object.freeze({__proto__:null,throttle:jq,init:o=>o.stream.streams.state(o)});const _le=(o,u)=>{const m=o.stream,v=j_(o.onStream,m.delay);return u.setTimer(v),(C,x)=>{v.throttle(C,x),m.stopEvent&&x.stop()}};var Zq=[cr("stream",dl("mode",{throttle:[Zt("delay"),mt("stopEvent",!0),ci("streams",{setup:_le,state:jq})]})),mt("event","input"),ur("cancelEvent"),Nd("onStream")];const RN=Sa({fields:Zq,name:"streaming",active:ble,state:yle}),xT=(o,u,m)=>{const v=Dn.getValue(m);Dn.setValue(u,v),Gq(u)},qq=(o,u)=>{const m=o.element,v=$t(m),C=m.dom;eo(m,"type")!=="number"&&u(C,v)},Gq=o=>{qq(o,(u,m)=>u.setSelectionRange(m.length,m.length))},Sle=(o,u)=>{qq(o,(m,v)=>m.setSelectionRange(u,v.length))},Cle=(o,u,m)=>{if(o.selectsOver){const v=Dn.getValue(u),C=o.getDisplayText(v),x=Dn.getValue(m);return o.getDisplayText(x).indexOf(C)===0?V.some(()=>{xT(o,u,m),Sle(u,C.length)}):V.none()}else return V.none()},DN=J("alloy.typeahead.itemexecute"),wle=(o,u,m,v)=>{const C=(me,Se,Ie)=>{o.previewing.set(!1);const Pe=da.getCoupled(me,"sandbox");if(Uo.isOpen(Pe))Lo.getCurrent(Pe).each(Me=>{Re.getHighlighted(Me).fold(()=>{Ie(Me)},()=>{PC(Pe,Me.element,"keydown",Se)})});else{const Me=at=>{Lo.getCurrent(at).each(Ie)};t7(o,I(me),me,Pe,v,Me,Pl.HighlightMenuAndItem).get(z)}},x=BW(o),I=me=>Se=>Se.map(Ie=>{const Pe=Xa(Ie.menus),Me=Ve(Pe,qe=>jn(qe.items,dt=>dt.type==="item"));return Dn.getState(me).update(ct(Me,qe=>qe.data)),Ie}),F=me=>Lo.getCurrent(me),U="typeaheadevents",X=[As.config({}),Dn.config({onSetValue:o.onSetValue,store:{mode:"dataset",getDataKey:me=>$t(me.element),getFallbackEntry:me=>({value:me,meta:{}}),setValue:(me,Se)=>{rh(me.element,o.model.getDisplayText(Se))},...o.initialData.map(me=>rg("initialValue",me)).getOr({})}}),RN.config({stream:{mode:"throttle",delay:o.responseTime,stopEvent:!1},onStream:(me,Se)=>{const Ie=da.getCoupled(me,"sandbox");if(As.isFocused(me)&&$t(me.element).length>=o.minChars){const Me=F(Ie).bind(qe=>Re.getHighlighted(qe).map(Dn.getValue));o.previewing.set(!0);const at=qe=>{F(Ie).each(dt=>{Me.fold(()=>{o.model.selectsOver&&Re.highlightFirst(dt)},it=>{Re.highlightBy(dt,It=>Dn.getValue(It).value===it.value),Re.getHighlighted(dt).orThunk(()=>(Re.highlightFirst(dt),V.none()))})})};t7(o,I(me),me,Ie,v,at,Pl.HighlightJustMenu).get(z)}},cancelEvent:Yl()}),fs.config({mode:"special",onDown:(me,Se)=>(C(me,Se,Re.highlightFirst),V.some(!0)),onEscape:me=>{const Se=da.getCoupled(me,"sandbox");return Uo.isOpen(Se)?(Uo.close(Se),V.some(!0)):V.none()},onUp:(me,Se)=>(C(me,Se,Re.highlightLast),V.some(!0)),onEnter:me=>{const Se=da.getCoupled(me,"sandbox"),Ie=Uo.isOpen(Se);if(Ie&&!o.previewing.get())return F(Se).bind(Pe=>Re.getHighlighted(Pe)).map(Pe=>(ps(me,DN(),{item:Pe}),!0));{const Pe=Dn.getValue(me);return vo(me,Yl()),o.onExecute(Se,me,Pe),Ie&&Uo.close(Se),V.some(!0)}}}),po.config({toggleClass:o.markers.openClass,aria:{mode:"expanded"}}),da.config({others:{sandbox:me=>hM(o,me,{onOpen:()=>po.on(me),onClose:()=>{o.lazyTypeaheadComp.get().each(Se=>ke(Se.element,"aria-activedescendant")),po.off(me)}})}}),zs(U,[$r(me=>{o.lazyTypeaheadComp.set(V.some(me))}),nh(me=>{o.lazyTypeaheadComp.set(V.none())}),r1(me=>{const Se=z;mM(o,I(me),me,v,Se,Pl.HighlightMenuAndItem).get(z)}),Wt(DN(),(me,Se)=>{const Ie=da.getCoupled(me,"sandbox");xT(o.model,me,Se.event.item),vo(me,Yl()),o.onItemExecute(me,Ie,Se.event.item,Dn.getValue(me)),Uo.close(Ie),Gq(me)})].concat(o.dismissOnBlur?[Wt(n1(),me=>{const Se=da.getCoupled(me,"sandbox");tu(Se.element).isNone()&&Uo.close(Se)})]:[]))],oe={[cp()]:[Dn.name(),RN.name(),U],...o.eventOrder};return{uid:o.uid,dom:T_(Gi(o,{inputAttributes:{role:"combobox","aria-autocomplete":"list","aria-haspopup":"true"}})),behaviours:{...x,...Ca(o.typeaheadBehaviours,X)},eventOrder:oe}},Ele=J([ur("lazySink"),Zt("fetch"),mt("minChars",5),mt("responseTime",1e3),Ho("onOpen"),mt("getHotspot",V.some),mt("getAnchorOverrides",J({})),mt("layouts",V.none()),mt("eventOrder",{}),Jh("model",{},[mt("getDisplayText",o=>o.meta!==void 0&&o.meta.text!==void 0?o.meta.text:o.value),mt("selectsOver",!0),mt("populateFromBrowse",!0)]),Ho("onSetValue"),Qc("onExecute"),Ho("onItemExecute"),mt("inputClasses",[]),mt("inputAttributes",{}),mt("inputStyles",{}),mt("matchWidth",!0),mt("useMinWidth",!1),mt("dismissOnBlur",!0),sm(["openClass"]),ur("initialData"),ur("listRole"),Ll("typeaheadBehaviours",[As,Dn,RN,fs,po,da]),nr("lazyTypeaheadComp",()=>ds(V.none)),nr("previewing",()=>ds(!0))].concat($W()).concat(gM())),kle=J([mf({schema:[Sy()],name:"menu",overrides:o=>({fakeFocus:!0,onHighlightItem:(u,m,v)=>{o.previewing.get()?o.lazyTypeaheadComp.get().each(C=>{Cle(o.model,C,v).fold(()=>{o.model.selectsOver?(Re.dehighlight(m,v),o.previewing.set(!0)):o.previewing.set(!1)},x=>{x(),o.previewing.set(!1)})}):o.lazyTypeaheadComp.get().each(C=>{o.model.populateFromBrowse&&xT(o.model,C,v),Us(v.element,"id").each(x=>jt(C.element,"aria-activedescendant",x))})},onExecute:(u,m)=>o.lazyTypeaheadComp.get().map(v=>(ps(v,DN(),{item:m}),!0)),onHover:(u,m)=>{o.previewing.set(!1),o.lazyTypeaheadComp.get().each(v=>{o.model.populateFromBrowse&&xT(o.model,v,m)})}})})]),xle=$c({name:"Typeahead",configFields:Ele(),partFields:kle(),factory:wle}),bm=o=>({...o,toCached:()=>bm(o.toCached()),bindFuture:U=>bm(o.bind(X=>X.fold(oe=>ou.pure(no.error(oe)),oe=>U(oe)))),bindResult:U=>bm(o.map(X=>X.bind(U))),mapResult:U=>bm(o.map(X=>X.map(U))),mapError:U=>bm(o.map(X=>X.mapError(U))),foldResult:(U,X)=>o.map(oe=>oe.fold(U,X)),withTimeout:(U,X)=>bm(ou.nu(oe=>{let me=!1;const Se=setTimeout(()=>{me=!0,oe(no.error(X()))},U);o.get(Ie=>{me||(clearTimeout(Se),oe(Ie))})}))}),Kq=o=>bm(ou.nu(o)),Yq=o=>bm(ou.pure(no.value(o))),Xq={nu:Kq,wrap:bm,pure:Yq,value:Yq,error:o=>bm(ou.pure(no.error(o))),fromResult:o=>bm(ou.pure(o)),fromFuture:o=>bm(o.map(no.value)),fromPromise:o=>Kq(u=>{o.then(m=>{u(no.value(m))},m=>{u(no.error(m))})})},TT=(o,u,m=[],v,C,x,I)=>{const F=u.fold(()=>({}),oe=>({action:oe})),U={buttonBehaviours:cn([pm.item(()=>!o.enabled||I.checkUiComponentContext(o.context).shouldDisable),wa(()=>I.checkUiComponentContext(o.context)),si.config({}),...x.map(oe=>Yi.config(I.tooltips.getConfig({tooltipText:I.translate(oe)}))).toArray(),zs("button press",[P9("click")])].concat(m)),eventOrder:{click:["button press","alloy.base.behaviour"],mousedown:["button press","alloy.base.behaviour"]},...F},X=Gi(U,{dom:v});return Gi(X,{components:C})},Jq=(o,u,m,v=[],C)=>{const x=o.tooltip.map(X=>({"aria-label":m.translate(X)})).getOr({}),I={tag:"button",classes:["tox-tbtn"],attributes:{...x,"data-mce-name":C}},F=o.icon.map(X=>pN(X,m.icons)),U=R_([F]);return TT(o,u,v,I,U,o.tooltip,m)},LN=o=>{switch(o){case"primary":return["tox-button"];case"toolbar":return["tox-tbtn"];case"secondary":default:return["tox-button","tox-button--secondary"]}},PN=(o,u,m,v=[],C=[])=>{const x=m.translate(o.text),I=o.icon.map(Ie=>pN(Ie,m.icons)),F=[I.getOrThunk(()=>Ci(x))],U=o.buttonType.getOr(!o.primary&&!o.borderless?"secondary":"primary"),me={tag:"button",classes:[...LN(U),...I.isSome()?["tox-button--icon"]:[],...o.borderless?["tox-button--naked"]:[],...C],attributes:{"aria-label":x,"data-mce-name":o.text}},Se=o.icon.map(J(x));return TT(o,u,v,me,F,Se,m)},MN=(o,u,m,v=[],C=[])=>{const x=PN(o,V.some(u),m,v,C);return _l.sketch(x)},IT=(o,u)=>m=>{u==="custom"?ps(m,w1,{name:o,value:{}}):u==="submit"?vo(m,l7):u==="cancel"?vo(m,nb):console.error("Unknown button type: ",u)},Tle=(o,u)=>u==="menu",Qq=(o,u)=>u==="custom"||u==="cancel"||u==="submit",eG=(o,u)=>u==="togglebutton",Ile=(o,u,m)=>{var v,C;const x=o.icon.map(it=>Fg(it,u.icons)).map(or),I=it=>{ps(it,w1,{name:o.name,value:{setIcon:It=>{x.map(Mt=>Mt.getOpt(it).each(en=>{Bs.set(en,[Fg(It,u.icons)])}))}}})},F=o.buttonType.getOr(o.primary?"primary":"secondary"),U={...o,name:(v=o.name)!==null&&v!==void 0?v:"",tooltip:o.tooltip,enabled:(C=o.enabled)!==null&&C!==void 0?C:!1},X=U.tooltip.or(o.text).map(it=>({"aria-label":u.translate(it)})).getOr({}),oe=LN(F!=null?F:"secondary"),me=o.icon.isSome()&&o.text.isSome(),Se={tag:"button",classes:[...oe.concat(o.icon.isSome()?["tox-button--icon"]:[]),...o.active?["tox-button--enabled"]:[],...me?["tox-button--icon-and-text"]:[]],attributes:{...X,...B(m)?{"data-mce-name":m}:{}}},Ie=[],Pe=u.translate(o.text.getOr("")),Me=Ci(Pe),qe=[...R_([x.map(it=>it.asSpec())]),...o.text.isSome()?[Me]:[]],dt=TT(U,V.some(I),Ie,Se,qe,o.tooltip,u);return _l.sketch(dt)},x7=(o,u,m)=>{if(Tle(o,u)){const v=()=>I,C=o,x={...o,type:"menubutton",search:V.none(),onSetup:F=>(F.setEnabled(o.enabled),z),fetch:zCe(C.items,v,m)},I=or(G_(x,"tox-tbtn",m,V.none(),!0,o.text.or(o.tooltip).getOrUndefined()));return I.asSpec()}else if(Qq(o,u)){const v=IT(o.name,u),C={...o,context:u==="cancel"?"any":o.context,borderless:!1};return MN(C,v,m.shared.providers,[])}else{if(eG(o,u))return Ile(o,m.shared.providers,o.text.or(o.tooltip).getOrUndefined());throw console.error("Unknown footer button type: ",u),new Error("Unknown footer button type")}},Ale=(o,u)=>{const m=IT(o.name,"custom");return Die(V.none(),Co.parts.field({factory:_l,...PN(o,V.some(m),u,[y7(""),wp.self()])}))},Ole={type:"separator"},E1=o=>({type:"menuitem",value:o.url,text:o.title,meta:{attach:o.attach},onAction:z}),Y_=(o,u)=>({type:"menuitem",value:u,text:o,meta:{attach:void 0},onAction:z}),AT=o=>ct(o,E1),Rle=(o,u)=>jn(u,m=>m.type===o),OT=(o,u)=>AT(Rle(o,u)),Dle=o=>OT("header",o.targets),NN=o=>OT("anchor",o.targets),tG=o=>V.from(o.anchorTop).map(u=>Y_("<top>",u)).toArray(),FN=o=>V.from(o.anchorBottom).map(u=>Y_("<bottom>",u)).toArray(),Lle=o=>ct(o,u=>Y_(u,u)),Ple=o=>Xs(o,(u,m)=>u.length===0||m.length===0?u.concat(m):u.concat(Ole,m),[]),RT=(o,u)=>{const m=o.toLowerCase();return jn(u,v=>{var C;const x=v.meta!==void 0&&v.meta.text!==void 0?v.meta.text:v.text,I=(C=v.value)!==null&&C!==void 0?C:"";return ir(x.toLowerCase(),m)||ir(I.toLowerCase(),m)})},Mle=(o,u,m)=>{var v,C;const x=Dn.getValue(u),I=(C=(v=x==null?void 0:x.meta)===null||v===void 0?void 0:v.text)!==null&&C!==void 0?C:x.value;return m.getLinkInformation().fold(()=>[],U=>{const X=RT(I,Lle(m.getHistory(o)));return o==="file"?Ple([X,RT(I,Dle(U)),RT(I,Nt([tG(U),NN(U),FN(U)]))]):X})},nG=Pn("aria-invalid"),$N=(o,u,m,v)=>{const C=u.shared.providers,x=dt=>{const it=Dn.getValue(dt);m.addToHistory(it.value,o.filetype)},I={...v.map(dt=>({initialData:dt})).getOr({}),dismissOnBlur:!0,inputClasses:["tox-textfield"],sandboxClasses:["tox-dialog__popups"],inputAttributes:{"aria-errormessage":nG,type:"url"},minChars:0,responseTime:0,fetch:dt=>{const it=Mle(o.filetype,dt,m),It=q_(it,um.BUBBLE_TO_SANDBOX,u,{isHorizontalMenu:!1,search:V.none()});return ou.pure(It)},getHotspot:dt=>Pe.getOpt(dt),onSetValue:(dt,it)=>{dt.hasConfigured(Sf)&&Sf.run(dt).get(z)},typeaheadBehaviours:cn([...m.getValidationHandler().map(dt=>Sf.config({getRoot:it=>jl(it.element),invalidClass:"tox-control-wrap--status-invalid",notify:{onInvalid:(it,It)=>{oe.getOpt(it).each(Mt=>{jt(Mt.element,"title",C.translate(It))})}},validator:{validate:it=>{const It=Dn.getValue(it);return Xq.nu(Mt=>{dt({type:o.filetype,url:It.value},en=>{if(en.status==="invalid"){const In=no.error(en.message);Mt(In)}else{const In=no.value(en.message);Mt(In)}})})},validateOnLoad:!1}})).toArray(),Xn.config({disabled:()=>!o.enabled||C.checkUiComponentContext(o.context).shouldDisable}),si.config({}),zs("urlinput-events",[Wt(Xm(),dt=>{const it=$t(dt.element),It=it.trim();It!==it&&rh(dt.element,It),o.filetype==="file"&&ps(dt,Yu,{name:o.name})}),Wt(t1(),dt=>{ps(dt,Yu,{name:o.name}),x(dt)}),Wt(x0(),dt=>{ps(dt,Yu,{name:o.name}),x(dt)})])]),eventOrder:{[Xm()]:["streaming","urlinput-events","invalidating"]},model:{getDisplayText:dt=>dt.value,selectsOver:!1,populateFromBrowse:!1},markers:{openClass:"tox-textfield--popup-open"},lazySink:u.shared.getSink,parts:{menu:Ax(!1,1,"normal")},onExecute:(dt,it,It)=>{ps(it,l7,{})},onItemExecute:(dt,it,It,Mt)=>{x(dt),ps(dt,Yu,{name:o.name})}},F=Co.parts.field({...I,factory:xle}),U=o.label.map(dt=>tb(dt,C)),oe=or(((dt,it,It=dt,Mt=dt)=>_p(It,{tag:"div",classes:["tox-icon","tox-control-wrap__status-icon-"+dt],attributes:{title:C.translate(Mt),"aria-live":"polite",...it.fold(()=>({}),en=>({id:en}))}},C.icons))("invalid",V.some(nG),"warning")),me=or({dom:{tag:"div",classes:["tox-control-wrap__status-icon-wrap"]},components:[oe.asSpec()]}),Se=m.getUrlPicker(o.filetype),Ie=Pn("browser.url.event"),Pe=or({dom:{tag:"div",classes:["tox-control-wrap"]},components:[F,me.asSpec()],behaviours:cn([Xn.config({disabled:()=>!o.enabled||C.checkUiComponentContext(o.context).shouldDisable})])}),Me=or(MN({context:o.context,name:o.name,icon:V.some("browse"),text:o.picker_text.or(o.label).getOr(""),enabled:o.enabled,primary:!1,buttonType:V.none(),borderless:!0},dt=>vo(dt,Ie),C,[],["tox-browse-url"])),at=()=>({dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:Nt([[Pe.asSpec()],Se.map(()=>Me.asSpec()).toArray()])}),qe=dt=>{Lo.getCurrent(dt).each(it=>{const It=Dn.getValue(it),Mt={fieldname:o.name,...It};Se.each(en=>{en(Mt).get(In=>{Dn.setValue(it,In),ps(dt,Yu,{name:o.name})})})})};return Co.sketch({dom:Pie(),components:U.toArray().concat([at()]),fieldBehaviours:cn([Xn.config({disabled:()=>!o.enabled||C.checkUiComponentContext(o.context).shouldDisable,onDisabled:dt=>{Co.getField(dt).each(Xn.disable),Me.getOpt(dt).each(Xn.disable)},onEnabled:dt=>{Co.getField(dt).each(Xn.enable),Me.getOpt(dt).each(Xn.enable)}}),wa(()=>C.checkUiComponentContext(o.context)),zs("url-input-events",[Wt(Ie,qe)])])})},Nle=(o,u)=>{const m=dP(o.icon,u.icons);return bd.sketch({dom:{tag:"div",attributes:{role:"alert"},classes:["tox-notification","tox-notification--in","tox-notification--".concat(o.level)]},components:[{dom:{tag:"div",classes:["tox-notification__icon"],innerHtml:o.url?void 0:m},components:o.url?[_l.sketch({dom:{tag:"button",classes:["tox-button","tox-button--naked","tox-button--icon"],innerHtml:m,attributes:{title:u.translate(o.iconTooltip)}},action:v=>ps(v,w1,{name:"alert-banner",value:o.url}),buttonBehaviours:cn([fP()])})]:void 0},{dom:{tag:"div",classes:["tox-notification__body"],innerHtml:u.translate(o.text)}}]})},Fle=(o,u)=>{o.dom.checked=u},sG=o=>o.dom.checked,oG=(o,u,m)=>{const v=U=>(U.element.dom.click(),V.some(!0)),C=Co.parts.field({factory:{sketch:ce},dom:{tag:"input",classes:["tox-checkbox__input"],attributes:{type:"checkbox"}},behaviours:cn([wp.self(),Xn.config({disabled:()=>!o.enabled||u.checkUiComponentContext(o.context).shouldDisable,onDisabled:U=>{jl(U.element).each(X=>sa(X,"tox-checkbox--disabled"))},onEnabled:U=>{jl(U.element).each(X=>ua(X,"tox-checkbox--disabled"))}}),si.config({}),As.config({}),oN(m,sG,Fle),fs.config({mode:"special",onEnter:v,onSpace:v,stopSpaceKeyup:!0}),zs("checkbox-events",[Wt(t1(),(U,X)=>{ps(U,Yu,{name:o.name})})])])}),x=Co.parts.label({dom:{tag:"span",classes:["tox-checkbox__label"]},components:[Ci(u.translate(o.label))],behaviours:cn([sb.config({})])}),I=U=>_p(U==="checked"?"selected":"unselected",{tag:"span",classes:["tox-icon","tox-checkbox-icon__"+U]},u.icons),F=or({dom:{tag:"div",classes:["tox-checkbox__icons"]},components:[I("checked"),I("unchecked")]});return Co.sketch({dom:{tag:"label",classes:["tox-checkbox"]},components:[C,F.asSpec(),x],fieldBehaviours:cn([Xn.config({disabled:()=>!o.enabled||u.checkUiComponentContext(o.context).shouldDisable}),wa(()=>u.checkUiComponentContext(o.context))])})},$le=(o,u)=>{const m=["tox-form__group",...o.stretched?["tox-form__group--stretched"]:[]],v=zs("htmlpanel",[$r(C=>{o.onInit(C.element.dom)})]);return o.presets==="presentation"?bd.sketch({dom:{tag:"div",classes:m,innerHtml:o.html},containerBehaviours:cn([Yi.config({...u.tooltips.getConfig({tooltipText:"",onShow:C=>{sr(C.element,"[data-mce-tooltip]:hover").orThunk(()=>tu(C.element)).each(x=>{Us(x,"data-mce-tooltip").each(I=>{Yi.setComponents(C,u.tooltips.getComponents({tooltipText:I}))})})}}),mode:"children-normal",anchor:C=>({type:"node",node:sr(C.element,"[data-mce-tooltip]:hover").orThunk(()=>tu(C.element).filter(x=>Us(x,"data-mce-tooltip").isSome())),root:C.element,layouts:{onLtr:J([nl,hl,La,Jl,qa,Pa]),onRtl:J([nl,hl,La,Jl,qa,Pa])},bubble:Eu(0,-2,{})})}),v])}):bd.sketch({dom:{tag:"div",classes:m,innerHtml:o.html,attributes:{role:"document"}},containerBehaviours:cn([si.config({}),As.config({}),v])})},Ml=o=>(u,m,v,C,x)=>bn(m,"name").fold(()=>o(m,C,V.none(),x),I=>u.field(I,o(m,C,bn(v,I),x))),Ble=o=>(u,m,v,C,x)=>{const I=Gi(m,{source:"dynamic"});return Ml(o)(u,I,v,C,x)},Vle={bar:Ml((o,u)=>Aie(o,u.shared)),collection:Ml((o,u,m)=>Mie(o,u.shared.providers,m)),alertbanner:Ml((o,u)=>Nle(o,u.shared.providers)),input:Ml((o,u,m)=>rle(o,u.shared.providers,m)),textarea:Ml((o,u,m)=>ile(o,u.shared.providers,m)),label:Ml((o,u,m,v)=>fN(o,u.shared,v)),iframe:Ble((o,u,m)=>Hae(o,u.shared.providers,m)),button:Ml((o,u)=>Ale(o,u.shared.providers)),checkbox:Ml((o,u,m)=>oG(o,u.shared.providers,m)),colorinput:Ml((o,u,m)=>Vie(o,u.shared,u.colorinput,m)),colorpicker:Ml((o,u,m)=>cq(o,u.shared.providers,m)),dropzone:Ml((o,u,m)=>fq(o,u.shared.providers,m)),grid:Ml((o,u)=>Lae(o,u.shared)),listbox:Ml((o,u,m)=>Rq(o,u,m)),selectbox:Ml((o,u,m)=>Jae(o,u.shared.providers,m)),sizeinput:Ml((o,u)=>Mq(o,u.shared.providers)),slider:Ml((o,u,m)=>sle(o,u.shared.providers,m)),urlinput:Ml((o,u,m)=>$N(o,u,u.urlinput,m)),customeditor:Ml(Dae),htmlpanel:Ml((o,u)=>$le(o,u.shared.providers)),imagepreview:Ml((o,u,m)=>jae(o,m)),table:Ml((o,u)=>ole(o,u.shared.providers)),tree:Ml((o,u)=>vle(o,u)),panel:Ml((o,u)=>Yae(o,u))},rG={field:(o,u)=>u,record:J([])},Ep=(o,u,m,v,C)=>{const x=Gi(v,{shared:{interpreter:I=>T7(o,I,m,x,C)}});return T7(o,u,m,x,C)},T7=(o,u,m,v,C)=>bn(Vle,u.type).fold(()=>(console.error('Unknown factory type "'.concat(u.type,'", defaulting to container: '),u),u),x=>x(o,u,m,v,C)),iG=(o,u,m,v)=>T7(rG,o,u,m,v),ub="layout-inset",BN=o=>o.x,aG=(o,u)=>o.x+o.width/2-u.width/2,VN=(o,u)=>o.x+o.width-u.width,DT=o=>o.y,LT=(o,u)=>o.y+o.height-u.height,Hle=(o,u)=>o.y+o.height/2-u.height/2,HN=(o,u,m)=>Rl(VN(o,u),LT(o,u),m.insetSouthwest(),a6(),"southwest",bc(o,{right:0,bottom:3}),ub),tc=(o,u,m)=>Rl(BN(o),LT(o,u),m.insetSoutheast(),i6(),"southeast",bc(o,{left:1,bottom:3}),ub),w3=(o,u,m)=>Rl(VN(o,u),DT(o),m.insetNorthwest(),r6(),"northwest",bc(o,{right:0,top:2}),ub),I7=(o,u,m)=>Rl(BN(o),DT(o),m.insetNortheast(),A4(),"northeast",bc(o,{left:1,top:2}),ub),Ef=(o,u,m)=>Rl(aG(o,u),DT(o),m.insetNorth(),CE(),"north",bc(o,{top:2}),ub),A7=(o,u,m)=>Rl(aG(o,u),LT(o,u),m.insetSouth(),wE(),"south",bc(o,{bottom:3}),ub),lG=(o,u,m)=>Rl(VN(o,u),Hle(o,u),m.insetEast(),kE(),"east",bc(o,{right:0}),ub),cG=(o,u,m)=>Rl(BN(o),Hle(o,u),m.insetWest(),EE(),"west",bc(o,{left:1}),ub),Ule=o=>{switch(o){case"north":return Ef;case"northeast":return I7;case"northwest":return w3;case"south":return A7;case"southeast":return tc;case"southwest":return HN;case"east":return lG;case"west":return cG}},uG=(o,u,m,v,C)=>Oy(v).map(Ule).getOr(Ef)(o,u,m,v,C),zle=o=>{switch(o){case"north":return A7;case"northeast":return tc;case"northwest":return HN;case"south":return Ef;case"southeast":return I7;case"southwest":return w3;case"east":return cG;case"west":return lG}},Wle=(o,u,m,v,C)=>Oy(v).map(zle).getOr(Ef)(o,u,m,v,C),O7={valignCentre:[],alignCentre:[],alignLeft:[],alignRight:[],right:[],left:[],bottom:[],top:[]},dG=(o,u,m)=>{const C={maxHeightFunction:z0()},x=()=>({type:"node",root:ia(za(o())),node:V.from(o()),bubble:Eu(12,12,O7),layouts:{onRtl:()=>[I7],onLtr:()=>[w3]},overrides:C}),I=()=>({type:"hotspot",hotspot:u(),bubble:Eu(-12,12,O7),layouts:{onRtl:()=>[La,qa,nl],onLtr:()=>[qa,La,nl]},overrides:C});return()=>m()?x():I()},PT=(o,u,m,v)=>{const x={maxHeightFunction:z0()},I=()=>({type:"node",root:ia(za(u())),node:V.from(u()),bubble:Eu(12,12,O7),layouts:{onRtl:()=>[Ef],onLtr:()=>[Ef]},overrides:x}),F=()=>o?{type:"node",root:ia(za(u())),node:V.from(u()),bubble:Eu(0,-Dd(u()),O7),layouts:{onRtl:()=>[hl],onLtr:()=>[hl]},overrides:x}:{type:"hotspot",hotspot:m(),bubble:Eu(0,0,O7),layouts:{onRtl:()=>[hl],onLtr:()=>[hl]},overrides:x};return()=>v()?I():F()},fG=(o,u,m)=>{const v=()=>({type:"node",root:ia(za(o())),node:V.from(o()),layouts:{onRtl:()=>[Ef],onLtr:()=>[Ef]}}),C=()=>({type:"hotspot",hotspot:u(),layouts:{onRtl:()=>[nl],onLtr:()=>[nl]}});return()=>m()?v():C()},UN=(o,u)=>()=>({type:"selection",root:u(),getSelection:()=>{const m=o.selection.getRng(),v=o.model.table.getSelectedCells();if(v.length>1){const C=v[0],x=v[v.length-1],I={firstCell:Xt.fromDom(C),lastCell:Xt.fromDom(x)};return V.some(I)}return V.some(wg.range(Xt.fromDom(m.startContainer),m.startOffset,Xt.fromDom(m.endContainer),m.endOffset))}}),jle=o=>u=>({type:"node",root:o(),node:u}),pG=(o,u,m,v)=>{const C=gh(o),x=()=>Xt.fromDom(o.getBody()),I=()=>Xt.fromDom(o.getContentAreaContainer()),F=()=>C||!v();return{inlineDialog:dG(I,u,F),inlineBottomDialog:PT(o.inline,I,m,F),banner:fG(I,u,F),cursor:UN(o,x),node:jle(x)}},Zle=o=>(u,m)=>{Zj(o)(u,m)},qle=o=>()=>Kx(o),mG=o=>u=>Gx(o,u),YCe=o=>u=>$j(o,u),XCe=o=>({colorPicker:Zle(o),hasCustomColors:qle(o),getColors:mG(o),getColorCols:YCe(o)}),hG=o=>()=>Qz(o),Gle=o=>({isDraggableModal:hG(o)}),Kle=o=>{const u=ds(jL(o)?"bottom":"top");return{isPositionedAtTop:()=>u.get()==="top",getDockingMode:u.get,setDockingMode:u.set}},zN=o=>Qr(o,"items"),MT=o=>Qr(o,"format"),gG=[{title:"Headings",items:[{title:"Heading 1",format:"h1"},{title:"Heading 2",format:"h2"},{title:"Heading 3",format:"h3"},{title:"Heading 4",format:"h4"},{title:"Heading 5",format:"h5"},{title:"Heading 6",format:"h6"}]},{title:"Inline",items:[{title:"Bold",format:"bold"},{title:"Italic",format:"italic"},{title:"Underline",format:"underline"},{title:"Strikethrough",format:"strikethrough"},{title:"Superscript",format:"superscript"},{title:"Subscript",format:"subscript"},{title:"Code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote",format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Align",items:[{title:"Left",format:"alignleft"},{title:"Center",format:"aligncenter"},{title:"Right",format:"alignright"},{title:"Justify",format:"alignjustify"}]}],Yle=o=>qs(o,"items"),vG=o=>qs(o,"block"),Xle=o=>qs(o,"inline"),Jle=o=>qs(o,"selector"),bG=o=>Xs(o,(u,m)=>{if(Yle(m)){const v=bG(m.items);return{customFormats:u.customFormats.concat(v.customFormats),formats:u.formats.concat([{title:m.title,items:v.formats}])}}else if(Xle(m)||vG(m)||Jle(m)){const v=d(m.name)?m.name:m.title.toLowerCase(),C="custom-".concat(v);return{customFormats:u.customFormats.concat([{name:C,format:m}]),formats:u.formats.concat([{title:m.title,format:C,icon:m.icon}])}}else return{...u,formats:u.formats.concat(m)}},{customFormats:[],formats:[]}),Qle=(o,u)=>{const m=bG(u),v=C=>{Ht(C,x=>{o.formatter.has(x.name)||o.formatter.register(x.name,x.format)})};return o.formatter?v(m.customFormats):o.on("init",()=>{v(m.customFormats)}),m.formats},R7=o=>ML(o).map(u=>{const m=Qle(o,u);return NL(o)?gG.concat(m):m}).getOr(gG),WN=o=>{const u=Zn(o);return u.length===1&&ft(u,"title")},yG=(o,u,m)=>({...o,type:"formatter",isSelected:u(o.format),getStylePreview:m(o.format)}),_G=(o,u,m,v)=>{const C=U=>yG(U,m,v),x=U=>{const X=F(U.items);return{...U,type:"submenu",getStyleItems:J(X)}},I=U=>{const X=d(U.name)?U.name:Pn(U.title),oe="custom-".concat(X),me={...U,type:"formatter",format:oe,isSelected:m(oe),getStylePreview:v(oe)};return o.formatter.register(X,me),me},F=U=>ct(U,X=>zN(X)?x(X):MT(X)?C(X):WN(X)?{...X,type:"separator"}:I(X));return F(u)},ece=o=>{const u=F=>()=>o.formatter.match(F),m=F=>()=>{const U=o.formatter.get(F);return U!==void 0?V.some({tag:U.length>0&&(U[0].inline||U[0].block)||"div",styles:o.dom.parseStyle(o.formatter.getCssText(F))}):V.none()},v=ds([]),C=ds([]),x=ds(!1);return o.on("PreInit",F=>{const U=R7(o),X=_G(o,U,u,m);v.set(X)}),o.on("addStyleModifications",F=>{const U=_G(o,F.items,u,m);C.set(U),x.set(F.replace)}),{getData:()=>{const F=x.get()?[]:v.get(),U=C.get();return F.concat(U)}}},tce=o=>{let v=0;const C=()=>v>0,x=F=>[{dom:{tag:"div",classes:["tox-tooltip__body"]},components:[Ci(F.tooltipText)]}];return{getConfig:F=>({delayForShow:()=>C()?60:300,delayForHide:J(300),exclusive:!0,lazySink:o,tooltipDom:{tag:"div",classes:["tox-tooltip","tox-tooltip--up"]},tooltipComponents:x(F),onShow:(U,X)=>{v++,F.onShow&&F.onShow(U,X)},onHide:(U,X)=>{v--,F.onHide&&F.onHide(U,X)},onSetup:F.onSetup}),getComponents:x}},nce=o=>B(o)&&o.nodeType===1,sce=mv.trim,NT=o=>u=>!!(nce(u)&&(u.contentEditable===o||u.getAttribute("data-mce-contenteditable")===o)),oce=NT("true"),FT=NT("false"),SG=(o,u,m,v,C)=>({type:o,title:u,url:m,level:v,attach:C}),X_=o=>{let u=o;for(;u=u.parentNode;){const m=u.contentEditable;if(m&&m!=="inherit")return oce(u)}return!1},rce=(o,u)=>ct(xu(Xt.fromDom(u),o),m=>m.dom),$T=o=>o.innerText||o.textContent,J_=o=>o.id?o.id:Pn("h"),CG=o=>o&&o.nodeName==="A"&&(o.id||o.name)!==void 0,wG=o=>CG(o)&&jN(o),BT=o=>o&&/^(H[1-6])$/.test(o.nodeName),jN=o=>X_(o)&&!FT(o),ZN=o=>BT(o)&&jN(o),EG=o=>BT(o)?parseInt(o.nodeName.substr(1),10):0,kG=o=>{var u;const m=J_(o),v=()=>{o.id=m};return SG("header",(u=$T(o))!==null&&u!==void 0?u:"","#"+m,EG(o),v)},qN=o=>{const u=o.id||o.name,m=$T(o);return SG("anchor",m||"#"+u,"#"+u,0,z)},E3=o=>ct(jn(o,ZN),kG),ice=o=>ct(jn(o,wG),qN),ace=o=>rce("h1,h2,h3,h4,h5,h6,a:not([href])",o),Q_=o=>sce(o.title).length>0,VT={find:o=>{const u=ace(o);return jn(E3(u).concat(ice(u)),Q_)}},D7="tinymce-url-history",HT=5,Bg=o=>d(o)&&/^https?/.test(o),cce=o=>S(o)&&o.length<=HT&&dn(o,Bg),xG=o=>h(o)&&Zs(o,u=>!cce(u)).isNone(),TG=()=>{const o=uv.getItem(D7);if(o===null)return{};let u;try{u=JSON.parse(o)}catch(m){if(m instanceof SyntaxError)return console.log("Local storage "+D7+" was not valid JSON",m),{};throw m}return xG(u)?u:(console.log("Local storage "+D7+" was not valid format",u),{})},GN=o=>{if(!xG(o))throw new Error("Bad format for history:\n"+JSON.stringify(o));uv.setItem(D7,JSON.stringify(o))},uce=o=>{const u=TG();return bn(u,o).getOr([])},dce=(o,u)=>{if(!Bg(o))return;const m=TG(),v=bn(m,u).getOr([]),C=jn(v,x=>x!==o);m[u]=[o].concat(C).slice(0,HT),GN(m)},IG=o=>!!o,fce=o=>Rs(mv.makeMap(o,/[, ]/),IG),KN=o=>V.from(Yz(o)),pce=o=>{const u=V.from(Jz(o)).filter(IG).map(fce);return KN(o).fold($e,m=>u.fold(Ue,v=>Zn(v).length>0?v:!1))},mce=(o,u)=>{const m=pce(o);return T(m)?m?KN(o):V.none():m[u]?KN(o):V.none()},AG=(o,u)=>mce(o,u).map(m=>v=>ou.nu(C=>{const x=(F,U)=>{if(!d(F))throw new Error("Expected value to be string");if(U!==void 0&&!h(U))throw new Error("Expected meta to be a object");C({value:F,meta:U})},I={filetype:u,fieldname:v.fieldname,...V.from(v.meta).getOr({})};m.call(o,x,v.value,I)})),OG=o=>V.from(o).filter(d).getOrUndefined(),L7=o=>ax(o)?V.some({targets:VT.find(o.getBody()),anchorTop:OG(VL(o)),anchorBottom:OG(HL(o))}):V.none(),hce=o=>V.from(BL(o)),gce=o=>({getHistory:uce,addToHistory:dce,getLinkInformation:()=>L7(o),getValidationHandler:()=>hce(o),getUrlPicker:u=>AG(o,u)}),YN=(o,u,m,v)=>{const C=ds(!1),x=Kle(u),I={icons:()=>u.ui.registry.getAll().icons,menuItems:()=>u.ui.registry.getAll().menuItems,translate:cm.translate,isDisabled:()=>!u.ui.isEnabled(),getOption:u.options.get,tooltips:tce(o.dialog),checkUiComponentContext:qe=>{if(sx(u))return{contextType:"disabled",shouldDisable:!0};const[dt,it=""]=qe.split(":"),It=u.ui.registry.getAll().contexts,Mt=bn(It,dt).fold(()=>bn(It,"mode").map(en=>en("design")).getOr(!1),en=>it.charAt(0)==="!"?!en(it.slice(1)):en(it));return{contextType:dt,shouldDisable:!Mt}}},F=gce(u),U=ece(u),X=XCe(u),oe=Gle(u),me=()=>C.get(),Se=qe=>C.set(qe),Ie={shared:{providers:I,anchors:pG(u,m,v,x.isPositionedAtTop),header:x},urlinput:F,styles:U,colorinput:X,dialog:oe,isContextMenuOpen:me,setContextMenuState:Se},Pe=qe=>V.none(),Me={...Ie,shared:{...Ie.shared,interpreter:qe=>iG(qe,{},Me,Pe),getSink:o.popup}},at={...Ie,shared:{...Ie.shared,interpreter:qe=>iG(qe,{},at,Pe),getSink:o.dialog}};return{popup:Me,dialog:at}},RG=(o,u,m)=>{const v=(Ft,Mn)=>{Ht([u,...m],En=>{En.broadcastEvent(Ft,Mn)})},C=(Ft,Mn)=>{Ht([u,...m],En=>{En.broadcastOn([Ft],Mn)})},x=Ft=>C(Tg(),{target:Ft.target}),I=Q1(),F=wu(I,"touchstart",x),U=wu(I,"touchmove",Ft=>v(TR(),Ft)),X=wu(I,"touchend",Ft=>v(IR(),Ft)),oe=wu(I,"mousedown",x),me=wu(I,"mouseup",Ft=>{Ft.raw.button===0&&C(n_(),{target:Ft.target})}),Se=Ft=>C(Tg(),{target:Xt.fromDom(Ft.target)}),Ie=Ft=>{Ft.button===0&&C(n_(),{target:Xt.fromDom(Ft.target)})},Pe=()=>{Ht(o.editorManager.get(),Ft=>{o!==Ft&&Ft.dispatch("DismissPopups",{relatedTarget:o})})},Me=Ft=>v(LC(),FE(Ft)),at=Ft=>{C(f1(),{}),v(t2(),FE(Ft))},qe=za(Xt.fromDom(o.getElement())),dt=F4(qe,"scroll",Ft=>{requestAnimationFrame(()=>{const Mn=o.getContainer();if(Mn!=null){const zn=K2(o,u.element).map(go=>[go.element,...go.others]).getOr([]);ht(zn,go=>co(go,Ft.target))&&(o.dispatch("ElementScroll",{target:Ft.target.dom}),v(s1(),Ft))}})}),it=()=>C(f1(),{}),It=Ft=>{Ft.state&&C(Tg(),{target:Xt.fromDom(o.getContainer())})},Mt=Ft=>{C(Tg(),{target:Xt.fromDom(Ft.relatedTarget.getContainer())})},en=Ft=>o.dispatch("focusin",Ft),In=Ft=>o.dispatch("focusout",Ft);o.on("PostRender",()=>{o.on("click",Se),o.on("tap",Se),o.on("mouseup",Ie),o.on("mousedown",Pe),o.on("ScrollWindow",Me),o.on("ResizeWindow",at),o.on("ResizeEditor",it),o.on("AfterProgressState",It),o.on("DismissPopups",Mt),Ht([u,...m],Ft=>{Ft.element.dom.addEventListener("focusin",en),Ft.element.dom.addEventListener("focusout",In)})}),o.on("remove",()=>{o.off("click",Se),o.off("tap",Se),o.off("mouseup",Ie),o.off("mousedown",Pe),o.off("ScrollWindow",Me),o.off("ResizeWindow",at),o.off("ResizeEditor",it),o.off("AfterProgressState",It),o.off("DismissPopups",Mt),Ht([u,...m],Ft=>{Ft.element.dom.removeEventListener("focusin",en),Ft.element.dom.removeEventListener("focusout",In)}),oe.unbind(),F.unbind(),U.unbind(),X.unbind(),me.unbind(),dt.unbind()}),o.on("detach",()=>{Ht([u,...m],gp),Ht([u,...m],Ft=>Ft.destroy())})},ol=OU,Vg=Xy,vce=J([mt("shell",!1),Zt("makeItem"),mt("setupItem",z),Vd.field("listBehaviours",[Bs])]),bce=qu({name:"items",overrides:()=>({behaviours:cn([Bs.config({})])})}),yce=J([bce]),XN=J("CustomList"),_ce=(o,u,m,v)=>{const C=(F,U)=>{I(F).fold(()=>{throw console.error("Custom List was defined to not be a shell, but no item container was specified in components"),new Error("Custom List was defined to not be a shell, but no item container was specified in components")},X=>{const oe=Bs.contents(X),me=U.length,Se=me-oe.length,Ie=Se>0?At(Se,()=>o.makeItem()):[],Pe=oe.slice(me);Ht(Pe,at=>Bs.remove(X,at)),Ht(Ie,at=>Bs.append(X,at));const Me=Bs.contents(X);Ht(Me,(at,qe)=>{o.setupItem(F,at,U[qe],qe)})})},x=o.shell?{behaviours:[Bs.config({})],components:[]}:{behaviours:[],components:u},I=F=>o.shell?V.some(F):Yr(F,o,"items");return{uid:o.uid,dom:o.dom,components:x.components,behaviours:Ca(o.listBehaviours,x.behaviours),apis:{setItems:C}}},DG=$c({name:XN(),configFields:vce(),partFields:yce(),factory:_ce,apis:{setItems:(o,u,m)=>{o.setItems(u,m)}}}),eS=J([Zt("dom"),mt("shell",!0),Ll("toolbarBehaviours",[Bs])]),Sce=J([qu({name:"groups",overrides:()=>({behaviours:cn([Bs.config({})])})})]),Cce=(o,u,m,v)=>{const C=(F,U)=>{x(F).fold(()=>{throw console.error("Toolbar was defined to not be a shell, but no groups container was specified in components"),new Error("Toolbar was defined to not be a shell, but no groups container was specified in components")},X=>{Bs.set(X,U)})},x=F=>o.shell?V.some(F):Yr(F,o,"groups"),I=o.shell?{behaviours:[Bs.config({})],components:[]}:{behaviours:[],components:u};return{uid:o.uid,dom:o.dom,components:I.components,behaviours:Ca(o.toolbarBehaviours,I.behaviours),apis:{setGroups:C,refresh:z},domModification:{attributes:{role:"group"}}}},Hg=$c({name:"Toolbar",configFields:eS(),partFields:Sce(),factory:Cce,apis:{setGroups:(o,u,m)=>{o.setGroups(u,m)}}}),wce=z,LG=$e,JN=J([]);var UT=Object.freeze({__proto__:null,setup:wce,isDocked:LG,getBehaviours:JN});const zT=J(Pn("toolbar-height-change")),Ug={fadeInClass:"tox-editor-dock-fadein",fadeOutClass:"tox-editor-dock-fadeout",transitionClass:"tox-editor-dock-transition"},PG="tox-tinymce--toolbar-sticky-on",MG="tox-tinymce--toolbar-sticky-off",Ece=(o,u)=>{const m=Fr(u),C=pc(u).dom.innerHeight,x=Dc(m),I=Xt.fromDom(o.elm),F=Fu(I),U=Wi(I),X=F.y,oe=X+U,me=hc(u),Se=Wi(u),Ie=me.top,Pe=Ie+Se,Me=Math.abs(Ie-x.top)<2,at=Math.abs(Pe-(x.top+C))<2;if(Me&&X<Pe)Kh(x.left,X-Se,m);else if(at&&oe>Ie){const qe=X-C+U+Se;Kh(x.left,qe,m)}},WT=(o,u)=>ft(bi.getModes(o),u),QN=o=>{const u=v=>Dd(v)+(parseInt(Gt(v,"margin-top"),10)||0)+(parseInt(Gt(v,"margin-bottom"),10)||0),m=o.element;jl(m).each(v=>{const C="padding-"+bi.getModes(o)[0];if(bi.isDocked(o)){const x=oo(v);wn(m,"width",x+"px"),wn(v,C,u(m)+"px")}else fo(m,"width"),fo(v,C)})},NG=(o,u)=>{u?(ua(o,Ug.fadeOutClass),ug(o,[Ug.transitionClass,Ug.fadeInClass])):(ua(o,Ug.fadeInClass),ug(o,[Ug.fadeOutClass,Ug.transitionClass]))},eF=(o,u)=>{const m=Xt.fromDom(o.getContainer());u?(sa(m,PG),ua(m,MG)):(sa(m,MG),ua(m,PG))},FG=(o,u)=>{const m=Fr(u);ff(m).filter(v=>!co(u,v)).filter(v=>co(v,Xt.fromDom(m.dom.body))||uo(o,v)).each(()=>eu(u))},kce=(o,u)=>tu(o).orThunk(()=>u().toOptional().bind(m=>tu(m.element))),$G=(o,u,m)=>{o.inline||(u.header.isPositionedAtTop()||o.on("ResizeEditor",()=>{m().each(bi.reset)}),o.on("ResizeWindow ResizeEditor",()=>{m().each(QN)}),o.on("SkinLoaded",()=>{m().each(v=>{bi.isDocked(v)?bi.reset(v):bi.refresh(v)})}),o.on("FullscreenStateChanged",()=>{m().each(bi.reset)})),o.on("AfterScrollIntoView",v=>{m().each(C=>{bi.refresh(C);const x=C.element;b8(x)&&Ece(v,x)})}),o.on("PostRender",()=>{eF(o,!1)})},xce=o=>o().map(bi.isDocked).getOr(!1),Tce=()=>[ju.config({channels:{[zT()]:{onReceive:QN}}})],BG=(o,u)=>{const m=vr(),v=u.getSink,C=F=>{v().each(U=>F(U.element))},x=F=>{o.inline||QN(F),eF(o,bi.isDocked(F)),F.getSystem().broadcastOn([f1()],{}),v().each(U=>U.getSystem().broadcastOn([f1()],{}))},I=o.inline?[]:Tce();return[As.config({}),bi.config({contextual:{lazyContext:F=>{const U=Dd(F.element),X=o.inline?o.getContentAreaContainer():o.getContainer();return V.from(X).map(oe=>{const me=tl(Xt.fromDom(oe));return K2(o,F.element).fold(()=>{const Ie=me.height-U,Pe=me.y+(WT(F,"top")?0:U);return qi(me.x,Pe,me.width,Ie)},Ie=>{const Pe=b0(me,Y2(Ie)),Me=WT(F,"top")?Pe.y:Pe.y+U;return qi(Pe.x,Me,Pe.width,Pe.height-U)})})},onShow:()=>{C(F=>NG(F,!0))},onShown:F=>{C(U=>cf(U,[Ug.transitionClass,Ug.fadeInClass])),m.get().each(U=>{FG(F.element,U),m.clear()})},onHide:F=>{kce(F.element,v).fold(m.clear,m.set),C(U=>NG(U,!1))},onHidden:()=>{C(F=>cf(F,[Ug.transitionClass]))},...Ug},lazyViewport:F=>K2(o,F.element).fold(()=>{const X=ul(),oe=$L(o),me=X.y+(WT(F,"top")&&!KL(o)?oe:0),Se=X.height-(WT(F,"bottom")?oe:0);return{bounds:qi(X.x,me,X.width,Se),optScrollEnv:V.none()}},X=>({bounds:Y2(X),optScrollEnv:V.some({currentScrollTop:X.element.dom.scrollTop,scrollElmTop:hc(X.element).top})})),modes:[u.header.getDockingMode()],onDocked:x,onUndocked:x}),...I]};var k3=Object.freeze({__proto__:null,setup:$G,isDocked:xce,getBehaviours:BG});const VG=o=>{const u=o.editor,m=o.sticky?BG:JN;return{uid:o.uid,dom:o.dom,components:o.components,behaviours:cn(m(u,o.sharedBackstage))}},P7=Ns([Ga,cr("items",Yv([G5([CP,Bu("items",Ln)]),Ln]))].concat(d3)),jT=o=>Ki("GroupToolbarButton",P7,o),HG=[aa("text"),aa("tooltip"),aa("icon"),Ld("search",!1,Yv([rf,Ns([aa("placeholder")])],o=>T(o)?o?V.some({placeholder:V.none()}):V.none():V.some(o))),Kl("fetch"),Kr("onSetup",()=>z),Li("context","mode:design")],tF=Ns([Ga,...HG]),nF=o=>Ki("menubutton",tF,o),e6e=Ns([Ga,j8,dm,cv,kP,Foe,c3,np("presets","normal",["normal","color","listpreview"]),ej(1),l3,Boe,Li("context","mode:design")]),Ice=o=>Ki("SplitButton",e6e,o);var sF=Gu({factory:(o,u)=>{const m=(C,x)=>{const I=ct(x,F=>{const U={type:"menubutton",text:F.text,fetch:oe=>{oe(F.getItems())},context:"any"},X=nF(U).mapError(oe=>Qp(oe)).getOrDie();return G_(X,"tox-mbtn",u.backstage,V.some("menuitem"))});Bs.set(C,I)},v={focus:fs.focusIn,setMenus:m};return{uid:o.uid,dom:o.dom,components:[],behaviours:cn([Bs.config({}),zs("menubar-events",[$r(C=>{o.onSetup(C)}),Wt(rp(),(C,x)=>{sr(C.element,".tox-mbtn--active").each(I=>{fp(x.event.target,".tox-mbtn").each(F=>{co(I,F)||C.getSystem().getByDom(I).each(U=>{C.getSystem().getByDom(F).each(X=>{Sp.expand(X),Sp.close(U),As.focus(X)})})})})}),Wt(ay(),(C,x)=>{x.event.prevFocus.bind(I=>C.getSystem().getByDom(I).toOptional()).each(I=>{x.event.newFocus.bind(F=>C.getSystem().getByDom(F).toOptional()).each(F=>{Sp.isOpen(I)&&(Sp.expand(F),Sp.close(I))})})})]),fs.config({mode:"flow",selector:".tox-mbtn",onEscape:C=>(o.onEscape(C),V.some(!0))}),si.config({})]),apis:v,domModification:{attributes:{role:"menubar"}}}},name:"silver.Menubar",configFields:[Zt("dom"),Zt("uid"),Zt("onEscape"),Zt("backstage"),mt("onSetup",z)],apis:{focus:(o,u)=>{o.focus(u)},setMenus:(o,u,m)=>{o.setMenus(u,m)}}});const Ace="⚡️Upgrade",Oce="https://www.tiny.cloud/tinymce-self-hosted-premium-features/?utm_campaign=self_hosted_upgrade_promo&utm_source=tiny&utm_medium=referral",tS=o=>({uid:o.uid,dom:o.dom,components:[{dom:{tag:"a",attributes:{href:Oce,rel:"noopener",target:"_blank","aria-hidden":"true"},classes:["tox-promotion-link"],innerHtml:Ace}}]}),nS="container",oF=[Ll("slotBehaviours",[])],UG=o=>"<alloy.field."+o+">",Rce=o=>{const u=(()=>{const x=[];return{slot:(F,U)=>(x.push(F),l_(nS,UG(F),U)),record:J(x)}})(),m=o(u),v=u.record(),C=ct(v,x=>Sc({name:x,pname:UG(x)}));return Jy(nS,oF,C,rF,m)},rF=(o,u)=>{const m=Me=>s8(o),v=(Me,at)=>Yr(Me,o,at),C=(Me,at)=>(qe,dt)=>Yr(qe,o,dt).map(it=>Me(it,dt)).getOr(at),x=Me=>(at,qe)=>{Ht(qe,dt=>Me(at,dt))},I=(Me,at)=>eo(Me.element,"aria-hidden")!=="true",F=(Me,at)=>{if(!I(Me)){const qe=Me.element;fo(qe,"display"),ke(qe,"aria-hidden"),ps(Me,n2(),{name:at,visible:!0})}},U=(Me,at)=>{if(I(Me)){const qe=Me.element;wn(qe,"display","none"),jt(qe,"aria-hidden","true"),ps(Me,n2(),{name:at,visible:!1})}},X=C(I,!1),oe=C(U),me=x(oe),Se=Me=>me(Me,m()),Ie=C(F),Pe={getSlotNames:m,getSlot:v,isShowing:X,hideSlot:oe,hideAllSlots:Se,showSlot:Ie};return{uid:o.uid,dom:o.dom,components:u,behaviours:s_(o.slotBehaviours),apis:Pe}},nc={...Rs({getSlotNames:(o,u)=>o.getSlotNames(u),getSlot:(o,u,m)=>o.getSlot(u,m),isShowing:(o,u,m)=>o.isShowing(u,m),hideSlot:(o,u,m)=>o.hideSlot(u,m),hideAllSlots:(o,u)=>o.hideAllSlots(u),showSlot:(o,u,m)=>o.showSlot(u,m)},o=>om(o)),sketch:Rce},zG=Ns([dm,j8,Kr("onShow",z),Kr("onHide",z),c3]),Dce=o=>Ki("sidebar",zG,o),Lce=o=>{const{sidebars:u}=o.ui.registry.getAll();Ht(Zn(u),m=>{const v=u[m],C=()=>lt(V.from(o.queryCommandValue("ToggleSidebar")),m);o.ui.registry.addToggleButton(m,{icon:v.icon,tooltip:v.tooltip,onAction:x=>{o.execCommand("ToggleSidebar",!1,m),x.setActive(C())},onSetup:x=>{x.setActive(C());const I=()=>x.setActive(C());return o.on("ToggleSidebar",I),()=>{o.off("ToggleSidebar",I)}},context:"any"})})},Pce=o=>({element:()=>o.element.dom}),Mce=(o,u)=>{const m=ct(Zn(u),v=>{const C=u[v],x=un(Dce(C));return{name:v,getApi:Pce,onSetup:x.onSetup,onShow:x.onShow,onHide:x.onHide}});return ct(m,v=>{const C=ds(z);return o.slot(v.name,{dom:{tag:"div",classes:["tox-sidebar__pane"]},behaviours:A_.unnamedEvents([S1(v,C),_h(v,C),Wt(n2(),(x,I)=>{const F=I.event;Qe(m,X=>X.name===F.name).each(X=>{(F.visible?X.onShow:X.onHide)(X.getApi(x))})})])})})},Nce=o=>nc.sketch(u=>({dom:{tag:"div",classes:["tox-sidebar__pane-container"]},components:Mce(u,o),slotBehaviours:A_.unnamedEvents([$r(m=>nc.hideAllSlots(m))])})),Fce=(o,u,m)=>{Lo.getCurrent(o).each(C=>{Bs.set(C,[Nce(u)]);const x=m==null?void 0:m.toLowerCase();d(x)&&qs(u,x)&&Lo.getCurrent(C).each(I=>{nc.showSlot(I,x),_d.immediateGrow(C),fo(C.element,"width"),M7(o.element,"region")})})},M7=(o,u)=>{jt(o,"role",u)},WG=(o,u)=>{Lo.getCurrent(o).each(v=>{Lo.getCurrent(v).each(x=>{_d.hasGrown(v)?nc.isShowing(x,u)?(_d.shrink(v),M7(o.element,"presentation")):(nc.hideAllSlots(x),nc.showSlot(x,u),M7(o.element,"region")):(nc.hideAllSlots(x),nc.showSlot(x,u),_d.grow(v),M7(o.element,"region"))})})},iF=o=>Lo.getCurrent(o).bind(m=>_d.isGrowing(m)||_d.hasGrown(m)?Lo.getCurrent(m).bind(x=>Qe(nc.getSlotNames(x),I=>nc.isShowing(x,I))):V.none()),aF=Pn("FixSizeEvent"),sS=Pn("AutoSizeEvent"),ZT=o=>({uid:o.uid,dom:{tag:"div",classes:["tox-sidebar"],attributes:{role:"presentation"}},components:[{dom:{tag:"div",classes:["tox-sidebar__slider"]},components:[],behaviours:cn([si.config({}),As.config({}),_d.config({dimension:{property:"width"},closedClass:"tox-sidebar--sliding-closed",openClass:"tox-sidebar--sliding-open",shrinkingClass:"tox-sidebar--sliding-shrinking",growingClass:"tox-sidebar--sliding-growing",onShrunk:u=>{Lo.getCurrent(u).each(nc.hideAllSlots),vo(u,sS)},onGrown:u=>{vo(u,sS)},onStartGrow:u=>{ps(u,aF,{width:Er(u.element,"width").getOr("")})},onStartShrink:u=>{ps(u,aF,{width:oo(u.element)+"px"})}}),Bs.config({}),Lo.config({find:u=>{const m=Bs.contents(u);return Vt(m)}})])}],behaviours:cn([wp.childAt(0),zs("sidebar-sliding-events",[Wt(aF,(u,m)=>{wn(u.element,"width",m.event.width)}),Wt(sS,(u,m)=>{fo(u.element,"width")})])])});var Bce=Object.freeze({__proto__:null,block:(o,u,m,v)=>{jt(o.element,"aria-busy",!0);const C=u.getRoot(o).getOr(o),x=cn([fs.config({mode:"special",onTab:()=>V.some(!0),onShiftTab:()=>V.some(!0)}),As.config({})]),I=v(C,x),F=C.getSystem().build(I);Bs.append(C,md(F)),F.hasConfigured(fs)&&u.focus&&fs.focusIn(F),m.isBlocked()||u.onBlock(o),m.blockWith(()=>Bs.remove(C,F))},unblock:(o,u,m)=>{ke(o.element,"aria-busy"),m.isBlocked()&&u.onUnblock(o),m.clear()},isBlocked:(o,u,m)=>m.isBlocked()}),Vce=[Kr("getRoot",V.none),la("focus",!0),Ho("onBlock"),Ho("onUnblock")],Hce=Object.freeze({__proto__:null,init:()=>{const o=Wm(),u=m=>{o.set({destroy:m})};return Pd({readState:o.isSet,blockWith:u,clear:o.clear,isBlocked:o.isSet})}});const ym=Sa({fields:Vce,name:"blocking",apis:Bce,state:Hce}),Uce=o=>(u,m)=>({dom:{tag:"div",attributes:{"aria-label":o.translate("Loading..."),tabindex:"0"},classes:["tox-throbber__busy-spinner"]},components:[{dom:b1('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]}),qT=o=>Lo.getCurrent(o).each(u=>eu(u.element,!0)),zce=(o,u)=>{const m="tabindex",v="data-mce-".concat(m);V.from(o.iframeElement).map(Xt.fromDom).each(C=>{u?(Us(C,m).each(x=>jt(C,v,x)),jt(C,m,-1)):(ke(C,m),Us(C,v).each(x=>{jt(C,m,x),ke(C,v)}))})},Wce=(o,u,m,v)=>{const C=u.element;if(zce(o,m),m)ym.block(u,Uce(v)),fo(C,"display"),ke(C,"aria-hidden"),o.hasFocus()&&qT(u);else{const x=Lo.getCurrent(u).exists(I=>gl(I.element));ym.unblock(u),wn(C,"display","none"),jt(C,"aria-hidden","true"),x&&o.focus()}},jce=o=>({uid:o.uid,dom:{tag:"div",attributes:{"aria-hidden":"true"},classes:["tox-throbber"],styles:{display:"none"}},behaviours:cn([Bs.config({}),ym.config({focus:!1}),Lo.config({find:u=>Vt(u.components())})]),components:[]}),Zce=o=>o.type==="focusin",qce=o=>Zce(o)?(o.composed?Vt(o.composedPath()):V.from(o.target)).map(Xt.fromDom).filter(hi).exists(m=>Nc(m,"mce-pastebin")):!1,r6e=(o,u,m)=>{const v=ds(!1),C=vr(),x=F=>{v.get()&&!qce(F)&&(F.preventDefault(),qT(u()),o.editorManager.setActive(o))};o.inline||o.on("PreInit",()=>{o.dom.bind(o.getWin(),"focusin",x),o.on("BeforeExecCommand",F=>{F.command.toLowerCase()==="mcefocus"&&F.value!==!0&&x(F)})});const I=F=>{F!==v.get()&&(v.set(F),Wce(o,u(),F,m.providers),Aj(o,F))};o.on("ProgressState",F=>{if(C.on(clearTimeout),Z(F.time)){const U=ex.setEditorTimeout(o,()=>I(F.state),F.time);C.set(U)}else I(F.state),C.clear()})},i6e=(o,u)=>Xs(o,(C,x)=>u(x,C.len).fold(J(C),F=>({len:F.finish,list:C.list.concat([F])})),{len:0,list:[]}).list,GT=(o,u,m)=>({within:o,extra:u,withinWidth:m}),ZG=(o,u,m)=>{const v=i6e(o,(F,U)=>{const X=m(F);return V.some({element:F,start:U,finish:U+X,width:X})}),C=jn(v,F=>F.finish<=u),x=so(C,(F,U)=>F+U.width,0),I=v.slice(C.length);return{within:C,extra:I,withinWidth:x}},N7=o=>ct(o,u=>u.element),Gce=(o,u,m)=>{const v=N7(o.concat(u));return GT(v,[],m)},Kce=(o,u,m,v)=>{const C=N7(o).concat([m]);return GT(C,N7(u),v)},Yce=(o,u,m)=>GT(N7(o),[],m),Xce=(o,u,m)=>{const v=ZG(u,o,m);return v.extra.length===0?V.some(v):V.none()},Jce=(o,u,m,v)=>{const C=Xce(o,u,m).getOrThunk(()=>ZG(u,o-m(v),m)),x=C.within,I=C.extra,F=C.withinWidth;return I.length===1&&I[0].width<=m(v)?Gce(x,I,F):I.length>=1?Kce(x,I,v,F):Yce(x,I,F)},lF=(o,u)=>{const m=ct(u,v=>md(v));Hg.setGroups(o,m)},Qce=o=>ts(o,u=>tu(u.element).bind(m=>u.getSystem().getByDom(m).toOptional())),qG=(o,u,m)=>{const v=u.builtGroups.get();if(v.length===0)return;const C=am(o,u,"primary"),x=da.getCoupled(o,"overflowGroup");wn(C.element,"visibility","hidden");const I=v.concat([x]),F=Qce(I);m([]),lF(C,I);const U=oo(C.element),X=Jce(U,u.builtGroups.get(),oe=>Math.ceil(oe.element.dom.getBoundingClientRect().width),x);X.extra.length===0?(Bs.remove(C,x),m([])):(lF(C,X.within),m(X.extra)),fo(C.element,"visibility"),mc(C.element),F.each(As.focus)},GG=J([Ll("splitToolbarBehaviours",[da]),nr("builtGroups",()=>ds([]))]),a6e=J([sm(["overflowToggledClass"]),Xh("getOverflowBounds"),Zt("lazySink"),nr("overflowGroups",()=>ds([])),Ho("onOpened"),Ho("onClosed")].concat(GG())),l6e=J([Sc({factory:Hg,schema:eS(),name:"primary"}),mf({schema:eS(),name:"overflow"}),mf({name:"overflow-button"}),mf({name:"overflow-group"})]),KT=J((o,u)=>{tf(o,Math.floor(u))}),KG=J([sm(["toggledClass"]),Zt("lazySink"),Kl("fetch"),Xh("getBounds"),Vu("fireDismissalEventInstead",[mt("event",ag())]),Cg(),Ho("onToggled")]),eue=J([mf({name:"button",overrides:o=>({dom:{attributes:{"aria-haspopup":"true"}},buttonBehaviours:cn([po.config({toggleClass:o.markers.toggledClass,aria:{mode:"expanded"},toggleOnExecute:!1,onToggled:o.onToggled})])})}),mf({factory:Hg,schema:eS(),name:"toolbar",overrides:o=>({toolbarBehaviours:cn([fs.config({mode:"cyclic",onEscape:u=>(Yr(u,o,"button").each(As.focus),V.none())})])})})]),YT=vr(),kp=(o,u)=>{YT.set(!0),cF(o,u),YT.clear()},cF=(o,u)=>{const m=da.getCoupled(o,"toolbarSandbox");Uo.isOpen(m)?Uo.close(m):Uo.open(m,u.toolbar())},XT=(o,u,m,v)=>{const C=m.getBounds.map(I=>I()),x=m.lazySink(o).getOrDie();yc.positionWithinBounds(x,u,{anchor:{type:"hotspot",hotspot:o,layouts:v,overrides:{maxWidthFunction:KT()}}},C)},uF=(o,u,m,v,C)=>{Hg.setGroups(u,C),XT(o,u,m,v),po.on(o)},tue=(o,u,m)=>{const v=o6(),C=(I,F)=>{const U=YT.get().getOr(!1);m.fetch().get(X=>{uF(o,F,m,u.layouts,X),v.link(o.element),U||fs.focusIn(F)})},x=()=>{po.off(o),YT.get().getOr(!1)||As.focus(o),v.unlink(o.element)};return{dom:{tag:"div",attributes:{id:v.id}},behaviours:cn([fs.config({mode:"special",onEscape:I=>(Uo.close(I),V.some(!0))}),Uo.config({onOpen:C,onClose:x,isPartOf:(I,F,U)=>_g(F,U)||_g(o,U),getAttachPoint:()=>m.lazySink(o).getOrDie()}),ju.config({channels:{...hd({isExtraPart:$e,...m.fireDismissalEventInstead.map(I=>({fireEventInstead:{event:I.event}})).getOr({})}),...X0({doReposition:()=>{Uo.getState(da.getCoupled(o,"toolbarSandbox")).each(I=>{XT(o,I,m,u.layouts)})}})}})])}},db=$c({name:"FloatingToolbarButton",factory:(o,u,m,v)=>({..._l.sketch({...v.button(),action:C=>{cF(C,v)},buttonBehaviours:Vd.augment({dump:v.button().buttonBehaviours},[da.config({others:{toolbarSandbox:C=>tue(C,m,o)}})])}),apis:{setGroups:(C,x)=>{Uo.getState(da.getCoupled(C,"toolbarSandbox")).each(I=>{uF(C,I,o,m.layouts,x)})},reposition:C=>{Uo.getState(da.getCoupled(C,"toolbarSandbox")).each(x=>{XT(C,x,o,m.layouts)})},toggle:C=>{cF(C,v)},toggleWithoutFocusing:C=>{kp(C,v)},getToolbar:C=>Uo.getState(da.getCoupled(C,"toolbarSandbox")),isOpen:C=>Uo.isOpen(da.getCoupled(C,"toolbarSandbox"))}}),configFields:KG(),partFields:eue(),apis:{setGroups:(o,u,m)=>{o.setGroups(u,m)},reposition:(o,u)=>{o.reposition(u)},toggle:(o,u)=>{o.toggle(u)},toggleWithoutFocusing:(o,u)=>{o.toggleWithoutFocusing(u)},getToolbar:(o,u)=>o.getToolbar(u),isOpen:(o,u)=>o.isOpen(u)}}),QT=J([Zt("items"),sm(["itemSelector"]),Ll("tgroupBehaviours",[fs])]),nue=J([sv({name:"items",unit:"item"})]),eI=(o,u,m,v)=>({uid:o.uid,dom:o.dom,components:u,behaviours:Ca(o.tgroupBehaviours,[fs.config({mode:"flow",selector:o.markers.itemSelector})]),domModification:{attributes:{role:"toolbar"}}}),tI=$c({name:"ToolbarGroup",configFields:QT(),partFields:nue(),factory:eI}),YG=o=>ct(o,u=>md(u)),xp=(o,u,m)=>{qG(o,m,v=>{m.overflowGroups.set(v),u.getOpt(o).each(C=>{db.setGroups(C,YG(v))})})},sue=(o,u,m,v)=>{const C=or(db.sketch({fetch:()=>ou.nu(x=>{x(YG(o.overflowGroups.get()))}),layouts:{onLtr:()=>[qa,La],onRtl:()=>[La,qa],onBottomLtr:()=>[Pa,Jl],onBottomRtl:()=>[Jl,Pa]},getBounds:m.getOverflowBounds,lazySink:o.lazySink,fireDismissalEventInstead:{},markers:{toggledClass:o.markers.overflowToggledClass},parts:{button:v["overflow-button"](),toolbar:v.overflow()},onToggled:(x,I)=>o[I?"onOpened":"onClosed"](x)}));return{uid:o.uid,dom:o.dom,components:u,behaviours:Ca(o.splitToolbarBehaviours,[da.config({others:{overflowGroup:()=>tI.sketch({...v["overflow-group"](),items:[C.asSpec()]})}})]),apis:{setGroups:(x,I)=>{o.builtGroups.set(ct(I,x.getSystem().build)),xp(x,C,o)},refresh:x=>xp(x,C,o),toggle:x=>{C.getOpt(x).each(I=>{db.toggle(I)})},toggleWithoutFocusing:x=>{C.getOpt(x).each(db.toggleWithoutFocusing)},isOpen:x=>C.getOpt(x).map(db.isOpen).getOr(!1),reposition:x=>{C.getOpt(x).each(I=>{db.reposition(I)})},getOverflow:x=>C.getOpt(x).bind(db.getToolbar)},domModification:{attributes:{role:"group"}}}},F7=$c({name:"SplitFloatingToolbar",configFields:a6e(),partFields:l6e(),factory:sue,apis:{setGroups:(o,u,m)=>{o.setGroups(u,m)},refresh:(o,u)=>{o.refresh(u)},reposition:(o,u)=>{o.reposition(u)},toggle:(o,u)=>{o.toggle(u)},toggleWithoutFocusing:(o,u)=>{o.toggle(u)},isOpen:(o,u)=>o.isOpen(u),getOverflow:(o,u)=>o.getOverflow(u)}}),XG=J([sm(["closedClass","openClass","shrinkingClass","growingClass","overflowToggledClass"]),Ho("onOpened"),Ho("onClosed")].concat(GG())),JG=J([Sc({factory:Hg,schema:eS(),name:"primary"}),Sc({factory:Hg,schema:eS(),name:"overflow",overrides:o=>({toolbarBehaviours:cn([_d.config({dimension:{property:"height"},closedClass:o.markers.closedClass,openClass:o.markers.openClass,shrinkingClass:o.markers.shrinkingClass,growingClass:o.markers.growingClass,onShrunk:u=>{Yr(u,o,"overflow-button").each(m=>{po.off(m)}),o.onClosed(u)},onGrown:u=>{o.onOpened(u)},onStartGrow:u=>{Yr(u,o,"overflow-button").each(po.on)}}),fs.config({mode:"acyclic",onEscape:u=>(Yr(u,o,"overflow-button").each(As.focus),V.some(!0))})])})}),mf({name:"overflow-button",overrides:o=>({buttonBehaviours:cn([po.config({toggleClass:o.markers.overflowToggledClass,aria:{mode:"expanded"},toggleOnExecute:!1})])})}),mf({name:"overflow-group"})]),oue=(o,u)=>Yr(o,u,"overflow").map(_d.hasGrown).getOr(!1),nI=(o,u,m)=>{Yr(o,u,"overflow-button").each(v=>{Yr(o,u,"overflow").each(C=>{if(dF(o,u),_d.hasShrunk(C)){const x=u.onOpened;u.onOpened=I=>{m||fs.focusIn(C),x(I),u.onOpened=x}}else{const x=u.onClosed;u.onClosed=I=>{m||As.focus(v),x(I),u.onClosed=x}}_d.toggleGrow(C)})})},dF=(o,u)=>{Yr(o,u,"overflow").each(m=>{qG(o,u,v=>{const C=ct(v,x=>md(x));Hg.setGroups(m,C)}),Yr(o,u,"overflow-button").each(v=>{_d.hasGrown(m)&&po.on(v)}),_d.refresh(m)})},rue=(o,u,m,v)=>{const C="alloy.toolbar.toggle",x=(I,F)=>{const U=ct(F,I.getSystem().build);o.builtGroups.set(U)};return{uid:o.uid,dom:o.dom,components:u,behaviours:Ca(o.splitToolbarBehaviours,[da.config({others:{overflowGroup:I=>tI.sketch({...v["overflow-group"](),items:[_l.sketch({...v["overflow-button"](),action:F=>{vo(I,C)}})]})}}),zs("toolbar-toggle-events",[Wt(C,I=>{nI(I,o,!1)})])]),apis:{setGroups:(I,F)=>{x(I,F),dF(I,o)},refresh:I=>dF(I,o),toggle:I=>{nI(I,o,!1)},toggleWithoutFocusing:I=>{nI(I,o,!0)},isOpen:I=>oue(I,o)},domModification:{attributes:{role:"group"}}}},fF=$c({name:"SplitSlidingToolbar",configFields:XG(),partFields:JG(),factory:rue,apis:{setGroups:(o,u,m)=>{o.setGroups(u,m)},refresh:(o,u)=>{o.refresh(u)},toggle:(o,u)=>{o.toggle(u)},isOpen:(o,u)=>o.isOpen(u)}}),QG=o=>{const u=o.label.isNone()?o.title.fold(()=>({}),m=>({attributes:{"aria-label":m}})):o.label.fold(()=>({}),m=>({attributes:{"aria-label":m}}));return{dom:{tag:"div",classes:["tox-toolbar__group"].concat(o.label.isSome()?["tox-toolbar__group_with_label"]:[]),...u},components:[...o.label.map(m=>({dom:{tag:"span",classes:["tox-label","tox-label--context-toolbar"]},components:[Ci(m)]})).toArray(),tI.parts.items({})],items:o.items,markers:{itemSelector:"*:not(.tox-split-button) > .tox-tbtn:not([disabled]), .tox-split-button:not([disabled]), .tox-toolbar-nav-item:not([disabled]), .tox-number-input:not([disabled])"},tgroupBehaviours:cn([si.config({}),As.config({ignore:!0})])}},sI=o=>tI.sketch(QG(o)),eK=(o,u)=>{const m=$r(v=>{const C=ct(o.initGroups,sI);Hg.setGroups(v,C)});return cn([pm.toolbarButton(()=>o.providers.checkUiComponentContext("any").shouldDisable),wa(()=>o.providers.checkUiComponentContext("any")),fs.config({mode:u,onEscape:o.onEscape,visibilitySelector:".tox-toolbar__overflow",selector:".tox-toolbar__group"}),zs("toolbar-events",[m])])},tK=o=>{const u=o.cyclicKeying?"cyclic":"acyclic";return{uid:o.uid,dom:{tag:"div",classes:["tox-toolbar-overlord"]},parts:{"overflow-group":QG({title:V.none(),label:V.none(),items:[]}),"overflow-button":Jq({context:"any",icon:V.some("more-drawer"),enabled:!0,tooltip:V.some("Reveal or hide additional toolbar items")},V.none(),o.providers,[],"overflow-button")},splitToolbarBehaviours:eK(o,u)}},nK=o=>{const u=tK(o),m=4,v=F7.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}});return F7.sketch({...u,lazySink:o.getSink,getOverflowBounds:()=>{const C=o.moreDrawerData.lazyHeader().element,x=Fu(C),I=lr(C),F=Fu(I),U=Math.max(I.dom.scrollHeight,F.height);return qi(x.x+m,F.y,x.width-m*2,U)},parts:{...u.parts,overflow:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:o.attributes}}},components:[v],markers:{overflowToggledClass:"tox-tbtn--enabled"},onOpened:C=>o.onToggled(C,!0),onClosed:C=>o.onToggled(C,!1)})},sK=o=>{const u=fF.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}}),m=fF.parts.overflow({dom:{tag:"div",classes:["tox-toolbar__overflow"]}}),v=tK(o);return fF.sketch({...v,components:[u,m],markers:{openClass:"tox-toolbar__overflow--open",closedClass:"tox-toolbar__overflow--closed",growingClass:"tox-toolbar__overflow--growing",shrinkingClass:"tox-toolbar__overflow--shrinking",overflowToggledClass:"tox-tbtn--enabled"},onOpened:C=>{C.getSystem().broadcastOn([zT()],{type:"opened"}),o.onToggled(C,!0)},onClosed:C=>{C.getSystem().broadcastOn([zT()],{type:"closed"}),o.onToggled(C,!1)}})},$7=o=>{const u=o.cyclicKeying?"cyclic":"acyclic";return Hg.sketch({uid:o.uid,dom:{tag:"div",classes:["tox-toolbar"].concat(o.type===yp.scrolling?["tox-toolbar--scrolling"]:[])},components:[Hg.parts.groups({})],toolbarBehaviours:eK(o,u)})},oK=[cv,dm,aa("tooltip"),np("buttonType","secondary",["primary","secondary"]),la("borderless",!1),Kl("onAction"),Li("context","mode:design")],rK=[...oK,lv,tp("type",["button"])],iue=[...oK,la("active",!1),tp("type",["togglebutton"])],iK={button:rK,togglebutton:iue},aK=[tp("type",["group"]),og("buttons",[],dl("type",iK))],lK=dl("type",{...iK,group:aK}),cK=Ns([og("buttons",[],lK),Kl("onShow"),Kl("onHide")]),aue=o=>Ki("view",cK,o),lue=(o,u)=>{var m,v;const C=o.type==="togglebutton",x=o.icon.map(it=>Fg(it,u.icons)).map(or),F=it=>{const It=Ft=>{x.map(Mn=>Mn.getOpt(it).each(En=>{Bs.set(En,[Fg(Ft,u.icons)])}))},Mt=Ft=>{const Mn=it.element;Ft?(sa(Mn,"tox-button--enabled"),jt(Mn,"aria-pressed",!0)):(ua(Mn,"tox-button--enabled"),ke(Mn,"aria-pressed"))},en=()=>Nc(it.element,"tox-button--enabled"),In=()=>eu(it.element);if(C)return o.onAction({setIcon:It,setActive:Mt,isActive:en,focus:In});if(o.type==="button")return o.onAction({setIcon:It})},U={...o,name:C?o.text.getOr(o.icon.getOr("")):(m=o.text)!==null&&m!==void 0?m:o.icon.getOr(""),primary:o.buttonType==="primary",buttonType:V.from(o.buttonType),tooltip:o.tooltip,icon:o.icon,enabled:!0,borderless:o.borderless},X=LN((v=o.buttonType)!==null&&v!==void 0?v:"secondary"),oe=C?o.text.map(u.translate):V.some(u.translate(o.text)),me=oe.map(Ci),Se=U.tooltip.or(oe).map(it=>({"aria-label":u.translate(it)})).getOr({}),Ie=x.map(it=>it.asSpec()),Pe=R_([Ie,me]),Me=o.icon.isSome()&&me.isSome(),at={tag:"button",classes:X.concat(...o.icon.isSome()&&!Me?["tox-button--icon"]:[]).concat(...Me?["tox-button--icon-and-text"]:[]).concat(...o.borderless?["tox-button--naked"]:[]).concat(...o.type==="togglebutton"&&o.active?["tox-button--enabled"]:[]),attributes:Se},qe=[],dt=TT(U,V.some(F),qe,at,Pe,o.tooltip,u);return _l.sketch(dt)},uK=(o,u)=>lue(o,u),dK=(o,u)=>({dom:{tag:"div",classes:["tox-view__toolbar__group"]},components:ct(o.buttons,m=>uK(m,u))}),fK=Zi().deviceType,cue=fK.isPhone(),uue=fK.isTablet(),due=o=>{let u=!1;const m=ct(o.buttons,v=>v.type==="group"?(u=!0,dK(v,o.providers)):uK(v,o.providers));return{uid:o.uid,dom:{tag:"div",classes:[u?"tox-view__toolbar":"tox-view__header",...cue||uue?["tox-view--mobile","tox-view--scrolling"]:[]]},behaviours:cn([As.config({}),fs.config({mode:"flow",selector:"button, .tox-button",focusInside:wc.OnEnterOrSpaceMode})]),components:u?m:[bd.sketch({dom:{tag:"div",classes:["tox-view__header-start"]},components:[]}),bd.sketch({dom:{tag:"div",classes:["tox-view__header-end"]},components:m})]}},fue=o=>({uid:o.uid,behaviours:cn([As.config({}),si.config({})]),dom:{tag:"div",classes:["tox-view__pane"]}}),pue=(o,u,m,v)=>{const C={getPane:x=>ol.getPart(x,o,"pane"),getOnShow:x=>o.viewConfig.onShow,getOnHide:x=>o.viewConfig.onHide};return{uid:o.uid,dom:o.dom,components:u,behaviours:cn([As.config({}),fs.config({mode:"cyclic",focusInside:wc.OnEnterOrSpaceMode})]),apis:C}};var oS=$c({name:"silver.View",configFields:[Zt("viewConfig")],partFields:[qu({factory:{sketch:due},schema:[Zt("buttons"),Zt("providers")],name:"header"}),qu({factory:{sketch:fue},schema:[],name:"pane"})],factory:pue,apis:{getPane:(o,u)=>o.getPane(u),getOnShow:(o,u)=>o.getOnShow(u),getOnHide:(o,u)=>o.getOnHide(u)}});const mue=(o,u,m)=>er(u,(v,C)=>{const x=un(aue(v));return o.slot(C,oS.sketch({dom:{tag:"div",classes:["tox-view"]},viewConfig:x,components:[...x.buttons.length>0?[oS.parts.header({buttons:x.buttons,providers:m})]:[],oS.parts.pane({})]}))}),hue=(o,u)=>nc.sketch(m=>({dom:{tag:"div",classes:["tox-view-wrap__slot-container"]},components:mue(m,o,u),slotBehaviours:A_.unnamedEvents([$r(v=>nc.hideAllSlots(v))])})),pK=o=>Qe(nc.getSlotNames(o),u=>nc.isShowing(o,u)),mK=o=>{const u=o.element;wn(u,"display","none"),jt(u,"aria-hidden","true")},gue=o=>{const u=o.element;fo(u,"display"),ke(u,"aria-hidden")},vue=o=>({getContainer:J(o)}),oI=(o,u,m)=>{nc.getSlot(o,u).each(v=>{oS.getPane(v).each(C=>{m(v)(vue(C.element.dom))})})},bue=(o,u)=>oI(o,u,oS.getOnShow),rI=(o,u)=>oI(o,u,oS.getOnHide);var B7=Gu({factory:(o,u)=>{const x={setViews:(I,F)=>{Bs.set(I,[hue(F,u.backstage.shared.providers)])},whichView:I=>Lo.getCurrent(I).bind(pK),toggleView:(I,F,U,X)=>Lo.getCurrent(I).exists(oe=>{const me=pK(oe),Se=me.exists(Pe=>X===Pe),Ie=nc.getSlot(oe,X).isSome();return Ie&&(nc.hideAllSlots(oe),Se?(mK(I),F()):(U(),gue(I),nc.showSlot(oe,X),bue(oe,X)),me.each(Pe=>rI(oe,Pe))),Ie})};return{uid:o.uid,dom:{tag:"div",classes:["tox-view-wrap"],attributes:{"aria-hidden":"true"},styles:{display:"none"}},components:[],behaviours:cn([Bs.config({}),Lo.config({find:I=>{const F=Bs.contents(I);return Vt(F)}})]),apis:x}},name:"silver.ViewWrapper",configFields:[Zt("backstage")],apis:{setViews:(o,u,m)=>o.setViews(u,m),toggleView:(o,u,m,v,C)=>o.toggleView(u,m,v,C),whichView:(o,u)=>o.whichView(u)}});const yue=(o,u,m)=>{let v=!1;const C=I=>{Wu(I,".tox-statusbar").each(F=>{Gt(F,"display")==="none"&&eo(F,"aria-hidden")==="true"?(fo(F,"display"),ke(F,"aria-hidden")):(wn(F,"display","none"),jt(F,"aria-hidden","true"))})},x={getSocket:I=>ol.getPart(I,o,"socket"),setSidebar:(I,F,U)=>{ol.getPart(I,o,"sidebar").each(X=>Fce(X,F,U))},toggleSidebar:(I,F)=>{ol.getPart(I,o,"sidebar").each(U=>WG(U,F))},whichSidebar:I=>ol.getPart(I,o,"sidebar").bind(iF).getOrNull(),getHeader:I=>ol.getPart(I,o,"header"),getToolbar:I=>ol.getPart(I,o,"toolbar"),setToolbar:(I,F)=>{ol.getPart(I,o,"toolbar").each(U=>{const X=ct(F,sI);U.getApis().setGroups(U,X)})},setToolbars:(I,F)=>{ol.getPart(I,o,"multiple-toolbar").each(U=>{const X=ct(F,oe=>ct(oe,sI));DG.setItems(U,X)})},refreshToolbar:I=>{ol.getPart(I,o,"toolbar").each(U=>U.getApis().refresh(U))},toggleToolbarDrawer:I=>{ol.getPart(I,o,"toolbar").each(F=>{Vn(F.getApis().toggle,U=>U(F))})},toggleToolbarDrawerWithoutFocusing:I=>{ol.getPart(I,o,"toolbar").each(F=>{Vn(F.getApis().toggleWithoutFocusing,U=>U(F))})},isToolbarDrawerToggled:I=>ol.getPart(I,o,"toolbar").bind(F=>V.from(F.getApis().isOpen).map(U=>U(F))).getOr(!1),getThrobber:I=>ol.getPart(I,o,"throbber"),focusToolbar:I=>{ol.getPart(I,o,"toolbar").orThunk(()=>ol.getPart(I,o,"multiple-toolbar")).each(U=>{fs.focusIn(U)})},setMenubar:(I,F)=>{ol.getPart(I,o,"menubar").each(U=>{sF.setMenus(U,F)})},focusMenubar:I=>{ol.getPart(I,o,"menubar").each(F=>{sF.focus(F)})},setViews:(I,F)=>{ol.getPart(I,o,"viewWrapper").each(U=>{B7.setViews(U,F)})},toggleView:(I,F)=>ol.getPart(I,o,"viewWrapper").exists(U=>B7.toggleView(U,()=>x.showMainView(I),()=>x.hideMainView(I),F)),whichView:I=>ol.getPart(I,o,"viewWrapper").bind(B7.whichView).getOrNull(),hideMainView:I=>{v=x.isToolbarDrawerToggled(I),v&&x.toggleToolbarDrawer(I),ol.getPart(I,o,"editorContainer").each(F=>{const U=F.element;C(U),wn(U,"display","none"),jt(U,"aria-hidden","true")})},showMainView:I=>{v&&x.toggleToolbarDrawer(I),ol.getPart(I,o,"editorContainer").each(F=>{const U=F.element;C(U),fo(U,"display"),ke(U,"aria-hidden")})}};return{uid:o.uid,dom:o.dom,components:u,apis:x,behaviours:o.behaviours}},_ue=Vg.optional({factory:sF,name:"menubar",schema:[Zt("backstage")]}),u6e=o=>o.type===yp.sliding?sK:o.type===yp.floating?nK:$7,Sue=Vg.optional({factory:{sketch:o=>DG.sketch({uid:o.uid,dom:o.dom,listBehaviours:cn([fs.config({mode:"acyclic",selector:".tox-toolbar"})]),makeItem:()=>$7({type:o.type,uid:Pn("multiple-toolbar-item"),cyclicKeying:!1,initGroups:[],providers:o.providers,onEscape:()=>(o.onEscape(),V.some(!0))}),setupItem:(u,m,v,C)=>{Hg.setGroups(m,v)},shell:!0})},name:"multiple-toolbar",schema:[Zt("dom"),Zt("onEscape")]}),Cue=Vg.optional({factory:{sketch:o=>{const u=u6e(o),m={type:o.type,uid:o.uid,onEscape:()=>(o.onEscape(),V.some(!0)),onToggled:(v,C)=>o.onToolbarToggled(C),cyclicKeying:!1,initGroups:[],getSink:o.getSink,providers:o.providers,moreDrawerData:{lazyToolbar:o.lazyToolbar,lazyMoreButton:o.lazyMoreButton,lazyHeader:o.lazyHeader},attributes:o.attributes};return u(m)}},name:"toolbar",schema:[Zt("dom"),Zt("onEscape"),Zt("getSink")]}),pF=Vg.optional({factory:{sketch:VG},name:"header",schema:[Zt("dom")]}),wue=Vg.optional({factory:{sketch:tS},name:"promotion",schema:[Zt("dom")]}),iI=Vg.optional({name:"socket",schema:[Zt("dom")]}),hK=Vg.optional({factory:{sketch:ZT},name:"sidebar",schema:[Zt("dom")]}),gK=Vg.optional({factory:{sketch:jce},name:"throbber",schema:[Zt("dom")]}),mF=Vg.optional({factory:B7,name:"viewWrapper",schema:[Zt("backstage")]}),Eue=o=>({uid:o.uid,dom:{tag:"div",classes:["tox-editor-container"]},components:o.components}),vK=Vg.optional({factory:{sketch:Eue},name:"editorContainer",schema:[]});var Dr=$c({name:"OuterContainer",factory:yue,configFields:[Zt("dom"),Zt("behaviours")],partFields:[pF,_ue,Cue,Sue,iI,hK,wue,gK,mF,vK],apis:{getSocket:(o,u)=>o.getSocket(u),setSidebar:(o,u,m,v)=>{o.setSidebar(u,m,v)},toggleSidebar:(o,u,m)=>{o.toggleSidebar(u,m)},whichSidebar:(o,u)=>o.whichSidebar(u),getHeader:(o,u)=>o.getHeader(u),getToolbar:(o,u)=>o.getToolbar(u),setToolbar:(o,u,m)=>{o.setToolbar(u,m)},setToolbars:(o,u,m)=>{o.setToolbars(u,m)},refreshToolbar:(o,u)=>o.refreshToolbar(u),toggleToolbarDrawer:(o,u)=>{o.toggleToolbarDrawer(u)},toggleToolbarDrawerWithoutFocusing:(o,u)=>{o.toggleToolbarDrawerWithoutFocusing(u)},isToolbarDrawerToggled:(o,u)=>o.isToolbarDrawerToggled(u),getThrobber:(o,u)=>o.getThrobber(u),setMenubar:(o,u,m)=>{o.setMenubar(u,m)},focusMenubar:(o,u)=>{o.focusMenubar(u)},focusToolbar:(o,u)=>{o.focusToolbar(u)},setViews:(o,u,m)=>{o.setViews(u,m)},toggleView:(o,u,m)=>o.toggleView(u,m),whichView:(o,u)=>o.whichView(u)}});const bK="file edit view insert format tools table help",yK={file:{title:"File",items:"newdocument restoredraft | preview | importword exportpdf exportword | export print | deleteallconversations"},edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall | searchreplace"},view:{title:"View",items:"code revisionhistory | visualaid visualchars visualblocks | spellchecker | preview fullscreen | showcomments"},insert:{title:"Insert",items:"image link media addcomment pageembed inserttemplate codesample inserttable accordion math | charmap emoticons hr | pagebreak nonbreaking anchor tableofcontents footnotes | mergetags | insertdatetime"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript codeformat | styles blocks fontfamily fontsize align lineheight | forecolor backcolor | language | removeformat"},tools:{title:"Tools",items:"aidialog aishortcuts | spellchecker spellcheckerlanguage | autocorrect capitalization | a11ycheck code typography wordcount addtemplate"},table:{title:"Table",items:"inserttable | cell row column | advtablesort | tableprops deletetable"},help:{title:"Help",items:"help"}},kue=(o,u,m)=>{const v=Zz(m).split(/[ ,]/);return{text:o.title,getItems:()=>Ve(o.items,C=>{const x=C.toLowerCase();return x.trim().length===0?[]:ht(v,I=>I===x)?[]:x==="separator"||x==="|"?[{type:"separator"}]:u.menuItems[x]?[u.menuItems[x]]:[]})}},hF=o=>o.split(" "),aI=(o,u)=>{const m={...yK,...u.menus},v=Zn(u.menus).length>0,C=u.menubar===void 0||u.menubar===!0?hF(bK):hF(u.menubar===!1?"":u.menubar),x=jn(C,F=>{const U=qs(yK,F);return v?U||bn(u.menus,F).exists(X=>qs(X,"items")):U}),I=ct(x,F=>{const U=m[F];return kue({title:U.title,items:hF(U.items)},u,o)});return jn(I,F=>{const U=X=>d(X)||X.type!=="separator";return F.getItems().length>0&&ht(F.getItems(),U)})},xue=o=>{const u=()=>{o._skinLoaded=!0,gre(o)};return()=>{o.initialized?u():o.on("init",u)}},Tue=(o,u)=>()=>vre(o,{message:u}),_K=o=>{const u=T8(o);return u?V.from(u):V.none()},gF=(o,u,m)=>(o.on("remove",()=>m.unload(u)),m.load(u)),x3=(o,u,m,v)=>(o.on("remove",()=>v.unloadRawCss(u)),v.loadRawCss(u,m)),vF=(o,u)=>"ui/"+o+"/"+u,Iue=o=>V.from(tinymce.Resource.get(o)).filter(d),bF=(o,u,m="")=>{const v=_K(o).map(x=>vF(x,"".concat(u,".css"))),C=v.bind(Iue);return Zo(v,C,(x,I)=>({_kind:"load-raw",key:x,css:I})).getOrThunk(()=>{const x=o.editorManager.suffix;return{_kind:"load-stylesheet",url:m+"/".concat(u).concat(x,".css")}})},SK=(o,u)=>{const m=o.ui.styleSheetLoader,v=bF(o,"skin",u);switch(v._kind){case"load-raw":const{key:C,css:x}=v;return x3(o,C,x,m),Promise.resolve();case"load-stylesheet":const{url:I}=v;return gF(o,I,m);default:return Promise.resolve()}},Aue=(o,u)=>{if(qc(Xt.fromDom(o.getElement()))){const v=E8.DOM.styleSheetLoader,C=bF(o,"skin.shadowdom",u);switch(C._kind){case"load-raw":const{key:x,css:I}=C;return x3(o,x,I,v),Promise.resolve();case"load-stylesheet":const{url:F}=C;return gF(o,F,v);default:return Promise.resolve()}}else return Promise.resolve()},Oue=(o,u,m)=>{const C=bF(o,u?"content.inline":"content",m);switch(C._kind){case"load-raw":const{key:x,css:I}=C;return u?x3(o,x,I,o.ui.styleSheetLoader):o.on("PostRender",()=>{x3(o,x,I,o.dom.styleSheetLoader)}),Promise.resolve();case"load-stylesheet":const{url:F}=C;return m&&o.contentCSS.push(F),Promise.resolve();default:return Promise.resolve()}},Rue=async(o,u)=>{const m=rW(u);if(await Oue(u,o,m),!WL(u)&&d(m))return Promise.all([SK(u,m),Aue(u,m)]).then()},yF=(o,u)=>Rue(o,u).then(xue(u),Tue(u,"Skin could not be loaded")),Due=de(yF,!1),Lue=de(yF,!0),fb=(o,u,m)=>yr(m)?o.translate(u):o.translate([u,o.translate(m)]),Pue=(o,u)=>{const m=(I,F,U,X)=>{const oe=o.shared.providers.translate(I.title);if(I.type==="separator")return V.some({type:"separator",text:oe});if(I.type==="submenu"){const me=Ve(I.getStyleItems(),Se=>v(Se,F,X));return F===0&&me.length<=0?V.none():V.some({type:"nestedmenuitem",text:oe,enabled:me.length>0,getSubmenuItems:()=>Ve(I.getStyleItems(),Se=>v(Se,F,X))})}else return V.some({type:"togglemenuitem",text:oe,icon:I.icon,active:I.isSelected(X),enabled:!U,onAction:u.onAction(I),...I.getStylePreview().fold(()=>({}),me=>({meta:{style:me}}))})},v=(I,F,U)=>{const X=I.type==="formatter"&&u.isInvalid(I);return F===0?X?[]:m(I,F,!1,U).toArray():m(I,F,X,U).toArray()},C=I=>{const F=u.getCurrentValue(),U=u.shouldHide?0:1;return Ve(I,X=>v(X,U,F))};return{validateItems:C,getFetch:(I,F)=>(U,X)=>{const oe=F(),me=C(oe),Se=q_(me,um.CLOSE_ON_EXECUTE,I,{isHorizontalMenu:!1,search:V.none()});X(Se)}}},rS=(o,u)=>{const m=u.dataset,v=m.type==="basic"?()=>ct(m.data,C=>yG(C,u.isSelectedFor,u.getPreviewFor)):m.getData;return{items:Pue(o,u),getStyleItems:v}},iS=(o,u,m,v,C,x)=>{const{items:I,getStyleItems:F}=rS(u,m),U=ds(m.tooltip),X=me=>({getComponent:J(me),setTooltip:Se=>{const Ie=u.shared.providers.translate(Se);jt(me.element,"aria-label",Ie),U.set(Se)}}),oe=me=>{const Se=Ie=>me.setTooltip(fb(o,v(Ie.value),Ie.value));return o.on(C,Se),Wx(J2(o,"NodeChange",Ie=>{const Pe=Ie.getComponent();m.updateText(Pe),Xn.set(Ie.getComponent(),!o.selection.isEditable())})(me),()=>o.off(C,Se))};return mN({context:"mode:design",text:m.icon.isSome()?V.none():m.text,icon:m.icon,ariaLabel:V.some(m.tooltip),tooltip:V.none(),role:V.none(),fetch:I.getFetch(u,F),onSetup:oe,getApi:X,columns:1,presets:"normal",classes:m.icon.isSome()?[]:["bespoke"],dropdownBehaviours:[Yi.config({...u.shared.providers.tooltips.getConfig({tooltipText:u.shared.providers.translate(m.tooltip),onShow:me=>{if(m.tooltip!==U.get()){const Se=u.shared.providers.translate(U.get());Yi.setComponents(me,u.shared.providers.tooltips.getComponents({tooltipText:Se}))}}})})]},"tox-tbtn",u.shared,x)},Mue=o=>ct(o,u=>{let m=u,v=u;const C=u.split("=");return C.length>1&&(m=C[0],v=C[1]),{title:m,format:v}}),CK=o=>({type:"basic",data:o});var aS;(function(o){o[o.SemiColon=0]="SemiColon",o[o.Space=1]="Space"})(aS||(aS={}));const wK=(o,u)=>u===aS.SemiColon?o.replace(/;$/,"").split(";"):o.split(" "),_F=(o,u,m)=>{const v=o.options.get(u);return{type:"basic",data:Mue(wK(v,m))}},Nue="Align",EK=J("Alignment {0}"),SF="left",CF=[{title:"Left",icon:"align-left",format:"alignleft",command:"JustifyLeft"},{title:"Center",icon:"align-center",format:"aligncenter",command:"JustifyCenter"},{title:"Right",icon:"align-right",format:"alignright",command:"JustifyRight"},{title:"Justify",icon:"align-justify",format:"alignjustify",command:"JustifyFull"}],kK=o=>{const u=()=>Qe(CF,F=>o.formatter.match(F.format)),m=F=>()=>o.formatter.match(F),v=F=>V.none,C=F=>{const X=u().fold(J(SF),oe=>oe.title.toLowerCase());ps(F,cb,{icon:"align-".concat(X)}),Sre(o,{value:X})},x=CK(CF),I=F=>()=>Qe(CF,U=>U.format===F.format).each(U=>o.execCommand(U.command));return{tooltip:fb(o,EK(),SF),text:V.none(),icon:V.some("align-left"),isSelectedFor:m,getCurrentValue:V.none,getPreviewFor:v,onAction:I,updateText:C,dataset:x,shouldHide:!1,isInvalid:F=>!o.formatter.canApply(F.format)}},Fue=(o,u)=>iS(o,u,kK(o),EK,"AlignTextUpdate","align"),wF=(o,u)=>{const m=rS(u,kK(o));o.ui.registry.addNestedMenuItem("align",{text:u.shared.providers.translate(Nue),onSetup:Bc(o),getSubmenuItems:()=>m.items.validateItems(m.getStyleItems())})},lI=(o,u)=>{const m=u(),v=ct(m,C=>C.format);return V.from(o.formatter.closest(v)).bind(C=>Qe(m,x=>x.format===C))},$ue="Blocks",xK=J("Block {0}"),EF="Paragraph",TK=o=>{const u=x=>()=>o.formatter.match(x),m=x=>()=>{const I=o.formatter.get(x);return I?V.some({tag:I.length>0&&(I[0].inline||I[0].block)||"div",styles:o.dom.parseStyle(o.formatter.getCssText(x))}):V.none()},v=x=>{const F=lI(o,()=>C.data).fold(J(EF),U=>U.title);ps(x,wf,{text:F}),Ere(o,{value:F})},C=_F(o,"block_formats",aS.SemiColon);return{tooltip:fb(o,xK(),EF),text:V.some(EF),icon:V.none(),isSelectedFor:u,getCurrentValue:V.none,getPreviewFor:m,onAction:Lj(o),updateText:v,dataset:C,shouldHide:!1,isInvalid:x=>!o.formatter.canApply(x.format)}},Bue=(o,u)=>iS(o,u,TK(o),xK,"BlocksTextUpdate","blocks"),Vue=(o,u)=>{const m=rS(u,TK(o));o.ui.registry.addNestedMenuItem("blocks",{text:$ue,onSetup:Bc(o),getSubmenuItems:()=>m.items.validateItems(m.getStyleItems())})},Hue="Fonts",IK=J("Font {0}"),kF="System Font",AK=["-apple-system","Segoe UI","Roboto","Helvetica Neue","sans-serif"],V7=o=>{const u=o.split(/\s*,\s*/);return ct(u,m=>m.replace(/^['"]+|['"]+$/g,""))},cI=(o,u)=>u.length>0&&dn(u,m=>o.indexOf(m.toLowerCase())>-1),OK=(o,u)=>{if(o.indexOf("-apple-system")===0||u.length>0){const m=V7(o.toLowerCase());return cI(m,AK)||cI(m,u)}else return!1},hv=o=>{const u=()=>{const U=Pe=>Pe?V7(Pe)[0]:"",X=o.queryCommandValue("FontName"),oe=F.data,me=X?X.toLowerCase():"",Se=oW(o);return{matchOpt:Qe(oe,Pe=>{const Me=Pe.format;return Me.toLowerCase()===me||U(Me).toLowerCase()===U(me).toLowerCase()}).orThunk(()=>Kt(OK(me,Se),{title:kF,format:me})),font:X}},m=U=>X=>X.exists(oe=>oe.format===U),v=()=>{const{matchOpt:U}=u();return U},C=U=>()=>V.some({tag:"div",styles:U.indexOf("dings")===-1?{"font-family":U}:{}}),x=U=>()=>{o.undoManager.transact(()=>{o.focus(),o.execCommand("FontName",!1,U.format)})},I=U=>{const{matchOpt:X,font:oe}=u(),me=X.fold(J(oe),Se=>Se.title);ps(U,wf,{text:me}),kre(o,{value:me})},F=_F(o,"font_family_formats",aS.SemiColon);return{tooltip:fb(o,IK(),kF),text:V.some(kF),icon:V.none(),isSelectedFor:m,getCurrentValue:v,getPreviewFor:C,onAction:x,updateText:I,dataset:F,shouldHide:!1,isInvalid:$e}},RK=(o,u)=>iS(o,u,hv(o),IK,"FontFamilyTextUpdate","fontfamily"),Uue=(o,u)=>{const m=rS(u,hv(o));o.ui.registry.addNestedMenuItem("fontfamily",{text:u.shared.providers.translate(Hue),onSetup:Bc(o),getSubmenuItems:()=>m.items.validateItems(m.getStyleItems())})},zue={unsupportedLength:["em","ex","cap","ch","ic","rem","lh","rlh","vw","vh","vi","vb","vmin","vmax","cm","mm","Q","in","pc","pt","px"],fixed:["px","pt"],relative:["%"],empty:[""]},Wue=(()=>{const o="[0-9]+",m="[eE]"+("[+-]?"+o),v="\\.",C=F=>"(?:".concat(F,")?"),x=["Infinity",o+v+C(o)+C(m),v+o+C(m),o+C(m)].join("|"),I="[+-]?(?:".concat(x,")");return new RegExp("^(".concat(I,")(.*)$"))})(),jue=(o,u)=>ht(u,m=>ht(zue[m],v=>o===v)),uI=(o,u)=>V.from(Wue.exec(o)).bind(v=>{const C=Number(v[1]),x=v[2];return jue(x,u)?V.some({value:C,unit:x}):V.none()}),Zue=(o,u)=>uI(o,u).map(({value:m,unit:v})=>m+v),DK={tab:J(9),escape:J(27),enter:J(13),backspace:J(8),delete:J(46),left:J(37),up:J(38),right:J(39),down:J(40),space:J(32),home:J(36),end:J(35),pageUp:J(33),pageDown:J(34)},LK=(o,u,m,v)=>{let C=V.none();const x=it=>it.map(It=>Dn.getValue(It)).getOr(""),I=J2(o,"NodeChange SwitchMode DisabledStateChange",it=>{const It=it.getComponent();C=V.some(It),m.updateInputValue(It),Xn.set(It,!o.selection.isEditable()||sx(o))}),F=it=>({getComponent:J(it)}),U=ds(z),X=Pn("custom-number-input-events"),oe=(it,It,Mt)=>{const en=x(C),In=m.getNewValue(en,it),Ft=en.length-"".concat(In).length,Mn=C.map(zn=>zn.element.dom.selectionStart-Ft),En=C.map(zn=>zn.element.dom.selectionEnd-Ft);m.onAction(In,Mt),C.each(zn=>{Dn.setValue(zn,In),It&&(Mn.each(go=>zn.element.dom.selectionStart=go),En.each(go=>zn.element.dom.selectionEnd=go))})},me=(it,It)=>oe((Mt,en)=>Mt-en,it,It),Se=(it,It)=>oe((Mt,en)=>Mt+en,it,It),Ie=it=>jl(it.element).fold(V.none,It=>(eu(It),V.some(!0))),Pe=it=>gl(it.element)?(Ja(it.element).each(It=>eu(It)),V.some(!0)):V.none(),Me=(it,It,Mt,en)=>{const In=ds(z),Ft=u.shared.providers.translate(Mt),Mn=Pn("altExecuting"),En=J2(o,"NodeChange SwitchMode DisabledStateChange",go=>{Xn.set(go.getComponent(),!o.selection.isEditable()||sx(o))}),zn=go=>{Xn.isDisabled(go)||it(!0)};return _l.sketch({dom:{tag:"button",attributes:{"aria-label":Ft,"data-mce-name":It},classes:en.concat(It)},components:[pN(It,u.shared.providers.icons)],buttonBehaviours:cn([Xn.config({}),Yi.config(u.shared.providers.tooltips.getConfig({tooltipText:Ft})),zs(Mn,[S1({onSetup:En,getApi:F},In),_h({getApi:F},In),Wt(gc(),(go,fi)=>{(fi.event.raw.keyCode===DK.space()||fi.event.raw.keyCode===DK.enter())&&(Xn.isDisabled(go)||it(!1))}),Wt(Jm(),zn),Wt(e1(),zn)])]),eventOrder:{[gc()]:[Mn,"keying"],[Jm()]:[Mn,"alloy.base.behaviour"],[e1()]:[Mn,"alloy.base.behaviour"],[lp()]:["alloy.base.behaviour",Mn,"tooltipping"],[cp()]:[Mn,"tooltipping"]}})},at=or(Me(it=>me(!1,it),"minus","Decrease font size",[])),qe=or(Me(it=>Se(!1,it),"plus","Increase font size",[])),dt=or({dom:{tag:"div",classes:["tox-input-wrapper"]},components:[iv.sketch({inputBehaviours:cn([Xn.config({}),zs(X,[S1({onSetup:I,getApi:F},U),_h({getApi:F},U)]),zs("input-update-display-text",[Wt(wf,(it,It)=>{Dn.setValue(it,It.event.text)}),Wt(D9(),it=>{m.onAction(Dn.getValue(it))}),Wt(t1(),it=>{m.onAction(Dn.getValue(it))})]),fs.config({mode:"special",onEnter:it=>(oe(ce,!0,!0),V.some(!0)),onEscape:Ie,onUp:it=>(Se(!0,!1),V.some(!0)),onDown:it=>(me(!0,!1),V.some(!0)),onLeft:(it,It)=>(It.cut(),V.none()),onRight:(it,It)=>(It.cut(),V.none())})])})],behaviours:cn([As.config({}),fs.config({mode:"special",onEnter:Pe,onSpace:Pe,onEscape:Ie}),zs("input-wrapper-events",[Wt(rp(),it=>{Ht([at,qe],It=>{const Mt=Xt.fromDom(It.get(it).element.dom);gl(Mt)&&lh(Mt)})})])])});return{dom:{tag:"div",classes:["tox-number-input"],attributes:{...B(v)?{"data-mce-name":v}:{}}},components:[at.asSpec(),dt.asSpec(),qe.asSpec()],behaviours:cn([As.config({}),fs.config({mode:"flow",focusInside:wc.OnEnterOrSpaceMode,cycles:!1,selector:"button, .tox-input-wrapper",onEscape:it=>gl(it.element)?V.none():(eu(it.element),V.some(!0))})])}},que="Font sizes",PK=J("Font size {0}"),dI="12pt",Gue={"8pt":"1","10pt":"2","12pt":"3","14pt":"4","18pt":"5","24pt":"6","36pt":"7"},Kue={"xx-small":"7pt","x-small":"8pt",small:"10pt",medium:"12pt",large:"14pt","x-large":"18pt","xx-large":"24pt"},Yue=(o,u)=>{const m=Math.pow(10,u);return Math.round(o*m)/m},Xue=(o,u)=>/[0-9.]+px$/.test(o)?Yue(parseInt(o,10)*72/96,u||0)+"pt":bn(Kue,o).getOr(o),Jue=o=>bn(Gue,o).getOr(""),MK=o=>{const u=()=>{let U=V.none();const X=F.data,oe=o.queryCommandValue("FontSize");if(oe)for(let me=3;U.isNone()&&me>=0;me--){const Se=Xue(oe,me),Ie=Jue(Se);U=Qe(X,Pe=>Pe.format===oe||Pe.format===Se||Pe.format===Ie)}return{matchOpt:U,size:oe}},m=U=>X=>X.exists(oe=>oe.format===U),v=()=>{const{matchOpt:U}=u();return U},C=J(V.none),x=U=>()=>{o.undoManager.transact(()=>{o.focus(),o.execCommand("FontSize",!1,U.format)})},I=U=>{const{matchOpt:X,size:oe}=u(),me=X.fold(J(oe),Se=>Se.title);ps(U,wf,{text:me}),Cre(o,{value:me})},F=_F(o,"font_size_formats",aS.Space);return{tooltip:fb(o,PK(),dI),text:V.some(dI),icon:V.none(),isSelectedFor:m,getPreviewFor:C,getCurrentValue:v,onAction:x,updateText:I,dataset:F,shouldHide:!1,isInvalid:$e}},NK=(o,u)=>iS(o,u,MK(o),PK,"FontSizeTextUpdate","fontsize"),FK=o=>{var u;const m={step:1};return(u={em:{step:.1},cm:{step:.1},in:{step:.1},pc:{step:.1},ch:{step:.1},rem:{step:.1}}[o])!==null&&u!==void 0?u:m},$K=16,Que=o=>o>=0,BK=o=>{const u=()=>o.queryCommandValue("FontSize");return{updateInputValue:v=>ps(v,wf,{text:u()}),onAction:(v,C)=>o.execCommand("FontSize",!1,v,{skip_focus:!C}),getNewValue:(v,C)=>{uI(v,["unsupportedLength","empty"]);const x=u(),I=uI(v,["unsupportedLength","empty"]).or(uI(x,["unsupportedLength","empty"])),F=I.map(Se=>Se.value).getOr($K),U=Xz(o),X=I.map(Se=>Se.unit).filter(Se=>Se!=="").getOr(U),oe=C(F,FK(X).step),me="".concat(Que(oe)?oe:F).concat(X);return me!==x&&wre(o,{value:me}),me}}},ede=(o,u)=>LK(o,u,BK(o),"fontsizeinput"),tde=(o,u)=>{const m=rS(u,MK(o));o.ui.registry.addNestedMenuItem("fontsize",{text:que,onSetup:Bc(o),getSubmenuItems:()=>m.items.validateItems(m.getStyleItems())})},nde="Formats",xF=o=>yr(o)?"Formats":"Format {0}",VK=(o,u)=>{const m="Formats",v=I=>()=>o.formatter.match(I),C=I=>()=>{const F=o.formatter.get(I);return F!==void 0?V.some({tag:F.length>0&&(F[0].inline||F[0].block)||"div",styles:o.dom.parseStyle(o.formatter.getCssText(I))}):V.none()},x=I=>{const F=me=>zN(me)?Ve(me.items,F):MT(me)?[{title:me.title,format:me.format}]:[],U=Ve(R7(o),F),oe=lI(o,J(U)).fold(J({title:m,tooltipLabel:""}),me=>({title:me.title,tooltipLabel:me.title}));ps(I,wf,{text:oe.title}),Rj(o,{value:oe.tooltipLabel})};return{tooltip:fb(o,xF(""),""),text:V.some(m),icon:V.none(),isSelectedFor:v,getCurrentValue:V.none,getPreviewFor:C,onAction:Lj(o),updateText:x,shouldHide:Wz(o),isInvalid:I=>!o.formatter.canApply(I.format),dataset:u}},HK=(o,u)=>{const m={type:"advanced",...u.styles};return iS(o,u,VK(o,m),xF,"StylesTextUpdate","styles")},sde=(o,u)=>{const m={type:"advanced",...u.styles},v=rS(u,VK(o,m));o.ui.registry.addNestedMenuItem("styles",{text:nde,onSetup:Bc(o),getSubmenuItems:()=>v.items.validateItems(v.getStyleItems())})},ode=J([Zt("toggleClass"),Zt("fetch"),Nd("onExecute"),mt("getHotspot",V.some),mt("getAnchorOverrides",J({})),Cg(),Nd("onItemExecute"),ur("lazySink"),Zt("dom"),Ho("onOpen"),Ll("splitDropdownBehaviours",[da,fs,As]),mt("matchWidth",!1),mt("useMinWidth",!1),mt("eventOrder",{}),ur("role"),ur("listRole")].concat(gM())),rde=Sc({factory:_l,schema:[Zt("dom")],name:"arrow",defaults:()=>({buttonBehaviours:cn([As.revoke()])}),overrides:o=>({dom:{tag:"span",attributes:{role:"presentation"}},action:u=>{u.getSystem().getByUid(o.uid).each(_u)},buttonBehaviours:cn([po.config({toggleOnExecute:!1,toggleClass:o.toggleClass})])})}),ide=Sc({factory:_l,schema:[Zt("dom")],name:"button",defaults:()=>({buttonBehaviours:cn([As.revoke()])}),overrides:o=>({dom:{tag:"span",attributes:{role:"presentation"}},action:u=>{u.getSystem().getByUid(o.uid).each(m=>{o.onExecute(m,u)})}})}),ade=J([rde,ide,qu({factory:{sketch:o=>({uid:o.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:o.text}})},schema:[Zt("text")],name:"aria-descriptor"}),mf({schema:[Sy()],name:"menu",defaults:o=>({onExecute:(u,m)=>{u.getSystem().getByUid(o.uid).each(v=>{o.onItemExecute(v,u,m)})}})}),fM()]),lde=(o,u,m,v)=>{const C=oe=>{Lo.getCurrent(oe).each(me=>{Re.highlightFirst(me),fs.focusIn(me)})},x=oe=>{mM(o,ce,oe,v,C,Pl.HighlightMenuAndItem).get(z)},I=oe=>(x(oe),V.some(!0)),F=oe=>{const me=am(oe,o,"button");return _u(me),V.some(!0)},U={...ni([$r((oe,me)=>{Yr(oe,o,"aria-descriptor").each(Ie=>{const Pe=Pn("aria");jt(Ie.element,"id",Pe),jt(oe.element,"aria-describedby",Pe)})})]),...S_(V.some(x))},X={repositionMenus:oe=>{po.isOn(oe)&&n7(oe)}};return{uid:o.uid,dom:o.dom,components:u,apis:X,eventOrder:{...o.eventOrder,[Mc()]:["disabling","toggling","alloy.base.behaviour"]},events:U,behaviours:Ca(o.splitDropdownBehaviours,[da.config({others:{sandbox:oe=>{const me=am(oe,o,"arrow");return hM(o,oe,{onOpen:()=>{po.on(me),po.on(oe)},onClose:()=>{po.off(me),po.off(oe)}})}}}),fs.config({mode:"special",onSpace:F,onEnter:F,onDown:I}),As.config({}),po.config({toggleOnExecute:!1,aria:{mode:"expanded"}})]),domModification:{attributes:{role:o.role.getOr("button"),"aria-haspopup":!0}}}},fI=$c({name:"SplitDropdown",configFields:ode(),partFields:ade(),factory:lde,apis:{repositionMenus:(o,u)=>o.repositionMenus(u)}}),TF=o=>({isEnabled:()=>!Xn.isDisabled(o),setEnabled:u=>Xn.set(o,!u),setText:u=>ps(o,wf,{text:u}),setIcon:u=>ps(o,cb,{icon:u})}),cde=o=>({setActive:u=>{po.set(o,u)},isActive:()=>po.isOn(o),isEnabled:()=>!Xn.isDisabled(o),setEnabled:u=>Xn.set(o,!u),setText:u=>ps(o,wf,{text:u}),setIcon:u=>ps(o,cb,{icon:u})}),UK=(o,u)=>o.map(m=>({"aria-label":u.translate(m)})).getOr({}),zK=Pn("focus-button"),IF=(o,u,m,v,C,x,I)=>{const F=u.map(X=>or(Eq(X,"tox-tbtn",C))),U=o.map(X=>or(Fg(X,C.icons)));return{dom:{tag:"button",classes:["tox-tbtn"].concat(u.isSome()?["tox-tbtn--select"]:[]),attributes:{...UK(m,C),...B(I)?{"data-mce-name":I}:{}}},components:R_([U.map(X=>X.asSpec()),F.map(X=>X.asSpec())]),eventOrder:{[fd()]:["focusing","alloy.base.behaviour",lb],[lp()]:[lb,"toolbar-group-button-events"],[cp()]:[lb,"toolbar-group-button-events","tooltipping"]},buttonBehaviours:cn([pm.toolbarButton(()=>C.checkUiComponentContext(x).shouldDisable),wa(()=>C.checkUiComponentContext(x)),zs(lb,[$r((X,oe)=>C7(X)),Wt(wf,(X,oe)=>{F.bind(me=>me.getOpt(X)).each(me=>{Bs.set(me,[Ci(C.translate(oe.event.text))])})}),Wt(cb,(X,oe)=>{U.bind(me=>me.getOpt(X)).each(me=>{Bs.set(me,[Fg(oe.event.icon,C.icons)])})}),Wt(fd(),(X,oe)=>{oe.event.prevent(),vo(X,zK)})])].concat(v.getOr([])))}},ude=(o,u,m,v,C)=>{const x=u.shared,I=ds(z),F={toolbarButtonBehaviours:[],getApi:TF,onSetup:o.onSetup},U=[zs("toolbar-group-button-events",[S1(F,I),_h(F,I)]),...o.tooltip.map(X=>Yi.config(u.shared.providers.tooltips.getConfig({tooltipText:u.shared.providers.translate(X)}))).toArray()];return db.sketch({lazySink:x.getSink,fetch:()=>ou.nu(X=>{X(ct(m(o.items),sI))}),markers:{toggledClass:"tox-tbtn--enabled"},parts:{button:IF(o.icon,o.text,o.tooltip,V.some(U),x.providers,o.context,C),toolbar:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:v}}}})},WK=(o,u,m,v)=>{var C;const x=ds(z),I=IF(o.icon,o.text,o.tooltip,V.none(),m,o.context,v);return _l.sketch({dom:I.dom,components:I.components,eventOrder:Z_,buttonBehaviours:{...cn([zs("toolbar-button-events",[Zae({onAction:o.onAction,getApi:u.getApi}),S1(u,x),_h(u,x)]),...o.tooltip.map(F=>Yi.config(m.tooltips.getConfig({tooltipText:m.translate(F)+o.shortcut.map(U=>" (".concat(BP(U),")")).getOr("")}))).toArray(),pm.toolbarButton(()=>!o.enabled||m.checkUiComponentContext(o.context).shouldDisable),wa(()=>m.checkUiComponentContext(o.context))].concat(u.toolbarButtonBehaviours)),[lb]:(C=I.buttonBehaviours)===null||C===void 0?void 0:C[lb]}})},dde=(o,u,m)=>AF(o,u,[],m),AF=(o,u,m,v)=>WK(o,{toolbarButtonBehaviours:m.length>0?[zs("toolbarButtonWith",m)]:[],getApi:TF,onSetup:o.onSetup},u,v),fde=(o,u,m)=>jK(o,u,[],m),jK=(o,u,m,v)=>WK(o,{toolbarButtonBehaviours:[Bs.config({}),po.config({toggleClass:"tox-tbtn--enabled",aria:{mode:"pressed"},toggleOnExecute:!1})].concat(m.length>0?[zs("toolbarToggleButtonWith",m)]:[]),getApi:cde,onSetup:o.onSetup},u,v),ZK=(o,u,m)=>v=>ou.nu(C=>u.fetch(C)).map(C=>V.from(bM(Gi(cM(Pn("menu-value"),C,x=>{u.onItemAction(o(v),x)},u.columns,u.presets,um.CLOSE_ON_EXECUTE,u.select.getOr($e),m),{movement:Yx(u.columns,u.presets),menuBehaviours:A_.unnamedEvents(u.columns!=="auto"?[]:[$r((x,I)=>{PP(x,4,vP(u.presets)).each(({numRows:F,numColumns:U})=>{fs.setGridSize(x,F,U)})})])})))),pde=(o,u,m)=>{const v=ds(o.tooltip.getOr("")),C=F=>({isEnabled:()=>!Xn.isDisabled(F),setEnabled:U=>Xn.set(F,!U),setIconFill:(U,X)=>{sr(F.element,'svg path[class="'.concat(U,'"], rect[class="').concat(U,'"]')).each(oe=>{jt(oe,"fill",X)})},setActive:U=>{jt(F.element,"aria-pressed",U),sr(F.element,"span").each(X=>{F.getSystem().getByDom(X).each(oe=>po.set(oe,U))})},isActive:()=>sr(F.element,"span").exists(U=>F.getSystem().getByDom(U).exists(po.isOn)),setText:U=>sr(F.element,"span").each(X=>F.getSystem().getByDom(X).each(oe=>ps(oe,wf,{text:U}))),setIcon:U=>sr(F.element,"span").each(X=>F.getSystem().getByDom(X).each(oe=>ps(oe,cb,{icon:U}))),setTooltip:U=>{const X=u.providers.translate(U);jt(F.element,"aria-label",X),v.set(U)}}),x=ds(z),I={getApi:C,onSetup:o.onSetup};return fI.sketch({dom:{tag:"div",classes:["tox-split-button"],attributes:{"aria-pressed":!1,...UK(o.tooltip,u.providers),...B(m)?{"data-mce-name":m}:{}}},onExecute:F=>{const U=C(F);U.isEnabled()&&o.onAction(U)},onItemExecute:(F,U,X)=>{},splitDropdownBehaviours:cn([zs("split-dropdown-events",[$r((F,U)=>C7(F)),Wt(zK,As.focus),S1(I,x),_h(I,x)]),pm.splitButton(()=>u.providers.isDisabled()||u.providers.checkUiComponentContext(o.context).shouldDisable),wa(()=>u.providers.checkUiComponentContext(o.context)),sb.config({}),...o.tooltip.map(F=>Yi.config({...u.providers.tooltips.getConfig({tooltipText:u.providers.translate(F),onShow:U=>{if(v.get()!==F){const X=u.providers.translate(v.get());Yi.setComponents(U,u.providers.tooltips.getComponents({tooltipText:X}))}}})})).toArray()]),eventOrder:{[lp()]:["alloy.base.behaviour","split-dropdown-events","tooltipping"],[cp()]:["split-dropdown-events","tooltipping"]},toggleClass:"tox-tbtn--enabled",lazySink:u.getSink,fetch:ZK(C,o,u.providers),parts:{menu:Ax(!1,o.columns,o.presets)},components:[fI.parts.button(IF(o.icon,o.text,V.none(),V.some([po.config({toggleClass:"tox-tbtn--enabled",toggleOnExecute:!1}),pm.toolbarButton($e),wa(J({contextType:"any",shouldDisable:!1}))]),u.providers,o.context)),fI.parts.arrow({dom:{tag:"button",classes:["tox-tbtn","tox-split-button__chevron"],innerHtml:dP("chevron-down",u.providers.icons)},buttonBehaviours:cn([pm.splitButton($e),wa(J({contextType:"any",shouldDisable:!1}))])}),fI.parts["aria-descriptor"]({text:u.providers.translate("To open the popup, press Shift+Enter")})]})},qK=[{name:"history",items:["undo","redo"]},{name:"ai",items:["aidialog","aishortcuts"]},{name:"styles",items:["styles"]},{name:"formatting",items:["bold","italic"]},{name:"alignment",items:["alignleft","aligncenter","alignright","alignjustify"]},{name:"indentation",items:["outdent","indent"]},{name:"permanent pen",items:["permanentpen"]},{name:"comments",items:["addcomment"]}],lS=(o,u)=>(m,v,C,x)=>{const I=o(m).mapError(F=>Qp(F)).getOrDie();return u(I,v,C,x)},mde={button:lS(sj,(o,u,m,v)=>dde(o,u.shared.providers,v)),togglebutton:lS(oj,(o,u,m,v)=>fde(o,u.shared.providers,v)),menubutton:lS(nF,(o,u,m,v)=>G_(o,"tox-tbtn",u,V.none(),!1,v)),splitbutton:lS(Ice,(o,u,m,v)=>pde(o,u.shared,v)),grouptoolbarbutton:lS(jT,(o,u,m,v)=>{const C=m.ui.registry.getAll().buttons,x=F=>pI(m,{buttons:C,toolbar:F,allowToolbarGroups:!1},u,V.none()),I={[H4]:u.shared.header.isPositionedAtTop()?ch.TopToBottom:ch.BottomToTop};switch(E_(m)){case yp.floating:return ude(o,u,x,I,v);default:throw new Error("Toolbar groups are only supported when using floating toolbar mode")}})},hde=(o,u,m,v)=>bn(mde,o.type).fold(()=>(console.error("skipping button defined by",o),V.none()),C=>V.some(C(o,u,m,v))),GK={styles:HK,fontsize:NK,fontsizeinput:ede,fontfamily:RK,blocks:Bue,align:Fue},cS=o=>{const u=ct(qK,m=>{const v=jn(m.items,C=>qs(o,C)||qs(GK,C));return{name:m.name,items:v}});return jn(u,m=>m.items.length>0)},gde=o=>{const u=o.split("|");return ct(u,m=>({items:m.trim().split(" ")}))},vde=o=>Y(o,u=>(qs(u,"name")||qs(u,"label"))&&qs(u,"items")),bde=o=>{const u=o.toolbar,m=o.buttons;return u===!1?[]:u===void 0||u===!0?cS(m):d(u)?gde(u):vde(u)?u:(console.error("Toolbar type should be string, string[], boolean or ToolbarGroup[]"),[])},yde=(o,u,m,v,C,x)=>bn(u,m.toLowerCase()).orThunk(()=>x.bind(I=>ts(I,F=>bn(u,F+m.toLowerCase())))).fold(()=>bn(GK,m.toLowerCase()).map(I=>I(o,C)),I=>I.type==="grouptoolbarbutton"&&!v?(console.warn("Ignoring the '".concat(m,"' toolbar button. Group toolbar buttons are only supported when using floating toolbar mode and cannot be nested.")),V.none()):hde(I,C,o,m.toLowerCase())),pI=(o,u,m,v)=>{const C=bde(u),x=ct(C,I=>{const F=Ve(I.items,U=>U.trim().length===0?[]:yde(o,u.buttons,U,u.allowToolbarGroups,m,v).toArray());return{title:V.from(o.translate(I.name)),label:Kt(I.label!==void 0,o.translate(I.label)),items:F}});return jn(x,I=>I.items.length>0)},KK=(o,u,m,v)=>{const C=u.mainUi.outerContainer,x=m.toolbar,I=m.buttons;if(Y(x,d)){const F=x.map(U=>{const X={toolbar:U,buttons:I,allowToolbarGroups:m.allowToolbarGroups};return pI(o,X,v,V.none())});Dr.setToolbars(C,F)}else Dr.setToolbar(C,pI(o,m,v,V.none()))},YK=Zi(),_de=YK.os.isiOS()&&YK.os.version.major<=12,OF=(o,u)=>{const{uiMotherships:m}=u,v=o.dom;let C=o.getWin();const x=o.getDoc().documentElement,I=ds(jr(C.innerWidth,C.innerHeight)),F=ds(jr(x.offsetWidth,x.offsetHeight)),U=()=>{const Se=I.get();(Se.left!==C.innerWidth||Se.top!==C.innerHeight)&&(I.set(jr(C.innerWidth,C.innerHeight)),QP(o))},X=()=>{const Se=o.getDoc().documentElement,Ie=F.get();(Ie.left!==Se.offsetWidth||Ie.top!==Se.offsetHeight)&&(F.set(jr(Se.offsetWidth,Se.offsetHeight)),QP(o))},oe=Se=>{yre(o,Se)};v.bind(C,"resize",U),v.bind(C,"scroll",oe);const me=F4(Xt.fromDom(o.getBody()),"load",X);o.on("hide",()=>{Ht(m,Se=>{wn(Se.element,"display","none")})}),o.on("show",()=>{Ht(m,Se=>{fo(Se.element,"display")})}),o.on("NodeChange",X),o.on("remove",()=>{me.unbind(),v.unbind(C,"resize",U),v.unbind(C,"scroll",oe),C=null})},Sde=(o,u,m)=>{rv(o)&&Ql(m.mainUi.mothership.element,m.popupUi.mothership),_c(u,m.dialogUi.mothership)};var XK=Object.freeze({__proto__:null,render:(o,u,m,v,C)=>{const{mainUi:x,uiMotherships:I}=u,F=ds(0),U=x.outerContainer;Due(o);const X=Xt.fromDom(C.targetNode),oe=ia(za(X));Ql(X,x.mothership),Sde(o,oe,u),o.on("PostRender",()=>{Dr.setSidebar(U,m.sidebar,sW(o))}),o.on("SkinLoaded",()=>{KK(o,u,m,v),F.set(o.getWin().innerWidth),Dr.setMenubar(U,aI(o,m)),Dr.setViews(U,m.views),OF(o,u)});const me=Dr.getSocket(U).getOrDie("Could not find expected socket element");if(_de){Vo(me.element,{overflow:"scroll","-webkit-overflow-scrolling":"touch"});const Me=Mae(()=>{o.dispatch("ScrollContent")},20),at=wu(me.element,"scroll",Me.throttle);o.on("remove",at.unbind)}$P(o,u),o.addCommand("ToggleSidebar",(Me,at)=>{Dr.toggleSidebar(U,at),xre(o)}),o.addQueryValueHandler("ToggleSidebar",()=>{var Me;return(Me=Dr.whichSidebar(U))!==null&&Me!==void 0?Me:""}),o.addCommand("ToggleView",(Me,at)=>{if(Dr.toggleView(U,at)){const qe=U.element;x.mothership.broadcastOn([Tg()],{target:qe}),Ht(I,dt=>{dt.broadcastOn([Tg()],{target:qe})}),k(Dr.whichView(U))&&(o.focus(),o.nodeChanged(),Dr.refreshToolbar(U)),Tre(o)}}),o.addQueryValueHandler("ToggleView",()=>{var Me;return(Me=Dr.whichView(U))!==null&&Me!==void 0?Me:""});const Se=E_(o),Ie=()=>{Dr.refreshToolbar(u.mainUi.outerContainer)};(Se===yp.sliding||Se===yp.floating)&&o.on("ResizeWindow ResizeEditor ResizeContent",()=>{const Me=o.getWin().innerWidth;Me!==F.get()&&(Ie(),F.set(Me))});const Pe={setEnabled:Me=>{O_(u,Me?"setEnabled":"setDisabled")},isEnabled:()=>!Xn.isDisabled(U)};return{iframeContainer:me.element.dom,editorContainer:U.element.dom,api:Pe}}});const RF=o=>/^[0-9\.]+(|px)$/i.test(""+o)?V.some(parseInt(""+o,10)):V.none(),DF=o=>Z(o)?o+"px":o,mI=(o,u,m)=>{const v=u.filter(x=>o<x),C=m.filter(x=>o>x);return v.or(C).getOr(o)},Cde=o=>{const u=DL(o),m=PL(o),v=w_(o);return RF(u).map(C=>mI(C,m,v))},wde=o=>Cde(o).getOr(DL(o)),JK=o=>{const u=LL(o),m=x8(o),v=q2(o);return RF(u).map(C=>mI(C,m,v))},Ede=o=>JK(o).getOr(LL(o)),{ToolbarLocation:hI,ToolbarMode:QK}=roe,kde=40,xde=(o,u,m,v,C)=>{const{mainUi:x,uiMotherships:I}=m,F=E8.DOM,U=gh(o),X=G2(o),oe=q2(o).or(JK(o)),me=v.shared.header,Se=me.isPositionedAtTop,Ie=150,Pe=E_(o),Me=Pe===QK.sliding||Pe===QK.floating,at=ds(!1),qe=()=>at.get()&&!o.removed,dt=rs=>Me?rs.fold(J(0),ln=>ln.components().length>1?Wi(ln.components()[1].element):0):0,it=rs=>{switch(rx(o)){case hI.auto:const ln=Dr.getToolbar(x.outerContainer),On=dt(ln),Fs=Wi(rs.element)-On,ao=tl(u);if(ao.y>Fs)return"top";{const Gs=lr(u),qr=Math.max(Gs.dom.scrollHeight,Wi(Gs));return ao.bottom<qr-Fs||ul().bottom<ao.bottom-Fs?"bottom":"top"}case hI.bottom:return"bottom";case hI.top:default:return"top"}},It=rs=>{C.on(ln=>{bi.setModes(ln,[rs]),me.setDockingMode(rs);const On=Se()?ch.TopToBottom:ch.BottomToTop;jt(ln.element,H4,On)})},Mt=()=>{C.on(rs=>{const ln=oe.getOrThunk(()=>Kf().width-Gc(u).left-10);wn(rs.element,"max-width",ln+"px")})},en=(rs,ln)=>{C.on(On=>{const Fs=Dr.getToolbar(x.outerContainer),ao=dt(Fs),_s=tl(u),Gs=In(o,x.outerContainer.element),qr=()=>Gs.fold(()=>_s.x,iu=>{const Rp=tl(iu);return co(iu,rt())?_s.x:_s.x-Rp.x}),Lr=()=>Gs.fold(()=>Se()?Math.max(_s.y-Wi(On.element)+ao,0):_s.bottom,iu=>{var Rp;const Dp=tl(iu),xh=(Rp=iu.dom.scrollTop)!==null&&Rp!==void 0?Rp:0,Wg=co(iu,rt())?Math.max(_s.y-Wi(On.element)+ao,0):_s.y-Dp.y+xh-Wi(On.element)+ao;return Se()?Wg:_s.bottom}),Ud=qr(),Qi=Kt(rs,Math.ceil(x.outerContainer.element.dom.getBoundingClientRect().width)).filter(iu=>iu>Ie).map(iu=>{const Rp=ln.getOr(Dc()),Dp=window.innerWidth-(Ud-Rp.left),xh=Math.max(Math.min(iu,Dp),Ie);return Dp<iu&&wn(x.outerContainer.element,"width",xh+"px"),{width:xh+"px"}}).getOr({width:"max-content"}),Op={position:"absolute",left:Math.round(Ud)+"px",top:Lr()+"px"};Vo(x.outerContainer.element,{...Op,...Qi})})},In=(rs,ln)=>rv(rs)?vc(ln):V.none(),Ft=()=>{Ht(I,rs=>{rs.broadcastOn([f1()],{})})},Mn=()=>!U&&(hc(x.outerContainer.element).left+Zp(x.outerContainer.element)>=window.innerWidth-kde||Er(x.outerContainer.element,"width").isSome())?(wn(x.outerContainer.element,"position","absolute"),wn(x.outerContainer.element,"left","0px"),fo(x.outerContainer.element,"width"),!0):!1,En=rs=>{if(!qe())return;U||Mt();const ln=Dc(),On=U?!1:Mn();if(Me&&Dr.refreshToolbar(x.outerContainer),!U){const Fs=Dc(),ao=Kt(ln.left!==Fs.left,ln);en(On,ao),ao.each(_s=>{Kh(_s.left,Fs.top)})}X&&C.on(rs),Ft()},zn=()=>U||!X||!qe()?!1:C.get().exists(rs=>{const ln=me.getDockingMode(),On=it(rs);return On!==ln?(It(On),!0):!1});return{isVisible:qe,isPositionedAtTop:Se,show:()=>{at.set(!0),wn(x.outerContainer.element,"display","flex"),F.addClass(o.getBody(),"mce-edit-focus"),Ht(I,rs=>{fo(rs.element,"display")}),zn(),rv(o)?En(rs=>bi.isDocked(rs)?bi.reset(rs):bi.refresh(rs)):En(bi.refresh)},hide:()=>{at.set(!1),wn(x.outerContainer.element,"display","none"),F.removeClass(o.getBody(),"mce-edit-focus"),Ht(I,rs=>{wn(rs.element,"display","none")})},update:En,updateMode:()=>{zn()&&En(bi.reset)},repositionPopups:Ft}},eY=(o,u)=>{const m=tl(o);return{pos:u?m.y:m.bottom,bounds:m}},tY=(o,u,m,v)=>{const C=ds(eY(u,m.isPositionedAtTop())),x=X=>{const{pos:oe,bounds:me}=eY(u,m.isPositionedAtTop()),{pos:Se,bounds:Ie}=C.get(),Pe=me.height!==Ie.height||me.width!==Ie.width;C.set({pos:oe,bounds:me}),Pe&&QP(o,X),m.isVisible()&&(Se!==oe?m.update(bi.reset):Pe&&(m.updateMode(),m.repositionPopups()))};v||(o.on("activate",m.show),o.on("deactivate",m.hide)),o.on("SkinLoaded ResizeWindow",()=>m.update(bi.reset)),o.on("NodeChange keydown",X=>{requestAnimationFrame(()=>x(X))});let I=0;const F=j_(()=>m.update(bi.refresh),33);o.on("ScrollWindow",()=>{const X=Dc().left;X!==I&&(I=X,F.throttle()),m.updateMode()}),rv(o)&&o.on("ElementScroll",X=>{m.update(bi.refresh)});const U=$u();U.set(F4(Xt.fromDom(o.getBody()),"load",X=>x(X.raw))),o.on("remove",()=>{U.clear()})};var gI=Object.freeze({__proto__:null,render:(o,u,m,v,C)=>{const{mainUi:x}=u,I=vr(),F=Xt.fromDom(C.targetNode),U=xde(o,F,u,v,I),X=Gz(o);Lue(o);const oe=()=>{if(I.isSet()){U.show();return}I.set(Dr.getHeader(x.outerContainer).getOrDie());const Se=ZL(o);rv(o)?(Ql(F,x.mothership),Ql(F,u.popupUi.mothership)):_c(Se,x.mothership),_c(Se,u.dialogUi.mothership);const Ie=()=>{KK(o,u,m,v),Dr.setMenubar(x.outerContainer,aI(o,m)),U.show(),tY(o,F,U,X),o.nodeChanged()};X?o.once("SkinLoaded",Ie):Ie()};o.on("show",oe),o.on("hide",U.hide),X||(o.on("focus",oe),o.on("blur",U.hide)),o.on("init",()=>{(o.hasFocus()||X)&&oe()}),$P(o,u);const me={show:oe,hide:U.hide,setEnabled:Se=>{O_(u,Se?"setEnabled":"setDisabled")},isEnabled:()=>!Xn.isDisabled(x.outerContainer)};return{editorContainer:x.outerContainer.element.dom,api:me}}});const vI=()=>{const o=vr(),u=vr(),m=vr();return{dialogUi:o,popupUi:u,mainUi:m,getUiMotherships:()=>{const x=o.get().map(F=>F.mothership),I=u.get().map(F=>F.mothership);return x.fold(()=>I.toArray(),F=>I.fold(()=>[F],U=>co(F.element,U.element)?[F]:[F,U]))},lazyGetInOuterOrDie:(x,I)=>()=>m.get().bind(F=>I(F.outerContainer)).getOrDie("Could not find ".concat(x," element in OuterContainer"))}},nY="contexttoolbar-show",sY="contexttoolbar-hide",Tde=".tox-toolbar-slider__input,.tox-toolbar-textfield",LF=o=>{Ni.getContent(o).each(u=>{sr(u.element,Tde).fold(()=>fs.focusIn(u),eu)})},Ide=o=>tu(o.element).each(u=>{ih(u,'[tabindex="-1"]').each(m=>{eu(m)})}),oY=Pn("forward-slide"),uS=Pn("backward-slide"),bI=Pn("change-slide-event"),yI="tox-pop--resizing",rY=o=>{const u=ds([]);return Ni.sketch({dom:{tag:"div",classes:["tox-pop"]},fireDismissalEventInstead:{event:"doNotDismissYet"},onShow:m=>{u.set([]),Ni.getContent(m).each(v=>{fo(v.element,"visibility")}),ua(m.element,yI),fo(m.element,"width")},onHide:()=>{o.onHide()},inlineBehaviours:cn([zs("context-toolbar-events",[th(e2(),(m,v)=>{v.event.raw.propertyName==="width"&&(ua(m.element,yI),fo(m.element,"width"))}),Wt(bI,(m,v)=>{const C=m.element;fo(C,"width");const x=oo(C);fo(C,"left"),fo(C,"right"),fo(C,"max-width"),Ni.setContent(m,v.event.contents),sa(C,yI);const I=oo(C);wn(C,"transition","none"),Ni.reposition(m),fo(C,"transition"),wn(C,"width",x+"px"),v.event.focus.fold(()=>LF(m),F=>{eu(F),tu(C).isNone()&&LF(m)}),setTimeout(()=>{wn(m.element,"width",I+"px")},0)}),Wt(oY,(m,v)=>{Ni.getContent(m).each(C=>{u.set(u.get().concat([{bar:C,focus:ff(za(m.element))}]))}),ps(m,bI,{contents:v.event.forwardContents,focus:V.none()})}),Wt(uS,(m,v)=>{o.onBack(),sn(u.get()).each(C=>{u.set(u.get().slice(0,u.get().length-1)),ps(m,bI,{contents:md(C.bar),focus:C.focus})})})]),fs.config({mode:"special",onEscape:m=>sn(u.get()).fold(()=>o.onEscape(),v=>(vo(m,uS),V.some(!0)))})]),lazySink:()=>no.value(o.sink)})},k1=(o,u)=>{const m=vr();return{setInputEnabled:v=>{!v&&u&&eu(u),Xn.set(o,!v)},isInputEnabled:()=>!Xn.isDisabled(o),hide:()=>{m.isSet()||m.set(Dn.getValue(o)),vo(o,eh())},back:()=>{m.isSet()||m.set(Dn.getValue(o)),vo(o,uS)},getValue:()=>m.get().getOrThunk(()=>Dn.getValue(o)),setValue:v=>{m.isSet()?m.set(v):Dn.setValue(o,v)}}},iY=(o,u)=>Wt(Cq,(m,v)=>{const C=o.get(m),x=k1(C,m.element);u.onAction(x,v.event.buttonApi)}),aY=(o,u,m)=>{const{primary:v,...C}=u.original,x=un(sj({...C,type:"button",onAction:z}));return AF(x,m,[iY(o,u)])},Ade=(o,u,m)=>{const{primary:v,...C}=u.original,x=un(oj({...C,type:"togglebutton",onAction:z}));return jK(x,m,[iY(o,u)])},Ode=o=>o.type==="contextformtogglebutton",Rde=(o,u,m)=>Ode(u)?Ade(o,u,m):aY(o,u,m),lY=(o,u,m)=>{const v=ct(u,I=>or(Rde(o,I,m)));return{asSpecs:()=>ct(v,I=>I.asSpec()),findPrimary:I=>ts(u,(F,U)=>F.primary?V.from(v[U]).bind(X=>X.getOpt(I)).filter(he(Xn.isDisabled)):V.none())}},Dde=(o,u,m)=>{const{width:v,height:C}=o.initValue();let x=wT;const I=Pn("ratio-event"),F=k1,U=en=>_p(en,{tag:"span",classes:["tox-icon","tox-lock-icon__"+en]},u.icons),X=()=>!1,oe=o.label.getOr("Constrain proportions"),me=u.translate(oe),Se=Ma.parts.lock({dom:{tag:"button",classes:["tox-lock","tox-button","tox-button--naked","tox-button--icon"],attributes:{"aria-label":me,"data-mce-name":oe}},components:[U("lock"),U("unlock")],buttonBehaviours:cn([Xn.config({disabled:X}),si.config({}),Yi.config(u.tooltips.getConfig({tooltipText:me}))])}),Ie=en=>({dom:{tag:"div",classes:["tox-context-form__group"]},components:en}),Pe=en=>ih(en.element,"div.tox-focusable-wrapper").fold(V.none,Ft=>(eu(Ft),V.some(!0))),Me=en=>Co.parts.field({factory:iv,inputClasses:["tox-textfield","tox-toolbar-textfield","tox-textfield-size"],data:en?v:C,inputBehaviours:cn([Xn.config({disabled:X}),si.config({}),zs("size-input-toolbar-events",[Wt(ip(),(In,Ft)=>{ps(In,I,{isField1:en})})]),fs.config({mode:"special",onEnter:m,onEscape:Pe})]),selectOnFocus:!1}),at=en=>({dom:{tag:"label",classes:["tox-label"]},components:[Ci(u.translate(en))]}),qe=en=>({dom:{tag:"div",classes:["tox-focusable-wrapper","tox-toolbar-nav-item"]},components:[en],behaviours:cn([si.config({}),As.config({}),fs.config({mode:"special",onEnter:In=>sr(In.element,"input").fold(V.none,Mn=>(eu(Mn),V.some(!0)))})])}),dt=qe(Ma.parts.field1(Ie([Co.parts.label(at("Width:")),Me(!0)]))),it=qe(Ma.parts.field2(Ie([Co.parts.label(at("Height:")),Me(!1)]))),It=ds(z),Mt=[S1({onSetup:o.onSetup,getApi:F},It),_h({getApi:F},It)];return Ma.sketch({dom:{tag:"div",classes:["tox-context-form__group"]},components:[dt,it,Ie([at(w2),Se])],field1Name:"width",field2Name:"height",locked:!0,markers:{lockClass:"tox-locked"},onLockedChange:(en,In,Ft)=>{CT(Dn.getValue(en)).each(Mn=>{x(Mn).each(En=>{Dn.setValue(In,_N(En))})})},onInput:en=>vo(en,_Z),coupledFieldBehaviours:cn([As.config({}),fs.config({mode:"flow",focusInside:wc.OnEnterOrSpaceMode,cycles:!1,selector:"button, .tox-focusable-wrapper"}),Xn.config({disabled:X,onDisabled:en=>{Ma.getField1(en).bind(Co.getField).each(Xn.disable),Ma.getField2(en).bind(Co.getField).each(Xn.disable),Ma.getLock(en).each(Xn.disable)},onEnabled:en=>{Ma.getField1(en).bind(Co.getField).each(Xn.enable),Ma.getField2(en).bind(Co.getField).each(Xn.enable),Ma.getLock(en).each(Xn.enable)}}),wa(()=>u.checkUiComponentContext("mode:design")),zs("size-input-toolbar-events2",[Wt(I,(en,In)=>{const Ft=In.event.isField1,Mn=Ft?Ma.getField1(en):Ma.getField2(en),En=Ft?Ma.getField2(en):Ma.getField1(en),zn=Mn.map(Dn.getValue).getOr(""),go=En.map(Dn.getValue).getOr("");x=Pq(zn,go)}),Wt(_Z,en=>o.onInput(k1(en))),...Mt])])})},dS=(o,u,m)=>Co.sketch({dom:{tag:"div",classes:["tox-context-form__group"]},components:[...o.toArray(),u],fieldBehaviours:cn([Xn.config({disabled:()=>m.checkUiComponentContext("mode:design").shouldDisable,onDisabled:v=>{Ide(v),Co.getField(v).each(Xn.disable)},onEnabled:v=>{Co.getField(v).each(Xn.enable)}})])}),Lde=(o,u,m)=>{const v=ds(z),C=o.label.map(I=>Co.parts.label({dom:{tag:"label",classes:["tox-label"]},components:[Ci(u.translate(I))]})),x=Co.parts.field({factory:iv,type:"range",inputClasses:["tox-toolbar-slider__input","tox-toolbar-nav-item"],inputAttributes:{min:String(o.min()),max:String(o.max())},data:o.initValue().toString(),fromInputValue:I=>Ui(I).getOr(o.min()),toInputValue:I=>String(I),inputBehaviours:cn([Xn.config({disabled:()=>u.checkUiComponentContext("mode:design").shouldDisable}),wa(()=>u.checkUiComponentContext("mode:design")),fs.config({mode:"special",onEnter:m,onLeft:(I,F)=>(F.cut(),V.none()),onRight:(I,F)=>(F.cut(),V.none())}),zs("slider-events",[S1({onSetup:o.onSetup,getApi:k1,onBeforeSetup:fs.focusIn},v),_h({getApi:k1},v),Wt(Xm(),I=>{o.onInput(k1(I))})])])});return dS(C,x,u)},Pde=(o,u,m)=>{const v=ds(z),C=o.label.map(U=>Co.parts.label({dom:{tag:"label",classes:["tox-label"]},components:[Ci(u.translate(U))]})),I={...o.placeholder.map(U=>({placeholder:u.translate(U)})).getOr({})},F=Co.parts.field({factory:iv,inputClasses:["tox-toolbar-textfield","tox-toolbar-nav-item"],inputAttributes:I,data:o.initValue(),selectOnFocus:!0,inputBehaviours:cn([Xn.config({disabled:()=>u.checkUiComponentContext("mode:design").shouldDisable}),wa(()=>u.checkUiComponentContext("mode:design")),fs.config({mode:"special",onEnter:m,onLeft:(U,X)=>(X.cut(),V.none()),onRight:(U,X)=>(X.cut(),V.none())}),zs("input-events",[S1({onSetup:o.onSetup,getApi:U=>ih(U.element,".tox-toolbar").bind(oe=>sr(oe,"button:enabled")).fold(()=>k1(U),oe=>k1(U,oe)),onBeforeSetup:fs.focusIn},v),_h({getApi:k1},v),Wt(Xm(),U=>{o.onInput(k1(U))})])])});return dS(C,F,u)},PF=(o,u,m)=>{const C=or(o(m,U=>I.findPrimary(U).orThunk(()=>F.findPrimary(U)).map(X=>(_u(X),!0)))),x=lo(u.commands,U=>U.align==="start"),I=lY(C,x.pass,m),F=lY(C,x.fail,m);return jn([{title:V.none(),label:V.none(),items:I.asSpecs()},{title:V.none(),label:V.none(),items:[C.asSpec()]},{title:V.none(),label:V.none(),items:F.asSpecs()}],U=>U.items.length>0)},MF=(o,u)=>{switch(o.type){case"contextform":return PF(de(Pde,o),o,u);case"contextsliderform":return PF(de(Lde,o),o,u);case"contextsizeinputform":return PF(de(Dde,o),o,u)}},cY={renderContextForm:(o,u,m)=>$7({type:o,uid:Pn("context-toolbar"),initGroups:MF(u,m),onEscape:V.none,cyclicKeying:!0,providers:m}),buildInitGroups:MF},uY=(o,u,m)=>u.bottom-o.y>=m&&o.bottom-u.y>=m,Mde=o=>{const u=o.getBoundingClientRect();if(u.height<=0&&u.width<=0){const m=Wf(Xt.fromDom(o.startContainer),o.startOffset).element;return(ii(m)?ai(m):V.some(m)).filter(hi).map(C=>C.dom.getBoundingClientRect()).getOr(u)}else return u},NF=o=>{const u=o.selection.getRng(),m=Mde(u);if(o.inline){const v=Dc();return qi(v.left+m.left,v.top+m.top,m.width,m.height)}else{const v=Fu(Xt.fromDom(o.getBody()));return qi(v.x+m.left,v.y+m.top,m.width,m.height)}},Nde=(o,u)=>u.filter(m=>We(m)&&gr(m)).map(Fu).getOrThunk(()=>NF(o)),Fde=(o,u,m)=>{const v=Math.max(o.x+m,u.x),C=Math.min(o.right-m,u.right);return{x:v,width:C-v}},H7=(o,u,m,v,C,x)=>{const I=Xt.fromDom(o.getContainer()),F=sr(I,".tox-editor-header").getOr(I),U=tl(F),X=U.y>=u.bottom,oe=v&&!X;if(o.inline&&oe)return{y:Math.max(U.bottom+x,m.y),bottom:m.bottom};if(o.inline&&!oe)return{y:m.y,bottom:Math.min(U.y-x,m.bottom)};const me=C==="line"?tl(I):u;return oe?{y:Math.max(U.bottom+x,m.y),bottom:Math.min(me.bottom-x,m.bottom)}:{y:Math.max(me.y+x,m.y),bottom:Math.min(U.y-x,m.bottom)}},FF=(o,u,m,v=0)=>{const C=Kf(window),x=tl(Xt.fromDom(o.getContentAreaContainer())),I=ux(o)||dx(o)||I8(o),{x:F,width:U}=Fde(x,C,v);if(o.inline&&!I)return qi(F,C.y,U,C.height);{const X=u.header.isPositionedAtTop(),{y:oe,bottom:me}=H7(o,x,C,X,m,v);return qi(F,oe,U,me-oe)}},_I=12,dY={valignCentre:[],alignCentre:[],alignLeft:["tox-pop--align-left"],alignRight:["tox-pop--align-right"],right:["tox-pop--right"],left:["tox-pop--left"],bottom:["tox-pop--bottom"],top:["tox-pop--top"],inset:["tox-pop--inset"]},$F={maxHeightFunction:z0(),maxWidthFunction:KT()},BF=(o,u)=>{const m=o.selection.getRng(),v=Wf(Xt.fromDom(m.startContainer),m.startOffset);return m.startContainer===m.endContainer&&m.startOffset===m.endOffset-1&&co(v.element,u)},fY=(o,u,m)=>{const v=Er(o,"position");wn(o,"position",u);const C=m(o);return v.each(x=>wn(o,"position",x)),C},VF=o=>o==="node",$de=(o,u,m,v,C)=>{const x=NF(o),I=v.lastElement().exists(F=>co(m,F));if(BF(o,m))return I?uG:Ef;if(I)return fY(u,v.getMode(),()=>uY(x,tl(u),-20)&&!v.isReposition()?Wle:uG);{const F=v.getMode()==="fixed"?C.y+Dc().top:C.y,U=Wi(u)+_I;return F+U<=x.y?Ef:A7}},fS=(o,u,m,v)=>{const C=U=>(X,oe,me,Se,Ie)=>{const Pe=$de(o,Se,U,m,Ie),Me={...X,y:Ie.y,height:Ie.height};return{...Pe(Me,oe,me,Se,Ie),alwaysFit:!0}},x=U=>VF(v)?[C(U)]:[];return u?{onLtr:U=>[nl,La,qa,Jl,Pa,hl].concat(x(U)),onRtl:U=>[nl,qa,La,Pa,Jl,hl].concat(x(U))}:{onLtr:U=>[hl,nl,Jl,La,Pa,qa].concat(x(U)),onRtl:U=>[hl,nl,Pa,qa,Jl,La].concat(x(U))}},SI=(o,u,m,v)=>u==="line"?{bubble:Eu(_I,0,dY),layouts:{onLtr:()=>[f6],onRtl:()=>[Iy]},overrides:$F}:{bubble:Eu(0,_I,dY,1/_I),layouts:fS(o,m,v,u),overrides:$F},pS=(o,u)=>{const m=jn(u,x=>x.predicate(o.dom)),{pass:v,fail:C}=lo(m,x=>x.type==="contexttoolbar");return{contextToolbars:v,contextForms:C}},HF=o=>{if(o.length<=1)return o;{const u=x=>ht(o,I=>I.position===x),m=x=>jn(o,I=>I.position===x),v=u("selection"),C=u("node");if(v||C)if(C&&v){const x=m("node"),I=ct(m("selection"),F=>({...F,position:"node"}));return x.concat(I)}else return m(v?"selection":"node");else return m("line")}},UF=o=>{if(o.length<=1)return o;{const u=v=>Qe(o,C=>C.position===v);return u("selection").orThunk(()=>u("node")).orThunk(()=>u("line")).map(v=>v.position).fold(()=>[],v=>jn(o,C=>C.position===v))}},pY=(o,u,m)=>{const v=pS(o,u);if(v.contextForms.length>0)return V.some({elem:o,toolbars:[v.contextForms[0]]});{const C=pS(o,m);if(C.contextForms.length>0)return V.some({elem:o,toolbars:[C.contextForms[0]]});if(v.contextToolbars.length>0||C.contextToolbars.length>0){const x=HF(v.contextToolbars.concat(C.contextToolbars));return V.some({elem:o,toolbars:x})}else return V.none()}},CI=(o,u,m)=>o(u)?V.none():Qh(u,v=>{if(hi(v)){const{contextToolbars:C,contextForms:x}=pS(v,m.inNodeScope),I=x.length>0?x:UF(C);return I.length>0?V.some({elem:v,toolbars:I}):V.none()}else return V.none()},o),mY=(o,u)=>{const m=Xt.fromDom(u.getBody()),v=I=>co(I,m),C=I=>!v(I)&&!uo(m,I),x=Xt.fromDom(u.selection.getNode());return C(x)?V.none():pY(x,o.inNodeScope,o.inEditorScope).orThunk(()=>CI(v,x,o))},hY=(o,u)=>{const m={},v=[],C=[],x={},I={},F=(oe,me)=>{const Se=un(di(me));m[oe]=Se,Se.launch.map(Ie=>{x["form:"+oe]={...me.launch,type:Ie.type==="contextformtogglebutton"?"togglebutton":"button",onAction:()=>{u(Se)}}}),Se.scope==="editor"?C.push(Se):v.push(Se),I[oe]=Se},U=(oe,me)=>{ij(me).each(Se=>{me.scope==="editor"?C.push(Se):v.push(Se),I[oe]=Se})},X=Zn(o);return Ht(X,oe=>{const me=o[oe];me.type==="contextform"||me.type==="contextsliderform"||me.type==="contextsizeinputform"?F(oe,me):me.type==="contexttoolbar"&&U(oe,me)}),{forms:m,inNodeScope:v,inEditorScope:C,lookupTable:I,formNavigators:x}},U7="tox-pop--transition",Bde=(o,u,m,v)=>{const C=v.backstage,x=C.shared,I=Zi().deviceType.isTouch,F=vr(),U=vr(),X=vr(),oe=Fc(rY({sink:m,onEscape:()=>(o.focus(),Dj(o),V.some(!0)),onHide:()=>{Dj(o)},onBack:()=>{Ire(o)}})),me=()=>{const En=X.get().getOr("node"),zn=VF(En)?1:0;return FF(o,x,En,zn)},Se=()=>!o.removed&&!(I()&&C.isContextMenuOpen()),Ie=En=>lt(Zo(En,F.get(),co),!0),Pe=()=>{if(Se()){const En=me(),zn=lt(X.get(),"node")?Nde(o,F.get()):NF(o);return En.height<=0||!uY(zn,En,.01)}else return!0},Me=()=>{F.clear(),U.clear(),X.clear(),Ni.hide(oe)},at=()=>{if(Ni.isOpen(oe)){const En=oe.element;fo(En,"display"),Pe()?wn(En,"display","none"):(U.set(0),Ni.reposition(oe))}},qe=En=>({dom:{tag:"div",classes:["tox-pop__dialog"]},components:[En],behaviours:cn([fs.config({mode:"acyclic"}),zs("pop-dialog-wrap-events",[$r(zn=>{o.shortcuts.add("ctrl+F9","focus statusbar",()=>fs.focusIn(zn))}),nh(zn=>{o.shortcuts.remove("ctrl+F9")})])])}),dt=nf(()=>hY(u,En=>{const zn=Mt([En]);ps(oe,oY,{forwardContents:qe(zn)})})),it=(En,zn)=>pI(o,{buttons:En,toolbar:zn.items,allowToolbarGroups:!1},v.backstage,V.some(["form:"])),It=(En,zn)=>cY.buildInitGroups(En,zn),Mt=En=>{const{buttons:zn}=o.ui.registry.getAll(),go=dt(),fi={...zn,...go.formNavigators},Jo=E_(o)===yp.scrolling?yp.scrolling:yp.default,rs=Nt(ct(En,ln=>ln.type==="contexttoolbar"?it(fi,K8(ln)):It(ln,x.providers)));return $7({type:Jo,uid:Pn("context-toolbar"),initGroups:rs,onEscape:V.none,cyclicKeying:!0,providers:x.providers})},en=(En,zn)=>{const go=En==="node"?x.anchors.node(zn):x.anchors.cursor(),fi=SI(o,En,I(),{lastElement:F.get,isReposition:()=>lt(U.get(),0),getMode:()=>yc.getMode(m)});return Gi(go,fi)},In=(En,zn)=>{if(Mn.cancel(),!Se())return;const go=Mt(En),fi=En[0].position,Jo=en(fi,zn);X.set(fi),U.set(1);const rs=oe.element;fo(rs,"display"),Ie(zn)||(ua(rs,U7),yc.reset(m,oe)),Ni.showWithinBounds(oe,qe(go),{anchor:Jo,transition:{classes:[U7],mode:"placement"}},()=>V.some(me())),zn.fold(F.clear,F.set),Pe()&&wn(rs,"display","none")};let Ft=!1;const Mn=j_(()=>{if(!(!o.hasFocus()||o.removed||Ft))if(Nc(oe.element,U7))Mn.throttle();else{const En=dt();mY(En,o).fold(Me,zn=>{In(zn.toolbars,V.some(zn.elem))})}},17);o.on("init",()=>{o.on("remove",Me),o.on("ScrollContent ScrollWindow ObjectResized ResizeEditor longpress",at),o.on("click keyup focus SetContent",Mn.throttle),o.on(sY,Me),o.on(nY,En=>{const zn=dt();bn(zn.lookupTable,En.toolbarKey).each(go=>{In([go],Kt(En.target!==o,En.target)),LF(oe)})}),o.on("focusout",En=>{ex.setEditorTimeout(o,()=>{tu(m.element).isNone()&&tu(oe.element).isNone()&&Me()},0)}),o.on("SwitchMode",()=>{o.mode.isReadOnly()&&Me()}),o.on("DisabledStateChange",En=>{En.state&&Me()}),o.on("ExecCommand",({command:En})=>{En.toLowerCase()==="toggleview"&&Me()}),o.on("AfterProgressState",En=>{En.state?Me():o.hasFocus()&&Mn.throttle()}),o.on("dragstart",()=>{Ft=!0}),o.on("dragend drop",()=>{Ft=!1}),o.on("NodeChange",En=>{tu(oe.element).fold(Mn.throttle,z)})})},gY=o=>{Ht([{name:"alignleft",text:"Align left",cmd:"JustifyLeft",icon:"align-left"},{name:"aligncenter",text:"Align center",cmd:"JustifyCenter",icon:"align-center"},{name:"alignright",text:"Align right",cmd:"JustifyRight",icon:"align-right"},{name:"alignjustify",text:"Justify",cmd:"JustifyFull",icon:"align-justify"}],m=>{o.ui.registry.addToggleButton(m.name,{tooltip:m.text,icon:m.icon,onAction:_f(o,m.cmd),onSetup:N_(o,m.name)})}),o.ui.registry.addButton("alignnone",{tooltip:"No alignment",icon:"align-none",onSetup:Bc(o),onAction:_f(o,"JustifyNone")})},vY=(o,u)=>{const m=()=>{const v=u.getOptions(o),C=u.getCurrent(o).map(u.hash),x=vr();return ct(v,I=>({type:"togglemenuitem",text:u.display(I),onSetup:F=>{const U=oe=>{oe&&(x.on(me=>me.setActive(!1)),x.set(F)),F.setActive(oe)};U(lt(C,u.hash(I)));const X=u.watcher(o,I,U);return()=>{x.clear(),X()}},onAction:()=>u.setCurrent(o,I)}))};o.ui.registry.addMenuButton(u.name,{tooltip:u.text,icon:u.icon,fetch:v=>v(m()),onSetup:u.onToolbarSetup}),o.ui.registry.addNestedMenuItem(u.name,{type:"nestedmenuitem",text:u.text,getSubmenuItems:m,onSetup:u.onMenuSetup})},Vde=o=>({name:"lineheight",text:"Line height",icon:"line-height",getOptions:iW,hash:u=>Zue(u,["fixed","relative","empty"]).getOr(u),display:ce,watcher:(u,m,v)=>u.formatter.formatChanged("lineheight",v,!1,{value:m}).unbind,getCurrent:u=>V.from(u.queryCommandValue("LineHeight")),setCurrent:(u,m)=>u.execCommand("LineHeight",!1,m),onToolbarSetup:Bc(o),onMenuSetup:Bc(o)}),wI=o=>V.from(jz(o)).map(m=>({name:"language",text:"Language",icon:"language",getOptions:J(m),hash:v=>O(v.customCode)?v.code:"".concat(v.code,"/").concat(v.customCode),display:v=>v.title,watcher:(v,C,x)=>{var I;return v.formatter.formatChanged("lang",x,!1,{value:C.code,customValue:(I=C.customCode)!==null&&I!==void 0?I:null}).unbind},getCurrent:v=>{const C=Xt.fromDom(v.selection.getNode());return Jv(C,x=>V.some(x).filter(hi).bind(I=>Us(I,"lang").map(U=>{const X=Us(I,"data-mce-lang").getOrUndefined();return{code:U,customCode:X,title:""}})))},setCurrent:(v,C)=>v.execCommand("Lang",!1,C),onToolbarSetup:v=>{const C=$u();return v.setActive(o.formatter.match("lang",{},void 0,!0)),C.set(o.formatter.formatChanged("lang",v.setActive,!0)),Wx(C.clear,Bc(o)(v))},onMenuSetup:Bc(o)})),bY=o=>{vY(o,Vde(o)),wI(o).each(u=>vY(o,u))},Hde=(o,u)=>{wF(o,u),Uue(o,u),sde(o,u),Vue(o,u),tde(o,u)},Ude=o=>{o.ui.registry.addContext("editable",()=>o.selection.isEditable()),o.ui.registry.addContext("mode",u=>o.mode.get()===u),o.ui.registry.addContext("any",Ue),o.ui.registry.addContext("formatting",u=>o.formatter.canApply(u)),o.ui.registry.addContext("insert",u=>o.schema.isValidChild(o.selection.getNode().tagName,u))},zde=o=>J2(o,"NodeChange",u=>{u.setEnabled(o.queryCommandState("outdent")&&o.selection.isEditable())}),Wde=o=>{o.ui.registry.addButton("outdent",{tooltip:"Decrease indent",icon:"outdent",onSetup:zde(o),onAction:_f(o,"outdent")}),o.ui.registry.addButton("indent",{tooltip:"Increase indent",icon:"indent",onSetup:Bc(o),onAction:_f(o,"indent")})},jde=o=>{Wde(o)},zF=(o,u)=>m=>{m.setActive(u.get());const v=C=>{u.set(C.state),m.setActive(C.state)};return o.on("PastePlainTextToggle",v),Wx(()=>o.off("PastePlainTextToggle",v),Bc(o)(m))},yY=o=>{const u=ds(nW(o)),m=()=>o.execCommand("mceTogglePlainTextPaste");o.ui.registry.addToggleButton("pastetext",{active:!1,icon:"paste-text",tooltip:"Paste as text",onAction:m,onSetup:zF(o,u)}),o.ui.registry.addToggleMenuItem("pastetext",{text:"Paste as text",icon:"paste-text",onAction:m,onSetup:zF(o,u)})},EI=(o,u)=>()=>{o.execCommand("mceToggleFormat",!1,u)},_Y=o=>{mv.each([{name:"bold",text:"Bold",icon:"bold",shortcut:"Meta+B"},{name:"italic",text:"Italic",icon:"italic",shortcut:"Meta+I"},{name:"underline",text:"Underline",icon:"underline",shortcut:"Meta+U"},{name:"strikethrough",text:"Strikethrough",icon:"strike-through"},{name:"subscript",text:"Subscript",icon:"subscript"},{name:"superscript",text:"Superscript",icon:"superscript"}],(u,m)=>{o.ui.registry.addToggleButton(u.name,{tooltip:u.text,icon:u.icon,onSetup:N_(o,u.name),onAction:EI(o,u.name),shortcut:u.shortcut})});for(let u=1;u<=6;u++){const m="h"+u,v="Access+".concat(u);o.ui.registry.addToggleButton(m,{text:m.toUpperCase(),tooltip:"Heading "+u,onSetup:N_(o,m),onAction:EI(o,m),shortcut:v})}},Zde=o=>{mv.each([{name:"copy",text:"Copy",action:"Copy",icon:"copy",context:"any"},{name:"help",text:"Help",action:"mceHelp",icon:"help",shortcut:"Alt+0",context:"any"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all",shortcut:"Meta+A",context:"any"},{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document"},{name:"print",text:"Print",action:"mcePrint",icon:"print",shortcut:"Meta+P",context:"any"}],u=>{o.ui.registry.addButton(u.name,{tooltip:u.text,icon:u.icon,onAction:_f(o,u.action),shortcut:u.shortcut,context:u.context})}),mv.each([{name:"cut",text:"Cut",action:"Cut",icon:"cut"},{name:"paste",text:"Paste",action:"Paste",icon:"paste"},{name:"removeformat",text:"Clear formatting",action:"RemoveFormat",icon:"remove-formatting"},{name:"remove",text:"Remove",action:"Delete",icon:"remove"},{name:"hr",text:"Horizontal line",action:"InsertHorizontalRule",icon:"horizontal-rule"}],u=>{o.ui.registry.addButton(u.name,{tooltip:u.text,icon:u.icon,onSetup:Bc(o),onAction:_f(o,u.action)})})},SY=o=>{mv.each([{name:"blockquote",text:"Blockquote",action:"mceBlockQuote",icon:"quote"}],u=>{o.ui.registry.addToggleButton(u.name,{tooltip:u.text,icon:u.icon,onAction:_f(o,u.action),onSetup:N_(o,u.name)})})},CY=o=>{_Y(o),Zde(o),SY(o)},qde=o=>{mv.each([{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document"},{name:"copy",text:"Copy",action:"Copy",icon:"copy",shortcut:"Meta+C",context:"any"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all",shortcut:"Meta+A",context:"any"},{name:"print",text:"Print...",action:"mcePrint",icon:"print",shortcut:"Meta+P",context:"any"}],u=>{o.ui.registry.addMenuItem(u.name,{text:u.text,icon:u.icon,shortcut:u.shortcut,onAction:_f(o,u.action),context:u.context})}),mv.each([{name:"bold",text:"Bold",action:"Bold",icon:"bold",shortcut:"Meta+B"},{name:"italic",text:"Italic",action:"Italic",icon:"italic",shortcut:"Meta+I"},{name:"underline",text:"Underline",action:"Underline",icon:"underline",shortcut:"Meta+U"},{name:"strikethrough",text:"Strikethrough",action:"Strikethrough",icon:"strike-through"},{name:"subscript",text:"Subscript",action:"Subscript",icon:"subscript"},{name:"superscript",text:"Superscript",action:"Superscript",icon:"superscript"},{name:"removeformat",text:"Clear formatting",action:"RemoveFormat",icon:"remove-formatting"},{name:"cut",text:"Cut",action:"Cut",icon:"cut",shortcut:"Meta+X"},{name:"paste",text:"Paste",action:"Paste",icon:"paste",shortcut:"Meta+V"},{name:"hr",text:"Horizontal line",action:"InsertHorizontalRule",icon:"horizontal-rule"}],u=>{o.ui.registry.addMenuItem(u.name,{text:u.text,icon:u.icon,shortcut:u.shortcut,onSetup:Bc(o),onAction:_f(o,u.action)})}),o.ui.registry.addMenuItem("codeformat",{text:"Code",icon:"sourcecode",onSetup:Bc(o),onAction:EI(o,"code")})},m6e=o=>{CY(o),qde(o)},kI=(o,u)=>J2(o,"Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",m=>{m.setEnabled(!o.mode.isReadOnly()&&o.undoManager[u]())}),Gde=o=>{o.ui.registry.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onSetup:kI(o,"hasUndo"),onAction:_f(o,"undo")}),o.ui.registry.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onSetup:kI(o,"hasRedo"),onAction:_f(o,"redo")})},Kde=o=>{o.ui.registry.addButton("undo",{tooltip:"Undo",icon:"undo",enabled:!1,onSetup:kI(o,"hasUndo"),onAction:_f(o,"undo"),shortcut:"Meta+Z"}),o.ui.registry.addButton("redo",{tooltip:"Redo",icon:"redo",enabled:!1,onSetup:kI(o,"hasRedo"),onAction:_f(o,"redo"),shortcut:"Meta+Y"})},Yde=o=>{Gde(o),Kde(o)},Xde=o=>J2(o,"VisualAid",u=>{u.setActive(o.hasVisual)}),Jde=o=>{o.ui.registry.addToggleMenuItem("visualaid",{text:"Visual aids",onSetup:Xde(o),onAction:_f(o,"mceToggleVisualAid"),context:"any"})},Qde=o=>{o.ui.registry.addButton("visualaid",{tooltip:"Visual aids",text:"Visual aids",onAction:_f(o,"mceToggleVisualAid"),context:"any"})},efe=o=>{Qde(o),Jde(o)},tfe=(o,u)=>{gY(o),m6e(o),Hde(o,u),Yde(o),Ure(o),efe(o),jde(o),bY(o),yY(o),Ude(o)},nfe=o=>d(o)?o.split(/[ ,]/):o,wY=o=>u=>u.options.get(o),sfe=o=>{const u=o.options.register;u("contextmenu_avoid_overlap",{processor:"string",default:""}),u("contextmenu_never_use_native",{processor:"boolean",default:!1}),u("contextmenu",{processor:m=>m===!1?{value:[],valid:!0}:d(m)||Y(m,d)?{value:nfe(m),valid:!0}:{valid:!1,message:"Must be false or a string."},default:"link linkchecker image editimage table spellchecker configurepermanentpen"})},EY=wY("contextmenu_never_use_native"),kY=wY("contextmenu_avoid_overlap"),ofe=o=>xY(o).length===0,xY=o=>{const u=o.ui.registry.getAll().contextMenus,m=o.options.get("contextmenu");return o.options.isSet("contextmenu")?m:jn(m,v=>qs(u,v))},z7=(o,u)=>({type:"makeshift",x:o,y:u}),rfe=(o,u,m)=>z7(o.x+u,o.y+m),TY=o=>o.type==="longpress"||o.type.indexOf("touch")===0,ife=o=>{if(TY(o)){const u=o.touches[0];return z7(u.pageX,u.pageY)}else return z7(o.pageX,o.pageY)},afe=o=>{if(TY(o)){const u=o.touches[0];return z7(u.clientX,u.clientY)}else return z7(o.clientX,o.clientY)},lfe=(o,u)=>{const m=E8.DOM.getPos(o);return rfe(u,m.x,m.y)},cfe=(o,u)=>u.type==="contextmenu"||u.type==="longpress"?o.inline?ife(u):lfe(o.getContentAreaContainer(),afe(u)):xI(o),xI=o=>({type:"selection",root:Xt.fromDom(o.selection.getNode())}),ufe=o=>({type:"node",node:V.some(Xt.fromDom(o.selection.getNode())),root:Xt.fromDom(o.getBody())}),IY=(o,u,m)=>{switch(m){case"node":return ufe(o);case"point":return cfe(o,u);case"selection":return xI(o)}},WF=(o,u,m,v,C,x)=>{const I=m(),F=IY(o,u,x);q_(I,um.CLOSE_ON_EXECUTE,v,{isHorizontalMenu:!1,search:V.none()}).map(U=>{u.preventDefault(),Ni.showMenuAt(C,{anchor:F},{menu:{markers:a3("normal")},data:U})})},AY={onLtr:()=>[nl,La,qa,Jl,Pa,hl,Ef,A7,I7,tc,w3,HN],onRtl:()=>[nl,qa,La,Pa,Jl,hl,Ef,A7,w3,HN,I7,tc]},OY=12,dfe={valignCentre:[],alignCentre:[],alignLeft:["tox-pop--align-left"],alignRight:["tox-pop--align-right"],right:["tox-pop--right"],left:["tox-pop--left"],bottom:["tox-pop--bottom"],top:["tox-pop--top"]},ffe=(o,u)=>{const m=o.selection;if(m.isCollapsed()||u.touches.length<1)return!1;{const v=u.touches[0],C=m.getRng();return Eg(o.getWin(),wg.domRange(C)).exists(I=>I.left<=v.clientX&&I.right>=v.clientX&&I.top<=v.clientY&&I.bottom>=v.clientY)}},pfe=o=>{const u=o.selection.getRng(),m=()=>{ex.setEditorTimeout(o,()=>{o.selection.setRng(u)},10),x()};o.once("touchend",m);const v=I=>{I.preventDefault(),I.stopImmediatePropagation()};o.on("mousedown",v,!0);const C=()=>x();o.once("longpresscancel",C);const x=()=>{o.off("touchend",m),o.off("longpresscancel",C),o.off("mousedown",v)}},mfe=(o,u,m)=>{const v=IY(o,u,m);return{bubble:Eu(0,m==="point"?OY:0,dfe),layouts:AY,overrides:{maxWidthFunction:KT(),maxHeightFunction:z0()},...v}},hfe=(o,u,m,v,C,x,I)=>{const F=mfe(o,u,x);q_(m,um.CLOSE_ON_EXECUTE,v,{isHorizontalMenu:!0,search:V.none()}).map(U=>{u.preventDefault();const X=I?Pl.HighlightMenuAndItem:Pl.HighlightNone;Ni.showMenuWithinBounds(C,{anchor:F},{menu:{markers:a3("normal"),highlightOnOpen:X},data:U,type:"horizontal"},()=>V.some(FF(o,v.shared,x==="node"?"node":"selection"))),o.dispatch(sY)})},jF=(o,u,m,v,C,x)=>{const I=Zi(),F=I.os.isiOS(),U=I.os.isMacOS(),X=I.os.isAndroid(),oe=I.deviceType.isTouch(),me=()=>!(X||F||U&&oe),Se=()=>{const Ie=m();hfe(o,u,Ie,v,C,x,me())};if((U||F)&&x!=="node"){const Ie=()=>{pfe(o),Se()};ffe(o,u)?Ie():(o.once("selectionchange",Ie),o.once("touchend",()=>o.off("selectionchange",Ie)))}else Se()},RY=o=>d(o)?o==="|":o.type==="separator",TI={type:"separator"},DY=o=>{const u=m=>({text:m.text,icon:m.icon,enabled:m.enabled,shortcut:m.shortcut});if(d(o))return o;switch(o.type){case"separator":return TI;case"submenu":return{type:"nestedmenuitem",...u(o),getSubmenuItems:()=>{const v=o.getSubmenuItems();return d(v)?v:ct(v,DY)}};default:const m=o;return{type:"menuitem",...u(m),onAction:q(m.onAction)}}},LY=(o,u)=>{if(u.length===0)return o;const v=sn(o).filter(C=>!RY(C)).fold(()=>[],C=>[TI]);return o.concat(v).concat(u).concat([TI])},ZF=(o,u,m)=>{const v=Xs(u,(C,x)=>bn(o,x.toLowerCase()).map(I=>{const F=I.update(m);if(d(F)&&_i(Ti(F)))return LY(C,F.split(" "));if(S(F)&&F.length>0){const U=ct(F,DY);return LY(C,U)}else return C}).getOrThunk(()=>C.concat([x])),[]);return v.length>0&&RY(v[v.length-1])&&v.pop(),v},gfe=(o,u)=>u.ctrlKey&&!EY(o),PY=o=>o.type==="longpress"||qs(o,"touches"),MY=(o,u)=>!PY(u)&&(u.button!==2||u.target===o.getBody()&&u.pointerType===""),NY=(o,u)=>MY(o,u)?o.selection.getStart(!0):u.target,qF=(o,u)=>{const m=kY(o),v=MY(o,u)?"selection":"point";if(_i(m)){const C=NY(o,u);return Lg(Xt.fromDom(C),m)?"node":v}else return v},vfe=(o,u,m)=>{const C=Zi().deviceType.isTouch,x=Fc(Ni.sketch({dom:{tag:"div"},lazySink:u,onEscape:()=>o.focus(),onShow:()=>m.setContextMenuState(!0),onHide:()=>m.setContextMenuState(!1),fireDismissalEventInstead:{},inlineBehaviours:cn([zs("dismissContextMenu",[Wt(ag(),(U,X)=>{Uo.close(U),o.focus()})])])})),I=()=>Ni.hide(x),F=U=>{if(EY(o)&&U.preventDefault(),gfe(o,U)||ofe(o))return;const X=qF(o,U),oe=()=>{const Se=NY(o,U),Ie=o.ui.registry.getAll(),Pe=xY(o);return ZF(Ie.contextMenus,Pe,Se)};(C()?jF:WF)(o,U,oe,m,x,X)};o.on("init",()=>{const U="ResizeEditor ScrollContent ScrollWindow longpresscancel"+(C()?"":" ResizeWindow");o.on(U,I),o.on("longpress contextmenu",F)})},GF=sp.generate([{offset:["x","y"]},{absolute:["x","y"]},{fixed:["x","y"]}]),II=o=>u=>u.translate(-o.left,-o.top),AI=o=>u=>u.translate(o.left,o.top),gv=o=>(u,m)=>Xs(o,(v,C)=>C(v),jr(u,m)),W7=(o,u,m)=>o.fold(gv([AI(m),II(u)]),gv([II(u)]),gv([])),mS=(o,u,m)=>o.fold(gv([AI(m)]),gv([]),gv([AI(u)])),FY=(o,u,m)=>o.fold(gv([]),gv([II(m)]),gv([AI(u),II(m)])),bfe=(o,u,m,v,C,x)=>{const I=mS(o,C,x),F=mS(u,C,x);return Math.abs(I.left-F.left)<=m&&Math.abs(I.top-F.top)<=v},yfe=(o,u,m,v,C,x)=>{const I=mS(o,C,x),F=mS(u,C,x),U=Math.abs(I.left-F.left),X=Math.abs(I.top-F.top);return jr(U,X)},$Y=(o,u,m)=>{const v=o.fold((C,x)=>({position:V.some("absolute"),left:V.some(C+"px"),top:V.some(x+"px")}),(C,x)=>({position:V.some("absolute"),left:V.some(C-m.left+"px"),top:V.some(x-m.top+"px")}),(C,x)=>({position:V.some("fixed"),left:V.some(C+"px"),top:V.some(x+"px")}));return{right:V.none(),bottom:V.none(),...v}},_fe=(o,u,m)=>o.fold((v,C)=>OI(v+u,C+m),(v,C)=>vv(v+u,C+m),(v,C)=>T3(v+u,C+m)),KF=(o,u,m,v)=>{const C=(x,I)=>(F,U)=>{const X=x(u,m,v);return I(F.getOr(X.left),U.getOr(X.top))};return o.fold(C(FY,OI),C(mS,vv),C(W7,T3))},OI=GF.offset,vv=GF.absolute,T3=GF.fixed,YF=(o,u)=>{const m=eo(o,u);return O(m)?NaN:parseInt(m,10)},Sfe=(o,u)=>{const m=o.element,v=YF(m,u.leftAttr),C=YF(m,u.topAttr);return isNaN(v)||isNaN(C)?V.none():V.some(jr(v,C))},Cfe=(o,u,m)=>{const v=o.element;jt(v,u.leftAttr,m.left+"px"),jt(v,u.topAttr,m.top+"px")},wfe=(o,u)=>{const m=o.element;ke(m,u.leftAttr),ke(m,u.topAttr)},I3=(o,u,m,v)=>Sfe(o,u).fold(()=>m,C=>T3(C.left+v.left,C.top+v.top)),BY=(o,u,m,v,C,x)=>{const I=I3(o,u,m,v),F=u.mustSnap?kfe(o,u,I,C,x):xfe(o,u,I,C,x),U=W7(I,C,x);return Cfe(o,u,U),F.fold(()=>({coord:T3(U.left,U.top),extra:V.none()}),X=>({coord:X.output,extra:X.extra}))},Efe=(o,u)=>{wfe(o,u)},VY=(o,u,m,v)=>ts(o,C=>{const x=C.sensor;return bfe(u,x,C.range.left,C.range.top,m,v)?V.some({output:KF(C.output,u,m,v),extra:C.extra}):V.none()}),kfe=(o,u,m,v,C)=>{const x=u.getSnapPoints(o);return VY(x,m,v,C).orThunk(()=>Xs(x,(U,X)=>{const oe=X.sensor,me=yfe(m,oe,X.range.left,X.range.top,v,C);return U.deltas.fold(()=>({deltas:V.some(me),snap:V.some(X)}),Se=>{const Ie=(me.left+me.top)/2,Pe=(Se.left+Se.top)/2;return Ie<=Pe?{deltas:V.some(me),snap:V.some(X)}:U})},{deltas:V.none(),snap:V.none()}).snap.map(U=>({output:KF(U.output,m,v,C),extra:U.extra})))},xfe=(o,u,m,v,C)=>{const x=u.getSnapPoints(o);return VY(x,m,v,C)},HY=(o,u,m)=>({coord:KF(o.output,o.output,u,m),extra:o.extra});var Tfe=Object.freeze({__proto__:null,snapTo:(o,u,m,v)=>{const C=u.getTarget(o.element);if(u.repositionTarget){const x=Fr(o.element),I=Dc(x),F=i2(C),U=HY(v,I,F),X=$Y(U.coord,I,F);Wa(C,X)}}});const XF="data-initial-z-index",Ife=o=>{ai(o.element).filter(hi).each(u=>{Us(u,XF).fold(()=>fo(u,"z-index"),m=>wn(u,"z-index",m)),ke(u,XF)})},Afe=o=>{ai(o.element).filter(hi).each(u=>{Er(u,"z-index").each(m=>{jt(u,XF,m)}),wn(u,"z-index",Gt(o.element,"z-index"))})},UY=(o,u)=>{o.getSystem().addToGui(u),Afe(u)},Ofe=o=>{Ife(o),o.getSystem().removeFromGui(o)},zY=(o,u,m)=>o.getSystem().build(bd.sketch({dom:{styles:{left:"0px",top:"0px",width:"100%",height:"100%",position:"fixed","z-index":"1000000000000000"},classes:[u]},events:m}));var Rfe=Vu("snaps",[Zt("getSnapPoints"),Ho("onSensor"),Zt("leftAttr"),Zt("topAttr"),mt("lazyViewport",ul),mt("mustSnap",!1)]);const JF=[mt("useFixed",$e),Zt("blockerClass"),mt("getTarget",ce),mt("onDrag",z),mt("repositionTarget",!0),mt("onDrop",z),Kr("getBounds",ul),Rfe],WY=o=>br(Er(o,"left"),Er(o,"top"),Er(o,"position"),(u,m,v)=>(v==="fixed"?T3:OI)(parseInt(u,10),parseInt(m,10))).getOrThunk(()=>{const u=hc(o);return vv(u.left,u.top)}),jY=(o,u,m,v,C)=>{const x=C.bounds,I=mS(u,m,v),F=df(I.left,x.x,x.x+x.width-C.width),U=df(I.top,x.y,x.y+x.height-C.height),X=vv(F,U);return u.fold(()=>{const oe=FY(X,m,v);return OI(oe.left,oe.top)},J(X),()=>{const oe=W7(X,m,v);return T3(oe.left,oe.top)})},Dfe=(o,u,m,v,C,x,I)=>{const F=u.fold(()=>{const U=_fe(m,x.left,x.top),X=W7(U,v,C);return T3(X.left,X.top)},U=>{const X=BY(o,U,m,x,v,C);return X.extra.each(oe=>{U.onSensor(o,oe)}),X.coord});return jY(o,F,v,C,I)},j7=(o,u,m,v)=>{const C=u.getTarget(o.element);if(u.repositionTarget){const x=Fr(o.element),I=Dc(x),F=i2(C),U=WY(C),X=Dfe(o,u.snaps,U,I,F,v,m),oe=$Y(X,I,F);Wa(C,oe)}u.onDrag(o,C,v)},ZY=(o,u)=>({bounds:o.getBounds(),height:Dd(u.element),width:Zp(u.element)}),QF=(o,u,m,v,C)=>{const x=m.update(v,C),I=m.getStartData().getOrThunk(()=>ZY(u,o));x.each(F=>{j7(o,u,I,F)})},RI=(o,u,m,v)=>{u.each(Ofe),m.snaps.each(x=>{Efe(o,x)});const C=m.getTarget(o.element);v.reset(),m.onDrop(o,C)},e$=o=>(u,m)=>{const v=C=>{m.setStartData(ZY(u,C))};return ni([Wt(LC(),C=>{m.getStartData().each(()=>v(C))}),...o(u,m,v)])},Lfe=o=>ni([Wt(fd(),o.forceDrop),Wt(oy(),o.drop),Wt(t4(),(u,m)=>{o.move(m.event)}),Wt(sy(),o.delayDrop)]);var Pfe=Object.freeze({__proto__:null,getData:o=>V.from(jr(o.x,o.y)),getDelta:(o,u)=>jr(u.left-o.left,u.top-o.top)});const qY=(o,u,m)=>[Wt(fd(),(v,C)=>{if(C.event.raw.button!==0)return;C.stop();const I=()=>RI(v,V.some(X),o,u),F=Q2(I,200),U={drop:I,delayDrop:F.schedule,forceDrop:I,move:me=>{F.cancel(),QF(v,o,u,Pfe,me)}},X=zY(v,o.blockerClass,Lfe(U));(()=>{m(v),UY(v,X)})()})],Mfe=[...JF,ci("dragger",{handlers:e$(qY)})],Nfe=o=>ni([Wt(op(),o.forceDrop),Wt(e1(),o.drop),Wt(ER(),o.drop),Wt(Qv(),(u,m)=>{o.move(m.event)})]),Ffe=o=>{const u=o[0];return V.some(jr(u.clientX,u.clientY))};var GY=Object.freeze({__proto__:null,getData:o=>{const m=o.raw.touches;return m.length===1?Ffe(m):V.none()},getDelta:(o,u)=>jr(u.left-o.left,u.top-o.top)});const KY=(o,u,m)=>{const v=vr(),C=x=>{RI(x,v.get(),o,u),v.clear()};return[Wt(op(),(x,I)=>{I.stop();const F=()=>C(x),U={drop:F,delayDrop:z,forceDrop:F,move:me=>{QF(x,o,u,GY,me)}},X=zY(x,o.blockerClass,Nfe(U));v.set(X),(()=>{m(x),UY(x,X)})()}),Wt(Qv(),(x,I)=>{I.stop(),QF(x,o,u,GY,I.event)}),Wt(e1(),(x,I)=>{I.stop(),C(x)}),Wt(ER(),C)]},$fe=[...JF,ci("dragger",{handlers:e$(KY)})],Bfe=(o,u,m)=>[...qY(o,u,m),...KY(o,u,m)],Vfe=[...JF,ci("dragger",{handlers:e$(Bfe)})];var Hfe=Object.freeze({__proto__:null,mouse:Mfe,touch:$fe,mouseOrTouch:Vfe}),Ufe=Object.freeze({__proto__:null,init:()=>{let o=V.none(),u=V.none();const m=()=>{o=V.none(),u=V.none()},v=(U,X)=>{const oe=o.map(me=>U.getDelta(me,X));return o=V.some(X),oe},C=(U,X)=>U.getData(X).bind(oe=>v(U,oe)),x=U=>{u=V.some(U)},I=()=>u,F=J({});return Pd({readState:F,reset:m,update:C,getStartData:I,setStartData:x})}});const A3=$9({branchKey:"mode",branches:Hfe,name:"dragging",active:{events:(o,u)=>o.dragger.handlers(o,u)},extra:{snap:o=>({sensor:o.sensor,range:o.range,output:o.output,extra:V.from(o.extra)})},state:Ufe,apis:Tfe}),n$=40,Z7=n$/2,YY=(o,u,m,v,C,x)=>o.fold(()=>A3.snap({sensor:vv(m-Z7,v-Z7),range:jr(C,x),output:vv(V.some(m),V.some(v)),extra:{td:u}}),I=>{const F=m-Z7,U=v-Z7,X=n$,oe=n$,me=I.element.dom.getBoundingClientRect();return A3.snap({sensor:vv(F,U),range:jr(X,oe),output:vv(V.some(m-me.width/2),V.some(v-me.height/2)),extra:{td:u}})}),XY=(o,u,m)=>{const v=(C,x)=>C.exists(I=>co(I,x));return{getSnapPoints:o,leftAttr:"data-drag-left",topAttr:"data-drag-top",onSensor:(C,x)=>{const I=x.td;v(u.get(),I)||(u.set(I),m(I))},mustSnap:!0}},JY=o=>or(_l.sketch({dom:{tag:"div",classes:["tox-selector"]},buttonBehaviours:cn([A3.config({mode:"mouseOrTouch",blockerClass:"blocker",snaps:o}),sb.config({})]),eventOrder:{mousedown:["dragging","alloy.base.behaviour"],touchstart:["dragging","alloy.base.behaviour"]}})),zfe=(o,u)=>{const m=ds([]),v=ds([]),C=ds(!1),x=vr(),I=vr(),F=In=>{const Ft=Fu(In);return YY(Ie.getOpt(u),In,Ft.x,Ft.y,Ft.width,Ft.height)},U=()=>ct(m.get(),In=>F(In)),X=In=>{const Ft=Fu(In);return YY(Pe.getOpt(u),In,Ft.right,Ft.bottom,Ft.width,Ft.height)},oe=()=>ct(v.get(),In=>X(In)),me=XY(U,x,In=>{I.get().each(Ft=>{o.dispatch("TableSelectorChange",{start:In,finish:Ft})})}),Se=XY(oe,I,In=>{x.get().each(Ft=>{o.dispatch("TableSelectorChange",{start:Ft,finish:In})})}),Ie=JY(me),Pe=JY(Se),Me=Fc(Ie.asSpec()),at=Fc(Pe.asSpec()),qe=(In,Ft,Mn,En)=>{const zn=Ft.dom.getBoundingClientRect();fo(In.element,"display");const go=pc(Xt.fromDom(o.getBody())).dom.innerHeight,fi=Mn(zn),Jo=En(zn,go);(fi||Jo)&&wn(In.element,"display","none")},dt=(In,Ft,Mn,En)=>{const zn=Mn(Ft);A3.snapTo(In,zn),qe(In,Ft,Jo=>Jo[En]<0,(Jo,rs)=>Jo[En]>rs)},it=In=>dt(Me,In,F,"top"),It=()=>x.get().each(it),Mt=In=>dt(at,In,X,"bottom"),en=()=>I.get().each(Mt);if(Zi().deviceType.isTouch()){const In=Ft=>ct(Ft,Xt.fromDom);o.on("TableSelectionChange",Ft=>{C.get()||(K0(u,Me),K0(u,at),C.set(!0));const Mn=Xt.fromDom(Ft.start),En=Xt.fromDom(Ft.finish);x.set(Mn),I.set(En),V.from(Ft.otherCells).each(zn=>{m.set(In(zn.upOrLeftCells)),v.set(In(zn.downOrRightCells)),it(Mn),Mt(En)})}),o.on("ResizeEditor ResizeWindow ScrollContent",()=>{It(),en()}),o.on("TableSelectionClear",()=>{C.get()&&(im(Me),im(at),C.set(!1)),x.clear(),I.clear()})}};var Wfe='<svg height="16" viewBox="0 0 80 16" width="80" xmlns="http://www.w3.org/2000/svg"><g opacity=".8"><path d="m80 3.537v-2.202h-7.976v11.585h7.976v-2.25h-5.474v-2.621h4.812v-2.069h-4.812v-2.443zm-10.647 6.929c-.493.217-1.13.337-1.864.337s-1.276-.156-1.805-.47a3.732 3.732 0 0 1 -1.3-1.298c-.324-.554-.48-1.191-.48-1.877s.156-1.335.48-1.877a3.635 3.635 0 0 1 1.3-1.299 3.466 3.466 0 0 1 1.805-.481c.65 0 .914.06 1.263.18.36.12.698.277.986.47.289.192.578.384.842.6l.12.085v-2.586l-.023-.024c-.385-.35-.855-.614-1.384-.818-.53-.205-1.155-.313-1.877-.313-.721 0-1.6.144-2.333.445a5.773 5.773 0 0 0 -1.937 1.251 5.929 5.929 0 0 0 -1.324 1.9c-.324.735-.48 1.565-.48 2.455s.156 1.72.48 2.454c.325.734.758 1.383 1.324 1.913.553.53 1.215.938 1.937 1.25a6.286 6.286 0 0 0 2.333.434c.819 0 1.384-.108 1.961-.313.59-.216 1.083-.505 1.468-.866l.024-.024v-2.49l-.12.096c-.41.337-.878.626-1.396.866zm-14.869-4.15-4.8-5.04-.024-.025h-.902v11.67h2.502v-6.847l2.827 3.08.385.409.397-.41 2.791-3.067v6.845h2.502v-11.679h-.902l-4.788 5.052z"/><path clip-rule="evenodd" d="m15.543 5.137c0-3.032-2.466-5.113-4.957-5.137-.36 0-.745.024-1.094.096-.157.024-3.85.758-3.85.758-3.032.602-4.62 2.466-4.704 4.788-.024.89-.024 4.27-.024 4.27.036 3.165 2.406 5.138 5.017 5.126.337 0 1.119-.109 1.287-.145.144-.024.385-.084.746-.144.661-.12 1.684-.325 3.067-.602 2.37-.409 4.103-2.009 4.44-4.33.156-1.023.084-4.692.084-4.692zm-3.213 3.308-2.346.457v2.31l-5.859 1.143v-5.75l2.346-.458v3.441l3.513-.686v-3.44l-3.513.685v-2.297l5.859-1.143v5.75zm20.09-3.296-.083-1.023h-2.13v8.794h2.346v-4.884c0-1.107.95-1.985 2.057-1.997 1.095 0 1.901.89 1.901 1.997v4.884h2.346v-5.245c-.012-2.105-1.588-3.777-3.67-3.765a3.764 3.764 0 0 0 -2.778 1.25l.012-.011zm-6.014-4.102 2.346-.458v2.298l-2.346.457z" fill-rule="evenodd"/><path d="m28.752 4.126h-2.346v8.794h2.346z"/><path clip-rule="evenodd" d="m43.777 15.483 4.043-11.357h-2.418l-1.54 4.355-.445 1.324-.36-1.324-1.54-4.355h-2.418l3.151 8.794-1.083 3.08zm-21.028-5.51c0 .722.541 1.034.878 1.034s.638-.048.95-.144l.518 1.708c-.217.145-.879.518-2.13.518a2.565 2.565 0 0 1 -2.562-2.587c-.024-1.082-.024-2.49 0-4.21h-1.54v-2.142h1.54v-1.912l2.346-.458v2.37h2.201v2.142h-2.2v3.693-.012z" fill-rule="evenodd"/></g></svg>\n';const s$=(o,u)=>{const m=V.from(eo(o,"id")).getOrThunk(()=>{const v=Pn("aria");return jt(u,"id",v),v});jt(o,"aria-describedby",m)},QY=o=>{ke(o,"aria-describedby")},jfe=o=>o.nodeName==="BR"||!!o.getAttribute("data-mce-bogus")||o.getAttribute("data-mce-type")==="bookmark",Zfe=(o,u,m)=>{var v;const C=(v=u.delimiter)!==null&&v!==void 0?v:"›",x=(X,oe,me)=>_l.sketch({dom:{tag:"div",classes:["tox-statusbar__path-item"],attributes:{"data-index":me}},components:[Ci(X)],action:Se=>{o.focus(),o.selection.select(oe),o.nodeChanged()},buttonBehaviours:cn([Yi.config({...m.tooltips.getConfig({tooltipText:m.translate(["Select the {0} element",oe.nodeName.toLowerCase()]),onShow:(Se,Ie)=>{s$(Se.element,Ie.element)},onHide:Se=>{QY(Se.element)}})}),pm.button(m.isDisabled),wa(()=>m.checkUiComponentContext("any"))])}),I=()=>({dom:{tag:"div",classes:["tox-statusbar__path-divider"],attributes:{"aria-hidden":!0}},components:[Ci(" ".concat(C," "))]}),F=X=>Xs(X,(oe,me,Se)=>{const Ie=x(me.name,me.element,Se);return Se===0?oe.concat([Ie]):oe.concat([I(),Ie])},[]),U=X=>{const oe=[];let me=X.length;for(;me-- >0;){const Se=X[me];if(Se.nodeType===1&&!jfe(Se)){const Ie=Oj(o,Se);if(Ie.isDefaultPrevented()||oe.push({name:Ie.name,element:Se}),Ie.isPropagationStopped())break}}return oe};return{dom:{tag:"div",classes:["tox-statusbar__path"],attributes:{role:"navigation"}},behaviours:cn([fs.config({mode:"flow",selector:"div[role=button]"}),Xn.config({disabled:m.isDisabled}),wa(()=>m.checkUiComponentContext("any")),si.config({}),Bs.config({}),zs("elementPathEvents",[$r((X,oe)=>{o.shortcuts.add("alt+F11","focus statusbar elementpath",()=>fs.focusIn(X)),o.on("NodeChange",me=>{const Se=U(me.parents),Ie=Se.length>0?F(Se):[];Bs.set(X,Ie)})})])]),components:[]}};var pb;(function(o){o[o.None=0]="None",o[o.Both=1]="Both",o[o.Vertical=2]="Vertical"})(pb||(pb={}));const qfe=(o,u,m,v,C)=>{const x={height:mI(v+u.top,PL(o),w_(o))};return m===pb.Both&&(x.width=mI(C+u.left,x8(o),q2(o))),x},eX=(o,u,m)=>{const v=Xt.fromDom(o.getContainer()),C=qfe(o,u,m,Wi(v),oo(v));Qs(C,(x,I)=>{Z(x)&&wn(v,I,DF(x))}),bre(o)},Gfe=o=>{const u=tW(o);return u===!1?pb.None:u==="both"?pb.Both:pb.Vertical},DI=(o,u,m,v)=>{const x=jr(m*20,v*20);return eX(o,x,u),V.some(!0)},Kfe=(o,u)=>{const m=Gfe(o);if(m===pb.None)return V.none();const v=m===pb.Both?"Press the arrow keys to resize the editor.":"Press the Up and Down arrow keys to resize the editor.";return V.some(_p("resize-handle",{tag:"div",classes:["tox-statusbar__resize-handle"],attributes:{"aria-label":u.translate(v),"data-mce-name":"resize-handle"},behaviours:[A3.config({mode:"mouse",repositionTarget:!1,onDrag:(C,x,I)=>eX(o,I,m),blockerClass:"tox-blocker"}),fs.config({mode:"special",onLeft:()=>DI(o,m,-1,0),onRight:()=>DI(o,m,1,0),onUp:()=>DI(o,m,0,-1),onDown:()=>DI(o,m,0,1)}),si.config({}),As.config({}),Yi.config(u.tooltips.getConfig({tooltipText:u.translate("Resize")}))]},u.icons))},Yfe=(o,u)=>{const m=(v,C,x)=>Bs.set(v,[Ci(u.translate(["{0} "+x,C[x]]))]);return _l.sketch({dom:{tag:"button",classes:["tox-statusbar__wordcount"]},components:[],buttonBehaviours:cn([pm.button(u.isDisabled),wa(()=>u.checkUiComponentContext("any")),si.config({}),Bs.config({}),Dn.config({store:{mode:"memory",initialValue:{mode:"words",count:{words:0,characters:0}}}}),zs("wordcount-events",[r1(v=>{const C=Dn.getValue(v),x=C.mode==="words"?"characters":"words";Dn.setValue(v,{mode:x,count:C.count}),m(v,C.count,x)}),$r(v=>{o.on("wordCountUpdate",C=>{const{mode:x}=Dn.getValue(v);Dn.setValue(v,{mode:x,count:C.wordCount}),m(v,C.wordCount,x)})})])]),eventOrder:{[Mc()]:["disabling","alloy.base.behaviour","wordcount-events"]}})},Xfe=(o,u)=>{const m=()=>({dom:{tag:"span",classes:["tox-statusbar__branding"]},components:[{dom:{tag:"a",attributes:{href:"https://www.tiny.cloud/powered-by-tiny?utm_campaign=poweredby&utm_source=tiny&utm_medium=referral&utm_content=v7",rel:"noopener",target:"_blank","aria-label":o.translate(["Build with {0}","TinyMCE"])},innerHtml:o.translate(["Build with {0}",Wfe.trim()])},behaviours:cn([As.config({})])}]}),v=()=>{const F=BP("Alt+0");return{dom:{tag:"div",classes:["tox-statusbar__help-text"]},components:[Ci(cm.translate(["Press {0} for help",F]))]}},C=()=>{const F=[];return o.hasPlugin("wordcount")&&F.push(Yfe(o,u)),UL(o)&&F.push(m()),{dom:{tag:"div",classes:["tox-statusbar__right-container"]},components:F}},x=()=>{const F=[],U=cx(o),X=eW(o),oe=UL(o)||o.hasPlugin("wordcount"),me=()=>{const Se="tox-statusbar__text-container--flex-start",Ie="tox-statusbar__text-container--flex-end",Pe="tox-statusbar__text-container--space-around";if(U){const Me="tox-statusbar__text-container-3-cols";return!oe&&!X?[Me,Pe]:oe&&!X?[Me,Ie]:[Me,Se]}return[oe&&!X?Ie:Se]};return X&&F.push(Zfe(o,{},u)),U&&F.push(v()),oe&&F.push(C()),F.length>0?[{dom:{tag:"div",classes:["tox-statusbar__text-container",...me()]},components:F}]:[]};return{dom:{tag:"div",classes:["tox-statusbar"]},components:(()=>{const F=x(),U=Kfe(o,u);return F.concat(U.toArray())})()}},tX=(o,u)=>u.get().getOrDie("UI for ".concat(o," has not been rendered")),Jfe=(o,u)=>{const m=o.inline,v=m?gI:XK,C=G2(o)?k3:UT,x=vI(),I=vr(),F=vr(),U=vr(),Se=Zi().deviceType.isTouch()?["tox-platform-touch"]:[],Ie=jL(o),Pe=E_(o),Me=or({dom:{tag:"div",classes:["tox-anchorbar"]}}),at=or({dom:{tag:"div",classes:["tox-bottom-anchorbar"]}}),qe=()=>x.mainUi.get().map(_s=>_s.outerContainer).bind(Dr.getHeader),dt=()=>no.fromOption(x.dialogUi.get().map(_s=>_s.sink),"UI has not been rendered"),it=()=>no.fromOption(x.popupUi.get().map(_s=>_s.sink),"(popup) UI has not been rendered"),It=x.lazyGetInOuterOrDie("anchor bar",Me.getOpt),Mt=x.lazyGetInOuterOrDie("bottom anchor bar",at.getOpt),en=x.lazyGetInOuterOrDie("toolbar",Dr.getToolbar),In=x.lazyGetInOuterOrDie("throbber",Dr.getThrobber),Ft=YN({popup:it,dialog:dt},o,It,Mt),Mn=()=>{const _s={attributes:{[H4]:Ie?ch.BottomToTop:ch.TopToBottom}},Gs=Dr.parts.menubar({dom:{tag:"div",classes:["tox-menubar"]},backstage:Ft.popup,onEscape:()=>{o.focus()}}),qr=Dr.parts.toolbar({dom:{tag:"div",classes:["tox-toolbar"]},getSink:Ft.popup.shared.getSink,providers:Ft.popup.shared.providers,onEscape:()=>{o.focus()},onToolbarToggled:Wg=>{_re(o,Wg)},type:Pe,lazyToolbar:en,lazyHeader:()=>qe().getOrDie("Could not find header element"),..._s}),Lr=Dr.parts["multiple-toolbar"]({dom:{tag:"div",classes:["tox-toolbar-overlord"]},providers:Ft.popup.shared.providers,onEscape:()=>{o.focus()},type:Pe}),Ud=I8(o),Qi=dx(o),Op=ux(o),iu=zL(o),Rp=En(),Dp=Ud||Qi||Op,xh=()=>Ud?[Lr]:Qi?[qr]:[],nw=iu?[Rp,Gs]:[Gs];return Dr.parts.header({dom:{tag:"div",classes:["tox-editor-header"].concat(Dp?[]:["tox-editor-header--empty"]),..._s},components:Nt([Op?nw:[],xh(),gh(o)?[]:[Me.asSpec()]]),sticky:G2(o),editor:o,sharedBackstage:Ft.popup.shared})},En=()=>Dr.parts.promotion({dom:{tag:"div",classes:["tox-promotion"]}}),zn=()=>{const _s=Dr.parts.socket({dom:{tag:"div",classes:["tox-edit-area"]}}),Gs=Dr.parts.sidebar({dom:{tag:"div",classes:["tox-sidebar"]}});return{dom:{tag:"div",classes:["tox-sidebar-wrap"]},components:[_s,Gs]}},go=()=>{const _s=ZL(o),Gs=co(rt(),_s)&&Gt(_s,"display")==="grid",qr={dom:{tag:"div",classes:["tox","tox-silver-sink","tox-tinymce-aux"].concat(Se),attributes:{...cm.isRtl()?{dir:"rtl"}:{}}},behaviours:cn([yc.config({useFixed:()=>C.isDocked(qe)})])},Lr={dom:{styles:{width:document.body.clientWidth+"px"}},events:ni([Wt(t2(),Op=>{wn(Op.element,"width",document.body.clientWidth+"px")})])},Ud=Fc(Gi(qr,Gs?Lr:{})),Qi=SM(Ud);return F.set(Qi),{sink:Ud,mothership:Qi}},fi=()=>{const _s={dom:{tag:"div",classes:["tox","tox-silver-sink","tox-silver-popup-sink","tox-tinymce-aux"].concat(Se),attributes:{...cm.isRtl()?{dir:"rtl"}:{}}},behaviours:cn([yc.config({useFixed:()=>C.isDocked(qe),getBounds:()=>u.getPopupSinkBounds()})])},Gs=Fc(_s),qr=SM(Gs);return U.set(qr),{sink:Gs,mothership:qr}},Jo=()=>{const _s=Mn(),Gs=zn(),qr=Dr.parts.throbber({dom:{tag:"div",classes:["tox-throbber"]},backstage:Ft.popup}),Lr=Dr.parts.viewWrapper({backstage:Ft.popup}),Ud=lx(o)&&!m?V.some(Xfe(o,Ft.popup.shared.providers)):V.none(),Qi=Nt([Ie?[]:[_s],m?[]:[Gs],Ie?[_s]:[]]),Op=Dr.parts.editorContainer({components:Nt([Qi,m?[]:[at.asSpec()]])}),iu=qL(o),Rp={role:"application",...cm.isRtl()?{dir:"rtl"}:{},...iu?{"aria-hidden":"true"}:{}},Dp=Fc(Dr.sketch({dom:{tag:"div",classes:["tox","tox-tinymce"].concat(m?["tox-tinymce-inline"]:[]).concat(Ie?["tox-tinymce--toolbar-bottom"]:[]).concat(Se),styles:{visibility:"hidden",...iu?{opacity:"0",border:"0"}:{}},attributes:Rp},components:[Op,...m?[]:[Lr,...Ud.toArray()],qr],behaviours:cn([wa(()=>Ft.popup.shared.providers.checkUiComponentContext("any")),Xn.config({disableClass:"tox-tinymce--disabled"}),fs.config({mode:"cyclic",selector:".tox-menubar, .tox-toolbar, .tox-toolbar__primary, .tox-toolbar__overflow--open, .tox-sidebar__overflow--open, .tox-statusbar__path, .tox-statusbar__wordcount, .tox-statusbar__branding a, .tox-statusbar__resize-handle"})])})),xh=SM(Dp);return I.set(xh),{mothership:xh,outerContainer:Dp}},rs=_s=>{const Gs=DF(wde(o)),qr=DF(Ede(o));return o.inline||(Oi("div","width",qr)&&wn(_s.element,"width",qr),Oi("div","height",Gs)?wn(_s.element,"height",Gs):wn(_s.element,"height","400px")),Gs},ln=_s=>{o.addShortcut("alt+F9","focus menubar",()=>{Dr.focusMenubar(_s)}),o.addShortcut("alt+F10","focus toolbar",()=>{Dr.focusToolbar(_s)}),o.addCommand("ToggleToolbarDrawer",(Gs,qr)=>{qr!=null&&qr.skipFocus?Dr.toggleToolbarDrawerWithoutFocusing(_s):Dr.toggleToolbarDrawer(_s)}),o.addQueryStateHandler("ToggleToolbarDrawer",()=>Dr.isToolbarDrawerToggled(_s))},On=_s=>{const{mainUi:Gs,popupUi:qr,uiMotherships:Lr}=_s;Rs(ox(o),(V3,b$)=>{o.ui.registry.addGroupToolbarButton(b$,V3)});const{buttons:Ud,menuItems:Qi,contextToolbars:Op,sidebars:iu,views:Rp}=o.ui.registry.getAll(),Dp=fx(o),xh={menuItems:Qi,menus:aW(o),menubar:Kz(o),toolbar:Dp.getOrThunk(()=>ix(o)),allowToolbarGroups:Pe===yp.floating,buttons:Ud,sidebar:iu,views:Rp};ln(Gs.outerContainer),RG(o,Gs.mothership,Lr),C.setup(o,Ft.popup.shared,qe),tfe(o,Ft.popup),vfe(o,Ft.popup.shared.getSink,Ft.popup),Lce(o),r6e(o,In,Ft.popup.shared),Bde(o,Op,qr.sink,{backstage:Ft.popup}),zfe(o,qr.sink);const nw=o.getElement(),Wg=rs(Gs.outerContainer),v$={targetNode:nw,height:Wg};return v.render(o,_s,xh,Ft.popup,v$)},Fs=_s=>(U.set(_s.mothership),_s),ao=()=>{const _s=Jo(),Gs=go(),qr=rv(o)?fi():Fs(Gs);x.dialogUi.set(Gs),x.popupUi.set(qr),x.mainUi.set(_s);const Lr={popupUi:qr,dialogUi:Gs,mainUi:_s,uiMotherships:x.getUiMotherships()};return On(Lr)};return{popups:{backstage:Ft.popup,getMothership:()=>tX("popups",U)},dialogs:{backstage:Ft.dialog,getMothership:()=>tX("dialogs",F)},renderUI:ao}},Qfe=o=>o.dom.textContent,epe=(o,u)=>{const m=Us(o,"id").fold(()=>{const v=Pn("dialog-label");return jt(u,"id",v),v},ce);jt(o,"aria-labelledby",m)},nX=J([Zt("lazySink"),ur("dragBlockClass"),Kr("getBounds",ul),mt("useTabstopAt",Ue),mt("firstTabstop",0),mt("eventOrder",{}),Ll("modalBehaviours",[fs]),Qc("onExecute"),qC("onEscape")]),o$={sketch:ce},tpe=J([qu({name:"draghandle",overrides:(o,u)=>({behaviours:cn([A3.config({mode:"mouse",getTarget:m=>ih(m,'[role="dialog"]').getOr(m),blockerClass:o.dragBlockClass.getOrDie(new Error("The drag blocker class was not specified for a dialog with a drag handle: \n"+JSON.stringify(u,null,2)).message),getBounds:o.getDragBounds})])})}),Sc({schema:[Zt("dom")],name:"title"}),Sc({factory:o$,schema:[Zt("dom")],name:"close"}),Sc({factory:o$,schema:[Zt("dom")],name:"body"}),qu({factory:o$,schema:[Zt("dom")],name:"footer"}),mf({factory:{sketch:(o,u)=>({...o,dom:u.dom,components:u.components})},schema:[mt("dom",{tag:"div",styles:{position:"fixed",left:"0px",top:"0px",right:"0px",bottom:"0px"}}),mt("components",[])],name:"blocker"})]),npe=(o,u,m,v)=>{const C=vr(),x=Pe=>{C.set(Pe);const Me=o.lazySink(Pe).getOrDie(),at=v.blocker(),qe=Me.getSystem().build({...at,components:at.components.concat([md(Pe)]),behaviours:cn([As.config({}),zs("dialog-blocker-events",[th(ip(),()=>{ym.isBlocked(Pe)?z():fs.focusIn(Pe)})])])});K0(Me,qe),fs.focusIn(Pe)},I=Pe=>{C.clear(),ai(Pe.element).each(Me=>{Pe.getSystem().getByDom(Me).each(at=>{im(at)})})},F=Pe=>am(Pe,o,"body"),U=Pe=>Yr(Pe,o,"footer"),X=(Pe,Me)=>{ym.block(Pe,Me)},oe=Pe=>{ym.unblock(Pe)},me=Pn("modal-events"),Se={...o.eventOrder,[lp()]:[me].concat(o.eventOrder["alloy.system.attached"]||[])},Ie=Zi();return{uid:o.uid,dom:o.dom,components:u,apis:{show:x,hide:I,getBody:F,getFooter:U,setIdle:oe,setBusy:X},eventOrder:Se,domModification:{attributes:{role:"dialog","aria-modal":"true"}},behaviours:Ca(o.modalBehaviours,[Bs.config({}),fs.config({mode:"cyclic",onEnter:o.onExecute,onEscape:o.onEscape,useTabstopAt:o.useTabstopAt,firstTabstop:o.firstTabstop}),ym.config({getRoot:C.get}),zs(me,[$r(Pe=>{const Me=am(Pe,o,"title").element,at=Qfe(Me);Ie.os.isMacOS()&&B(at)?jt(Pe.element,"aria-label",at):epe(Pe.element,Me)})])])}},Nl=$c({name:"ModalDialog",configFields:nX(),partFields:tpe(),factory:npe,apis:{show:(o,u)=>{o.show(u)},hide:(o,u)=>{o.hide(u)},getBody:(o,u)=>o.getBody(u),getFooter:(o,u)=>o.getFooter(u),setBusy:(o,u,m)=>{o.setBusy(u,m)},setIdle:(o,u)=>{o.setIdle(u)}}}),spe=Ns([Ga,CP].concat(m3)),ope=rf,r$=[TP("button"),dm,np("align","end",["start","end"]),Mx,bh,Y5("buttonType",["primary","secondary"]),Li("context","mode:design")],sX=[...r$,lv],LI=[tp("type",["submit","cancel","custom"]),...sX],oX=[tp("type",["menu"]),cv,j8,dm,Bu("items",spe),...r$],rpe=[...r$,tp("type",["togglebutton"]),j8,dm,cv,la("active",!1)],i$=dl("type",{submit:LI,cancel:LI,custom:LI,menu:oX,togglebutton:rpe}),q7=[Ga,lv,tp("level",["info","warn","error","success"]),Dx,mt("url","")],a$=Ns(q7),PI=o=>[Ga,o],O3=[Ga,lv,bh,TP("button"),dm,Voe,Y5("buttonType",["primary","secondary","toolbar"]),Mx,Li("context","mode:design")],MI=Ns(O3),hS=[Ga,CP],Ch=hS.concat([EP]),rX=hS.concat([wP,bh,Li("context","mode:design")]),iX=Ns(rX),ipe=rf,ape=Ch.concat([ej("auto"),Li("context","mode:design")]),lpe=Ns(ape),aX=G5([I_,lv,Dx]),lX=Ch.concat([Li("storageKey","default"),Li("context","mode:design")]),l$=Ns(lX),cpe=Ln,upe=Ns(Ch),dpe=Ln,G7=hS.concat([Li("tag","textarea"),Da("scriptId"),Da("scriptUrl"),Xh("onFocus"),k0("settings",void 0)]),fpe=hS.concat([Li("tag","textarea"),Kl("init")]),ppe=ey(o=>Ki("customeditor.old",bu(fpe),o).orThunk(()=>Ki("customeditor.new",bu(G7),o))),cX=Ln,mpe=Ch.concat([Li("context","mode:design")]),hpe=Ns(mpe),gpe=E0(),c$=o=>[Ga,IC("columns"),o],u$=[Ga,Da("html"),np("presets","presentation",["presentation","document"]),Kr("onInit",z),la("stretched",!1)],vpe=Ns(u$),uX=Ch.concat([la("border",!1),la("sandboxed",!0),la("streamContent",!1),la("transparent",!0)]),bpe=Ns(uX),ype=Ln,dX=Ns(hS.concat([aa("height")])),_pe=Ns([Da("url"),ty("zoom"),ty("cachedWidth"),ty("cachedHeight")]),Spe=Ch.concat([aa("inputMode"),aa("placeholder"),la("maximized",!1),bh,Li("context","mode:design")]),R3=Ns(Spe),fX=Ln,Cpe=o=>[Ga,wP,o,np("align","start",["start","center","end"]),aa("for")],NI=[lv,I_],gS=[lv,Bu("items",Xv("items",()=>K7))],K7=Yv([Ns(NI),Ns(gS)]),pX=Ch.concat([Bu("items",K7),bh,Li("context","mode:design")]),FI=Ns(pX),Hd=Ln,$I=Ch.concat([k9("items",[lv,I_]),pl("size",1),bh,Li("context","mode:design")]),mX=Ns($I),hX=Ln,wpe=Ch.concat([la("constrain",!0),bh,Li("context","mode:design")]),Epe=Ns(wpe),bv=Ns([Da("width"),Da("height")]),E6e=hS.concat([wP,pl("min",0),pl("max",0)]),kpe=Ns(E6e),gX=ng,vS=[Ga,Bu("header",Ln),Bu("cells",Jf(Ln))],BI=Ns(vS),vX=Ch.concat([aa("placeholder"),la("maximized",!1),bh,Li("context","mode:design")]),xpe=Ns(vX),Tpe=Ln,bX=[tp("type",["directory","leaf"]),XW,Da("id"),Ym("menu",tF),aa("customStateIcon"),aa("customStateIconTooltip")],D3=Ns(bX),x6e=bX.concat([Bu("children",Xv("children",()=>sg("type",{directory:yX,leaf:D3})))]),yX=Ns(x6e),Ipe=sg("type",{directory:yX,leaf:D3}),T6e=[Ga,Bu("items",Ipe),Xh("onLeafAction"),Xh("onToggleExpand"),og("defaultExpandedIds",[],Ln),aa("defaultSelectedId")],Ape=Ns(T6e),Ope=Ch.concat([np("filetype","file",["image","media","file"]),bh,aa("picker_text"),Li("context","mode:design")]),Y7=Ns(Ope),Rpe=Ns([I_,xP]),d$=o=>fl("items","items",Xf(),Jf(ey(u=>Ki("Checking item of ".concat(o),VI,u).fold(m=>no.error(Qp(m)),m=>no.value(m))))),VI=Za(()=>sg("type",{alertbanner:a$,bar:Ns(PI(d$("bar"))),button:MI,checkbox:iX,colorinput:l$,colorpicker:upe,dropzone:hpe,grid:Ns(c$(d$("grid"))),iframe:bpe,input:R3,listbox:FI,selectbox:mX,sizeinput:Epe,slider:kpe,textarea:xpe,urlinput:Y7,customeditor:ppe,htmlpanel:vpe,imagepreview:dX,collection:lpe,label:Ns(Cpe(d$("label"))),table:BI,tree:Ape,panel:Lpe})),Dpe=[Ga,mt("classes",[]),Bu("items",VI)],Lpe=Ns(Dpe),s=[TP("tab"),XW,Bu("items",VI)],r=[Ga,k9("tabs",s)],c=Ns(r),p=sX,g=i$,_=Ns([Da("title"),cr("body",sg("type",{panel:Lpe,tabpanel:c})),Li("size","normal"),og("buttons",[],g),mt("initialData",{}),Kr("onAction",z),Kr("onChange",z),Kr("onSubmit",z),Kr("onClose",z),Kr("onCancel",z),Kr("onTabChange",z)]),E=o=>Ki("dialog",_,o),R=Ns([tp("type",["cancel","custom"]),...p]),N=Ns([Da("title"),Da("url"),ty("height"),ty("width"),x9("buttons",R),Kr("onAction",z),Kr("onCancel",z),Kr("onClose",z),Kr("onMessage",z)]),j=o=>Ki("dialog",N,o),ae=o=>h(o)?[o].concat(Ve(Xa(o),ae)):S(o)?Ve(o,ae):[],fe=o=>d(o.type)&&d(o.name),ve={checkbox:ipe,colorinput:cpe,colorpicker:dpe,dropzone:gpe,input:fX,iframe:ype,imagepreview:_pe,selectbox:hX,sizeinput:bv,slider:gX,listbox:Hd,size:bv,textarea:Tpe,urlinput:Rpe,customeditor:cX,collection:aX,togglemenuitem:ope},xe=o=>V.from(ve[o.type]),De=o=>jn(ae(o),fe),Oe=o=>{const u=De(o),m=Ve(u,v=>xe(v).fold(()=>[],C=>[cr(v.name,C)]));return Ns(m)},Ne=o=>{var u;const m=un(E(o)),v=Oe(o),C=(u=o.initialData)!==null&&u!==void 0?u:{};return{internalDialog:m,dataValidator:v,initialData:C}},tt={open:(o,u)=>{const m=Ne(u);return o(m.internalDialog,m.initialData,m.dataValidator)},openUrl:(o,u)=>{const m=un(j(u));return o(m)},redial:o=>Ne(o)};var gt=Object.freeze({__proto__:null,events:(o,u)=>{const m=(v,C)=>{o.updateState.each(x=>{const I=x(v,C);u.set(I)}),o.renderComponents.each(x=>{const I=x(C,u.get());(o.reuseDom?kz:gL)(v,I)})};return ni([Wt(ap(),(v,C)=>{const x=C;if(!x.universal){const I=o.channel;ft(x.channels,I)&&m(v,x.data)}}),$r((v,C)=>{o.initialData.each(x=>{m(v,x)})})])}}),Jt=Object.freeze({__proto__:null,getState:(o,u,m)=>m}),vn=[Zt("channel"),ur("renderComponents"),ur("updateState"),ur("initialData"),la("reuseDom",!0)],Ut=Object.freeze({__proto__:null,init:()=>{const o=ds(V.none()),u=()=>o.set(V.none());return{readState:()=>o.get().getOr("none"),get:o.get,set:o.set,clear:u}}});const Et=Sa({fields:vn,name:"reflecting",active:gt,apis:Jt,state:Ut}),Qt=o=>{const u=[],m={};return Qs(o,(v,C)=>{v.fold(()=>{u.push(C)},x=>{m[C]=x})}),u.length>0?no.error(u):no.value(m)},Bn=(o,u,m,v)=>{const C=or(W_.sketch(x=>({dom:{tag:"div",classes:["tox-form"].concat(o.classes)},components:ct(o.items,I=>Ep(x,I,u,m,v))})));return{dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[C.asSpec()]}],behaviours:cn([fs.config({mode:"acyclic",useTabstopAt:he(S3)}),wp.memento(C),sN(C,{postprocess:x=>Qt(x).fold(I=>(console.error(I),{}),ce)}),zs("dialog-body-panel",[Wt(ip(),(x,I)=>{x.getSystem().broadcastOn([_7],{newFocus:V.some(I.event.target)})})])])}},hs=(o,u)=>({uid:o.uid,dom:o.dom,components:o.components,events:S_(o.action),behaviours:Ca(o.tabButtonBehaviours,[As.config({}),fs.config({mode:"execution",useSpace:!0,useEnter:!0}),Dn.config({store:{mode:"memory",initialValue:o.value}})]),domModification:o.domModification}),mo=Gu({name:"TabButton",configFields:[mt("uid",void 0),Zt("value"),fl("dom","dom",G(()=>({attributes:{role:"tab",id:Pn("aria"),"aria-selected":"false"}})),Qf()),ur("action"),mt("domModification",{}),Ll("tabButtonBehaviours",[As,fs,Dn]),Zt("view")],factory:hs}),bo=J([Zt("tabs"),Zt("dom"),mt("clickToDismiss",!1),Ll("tabbarBehaviours",[Re,fs]),sm(["tabClass","selectedClass"])]),dr=sv({factory:mo,name:"tabs",unit:"tab",overrides:o=>{const u=(v,C)=>{Re.dehighlight(v,C),ps(v,ly(),{tabbar:v,button:C})},m=(v,C)=>{Re.highlight(v,C),ps(v,lg(),{tabbar:v,button:C})};return{action:v=>{const C=v.getSystem().getByUid(o.uid).getOrDie(),x=Re.isHighlighted(C,v);(x&&o.clickToDismiss?u:x?z:m)(C,v)},domModification:{classes:[o.markers.tabClass]}}}}),Vr=J([dr]),Na=(o,u,m,v)=>({uid:o.uid,dom:o.dom,components:u,"debug.sketcher":"Tabbar",domModification:{attributes:{role:"tablist"}},behaviours:Ca(o.tabbarBehaviours,[Re.config({highlightClass:o.markers.selectedClass,itemClass:o.markers.tabClass,onHighlight:(C,x)=>{jt(x.element,"aria-selected","true")},onDehighlight:(C,x)=>{jt(x.element,"aria-selected","false")}}),fs.config({mode:"flow",getInitial:C=>Re.getHighlighted(C).map(x=>x.element),selector:"."+o.markers.tabClass,executeOnMove:!0})])}),Fl=$c({name:"Tabbar",configFields:bo(),partFields:Vr(),factory:Na}),sc=(o,u)=>({uid:o.uid,dom:o.dom,behaviours:Ca(o.tabviewBehaviours,[Bs.config({})]),domModification:{attributes:{role:"tabpanel"}}}),Tn=Gu({name:"Tabview",configFields:[Ll("tabviewBehaviours",[Bs])],factory:sc}),gs=J([mt("selectFirst",!0),Ho("onChangeTab"),Ho("onDismissTab"),mt("tabs",[]),Ll("tabSectionBehaviours",[])]),rr=Sc({factory:Fl,schema:[Zt("dom"),Km("markers",[Zt("tabClass"),Zt("selectedClass")])],name:"tabbar",defaults:o=>({tabs:o.tabs})}),Un=Sc({factory:Tn,name:"tabview"}),nn=J([rr,Un]),Nn=(o,u,m,v)=>{const C=I=>{const F=Dn.getValue(I);Yr(I,o,"tabview").each(U=>{Qe(o.tabs,oe=>oe.value===F).each(oe=>{const me=oe.view();Us(I.element,"id").each(Se=>{jt(U.element,"aria-labelledby",Se)}),Bs.set(U,me),o.onChangeTab(U,I,me)})})},x=(I,F)=>{Yr(I,o,"tabbar").each(U=>{F(U).each(_u)})};return{uid:o.uid,dom:o.dom,components:u,behaviours:s_(o.tabSectionBehaviours),events:ni(Nt([o.selectFirst?[$r((I,F)=>{x(I,Re.getFirst)})]:[],[Wt(lg(),(I,F)=>{const U=F.event.button;C(U)}),Wt(ly(),(I,F)=>{const U=F.event.button;o.onDismissTab(I,U)})]])),apis:{getViewItems:I=>Yr(I,o,"tabview").map(F=>Bs.contents(F)).getOr([]),showTab:(I,F)=>{x(I,X=>{const oe=Re.getCandidates(X);return Qe(oe,Se=>Dn.getValue(Se)===F).filter(Se=>!Re.isHighlighted(X,Se))})}}}},Os=$c({name:"TabSection",configFields:gs(),partFields:nn(),factory:Nn,apis:{getViewItems:(o,u)=>o.getViewItems(u),showTab:(o,u,m)=>{o.showTab(u,m)}}}),Zr=(o,u,m)=>ct(o,(v,C)=>{Bs.set(m,o[C].view());const x=u.dom.getBoundingClientRect();return Bs.set(m,[]),x.height}),Oo=o=>Vt(Ze(o,(u,m)=>u>m?-1:u<m?1:0)),Vc=(o,u,m)=>{const v=lr(o).dom,C=ih(o,".tox-dialog-wrap").getOr(o),x=Gt(C,"position")==="fixed";let I;x?I=Math.max(v.clientHeight,window.innerHeight):I=Math.max(v.offsetHeight,v.scrollHeight);const F=Wi(u),X=u.dom.offsetLeft>=m.dom.offsetLeft+oo(m)?Math.max(Wi(m),F):F,oe=parseInt(Gt(o,"margin-top"),10)||0,me=parseInt(Gt(o,"margin-bottom"),10)||0,Ie=Wi(o)+oe+me-X;return I-Ie},_m=(o,u)=>{Vt(o).each(m=>Os.showTab(u,m.value))},x1=(o,u)=>{wn(o,"height",u+"px"),wn(o,"flex-basis",u+"px")},ru=(o,u,m)=>{ih(o,'[role="dialog"]').each(v=>{sr(v,'[role="tablist"]').each(C=>{m.get().map(x=>(wn(u,"height","0"),wn(u,"flex-basis","0"),Math.min(x,Vc(v,u,C)))).each(x=>{x1(u,x)})})})},Tp=o=>sr(o,'[role="tabpanel"]'),Ip=o=>{const u=vr();return{extraEvents:[$r(C=>{const x=C.element;Tp(x).each(I=>{wn(I,"visibility","hidden"),C.getSystem().getByDom(I).toOptional().each(F=>{const U=Zr(o,I,F);Oo(U).fold(u.clear,u.set)}),ru(x,I,u),fo(I,"visibility"),_m(o,C),requestAnimationFrame(()=>{ru(x,I,u)})})}),Wt(t2(),C=>{const x=C.element;Tp(x).each(I=>{ru(x,I,u)})}),Wt(SZ,(C,x)=>{const I=C.element;Tp(I).each(F=>{const U=ff(za(F));wn(F,"visibility","hidden");const X=Er(F,"height").map(Se=>parseInt(Se,10));fo(F,"height"),fo(F,"flex-basis");const oe=F.dom.getBoundingClientRect().height;X.forall(Se=>oe>Se)?(u.set(oe),ru(I,F,u)):X.each(Se=>{x1(F,Se)}),fo(F,"visibility"),U.each(eu)})})],selectFirst:!1}},Tu="send-data-to-section",Xu="send-data-to-view",Sm=(o,u,m,v)=>{const C=ds({}),x=oe=>{const me=Dn.getValue(oe),Se=Qt(me).getOr({}),Ie=C.get(),Pe=Gi(Ie,Se);C.set(Pe)},I=oe=>{const me=C.get();Dn.setValue(oe,me)},F=ds(null),U=ct(o.tabs,oe=>({value:oe.name,dom:{tag:"div",classes:["tox-dialog__body-nav-item"]},components:[Ci(m.shared.providers.translate(oe.title))],view:()=>[W_.sketch(me=>({dom:{tag:"div",classes:["tox-form"]},components:ct(oe.items,Se=>Ep(me,Se,u,m,v)),formBehaviours:cn([fs.config({mode:"acyclic",useTabstopAt:he(S3)}),zs("TabView.form.events",[$r(I),nh(x)]),ju.config({channels:ny([{key:Tu,value:{onReceive:x}},{key:Xu,value:{onReceive:I}}])})])}))]})),X=Ip(U);return Os.sketch({dom:{tag:"div",classes:["tox-dialog__body"]},onChangeTab:(oe,me,Se)=>{const Ie=Dn.getValue(me);ps(oe,EM,{name:Ie,oldName:F.get()}),F.set(Ie)},tabs:U,components:[Os.parts.tabbar({dom:{tag:"div",classes:["tox-dialog__body-nav"]},components:[Fl.parts.tabs({})],markers:{tabClass:"tox-tab",selectedClass:"tox-dialog__body-nav-item--active"},tabbarBehaviours:cn([si.config({})])}),Os.parts.tabview({dom:{tag:"div",classes:["tox-dialog__body-content"]}})],selectFirst:X.selectFirst,tabSectionBehaviours:cn([zs("tabpanel",X.extraEvents),fs.config({mode:"acyclic"}),Lo.config({find:oe=>Vt(Os.getViewItems(oe))}),ab(V.none(),oe=>(oe.getSystem().broadcastOn([Tu],{}),C.get()),(oe,me)=>{C.set(me),oe.getSystem().broadcastOn([Xu],{})})])})},yv=(o,u,m,v,C,x)=>{const I=X=>{const oe=X.body;switch(oe.type){case"tabpanel":return[Sm(oe,X.initialData,v,x)];default:return[Bn(oe,X.initialData,v,x)]}},F=(X,oe)=>V.some({isTabPanel:()=>oe.body.type==="tabpanel"}),U={"aria-live":"polite"};return{dom:{tag:"div",classes:["tox-dialog__content-js"],attributes:{...m.map(X=>({id:X})).getOr({}),...C?U:{}}},components:[],behaviours:cn([wp.childAt(0),Et.config({channel:"".concat(mq,"-").concat(u),updateState:F,renderComponents:I,initialData:o})])}},ys=(o,u,m,v,C,x)=>yv(o,u,V.some(m),v,C,x),zo=(o,u,m,v)=>{const C=yv(o,u,V.none(),m,!1,v);return Nl.parts.body(C)},Ea=o=>{const u={dom:{tag:"div",classes:["tox-dialog__content-js"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-iframe"]},components:[uN(V.none(),{dom:{tag:"iframe",attributes:{src:o.url}},behaviours:cn([si.config({}),As.config({})])})]}],behaviours:cn([fs.config({mode:"acyclic",useTabstopAt:he(S3)})])};return Nl.parts.body(u)},$l=Z2.deviceType.isTouch(),Bl=(o,u)=>({dom:{tag:"div",styles:{display:"none"},classes:["tox-dialog__header"]},components:[o,u]}),rl=(o,u)=>Nl.parts.close(_l.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":u.translate("Close")}},action:o,buttonBehaviours:cn([si.config({})])})),Xi=()=>Nl.parts.title({dom:{tag:"div",classes:["tox-dialog__title"],innerHtml:"",styles:{display:"none"}}}),Ji=(o,u)=>Nl.parts.body({dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[{dom:b1("<p>".concat(EW(u.translate(o)),"</p>"))}]}]}),Ju=o=>Nl.parts.footer({dom:{tag:"div",classes:["tox-dialog__footer"]},components:o}),Cm=(o,u)=>[bd.sketch({dom:{tag:"div",classes:["tox-dialog__footer-start"]},components:o}),bd.sketch({dom:{tag:"div",classes:["tox-dialog__footer-end"]},components:u})],wh=o=>{const u="tox-dialog",m=u+"-wrap",v=m+"__backdrop",C=u+"__disable-scroll";return Nl.sketch({lazySink:o.lazySink,onEscape:x=>(o.onEscape(x),V.some(!0)),useTabstopAt:x=>!S3(x),firstTabstop:o.firstTabstop,dom:{tag:"div",classes:[u].concat(o.extraClasses),styles:{position:"relative",...o.extraStyles}},components:[o.header,o.body,...o.footer.toArray()],parts:{blocker:{dom:b1('<div class="'.concat(m,'"></div>')),components:[{dom:{tag:"div",classes:$l?[v,v+"--opaque"]:[v]}}]}},dragBlockClass:m,modalBehaviours:cn([As.config({}),zs("dialog-events",o.dialogEvents.concat([th(ip(),(x,I)=>{ym.isBlocked(x)?z():fs.focusIn(x)}),Wt(ay(),(x,I)=>{x.getSystem().broadcastOn([_7],{newFocus:I.event.newFocus})})])),zs("scroll-lock",[$r(()=>{sa(rt(),C)}),nh(()=>{ua(rt(),C)})]),...o.extraBehaviours]),eventOrder:{[Mc()]:["dialog-events"],[lp()]:["scroll-lock","dialog-events","alloy.base.behaviour"],[cp()]:["alloy.base.behaviour","dialog-events","scroll-lock"],...o.eventOrder}})},Eh=o=>_l.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":o.translate("Close"),"data-mce-name":"close"}},buttonBehaviours:cn([si.config({}),Yi.config(o.tooltips.getConfig({tooltipText:o.translate("Close")}))]),components:[_p("close",{tag:"span",classes:["tox-icon"]},o.icons)],action:u=>{vo(u,nb)}}),L3=(o,u,m,v)=>{const C=x=>[Ci(v.translate(x.title))];return{dom:{tag:"h1",classes:["tox-dialog__title"],attributes:{...m.map(x=>({id:x})).getOr({})}},components:[],behaviours:cn([Et.config({channel:"".concat(dN,"-").concat(u),initialData:o,renderComponents:C})])}},P3=()=>({dom:b1('<div class="tox-dialog__draghandle"></div>')}),M3=(o,u,m,v)=>bd.sketch({dom:b1('<div class="tox-dialog__header"></div>'),components:[L3(o,u,V.some(m),v),P3(),Eh(v)],containerBehaviours:cn([A3.config({mode:"mouse",blockerClass:"blocker",getTarget:C=>fp(C,'[role="dialog"]').getOrDie(),snaps:{getSnapPoints:()=>[],leftAttr:"data-drag-left",topAttr:"data-drag-top"}})])}),kh=(o,u,m)=>{const v=Nl.parts.title(L3(o,u,V.none(),m)),C=Nl.parts.draghandle(P3()),x=Nl.parts.close(Eh(m)),I=[v].concat(o.draggable?[C]:[]).concat([x]);return bd.sketch({dom:b1('<div class="tox-dialog__header"></div>'),components:I})},_v=(o,u,m)=>kh({title:m.shared.providers.translate(o),draggable:m.dialog.isDraggableModal()},u,m.shared.providers),bS=(o,u,m,v)=>({dom:{tag:"div",classes:["tox-dialog__busy-spinner"],attributes:{"aria-label":m.translate(o)},styles:{left:"0px",right:"0px",bottom:"0px",top:"".concat(v.getOr(0),"px"),position:"absolute"}},behaviours:u,components:[{dom:b1('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]}),N3=(o,u,m)=>({onClose:()=>m.closeWindow(),onBlock:v=>{const C=sr(o().element,".tox-dialog__header").map(x=>Wi(x));Nl.setBusy(o(),(x,I)=>bS(v.message,I,u,C))},onUnblock:()=>{Nl.setIdle(o())}}),f$="tox-dialog--fullscreen",F3="tox-dialog--width-lg",$3="tox-dialog--width-md",X7=o=>{switch(o){case"large":return V.some(F3);case"medium":return V.some($3);default:return V.none()}},B3=(o,u)=>{const m=Xt.fromDom(u.element.dom);Nc(m,f$)||(cf(m,[F3,$3]),X7(o).each(v=>sa(m,v)))},Sv=(o,u)=>{const m=Xt.fromDom(o.element.dom),v=LR(m),C=Qe(v,x=>x===F3||x===$3).or(X7(u));a1(m,[f$,...C.toArray()])},J7=(o,u,m)=>Fc(wh({...o,firstTabstop:1,lazySink:m.shared.getSink,extraBehaviours:[y7({}),...o.extraBehaviours],onEscape:v=>{vo(v,nb)},dialogEvents:u,eventOrder:{[ap()]:[Et.name(),ju.name()],[lp()]:["scroll-lock",Et.name(),"messages","dialog-events","alloy.base.behaviour"],[cp()]:["alloy.base.behaviour","dialog-events","messages",Et.name(),"scroll-lock"]}})),Ct=(o,u={})=>{const m=v=>{const C=ct(v.items,x=>{const I=bn(u,x.name).getOr(ds(!1));return{...x,storage:I}});return{...v,items:C}};return ct(o,v=>v.type==="menu"?m(v):v)},Rt=o=>Xs(o,(u,m)=>m.type==="menu"?Xs(m.items,(C,x)=>(C[x.name]=x.storage,C),u):u,{}),xn=(o,u)=>[cy(ip(),Nae),o(a7,(m,v,C,x)=>{gl(x.element)&&ff(za(x.element)).each(lh),u.onClose(),v.onClose()}),o(nb,(m,v,C,x)=>{v.onCancel(m),vo(x,a7)}),Wt(wM,(m,v)=>u.onUnblock()),Wt(CM,(m,v)=>u.onBlock(v.event))],yn=(o,u)=>{const m=(C,x)=>Wt(C,(I,F)=>{v(I,(U,X)=>{x(o(),U,F.event,I)})}),v=(C,x)=>{Et.getState(C).get().each(I=>{x(I,C)})};return[...xn(m,u),m(w1,(C,x,I)=>{x.onAction(C,{name:I.name})})]},Ts=(o,u,m)=>{const v=(x,I)=>Wt(x,(F,U)=>{C(F,(X,oe)=>{I(o(),X,U.event,F)})}),C=(x,I)=>{Et.getState(x).get().each(F=>{I(F.internalDialog,x)})};return[...xn(v,u),v(l7,(x,I)=>I.onSubmit(x)),v(Yu,(x,I,F)=>{I.onChange(x,{name:F.name})}),v(w1,(x,I,F,U)=>{const X=()=>U.getSystem().isConnected()?fs.focusIn(U):void 0,oe=Ie=>be(Ie,"disabled")||Us(Ie,"aria-disabled").exists(Pe=>Pe==="true"),me=za(U.element),Se=ff(me);I.onAction(x,{name:F.name,value:F.value}),ff(me).fold(X,Ie=>{oe(Ie)||Se.exists(Pe=>uo(Ie,Pe)&&oe(Pe))?X():m().toOptional().filter(Pe=>!uo(Pe.element,Ie)).each(X)})}),v(EM,(x,I,F)=>{I.onTabChange(x,{newTabName:F.name,oldTabName:F.oldName})}),nh(x=>{const I=o();Dn.setValue(x,I.getData())})]},Xo=(o,u)=>x7(o,o.type,u),ka=(o,u,m)=>Qe(u,v=>v.name===m).bind(v=>v.memento.getOpt(o)),T1=(o,u)=>{const m=u.map(F=>F.footerButtons).getOr([]),v=lo(m,F=>F.align==="start"),C=(F,U)=>bd.sketch({dom:{tag:"div",classes:["tox-dialog__footer-".concat(F)]},components:ct(U,X=>X.memento.asSpec())}),x=C("start",v.pass),I=C("end",v.fail);return[x,I]},wm=(o,u,m)=>{const v=(C,x)=>{const I=ct(x.buttons,U=>{const X=or(Xo(U,m));return{name:U.name,align:U.align,memento:X}}),F=U=>ka(C,I,U);return V.some({lookupByName:F,footerButtons:I})};return{dom:b1('<div class="tox-dialog__footer"></div>'),components:[],behaviours:cn([Et.config({channel:"".concat(hq,"-").concat(u),initialData:o,updateState:v,renderComponents:T1})])}},Q7=(o,u,m)=>wm(o,u,m),p$=(o,u,m)=>Nl.parts.footer(wm(o,u,m)),ew=(o,u)=>{if(o.getRoot().getSystem().isConnected()){const v=Lo.getCurrent(o.getFormWrapper()).getOr(o.getFormWrapper());return W_.getField(v,u).orThunk(()=>o.getFooter().bind(I=>Et.getState(I).get()).bind(I=>I.lookupByName(u)))}else return V.none()},m$=(o,u)=>{const m=o.getRoot();return Et.getState(m).get().map(v=>un(Ki("data",v.dataValidator,u))).getOr(u)},h$=(o,u,m)=>{const v=Pe=>{const Me=o.getRoot();Me.getSystem().isConnected()&&Pe(Me)},Ie={getData:()=>{const Pe=o.getRoot(),Me=Pe.getSystem().isConnected()?o.getFormWrapper():Pe,at=Dn.getValue(Me),qe=Rs(m,dt=>dt.get());return{...at,...qe}},setData:Pe=>{v(Me=>{const at=Ie.getData(),qe=Gi(at,Pe),dt=m$(o,qe),it=o.getFormWrapper();Dn.setValue(it,dt),Qs(m,(It,Mt)=>{qs(qe,Mt)&&It.set(qe[Mt])})})},setEnabled:(Pe,Me)=>{ew(o,Pe).each(Me?Xn.enable:Xn.disable)},focus:Pe=>{ew(o,Pe).each(As.focus)},block:Pe=>{if(!d(Pe))throw new Error("The dialogInstanceAPI.block function should be passed a blocking message of type string as an argument");v(Me=>{ps(Me,CM,{message:Pe})})},unblock:()=>{v(Pe=>{vo(Pe,wM)})},showTab:Pe=>{v(Me=>{const at=o.getBody();Et.getState(at).get().exists(dt=>dt.isTabPanel())&&Lo.getCurrent(at).each(dt=>{Os.showTab(dt,Pe)})})},redial:Pe=>{v(Me=>{const at=o.getId(),qe=u(Pe),dt=Ct(qe.internalDialog.buttons,m);Me.getSystem().broadcastOn(["".concat(bT,"-").concat(at)],qe),Me.getSystem().broadcastOn(["".concat(dN,"-").concat(at)],qe.internalDialog),Me.getSystem().broadcastOn(["".concat(mq,"-").concat(at)],qe.internalDialog),Me.getSystem().broadcastOn(["".concat(hq,"-").concat(at)],{...qe.internalDialog,buttons:dt}),Ie.setData(qe.initialData)})},close:()=>{v(Pe=>{vo(Pe,a7)})},toggleFullscreen:o.toggleFullscreen};return Ie},Cv=(o,u,m)=>{const v=Pn("dialog"),C=o.internalDialog,x=_v(C.title,v,m),I=ds(C.size),F=it=>ew(qe,it),U=X7(I.get()).toArray(),X=(it,It)=>(I.set(It.internalDialog.size),B3(It.internalDialog.size,it),V.some(It)),oe=zo({body:C.body,initialData:C.initialData},v,m,F),me=Ct(C.buttons),Se=Rt(me),Ie=Kt(me.length!==0,p$({buttons:me},v,m)),Pe=Ts(()=>dt,N3(()=>at,m.shared.providers,u),m.shared.getSink),Me={id:v,header:x,body:oe,footer:Ie,extraClasses:U,extraBehaviours:[Et.config({channel:"".concat(bT,"-").concat(v),updateState:X,initialData:o})],extraStyles:{}},at=J7(Me,Pe,m),qe=(()=>{const it=()=>{const Mt=Nl.getBody(at);return Lo.getCurrent(Mt).getOr(Mt)},It=()=>{Sv(at,I.get())};return{getId:J(v),getRoot:J(at),getBody:()=>Nl.getBody(at),getFooter:()=>Nl.getFooter(at),getFormWrapper:it,toggleFullscreen:It}})(),dt=h$(qe,u.redial,Se);return{dialog:at,instanceApi:dt}},g$=(o,u,m,v=!1,C)=>{const x=Pn("dialog"),I=Pn("dialog-label"),F=Pn("dialog-content"),U=o.internalDialog,X=Mn=>ew(In,Mn),oe=ds(U.size),me=X7(oe.get()).toArray(),Se=(Mn,En)=>(oe.set(En.internalDialog.size),B3(En.internalDialog.size,Mn),C(),V.some(En)),Ie=or(M3({title:U.title,draggable:!0},x,I,m.shared.providers)),Pe=or(ys({body:U.body,initialData:U.initialData},x,F,m,v,X)),Me=Ct(U.buttons),at=Rt(Me),qe=Kt(Me.length!==0,or(Q7({buttons:Me},x,m))),dt=Ts(()=>Ft,{onBlock:Mn=>{ym.block(Mt,(En,zn)=>{const go=Ie.getOpt(Mt).map(fi=>Wi(fi.element));return bS(Mn.message,zn,m.shared.providers,go)})},onUnblock:()=>{ym.unblock(Mt)},onClose:()=>u.closeWindow()},m.shared.getSink),it="tox-dialog-inline",It=Zi().os,Mt=Fc({dom:{tag:"div",classes:["tox-dialog",it,...me],attributes:{role:"dialog",...It.isMacOS()?{"aria-label":U.title}:{"aria-labelledby":I}}},eventOrder:{[ap()]:[Et.name(),ju.name()],[Mc()]:["execute-on-form"],[lp()]:["reflecting","execute-on-form"]},behaviours:cn([fs.config({mode:"cyclic",onEscape:Mn=>(vo(Mn,a7),V.some(!0)),useTabstopAt:Mn=>!S3(Mn)&&(tr(Mn)!=="button"||eo(Mn,"disabled")!=="disabled"),firstTabstop:1}),Et.config({channel:"".concat(bT,"-").concat(x),updateState:Se,initialData:o}),As.config({}),zs("execute-on-form",dt.concat([th(ip(),(Mn,En)=>{fs.focusIn(Mn)}),Wt(ay(),(Mn,En)=>{Mn.getSystem().broadcastOn([_7],{newFocus:En.event.newFocus})})])),ym.config({getRoot:()=>V.some(Mt)}),Bs.config({}),y7({})]),components:[Ie.asSpec(),Pe.asSpec(),...qe.map(Mn=>Mn.asSpec()).toArray()]}),en=()=>{Sv(Mt,oe.get())},In={getId:J(x),getRoot:J(Mt),getFooter:()=>qe.map(Mn=>Mn.get(Mt)),getBody:()=>Pe.get(Mt),getFormWrapper:()=>{const Mn=Pe.get(Mt);return Lo.getCurrent(Mn).getOr(Mn)},toggleFullscreen:en},Ft=h$(In,u.redial,at);return{dialog:Mt,instanceApi:Ft}};var HI=tinymce.util.Tools.resolve("tinymce.util.URI");const _X=o=>{const u=I=>{o.getSystem().isConnected()&&I(o)};return{block:I=>{if(!d(I))throw new Error("The urlDialogInstanceAPI.block function should be passed a blocking message of type string as an argument");u(F=>{ps(F,CM,{message:I})})},unblock:()=>{u(I=>{vo(I,wM)})},close:()=>{u(I=>{vo(I,a7)})},sendMessage:I=>{u(F=>{F.getSystem().broadcastOn([gq],I)})}}},SX=["insertContent","setContent","execCommand","close","block","unblock"],CX=o=>h(o)&&SX.indexOf(o.mceAction)!==-1,Ro=o=>!CX(o)&&h(o)&&qs(o,"mceAction"),Lt=(o,u,m)=>{switch(m.mceAction){case"insertContent":o.insertContent(m.content);break;case"setContent":o.setContent(m.content);break;case"execCommand":const v=T(m.ui)?m.ui:!1;o.execCommand(m.cmd,v,m.value);break;case"close":u.close();break;case"block":u.block(m.message);break;case"unblock":u.unblock();break}},vs=(o,u,m,v)=>{const C=Pn("dialog"),x=_v(o.title,C,v),I=Ea(o),F=o.buttons.bind(it=>it.length===0?V.none():V.some(p$({buttons:it},C,v))),U=yn(()=>dt,N3(()=>qe,v.shared.providers,u)),X={...o.height.fold(()=>({}),it=>({height:it+"px","max-height":it+"px"})),...o.width.fold(()=>({}),it=>({width:it+"px","max-width":it+"px"}))},oe=o.width.isNone()&&o.height.isNone()?["tox-dialog--width-lg"]:[],me=new HI(o.url,{base_uri:new HI(window.location.href)}),Se="".concat(me.protocol,"://").concat(me.host).concat(me.port?":"+me.port:""),Ie=$u(),Pe=(it,It)=>V.some(It),Me=[Et.config({channel:"".concat(bT,"-").concat(C),updateState:Pe,initialData:o}),zs("messages",[$r(()=>{const it=wu(Xt.fromDom(window),"message",It=>{if(me.isSameOrigin(new HI(It.raw.origin))){const Mt=It.raw.data;CX(Mt)?Lt(m,dt,Mt):Ro(Mt)&&o.onMessage(dt,Mt)}});Ie.set(it)}),nh(Ie.clear)]),ju.config({channels:{[gq]:{onReceive:(it,It)=>{sr(it.element,"iframe").each(Mt=>{const en=Mt.dom.contentWindow;B(en)&&en.postMessage(It,Se)})}}}})],qe=J7({id:C,header:x,body:I,footer:F,extraClasses:oe,extraBehaviours:Me,extraStyles:X},U,v),dt=_X(qe);return{dialog:qe,instanceApi:dt}},ho=o=>{const u=o.shared;return{open:(v,C)=>{const x=()=>{Nl.hide(X),C()},I=or(x7({context:"any",name:"close-alert",text:"OK",primary:!0,buttonType:V.some("primary"),align:"end",enabled:!0,icon:V.none()},"cancel",o)),F=Xi(),U=rl(x,u.providers),X=Fc(wh({lazySink:()=>u.getSink(),header:Bl(F,U),body:Ji(v,u.providers),footer:V.some(Ju(Cm([],[I.asSpec()]))),onEscape:x,extraClasses:["tox-alert-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Wt(nb,x)],eventOrder:{}}));Nl.show(X);const oe=I.get(X);As.focus(oe)}}},Vl=o=>{const u=o.shared;return{open:(v,C)=>{const x=Se=>{Nl.hide(oe),C(Se)},I=or(x7({context:"any",name:"yes",text:"Yes",primary:!0,buttonType:V.some("primary"),align:"end",enabled:!0,icon:V.none()},"submit",o)),F=x7({context:"any",name:"no",text:"No",primary:!1,buttonType:V.some("secondary"),align:"end",enabled:!0,icon:V.none()},"cancel",o),U=Xi(),X=rl(()=>x(!1),u.providers),oe=Fc(wh({lazySink:()=>u.getSink(),header:Bl(U,X),body:Ji(v,u.providers),footer:V.some(Ju(Cm([],[F,I.asSpec()]))),onEscape:()=>x(!1),extraClasses:["tox-confirm-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Wt(nb,()=>x(!1)),Wt(l7,()=>x(!0))],eventOrder:{}}));Nl.show(oe);const me=I.get(oe);As.focus(me)}}},Sd=(o,u)=>un(Ki("data",u,o)),Iu=o=>Lg(o,".tox-alert-dialog")||Lg(o,".tox-confirm-dialog"),Ap=(o,u,m)=>u&&m?[]:[bi.config({contextual:{lazyContext:()=>V.some(tl(Xt.fromDom(o.getContentAreaContainer()))),fadeInClass:"tox-dialog-dock-fadein",fadeOutClass:"tox-dialog-dock-fadeout",transitionClass:"tox-dialog-dock-transition"},modes:["top"],lazyViewport:v=>K2(o,v.element).map(x=>({bounds:Y2(x),optScrollEnv:V.some({currentScrollTop:x.element.dom.scrollTop,scrollElmTop:hc(x.element).top})})).getOrThunk(()=>({bounds:ul(),optScrollEnv:V.none()}))})],zg=o=>{const u=o.editor,m=G2(u),v=ho(o.backstages.dialog),C=Vl(o.backstages.dialog),x=(Pe,Me,at)=>{if(!O(Me)){if(Me.inline==="toolbar")return X(Pe,o.backstages.popup.shared.anchors.inlineDialog(),at,Me);if(Me.inline==="bottom")return oe(Pe,o.backstages.popup.shared.anchors.inlineBottomDialog(),at,Me);if(Me.inline==="cursor")return X(Pe,o.backstages.popup.shared.anchors.cursor(),at,Me)}return U(Pe,at)},I=(Pe,Me)=>F(Pe,Me),F=(Pe,Me)=>{const at=qe=>{const dt=vs(qe,{closeWindow:()=>{Nl.hide(dt.dialog),Me(dt.instanceApi)}},u,o.backstages.dialog);return Nl.show(dt.dialog),dt.instanceApi};return tt.openUrl(at,Pe)},U=(Pe,Me)=>{const at=(qe,dt,it)=>{const It=dt,en=Cv({dataValidator:it,initialData:It,internalDialog:qe},{redial:tt.redial,closeWindow:()=>{Nl.hide(en.dialog),Me(en.instanceApi)}},o.backstages.dialog);return Nl.show(en.dialog),en.instanceApi.setData(It),en.instanceApi};return tt.open(at,Pe)},X=(Pe,Me,at,qe)=>{const dt=(it,It,Mt)=>{const en=Sd(It,Mt),In=vr(),Ft=o.backstages.popup.shared.header.isPositionedAtTop(),Mn={dataValidator:Mt,initialData:en,internalDialog:it},En=()=>In.on(Jo=>{Ni.reposition(Jo),(!m||!Ft)&&bi.refresh(Jo)}),zn=g$(Mn,{redial:tt.redial,closeWindow:()=>{In.on(Ni.hide),u.off("ResizeEditor",En),In.clear(),at(zn.instanceApi)}},o.backstages.popup,qe.ariaAttrs,En),go=Fc(Ni.sketch({lazySink:o.backstages.popup.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:qe.persistent?{event:"doNotDismissYet"}:{},...Ft?{}:{fireRepositionEventInstead:{}},inlineBehaviours:cn([zs("window-manager-inline-events",[Wt(ag(),(Jo,rs)=>{vo(zn.dialog,nb)})]),...Ap(u,m,Ft)]),isExtraPart:(Jo,rs)=>Iu(rs)}));In.set(go);const fi=()=>{const Jo=u.inline?rt():Xt.fromDom(u.getContainer()),rs=tl(Jo);return V.some(rs)};return Ni.showWithinBounds(go,md(zn.dialog),{anchor:Me},fi),(!m||!Ft)&&(bi.refresh(go),u.on("ResizeEditor",En)),zn.instanceApi.setData(en),fs.focusIn(zn.dialog),zn.instanceApi};return tt.open(dt,Pe)},oe=(Pe,Me,at,qe)=>{const dt=(it,It,Mt)=>{const en=Sd(It,Mt),In=vr(),Ft=o.backstages.popup.shared.header.isPositionedAtTop(),Mn={dataValidator:Mt,initialData:en,internalDialog:it},En=()=>In.on(Jo=>{Ni.reposition(Jo),bi.refresh(Jo)}),zn=g$(Mn,{redial:tt.redial,closeWindow:()=>{In.on(Ni.hide),u.off("ResizeEditor ScrollWindow ElementScroll",En),In.clear(),at(zn.instanceApi)}},o.backstages.popup,qe.ariaAttrs,En),go=Fc(Ni.sketch({lazySink:o.backstages.popup.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:qe.persistent?{event:"doNotDismissYet"}:{},...Ft?{}:{fireRepositionEventInstead:{}},inlineBehaviours:cn([zs("window-manager-inline-events",[Wt(ag(),(Jo,rs)=>{vo(zn.dialog,nb)})]),bi.config({contextual:{lazyContext:()=>V.some(tl(Xt.fromDom(u.getContentAreaContainer()))),fadeInClass:"tox-dialog-dock-fadein",fadeOutClass:"tox-dialog-dock-fadeout",transitionClass:"tox-dialog-dock-transition"},modes:["top","bottom"],lazyViewport:Jo=>K2(u,Jo.element).map(ln=>({bounds:Y2(ln),optScrollEnv:V.some({currentScrollTop:ln.element.dom.scrollTop,scrollElmTop:hc(ln.element).top})})).getOrThunk(()=>({bounds:ul(),optScrollEnv:V.none()}))})]),isExtraPart:(Jo,rs)=>Iu(rs)}));In.set(go);const fi=()=>o.backstages.popup.shared.getSink().toOptional().bind(Jo=>{const rs=K2(u,Jo.element),ln=15,On=rs.map(_s=>Y2(_s)).getOr(ul()),Fs=tl(Xt.fromDom(u.getContentAreaContainer())),ao=b0(Fs,On);return V.some(qi(ao.x,ao.y,ao.width,ao.height-ln))});return Ni.showWithinBounds(go,md(zn.dialog),{anchor:Me},fi),bi.refresh(go),u.on("ResizeEditor ScrollWindow ElementScroll ResizeWindow",En),zn.instanceApi.setData(en),fs.focusIn(zn.dialog),zn.instanceApi};return tt.open(dt,Pe)};return{open:x,openUrl:I,alert:(Pe,Me)=>{v.open(Pe,Me)},close:Pe=>{Pe.close()},confirm:(Pe,Me)=>{C.open(Pe,Me)}}},tw=o=>{nx(o),Pre(o),sfe(o)};var Cd=()=>{Yh.add("silver",o=>{tw(o);let u=()=>ul();const{dialogs:m,popups:v,renderUI:C}=Jfe(o,{getPopupSinkBounds:()=>u()}),x=()=>{const X=C();return K2(o,v.getMothership().element).each(me=>{u=()=>Y2(me)}),X};aZ.register(o,v.backstage.shared);const I=zg({editor:o,backstages:{popup:v.backstage,dialog:m.backstage}}),F=vr(),U=()=>Toe(o,{backstage:v.backstage},v.getMothership(),F);return{renderUI:x,getWindowManagerImpl:J(I),getNotificationManagerImpl:U}})};Cd()}()),B3e}var H3e;function rZe(){return H3e||(H3e=1,oZe()),$3e}rZe();var U3e={},z3e={},W3e;function iZe(){return W3e||(W3e=1,function(){var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=(d,h)=>{d.focus(),d.undoManager.transact(()=>{d.setContent(h)}),d.selection.setCursorLocation(),d.nodeChanged()},n=d=>d.getContent({source_view:!0}),i=d=>{const h=n(d);d.windowManager.open({title:"Source Code",size:"large",body:{type:"panel",items:[{type:"textarea",name:"code"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{code:h},onSubmit:b=>{t(d,b.getData().code),b.close()}})},a=d=>{d.addCommand("mceCodeEditor",()=>{i(d)})},l=d=>{const h=()=>d.execCommand("mceCodeEditor");d.ui.registry.addButton("code",{icon:"sourcecode",tooltip:"Source code",onAction:h}),d.ui.registry.addMenuItem("code",{icon:"sourcecode",text:"Source code",onAction:h})};var f=()=>{e.add("code",d=>(a(d),l(d),{}))};f()}()),z3e}var j3e;function aZe(){return j3e||(j3e=1,iZe()),U3e}aZe();var Z3e={},q3e={},G3e;function lZe(){return G3e||(G3e=1,function(){var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=Object.getPrototypeOf,n=(be,ke,Je)=>{var xt;return Je(be,ke.prototype)?!0:((xt=be.constructor)===null||xt===void 0?void 0:xt.name)===ke.name},i=be=>{const ke=typeof be;return be===null?"null":ke==="object"&&Array.isArray(be)?"array":ke==="object"&&n(be,String,(Je,xt)=>xt.isPrototypeOf(Je))?"string":ke},a=be=>ke=>i(ke)===be,l=be=>ke=>typeof ke===be,f=be=>ke=>be===ke,d=(be,ke)=>b(be)&&n(be,ke,(Je,xt)=>t(Je)===xt),h=a("string"),b=a("object"),S=be=>d(be,Object),k=a("array"),T=f(null),O=l("boolean"),P=be=>be==null,B=be=>!P(be),W=l("function"),Z=l("number"),Y=(be,ke)=>{if(k(be)){for(let Je=0,xt=be.length;Je<xt;++Je)if(!ke(be[Je]))return!1;return!0}return!1},z=()=>{};class q{constructor(ke,Je){this.tag=ke,this.value=Je}static some(ke){return new q(!0,ke)}static none(){return q.singletonNone}fold(ke,Je){return this.tag?Je(this.value):ke()}isSome(){return this.tag}isNone(){return!this.tag}map(ke){return this.tag?q.some(ke(this.value)):q.none()}bind(ke){return this.tag?ke(this.value):q.none()}exists(ke){return this.tag&&ke(this.value)}forall(ke){return!this.tag||ke(this.value)}filter(ke){return!this.tag||ke(this.value)?this:q.none()}getOr(ke){return this.tag?this.value:ke}or(ke){return this.tag?this:ke}getOrThunk(ke){return this.tag?this.value:ke()}orThunk(ke){return this.tag?this:ke()}getOrDie(ke){if(this.tag)return this.value;throw new Error(ke!=null?ke:"Called getOrDie on None")}static from(ke){return B(ke)?q.some(ke):q.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(ke){this.tag&&ke(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?"some(".concat(this.value,")"):"none()"}}q.singletonNone=new q(!1);const ne=Object.keys,ue=Object.hasOwnProperty,J=(be,ke)=>{const Je=ne(be);for(let xt=0,es=Je.length;xt<es;xt++){const wn=Je[xt],Vo=be[wn];ke(Vo,wn)}},ce=be=>(ke,Je)=>{be[Je]=ke},ge=(be,ke,Je,xt)=>{J(be,(es,wn)=>{(ke(es,wn)?Je:xt)(es,wn)})},de=(be,ke)=>{const Je={};return ge(be,ke,ce(Je),z),Je},he=(be,ke)=>ue.call(be,ke),ie=(be,ke)=>he(be,ke)&&be[ke]!==void 0&&be[ke]!==null,Be=Array.prototype.push,$e=be=>{const ke=[];for(let Je=0,xt=be.length;Je<xt;++Je){if(!k(be[Je]))throw new Error("Arr.flatten item "+Je+" was not an array, input: "+be);Be.apply(ke,be[Je])}return ke},Ue=(be,ke)=>ke>=0&&ke<be.length?q.some(be[ke]):q.none(),V=be=>Ue(be,0),Ye=(be,ke)=>{for(let Je=0;Je<be.length;Je++){const xt=ke(be[Je],Je);if(xt.isSome())return xt}return q.none()};typeof window<"u"||Function("return this;")();const Fe=(be,ke,Je)=>{if(h(Je)||O(Je)||Z(Je))be.setAttribute(ke,Je+"");else throw console.error("Invalid call to Attribute.set. Key ",ke,":: Value ",Je,":: Element ",be),new Error("Attribute value was not simple")},St=(be,ke,Je)=>{Fe(be.dom,ke,Je)},Dt=(be,ke)=>{be.dom.removeAttribute(ke)},He=(be,ke)=>{const xt=(ke||document).createElement("div");if(xt.innerHTML=be,!xt.hasChildNodes()||xt.childNodes.length>1){const es="HTML does not have a single root node";throw console.error(es,be),new Error(es)}return At(xt.childNodes[0])},ft=(be,ke)=>{const xt=(ke||document).createElement(be);return At(xt)},ht=(be,ke)=>{const xt=(ke||document).createTextNode(be);return At(xt)},At=be=>{if(be==null)throw new Error("Node cannot be null or undefined");return{dom:be}},ct={fromHtml:He,fromTag:ft,fromText:ht,fromDom:At,fromPoint:(be,ke,Je)=>q.from(be.dom.elementFromPoint(ke,Je)).map(At)};var Ht=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),ye=tinymce.util.Tools.resolve("tinymce.util.URI");const lo=be=>be.length>0,jn=be=>ke=>ke.options.get(be),so=be=>{const ke=be.options.register;ke("image_dimensions",{processor:"boolean",default:!0}),ke("image_advtab",{processor:"boolean",default:!1}),ke("image_uploadtab",{processor:"boolean",default:!0}),ke("image_prepend_url",{processor:"string",default:""}),ke("image_class_list",{processor:"object[]"}),ke("image_description",{processor:"boolean",default:!0}),ke("image_title",{processor:"boolean",default:!1}),ke("image_caption",{processor:"boolean",default:!1}),ke("image_list",{processor:Je=>{const xt=Je===!1||h(Je)||Y(Je,b)||W(Je);return xt?{value:Je,valid:xt}:{valid:!1,message:"Must be false, a string, an array or a function."}},default:!1})},Xs=jn("image_dimensions"),ot=jn("image_advtab"),Qe=jn("image_uploadtab"),Ot=jn("image_prepend_url"),Nt=jn("image_class_list"),Ve=jn("image_description"),dn=jn("image_title"),kn=jn("image_caption"),Bt=jn("image_list"),Le=jn("a11y_advanced_options"),je=jn("automatic_uploads"),Ze=be=>lo(be.options.get("images_upload_url")),pt=be=>B(be.options.get("images_upload_handler")),Vt=(be,ke)=>Math.max(parseInt(be,10),parseInt(ke,10)),sn=be=>new Promise(ke=>{const Je=document.createElement("img"),xt=wn=>{Je.parentNode&&Je.parentNode.removeChild(Je),ke(wn)};Je.addEventListener("load",()=>{const wn=Vt(Je.width,Je.clientWidth),Vo=Vt(Je.height,Je.clientHeight),Wa={width:wn,height:Vo};xt(Promise.resolve(Wa))}),Je.addEventListener("error",()=>{xt(Promise.reject("Failed to get image dimensions for: ".concat(be)))});const es=Je.style;es.visibility="hidden",es.position="fixed",es.bottom=es.left="0px",es.width=es.height="auto",document.body.appendChild(Je),Je.src=be}),Wn=be=>(be&&(be=be.replace(/px$/,"")),be),ts=be=>(be.length>0&&/^[0-9]+$/.test(be)&&(be+="px"),be),Zn=be=>{if(be.margin){const ke=String(be.margin).split(" ");switch(ke.length){case 1:be["margin-top"]=be["margin-top"]||ke[0],be["margin-right"]=be["margin-right"]||ke[0],be["margin-bottom"]=be["margin-bottom"]||ke[0],be["margin-left"]=be["margin-left"]||ke[0];break;case 2:be["margin-top"]=be["margin-top"]||ke[0],be["margin-right"]=be["margin-right"]||ke[1],be["margin-bottom"]=be["margin-bottom"]||ke[0],be["margin-left"]=be["margin-left"]||ke[1];break;case 3:be["margin-top"]=be["margin-top"]||ke[0],be["margin-right"]=be["margin-right"]||ke[1],be["margin-bottom"]=be["margin-bottom"]||ke[2],be["margin-left"]=be["margin-left"]||ke[1];break;case 4:be["margin-top"]=be["margin-top"]||ke[0],be["margin-right"]=be["margin-right"]||ke[1],be["margin-bottom"]=be["margin-bottom"]||ke[2],be["margin-left"]=be["margin-left"]||ke[3]}delete be.margin}return be},yo=(be,ke)=>{const Je=Bt(be);h(Je)?fetch(Je).then(xt=>{xt.ok&&xt.json().then(ke)}):W(Je)?Je(ke):ke(Je)},Qs=(be,ke,Je)=>{const xt=()=>{Je.onload=Je.onerror=null,be.selection&&(be.selection.select(Je),be.nodeChanged())};Je.onload=()=>{!ke.width&&!ke.height&&Xs(be)&&be.dom.setAttribs(Je,{width:String(Je.clientWidth),height:String(Je.clientHeight)}),xt()},Je.onerror=xt},Rs=be=>new Promise((ke,Je)=>{const xt=new FileReader;xt.onload=()=>{ke(xt.result)},xt.onerror=()=>{var es;Je((es=xt.error)===null||es===void 0?void 0:es.message)},xt.readAsDataURL(be)}),xr=be=>be.nodeName==="IMG"&&(be.hasAttribute("data-mce-object")||be.hasAttribute("data-mce-placeholder")),Po=(be,ke)=>{const Je=be.options.get;return ye.isDomSafe(ke,"img",{allow_html_data_urls:Je("allow_html_data_urls"),allow_script_urls:Je("allow_script_urls"),allow_svg_data_urls:Je("allow_svg_data_urls")})},jo=Ht.DOM,Mo=be=>be.style.marginLeft&&be.style.marginRight&&be.style.marginLeft===be.style.marginRight?Wn(be.style.marginLeft):"",Do=be=>be.style.marginTop&&be.style.marginBottom&&be.style.marginTop===be.style.marginBottom?Wn(be.style.marginTop):"",er=be=>be.style.borderWidth?Wn(be.style.borderWidth):"",Zs=(be,ke)=>{var Je;return be.hasAttribute(ke)&&(Je=be.getAttribute(ke))!==null&&Je!==void 0?Je:""},Xa=be=>be.parentNode!==null&&be.parentNode.nodeName==="FIGURE",bn=(be,ke,Je)=>{Je===""||Je===null?be.removeAttribute(ke):be.setAttribute(ke,Je)},qs=be=>{const ke=jo.create("figure",{class:"image"});jo.insertAfter(ke,be),ke.appendChild(be),ke.appendChild(jo.create("figcaption",{contentEditable:"true"},"Caption")),ke.contentEditable="false"},Qr=be=>{const ke=be.parentNode;B(ke)&&(jo.insertAfter(be,ke),jo.remove(ke))},lt=be=>{Xa(be)?Qr(be):qs(be)},yt=(be,ke)=>{const Je=be.getAttribute("style"),xt=ke(Je!==null?Je:"");xt.length>0?(be.setAttribute("style",xt),be.setAttribute("data-mce-style",xt)):be.removeAttribute("style")},_n=(be,ke)=>(Je,xt,es)=>{const wn=Je.style;wn[xt]?(wn[xt]=ts(es),yt(Je,ke)):bn(Je,xt,es)},us=(be,ke)=>be.style[ke]?Wn(be.style[ke]):Zs(be,ke),Zo=(be,ke)=>{const Je=ts(ke);be.style.marginLeft=Je,be.style.marginRight=Je},br=(be,ke)=>{const Je=ts(ke);be.style.marginTop=Je,be.style.marginBottom=Je},Vn=(be,ke)=>{const Je=ts(ke);be.style.borderWidth=Je},Kt=(be,ke)=>{be.style.borderStyle=ke},Ps=be=>{var ke;return(ke=be.style.borderStyle)!==null&&ke!==void 0?ke:""},Bo=be=>B(be)&&be.nodeName==="FIGURE",Nr=be=>be.nodeName==="IMG",uc=be=>jo.getAttrib(be,"alt").length===0&&jo.getAttrib(be,"role")==="presentation",Hi=be=>uc(be)?"":Zs(be,"alt"),ir=()=>({src:"",alt:"",title:"",width:"",height:"",class:"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:"",isDecorative:!1}),Wr=(be,ke)=>{var Je;const xt=document.createElement("img");return bn(xt,"style",ke.style),(Mo(xt)||ke.hspace!=="")&&Zo(xt,ke.hspace),(Do(xt)||ke.vspace!=="")&&br(xt,ke.vspace),(er(xt)||ke.border!=="")&&Vn(xt,ke.border),(Ps(xt)||ke.borderStyle!=="")&&Kt(xt,ke.borderStyle),be((Je=xt.getAttribute("style"))!==null&&Je!==void 0?Je:"")},mi=(be,ke)=>{const Je=document.createElement("img");if(Es(be,{...ke,caption:!1},Je),_i(Je,ke.alt,ke.isDecorative),ke.caption){const xt=jo.create("figure",{class:"image"});return xt.appendChild(Je),xt.appendChild(jo.create("figcaption",{contentEditable:"true"},"Caption")),xt.contentEditable="false",xt}else return Je},dc=(be,ke)=>({src:Zs(ke,"src"),alt:Hi(ke),title:Zs(ke,"title"),width:us(ke,"width"),height:us(ke,"height"),class:Zs(ke,"class"),style:be(Zs(ke,"style")),caption:Xa(ke),hspace:Mo(ke),vspace:Do(ke),border:er(ke),borderStyle:Ps(ke),isDecorative:uc(ke)}),Ti=(be,ke,Je,xt,es)=>{Je[xt]!==ke[xt]&&es(be,xt,String(Je[xt]))},_i=(be,ke,Je)=>{if(Je){jo.setAttrib(be,"role","presentation");const xt=ct.fromDom(be);St(xt,"alt","")}else{if(T(ke)){const xt=ct.fromDom(be);Dt(xt,"alt")}else{const xt=ct.fromDom(be);St(xt,"alt",ke)}jo.getAttrib(be,"role")==="presentation"&&jo.setAttrib(be,"role","")}},yr=(be,ke,Je)=>{(Je.alt!==ke.alt||Je.isDecorative!==ke.isDecorative)&&_i(be,Je.alt,Je.isDecorative)},Ui=(be,ke)=>(Je,xt,es)=>{be(Je,es),yt(Je,ke)},Es=(be,ke,Je)=>{const xt=dc(be,Je);Ti(Je,xt,ke,"caption",(es,wn,Vo)=>lt(es)),Ti(Je,xt,ke,"src",bn),Ti(Je,xt,ke,"title",bn),Ti(Je,xt,ke,"width",_n("width",be)),Ti(Je,xt,ke,"height",_n("height",be)),Ti(Je,xt,ke,"class",bn),Ti(Je,xt,ke,"style",Ui((es,wn)=>bn(es,"style",wn),be)),Ti(Je,xt,ke,"hspace",Ui(Zo,be)),Ti(Je,xt,ke,"vspace",Ui(br,be)),Ti(Je,xt,ke,"border",Ui(Vn,be)),Ti(Je,xt,ke,"borderStyle",Ui(Kt,be)),yr(Je,xt,ke)},_t=(be,ke)=>{const Je=be.dom.styles.parse(ke),xt=Zn(Je),es=be.dom.styles.parse(be.dom.styles.serialize(xt));return be.dom.styles.serialize(es)},Hn=be=>{const ke=be.selection.getNode(),Je=be.dom.getParent(ke,"figure.image");return Je?be.dom.select("img",Je)[0]:ke&&(ke.nodeName!=="IMG"||xr(ke))?null:ke},Cs=(be,ke)=>{var Je;const xt=be.dom,es=de(be.schema.getTextBlockElements(),(Vo,Wa)=>!be.schema.isValidChild(Wa,"figure")),wn=xt.getParent(ke.parentNode,Vo=>ie(es,Vo.nodeName),be.getBody());return wn&&(Je=xt.split(wn,ke))!==null&&Je!==void 0?Je:ke},_r=be=>{const ke=Hn(be);return ke?dc(Je=>_t(be,Je),ke):ir()},fn=(be,ke)=>{const Je=mi(es=>_t(be,es),ke);be.dom.setAttrib(Je,"data-mce-id","__mcenew"),be.focus(),be.selection.setContent(Je.outerHTML);const xt=be.dom.select('*[data-mce-id="__mcenew"]')[0];if(be.dom.setAttrib(xt,"data-mce-id",null),Bo(xt)){const es=Cs(be,xt);be.selection.select(es)}else be.selection.select(xt)},Xt=(be,ke)=>{be.dom.setAttrib(ke,"src",ke.getAttribute("src"))},Ii=(be,ke)=>{if(ke){const Je=be.dom.is(ke.parentNode,"figure.image")?ke.parentNode:ke;be.dom.remove(Je),be.focus(),be.nodeChanged(),be.dom.isEmpty(be.getBody())&&(be.setContent(""),be.selection.setCursorLocation())}},kl=(be,ke)=>{const Je=Hn(be);if(Je)if(Es(xt=>_t(be,xt),ke,Je),Xt(be,Je),Bo(Je.parentNode)){be.dom.setStyle(Je,"float","");const xt=Je.parentNode;Cs(be,xt),be.selection.select(Je.parentNode)}else be.selection.select(Je),Qs(be,ke,Je)},ll=(be,ke)=>{const Je=ke.src;return{...ke,src:Po(be,Je)?Je:""}},_o=(be,ke)=>{const Je=Hn(be);if(Je){const es={...dc(Vo=>_t(be,Vo),Je),...ke},wn=ll(be,es);es.src?kl(be,wn):Ii(be,Je)}else ke.src&&fn(be,{...ir(),...ke})},Ao=(be=>(...ke)=>{if(ke.length===0)throw new Error("Can't merge zero objects");const Je={};for(let xt=0;xt<ke.length;xt++){const es=ke[xt];for(const wn in es)he(es,wn)&&(Je[wn]=be(Je[wn],es[wn]))}return Je})((be,ke)=>S(be)&&S(ke)?Ao(be,ke):ke);var Tr=tinymce.util.Tools.resolve("tinymce.util.ImageUploader"),Go=tinymce.util.Tools.resolve("tinymce.util.Tools");const hr=be=>h(be.value)?be.value:"",Ai=be=>h(be.text)?be.text:h(be.title)?be.title:"",fc=(be,ke)=>{const Je=[];return Go.each(be,xt=>{const es=Ai(xt);if(xt.menu!==void 0){const wn=fc(xt.menu,ke);Je.push({text:es,items:wn})}else{const wn=ke(xt);Je.push({text:es,value:wn})}}),Je},tr=(be=hr)=>ke=>ke?q.from(ke).map(Je=>fc(Je,be)):q.none(),xl=be=>tr(hr)(be),cl=be=>he(be,"items"),gr=(be,ke)=>Ye(be,Je=>cl(Je)?gr(Je.items,ke):Je.value===ke?q.some(Je):q.none()),ii={sanitizer:tr,sanitize:xl,findEntry:(be,ke)=>be.bind(Je=>gr(Je,ke))},Ac={makeTab:be=>({title:"Advanced",name:"advanced",items:[{type:"grid",columns:2,items:[{type:"input",label:"Vertical space",name:"vspace",inputMode:"numeric"},{type:"input",label:"Horizontal space",name:"hspace",inputMode:"numeric"},{type:"input",label:"Border width",name:"border",inputMode:"numeric"},{type:"listbox",name:"borderstyle",label:"Border style",items:[{text:"Select...",value:""},{text:"Solid",value:"solid"},{text:"Dotted",value:"dotted"},{text:"Dashed",value:"dashed"},{text:"Double",value:"double"},{text:"Groove",value:"groove"},{text:"Ridge",value:"ridge"},{text:"Inset",value:"inset"},{text:"Outset",value:"outset"},{text:"None",value:"none"},{text:"Hidden",value:"hidden"}]}]}]})},ba=be=>{const ke=ii.sanitizer(Oc=>be.convertURL(Oc.value||Oc.url||"","src")),Je=new Promise(Oc=>{yo(be,Wi=>{Oc(ke(Wi).map(Dd=>$e([[{text:"None",value:""}],Dd])))})}),xt=ii.sanitize(Nt(be)),es=ot(be),wn=Qe(be),Vo=Ze(be),Wa=pt(be),Gt=_r(be),Zl=Ve(be),Er=dn(be),ef=Xs(be),Oi=kn(be),fo=Le(be),mc=je(be),Ia=q.some(Ot(be)).filter(Oc=>h(Oc)&&Oc.length>0);return Je.then(Oc=>({image:Gt,imageList:Oc,classList:xt,hasAdvTab:es,hasUploadTab:wn,hasUploadUrl:Vo,hasUploadHandler:Wa,hasDescription:Zl,hasImageTitle:Er,hasDimensions:ef,hasImageCaption:Oi,prependURL:Ia,hasAccessibilityOptions:fo,automaticUploads:mc}))},ar=be=>{const ke={name:"src",type:"urlinput",filetype:"image",label:"Source",picker_text:"Browse files"},Je=be.imageList.map(Er=>({name:"images",type:"listbox",label:"Image list",items:Er})),xt={name:"alt",type:"input",label:"Alternative description",enabled:!(be.hasAccessibilityOptions&&be.image.isDecorative)},es={name:"title",type:"input",label:"Image title"},wn={name:"dimensions",type:"sizeinput"},Vo={type:"label",label:"Accessibility",items:[{name:"isDecorative",type:"checkbox",label:"Image is decorative"}]},Wa=be.classList.map(Er=>({name:"classes",type:"listbox",label:"Class",items:Er})),Gt={type:"label",label:"Caption",items:[{type:"checkbox",name:"caption",label:"Show caption"}]},Zl=Er=>Er?{type:"grid",columns:2}:{type:"panel"};return $e([[ke],Je.toArray(),be.hasAccessibilityOptions&&be.hasDescription?[Vo]:[],be.hasDescription?[xt]:[],be.hasImageTitle?[es]:[],be.hasDimensions?[wn]:[],[{...Zl(be.classList.isSome()&&be.hasImageCaption),items:$e([Wa.toArray(),be.hasImageCaption?[Gt]:[]])}]])},ya={makeTab:be=>({title:"General",name:"general",items:ar(be)}),makeItems:ar},co={makeTab:be=>({title:"Upload",name:"upload",items:[{type:"dropzone",name:"fileinput"}]})},uo=be=>({prevImage:ii.findEntry(be.imageList,be.image.src),prevAlt:be.image.alt,open:!0}),Fr=be=>({src:{value:be.src,meta:{}},images:be.src,alt:be.alt,title:be.title,dimensions:{width:be.width,height:be.height},classes:be.class,caption:be.caption,style:be.style,vspace:be.vspace,border:be.border,hspace:be.hspace,borderstyle:be.borderStyle,fileinput:[],isDecorative:be.isDecorative}),zi=(be,ke)=>({src:be.src.value,alt:(be.alt===null||be.alt.length===0)&&ke?null:be.alt,title:be.title,width:be.dimensions.width,height:be.dimensions.height,class:be.classes,style:be.style,caption:be.caption,hspace:be.hspace,vspace:be.vspace,border:be.border,borderStyle:be.borderstyle,isDecorative:be.isDecorative}),lr=(be,ke)=>/^(?:[a-zA-Z]+:)?\/\//.test(ke)?q.none():be.prependURL.bind(Je=>ke.substring(0,Je.length)!==Je?q.some(Je+ke):q.none()),pc=(be,ke)=>{const Je=ke.getData();lr(be,Je.src.value).each(xt=>{ke.setData({src:{value:xt,meta:Je.src.meta}})})},ai=(be,ke,Je)=>{be.hasDescription&&h(Je.alt)&&(ke.alt=Je.alt),be.hasAccessibilityOptions&&(ke.isDecorative=Je.isDecorative||ke.isDecorative||!1),be.hasImageTitle&&h(Je.title)&&(ke.title=Je.title),be.hasDimensions&&(h(Je.width)&&(ke.dimensions.width=Je.width),h(Je.height)&&(ke.dimensions.height=Je.height)),h(Je.class)&&ii.findEntry(be.classList,Je.class).each(xt=>{ke.classes=xt.value}),be.hasImageCaption&&O(Je.caption)&&(ke.caption=Je.caption),be.hasAdvTab&&(h(Je.style)&&(ke.style=Je.style),h(Je.vspace)&&(ke.vspace=Je.vspace),h(Je.border)&&(ke.border=Je.border),h(Je.hspace)&&(ke.hspace=Je.hspace),h(Je.borderstyle)&&(ke.borderstyle=Je.borderstyle))},mu=(be,ke)=>{const Je=ke.getData(),xt=Je.src.meta;if(xt!==void 0){const es=Ao({},Je);ai(be,es,xt),ke.setData(es)}},jl=(be,ke,Je,xt)=>{const es=xt.getData(),wn=es.src.value,Vo=es.src.meta||{};!Vo.width&&!Vo.height&&ke.hasDimensions&&(lo(wn)?be.imageSize(wn).then(Wa=>{Je.open&&xt.setData({dimensions:Wa})}).catch(Wa=>console.error(Wa)):xt.setData({dimensions:{width:"",height:""}}))},bs=(be,ke,Je)=>{const xt=Je.getData(),es=ii.findEntry(be.imageList,xt.src.value);ke.prevImage=es,Je.setData({images:es.map(wn=>wn.value).getOr("")})},Hs=(be,ke,Je,xt)=>{pc(ke,xt),mu(ke,xt),jl(be,ke,Je,xt),bs(ke,Je,xt)},No=(be,ke,Je,xt)=>{const es=xt.getData(),wn=ii.findEntry(ke.imageList,es.images);wn.each(Vo=>{es.alt===""||Je.prevImage.map(Gt=>Gt.text===es.alt).getOr(!1)?Vo.value===""?xt.setData({src:Vo,alt:Je.prevAlt}):xt.setData({src:Vo,alt:Vo.text}):xt.setData({src:Vo})}),Je.prevImage=wn,Hs(be,ke,Je,xt)},So=(be,ke,Je,xt)=>{const es=xt.getData();xt.block("Uploading image"),V(es.fileinput).fold(()=>{xt.unblock()},wn=>{const Vo=URL.createObjectURL(wn),Wa=()=>{xt.unblock(),URL.revokeObjectURL(Vo)},Gt=Zl=>{xt.setData({src:{value:Zl,meta:{}}}),xt.showTab("general"),Hs(be,ke,Je,xt),xt.focus("src")};Rs(wn).then(Zl=>{const Er=be.createBlobCache(wn,Vo,Zl);ke.automaticUploads?be.uploadImage(Er).then(ef=>{Gt(ef.url),Wa()}).catch(ef=>{Wa(),be.alertErr(ef,()=>{xt.focus("fileinput")})}):(be.addToBlobCache(Er),Gt(Er.blobUri()),xt.unblock())})})},Si=(be,ke,Je)=>(xt,es)=>{es.name==="src"?Hs(be,ke,Je,xt):es.name==="images"?No(be,ke,Je,xt):es.name==="alt"?Je.prevAlt=xt.getData().alt:es.name==="fileinput"?So(be,ke,Je,xt):es.name==="isDecorative"&&xt.setEnabled("alt",!xt.getData().isDecorative)},Ja=be=>()=>{be.open=!1},ad=be=>be.hasAdvTab||be.hasUploadUrl||be.hasUploadHandler?{type:"tabpanel",tabs:$e([[ya.makeTab(be)],be.hasAdvTab?[Ac.makeTab(be)]:[],be.hasUploadTab&&(be.hasUploadUrl||be.hasUploadHandler)?[co.makeTab(be)]:[]])}:{type:"panel",items:ya.makeItems(be)},Wf=(be,ke,Je)=>xt=>{const es=Ao(Fr(ke.image),xt.getData()),wn={...es,style:Wr(Je.normalizeCss,zi(es,!1))};be.execCommand("mceUpdateImage",!1,zi(wn,ke.hasAccessibilityOptions)),be.editorUpload.uploadImagesAuto(),xt.close()},hu=be=>ke=>Po(be,ke)?sn(be.documentBaseURI.toAbsolute(ke)).then(Je=>({width:String(Je.width),height:String(Je.height)})):Promise.resolve({width:"",height:""}),za=be=>(ke,Je,xt)=>{var es;return be.editorUpload.blobCache.create({blob:ke,blobUri:Je,name:(es=ke.name)===null||es===void 0?void 0:es.replace(/\.[^\.]+$/,""),filename:ke.name,base64:xt.split(",")[1]})},ia=be=>ke=>{be.editorUpload.blobCache.add(ke)},qc=be=>(ke,Je)=>{be.windowManager.alert(ke,Je)},jf=be=>ke=>_t(be,ke),Vm=be=>ke=>be.dom.parseStyle(ke),Qa=be=>(ke,Je)=>be.dom.serializeStyle(ke,Je),Te=be=>ke=>Tr(be).upload([ke],!1).then(Je=>{var xt;return Je.length===0?Promise.reject("Failed to upload image"):Je[0].status===!1?Promise.reject((xt=Je[0].error)===null||xt===void 0?void 0:xt.message):Je[0]}),We=be=>{const ke={imageSize:hu(be),addToBlobCache:ia(be),createBlobCache:za(be),alertErr:qc(be),normalizeCss:jf(be),parseStyle:Vm(be),serializeStyle:Qa(be),uploadImage:Te(be)};return{open:()=>{ba(be).then(xt=>{const es=uo(xt);return{title:"Insert/Edit Image",size:"normal",body:ad(xt),buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:Fr(xt.image),onSubmit:Wf(be,xt,ke),onChange:Si(ke,xt,es),onClose:Ja(es)}}).then(be.windowManager.open)}}},rt=be=>{be.addCommand("mceImage",We(be).open),be.addCommand("mceUpdateImage",(ke,Je)=>{be.undoManager.transact(()=>_o(be,Je))})},zt=be=>{const ke=be.attr("class");return B(ke)&&/\bimage\b/.test(ke)},pn=be=>ke=>{let Je=ke.length;const xt=es=>{es.attr("contenteditable",be?"true":null)};for(;Je--;){const es=ke[Je];zt(es)&&(es.attr("contenteditable",be?"false":null),Go.each(es.getAll("figcaption"),xt))}},jt=be=>{be.on("PreInit",()=>{be.parser.addNodeFilter("figure",pn(!0)),be.serializer.addNodeFilter("figure",pn(!1))})},ns=be=>ke=>{const Je=()=>{ke.setEnabled(be.selection.isEditable())};return be.on("NodeChange",Je),Je(),()=>{be.off("NodeChange",Je)}},eo=be=>{be.ui.registry.addToggleButton("image",{icon:"image",tooltip:"Insert/edit image",onAction:We(be).open,onSetup:ke=>{ke.setActive(B(Hn(be)));const Je=be.selection.selectorChangedWithUnbind("img:not([data-mce-object]):not([data-mce-placeholder]),figure.image",ke.setActive).unbind,xt=ns(be)(ke);return()=>{Je(),xt()}}}),be.ui.registry.addMenuItem("image",{icon:"image",text:"Image...",onAction:We(be).open,onSetup:ns(be)}),be.ui.registry.addContextMenu("image",{update:ke=>be.selection.isEditable()&&(Bo(ke)||Nr(ke)&&!xr(ke))?["image"]:[]})};var Us=()=>{e.add("image",be=>{so(be),jt(be),eo(be),rt(be)})};Us()}()),q3e}var K3e;function cZe(){return K3e||(K3e=1,lZe()),Z3e}cZe();var Y3e={},X3e={},J3e;function uZe(){return J3e||(J3e=1,function(){var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=(Te,We,rt)=>{var zt;return rt(Te,We.prototype)?!0:((zt=Te.constructor)===null||zt===void 0?void 0:zt.name)===We.name},n=Te=>{const We=typeof Te;return Te===null?"null":We==="object"&&Array.isArray(Te)?"array":We==="object"&&t(Te,String,(rt,zt)=>zt.isPrototypeOf(rt))?"string":We},i=Te=>We=>n(We)===Te,a=Te=>We=>typeof We===Te,l=Te=>We=>Te===We,f=i("string"),d=i("object"),h=i("array"),b=l(null),S=a("boolean"),k=Te=>Te==null,T=Te=>!k(Te),O=a("function"),P=(Te,We)=>{if(h(Te)){for(let rt=0,zt=Te.length;rt<zt;++rt)if(!We(Te[rt]))return!1;return!0}return!1},B=()=>{},W=Te=>()=>Te,Z=(Te,We)=>Te===We;class Y{constructor(We,rt){this.tag=We,this.value=rt}static some(We){return new Y(!0,We)}static none(){return Y.singletonNone}fold(We,rt){return this.tag?rt(this.value):We()}isSome(){return this.tag}isNone(){return!this.tag}map(We){return this.tag?Y.some(We(this.value)):Y.none()}bind(We){return this.tag?We(this.value):Y.none()}exists(We){return this.tag&&We(this.value)}forall(We){return!this.tag||We(this.value)}filter(We){return!this.tag||We(this.value)?this:Y.none()}getOr(We){return this.tag?this.value:We}or(We){return this.tag?this:We}getOrThunk(We){return this.tag?this.value:We()}orThunk(We){return this.tag?this:We()}getOrDie(We){if(this.tag)return this.value;throw new Error(We!=null?We:"Called getOrDie on None")}static from(We){return T(We)?Y.some(We):Y.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(We){this.tag&&We(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?"some(".concat(this.value,")"):"none()"}}Y.singletonNone=new Y(!1);const z=Array.prototype.indexOf,q=Array.prototype.push,ne=(Te,We)=>z.call(Te,We),ue=(Te,We)=>ne(Te,We)>-1,J=(Te,We)=>{const rt=Te.length,zt=new Array(rt);for(let pn=0;pn<rt;pn++){const jt=Te[pn];zt[pn]=We(jt,pn)}return zt},ce=(Te,We)=>{for(let rt=0,zt=Te.length;rt<zt;rt++){const pn=Te[rt];We(pn,rt)}},ge=(Te,We,rt)=>(ce(Te,(zt,pn)=>{rt=We(rt,zt,pn)}),rt),de=Te=>{const We=[];for(let rt=0,zt=Te.length;rt<zt;++rt){if(!h(Te[rt]))throw new Error("Arr.flatten item "+rt+" was not an array, input: "+Te);q.apply(We,Te[rt])}return We},he=(Te,We)=>de(J(Te,We)),ie=(Te,We)=>{for(let rt=0;rt<Te.length;rt++){const zt=We(Te[rt],rt);if(zt.isSome())return zt}return Y.none()},Be=(Te,We,rt=Z)=>Te.exists(zt=>rt(zt,We)),$e=Te=>{const We=[],rt=zt=>{We.push(zt)};for(let zt=0;zt<Te.length;zt++)Te[zt].each(rt);return We},Ue=(Te,We)=>Te?Y.some(We):Y.none(),V=Te=>We=>We.options.get(Te),Ye=Te=>{const We=Te.options.register;We("link_assume_external_targets",{processor:rt=>{const zt=f(rt)||S(rt);return zt?rt===!0?{value:1,valid:zt}:rt==="http"||rt==="https"?{value:rt,valid:zt}:{value:0,valid:zt}:{valid:!1,message:"Must be a string or a boolean."}},default:!1}),We("link_context_toolbar",{processor:"boolean",default:!1}),We("link_list",{processor:rt=>f(rt)||O(rt)||P(rt,d)}),We("link_default_target",{processor:"string"}),We("link_default_protocol",{processor:"string",default:"https"}),We("link_target_list",{processor:rt=>S(rt)||P(rt,d),default:!0}),We("link_rel_list",{processor:"object[]",default:[]}),We("link_class_list",{processor:"object[]",default:[]}),We("link_title",{processor:"boolean",default:!0}),We("allow_unsafe_link_target",{processor:"boolean",default:!1}),We("link_quicklink",{processor:"boolean",default:!1}),We("link_attributes_postprocess",{processor:"function"})},Fe=V("link_assume_external_targets"),St=V("link_context_toolbar"),Dt=V("link_list"),He=V("link_default_target"),ft=V("link_default_protocol"),ht=V("link_target_list"),At=V("link_rel_list"),hn=V("link_class_list"),ct=V("link_title"),Ht=V("allow_unsafe_link_target"),ye=V("link_quicklink"),lo=V("link_attributes_postprocess"),jn=Object.keys,so=Object.hasOwnProperty,Xs=(Te,We)=>{const rt=jn(Te);for(let zt=0,pn=rt.length;zt<pn;zt++){const jt=rt[zt],ns=Te[jt];We(ns,jt)}},ot=Te=>(We,rt)=>{Te[rt]=We},Qe=(Te,We,rt,zt)=>{Xs(Te,(pn,jt)=>{(We(pn,jt)?rt:zt)(pn,jt)})},Ot=(Te,We)=>{const rt={};return Qe(Te,We,ot(rt),B),rt},Nt=(Te,We)=>so.call(Te,We),Ve=(Te,We)=>Nt(Te,We)&&Te[We]!==void 0&&Te[We]!==null;var dn=tinymce.util.Tools.resolve("tinymce.util.URI"),kn=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),Bt=tinymce.util.Tools.resolve("tinymce.util.Tools");const Le=Te=>T(Te)&&Te.nodeName.toLowerCase()==="a",je=Te=>Le(Te)&&!!Vt(Te),Ze=(Te,We)=>{if(Te.collapsed)return[];{const rt=Te.cloneContents(),zt=rt.firstChild,pn=new kn(zt,rt),jt=[];let ns=zt;do We(ns)&&jt.push(ns);while(ns=pn.next());return jt}},pt=Te=>/^\w+:/i.test(Te),Vt=Te=>{var We,rt;return(rt=(We=Te.getAttribute("data-mce-href"))!==null&&We!==void 0?We:Te.getAttribute("href"))!==null&&rt!==void 0?rt:""},sn=(Te,We)=>{const rt=["noopener"],zt=Te?Te.split(/\s+/):[],pn=Us=>Bt.trim(Us.sort().join(" ")),jt=Us=>(Us=ns(Us),Us.length>0?Us.concat(rt):rt),ns=Us=>Us.filter(be=>Bt.inArray(rt,be)===-1),eo=We?jt(zt):ns(zt);return eo.length>0?pn(eo):""},Wn=Te=>Te.replace(/\uFEFF/g,""),ts=(Te,We)=>(We=We||Qs(Te.selection.getRng())[0]||Te.selection.getNode(),Mo(We)?Y.from(Te.dom.select("a[href]",We)[0]):Y.from(Te.dom.getParent(We,"a[href]"))),Zn=(Te,We)=>ts(Te,We).isSome(),yo=(Te,We)=>{const rt=We.fold(()=>Te.getContent({format:"text"}),zt=>zt.innerText||zt.textContent||"");return Wn(rt)},Qs=Te=>Ze(Te,je),Rs=Te=>Bt.grep(Te,je),xr=Te=>Rs(Te).length>0,Po=Te=>Qs(Te).length>0,jo=Te=>{const We=Te.schema.getTextInlineElements(),rt=jt=>jt.nodeType===1&&!Le(jt)&&!Nt(We,jt.nodeName.toLowerCase());if(ts(Te).exists(jt=>jt.hasAttribute("data-mce-block")))return!1;const pn=Te.selection.getRng();return pn.collapsed?!0:Ze(pn,rt).length===0},Mo=Te=>T(Te)&&Te.nodeName==="FIGURE"&&/\bimage\b/i.test(Te.className),Do=Te=>ge(["title","rel","class","target"],(rt,zt)=>(Te[zt].each(pn=>{rt[zt]=pn.length>0?pn:null}),rt),{href:Te.href}),er=(Te,We)=>(We==="http"||We==="https")&&!pt(Te)?We+"://"+Te:Te,Zs=(Te,We)=>{const rt={...We};if(At(Te).length===0&&!Ht(Te)){const zt=sn(rt.rel,rt.target==="_blank");rt.rel=zt||null}return Y.from(rt.target).isNone()&&ht(Te)===!1&&(rt.target=He(Te)),rt.href=er(rt.href,Fe(Te)),rt},Xa=(Te,We,rt,zt)=>{rt.each(jt=>{Nt(We,"innerText")?We.innerText=jt:We.textContent=jt}),Te.dom.setAttribs(We,zt);const pn=Te.dom.createRng();pn.setStartAfter(We),pn.setEndAfter(We),Te.selection.setRng(pn)},bn=(Te,We,rt,zt)=>{const pn=Te.dom;Mo(We)?Vn(pn,We,zt):rt.fold(()=>{Te.execCommand("mceInsertLink",!1,zt);const jt=Te.selection.getEnd(),ns=pn.createRng();ns.setStartAfter(jt),ns.setEndAfter(jt),Te.selection.setRng(ns)},jt=>{Te.insertContent(pn.createHTML("a",zt,pn.encode(jt)))})},qs=(Te,We,rt)=>{const zt=Te.selection.getNode(),pn=ts(Te,zt),jt=Zs(Te,Do(rt)),ns=lo(Te);T(ns)&&ns(jt),Te.undoManager.transact(()=>{rt.href===We.href&&We.attach(),pn.fold(()=>{bn(Te,zt,rt.text,jt)},eo=>{Te.focus(),Xa(Te,eo,rt.text,jt)})})},Qr=Te=>{const We=Te.dom,rt=Te.selection,zt=rt.getBookmark(),pn=rt.getRng().cloneRange(),jt=We.getParent(pn.startContainer,"a[href]",Te.getBody()),ns=We.getParent(pn.endContainer,"a[href]",Te.getBody());jt&&pn.setStartBefore(jt),ns&&pn.setEndAfter(ns),rt.setRng(pn),Te.execCommand("unlink"),rt.moveToBookmark(zt)},lt=Te=>{Te.undoManager.transact(()=>{const We=Te.selection.getNode();Mo(We)?br(Te,We):Qr(Te),Te.focus()})},yt=Te=>{const{class:We,href:rt,rel:zt,target:pn,text:jt,title:ns}=Te;return Ot({class:We.getOrNull(),href:rt,rel:zt.getOrNull(),target:pn.getOrNull(),text:jt.getOrNull(),title:ns.getOrNull()},(eo,Us)=>b(eo)===!1)},_n=(Te,We)=>{const rt=Te.options.get,zt={allow_html_data_urls:rt("allow_html_data_urls"),allow_script_urls:rt("allow_script_urls"),allow_svg_data_urls:rt("allow_svg_data_urls")},pn=We.href;return{...We,href:dn.isDomSafe(pn,"a",zt)?pn:""}},us=(Te,We,rt)=>{const zt=_n(Te,rt);Te.hasPlugin("rtc",!0)?Te.execCommand("createlink",!1,yt(zt)):qs(Te,We,zt)},Zo=Te=>{Te.hasPlugin("rtc",!0)?Te.execCommand("unlink"):lt(Te)},br=(Te,We)=>{var rt;const zt=Te.dom.select("img",We)[0];if(zt){const pn=Te.dom.getParents(zt,"a[href]",We)[0];pn&&((rt=pn.parentNode)===null||rt===void 0||rt.insertBefore(zt,pn),Te.dom.remove(pn))}},Vn=(Te,We,rt)=>{var zt;const pn=Te.select("img",We)[0];if(pn){const jt=Te.create("a",rt);(zt=pn.parentNode)===null||zt===void 0||zt.insertBefore(jt,pn),jt.appendChild(pn)}},Kt=Te=>f(Te.value)?Te.value:"",Ps=Te=>f(Te.text)?Te.text:f(Te.title)?Te.title:"",Bo=(Te,We)=>{const rt=[];return Bt.each(Te,zt=>{const pn=Ps(zt);if(zt.menu!==void 0){const jt=Bo(zt.menu,We);rt.push({text:pn,items:jt})}else{const jt=We(zt);rt.push({text:pn,value:jt})}}),rt},Nr=(Te=Kt)=>We=>Y.from(We).map(rt=>Bo(rt,Te)),ir={sanitize:Te=>Nr(Kt)(Te),sanitizeWith:Nr,createUi:(Te,We)=>rt=>({name:Te,type:"listbox",label:We,items:rt}),getValue:Kt},Wr=Te=>Ve(Te,"items"),mi=(Te,We)=>ie(We,rt=>Wr(rt)?mi(Te,rt.items):Ue(rt.value===Te,rt)),dc=(Te,We,rt,zt)=>{const pn=zt[We],jt=Te.length>0;return pn!==void 0?mi(pn,rt).map(ns=>({url:{value:ns.value,meta:{text:jt?Te:ns.text,attach:B}},text:jt?Te:ns.text})):Y.none()},Ti=(Te,We)=>We==="link"?Te.link:We==="anchor"?Te.anchor:Y.none(),yr={init:(Te,We)=>{const rt={text:Te.text,title:Te.title},zt=Us=>{var be;return Ue(rt.title.length<=0,Y.from((be=Us.meta)===null||be===void 0?void 0:be.title).getOr(""))},pn=Us=>{var be;return Ue(rt.text.length<=0,Y.from((be=Us.meta)===null||be===void 0?void 0:be.text).getOr(Us.value))},jt=Us=>{const be=pn(Us.url),ke=zt(Us.url);return be.isSome()||ke.isSome()?Y.some({...be.map(Je=>({text:Je})).getOr({}),...ke.map(Je=>({title:Je})).getOr({})}):Y.none()},ns=(Us,be)=>{const ke=Ti(We,be).getOr([]);return dc(rt.text,be,ke,Us)};return{onChange:(Us,be)=>{const ke=be.name;return ke==="url"?jt(Us()):ue(["anchor","link"],ke)?ns(Us(),ke):((ke==="text"||ke==="title")&&(rt[ke]=Us()[ke]),Y.none())}}},getDelta:dc};var Ui=tinymce.util.Tools.resolve("tinymce.util.Delay");const Es=(Te,We,rt)=>{const zt=Te.selection.getRng();Ui.setEditorTimeout(Te,()=>{Te.windowManager.confirm(We,pn=>{Te.selection.setRng(zt),rt(pn)})})},_t=Te=>{const We=Te.href;return We.indexOf("@")>0&&We.indexOf("/")===-1&&We.indexOf("mailto:")===-1?Y.some({message:"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",preprocess:zt=>({...zt,href:"mailto:"+We})}):Y.none()},Hn=(Te,We)=>rt=>{const zt=rt.href;return Te===1&&!pt(zt)||Te===0&&/^\s*www(\.|\d\.)/i.test(zt)?Y.some({message:"The URL you entered seems to be an external link. Do you want to add the required ".concat(We,":// prefix?"),preprocess:jt=>({...jt,href:We+"://"+zt})}):Y.none()},_r={preprocess:(Te,We)=>ie([_t,Hn(Fe(Te),ft(Te))],rt=>rt(We)).fold(()=>Promise.resolve(We),rt=>new Promise(zt=>{Es(Te,rt.message,pn=>{zt(pn?rt.preprocess(We):We)})}))},Xt={getAnchors:Te=>{const We=Te.dom.select("a:not([href])"),rt=he(We,zt=>{const pn=zt.name||zt.id;return pn?[{text:pn,value:"#"+pn}]:[]});return rt.length>0?Y.some([{text:"None",value:""}].concat(rt)):Y.none()}},kl={getClasses:Te=>{const We=hn(Te);return We.length>0?ir.sanitize(We):Y.none()}},ll=Te=>{try{return Y.some(JSON.parse(Te))}catch{return Y.none()}},Qn={getLinks:Te=>{const We=zt=>Te.convertURL(zt.value||zt.url||"","href"),rt=Dt(Te);return new Promise(zt=>{f(rt)?fetch(rt).then(pn=>pn.ok?pn.text().then(ll):Promise.reject()).then(zt,()=>zt(Y.none())):O(rt)?rt(pn=>zt(Y.some(pn))):zt(Y.from(rt))}).then(zt=>zt.bind(ir.sanitizeWith(We)).map(pn=>pn.length>0?[{text:"None",value:""}].concat(pn):pn))}},Ao={getRels:(Te,We)=>{const rt=At(Te);if(rt.length>0){const zt=Be(We,"_blank"),pn=Ht(Te)===!1,jt=eo=>sn(ir.getValue(eo),zt);return(pn?ir.sanitizeWith(jt):ir.sanitize)(rt)}return Y.none()}},Tr=[{text:"Current window",value:""},{text:"New window",value:"_blank"}],hr={getTargets:Te=>{const We=ht(Te);return h(We)?ir.sanitize(We).orThunk(()=>Y.some(Tr)):We===!1?Y.none():Y.some(Tr)}},Ai=(Te,We,rt)=>{const zt=Te.getAttrib(We,rt);return zt!==null&&zt.length>0?Y.some(zt):Y.none()},fc=(Te,We)=>{const rt=Te.dom,pn=jo(Te)?Y.some(yo(Te.selection,We)):Y.none(),jt=We.bind(ke=>Y.from(rt.getAttrib(ke,"href"))),ns=We.bind(ke=>Y.from(rt.getAttrib(ke,"target"))),eo=We.bind(ke=>Ai(rt,ke,"rel")),Us=We.bind(ke=>Ai(rt,ke,"class")),be=We.bind(ke=>Ai(rt,ke,"title"));return{url:jt,text:pn,title:be,target:ns,rel:eo,linkClass:Us}},xl={collect:(Te,We)=>Qn.getLinks(Te).then(rt=>{const zt=fc(Te,We);return{anchor:zt,catalogs:{targets:hr.getTargets(Te),rels:Ao.getRels(Te,zt.target),classes:kl.getClasses(Te),anchor:Xt.getAnchors(Te),link:rt},optNode:We,flags:{titleEnabled:ct(Te)}}})},cl=(Te,We)=>rt=>{const zt=rt.getData();if(!zt.url.value){Zo(Te),rt.close();return}const pn=eo=>Y.from(zt[eo]).filter(Us=>!Be(We.anchor[eo],Us)),jt={href:zt.url.value,text:pn("text"),target:pn("target"),rel:pn("rel"),class:pn("linkClass"),title:pn("title")},ns={href:zt.url.value,attach:zt.url.meta!==void 0&&zt.url.meta.attach?zt.url.meta.attach:B};_r.preprocess(Te,jt).then(eo=>{us(Te,ns,eo)}),rt.close()},gr=Te=>{const We=ts(Te);return xl.collect(Te,We)},hi=(Te,We)=>{const rt=Te.anchor,zt=rt.url.getOr("");return{url:{value:zt,meta:{original:{value:zt}}},text:rt.text.getOr(""),title:rt.title.getOr(""),anchor:zt,link:zt,rel:rt.rel.getOr(""),target:rt.target.or(We).getOr(""),linkClass:rt.linkClass.getOr("")}},ii=(Te,We,rt)=>{const zt=[{name:"url",type:"urlinput",filetype:"file",label:"URL",picker_text:"Browse links"}],pn=Te.anchor.text.map(()=>({name:"text",type:"input",label:"Text to display"})).toArray(),jt=Te.flags.titleEnabled?[{name:"title",type:"input",label:"Title"}]:[],ns=Y.from(He(rt)),eo=hi(Te,ns),Us=Te.catalogs,be=yr.init(eo,Us);return{title:"Insert/Edit Link",size:"normal",body:{type:"panel",items:de([zt,pn,jt,$e([Us.anchor.map(ir.createUi("anchor","Anchors")),Us.rels.map(ir.createUi("rel","Rel")),Us.targets.map(ir.createUi("target","Open link in...")),Us.link.map(ir.createUi("link","Link list")),Us.classes.map(ir.createUi("linkClass","Class"))])])},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:eo,onChange:(Je,{name:xt})=>{be.onChange(Je.getData,{name:xt}).each(es=>{Je.setData(es)})},onSubmit:We}},Mu=Te=>{gr(Te).then(rt=>{const zt=cl(Te,rt);return ii(rt,zt,Te)}).then(rt=>{Te.windowManager.open(rt)})},Ac=Te=>{Te.addCommand("mceLink",(We,rt)=>{(rt==null?void 0:rt.dialog)===!0||!ye(Te)?Mu(Te):Te.dispatch("contexttoolbar-show",{toolbarKey:"quicklink"})})},ba=Te=>{Te.addShortcut("Meta+K","",()=>{Te.execCommand("mceLink")})},ar=Te=>{let We=Te;return{get:()=>We,set:pn=>{We=pn}}},zf=Te=>{const We=ar(Y.none()),rt=()=>We.get().each(Te);return{clear:()=>{rt(),We.set(Y.none())},isSet:()=>We.get().isSome(),get:()=>We.get(),set:eo=>{rt(),We.set(Y.some(eo))}}},ya=()=>{const Te=zf(B);return{...Te,on:rt=>Te.get().each(rt)}},Nu=(Te,We)=>Te.substring(We),co=(Te,We,rt)=>We===""||Te.length>=We.length&&Te.substr(rt,rt+We.length)===We,uo=(Te,We)=>Fr(Te,We)?Nu(Te,We.length):Te,Fr=(Te,We)=>co(Te,We,0);var zi=tinymce.util.Tools.resolve("tinymce.util.VK");const lr=(Te,We)=>{document.body.appendChild(Te),Te.dispatchEvent(We),document.body.removeChild(Te)},pc=Te=>{const We=document.createElement("a");We.target="_blank",We.href=Te,We.rel="noreferrer noopener";const rt=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});document.dispatchEvent(rt),lr(We,rt)},ai=Te=>Te.altKey===!0&&Te.shiftKey===!1&&Te.ctrlKey===!1&&Te.metaKey===!1,mu=(Te,We)=>{if(We){const rt=Vt(We);if(/^#/.test(rt)){const zt=Te.dom.select("".concat(rt,',[name="').concat(uo(rt,"#"),'"]'));zt.length&&Te.selection.scrollIntoView(zt[0],!0)}else pc(We.href)}},jl=Te=>{const We=Te.selection.getRng(),rt=We.startContainer;return je(rt)&&We.startContainer===We.endContainer&&Te.dom.select("img",rt).length===1},bs=(Te,We)=>{const rt=Rs(Te.dom.getParents(We));return Ue(rt.length===1,rt[0])},Hs=Te=>{const We=Qs(Te.selection.getRng());return Ue(We.length>0,We[0]).or(bs(Te,Te.selection.getNode()))},No=Te=>Te.selection.isCollapsed()||jl(Te)?bs(Te,Te.selection.getStart()):Hs(Te),So=Te=>{const We=ya(),rt=()=>We.get().or(No(Te)),zt=()=>rt().each(pn=>mu(Te,pn));return Te.on("contextmenu",pn=>{bs(Te,pn.target).each(We.set)}),Te.on("SelectionChange",()=>{We.isSet()||No(Te).each(We.set)}),Te.on("click",pn=>{We.clear();const jt=Rs(Te.dom.getParents(pn.target));jt.length===1&&zi.metaKeyPressed(pn)&&(pn.preventDefault(),mu(Te,jt[0]))}),Te.on("keydown",pn=>{We.clear(),!pn.isDefaultPrevented()&&pn.keyCode===13&&ai(pn)&&rt().each(jt=>{pn.preventDefault(),mu(Te,jt)})}),{gotoSelectedLink:zt}},Si=Te=>()=>{Te.execCommand("mceLink",!1,{dialog:!0})},Ja=(Te,We)=>(Te.on("NodeChange",We),()=>Te.off("NodeChange",We)),ad=Te=>We=>{const rt=()=>{We.setActive(!Te.mode.isReadOnly()&&Zn(Te,Te.selection.getNode())),We.setEnabled(Te.selection.isEditable())};return rt(),Ja(Te,rt)},Wf=Te=>We=>{const rt=()=>{We.setEnabled(Te.selection.isEditable())};return rt(),Ja(Te,rt)},hu=Te=>We=>{const rt=jt=>xr(jt)||Po(Te.selection.getRng()),zt=Te.dom.getParents(Te.selection.getStart()),pn=jt=>{We.setEnabled(rt(jt)&&Te.selection.isEditable())};return pn(zt),Ja(Te,jt=>pn(jt.parents))},za=(Te,We)=>{Te.ui.registry.addToggleButton("link",{icon:"link",tooltip:"Insert/edit link",shortcut:"Meta+K",onAction:Si(Te),onSetup:ad(Te)}),Te.ui.registry.addButton("openlink",{icon:"new-tab",tooltip:"Open link",onAction:We.gotoSelectedLink,onSetup:hu(Te)}),Te.ui.registry.addButton("unlink",{icon:"unlink",tooltip:"Remove link",onAction:()=>Zo(Te),onSetup:hu(Te)})},ia=(Te,We)=>{Te.ui.registry.addMenuItem("openlink",{text:"Open link",icon:"new-tab",onAction:We.gotoSelectedLink,onSetup:hu(Te)}),Te.ui.registry.addMenuItem("link",{icon:"link",text:"Link...",shortcut:"Meta+K",onAction:Si(Te),onSetup:Wf(Te)}),Te.ui.registry.addMenuItem("unlink",{icon:"unlink",text:"Remove link",onAction:()=>Zo(Te),onSetup:hu(Te)})},qc=Te=>{const We="link unlink openlink",rt="link";Te.ui.registry.addContextMenu("link",{update:zt=>Te.dom.isEditable(zt)?xr(Te.dom.getParents(zt,"a"))?We:rt:""})},jf=(Te,We)=>{const rt=jt=>{jt.selection.collapse(!1)},zt=jt=>{const ns=Te.selection.getNode();return jt.setEnabled(Zn(Te,ns)&&Te.selection.isEditable()),B},pn=jt=>{const ns=ts(Te),eo=jo(Te);if(ns.isNone()&&eo){const Us=yo(Te.selection,ns);return Ue(Us.length===0,jt)}else return Y.none()};Te.ui.registry.addContextForm("quicklink",{launch:{type:"contextformtogglebutton",icon:"link",tooltip:"Link",onSetup:ad(Te)},label:"Link",predicate:jt=>St(Te)&&Zn(Te,jt),initValue:()=>ts(Te).fold(W(""),Vt),commands:[{type:"contextformtogglebutton",icon:"link",tooltip:"Link",primary:!0,onSetup:jt=>{const ns=Te.selection.getNode();return jt.setActive(Zn(Te,ns)),ad(Te)(jt)},onAction:jt=>{const ns=jt.getValue(),eo=pn(ns);us(Te,{href:ns,attach:B},{href:ns,text:eo,title:Y.none(),rel:Y.none(),target:Y.from(He(Te)),class:Y.none()}),rt(Te),jt.hide()}},{type:"contextformbutton",icon:"unlink",tooltip:"Remove link",onSetup:zt,onAction:jt=>{Zo(Te),jt.hide()}},{type:"contextformbutton",icon:"new-tab",tooltip:"Open link",onSetup:zt,onAction:jt=>{We.gotoSelectedLink(),jt.hide()}}]})},Vm=Te=>{const We=So(Te);za(Te,We),ia(Te,We),qc(Te),jf(Te,We)};var Qa=()=>{e.add("link",Te=>{Ye(Te),Ac(Te),Vm(Te),ba(Te)})};Qa()}()),X3e}var Q3e;function dZe(){return Q3e||(Q3e=1,uZe()),Y3e}dZe();var e5e={},t5e={},n5e;function fZe(){return n5e||(n5e=1,function(){var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=(G,le,Ce)=>{var Ke;return Ce(G,le.prototype)?!0:((Ke=G.constructor)===null||Ke===void 0?void 0:Ke.name)===le.name},n=G=>{const le=typeof G;return G===null?"null":le==="object"&&Array.isArray(G)?"array":le==="object"&&t(G,String,(Ce,Ke)=>Ke.isPrototypeOf(Ce))?"string":le},i=G=>le=>n(le)===G,a=G=>le=>typeof le===G,l=i("string"),f=i("object"),d=i("array"),h=a("boolean"),b=G=>G==null,S=G=>!b(G),k=a("function"),T=a("number"),O=()=>{},P=(G,le)=>Ce=>G(le(Ce)),B=G=>()=>G,W=(G,le)=>G===le;function Z(G,...le){return(...Ce)=>{const Ke=le.concat(Ce);return G.apply(null,Ke)}}const Y=G=>le=>!G(le),z=B(!1);class q{constructor(le,Ce){this.tag=le,this.value=Ce}static some(le){return new q(!0,le)}static none(){return q.singletonNone}fold(le,Ce){return this.tag?Ce(this.value):le()}isSome(){return this.tag}isNone(){return!this.tag}map(le){return this.tag?q.some(le(this.value)):q.none()}bind(le){return this.tag?le(this.value):q.none()}exists(le){return this.tag&&le(this.value)}forall(le){return!this.tag||le(this.value)}filter(le){return!this.tag||le(this.value)?this:q.none()}getOr(le){return this.tag?this.value:le}or(le){return this.tag?this:le}getOrThunk(le){return this.tag?this.value:le()}orThunk(le){return this.tag?this:le()}getOrDie(le){if(this.tag)return this.value;throw new Error(le!=null?le:"Called getOrDie on None")}static from(le){return S(le)?q.some(le):q.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(le){this.tag&&le(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?"some(".concat(this.value,")"):"none()"}}q.singletonNone=new q(!1);const ne=Array.prototype.slice,ue=Array.prototype.indexOf,J=Array.prototype.push,ce=(G,le)=>ue.call(G,le),ge=(G,le)=>ce(G,le)>-1,de=(G,le)=>{for(let Ce=0,Ke=G.length;Ce<Ke;Ce++){const st=G[Ce];if(le(st,Ce))return!0}return!1},he=(G,le)=>{const Ce=G.length,Ke=new Array(Ce);for(let st=0;st<Ce;st++){const rn=G[st];Ke[st]=le(rn,st)}return Ke},ie=(G,le)=>{for(let Ce=0,Ke=G.length;Ce<Ke;Ce++){const st=G[Ce];le(st,Ce)}},Be=(G,le)=>{const Ce=[];for(let Ke=0,st=G.length;Ke<st;Ke++){const rn=G[Ke];le(rn,Ke)&&Ce.push(rn)}return Ce},$e=(G,le)=>{if(G.length===0)return[];{let Ce=le(G[0]);const Ke=[];let st=[];for(let rn=0,ks=G.length;rn<ks;rn++){const ro=G[rn],Js=le(ro);Js!==Ce&&(Ke.push(st),st=[]),Ce=Js,st.push(ro)}return st.length!==0&&Ke.push(st),Ke}},Ue=(G,le,Ce)=>(ie(G,(Ke,st)=>{Ce=le(Ce,Ke,st)}),Ce),V=(G,le,Ce)=>{for(let Ke=0,st=G.length;Ke<st;Ke++){const rn=G[Ke];if(le(rn,Ke))return q.some(rn);if(Ce(rn,Ke))break}return q.none()},Ye=(G,le)=>V(G,le,z),Fe=G=>{const le=[];for(let Ce=0,Ke=G.length;Ce<Ke;++Ce){if(!d(G[Ce]))throw new Error("Arr.flatten item "+Ce+" was not an array, input: "+G);J.apply(le,G[Ce])}return le},St=(G,le)=>Fe(he(G,le)),Dt=G=>{const le=ne.call(G,0);return le.reverse(),le},He=(G,le)=>le>=0&&le<G.length?q.some(G[le]):q.none(),ft=G=>He(G,0),ht=G=>He(G,G.length-1),At=(G,le)=>{const Ce=[],Ke=k(le)?st=>de(Ce,rn=>le(rn,st)):st=>ge(Ce,st);for(let st=0,rn=G.length;st<rn;st++){const ks=G[st];Ke(ks)||Ce.push(ks)}return Ce},hn=(G,le,Ce=W)=>G.exists(Ke=>Ce(Ke,le)),ct=(G,le,Ce=W)=>Ht(G,le,Ce).getOr(G.isNone()&&le.isNone()),Ht=(G,le,Ce)=>G.isSome()&&le.isSome()?q.some(Ce(G.getOrDie(),le.getOrDie())):q.none(),ye=8,lo=11,jn=1,so=3,Xs=(G,le)=>{const Ke=(le||document).createElement("div");if(Ke.innerHTML=G,!Ke.hasChildNodes()||Ke.childNodes.length>1){const st="HTML does not have a single root node";throw console.error(st,G),new Error(st)}return Ot(Ke.childNodes[0])},ot=(G,le)=>{const Ke=(le||document).createElement(G);return Ot(Ke)},Qe=(G,le)=>{const Ke=(le||document).createTextNode(G);return Ot(Ke)},Ot=G=>{if(G==null)throw new Error("Node cannot be null or undefined");return{dom:G}},Ve={fromHtml:Xs,fromTag:ot,fromText:Qe,fromDom:Ot,fromPoint:(G,le,Ce)=>q.from(G.dom.elementFromPoint(le,Ce)).map(Ot)},dn=(G,le)=>{const Ce=G.dom;if(Ce.nodeType!==jn)return!1;{const Ke=Ce;if(Ke.matches!==void 0)return Ke.matches(le);if(Ke.msMatchesSelector!==void 0)return Ke.msMatchesSelector(le);if(Ke.webkitMatchesSelector!==void 0)return Ke.webkitMatchesSelector(le);if(Ke.mozMatchesSelector!==void 0)return Ke.mozMatchesSelector(le);throw new Error("Browser lacks native selectors")}},kn=(G,le)=>G.dom===le.dom,Bt=(G,le)=>{const Ce=G.dom,Ke=le.dom;return Ce===Ke?!1:Ce.contains(Ke)},Le=dn,je=typeof window<"u"?window:Function("return this;")(),Ze=(G,le)=>{let Ce=le!=null?le:je;for(let Ke=0;Ke<G.length&&Ce!==void 0&&Ce!==null;++Ke)Ce=Ce[G[Ke]];return Ce},pt=(G,le)=>{const Ce=G.split(".");return Ze(Ce,le)},Vt=(G,le)=>pt(G,le),sn=(G,le)=>{const Ce=Vt(G,le);if(Ce==null)throw new Error(G+" not available on this browser");return Ce},Wn=Object.getPrototypeOf,ts=G=>sn("HTMLElement",G),Zn=G=>{const le=pt("ownerDocument.defaultView",G);return f(G)&&(ts(le).prototype.isPrototypeOf(G)||/^HTML\w*Element$/.test(Wn(G).constructor.name))},yo=G=>G.dom.nodeName.toLowerCase(),Qs=G=>G.dom.nodeType,Rs=G=>le=>Qs(le)===G,xr=G=>Qs(G)===ye||yo(G)==="#comment",Po=G=>jo(G)&&Zn(G.dom),jo=Rs(jn),Mo=Rs(so),Do=Rs(lo),er=G=>le=>jo(le)&&yo(le)===G,Zs=G=>q.from(G.dom.parentNode).map(Ve.fromDom),Xa=G=>q.from(G.dom.parentElement).map(Ve.fromDom),bn=G=>q.from(G.dom.nextSibling).map(Ve.fromDom),qs=G=>he(G.dom.childNodes,Ve.fromDom),Qr=(G,le)=>{const Ce=G.dom.childNodes;return q.from(Ce[le]).map(Ve.fromDom)},lt=G=>Qr(G,0),yt=G=>Qr(G,G.dom.childNodes.length-1),_n=G=>Do(G)&&S(G.dom.host),us=G=>Ve.fromDom(G.dom.getRootNode()),Zo=G=>{const le=us(G);return _n(le)?q.some(le):q.none()},br=G=>Ve.fromDom(G.dom.host),Vn=G=>{const le=Mo(G)?G.dom.parentNode:G.dom;if(le==null||le.ownerDocument===null)return!1;const Ce=le.ownerDocument;return Zo(Ve.fromDom(le)).fold(()=>Ce.body.contains(le),P(Vn,br))};var Kt=(G,le,Ce,Ke,st)=>G(Ce,Ke)?q.some(Ce):k(st)&&st(Ce)?q.none():le(Ce,Ke,st);const Ps=(G,le,Ce)=>{let Ke=G.dom;const st=k(Ce)?Ce:z;for(;Ke.parentNode;){Ke=Ke.parentNode;const rn=Ve.fromDom(Ke);if(le(rn))return q.some(rn);if(st(rn))break}return q.none()},Bo=(G,le,Ce)=>Kt((st,rn)=>rn(st),Ps,G,le,Ce),Nr=(G,le,Ce)=>Ps(G,Ke=>dn(Ke,le),Ce),uc=(G,le,Ce)=>Kt((st,rn)=>dn(st,rn),Nr,G,le,Ce),Hi=G=>uc(G,"[contenteditable]"),ir=(G,le=!1)=>Vn(G)?G.dom.isContentEditable:Hi(G).fold(B(le),Ce=>Wr(Ce)==="true"),Wr=G=>G.dom.contentEditable,mi=(G,le)=>{Zs(G).each(Ke=>{Ke.dom.insertBefore(le.dom,G.dom)})},dc=(G,le)=>{bn(G).fold(()=>{Zs(G).each(st=>{_i(st,le)})},Ke=>{mi(Ke,le)})},Ti=(G,le)=>{lt(G).fold(()=>{_i(G,le)},Ke=>{G.dom.insertBefore(le.dom,Ke.dom)})},_i=(G,le)=>{G.dom.appendChild(le.dom)},yr=(G,le)=>{ie(le,Ce=>{mi(G,Ce)})},Ui=(G,le)=>{ie(le,Ce=>{_i(G,Ce)})},Es=G=>{G.dom.textContent="",ie(qs(G),le=>{_t(le)})},_t=G=>{const le=G.dom;le.parentNode!==null&&le.parentNode.removeChild(le)};var Hn=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),Cs=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),_r=tinymce.util.Tools.resolve("tinymce.util.VK");const fn=G=>he(G,Ve.fromDom),Xt=Object.keys,Ii=(G,le)=>{const Ce=Xt(G);for(let Ke=0,st=Ce.length;Ke<st;Ke++){const rn=Ce[Ke],ks=G[rn];le(ks,rn)}},kl=G=>(le,Ce)=>{G[Ce]=le},ll=(G,le,Ce,Ke)=>{Ii(G,(st,rn)=>{(le(st,rn)?Ce:Ke)(st,rn)})},_o=(G,le)=>{const Ce={};return ll(G,le,kl(Ce),O),Ce},Qn=(G,le,Ce)=>{if(l(Ce)||h(Ce)||T(Ce))G.setAttribute(le,Ce+"");else throw console.error("Invalid call to Attribute.set. Key ",le,":: Value ",Ce,":: Element ",G),new Error("Attribute value was not simple")},js=(G,le)=>{const Ce=G.dom;Ii(le,(Ke,st)=>{Qn(Ce,st,Ke)})},Ao=G=>Ue(G.dom.attributes,(le,Ce)=>(le[Ce.name]=Ce.value,le),{}),Tr=(G,le)=>Ve.fromDom(G.dom.cloneNode(le)),Go=G=>Tr(G,!0),hr=(G,le)=>{const Ce=Ve.fromTag(le),Ke=Ao(G);return js(Ce,Ke),Ce},Ai=(G,le)=>{const Ce=hr(G,le);dc(G,Ce);const Ke=qs(G);return Ui(Ce,Ke),_t(G),Ce};var fc=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),tr=tinymce.util.Tools.resolve("tinymce.util.Tools");const xl=G=>le=>S(le)&&le.nodeName.toLowerCase()===G,cl=G=>le=>S(le)&&G.test(le.nodeName),gr=G=>S(G)&&G.nodeType===3,hi=G=>S(G)&&G.nodeType===1,ii=cl(/^(OL|UL|DL)$/),Mu=cl(/^(OL|UL)$/),Ac=xl("ol"),ba=cl(/^(LI|DT|DD)$/),ar=cl(/^(DT|DD)$/),zf=cl(/^(TH|TD)$/),ya=xl("br"),Nu=G=>{var le;return((le=G.parentNode)===null||le===void 0?void 0:le.firstChild)===G},co=(G,le)=>S(le)&&le.nodeName in G.schema.getTextBlockElements(),uo=(G,le)=>S(G)&&G.nodeName in le,Fr=(G,le)=>S(le)&&le.nodeName in G.schema.getVoidElements(),zi=(G,le)=>ya(le)?G.isBlock(le.nextSibling)&&!ya(le.previousSibling):!1,lr=(G,le,Ce)=>{const Ke=G.isEmpty(le);return Ce&&G.select("span[data-mce-type=bookmark]",le).length>0?!1:Ke},pc=(G,le)=>G.isChildOf(le,G.getRoot()),ai=G=>le=>le.options.get(G),mu=G=>{const le=G.options.register;le("lists_indent_on_tab",{processor:"boolean",default:!0})},jl=ai("lists_indent_on_tab"),bs=ai("forced_root_block"),Hs=ai("forced_root_block_attrs"),No=(G,le,Ce={})=>{const Ke=G.dom,st=G.schema.getBlockElements(),rn=Ke.createFragment(),ks=bs(G),ro=Hs(G);let Js,cs,Di=!1;for(cs=Ke.create(ks,{...ro,...Ce.style?{style:Ce.style}:{}}),uo(le.firstChild,st)||rn.appendChild(cs);Js=le.firstChild;){const Ra=Js.nodeName;!Di&&(Ra!=="SPAN"||Js.getAttribute("data-mce-type")!=="bookmark")&&(Di=!0),uo(Js,st)?(rn.appendChild(Js),cs=null):(cs||(cs=Ke.create(ks,ro),rn.appendChild(cs)),cs.appendChild(Js))}return!Di&&cs&&cs.appendChild(Ke.create("br",{"data-mce-bogus":"1"})),rn},So=fc.DOM,Si=(G,le,Ce)=>{const Ke=cs=>{const Di=cs.parentNode;Di&&tr.each(st,Ra=>{Di.insertBefore(Ra,Ce.parentNode)}),So.remove(cs)},st=So.select('span[data-mce-type="bookmark"]',le),rn=No(G,Ce),ks=So.createRng();ks.setStartAfter(Ce),ks.setEndAfter(le);const ro=ks.extractContents();for(let cs=ro.firstChild;cs;cs=cs.firstChild)if(cs.nodeName==="LI"&&G.dom.isEmpty(cs)){So.remove(cs);break}G.dom.isEmpty(ro)||So.insertAfter(ro,le),So.insertAfter(rn,le);const Js=Ce.parentElement;Js&&lr(G.dom,Js)&&Ke(Js),So.remove(Ce),lr(G.dom,le)&&So.remove(le)},Ja=er("dd"),ad=er("dt"),Wf=(G,le)=>{Ja(le)?Ai(le,"dt"):ad(le)&&Xa(le).each(Ce=>Si(G,Ce.dom,le.dom))},hu=G=>{ad(G)&&Ai(G,"dd")},za=(G,le,Ce)=>{le==="Indent"?ie(Ce,hu):ie(Ce,Ke=>Wf(G,Ke))},ia=(G,le)=>{if(gr(G))return{container:G,offset:le};const Ce=Hn.getNode(G,le);return gr(Ce)?{container:Ce,offset:le>=G.childNodes.length?Ce.data.length:0}:Ce.previousSibling&&gr(Ce.previousSibling)?{container:Ce.previousSibling,offset:Ce.previousSibling.data.length}:Ce.nextSibling&&gr(Ce.nextSibling)?{container:Ce.nextSibling,offset:0}:{container:G,offset:le}},qc=G=>{const le=G.cloneRange(),Ce=ia(G.startContainer,G.startOffset);le.setStart(Ce.container,Ce.offset);const Ke=ia(G.endContainer,G.endOffset);return le.setEnd(Ke.container,Ke.offset),le},jf=["OL","UL","DL"],Vm=jf.join(","),Qa=(G,le)=>{const Ce=le||G.selection.getStart(!0);return G.dom.getParent(Ce,Vm,Us(G,Ce))},Te=(G,le)=>S(G)&&le.length===1&&le[0]===G,We=G=>Be(G.querySelectorAll(Vm),ii),rt=G=>{const le=Qa(G),Ce=G.selection.getSelectedBlocks();return Te(le,Ce)?We(le):Be(Ce,Ke=>ii(Ke)&&le!==Ke)},zt=(G,le)=>{const Ce=tr.map(le,Ke=>{const st=G.dom.getParent(Ke,"li,dd,dt",Us(G,Ke));return st||Ke});return At(Ce)},pn=G=>{const le=G.selection.getSelectedBlocks();return Be(zt(G,le),ba)},jt=G=>Be(pn(G),ar),ns=(G,le)=>{const Ce=G.dom.getParents(le,"TD,TH");return Ce.length>0?Ce[0]:G.getBody()},eo=(G,le)=>!ii(le)&&!ba(le)&&de(jf,Ce=>G.isValidChild(le.nodeName,Ce)),Us=(G,le)=>{const Ce=G.dom.getParents(le,G.dom.isBlock),Ke=rn=>rn.nodeName.toLowerCase()!==bs(G);return Ye(Ce,rn=>Ke(rn)&&eo(G.schema,rn)).getOr(G.getBody())},be=G=>Zs(G).exists(le=>ba(le.dom)&<(le).exists(Ce=>!ii(Ce.dom))&&yt(le).exists(Ce=>!ii(Ce.dom))),ke=(G,le)=>{const Ce=G.dom.getParents(le,"ol,ul",Us(G,le));return ht(Ce)},Je=G=>{const le=ke(G,G.selection.getStart()),Ce=Be(G.selection.getSelectedBlocks(),Mu);return le.toArray().concat(Ce)},xt=G=>{const le=G.selection.getStart();return G.dom.getParents(le,"ol,ul",Us(G,le))},es=G=>{const le=Je(G),Ce=xt(G);return Ye(Ce,Ke=>be(Ve.fromDom(Ke))).fold(()=>wn(G,le),Ke=>[Ke])},wn=(G,le)=>{const Ce=he(le,Ke=>ke(G,Ke).getOr(Ke));return At(Ce)},Vo=G=>/\btox\-/.test(G.className),Wa=(G,le)=>V(G,ii,zf).exists(Ce=>Ce.nodeName===le&&!Vo(Ce)),Gt=(G,le)=>le!==null&&!G.dom.isEditable(le),Zl=G=>{const le=Qa(G);return Gt(G,le)||!G.selection.isEditable()},Er=(G,le)=>{const Ce=G.dom.getParent(le,"ol,ul,dl");return Gt(G,Ce)||!G.selection.isEditable()},ef=(G,le)=>{const Ce=G.selection.getNode();return le({parents:G.dom.getParents(Ce),element:Ce}),G.on("NodeChange",le),()=>G.off("NodeChange",le)},Oi=(G,le)=>{const Ke=document.createDocumentFragment();return ie(G,st=>{Ke.appendChild(st.dom)}),Ve.fromDom(Ke)},fo=(G,le,Ce)=>G.dispatch("ListMutation",{action:le,element:Ce}),Ia=(G=>le=>le.replace(G,""))(/^\s+|\s+$/g),Oc=G=>G.length>0,Wi=G=>!Oc(G),Dd=G=>G.style!==void 0&&k(G.style.getPropertyValue),p0=(G,le,Ce)=>{if(!l(Ce))throw console.error("Invalid call to CSS.set. Property ",le,":: Value ",Ce,":: Element ",G),new Error("CSS value must be a string: "+Ce);Dd(G)&&G.style.setProperty(le,Ce)},Hv=(G,le,Ce)=>{const Ke=G.dom;p0(Ke,le,Ce)},jr=G=>Le(G,"OL,UL"),Zb=G=>Le(G,"LI"),ja=G=>lt(G).exists(jr),hc=G=>yt(G).exists(jr),Gc=G=>"listAttributes"in G,Zf=G=>"isComment"in G,Uv=G=>"isFragment"in G,oo=G=>G.depth>0,Zp=G=>G.isSelected,tf=G=>{const le=qs(G),Ce=hc(G)?le.slice(0,-1):le;return he(Ce,Go)},nf=(G,le,Ce)=>Zs(G).filter(jo).map(Ke=>({depth:le,dirty:!1,isSelected:Ce,content:tf(G),itemAttributes:Ao(G),listAttributes:Ao(Ke),listType:yo(Ke),isInPreviousLi:!1})),Wh=(G,le)=>{_i(G.item,le.list)},li=G=>{for(let le=1;le<G.length;le++)Wh(G[le-1],G[le])},Aa=(G,le)=>{Ht(ht(G),ft(le),Wh)},qp=(G,le)=>{const Ce={list:Ve.fromTag(le,G),item:Ve.fromTag("li",G)};return _i(Ce.list,Ce.item),Ce},m0=(G,le,Ce)=>{const Ke=[];for(let st=0;st<Ce;st++)Ke.push(qp(G,Gc(le)?le.listType:le.parentListType));return Ke},qf=(G,le)=>{for(let Ce=0;Ce<G.length-1;Ce++)Hv(G[Ce].item,"list-style-type","none");ht(G).each(Ce=>{Gc(le)&&(js(Ce.list,le.listAttributes),js(Ce.item,le.itemAttributes)),Ui(Ce.item,le.content)})},Rc=(G,le)=>{yo(G.list)!==le.listType&&(G.list=Ai(G.list,le.listType)),js(G.list,le.listAttributes)},el=(G,le,Ce)=>{const Ke=Ve.fromTag("li",G);return js(Ke,le),Ui(Ke,Ce),Ke},Tl=(G,le)=>{_i(G.list,le),G.item=le},ql=(G,le,Ce)=>{const Ke=le.slice(0,Ce.depth);return ht(Ke).each(st=>{if(Gc(Ce)){const rn=el(G,Ce.itemAttributes,Ce.content);Tl(st,rn),Rc(st,Ce)}else if(Uv(Ce))Ui(st.item,Ce.content);else{const rn=Ve.fromHtml("<!--".concat(Ce.content,"-->"));_i(st.list,rn)}}),Ke},ld=(G,le,Ce)=>{const Ke=m0(G,Ce,Ce.depth-le.length);return li(Ke),qf(Ke,Ce),Aa(le,Ke),le.concat(Ke)},Gp=(G,le)=>{let Ce=q.none();const Ke=Ue(le,(st,rn,ks)=>Zf(rn)?ks===0?(Ce=q.some(rn),st):ql(G,st,rn):rn.depth>st.length?ld(G,st,rn):ql(G,st,rn),[]);return Ce.each(st=>{const rn=Ve.fromHtml("<!--".concat(st.content,"-->"));ft(Ke).each(ks=>{Ti(ks.list,rn)})}),ft(Ke).map(st=>st.list)},gi=(G,le)=>{switch(G){case"Indent":le.depth++;break;case"Outdent":le.depth--;break;case"Flatten":le.depth=0}le.dirty=!0},Hm=(G,le)=>{Gc(G)&&Gc(le)&&(G.listType=le.listType,G.listAttributes={...le.listAttributes})},Y1=G=>{G.listAttributes=_o(G.listAttributes,(le,Ce)=>Ce!=="start")},Gf=(G,le)=>{const Ce=G[le].depth,Ke=rn=>rn.depth===Ce&&!rn.dirty,st=rn=>rn.depth<Ce;return V(Dt(G.slice(0,le)),Ke,st).orThunk(()=>V(G.slice(le+1),Ke,st))},X1=G=>(ie(G,(le,Ce)=>{Gf(G,Ce).fold(()=>{le.dirty&&Gc(le)&&Y1(le)},Ke=>Hm(le,Ke))}),G),qb=G=>{let le=G;return{get:()=>le,set:st=>{le=st}}},ze=(G,le,Ce,Ke)=>{var st;if(xr(Ke))return[{depth:G+1,content:(st=Ke.dom.nodeValue)!==null&&st!==void 0?st:"",dirty:!1,isSelected:!1,isComment:!0}];le.each(ro=>{kn(ro.start,Ke)&&Ce.set(!0)});const rn=nf(Ke,G,Ce.get());le.each(ro=>{kn(ro.end,Ke)&&Ce.set(!1)});const ks=yt(Ke).filter(jr).map(ro=>$n(G,le,Ce,ro)).getOr([]);return rn.toArray().concat(ks)},an=(G,le,Ce,Ke)=>lt(Ke).filter(jr).fold(()=>ze(G,le,Ce,Ke),st=>{const rn=Ue(qs(Ke),(ks,ro,Js)=>{if(Js===0)return ks;if(Zb(ro))return ks.concat(ze(G,le,Ce,ro));{const cs={isFragment:!0,depth:G,content:[ro],isSelected:!1,dirty:!1,parentListType:yo(st)};return ks.concat(cs)}},[]);return $n(G,le,Ce,st).concat(rn)}),$n=(G,le,Ce,Ke)=>St(qs(Ke),st=>{const rn=jr(st)?$n:an,ks=G+1;return rn(ks,le,Ce,st)}),Ds=(G,le)=>{const Ce=qb(!1),Ke=0;return he(G,st=>({sourceList:st,entries:$n(Ke,le,Ce,st)}))},Eo=(G,le)=>{const Ce=X1(le);return he(Ce,Ke=>{const st=Zf(Ke)?Oi([Ve.fromHtml("<!--".concat(Ke.content,"-->"))]):Oi(Ke.content),rn=Gc(Ke)?Ke.itemAttributes:{};return Ve.fromDom(No(G,st.dom,rn))})},Yt=(G,le)=>{const Ce=X1(le);return Gp(G.contentDocument,Ce).toArray()},Ys=(G,le)=>St($e(le,oo),Ce=>ft(Ce).exists(oo)?Yt(G,Ce):Eo(G,Ce)),ko=(G,le)=>{ie(Be(G,Zp),Ce=>gi(le,Ce))},ei=G=>{const le=he(pn(G),Ve.fromDom);return Ht(Ye(le,Y(ja)),Ye(Dt(le),Y(ja)),(Ce,Ke)=>({start:Ce,end:Ke}))},Pi=(G,le,Ce)=>{const Ke=Ds(le,ei(G));ie(Ke,st=>{ko(st.entries,Ce);const rn=Ys(G,st.entries);ie(rn,ks=>{fo(G,Ce==="Indent"?"IndentList":"OutdentList",ks.dom)}),yr(st.sourceList,rn),_t(st.sourceList)})},ji=(G,le)=>{const Ce=fn(es(G)),Ke=fn(jt(G));let st=!1;if(Ce.length||Ke.length){const rn=G.selection.getBookmark();Pi(G,Ce,le),za(G,le,Ke),G.selection.moveToBookmark(rn),G.selection.setRng(qc(G.selection.getRng())),G.nodeChanged(),st=!0}return st},Ko=(G,le)=>!Zl(G)&&ji(G,le),sf=G=>Ko(G,"Indent"),jh=G=>Ko(G,"Outdent"),Gb=G=>Ko(G,"Flatten"),et="\uFEFF",Zh=G=>G===et,Kc=(G,le,Ce)=>Ps(G,le,Ce).isSome(),wC=(G,le)=>Kc(G,Z(kn,le));var $5=tinymce.util.Tools.resolve("tinymce.dom.BookmarkManager");const J1=fc.DOM,Yo=G=>{const le={},Ce=Ke=>{let st=G[Ke?"startContainer":"endContainer"],rn=G[Ke?"startOffset":"endOffset"];if(hi(st)){const ks=J1.create("span",{"data-mce-type":"bookmark"});st.hasChildNodes()?(rn=Math.min(rn,st.childNodes.length-1),Ke?st.insertBefore(ks,st.childNodes[rn]):J1.insertAfter(ks,st.childNodes[rn])):st.appendChild(ks),st=ks,rn=0}le[Ke?"startContainer":"endContainer"]=st,le[Ke?"startOffset":"endOffset"]=rn};return Ce(!0),G.collapsed||Ce(),le},Zi=G=>{const le=Ke=>{const st=ro=>{var Js;let cs=(Js=ro.parentNode)===null||Js===void 0?void 0:Js.firstChild,Di=0;for(;cs;){if(cs===ro)return Di;(!hi(cs)||cs.getAttribute("data-mce-type")!=="bookmark")&&Di++,cs=cs.nextSibling}return-1};let rn=G[Ke?"startContainer":"endContainer"],ks=G[Ke?"startOffset":"endOffset"];if(rn){if(hi(rn)&&rn.parentNode){const ro=rn;ks=st(rn),rn=rn.parentNode,J1.remove(ro),!rn.hasChildNodes()&&J1.isBlock(rn)&&rn.appendChild(J1.create("br"))}G[Ke?"startContainer":"endContainer"]=rn,G[Ke?"startOffset":"endOffset"]=ks}};le(!0),le();const Ce=J1.createRng();return Ce.setStart(G.startContainer,G.startOffset),G.endContainer&&Ce.setEnd(G.endContainer,G.endOffset),qc(Ce)},gu=G=>{switch(G){case"UL":return"ToggleUlList";case"OL":return"ToggleOlList";case"DL":return"ToggleDLList"}},Kp=(G,le,Ce)=>{const Ke=Ce["list-style-type"]?Ce["list-style-type"]:null;G.setStyle(le,"list-style-type",Ke)},B5=(G,le)=>{tr.each(le,(Ce,Ke)=>{G.setAttribute(Ke,Ce)})},qh=(G,le,Ce)=>{B5(le,Ce["list-attributes"]),tr.each(G.select("li",le),Ke=>{B5(Ke,Ce["list-item-attributes"])})},Yc=(G,le,Ce)=>{Kp(G,le,Ce),qh(G,le,Ce)},zv=(G,le,Ce)=>{tr.each(Ce,Ke=>G.setStyle(le,Ke,""))},h0=(G,le)=>S(le)&&!uo(le,G.schema.getBlockElements()),Gh=(G,le,Ce,Ke)=>{let st=le[Ce?"startContainer":"endContainer"];const rn=le[Ce?"startOffset":"endOffset"];hi(st)&&(st=st.childNodes[Math.min(rn,st.childNodes.length-1)]||st),!Ce&&ya(st.nextSibling)&&(st=st.nextSibling);const ks=Js=>{for(;!G.dom.isBlock(Js)&&Js.parentNode&&Ke!==Js;)Js=Js.parentNode;return Js},ro=(Js,cs)=>{var Di;const Ra=new Cs(Js,ks(Js)),Lc=cs?"next":"prev";let qm;for(;qm=Ra[Lc]();)if(!(Fr(G,qm)||Zh(qm.textContent)||((Di=qm.textContent)===null||Di===void 0?void 0:Di.length)===0))return q.some(qm);return q.none()};if(Ce&&gr(st))if(Zh(st.textContent))st=ro(st,!1).getOr(st);else for(st.parentNode!==null&&h0(G,st.parentNode)&&(st=st.parentNode);st.previousSibling!==null&&(h0(G,st.previousSibling)||gr(st.previousSibling));)st=st.previousSibling;if(!Ce&&gr(st))if(Zh(st.textContent))st=ro(st,!0).getOr(st);else for(st.parentNode!==null&&h0(G,st.parentNode)&&(st=st.parentNode);st.nextSibling!==null&&(h0(G,st.nextSibling)||gr(st.nextSibling));)st=st.nextSibling;for(;st.parentNode!==Ke;){const Js=st.parentNode;if(co(G,st)||/^(TD|TH)$/.test(Js.nodeName))return st;st=Js}return st},Um=(G,le,Ce)=>{const Ke=[],st=G.dom,rn=Gh(G,le,!0,Ce),ks=Gh(G,le,!1,Ce);let ro;const Js=[];for(let cs=rn;cs&&(Js.push(cs),cs!==ks);cs=cs.nextSibling);return tr.each(Js,cs=>{var Di;if(co(G,cs)){Ke.push(cs),ro=null;return}if(st.isBlock(cs)||ya(cs)){ya(cs)&&st.remove(cs),ro=null;return}const Ra=cs.nextSibling;if($5.isBookmarkNode(cs)&&(ii(Ra)||co(G,Ra)||!Ra&&cs.parentNode===Ce)){ro=null;return}ro||(ro=st.create("p"),(Di=cs.parentNode)===null||Di===void 0||Di.insertBefore(ro,cs),Ke.push(ro)),ro.appendChild(cs)}),Ke},g0=(G,le,Ce)=>{const Ke=G.getStyle(le,"list-style-type");let st=Ce?Ce["list-style-type"]:"";return st=st===null?"":st,Ke===st},cd=(G,le)=>{const Ce=G.selection.getStart(!0),Ke=Gh(G,le,!0,G.getBody());return wC(Ve.fromDom(Ke),Ve.fromDom(le.commonAncestorContainer))?le.commonAncestorContainer:Ce},v0=(G,le,Ce)=>{const Ke=G.selection.getRng();let st="LI";const rn=Us(G,cd(G,Ke)),ks=G.dom;if(ks.getContentEditable(G.selection.getNode())==="false")return;le=le.toUpperCase(),le==="DL"&&(st="DT");const ro=Yo(Ke),Js=Be(Um(G,Ke,rn),G.dom.isEditable);tr.each(Js,cs=>{let Di;const Ra=cs.previousSibling,Lc=cs.parentNode;ba(Lc)||(Ra&&ii(Ra)&&Ra.nodeName===le&&g0(ks,Ra,Ce)?(Di=Ra,cs=ks.rename(cs,st),Ra.appendChild(cs)):(Di=ks.create(le),Lc.insertBefore(Di,cs),Di.appendChild(cs),cs=ks.rename(cs,st)),zv(ks,cs,["margin","margin-right","margin-bottom","margin-left","margin-top","padding","padding-right","padding-bottom","padding-left","padding-top"]),Yc(ks,Di,Ce),Kh(G.dom,Di))}),G.selection.setRng(Zi(ro))},Il=(G,le)=>ii(G)&&G.nodeName===(le==null?void 0:le.nodeName),zm=(G,le,Ce)=>{const Ke=G.getStyle(le,"list-style-type",!0),st=G.getStyle(Ce,"list-style-type",!0);return Ke===st},of=(G,le)=>G.className===le.className,Dc=(G,le,Ce)=>Il(le,Ce)&&zm(G,le,Ce)&&of(le,Ce),Kh=(G,le)=>{let Ce,Ke=le.nextSibling;if(Dc(G,le,Ke)){const st=Ke;for(;Ce=st.firstChild;)le.appendChild(Ce);G.remove(st)}if(Ke=le.previousSibling,Dc(G,le,Ke)){const st=Ke;for(;Ce=st.lastChild;)le.insertBefore(Ce,le.firstChild);G.remove(st)}},EC=(G,le,Ce,Ke)=>{if(le.nodeName!==Ce){const st=G.dom.rename(le,Ce);Yc(G.dom,st,Ke),fo(G,gu(Ce),st)}else Yc(G.dom,le,Ke),fo(G,gu(Ce),le)},Wv=(G,le,Ce,Ke)=>{if(le.classList.forEach((st,rn,ks)=>{st.startsWith("tox-")&&(ks.remove(st),ks.length===0&&le.removeAttribute("class"))}),le.nodeName!==Ce){const st=G.dom.rename(le,Ce);Yc(G.dom,st,Ke),fo(G,gu(Ce),st)}else Yc(G.dom,le,Ke),fo(G,gu(Ce),le)},Kf=(G,le,Ce,Ke,st)=>{const rn=ii(le);if(rn&&le.nodeName===Ke&&!Q1(st)&&!Vo(le))Gb(G);else{v0(G,Ke,st);const ks=Yo(G.selection.getRng()),ro=rn?[le,...Ce]:Ce,Js=rn&&Vo(le)?Wv:EC;tr.each(ro,cs=>{Js(G,cs,Ke,st)}),G.selection.setRng(Zi(ks))}},Q1=G=>"list-style-type"in G,V5=(G,le,Ce,Ke)=>{if(le!==G.getBody())if(le)if(le.nodeName===Ce&&!Q1(Ke)&&!Vo(le))Gb(G);else{const st=Yo(G.selection.getRng());Vo(le)&&le.classList.forEach((ks,ro,Js)=>{ks.startsWith("tox-")&&(Js.remove(ks),Js.length===0&&le.removeAttribute("class"))}),Yc(G.dom,le,Ke);const rn=G.dom.rename(le,Ce);Kh(G.dom,rn),G.selection.setRng(Zi(st)),v0(G,Ce,Ke),fo(G,gu(Ce),rn)}else v0(G,Ce,Ke),fo(G,gu(Ce),le)},jv=(G,le,Ce)=>{const Ke=Qa(G);if(Er(G,Ke))return;const st=rt(G),rn=f(Ce)?Ce:{};st.length>0?Kf(G,Ke,st,le,rn):V5(G,Ke,le,rn)},H5=fc.DOM,_9=(G,le)=>{const Ce=le.parentElement;if(Ce&&Ce.nodeName==="LI"&&Ce.firstChild===le){const Ke=Ce.previousSibling;Ke&&Ke.nodeName==="LI"?(Ke.appendChild(le),lr(G,Ce)&&H5.remove(Ce)):H5.setStyle(Ce,"listStyleType","none")}if(ii(Ce)){const Ke=Ce.previousSibling;Ke&&Ke.nodeName==="LI"&&Ke.appendChild(le)}},U5=(G,le)=>{const Ce=tr.grep(G.select("ol,ul",le));tr.each(Ce,Ke=>{_9(G,Ke)})},Yp=(G,le,Ce,Ke)=>{let st=le.startContainer;const rn=le.startOffset;if(gr(st)&&(Ce?rn<st.data.length:rn>0))return st;const ks=G.schema.getNonEmptyElements();hi(st)&&(st=Hn.getNode(st,rn));const ro=new Cs(st,Ke);Ce&&zi(G.dom,st)&&ro.next();const Js=Ce?ro.next.bind(ro):ro.prev2.bind(ro);for(;st=Js();)if(st.nodeName==="LI"&&!st.hasChildNodes()||ks[st.nodeName]||gr(st)&&st.data.length>0)return st;return null},Kb=(G,le)=>{const Ce=le.childNodes;return Ce.length===1&&!ii(Ce[0])&&G.isBlock(Ce[0])},Yf=G=>q.from(G).map(Ve.fromDom).filter(Po).exists(le=>ir(le)&&!ge(["details"],yo(le))),qi=(G,le)=>{Kb(G,le)&&Yf(le.firstChild)&&G.remove(le.firstChild,!0)},tl=(G,le,Ce)=>{let Ke;const st=Kb(G,Ce)?Ce.firstChild:Ce;if(qi(G,le),!lr(G,le,!0))for(;Ke=le.firstChild;)st.appendChild(Ke)},Fu=(G,le,Ce)=>{let Ke;const st=le.parentNode;if(!pc(G,le)||!pc(G,Ce))return;ii(Ce.lastChild)&&(Ke=Ce.lastChild),st===Ce.lastChild&&ya(st.previousSibling)&&G.remove(st.previousSibling);const rn=Ce.lastChild;rn&&ya(rn)&&le.hasChildNodes()&&G.remove(rn),lr(G,Ce,!0)&&Es(Ve.fromDom(Ce)),tl(G,le,Ce),Ke&&Ce.appendChild(Ke);const ro=Bt(Ve.fromDom(Ce),Ve.fromDom(le))?G.getParents(le,ii,Ce):[];G.remove(le),ie(ro,Js=>{lr(G,Js)&&Js!==G.getRoot()&&G.remove(Js)})},b0=(G,le,Ce)=>{Es(Ve.fromDom(Ce)),Fu(G.dom,le,Ce),G.selection.setCursorLocation(Ce,0)},y0=(G,le,Ce,Ke)=>{const st=G.dom;if(st.isEmpty(Ke))b0(G,Ce,Ke);else{const rn=Yo(le);Fu(st,Ce,Ke),G.selection.setRng(Zi(rn))}},ul=(G,le,Ce,Ke)=>{const st=Yo(le);Fu(G.dom,Ce,Ke);const rn=Zi(st);G.selection.setRng(rn)},ds=(G,le)=>{const Ce=G.dom,Ke=G.selection,st=Ke.getStart(),rn=ns(G,st),ks=Ce.getParent(Ke.getStart(),"LI",rn);if(ks){const ro=ks.parentElement;if(ro===G.getBody()&&lr(Ce,ro))return!0;const Js=qc(Ke.getRng()),cs=Ce.getParent(Yp(G,Js,le,rn),"LI",rn),Di=cs&&(le?Ce.isChildOf(ks,cs):Ce.isChildOf(cs,ks));if(cs&&cs!==ks&&!Di)return G.undoManager.transact(()=>{le?y0(G,Js,cs,ks):Nu(ks)?jh(G):ul(G,Js,ks,cs)}),!0;if(Di&&!le&&cs!==ks)return G.undoManager.transact(()=>{if(Js.commonAncestorContainer.parentElement){const Ra=Yo(Js),Lc=Js.commonAncestorContainer.parentElement;tl(Ce,Js.commonAncestorContainer.parentElement,cs),Lc.remove();const qm=Zi(Ra);G.selection.setRng(qm)}}),!0;if(!cs&&!le&&Js.startOffset===0&&Js.endOffset===0)return G.undoManager.transact(()=>{Gb(G)}),!0}return!1},Yb=(G,le,Ce)=>{const Ke=G.getParent(le.parentNode,G.isBlock,Ce);G.remove(le),Ke&&G.isEmpty(Ke)&&G.remove(Ke)},Wm=(G,le)=>{const Ce=G.dom,Ke=G.selection.getStart(),st=ns(G,Ke),rn=Ce.getParent(Ke,Ce.isBlock,st);if(rn&&Ce.isEmpty(rn,void 0,{checkRootAsContent:!0})){const ks=qc(G.selection.getRng()),ro=Ce.getParent(Yp(G,ks,le,st),"LI",st);if(ro){const Js=Lc=>ge(["td","th","caption"],yo(Lc)),cs=Lc=>Lc.dom===st,Di=Bo(Ve.fromDom(ro),Js,cs),Ra=Bo(Ve.fromDom(ks.startContainer),Js,cs);return ct(Di,Ra,kn)?(G.undoManager.transact(()=>{const Lc=ro.parentNode;Yb(Ce,rn,st),Kh(Ce,Lc),G.selection.select(ro,!0),G.selection.collapse(le)}),!0):!1}}return!1},$u=(G,le)=>ds(G,le)||Wm(G,le),vr=G=>{const le=G.selection.getStart(),Ce=ns(G,le);return G.dom.getParent(le,"LI,DT,DD",Ce)||pn(G).length>0},Yh=G=>vr(G)?(G.undoManager.transact(()=>{let le=!0;const Ce=()=>le=!1;G.on("input",Ce),G.execCommand("Delete"),G.off("input",Ce),le&&G.dispatch("input"),U5(G.dom,G.getBody())}),!0):!1,_0=(G,le)=>{const Ce=G.selection;return!Er(G,Ce.getNode())&&(Ce.isCollapsed()?$u(G,le):Yh(G))},Zv=G=>{G.on("ExecCommand",le=>{const Ce=le.command.toLowerCase();(Ce==="delete"||Ce==="forwarddelete")&&vr(G)&&U5(G.dom,G.getBody())}),G.on("keydown",le=>{le.keyCode===_r.BACKSPACE?_0(G,!1)&&le.preventDefault():le.keyCode===_r.DELETE&&_0(G,!0)&&le.preventDefault()})},z5=G=>({backspaceDelete:le=>{_0(G,le)}}),no=(G,le)=>{const Ce=Qa(G);Ce===null||Er(G,Ce)||G.undoManager.transact(()=>{f(le.styles)&&G.dom.setStyles(Ce,le.styles),f(le.attrs)&&Ii(le.attrs,(Ke,st)=>G.dom.setAttrib(Ce,st,Ke))})},Oa=G=>{const le=Dt(Ia(G).split("")),Ce=he(le,(Ke,st)=>{const rn=Ke.toUpperCase().charCodeAt(0)-65+1;return Math.pow(26,st)*rn});return Ue(Ce,(Ke,st)=>Ke+st,0)},eg=G=>{if(G--,G<0)return"";{const le=G%26,Ce=Math.floor(G/26),Ke=eg(Ce),st=String.fromCharCode(65+le);return Ke+st}},vu=G=>/^[A-Z]+$/.test(G),Xc=G=>/^[a-z]+$/.test(G),ud=G=>/^[0-9]+$/.test(G),Al=G=>ud(G)?2:vu(G)?0:Xc(G)?1:Wi(G)?3:4,Jc=G=>{switch(Al(G)){case 2:return q.some({listStyleType:q.none(),start:G});case 0:return q.some({listStyleType:q.some("upper-alpha"),start:Oa(G).toString()});case 1:return q.some({listStyleType:q.some("lower-alpha"),start:Oa(G).toString()});case 3:return q.some({listStyleType:q.none(),start:""});case 4:return q.none()}},dd=G=>{const le=parseInt(G.start,10);return hn(G.listStyleType,"upper-alpha")?eg(le):hn(G.listStyleType,"lower-alpha")?eg(le).toLowerCase():G.start},qv=G=>{const le=Qa(G);!Ac(le)||Er(G,le)||G.windowManager.open({title:"List Properties",body:{type:"panel",items:[{type:"input",name:"start",label:"Start list at number",inputMode:"numeric"}]},initialData:{start:dd({start:G.dom.getAttrib(le,"start","1"),listStyleType:q.from(G.dom.getStyle(le,"list-style-type"))})},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:Ce=>{const Ke=Ce.getData();Jc(Ke.start).each(st=>{G.execCommand("mceListUpdate",!1,{attrs:{start:st.start==="1"?"":st.start},styles:{"list-style-type":st.listStyleType.getOr("")}})}),Ce.close()}})},Ri=(G,le)=>()=>{const Ce=Qa(G);return S(Ce)&&Ce.nodeName===le},Gv=G=>{G.addCommand("mceListProps",()=>{qv(G)})},_a=G=>{G.on("BeforeExecCommand",le=>{const Ce=le.command.toLowerCase();Ce==="indent"?sf(G):Ce==="outdent"&&jh(G)}),G.addCommand("InsertUnorderedList",(le,Ce)=>{jv(G,"UL",Ce)}),G.addCommand("InsertOrderedList",(le,Ce)=>{jv(G,"OL",Ce)}),G.addCommand("InsertDefinitionList",(le,Ce)=>{jv(G,"DL",Ce)}),G.addCommand("RemoveList",()=>{Gb(G)}),Gv(G),G.addCommand("mceListUpdate",(le,Ce)=>{f(Ce)&&no(G,Ce)}),G.addQueryStateHandler("InsertUnorderedList",Ri(G,"UL")),G.addQueryStateHandler("InsertOrderedList",Ri(G,"OL")),G.addQueryStateHandler("InsertDefinitionList",Ri(G,"DL"))};var jm=tinymce.util.Tools.resolve("tinymce.html.Node");const Zm=G=>G.type===3,ti=G=>G.length===0,Xp=G=>{const le=(st,rn)=>{const ks=jm.create("li");ie(st,ro=>ks.append(ro)),rn?G.insert(ks,rn,!0):G.append(ks)},Ce=(st,rn)=>Zm(rn)?[...st,rn]:!ti(st)&&!Zm(rn)?(le(st,rn),[]):st,Ke=Ue(G.children(),Ce,[]);ti(Ke)||le(Ke)},S9=G=>{G.on("PreInit",()=>{const{parser:le}=G;le.addNodeFilter("ul,ol",Ce=>ie(Ce,Xp))})},Xb=G=>{G.on("keydown",le=>{le.keyCode!==_r.TAB||_r.metaKeyPressed(le)||G.undoManager.transact(()=>{(le.shiftKey?jh(G):sf(G))&&le.preventDefault()})})},Gi=G=>{jl(G)&&Xb(G),Zv(G)},S0=(G,le)=>Ce=>{const Ke=st=>{Ce.setActive(Wa(st.parents,le)),Ce.setEnabled(!Er(G,st.element)&&G.selection.isEditable())};return Ce.setEnabled(G.selection.isEditable()),ef(G,Ke)},Xf=G=>{const le=Ce=>()=>G.execCommand(Ce);G.hasPlugin("advlist")||(G.ui.registry.addToggleButton("numlist",{icon:"ordered-list",active:!1,tooltip:"Numbered list",onAction:le("InsertOrderedList"),onSetup:S0(G,"OL")}),G.ui.registry.addToggleButton("bullist",{icon:"unordered-list",active:!1,tooltip:"Bullet list",onAction:le("InsertUnorderedList"),onSetup:S0(G,"UL")}))},xo=(G,le)=>Ce=>ef(G,st=>Ce.setEnabled(Wa(st.parents,le)&&!Er(G,st.element))),tg=G=>{const le={text:"List properties...",icon:"ordered-list",onAction:()=>G.execCommand("mceListProps"),onSetup:xo(G,"OL")};G.ui.registry.addMenuItem("listprops",le),G.ui.registry.addContextMenu("lists",{update:Ce=>{const Ke=Qa(G,Ce);return Ac(Ke)?["listprops"]:[]}})};var Kv=()=>{e.add("lists",G=>(mu(G),S9(G),G.hasPlugin("rtc",!0)?Gv(G):(Gi(G),_a(G)),Xf(G),tg(G),z5(G)))};Kv()}()),t5e}var s5e;function pZe(){return s5e||(s5e=1,fZe()),e5e}pZe();var o5e={},r5e={},i5e;function mZe(){return i5e||(i5e=1,function(){var e=tinymce.util.Tools.resolve("tinymce.ModelManager");const t=(y,w,A)=>{var M;return A(y,w.prototype)?!0:((M=y.constructor)===null||M===void 0?void 0:M.name)===w.name},n=y=>{const w=typeof y;return y===null?"null":w==="object"&&Array.isArray(y)?"array":w==="object"&&t(y,String,(A,M)=>M.isPrototypeOf(A))?"string":w},i=y=>w=>n(w)===y,a=y=>w=>typeof w===y,l=y=>w=>y===w,f=i("string"),d=i("object"),h=i("array"),b=l(null),S=a("boolean"),k=l(void 0),T=y=>y==null,O=y=>!T(y),P=a("function"),B=a("number"),W=()=>{},Z=(y,w)=>(...A)=>y(w.apply(null,A)),Y=(y,w)=>A=>y(w(A)),z=y=>()=>y,q=y=>y,ne=(y,w)=>y===w;function ue(y,...w){return(...A)=>{const M=w.concat(A);return y.apply(null,M)}}const J=y=>w=>!y(w),ce=y=>()=>{throw new Error(y)},ge=y=>y(),de=z(!1),he=z(!0);class ie{constructor(w,A){this.tag=w,this.value=A}static some(w){return new ie(!0,w)}static none(){return ie.singletonNone}fold(w,A){return this.tag?A(this.value):w()}isSome(){return this.tag}isNone(){return!this.tag}map(w){return this.tag?ie.some(w(this.value)):ie.none()}bind(w){return this.tag?w(this.value):ie.none()}exists(w){return this.tag&&w(this.value)}forall(w){return!this.tag||w(this.value)}filter(w){return!this.tag||w(this.value)?this:ie.none()}getOr(w){return this.tag?this.value:w}or(w){return this.tag?this:w}getOrThunk(w){return this.tag?this.value:w()}orThunk(w){return this.tag?this:w()}getOrDie(w){if(this.tag)return this.value;throw new Error(w!=null?w:"Called getOrDie on None")}static from(w){return O(w)?ie.some(w):ie.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(w){this.tag&&w(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?"some(".concat(this.value,")"):"none()"}}ie.singletonNone=new ie(!1);const Be=Array.prototype.slice,$e=Array.prototype.indexOf,Ue=Array.prototype.push,V=(y,w)=>$e.call(y,w),Ye=(y,w)=>V(y,w)>-1,Fe=(y,w)=>{for(let A=0,M=y.length;A<M;A++){const K=y[A];if(w(K,A))return!0}return!1},St=(y,w)=>{const A=[];for(let M=0;M<y;M++)A.push(w(M));return A},Dt=(y,w)=>{const A=y.length,M=new Array(A);for(let K=0;K<A;K++){const re=y[K];M[K]=w(re,K)}return M},He=(y,w)=>{for(let A=0,M=y.length;A<M;A++){const K=y[A];w(K,A)}},ft=(y,w)=>{for(let A=y.length-1;A>=0;A--){const M=y[A];w(M,A)}},ht=(y,w)=>{const A=[],M=[];for(let K=0,re=y.length;K<re;K++){const _e=y[K];(w(_e,K)?A:M).push(_e)}return{pass:A,fail:M}},At=(y,w)=>{const A=[];for(let M=0,K=y.length;M<K;M++){const re=y[M];w(re,M)&&A.push(re)}return A},hn=(y,w,A)=>(ft(y,(M,K)=>{A=w(A,M,K)}),A),ct=(y,w,A)=>(He(y,(M,K)=>{A=w(A,M,K)}),A),Ht=(y,w,A)=>{for(let M=0,K=y.length;M<K;M++){const re=y[M];if(w(re,M))return ie.some(re);if(A(re,M))break}return ie.none()},ye=(y,w)=>Ht(y,w,de),lo=(y,w)=>{for(let A=0,M=y.length;A<M;A++){const K=y[A];if(w(K,A))return ie.some(A)}return ie.none()},jn=y=>{const w=[];for(let A=0,M=y.length;A<M;++A){if(!h(y[A]))throw new Error("Arr.flatten item "+A+" was not an array, input: "+y);Ue.apply(w,y[A])}return w},so=(y,w)=>jn(Dt(y,w)),Xs=(y,w)=>{for(let A=0,M=y.length;A<M;++A){const K=y[A];if(w(K,A)!==!0)return!1}return!0},ot=y=>{const w=Be.call(y,0);return w.reverse(),w},Qe=(y,w)=>{const A={};for(let M=0,K=y.length;M<K;M++){const re=y[M];A[String(re)]=w(re,M)}return A},Ot=(y,w)=>{const A=Be.call(y,0);return A.sort(w),A},Nt=(y,w)=>w>=0&&w<y.length?ie.some(y[w]):ie.none(),Ve=y=>Nt(y,0),dn=y=>Nt(y,y.length-1),kn=(y,w)=>{for(let A=0;A<y.length;A++){const M=w(y[A],A);if(M.isSome())return M}return ie.none()},Bt=Object.keys,Le=Object.hasOwnProperty,je=(y,w)=>{const A=Bt(y);for(let M=0,K=A.length;M<K;M++){const re=A[M],_e=y[re];w(_e,re)}},Ze=(y,w)=>pt(y,(A,M)=>({k:M,v:w(A,M)})),pt=(y,w)=>{const A={};return je(y,(M,K)=>{const re=w(M,K);A[re.k]=re.v}),A},Vt=y=>(w,A)=>{y[A]=w},sn=(y,w,A,M)=>{je(y,(K,re)=>{(w(K,re)?A:M)(K,re)})},Wn=(y,w)=>{const A={};return sn(y,w,Vt(A),W),A},ts=(y,w)=>{const A=[];return je(y,(M,K)=>{A.push(w(M,K))}),A},Zn=y=>ts(y,q),yo=(y,w)=>Qs(y,w)?ie.from(y[w]):ie.none(),Qs=(y,w)=>Le.call(y,w),Rs=(y,w)=>Qs(y,w)&&y[w]!==void 0&&y[w]!==null,xr=y=>{for(const w in y)if(Le.call(y,w))return!1;return!0},Po=typeof window<"u"?window:Function("return this;")(),jo=(y,w)=>{let A=w!=null?w:Po;for(let M=0;M<y.length&&A!==void 0&&A!==null;++M)A=A[y[M]];return A},Mo=(y,w)=>{const A=y.split(".");return jo(A,w)},Do=(y,w)=>Mo(y,w),er=(y,w)=>{const A=Do(y,w);if(A==null)throw new Error(y+" not available on this browser");return A},Zs=Object.getPrototypeOf,Xa=y=>er("HTMLElement",y),bn=y=>{const w=Mo("ownerDocument.defaultView",y);return d(y)&&(Xa(w).prototype.isPrototypeOf(y)||/^HTML\w*Element$/.test(Zs(y).constructor.name))},qs=8,Qr=9,lt=11,yt=1,_n=3,us=y=>y.dom.nodeName.toLowerCase(),Zo=y=>y.dom.nodeType,br=y=>w=>Zo(w)===y,Vn=y=>Zo(y)===qs||us(y)==="#comment",Kt=y=>Ps(y)&&bn(y.dom),Ps=br(yt),Bo=br(_n),Nr=br(Qr),uc=br(lt),Hi=y=>w=>Ps(w)&&us(w)===y,ir=(y,w,A)=>{if(f(A)||S(A)||B(A))y.setAttribute(w,A+"");else throw console.error("Invalid call to Attribute.set. Key ",w,":: Value ",A,":: Element ",y),new Error("Attribute value was not simple")},Wr=(y,w,A)=>{ir(y.dom,w,A)},mi=(y,w)=>{const A=y.dom;je(w,(M,K)=>{ir(A,K,M)})},dc=(y,w)=>{je(w,(A,M)=>{A.fold(()=>{yr(y,M)},K=>{ir(y.dom,M,K)})})},Ti=(y,w)=>{const A=y.dom.getAttribute(w);return A===null?void 0:A},_i=(y,w)=>ie.from(Ti(y,w)),yr=(y,w)=>{y.dom.removeAttribute(w)},Ui=y=>ct(y.dom.attributes,(w,A)=>(w[A.name]=A.value,w),{}),Es=(y,w)=>{const M=(w||document).createElement("div");if(M.innerHTML=y,!M.hasChildNodes()||M.childNodes.length>1){const K="HTML does not have a single root node";throw console.error(K,y),new Error(K)}return Cs(M.childNodes[0])},_t=(y,w)=>{const M=(w||document).createElement(y);return Cs(M)},Hn=(y,w)=>{const M=(w||document).createTextNode(y);return Cs(M)},Cs=y=>{if(y==null)throw new Error("Node cannot be null or undefined");return{dom:y}},fn={fromHtml:Es,fromTag:_t,fromText:Hn,fromDom:Cs,fromPoint:(y,w,A)=>ie.from(y.dom.elementFromPoint(w,A)).map(Cs)},Xt=(y,w)=>{const A=y.dom;if(A.nodeType!==yt)return!1;{const M=A;if(M.matches!==void 0)return M.matches(w);if(M.msMatchesSelector!==void 0)return M.msMatchesSelector(w);if(M.webkitMatchesSelector!==void 0)return M.webkitMatchesSelector(w);if(M.mozMatchesSelector!==void 0)return M.mozMatchesSelector(w);throw new Error("Browser lacks native selectors")}},Ii=y=>y.nodeType!==yt&&y.nodeType!==Qr&&y.nodeType!==lt||y.childElementCount===0,kl=(y,w)=>{const A=w===void 0?document:w.dom;return Ii(A)?[]:Dt(A.querySelectorAll(y),fn.fromDom)},ll=(y,w)=>{const A=w===void 0?document:w.dom;return Ii(A)?ie.none():ie.from(A.querySelector(y)).map(fn.fromDom)},_o=(y,w)=>y.dom===w.dom,Qn=(y,w)=>{const A=y.dom,M=w.dom;return A===M?!1:A.contains(M)},js=Xt,Ao=y=>fn.fromDom(y.dom.ownerDocument),Tr=y=>Nr(y)?y:Ao(y),Go=y=>fn.fromDom(Tr(y).dom.documentElement),hr=y=>fn.fromDom(Tr(y).dom.defaultView),Ai=y=>ie.from(y.dom.parentNode).map(fn.fromDom),fc=y=>ie.from(y.dom.parentElement).map(fn.fromDom),tr=(y,w)=>{const A=P(w)?w:de;let M=y.dom;const K=[];for(;M.parentNode!==null&&M.parentNode!==void 0;){const re=M.parentNode,_e=fn.fromDom(re);if(K.push(_e),A(_e)===!0)break;M=re}return K},xl=y=>ie.from(y.dom.previousSibling).map(fn.fromDom),cl=y=>ie.from(y.dom.nextSibling).map(fn.fromDom),gr=y=>Dt(y.dom.childNodes,fn.fromDom),hi=(y,w)=>{const A=y.dom.childNodes;return ie.from(A[w]).map(fn.fromDom)},ii=y=>hi(y,0),Mu=(y,w)=>{Ai(y).each(M=>{M.dom.insertBefore(w.dom,y.dom)})},Ac=(y,w)=>{cl(y).fold(()=>{Ai(y).each(K=>{ar(K,w)})},M=>{Mu(M,w)})},ba=(y,w)=>{ii(y).fold(()=>{ar(y,w)},M=>{y.dom.insertBefore(w.dom,M.dom)})},ar=(y,w)=>{y.dom.appendChild(w.dom)},zf=(y,w,A)=>{hi(y,A).fold(()=>{ar(y,w)},M=>{Mu(M,w)})},ya=(y,w)=>{Mu(y,w),ar(w,y)},Nu=(y,w)=>{He(w,(A,M)=>{const K=M===0?y:w[M-1];Ac(K,A)})},co=(y,w)=>{He(w,A=>{ar(y,A)})},uo=y=>{y.dom.textContent="",He(gr(y),w=>{Fr(w)})},Fr=y=>{const w=y.dom;w.parentNode!==null&&w.parentNode.removeChild(w)},zi=y=>{const w=gr(y);w.length>0&&Nu(y,w),Fr(y)},lr=(y,w)=>fn.fromDom(y.dom.cloneNode(w)),pc=y=>lr(y,!1),ai=y=>lr(y,!0),mu=(y,w)=>{const A=fn.fromTag(w),M=Ui(y);return mi(A,M),A},jl=(y,w)=>{const A=mu(y,w),M=gr(ai(y));return co(A,M),A},bs=(y,w)=>{const A=mu(y,w);Ac(y,A);const M=gr(y);return co(A,M),Fr(y),A},Hs=["tfoot","thead","tbody","colgroup"],No=y=>Ye(Hs,y),So=(y,w)=>({rows:y,columns:w}),Si=(y,w)=>({row:y,column:w}),Ja=(y,w,A)=>({element:y,rowspan:w,colspan:A}),ad=(y,w,A,M)=>({element:y,rowspan:w,colspan:A,isNew:M}),Wf=(y,w,A,M,K,re)=>({element:y,rowspan:w,colspan:A,row:M,column:K,isLocked:re}),hu=(y,w,A)=>({element:y,cells:w,section:A}),za=(y,w,A,M)=>({element:y,cells:w,section:A,isNew:M}),ia=(y,w,A)=>({element:y,isNew:w,isLocked:A}),qc=(y,w,A,M)=>({element:y,cells:w,section:A,isNew:M}),jf=(y,w,A,M)=>({startRow:y,startCol:w,finishRow:A,finishCol:M}),Vm=(y,w,A)=>({element:y,colspan:w,column:A}),Qa=(y,w)=>({element:y,columns:w}),Te=y=>uc(y)&&O(y.dom.host),We=y=>fn.fromDom(y.dom.getRootNode()),rt=y=>Te(y)?y:fn.fromDom(Tr(y).dom.body),zt=y=>{const w=We(y);return Te(w)?ie.some(w):ie.none()},pn=y=>fn.fromDom(y.dom.host),jt=y=>{if(O(y.target)){const w=fn.fromDom(y.target);if(Ps(w)&&ns(w)&&y.composed&&y.composedPath){const A=y.composedPath();if(A)return Ve(A)}}return ie.from(y.target)},ns=y=>O(y.dom.shadowRoot),eo=y=>{const w=Bo(y)?y.dom.parentNode:y.dom;if(w==null||w.ownerDocument===null)return!1;const A=w.ownerDocument;return zt(fn.fromDom(w)).fold(()=>A.body.contains(w),Y(eo,pn))},Us=()=>be(fn.fromDom(document)),be=y=>{const w=y.dom.body;if(w==null)throw new Error("Body is not available yet");return fn.fromDom(w)},ke=(y,w,A)=>At(tr(y,A),w),Je=(y,w)=>At(gr(y),w),xt=(y,w)=>{let A=[];return He(gr(y),M=>{w(M)&&(A=A.concat([M])),A=A.concat(xt(M,w))}),A},es=(y,w,A)=>ke(y,M=>Xt(M,w),A),wn=(y,w)=>Je(y,A=>Xt(A,w)),Vo=(y,w)=>kl(w,y);var Wa=(y,w,A,M,K)=>y(A,M)?ie.some(A):P(K)&&K(A)?ie.none():w(A,M,K);const Gt=(y,w,A)=>{let M=y.dom;const K=P(A)?A:de;for(;M.parentNode;){M=M.parentNode;const re=fn.fromDom(M);if(w(re))return ie.some(re);if(K(re))break}return ie.none()},Zl=(y,w,A)=>Wa((K,re)=>re(K),Gt,y,w,A),Er=(y,w)=>{const A=K=>w(fn.fromDom(K));return ye(y.dom.childNodes,A).map(fn.fromDom)},ef=(y,w)=>{const A=M=>{for(let K=0;K<M.childNodes.length;K++){const re=fn.fromDom(M.childNodes[K]);if(w(re))return ie.some(re);const _e=A(M.childNodes[K]);if(_e.isSome())return _e}return ie.none()};return A(y.dom)},Oi=(y,w,A)=>Gt(y,M=>Xt(M,w),A),fo=(y,w)=>Er(y,A=>Xt(A,w)),mc=(y,w)=>ll(w,y),Ia=(y,w,A)=>Wa((K,re)=>Xt(K,re),Oi,y,w,A),Oc=(y,w,A=ne)=>y.exists(M=>A(M,w)),Wi=y=>{const w=[],A=M=>{w.push(M)};for(let M=0;M<y.length;M++)y[M].each(A);return w},Dd=(y,w)=>y!=null?w(y):ie.none(),p0=(y,w)=>y?ie.some(w):ie.none(),Hv=(y,w)=>y.substring(w),jr=(y,w,A)=>w===""||y.length>=w.length&&y.substr(A,A+w.length)===w,Zb=(y,w)=>hc(y,w)?Hv(y,w.length):y,ja=(y,w,A=0,M)=>{const K=y.indexOf(w,A);return K!==-1?k(M)?!0:K+w.length<=M:!1},hc=(y,w)=>jr(y,w,0),Gc=(y,w)=>jr(y,w,y.length-w.length),Uv=(y=>w=>w.replace(y,""))(/^\s+|\s+$/g),oo=y=>y.length>0,Zp=y=>{const w=parseFloat(y);return isNaN(w)?ie.none():ie.some(w)},tf=y=>y.style!==void 0&&P(y.style.getPropertyValue),nf=(y,w,A)=>{if(!f(A))throw console.error("Invalid call to CSS.set. Property ",w,":: Value ",A,":: Element ",y),new Error("CSS value must be a string: "+A);tf(y)&&y.style.setProperty(w,A)},Wh=(y,w)=>{tf(y)&&y.style.removeProperty(w)},li=(y,w,A)=>{const M=y.dom;nf(M,w,A)},Aa=(y,w)=>{const A=y.dom;je(w,(M,K)=>{nf(A,K,M)})},qp=(y,w)=>{const A=y.dom,K=window.getComputedStyle(A).getPropertyValue(w);return K===""&&!eo(y)?m0(A,w):K},m0=(y,w)=>tf(y)?y.style.getPropertyValue(w):"",qf=(y,w)=>{const A=y.dom,M=m0(A,w);return ie.from(M).filter(K=>K.length>0)},Rc=(y,w)=>{const A=y.dom;Wh(A,w),Oc(_i(y,"style").map(Uv),"")&&yr(y,"style")},el=(y,w)=>{const A=y.dom,M=w.dom;tf(A)&&tf(M)&&(M.style.cssText=A.style.cssText)},Tl=(y,w,A=0)=>_i(y,w).map(M=>parseInt(M,10)).getOr(A),ql=(y,w)=>Tl(y,w,1),ld=y=>Hi("col")(y)?Tl(y,"span",1)>1:ql(y,"colspan")>1,Gp=y=>ql(y,"rowspan")>1,gi=(y,w)=>parseInt(qp(y,w),10),Hm=z(10),Y1=z(10),Gf=(y,w)=>X1(y,w,he),X1=(y,w,A)=>so(gr(y),M=>Xt(M,w)?A(M)?[M]:[]:X1(M,w,A)),qb=(y,w,A=de)=>{if(A(w))return ie.none();if(Ye(y,us(w)))return ie.some(w);const M=K=>Xt(K,"table")||A(K);return Oi(w,y.join(","),M)},ze=(y,w)=>qb(["td","th"],y,w),an=y=>Gf(y,"th,td"),$n=y=>Xt(y,"colgroup")?wn(y,"col"):so(Yt(y),w=>wn(w,"col")),Ds=(y,w)=>Ia(y,"table",w),Eo=y=>Gf(y,"tr"),Yt=y=>Ds(y).fold(z([]),w=>wn(w,"colgroup")),Ys=(y,w)=>Dt(y,A=>{if(us(A)==="colgroup"){const M=Dt($n(A),K=>{const re=Tl(K,"span",1);return Ja(K,1,re)});return hu(A,M,"colgroup")}else{const M=Dt(an(A),K=>{const re=Tl(K,"rowspan",1),_e=Tl(K,"colspan",1);return Ja(K,re,_e)});return hu(A,M,w(A))}}),ko=y=>Ai(y).map(w=>{const A=us(w);return No(A)?A:"tbody"}).getOr("tbody"),ei=y=>{const w=Eo(y),M=[...Yt(y),...w];return Ys(M,ko)},Pi=(y,w)=>Ys(y,()=>w),ji=y=>{let w=!1,A;return(...M)=>(w||(w=!0,A=y.apply(null,M)),A)},Ko=(y,w,A,M)=>{const K=y.isiOS()&&/ipad/i.test(A)===!0,re=y.isiOS()&&!K,_e=y.isiOS()||y.isAndroid(),Ae=_e||M("(pointer:coarse)"),Re=K||!re&&_e&&M("(min-device-width:768px)"),nt=re||_e&&!Re,vt=w.isSafari()&&y.isiOS()&&/safari/i.test(A)===!1,tn=!nt&&!Re&&!vt;return{isiPad:z(K),isiPhone:z(re),isTablet:z(Re),isPhone:z(nt),isTouch:z(Ae),isAndroid:y.isAndroid,isiOS:y.isiOS,isWebView:z(vt),isDesktop:z(tn)}},sf=(y,w)=>{for(let A=0;A<y.length;A++){const M=y[A];if(M.test(w))return M}},jh=(y,w)=>{const A=sf(y,w);if(!A)return{major:0,minor:0};const M=K=>Number(w.replace(A,"$"+K));return Zh(M(1),M(2))},Gb=(y,w)=>{const A=String(w).toLowerCase();return y.length===0?et():jh(y,A)},et=()=>Zh(0,0),Zh=(y,w)=>({major:y,minor:w}),Kc={nu:Zh,detect:Gb,unknown:et},wC=(y,w)=>kn(w.brands,A=>{const M=A.brand.toLowerCase();return ye(y,K=>{var re;return M===((re=K.brand)===null||re===void 0?void 0:re.toLowerCase())}).map(K=>({current:K.name,version:Kc.nu(parseInt(A.version,10),0)}))}),$5=(y,w)=>{const A=String(w).toLowerCase();return ye(y,M=>M.search(A))},J1=(y,w)=>$5(y,w).map(A=>{const M=Kc.detect(A.versionRegexes,w);return{current:A.name,version:M}}),Yo=(y,w)=>$5(y,w).map(A=>{const M=Kc.detect(A.versionRegexes,w);return{current:A.name,version:M}}),Zi=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,gu=y=>w=>ja(w,y),Kp=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:y=>ja(y,"edge/")&&ja(y,"chrome")&&ja(y,"safari")&&ja(y,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Zi],search:y=>ja(y,"chrome")&&!ja(y,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:y=>ja(y,"msie")||ja(y,"trident")},{name:"Opera",versionRegexes:[Zi,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:gu("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:gu("firefox")},{name:"Safari",versionRegexes:[Zi,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:y=>(ja(y,"safari")||ja(y,"mobile/"))&&ja(y,"applewebkit")}],B5=[{name:"Windows",search:gu("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:y=>ja(y,"iphone")||ja(y,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:gu("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:gu("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:gu("linux"),versionRegexes:[]},{name:"Solaris",search:gu("sunos"),versionRegexes:[]},{name:"FreeBSD",search:gu("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:gu("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],qh={browsers:z(Kp),oses:z(B5)},Yc="Edge",zv="Chromium",h0="IE",Gh="Opera",Um="Firefox",g0="Safari",cd=()=>v0({current:void 0,version:Kc.unknown()}),v0=y=>{const w=y.current,A=y.version,M=K=>()=>w===K;return{current:w,version:A,isEdge:M(Yc),isChromium:M(zv),isIE:M(h0),isOpera:M(Gh),isFirefox:M(Um),isSafari:M(g0)}},Il={unknown:cd,nu:v0},zm="Windows",of="iOS",Dc="Android",Kh="Linux",EC="macOS",Wv="Solaris",Kf="FreeBSD",Q1="ChromeOS",V5=()=>jv({current:void 0,version:Kc.unknown()}),jv=y=>{const w=y.current,A=y.version,M=K=>()=>w===K;return{current:w,version:A,isWindows:M(zm),isiOS:M(of),isAndroid:M(Dc),isMacOS:M(EC),isLinux:M(Kh),isSolaris:M(Wv),isFreeBSD:M(Kf),isChromeOS:M(Q1)}},H5={unknown:V5,nu:jv},U5={detect:(y,w,A)=>{const M=qh.browsers(),K=qh.oses(),re=w.bind(Re=>wC(M,Re)).orThunk(()=>J1(M,y)).fold(Il.unknown,Il.nu),_e=Yo(K,y).fold(H5.unknown,H5.nu),Ae=Ko(_e,re,y,A);return{browser:re,os:_e,deviceType:Ae}}},Yp=y=>window.matchMedia(y).matches;let Kb=ji(()=>U5.detect(window.navigator.userAgent,ie.from(window.navigator.userAgentData),Yp));const Yf=()=>Kb(),qi=(y,w)=>{const A=(Ae,Re)=>{if(!B(Re)&&!Re.match(/^[0-9]+$/))throw new Error(y+".set accepts only positive integer values. Value was "+Re);const nt=Ae.dom;tf(nt)&&(nt.style[y]=Re+"px")},M=Ae=>{const Re=w(Ae);if(Re<=0||Re===null){const nt=qp(Ae,y);return parseFloat(nt)||0}return Re},K=M,re=(Ae,Re)=>ct(Re,(nt,vt)=>{const tn=qp(Ae,vt),An=tn===void 0?0:parseInt(tn,10);return isNaN(An)?nt:nt+An},0);return{set:A,get:M,getOuter:K,aggregate:re,max:(Ae,Re,nt)=>{const vt=re(Ae,nt);return Re>vt?Re-vt:0}}},tl=(y,w)=>Zp(y).getOr(w),Fu=(y,w,A)=>tl(qp(y,w),A),b0=(y,w,A,M)=>{const K=Fu(y,"padding-".concat(A),0),re=Fu(y,"padding-".concat(M),0),_e=Fu(y,"border-".concat(A,"-width"),0),Ae=Fu(y,"border-".concat(M,"-width"),0);return w-K-re-_e-Ae},y0=(y,w)=>{const A=y.dom,M=A.getBoundingClientRect().width||A.offsetWidth;return b0(y,M,"left","right")},ul=y=>Fu(y,"height",y.dom.offsetHeight),ds=y=>Fu(y,"width",y.dom.offsetWidth),Yb=y=>y0(y),Wm=qi("width",y=>y.dom.offsetWidth),$u=y=>Wm.get(y),vr=y=>Wm.getOuter(y),Yh=Yb,_0=ds,Zv=(y,w,A)=>{const M=y.cells,K=M.slice(0,w),re=M.slice(w),_e=K.concat(A).concat(re);return Oa(y,_e)},z5=(y,w,A)=>Zv(y,w,[A]),no=(y,w,A)=>{const M=y.cells;M[w]=A},Oa=(y,w)=>qc(y.element,w,y.section,y.isNew),eg=(y,w)=>{const A=y.cells,M=Dt(A,w);return qc(y.element,M,y.section,y.isNew)},vu=(y,w)=>y.cells[w],Xc=(y,w)=>vu(y,w).element,ud=y=>y.cells.length,Al=y=>{const w=ht(y,A=>A.section==="colgroup");return{rows:w.fail,cols:w.pass}},Jc=(y,w,A)=>{const M=Dt(y.cells,A);return qc(w(y.element),M,y.section,!0)},dd="data-snooker-locked-cols",qv=y=>_i(y,dd).bind(w=>ie.from(w.match(/\d+/g))).map(w=>Qe(w,he)),Ri=y=>{const w=ct(Al(y).rows,(M,K)=>(He(K.cells,(re,_e)=>{re.isLocked&&(M[_e]=!0)}),M),{}),A=ts(w,(M,K)=>parseInt(K,10));return Ot(A)},Gv=(y,w)=>y+","+w,_a=(y,w,A)=>ie.from(y.access[Gv(w,A)]),jm=(y,w,A)=>{const M=Zm(y,K=>A(w,K.element));return M.length>0?ie.some(M[0]):ie.none()},Zm=(y,w)=>{const A=so(y.all,M=>M.cells);return At(A,w)},ti=y=>{const w={};let A=0;return He(y.cells,M=>{const K=M.colspan;St(K,re=>{const _e=A+re;w[_e]=Vm(M.element,K,_e)}),A+=K}),w},Xp=y=>{const w={},A=[],K=Ve(y).map(mn=>mn.element).bind(Ds).bind(qv).getOr({});let re=0,_e=0,Ae=0;const{pass:Re,fail:nt}=ht(y,mn=>mn.section==="colgroup");He(nt,mn=>{const gn=[];He(mn.cells,ss=>{let on=0;for(;w[Gv(Ae,on)]!==void 0;)on++;const ws=Rs(K,on.toString()),qt=Wf(ss.element,ss.rowspan,ss.colspan,Ae,on,ws);for(let Fn=0;Fn<ss.colspan;Fn++)for(let Sr=0;Sr<ss.rowspan;Sr++){const Cr=Ae+Sr,ls=on+Fn,Xr=Gv(Cr,ls);w[Xr]=qt,_e=Math.max(_e,ls+1)}gn.push(qt)}),re++,A.push(hu(mn.element,gn,mn.section)),Ae++});const{columns:vt,colgroups:tn}=dn(Re).map(mn=>{const gn=ti(mn);return{colgroups:[Qa(mn.element,Zn(gn))],columns:gn}}).getOrThunk(()=>({colgroups:[],columns:{}}));return{grid:So(re,_e),access:w,all:A,columns:vt,colgroups:tn}},xo={fromTable:y=>{const w=ei(y);return Xp(w)},generate:Xp,getAt:_a,findItem:jm,filterItems:Zm,justCells:y=>so(y.all,w=>w.cells),justColumns:y=>Zn(y.columns),hasColumns:y=>Bt(y.columns).length>0,getColumnAt:(y,w)=>ie.from(y.columns[w])},tg=(y,w=he)=>{const A=y.grid,M=St(A.columns,q),K=St(A.rows,q);return Dt(M,re=>Kv(()=>so(K,nt=>xo.getAt(y,nt,re).filter(vt=>vt.column===re).toArray()),nt=>nt.colspan===1&&w(nt.element),()=>xo.getAt(y,0,re)))},Kv=(y,w,A)=>{const M=y();return ye(M,w).orThunk(()=>ie.from(M[0]).orThunk(A)).map(_e=>_e.element)},G=y=>{const w=y.grid,A=St(w.rows,q),M=St(w.columns,q);return Dt(A,K=>Kv(()=>so(M,Re=>xo.getAt(y,K,Re).filter(nt=>nt.row===K).fold(z([]),nt=>[nt])),Re=>Re.rowspan===1,()=>xo.getAt(y,K,0)))},le=(y,w)=>{if(w<0||w>=y.length-1)return ie.none();const A=y[w].fold(()=>{const K=ot(y.slice(0,w));return kn(K,(re,_e)=>re.map(Ae=>({value:Ae,delta:_e+1})))},K=>ie.some({value:K,delta:0})),M=y[w+1].fold(()=>{const K=y.slice(w+1);return kn(K,(re,_e)=>re.map(Ae=>({value:Ae,delta:_e+1})))},K=>ie.some({value:K,delta:1}));return A.bind(K=>M.map(re=>{const _e=re.delta+K.delta;return Math.abs(re.value-K.value)/_e}))},Ce=(y,w)=>A=>Ke(A)==="rtl"?w:y,Ke=y=>qp(y,"direction")==="rtl"?"rtl":"ltr",st=qi("height",y=>{const w=y.dom;return eo(y)?w.getBoundingClientRect().height:w.offsetHeight}),rn=y=>st.get(y),ks=y=>st.getOuter(y),ro=ul,Js=(y,w)=>({left:y,top:w,translate:(M,K)=>Js(y+M,w+K)}),cs=Js,Di=y=>{const w=y.getBoundingClientRect();return cs(w.left,w.top)},Ra=(y,w)=>y!==void 0?y:w!==void 0?w:0,Lc=y=>{const w=y.dom.ownerDocument,A=w.body,M=w.defaultView,K=w.documentElement;if(A===y.dom)return cs(A.offsetLeft,A.offsetTop);const re=Ra(M==null?void 0:M.pageYOffset,K.scrollTop),_e=Ra(M==null?void 0:M.pageXOffset,K.scrollLeft),Ae=Ra(K.clientTop,A.clientTop),Re=Ra(K.clientLeft,A.clientLeft);return qm(y).translate(_e-Re,re-Ae)},qm=y=>{const w=y.dom,M=w.ownerDocument.body;return M===w?cs(M.offsetLeft,M.offsetTop):eo(y)?Di(w):cs(0,0)},kC=(y,w)=>({row:y,y:w}),C0=(y,w)=>({col:y,x:w}),W5=y=>Lc(y).left+vr(y),Pc=y=>Lc(y).left,j5=(y,w)=>C0(y,Pc(w)),C9=(y,w)=>C0(y,W5(w)),Z5=y=>Lc(y).top,Gl=(y,w)=>kC(y,Z5(w)),Jb=(y,w)=>kC(y,Z5(w)+ks(w)),Za=(y,w,A)=>{if(A.length===0)return[];const M=Dt(A.slice(1),(re,_e)=>re.map(Ae=>y(_e,Ae))),K=A[A.length-1].map(re=>w(A.length-1,re));return M.concat([K])},xC=y=>-y,bu={delta:q,positions:y=>Za(Gl,Jb,y),edge:Z5},Yv=Ce({delta:q,edge:Pc,positions:y=>Za(j5,C9,y)},{delta:xC,edge:W5,positions:y=>Za(C9,j5,y)}),q5={delta:(y,w)=>Yv(w).delta(y,w),positions:(y,w)=>Yv(w).positions(y,w),edge:y=>Yv(y).edge(y)},w9={unsupportedLength:["em","ex","cap","ch","ic","rem","lh","rlh","vw","vh","vi","vb","vmin","vmax","cm","mm","Q","in","pc","pt","px"],fixed:["px","pt"],relative:["%"],empty:[""]},G5=(()=>{const y="[0-9]+",A="[eE]"+("[+-]?"+y),M="\\.",K=Ae=>"(?:".concat(Ae,")?"),re=["Infinity",y+M+K(y)+K(A),M+y+K(A),y+K(A)].join("|"),_e="[+-]?(?:".concat(re,")");return new RegExp("^(".concat(_e,")(.*)$"))})(),Qf=(y,w)=>Fe(w,A=>Fe(w9[A],M=>y===M)),Gm=(y,w)=>ie.from(G5.exec(y)).bind(M=>{const K=Number(M[1]),re=M[2];return Qf(re,w)?ie.some({value:K,unit:re}):ie.none()}),ng=/(\d+(\.\d+)?)%/,Ln=/(\d+(\.\d+)?)px|em/,rf=Hi("col"),TC=Hi("tr"),w0=(y,w,A)=>{const M=fc(y).getOrThunk(()=>be(Ao(y)));return w(y)/A(M)*100},ep=(y,w)=>{li(y,"width",w+"px")},Qb=(y,w)=>{li(y,"width",w+"%")},sg=(y,w)=>{li(y,"height",w+"px")},E0=y=>{Rc(y,"height")},ey=y=>ro(y)+"px",Jp=(y,w,A,M)=>{const K=Ds(y).map(re=>{const _e=A(re);return Math.floor(w/100*_e)}).getOr(w);return M(y,K),K},E9=(y,w,A,M)=>{const K=parseFloat(y);return Gc(y,"%")&&us(w)!=="table"?Jp(w,K,A,M):K},Ki=y=>{const w=ey(y);return w?E9(w,y,rn,sg):rn(y)},un=(y,w,A)=>{const M=A(y),K=ql(y,w);return M/K},yu=(y,w)=>qf(y,w).orThunk(()=>_i(y,w).map(A=>A+"px")),Qp=y=>yu(y,"width"),dl=y=>yu(y,"height"),Xv=y=>w0(y,$u,Yh),fl=y=>rf(y)?$u(y):_0(y),nr=y=>TC(y)?rn(y):un(y,"rowspan",Ki),K5=y=>Qp(y).bind(A=>Gm(A,["fixed","relative","empty"])),Zt=(y,w,A)=>{li(y,"width",w+A)},cr=y=>$u(y)+"px",IC=y=>rn(y)+"px",Da=y=>w0(y,$u,Yh)+"%",tp=y=>Qp(y).exists(w=>ng.test(w)),Kl=y=>Qp(y).exists(w=>Ln.test(w)),SR=y=>Qp(y).isNone(),Km=z(ng),k9=Hi("col"),Bu=y=>Qp(y).getOrThunk(()=>fl(y)+"px"),ur=y=>dl(y).getOrThunk(()=>nr(y)+"px"),Ym=y=>Dt(xo.justColumns(y),w=>ie.from(w.element)),ty=y=>{const w=Yf().browser,A=w.isChromium()||w.isFirefox();return k9(y)?A:!0},aa=(y,w,A,M,K,re)=>y.filter(M).fold(()=>re(le(A,w)),_e=>K(_e)),Y5=(y,w,A,M)=>{const K=tg(y),re=xo.hasColumns(y)?Ym(y):K,_e=[ie.some(q5.edge(w))].concat(Dt(q5.positions(K,w),Re=>Re.map(nt=>nt.x))),Ae=J(ld);return Dt(re,(Re,nt)=>aa(Re,nt,_e,Ae,vt=>{if(ty(vt))return A(vt);{const tn=Dd(K[nt],q);return aa(tn,nt,_e,Ae,An=>M(ie.some($u(An))),M)}},M))},Xh=y=>y.map(w=>w+"px").getOr(""),x9=(y,w)=>Y5(y,w,Bu,Xh),Vu=(y,w,A)=>Y5(y,w,Xv,M=>M.fold(()=>A.minCellWidth(),K=>K/A.pixelWidth()*100)),em=(y,w,A)=>Y5(y,w,fl,M=>M.getOrThunk(A.minCellWidth)),mt=(y,w,A,M)=>{const K=G(y),re=Dt(y.all,Ae=>ie.some(Ae.element)),_e=[ie.some(bu.edge(w))].concat(Dt(bu.positions(K,w),Ae=>Ae.map(Re=>Re.y)));return Dt(re,(Ae,Re)=>aa(Ae,Re,_e,he,A,M))},Ld=(y,w)=>mt(y,w,nr,A=>A.getOrThunk(Y1)),pl=(y,w)=>mt(y,w,ur,Xh),Li=(y,w)=>()=>eo(y)?w(y):parseFloat(qf(y,"width").getOr("0")),np=y=>{const w=Li(y,$u),A=z(0);return{width:w,pixelWidth:w,getWidths:(K,re)=>em(K,y,re),getCellDelta:A,singleColumnWidth:z([0]),minCellWidth:A,setElementWidth:W,adjustTableWidth:W,isRelative:!0,label:"none"}},la=y=>{const w=Li(y,Re=>parseFloat(Da(Re))),A=Li(y,$u);return{width:w,pixelWidth:A,getWidths:(Re,nt)=>Vu(Re,y,nt),getCellDelta:Re=>Re/A()*100,singleColumnWidth:(Re,nt)=>[100-Re],minCellWidth:()=>Hm()/A()*100,setElementWidth:Qb,adjustTableWidth:Re=>{const nt=w(),vt=Re/100*nt,tn=nt+vt;Qb(y,tn)},isRelative:!0,label:"percent"}},Kr=y=>{const w=Li(y,$u);return{width:w,pixelWidth:w,getWidths:(_e,Ae)=>em(_e,y,Ae),getCellDelta:q,singleColumnWidth:(_e,Ae)=>[Math.max(Hm(),_e+Ae)-_e],minCellWidth:Hm,setElementWidth:ep,adjustTableWidth:_e=>{const Ae=w()+_e;ep(y,Ae)},isRelative:!1,label:"pixel"}},k0=(y,w)=>Km().exec(w)!==null?la(y):Kr(y),Jh={getTableSize:y=>Qp(y).fold(()=>np(y),A=>k0(y,A)),pixelSize:Kr,percentageSize:la,noneSize:np},pU=(y,w,A,M,K,re)=>({minRow:y,minCol:w,maxRow:A,maxCol:M,allCells:K,selectedCells:re}),sp=(y,w)=>{const A=y.grid.columns;let K=y.grid.rows,re=A,_e=0,Ae=0;const Re=[],nt=[];return je(y.access,vt=>{if(Re.push(vt),w(vt)){nt.push(vt);const tn=vt.row,An=tn+vt.rowspan-1,mn=vt.column,gn=mn+vt.colspan-1;tn<K?K=tn:An>_e&&(_e=An),mn<re?re=mn:gn>Ae&&(Ae=gn)}}),pU(K,re,_e,Ae,Re,nt)},X5=(y,w,A)=>{const M=y[A].element,K=fn.fromTag("td");ar(K,fn.fromTag("br")),(w?ar:ba)(M,K)},CR=(y,w,A,M)=>{const K=At(y,Ae=>Ae.section!=="colgroup"),re=w.grid.columns,_e=w.grid.rows;for(let Ae=0;Ae<_e;Ae++){let Re=!1;for(let nt=0;nt<re;nt++)Ae<A.minRow||Ae>A.maxRow||nt<A.minCol||nt>A.maxCol||(xo.getAt(w,Ae,nt).filter(M).isNone()?X5(K,Re,Ae):Re=!0)}},AC=(y,w,A,M)=>{je(A.columns,_e=>{(_e.column<w.minCol||_e.column>w.maxCol)&&Fr(_e.element)});const K=At(Gf(y,"tr"),_e=>_e.dom.childElementCount===0);He(K,Fr),(w.minCol===w.maxCol||w.minRow===w.maxRow)&&He(Gf(y,"th,td"),_e=>{yr(_e,"rowspan"),yr(_e,"colspan")}),yr(y,dd),yr(y,"data-snooker-col-series"),Jh.getTableSize(y).adjustTableWidth(M)},T9=(y,w,A,M)=>{if(M.minCol===0&&w.grid.columns===M.maxCol+1)return 0;const K=em(w,y,A),re=ct(K,(nt,vt)=>nt+vt,0),Re=ct(K.slice(M.minCol,M.maxCol+1),(nt,vt)=>nt+vt,0)/re*A.pixelWidth()-A.pixelWidth();return A.getCellDelta(Re)},I9=(y,w)=>{const A=An=>Xt(An.element,w),M=ai(y),K=ei(M),re=Jh.getTableSize(y),_e=xo.generate(K),Ae=sp(_e,A),Re="th:not("+w+"),td:not("+w+")",nt=X1(M,"th,td",An=>Xt(An,Re));He(nt,Fr),CR(K,_e,Ae,A);const vt=xo.fromTable(y),tn=T9(y,vt,re,Ae);return AC(M,Ae,_e,tn),M},rg=" ",OC=((y,w)=>{const A=re=>{if(!y(re))throw new Error("Can only get "+w+" value of a "+w+" node");return M(re).getOr("")},M=re=>y(re)?ie.from(re.dom.nodeValue):ie.none();return{get:A,getOption:M,set:(re,_e)=>{if(!y(re))throw new Error("Can only set raw "+w+" value of a "+w+" node");re.dom.nodeValue=_e}}})(Bo,"text"),RC=y=>OC.get(y),J5=y=>OC.getOption(y),A9=(y,w)=>OC.set(y,w),Qh=y=>us(y)==="img"?1:J5(y).fold(()=>gr(y).length,w=>w.length),Jv=y=>J5(y).filter(w=>w.trim().length!==0||w.indexOf(rg)>-1).isSome(),Q5=y=>Kt(y)&&Ti(y,"contenteditable")==="false",DC=["img","br"],af=y=>Jv(y)||Ye(DC,us(y))||Q5(y),O9=y=>ef(y,af),e4=y=>wR(y,af),wR=(y,w)=>{const A=M=>{const K=gr(M);for(let re=K.length-1;re>=0;re--){const _e=K[re];if(w(_e))return ie.some(_e);const Ae=A(_e);if(Ae.isSome())return Ae}return ie.none()};return A(y)},R9={scope:["row","col"]},Ol=y=>()=>{const w=fn.fromTag("td",y.dom);return ar(w,fn.fromTag("br",y.dom)),w},op=y=>()=>fn.fromTag("col",y.dom),Qv=y=>()=>fn.fromTag("colgroup",y.dom),e1=y=>()=>fn.fromTag("tr",y.dom),ER=(y,w,A)=>{const M=jl(y,w);return je(A,(K,re)=>{K===null?yr(M,re):Wr(M,re,K)}),M},fd=y=>y,t4=(y,w,A)=>O9(y).map(K=>{const re=A.join(","),_e=es(K,re,Ae=>_o(Ae,y));return hn(_e,(Ae,Re)=>{const nt=pc(Re);return ar(Ae,nt),nt},w)}).getOr(w),sy=(y,w)=>{je(R9,(A,M)=>_i(y,M).filter(K=>Ye(A,K)).each(K=>Wr(w,M,K)))},oy=(y,w,A)=>{const M=(_e,Ae)=>{el(_e.element,Ae),Rc(Ae,"height"),_e.colspan!==1&&Rc(Ae,"width")},K=_e=>{const Ae=fn.fromTag(us(_e.element),w.dom),Re=A.getOr(["strong","em","b","i","span","font","h1","h2","h3","h4","h5","h6","p","div"]),nt=Re.length>0?t4(_e.element,Ae,Re):Ae;return ar(nt,fn.fromTag("br")),M(_e,Ae),sy(_e.element,Ae),y(_e.element,Ae),Ae};return{col:_e=>{const Ae=fn.fromTag(us(_e.element),w.dom);return M(_e,Ae),y(_e.element,Ae),Ae},colgroup:Qv(w),row:e1(w),cell:K,replace:ER,colGap:op(w),gap:Ol(w)}},rp=y=>({col:op(y),colgroup:Qv(y),row:e1(y),cell:Ol(y),replace:fd,colGap:op(y),gap:Ol(y)}),ip=(y,w)=>{const M=document.createElement("div");return M.innerHTML=y,gr(fn.fromDom(M))},D9=y=>Dt(y,fn.fromDom),gc=y=>w=>w.options.get(y),n4="100%",Xm=y=>{var w;const A=y.dom,M=(w=A.getParent(y.selection.getStart(),A.isBlock))!==null&&w!==void 0?w:y.getBody();return Yh(fn.fromDom(M))+"px"},t1=(y,w)=>Mc(y)||!ry(y)?w:ap(y)?{...w,width:Xm(y)}:{...w,width:n4},Jm=(y,w)=>Mc(y)||ry(y)?w:ap(y)?{...w,width:Xm(y)}:{...w,width:n4},kR=y=>{const w=y.options.register;w("table_clone_elements",{processor:"string[]"}),w("table_use_colgroups",{processor:"boolean",default:!0}),w("table_header_type",{processor:A=>{const M=Ye(["section","cells","sectionCells","auto"],A);return M?{value:A,valid:M}:{valid:!1,message:"Must be one of: section, cells, sectionCells or auto."}},default:"section"}),w("table_sizing_mode",{processor:"string",default:"auto"}),w("table_default_attributes",{processor:"object",default:{border:"1"}}),w("table_default_styles",{processor:"object",default:{"border-collapse":"collapse"}}),w("table_column_resizing",{processor:A=>{const M=Ye(["preservetable","resizetable"],A);return M?{value:A,valid:M}:{valid:!1,message:"Must be preservetable, or resizetable."}},default:"preservetable"}),w("table_resize_bars",{processor:"boolean",default:!0}),w("table_style_by_css",{processor:"boolean",default:!0}),w("table_merge_content_on_paste",{processor:"boolean",default:!0})},e2=y=>ie.from(y.options.get("table_clone_elements")),xR=y=>{const w=y.options.get("object_resizing");return Ye(w.split(","),"table")},ig=gc("table_header_type"),ca=gc("table_column_resizing"),L9=y=>ca(y)==="preservetable",Qm=y=>ca(y)==="resizetable",n1=gc("table_sizing_mode"),x0=y=>n1(y)==="relative",ap=y=>n1(y)==="fixed",Mc=y=>n1(y)==="responsive",T0=gc("table_resize_bars"),ry=gc("table_style_by_css"),mU=gc("table_merge_content_on_paste"),eh=y=>{const w=y.options,A=w.get("table_default_attributes");return w.isSet("table_default_attributes")?A:Jm(y,A)},Yl=y=>{const w=y.options,A=w.get("table_default_styles");return w.isSet("table_default_styles")?A:t1(y,A)},iy=gc("table_use_colgroups"),TR=gc("fixed_toolbar_container"),IR=gc("fixed_toolbar_container_target"),LC=y=>{var w;if(!y.inline)return ie.none();const A=(w=TR(y))!==null&&w!==void 0?w:"";if(A.length>0)return mc(Us(),A);const M=IR(y);return O(M)?ie.some(fn.fromDom(M)):ie.none()},t2=y=>y.inline&&LC(y).isSome(),lp=gc("ui_mode"),cp=y=>!t2(y)&&lp(y)==="split",ag=y=>Ia(y,"[contenteditable]"),I0=(y,w=!1)=>eo(y)?y.dom.isContentEditable:ag(y).fold(z(w),A=>ay(A)==="true"),ay=y=>y.dom.contentEditable,n2=y=>fn.fromDom(y.getBody()),s1=y=>w=>_o(w,n2(y)),lg=y=>{yr(y,"data-mce-style");const w=A=>yr(A,"data-mce-style");He(an(y),w),He($n(y),w),He(Eo(y),w)},ly=y=>fn.fromDom(y.selection.getStart()),s4=y=>y.getBoundingClientRect().width,o4=y=>y.getBoundingClientRect().height,vo=y=>(w,A)=>{const M=w.dom.getStyle(A,y)||w.dom.getAttrib(A,y);return ie.from(M).filter(oo)},ps=vo("width"),_u=vo("height"),r4=y=>/^(\d+(\.\d+)?)%$/.test(y),i4=y=>/^(\d+(\.\d+)?)px$/.test(y),a4=y=>Zl(y,Hi("table")).exists(I0),PC=(y,w)=>{const A=w.column,M=w.column+w.colspan-1,K=w.row,re=w.row+w.rowspan-1;return A<=y.finishCol&&M>=y.startCol&&K<=y.finishRow&&re>=y.startRow},ni=(y,w)=>w.column>=y.startCol&&w.column+w.colspan-1<=y.finishCol&&w.row>=y.startRow&&w.row+w.rowspan-1<=y.finishRow,o1=(y,w)=>{let A=!0;const M=ue(ni,w);for(let K=w.startRow;K<=w.finishRow;K++)for(let re=w.startCol;re<=w.finishCol;re++)A=A&&xo.getAt(y,K,re).exists(M);return A?ie.some(w):ie.none()},AR=(y,w)=>jf(Math.min(y.row,w.row),Math.min(y.column,w.column),Math.max(y.row+y.rowspan-1,w.row+w.rowspan-1),Math.max(y.column+y.colspan-1,w.column+w.colspan-1)),P9=(y,w,A)=>{const M=xo.findItem(y,w,_o),K=xo.findItem(y,A,_o);return M.bind(re=>K.map(_e=>AR(re,_e)))},Wt=(y,w,A)=>P9(y,w,A).bind(M=>o1(y,M)),MC=(y,w,A,M)=>xo.findItem(y,w,_o).bind(K=>{const re=A>0?K.row+K.rowspan-1:K.row,_e=M>0?K.column+K.colspan-1:K.column;return xo.getAt(y,re+A,_e+M).map(Re=>Re.element)}),NC=(y,w,A)=>P9(y,w,A).map(M=>{const K=xo.filterItems(y,ue(PC,M));return Dt(K,re=>re.element)}),s2=(y,w)=>{const A=(M,K)=>Qn(K,M);return xo.findItem(y,w,A).map(M=>M.element)},OR=(y,w,A)=>Ds(y).bind(M=>{const K=l4(M);return MC(K,y,w,A)}),A0=(y,w,A)=>{const M=l4(y);return NC(M,w,A)},cy=(y,w,A,M,K)=>{const re=l4(y),_e=_o(y,A)?ie.some(w):s2(re,w),Ae=_o(y,K)?ie.some(M):s2(re,M);return _e.bind(Re=>Ae.bind(nt=>NC(re,Re,nt)))},cg=(y,w,A)=>{const M=l4(y);return Wt(M,w,A)},l4=xo.fromTable;var th=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","li","table","thead","tbody","tfoot","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"],$r=()=>{const y=nt=>fn.fromDom(nt.dom.cloneNode(!1)),w=nt=>Tr(nt).dom,A=nt=>Ps(nt)?us(nt)==="body"?!0:Ye(th,us(nt)):!1,M=nt=>Ps(nt)?Ye(["br","img","hr","input"],us(nt)):!1,K=nt=>Ps(nt)&&Ti(nt,"contenteditable")==="false",re=(nt,vt)=>nt.dom.compareDocumentPosition(vt.dom),_e=(nt,vt)=>{const tn=Ui(nt);mi(vt,tn)},Ae=nt=>{const vt=us(nt);return Ye(["script","noscript","iframe","noframes","noembed","title","style","textarea","xmp"],vt)},Re=nt=>Ps(nt)?_i(nt,"lang"):ie.none();return{up:z({selector:Oi,closest:Ia,predicate:Gt,all:tr}),down:z({selector:Vo,predicate:xt}),styles:z({get:qp,getRaw:qf,set:li,remove:Rc}),attrs:z({get:Ti,set:Wr,remove:yr,copyTo:_e}),insert:z({before:Mu,after:Ac,afterAll:Nu,append:ar,appendAll:co,prepend:ba,wrap:ya}),remove:z({unwrap:zi,remove:Fr}),create:z({nu:fn.fromTag,clone:y,text:fn.fromText}),query:z({comparePosition:re,prevSibling:xl,nextSibling:cl}),property:z({children:gr,name:us,parent:Ai,document:w,isText:Bo,isComment:Vn,isElement:Ps,isSpecial:Ae,getLanguage:Re,getText:RC,setText:A9,isBoundary:A,isEmptyTag:M,isNonEditable:K}),eq:_o,is:js}};const nh=(y,w,A,M)=>{const K=A[0],re=A.slice(1);return M(y,w,K,re)},M9=(y,w,A)=>A.length>0?nh(y,w,A,r1):ie.none(),r1=(y,w,A,M)=>{const K=w(y,A);return hn(M,(re,_e)=>{const Ae=w(y,_e);return RR(y,re,Ae)},K)},RR=(y,w,A)=>w.bind(M=>A.filter(ue(y.eq,M))),c4=(y,w)=>ue(y.eq,w),uy=(y,w,A,M=de)=>{const K=[w].concat(y.up().all(w)),re=[A].concat(y.up().all(A)),_e=vt=>lo(vt,M).fold(()=>vt,An=>vt.slice(0,An+1)),Ae=_e(K),Re=_e(re),nt=ye(Ae,vt=>Fe(Re,c4(y,vt)));return{firstpath:Ae,secondpath:Re,shared:nt}},DR=M9,up=uy,u4=$r(),o2=(y,w)=>DR(u4,(A,M)=>y(M),w),FC=(y,w,A)=>up(u4,y,w,A),O0=y=>Oi(y,"table"),d4=(y,w,A)=>{const M=K=>re=>A!==void 0&&A(re)||_o(re,K);return _o(y,w)?ie.some({boxes:ie.some([y]),start:y,finish:w}):O0(y).bind(K=>O0(w).bind(re=>{if(_o(K,re))return ie.some({boxes:A0(K,y,w),start:y,finish:w});if(Qn(K,re)){const _e=es(w,"td,th",M(K)),Ae=_e.length>0?_e[_e.length-1]:w;return ie.some({boxes:cy(K,y,K,w,re),start:y,finish:Ae})}else if(Qn(re,K)){const _e=es(y,"td,th",M(re)),Ae=_e.length>0?_e[_e.length-1]:y;return ie.some({boxes:cy(re,y,K,w,re),start:y,finish:Ae})}else return FC(y,w).shared.bind(_e=>Ia(_e,"table",A).bind(Ae=>{const Re=es(w,"td,th",M(Ae)),nt=Re.length>0?Re[Re.length-1]:w,vt=es(y,"td,th",M(Ae)),tn=vt.length>0?vt[vt.length-1]:y;return ie.some({boxes:cy(Ae,y,K,w,re),start:tn,finish:nt})}))}))},i1=(y,w)=>{const A=Vo(y,w);return A.length>0?ie.some(A):ie.none()},$C=(y,w)=>ye(y,A=>Xt(A,w)),BC=(y,w,A)=>mc(y,w).bind(M=>mc(y,A).bind(K=>o2(O0,[M,K]).map(re=>({first:M,last:K,table:re})))),lf=(y,w)=>Oi(y,"table").bind(A=>mc(A,w).bind(M=>d4(M,y).bind(K=>K.boxes.map(re=>({boxes:re,start:K.start,finish:K.finish}))))),Pd=(y,w,A,M,K)=>$C(y,K).bind(re=>OR(re,w,A).bind(_e=>lf(_e,M))),cn=(y,w)=>i1(y,w),N9=(y,w,A)=>BC(y,w,A).bind(M=>{const K=Re=>_o(y,Re),re="thead,tfoot,tbody,table",_e=Oi(M.first,re,K),Ae=Oi(M.last,re,K);return _e.bind(Re=>Ae.bind(nt=>_o(Re,nt)?cg(M.table,M.first,M.last):ie.none()))}),Sa=q,F9=y=>{const w=(M,K)=>_i(M,K).exists(re=>parseInt(re,10)>1),A=M=>w(M,"rowspan")||w(M,"colspan");return y.length>0&&Xs(y,A)?ie.some(y):ie.none()},$9=(y,w,A)=>w.length<=1?ie.none():N9(y,A.firstSelectedSelector,A.lastSelectedSelector).map(M=>({bounds:M,cells:w})),dy="data-mce-selected",VC="td["+dy+"],th["+dy+"]",vi="["+dy+"]",HC="data-mce-first-selected",r2="td["+HC+"],th["+HC+"]",fy="data-mce-last-selected",py="td["+fy+"],th["+fy+"]",UC=vi,pd={selected:dy,selectedSelector:VC,firstSelected:HC,firstSelectedSelector:r2,lastSelected:fy,lastSelectedSelector:py},sa=(y,w,A)=>({element:A,mergable:$9(w,y,pd),unmergable:F9(y),selection:Sa(y)}),B9=(y,w,A)=>({element:y,clipboard:w,generators:A}),ua=(y,w,A,M)=>({selection:Sa(y),clipboard:A,generators:M}),my=y=>Ds(y).bind(w=>cn(w,pd.firstSelectedSelector)).fold(z(y),w=>w[0]),Nc=y=>(w,A)=>{const M=us(w),K=M==="col"||M==="colgroup"?my(w):w;return Ia(K,y,A)},ug=Nc("th,td,caption"),cf=Nc("th,td"),a1=y=>D9(y.model.table.getSelectedCells()),hU=y=>At(a1(y),w=>Xt(w,pd.selectedSelector)),gU=y=>Ds(y[0]).map(w=>{const A=I9(w,UC);return lg(A),[A]}),LR=(y,w)=>Dt(w,A=>y.selection.serializer.serialize(A.dom,{})).join(""),tm=(y,w)=>{const A=y.getDoc(),M=We(fn.fromDom(y.getBody())),K=fn.fromTag("div",A);Wr(K,"data-mce-bogus","all"),Aa(K,{position:"fixed",left:"-9999999px",top:"0",overflow:"hidden",opacity:"0"});const re=rt(M);co(K,w),ar(re,K);const _e=K.dom.innerText;return Fr(K),_e},vU=(y,w)=>{y.on("BeforeGetContent",A=>{const M=K=>{A.preventDefault(),gU(K).each(re=>{const _e=A.format==="text"?tm(y,re):LR(y,re);A.content=_e})};if(A.selection===!0){const K=hU(y);K.length>=1&&M(K)}}),y.on("BeforeSetContent",A=>{if(A.selection===!0&&A.paste===!0){const M=a1(y);Ve(M).each(K=>{Ds(K).each(re=>{const _e=At(ip(A.content),Re=>us(Re)!=="meta"),Ae=Hi("table");if(mU(y)&&_e.length===1&&Ae(_e[0])){A.preventDefault();const Re=fn.fromDom(y.getDoc()),nt=rp(Re),vt=B9(K,_e[0],nt);w.pasteCells(re,vt).each(()=>{y.focus()})}})})}})},Hu=(y,w)=>({element:y,offset:w}),vc=(y,w,A)=>y.property().isText(w)&&y.property().getText(w).trim().length===0||y.property().isComment(w)?A(w).bind(M=>vc(y,M,A).orThunk(()=>ie.some(M))):ie.none(),i2=(y,w)=>y.property().isText(w)?y.property().getText(w).length:y.property().children(w).length,f4=(y,w)=>{const A=vc(y,w,y.query().prevSibling).getOr(w);if(y.property().isText(A))return Hu(A,i2(y,A));const M=y.property().children(A);return M.length>0?f4(y,M[M.length-1]):Hu(A,i2(y,A))},PR=f4,hy=$r(),dg=y=>PR(hy,y),R0=(y,w)=>{ld(y)||K5(y).each(M=>{const K=M.value/2;Zt(y,K,M.unit),Zt(w,K,M.unit)})},sh=y=>Dt(y,z(0)),fg=(y,w,A,M,K)=>K(y.slice(0,w)).concat(M).concat(K(y.slice(A))),pg=y=>(w,A,M,K)=>{if(y(M)){const re=Math.max(K,w[A]-Math.abs(M)),_e=Math.abs(re-w[A]);return M>=0?_e:-_e}else return M},gy=pg(y=>y<0),V9=pg(he),H9=()=>{const y=(Ae,Re,nt,vt,tn)=>{const An=gy(Ae,Re,vt,tn);return fg(Ae,Re,nt+1,[An,0],sh)},w=(Ae,Re,nt,vt)=>{const tn=(100+nt)/100,An=Math.max(vt,(Ae[Re]+nt)/tn);return Dt(Ae,(mn,gn)=>(gn===Re?An:mn/tn)-mn)},A=(Ae,Re,nt,vt,tn,An)=>An?w(Ae,Re,vt,tn):y(Ae,Re,nt,vt,tn);return{resizeTable:(Ae,Re)=>Ae(Re),clampTableDelta:gy,calcLeftEdgeDeltas:A,calcMiddleDeltas:(Ae,Re,nt,vt,tn,An,mn)=>A(Ae,nt,vt,tn,An,mn),calcRightEdgeDeltas:(Ae,Re,nt,vt,tn,An)=>{if(An)return w(Ae,nt,vt,tn);{const mn=gy(Ae,nt,vt,tn);return sh(Ae.slice(0,nt)).concat([mn])}},calcRedestributedWidths:(Ae,Re,nt,vt)=>{if(vt){const An=(Re+nt)/Re,mn=Dt(Ae,gn=>gn/An);return{delta:An*100-100,newSizes:mn}}else return{delta:nt,newSizes:Ae}}}},p4=()=>{const y=(_e,Ae,Re,nt,vt)=>{const tn=nt>=0?Re:Ae,An=V9(_e,tn,nt,vt);return fg(_e,Ae,Re+1,[An,-An],sh)};return{resizeTable:(_e,Ae,Re)=>{Re&&_e(Ae)},clampTableDelta:(_e,Ae,Re,nt,vt)=>{if(vt){if(Re>=0)return Re;{const tn=ct(_e,(An,mn)=>An+mn-nt,0);return Math.max(-tn,Re)}}else return gy(_e,Ae,Re,nt)},calcLeftEdgeDeltas:y,calcMiddleDeltas:(_e,Ae,Re,nt,vt,tn)=>y(_e,Re,nt,vt,tn),calcRightEdgeDeltas:(_e,Ae,Re,nt,vt,tn)=>{if(tn)return sh(_e);{const An=nt/_e.length;return Dt(_e,z(An))}},calcRedestributedWidths:(_e,Ae,Re,nt)=>({delta:0,newSizes:_e})}},D0=y=>xo.fromTable(y).grid,a2=Hi("th"),m4=y=>Xs(y,w=>a2(w.element)),U9=(y,w)=>y&&w?"sectionCells":y?"section":"cells",z9=y=>{const w=y.section==="thead",A=Oc(vy(y.cells),"th");return y.section==="tfoot"?{type:"footer"}:w||A?{type:"header",subType:U9(w,A)}:{type:"body"}},vy=y=>{const w=At(y,A=>a2(A.element));return w.length===0?ie.some("td"):w.length===y.length?ie.some("th"):ie.none()},W9=y=>{const w=Dt(y,K=>z9(K).type),A=Ye(w,"header"),M=Ye(w,"footer");if(!A&&!M)return ie.some("body");{const K=Ye(w,"body");return A&&!K&&!M?ie.some("header"):!A&&!K&&M?ie.some("footer"):ie.none()}},j9=y=>kn(y.all,w=>{const A=z9(w);return A.type==="header"?ie.from(A.subType):ie.none()}),L0=(y,w,A)=>ia(A(y.element,w),!0,y.isLocked),zC=(y,w)=>y.section!==w?qc(y.element,y.cells,w,y.isNew):y,Z9=()=>({transformRow:zC,transformCell:(y,w,A)=>{const M=A(y.element,w),K=us(M)!=="td"?bs(M,"td"):M;return ia(K,y.isNew,y.isLocked)}}),h4=()=>({transformRow:zC,transformCell:L0}),oh=()=>({transformRow:(y,w)=>zC(y,w==="thead"?"tbody":w),transformCell:L0}),by={getTableSectionType:(y,w)=>{const A=xo.fromTable(y);switch(j9(A).getOr(w)){case"section":return Z9();case"sectionCells":return h4();case"cells":return oh()}},section:Z9,sectionCells:h4,cells:oh,fallback:()=>({transformRow:q,transformCell:L0})},l2=(y,w,A,M)=>{A===M?yr(y,w):Wr(y,w,A)},mg=(y,w,A)=>{dn(wn(y,w)).fold(()=>ba(y,A),M=>Ac(M,A))},WC=(y,w)=>{const A=fo(y,w).getOrThunk(()=>{const M=fn.fromTag(w,Ao(y).dom);return w==="thead"?mg(y,"caption,colgroup",M):w==="colgroup"?mg(y,"caption",M):ar(y,M),M});return uo(A),A},g4=(y,w)=>{const A=[],M=[],K=mn=>Dt(mn,gn=>{gn.isNew&&A.push(gn.element);const ss=gn.element;return uo(ss),He(gn.cells,on=>{on.isNew&&M.push(on.element),l2(on.element,"colspan",on.colspan,1),l2(on.element,"rowspan",on.rowspan,1),ar(ss,on.element)}),ss}),re=mn=>so(mn,gn=>Dt(gn.cells,ss=>(l2(ss.element,"span",ss.colspan,1),ss.element))),_e=(mn,gn)=>{const ss=WC(y,gn),ws=(gn==="colgroup"?re:K)(mn);co(ss,ws)},Ae=mn=>{fo(y,mn).each(Fr)},Re=(mn,gn)=>{mn.length>0?_e(mn,gn):Ae(gn)},nt=[],vt=[],tn=[],An=[];return He(w,mn=>{switch(mn.section){case"thead":nt.push(mn);break;case"tbody":vt.push(mn);break;case"tfoot":tn.push(mn);break;case"colgroup":An.push(mn);break}}),Re(An,"colgroup"),Re(nt,"thead"),Re(vt,"tbody"),Re(tn,"tfoot"),{newRows:A,newCells:M}},c2=y=>Dt(y,w=>{const A=pc(w.element);return He(w.cells,M=>{const K=ai(M.element);l2(K,"colspan",M.colspan,1),l2(K,"rowspan",M.rowspan,1),ar(A,K)}),A}),NR=(y,w)=>Dt(y,A=>vu(A,w)),G9=(y,w)=>y[w],FR=(y,w)=>{if(y.length===0)return 0;const A=y[0];return lo(y,K=>!w(A.element,K.element)).getOr(y.length)},bU=(y,w,A,M)=>{const K=G9(y,w),re=K.section==="colgroup",_e=FR(K.cells.slice(A),M),Ae=re?1:FR(NR(y.slice(w),A),M);return{colspan:_e,rowspan:Ae}},yU=(y,w)=>{const A=Dt(y,K=>Dt(K.cells,de)),M=(K,re,_e,Ae)=>{for(let Re=K;Re<K+_e;Re++)for(let nt=re;nt<re+Ae;nt++)A[Re][nt]=!0};return Dt(y,(K,re)=>{const _e=so(K.cells,(Ae,Re)=>{if(A[re][Re]===!1){const nt=bU(y,re,Re,w);return M(re,Re,nt.rowspan,nt.colspan),[ad(Ae.element,nt.rowspan,nt.colspan,Ae.isNew)]}else return[]});return za(K.element,_e,K.section,K.isNew)})},yy=(y,w,A)=>{const M=[];He(y.colgroups,K=>{const re=[];for(let _e=0;_e<y.grid.columns;_e++){const Ae=xo.getColumnAt(y,_e).map(Re=>ia(Re.element,A,!1)).getOrThunk(()=>ia(w.colGap(),!0,!1));re.push(Ae)}M.push(qc(K.element,re,"colgroup",A))});for(let K=0;K<y.grid.rows;K++){const re=[];for(let Re=0;Re<y.grid.columns;Re++){const nt=xo.getAt(y,K,Re).map(vt=>ia(vt.element,A,vt.isLocked)).getOrThunk(()=>ia(w.gap(),!0,!1));re.push(nt)}const _e=y.all[K],Ae=qc(_e.element,re,_e.section,A);M.push(Ae)}return M},_U=(y,w)=>yy(y,w,!1),v4=y=>yU(y,_o),hg=(y,w)=>kn(y.all,A=>ye(A.cells,M=>_o(w,M.element))),_y=(y,w,A)=>{const M=Dt(w.selection,re=>ze(re).bind(_e=>hg(y,_e)).filter(A)),K=Wi(M);return p0(K.length>0,K)},Mi=(y,w,A,M,K)=>(re,_e,Ae,Re)=>{const nt=xo.fromTable(re),vt=ie.from(Re==null?void 0:Re.section).getOrThunk(by.fallback);return w(nt,_e).map(An=>{const mn=_U(nt,Ae),gn=y(mn,An,_o,K(Ae),vt),ss=Ri(gn.grid),on=v4(gn.grid);return{info:An,grid:on,cursor:gn.cursor,lockedColumns:ss}}).bind(An=>{const mn=g4(re,An.grid),gn=ie.from(Re==null?void 0:Re.sizing).getOrThunk(()=>Jh.getTableSize(re)),ss=ie.from(Re==null?void 0:Re.resize).getOrThunk(p4);return A(re,An.grid,An.info,{sizing:gn,resize:ss,section:vt}),M(re),yr(re,dd),An.lockedColumns.length>0&&Wr(re,dd,An.lockedColumns.join(",")),ie.some({cursor:An.cursor,newRows:mn.newRows,newCells:mn.newCells})})},K9=(y,w)=>ze(w.element).bind(A=>hg(y,A).map(M=>({...M,generators:w.generators,clipboard:w.clipboard}))),u2=(y,w)=>_y(y,w,he).map(A=>({cells:A,generators:w.generators,clipboard:w.clipboard})),d2=(y,w)=>w.mergable,$R=(y,w)=>w.unmergable,Uu=(y,w)=>_y(y,w,he),zu=(y,w)=>_y(y,w,A=>!A.isLocked),Y9=(y,w)=>hg(y,w).exists(A=>!A.isLocked),P0=(y,w)=>Xs(w,A=>Y9(y,A)),gg=(y,w)=>d2(y,w).filter(A=>P0(y,A.cells)),vg=(y,w)=>$R(y,w).filter(A=>P0(y,A)),BR=(y,w,A,M)=>{const K=Al(y).rows;if(K.length===0)return y;for(let re=w.startRow;re<=w.finishRow;re++)for(let _e=w.startCol;_e<=w.finishCol;_e++){const Ae=K[re],Re=vu(Ae,_e).isLocked;no(Ae,_e,ia(M(),!1,Re))}return y},ml=(y,w,A,M)=>{const K=Al(y).rows;let re=!0;for(let _e=0;_e<K.length;_e++)for(let Ae=0;Ae<ud(K[0]);Ae++){const Re=K[_e],nt=vu(Re,Ae),vt=nt.element,tn=A(vt,w);tn&&!re?no(Re,Ae,ia(M(),!0,nt.isLocked)):tn&&(re=!1)}return y},b4=(y,w)=>ct(y,(A,M)=>Fe(A,K=>w(K.element,M.element))?A:A.concat([M]),[]),Md=(y,w,A,M)=>(w>0&&w<y[0].cells.length&&He(y,K=>{const re=K.cells[w-1];let _e=0;const Ae=M();for(;K.cells.length>w+_e&&A(re.element,K.cells[w+_e].element);)no(K,w+_e,ia(Ae,!0,K.cells[w+_e].isLocked)),_e++}),y),jC=(y,w,A,M)=>{const K=Al(y).rows;if(w>0&&w<K.length){const re=K[w-1].cells,_e=b4(re,A);He(_e,Ae=>{let Re=ie.none();for(let nt=w;nt<K.length;nt++)for(let vt=0;vt<ud(K[0]);vt++){const tn=K[nt],An=vu(tn,vt);A(An.element,Ae.element)&&(Re.isNone()&&(Re=ie.some(M())),Re.each(gn=>{no(tn,vt,ia(gn,!0,An.isLocked))}))}})}return y},X9=y=>{const w=re=>re(y),A=z(y),M=()=>K,K={tag:!0,inner:y,fold:(re,_e)=>_e(y),isValue:he,isError:de,map:re=>nm.value(re(y)),mapError:M,bind:w,exists:w,forall:w,getOr:A,or:M,getOrThunk:A,orThunk:M,getOrDie:A,each:re=>{re(y)},toOptional:()=>ie.some(y)};return K},bg=y=>{const w=()=>A,A={tag:!1,inner:y,fold:(M,K)=>M(y),isValue:de,isError:he,map:w,mapError:M=>nm.error(M(y)),bind:w,exists:de,forall:he,getOr:q,or:q,getOrThunk:ge,orThunk:ge,getOrDie:ce(String(y)),each:W,toOptional:ie.none};return A},nm={value:X9,error:bg,fromOption:(y,w)=>y.fold(()=>bg(w),X9)},uf=(y,w,A)=>{if(y.row>=w.length||y.column>ud(w[0]))return nm.error("invalid start address out of table bounds, row: "+y.row+", column: "+y.column);const M=w.slice(y.row),K=M[0].cells.slice(y.column),re=ud(A[0]),_e=A.length;return nm.value({rowDelta:M.length-_e,colDelta:K.length-re})},ZC=(y,w)=>{const A=ud(y[0]),M=ud(w[0]);return{rowDelta:0,colDelta:A-M}},Sy=(y,w)=>{const A=y.length,M=w.length;return{rowDelta:A-M,colDelta:0}},sm=(y,w,A,M)=>{const K=w.section==="colgroup"?A.col:A.cell;return St(y,re=>ia(K(),!0,M(re)))},f2=(y,w,A,M)=>{const K=y[y.length-1];return y.concat(St(w,()=>{const re=K.section==="colgroup"?A.colgroup:A.row,_e=Jc(K,re,q),Ae=sm(_e.cells.length,_e,A,Re=>Qs(M,Re.toString()));return Oa(_e,Ae)}))},Ho=(y,w,A,M)=>Dt(y,K=>{const re=sm(w,K,A,de);return Zv(K,M,re)}),Qc=(y,w,A)=>Dt(y,M=>ct(A,(K,re)=>{const _e=sm(1,M,w,he)[0];return z5(K,re,_e)},M)),Nd=(y,w,A)=>{const M=w.colDelta<0?Ho:q,K=w.rowDelta<0?f2:q,re=Ri(y),_e=ud(y[0]),Ae=Fe(re,vt=>vt===_e-1),Re=M(y,Math.abs(w.colDelta),A,Ae?_e-1:_e),nt=Ri(Re);return K(Re,Math.abs(w.rowDelta),A,Qe(nt,he))},qC=(y,w,A,M)=>{const K=vu(y[w],A),re=ue(M,K.element),_e=y[w];return y.length>1&&ud(_e)>1&&(A>0&&re(Xc(_e,A-1))||A<_e.cells.length-1&&re(Xc(_e,A+1))||w>0&&re(Xc(y[w-1],A))||w<y.length-1&&re(Xc(y[w+1],A)))},ci=(y,w,A,M,K,re)=>{const _e=y.row,Ae=y.column,Re=A.length,nt=ud(A[0]),vt=_e+Re,tn=Ae+nt+re.length,An=Qe(re,he);for(let mn=_e;mn<vt;mn++){let gn=0;for(let ss=Ae;ss<tn;ss++){if(An[ss]){gn++;continue}qC(w,mn,ss,K)&&ml(w,Xc(w[mn],ss),K,M.cell);const on=ss-Ae-gn,ws=vu(A[mn-_e],on),qt=ws.element,Fn=M.replace(qt);no(w[mn],ss,ia(Fn,!0,ws.isLocked))}}return w},GC=(y,w,A)=>{const M=ud(w[0]),K=Al(w).cols.length+y.row,re=St(M-y.column,Ae=>Ae+y.column),_e=ye(re,Ae=>Xs(A,Re=>Re!==Ae)).getOr(M-1);return{row:K,column:_e}},yg=(y,w,A)=>At(A,M=>M>=y.column&&M<=ud(w[0])+y.column),N0=(y,w,A,M,K)=>{const re=Ri(w),_e=GC(y,w,re),Ae=Al(A).rows,Re=yg(_e,Ae,re);return uf(_e,w,Ae).map(vt=>{const tn={...vt,colDelta:vt.colDelta-Re.length},An=Nd(w,tn,M),mn=Ri(An),gn=yg(_e,Ae,mn);return ci(_e,An,Ae,M,K,gn)})},J9=(y,w,A,M,K)=>{Md(w,y,K,M.cell);const re=Sy(A,w),_e=Nd(A,re,M),Ae=Sy(w,_e),Re=Nd(w,Ae,M);return Dt(Re,(nt,vt)=>Zv(nt,y,_e[vt].cells))},Q9=(y,w,A,M,K)=>{jC(w,y,K,M.cell);const re=Ri(w),_e=ZC(w,A),Ae={..._e,colDelta:_e.colDelta-re.length},Re=Nd(w,Ae,M),{cols:nt,rows:vt}=Al(Re),tn=Ri(Re),An=ZC(A,w),mn={...An,colDelta:An.colDelta+tn.length},gn=Qc(A,M,tn),ss=Nd(gn,mn,M);return[...nt,...vt.slice(0,y),...ss,...vt.slice(y,vt.length)]},bi=(y,w,A,M)=>Jc(y,K=>M(K,A),w),p2=(y,w,A,M,K)=>{const{rows:re,cols:_e}=Al(y),Ae=re.slice(0,w),Re=re.slice(w),nt=bi(re[A],(vt,tn)=>w>0&&w<re.length&&M(Xc(re[w-1],tn),Xc(re[w],tn))?vu(re[w],tn):ia(K(vt.element,M),!0,vt.isLocked),M,K);return[..._e,...Ae,nt,...Re]},Cy=(y,w,A,M,K,re,_e)=>{if(A==="colgroup"||!M){const Ae=vu(y,K);return ia(_e(Ae.element,re),!0,!1)}else return vu(y,w)},eE=(y,w,A,M,K)=>Dt(y,re=>{const _e=w>0&&w<ud(re)&&M(Xc(re,w-1),Xc(re,w)),Ae=Cy(re,w,re.section,_e,A,M,K);return z5(re,w,Ae)}),m2=(y,w)=>so(y,A=>{const M=A.cells,K=hn(w,(re,_e)=>_e>=0&&_e<re.length?re.slice(0,_e).concat(re.slice(_e+1)):re,M);return K.length>0?[qc(A.element,K,A.section,A.isNew)]:[]}),df=(y,w,A)=>{const{rows:M,cols:K}=Al(y);return[...K,...M.slice(0,w),...M.slice(A+1)]},VR=(y,w,A,M)=>Xc(y[w],A)!==void 0&&w>0&&M(Xc(y[w-1],A),Xc(y[w],A)),wy=(y,w,A)=>w>0&&A(Xc(y,w-1),Xc(y,w)),Pn=(y,w,A,M)=>VR(y,w,A,M)||wy(y[w],A,M),HR=(y,w)=>Xs(w,q)&&m4(y.cells)?he:(M,K,re)=>!(us(M.element)==="th"&&w[re]),UR=(y,w)=>Xs(w,q)&&m4(y)?he:(M,K,re)=>!(us(M.element)==="th"&&w[K]),KC=(y,w,A,M)=>{const K=_e=>_e==="row"?Gp(w):ld(w),re=_e=>K(_e)?"".concat(_e,"group"):_e;return y?a2(w)?re(A):null:M&&a2(w)?re(A==="row"?"col":"row"):null},tE=(y,w)=>(A,M,K)=>ie.some(KC(y,A.element,"col",w[K])),zR=(y,w)=>(A,M)=>ie.some(KC(y,A.element,"row",w[M])),Ey=(y,w,A)=>ia(A(y.element,w),!0,y.isLocked),F0=(y,w,A,M,K,re,_e)=>{const Ae=Re=>Fe(w,nt=>A(Re.element,nt.element));return Dt(y,(Re,nt)=>eg(Re,(vt,tn)=>{if(Ae(vt)){const An=_e(vt,nt,tn)?K(vt,A,M):vt;return re(An,nt,tn).each(mn=>{dc(An.element,{scope:ie.from(mn)})}),An}else return vt}))},$0=(y,w,A)=>so(y,(M,K)=>Pn(y,K,w,A)?[]:[vu(M,w)]),WR=(y,w,A)=>{const M=y[w];return so(M.cells,(K,re)=>Pn(y,w,re,A)?[]:[K])},ky=(y,w,A,M,K)=>{const re=Al(y).rows,_e=so(w,vt=>$0(re,vt,M)),Ae=Dt(re,vt=>m4(vt.cells)),Re=UR(_e,Ae),nt=zR(A,Ae);return F0(y,_e,M,K,Ey,nt,Re)},nE=(y,w,A,M,K,re,_e)=>{const{cols:Ae,rows:Re}=Al(y),nt=Re[w[0]],vt=so(w,on=>WR(Re,on,K)),tn=Dt(nt.cells,(on,ws)=>m4($0(Re,ws,K))),An=[...Re];He(w,on=>{An[on]=_e.transformRow(Re[on],A)});const mn=[...Ae,...An],gn=HR(nt,tn),ss=tE(M,tn);return F0(mn,vt,K,re,_e.transformCell,ss,gn)},xy=(y,w,A,M)=>{const K=Al(y).rows,re=Dt(w,_e=>vu(K[_e.row],_e.column));return F0(y,re,A,M,Ey,ie.none,he)},Su={generate:y=>{if(!h(y))throw new Error("cases must be an array");if(y.length===0)throw new Error("there must be at least one case");const w=[],A={};return He(y,(M,K)=>{const re=Bt(M);if(re.length!==1)throw new Error("one and only one name per case");const _e=re[0],Ae=M[_e];if(A[_e]!==void 0)throw new Error("duplicate key detected:"+_e);if(_e==="cata")throw new Error("cannot have a case named cata (sorry)");if(!h(Ae))throw new Error("case arguments must be an array");w.push(_e),A[_e]=(...Re)=>{const nt=Re.length;if(nt!==Ae.length)throw new Error("Wrong number of arguments to case "+_e+". Expected "+Ae.length+" ("+Ae+"), got "+nt);return{fold:(...tn)=>{if(tn.length!==y.length)throw new Error("Wrong number of arguments to fold. Expected "+y.length+", got "+tn.length);return tn[K].apply(null,Re)},match:tn=>{const An=Bt(tn);if(w.length!==An.length)throw new Error("Wrong number of arguments to match. Expected: "+w.join(",")+"\nActual: "+An.join(","));if(!Xs(w,gn=>Ye(An,gn)))throw new Error("Not all branches were specified when using match. Specified: "+An.join(", ")+"\nRequired: "+w.join(", "));return tn[_e].apply(null,Re)},log:tn=>{console.log(tn,{constructors:w,constructor:_e,params:Re})}}}}),A}},om={...Su.generate([{none:[]},{only:["index"]},{left:["index","next"]},{middle:["prev","index","next"]},{right:["prev","index"]}])},qR=(y,w)=>y.length===0?om.none():y.length===1?om.only(0):w===0?om.left(0,1):w===y.length-1?om.right(w-1,w):w>0&&w<y.length-1?om.middle(w-1,w,w+1):om.none(),GR=(y,w,A,M,K)=>{const re=y.slice(0),_e=qR(y,w),Ae=z(Dt(re,z(0))),Re=An=>M.singleColumnWidth(re[An],A),nt=(An,mn)=>K.calcLeftEdgeDeltas(re,An,mn,A,M.minCellWidth(),M.isRelative),vt=(An,mn,gn)=>K.calcMiddleDeltas(re,An,mn,gn,A,M.minCellWidth(),M.isRelative),tn=(An,mn)=>K.calcRightEdgeDeltas(re,An,mn,A,M.minCellWidth(),M.isRelative);return _e.fold(Ae,Re,nt,vt,tn)},KR=(y,w,A)=>{let M=0;for(let K=y;K<w;K++)M+=A[K]!==void 0?A[K]:0;return M},YC=(y,w)=>{const A=xo.justCells(y);return Dt(A,M=>{const K=KR(M.column,M.column+M.colspan,w);return{element:M.element,width:K,colspan:M.colspan}})},sE=(y,w)=>{const A=xo.justColumns(y);return Dt(A,(M,K)=>({element:M.element,width:w[K],colspan:M.colspan}))},YR=(y,w)=>Dt(y.all,(A,M)=>({element:A.element,height:w[M]})),oE=y=>hn(y,(w,A)=>w+A,0),XR=(y,w)=>xo.hasColumns(y)?sE(y,w):YC(y,w),B0=(y,w,A)=>{const M=XR(y,w);He(M,K=>{A.setElementWidth(K.element,K.width)})},y4=(y,w,A,M,K)=>{const re=xo.fromTable(y),_e=K.getCellDelta(w),Ae=K.getWidths(re,K),Re=A===re.grid.columns-1,nt=M.clampTableDelta(Ae,A,_e,K.minCellWidth(),Re),vt=GR(Ae,A,nt,K,M),tn=Dt(vt,(An,mn)=>An+Ae[mn]);B0(re,tn,K),M.resizeTable(K.adjustTableWidth,nt,Re)},h2=(y,w,A)=>{const M=xo.fromTable(y),K=Ld(M,y),re=Dt(K,(Re,nt)=>A===nt?Math.max(w+Re,Y1()):Re),_e=YR(M,re);He(_e,Re=>{sg(Re.element,Re.height)}),He(xo.justCells(M),Re=>{E0(Re.element)});const Ae=oE(re);sg(y,Ae)},XC=(y,w,A,M,K)=>{const re=xo.generate(w),_e=M.getWidths(re,M),Ae=M.pixelWidth(),{newSizes:Re,delta:nt}=K.calcRedestributedWidths(_e,Ae,A.pixelDelta,M.isRelative);B0(re,Re,M),M.adjustTableWidth(nt)},rE=(y,w,A,M)=>{const K=xo.generate(w),re=M.getWidths(K,M);B0(K,re,M)},l1=y=>ct(y,(A,M)=>Fe(A,re=>re.column===M.column)?A:A.concat([M]),[]).sort((A,M)=>A.column-M.column),_4=Hi("col"),S4=Hi("colgroup"),JC=y=>us(y)==="tr"||S4(y),QC=y=>{const w=Tl(y,"colspan",1),A=Tl(y,"rowspan",1);return{element:y,colspan:w,rowspan:A}},V0=(y,w=QC)=>{const A=Ae=>_4(Ae.element)?y.col(Ae):y.cell(Ae),M=Ae=>S4(Ae.element)?y.colgroup(Ae):y.row(Ae),K=Ae=>{if(JC(Ae))return M({element:Ae});{const Re=Ae,nt=A(w(Re));return re=ie.some({item:Re,replacement:nt}),nt}};let re=ie.none();return{getOrInit:(Ae,Re)=>re.fold(()=>K(Ae),nt=>Re(Ae,nt.item)?nt.replacement:K(Ae))}},JR=y=>w=>{const A=[],M=(_e,Ae)=>ye(A,Re=>Ae(Re.item,_e)),K=_e=>{const Ae=y==="td"?{scope:null}:{},Re=w.replace(_e,y,Ae);return A.push({item:_e,sub:Re}),Re};return{replaceOrInit:(_e,Ae)=>{if(JC(_e)||_4(_e))return _e;{const Re=_e;return M(Re,Ae).fold(()=>K(Re),nt=>Ae(_e,nt.item)?nt.sub:K(Re))}}}},e6=y=>_i(y,"scope").map(w=>w.substr(0,3)),Xl={modification:V0,transform:JR,merging:y=>({unmerge:M=>{const K=e6(M);return K.each(re=>Wr(M,"scope",re)),()=>{const re=y.cell({element:M,colspan:1,rowspan:1});return Rc(re,"width"),Rc(M,"width"),K.each(_e=>Wr(re,"scope",_e)),re}},merge:M=>{const K=()=>{const re=Wi(Dt(M,e6));if(re.length===0)return ie.none();{const _e=re[0],Ae=["row","col"];return Fe(re,nt=>nt!==_e&&Ye(Ae,nt))?ie.none():ie.from(_e)}};return Rc(M[0],"width"),K().fold(()=>yr(M[0],"scope"),re=>Wr(M[0],"scope",re+"group")),z(M[0])}})},QR=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","table","thead","tfoot","tbody","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"],$t=(y,w)=>{const A=y.property().name(w);return Ye(["ol","ul"],A)},rh=(y,w)=>{const A=y.property().name(w);return Ye(QR,A)},eD=(y,w)=>Ye(["br","img","hr","input"],y.property().name(w)),C4=$r(),g2=y=>rh(C4,y),dp=y=>$t(C4,y),iE=y=>eD(C4,y),aE=y=>{const w=Hi("br"),A=Re=>Xs(Re,nt=>w(nt)||Bo(nt)&&RC(nt).trim().length===0),M=Re=>us(Re)==="li"||Gt(Re,dp).isSome(),K=Re=>cl(Re).map(nt=>g2(nt)?!0:iE(nt)?us(nt)!=="img":!1).getOr(!1),re=Re=>e4(Re).bind(nt=>{const vt=K(nt);return Ai(nt).map(tn=>vt===!0||M(tn)||w(nt)||g2(tn)&&!_o(Re,tn)?[]:[fn.fromTag("br")])}).getOr([]),Ae=(()=>{const Re=so(y,nt=>{const vt=gr(nt);return A(vt)?[]:vt.concat(re(nt))});return Re.length===0?[fn.fromTag("br")]:Re})();uo(y[0]),co(y[0],Ae)},w4=y=>I0(y,!0),E4=y=>{an(y).length===0&&Fr(y)},k4=(y,w)=>({grid:y,cursor:w}),lE=y=>kn(y,w=>kn(w.cells,A=>{const M=A.element;return p0(w4(M),M)})),tD=(y,w,A)=>{var M,K;const re=Al(y).rows;return ie.from((K=(M=re[w])===null||M===void 0?void 0:M.cells[A])===null||K===void 0?void 0:K.element).filter(w4).orThunk(()=>lE(re))},Cu=(y,w,A)=>{const M=tD(y,w,A);return k4(y,M)},x4=y=>ct(y,(A,M)=>Fe(A,re=>re.row===M.row)?A:A.concat([M]),[]).sort((A,M)=>A.row-M.row),cE=(y,w,A,M)=>{const K=w[0].row,re=x4(w),_e=hn(re,(Ae,Re)=>({grid:p2(Ae.grid,K,Re.row+Ae.delta,A,M.getOrInit),delta:Ae.delta+1}),{grid:y,delta:0}).grid;return Cu(_e,K,w[0].column)},nD=(y,w,A,M)=>{const K=x4(w),re=K[K.length-1],_e=re.row+re.rowspan,Ae=hn(K,(Re,nt)=>p2(Re,_e,nt.row,A,M.getOrInit),y);return Cu(Ae,_e,w[0].column)},sD=(y,w,A,M)=>{const K=w.details,re=l1(K),_e=re[0].column,Ae=hn(re,(Re,nt)=>({grid:eE(Re.grid,_e,nt.column+Re.delta,A,M.getOrInit),delta:Re.delta+1}),{grid:y,delta:0}).grid;return Cu(Ae,K[0].row,_e)},uE=(y,w,A,M)=>{const K=w.details,re=K[K.length-1],_e=re.column+re.colspan,Ae=l1(K),Re=hn(Ae,(nt,vt)=>eE(nt,_e,vt.column,A,M.getOrInit),y);return Cu(Re,K[0].row,_e)},T4=(y,w,A,M)=>{const K=l1(w),re=Dt(K,Ae=>Ae.column),_e=ky(y,re,!0,A,M.replaceOrInit);return Cu(_e,w[0].row,w[0].column)},oD=(y,w,A,M)=>{const K=xy(y,w,A,M.replaceOrInit);return Cu(K,w[0].row,w[0].column)},dE=(y,w,A,M)=>{const K=l1(w),re=Dt(K,Ae=>Ae.column),_e=ky(y,re,!1,A,M.replaceOrInit);return Cu(_e,w[0].row,w[0].column)},Ci=(y,w,A,M)=>{const K=xy(y,w,A,M.replaceOrInit);return Cu(K,w[0].row,w[0].column)},v2=(y,w)=>(A,M,K,re,_e)=>{const Ae=x4(M),Re=Dt(Ae,vt=>vt.row),nt=nE(A,Re,y,w,K,re.replaceOrInit,_e);return Cu(nt,M[0].row,M[0].column)},fE=v2("thead",!0),pE=v2("tbody",!1),I4=v2("tfoot",!1),Fc=(y,w,A,M)=>{const K=l1(w.details),re=m2(y,Dt(K,Ae=>Ae.column)),_e=re.length>0?re[0].cells.length-1:0;return Cu(re,K[0].row,Math.min(K[0].column,_e))},md=(y,w,A,M)=>{const K=x4(w),re=df(y,K[0].row,K[K.length-1].row),_e=Math.max(Al(re).rows.length-1,0);return Cu(re,Math.min(w[0].row,_e),w[0].column)},mE=(y,w,A,M)=>{const K=w.cells;aE(K);const re=BR(y,w.bounds,A,M.merge(K));return k4(re,ie.from(K[0]))},hE=(y,w,A,M)=>{const re=hn(w,(_e,Ae)=>ml(_e,Ae,A,M.unmerge(Ae)),y);return k4(re,ie.from(w[0]))},t6=(y,w,A,M)=>{const re=((Re,nt)=>{const vt=xo.fromTable(Re);return yy(vt,nt,!0)})(w.clipboard,w.generators),_e=Si(w.row,w.column);return N0(_e,y,re,w.generators,A).fold(()=>k4(y,ie.some(w.element)),Re=>Cu(Re,w.row,w.column))},Ty=(y,w,A)=>{const M=Pi(y,A.section),K=xo.generate(M);return yy(K,w,!0)},gE=(y,w,A,M)=>{const K=Al(y).rows,re=w.cells[0].column,_e=K[w.cells[0].row],Ae=Ty(w.clipboard,w.generators,_e),Re=J9(re,y,Ae,w.generators,A);return Cu(Re,w.cells[0].row,w.cells[0].column)},n6=(y,w,A,M)=>{const K=Al(y).rows,re=w.cells[w.cells.length-1].column+w.cells[w.cells.length-1].colspan,_e=K[w.cells[0].row],Ae=Ty(w.clipboard,w.generators,_e),Re=J9(re,y,Ae,w.generators,A);return Cu(Re,w.cells[0].row,re)},s6=(y,w,A,M)=>{const K=Al(y).rows,re=w.cells[0].row,_e=K[re],Ae=Ty(w.clipboard,w.generators,_e),Re=Q9(re,y,Ae,w.generators,A);return Cu(Re,w.cells[0].row,w.cells[0].column)},vE=(y,w,A,M)=>{const K=Al(y).rows,re=w.cells[w.cells.length-1].row+w.cells[w.cells.length-1].rowspan,_e=K[w.cells[0].row],Ae=Ty(w.clipboard,w.generators,_e),Re=Q9(re,y,Ae,w.generators,A);return Cu(Re,re,w.cells[0].column)},ih=(y,w)=>{const A=xo.fromTable(y);return Uu(A,w).bind(K=>{const re=K[K.length-1],_e=K[0].column,Ae=re.column+re.colspan,Re=jn(Dt(A.all,nt=>At(nt.cells,vt=>vt.column>=_e&&vt.column<Ae)));return vy(Re)}).getOr("")},Wu=(y,w)=>{const A=xo.fromTable(y);return Uu(A,w).bind(vy).getOr("")},bE=(y,w)=>{const A=xo.fromTable(y);return Uu(A,w).bind(K=>{const re=K[K.length-1],_e=K[0].row,Ae=re.row+re.rowspan,Re=A.all.slice(_e,Ae);return W9(Re)}).getOr("")},sr=(y,w,A,M)=>rE(y,w,A,M.sizing),fp=(y,w,A,M)=>XC(y,w,A,M.sizing,M.resize),b2=(y,w)=>Fe(w,A=>A.column===0&&A.isLocked),yE=(y,w)=>Fe(w,A=>A.column+A.colspan>=y.grid.columns&&A.isLocked),o6=(y,w)=>{const A=tg(y),M=l1(w);return ct(M,(K,re)=>{const Ae=A[re.column].map(vr).getOr(0);return K+Ae},0)},_E=y=>(w,A)=>Uu(w,A).filter(M=>!(y?b2:yE)(w,M)).map(M=>({details:M,pixelDelta:o6(w,M)})),_g=(y,w)=>zu(y,w).map(A=>({details:A,pixelDelta:-o6(y,A)})),Rl=y=>(w,A)=>u2(w,A).filter(M=>!(y?b2:yE)(w,M.cells)),ah=Xl.transform("th"),y2=Xl.transform("td"),SE=Mi(cE,Uu,W,W,Xl.modification),rD=Mi(nD,Uu,W,W,Xl.modification),A4=Mi(sD,_E(!0),fp,W,Xl.modification),r6=Mi(uE,_E(!1),fp,W,Xl.modification),i6=Mi(Fc,_g,fp,E4,Xl.modification),a6=Mi(md,Uu,W,E4,Xl.modification),CE=Mi(T4,zu,W,W,ah),wE=Mi(dE,zu,W,W,y2),EE=Mi(fE,Uu,W,W,ah),kE=Mi(pE,Uu,W,W,y2),iD=Mi(I4,Uu,W,W,y2),bc=Mi(oD,zu,W,W,ah),aD=Mi(Ci,zu,W,W,y2),c1=Mi(mE,gg,sr,W,Xl.merging),l6=Mi(hE,vg,sr,W,Xl.merging),c6=Mi(t6,K9,sr,W,Xl.modification),xE=Mi(gE,Rl(!0),W,W,Xl.modification),O4=Mi(n6,Rl(!1),W,W,Xl.modification),u6=Mi(s6,u2,W,W,Xl.modification),d6=Mi(vE,u2,W,W,Xl.modification),lD=ih,cD=Wu,La=bE,qa=(y,w)=>y.dispatch("NewRow",{node:w}),Jl=(y,w)=>y.dispatch("NewCell",{node:w}),Pa=(y,w,A)=>{y.dispatch("TableModified",{...A,table:w})},hl=(y,w,A,M,K)=>{y.dispatch("TableSelectionChange",{cells:w,start:A,finish:M,otherCells:K})},nl=y=>{y.dispatch("TableSelectionClear")},f6=(y,w,A,M,K)=>{y.dispatch("ObjectResizeStart",{target:w,width:A,height:M,origin:K})},Iy=(y,w,A,M,K)=>{y.dispatch("ObjectResized",{target:w,width:A,height:M,origin:K})},Ay={structure:!1,style:!0},Dl={structure:!0,style:!1},TE={structure:!0,style:!0},R4=(y,w)=>x0(y)?Jh.percentageSize(w):ap(y)?Jh.pixelSize(w):Jh.getTableSize(w),Yn=(y,w,A)=>{const M=su=>us(n2(su))==="table",K=su=>!M(y)||D0(su).rows>1,re=su=>!M(y)||D0(su).columns>1,_e=e2(y),Ae=Qm(y)?W:R0,Re=su=>{switch(ig(y)){case"section":return by.section();case"sectionCells":return by.sectionCells();case"cells":return by.cells();default:return by.getTableSectionType(su,"section")}},nt=(su,m8)=>m8.cursor.fold(()=>{const t3=an(su);return Ve(t3).filter(eo).map(hh=>{A.clearSelectedCells(su.dom);const yl=y.dom.createRng();return yl.selectNode(hh.dom),y.selection.setRng(yl),Wr(hh,"data-mce-selected","1"),yl})},t3=>{const hh=dg(t3),yl=y.dom.createRng();return yl.setStart(hh.element.dom,hh.offset),yl.setEnd(hh.element.dom,hh.offset),y.selection.setRng(yl),A.clearSelectedCells(su.dom),ie.some(yl)}),vt=(su,m8,t3,hh)=>(yl,v1,rL=!1)=>{lg(yl);const h8=fn.fromDom(y.getDoc()),iL=oy(t3,h8,_e),g8={sizing:R4(y,yl),resize:Qm(y)?H9():p4(),section:Re(yl)};return m8(yl)?su(yl,v1,iL,g8).bind(v8=>{w.refresh(yl.dom),He(v8.newRows,n3=>{qa(y,n3.dom)}),He(v8.newCells,n3=>{Jl(y,n3.dom)});const Vk=nt(yl,v8);return eo(yl)&&(lg(yl),rL||Pa(y,yl.dom,hh)),Vk.map(n3=>({rng:n3,effect:hh}))}):ie.none()},tn=vt(a6,K,W,Dl),An=vt(i6,re,W,Dl),mn=vt(SE,he,W,Dl),gn=vt(rD,he,W,Dl),ss=vt(A4,he,Ae,Dl),on=vt(r6,he,Ae,Dl),ws=vt(c1,he,W,Dl),qt=vt(l6,he,W,Dl),Fn=vt(xE,he,W,Dl),Sr=vt(O4,he,W,Dl),Cr=vt(u6,he,W,Dl),ls=vt(d6,he,W,Dl),Xr=vt(c6,he,W,TE),nu=vt(bc,he,W,Dl),Rg=vt(aD,he,W,Dl),vp=vt(CE,he,W,Dl),To=vt(wE,he,W,Dl),Rr=vt(EE,he,W,Dl),Cc=vt(kE,he,W,Dl),bl=vt(iD,he,W,Dl);return{deleteRow:tn,deleteColumn:An,insertRowsBefore:mn,insertRowsAfter:gn,insertColumnsBefore:ss,insertColumnsAfter:on,mergeCells:ws,unmergeCells:qt,pasteColsBefore:Fn,pasteColsAfter:Sr,pasteRowsBefore:Cr,pasteRowsAfter:ls,pasteCells:Xr,makeCellsHeader:nu,unmakeCellsHeader:Rg,makeColumnsHeader:vp,unmakeColumnsHeader:To,makeRowsHeader:Rr,makeRowsBody:Cc,makeRowsFooter:bl,getTableRowType:La,getTableCellType:cD,getTableColType:lD}},U0=(y,w,A)=>{const M=Tl(y,w,1);A===1||M<=1?yr(y,w):Wr(y,w,Math.min(A,M))},p6=(y,w)=>A=>{const M=A.column+A.colspan-1,K=A.column;return M>=y&&K<w},SU=(y,w,A)=>{if(xo.hasColumns(y)){const M=At(xo.justColumns(y),p6(w,A)),K=Dt(M,_e=>{const Ae=ai(_e.element);return U0(Ae,"span",A-w),Ae}),re=fn.fromTag("colgroup");return co(re,K),[re]}else return[]},uD=(y,w,A)=>Dt(y.all,M=>{const K=At(M.cells,p6(w,A)),re=Dt(K,Ae=>{const Re=ai(Ae.element);return U0(Re,"colspan",A-w),Re}),_e=fn.fromTag("tr");return co(_e,re),_e}),dD=(y,w)=>{const A=xo.fromTable(y);return zu(A,w).map(K=>{const re=K[K.length-1],_e=K[0].column,Ae=re.column+re.colspan,Re=SU(A,_e,Ae),nt=uD(A,_e,Ae);return[...Re,...nt]})},ju=(y,w,A)=>{const M=xo.fromTable(y);return Uu(M,w).bind(re=>{const _e=yy(M,A,!1),Re=Al(_e).rows.slice(re[0].row,re[re.length-1].row+re[re.length-1].rowspan),nt=so(Re,tn=>{const An=At(tn.cells,mn=>!mn.isLocked);return An.length>0?[{...tn,cells:An}]:[]}),vt=v4(nt);return p0(vt.length>0,vt)}).map(re=>c2(re))},D4=Su.generate([{invalid:["raw"]},{pixels:["value"]},{percent:["value"]}]),IE=(y,w,A)=>{const M=A.substring(0,A.length-y.length),K=parseFloat(M);return M===K.toString()?w(K):D4.invalid(A)},lh={...D4,from:y=>Gc(y,"%")?IE("%",D4.percent,y):Gc(y,"px")?IE("px",D4.pixels,y):D4.invalid(y)},gl=(y,w)=>Dt(y,A=>lh.from(A).fold(()=>A,K=>K/w*100+"%",K=>K+"%")),ff=(y,w,A)=>{const M=A/w;return Dt(y,K=>lh.from(K).fold(()=>K,_e=>_e*M+"px",_e=>_e/100*A+"px"))},tu=(y,w)=>{const A=y.fold(()=>z(""),M=>{const K=M/w;return z(K+"px")},()=>{const M=100/w;return z(M+"%")});return St(w,A)},m6=(y,w,A)=>y.fold(()=>w,M=>ff(w,A,M),M=>gl(w,A)),L4=(y,w,A)=>{const M=lh.from(A),K=Xs(y,re=>re==="0px")?tu(M,y.length):m6(M,y,w);return OE(K)},h6=(y,w)=>y.length===0?w:hn(y,(A,M)=>lh.from(M).fold(z(0),q,q)+A,0),AE=(y,w)=>{const A=Math.floor(y);return{value:A+w,remainder:y-A}},P4=(y,w)=>lh.from(y).fold(z(y),A=>A+w+"px",A=>A+w+"%"),OE=y=>{if(y.length===0)return y;const w=hn(y,(M,K)=>{const re=lh.from(K).fold(()=>({value:K,remainder:0}),_e=>AE(_e,"px"),_e=>({value:_e+"%",remainder:0}));return{output:[re.value].concat(M.output),remainder:M.remainder+re.remainder}},{output:[],remainder:0}),A=w.output;return A.slice(0,A.length-1).concat([P4(A[A.length-1],Math.round(w.remainder))])},RE=lh.from,DE=(y,w,A)=>{He(w,M=>{const K=y.slice(M.column,M.colspan+M.column),re=h6(K,Hm());li(M.element,"width",re+A)})},fD=(y,w,A)=>{He(w,(M,K)=>{const re=h6([y[K]],Hm());li(M.element,"width",re+A)})},pD=(y,w,A)=>{He(A,M=>{Rc(M.element,"height")}),He(w,(M,K)=>{li(M.element,"height",y[K])})},mD=y=>RE(y).fold(z("px"),z("px"),z("%")),g6=(y,w,A)=>{const M=xo.fromTable(y),K=M.all,re=xo.justCells(M),_e=xo.justColumns(M);w.each(Ae=>{const Re=mD(Ae),nt=$u(y),vt=x9(M,y),tn=L4(vt,nt,Ae);xo.hasColumns(M)?fD(tn,_e,Re):DE(tn,re,Re),li(y,"width",Ae)}),A.each(Ae=>{const Re=rn(y),nt=pl(M,y),vt=L4(nt,Re,Ae);pD(vt,K,re),li(y,"height",Ae)})},M4=tp,LE=Kl,Oy=SR,_2=y=>{yr(y,"width"),yr(y,"height")},Sg=y=>{const w=Da(y);g6(y,ie.some(w),ie.none()),_2(y)},N4=y=>{const w=cr(y);g6(y,ie.some(w),ie.none()),_2(y)},hD=y=>{const w=IC(y);g6(y,ie.none(),ie.some(w)),_2(y)},PE=y=>{Rc(y,"width");const w=$n(y),A=w.length>0?w:an(y);He(A,M=>{Rc(M,"width"),_2(M)}),_2(y)},gD={styles:{"border-collapse":"collapse",width:"100%"},attributes:{border:"1"},colGroups:!1},ME=()=>fn.fromTag("th"),NE=()=>fn.fromTag("td"),wu=()=>fn.fromTag("col"),F4=(y,w,A,M)=>{const K=fn.fromTag("tr");for(let re=0;re<y;re++){const _e=M<w||re<A?ME():NE();re<A&&Wr(_e,"scope","row"),M<w&&Wr(_e,"scope","col"),ar(_e,fn.fromTag("br")),ar(K,_e)}return K},FE=y=>{const w=fn.fromTag("colgroup");return St(y,()=>ar(w,wu())),w},v6=(y,w,A,M)=>St(y,K=>F4(w,A,M,K)),Ry=(y,w,A,M,K,re=gD)=>{const _e=fn.fromTag("table"),Ae=K!=="cells";Aa(_e,re.styles),mi(_e,re.attributes),re.colGroups&&ar(_e,FE(w));const Re=Math.min(y,A);if(Ae&&A>0){const mn=fn.fromTag("thead");ar(_e,mn);const ss=v6(A,w,K==="sectionCells"?Re:0,M);co(mn,ss)}const nt=fn.fromTag("tbody");ar(_e,nt);const vt=Ae?y-Re:y,An=v6(vt,w,Ae?0:A,M);return co(nt,An),_e},vD=y=>y.dom.innerHTML,S2=y=>{const w=fn.fromTag("div"),A=fn.fromDom(y.dom.cloneNode(!0));return ar(w,A),vD(w)},bD=(y,w)=>{y.selection.select(w.dom,!0),y.selection.collapse(!0)},b6=(y,w)=>{mc(w,"td,th").each(ue(bD,y))},yD=(y,w)=>{He(Vo(w,"tr"),A=>{qa(y,A.dom),He(Vo(A,"th,td"),M=>{Jl(y,M.dom)})})},Dy=y=>f(y)&&y.indexOf("%")!==-1,_D=(y,w,A,M,K)=>{const re=Yl(y),_e={styles:re,attributes:eh(y),colGroups:iy(y)};return y.undoManager.ignore(()=>{const Ae=Ry(A,w,K,M,ig(y),_e);Wr(Ae,"data-mce-id","__mce");const Re=S2(Ae);y.insertContent(Re),y.addVisual()}),mc(n2(y),'table[data-mce-id="__mce"]').map(Ae=>(ap(y)?N4(Ae):Mc(y)?PE(Ae):(x0(y)||Dy(re.width))&&Sg(Ae),lg(Ae),yr(Ae,"data-mce-id"),yD(y,Ae),b6(y,Ae),Ae.dom)).getOrNull()},SD=(y,w,A,M={})=>{const K=re=>B(re)&&re>0;if(K(w)&&K(A)){const re=M.headerRows||0,_e=M.headerColumns||0;return _D(y,A,w,_e,re)}else return console.error("Invalid values for mceInsertTable - rows and columns values are required to insert a table."),null};var $4=tinymce.util.Tools.resolve("tinymce.FakeClipboard");const $E="x-tinymce/dom-table-",y6=$E+"rows",Ly=$E+"columns",BE=y=>{const w=$4.FakeClipboardItem(y);$4.write([w])},_6=y=>{var w;const A=(w=$4.read())!==null&&w!==void 0?w:[];return kn(A,M=>ie.from(M.getType(y)))},S6=y=>{_6(y).isSome()&&$4.clear()},C6=y=>{y.fold(VE,w=>BE({[y6]:w}))},z0=()=>_6(y6),VE=()=>S6(y6),w6=y=>{y.fold(UE,w=>BE({[Ly]:w}))},HE=()=>_6(Ly),UE=()=>S6(Ly),Eu=y=>ug(ly(y),s1(y)).filter(a4),B4=y=>cf(ly(y),s1(y)).filter(a4),V4=(y,w)=>{const A=s1(y),M=()=>Eu(y).each(on=>{Ds(on,A).filter(J(A)).each(ws=>{const qt=fn.fromText("");if(Ac(ws,qt),Fr(ws),y.dom.isEmpty(y.getBody()))y.setContent(""),y.selection.setCursorLocation();else{const Fn=y.dom.createRng();Fn.setStart(qt.dom,0),Fn.setEnd(qt.dom,0),y.selection.setRng(Fn),y.nodeChanged()}})}),K=on=>Eu(y).each(ws=>{Mc(y)||ap(y)||x0(y)||Ds(ws,A).each(Fn=>{on==="relative"&&!M4(Fn)?Sg(Fn):on==="fixed"&&!LE(Fn)?N4(Fn):on==="responsive"&&!Oy(Fn)&&PE(Fn),lg(Fn),Pa(y,Fn.dom,Dl)})}),re=on=>Ds(on,A),_e=on=>B4(y).bind(ws=>re(ws).map(qt=>on(qt,ws))),Ae=(on,ws)=>{_e(qt=>{y.formatter.toggle("tableclass",{value:ws},qt.dom),Pa(y,qt.dom,Ay)})},Re=(on,ws)=>{_e(qt=>{const Fn=a1(y),Cr=Xs(Fn,ls=>y.formatter.match("tablecellclass",{value:ws},ls.dom))?y.formatter.remove:y.formatter.apply;He(Fn,ls=>Cr("tablecellclass",{value:ws},ls.dom)),Pa(y,qt.dom,Ay)})},nt=()=>{Eu(y).each(on=>{Ds(on,A).each(ws=>{fo(ws,"caption").fold(()=>{const qt=fn.fromTag("caption");ar(qt,fn.fromText("Caption")),zf(ws,qt,0),y.selection.setCursorLocation(qt.dom,0)},qt=>{Hi("caption")(on)&&ll("td",ws).each(Fn=>y.selection.setCursorLocation(Fn.dom,0)),Fr(qt)}),Pa(y,ws.dom,Dl)})})},vt=on=>{y.focus()},tn=(on,ws=!1)=>_e((qt,Fn)=>{const Sr=sa(a1(y),qt,Fn);on(qt,Sr,ws).each(vt)}),An=()=>_e((on,ws)=>{const qt=sa(a1(y),on,ws),Fn=oy(W,fn.fromDom(y.getDoc()),ie.none());return ju(on,qt,Fn)}),mn=()=>_e((on,ws)=>{const qt=sa(a1(y),on,ws);return dD(on,qt)}),gn=(on,ws)=>ws().each(qt=>{const Fn=Dt(qt,Sr=>ai(Sr));_e((Sr,Cr)=>{const ls=rp(fn.fromDom(y.getDoc())),Xr=ua(a1(y),Cr,Fn,ls);on(Sr,Xr).each(vt)})}),ss=on=>(ws,qt)=>yo(qt,"type").each(Fn=>{tn(on(Fn),qt.no_events)});je({mceTableSplitCells:()=>tn(w.unmergeCells),mceTableMergeCells:()=>tn(w.mergeCells),mceTableInsertRowBefore:()=>tn(w.insertRowsBefore),mceTableInsertRowAfter:()=>tn(w.insertRowsAfter),mceTableInsertColBefore:()=>tn(w.insertColumnsBefore),mceTableInsertColAfter:()=>tn(w.insertColumnsAfter),mceTableDeleteCol:()=>tn(w.deleteColumn),mceTableDeleteRow:()=>tn(w.deleteRow),mceTableCutCol:()=>mn().each(on=>{w6(on),tn(w.deleteColumn)}),mceTableCutRow:()=>An().each(on=>{C6(on),tn(w.deleteRow)}),mceTableCopyCol:()=>mn().each(on=>w6(on)),mceTableCopyRow:()=>An().each(on=>C6(on)),mceTablePasteColBefore:()=>gn(w.pasteColsBefore,HE),mceTablePasteColAfter:()=>gn(w.pasteColsAfter,HE),mceTablePasteRowBefore:()=>gn(w.pasteRowsBefore,z0),mceTablePasteRowAfter:()=>gn(w.pasteRowsAfter,z0),mceTableDelete:M,mceTableCellToggleClass:Re,mceTableToggleClass:Ae,mceTableToggleCaption:nt,mceTableSizingMode:(on,ws)=>K(ws),mceTableCellType:ss(on=>on==="th"?w.makeCellsHeader:w.unmakeCellsHeader),mceTableColType:ss(on=>on==="th"?w.makeColumnsHeader:w.unmakeColumnsHeader),mceTableRowType:ss(on=>{switch(on){case"header":return w.makeRowsHeader;case"footer":return w.makeRowsFooter;default:return w.makeRowsBody}})},(on,ws)=>y.addCommand(ws,on)),y.addCommand("mceInsertTable",(on,ws)=>{SD(y,ws.rows,ws.columns,ws.options)}),y.addCommand("mceTableApplyCellStyle",(on,ws)=>{const qt=Cr=>"tablecell"+Cr.toLowerCase().replace("-","");if(!d(ws))return;const Fn=At(a1(y),a4);if(Fn.length===0)return;const Sr=Wn(ws,(Cr,ls)=>y.formatter.has(qt(ls))&&f(Cr));xr(Sr)||(je(Sr,(Cr,ls)=>{const Xr=qt(ls);He(Fn,nu=>{Cr===""?y.formatter.remove(Xr,{value:null},nu.dom,!0):y.formatter.apply(Xr,{value:Cr},nu.dom)})}),re(Fn[0]).each(Cr=>Pa(y,Cr.dom,Ay)))})},E6=(y,w)=>{const A=s1(y),M=K=>cf(ly(y)).bind(re=>Ds(re,A).map(_e=>{const Ae=sa(a1(y),_e,re);return K(_e,Ae)})).getOr("");je({mceTableRowType:()=>M(w.getTableRowType),mceTableCellType:()=>M(w.getTableCellType),mceTableColType:()=>M(w.getTableColType)},(K,re)=>y.addQueryValueHandler(re,K))},k6=Su.generate([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),ch=(y,w,A,M)=>y.fold(w,A,M),H4=y=>y.fold(q,q,q),CD=k6.before,Cg=k6.on,U4=k6.after,ku={before:CD,on:Cg,after:U4,cata:ch,getStart:H4},C2={create:(y,w)=>({selection:y,kill:w})},wD=(y,w)=>{const A=y.document.createRange();return A.selectNode(w.dom),A},Py=(y,w)=>{const A=y.document.createRange();return ED(A,w),A},ED=(y,w)=>y.selectNodeContents(w.dom),kD=(y,w)=>{w.fold(A=>{y.setStartBefore(A.dom)},(A,M)=>{y.setStart(A.dom,M)},A=>{y.setStartAfter(A.dom)})},zE=(y,w)=>{w.fold(A=>{y.setEndBefore(A.dom)},(A,M)=>{y.setEnd(A.dom,M)},A=>{y.setEndAfter(A.dom)})},WE=(y,w,A)=>{const M=y.document.createRange();return kD(M,w),zE(M,A),M},z4=(y,w,A,M,K)=>{const re=y.document.createRange();return re.setStart(w.dom,A),re.setEnd(M.dom,K),re},xD=y=>({left:y.left,top:y.top,right:y.right,bottom:y.bottom,width:y.width,height:y.height}),TD=y=>{const w=y.getClientRects(),A=w.length>0?w[0]:y.getBoundingClientRect();return A.width>0||A.height>0?ie.some(A).map(xD):ie.none()},My=Su.generate([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),x6=(y,w,A)=>w(fn.fromDom(A.startContainer),A.startOffset,fn.fromDom(A.endContainer),A.endOffset),T6=(y,w)=>w.match({domRange:A=>({ltr:z(A),rtl:ie.none}),relative:(A,M)=>({ltr:ji(()=>WE(y,A,M)),rtl:ji(()=>ie.some(WE(y,M,A)))}),exact:(A,M,K,re)=>({ltr:ji(()=>z4(y,A,M,K,re)),rtl:ji(()=>ie.some(z4(y,K,re,A,M)))})}),jE=(y,w)=>{const A=w.ltr();return A.collapsed?w.rtl().filter(K=>K.collapsed===!1).map(K=>My.rtl(fn.fromDom(K.endContainer),K.endOffset,fn.fromDom(K.startContainer),K.startOffset)).getOrThunk(()=>x6(y,My.ltr,A)):x6(y,My.ltr,A)},ZE=(y,w)=>{const A=T6(y,w);return jE(y,A)},W4=(y,w)=>ZE(y,w).match({ltr:(M,K,re,_e)=>{const Ae=y.document.createRange();return Ae.setStart(M.dom,K),Ae.setEnd(re.dom,_e),Ae},rtl:(M,K,re,_e)=>{const Ae=y.document.createRange();return Ae.setStart(re.dom,_e),Ae.setEnd(M.dom,K),Ae}});My.ltr,My.rtl;const w2={create:(y,w,A,M)=>({start:y,soffset:w,finish:A,foffset:M})},Ny={create:(y,w,A,M)=>({start:ku.on(y,w),finish:ku.on(A,M)})},Fy=(y,w)=>{const A=W4(y,w);return w2.create(fn.fromDom(A.startContainer),A.startOffset,fn.fromDom(A.endContainer),A.endOffset)},j4=Ny.create,ID=(y,w,A,M,K,re,_e)=>_o(A,K)&&M===re?ie.none():Ia(A,"td,th",w).bind(Ae=>Ia(K,"td,th",w).bind(Re=>qE(y,w,Ae,Re,_e))),qE=(y,w,A,M,K)=>_o(A,M)?ie.none():d4(A,M,w).bind(re=>{const _e=re.boxes.getOr([]);return _e.length>1?(K(y,_e,re.start,re.finish),ie.some(C2.create(ie.some(j4(A,0,A,Qh(A))),!0))):ie.none()}),AD=(y,w,A,M,K)=>{const re=_e=>(K.clearBeforeUpdate(A),K.selectRange(A,_e.boxes,_e.start,_e.finish),_e.boxes);return Pd(M,y,w,K.firstSelectedSelector,K.lastSelectedSelector).map(re)},I6=(y,w)=>({item:y,mode:w}),A6=(y,w,A,M=u1)=>y.property().parent(w).map(K=>I6(K,M)),u1=(y,w,A,M=$y)=>A.sibling(y,w).map(K=>I6(K,M)),$y=(y,w,A,M=$y)=>{const K=y.property().children(w);return A.first(K).map(_e=>I6(_e,M))},OD=[{current:A6,next:u1,fallback:ie.none()},{current:u1,next:$y,fallback:ie.some(A6)},{current:$y,next:$y,fallback:ie.some(u1)}],O6=(y,w,A,M,K=OD)=>ye(K,_e=>_e.current===A).bind(_e=>_e.current(y,w,M,_e.next).orThunk(()=>_e.fallback.bind(Ae=>O6(y,w,Ae,M)))),KE={left:()=>({sibling:(A,M)=>A.query().prevSibling(M),first:A=>A.length>0?ie.some(A[A.length-1]):ie.none()}),right:()=>({sibling:(A,M)=>A.query().nextSibling(M),first:A=>A.length>0?ie.some(A[0]):ie.none()})},R6=(y,w,A,M,K,re)=>O6(y,w,M,K).bind(Ae=>re(Ae.item)?ie.none():A(Ae.item)?ie.some(Ae.item):R6(y,Ae.item,A,Ae.mode,K,re)),wg=(y,w,A,M)=>R6(y,w,A,u1,KE.left(),M),RD=(y,w,A,M)=>R6(y,w,A,u1,KE.right(),M),D6=y=>w=>y.property().children(w).length===0,L6=(y,w,A)=>Z4(y,w,D6(y),A),P6=(y,w,A)=>M6(y,w,D6(y),A),Z4=wg,M6=RD,q4=$r(),E2=(y,w)=>L6(q4,y,w),N6=(y,w)=>P6(q4,y,w),DD=(y,w,A)=>Z4(q4,y,w,A),LD=(y,w,A)=>M6(q4,y,w,A),W0=(y,w,A)=>Gt(y,w,A).isSome(),By=Su.generate([{none:["message"]},{success:[]},{failedUp:["cell"]},{failedDown:["cell"]}]),YE=(y,w,A)=>{const M=y.getRect(w),K=y.getRect(A);return K.right>M.left&&K.left<M.right},xu=y=>Ia(y,"tr"),k2={...By,verify:(y,w,A,M,K,re,_e)=>Ia(M,"td,th",_e).bind(Ae=>Ia(w,"td,th",_e).map(Re=>_o(Ae,Re)?_o(M,Ae)&&Qh(Ae)===K?re(Re):By.none("in same cell"):o2(xu,[Ae,Re]).fold(()=>YE(y,Re,Ae)?By.success():re(Re),nt=>re(Re)))).getOr(By.none("default")),cata:(y,w,A,M,K)=>y.fold(w,A,M,K)},XE=(y,w,A,M)=>({parent:y,children:w,element:A,index:M}),JE=y=>Ai(y).bind(w=>{const A=gr(w);return Vy(A,y).map(M=>XE(w,A,y,M))}),Vy=(y,w)=>lo(y,ue(_o,w)),Eg=Hi("br"),F6=(y,w,A)=>w(y,A).bind(M=>Bo(M)&&RC(M).trim().length===0?F6(M,w,A):ie.some(M)),QE=(y,w,A)=>A.traverse(w).orThunk(()=>F6(w,A.gather,y)).map(A.relative),MD=(y,w)=>hi(y,w).filter(Eg).orThunk(()=>hi(y,w-1).filter(Eg)),ek=(y,w,A,M)=>MD(w,A).bind(K=>M.traverse(K).fold(()=>F6(K,M.gather,y).map(M.relative),re=>JE(re).map(_e=>ku.on(_e.parent,_e.index)))),Hy=(y,w,A,M)=>(Eg(w)?QE(y,w,M):ek(y,w,A,M)).map(re=>({start:re,finish:re})),tk=y=>k2.cata(y,w=>ie.none(),()=>ie.none(),w=>ie.some(Hu(w,0)),w=>ie.some(Hu(w,Qh(w)))),Uy=(y,w)=>({left:y.left,top:y.top+w,right:y.right,bottom:y.bottom+w}),x2=(y,w)=>({left:y.left,top:y.top-w,right:y.right,bottom:y.bottom-w}),$6=(y,w,A)=>({left:y.left+w,top:y.top+A,right:y.right+w,bottom:y.bottom+A}),T2=y=>y.top,j0=y=>y.bottom,Z0=(y,w,A)=>A>=0&&A<Qh(w)?y.getRangedRect(w,A,w,A+1):A>0?y.getRangedRect(w,A-1,w,A):ie.none(),d1=y=>({left:y.left,top:y.top,right:y.right,bottom:y.bottom}),B6=(y,w)=>ie.some(y.getRect(w)),uh=(y,w,A)=>Ps(w)?B6(y,w).map(d1):Bo(w)?Z0(y,w,A).map(d1):ie.none(),pp=(y,w)=>Ps(w)?B6(y,w).map(d1):Bo(w)?y.getRangedRect(w,0,w,Qh(w)).map(d1):ie.none(),dh=5,V6=100,rm=Su.generate([{none:[]},{retry:["caret"]}]),H6=(y,w)=>y.left<w.left||Math.abs(w.right-y.left)<1||y.left>w.right,q0=(y,w,A)=>Zl(w,g2).fold(de,M=>pp(y,M).exists(K=>H6(A,K))),I2=(y,w,A,M,K)=>{const re=Uy(K,dh);return Math.abs(A.bottom-M.bottom)<1||A.top>K.bottom?rm.retry(re):A.top===K.bottom?rm.retry(Uy(K,1)):q0(y,w,K)?rm.retry($6(re,dh,0)):rm.none()},sk={point:T2,adjuster:(y,w,A,M,K)=>{const re=x2(K,dh);return Math.abs(A.top-M.top)<1||A.bottom<K.top?rm.retry(re):A.bottom===K.top?rm.retry(x2(K,1)):q0(y,w,K)?rm.retry($6(re,dh,0)):rm.none()},move:x2,gather:E2},zy={point:j0,adjuster:I2,move:Uy,gather:N6},G4=(y,w,A)=>y.elementFromPoint(w,A).filter(M=>us(M)==="table").isSome(),ND=(y,w,A,M,K)=>Wy(y,w,A,w.move(M,dh),K),Wy=(y,w,A,M,K)=>K===0?ie.some(M):G4(y,M.left,w.point(M))?ND(y,w,A,M,K-1):y.situsFromPoint(M.left,w.point(M)).bind(re=>re.start.fold(ie.none,_e=>pp(y,_e).bind(Ae=>w.adjuster(y,_e,Ae,A,M).fold(ie.none,Re=>Wy(y,w,A,Re,K-1))).orThunk(()=>ie.some(M)),ie.none)),K4=(y,w,A)=>y.point(w)>A.getInnerHeight()?ie.some(y.point(w)-A.getInnerHeight()):y.point(w)<0?ie.some(-y.point(w)):ie.none(),ok=(y,w,A)=>{const M=y.move(A,dh),K=Wy(w,y,A,M,V6).getOr(M);return K4(y,K,w).fold(()=>w.situsFromPoint(K.left,y.point(K)),re=>(w.scrollBy(0,re),w.situsFromPoint(K.left,y.point(K)-re)))},mp={tryUp:ue(ok,sk),tryDown:ue(ok,zy),getJumpSize:z(dh)},rk=20,Y4=(y,w,A)=>y.getSelection().bind(M=>Hy(w,M.finish,M.foffset,A).fold(()=>ie.some(Hu(M.finish,M.foffset)),K=>{const re=y.fromSitus(K),_e=k2.verify(y,M.finish,M.foffset,re.finish,re.foffset,A.failure,w);return tk(_e)})),G0=(y,w,A,M,K,re)=>re===0?ie.none():xU(y,w,A,M,K).bind(_e=>{const Ae=y.fromSitus(_e),Re=k2.verify(y,A,M,Ae.finish,Ae.foffset,K.failure,w);return k2.cata(Re,()=>ie.none(),()=>ie.some(_e),nt=>_o(A,nt)&&M===0?ik(y,A,M,x2,K):G0(y,w,nt,0,K,re-1),nt=>_o(A,nt)&&M===Qh(nt)?ik(y,A,M,Uy,K):G0(y,w,nt,Qh(nt),K,re-1))}),ik=(y,w,A,M,K)=>uh(y,w,A).bind(re=>jy(y,K,M(re,mp.getJumpSize()))),jy=(y,w,A)=>{const M=Yf().browser;return M.isChromium()||M.isSafari()||M.isFirefox()?w.retry(y,A):ie.none()},xU=(y,w,A,M,K)=>uh(y,A,M).bind(re=>jy(y,K,re)),ak=(y,w,A)=>Y4(y,w,A).bind(M=>G0(y,w,M.element,M.offset,A,rk).map(y.fromSitus)),yc=(y,w)=>W0(y,A=>Ai(A).exists(M=>_o(M,w))),X4=(y,w,A,M,K)=>Ia(M,"td,th",w).bind(re=>Ia(re,"table",w).bind(_e=>yc(K,_e)?ak(y,w,A).bind(Ae=>Ia(Ae.finish,"td,th",w).map(Re=>({start:re,finish:Re,range:Ae}))):ie.none())),kg=(y,w,A,M,K,re)=>re(M,w).orThunk(()=>X4(y,w,A,M,K).map(_e=>{const Ae=_e.range;return C2.create(ie.some(j4(Ae.start,Ae.soffset,Ae.finish,Ae.foffset)),!0)})),Fd=(y,w)=>Ia(y,"tr",w).bind(A=>Ia(A,"table",w).bind(M=>{const K=Vo(M,"tr");return _o(A,K[0])?DD(M,re=>e4(re).isSome(),w).map(re=>{const _e=Qh(re);return C2.create(ie.some(j4(re,_e,re,_e)),!0)}):ie.none()})),lk=(y,w)=>Ia(y,"tr",w).bind(A=>Ia(A,"table",w).bind(M=>{const K=Vo(M,"tr");return _o(A,K[K.length-1])?LD(M,re=>O9(re).isSome(),w).map(re=>C2.create(ie.some(j4(re,0,re,0)),!0)):ie.none()})),J4=(y,w,A,M,K,re,_e)=>X4(y,A,M,K,re).bind(Ae=>qE(w,A,Ae.start,Ae.finish,_e)),Zy=y=>{let w=y;return{get:()=>w,set:K=>{w=K}}},ck=y=>{const w=Zy(ie.none()),A=()=>w.get().each(y);return{clear:()=>{A(),w.set(ie.none())},isSet:()=>w.get().isSome(),get:()=>w.get(),set:Ae=>{A(),w.set(ie.some(Ae))}}},qy=()=>{const y=ck(W);return{...y,on:A=>y.get().each(A)}},uk=(y,w)=>Ia(y,"td,th",w),K0=y=>fc(y).exists(I0),$d=(y,w,A,M)=>{const K=qy(),re=K.clear,_e=vt=>{K.on(tn=>{M.clearBeforeUpdate(w),uk(vt.target,A).each(An=>{d4(tn,An,A).each(mn=>{const gn=mn.boxes.getOr([]);if(gn.length===1){const ss=gn[0],on=ay(ss)==="false",ws=Oc(ag(vt.target),ss,_o);on&&ws&&M.selectRange(w,gn,ss,ss)}else gn.length>1&&(M.selectRange(w,gn,mn.start,mn.finish),y.selectContents(An))})})})};return{clearstate:re,mousedown:vt=>{M.clear(w),uk(vt.target,A).filter(K0).each(K.set)},mouseover:vt=>{_e(vt)},mouseup:vt=>{_e(vt),re()}}},xg={traverse:cl,gather:N6,relative:ku.before,retry:mp.tryDown,failure:k2.failedDown},im={traverse:xl,gather:E2,relative:ku.before,retry:mp.tryUp,failure:k2.failedUp},hp=y=>w=>w===y,_c=hp(38),Ql=hp(40),sl=y=>y>=37&&y<=40,gp={isBackward:hp(37),isForward:hp(39)},Q4={isBackward:hp(39),isForward:hp(37)},Bd=y=>{const w=y!==void 0?y.dom:document,A=w.body.scrollLeft||w.documentElement.scrollLeft,M=w.body.scrollTop||w.documentElement.scrollTop;return cs(A,M)},Y0=(y,w,A)=>{const K=(A!==void 0?A.dom:document).defaultView;K&&K.scrollBy(y,w)},e_=Su.generate([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),dk=y=>e_.exact(y.start,y.soffset,y.finish,y.foffset),fk=y=>y.match({domRange:w=>fn.fromDom(w.startContainer),relative:(w,A)=>ku.getStart(w),exact:(w,A,M,K)=>w}),pk=e_.domRange,mk=e_.relative,t_=e_.exact,hk=y=>{const w=fk(y);return hr(w)},gk=w2.create,A2={domRange:pk,relative:mk,exact:t_,exactFromRange:dk,getWin:hk,range:gk},vk=(y,w,A)=>{var M;return ie.from((M=y.caretPositionFromPoint)===null||M===void 0?void 0:M.call(y,w,A)).bind(K=>{if(K.offsetNode===null)return ie.none();const re=y.createRange();return re.setStart(K.offsetNode,K.offset),re.collapse(),ie.some(re)})},FD=(y,w,A)=>{var M;return ie.from((M=y.caretRangeFromPoint)===null||M===void 0?void 0:M.call(y,w,A))},$D=(y,w,A)=>y.caretPositionFromPoint?vk(y,w,A):y.caretRangeFromPoint?FD(y,w,A):ie.none(),bk=(y,w,A)=>{const M=y.document;return $D(M,w,A).map(K=>w2.create(fn.fromDom(K.startContainer),K.startOffset,fn.fromDom(K.endContainer),K.endOffset))},O2=(y,w)=>{const A=us(y);return A==="input"?ku.after(y):Ye(["br","img"],A)?w===0?ku.before(y):ku.after(y):ku.on(y,w)},BD=(y,w)=>{const A=y.fold(ku.before,O2,ku.after),M=w.fold(ku.before,O2,ku.after);return A2.relative(A,M)},VD=(y,w,A,M)=>{const K=O2(y,w),re=O2(A,M);return A2.relative(K,re)},Uo=(y,w,A,M)=>{const re=Ao(y).dom.createRange();return re.setStart(y.dom,w),re.setEnd(A.dom,M),re},Tg=(y,w,A,M)=>{const K=Uo(y,w,A,M),re=_o(y,A)&&w===M;return K.collapsed&&!re},f1=y=>ie.from(y.getSelection()),n_=(y,w)=>{f1(y).each(A=>{A.removeAllRanges(),A.addRange(w)})},U6=(y,w,A,M,K)=>{const re=z4(y,w,A,M,K);n_(y,re)},hd=(y,w,A,M,K,re)=>{w.collapse(A.dom,M),w.extend(K.dom,re)},HD=(y,w)=>ZE(y,w).match({ltr:(A,M,K,re)=>{U6(y,A,M,K,re)},rtl:(A,M,K,re)=>{f1(y).each(_e=>{if(_e.setBaseAndExtent)_e.setBaseAndExtent(A.dom,M,K.dom,re);else if(_e.extend)try{hd(y,_e,A,M,K,re)}catch{U6(y,K,re,A,M)}else U6(y,K,re,A,M)})}}),X0=(y,w,A,M,K)=>{const re=VD(w,A,M,K);HD(y,re)},fh=(y,w,A)=>{const M=BD(w,A);HD(y,M)},Gy=y=>{if(y.rangeCount>0){const w=y.getRangeAt(0),A=y.getRangeAt(y.rangeCount-1);return ie.some(w2.create(fn.fromDom(w.startContainer),w.startOffset,fn.fromDom(A.endContainer),A.endOffset))}else return ie.none()},yk=y=>{if(y.anchorNode===null||y.focusNode===null)return Gy(y);{const w=fn.fromDom(y.anchorNode),A=fn.fromDom(y.focusNode);return Tg(w,y.anchorOffset,A,y.focusOffset)?ie.some(w2.create(w,y.anchorOffset,A,y.focusOffset)):Gy(y)}},UD=(y,w,A=!0)=>{const K=(A?Py:wD)(y,w);n_(y,K)},TU=y=>f1(y).filter(w=>w.rangeCount>0).bind(yk),_k=y=>TU(y).map(w=>A2.exact(w.start,w.soffset,w.finish,w.foffset)),IU=(y,w)=>{const A=W4(y,w);return TD(A)},Sk=(y,w,A)=>bk(y,w,A),J0=y=>{f1(y).each(w=>w.removeAllRanges())},Q0=y=>({elementFromPoint:(on,ws)=>fn.fromPoint(fn.fromDom(y.document),on,ws),getRect:on=>on.dom.getBoundingClientRect(),getRangedRect:(on,ws,qt,Fn)=>{const Sr=A2.exact(on,ws,qt,Fn);return IU(y,Sr)},getSelection:()=>_k(y).map(on=>Fy(y,on)),fromSitus:on=>{const ws=A2.relative(on.start,on.finish);return Fy(y,ws)},situsFromPoint:(on,ws)=>Sk(y,on,ws).map(qt=>Ny.create(qt.start,qt.soffset,qt.finish,qt.foffset)),clearSelection:()=>{J0(y)},collapseSelection:(on=!1)=>{_k(y).each(ws=>ws.fold(qt=>qt.collapse(on),(qt,Fn)=>{const Sr=on?qt:Fn;fh(y,Sr,Sr)},(qt,Fn,Sr,Cr)=>{const ls=on?qt:Sr,Xr=on?Fn:Cr;X0(y,ls,Xr,ls,Xr)}))},setSelection:on=>{X0(y,on.start,on.soffset,on.finish,on.foffset)},setRelativeSelection:(on,ws)=>{fh(y,on,ws)},selectNode:on=>{UD(y,on,!1)},selectContents:on=>{UD(y,on)},getInnerHeight:()=>y.innerHeight,getScrollY:()=>Bd(fn.fromDom(y.document)).top,scrollBy:(on,ws)=>{Y0(on,ws,fn.fromDom(y.document))}}),ev=(y,w)=>({rows:y,cols:w}),AU=(y,w,A,M)=>{const K=Q0(y),re=$d(K,w,A,M);return{clearstate:re.clearstate,mousedown:re.mousedown,mouseover:re.mouseover,mouseup:re.mouseup}},z6=y=>Zl(y,Kt).exists(I0),R2=(y,w)=>z6(y)||z6(w),W6=(y,w,A,M)=>{const K=Q0(y),re=()=>(M.clear(w),ie.none());return{keydown:(Re,nt,vt,tn,An,mn)=>{const gn=Re.raw,ss=gn.which,on=gn.shiftKey===!0;return i1(w,M.selectedSelector).fold(()=>(sl(ss)&&!on&&M.clearBeforeUpdate(w),sl(ss)&&on&&!R2(nt,tn)?ie.none:Ql(ss)&&on?ue(J4,K,w,A,xg,tn,nt,M.selectRange):_c(ss)&&on?ue(J4,K,w,A,im,tn,nt,M.selectRange):Ql(ss)?ue(kg,K,A,xg,tn,nt,lk):_c(ss)?ue(kg,K,A,im,tn,nt,Fd):ie.none),qt=>{const Fn=Sr=>()=>kn(Sr,ls=>AD(ls.rows,ls.cols,w,qt,M)).fold(()=>BC(w,M.firstSelectedSelector,M.lastSelectedSelector).map(ls=>{const Xr=Ql(ss)||mn.isForward(ss)?ku.after:ku.before;return K.setRelativeSelection(ku.on(ls.first,0),Xr(ls.table)),M.clear(w),C2.create(ie.none(),!0)}),ls=>ie.some(C2.create(ie.none(),!0)));return sl(ss)&&on&&!R2(nt,tn)?ie.none:Ql(ss)&&on?Fn([ev(1,0)]):_c(ss)&&on?Fn([ev(-1,0)]):mn.isBackward(ss)&&on?Fn([ev(0,-1),ev(-1,0)]):mn.isForward(ss)&&on?Fn([ev(0,1),ev(1,0)]):sl(ss)&&!on?re:ie.none})()},keyup:(Re,nt,vt,tn,An)=>i1(w,M.selectedSelector).fold(()=>{const mn=Re.raw,gn=mn.which;return mn.shiftKey===!0&&sl(gn)&&R2(nt,tn)?ID(w,A,nt,vt,tn,An,M.selectRange):ie.none()},ie.none)}},j6=(y,w,A,M)=>{const K=Q0(y);return(re,_e)=>{M.clearBeforeUpdate(w),d4(re,_e,A).each(Ae=>{const Re=Ae.boxes.getOr([]);M.selectRange(w,Re,Ae.start,Ae.finish),K.selectContents(_e),K.collapseSelection()})}},D2=(y,w)=>{const A=Ti(y,w);return A===void 0||A===""?[]:A.split(" ")},Z6=(y,w,A)=>{const K=D2(y,w).concat([A]);return Wr(y,w,K.join(" ")),!0},Ck=(y,w,A)=>{const M=At(D2(y,w),K=>K!==A);return M.length>0?Wr(y,w,M.join(" ")):yr(y,w),!1},Ig=y=>y.dom.classList!==void 0,q6=y=>D2(y,"class"),zD=(y,w)=>Z6(y,"class",w),wk=(y,w)=>Ck(y,"class",w),p1=(y,w)=>{Ig(y)?y.dom.classList.add(w):zD(y,w)},Ek=y=>{(Ig(y)?y.dom.classList:q6(y)).length===0&&yr(y,"class")},G6=(y,w)=>{Ig(y)?y.dom.classList.remove(w):wk(y,w),Ek(y)},Ag=(y,w)=>Ig(y)&&y.dom.classList.contains(w),K6=(y,w)=>{He(w,A=>{G6(y,A)})},Dn=y=>w=>{p1(w,y)},Ll=y=>w=>{K6(w,y)},Vd={byClass:y=>{const w=Dn(y.selected),A=Ll([y.selected,y.lastSelected,y.firstSelected]),M=re=>{const _e=Vo(re,y.selectedSelector);He(_e,A)};return{clearBeforeUpdate:M,clear:M,selectRange:(re,_e,Ae,Re)=>{M(re),He(_e,w),p1(Ae,y.firstSelected),p1(Re,y.lastSelected)},selectedSelector:y.selectedSelector,firstSelectedSelector:y.firstSelectedSelector,lastSelectedSelector:y.lastSelectedSelector}},byAttr:(y,w,A)=>{const M=Re=>{yr(Re,y.selected),yr(Re,y.firstSelected),yr(Re,y.lastSelected)},K=Re=>{Wr(Re,y.selected,"1")},re=Re=>{_e(Re),A()},_e=Re=>{const nt=Vo(Re,"".concat(y.selectedSelector,",").concat(y.firstSelectedSelector,",").concat(y.lastSelectedSelector));He(nt,M)};return{clearBeforeUpdate:_e,clear:re,selectRange:(Re,nt,vt,tn)=>{re(Re),He(nt,K),Wr(vt,y.firstSelected,"1"),Wr(tn,y.lastSelected,"1"),w(nt,vt,tn)},selectedSelector:y.selectedSelector,firstSelectedSelector:y.firstSelectedSelector,lastSelectedSelector:y.lastSelectedSelector}}},o_=(y,w,A,M)=>{switch(y.tag){case"none":return w();case"single":return M(y.element);case"multiple":return A(y.elements)}},tv=()=>({tag:"none"}),r_=y=>({tag:"multiple",elements:y}),i_=y=>({tag:"single",element:y}),Y6=(y,w,A)=>({get:()=>cn(y(),A).fold(()=>w().fold(tv,i_),r_)}),kk=(y,w)=>{const A=y.slice(0,w[w.length-1].row+1),M=v4(A);return so(M,K=>{const re=K.cells.slice(0,w[w.length-1].column+1);return Dt(re,_e=>_e.element)})},WD=(y,w)=>{const A=y.slice(w[0].row+w[0].rowspan-1,y.length),M=v4(A);return so(M,K=>{const re=K.cells.slice(w[0].column+w[0].colspan-1,K.cells.length);return Dt(re,_e=>_e.element)})},ph=(y,w,A)=>{const M=xo.fromTable(y);return Uu(M,w).map(re=>{const _e=yy(M,A,!1),{rows:Ae}=Al(_e),Re=kk(Ae,re),nt=WD(Ae,re);return{upOrLeftCells:Re,downOrRightCells:nt}})},jD=(y,w,A,M,K,re,_e)=>({target:y,x:w,y:A,stop:M,prevent:K,kill:re,raw:_e}),X6=y=>{const w=fn.fromDom(jt(y).getOr(y.target)),A=()=>y.stopPropagation(),M=()=>y.preventDefault(),K=Z(M,A);return jD(w,y.clientX,y.clientY,A,M,K,y)},pf=(y,w)=>A=>{y(A)&&w(X6(A))},vl=(y,w,A,M,K)=>{const re=pf(A,M);return y.dom.addEventListener(w,re,K),{unbind:ue(L2,y,w,re,K)}},a_=(y,w,A,M)=>vl(y,w,A,M,!1),L2=(y,w,A,M)=>{y.dom.removeEventListener(w,A,M)},J6=he,mh=(y,w,A)=>a_(y,w,J6,A),m1=X6,Og=y=>!Ag(fn.fromDom(y.target),"ephox-snooker-resizer-bar"),Ky=(y,w)=>{const A=Y6(()=>fn.fromDom(y.getBody()),()=>cf(ly(y),s1(y)),pd.selectedSelector),M=(Re,nt,vt)=>{Ds(nt).each(An=>{const mn=Dt(Re,qt=>qt.dom),gn=e2(y),ss=oy(W,fn.fromDom(y.getDoc()),gn),on=a1(y),ws=ph(An,{selection:on},ss).map(qt=>Ze(qt,Fn=>Dt(Fn,Sr=>Sr.dom))).getOrUndefined();hl(y,mn,nt.dom,vt.dom,ws)})},K=()=>nl(y),re=Vd.byAttr(pd,M,K);return y.on("init",Re=>{const nt=y.getWin(),vt=n2(y),tn=s1(y),An=()=>{const Rr=y.selection,Cc=fn.fromDom(Rr.getStart()),bl=fn.fromDom(Rr.getEnd());o2(Ds,[Cc,bl]).fold(()=>re.clear(vt),W)},mn=AU(nt,vt,tn,re),gn=W6(nt,vt,tn,re),ss=j6(nt,vt,tn,re),on=Rr=>Rr.raw.shiftKey===!0;y.on("TableSelectorChange",Rr=>ss(Rr.start,Rr.finish));const ws=(Rr,Cc)=>{on(Rr)&&(Cc.kill&&Rr.kill(),Cc.selection.each(bl=>{const hf=A2.relative(bl.start,bl.finish),wc=W4(nt,hf);y.selection.setRng(wc)}))},qt=Rr=>{const Cc=m1(Rr);if(Cc.raw.shiftKey&&sl(Cc.raw.which)){const bl=y.selection.getRng(),hf=fn.fromDom(bl.startContainer),wc=fn.fromDom(bl.endContainer);gn.keyup(Cc,hf,bl.startOffset,wc,bl.endOffset).each(bp=>{ws(Cc,bp)})}},Fn=Rr=>{const Cc=m1(Rr);w.hide();const bl=y.selection.getRng(),hf=fn.fromDom(bl.startContainer),wc=fn.fromDom(bl.endContainer),bp=Ce(gp,Q4)(fn.fromDom(y.selection.getStart()));gn.keydown(Cc,hf,bl.startOffset,wc,bl.endOffset,bp).each(su=>{ws(Cc,su)}),w.show()},Sr=Rr=>Rr.button===0,Cr=Rr=>Rr.buttons===void 0?!0:(Rr.buttons&1)!==0,ls=Rr=>{mn.clearstate()},Xr=Rr=>{Sr(Rr)&&Og(Rr)&&mn.mousedown(m1(Rr))},nu=Rr=>{Cr(Rr)&&Og(Rr)&&mn.mouseover(m1(Rr))},Rg=Rr=>{Sr(Rr)&&Og(Rr)&&mn.mouseup(m1(Rr))},To=(()=>{const Rr=Zy(fn.fromDom(vt)),Cc=Zy(0);return{touchEnd:hf=>{const wc=fn.fromDom(hf.target);if(Hi("td")(wc)||Hi("th")(wc)){const bp=Rr.get(),su=Cc.get();_o(bp,wc)&&hf.timeStamp-su<300&&(hf.preventDefault(),ss(wc,wc))}Rr.set(wc),Cc.set(hf.timeStamp)}}})();y.on("dragstart",ls),y.on("mousedown",Xr),y.on("mouseover",nu),y.on("mouseup",Rg),y.on("touchend",To.touchEnd),y.on("keyup",qt),y.on("keydown",Fn),y.on("NodeChange",An)}),y.on("PreInit",()=>{y.serializer.addTempAttr(pd.firstSelected),y.serializer.addTempAttr(pd.lastSelected)}),{getSelectedCells:()=>o_(A.get(),z([]),Re=>Dt(Re,nt=>nt.dom),Re=>[Re.dom]),clearSelectedCells:Re=>re.clear(fn.fromDom(Re))}},Zu=y=>{let w=[];return{bind:re=>{if(re===void 0)throw new Error("Event bind error: undefined handler");w.push(re)},unbind:re=>{w=At(w,_e=>_e!==re)},trigger:(...re)=>{const _e={};He(y,(Ae,Re)=>{_e[Ae]=re[Re]}),He(w,Ae=>{Ae(_e)})}}},nv=y=>{const w=Ze(y,M=>({bind:M.bind,unbind:M.unbind})),A=Ze(y,M=>M.trigger);return{registry:w,trigger:A}},ZD=(y,w)=>{let A=null;const M=()=>{b(A)||(clearTimeout(A),A=null)};return{cancel:M,throttle:(...re)=>{M(),A=setTimeout(()=>{A=null,y.apply(null,re)},w)}}},P2=y=>y.slice(0).sort(),xk=(y,w)=>{throw new Error("All required keys ("+P2(y).join(", ")+") were not specified. Specified keys were: "+P2(w).join(", ")+".")},Tk=y=>{throw new Error("Unsupported keys for object: "+P2(y).join(", "))},Ik=(y,w)=>{if(!h(w))throw new Error("The "+y+" fields must be an array. Was: "+w+".");He(w,A=>{if(!f(A))throw new Error("The value "+A+" in the "+y+" fields was not a string.")})},Ak=(y,w)=>{throw new Error("All values need to be of type: "+w+". Keys ("+P2(y).join(", ")+") were not.")},Yy=y=>{const w=P2(y);ye(w,(M,K)=>K<w.length-1&&M===w[K+1]).each(M=>{throw new Error("The field: "+M+" occurs more than once in the combined fields: ["+w.join(", ")+"].")})},Sc=(y,w)=>mf(y,w,{validate:P,label:"function"}),mf=(y,w,A)=>{if(w.length===0)throw new Error("You must specify at least one required field.");return Ik("required",w),Yy(w),M=>{const K=Bt(M);Xs(w,Ae=>Ye(K,Ae))||xk(w,K),y(w,K);const _e=At(w,Ae=>!A.validate(M[Ae],Ae));return _e.length>0&&Ak(_e,A.label),M}},qu=(y,w)=>{const A=At(w,M=>!Ye(y,M));A.length>0&&Tk(A)},sv=y=>Sc(qu,y),h1=sv(["compare","extract","mutate","sink"]),Xy=sv(["element","start","stop","destroy"]),Q6=sv(["forceDrop","drop","move","delayDrop"]),qD=()=>{let y=ie.none();const w=()=>{y=ie.none()},A=(re,_e)=>{const Ae=y.map(Re=>re.compare(Re,_e));return y=ie.some(_e),Ae},M=(re,_e)=>{_e.extract(re).each(Re=>{A(_e,Re).each(vt=>{K.trigger.move(vt)})})},K=nv({move:Zu(["info"])});return{onEvent:M,reset:w,events:K.registry}},e8=()=>{const y=nv({move:Zu(["info"])});return{onEvent:W,reset:W,events:y.registry}},GD=()=>{const y=e8(),w=qD();let A=y;return{on:()=>{A.reset(),A=w},off:()=>{A.reset(),A=y},isOn:()=>A===w,onEvent:(Ae,Re)=>{A.onEvent(Ae,Re)},events:w.events}},l_=(y,w,A)=>{let M=!1;const K=nv({start:Zu([]),stop:Zu([])}),re=GD(),_e=()=>{gn.stop(),re.isOn()&&(re.off(),K.trigger.stop())},Ae=ZD(_e,200),Re=on=>{gn.start(on),re.on(),K.trigger.start()},nt=on=>{Ae.cancel(),re.onEvent(on,w)};re.events.move.bind(on=>{w.mutate(y,on.info)});const vt=()=>{M=!0},tn=()=>{M=!1},An=()=>M,mn=on=>(...ws)=>{M&&on.apply(null,ws)},gn=w.sink(Q6({forceDrop:_e,drop:mn(_e),move:mn(nt),delayDrop:mn(Ae.throttle)}),A),ss=()=>{gn.destroy()};return{element:gn.element,go:Re,on:vt,off:tn,isActive:An,destroy:ss,events:K.registry}},t8=y=>{const w=y.replace(/\./g,"-");return{resolve:M=>w+"-"+M}},c_=t8("ephox-dragster").resolve,n8=y=>{const w={layerClass:c_("blocker"),...y},A=fn.fromTag("div");return Wr(A,"role","presentation"),Aa(A,{position:"fixed",left:"0px",top:"0px",width:"100%",height:"100%"}),p1(A,c_("blocker")),p1(A,w.layerClass),{element:z(A),destroy:()=>{Fr(A)}}};var s8=h1({compare:(y,w)=>cs(w.left-y.left,w.top-y.top),extract:y=>ie.some(cs(y.x,y.y)),sink:(y,w)=>{const A=n8(w),M=mh(A.element(),"mousedown",y.forceDrop),K=mh(A.element(),"mouseup",y.drop),re=mh(A.element(),"mousemove",y.move),_e=mh(A.element(),"mouseout",y.delayDrop),Ae=()=>{A.destroy(),K.unbind(),re.unbind(),_e.unbind(),M.unbind()},Re=vt=>{ar(vt,A.element())},nt=()=>{Fr(A.element())};return Xy({element:A.element,start:Re,stop:nt,destroy:Ae})},mutate:(y,w)=>{y.mutate(w.left,w.top)}});const u_=(y,w={})=>{var A;const M=(A=w.mode)!==null&&A!==void 0?A:s8;return l_(y,M,w)},M2=t8("ephox-snooker").resolve,OU=()=>{const y=nv({drag:Zu(["xDelta","yDelta"])});return{mutate:(A,M)=>{y.trigger.drag(A,M)},events:y.registry}},Lk=()=>{const y=nv({drag:Zu(["xDelta","yDelta","target"])});let w=ie.none();const A=OU();return A.events.drag.bind(re=>{w.each(_e=>{y.trigger.drag(re.xDelta,re.yDelta,_e)})}),{assign:re=>{w=ie.some(re)},get:()=>w,mutate:A.mutate,events:y.registry}},d_=(y,w,A,M,K)=>{const re=fn.fromTag("div");return Aa(re,{position:"absolute",left:w-M/2+"px",top:A+"px",height:K+"px",width:M+"px"}),mi(re,{"data-column":y,role:"presentation"}),re},KD=(y,w,A,M,K)=>{const re=fn.fromTag("div");return Aa(re,{position:"absolute",left:w+"px",top:A-K/2+"px",height:K+"px",width:M+"px"}),mi(re,{"data-row":y,role:"presentation"}),re},Jy=M2("resizer-bar"),Pk=M2("resizer-rows"),r8=M2("resizer-cols"),Mk=7,g1=(y,w)=>so(y.all,(A,M)=>w(A.element)?[M]:[]),f_=(y,w)=>{const A=[];return St(y.grid.columns,M=>{xo.getColumnAt(y,M).map(re=>re.element).forall(w)&&A.push(M)}),At(A,M=>{const K=xo.filterItems(y,re=>re.column===M);return Xs(K,re=>w(re.element))})},Gu=y=>{const w=Vo(y.parent(),"."+Jy);He(w,Fr)},$c=(y,w,A)=>{const M=y.origin();He(w,K=>{K.each(re=>{const _e=A(M,re);p1(_e,Jy),ar(y.parent(),_e)})})},N2=(y,w,A,M)=>{$c(y,w,(K,re)=>{const _e=d_(re.col,re.x-K.left,A.top-K.top,Mk,M);return p1(_e,r8),_e})},RU=(y,w,A,M)=>{$c(y,w,(K,re)=>{const _e=KD(re.row,A.left-K.left,re.y-K.top,M,Mk);return p1(_e,Pk),_e})},YD=(y,w,A,M,K)=>{const re=Lc(A),_e=w.isResizable,Ae=M.length>0?bu.positions(M,A):[],Re=Ae.length>0?g1(y,_e):[],nt=At(Ae,(mn,gn)=>Fe(Re,ss=>gn===ss));RU(w,nt,re,vr(A));const vt=K.length>0?q5.positions(K,A):[],tn=vt.length>0?f_(y,_e):[],An=At(vt,(mn,gn)=>Fe(tn,ss=>gn===ss));N2(w,An,re,ks(A))},i8=(y,w)=>{if(Gu(y),y.isResizable(w)){const A=xo.fromTable(w),M=G(A),K=tg(A);YD(A,y,w,M,K)}},Lo=(y,w)=>{const A=Vo(y.parent(),"."+Jy);He(A,w)},F2=y=>{Lo(y,w=>{li(w,"display","none")})},a8=y=>{Lo(y,w=>{li(w,"display","block")})},l8=y=>Ag(y,Pk),Nk=y=>Ag(y,r8),Fk=M2("resizer-bar-dragging"),XD=y=>{const w=Lk(),A=u_(w,{});let M=ie.none();const K=(gn,ss)=>ie.from(Ti(gn,ss));w.events.drag.bind(gn=>{K(gn.target,"data-row").each(ss=>{const on=gi(gn.target,"top");li(gn.target,"top",on+gn.yDelta+"px")}),K(gn.target,"data-column").each(ss=>{const on=gi(gn.target,"left");li(gn.target,"left",on+gn.xDelta+"px")})});const re=(gn,ss)=>{const on=gi(gn,ss),ws=Tl(gn,"data-initial-"+ss,0);return on-ws};A.events.stop.bind(()=>{w.get().each(gn=>{M.each(ss=>{K(gn,"data-row").each(on=>{const ws=re(gn,"top");yr(gn,"data-initial-top"),mn.trigger.adjustHeight(ss,ws,parseInt(on,10))}),K(gn,"data-column").each(on=>{const ws=re(gn,"left");yr(gn,"data-initial-left"),mn.trigger.adjustWidth(ss,ws,parseInt(on,10))}),i8(y,ss)})})});const _e=(gn,ss)=>{mn.trigger.startAdjust(),w.assign(gn),Wr(gn,"data-initial-"+ss,gi(gn,ss)),p1(gn,Fk),li(gn,"opacity","0.2"),A.go(y.dragContainer())},Ae=mh(y.parent(),"mousedown",gn=>{l8(gn.target)&&_e(gn.target,"top"),Nk(gn.target)&&_e(gn.target,"left")}),Re=gn=>_o(gn,y.view()),nt=gn=>Ia(gn,"table",Re).filter(I0),vt=mh(y.view(),"mouseover",gn=>{nt(gn.target).fold(()=>{eo(gn.target)&&Gu(y)},ss=>{A.isActive()&&(M=ie.some(ss),i8(y,ss))})}),tn=()=>{Ae.unbind(),vt.unbind(),A.destroy(),Gu(y)},An=gn=>{i8(y,gn)},mn=nv({adjustHeight:Zu(["table","delta","row"]),adjustWidth:Zu(["table","delta","column"]),startAdjust:Zu([])});return{destroy:tn,refresh:An,on:A.on,off:A.off,hideBars:ue(F2,y),showBars:ue(a8,y),events:mn.registry}},JD={create:(y,w,A)=>{const M=bu,K=q5,re=XD(y),_e=nv({beforeResize:Zu(["table","type"]),afterResize:Zu(["table","type"]),startDrag:Zu([])});return re.events.adjustHeight.bind(Ae=>{const Re=Ae.table;_e.trigger.beforeResize(Re,"row");const nt=M.delta(Ae.delta,Re);h2(Re,nt,Ae.row),_e.trigger.afterResize(Re,"row")}),re.events.startAdjust.bind(Ae=>{_e.trigger.startDrag()}),re.events.adjustWidth.bind(Ae=>{const Re=Ae.table;_e.trigger.beforeResize(Re,"col");const nt=K.delta(Ae.delta,Re),vt=A(Re);y4(Re,nt,Ae.column,w,vt),_e.trigger.afterResize(Re,"col")}),{on:re.on,off:re.off,refreshBars:re.refresh,hideBars:re.hideBars,showBars:re.showBars,destroy:re.destroy,events:_e.registry}}},QD=()=>window.crypto.getRandomValues(new Uint32Array(1))[0]/4294967295;let p_=0;const c8=y=>{const A=new Date().getTime(),M=Math.floor(QD()*1e9);return p_++,y+"_"+M+p_+String(A)},u8={only:(y,w)=>{const A=Nr(y)?Go(y):y;return{parent:z(A),view:z(y),dragContainer:z(A),origin:z(cs(0,0)),isResizable:w}},detached:(y,w,A)=>{const M=()=>Lc(w);return{parent:z(w),view:z(y),dragContainer:z(w),origin:M,isResizable:A}},body:(y,w,A)=>({parent:z(w),view:z(y),dragContainer:z(w),origin:z(cs(0,0)),isResizable:A}),scrollable:(y,w,A,M)=>({parent:z(w),view:z(y),dragContainer:z(A),origin:()=>Lc(w),isResizable:M})},tL=y=>{const w=c8("resizer-container"),A=fn.fromTag("div");return Wr(A,"id",w),Aa(A,{position:y,height:"0",width:"0",padding:"0",margin:"0",border:"0"}),A},nL=(y,w)=>{const A=cp(y),M=fn.fromDom(y.getBody()),K=tL(A?"relative":"static"),re=Us();return A?(Ac(M,K),u8.scrollable(M,K,re,w)):(ar(re,K),u8.body(M,K,w))},Xn=(y,w)=>y.inline?nL(y,w):u8.only(fn.fromDom(y.getDoc()),w),$k=(y,w)=>{y.inline&&Fr(w.parent())},Bk=y=>O(y)&&y.nodeName==="TABLE",d8="bar-",Qy=y=>Ti(y,"data-mce-resize")!=="false",sL=y=>{const w=xo.fromTable(y);xo.hasColumns(w)||He(an(y),A=>{const M=qp(A,"width");li(A,"width",M),yr(A,"width")})},$2=y=>hc(y,"corner-"),f8=y=>Zb(y,"corner-"),oL=y=>{const w=qy(),A=qy(),M=qy();let K,re,_e,Ae;const Re=Fn=>R4(y,Fn),nt=()=>L9(y)?p4():H9(),vt=Fn=>D0(Fn).columns,tn=Fn=>D0(Fn).rows,An=(Fn,Sr,Cr,ls)=>{const Xr=f8(Sr),nu=Gc(Xr,"e"),Rg=hc(Xr,"n");if(re===""&&Sg(Fn),Ae===""&&hD(Fn),Cr!==K&&re!==""){li(Fn,"width",re);const vp=nt(),To=Re(Fn),Rr=L9(y)||nu?vt(Fn)-1:0;y4(Fn,Cr-K,Rr,vp,To)}else if(r4(re)){const vp=parseFloat(re.replace("%","")),To=Cr*vp/K;li(Fn,"width",To+"%")}if(i4(re)&&sL(Fn),ls!==_e&&Ae!==""){li(Fn,"height",Ae);const vp=Rg?0:tn(Fn)-1;h2(Fn,ls-_e,vp)}},mn=()=>{A.on(Fn=>{Fn.destroy()}),M.on(Fn=>{$k(y,Fn)})};y.on("init",()=>{const Fn=Xn(y,Qy);if(M.set(Fn),xR(y)&&T0(y)){const Sr=nt(),Cr=JD.create(Fn,Sr,Re);y.mode.isReadOnly()||Cr.on(),Cr.events.startDrag.bind(ls=>{w.set(y.selection.getRng())}),Cr.events.beforeResize.bind(ls=>{const Xr=ls.table.dom;f6(y,Xr,s4(Xr),o4(Xr),d8+ls.type)}),Cr.events.afterResize.bind(ls=>{const Xr=ls.table,nu=Xr.dom;lg(Xr),w.on(Rg=>{y.selection.setRng(Rg),y.focus()}),Iy(y,nu,s4(nu),o4(nu),d8+ls.type),y.undoManager.add()}),A.set(Cr)}}),y.on("ObjectResizeStart",Fn=>{const Sr=Fn.target;if(Bk(Sr)&&!y.mode.isReadOnly()){const Cr=fn.fromDom(Sr);He(y.dom.select(".mce-clonedresizable"),ls=>{y.dom.addClass(ls,"mce-"+ca(y)+"-columns")}),!LE(Cr)&&ap(y)?N4(Cr):!M4(Cr)&&x0(y)&&Sg(Cr),Oy(Cr)&&hc(Fn.origin,d8)&&Sg(Cr),K=Fn.width,re=Mc(y)?"":ps(y,Sr).getOr(""),_e=Fn.height,Ae=_u(y,Sr).getOr("")}}),y.on("ObjectResized",Fn=>{const Sr=Fn.target;if(Bk(Sr)){const Cr=fn.fromDom(Sr),ls=Fn.origin;$2(ls)&&An(Cr,ls,Fn.width,Fn.height),lg(Cr),Pa(y,Cr.dom,Ay)}});const gn=()=>{A.on(Fn=>{Fn.on(),Fn.showBars()})},ss=()=>{A.on(Fn=>{Fn.off(),Fn.hideBars()})};return y.on("DisabledStateChange",Fn=>{Fn.state?ss():gn()}),y.on("SwitchMode",()=>{y.mode.isReadOnly()?ss():gn()}),y.on("dragstart dragend",Fn=>{Fn.type==="dragstart"?ss():gn()}),y.on("remove",()=>{mn()}),{refresh:Fn=>{A.on(Sr=>Sr.refreshBars(fn.fromDom(Fn)))},hide:()=>{A.on(Fn=>Fn.hideBars())},show:()=>{A.on(Fn=>Fn.showBars())}}},e3=y=>{kR(y);const w=oL(y),A=Ky(y,w),M=Yn(y,w,A);return V4(y,M),E6(y,M),vU(y,M),{getSelectedCells:A.getSelectedCells,clearSelectedCells:A.clearSelectedCells}},h_=y=>({table:e3(y)});var p8=()=>{e.add("dom",h_)};p8()}()),r5e}var a5e;function hZe(){return a5e||(a5e=1,mZe()),o5e}hZe();var gZe=["onActivate","onAddUndo","onBeforeAddUndo","onBeforeExecCommand","onBeforeGetContent","onBeforeRenderUI","onBeforeSetContent","onBeforePaste","onBlur","onChange","onClearUndos","onClick","onContextMenu","onCommentChange","onCompositionEnd","onCompositionStart","onCompositionUpdate","onCopy","onCut","onDblclick","onDeactivate","onDirty","onDrag","onDragDrop","onDragEnd","onDragGesture","onDragOver","onDrop","onExecCommand","onFocus","onFocusIn","onFocusOut","onGetContent","onHide","onInit","onInput","onKeyDown","onKeyPress","onKeyUp","onLoadContent","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onNodeChange","onObjectResizeStart","onObjectResized","onObjectSelected","onPaste","onPostProcess","onPostRender","onPreProcess","onProgressState","onRedo","onRemove","onReset","onSaveContent","onSelectionChange","onSetAttrib","onSetContent","onShow","onSubmit","onUndo","onVisualAid"],vZe=function(e){return gZe.map(function(t){return t.toLowerCase()}).indexOf(e.toLowerCase())!==-1},bZe=function(e,t,n){Object.keys(t).filter(vZe).forEach(function(i){var a=t[i];typeof a=="function"&&(i==="onInit"?a(e,n):n.on(i.substring(2),function(l){return a(l,n)}))})},yZe=function(e,t,n,i){var a=e.modelEvents?e.modelEvents:null,l=Array.isArray(a)?a.join(" "):a;io(i,function(f,d){n&&typeof f=="string"&&f!==d&&f!==n.getContent({format:e.outputFormat})&&n.setContent(f)}),n.on(l||"change input undo redo",function(){t.emit("update:modelValue",n.getContent({format:e.outputFormat}))})},_Ze=function(e,t,n,i,a,l){i.setContent(l()),n.attrs["onUpdate:modelValue"]&&yZe(t,n,i,a),bZe(e,n.attrs,i)},l5e=0,c5e=function(e){var t=Date.now(),n=Math.floor(Math.random()*1e9);return l5e++,e+"_"+n+l5e+String(t)},SZe=function(e){return e!==null&&e.tagName.toLowerCase()==="textarea"},u5e=function(e){return typeof e>"u"||e===""?[]:Array.isArray(e)?e:e.split(" ")},CZe=function(e,t){return u5e(e).concat(u5e(t))},wZe=function(e){return e==null},d5e=function(){return{listeners:[],scriptId:c5e("tiny-script"),scriptLoaded:!1}},EZe=function(){var e=d5e(),t=function(a,l,f,d){var h=l.createElement("script");h.referrerPolicy="origin",h.type="application/javascript",h.id=a,h.src=f;var b=function(){h.removeEventListener("load",b),d()};h.addEventListener("load",b),l.head&&l.head.appendChild(h)},n=function(a,l,f){e.scriptLoaded?f():(e.listeners.push(f),a.getElementById(e.scriptId)||t(e.scriptId,a,l,function(){e.listeners.forEach(function(d){return d()}),e.scriptLoaded=!0}))},i=function(){e=d5e()};return{load:n,reinitialize:i}},kZe=EZe(),xZe=function(){return typeof window<"u"?window:global},cC=function(){var e=xZe();return e&&e.tinymce?e.tinymce:null},TZe={apiKey:String,licenseKey:String,cloudChannel:String,id:String,init:Object,initialValue:String,inline:Boolean,modelEvents:[String,Array],plugins:[String,Array],tagName:String,toolbar:[String,Array],modelValue:String,disabled:Boolean,tinymceScriptSrc:String,outputFormat:{type:String,validator:function(e){return e==="html"||e==="text"}}},Fv=function(){return Fv=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},Fv.apply(this,arguments)},IZe=function(e,t,n,i){return e(i||"div",{id:t,ref:n})},AZe=function(e,t,n){return e("textarea",{id:t,visibility:"hidden",ref:n})},Rte={selector:void 0,target:void 0},OZe=Gr({props:TZe,setup:function(e,t){var n=e.init?Fv(Fv({},e.init),Rte):Fv({},Rte),i=q3(e),a=i.disabled,l=i.modelValue,f=i.tagName,d=kt(null),h=null,b=e.id||c5e("tiny-vue"),S=e.init&&e.init.inline||e.inline,k=!!t.attrs["onUpdate:modelValue"],T=!0,O=e.initialValue?e.initialValue:"",P="",B=function(Y){return k?function(){return l!=null&&l.value?l.value:""}:function(){return Y?O:P}},W=function(){var Y=B(T),z=Fv(Fv({},n),{readonly:e.disabled,target:d.value,plugins:CZe(n.plugins,e.plugins),toolbar:e.toolbar||n.toolbar,inline:S,license_key:e.licenseKey,setup:function(q){h=q,q.on("init",function(ne){return _Ze(ne,e,t,q,l,Y)}),typeof n.setup=="function"&&n.setup(q)}});SZe(d.value)&&(d.value.style.visibility=""),cC().init(z),T=!1};io(a,function(Y){var z;h!==null&&(typeof((z=h.mode)===null||z===void 0?void 0:z.set)=="function"?h.mode.set(Y?"readonly":"design"):h.setMode(Y?"readonly":"design"))}),io(f,function(Y){var z;k||(P=h.getContent()),(z=cC())===null||z===void 0||z.remove(h),kc(function(){return W()})}),Pr(function(){if(cC()!==null)W();else if(d.value&&d.value.ownerDocument){var Y=e.cloudChannel?e.cloudChannel:"7",z=e.apiKey?e.apiKey:"no-api-key",q=wZe(e.tinymceScriptSrc)?"https://cdn.tiny.cloud/1/".concat(z,"/tinymce/").concat(Y,"/tinymce.min.js"):e.tinymceScriptSrc;kZe.load(d.value.ownerDocument,q,W)}}),wb(function(){cC()!==null&&cC().remove(h)}),S||(tB(function(){T||W()}),nB(function(){var Y;k||(P=h.getContent()),(Y=cC())===null||Y===void 0||Y.remove(h)}));var Z=function(Y){var z;P=h.getContent(),(z=cC())===null||z===void 0||z.remove(h),n=Fv(Fv(Fv({},n),Y),Rte),kc(function(){return W()})};return t.expose({rerender:Z,getEditor:function(){return h}}),function(){return S?IZe(oi,b,d,e.tagName):AZe(oi,b,d)}}});const RZe={name:"FieldRichTextarea",components:{Editor:OZe,FormFieldLabel:i0,Icon:Vs,Tooltip:Tc,MultilingualProgress:a0,HelpButton:Id,FieldError:Gd},extends:Lm,props:{init:{type:Object,default(){return{}}},plugins:{type:Array,required:!0},size:{type:String,default(){return"default"},validator(e){return["default","large"].includes(e)}},toolbar:{type:String,required:!0},uploadUrl:{type:String,default(){return""}},wordCountLabel:{type:String,default(){return""}},wordLimit:{type:Number,default(){return 0}}},data(){return{isFocused:!1,wordCount:0}},computed:{currentValue:{get(){return this.isMultilingual?this.value[this.localeKey]:this.value},set:function(e){this.$emit("change",this.name,"value",e,this.localeKey),Uh(this.setWordCount,250)()}},toolbarId(){return this.compileId("toolbar")},compiledInit(){var n,i,a,l,f,d,h,b,S,k,T,O,P;var e=this,t=function(B){const W=/\{\$(\w*)\}/.exec(B);return W&&(B=W[0]),B};return{license_key:"gpl",skin_url:((i=(n=this.$root)==null?void 0:n.tinyMCE)==null?void 0:i.skinUrl)||((a=pkp==null?void 0:pkp.tinyMCE)==null?void 0:a.skinUrl),content_css:$.pkp.app.tinyMceContentCSS,paste_data_images:!0,relative_urls:!1,remove_script_host:!1,convert_urls:!0,urlconverter_callback:t,directionality:this.isRTL?"rtl":"ltr",menubar:!1,statusbar:!1,entity_encoding:"raw",browser_spellcheck:!0,language:(b=(h=(d=(f=(l=$.pkp)==null?void 0:l.plugins)==null?void 0:f.generic)==null?void 0:d.tinymceplugin)==null?void 0:h.tinymceParams)==null?void 0:b.language,language_url:(P=(O=(T=(k=(S=$.pkp)==null?void 0:S.plugins)==null?void 0:k.generic)==null?void 0:T.tinymceplugin)==null?void 0:O.tinymceParams)==null?void 0:P.language_url,images_upload_handler(B,W){return new Promise((Z,Y)=>{const z=new FormData;return z.append("file",B.blob(),B.filename()),$.ajax({method:"POST",url:e.uploadUrl,data:z,processData:!1,contentType:!1,headers:{"X-Csrf-Token":pkp.currentUser.csrfToken},success(q){Z(q.url)},error(q){Y(q.responseJSON.error)}})})},init_instance_callback:B=>{B.fire("focus"),B.fire("blur")},...this.init}},isRTL(){return document.body.getAttribute("dir")==="rtl"}},watch:{value(e,t){e!==t&&(this.isMultilingual&&(e=e[this.localeKey]),Uh(this.setWordCount,250)(),this.$emit("change",this.name,"value",e,this.localeKey))}},mounted(){Uh(this.setWordCount,1e3)()},methods:{blur(){this.isFocused=!1},focus(){this.isFocused=!0},setWordCount(){if(!this.wordLimit||!this.currentValue||!this.$refs.editor){this.wordCount=0;return}const e=this.$refs.editor.getEditor().getContent({format:"text"}).match(/\S+/g);if(e!==null){this.wordCount=e.length;return}this.wordCount=0}}},DZe={class:"pkpFormField__heading"},LZe=["id"],PZe=["id"],MZe={key:0,class:"pkpFormField--richTextarea__controlFooter"},NZe={key:1,class:"pkpFormField--richTextarea__wordLimit"};function FZe(e,t,n,i,a,l){const f=Xe("FormFieldLabel"),d=Xe("Tooltip"),h=Xe("HelpButton"),b=Xe("Editor"),S=Xe("MultilingualProgress"),k=Xe("Icon"),T=Xe("FieldError"),O=Hr("strip-unsafe-html");return L(),Q("div",{class:Rn(["pkpFormField pkpFormField--richTextarea",{"-isFocused":a.isFocused,"pkpFormField--richTextarea--rtl":l.isRTL}])},[H("div",DZe,[pe(f,{"control-id":e.controlId,label:e.label,"locale-label":e.localeLabel,"is-required":e.isRequired,"required-label":e.t("common.required"),"multilingual-label":e.multilingualLabel,class:"align-middle"},null,8,["control-id","label","locale-label","is-required","required-label","multilingual-label"]),t[1]||(t[1]=D()),e.isPrimaryLocale&&e.tooltip?(L(),Ee(d,{key:0,"aria-hidden":"true",tooltip:e.tooltip,label:""},null,8,["tooltip"])):we("",!0),t[2]||(t[2]=D()),e.isPrimaryLocale&&e.tooltip?Gn((L(),Q("span",{key:1,id:e.describedByTooltipId,class:"-screenReader"},null,8,LZe)),[[O,e.tooltip]]):we("",!0),t[3]||(t[3]=D()),e.isPrimaryLocale&&e.helpTopic?(L(),Ee(h,{key:2,id:e.describedByHelpId,topic:e.helpTopic,section:e.helpSection,label:e.t("help.help")},null,8,["id","topic","section","label"])):we("",!0)]),t[7]||(t[7]=D()),e.isPrimaryLocale&&e.description?Gn((L(),Q("div",{key:0,id:e.describedByDescriptionId,class:"pkpFormField__description semantic-defaults"},null,8,PZe)),[[O,e.description]]):we("",!0),t[8]||(t[8]=D()),H("div",{class:Rn(["pkpFormField__control pkpFormField--richTextarea__control","pkpFormField--richTextArea__control--"+n.size])},[pe(b,{id:e.controlId,ref:"editor",modelValue:l.currentValue,"onUpdate:modelValue":t[0]||(t[0]=P=>l.currentValue=P),class:"pkpFormField__input pkpFormField--richTextarea__input","license-key":"gpl",toolbar:n.toolbar,plugins:n.plugins,init:l.compiledInit,onFocus:l.focus,onBlur:l.blur},null,8,["id","modelValue","toolbar","plugins","init","onFocus","onBlur"]),t[5]||(t[5]=D()),e.isMultilingual&&e.locales.length>1||n.wordLimit?(L(),Q("div",MZe,[e.isMultilingual&&e.locales.length>1?(L(),Ee(S,{key:0,id:e.multilingualProgressId,count:e.multilingualFieldsCompleted,total:e.locales.length},null,8,["id","count","total"])):we("",!0),t[4]||(t[4]=D()),n.wordLimit?(L(),Q("div",NZe,[a.wordCount>n.wordLimit?(L(),Ee(k,{key:0,icon:"Error",class:"h-4 w-4",inline:!0})):we("",!0),D(" "+ee(e.replaceLocaleParams(n.wordCountLabel,{count:a.wordCount,limit:n.wordLimit})),1)])):we("",!0)])):we("",!0),t[6]||(t[6]=D()),is(e.$slots,"footer")],2),t[9]||(t[9]=D()),e.errors&&e.errors.length?(L(),Ee(T,{key:1,id:e.describedByErrorId,messages:e.errors},null,8,["id","messages"])):we("",!0)],2)}const O5=wt(RZe,[["render",FZe]]),$Ze={},BZe={class:"p-4"},VZe={class:"bg-secondary p-4"};function HZe(e,t){return L(),Q("div",BZe,[H("div",VZe,[is(e.$slots,"default")])])}const Lu=wt($Ze,[["render",HZe]]),UZe={components:{Icon:Vs},props:{searchLabel:{type:String,default(){return""}},searchPhrase:{type:String,default(){return""}}},emits:["search-phrase-changed"],computed:{inputId(){return Oh()},currentSearchLabel(){return this.searchLabel?this.searchLabel:this.t("common.search")}},methods:{searchPhraseKeyUp:Uh(function(e){this.$emit("search-phrase-changed",e.target.value)},250),clearSearchPhrase(){this.$emit("search-phrase-changed",""),this.$nextTick(function(){this.$el.querySelector('input[type="search"]').focus()})}}},zZe={class:"pkpSearch"},WZe={class:"-screenReader"},jZe=["id","value","placeholder"],ZZe={class:"pkpSearch__icons"},qZe=["aria-controls"],GZe={class:"-screenReader"};function KZe(e,t,n,i,a,l){const f=Xe("Icon");return L(),Q("div",zZe,[H("label",null,[H("span",WZe,ee(l.currentSearchLabel),1),t[2]||(t[2]=D()),H("input",{id:l.inputId,type:"search",class:"pkpSearch__input",value:n.searchPhrase,placeholder:l.currentSearchLabel,onKeyup:t[0]||(t[0]=(...d)=>l.searchPhraseKeyUp&&l.searchPhraseKeyUp(...d))},null,40,jZe),t[3]||(t[3]=D()),H("span",ZZe,[pe(f,{icon:"Search",class:"absolute left-2/4 top-2/4 h-5 w-5 -translate-x-1/2 -translate-y-1/2 transform text-primary"})])]),t[5]||(t[5]=D()),n.searchPhrase?(L(),Q("button",{key:0,class:"absolute top-0 h-full w-8 text-negative hover:bg-negative hover:text-on-dark focus:bg-negative focus:text-on-dark ltr:right-0 rtl:left-0 rtl:right-auto","aria-controls":l.inputId,onClick:t[1]||(t[1]=wl((...d)=>l.clearSearchPhrase&&l.clearSearchPhrase(...d),["prevent"]))},[pe(f,{icon:"Cancel",class:"relative bottom-[2px] h-4 w-4"}),t[4]||(t[4]=D()),H("span",GZe,ee(e.t("common.clearSearch")),1)],8,qZe)):we("",!0)])}const j1=wt(UZe,[["render",KZe]]),YZe={name:"InsertContent",components:{Search:j1,PkpButton:ms},props:{insertLabel:{type:String,required:!0},items:{type:Array,default(){return[]}},itemsLabel:{type:String,required:!0},searchLabel:{type:String,default(){return""}}},data(){return{searchPhrase:""}},computed:{current(){if(!this.searchPhrase)return this.items;const e=new RegExp(this.searchPhrase,"i");return this.items.filter(t=>e.test(t.key)||e.test(t.value)||e.test(t.description))}}},XZe={class:"insertContent"},JZe=["aria-label"],QZe=["id"],eqe={class:"insertContent__item__header"},tqe={class:"insertContent__item__value"},nqe={class:"insertContent__item__description"};function sqe(e,t,n,i,a,l){const f=Xe("Search"),d=Xe("PkpButton");return L(),Q("div",XZe,[pe(f,{"search-label":n.searchLabel,"search-phrase":a.searchPhrase,onSearchPhraseChanged:t[0]||(t[0]=h=>a.searchPhrase=h)},null,8,["search-label","search-phrase"]),t[3]||(t[3]=D()),H("ol",{class:"insertContent__items","aria-label":n.itemsLabel},[(L(!0),Q(bt,null,Sn(l.current,h=>(L(),Q("li",{id:"insert-content-"+h.key,key:h.key,class:"insertContent__item"},[H("div",eqe,[H("div",tqe,ee(h.value),1),t[1]||(t[1]=D()),pe(d,{class:"insertContent__item__button","aria-describedby":"insert-content-"+h.key,onClick:b=>e.$emit("insert",h.value)},{default:te(()=>[D(ee(n.insertLabel),1)]),_:2},1032,["aria-describedby","onClick"])]),t[2]||(t[2]=D()),H("div",nqe,ee(h.description),1)],8,QZe))),128))],8,JZe)])}const oqe=wt(YZe,[["render",sqe]]),f5e={__name:"FieldPreparedContentInsertModal",props:{title:{type:String,required:!0},insertLabel:{type:String,required:!0},preparedContent:{type:Array,required:!1,default:()=>[]},preparedContentLabel:{type:String,required:!0},searchLabel:{type:String,default:""}},emits:["insert"],setup(e,{emit:t}){const n=t;return(i,a)=>(L(),Ee(il,null,{title:te(()=>[D(ee(e.title),1)]),default:te(()=>[a[1]||(a[1]=D()),pe(Lu,null,{default:te(()=>[pe(oqe,{ref:"insertContent","insert-label":e.insertLabel,items:e.preparedContent,"items-label":e.preparedContentLabel,"search-label":e.searchLabel,onInsert:a[0]||(a[0]=(...l)=>n("insert",...l))},null,8,["insert-label","items","items-label","search-label"])]),_:1})]),_:1}))}},p5e={methods:{renderPreparedContent(e,t){return t.reduce((n,i)=>{const a=new RegExp("{$".concat(i.key,"}").replace(/[${]/g,"\\$&"),"g");return n.replace(a,i.value)},e)}}},rqe={name:"FieldPreparedContent",components:{FieldRichTextarea:O5},extends:O5,mixins:[p5e],props:{insertLabel:{type:String,required:!0},insertModalLabel:{type:String,required:!0},preparedContent:{type:Array,default(){return[]}},preparedContentLabel:{type:String,required:!0},searchLabel:{type:String,default(){return""}}},data(){return{isModalPreparedContentOpened:!1}},computed:{textareaProps(){const e=this;let t={},n=O5;for(;n;)Object.keys(n.props).forEach(i=>{typeof this[i]<"u"&&(t[i]=this[i])}),n=n.extends?n.extends:null;return e.preparedContent.length&&typeof t.toolbar=="string"&&(t.toolbar+="| pkpInsert"),t},preparedContentId(){return this.compileId("preparedContent")},compiledInit(){let e=this;const t=function(n){e.init.setup&&e.init.setup.call(this,n),e.preparedContent.length&&n.ui.registry.addButton("pkpInsert",{icon:"plus",text:e.t("common.insertContent"),onAction(){e.openInsertModal()}})};return{...this.init,setup:t}},renderedValue(){const e=n=>this.renderPreparedContent(n,this.preparedContent);let t={};return this.isMultilingual?Object.keys(this.value).forEach(n=>{t[n]=e(this.value[n])}):t=e(this.value),t}},methods:{openInsertModal(){const{openSideModal:e}=Ms();e(f5e,{title:this.insertModalLabel,insertLabel:this.insertLabel,preparedContent:this.preparedContent,preparedContentLabel:this.preparedContentLabel,onInsert:this.insert})},fieldChanged(e,t,n,i){this.$emit("change",e,t,n,i)},insert(e){this.$refs.textarea.$refs.editor.getEditor().insertContent(e);const{closeSideModal:t}=Ms();t(f5e)}}};function iqe(e,t,n,i,a,l){const f=Xe("FieldRichTextarea");return L(),Ee(f,Cn(l.textareaProps,{ref:"textarea",init:l.compiledInit,value:l.renderedValue,onChange:l.fieldChanged}),{footer:te(()=>[is(e.$slots,"footer")]),_:3},16,["init","value","onChange"])}const Dte=wt(rqe,[["render",iqe]]),aqe={name:"FieldRadioInput",components:{Tooltip:Tc,HelpButton:Id,FieldError:Gd,MultilingualProgress:a0},extends:aC,props:{value:{type:String,required:!0}},data(){return{inputValue:""}},computed:{isInputSelected(){return!this.localizedOptions.filter(e=>!e.isInput).map(e=>e.value).includes(this.selectedValue)}},watch:{inputValue:function(e,t){e===t||!this.isInputSelected||(this.selectedValue=this.inputValue)}},mounted(){var e;this.isInputSelected&&(this.inputValue=this.isMultilingual?this.value[this.localeKey]:this.value,(e=this.$refs.inputRadio)!=null&&e[0]&&(this.$refs.inputRadio[0].checked=!0))},methods:{selectInput(){this.selectedValue=this.inputValue,this.$refs.inputRadio[0].checked=!0,this.$refs.inputText[0].focus()},setInputToSelected(){this.selectedValue=this.inputValue}}},lqe={class:"pkpFormField--options__legend"},cqe={class:"aria-hidden align-middle"},uqe={class:"-screenReader"},dqe={key:1,class:"align-middle"},fqe={key:2,class:"pkpFormFieldLabel__required"},pqe={class:"-screenReader"},mqe=["id"],hqe=["id"],gqe={class:"pkpFormField__control"},vqe=["value","name","aria-describedby","aria-invalid","disabled"],bqe=["name","aria-describedby","aria-invalid","disabled"],yqe={key:0},_qe=["aria-describedby","aria-invalid","disabled"];function Sqe(e,t,n,i,a,l){const f=Xe("Tooltip"),d=Xe("HelpButton"),h=Xe("FieldError"),b=Xe("MultilingualProgress"),S=Hr("strip-unsafe-html");return L(),Q("fieldset",{class:Rn(["pkpFormField pkpFormField--options",e.classes])},[H("legend",lqe,[e.localeLabel?(L(),Q(bt,{key:0},[H("span",cqe,ee(e.localeLabel),1),t[5]||(t[5]=D()),H("span",uqe,ee(e.multilingualLabel),1)],64)):(L(),Q("span",dqe,ee(e.label),1)),t[7]||(t[7]=D()),e.isRequired?(L(),Q("span",fqe,[t[6]||(t[6]=D("\n *\n ")),H("span",pqe,ee(e.t("common.required")),1)])):we("",!0),t[8]||(t[8]=D()),e.isPrimaryLocale&&e.tooltip?(L(),Ee(f,{key:3,"aria-hidden":"true",tooltip:e.tooltip,label:""},null,8,["tooltip"])):we("",!0),t[9]||(t[9]=D()),e.isPrimaryLocale&&e.tooltip?Gn((L(),Q("span",{key:4,id:e.describedByTooltipId,class:"-screenReader"},null,8,mqe)),[[S,e.tooltip]]):we("",!0),t[10]||(t[10]=D()),e.isPrimaryLocale&&e.helpTopic?(L(),Ee(d,{key:5,id:e.describedByHelpId,topic:e.helpTopic,section:e.helpSection,label:e.t("help.help")},null,8,["id","topic","section","label"])):we("",!0)]),t[14]||(t[14]=D()),e.isPrimaryLocale&&e.description?Gn((L(),Q("div",{key:0,id:e.describedByDescriptionId,class:"pkpFormField__description pkpFormField--options__description semantic-defaults"},null,8,hqe)),[[S,e.description]]):we("",!0),t[15]||(t[15]=D()),e.errors&&e.errors.length?(L(),Ee(h,{key:1,id:e.describedByErrorId,messages:e.errors},null,8,["id","messages"])):we("",!0),t[16]||(t[16]=D()),Gn(H("input",{"onUpdate:modelValue":t[0]||(t[0]=k=>e.selectedValue=k),type:"hidden"},null,512),[[lu,e.selectedValue]]),t[17]||(t[17]=D()),H("div",gqe,[(L(!0),Q(bt,null,Sn(e.localizedOptions,k=>(L(),Q("label",{key:k.value,class:"pkpFormField--options__option"},[k.isInput?(L(),Q(bt,{key:1},[H("input",{ref_for:!0,ref:"inputRadio",class:"pkpFormField--options__input",type:"radio",name:e.localizedName,"aria-describedby":e.describedByIds,"aria-invalid":e.errors&&e.errors.length,disabled:k.disabled,onChange:t[2]||(t[2]=(...T)=>l.selectInput&&l.selectInput(...T))},null,40,bqe),t[11]||(t[11]=D()),k.label?(L(),Q("span",yqe,ee(k.label),1)):we("",!0),t[12]||(t[12]=D()),Gn(H("input",{ref_for:!0,ref:"inputText","onUpdate:modelValue":t[3]||(t[3]=T=>a.inputValue=T),class:"pkpFormField__input pkpFormField--options__input--text",type:"text","aria-describedby":e.describedByIds,"aria-invalid":e.errors&&e.errors.length,disabled:k.disabled,onFocus:t[4]||(t[4]=(...T)=>l.selectInput&&l.selectInput(...T))},null,40,_qe),[[lu,a.inputValue]])],64)):(L(),Q(bt,{key:0},[Gn(H("input",{"onUpdate:modelValue":t[1]||(t[1]=T=>e.selectedValue=T),class:"pkpFormField--options__input",value:k.value,type:"radio",name:e.localizedName,"aria-describedby":e.describedByIds,"aria-invalid":e.errors&&e.errors.length,disabled:k.disabled},null,8,vqe),[[PS,e.selectedValue]]),D(" "+ee(k.label),1)],64))]))),128)),t[13]||(t[13]=D()),e.isMultilingual&&e.locales.length>1?(L(),Ee(b,{key:0,id:e.multilingualProgressId,count:e.multilingualFieldsCompleted,total:e.locales.length},null,8,["id","count","total"])):we("",!0)])],2)}const m5e=wt(aqe,[["render",Sqe]]),h5e={name:"FieldRichText",extends:O5,props:{i18nFormattingLabel:{type:String,required:!0},size:{type:String,default(){return"oneline"},validator(e){return["oneline"].includes(e)}},invalidElements:{type:String,default(){return"em,strong,br"}},validElements:{type:String,default(){return"b,i,u,sup,sub"}}},computed:{compiledInit(){let e=O5.computed.compiledInit.apply(this);return delete e.url_converter_callback,{...e,forced_root_block:"div",toolbar_groups:{formatgroup:{icon:"text-color",tooltip:this.i18nFormattingLabel,items:"bold italic underline superscript subscript"}},content_css:$.pkp.app.tinyMceOneLineContentCSS,formats:{bold:[{inline:"b",remove:"all",exact:!0}],italic:[{inline:"i",remove:"all",exact:!0}],underline:[{inline:"u",remove:"all",exact:!0}],subscript:[{inline:"sub",remove:"all",exact:!0}],superscript:[{inline:"sup",remove:"all",exact:!0}]},extended_valid_elements:"b,i",invalid_elements:this.invalidElements,valid_elements:this.validElements,setup:t=>{t.on("keyDown",n=>{if(parseInt(n.keyCode)===13){n.preventDefault(),n.stopPropagation();return}}),t.on("PostProcess",function(n){n.content=n.content.replace(/<\/?div>/g,"")})}}}},methods:{blur(){O5.methods.blur.apply(this),this.closeToolbar()},closeToolbar(){const e=this.$el.querySelector(".tox-tbtn[aria-owns]");if(e&&document.getElementById(e.getAttribute("aria-owns"))){const n=document.activeElement;e.click(),n&&n.focus()}}}},Cqe={name:"FieldSelect",components:{FormFieldLabel:i0,Tooltip:Tc,MultilingualProgress:a0,HelpButton:Id,FieldError:Gd},extends:Lm,props:{options:Array,size:{default:"normal",validator:function(e){return["normal","large"].indexOf(e)!==-1}}},computed:{inputClasses(){return["pkpFormField--select__input--size"+this.size]},localizedOptions(){return this.isMultilingual?this.options[this.localeKey]:this.options}}},wqe={class:"pkpFormField pkpFormField--select"},Eqe={class:"pkpFormField__heading"},kqe=["id"],xqe=["id"],Tqe=["id","name","aria-describedby","aria-invalid","required"];function Iqe(e,t,n,i,a,l){const f=Xe("FormFieldLabel"),d=Xe("Tooltip"),h=Xe("HelpButton"),b=Xe("MultilingualProgress"),S=Xe("FieldError"),k=Hr("strip-unsafe-html");return L(),Q("div",wqe,[H("div",Eqe,[pe(f,{"control-id":e.controlId,label:e.label,"locale-label":e.localeLabel,"is-required":e.isRequired,"required-label":e.t("common.required"),"multilingual-label":e.multilingualLabel,class:"align-middle"},null,8,["control-id","label","locale-label","is-required","required-label","multilingual-label"]),t[1]||(t[1]=D()),e.tooltip?(L(),Ee(d,{key:0,"aria-hidden":"true",tooltip:e.tooltip,label:""},null,8,["tooltip"])):we("",!0),t[2]||(t[2]=D()),e.tooltip?Gn((L(),Q("span",{key:1,id:e.describedByTooltipId,class:"-screenReader"},null,8,kqe)),[[k,e.tooltip]]):we("",!0),t[3]||(t[3]=D()),e.helpTopic?(L(),Ee(h,{key:2,id:e.describedByHelpId,topic:e.helpTopic,section:e.helpSection,label:e.t("help.help")},null,8,["id","topic","section","label"])):we("",!0)]),t[6]||(t[6]=D()),e.isPrimaryLocale&&e.description?Gn((L(),Q("div",{key:0,id:e.describedByDescriptionId,class:"pkpFormField__description semantic-defaults"},null,8,xqe)),[[k,e.description]]):we("",!0),t[7]||(t[7]=D()),H("div",{class:Rn(["pkpFormField__control",{"pkpFormField__control--hasMultilingualIndicator":e.isMultilingual&&e.locales.length>1}])},[Gn(H("select",{id:e.controlId,"onUpdate:modelValue":t[0]||(t[0]=T=>e.currentValue=T),class:Rn(["pkpFormField__input pkpFormField--select__input",l.inputClasses]),name:e.localizedName,"aria-describedby":e.describedByIds,"aria-invalid":e.errors&&e.errors.length,required:e.isRequired},[(L(!0),Q(bt,null,Sn(l.localizedOptions,T=>(L(),Q("option",Cn({key:T.value,ref_for:!0},T),ee(T.label),17))),128))],10,Tqe),[[wB,e.currentValue]]),t[4]||(t[4]=D()),e.isMultilingual&&e.locales.length>1?(L(),Ee(b,{key:0,id:e.multilingualProgressId,count:e.multilingualFieldsCompleted,total:e.locales.length},null,8,["id","count","total"])):we("",!0),t[5]||(t[5]=D()),e.errors&&e.errors.length?(L(),Ee(S,{key:1,id:e.describedByErrorId,messages:e.errors},null,8,["id","messages"])):we("",!0)],2)])}const e9=wt(Cqe,[["render",Iqe]]),Aqe={name:"FieldSelectIssue",components:{Tooltip:Tc,FormFieldLabel:i0,HelpButton:Id,FieldError:Gd,PkpButton:ms},extends:e9,props:{assignedNoticeBase:{type:String,required:!0},assignLabel:{type:String,required:!0},changeIssueLabel:{type:String,required:!0},publicationStatus:{type:Number,required:!0},publishedNoticeBase:{type:String,required:!0},scheduledNoticeBase:{type:String,required:!0},unscheduledNotice:{type:String,required:!0},unscheduleLabel:{type:String,required:!0}},computed:{button(){let e=null;return this.publicationStatus!==pkp.const.STATUS_PUBLISHED&&(e={label:this.value?this.changeIssueLabel:this.assignLabel}),e},notice(){let e="";if(this.publicationStatus===pkp.const.STATUS_PUBLISHED)e=this.publishedNoticeBase;else if(this.publicationStatus===pkp.const.STATUS_SCHEDULED)e=this.scheduledNoticeBase;else if(this.value)e=this.assignedNoticeBase;else return this.unscheduledNotice;return e.replace("__issueId__",this.value).replace("{$issueName}",this.selectedIssueName)},selectedIssueName(){if(!this.value)return"";const e=this.options.find(t=>t.value===this.value);return e?e.label:""}},methods:{async selectIssue(){const{useWorkflowStore:e}=await Bye(async()=>{const{useWorkflowStore:n}=await Promise.resolve().then(()=>tpt);return{useWorkflowStore:n}},void 0);e().workflowAssignToIssue({},n=>{n.data.issueId&&(this.currentValue=n.data.issueId)})},emitGlobal(e){pkp.eventBus.$emit(e)}}},Oqe={class:"pkpFormField pkpFormField--select pkpFormField--selectIssue"},Rqe={class:"pkpFormField__heading"},Dqe=["id"],Lqe=["id"],Pqe={class:"pkpFormField__control"},Mqe={class:"pkpFormField__description"};function Nqe(e,t,n,i,a,l){const f=Xe("FormFieldLabel"),d=Xe("Tooltip"),h=Xe("HelpButton"),b=Xe("PkpButton"),S=Xe("FieldError"),k=Hr("strip-unsafe-html");return L(),Q("div",Oqe,[H("div",Rqe,[pe(f,{"control-id":e.controlId,label:e.label,"is-required":e.isRequired,"required-label":e.t("common.required"),class:"align-middle"},null,8,["control-id","label","is-required","required-label"]),t[0]||(t[0]=D()),e.tooltip?(L(),Ee(d,{key:0,"aria-hidden":"true",tooltip:e.tooltip,label:""},null,8,["tooltip"])):we("",!0),t[1]||(t[1]=D()),e.tooltip?Gn((L(),Q("span",{key:1,id:e.describedByTooltipId,class:"-screenReader"},null,8,Dqe)),[[k,e.tooltip]]):we("",!0),t[2]||(t[2]=D()),e.helpTopic?(L(),Ee(h,{key:2,id:e.describedByHelpId,topic:e.helpTopic,section:e.helpSection,label:e.t("help.help")},null,8,["id","topic","section","label"])):we("",!0)]),t[5]||(t[5]=D()),e.description?Gn((L(),Q("div",{key:0,id:e.describedByDescriptionId,class:"pkpFormField__description semantic-defaults"},null,8,Lqe)),[[k,e.description]]):we("",!0),t[6]||(t[6]=D()),H("div",Pqe,[H("span",Mqe,[Gn(H("span",null,null,512),[[k,l.notice]]),t[3]||(t[3]=D()),l.button?(L(),Ee(b,Cn({key:0},l.button,{class:"pkpFormField--selectIssue__button",onClick:l.selectIssue}),{default:te(()=>[D(ee(l.button.label),1)]),_:1},16,["onClick"])):we("",!0)]),t[4]||(t[4]=D()),e.errors&&e.errors.length?(L(),Ee(S,{key:0,id:e.describedByErrorId,messages:e.errors},null,8,["id","messages"])):we("",!0)])])}const g5e=wt(Aqe,[["render",Nqe]]),Lte={name:"FieldSelectIssues",extends:lC,methods:{setSuggestions(e){const t=e.filter(n=>!this.selected.find(i=>i.value===n.id)).map(n=>({value:n.id,label:n.identification}));this.suggestions=t}}},v5e={name:"FieldSelectSubmissions",extends:lC,methods:{setSuggestions(e){const t=e.filter(n=>!this.selected.find(i=>i.id===n.id)).map(n=>{const i=n.publications.find(a=>a.id===n.currentPublicationId);return i?{value:n.id,label:this.localize(i.fullTitle)}:{value:0,label:""}});this.suggestions=t}}},Pte={name:"FieldSelectUsers",extends:lC,methods:{setSuggestions(e){const t=e.filter(n=>!this.selected.find(i=>i.id===n.id)).map(n=>({value:n.id,label:n.fullName}));this.suggestions=t}}},b5e={name:"FieldShowEnsuringLink",extends:aC,mixins:[wd],props:{message:String,modalTitle:String},computed:{classes(){return["pkpFormField--showEnsuringLink"]}},mounted(){$(".pkpFormField--options__option button",this.$el).click(()=>(this.openDialog({name:"ensureAnonymousReview",confirmLabel:this.t("common.ok"),message:this.message,title:this.modalTitle,callback:e=>{e()},modalStyle:"primary"},{height:"auto",scrollable:!0}),!1))},beforeUnmount(){$(".pkpFormField--options__option button",this.$el).off()}},Fqe={name:"FieldTextarea",components:{FormFieldLabel:i0,Tooltip:Tc,HelpButton:Id,MultilingualProgress:a0,FieldError:Gd},extends:Lm,props:{size:{type:String,default:"normal",validator:function(e){return["small","normal","large"].indexOf(e)!==-1}}},computed:{classes(){return["pkpFormField--"+this.size]}}},$qe={class:"pkpFormField__heading"},Bqe=["id"],Vqe=["id"],Hqe={class:"pkpFormField__control"},Uqe=["id","name","aria-describedby","aria-invalid","required"];function zqe(e,t,n,i,a,l){const f=Xe("FormFieldLabel"),d=Xe("Tooltip"),h=Xe("HelpButton"),b=Xe("MultilingualProgress"),S=Xe("FieldError"),k=Hr("strip-unsafe-html");return L(),Q("div",{class:Rn(["pkpFormField pkpFormField--textarea",l.classes])},[H("div",$qe,[pe(f,{"control-id":e.controlId,label:e.label,"locale-label":e.localeLabel,"is-required":e.isRequired,"required-label":e.t("common.required"),"multilingual-label":e.multilingualLabel,class:"align-middle"},null,8,["control-id","label","locale-label","is-required","required-label","multilingual-label"]),t[1]||(t[1]=D()),e.isPrimaryLocale&&e.tooltip?(L(),Ee(d,{key:0,"aria-hidden":"true",tooltip:e.tooltip,label:""},null,8,["tooltip"])):we("",!0),t[2]||(t[2]=D()),e.isPrimaryLocale&&e.tooltip?Gn((L(),Q("span",{key:1,id:e.describedByTooltipId,class:"-screenReader"},null,8,Bqe)),[[k,e.tooltip]]):we("",!0),t[3]||(t[3]=D()),e.isPrimaryLocale&&e.helpTopic?(L(),Ee(h,{key:2,id:e.describedByHelpId,topic:e.helpTopic,section:e.helpSection,label:e.t("help.help")},null,8,["id","topic","section","label"])):we("",!0)]),t[5]||(t[5]=D()),e.isPrimaryLocale&&e.description?Gn((L(),Q("div",{key:0,id:e.describedByDescriptionId,class:"pkpFormField__description semantic-defaults"},null,8,Vqe)),[[k,e.description]]):we("",!0),t[6]||(t[6]=D()),H("div",Hqe,[Gn(H("textarea",{id:e.controlId,"onUpdate:modelValue":t[0]||(t[0]=T=>e.currentValue=T),class:"pkpFormField__input pkpFormField--textarea__input",name:e.localizedName,"aria-describedby":e.describedByIds,"aria-invalid":e.errors&&e.errors.length,required:e.isRequired},null,8,Uqe),[[lu,e.currentValue]]),t[4]||(t[4]=D()),e.isMultilingual&&e.locales.length>1?(L(),Ee(b,{key:0,id:e.multilingualProgressId,count:e.multilingualFieldsCompleted,total:e.locales.length},null,8,["id","count","total"])):we("",!0)]),t[7]||(t[7]=D()),e.errors&&e.errors.length?(L(),Ee(S,{key:1,id:e.describedByErrorId,messages:e.errors},null,8,["id","messages"])):we("",!0)],2)}const y5e=wt(Fqe,[["render",zqe]]);var _5e=S5e;function S5e(){var e=[].slice.call(arguments),t=!1;typeof e[0]=="boolean"&&(t=e.shift());var n=e[0];if(C5e(n))throw new Error("extendee must be an object");for(var i=e.slice(1),a=i.length,l=0;l<a;l++){var f=i[l];for(var d in f)if(Object.prototype.hasOwnProperty.call(f,d)){var h=f[d];if(t&&Wqe(h)){var b=Array.isArray(h)?[]:{};n[d]=S5e(!0,Object.prototype.hasOwnProperty.call(n,d)&&!C5e(n[d])?n[d]:b,h)}else n[d]=h}}return n}function Wqe(e){return Array.isArray(e)||{}.toString.call(e)=="[object Object]"}function C5e(e){return!e||typeof e!="object"&&typeof e!="function"}function jqe(e){return e&&e.__esModule?e.default:e}class w5e{on(t,n){return this._callbacks=this._callbacks||{},this._callbacks[t]||(this._callbacks[t]=[]),this._callbacks[t].push(n),this}emit(t,...n){this._callbacks=this._callbacks||{};let i=this._callbacks[t];if(i)for(let a of i)a.apply(this,n);return this.element&&this.element.dispatchEvent(this.makeEvent("dropzone:"+t,{args:n})),this}makeEvent(t,n){let i={bubbles:!0,cancelable:!0,detail:n};if(typeof window.CustomEvent=="function")return new CustomEvent(t,i);var a=document.createEvent("CustomEvent");return a.initCustomEvent(t,i.bubbles,i.cancelable,i.detail),a}off(t,n){if(!this._callbacks||arguments.length===0)return this._callbacks={},this;let i=this._callbacks[t];if(!i)return this;if(arguments.length===1)return delete this._callbacks[t],this;for(let a=0;a<i.length;a++)if(i[a]===n){i.splice(a,1);break}return this}}var E5e={};E5e='<div class="dz-preview dz-file-preview">\n <div class="dz-image"><img data-dz-thumbnail=""></div>\n <div class="dz-details">\n <div class="dz-size"><span data-dz-size=""></span></div>\n <div class="dz-filename"><span data-dz-name=""></span></div>\n </div>\n <div class="dz-progress">\n <span class="dz-upload" data-dz-uploadprogress=""></span>\n </div>\n <div class="dz-error-message"><span data-dz-errormessage=""></span></div>\n <div class="dz-success-mark">\n <svg width="54" height="54" viewBox="0 0 54 54" fill="white" xmlns="http://www.w3.org/2000/svg">\n <path d="M10.2071 29.7929L14.2929 25.7071C14.6834 25.3166 15.3166 25.3166 15.7071 25.7071L21.2929 31.2929C21.6834 31.6834 22.3166 31.6834 22.7071 31.2929L38.2929 15.7071C38.6834 15.3166 39.3166 15.3166 39.7071 15.7071L43.7929 19.7929C44.1834 20.1834 44.1834 20.8166 43.7929 21.2071L22.7071 42.2929C22.3166 42.6834 21.6834 42.6834 21.2929 42.2929L10.2071 31.2071C9.81658 30.8166 9.81658 30.1834 10.2071 29.7929Z"></path>\n </svg>\n </div>\n <div class="dz-error-mark">\n <svg width="54" height="54" viewBox="0 0 54 54" fill="white" xmlns="http://www.w3.org/2000/svg">\n <path d="M26.2929 20.2929L19.2071 13.2071C18.8166 12.8166 18.1834 12.8166 17.7929 13.2071L13.2071 17.7929C12.8166 18.1834 12.8166 18.8166 13.2071 19.2071L20.2929 26.2929C20.6834 26.6834 20.6834 27.3166 20.2929 27.7071L13.2071 34.7929C12.8166 35.1834 12.8166 35.8166 13.2071 36.2071L17.7929 40.7929C18.1834 41.1834 18.8166 41.1834 19.2071 40.7929L26.2929 33.7071C26.6834 33.3166 27.3166 33.3166 27.7071 33.7071L34.7929 40.7929C35.1834 41.1834 35.8166 41.1834 36.2071 40.7929L40.7929 36.2071C41.1834 35.8166 41.1834 35.1834 40.7929 34.7929L33.7071 27.7071C33.3166 27.3166 33.3166 26.6834 33.7071 26.2929L40.7929 19.2071C41.1834 18.8166 41.1834 18.1834 40.7929 17.7929L36.2071 13.2071C35.8166 12.8166 35.1834 12.8166 34.7929 13.2071L27.7071 20.2929C27.3166 20.6834 26.6834 20.6834 26.2929 20.2929Z"></path>\n </svg>\n </div>\n</div>\n';var Zqe={url:null,method:"post",withCredentials:!1,timeout:null,parallelUploads:2,uploadMultiple:!1,chunking:!1,forceChunking:!1,chunkSize:2097152,parallelChunkUploads:!1,retryChunks:!1,retryChunksLimit:3,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,thumbnailMethod:"crop",resizeWidth:null,resizeHeight:null,resizeMimeType:null,resizeQuality:.8,resizeMethod:"contain",filesizeBase:1e3,maxFiles:null,headers:null,defaultHeaders:!0,clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,disablePreviews:!1,hiddenInputContainer:"body",capture:null,renameFilename:null,renameFile:null,forceFallback:!1,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictUploadCanceled:"Upload canceled.",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",dictFileSizeUnits:{tb:"TB",gb:"GB",mb:"MB",kb:"KB",b:"b"},init(){},params(e,t,n){if(n)return{dzuuid:n.file.upload.uuid,dzchunkindex:n.index,dztotalfilesize:n.file.size,dzchunksize:this.options.chunkSize,dztotalchunkcount:n.file.upload.totalChunkCount,dzchunkbyteoffset:n.index*this.options.chunkSize}},accept(e,t){return t()},chunksUploaded:function(e,t){t()},binaryBody:!1,fallback(){let e;this.element.className="".concat(this.element.className," dz-browser-not-supported");for(let n of this.element.getElementsByTagName("div"))if(/(^| )dz-message($| )/.test(n.className)){e=n,n.className="dz-message";break}e||(e=Ls.createElement('<div class="dz-message"><span></span></div>'),this.element.appendChild(e));let t=e.getElementsByTagName("span")[0];return t&&(t.textContent!=null?t.textContent=this.options.dictFallbackMessage:t.innerText!=null&&(t.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize(e,t,n,i){let a={srcX:0,srcY:0,srcWidth:e.width,srcHeight:e.height},l=e.width/e.height;t==null&&n==null?(t=a.srcWidth,n=a.srcHeight):t==null?t=n*l:n==null&&(n=t/l),t=Math.min(t,a.srcWidth),n=Math.min(n,a.srcHeight);let f=t/n;if(a.srcWidth>t||a.srcHeight>n)if(i==="crop")l>f?(a.srcHeight=e.height,a.srcWidth=a.srcHeight*f):(a.srcWidth=e.width,a.srcHeight=a.srcWidth/f);else if(i==="contain")l>f?n=t/l:t=n*l;else throw new Error("Unknown resizeMethod '".concat(i,"'"));return a.srcX=(e.width-a.srcWidth)/2,a.srcY=(e.height-a.srcHeight)/2,a.trgWidth=t,a.trgHeight=n,a},transformFile(e,t){return(this.options.resizeWidth||this.options.resizeHeight)&&e.type.match(/image.*/)?this.resizeImage(e,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,t):t(e)},previewTemplate:jqe(E5e),drop(e){return this.element.classList.remove("dz-drag-hover")},dragstart(e){},dragend(e){return this.element.classList.remove("dz-drag-hover")},dragenter(e){return this.element.classList.add("dz-drag-hover")},dragover(e){return this.element.classList.add("dz-drag-hover")},dragleave(e){return this.element.classList.remove("dz-drag-hover")},paste(e){},reset(){return this.element.classList.remove("dz-started")},addedfile(e){if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer&&!this.options.disablePreviews){e.previewElement=Ls.createElement(this.options.previewTemplate.trim()),e.previewTemplate=e.previewElement,this.previewsContainer.appendChild(e.previewElement);for(var t of e.previewElement.querySelectorAll("[data-dz-name]"))t.textContent=e.name;for(t of e.previewElement.querySelectorAll("[data-dz-size]"))t.innerHTML=this.filesize(e.size);this.options.addRemoveLinks&&(e._removeLink=Ls.createElement('<a class="dz-remove" href="javascript:undefined;" data-dz-remove>'.concat(this.options.dictRemoveFile,"</a>")),e.previewElement.appendChild(e._removeLink));let n=i=>(i.preventDefault(),i.stopPropagation(),e.status===Ls.UPLOADING?Ls.confirm(this.options.dictCancelUploadConfirmation,()=>this.removeFile(e)):this.options.dictRemoveFileConfirmation?Ls.confirm(this.options.dictRemoveFileConfirmation,()=>this.removeFile(e)):this.removeFile(e));for(let i of e.previewElement.querySelectorAll("[data-dz-remove]"))i.addEventListener("click",n)}},removedfile(e){return e.previewElement!=null&&e.previewElement.parentNode!=null&&e.previewElement.parentNode.removeChild(e.previewElement),this._updateMaxFilesReachedClass()},thumbnail(e,t){if(e.previewElement){e.previewElement.classList.remove("dz-file-preview");for(let n of e.previewElement.querySelectorAll("[data-dz-thumbnail]"))n.alt=e.name,n.src=t;return setTimeout(()=>e.previewElement.classList.add("dz-image-preview"),1)}},error(e,t){if(e.previewElement){e.previewElement.classList.add("dz-error"),typeof t!="string"&&t.error&&(t=t.error);for(let n of e.previewElement.querySelectorAll("[data-dz-errormessage]"))n.textContent=t}},errormultiple(){},processing(e){if(e.previewElement&&(e.previewElement.classList.add("dz-processing"),e._removeLink))return e._removeLink.innerHTML=this.options.dictCancelUpload},processingmultiple(){},uploadprogress(e,t,n){if(e.previewElement)for(let i of e.previewElement.querySelectorAll("[data-dz-uploadprogress]"))i.nodeName==="PROGRESS"?i.value=t:i.style.width="".concat(t,"%")},totaluploadprogress(){},sending(){},sendingmultiple(){},success(e){if(e.previewElement)return e.previewElement.classList.add("dz-success")},successmultiple(){},canceled(e){return this.emit("error",e,this.options.dictUploadCanceled)},canceledmultiple(){},complete(e){if(e._removeLink&&(e._removeLink.innerHTML=this.options.dictRemoveFile),e.previewElement)return e.previewElement.classList.add("dz-complete")},completemultiple(){},maxfilesexceeded(){},maxfilesreached(){},queuecomplete(){},addedfiles(){}};class Ls extends w5e{static initClass(){this.prototype.Emitter=w5e,this.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","addedfiles","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"],this.prototype._thumbnailQueue=[],this.prototype._processingThumbnail=!1}getAcceptedFiles(){return this.files.filter(t=>t.accepted).map(t=>t)}getRejectedFiles(){return this.files.filter(t=>!t.accepted).map(t=>t)}getFilesWithStatus(t){return this.files.filter(n=>n.status===t).map(n=>n)}getQueuedFiles(){return this.getFilesWithStatus(Ls.QUEUED)}getUploadingFiles(){return this.getFilesWithStatus(Ls.UPLOADING)}getAddedFiles(){return this.getFilesWithStatus(Ls.ADDED)}getActiveFiles(){return this.files.filter(t=>t.status===Ls.UPLOADING||t.status===Ls.QUEUED).map(t=>t)}init(){if(this.element.tagName==="form"&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(Ls.createElement('<div class="dz-default dz-message"><button class="dz-button" type="button">'.concat(this.options.dictDefaultMessage,"</button></div>"))),this.clickableElements.length){let i=()=>{this.hiddenFileInput&&this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=document.createElement("input"),this.hiddenFileInput.setAttribute("type","file"),(this.options.maxFiles===null||this.options.maxFiles>1)&&this.hiddenFileInput.setAttribute("multiple","multiple"),this.hiddenFileInput.className="dz-hidden-input",this.options.acceptedFiles!==null&&this.hiddenFileInput.setAttribute("accept",this.options.acceptedFiles),this.options.capture!==null&&this.hiddenFileInput.setAttribute("capture",this.options.capture),this.hiddenFileInput.setAttribute("tabindex","-1"),this.hiddenFileInput.style.visibility="hidden",this.hiddenFileInput.style.position="absolute",this.hiddenFileInput.style.top="0",this.hiddenFileInput.style.left="0",this.hiddenFileInput.style.height="0",this.hiddenFileInput.style.width="0",Ls.getElement(this.options.hiddenInputContainer,"hiddenInputContainer").appendChild(this.hiddenFileInput),this.hiddenFileInput.addEventListener("change",()=>{let{files:a}=this.hiddenFileInput;if(a.length)for(let l of a)this.addFile(l);this.emit("addedfiles",a),i()})};i()}this.URL=window.URL!==null?window.URL:window.webkitURL;for(let i of this.events)this.on(i,this.options[i]);this.on("uploadprogress",()=>this.updateTotalUploadProgress()),this.on("removedfile",()=>this.updateTotalUploadProgress()),this.on("canceled",i=>this.emit("complete",i)),this.on("complete",i=>{if(this.getAddedFiles().length===0&&this.getUploadingFiles().length===0&&this.getQueuedFiles().length===0)return setTimeout(()=>this.emit("queuecomplete"),0)});const t=function(i){if(i.dataTransfer.types){for(var a=0;a<i.dataTransfer.types.length;a++)if(i.dataTransfer.types[a]==="Files")return!0}return!1};let n=function(i){if(t(i))return i.stopPropagation(),i.preventDefault?i.preventDefault():i.returnValue=!1};return this.listeners=[{element:this.element,events:{dragstart:i=>this.emit("dragstart",i),dragenter:i=>(n(i),this.emit("dragenter",i)),dragover:i=>{let a;try{a=i.dataTransfer.effectAllowed}catch{}return i.dataTransfer.dropEffect=a==="move"||a==="linkMove"?"move":"copy",n(i),this.emit("dragover",i)},dragleave:i=>this.emit("dragleave",i),drop:i=>(n(i),this.drop(i)),dragend:i=>this.emit("dragend",i)}}],this.clickableElements.forEach(i=>this.listeners.push({element:i,events:{click:a=>((i!==this.element||a.target===this.element||Ls.elementInside(a.target,this.element.querySelector(".dz-message")))&&this.hiddenFileInput.click(),!0)}})),this.enable(),this.options.init.call(this)}destroy(){return this.disable(),this.removeAllFiles(!0),this.hiddenFileInput!=null&&this.hiddenFileInput.parentNode&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,Ls.instances.splice(Ls.instances.indexOf(this),1)}updateTotalUploadProgress(){let t,n=0,i=0;if(this.getActiveFiles().length){for(let l of this.getActiveFiles())n+=l.upload.bytesSent,i+=l.upload.total;t=100*n/i}else t=100;return this.emit("totaluploadprogress",t,i,n)}_getParamName(t){return typeof this.options.paramName=="function"?this.options.paramName(t):"".concat(this.options.paramName).concat(this.options.uploadMultiple?"[".concat(t,"]"):"")}_renameFile(t){return typeof this.options.renameFile!="function"?t.name:this.options.renameFile(t)}getFallbackForm(){let t,n;if(t=this.getExistingFallback())return t;let i='<div class="dz-fallback">';this.options.dictFallbackText&&(i+="<p>".concat(this.options.dictFallbackText,"</p>")),i+='<input type="file" name="'.concat(this._getParamName(0),'" ').concat(this.options.uploadMultiple?'multiple="multiple"':void 0,' /><input type="submit" value="Upload!"></div>');let a=Ls.createElement(i);return this.element.tagName!=="FORM"?(n=Ls.createElement('<form action="'.concat(this.options.url,'" enctype="multipart/form-data" method="').concat(this.options.method,'"></form>')),n.appendChild(a)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),n!=null?n:a}getExistingFallback(){let t=function(i){for(let a of i)if(/(^| )fallback($| )/.test(a.className))return a};for(let i of["div","form"]){var n;if(n=t(this.element.getElementsByTagName(i)))return n}}setupEventListeners(){return this.listeners.map(t=>(()=>{let n=[];for(let i in t.events){let a=t.events[i];n.push(t.element.addEventListener(i,a,!1))}return n})())}removeEventListeners(){return this.listeners.map(t=>(()=>{let n=[];for(let i in t.events){let a=t.events[i];n.push(t.element.removeEventListener(i,a,!1))}return n})())}disable(){return this.clickableElements.forEach(t=>t.classList.remove("dz-clickable")),this.removeEventListeners(),this.disabled=!0,this.files.map(t=>this.cancelUpload(t))}enable(){return delete this.disabled,this.clickableElements.forEach(t=>t.classList.add("dz-clickable")),this.setupEventListeners()}filesize(t){let n=0,i="b";if(t>0){let a=["tb","gb","mb","kb","b"];for(let l=0;l<a.length;l++){let f=a[l],d=Math.pow(this.options.filesizeBase,4-l)/10;if(t>=d){n=t/Math.pow(this.options.filesizeBase,4-l),i=f;break}}n=Math.round(10*n)/10}return"<strong>".concat(n,"</strong> ").concat(this.options.dictFileSizeUnits[i])}_updateMaxFilesReachedClass(){return this.options.maxFiles!=null&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")}drop(t){if(!t.dataTransfer)return;this.emit("drop",t);let n=[];for(let i=0;i<t.dataTransfer.files.length;i++)n[i]=t.dataTransfer.files[i];if(n.length){let{items:i}=t.dataTransfer;i&&i.length&&i[0].webkitGetAsEntry!=null?this._addFilesFromItems(i):this.handleFiles(n)}this.emit("addedfiles",n)}paste(t){if(Xqe(t!=null?t.clipboardData:void 0,i=>i.items)==null)return;this.emit("paste",t);let{items:n}=t.clipboardData;if(n.length)return this._addFilesFromItems(n)}handleFiles(t){for(let n of t)this.addFile(n)}_addFilesFromItems(t){return(()=>{let n=[];for(let a of t){var i;a.webkitGetAsEntry!=null&&(i=a.webkitGetAsEntry())?i.isFile?n.push(this.addFile(a.getAsFile())):i.isDirectory?n.push(this._addFilesFromDirectory(i,i.name)):n.push(void 0):a.getAsFile!=null&&(a.kind==null||a.kind==="file")?n.push(this.addFile(a.getAsFile())):n.push(void 0)}return n})()}_addFilesFromDirectory(t,n){let i=t.createReader(),a=f=>Jqe(console,"log",d=>d.log(f));var l=()=>i.readEntries(f=>{if(f.length>0){for(let d of f)d.isFile?d.file(h=>{if(!(this.options.ignoreHiddenFiles&&h.name.substring(0,1)==="."))return h.fullPath="".concat(n,"/").concat(h.name),this.addFile(h)}):d.isDirectory&&this._addFilesFromDirectory(d,"".concat(n,"/").concat(d.name));l()}return null},a);return l()}accept(t,n){this.options.maxFilesize&&t.size>this.options.maxFilesize*1048576?n(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(t.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):Ls.isValidFile(t,this.options.acceptedFiles)?this.options.maxFiles!=null&&this.getAcceptedFiles().length>=this.options.maxFiles?(n(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",t)):this.options.accept.call(this,t,n):n(this.options.dictInvalidFileType)}addFile(t){t.upload={uuid:Ls.uuidv4(),progress:0,total:t.size,bytesSent:0,filename:this._renameFile(t)},this.files.push(t),t.status=Ls.ADDED,this.emit("addedfile",t),this._enqueueThumbnail(t),this.accept(t,n=>{n?(t.accepted=!1,this._errorProcessing([t],n)):(t.accepted=!0,this.options.autoQueue&&this.enqueueFile(t)),this._updateMaxFilesReachedClass()})}enqueueFiles(t){for(let n of t)this.enqueueFile(n);return null}enqueueFile(t){if(t.status===Ls.ADDED&&t.accepted===!0){if(t.status=Ls.QUEUED,this.options.autoProcessQueue)return setTimeout(()=>this.processQueue(),0)}else throw new Error("This file can't be queued because it has already been processed or was rejected.")}_enqueueThumbnail(t){if(this.options.createImageThumbnails&&t.type.match(/image.*/)&&t.size<=this.options.maxThumbnailFilesize*1048576)return this._thumbnailQueue.push(t),setTimeout(()=>this._processThumbnailQueue(),0)}_processThumbnailQueue(){if(this._processingThumbnail||this._thumbnailQueue.length===0)return;this._processingThumbnail=!0;let t=this._thumbnailQueue.shift();return this.createThumbnail(t,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,n=>(this.emit("thumbnail",t,n),this._processingThumbnail=!1,this._processThumbnailQueue()))}removeFile(t){if(t.status===Ls.UPLOADING&&this.cancelUpload(t),this.files=qqe(this.files,t),this.emit("removedfile",t),this.files.length===0)return this.emit("reset")}removeAllFiles(t){t==null&&(t=!1);for(let n of this.files.slice())(n.status!==Ls.UPLOADING||t)&&this.removeFile(n);return null}resizeImage(t,n,i,a,l){return this.createThumbnail(t,n,i,a,!0,(f,d)=>{if(d==null)return l(t);{let{resizeMimeType:h}=this.options;h==null&&(h=t.type);let b=d.toDataURL(h,this.options.resizeQuality);return(h==="image/jpeg"||h==="image/jpg")&&(b=k5e.restore(t.dataURL,b)),l(Ls.dataURItoBlob(b))}})}createThumbnail(t,n,i,a,l,f){let d=new FileReader;d.onload=()=>{if(t.dataURL=d.result,t.type==="image/svg+xml"){f!=null&&f(d.result);return}this.createThumbnailFromUrl(t,n,i,a,l,f)},d.readAsDataURL(t)}displayExistingFile(t,n,i,a,l=!0){if(this.emit("addedfile",t),this.emit("complete",t),!l)this.emit("thumbnail",t,n),i&&i();else{let f=d=>{this.emit("thumbnail",t,d),i&&i()};t.dataURL=n,this.createThumbnailFromUrl(t,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,this.options.fixOrientation,f,a)}}createThumbnailFromUrl(t,n,i,a,l,f,d){let h=document.createElement("img");return d&&(h.crossOrigin=d),l=getComputedStyle(document.body).imageOrientation=="from-image"?!1:l,h.onload=()=>{let b=S=>S(1);return typeof EXIF<"u"&&EXIF!==null&&l&&(b=S=>EXIF.getData(h,function(){return S(EXIF.getTag(this,"Orientation"))})),b(S=>{t.width=h.width,t.height=h.height;let k=this.options.resize.call(this,t,n,i,a),T=document.createElement("canvas"),O=T.getContext("2d");switch(T.width=k.trgWidth,T.height=k.trgHeight,S>4&&(T.width=k.trgHeight,T.height=k.trgWidth),S){case 2:O.translate(T.width,0),O.scale(-1,1);break;case 3:O.translate(T.width,T.height),O.rotate(Math.PI);break;case 4:O.translate(0,T.height),O.scale(1,-1);break;case 5:O.rotate(.5*Math.PI),O.scale(1,-1);break;case 6:O.rotate(.5*Math.PI),O.translate(0,-T.width);break;case 7:O.rotate(.5*Math.PI),O.translate(T.height,-T.width),O.scale(-1,1);break;case 8:O.rotate(-.5*Math.PI),O.translate(-T.height,0);break}Yqe(O,h,k.srcX!=null?k.srcX:0,k.srcY!=null?k.srcY:0,k.srcWidth,k.srcHeight,k.trgX!=null?k.trgX:0,k.trgY!=null?k.trgY:0,k.trgWidth,k.trgHeight);let P=T.toDataURL("image/png");if(f!=null)return f(P,T)})},f!=null&&(h.onerror=f),h.src=t.dataURL}processQueue(){let{parallelUploads:t}=this.options,n=this.getUploadingFiles().length,i=n;if(n>=t)return;let a=this.getQueuedFiles();if(a.length>0){if(this.options.uploadMultiple)return this.processFiles(a.slice(0,t-n));for(;i<t;){if(!a.length)return;this.processFile(a.shift()),i++}}}processFile(t){return this.processFiles([t])}processFiles(t){for(let n of t)n.processing=!0,n.status=Ls.UPLOADING,this.emit("processing",n);return this.options.uploadMultiple&&this.emit("processingmultiple",t),this.uploadFiles(t)}_getFilesWithXhr(t){return this.files.filter(n=>n.xhr===t).map(n=>n)}cancelUpload(t){if(t.status===Ls.UPLOADING){let n=this._getFilesWithXhr(t.xhr);for(let i of n)i.status=Ls.CANCELED;typeof t.xhr<"u"&&t.xhr.abort();for(let i of n)this.emit("canceled",i);this.options.uploadMultiple&&this.emit("canceledmultiple",n)}else(t.status===Ls.ADDED||t.status===Ls.QUEUED)&&(t.status=Ls.CANCELED,this.emit("canceled",t),this.options.uploadMultiple&&this.emit("canceledmultiple",[t]));if(this.options.autoProcessQueue)return this.processQueue()}resolveOption(t,...n){return typeof t=="function"?t.apply(this,n):t}uploadFile(t){return this.uploadFiles([t])}uploadFiles(t){this._transformFiles(t,n=>{if(this.options.chunking){let i=n[0];t[0].upload.chunked=this.options.chunking&&(this.options.forceChunking||i.size>this.options.chunkSize),t[0].upload.totalChunkCount=Math.ceil(i.size/this.options.chunkSize)}if(t[0].upload.chunked){let i=t[0],a=n[0];i.upload.chunks=[];let l=()=>{let f=0;for(;i.upload.chunks[f]!==void 0;)f++;if(f>=i.upload.totalChunkCount)return;let d=f*this.options.chunkSize,h=Math.min(d+this.options.chunkSize,a.size),b={name:this._getParamName(0),data:a.webkitSlice?a.webkitSlice(d,h):a.slice(d,h),filename:i.upload.filename,chunkIndex:f};i.upload.chunks[f]={file:i,index:f,dataBlock:b,status:Ls.UPLOADING,progress:0,retries:0},this._uploadData(t,[b])};if(i.upload.finishedChunkUpload=(f,d)=>{let h=!0;f.status=Ls.SUCCESS,f.dataBlock=null,f.response=f.xhr.responseText,f.responseHeaders=f.xhr.getAllResponseHeaders(),f.xhr=null;for(let b=0;b<i.upload.totalChunkCount;b++){if(i.upload.chunks[b]===void 0)return l();i.upload.chunks[b].status!==Ls.SUCCESS&&(h=!1)}h&&this.options.chunksUploaded(i,()=>{this._finished(t,d,null)})},this.options.parallelChunkUploads)for(let f=0;f<i.upload.totalChunkCount;f++)l();else l()}else{let i=[];for(let a=0;a<t.length;a++)i[a]={name:this._getParamName(a),data:n[a],filename:t[a].upload.filename};this._uploadData(t,i)}})}_getChunk(t,n){for(let i=0;i<t.upload.totalChunkCount;i++)if(t.upload.chunks[i]!==void 0&&t.upload.chunks[i].xhr===n)return t.upload.chunks[i]}_uploadData(t,n){let i=new XMLHttpRequest;for(let b of t)b.xhr=i;t[0].upload.chunked&&(t[0].upload.chunks[n[0].chunkIndex].xhr=i);let a=this.resolveOption(this.options.method,t,n),l=this.resolveOption(this.options.url,t,n);i.open(a,l,!0),this.resolveOption(this.options.timeout,t)&&(i.timeout=this.resolveOption(this.options.timeout,t)),i.withCredentials=!!this.options.withCredentials,i.onload=b=>{this._finishedUploading(t,i,b)},i.ontimeout=()=>{this._handleUploadError(t,i,"Request timedout after ".concat(this.options.timeout/1e3," seconds"))},i.onerror=()=>{this._handleUploadError(t,i)};let d=i.upload!=null?i.upload:i;d.onprogress=b=>this._updateFilesUploadProgress(t,i,b);let h=this.options.defaultHeaders?{Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"}:{};this.options.binaryBody&&(h["Content-Type"]=t[0].type),this.options.headers&&_5e(h,this.options.headers);for(let b in h){let S=h[b];S&&i.setRequestHeader(b,S)}if(this.options.binaryBody){for(let b of t)this.emit("sending",b,i);this.options.uploadMultiple&&this.emit("sendingmultiple",t,i),this.submitRequest(i,null,t)}else{let b=new FormData;if(this.options.params){let S=this.options.params;typeof S=="function"&&(S=S.call(this,t,i,t[0].upload.chunked?this._getChunk(t[0],i):null));for(let k in S){let T=S[k];if(Array.isArray(T))for(let O=0;O<T.length;O++)b.append(k,T[O]);else b.append(k,T)}}for(let S of t)this.emit("sending",S,i,b);this.options.uploadMultiple&&this.emit("sendingmultiple",t,i,b),this._addFormElementData(b);for(let S=0;S<n.length;S++){let k=n[S];b.append(k.name,k.data,k.filename)}this.submitRequest(i,b,t)}}_transformFiles(t,n){let i=[],a=0;for(let l=0;l<t.length;l++)this.options.transformFile.call(this,t[l],f=>{i[l]=f,++a===t.length&&n(i)})}_addFormElementData(t){if(this.element.tagName==="FORM")for(let n of this.element.querySelectorAll("input, textarea, select, button")){let i=n.getAttribute("name"),a=n.getAttribute("type");if(a&&(a=a.toLowerCase()),!(typeof i>"u"||i===null))if(n.tagName==="SELECT"&&n.hasAttribute("multiple"))for(let l of n.options)l.selected&&t.append(i,l.value);else(!a||a!=="checkbox"&&a!=="radio"||n.checked)&&t.append(i,n.value)}}_updateFilesUploadProgress(t,n,i){if(t[0].upload.chunked){let a=t[0],l=this._getChunk(a,n);i?(l.progress=100*i.loaded/i.total,l.total=i.total,l.bytesSent=i.loaded):(l.progress=100,l.bytesSent=l.total),a.upload.progress=0,a.upload.total=0,a.upload.bytesSent=0;for(let f=0;f<a.upload.totalChunkCount;f++)a.upload.chunks[f]&&typeof a.upload.chunks[f].progress<"u"&&(a.upload.progress+=a.upload.chunks[f].progress,a.upload.total+=a.upload.chunks[f].total,a.upload.bytesSent+=a.upload.chunks[f].bytesSent);a.upload.progress=a.upload.progress/a.upload.totalChunkCount,this.emit("uploadprogress",a,a.upload.progress,a.upload.bytesSent)}else for(let a of t)a.upload.total&&a.upload.bytesSent&&a.upload.bytesSent==a.upload.total||(i?(a.upload.progress=100*i.loaded/i.total,a.upload.total=i.total,a.upload.bytesSent=i.loaded):(a.upload.progress=100,a.upload.bytesSent=a.upload.total),this.emit("uploadprogress",a,a.upload.progress,a.upload.bytesSent))}_finishedUploading(t,n,i){let a;if(t[0].status!==Ls.CANCELED&&n.readyState===4){if(n.responseType!=="arraybuffer"&&n.responseType!=="blob"&&(a=n.responseText,n.getResponseHeader("content-type")&&~n.getResponseHeader("content-type").indexOf("application/json")))try{a=JSON.parse(a)}catch(l){i=l,a="Invalid JSON response from server."}this._updateFilesUploadProgress(t,n),200<=n.status&&n.status<300?t[0].upload.chunked?t[0].upload.finishedChunkUpload(this._getChunk(t[0],n),a):this._finished(t,a,i):this._handleUploadError(t,n,a)}}_handleUploadError(t,n,i){if(t[0].status!==Ls.CANCELED){if(t[0].upload.chunked&&this.options.retryChunks){let a=this._getChunk(t[0],n);if(a.retries++<this.options.retryChunksLimit){this._uploadData(t,[a.dataBlock]);return}else console.warn("Retried this chunk too often. Giving up.")}this._errorProcessing(t,i||this.options.dictResponseError.replace("{{statusCode}}",n.status),n)}}submitRequest(t,n,i){if(t.readyState!=1){console.warn("Cannot send this request because the XMLHttpRequest.readyState is not OPENED.");return}if(this.options.binaryBody)if(i[0].upload.chunked){const a=this._getChunk(i[0],t);t.send(a.dataBlock.data)}else t.send(i[0]);else t.send(n)}_finished(t,n,i){for(let a of t)a.status=Ls.SUCCESS,this.emit("success",a,n,i),this.emit("complete",a);if(this.options.uploadMultiple&&(this.emit("successmultiple",t,n,i),this.emit("completemultiple",t)),this.options.autoProcessQueue)return this.processQueue()}_errorProcessing(t,n,i){for(let a of t)a.status=Ls.ERROR,this.emit("error",a,n,i),this.emit("complete",a);if(this.options.uploadMultiple&&(this.emit("errormultiple",t,n,i),this.emit("completemultiple",t)),this.options.autoProcessQueue)return this.processQueue()}static uuidv4(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){let n=Math.random()*16|0;return(t==="x"?n:n&3|8).toString(16)})}constructor(t,n){super();let i,a;if(this.element=t,this.clickableElements=[],this.listeners=[],this.files=[],typeof this.element=="string"&&(this.element=document.querySelector(this.element)),!this.element||this.element.nodeType==null)throw new Error("Invalid dropzone element.");if(this.element.dropzone)throw new Error("Dropzone already attached.");Ls.instances.push(this),this.element.dropzone=this;let l=(a=Ls.optionsForElement(this.element))!=null?a:{};if(this.options=_5e(!0,{},Zqe,l,n!=null?n:{}),this.options.previewTemplate=this.options.previewTemplate.replace(/\n*/g,""),this.options.forceFallback||!Ls.isBrowserSupported())return this.options.fallback.call(this);if(this.options.url==null&&(this.options.url=this.element.getAttribute("action")),!this.options.url)throw new Error("No URL provided.");if(this.options.acceptedFiles&&this.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");if(this.options.uploadMultiple&&this.options.chunking)throw new Error("You cannot set both: uploadMultiple and chunking.");if(this.options.binaryBody&&this.options.uploadMultiple)throw new Error("You cannot set both: binaryBody and uploadMultiple.");this.options.acceptedMimeTypes&&(this.options.acceptedFiles=this.options.acceptedMimeTypes,delete this.options.acceptedMimeTypes),this.options.renameFilename!=null&&(this.options.renameFile=f=>this.options.renameFilename.call(this,f.name,f)),typeof this.options.method=="string"&&(this.options.method=this.options.method.toUpperCase()),(i=this.getExistingFallback())&&i.parentNode&&i.parentNode.removeChild(i),this.options.previewsContainer!==!1&&(this.options.previewsContainer?this.previewsContainer=Ls.getElement(this.options.previewsContainer,"previewsContainer"):this.previewsContainer=this.element),this.options.clickable&&(this.options.clickable===!0?this.clickableElements=[this.element]:this.clickableElements=Ls.getElements(this.options.clickable,"clickable")),this.init()}}Ls.initClass(),Ls.options={},Ls.optionsForElement=function(e){if(e.getAttribute("id"))return Ls.options[Gqe(e.getAttribute("id"))]},Ls.instances=[],Ls.forElement=function(e){if(typeof e=="string"&&(e=document.querySelector(e)),(e!=null?e.dropzone:void 0)==null)throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return e.dropzone},Ls.discover=function(){let e;if(document.querySelectorAll)e=document.querySelectorAll(".dropzone");else{e=[];let t=n=>(()=>{let i=[];for(let a of n)/(^| )dropzone($| )/.test(a.className)?i.push(e.push(a)):i.push(void 0);return i})();t(document.getElementsByTagName("div")),t(document.getElementsByTagName("form"))}return(()=>{let t=[];for(let n of e)Ls.optionsForElement(n)!==!1?t.push(new Ls(n)):t.push(void 0);return t})()},Ls.blockedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i],Ls.isBrowserSupported=function(){let e=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if(!("classList"in document.createElement("a")))e=!1;else{Ls.blacklistedBrowsers!==void 0&&(Ls.blockedBrowsers=Ls.blacklistedBrowsers);for(let t of Ls.blockedBrowsers)if(t.test(navigator.userAgent)){e=!1;continue}}else e=!1;return e},Ls.dataURItoBlob=function(e){let t=atob(e.split(",")[1]),n=e.split(",")[0].split(":")[1].split(";")[0],i=new ArrayBuffer(t.length),a=new Uint8Array(i);for(let l=0,f=t.length,d=0<=f;d?l<=f:l>=f;d?l++:l--)a[l]=t.charCodeAt(l);return new Blob([i],{type:n})};const qqe=(e,t)=>e.filter(n=>n!==t).map(n=>n),Gqe=e=>e.replace(/[\-_](\w)/g,t=>t.charAt(1).toUpperCase());Ls.createElement=function(e){let t=document.createElement("div");return t.innerHTML=e,t.childNodes[0]},Ls.elementInside=function(e,t){if(e===t)return!0;for(;e=e.parentNode;)if(e===t)return!0;return!1},Ls.getElement=function(e,t){let n;if(typeof e=="string"?n=document.querySelector(e):e.nodeType!=null&&(n=e),n==null)throw new Error("Invalid `".concat(t,"` option provided. Please provide a CSS selector or a plain HTML element."));return n},Ls.getElements=function(e,t){let n,i;if(e instanceof Array){i=[];try{for(n of e)i.push(this.getElement(n,t))}catch{i=null}}else if(typeof e=="string"){i=[];for(n of document.querySelectorAll(e))i.push(n)}else e.nodeType!=null&&(i=[e]);if(i==null||!i.length)throw new Error("Invalid `".concat(t,"` option provided. Please provide a CSS selector, a plain HTML element or a list of those."));return i},Ls.confirm=function(e,t,n){if(window.confirm(e))return t();if(n!=null)return n()},Ls.isValidFile=function(e,t){if(!t)return!0;t=t.split(",");let n=e.type,i=n.replace(/\/.*$/,"");for(let a of t)if(a=a.trim(),a.charAt(0)==="."){if(e.name.toLowerCase().indexOf(a.toLowerCase(),e.name.length-a.length)!==-1)return!0}else if(/\/\*$/.test(a)){if(i===a.replace(/\/.*$/,""))return!0}else if(n===a)return!0;return!1},typeof jQuery<"u"&&jQuery!==null&&(jQuery.fn.dropzone=function(e){return this.each(function(){return new Ls(this,e)})}),Ls.ADDED="added",Ls.QUEUED="queued",Ls.ACCEPTED=Ls.QUEUED,Ls.UPLOADING="uploading",Ls.PROCESSING=Ls.UPLOADING,Ls.CANCELED="canceled",Ls.ERROR="error",Ls.SUCCESS="success";let Kqe=function(e){e.naturalWidth;let t=e.naturalHeight,n=document.createElement("canvas");n.width=1,n.height=t;let i=n.getContext("2d");i.drawImage(e,0,0);let{data:a}=i.getImageData(1,0,1,t),l=0,f=t,d=t;for(;d>l;)a[(d-1)*4+3]===0?f=d:l=d,d=f+l>>1;let h=d/t;return h===0?1:h};var Yqe=function(e,t,n,i,a,l,f,d,h,b){let S=Kqe(t);return e.drawImage(t,n,i,a,l,f,d,h,b/S)};class k5e{static initClass(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}static encode64(t){let n="",i,a,l="",f,d,h,b="",S=0;for(;i=t[S++],a=t[S++],l=t[S++],f=i>>2,d=(i&3)<<4|a>>4,h=(a&15)<<2|l>>6,b=l&63,isNaN(a)?h=b=64:isNaN(l)&&(b=64),n=n+this.KEY_STR.charAt(f)+this.KEY_STR.charAt(d)+this.KEY_STR.charAt(h)+this.KEY_STR.charAt(b),i=a=l="",f=d=h=b="",S<t.length;);return n}static restore(t,n){if(!t.match("data:image/jpeg;base64,"))return n;let i=this.decode64(t.replace("data:image/jpeg;base64,","")),a=this.slice2Segments(i),l=this.exifManipulation(n,a);return"data:image/jpeg;base64,".concat(this.encode64(l))}static exifManipulation(t,n){let i=this.getExifArray(n),a=this.insertExif(t,i);return new Uint8Array(a)}static getExifArray(t){let n,i=0;for(;i<t.length;){if(n=t[i],n[0]===255&n[1]===225)return n;i++}return[]}static insertExif(t,n){let i=t.replace("data:image/jpeg;base64,",""),a=this.decode64(i),l=a.indexOf(255,3),f=a.slice(0,l),d=a.slice(l),h=f;return h=h.concat(n),h=h.concat(d),h}static slice2Segments(t){let n=0,i=[];for(;;){var a;if(t[n]===255&t[n+1]===218)break;if(t[n]===255&t[n+1]===216)n+=2;else{a=t[n+2]*256+t[n+3];let l=n+a+2,f=t.slice(n,l);i.push(f),n=l}if(n>t.length)break}return i}static decode64(t){let n,i,a="",l,f,d,h="",b=0,S=[];for(/[^A-Za-z0-9\+\/\=]/g.exec(t)&&console.warn("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\nExpect errors in decoding."),t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");l=this.KEY_STR.indexOf(t.charAt(b++)),f=this.KEY_STR.indexOf(t.charAt(b++)),d=this.KEY_STR.indexOf(t.charAt(b++)),h=this.KEY_STR.indexOf(t.charAt(b++)),n=l<<2|f>>4,i=(f&15)<<4|d>>2,a=(d&3)<<6|h,S.push(n),d!==64&&S.push(i),h!==64&&S.push(a),n=i=a="",l=f=d=h="",b<t.length;);return S}}k5e.initClass();function Xqe(e,t){return typeof e<"u"&&e!==null?t(e):void 0}function Jqe(e,t,n){if(typeof e<"u"&&e!==null&&typeof e[t]=="function")return n(e,t)}const Qqe={getSignedURL(e,t){let n={filePath:e.name,contentType:e.type};return new Promise((i,a)=>{var l=new FormData;let f=new XMLHttpRequest,d=typeof t.signingURL=="function"?t.signingURL(e):t.signingURL;f.open("POST",d),f.onload=function(){f.status==200?i(JSON.parse(f.response)):a(f.statusText)},f.onerror=function(h){console.error("Network Error : Could not send request to AWS (Maybe CORS errors)"),a(h)},t.withCredentials===!0&&(f.withCredentials=!0),Object.entries(t.headers||{}).forEach(([h,b])=>{f.setRequestHeader(h,b)}),n=Object.assign(n,t.params||{}),Object.entries(n).forEach(([h,b])=>{l.append(h,b)}),f.send(l)})},sendFile(e,t,n){var i=n?this.setResponseHandler:this.sendS3Handler;return this.getSignedURL(e,t).then(a=>i(a,e)).catch(a=>a)},setResponseHandler(e,t){t.s3Signature=e.signature,t.s3Url=e.postEndpoint},sendS3Handler(e,t){let n=new FormData,i=e.signature;return Object.keys(i).forEach(function(a){n.append(a,i[a])}),n.append("file",t),new Promise((a,l)=>{let f=new XMLHttpRequest;f.open("POST",e.postEndpoint),f.onload=function(){if(f.status==201){var d=new window.DOMParser().parseFromString(f.response,"text/xml"),h=d.firstChild.children[0].innerHTML;a({success:!0,message:h})}else{var d=new window.DOMParser().parseFromString(f.response,"text/xml"),b=d.firstChild.children[0].innerHTML;l({success:!1,message:b+". Request is marked as resolved when returns as status 201"})}},f.onerror=function(){var d=new window.DOMParser().parseFromString(f.response,"text/xml"),h=d.firstChild.children[1].innerHTML;l({success:!1,message:h})},f.send(n)})}},eGe={props:{id:{type:String,required:!0,default:"dropzone"},options:{type:Object,required:!0},includeStyling:{type:Boolean,default:!0,required:!1},awss3:{type:Object,required:!1,default:null},destroyDropzone:{type:Boolean,default:!0,required:!1},duplicateCheck:{type:Boolean,default:!1,required:!1},useCustomSlot:{type:Boolean,default:!1,required:!1}},emits:["vdropzone-thumbnail","vdropzone-duplicate-file","vdropzone-file-added","vdropzone-files-added","vdropzone-removed-file","vdropzone-success","vdropzone-error","vdropzone-s3-upload-success","vdropzone-s3-upload-error","vdropzone-success-multiple","vdropzone-error-multiple","vdropzone-sending","vdropzone-sending-multiple","vdropzone-complete","vdropzone-complete-multiple","vdropzone-canceled","vdropzone-canceled-multiple","vdropzone-max-files-reached","vdropzone-max-files-exceeded","vdropzone-processing","vdropzone-processing-multiple","vdropzone-upload-progress","vdropzone-total-upload-progress","vdropzone-reset","vdropzone-queue-complete","vdropzone-drop","vdropzone-drag-start","vdropzone-drag-end","vdropzone-drag-enter","vdropzone-drag-over","vdropzone-drag-leave","vdropzone-mounted","vdropzone-file-added-manually"],data(){return{aws:null,isS3:!1,isS3OverridesServerPropagation:!1,wasQueueAutoProcess:!0,files:[],dropzoneSettings:{thumbnailWidth:200,thumbnailHeight:200}}},watch:{options:{handler(){this.updateSettings()},deep:!0},awss3:{handler(){this.updateAWSSettings()},deep:!0}},beforeMount(){this.updateSettings(),this.updateAWSSettings()},mounted(){this.$isServer&&this.hasBeenMounted||(this.hasBeenMounted=!0,this.dropzone=new Ls(this.$refs.dropzoneElement,this.dropzoneSettings),this.dropzone.on("thumbnail",(e,t)=>{this.$emit("vdropzone-thumbnail",e,t)}),this.dropzone.on("addedfile",e=>{this.duplicateCheck&&this.dropzone.getQueuedFiles().length&&this.getQueuedFiles().forEach(t=>{t.name===e.name&&t.size===e.size&&t.lastModifiedDate.toString()===e.lastModifiedDate.toString()&&t.dataUrl===e.dataUrl&&(this.removeFile(e),this.$emit("vdropzone-duplicate-file",e))}),this.$emit("vdropzone-file-added",e),this.isS3&&this.wasQueueAutoProcess&&!e.manuallyAdded&&this.getSignedAndUploadToS3(e)}),this.dropzone.on("addedfiles",e=>{this.$emit("vdropzone-files-added",e)}),this.dropzone.on("removedfile",e=>{this.$emit("vdropzone-removed-file",e),e.manuallyAdded&&this.dropzone.options.maxFiles!==null&&this.dropzone.options.maxFiles++}),this.dropzone.on("success",(e,t)=>{if(this.$emit("vdropzone-success",e,t),this.isS3){if(this.isS3OverridesServerPropagation){let i=new window.DOMParser().parseFromString(t,"text/xml").firstChild.children[0].innerHTML;this.$emit("vdropzone-s3-upload-success",i)}this.wasQueueAutoProcess&&this.setOption("autoProcessQueue",!1)}}),this.dropzone.on("successmultiple",(e,t)=>{this.$emit("vdropzone-success-multiple",e,t)}),this.dropzone.on("error",(e,t,n)=>{this.$emit("vdropzone-error",e,t,n),this.isS3&&this.$emit("vdropzone-s3-upload-error")}),this.dropzone.on("errormultiple",(e,t,n)=>{this.$emit("vdropzone-error-multiple",e,t,n)}),this.dropzone.on("sending",(e,t,n)=>{if(this.isS3)if(this.isS3OverridesServerPropagation){let i=e.s3Signature;Object.keys(i).forEach(function(a){n.append(a,i[a])})}else n.append("s3ObjectLocation",e.s3ObjectLocation);this.$emit("vdropzone-sending",e,t,n)}),this.dropzone.on("sendingmultiple",(e,t,n)=>{this.$emit("vdropzone-sending-multiple",e,t,n)}),this.dropzone.on("complete",e=>{this.$emit("vdropzone-complete",e)}),this.dropzone.on("completemultiple",e=>{this.$emit("vdropzone-complete-multiple",e)}),this.dropzone.on("canceled",e=>{this.$emit("vdropzone-canceled",e)}),this.dropzone.on("canceledmultiple",e=>{this.$emit("vdropzone-canceled-multiple",e)}),this.dropzone.on("maxfilesreached",e=>{this.$emit("vdropzone-max-files-reached",e)}),this.dropzone.on("maxfilesexceeded",e=>{this.$emit("vdropzone-max-files-exceeded",e)}),this.dropzone.on("processing",e=>{this.$emit("vdropzone-processing",e)}),this.dropzone.on("processingmultiple",e=>{this.$emit("vdropzone-processing-multiple",e)}),this.dropzone.on("uploadprogress",(e,t,n)=>{this.$emit("vdropzone-upload-progress",e,t,n)}),this.dropzone.on("totaluploadprogress",(e,t,n)=>{this.$emit("vdropzone-total-upload-progress",e,t,n)}),this.dropzone.on("reset",()=>{this.$emit("vdropzone-reset")}),this.dropzone.on("queuecomplete",()=>{this.$emit("vdropzone-queue-complete")}),this.dropzone.on("drop",e=>{this.$emit("vdropzone-drop",e)}),this.dropzone.on("dragstart",e=>{this.$emit("vdropzone-drag-start",e)}),this.dropzone.on("dragend",e=>{this.$emit("vdropzone-drag-end",e)}),this.dropzone.on("dragenter",e=>{this.$emit("vdropzone-drag-enter",e)}),this.dropzone.on("dragover",e=>{this.$emit("vdropzone-drag-over",e)}),this.dropzone.on("dragleave",e=>{this.$emit("vdropzone-drag-leave",e)}),this.$emit("vdropzone-mounted"))},beforeUnmount(){this.destroyDropzone&&this.dropzone.destroy()},methods:{updateAWSSettings(){this.awss3!==null&&(this.aws={...this.awss3},this.dropzoneSettings.autoProcessQueue=!1,this.isS3=!0,this.isS3OverridesServerPropagation=this.aws.sendFileToServer===!1,this.options.autoProcessQueue!==void 0&&(this.wasQueueAutoProcess=this.options.autoProcessQueue),this.isS3OverridesServerPropagation&&(this.dropzoneSettings.url=e=>e[0].s3Url))},updateSettings(){this.dropzoneSettings=Object.assign(this.dropzoneSettings,this.options)},manuallyAddFile:function(e,t){e.manuallyAdded=!0,this.dropzone.emit("addedfile",e);let n=!1;if((t.indexOf(".svg")>-1||t.indexOf(".png")>-1||t.indexOf(".jpg")>-1||t.indexOf(".jpeg")>-1||t.indexOf(".gif")>-1||t.indexOf(".webp")>-1)&&(n=!0),this.dropzone.options.createImageThumbnails&&n&&e.size<=this.dropzone.options.maxThumbnailFilesize*1024*1024){t&&this.dropzone.emit("thumbnail",e,t);let i=e.previewElement.querySelectorAll("[data-dz-thumbnail]");for(let a=0;a<i.length;a++)i[a].style.width=this.dropzoneSettings.thumbnailWidth+"px",i[a].style.height=this.dropzoneSettings.thumbnailHeight+"px",i[a].style["object-fit"]="contain"}this.dropzone.emit("complete",e),this.dropzone.options.maxFiles&&this.dropzone.options.maxFiles--,this.dropzone.files.push(e),this.$emit("vdropzone-file-added-manually",e)},setOption:function(e,t){this.dropzone.options[e]=t},removeAllFiles:function(e){this.dropzone.removeAllFiles(e)},processQueue:function(){let e=this.dropzone;this.isS3&&!this.wasQueueAutoProcess?this.getQueuedFiles().forEach(t=>{this.getSignedAndUploadToS3(t)}):this.dropzone.processQueue(),this.dropzone.on("success",function(){e.options.autoProcessQueue=!0}),this.dropzone.on("queuecomplete",function(){e.options.autoProcessQueue=!1})},init:function(){return this.dropzone.init()},destroy:function(){return this.dropzone.destroy()},updateTotalUploadProgress:function(){return this.dropzone.updateTotalUploadProgress()},getFallbackForm:function(){return this.dropzone.getFallbackForm()},getExistingFallback:function(){return this.dropzone.getExistingFallback()},setupEventListeners:function(){return this.dropzone.setupEventListeners()},removeEventListeners:function(){return this.dropzone.removeEventListeners()},disable:function(){return this.dropzone.disable()},enable:function(){return this.dropzone.enable()},filesize:function(e){return this.dropzone.filesize(e)},accept:function(e,t){return this.dropzone.accept(e,t)},addFile:function(e){return this.dropzone.addFile(e)},removeFile:function(e){this.dropzone.removeFile(e)},getAcceptedFiles:function(){return this.dropzone.getAcceptedFiles()},getRejectedFiles:function(){return this.dropzone.getRejectedFiles()},getFilesWithStatus:function(){return this.dropzone.getFilesWithStatus()},getQueuedFiles:function(){return this.dropzone.getQueuedFiles()},getUploadingFiles:function(){return this.dropzone.getUploadingFiles()},getAddedFiles:function(){return this.dropzone.getAddedFiles()},getActiveFiles:function(){return this.dropzone.getActiveFiles()},getSignedAndUploadToS3(e){let t=Qqe.sendFile(e,this.aws,this.isS3OverridesServerPropagation);this.isS3OverridesServerPropagation?t.then(()=>{setTimeout(()=>this.dropzone.processFile(e))}):t.then(n=>{n.success?(e.s3ObjectLocation=n.message,setTimeout(()=>this.dropzone.processFile(e)),this.$emit("vdropzone-s3-upload-success",n.message)):typeof n.message<"u"?this.$emit("vdropzone-s3-upload-error",n.message):this.$emit("vdropzone-s3-upload-error","Network Error : Could not send request to AWS. (Maybe CORS error)")}),t.catch(n=>{alert(n)})},setAWSSigningURL(e){this.isS3&&this.aws&&(this.aws.signingURL=e)}}},tGe=["id"],nGe={key:0,class:"dz-message"};function sGe(e,t,n,i,a,l){return L(),Q("div",{id:n.id,ref:"dropzoneElement",class:Rn({"vue-dropzone dropzone":n.includeStyling})},[n.useCustomSlot?(L(),Q("div",nGe,[is(e.$slots,"default",{},()=>[t[0]||(t[0]=D("Drop files here to upload"))])])):we("",!0)],10,tGe)}const Mte=wt(eGe,[["render",sGe]]),oGe={name:"FieldUpload",components:{VueDropzone:Mte,PkpButton:ms,Tooltip:Tc,MultilingualProgress:a0,FieldError:Gd,HelpButton:Id,FormFieldLabel:i0},extends:Lm,props:{options:Object,restoreLabel:String,uploadFileLabel:String},data(){return{initialValue:null,uploadFile:null,isComponentMounted:!1}},computed:{isInitialValue(){return!!this.currentValue&&!!this.initialValue&&!!this.currentValue.dateUploaded&&!!this.initialValue.dateUploaded&&this.currentValue.dateUploaded===this.initialValue.dateUploaded},fileName(){return this.uploadFile?this.uploadFile.upload.filename:this.currentValue.uploadName},controlId(){return this.compileId("control")},dropzoneClickableId(){return this.compileId("clickable")},dropzoneId(){return this.compileId("dropzone")},dropzoneHiddenFileId(){return this.compileId("hiddenFileId")},dropzoneOptions(){return{method:"POST",thumbnailWidth:240,maxFiles:1,hiddenInputContainer:"#"+this.controlId,clickable:["#"+this.controlId+" .dropzone","#"+this.dropzoneClickableId],addRemoveLinks:!0,previewTemplate:'<div class="dz-preview">\n <img class="dz-image" data-dz-thumbnail />\n <div class="dz-details">\n <div class="dz-filename"><span data-dz-name></span></div>\n <div class="dz-progress"><span class="dz-upload" data-dz-uploadprogress></span></div>\n </div>\n </div>',headers:{"X-Csrf-Token":pkp.currentUser.csrfToken},...this.options}}},mounted(){this.isComponentMounted=!0,setTimeout(()=>{this.$refs.dropzone.dropzone.hiddenFileInput.id=this.dropzoneHiddenFileId,this.$refs.dropzone.dropzone.hiddenFileInput.setAttribute("aria-describedby",this.describedByIds),this.initialValue=this.currentValue?this.currentValue:null})},methods:{clear(){this.$emit("change",this.name,"value",null,this.localeKey),this.uploadFile=null,this.$refs.dropzone.dropzone.removeAllFiles(),this.setFocusToControl(),this.setErrors([])},revert(){this.$emit("change",this.name,"value",this.initialValue,this.localeKey),this.uploadFile=null,this.setFocusToControl(),this.setErrors([])},success:function(e,t){this.$emit("change",this.name,"value",{temporaryFileId:t.id},this.localeKey),this.setFocusToControl()},onAddFile:function(e){this.uploadFile={...e},this.setErrors([])},onRemoveFile(){this.uploadFile=null,this.setErrors([])},onError:function(e,t){let n=this.errors.slice();typeof t=="string"?n.push(t):typeof t=="object"&&n.push(t.errorMessage),this.setErrors(n)},setErrors:function(e){this.$emit("set-errors",this.name,e,this.localeKey)},setFocusToControl(){this.$nextTick(()=>{let e=this.$refs.control.querySelectorAll("input,button");e.length?e[0].focus():this.$el.focus()})}}},rGe={class:"pkpFormField pkpFormField--upload"},iGe={class:"pkpFormField__heading"},aGe=["id"],lGe=["id"],cGe=["id"],uGe={key:0,class:"pkpFormField--upload__preview"},dGe={class:"pkpFormField--upload__fileName"},fGe={class:"pkpFormField--upload__previewActions"},pGe={class:"pkpFormField--upload__uploadActions"};function mGe(e,t,n,i,a,l){const f=Xe("FormFieldLabel"),d=Xe("Tooltip"),h=Xe("HelpButton"),b=Xe("PkpButton"),S=Xe("MultilingualProgress"),k=Xe("FieldError"),T=Xe("VueDropzone"),O=Hr("strip-unsafe-html");return L(),Q("div",rGe,[H("div",iGe,[pe(f,{"control-id":l.dropzoneHiddenFileId,label:e.label,"locale-label":e.localeLabel,"is-required":e.isRequired,"required-label":e.t("common.required"),"multilingual-label":e.multilingualLabel,class:"align-middle"},null,8,["control-id","label","locale-label","is-required","required-label","multilingual-label"]),t[0]||(t[0]=D()),e.tooltip?(L(),Ee(d,{key:0,"aria-hidden":"true",tooltip:e.tooltip,label:""},null,8,["tooltip"])):we("",!0),t[1]||(t[1]=D()),e.tooltip?Gn((L(),Q("span",{key:1,id:e.describedByTooltipId,class:"-screenReader"},null,8,aGe)),[[O,e.tooltip]]):we("",!0),t[2]||(t[2]=D()),e.helpTopic?(L(),Ee(h,{key:2,id:e.describedByHelpId,topic:e.helpTopic,section:e.helpSection,label:e.t("help.help")},null,8,["id","topic","section","label"])):we("",!0)]),t[12]||(t[12]=D()),e.isPrimaryLocale&&e.description?Gn((L(),Q("div",{key:0,id:e.describedByDescriptionId,class:"pkpFormField__description semantic-defaults"},null,8,lGe)),[[O,e.description]]):we("",!0),t[13]||(t[13]=D()),H("div",{id:l.controlId,ref:"control",class:"pkpFormField__control pkpFormField--upload__control","aria-live":"polite"},[e.currentValue?(L(),Q("div",uGe,[H("span",dGe,ee(l.fileName),1),t[5]||(t[5]=D()),H("div",fGe,[pe(b,{"is-warnable":!0,onClick:l.clear},{default:te(()=>[D(ee(e.t("common.remove")),1)]),_:1},8,["onClick"]),t[3]||(t[3]=D()),a.initialValue&&!l.isInitialValue?(L(),Ee(b,{key:0,onClick:l.revert},{default:te(()=>[D(ee(n.restoreLabel),1)]),_:1},8,["onClick"])):we("",!0),t[4]||(t[4]=D()),e.isMultilingual&&e.locales.length>1?(L(),Ee(S,{key:1,id:e.multilingualProgressId,count:e.multilingualFieldsCompleted,total:e.locales.length},null,8,["id","count","total"])):we("",!0)])])):we("",!0),t[10]||(t[10]=D()),e.currentValue&&e.errors&&e.errors.length?(L(),Ee(k,{key:1,id:e.describedByErrorId,messages:e.errors},null,8,["id","messages"])):we("",!0),t[11]||(t[11]=D()),H("div",{class:Rn({"-screenReader":e.currentValue})},[a.isComponentMounted?(L(),Ee(T,{key:0,id:l.dropzoneId,ref:"dropzone",options:l.dropzoneOptions,onVdropzoneFileAdded:l.onAddFile,onVdropzoneSuccess:l.success,onVdropzoneError:l.onError,onVdropzoneRemovedFile:l.onRemoveFile},null,8,["id","options","onVdropzoneFileAdded","onVdropzoneSuccess","onVdropzoneError","onVdropzoneRemovedFile"])):we("",!0),t[8]||(t[8]=D()),!e.currentValue&&e.errors&&e.errors.length?(L(),Ee(k,{key:1,id:e.describedByErrorId,messages:e.errors},null,8,["id","messages"])):we("",!0),t[9]||(t[9]=D()),H("div",pGe,[pe(b,{id:l.dropzoneClickableId,class:"pkpFormField--upload__addFile",disabled:!!a.uploadFile},{default:te(()=>[D(ee(n.uploadFileLabel),1)]),_:1},8,["id","disabled"]),t[6]||(t[6]=D()),!e.currentValue&&a.initialValue&&!l.isInitialValue?(L(),Ee(b,{key:0,class:"pkpFormField--upload__restore",onClick:l.revert},{default:te(()=>[D(ee(n.restoreLabel),1)]),_:1},8,["onClick"])):we("",!0),t[7]||(t[7]=D()),e.isMultilingual&&e.locales.length>1?(L(),Ee(S,{key:1,id:e.multilingualProgressId,count:e.multilingualFieldsCompleted,total:e.locales.length},null,8,["id","count","total"])):we("",!0)])],2)],8,cGe)])}const Nte=wt(oGe,[["render",mGe]]);var R5={_loadedStyleNames:new Set,getLoadedStyleNames:function(){return this._loadedStyleNames},isStyleNameLoaded:function(t){return this._loadedStyleNames.has(t)},setLoadedStyleName:function(t){this._loadedStyleNames.add(t)},deleteLoadedStyleName:function(t){this._loadedStyleNames.delete(t)},clearLoadedStyleNames:function(){this._loadedStyleNames.clear()}};function hGe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"pc",t=Oh();return"".concat(e).concat(t.replace("v-","").replaceAll("-","_"))}var x5e=lc.extend({name:"common"});function PO(e){"@babel/helpers - typeof";return PO=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},PO(e)}function gGe(e){return O5e(e)||vGe(e)||I5e(e)||T5e()}function vGe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function MO(e,t){return O5e(e)||bGe(e,t)||I5e(e,t)||T5e()}function T5e(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function I5e(e,t){if(e){if(typeof e=="string")return A5e(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A5e(e,t):void 0}}function A5e(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function bGe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i,a,l,f,d=[],h=!0,b=!1;try{if(l=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;h=!1}else for(;!(h=(i=l.call(n)).done)&&(d.push(i.value),d.length!==t);h=!0);}catch(S){b=!0,a=S}finally{try{if(!h&&n.return!=null&&(f=n.return(),Object(f)!==f))return}finally{if(b)throw a}}return d}}function O5e(e){if(Array.isArray(e))return e}function R5e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function ki(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?R5e(Object(n),!0).forEach(function(i){NO(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R5e(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function NO(e,t,n){return(t=yGe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yGe(e){var t=_Ge(e,"string");return PO(t)=="symbol"?t:t+""}function _Ge(e,t){if(PO(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(PO(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var FO={name:"BaseComponent",props:{pt:{type:Object,default:void 0},ptOptions:{type:Object,default:void 0},unstyled:{type:Boolean,default:void 0},dt:{type:Object,default:void 0}},inject:{$parentInstance:{default:void 0}},watch:{isUnstyled:{immediate:!0,handler:function(t){qd.off("theme:change",this._loadCoreStyles),t||(this._loadCoreStyles(),this._themeChangeListener(this._loadCoreStyles))}},dt:{immediate:!0,handler:function(t,n){var i=this;qd.off("theme:change",this._themeScopedListener),t?(this._loadScopedThemeStyles(t),this._themeScopedListener=function(){return i._loadScopedThemeStyles(t)},this._themeChangeListener(this._themeScopedListener)):this._unloadScopedThemeStyles()}}},scopedStyleEl:void 0,rootEl:void 0,uid:void 0,$attrSelector:void 0,beforeCreate:function(){var t,n,i,a,l,f,d,h,b,S,k,T=(t=this.pt)===null||t===void 0?void 0:t._usept,O=T?(n=this.pt)===null||n===void 0||(n=n.originalValue)===null||n===void 0?void 0:n[this.$.type.name]:void 0,P=T?(i=this.pt)===null||i===void 0||(i=i.value)===null||i===void 0?void 0:i[this.$.type.name]:this.pt;(a=P||O)===null||a===void 0||(a=a.hooks)===null||a===void 0||(l=a.onBeforeCreate)===null||l===void 0||l.call(a);var B=(f=this.$primevueConfig)===null||f===void 0||(f=f.pt)===null||f===void 0?void 0:f._usept,W=B?(d=this.$primevue)===null||d===void 0||(d=d.config)===null||d===void 0||(d=d.pt)===null||d===void 0?void 0:d.originalValue:void 0,Z=B?(h=this.$primevue)===null||h===void 0||(h=h.config)===null||h===void 0||(h=h.pt)===null||h===void 0?void 0:h.value:(b=this.$primevue)===null||b===void 0||(b=b.config)===null||b===void 0?void 0:b.pt;(S=Z||W)===null||S===void 0||(S=S[this.$.type.name])===null||S===void 0||(S=S.hooks)===null||S===void 0||(k=S.onBeforeCreate)===null||k===void 0||k.call(S),this.$attrSelector=hGe(),this.uid=this.$attrs.id||this.$attrSelector.replace("pc","pv_id_")},created:function(){this._hook("onCreated")},beforeMount:function(){var t;this.rootEl=t0(QA(this.$el)?this.$el:(t=this.$el)===null||t===void 0?void 0:t.parentElement,"[".concat(this.$attrSelector,"]")),this.rootEl&&(this.rootEl.$pc=ki({name:this.$.type.name,attrSelector:this.$attrSelector},this.$params)),this._loadStyles(),this._hook("onBeforeMount")},mounted:function(){this._hook("onMounted")},beforeUpdate:function(){this._hook("onBeforeUpdate")},updated:function(){this._hook("onUpdated")},beforeUnmount:function(){this._hook("onBeforeUnmount")},unmounted:function(){this._removeThemeListeners(),this._unloadScopedThemeStyles(),this._hook("onUnmounted")},methods:{_hook:function(t){if(!this.$options.hostName){var n=this._usePT(this._getPT(this.pt,this.$.type.name),this._getOptionValue,"hooks.".concat(t)),i=this._useDefaultPT(this._getOptionValue,"hooks.".concat(t));n==null||n(),i==null||i()}},_mergeProps:function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];return uee(t)?t.apply(void 0,i):Cn.apply(void 0,i)},_load:function(){R5.isStyleNameLoaded("base")||(lc.loadCSS(this.$styleOptions),this._loadGlobalStyles(),R5.setLoadedStyleName("base")),this._loadThemeStyles()},_loadStyles:function(){this._load(),this._themeChangeListener(this._load)},_loadCoreStyles:function(){var t,n;!R5.isStyleNameLoaded((t=this.$style)===null||t===void 0?void 0:t.name)&&(n=this.$style)!==null&&n!==void 0&&n.name&&(x5e.loadCSS(this.$styleOptions),this.$options.style&&this.$style.loadCSS(this.$styleOptions),R5.setLoadedStyleName(this.$style.name))},_loadGlobalStyles:function(){var t=this._useGlobalPT(this._getOptionValue,"global.css",this.$params);zr(t)&&lc.load(t,ki({name:"global"},this.$styleOptions))},_loadThemeStyles:function(){var t,n;if(!(this.isUnstyled||this.$theme==="none")){if(!Ka.isStyleNameLoaded("common")){var i,a,l=((i=this.$style)===null||i===void 0||(a=i.getCommonTheme)===null||a===void 0?void 0:a.call(i))||{},f=l.primitive,d=l.semantic,h=l.global,b=l.style;lc.load(f==null?void 0:f.css,ki({name:"primitive-variables"},this.$styleOptions)),lc.load(d==null?void 0:d.css,ki({name:"semantic-variables"},this.$styleOptions)),lc.load(h==null?void 0:h.css,ki({name:"global-variables"},this.$styleOptions)),lc.loadStyle(ki({name:"global-style"},this.$styleOptions),b),Ka.setLoadedStyleName("common")}if(!Ka.isStyleNameLoaded((t=this.$style)===null||t===void 0?void 0:t.name)&&(n=this.$style)!==null&&n!==void 0&&n.name){var S,k,T,O,P=((S=this.$style)===null||S===void 0||(k=S.getComponentTheme)===null||k===void 0?void 0:k.call(S))||{},B=P.css,W=P.style;(T=this.$style)===null||T===void 0||T.load(B,ki({name:"".concat(this.$style.name,"-variables")},this.$styleOptions)),(O=this.$style)===null||O===void 0||O.loadStyle(ki({name:"".concat(this.$style.name,"-style")},this.$styleOptions),W),Ka.setLoadedStyleName(this.$style.name)}if(!Ka.isStyleNameLoaded("layer-order")){var Z,Y,z=(Z=this.$style)===null||Z===void 0||(Y=Z.getLayerOrderThemeCSS)===null||Y===void 0?void 0:Y.call(Z);lc.load(z,ki({name:"layer-order",first:!0},this.$styleOptions)),Ka.setLoadedStyleName("layer-order")}}},_loadScopedThemeStyles:function(t){var n,i,a,l=((n=this.$style)===null||n===void 0||(i=n.getPresetTheme)===null||i===void 0?void 0:i.call(n,t,"[".concat(this.$attrSelector,"]")))||{},f=l.css,d=(a=this.$style)===null||a===void 0?void 0:a.load(f,ki({name:"".concat(this.$attrSelector,"-").concat(this.$style.name)},this.$styleOptions));this.scopedStyleEl=d.el},_unloadScopedThemeStyles:function(){var t;(t=this.scopedStyleEl)===null||t===void 0||(t=t.value)===null||t===void 0||t.remove()},_themeChangeListener:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){};R5.clearLoadedStyleNames(),qd.on("theme:change",t)},_removeThemeListeners:function(){qd.off("theme:change",this._loadCoreStyles),qd.off("theme:change",this._load),qd.off("theme:change",this._themeScopedListener)},_getHostInstance:function(t){return t?this.$options.hostName?t.$.type.name===this.$options.hostName?t:this._getHostInstance(t.$parentInstance):t.$parentInstance:void 0},_getPropValue:function(t){var n;return this[t]||((n=this._getHostInstance(this))===null||n===void 0?void 0:n[t])},_getOptionValue:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return dee(t,n,i)},_getPTValue:function(){var t,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,f=/./g.test(i)&&!!a[i.split(".")[0]],d=this._getPropValue("ptOptions")||((t=this.$primevueConfig)===null||t===void 0?void 0:t.ptOptions)||{},h=d.mergeSections,b=h===void 0?!0:h,S=d.mergeProps,k=S===void 0?!1:S,T=l?f?this._useGlobalPT(this._getPTClassValue,i,a):this._useDefaultPT(this._getPTClassValue,i,a):void 0,O=f?void 0:this._getPTSelf(n,this._getPTClassValue,i,ki(ki({},a),{},{global:T||{}})),P=this._getPTDatasets(i);return b||!b&&O?k?this._mergeProps(k,T,O,P):ki(ki(ki({},T),O),P):ki(ki({},O),P)},_getPTSelf:function(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];return Cn(this._usePT.apply(this,[this._getPT(t,this.$name)].concat(i)),this._usePT.apply(this,[this.$_attrsPT].concat(i)))},_getPTDatasets:function(){var t,n,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",a="data-pc-",l=i==="root"&&zr((t=this.pt)===null||t===void 0?void 0:t["data-pc-section"]);return i!=="transition"&&ki(ki({},i==="root"&&ki(ki(NO({},"".concat(a,"name"),Lv(l?(n=this.pt)===null||n===void 0?void 0:n["data-pc-section"]:this.$.type.name)),l&&NO({},"".concat(a,"extend"),Lv(this.$.type.name))),{},NO({},"".concat(this.$attrSelector),""))),{},NO({},"".concat(a,"section"),Lv(i)))},_getPTClassValue:function(){var t=this._getOptionValue.apply(this,arguments);return Rm(t)||kV(t)?{class:t}:t},_getPT:function(t){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",a=arguments.length>2?arguments[2]:void 0,l=function(d){var h,b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,S=a?a(d):d,k=Lv(i),T=Lv(n.$name);return(h=b?k!==T?S==null?void 0:S[k]:void 0:S==null?void 0:S[k])!==null&&h!==void 0?h:S};return t!=null&&t.hasOwnProperty("_usept")?{_usept:t._usept,originalValue:l(t.originalValue),value:l(t.value)}:l(t,!0)},_usePT:function(t,n,i,a){var l=function(B){return n(B,i,a)};if(t!=null&&t.hasOwnProperty("_usept")){var f,d=t._usept||((f=this.$primevueConfig)===null||f===void 0?void 0:f.ptOptions)||{},h=d.mergeSections,b=h===void 0?!0:h,S=d.mergeProps,k=S===void 0?!1:S,T=l(t.originalValue),O=l(t.value);return T===void 0&&O===void 0?void 0:Rm(O)?O:Rm(T)?T:b||!b&&O?k?this._mergeProps(k,T,O):ki(ki({},T),O):O}return l(t)},_useGlobalPT:function(t,n,i){return this._usePT(this.globalPT,t,n,i)},_useDefaultPT:function(t,n,i){return this._usePT(this.defaultPT,t,n,i)},ptm:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this._getPTValue(this.pt,t,ki(ki({},this.$params),n))},ptmi:function(){var t,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=Cn(this.$_attrsWithoutPT,this.ptm(n,i));return a!=null&&a.hasOwnProperty("id")&&((t=a.id)!==null&&t!==void 0||(a.id=this.$id)),a},ptmo:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this._getPTValue(t,n,ki({instance:this},i),!1)},cx:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.isUnstyled?void 0:this._getOptionValue(this.$style.classes,t,ki(ki({},this.$params),n))},sx:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(n){var a=this._getOptionValue(this.$style.inlineStyles,t,ki(ki({},this.$params),i)),l=this._getOptionValue(x5e.inlineStyles,t,ki(ki({},this.$params),i));return[l,a]}}},computed:{globalPT:function(){var t,n=this;return this._getPT((t=this.$primevueConfig)===null||t===void 0?void 0:t.pt,void 0,function(i){return Bp(i,{instance:n})})},defaultPT:function(){var t,n=this;return this._getPT((t=this.$primevueConfig)===null||t===void 0?void 0:t.pt,void 0,function(i){return n._getOptionValue(i,n.$name,ki({},n.$params))||Bp(i,ki({},n.$params))})},isUnstyled:function(){var t;return this.unstyled!==void 0?this.unstyled:(t=this.$primevueConfig)===null||t===void 0?void 0:t.unstyled},$id:function(){return this.$attrs.id||this.uid},$inProps:function(){var t,n=Object.keys(((t=this.$.vnode)===null||t===void 0?void 0:t.props)||{});return Object.fromEntries(Object.entries(this.$props).filter(function(i){var a=MO(i,1),l=a[0];return n==null?void 0:n.includes(l)}))},$theme:function(){var t;return(t=this.$primevueConfig)===null||t===void 0?void 0:t.theme},$style:function(){return ki(ki({classes:void 0,inlineStyles:void 0,load:function(){},loadCSS:function(){},loadStyle:function(){}},(this._getHostInstance(this)||{}).$style),this.$options.style)},$styleOptions:function(){var t;return{nonce:(t=this.$primevueConfig)===null||t===void 0||(t=t.csp)===null||t===void 0?void 0:t.nonce}},$primevueConfig:function(){var t;return(t=this.$primevue)===null||t===void 0?void 0:t.config},$name:function(){return this.$options.hostName||this.$.type.name},$params:function(){var t=this._getHostInstance(this)||this.$parent;return{instance:this,props:this.$props,state:this.$data,attrs:this.$attrs,parent:{instance:t,props:t==null?void 0:t.$props,state:t==null?void 0:t.$data,attrs:t==null?void 0:t.$attrs}}},$_attrsPT:function(){return Object.entries(this.$attrs||{}).filter(function(t){var n=MO(t,1),i=n[0];return i==null?void 0:i.startsWith("pt:")}).reduce(function(t,n){var i=MO(n,2),a=i[0],l=i[1],f=a.split(":"),d=gGe(f),h=d.slice(1);return h==null||h.reduce(function(b,S,k,T){return!b[S]&&(b[S]=k===T.length-1?l:{}),b[S]},t),t},{})},$_attrsWithoutPT:function(){return Object.entries(this.$attrs||{}).filter(function(t){var n=MO(t,1),i=n[0];return!(i!=null&&i.startsWith("pt:"))}).reduce(function(t,n){var i=MO(n,2),a=i[0],l=i[1];return t[a]=l,t},{})}}},SGe={name:"BaseEditableHolder",extends:FO,emits:["update:modelValue","value-change"],props:{modelValue:{type:null,default:void 0},defaultValue:{type:null,default:void 0},name:{type:String,default:void 0},invalid:{type:Boolean,default:void 0},disabled:{type:Boolean,default:!1},formControl:{type:Object,default:void 0}},inject:{$parentInstance:{default:void 0},$pcForm:{default:void 0},$pcFormField:{default:void 0}},data:function(){return{d_value:this.defaultValue||this.modelValue}},watch:{modelValue:function(t){this.d_value=t},defaultValue:function(t){this.d_value=t},$formName:{immediate:!0,handler:function(t){var n,i;this.formField=((n=this.$pcForm)===null||n===void 0||(i=n.register)===null||i===void 0?void 0:i.call(n,t,this.$formControl))||{}}},$formControl:{immediate:!0,handler:function(t){var n,i;this.formField=((n=this.$pcForm)===null||n===void 0||(i=n.register)===null||i===void 0?void 0:i.call(n,this.$formName,t))||{}}},$formDefaultValue:{immediate:!0,handler:function(t){this.d_value!==t&&(this.d_value=t)}},$formValue:{immediate:!1,handler:function(t){var n;(n=this.$pcForm)!==null&&n!==void 0&&n.getFieldState(this.$formName)&&t!==this.d_value&&(this.d_value=t)}}},formField:{},methods:{writeValue:function(t,n){var i,a;this.controlled&&(this.d_value=t,this.$emit("update:modelValue",t)),this.$emit("value-change",t),(i=(a=this.formField).onChange)===null||i===void 0||i.call(a,{originalEvent:n,value:t})},findNonEmpty:function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return n.find(zr)}},computed:{$filled:function(){return zr(this.d_value)},$invalid:function(){var t,n;return!this.$formNovalidate&&this.findNonEmpty(this.invalid,(t=this.$pcFormField)===null||t===void 0||(t=t.$field)===null||t===void 0?void 0:t.invalid,(n=this.$pcForm)===null||n===void 0||(n=n.getFieldState(this.$formName))===null||n===void 0?void 0:n.invalid)},$formName:function(){var t;return this.$formNovalidate?void 0:this.name||((t=this.$formControl)===null||t===void 0?void 0:t.name)},$formControl:function(){var t;return this.formControl||((t=this.$pcFormField)===null||t===void 0?void 0:t.formControl)},$formNovalidate:function(){var t;return(t=this.$formControl)===null||t===void 0?void 0:t.novalidate},$formDefaultValue:function(){var t,n;return this.findNonEmpty(this.d_value,(t=this.$pcFormField)===null||t===void 0?void 0:t.initialValue,(n=this.$pcForm)===null||n===void 0||(n=n.initialValues)===null||n===void 0?void 0:n[this.$formName])},$formValue:function(){var t,n;return this.findNonEmpty((t=this.$pcFormField)===null||t===void 0||(t=t.$field)===null||t===void 0?void 0:t.value,(n=this.$pcForm)===null||n===void 0||(n=n.getFieldState(this.$formName))===null||n===void 0?void 0:n.value)},controlled:function(){return this.$inProps.hasOwnProperty("modelValue")||!this.$inProps.hasOwnProperty("modelValue")&&!this.$inProps.hasOwnProperty("defaultValue")},filled:function(){return this.$filled}}},CGe=({dt:e})=>"\n.p-slider {\n position: relative;\n background: ".concat(e("slider.track.background"),";\n border-radius: ").concat(e("slider.track.border.radius"),";\n}\n\n.p-slider-handle {\n cursor: grab;\n touch-action: none;\n user-select: none;\n display: flex;\n justify-content: center;\n align-items: center;\n height: ").concat(e("slider.handle.height"),";\n width: ").concat(e("slider.handle.width"),";\n background: ").concat(e("slider.handle.background"),";\n border-radius: ").concat(e("slider.handle.border.radius"),";\n transition: background ").concat(e("slider.transition.duration"),", color ").concat(e("slider.transition.duration"),", border-color ").concat(e("slider.transition.duration"),", box-shadow ").concat(e("slider.transition.duration"),", outline-color ").concat(e("slider.transition.duration"),';\n outline-color: transparent;\n}\n\n.p-slider-handle::before {\n content: "";\n width: ').concat(e("slider.handle.content.width"),";\n height: ").concat(e("slider.handle.content.height"),";\n display: block;\n background: ").concat(e("slider.handle.content.background"),";\n border-radius: ").concat(e("slider.handle.content.border.radius"),";\n box-shadow: ").concat(e("slider.handle.content.shadow"),";\n transition: background ").concat(e("slider.transition.duration"),";\n}\n\n.p-slider:not(.p-disabled) .p-slider-handle:hover {\n background: ").concat(e("slider.handle.hover.background"),";\n}\n\n.p-slider:not(.p-disabled) .p-slider-handle:hover::before {\n background: ").concat(e("slider.handle.content.hover.background"),";\n}\n\n.p-slider-handle:focus-visible {\n box-shadow: ").concat(e("slider.handle.focus.ring.shadow"),";\n outline: ").concat(e("slider.handle.focus.ring.width")," ").concat(e("slider.handle.focus.ring.style")," ").concat(e("slider.handle.focus.ring.color"),";\n outline-offset: ").concat(e("slider.handle.focus.ring.offset"),";\n}\n\n.p-slider-range {\n display: block;\n background: ").concat(e("slider.range.background"),";\n border-radius: ").concat(e("slider.track.border.radius"),";\n}\n\n.p-slider.p-slider-horizontal {\n height: ").concat(e("slider.track.size"),";\n}\n\n.p-slider-horizontal .p-slider-range {\n inset-block-start: 0;\n inset-inline-start: 0;\n height: 100%;\n}\n\n.p-slider-horizontal .p-slider-handle {\n inset-block-start: 50%;\n margin-block-start: calc(-1 * calc(").concat(e("slider.handle.height")," / 2));\n margin-inline-start: calc(-1 * calc(").concat(e("slider.handle.width")," / 2));\n}\n\n.p-slider-vertical {\n min-height: 100px;\n width: ").concat(e("slider.track.size"),";\n}\n\n.p-slider-vertical .p-slider-handle {\n inset-inline-start: 50%;\n margin-inline-start: calc(-1 * calc(").concat(e("slider.handle.width")," / 2));\n margin-block-end: calc(-1 * calc(").concat(e("slider.handle.height")," / 2));\n}\n\n.p-slider-vertical .p-slider-range {\n inset-block-end: 0;\n inset-inline-start: 0;\n width: 100%;\n}\n"),wGe={handle:{position:"absolute"},range:{position:"absolute"}},EGe={root:function(t){var n=t.instance,i=t.props;return["p-slider p-component",{"p-disabled":i.disabled,"p-invalid":n.$invalid,"p-slider-horizontal":i.orientation==="horizontal","p-slider-vertical":i.orientation==="vertical"}]},range:"p-slider-range",handle:"p-slider-handle"},kGe=lc.extend({name:"slider",style:CGe,classes:EGe,inlineStyles:wGe}),xGe={name:"BaseSlider",extends:SGe,props:{min:{type:Number,default:0},max:{type:Number,default:100},orientation:{type:String,default:"horizontal"},step:{type:Number,default:null},range:{type:Boolean,default:!1},tabindex:{type:Number,default:0},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:kGe,provide:function(){return{$pcSlider:this,$parentInstance:this}}};function TGe(e){return RGe(e)||OGe(e)||AGe(e)||IGe()}function IGe(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function AGe(e,t){if(e){if(typeof e=="string")return Fte(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Fte(e,t):void 0}}function OGe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function RGe(e){if(Array.isArray(e))return Fte(e)}function Fte(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}var D5e={name:"Slider",extends:xGe,inheritAttrs:!1,emits:["change","slideend"],dragging:!1,handleIndex:null,initX:null,initY:null,barWidth:null,barHeight:null,dragListener:null,dragEndListener:null,beforeUnmount:function(){this.unbindDragListeners()},methods:{updateDomData:function(){var t=this.$el.getBoundingClientRect();this.initX=t.left+BTe(),this.initY=t.top+VTe(),this.barWidth=this.$el.offsetWidth,this.barHeight=this.$el.offsetHeight},setValue:function(t){var n,i=t.touches?t.touches[0].pageX:t.pageX,a=t.touches?t.touches[0].pageY:t.pageY;this.orientation==="horizontal"?GTe(this.$el)?n=(this.initX+this.barWidth-i)*100/this.barWidth:n=(i-this.initX)*100/this.barWidth:n=(this.initY+this.barHeight-a)*100/this.barHeight;var l=(this.max-this.min)*(n/100)+this.min;if(this.step){var f=this.range?this.value[this.handleIndex]:this.value,d=l-f;d<0?l=f+Math.ceil(l/this.step-f/this.step)*this.step:d>0&&(l=f+Math.floor(l/this.step-f/this.step)*this.step)}else l=Math.floor(l);this.updateModel(t,l)},updateModel:function(t,n){var i=Math.round(n*100)/100,a;this.range?(a=this.value?TGe(this.value):[],this.handleIndex==0?(i<this.min?i=this.min:i>=this.max&&(i=this.max),a[0]=i):(i>this.max?i=this.max:i<=this.min&&(i=this.min),a[1]=i)):(i<this.min?i=this.min:i>this.max&&(i=this.max),a=i),this.writeValue(a,t),this.$emit("change",a)},onDragStart:function(t,n){this.disabled||(this.$el.setAttribute("data-p-sliding",!0),this.dragging=!0,this.updateDomData(),this.range&&this.value[0]===this.max?this.handleIndex=0:this.handleIndex=n,t.currentTarget.focus())},onDrag:function(t){this.dragging&&this.setValue(t)},onDragEnd:function(t){this.dragging&&(this.dragging=!1,this.$el.setAttribute("data-p-sliding",!1),this.$emit("slideend",{originalEvent:t,value:this.value}))},onBarClick:function(t){this.disabled||Bw(t.target,"data-pc-section")!=="handle"&&(this.updateDomData(),this.setValue(t))},onMouseDown:function(t,n){this.bindDragListeners(),this.onDragStart(t,n)},onKeyDown:function(t,n){switch(this.handleIndex=n,t.code){case"ArrowDown":case"ArrowLeft":this.decrementValue(t,n),t.preventDefault();break;case"ArrowUp":case"ArrowRight":this.incrementValue(t,n),t.preventDefault();break;case"PageDown":this.decrementValue(t,n,!0),t.preventDefault();break;case"PageUp":this.incrementValue(t,n,!0),t.preventDefault();break;case"Home":this.updateModel(t,this.min),t.preventDefault();break;case"End":this.updateModel(t,this.max),t.preventDefault();break}},onBlur:function(t,n){var i,a;(i=(a=this.formField).onBlur)===null||i===void 0||i.call(a,t)},decrementValue:function(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a;this.range?this.step?a=this.value[n]-this.step:a=this.value[n]-1:this.step?a=this.value-this.step:!this.step&&i?a=this.value-10:a=this.value-1,this.updateModel(t,a),t.preventDefault()},incrementValue:function(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a;this.range?this.step?a=this.value[n]+this.step:a=this.value[n]+1:this.step?a=this.value+this.step:!this.step&&i?a=this.value+10:a=this.value+1,this.updateModel(t,a),t.preventDefault()},bindDragListeners:function(){this.dragListener||(this.dragListener=this.onDrag.bind(this),document.addEventListener("mousemove",this.dragListener)),this.dragEndListener||(this.dragEndListener=this.onDragEnd.bind(this),document.addEventListener("mouseup",this.dragEndListener))},unbindDragListeners:function(){this.dragListener&&(document.removeEventListener("mousemove",this.dragListener),this.dragListener=null),this.dragEndListener&&(document.removeEventListener("mouseup",this.dragEndListener),this.dragEndListener=null)},rangeStyle:function(){if(this.range){var t=this.rangeEndPosition>this.rangeStartPosition?this.rangeEndPosition-this.rangeStartPosition:this.rangeStartPosition-this.rangeEndPosition,n=this.rangeEndPosition>this.rangeStartPosition?this.rangeStartPosition:this.rangeEndPosition;return this.horizontal?{"inset-inline-start":n+"%",width:t+"%"}:{bottom:n+"%",height:t+"%"}}else return this.horizontal?{width:this.handlePosition+"%"}:{height:this.handlePosition+"%"}},handleStyle:function(){return this.horizontal?{"inset-inline-start":this.handlePosition+"%"}:{bottom:this.handlePosition+"%"}},rangeStartHandleStyle:function(){return this.horizontal?{"inset-inline-start":this.rangeStartPosition+"%"}:{bottom:this.rangeStartPosition+"%"}},rangeEndHandleStyle:function(){return this.horizontal?{"inset-inline-start":this.rangeEndPosition+"%"}:{bottom:this.rangeEndPosition+"%"}}},computed:{value:function(){var t;if(this.range){var n,i,a,l;return[(n=(i=this.d_value)===null||i===void 0?void 0:i[0])!==null&&n!==void 0?n:this.min,(a=(l=this.d_value)===null||l===void 0?void 0:l[1])!==null&&a!==void 0?a:this.max]}return(t=this.d_value)!==null&&t!==void 0?t:this.min},horizontal:function(){return this.orientation==="horizontal"},vertical:function(){return this.orientation==="vertical"},handlePosition:function(){return this.value<this.min?0:this.value>this.max?100:(this.value-this.min)*100/(this.max-this.min)},rangeStartPosition:function(){return this.value&&this.value[0]!==void 0?this.value[0]<this.min?0:(this.value[0]-this.min)*100/(this.max-this.min):0},rangeEndPosition:function(){return this.value&&this.value.length===2&&this.value[1]!==void 0?this.value[1]>this.max?100:(this.value[1]-this.min)*100/(this.max-this.min):100}}},DGe=["tabindex","aria-valuemin","aria-valuenow","aria-valuemax","aria-labelledby","aria-label","aria-orientation"],LGe=["tabindex","aria-valuemin","aria-valuenow","aria-valuemax","aria-labelledby","aria-label","aria-orientation"],PGe=["tabindex","aria-valuemin","aria-valuenow","aria-valuemax","aria-labelledby","aria-label","aria-orientation"];function MGe(e,t,n,i,a,l){return L(),Q("div",Cn({class:e.cx("root"),onClick:t[18]||(t[18]=function(){return l.onBarClick&&l.onBarClick.apply(l,arguments)})},e.ptmi("root"),{"data-p-sliding":!1}),[H("span",Cn({class:e.cx("range"),style:[e.sx("range"),l.rangeStyle()]},e.ptm("range")),null,16),e.range?we("",!0):(L(),Q("span",Cn({key:0,class:e.cx("handle"),style:[e.sx("handle"),l.handleStyle()],onTouchstartPassive:t[0]||(t[0]=function(f){return l.onDragStart(f)}),onTouchmovePassive:t[1]||(t[1]=function(f){return l.onDrag(f)}),onTouchend:t[2]||(t[2]=function(f){return l.onDragEnd(f)}),onMousedown:t[3]||(t[3]=function(f){return l.onMouseDown(f)}),onKeydown:t[4]||(t[4]=function(f){return l.onKeyDown(f)}),onBlur:t[5]||(t[5]=function(f){return l.onBlur(f)}),tabindex:e.tabindex,role:"slider","aria-valuemin":e.min,"aria-valuenow":e.d_value,"aria-valuemax":e.max,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-orientation":e.orientation},e.ptm("handle")),null,16,DGe)),e.range?(L(),Q("span",Cn({key:1,class:e.cx("handle"),style:[e.sx("handle"),l.rangeStartHandleStyle()],onTouchstartPassive:t[6]||(t[6]=function(f){return l.onDragStart(f,0)}),onTouchmovePassive:t[7]||(t[7]=function(f){return l.onDrag(f)}),onTouchend:t[8]||(t[8]=function(f){return l.onDragEnd(f)}),onMousedown:t[9]||(t[9]=function(f){return l.onMouseDown(f,0)}),onKeydown:t[10]||(t[10]=function(f){return l.onKeyDown(f,0)}),onBlur:t[11]||(t[11]=function(f){return l.onBlur(f,0)}),tabindex:e.tabindex,role:"slider","aria-valuemin":e.min,"aria-valuenow":e.d_value?e.d_value[0]:null,"aria-valuemax":e.max,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-orientation":e.orientation},e.ptm("startHandler")),null,16,LGe)):we("",!0),e.range?(L(),Q("span",Cn({key:2,class:e.cx("handle"),style:[e.sx("handle"),l.rangeEndHandleStyle()],onTouchstartPassive:t[12]||(t[12]=function(f){return l.onDragStart(f,1)}),onTouchmovePassive:t[13]||(t[13]=function(f){return l.onDrag(f)}),onTouchend:t[14]||(t[14]=function(f){return l.onDragEnd(f)}),onMousedown:t[15]||(t[15]=function(f){return l.onMouseDown(f,1)}),onKeydown:t[16]||(t[16]=function(f){return l.onKeyDown(f,1)}),onBlur:t[17]||(t[17]=function(f){return l.onBlur(f,1)}),tabindex:e.tabindex,role:"slider","aria-valuemin":e.min,"aria-valuenow":e.d_value?e.d_value[1]:null,"aria-valuemax":e.max,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-orientation":e.orientation},e.ptm("endHandler")),null,16,PGe)):we("",!0)],16)}D5e.render=MGe;const NGe={name:"FieldSlider",components:{Slider:D5e,Tooltip:Tc,HelpButton:Id,FormFieldLabel:i0},extends:Lm,props:{min:{required:!0,type:Number},max:{required:!0,type:Number},step:{required:!1,type:Number,default:1},minLabel:{required:!1,type:String,default:null},maxLabel:{required:!1,type:String,default:null},valueLabel:{required:!1,type:String,default:null},valueLabelMin:{required:!1,type:String,default:null},valueLabelMax:{required:!1,type:String,default:null}},data(){return{sliderStyling:{root:({props:t})=>({class:["relative",{"h-1 w-60":t.orientation=="horizontal"},"border-0","bg-[#BBBBBB]",{"select-none pointer-events-none cursor-default":t.disabled}]}),range:({props:t})=>({class:["block absolute",{"top-0 start-0":t.orientation=="horizontal"},{"h-full":t.orientation=="horizontal"},"bg-primary"]}),handle:({props:t,options:n})=>({id:this.controlId,"aria-valuetext":this.displayedValue,"aria-describedby":this.describedByIds,class:["block","h-[1.143rem]","w-[1.143rem]",{"top-[50%] mt-[-0.5715rem] ms-[-0.5715rem]":t.orientation=="horizontal","start-[50%] mb-[-0.5715rem] ms-[-0.5715rem]":t.orientation=="vertical"},"rounded-full","border-2","bg-primary","border-primary","hover:bg-hover hover:border-primary-500","focus-visible:outline-none focus-visible:outline-offset-0 focus-visible:ring","ring-primary/50","transition duration-200","cursor-grab","touch-action-none"]})}}},computed:{displayedValue(){return this.valueLabelMin&&(this.currentValue==this.min||this.currentValue==null||this.currentValue==null)?this.replaceLocaleParams(this.valueLabelMin,{value:this.currentValue}):this.valueLabelMax&&this.currentValue==this.max?this.replaceLocaleParams(this.valueLabelMax,{value:this.currentValue}):this.valueLabel?this.replaceLocaleParams(this.valueLabel,{value:this.currentValue}):this.currentValue}}},FGe={class:"mt-5 max-w-lg"},$Ge={class:"pkpFormField__heading"},BGe=["id"],VGe=["id"],HGe={class:"mt-2 flex"},UGe={class:"mt-3 grow"},zGe={class:"px-2"},WGe={class:"mt-2 flex justify-between text-base-normal text-secondary"},jGe={class:"ms-3 w-48 self-start rounded border border-form-fields p-2 text-center text-base-normal text-secondary"};function ZGe(e,t,n,i,a,l){const f=Xe("FormFieldLabel"),d=Xe("Tooltip"),h=Xe("HelpButton"),b=Xe("Slider"),S=Hr("strip-unsafe-html");return L(),Q("div",FGe,[H("div",$Ge,[pe(f,{id:e.labelId,label:e.label,"locale-label":e.localeLabel,"is-required":e.isRequired,"required-label":e.t("common.required"),"multilingual-label":e.multilingualLabel,class:"align-middle"},null,8,["id","label","locale-label","is-required","required-label","multilingual-label"]),t[1]||(t[1]=D()),e.isPrimaryLocale&&e.tooltip?(L(),Ee(d,{key:0,"aria-hidden":"true",tooltip:e.tooltip,label:""},null,8,["tooltip"])):we("",!0),t[2]||(t[2]=D()),e.isPrimaryLocale&&e.tooltip?Gn((L(),Q("span",{key:1,id:e.describedByTooltipId,class:"-screenReader"},null,8,BGe)),[[S,e.tooltip]]):we("",!0),t[3]||(t[3]=D()),e.isPrimaryLocale&&e.helpTopic?(L(),Ee(h,{key:2,id:e.describedByHelpId,topic:e.helpTopic,section:e.helpSection,label:e.t("help.help")},null,8,["id","topic","section","label"])):we("",!0)]),t[7]||(t[7]=D()),e.isPrimaryLocale&&e.description?Gn((L(),Q("div",{key:0,id:e.describedByDescriptionId,class:"pkpFormField__description semantic-defaults"},null,8,VGe)),[[S,e.description]]):we("",!0),t[8]||(t[8]=D()),H("div",HGe,[H("div",UGe,[H("div",zGe,[pe(b,{modelValue:e.currentValue,"onUpdate:modelValue":t[0]||(t[0]=k=>e.currentValue=k),min:n.min,max:n.max,step:n.step,class:"w-full",unstyled:"","aria-labelledby":e.labelId,pt:a.sliderStyling},null,8,["modelValue","min","max","step","aria-labelledby","pt"])]),t[5]||(t[5]=D()),H("div",WGe,[H("div",null,ee(n.minLabel||n.min),1),t[4]||(t[4]=D()),H("div",null,ee(n.maxLabel||n.max),1)])]),t[6]||(t[6]=D()),H("div",jGe,ee(l.displayedValue),1)])])}const L5e=wt(NGe,[["render",ZGe]]),qGe={name:"FieldUploadImage",components:{PkpButton:ms,Tooltip:Tc,HelpButton:Id,FormFieldLabel:i0,MultilingualProgress:a0,FieldError:Gd,VueDropzone:Mte},extends:Nte,props:{altTextDescription:String,altTextLabel:String,baseUrl:String,thumbnailDescription:String},data(){return{altTextValue:"",initialValue:null,isReady:!1}},computed:{thumbnail(){if(this.uploadFile)return this.uploadFile.dataURL;if(this.currentValue&&this.currentValue.uploadName){const e=new Date(this.currentValue.dateUploaded);return this.baseUrl+"/"+this.currentValue.uploadName+"?"+e.getTime()}return""},altTextId(){return this.compileId("altText")},altTextDescriptionId(){return this.compileId("altTextDescription")}},watch:{currentValue:function(e,t){e!==t&&(this.altTextValue=e&&e.altText?e.altText:"")},altTextValue:function(e,t){e!==t&&(!e&&!this.currentValue||this.$emit("change",this.name,"value",{...this.currentValue,altText:e},this.localeKey))}},mounted(){this.isComponentMounted=!0,setTimeout(()=>{this.$refs.dropzone.dropzone.hiddenFileInput.id=this.dropzoneHiddenFileId,this.$refs.dropzone.dropzone.hiddenFileInput.setAttribute("aria-describedby",this.describedByIds),this.altTextValue=this.currentValue?this.currentValue.altText:""})},methods:{success:function(e,t){this.isUploading=!1,this.$emit("change",this.name,"value",{temporaryFileId:t.id,altText:""},this.localeKey),this.setFocusToControl()},onThumbnail:function(e){this.uploadFile={...e},this.setFocusToControl()}}},GGe={class:"pkpFormField pkpFormField--upload pkpFormField--uploadImage"},KGe={class:"pkpFormField__heading"},YGe=["id"],XGe=["id"],JGe=["id"],QGe={key:0,class:"pkpFormField--upload__preview"},eKe=["alt","src"],tKe={class:"pkpFormField--upload__details"},nKe=["for"],sKe=["id","aria-describedby"],oKe=["id"],rKe={class:"pkpFormField--upload__previewActions"},iKe={class:"pkpFormField--upload__uploadActions"};function aKe(e,t,n,i,a,l){const f=Xe("FormFieldLabel"),d=Xe("Tooltip"),h=Xe("HelpButton"),b=Xe("PkpButton"),S=Xe("MultilingualProgress"),k=Xe("FieldError"),T=Xe("VueDropzone"),O=Hr("strip-unsafe-html");return L(),Q("div",GGe,[H("div",KGe,[pe(f,{"control-id":e.dropzoneHiddenFileId,label:e.label,"locale-label":e.localeLabel,"is-required":e.isRequired,"required-label":e.t("common.required"),"multilingual-label":e.multilingualLabel,class:"align-middle"},null,8,["control-id","label","locale-label","is-required","required-label","multilingual-label"]),t[1]||(t[1]=D()),e.tooltip?(L(),Ee(d,{key:0,"aria-hidden":"true",tooltip:e.tooltip,label:""},null,8,["tooltip"])):we("",!0),t[2]||(t[2]=D()),e.tooltip?Gn((L(),Q("span",{key:1,id:e.describedByTooltipId,class:"-screenReader"},null,8,YGe)),[[O,e.tooltip]]):we("",!0),t[3]||(t[3]=D()),e.helpTopic?(L(),Ee(h,{key:2,id:e.describedByHelpId,topic:e.helpTopic,section:e.helpSection,label:e.t("help.help")},null,8,["id","topic","section","label"])):we("",!0)]),t[16]||(t[16]=D()),e.isPrimaryLocale&&e.description?Gn((L(),Q("div",{key:0,id:e.describedByDescriptionId,class:"pkpFormField__description semantic-defaults"},null,8,XGe)),[[O,e.description]]):we("",!0),t[17]||(t[17]=D()),H("div",{id:e.controlId,ref:"control",class:"pkpFormField__control pkpFormField--upload__control","aria-live":"polite"},[e.currentValue?(L(),Q("div",QGe,[l.thumbnail?(L(),Q("img",{key:0,class:"pkpFormField--uploadImage__thumbnail",alt:n.thumbnailDescription,src:l.thumbnail},null,8,eKe)):we("",!0),t[8]||(t[8]=D()),H("div",tKe,[H("label",{class:"pkpFormFieldLabel",for:l.altTextId},ee(n.altTextLabel),9,nKe),t[4]||(t[4]=D()),Gn(H("input",{id:l.altTextId,"onUpdate:modelValue":t[0]||(t[0]=P=>a.altTextValue=P),class:"pkpFormField__input pkpFormField--uploadImage__altTextInput",type:"text","aria-describedby":l.altTextDescriptionId},null,8,sKe),[[lu,a.altTextValue]]),t[5]||(t[5]=D()),Gn(H("div",{id:l.altTextDescriptionId,class:"pkpFormField--uploadImage__altTextDescription"},null,8,oKe),[[O,n.altTextDescription]])]),t[9]||(t[9]=D()),H("div",rKe,[pe(b,{"is-warnable":!0,onClick:e.clear},{default:te(()=>[D(ee(e.t("common.remove")),1)]),_:1},8,["onClick"]),t[6]||(t[6]=D()),a.initialValue&&!e.isInitialValue?(L(),Ee(b,{key:0,onClick:e.revert},{default:te(()=>[D(ee(e.restoreLabel),1)]),_:1},8,["onClick"])):we("",!0),t[7]||(t[7]=D()),e.isMultilingual&&e.locales.length>1?(L(),Ee(S,{key:1,id:e.multilingualProgressId,count:e.multilingualFieldsCompleted,total:e.locales.length},null,8,["id","count","total"])):we("",!0)])])):we("",!0),t[14]||(t[14]=D()),e.currentValue&&e.errors&&e.errors.length?(L(),Ee(k,{key:1,id:e.describedByErrorId,messages:e.errors},null,8,["id","messages"])):we("",!0),t[15]||(t[15]=D()),H("div",{class:Rn({"-screenReader":e.currentValue})},[e.isComponentMounted?(L(),Ee(T,{key:0,id:e.dropzoneId,ref:"dropzone",options:e.dropzoneOptions,onVdropzoneFileAdded:e.onAddFile,onVdropzoneThumbnail:l.onThumbnail,onVdropzoneSuccess:l.success,onVdropzoneError:e.onError,onVdropzoneRemovedFile:e.onRemoveFile},null,8,["id","options","onVdropzoneFileAdded","onVdropzoneThumbnail","onVdropzoneSuccess","onVdropzoneError","onVdropzoneRemovedFile"])):we("",!0),t[12]||(t[12]=D()),e.errors&&e.errors.length?(L(),Ee(k,{key:1,id:e.describedByErrorId,messages:e.errors},null,8,["id","messages"])):we("",!0),t[13]||(t[13]=D()),H("div",iKe,[pe(b,{id:e.dropzoneClickableId,class:"pkpFormField--upload__addFile",disabled:!!e.uploadFile},{default:te(()=>[D(ee(e.uploadFileLabel),1)]),_:1},8,["id","disabled"]),t[10]||(t[10]=D()),a.initialValue&&!e.isInitialValue?(L(),Ee(b,{key:0,class:"pkpFormField--upload__restore",onClick:e.revert},{default:te(()=>[D(ee(e.restoreLabel),1)]),_:1},8,["onClick"])):we("",!0),t[11]||(t[11]=D()),e.isMultilingual&&e.locales.length>1?(L(),Ee(S,{key:1,id:e.multilingualProgressId,count:e.multilingualFieldsCompleted,total:e.locales.length},null,8,["id","count","total"])):we("",!0)])],2)],8,JGe)])}const P5e=wt(qGe,[["render",aKe]]);function M5e(e,t){if(typeof e.showWhen>"u")return!0;const n=typeof e.showWhen=="string"?e.showWhen:e.showWhen[0],i=t.find(a=>a.name===n);return i?typeof e.showWhen=="string"?!!i.value:i.value===e.showWhen[1]:!1}function N5e(e,t){if(typeof e.showWhen>"u")return!0;const n=typeof e.showWhen=="string"?e.showWhen:e.showWhen[0],i=t.find(a=>a.name===n);return i?typeof e.showWhen=="string"?!!i.value:Array.isArray(e.showWhen[1])?e.showWhen[1].includes(i.value):i.value===e.showWhen[1]:!1}function lKe(e,t,n){const i=n.find(a=>a.id===e.groupId);return N5e(i,t)&&M5e(e,t)}const cKe={name:"FormGroup",components:{FieldAffiliations:hze,FieldArchivingPn:k3e,FieldAutosuggestPreset:bH,FieldBaseAutosuggest:lC,FieldColor:I3e,FieldControlledVocab:A3e,FieldPubId:Ate,FieldHtml:O3e,FieldMetadataSetting:R3e,FieldOptions:aC,FieldOrcid:D3e,FieldPreparedContent:Dte,FieldRadioInput:m5e,FieldRichTextarea:O5,FieldRichText:h5e,FieldSelect:e9,FieldSelectIssue:g5e,FieldSelectIssues:Lte,FieldSelectSubmissions:v5e,FieldSelectUsers:Pte,FieldShowEnsuringLink:b5e,FieldText:Nb,FieldTextarea:y5e,FieldSlider:L5e,FieldUpload:Nte,FieldUploadImage:P5e},props:{id:String,label:String,description:String,pageId:String,fields:Array,errors:Object,formId:String,primaryLocale:String,visibleLocales:Array,availableLocales:Array,showWhen:[String,Array]},computed:{fieldsInGroup(){return this.fields.filter(e=>e.groupId===this.id&&M5e(e,this.fields))},hasErrors(){for(var e in this.fieldsInGroup)if(e in this.errors)return!0;return!1}},methods:{fieldChanged:function(e,t,n,i){this.$emit("change",e,t,n,i)},setFieldErrors:function(e,t,n=""){let i=this.errors;!t||!t.length?n&&i[e]&&i[e][n]?delete i[e][n]:i[e]&&delete i[e]:n?(i[e]=i[e]||{},i[e][n]=t):i[e]=t,this.$emit("set-errors",{...i})}}},uKe={class:"pkpFormGroup -pkpClearfix"},dKe={key:0,class:"pkpFormGroup__heading"},fKe={class:"pkpFormGroup__legend"},pKe={key:0,class:"pkpFormGroup__description semantic-defaults"},mKe={class:"pkpFormGroup__fields"};function hKe(e,t,n,i,a,l){const f=Hr("strip-unsafe-html");return L(),Q("fieldset",uKe,[n.label?(L(),Q("div",dKe,[H("legend",fKe,ee(n.label),1),t[0]||(t[0]=D()),n.description?Gn((L(),Q("div",pKe,null,512)),[[f,n.description]]):we("",!0)])):we("",!0),t[1]||(t[1]=D()),H("div",mKe,[(L(!0),Q(bt,null,Sn(l.fieldsInGroup,d=>(L(),Q(bt,null,[d.isMultilingual?(L(),Q("div",{key:d.name,class:"pkpFormGroup__localeGroup -pkpClearfix"},[(L(!0),Q(bt,null,Sn(n.availableLocales,h=>(L(),Q("div",{key:h.key,class:Rn(["pkpFormGroup__locale",{"pkpFormGroup__locale--isVisible":n.visibleLocales.includes(h.key)}])},[(L(),Ee(Io(d.component),Cn({ref_for:!0},d,{"all-errors":n.errors,"locale-key":h.key,"form-id":n.formId,"primary-locale":n.primaryLocale,locales:n.availableLocales,onChange:l.fieldChanged,onSetErrors:l.setFieldErrors}),null,16,["all-errors","locale-key","form-id","primary-locale","locales","onChange","onSetErrors"]))],2))),128))])):(L(),Ee(Io(d.component),Cn({key:1,ref_for:!0},d,{key:d.name,"all-errors":n.errors,"form-id":n.formId,"primary-locale":n.primaryLocale,locales:n.availableLocales,onChange:l.fieldChanged,onSetErrors:l.setFieldErrors}),null,16,["all-errors","form-id","primary-locale","locales","onChange","onSetErrors"]))],64))),256))])])}const gKe={name:"FormPage",components:{ButtonRow:r0,FormErrors:BHe,FormGroup:wt(cKe,[["render",hKe]]),PkpButton:ms,Spinner:zl,Icon:Vs},props:{id:String,groups:Array,fields:Array,errors:Object,formId:String,isCurrentPage:Boolean,isLastPage:Boolean,lastSaveTimestamp:Number,primaryLocale:String,visibleLocales:Array,availableLocales:Array,submitButton:Object,previousButton:Object,cancelButton:Object,canSubmit:{type:Boolean,default(){return!0}},isSaving:Boolean,showErrorFooter:{type:Boolean,default(){return!0}}},data(){return{hasRecentSave:!1,recentSaveInterval:null}},computed:{groupsInPage(){return this.groups.filter(e=>e.pageId===this.id&&N5e(e,this.fields))},hasFooter(){return this.previousButton||this.submitButton||Object.keys(this.errors).length}},mounted(){this.recentSaveInterval=setInterval(()=>{const e=this.lastSaveTimestamp+5e3;this.hasRecentSave&&e<Date.now()?this.hasRecentSave=!1:!this.hasRecentSave&&e>Date.now()&&(this.hasRecentSave=!0)},250)},unmounted(){clearInterval(this.recentSaveInterval)},methods:{fieldChanged:function(e,t,n,i){this.$emit("change",e,t,n,i)},submit(){this.$emit("pageSubmitted",this.id)},previousPage(){this.$emit("previousPage",this.id)},cancel:function(){this.$emit("cancel",this.id)},showField:function(e){this.$emit("showField",e)},showLocale:function(e){this.$emit("showLocale",e)},setErrors:function(e){this.$emit("set-errors",e)}}},vKe={role:"status","aria-live":"polite","aria-atomic":"true"},bKe={key:0,class:"pkpFormPage__status"},yKe={key:1,class:"pkpFormPage__status"};function _Ke(e,t,n,i,a,l){const f=Xe("FormGroup"),d=Xe("FormErrors"),h=Xe("Spinner"),b=Xe("Icon"),S=Xe("PkpButton"),k=Xe("ButtonRow");return L(),Q("div",{class:Rn(["pkpFormPage",{"pkpFormPage--current":n.isCurrentPage}])},[(L(!0),Q(bt,null,Sn(l.groupsInPage,T=>(L(),Ee(f,Cn({key:T.id,ref_for:!0},T,{fields:n.fields,errors:n.errors,"primary-locale":n.primaryLocale,"visible-locales":n.visibleLocales,"available-locales":n.availableLocales,"form-id":n.formId,onChange:l.fieldChanged,onSetErrors:l.setErrors}),null,16,["fields","errors","primary-locale","visible-locales","available-locales","form-id","onChange","onSetErrors"]))),128)),t[4]||(t[4]=D()),l.hasFooter?(L(),Ee(k,{key:0,ref:"footer",class:"pkpFormPage__footer","aria-live":"polite"},{default:te(()=>[Object.keys(n.errors).length&&n.showErrorFooter?(L(),Ee(d,{key:0,errors:n.errors,fields:n.fields,onShowField:l.showField,onShowLocale:l.showLocale},null,8,["errors","fields","onShowField","onShowLocale"])):we("",!0),t[0]||(t[0]=D()),H("span",vKe,[pe(s5,{name:"pkpFormPage__status"},{default:te(()=>[n.isSaving?(L(),Q("span",bKe,[pe(h),D(" "+ee(e.t("common.saving")),1)])):a.hasRecentSave?(L(),Q("span",yKe,[pe(b,{icon:"Complete",class:"h-5 w-5 text-success",inline:!0}),D(" "+ee(e.t("form.saved")),1)])):we("",!0)]),_:1})]),t[1]||(t[1]=D()),n.cancelButton?(L(),Ee(S,Cn({key:1},n.cancelButton,{"is-warnable":!0,onClick:l.cancel}),{default:te(()=>[D(ee(n.cancelButton.label||e.t("common.cancel")),1)]),_:1},16,["onClick"])):we("",!0),t[2]||(t[2]=D()),n.previousButton?(L(),Ee(S,Cn({key:2},n.previousButton,{onClick:l.previousPage}),{default:te(()=>[D(ee(n.previousButton.label),1)]),_:1},16,["onClick"])):we("",!0),t[3]||(t[3]=D()),n.submitButton?(L(),Ee(S,Cn({key:3},n.submitButton,{disabled:n.isSaving||!n.canSubmit||n.isLastPage&&!!Object.keys(n.errors).length,onClick:l.submit}),{default:te(()=>[D(ee(n.submitButton.label),1)]),_:1},16,["disabled","onClick"])):we("",!0)]),_:1},512)):we("",!0)],2)}const SKe={name:"PkpForm",components:{FormLocales:AHe,FormPage:wt(gKe,[["render",_Ke]]),Icon:Vs},props:{id:String,method:{type:String,default(){return""}},action:{type:String,default(){return""}},canSubmit:{type:Boolean,default(){return!0}},errors:{type:Object,default(){return{}}},fields:Array,groups:Array,hiddenFields:Object,pages:Array,primaryLocale:String,visibleLocales:Array,supportedFormLocales:Array,customSubmit:Function,showErrorFooter:{type:Boolean,default(){return!0}}},emits:["set","success","cancel"],data(){return{currentPage:"",isSaving:!1,lastSaveTimestamp:-1}},computed:{classes(){let e=[];return this.visibleLocales.length>1&&e.push("pkpForm--hasManyVisibleLocales"),e},availableLocales(){return this.hasMultilingualFields?this.supportedFormLocales:[]},hasMultilingualFields(){return!!this.fields.find(e=>e.isMultilingual)},groupIdsWithErrors(){let e=[];return Object.keys(this.errors).forEach(t=>{const n=this.fields.find(i=>i.name===t);n&&!e.includes(n.groupId)&&e.push(n.groupId)}),e},pageIdsWithErrors(){let e=[];return this.groupIdsWithErrors.forEach(t=>{const n=this.groups.find(i=>i.id===t);n&&!e.includes(n.pageId)&&e.push(n.pageId)}),e},submitValues(){let e={};return this.fields.forEach(t=>{if(!t.isInert)if(!t.isMultilingual)Array.isArray(t.value)&&!t.value.length?e[t.name]="":e[t.name]=t.value;else{let n={};Object.keys(t.value).forEach(i=>{this.supportedFormLocales.filter(a=>a.key===i).length&&(Array.isArray(t.value[i])&&!t.value[i].length?n[i]="":n[i]=t.value[i])}),Object.keys(n).length&&(e[t.name]=n)}}),{...e,...this.hiddenFields}}},mounted(){this.currentPage||(this.currentPage=this.pages[0].id)},methods:{nextPage:function(e){const t=this.pages.findIndex(n=>n.id===e);if(this.pages.length===1||t===this.pages.length-1){this.submit();return}this.setCurrentPage(!0)},async submit(){if(!this.canSubmit)return!1;this.isSaving=!0;let e=this.validate();if(Object.keys(e).length){this.$emit("set",this.id,{errors:{...this.errors,...e}}),this.isSaving=!1;return}if(this.customSubmit){const{data:t,validationError:n}=await this.customSubmit(this.submitValues);n?this.error({status:400,responseJSON:n}):t&&this.success(t),this.complete()}else this.action==="emit"?this.$emit("success",this.submitValues):$.ajax({context:this,method:this.method==="DELETE"||this.method==="PUT"?"POST":this.method,url:this.action,headers:{"X-Csrf-Token":pkp.currentUser.csrfToken,"X-Http-Method-Override":this.method},data:this.submitValues,success:this.success,error:this.error,complete:this.complete})},cancel:function(){this.$emit("cancel",this.id)},validate(){return this.validateRequired()},validateRequired(){let e={};return this.fields.forEach(t=>{if(!t.isRequired||!lKe(t,this.fields,this.groups))return;let n=!1,i=t.isMultilingual?t.value[this.primaryLocale]:t.value;switch(typeof i){case"undefined":n=!0;break;case"boolean":n=!i;break;case"string":case"object":(!i||Array.isArray(i)&&!i.length)&&(n=!0);break}n&&(t.isMultilingual?(e[t.name]={},e[t.name][this.primaryLocale]=[this.t("validator.required")]):e[t.name]=[this.t("validator.required")])}),e},success:function(e){if(this.$emit("success",e),this.lastSaveTimestamp=Date.now(),pkp.eventBus.$emit("form-success",this.id,e),this.action){const t=this.fields.map(n=>(typeof e[n.name]<"u"&&(n.value=e[n.name]),n));this.$emit("set",this.id,{fields:t})}},error:function(e){var t,n;if(e.status&&[400,422].includes(e.status))pkp.eventBus.$emit("notify",this.t("form.errors",{count:Object.keys(e.responseJSON).length}),"warning"),this.$emit("set",this.id,{errors:e.responseJSON});else if(e.status&&[403,404].includes(e.status)&&((t=e.responseJSON)!=null&&t.errorMessage||(n=e.responseJSON)!=null&&n.error)){const i=e.responseJSON.errorMessage||e.responseJSON.error;pkp.eventBus.$emit("notify",i,"warning")}else pkp.eventBus.$emit("notify",this.t("common.unknownError","warning"))},complete(){this.isSaving=!1},fieldChanged:function(e,t,n,i){const a=this.fields.map(l=>(l.name===e&&(i?l[t][i]=n:l[t]=n),l));this.$emit("set",this.id,{fields:a}),this.removeError(e,i)},setCurrentPage:function(e){const t=this.pages.findIndex(n=>n.id===this.currentPage);if(e===!0){if(this.pages.length<=t)return;e=this.pages[t+1].id}else if(e===!1){if(!t)return;e=this.pages[t-1].id}this.currentPage=e,this.$scrollTo(this.$el,500,{offset:-50})},setVisibleLocales:function(e){this.$emit("set",this.id,{visibleLocales:e})},showLocale:function(e){this.visibleLocales.includes(e)||this.setVisibleLocales([this.primaryLocale,e])},showField:function(e){let t=this.fields.find(i=>i.name===e);if(!t)return;let n=this.groups.find(i=>i.id===t.groupId);n&&(this.currentPage=n.pageId,this.$nextTick(()=>{let i=document.querySelector('[id*="'+this.id+"-"+t.name+'"]');if(i){const a=document.querySelectorAll("div.pkp-modal-scroll-container"),l=a.length>0?a[a.length-1]:void 0;this.$scrollTo(i,500,{offset:-50,container:l})}else this.setCurrentPage(n.pageId)}))},removeError:function(e,t){if(!this.errors[e])return;let n={...this.errors};!t||typeof n[e]=="string"?delete n[e]:(n[e][t]&&delete n[e][t],Object.keys(n[e]).length||delete n[e]),this.$emit("set",this.id,{errors:n})},setErrors:function(e){this.$emit("set",this.id,{errors:e})}}},CKe=["method","action"],wKe=["name","value"],EKe={key:1,class:"pkpForm__pageNav"},kKe={class:"pkpForm__pageNavList"},xKe=["onClick"];function TKe(e,t,n,i,a,l){const f=Xe("FormLocales"),d=Xe("Icon"),h=Xe("FormPage");return L(),Q("form",{class:"pkpForm -pkpClearfix",method:n.method,action:n.action,onSubmit:wl(()=>{},["prevent"])},[t[2]||(t[2]=H("input",{type:"submit",value:"i9884",style:{display:"none"}},null,-1)),t[3]||(t[3]=D()),(L(!0),Q(bt,null,Sn(n.hiddenFields,(b,S)=>(L(),Q("input",{key:S,type:"hidden",name:S,value:b},null,8,wKe))),128)),t[4]||(t[4]=D()),l.availableLocales.length>1?(L(),Ee(f,{key:0,"primary-locale-key":n.primaryLocale,locales:l.availableLocales,visible:n.visibleLocales,onUpdateLocales:l.setVisibleLocales},null,8,["primary-locale-key","locales","visible","onUpdateLocales"])):we("",!0),t[5]||(t[5]=D()),n.pages.length>1?(L(),Q("div",EKe,[H("ol",kKe,[(L(!0),Q(bt,null,Sn(n.pages,b=>(L(),Q("li",{key:b.id,class:"pkpForm__pageNavListItem"},[H("button",{class:Rn(["pkpForm__pageNavPage",{"pkpForm__pageNavPage--current":b.id===a.currentPage}]),onClick:wl(S=>l.setCurrentPage(b.id),["prevent"])},ee(b.label),11,xKe),t[1]||(t[1]=D()),l.pageIdsWithErrors.includes(b.id)?(L(),Ee(d,{key:0,icon:"Error",class:"h-4 w-4",inline:!0})):we("",!0)]))),128))])])):we("",!0),t[6]||(t[6]=D()),H("div",{class:Rn(["pkpFormPages",l.classes])},[(L(!0),Q(bt,null,Sn(n.pages,(b,S)=>(L(),Ee(h,Cn({key:b.id,ref_for:!0},b,{groups:n.groups,fields:n.fields,errors:n.errors,"form-id":n.id,"can-submit":n.canSubmit,"is-current-page":a.currentPage===b.id,"is-last-page":S===n.pages.length-1,"last-save-timestamp":a.lastSaveTimestamp,"primary-locale":n.primaryLocale,"visible-locales":n.visibleLocales,"available-locales":l.availableLocales,"is-saving":a.isSaving,"show-error-footer":n.showErrorFooter,onChange:l.fieldChanged,onPageSubmitted:l.nextPage,onPreviousPage:t[0]||(t[0]=k=>l.setCurrentPage(!1)),onShowField:l.showField,onShowLocale:l.showLocale,onCancel:l.cancel,onSetErrors:l.setErrors}),null,16,["groups","fields","errors","form-id","can-submit","is-current-page","is-last-page","last-save-timestamp","primary-locale","visible-locales","available-locales","is-saving","show-error-footer","onChange","onPageSubmitted","onShowField","onShowLocale","onCancel","onSetErrors"]))),128))],2)],40,CKe)}const oa=wt(SKe,[["render",TKe]]),IKe={class:"ml-8 mr-8 h-full bg-secondary"},F5e={__name:"WorkflowLogResponseModal",props:{title:{type:String,required:!0},submissionId:{type:Number,required:!0},logResponseForm:{type:Object,required:!0}},setup(e){const n=uHe(e);return(i,a)=>(L(),Ee(il,null,{"pre-title":te(()=>[D(ee(e.submissionId),1)]),title:te(()=>[H("span",null,ee(i.t("editor.review.logResponse.for")),1)]),description:te(()=>[H("span",null,ee(e.title),1)]),default:te(()=>[a[0]||(a[0]=D()),a[1]||(a[1]=D()),a[2]||(a[2]=D()),H("div",IKe,[pe(oa,Cn(se(n).form,{onSuccess:se(n).formSuccess,onSet:se(n).updateForm}),null,16,["onSuccess","onSet"])])]),_:1}))}},al={REVIEWER_ADD_REVIEWER:"reviewerAddReviewer",REVIEWER_READ_REVIEW:"reviewerReadReview",REVIEWER_READ_REVIEW_BY_AUTHOR:"reviewerReadReviewByAuthor",REVIEWER_REVIEW_DETAILS:"reviewerReviewDetails",REVIEWER_EMAIL_REVIEWER:"reviewerEmailReviewer",REVIEWER_RESEND_REQUEST:"reviewerResendRequest",REVIEWER_EDIT_REVIEW:"reviewerEditReview",REVIEWER_CANCEL_REVIEWER:"reviewerCancelReviewer",REVIEWER_UNASSIGN_REVIEWER:"reviewerUnassignReviewer",REVIEWER_REINSTATE_REVIEWER:"reviewerReinstateReviewer",REVIEWER_REVIEW_HISTORY:"reviewerReviewHistory",REVIEWER_LOGIN_AS:"reviewerLoginAs",REVIEWER_EDITORIAL_NOTES:"reviewerEditorialNotes",REVIEWER_THANK_REVIEWER:"reviewerThankReviewer",REVIEWER_REVERT_CONSIDER:"reviewerRevertConsider",REVIEWER_SEND_REMINDER:"reviewerSendReminder",REVIEWER_LOG_RESPONSE:"reviewerLogResponse",REVIEWER_SEND_TO_ORCID:"reviewerSendToOrcid"};function $5e(){const{t:e,localizeSubmission:t}=Jn();function n({submission:q,reviewRoundId:ne,submissionStageId:ue},J){const{openLegacyModal:ce}=Ar({op:"showReviewerForm",component:"grid.users.reviewer.ReviewerGridHandler",params:{selectionType:pkp.const.REVIEWER_SELECT_ADVANCED_SEARCH,submissionId:q.id,stageId:ue,reviewRoundId:ne}});ce({title:e("editor.submission.addReviewer")},J)}function i({submission:q,reviewAssignment:ne,submissionStageId:ue},J){const{openLegacyModal:ce}=Ar({component:"grid.users.reviewer.AuthorReviewerGridHandler",op:"readReview",params:{submissionId:q.id,reviewAssignmentId:ne.id,stageId:ue}}),{getCurrentPublication:ge}=Va(),de=ge(q);ce({title:"".concat(e("semicolon",{label:e("submission.review")})," ").concat(t(de.fullTitle,de.locale))},J)}function a({submission:q,reviewAssignment:ne,submissionStageId:ue},J){const{openLegacyModal:ce}=Ar({component:"grid.users.reviewer.ReviewerGridHandler",op:"readReview",params:{submissionId:q.id,reviewAssignmentId:ne.id,stageId:ue}}),{getCurrentPublication:ge}=Va(),de=ge(q);ce({title:"".concat(e("semicolon",{label:e("submission.review")})," ").concat(t(de.fullTitle,de.locale))},J)}function l({submission:q,reviewAssignment:ne,submissionStageId:ue},J){const{openLegacyModal:ce}=Ar({component:"grid.users.reviewer.ReviewerGridHandler",op:"readReview",params:{submissionId:q.id,reviewAssignmentId:ne.id,stageId:ue}}),{getCurrentPublication:ge}=Va(),de=ge(q);ce({title:"".concat(e("semicolon",{label:e("editor.review.reviewDetails")})," ").concat(t(de.fullTitle,de.locale))},J)}function f({submission:q,reviewAssignment:ne,submissionStageId:ue},J){const{openLegacyModal:ce}=Ar({component:"grid.users.reviewer.ReviewerGridHandler",op:"sendEmail",params:{submissionId:q.id,reviewAssignmentId:ne.id,stageId:ue}});ce({title:e("editor.review.emailReviewer")},J)}function d({submission:q,reviewAssignment:ne,submissionStageId:ue},J){const{openLegacyModal:ce}=Ar({component:"grid.users.reviewer.ReviewerGridHandler",op:"resendRequestReviewer",params:{submissionId:q.id,reviewAssignmentId:ne.id,stageId:ue}});ce({title:e("editor.review.resendRequestReviewer")},J)}function h({submission:q,reviewAssignment:ne,submissionStageId:ue},J){const{openLegacyModal:ce}=Ar({component:"grid.users.reviewer.ReviewerGridHandler",op:"editReview",params:{submissionId:q.id,reviewAssignmentId:ne.id,stageId:ue}});ce({title:e("editor.submissionReview.editReview")},J)}function b({submission:q,reviewAssignment:ne,submissionStageId:ue},J){const{openLegacyModal:ce}=Ar({component:"grid.users.reviewer.ReviewerGridHandler",op:"unassignReviewer",params:{submissionId:q.id,reviewAssignmentId:ne.id,stageId:ue}});ce({title:e("editor.review.unassignReviewer")},J)}function S({submission:q,reviewAssignment:ne,submissionStageId:ue},J){const{openLegacyModal:ce}=Ar({component:"grid.users.reviewer.ReviewerGridHandler",op:"reinstateReviewer",params:{submissionId:q.id,reviewAssignmentId:ne.id,stageId:ue}});ce({title:e("editor.review.reinstateReviewer")},J)}function k({submission:q,reviewAssignment:ne,submissionStageId:ue},J){const{openLegacyModal:ce}=Ar({component:"grid.users.reviewer.ReviewerGridHandler",op:"unassignReviewer",params:{submissionId:q.id,reviewAssignmentId:ne.id,stageId:ue}});ce({title:e("editor.review.cancelReviewer")},J)}function T({submission:q,reviewAssignment:ne,submissionStageId:ue},J){const{openLegacyModal:ce}=Ar({component:"grid.users.reviewer.ReviewerGridHandler",op:"reviewHistory",params:{submissionId:q.id,reviewAssignmentId:ne.id,stageId:ue}});ce({title:e("submission.history")},J)}function O({reviewAssignment:q},ne){const{openDialog:ue}=Ms();ue({actions:[{label:e("common.ok"),callback:J=>{const{redirectToPage:ce}=to("login/signInAsUser/".concat(q.reviewerId));ce()}},{label:e("common.cancel"),isWarnable:!0,callback:J=>{J()}}],title:e("grid.action.logInAs"),message:e("grid.user.confirmLogInAs"),modalStyle:"primary"},ne)}function P({submission:q,reviewAssignment:ne,submissionStageId:ue},J){const{openLegacyModal:ce}=Ar({component:"grid.users.reviewer.ReviewerGridHandler",op:"gossip",params:{submissionId:q.id,reviewAssignmentId:ne.id,stageId:ue}});ce({title:e("user.gossip")},J)}function B({submission:q,reviewAssignment:ne,submissionStageId:ue},J){const{openLegacyModal:ce}=Ar({component:"grid.users.reviewer.ReviewerGridHandler",op:"editThankReviewer",params:{submissionId:q.id,reviewAssignmentId:ne.id,stageId:ue}});ce({title:e("editor.review.thankReviewer")},J)}function W({submission:q,reviewAssignment:ne,submissionStageId:ue},J){const{openDialog:ce,openDialogNetworkError:ge}=Ms();ce({actions:[{label:e("common.ok"),isWarnable:!0,callback:async de=>{const{url:he}=Ar({component:"grid.users.reviewer.ReviewerGridHandler",op:"unconsiderReview",params:{submissionId:q.id,reviewAssignmentId:ne.id,stageId:ue}}),ie=new FormData;ie.append("csrfToken",Pv());const{fetch:Be,data:$e}=fr(he,{method:"POST",body:ie});await Be(),de(),J(),$e.value.status!==!0&&ge()}},{label:e("common.cancel"),callback:de=>{de()}}],title:e("editor.review.unconsiderReview"),message:e("editor.review.unconsiderReviewText"),modalStyle:"negative"},J)}function Z({submission:q,reviewAssignment:ne,submissionStageId:ue},J){const{openLegacyModal:ce}=Ar({component:"grid.users.reviewer.ReviewerGridHandler",op:"editReminder",params:{submissionId:q.id,reviewAssignmentId:ne.id,stageId:ue}});ce({title:e("editor.review.reminder")},J)}function Y({submission:q,reviewAssignment:ne,submissionStageId:ue,componentForms:J},ce){const{openSideModal:ge}=Ms();let de=J.logResponseForm,he=q.id;const{getCurrentPublication:ie}=Va(),Be=ie(q),$e="".concat(t(Be.fullTitle,Be.locale)),{apiUrl:Ue}=to("reviews/".concat(he,"/").concat(ne.id,"/confirmReview"));de.action=Ue,ge(F5e,{title:$e,submissionId:he,logResponseForm:J.logResponseForm},{onClose:ce})}function z({submission:q,reviewAssignment:ne}){const{openDialog:ue,openDialogNetworkError:J}=Ms();let ce=q.id;ue({actions:[{label:e("common.ok"),isPrimary:!0,callback:async ge=>{const{apiUrl:de}=to("reviews/".concat(ce,"/").concat(ne.id,"/sendToOrcid")),he=new FormData;he.append("csrfToken",Pv());const{fetch:ie,isSuccess:Be}=fr(de,{method:"POST",body:he});await ie(),ge(),Be.value||J()}},{label:e("common.cancel"),callback:ge=>ge()}],title:e("dashboard.reviewAssignment.action.sendReviewToOrcid"),message:e("dashboard.reviewAssignment.action.sendReviewToOrcid.confirm")})}return{reviewerAddReviewer:n,reviewerReadReview:a,reviewerReadReviewByAuthor:i,reviewerReviewDetails:l,reviewerEmailReviewer:f,reviewerResendRequest:d,reviewerEditReview:h,reviewerUnassignReviewer:b,reviewerReinstateReviewer:S,reviewerCancelReviewer:k,reviewerReviewHistory:T,reviewerLoginAs:O,reviewerEditorialNotes:P,reviewerThankReviewer:B,reviewerRevertConsider:W,reviewerSendReminder:Z,reviewerLogResponse:Y,reviewerSendToOrcid:z}}function AKe({submissions:e,dashboardPage:t,onSubmissionDeleteCallback:n}){const{t:i}=Jn(),a=kt(!1);function l(){a.value=!0}function f(){a.value=!1}const d=kt([]);function h(Y){d.value.includes(Y)||d.value.push(Y)}function b(Y){d.value=d.value.filter(z=>z!==Y)}const{hasCurrentUserAtLeastOneAssignedRoleInAnyStage:S,hasCurrentUserAtLeastOneRole:k}=Nh();function T(Y){return!!(Y.submissionProgress&&(k([pkp.const.ROLE_ID_SITE_ADMIN,pkp.const.ROLE_ID_MANAGER])||S(Y,[pkp.const.ROLE_ID_AUTHOR])))}const O=Ge(()=>t===$f.EDITORIAL_DASHBOARD&&k([pkp.const.ROLE_ID_SITE_ADMIN,pkp.const.ROLE_ID_MANAGER])?!0:t===$f.MY_SUBMISSIONS),P=Ge(()=>{var z;const Y=[];return e.value&&((z=e.value)!=null&&z.length)&&e.value.forEach(q=>{T(q)&&Y.push(q.id)}),Y});async function B(){const{apiUrl:Y}=to("_submissions"),{fetch:z}=fr(Y,{query:{ids:d.value},method:"DELETE"});await z(),W(),n()}function W(){d.value=[],a.value=!1}function Z(){const{openDialog:Y}=Ms();Y({title:i("dashboard.submissions.incomplete.bulkDelete.confirm"),message:i("dashboard.submissions.incomplete.bulkDelete.body"),actions:[{label:i("common.confirm"),isPrimary:!0,callback:async z=>{await B(),z()}},{label:i("common.cancel"),isWarnable:!0,callback:z=>{W(),z()}}],modalStyle:"negative",close:()=>{}})}return{bulkDeleteIsAvailableForUser:O,bulkDeleteSelectionEnabled:a,bulkDeleteSelectionEnable:l,bulkDeleteSelectionDisable:f,bulkDeleteSelectedItems:d,bulkDeleteSelectItem:h,bulkDeleteDeselectItem:b,bulkDeleteResetSelection:W,bulkDeleteActionDelete:Z,bulkDeleteSubmissionIdsCanBeDeleted:P}}function B5e(){function e(l,f){let d="";if(l===pkp.const.ROLE_ID_AUTHOR){const{pageUrl:h}=to("dashboard/mySubmissions?workflowSubmissionId=".concat(f));d=h.value}else{const{pageUrl:h}=to("dashboard/editorial?workflowSubmissionId=".concat(f));d=h.value}return d}function t(l,f,d){const h=e(l,d);return"login/signInAsUser/".concat(f,"?redirectUrl=").concat(encodeURIComponent(h))}function n(l){const f=e(pkp.const.ROLE_ID_MANAGER,l);return"login/signOutAsUser?redirectUrl=".concat(encodeURIComponent(f))}function i(){const l=new URLSearchParams(window.location.search).get("workflowSubmissionId");return l?n(l):"login/signOutAsUser"}function a(){const{isUserLoggedInAs:l}=Nh();return l()?i():"login/signOut"}return{getDashboardLoginAsUrl:t,getLogoutAsUrl:i,getLogoutUrl:a}}const t9={PARTICIPANT_ASSIGN:"participantAssign",PARTICIPANT_REMOVE:"participantRemove",PARTICIPANT_EDIT:"participantEdit",PARTICIPANT_NOTIFY:"participantNotify",PARTICIPANT_LOGIN_AS:"participantLoginAs"};function V5e(){const{t:e}=Jn(),{getDashboardLoginAsUrl:t,getLogoutAsUrl:n}=B5e();function i({submission:b,submissionStageId:S},k){const{openLegacyModal:T}=Ar({component:"grid.users.stageParticipant.StageParticipantGridHandler",op:"addParticipant",params:{submissionId:b.id,stageId:S}});T({title:e("editor.submission.addStageParticipant")},k)}function a({submission:b,participant:S,submissionStageId:k},T){const{openDialog:O,openDialogNetworkError:P}=Ms();O({actions:[{label:e("common.ok"),isWarnable:!0,callback:async B=>{const{url:W}=Ar({component:"grid.users.stageParticipant.StageParticipantGridHandler",op:"deleteParticipant",params:{submissionId:b.id,stageId:k,assignmentId:S.stageAssignmentId}}),Z=new FormData;Z.append("csrfToken",Pv());const{fetch:Y,data:z}=fr(W,{method:"POST",body:Z});await Y(),B(),T(),z.value.status!==!0&&P()}},{label:e("common.cancel"),callback:B=>{B()}}],title:e("editor.submission.removeStageParticipant"),message:e("editor.submission.removeStageParticipant.description"),modalStyle:"negative"})}function l({submission:b,submissionStageId:S,participant:k},T){const{openLegacyModal:O}=Ar({component:"grid.users.stageParticipant.StageParticipantGridHandler",op:"viewNotify",params:{submissionId:b.id,stageId:S,userId:k.id}});O({title:e("submission.stageParticipants.notify")},T)}function f({submission:b,submissionStageId:S,participant:k},T){const{openLegacyModal:O}=Ar({component:"grid.users.stageParticipant.StageParticipantGridHandler",op:"addParticipant",params:{submissionId:b.id,stageId:S,assignmentId:k.stageAssignmentId}});O({title:e("editor.submission.editStageParticipant")},T)}function d({participant:b,submission:S}){const{openDialog:k}=Ms();k({actions:[{label:e("common.ok"),callback:T=>{const O=t(b.roleId,b.id,S.id),{redirectToPage:P}=to(O);P()}},{label:e("common.cancel"),isWarnable:!0,callback:T=>{T()}}],title:e("grid.action.logInAs"),message:e("grid.user.confirmLogInAs"),modalStyle:"primary"})}function h(){const b=n();if(!b)return;const{redirectToPage:S}=to(b);S()}return{participantAssign:i,participantRemove:a,participantNotify:l,participantEdit:f,participantLoginAs:d,participantLogoutAs:h}}const xs={FILE_LIST:"fileList",FILE_UPLOAD:"fileUpload",FILE_SELECT_UPLOAD:"fileSelectUpload",FILE_DOWNLOAD_ALL:"fileDownloadAll",FILE_EDIT:"fileEdit",FILE_DELETE:"fileDelete",FILE_SEE_NOTES:"fileSeeNotes"};function $te(){const{t:e,localize:t}=Jn();function n({fileStage:h,reviewRoundId:b,submission:S,submissionStageId:k,wizardTitleKey:T},O){const{openLegacyModal:P}=Ar({component:"wizard.fileUpload.FileUploadWizardHandler",op:"startWizard",params:{fileStage:h,reviewRoundId:b,submissionId:S.id,stageId:k,uploaderRoles:pkp.const.ROLE_ID_REVIEWER}});P({title:e(T)},O)}function i({gridComponent:h,fileStage:b,reviewRoundId:S,submission:k,submissionStageId:T,uploadSelectTitleKey:O},P){const{openLegacyModal:B}=Ar({component:h,op:"selectFiles",params:{fileStage:b,reviewRoundId:S,submissionId:k.id,stageId:T,uploaderRoles:pkp.const.ROLE_ID_REVIEWER}}),W=S&&k.reviewRounds.find(Z=>Z.id===S);B({title:e(O,{round:W==null?void 0:W.round})},P)}function a({fileStage:h,submission:b,submissionStageId:S,titleKey:k}){const{url:T}=Ar({component:"api.file.FileApiHandler",op:"downloadAllFiles",params:{nameLocaleKey:k,fileStage:h,submissionId:b.id,stageId:S}});window.location.href=T.value}function l({file:h,submission:b,submissionStageId:S},k){const{openLegacyModal:T}=Ar({component:"api.file.ManageFileApiHandler",op:"editMetadata",params:{submissionFileId:h.id,submissionId:b.id,stageId:S}});T({title:e("grid.action.editFile")},k)}function f({file:h,submission:b,submissionStageId:S},k){const{openDialog:T,openDialogNetworkError:O}=Ms();T({actions:[{label:e("common.ok"),isWarnable:!0,callback:async P=>{const{url:B}=Ar({component:"api.file.ManageFileApiHandler",op:"deleteFile",params:{submissionFileId:h.id,submissionId:b.id,stageId:S}}),W=new FormData;W.append("csrfToken",Pv());const{fetch:Z,data:Y}=fr(B,{method:"POST",body:W});await Z(),P(),k(),Y.value.status!==!0&&O()}},{label:e("common.cancel"),callback:P=>{P()}}],title:e("common.delete"),message:e("common.confirmDelete"),modalStyle:"negative"})}function d({file:h,submission:b,submissionStageId:S},k){const{openLegacyModal:T}=Ar({component:"informationCenter.FileInformationCenterHandler",op:"viewInformationCenter",params:{submissionFileId:h.id,submissionId:b.id,stageId:S}});T({title:"".concat(e("informationCenter.informationCenter"),": ").concat(t(h.name))},k)}return{fileUpload:n,fileSelectUpload:i,fileDownloadAll:a,fileEdit:l,fileDelete:f,fileSeeNotes:d}}const{formatShortDate:Bte}=Ed(),{t:Vi}=Jn(),{getActiveStage:H5e,getCurrentReviewRound:U5e,getCurrentReviewAssignments:n9,getActiveReviewAssignments:OKe,getReviewAssignmentsForRound:RKe,getStageLabel:DKe,checkMinimumConsideredReviews:LKe}=Va(),{hasCurrentUserAtLeastOneAssignedRoleInAnyStage:Vte,isCurrentUserAssignedAsReviewer:PKe}=Nh();function MKe(){function e({submission:i,contextMinReviewsPerSubmission:a}){var f;const l=H5e(i);if(Vte(i,[pkp.const.ROLE_ID_AUTHOR])&&!Vte(i,[pkp.const.ROLE_ID_MANAGER,pkp.const.ROLE_ID_SUB_EDITOR,pkp.const.ROLE_ID_ASSISTANT]))return[{component:"DashboardCellSubmissionActivityActionAlert",props:{alert:Vi("dashboard.noAccessBeingAuthor")}}];if(PKe(i)&&!Vte(i,[pkp.const.ROLE_ID_MANAGER,pkp.const.ROLE_ID_SUB_EDITOR,pkp.const.ROLE_ID_ASSISTANT]))return[{component:"DashboardCellSubmissionActivityActionAlert",props:{alert:Vi("dashboard.noAccessBeingReviewer")}}];if(i.status===pkp.const.STATUS_DECLINED)return[{component:"DashboardCellSubmissionActivityActionAlert",props:{alert:Vi("dashboard.declinedDuringStage",{stageName:DKe(i)})}}];if(i.submissionProgress)return[{component:"DashboardCellSubmissionActivityActionAlert",props:{actionName:"openSubmissionWizard",actionLabel:Vi("submission.list.completeSubmission"),actionArgs:{submissionId:i.id}}}];if(l.id===pkp.const.WORKFLOW_STAGE_ID_SUBMISSION&&!i.editorAssigned)return[{component:"DashboardCellSubmissionActivityActionAlert",props:{actionName:t9.PARTICIPANT_ASSIGN,actionLabel:Vi("submission.list.assignEditor"),actionArgs:{submissionId:i.id}}}];if(l.id===pkp.const.WORKFLOW_STAGE_ID_EXTERNAL_REVIEW||l.id===pkp.const.WORKFLOW_STAGE_ID_INTERNAL_REVIEW){const d=U5e(i,l.id);let h=d.statusId;const{shouldMinimumReviewsBeConsidered:b,hasMinimumReviewsCount:S}=LKe(i,l.id,d.id,a);if(l.isCurrentUserDecidingEditor)switch(h){case pkp.const.REVIEW_ROUND_STATUS_PENDING_REVIEWERS:case pkp.const.REVIEW_ROUND_STATUS_PENDING_REVIEWS:case pkp.const.REVIEW_ROUND_STATUS_REVIEWS_READY:case pkp.const.REVIEW_ROUND_STATUS_REVIEWS_COMPLETED:case pkp.const.REVIEW_ROUND_STATUS_REVIEWS_OVERDUE:case pkp.const.REVIEW_ROUND_STATUS_RETURNED_TO_REVIEW:h=pkp.const.REVIEW_ROUND_STATUS_PENDING_RECOMMENDATIONS}if(l.currentUserCanRecommendOnly){if(l.currentUserRecommendation)return[{component:"DashboardCellSubmissionActivityActionAlert",props:{alert:Vi("editor.submission.roundStatus.recommendationMadeByYou")}}];[pkp.const.REVIEW_ROUND_STATUS_PENDING_RECOMMENDATIONS,pkp.const.REVIEW_ROUND_STATUS_RECOMMENDATIONS_READY,pkp.const.REVIEW_ROUND_STATUS_RECOMMENDATIONS_COMPLETED].includes(h)&&(OKe(RKe(i.reviewAssignments,d.id)).every(T=>[pkp.const.REVIEW_ASSIGNMENT_STATUS_COMPLETE,pkp.const.REVIEW_ASSIGNMENT_STATUS_THANKED].includes(T.statusId))?h=pkp.const.REVIEW_ROUND_STATUS_REVIEWS_COMPLETED:h=pkp.const.REVIEW_ROUND_STATUS_PENDING_REVIEWS)}return h===pkp.const.REVIEW_ROUND_STATUS_PENDING_REVIEWERS?[{component:"DashboardCellSubmissionActivityActionAlert",props:{actionName:al.REVIEWER_ADD_REVIEWER,actionLabel:Vi("dashboard.assignReviewers"),actionArgs:{reviewRoundId:d.id,submissionId:i.id}}}]:h===pkp.const.REVIEW_ROUND_STATUS_REVISIONS_REQUESTED?[{component:"DashboardCellSubmissionActivityActionAlert",props:{alert:Vi("dashboard.revisionRequestedFromAuthor")}},{component:"DashboardCellSubmissionActivityReviews",props:{submissionId:i.id,reviewAssignments:n9(i,l.id)}}]:h===pkp.const.REVIEW_ROUND_STATUS_RESUBMIT_FOR_REVIEW?[{component:"DashboardCellSubmissionActivityActionAlert",props:{alert:Vi("dashboard.revisionsRequestedFromAuthorNextRound")}}]:h===pkp.const.REVIEW_ROUND_STATUS_REVISIONS_SUBMITTED?[{component:"DashboardCellSubmissionActivityActionAlert",props:{alert:Vi("submission.list.revisionsSubmitted")}},{component:"DashboardCellSubmissionActivityReviews",props:{submissionId:i.id,reviewAssignments:n9(i,l.id)}}]:h===pkp.const.REVIEW_ROUND_STATUS_PENDING_RECOMMENDATIONS?[{component:"DashboardCellSubmissionActivityActionAlert",props:{alert:Vi("dashboard.recommendOnly.pendingRecommendations")}}]:h===pkp.const.REVIEW_ROUND_STATUS_RECOMMENDATIONS_READY?[{component:"DashboardCellSubmissionActivityActionAlert",props:{alert:Vi("dashboard.recommendOnly.recommendationsReady")}}]:h===pkp.const.REVIEW_ROUND_STATUS_RECOMMENDATIONS_COMPLETED?[{component:"DashboardCellSubmissionActivityActionAlert",props:{alert:Vi("dashboard.recommendOnly.recommendationsCompleted")}}]:h===pkp.const.REVIEW_ROUND_STATUS_RESUBMIT_FOR_REVIEW_SUBMITTED?[{component:"DashboardCellSubmissionActivityActionAlert",props:{alert:Vi("submission.list.revisionsSubmitted")}},{component:"DashboardCellSubmissionActivityActionAlert",props:{alert:Vi("dashboard.newReviewRoundToBeCreated")}}]:h===pkp.const.REVIEW_ROUND_STATUS_DECLINED?[{component:"DashboardCellSubmissionActivityActionAlert",props:{alert:Vi("dashboard.declinedDuringStage",{stageName:Vi("manager.publication.reviewStage")})}}]:h===pkp.const.REVIEW_ROUND_STATUS_REVIEWS_COMPLETED&&!b?[{component:"DashboardCellSubmissionActivityActionAlert",props:{alert:Vi("editor.submission.roundStatus.reviewsCompleted")}},{component:"DashboardCellSubmissionActivityReviews",props:{submissionId:i.id,reviewAssignments:n9(i,l.id)}}]:b&&S?[{component:"DashboardCellSubmissionActivityActionAlert",props:{alert:Vi("dashboard.minimumReviewsConfirmedDecisionNeeded")}},{component:"DashboardCellSubmissionActivityReviews",props:{submissionId:i.id,reviewAssignments:n9(i,l.id)}}]:[{component:"DashboardCellSubmissionActivityReviews",props:{submissionId:i.id,reviewAssignments:n9(i,l.id)}}]}return l.id===pkp.const.WORKFLOW_STAGE_ID_EDITING?[{component:"DashboardCellSubmissionActivityActionAlert",props:{alert:Vi("dashboard.copyEditedFilesUploaded",{count:l.uploadedFilesCount||0})}}]:l.id===pkp.const.WORKFLOW_STAGE_ID_PRODUCTION&&i.status===pkp.const.STATUS_SCHEDULED&&((f=i==null?void 0:i.issueToBePublished)!=null&&f.label)?[{component:"DashboardCellSubmissionActivityActionAlert",props:{alert:Vi("dashboard.toBePublishedInIssue",{issue:i.issueToBePublished.label})}}]:{}}function t({submission:i}){var l;const a=H5e(i);if(i.submissionProgress)return[{component:"DashboardCellSubmissionActivityActionAlert",props:{actionName:"openSubmissionWizard",actionLabel:Vi("submission.list.completeSubmission"),actionArgs:{submissionId:i.id}}}];if(a.id===pkp.const.WORKFLOW_STAGE_ID_EXTERNAL_REVIEW||a.id===pkp.const.WORKFLOW_STAGE_ID_INTERNAL_REVIEW){const f=U5e(i,a.id);if([pkp.const.REVIEW_ROUND_STATUS_REVISIONS_REQUESTED].includes(f.statusId)){const d=a.id===pkp.const.WORKFLOW_STAGE_ID_INTERNAL_REVIEW?pkp.const.SUBMISSION_FILE_INTERNAL_REVIEW_REVISION:pkp.const.SUBMISSION_FILE_REVIEW_REVISION;return[{component:"DashboardCellSubmissionActivityActionAlert",props:{alert:Vi("dashboard.revisionRequested"),actionLabel:Vi("dashboard.submitRevisions"),actionName:xs.FILE_UPLOAD,actionArgs:{submissionId:i.id,fileStage:d,reviewRoundId:f.id,wizardTitleKey:Vi("editor.submissionReview.uploadFile")}}}]}else{const d=n9(i,a.id);return[{component:"DashboardCellSubmissionActivityReviewsUpdate",props:{reviewAssignments:d}},{component:"DashboardCellSubmissionActivityReviewsOpen",props:{reviewAssignments:d}}]}}return a.id===pkp.const.WORKFLOW_STAGE_ID_EDITING?[{component:"DashboardCellSubmissionActivityActionAlert",props:{alert:Vi("dashboard.copyEditedFilesUploaded",{count:a.uploadedFilesCount||0})}}]:a.id===pkp.const.WORKFLOW_STAGE_ID_PRODUCTION&&i.status===pkp.const.STATUS_SCHEDULED&&((l=i==null?void 0:i.issueToBePublished)!=null&&l.label)?[{component:"DashboardCellSubmissionActivityActionAlert",props:{alert:Vi("dashboard.toBePublishedInIssue",{issue:i.issueToBePublished.label})}}]:{}}function n({reviewAssignment:i}){if(i.status===pkp.const.REVIEW_ASSIGNMENT_STATUS_DECLINED){const a=i.dateConfirmed;return[{component:"DashboardCellReviewAssignmentActivityAlert",props:{alert:Vi("dashboard.reviewAssignment.declined",{date:Bte(a)})}}]}if([pkp.const.WORKFLOW_STAGE_ID_EDITING,pkp.const.WORKFLOW_STAGE_ID_PRODUCTION].includes(i.submissionStageId)&&!aO.includes(i.status))return[{component:"DashboardCellReviewAssignmentActivityAlert",props:{alert:Vi("submissions.incomplete")}}];if([pkp.const.REVIEW_ASSIGNMENT_STATUS_AWAITING_RESPONSE,pkp.const.REVIEW_ASSIGNMENT_STATUS_REQUEST_RESEND].includes(i.status)){const a=i.dateResponseDue;return[{component:"DashboardCellReviewAssignmentActivityAlert",props:{alert:Vi("dashboard.reviewAssignment.acceptOrDeclineRequestDate",{date:Bte(a)})}}]}if(i.status===pkp.const.REVIEW_ASSIGNMENT_STATUS_RESPONSE_OVERDUE)return[{component:"DashboardCellReviewAssignmentActivityAlert",props:{alert:Vi("dashboard.reviewAssignment.deadlineForRespondingAcceptOrDecline")}}];if(i.status===pkp.const.REVIEW_ASSIGNMENT_STATUS_ACCEPTED){const a=i.dateDue;return[{component:"DashboardCellReviewAssignmentActivityAlert",props:{alert:Vi("dashboard.reviewAssignment.completeReviewByDate",{date:a})}}]}if(i.status===pkp.const.REVIEW_ASSIGNMENT_STATUS_REVIEW_OVERDUE)return[{component:"DashboardCellReviewAssignmentActivityAlert",props:{alert:Vi("dashboard.reviewAssignment.deadlineForCompletingReviewHasPassed")}}];if(aO.includes(i.status)){const a=i.dateCompleted;return[{component:"DashboardCellReviewAssignmentActivityAlert",props:{alert:Vi("dashboard.reviewAssignment.reviewSubmitted",{date:Bte(a)})}}]}return i.status===pkp.const.REVIEW_ASSIGNMENT_STATUS_CANCELLED?[{component:"DashboardCellReviewAssignmentActivityAlert",props:{alert:"-"}}]:[]}return{getEditorialActivityForEditorialDashboard:e,getEditorialActivityForMySubmissions:t,getEditorialActivityForMyReviewAssignments:n}}function NKe(){const{t:e}=Jn();function t(){const a=[];return a.push({component:"DashboardActionButton",props:{label:e("common.filter"),action:"openFiltersModal"}}),a.push({component:"DashboardControlBulkActions",props:{}}),a.push({component:"DashboardControlBulkDeleteButton",props:{}}),a}function n(){const a=[];return a.push({component:"DashboardControlSearch",props:{}}),a}function i({dashboardPage:a}){const l=[];return a===$f.MY_REVIEW_ASSIGNMENTS?(l.push({id:"id",header:e("common.id"),component:"DashboardCellReviewAssignmentId",sortable:!0}),l.push({id:"title",header:e("navigation.submissions"),component:"DashboardCellReviewAssignmentTitle",sortable:!1}),l.push({id:"activity",header:e("stats.editorialActivity"),component:"DashboardCellReviewAssignmentActivity",sortable:!1}),l.push({id:"actions",header:e("admin.jobs.list.actions"),component:"DashboardCellReviewAssignmentActions",sortable:!1})):a===$f.MY_SUBMISSIONS?(l.push({id:"id",header:e("common.id"),component:"DashboardCellSubmissionId",sortable:!0}),l.push({id:"title",header:e("navigation.submissions"),component:"DashboardCellSubmissionTitle",sortable:!1}),l.push({id:"stage",header:e("workflow.stage"),component:"DashboardCellSubmissionStage",sortable:!1}),l.push({id:"activity",header:e("stats.editorialActivity"),component:"DashboardCellSubmissionActivity",sortable:!1}),l.push({id:"actions",header:e("admin.jobs.list.actions"),component:"DashboardCellSubmissionActions",sortable:!1})):(l.push({id:"id",header:e("common.id"),component:"DashboardCellSubmissionId",sortable:!0}),l.push({id:"title",header:e("navigation.submissions"),component:"DashboardCellSubmissionTitle",sortable:!1}),l.push({id:"stage",header:e("workflow.stage"),component:"DashboardCellSubmissionStage",sortable:!1}),l.push({id:"lastActivity",header:e("editor.submission.days"),component:"DashboardCellSubmissionDays",sortable:!0}),l.push({id:"activity",header:e("stats.editorialActivity"),component:"DashboardCellSubmissionActivity",sortable:!1}),l.push({id:"actions",header:e("admin.jobs.list.actions"),component:"DashboardCellSubmissionActions",sortable:!1})),l}return{getLeftControls:t,getRightControls:n,getColumns:i}}const{tk:ga,t:s9}=Jn(),{calculateDaysBetweenDates:FKe,formatShortDate:z5e}=Ed(),pi={RESEND_REVIEW_REQUEST:"resendReviewRequest",EDIT_DUE_DATE:"editDueDate",VIEW_DETAILS:"viewDetails",CANCEL_REVIEWER:"cancelReviewer",UNASSIGN_REVIEWER:"unassignReviewer",VIEW_RECOMMENDATION:"viewRecommendation",VIEW_UNREAD_RECOMMENDATION:"viewUnreadRecommendation"},Hte={[pi.RESEND_REVIEW_REQUEST]:al.REVIEWER_RESEND_REQUEST,[pi.EDIT_DUE_DATE]:al.REVIEWER_EDIT_REVIEW,[pi.VIEW_DETAILS]:al.REVIEWER_REVIEW_DETAILS,[pi.CANCEL_REVIEWER]:al.REVIEWER_CANCEL_REVIEWER,[pi.UNASSIGN_REVIEWER]:al.REVIEWER_UNASSIGN_REVIEWER,[pi.VIEW_RECOMMENDATION]:al.REVIEWER_REVIEW_DETAILS,[pi.VIEW_UNREAD_RECOMMENDATION]:al.REVIEWER_REVIEW_DETAILS},Ute={[pi.RESEND_REVIEW_REQUEST]:ga("dashboard.reviewAssignment.action.resendReviewRequest"),[pi.EDIT_DUE_DATE]:ga("dashboard.reviewAssignment.action.editDueDate"),[pi.VIEW_DETAILS]:ga("dashboard.reviewAssignment.action.viewDetails"),[pi.CANCEL_REVIEWER]:ga("dashboard.reviewAssignment.action.cancelReviewer"),[pi.UNASSIGN_REVIEWER]:ga("dashboard.reviewAssignment.action.unassignReviewer"),[pi.VIEW_RECOMMENDATION]:ga("dashboard.reviewAssignment.action.viewRecommendation"),[pi.VIEW_UNREAD_RECOMMENDATION]:ga("dashboard.reviewAssignment.action.viewUnreadRecommendation")},W5e={[pkp.const.REVIEW_ASSIGNMENT_STATUS_AWAITING_RESPONSE]:{reviewActivityIndicator:{colorVariant:"stage-in-review",displayVariant:"progress"},badgeProps:{icon:"ReviewSent",colorVariant:"stage-in-review-bg"},titleKey:ga("dashboard.reviewAssignment.statusAwaitingResponse.title"),descriptionKey:ga("dashboard.reviewAssignment.statusAwaitingResponse.description"),textAction:pi.EDIT_DUE_DATE,primaryAction:pi.VIEW_DETAILS,negativeAction:pi.UNASSIGN_REVIEWER,dateToDisplay:"dateResponseDue"},[pkp.const.REVIEW_ASSIGNMENT_STATUS_DECLINED]:{reviewActivityIndicator:{colorVariant:"negative",displayVariant:"fill",icon:"ReviewRequestDeclined"},badgeProps:{colorVariant:"negative-bg",icon:"ReviewRequestDeclined"},titleKey:ga("dashboard.reviewAssignment.statusDeclined.title"),descriptionKey:ga("dashboard.reviewAssignment.statusDeclined.description"),textAction:pi.RESEND_REVIEW_REQUEST,primaryAction:pi.VIEW_DETAILS,negativeAction:pi.CANCEL_REVIEWER,dateToDisplay:"dateConfirmed"},[pkp.const.REVIEW_ASSIGNMENT_STATUS_RESPONSE_OVERDUE]:{reviewActivityIndicator:{colorVariant:"attention",displayVariant:"progress"},badgeProps:{colorVariant:"attention-bg",icon:"Overdue"},titleKey:ga("dashboard.reviewAssignment.statusResponseOverdue.title"),descriptionKey:ga("dashboard.reviewAssignment.statusResponseOverdue.description"),textAction:pi.EDIT_DUE_DATE,primaryAction:pi.VIEW_DETAILS,negativeAction:pi.UNASSIGN_REVIEWER,dateToDisplay:"dateResponseDue"},[pkp.const.REVIEW_ASSIGNMENT_STATUS_ACCEPTED]:{reviewActivityIndicator:{colorVariant:"primary",displayVariant:"progress"},badgeProps:{colorVariant:"primary-bg",icon:"InProgress"},titleKey:ga("dashboard.reviewAssignment.statusAccepted.title"),descriptionKey:ga("dashboard.reviewAssignment.statusAccepted.description"),textAction:pi.EDIT_DUE_DATE,primaryAction:pi.VIEW_DETAILS,negativeAction:pi.CANCEL_REVIEWER,dateToDisplay:"dateDue"},[pkp.const.REVIEW_ASSIGNMENT_STATUS_REVIEW_OVERDUE]:{reviewActivityIndicator:{colorVariant:"attention",displayVariant:"fill"},badgeProps:{colorVariant:"attention-bg",icon:"Overdue"},titleKey:ga("dashboard.reviewAssignment.statusReviewOverdue.title"),descriptionKey:ga("dashboard.reviewAssignment.statusReviewOverdue.description"),textAction:pi.EDIT_DUE_DATE,primaryAction:pi.VIEW_DETAILS,negativeAction:pi.CANCEL_REVIEWER,dateToDisplay:"dateDue"},[pkp.const.REVIEW_ASSIGNMENT_STATUS_RECEIVED]:{reviewActivityIndicator:{colorVariant:"success",displayVariant:"fill",icon:"Email"},badgeProps:{colorVariant:"success-bg",icon:"Complete"},titleKey:ga("dashboard.reviewAssignment.statusReceived.title"),descriptionKey:ga("dashboard.reviewAssignment.statusReceived.description"),descriptionWithoutRecommendationKey:ga("dashboard.reviewAssignment.statusReceived.withoutRecommendation.description"),textAction:null,primaryAction:pi.VIEW_UNREAD_RECOMMENDATION,negativeAction:null,dateToDisplay:"dateCompleted"},[pkp.const.REVIEW_ASSIGNMENT_STATUS_VIEWED]:{reviewActivityIndicator:{colorVariant:"success",displayVariant:"fill",icon:"EmailOpened"},badgeProps:{colorVariant:"success-bg",icon:"Complete"},titleKey:ga("dashboard.reviewAssignment.statusReceived.title"),descriptionKey:ga("dashboard.reviewAssignment.statusReceived.description"),descriptionWithoutRecommendationKey:ga("dashboard.reviewAssignment.statusReceived.withoutRecommendation.description"),textAction:null,primaryAction:pi.VIEW_RECOMMENDATION,negativeAction:null,dateToDisplay:"dateCompleted"},[pkp.const.REVIEW_ASSIGNMENT_STATUS_COMPLETE]:{reviewActivityIndicator:{colorVariant:"success",displayVariant:"fill",icon:"Complete"},badgeProps:{colorVariant:"success-bg",icon:"Complete"},titleKey:ga("dashboard.reviewAssignment.statusComplete.title"),descriptionKey:ga("dashboard.reviewAssignment.statusComplete.description"),textAction:null,primaryAction:pi.VIEW_RECOMMENDATION,negativeAction:null,dateToDisplay:"dateConsidered"},[pkp.const.REVIEW_ASSIGNMENT_STATUS_THANKED]:{reviewActivityIndicator:{colorVariant:"success",displayVariant:"fill",icon:"Complete"},badgeProps:{colorVariant:"success-bg",icon:"Complete"},titleKey:ga("dashboard.reviewAssignment.statusComplete.title"),descriptionKey:ga("dashboard.reviewAssignment.statusComplete.description"),textAction:null,primaryAction:pi.VIEW_RECOMMENDATION,negativeAction:null,dateToDisplay:"dateConsidered"},[pkp.const.REVIEW_ASSIGNMENT_STATUS_CANCELLED]:{reviewActivityIndicator:{colorVariant:"negative",displayVariant:"fill",icon:"Cancel"},badgeProps:{colorVariant:"negative-bg",icon:"Cancel"},titleKey:ga("dashboard.reviewAssignment.statusCancelled.title"),descriptionKey:ga("dashboard.reviewAssignment.statusCancelled.description"),textAction:pi.RESEND_REVIEW_REQUEST,primaryAction:pi.VIEW_DETAILS,negativeAction:null,dateToDisplay:"dateCancelled"},[pkp.const.REVIEW_ASSIGNMENT_STATUS_REQUEST_RESEND]:{reviewActivityIndicator:{colorVariant:"stage-in-review",displayVariant:"progress"},badgeProps:{colorVariant:"stage-in-review-bg",icon:"ReviewSent"},titleKey:ga("dashboard.reviewAssignment.statusRequestResend.title"),descriptionKey:ga("dashboard.reviewAssignment.statusRequestResend.description"),textAction:pi.EDIT_DUE_DATE,primaryAction:pi.VIEW_DETAILS,negativeAction:pi.UNASSIGN_REVIEWER,dateToDisplay:"dateResponseDue"}};function j5e(e,t){return e.dateToDisplay&&t[e.dateToDisplay]?FKe(new Date,t[e.dateToDisplay]):null}function Z5e(e,t,n){return s9(e.titleKey,{date:z5e(t),days:Math.abs(n)})}function q5e(e,t){return e.dateToDisplay&&t[e.dateToDisplay]?t[e.dateToDisplay]:""}function $Ke(){function e({reviewAssignment:n}){const i=W5e[n.statusId],a=i.reviewActivityIndicator,l=a.displayVariant==="progress";let f=null;if(l){const k=new Date(n.dateAssigned),T=new Date(n[i.dateToDisplay]);f=100*(1-(new Date-k)/(T-k))}const d=String(j5e(i,n)),h=a.icon?null:d,b=q5e(i,n),S=Z5e(i,b,d);return{...a,text:h,progress:f,srLabel:S}}function t({reviewAssignment:n}){const i=W5e[n.statusId],a=q5e(i,n);function l(){return PV[n.recommendation]?s9(PV[n.recommendation]):null}const f=j5e(i,n),d=Z5e(i,a,f);function h(){const T=l();let O=i.descriptionKey;return i.descriptionWithoutRecommendationKey&&!T&&(O=i.descriptionWithoutRecommendationKey),s9(O,{date:z5e(a),days:Math.abs(f),recommendation:T})}function b(){return i.textAction?s9(Ute[i.textAction]):null}function S(){return i.primaryAction?s9(Ute[i.primaryAction]):null}function k(){return i.negativeAction?s9(Ute[i.negativeAction]):null}return{titleBadgeProps:i.badgeProps,title:d,description:h(),reviewMethod:n.reviewMethod,textButton:i.textAction&&{action:Hte[i.textAction],label:b()},primaryButton:i.primaryAction&&{action:Hte[i.primaryAction],label:S()},negativeButton:i.negativeAction&&{action:Hte[i.negativeAction],label:k()},reviewerName:n.reviewerFullName}}return{getReviewActivityIndicatorProps:e,getReviewActivityIndicatorPopoverProps:t}}const BKe={class:"p-4"},VKe={class:"bg-secondary p-4"},HKe={class:"border-t border-light"},UKe={class:"bg-secondary p-4"},zKe={class:"mt-4 flex justify-end gap-2"},WKe={__name:"DashboardModalFilters",props:{filtersFormInitial:{type:Object,required:!0}},emits:["updateFiltersForm"],setup(e,{emit:t}){const n=e,i=t,{t:a}=Jn(),l=JSON.parse(JSON.stringify(n.filtersFormInitial)),{filtersForm:f,updateFiltersForm:d,clearFiltersForm:h}=Iee(l),b=Mr("closeModal");function S(){i("updateFiltersForm",f.value),b()}return(k,T)=>(L(),Ee(il,null,{title:te(()=>[H("h2",null,ee(se(a)("common.filter")),1)]),default:te(()=>[T[5]||(T[5]=D()),H("div",BKe,[H("div",VKe,[pe(oa,Cn(se(f),{onSet:T[0]||(T[0]=(O,P)=>se(d)(P))}),null,16)]),T[4]||(T[4]=D()),H("div",HKe,[H("div",UKe,[H("div",zKe,[pe(ms,{onClick:T[1]||(T[1]=O=>se(h)())},{default:te(()=>[D(ee(se(a)("common.filtersClear")),1)]),_:1}),T[3]||(T[3]=D()),pe(ms,{"is-primary":"true",onClick:T[2]||(T[2]=O=>S())},{default:te(()=>[D(ee(se(a)("dashboard.applyFilters")),1)]),_:1})])])])])]),_:1}))}},{t:zte,tk:Wte}=Jn(),jKe={editorialDashboard:Wte("navigation.dashboards"),myReviewAssignments:Wte("navigation.reviewAssignments"),mySubmissions:Wte("navigation.mySubmissions")},ZKe={editorialDashboard:"Dashboard",myReviewAssignments:"ReviewAssignments",mySubmissions:"MySubmissions"},$f={EDITORIAL_DASHBOARD:"editorialDashboard",MY_REVIEW_ASSIGNMENTS:"myReviewAssignments",MY_SUBMISSIONS:"mySubmissions"},Wp=Nf("dashboard",e=>{const t=jte(),n=C5(),i=e.dashboardPage,a=e.contextMinReviewsPerSubmission,{openSideModal:l}=Ms(),{announce:f}=iO(),d=Ge(()=>zte(jKe[i])),h=Ge(()=>ZKe[i]),b=HV(),S=n.addFns(NKe()),k=Ge(()=>S.getLeftControls({dashboardPage:i})),T=Ge(()=>S.getRightControls({dashboardPage:i})),O=kt(e.views),P=Ge(()=>O.value.find(_n=>_n.id===b.currentViewId)?b.currentViewId:(b.currentViewId=O.value[0].id,O.value[0].id));io(()=>b.currentViewId,(yt,_n)=>{yt!==_n&&(Fe.value=1,he(),z())});const B=Ge(()=>O.value.find(yt=>yt.id===P.value)||{}),W=Ge(()=>S.getColumns({dashboardPage:i})),Z=Ge(()=>b.searchPhrase||"");function Y(yt){b.searchPhrase=yt,Fe.value=1}function z(){b.searchPhrase=void 0}const q=kt(!1);function ne(){l(WKe,{filtersFormInitial:ue,onUpdateFiltersForm:de})}const ue=kt(e.filtersForm),{filtersFormList:J,filtersFormQueryParamsApi:ce,filtersFormQueryParams:ge,updateFiltersForm:de,clearFiltersForm:he,clearFiltersFormField:ie,initFiltersFormFromQueryParams:Be}=Iee(ue);io(ge,yt=>{Object.keys(yt).forEach(_n=>{JSON.stringify(b[_n])!==JSON.stringify(yt[_n])&&(b[_n]=yt[_n])})}),io(b,yt=>{Be(yt)},{immediate:!0});const{sortDescriptor:$e,sortQueryParamsApi:Ue,applySort:V,sortQueryParams:Ye}=Rbe();b.sortColumn&&V(b.sortColumn,b.sortDirection),io(Ye,yt=>{yt.sortColumn&&(b.sortColumn=yt.sortColumn),yt.sortDirection&&(b.sortDirection=yt.sortDirection)});const Fe=kt(1);function St(yt){Fe.value=yt}const Dt=kt(e.countPerPage),{apiUrl:He}=to("_submissions"),ft=Ge(()=>{var yt;return(yt=B.value)!=null&&yt.op?He.value+"/"+B.value.op:He.value}),ht=Ge(()=>({searchPhrase:Z.value||void 0,...B.value.queryParams,...ce.value,...Ue.value})),{items:At,pagination:hn,isLoading:ct,fetch:Ht}=BV(ft,{currentPage:Fe,pageSize:Dt,query:ht,debouncedMs:2});function ye(yt=!0){Ht(),yt&&t.triggerReloadViewsCount(i)}io([ft,ht,Fe],async()=>{He.value&&P.value!==null&&(f(zte("common.loading")),await ye({}),f(zte("common.loaded")))},{immediate:!1}),ye(!1);const lo=$5e(),jn=V5e(),so=$te(),{getCurrentPublication:Xs}=Va();function ot(){ye()}const{bulkDeleteIsAvailableForUser:Qe,bulkDeleteSelectionEnabled:Ot,bulkDeleteSelectionEnable:Nt,bulkDeleteSelectionDisable:Ve,bulkDeleteSelectedItems:dn,bulkDeleteSelectItem:kn,bulkDeleteDeselectItem:Bt,bulkDeleteSubmissionIdsCanBeDeleted:Le,bulkDeleteActionDelete:je,bulkDeleteResetSelection:Ze}=AKe({submissions:At,dashboardPage:i,onSubmissionDeleteCallback:()=>{ye()}});io(ht,()=>{Ze()});function pt({submissionId:yt}){const{redirectToPage:_n}=to("reviewer/submission/".concat(encodeURIComponent(yt)),{});_n()}function Vt({submissionId:yt,..._n}){const us=At.value.find(br=>br.id===yt),Zo=Xs(us);return{submissionStageId:us.stageId,submission:us,submissionId:yt,selectedPublication:Zo,..._n}}function sn({reviewRoundId:yt,submissionId:_n}){lo.reviewerAddReviewer(Vt({reviewRoundId:yt,submissionId:_n}),ot)}function Wn({reviewAssignment:yt,submissionId:_n}){lo.reviewerResendRequest(Vt({reviewAssignment:yt,submissionId:_n}),ot)}function ts({reviewAssignment:yt,submissionId:_n}){lo.reviewerEditReview(Vt({reviewAssignment:yt,submissionId:_n}),ot)}function Zn({reviewAssignment:yt,submissionId:_n}){lo.reviewerReviewDetails(Vt({reviewAssignment:yt,submissionId:_n}),ot)}function yo({reviewAssignment:yt,submissionId:_n}){lo.reviewerCancelReviewer(Vt({reviewAssignment:yt,submissionId:_n}),ot)}function Qs({reviewAssignment:yt,submissionId:_n}){lo.reviewerUnassignReviewer(Vt({reviewAssignment:yt,submissionId:_n}),ot)}function Rs(yt){so.fileUpload(Vt(yt),ot)}function xr({submissionId:yt}){jn.participantAssign(Vt({submissionId:yt}),ot)}const Po=kt(null),jo=Ge(()=>parseInt(b.workflowSubmissionId));function Mo(yt){b.workflowSubmissionId=yt,l("WorkflowPage",{submissionId:yt,pageInitConfig:e},{onClose:async()=>{b.workflowSubmissionId=null,b.workflowMenuKey=null,await ye()}})}b.workflowSubmissionId&&Mo(parseInt(b.workflowSubmissionId));function Do({submissionId:yt}){const{redirectToPage:_n}=to("submission?id=".concat(yt));_n()}const er=n.addFns(MKe());function Zs(yt){return er.getEditorialActivityForEditorialDashboard({...yt,dashboardPage:i,contextMinReviewsPerSubmission:a})}function Xa(yt){return er.getEditorialActivityForMySubmissions({...yt,dashboardPage:i})}function bn(yt){return er.getEditorialActivityForMyReviewAssignments({...yt,dashboardPage:i})}const qs=n.addFns($Ke());function Qr(yt){return qs.getReviewActivityIndicatorProps({...yt,dashboardPage:i})}function lt(yt){return qs.getReviewActivityIndicatorPopoverProps({...yt,dashboardPage:i})}return{dashboardPage:i,dashboardPageTitle:d,dashboardPageIcon:h,leftControlItems:k,rightControlItems:T,views:O,currentViewId:P,currentView:B,columns:W,searchPhrase:Z,setSearchPhrase:Y,resetSearchPhrase:z,filtersForm:ue,filtersFormList:J,filtersFormQueryParamsApi:ce,filtersFormQueryParams:ge,updateFiltersForm:de,clearFiltersForm:he,clearFiltersFormField:ie,sortDescriptor:$e,sortQueryParamsApi:Ue,applySort:V,submissions:At,submissionsPagination:hn,isSubmissionsLoading:ct,fetchSubmissions:ye,setCurrentPage:St,bulkDeleteIsAvailableForUser:Qe,bulkDeleteSelectionEnabled:Ot,bulkDeleteSelectionEnable:Nt,bulkDeleteSelectionDisable:Ve,bulkDeleteSelectedItems:dn,bulkDeleteSelectItem:kn,bulkDeleteDeselectItem:Bt,bulkDeleteSubmissionIdsCanBeDeleted:Le,bulkDeleteActionDelete:je,workflowSubmissionId:jo,openReviewerForm:pt,fileUpload:Rs,reviewerAddReviewer:sn,reviewerReviewDetails:Zn,reviewerResendRequest:Wn,reviewerEditReview:ts,reviewerCancelReviewer:yo,reviewerUnassignReviewer:Qs,participantAssign:xr,selectedSubmission:Po,openWorkflowModal:Mo,openSubmissionWizard:Do,isModalOpenedFilters:q,openFiltersModal:ne,getEditorialActivityForEditorialDashboard:Zs,getEditorialActivityForMySubmissions:Xa,getEditorialActivityForMyReviewAssignments:bn,getReviewActivityIndicatorProps:Qr,getReviewActivityIndicatorPopoverProps:lt,contextMinReviewsPerSubmission:a,componentForms:e.componentForms,extender:n,props:e}}),jte=LA("app",()=>{const e=kt(!1),t=xee(()=>{e.value=!0,setTimeout(()=>{e.value=!1},100)},5e3,!0,!0),n=kt(!1),i=xee(()=>{n.value=!0,setTimeout(()=>{n.value=!1},100)},5e3,!0,!0),a=kt(!1),l=xee(()=>{a.value=!0,setTimeout(()=>{a.value=!1},100)},5e3,!0,!0);function f(b){switch(b){case $f.EDITORIAL_DASHBOARD:t();break;case $f.MY_SUBMISSIONS:i();break;case $f.MY_REVIEW_ASSIGNMENTS:l();break}}const d=kt(!1);function h(b){d.value=b}return{triggerReloadViewsCount:f,shouldReloadViewCountsEditorDashboard:e,shouldReloadViewCountsMySubmissions:n,shouldReloadViewCountsReviewAssignments:a,isTasksModalOpened:d,updateIsTasksModalOpened:h}});var qKe="\n.p-icon {\n display: inline-block;\n vertical-align: baseline;\n}\n\n.p-icon-spin {\n -webkit-animation: p-icon-spin 2s infinite linear;\n animation: p-icon-spin 2s infinite linear;\n}\n\n@-webkit-keyframes p-icon-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(359deg);\n transform: rotate(359deg);\n }\n}\n\n@keyframes p-icon-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(359deg);\n transform: rotate(359deg);\n }\n}\n",GKe=lc.extend({name:"baseicon",css:qKe});function $O(e){"@babel/helpers - typeof";return $O=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$O(e)}function G5e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function K5e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?G5e(Object(n),!0).forEach(function(i){KKe(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G5e(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function KKe(e,t,n){return(t=YKe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YKe(e){var t=XKe(e,"string");return $O(t)=="symbol"?t:t+""}function XKe(e,t){if($O(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if($O(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Y5e={name:"BaseIcon",extends:FO,props:{label:{type:String,default:void 0},spin:{type:Boolean,default:!1}},style:GKe,provide:function(){return{$pcIcon:this,$parentInstance:this}},methods:{pti:function(){var t=_5(this.label);return K5e(K5e({},!this.isUnstyled&&{class:["p-icon",{"p-icon-spin":this.spin}]}),{},{role:t?void 0:"img","aria-label":t?void 0:this.label,"aria-hidden":t})}}},Zte={name:"ChevronDownIcon",extends:Y5e};function JKe(e,t,n,i,a,l){return L(),Q("svg",Cn({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.pti()),t[0]||(t[0]=[H("path",{d:"M7.01744 10.398C6.91269 10.3985 6.8089 10.378 6.71215 10.3379C6.61541 10.2977 6.52766 10.2386 6.45405 10.1641L1.13907 4.84913C1.03306 4.69404 0.985221 4.5065 1.00399 4.31958C1.02276 4.13266 1.10693 3.95838 1.24166 3.82747C1.37639 3.69655 1.55301 3.61742 1.74039 3.60402C1.92777 3.59062 2.11386 3.64382 2.26584 3.75424L7.01744 8.47394L11.769 3.75424C11.9189 3.65709 12.097 3.61306 12.2748 3.62921C12.4527 3.64535 12.6199 3.72073 12.7498 3.84328C12.8797 3.96582 12.9647 4.12842 12.9912 4.30502C13.0177 4.48162 12.9841 4.662 12.8958 4.81724L7.58083 10.1322C7.50996 10.2125 7.42344 10.2775 7.32656 10.3232C7.22968 10.3689 7.12449 10.3944 7.01744 10.398Z",fill:"currentColor"},null,-1)]),16)}Zte.render=JKe;var qte={name:"ChevronRightIcon",extends:Y5e};function QKe(e,t,n,i,a,l){return L(),Q("svg",Cn({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.pti()),t[0]||(t[0]=[H("path",{d:"M4.38708 13C4.28408 13.0005 4.18203 12.9804 4.08691 12.9409C3.99178 12.9014 3.9055 12.8433 3.83313 12.7701C3.68634 12.6231 3.60388 12.4238 3.60388 12.2161C3.60388 12.0084 3.68634 11.8091 3.83313 11.6622L8.50507 6.99022L3.83313 2.31827C3.69467 2.16968 3.61928 1.97313 3.62287 1.77005C3.62645 1.56698 3.70872 1.37322 3.85234 1.22959C3.99596 1.08597 4.18972 1.00371 4.3928 1.00012C4.59588 0.996539 4.79242 1.07192 4.94102 1.21039L10.1669 6.43628C10.3137 6.58325 10.3962 6.78249 10.3962 6.99022C10.3962 7.19795 10.3137 7.39718 10.1669 7.54416L4.94102 12.7701C4.86865 12.8433 4.78237 12.9014 4.68724 12.9409C4.59212 12.9804 4.49007 13.0005 4.38708 13Z",fill:"currentColor"},null,-1)]),16)}qte.render=QKe;var eYe=({dt:e})=>"\n.p-panelmenu {\n display: flex;\n flex-direction: column;\n gap: ".concat(e("panelmenu.gap"),";\n}\n\n.p-panelmenu-panel {\n background: ").concat(e("panelmenu.panel.background"),";\n border-width: ").concat(e("panelmenu.panel.border.width"),";\n border-style: solid;\n border-color: ").concat(e("panelmenu.panel.border.color"),";\n color: ").concat(e("panelmenu.panel.color"),";\n border-radius: ").concat(e("panelmenu.panel.border.radius"),";\n padding: ").concat(e("panelmenu.panel.padding"),";\n}\n\n.p-panelmenu-panel:first-child {\n border-width: ").concat(e("panelmenu.panel.first.border.width"),";\n border-start-start-radius: ").concat(e("panelmenu.panel.first.top.border.radius"),";\n border-start-end-radius: ").concat(e("panelmenu.panel.first.top.border.radius"),";\n}\n\n.p-panelmenu-panel:last-child {\n border-width: ").concat(e("panelmenu.panel.last.border.width"),";\n border-end-start-radius: ").concat(e("panelmenu.panel.last.bottom.border.radius"),";\n border-end-end-radius: ").concat(e("panelmenu.panel.last.bottom.border.radius"),";\n}\n\n.p-panelmenu-header {\n outline: 0 none;\n}\n\n.p-panelmenu-header-content {\n border-radius: ").concat(e("panelmenu.item.border.radius"),";\n transition: background ").concat(e("panelmenu.transition.duration"),", color ").concat(e("panelmenu.transition.duration"),", outline-color ").concat(e("panelmenu.transition.duration"),", box-shadow ").concat(e("panelmenu.transition.duration"),";\n outline-color: transparent;\n color: ").concat(e("panelmenu.item.color"),";\n}\n\n.p-panelmenu-header-link {\n display: flex;\n gap: ").concat(e("panelmenu.item.gap"),";\n padding: ").concat(e("panelmenu.item.padding"),";\n align-items: center;\n user-select: none;\n cursor: pointer;\n position: relative;\n text-decoration: none;\n color: inherit;\n}\n\n.p-panelmenu-header-icon,\n.p-panelmenu-item-icon {\n color: ").concat(e("panelmenu.item.icon.color"),";\n}\n\n.p-panelmenu-submenu-icon {\n color: ").concat(e("panelmenu.submenu.icon.color"),";\n}\n\n.p-panelmenu-submenu-icon:dir(rtl) {\n transform: rotate(180deg);\n}\n\n.p-panelmenu-header:not(.p-disabled):focus-visible .p-panelmenu-header-content {\n background: ").concat(e("panelmenu.item.focus.background"),";\n color: ").concat(e("panelmenu.item.focus.color"),";\n}\n\n.p-panelmenu-header:not(.p-disabled):focus-visible .p-panelmenu-header-content .p-panelmenu-header-icon {\n color: ").concat(e("panelmenu.item.icon.focus.color"),";\n}\n\n.p-panelmenu-header:not(.p-disabled):focus-visible .p-panelmenu-header-content .p-panelmenu-submenu-icon {\n color: ").concat(e("panelmenu.submenu.icon.focus.color"),";\n}\n\n.p-panelmenu-header:not(.p-disabled) .p-panelmenu-header-content:hover {\n background: ").concat(e("panelmenu.item.focus.background"),";\n color: ").concat(e("panelmenu.item.focus.color"),";\n}\n\n.p-panelmenu-header:not(.p-disabled) .p-panelmenu-header-content:hover .p-panelmenu-header-icon {\n color: ").concat(e("panelmenu.item.icon.focus.color"),";\n}\n\n.p-panelmenu-header:not(.p-disabled) .p-panelmenu-header-content:hover .p-panelmenu-submenu-icon {\n color: ").concat(e("panelmenu.submenu.icon.focus.color"),";\n}\n\n.p-panelmenu-submenu {\n margin: 0;\n padding: 0 0 0 ").concat(e("panelmenu.submenu.indent"),";\n outline: 0;\n list-style: none;\n}\n\n.p-panelmenu-submenu:dir(rtl) {\n padding: 0 ").concat(e("panelmenu.submenu.indent")," 0 0;\n}\n\n.p-panelmenu-item-link {\n display: flex;\n gap: ").concat(e("panelmenu.item.gap"),";\n padding: ").concat(e("panelmenu.item.padding"),";\n align-items: center;\n user-select: none;\n cursor: pointer;\n text-decoration: none;\n color: inherit;\n position: relative;\n overflow: hidden;\n}\n\n.p-panelmenu-item-label {\n line-height: 1;\n}\n\n.p-panelmenu-item-content {\n border-radius: ").concat(e("panelmenu.item.border.radius"),";\n transition: background ").concat(e("panelmenu.transition.duration"),", color ").concat(e("panelmenu.transition.duration"),", outline-color ").concat(e("panelmenu.transition.duration"),", box-shadow ").concat(e("panelmenu.transition.duration"),";\n color: ").concat(e("panelmenu.item.color"),";\n outline-color: transparent;\n}\n\n.p-panelmenu-item.p-focus > .p-panelmenu-item-content {\n background: ").concat(e("panelmenu.item.focus.background"),";\n color: ").concat(e("panelmenu.item.focus.color"),";\n}\n\n.p-panelmenu-item.p-focus > .p-panelmenu-item-content .p-panelmenu-item-icon {\n color: ").concat(e("panelmenu.item.focus.color"),";\n}\n\n.p-panelmenu-item.p-focus > .p-panelmenu-item-content .p-panelmenu-submenu-icon {\n color: ").concat(e("panelmenu.submenu.icon.focus.color"),";\n}\n\n.p-panelmenu-item:not(.p-disabled) > .p-panelmenu-item-content:hover {\n background: ").concat(e("panelmenu.item.focus.background"),";\n color: ").concat(e("panelmenu.item.focus.color"),";\n}\n\n.p-panelmenu-item:not(.p-disabled) > .p-panelmenu-item-content:hover .p-panelmenu-item-icon {\n color: ").concat(e("panelmenu.item.icon.focus.color"),";\n}\n\n.p-panelmenu-item:not(.p-disabled) > .p-panelmenu-item-content:hover .p-panelmenu-submenu-icon {\n color: ").concat(e("panelmenu.submenu.icon.focus.color"),";\n}\n"),tYe={root:"p-panelmenu p-component",panel:"p-panelmenu-panel",header:function(t){var n=t.instance,i=t.item;return["p-panelmenu-header",{"p-panelmenu-header-active":n.isItemActive(i)&&!!i.items,"p-disabled":n.isItemDisabled(i)}]},headerContent:"p-panelmenu-header-content",headerLink:"p-panelmenu-header-link",headerIcon:"p-panelmenu-header-icon",headerLabel:"p-panelmenu-header-label",contentContainer:"p-panelmenu-content-container",content:"p-panelmenu-content",rootList:"p-panelmenu-root-list",item:function(t){var n=t.instance,i=t.processedItem;return["p-panelmenu-item",{"p-focus":n.isItemFocused(i),"p-disabled":n.isItemDisabled(i)}]},itemContent:"p-panelmenu-item-content",itemLink:"p-panelmenu-item-link",itemIcon:"p-panelmenu-item-icon",itemLabel:"p-panelmenu-item-label",submenuIcon:"p-panelmenu-submenu-icon",submenu:"p-panelmenu-submenu",separator:"p-menuitem-separator"},nYe=lc.extend({name:"panelmenu",style:eYe,classes:tYe});function BO(e){"@babel/helpers - typeof";return BO=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},BO(e)}function X5e(e,t){return iYe(e)||rYe(e,t)||oYe(e,t)||sYe()}function sYe(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function oYe(e,t){if(e){if(typeof e=="string")return J5e(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?J5e(e,t):void 0}}function J5e(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function rYe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i,a,l,f,d=[],h=!0,b=!1;try{if(l=(n=n.call(e)).next,t!==0)for(;!(h=(i=l.call(n)).done)&&(d.push(i.value),d.length!==t);h=!0);}catch(S){b=!0,a=S}finally{try{if(!h&&n.return!=null&&(f=n.return(),Object(f)!==f))return}finally{if(b)throw a}}return d}}function iYe(e){if(Array.isArray(e))return e}function Q5e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function na(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Q5e(Object(n),!0).forEach(function(i){Gte(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q5e(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Gte(e,t,n){return(t=aYe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aYe(e){var t=lYe(e,"string");return BO(t)=="symbol"?t:t+""}function lYe(e,t){if(BO(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(BO(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Jr={_getMeta:function(){return[Dv(arguments.length<=0?void 0:arguments[0])||arguments.length<=0?void 0:arguments[0],Bp(Dv(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:arguments.length<=1?void 0:arguments[1])]},_getConfig:function(t,n){var i,a,l;return(i=(t==null||(a=t.instance)===null||a===void 0?void 0:a.$primevue)||(n==null||(l=n.ctx)===null||l===void 0||(l=l.appContext)===null||l===void 0||(l=l.config)===null||l===void 0||(l=l.globalProperties)===null||l===void 0?void 0:l.$primevue))===null||i===void 0?void 0:i.config},_getOptionValue:dee,_getPTValue:function(){var t,n,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"",f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,h=function(){var Y=Jr._getOptionValue.apply(Jr,arguments);return Rm(Y)||kV(Y)?{class:Y}:Y},b=((t=i.binding)===null||t===void 0||(t=t.value)===null||t===void 0?void 0:t.ptOptions)||((n=i.$primevueConfig)===null||n===void 0?void 0:n.ptOptions)||{},S=b.mergeSections,k=S===void 0?!0:S,T=b.mergeProps,O=T===void 0?!1:T,P=d?Jr._useDefaultPT(i,i.defaultPT(),h,l,f):void 0,B=Jr._usePT(i,Jr._getPT(a,i.$name),h,l,na(na({},f),{},{global:P||{}})),W=Jr._getPTDatasets(i,l);return k||!k&&B?O?Jr._mergeProps(i,O,P,B,W):na(na(na({},P),B),W):na(na({},B),W)},_getPTDatasets:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",i="data-pc-";return na(na({},n==="root"&&Gte({},"".concat(i,"name"),Lv(t.$name))),{},Gte({},"".concat(i,"section"),Lv(n)))},_getPT:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",i=arguments.length>2?arguments[2]:void 0,a=function(f){var d,h=i?i(f):f,b=Lv(n);return(d=h==null?void 0:h[b])!==null&&d!==void 0?d:h};return t&&Object.hasOwn(t,"_usept")?{_usept:t._usept,originalValue:a(t.originalValue),value:a(t.value)}:a(t)},_usePT:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,l=arguments.length>4?arguments[4]:void 0,f=function(W){return i(W,a,l)};if(n&&Object.hasOwn(n,"_usept")){var d,h=n._usept||((d=t.$primevueConfig)===null||d===void 0?void 0:d.ptOptions)||{},b=h.mergeSections,S=b===void 0?!0:b,k=h.mergeProps,T=k===void 0?!1:k,O=f(n.originalValue),P=f(n.value);return O===void 0&&P===void 0?void 0:Rm(P)?P:Rm(O)?O:S||!S&&P?T?Jr._mergeProps(t,T,O,P):na(na({},O),P):P}return f(n)},_useDefaultPT:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,l=arguments.length>4?arguments[4]:void 0;return Jr._usePT(t,n,i,a,l)},_loadStyles:function(){var t,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0,a=arguments.length>2?arguments[2]:void 0,l=Jr._getConfig(i,a),f={nonce:l==null||(t=l.csp)===null||t===void 0?void 0:t.nonce};Jr._loadCoreStyles(n,f),Jr._loadThemeStyles(n,f),Jr._loadScopedThemeStyles(n,f),Jr._removeThemeListeners(n),n.$loadStyles=function(){return Jr._loadThemeStyles(n,f)},Jr._themeChangeListener(n.$loadStyles)},_loadCoreStyles:function(){var t,n,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;if(!R5.isStyleNameLoaded((t=i.$style)===null||t===void 0?void 0:t.name)&&(n=i.$style)!==null&&n!==void 0&&n.name){var l;lc.loadCSS(a),(l=i.$style)===null||l===void 0||l.loadCSS(a),R5.setLoadedStyleName(i.$style.name)}},_loadThemeStyles:function(){var t,n,i,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},l=arguments.length>1?arguments[1]:void 0;if(!(a!=null&&a.isUnstyled()||(a==null||(t=a.theme)===null||t===void 0?void 0:t.call(a))==="none")){if(!Ka.isStyleNameLoaded("common")){var f,d,h=((f=a.$style)===null||f===void 0||(d=f.getCommonTheme)===null||d===void 0?void 0:d.call(f))||{},b=h.primitive,S=h.semantic,k=h.global,T=h.style;lc.load(b==null?void 0:b.css,na({name:"primitive-variables"},l)),lc.load(S==null?void 0:S.css,na({name:"semantic-variables"},l)),lc.load(k==null?void 0:k.css,na({name:"global-variables"},l)),lc.loadStyle(na({name:"global-style"},l),T),Ka.setLoadedStyleName("common")}if(!Ka.isStyleNameLoaded((n=a.$style)===null||n===void 0?void 0:n.name)&&(i=a.$style)!==null&&i!==void 0&&i.name){var O,P,B,W,Z=((O=a.$style)===null||O===void 0||(P=O.getDirectiveTheme)===null||P===void 0?void 0:P.call(O))||{},Y=Z.css,z=Z.style;(B=a.$style)===null||B===void 0||B.load(Y,na({name:"".concat(a.$style.name,"-variables")},l)),(W=a.$style)===null||W===void 0||W.loadStyle(na({name:"".concat(a.$style.name,"-style")},l),z),Ka.setLoadedStyleName(a.$style.name)}if(!Ka.isStyleNameLoaded("layer-order")){var q,ne,ue=(q=a.$style)===null||q===void 0||(ne=q.getLayerOrderThemeCSS)===null||ne===void 0?void 0:ne.call(q);lc.load(ue,na({name:"layer-order",first:!0},l)),Ka.setLoadedStyleName("layer-order")}}},_loadScopedThemeStyles:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,i=t.preset();if(i&&t.$attrSelector){var a,l,f,d=((a=t.$style)===null||a===void 0||(l=a.getPresetTheme)===null||l===void 0?void 0:l.call(a,i,"[".concat(t.$attrSelector,"]")))||{},h=d.css,b=(f=t.$style)===null||f===void 0?void 0:f.load(h,na({name:"".concat(t.$attrSelector,"-").concat(t.$style.name)},n));t.scopedStyleEl=b.el}},_themeChangeListener:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){};R5.clearLoadedStyleNames(),qd.on("theme:change",t)},_removeThemeListeners:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};qd.off("theme:change",t.$loadStyles)},_hook:function(t,n,i,a,l,f){var d,h,b="on".concat(NTe(n)),S=Jr._getConfig(a,l),k=i==null?void 0:i.$instance,T=Jr._usePT(k,Jr._getPT(a==null||(d=a.value)===null||d===void 0?void 0:d.pt,t),Jr._getOptionValue,"hooks.".concat(b)),O=Jr._useDefaultPT(k,S==null||(h=S.pt)===null||h===void 0||(h=h.directives)===null||h===void 0?void 0:h[t],Jr._getOptionValue,"hooks.".concat(b)),P={el:i,binding:a,vnode:l,prevVnode:f};T==null||T(k,P),O==null||O(k,P)},_mergeProps:function(){for(var t=arguments.length>1?arguments[1]:void 0,n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a];return uee(t)?t.apply(void 0,i):Cn.apply(void 0,i)},_extend:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=function(d,h,b,S,k){var T,O,P,B;h._$instances=h._$instances||{};var W=Jr._getConfig(b,S),Z=h._$instances[t]||{},Y=_5(Z)?na(na({},n),n==null?void 0:n.methods):{};h._$instances[t]=na(na({},Z),{},{$name:t,$host:h,$binding:b,$modifiers:b==null?void 0:b.modifiers,$value:b==null?void 0:b.value,$el:Z.$el||h||void 0,$style:na({classes:void 0,inlineStyles:void 0,load:function(){},loadCSS:function(){},loadStyle:function(){}},n==null?void 0:n.style),$primevueConfig:W,$attrSelector:(T=h.$pd)===null||T===void 0||(T=T[t])===null||T===void 0?void 0:T.attrSelector,defaultPT:function(){return Jr._getPT(W==null?void 0:W.pt,void 0,function(q){var ne;return q==null||(ne=q.directives)===null||ne===void 0?void 0:ne[t]})},isUnstyled:function(){var q,ne;return((q=h._$instances[t])===null||q===void 0||(q=q.$binding)===null||q===void 0||(q=q.value)===null||q===void 0?void 0:q.unstyled)!==void 0?(ne=h._$instances[t])===null||ne===void 0||(ne=ne.$binding)===null||ne===void 0||(ne=ne.value)===null||ne===void 0?void 0:ne.unstyled:W==null?void 0:W.unstyled},theme:function(){var q;return(q=h._$instances[t])===null||q===void 0||(q=q.$primevueConfig)===null||q===void 0?void 0:q.theme},preset:function(){var q;return(q=h._$instances[t])===null||q===void 0||(q=q.$binding)===null||q===void 0||(q=q.value)===null||q===void 0?void 0:q.dt},ptm:function(){var q,ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Jr._getPTValue(h._$instances[t],(q=h._$instances[t])===null||q===void 0||(q=q.$binding)===null||q===void 0||(q=q.value)===null||q===void 0?void 0:q.pt,ne,na({},ue))},ptmo:function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",ue=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Jr._getPTValue(h._$instances[t],q,ne,ue,!1)},cx:function(){var q,ne,ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(q=h._$instances[t])!==null&&q!==void 0&&q.isUnstyled()?void 0:Jr._getOptionValue((ne=h._$instances[t])===null||ne===void 0||(ne=ne.$style)===null||ne===void 0?void 0:ne.classes,ue,na({},J))},sx:function(){var q,ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,J=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return ue?Jr._getOptionValue((q=h._$instances[t])===null||q===void 0||(q=q.$style)===null||q===void 0?void 0:q.inlineStyles,ne,na({},J)):void 0}},Y),h.$instance=h._$instances[t],(O=(P=h.$instance)[d])===null||O===void 0||O.call(P,h,b,S,k),h["$".concat(t)]=h.$instance,Jr._hook(t,d,h,b,S,k),h.$pd||(h.$pd={}),h.$pd[t]=na(na({},(B=h.$pd)===null||B===void 0?void 0:B[t]),{},{name:t,instance:h._$instances[t]})},a=function(d){var h,b,S,k=d._$instances[t],T=k==null?void 0:k.watch,O=function(W){var Z,Y=W.newValue,z=W.oldValue;return T==null||(Z=T.config)===null||Z===void 0?void 0:Z.call(k,Y,z)},P=function(W){var Z,Y=W.newValue,z=W.oldValue;return T==null||(Z=T["config.ripple"])===null||Z===void 0?void 0:Z.call(k,Y,z)};k.$watchersCallback={config:O,"config.ripple":P},T==null||(h=T.config)===null||h===void 0||h.call(k,k==null?void 0:k.$primevueConfig),S5.on("config:change",O),T==null||(b=T["config.ripple"])===null||b===void 0||b.call(k,k==null||(S=k.$primevueConfig)===null||S===void 0?void 0:S.ripple),S5.on("config:ripple:change",P)},l=function(d){var h=d._$instances[t].$watchersCallback;h&&(S5.off("config:change",h.config),S5.off("config:ripple:change",h["config.ripple"]))};return{created:function(d,h,b,S){d.$pd||(d.$pd={}),d.$pd[t]={name:t,attrSelector:YTe("pd")},i("created",d,h,b,S)},beforeMount:function(d,h,b,S){var k;Jr._loadStyles((k=d.$pd[t])===null||k===void 0?void 0:k.instance,h,b),i("beforeMount",d,h,b,S),a(d)},mounted:function(d,h,b,S){var k;Jr._loadStyles((k=d.$pd[t])===null||k===void 0?void 0:k.instance,h,b),i("mounted",d,h,b,S)},beforeUpdate:function(d,h,b,S){i("beforeUpdate",d,h,b,S)},updated:function(d,h,b,S){var k;Jr._loadStyles((k=d.$pd[t])===null||k===void 0?void 0:k.instance,h,b),i("updated",d,h,b,S)},beforeUnmount:function(d,h,b,S){var k;l(d),Jr._removeThemeListeners((k=d.$pd[t])===null||k===void 0?void 0:k.instance),i("beforeUnmount",d,h,b,S)},unmounted:function(d,h,b,S){var k;(k=d.$pd[t])===null||k===void 0||(k=k.instance)===null||k===void 0||(k=k.scopedStyleEl)===null||k===void 0||(k=k.value)===null||k===void 0||k.remove(),i("unmounted",d,h,b,S)}}},extend:function(){var t=Jr._getMeta.apply(Jr,arguments),n=X5e(t,2),i=n[0],a=n[1];return na({extend:function(){var f=Jr._getMeta.apply(Jr,arguments),d=X5e(f,2),h=d[0],b=d[1];return Jr.extend(h,na(na(na({},a),a==null?void 0:a.methods),b))}},Jr._extend(i,a))}},cYe=({dt:e})=>"\n.p-ink {\n display: block;\n position: absolute;\n background: ".concat(e("ripple.background"),";\n border-radius: 100%;\n transform: scale(0);\n pointer-events: none;\n}\n\n.p-ink-active {\n animation: ripple 0.4s linear;\n}\n\n@keyframes ripple {\n 100% {\n opacity: 0;\n transform: scale(2.5);\n }\n}\n"),uYe={root:"p-ink"},dYe=lc.extend({name:"ripple-directive",style:cYe,classes:uYe}),fYe=Jr.extend({style:dYe});function VO(e){"@babel/helpers - typeof";return VO=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},VO(e)}function pYe(e){return vYe(e)||gYe(e)||hYe(e)||mYe()}function mYe(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function hYe(e,t){if(e){if(typeof e=="string")return Kte(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Kte(e,t):void 0}}function gYe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function vYe(e){if(Array.isArray(e))return Kte(e)}function Kte(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function e4e(e,t,n){return(t=bYe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bYe(e){var t=yYe(e,"string");return VO(t)=="symbol"?t:t+""}function yYe(e,t){if(VO(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(VO(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var _Ye=fYe.extend("ripple",{watch:{"config.ripple":function(t){t?(this.createRipple(this.$host),this.bindEvents(this.$host),this.$host.setAttribute("data-pd-ripple",!0),this.$host.style.overflow="hidden",this.$host.style.position="relative"):(this.remove(this.$host),this.$host.removeAttribute("data-pd-ripple"))}},unmounted:function(t){this.remove(t)},timeout:void 0,methods:{bindEvents:function(t){t.addEventListener("mousedown",this.onMouseDown.bind(this))},unbindEvents:function(t){t.removeEventListener("mousedown",this.onMouseDown.bind(this))},createRipple:function(t){var n=this.getInk(t);n||(n=WTe("span",e4e(e4e({role:"presentation","aria-hidden":!0,"data-p-ink":!0,"data-p-ink-active":!1,class:!this.isUnstyled()&&this.cx("root"),onAnimationEnd:this.onAnimationEnd.bind(this)},this.$attrSelector,""),"p-bind",this.ptm("root"))),t.appendChild(n),this.$el=n)},remove:function(t){var n=this.getInk(t);n&&(this.$host.style.overflow="",this.$host.style.position="",this.unbindEvents(t),n.removeEventListener("animationend",this.onAnimationEnd),n.remove())},onMouseDown:function(t){var n=this,i=t.currentTarget,a=this.getInk(i);if(!(!a||getComputedStyle(a,null).display==="none")){if(!this.isUnstyled()&&fee(a,"p-ink-active"),a.setAttribute("data-p-ink-active","false"),!z2e(a)&&!W2e(a)){var l=Math.max(HTe(i),ZTe(i));a.style.height=l+"px",a.style.width=l+"px"}var f=jTe(i),d=t.pageX-f.left+document.body.scrollTop-W2e(a)/2,h=t.pageY-f.top+document.body.scrollLeft-z2e(a)/2;a.style.top=h+"px",a.style.left=d+"px",!this.isUnstyled()&&$Te(a,"p-ink-active"),a.setAttribute("data-p-ink-active","true"),this.timeout=setTimeout(function(){a&&(!n.isUnstyled()&&fee(a,"p-ink-active"),a.setAttribute("data-p-ink-active","false"))},401)}},onAnimationEnd:function(t){this.timeout&&clearTimeout(this.timeout),!this.isUnstyled()&&fee(t.currentTarget,"p-ink-active"),t.currentTarget.setAttribute("data-p-ink-active","false")},getInk:function(t){return t&&t.children?pYe(t.children).find(function(n){return Bw(n,"data-pc-name")==="ripple"}):void 0}}}),SYe={name:"BasePanelMenu",extends:FO,props:{model:{type:Array,default:null},expandedKeys:{type:Object,default:null},multiple:{type:Boolean,default:!1},tabindex:{type:Number,default:0}},style:nYe,provide:function(){return{$pcPanelMenu:this,$parentInstance:this}}},t4e={name:"PanelMenuSub",hostName:"PanelMenu",extends:FO,emits:["item-toggle","item-mousemove"],props:{panelId:{type:String,default:null},focusedItemId:{type:String,default:null},items:{type:Array,default:null},level:{type:Number,default:0},templates:{type:Object,default:null},activeItemPath:{type:Object,default:null},tabindex:{type:Number,default:-1}},methods:{getItemId:function(t){return"".concat(this.panelId,"_").concat(t.key)},getItemKey:function(t){return this.getItemId(t)},getItemProp:function(t,n,i){return t&&t.item?Bp(t.item[n],i):void 0},getItemLabel:function(t){return this.getItemProp(t,"label")},getPTOptions:function(t,n,i){return this.ptm(t,{context:{item:n.item,index:i,active:this.isItemActive(n),focused:this.isItemFocused(n),disabled:this.isItemDisabled(n)}})},isItemActive:function(t){return this.activeItemPath.some(function(n){return n.key===t.key})},isItemVisible:function(t){return this.getItemProp(t,"visible")!==!1},isItemDisabled:function(t){return this.getItemProp(t,"disabled")},isItemFocused:function(t){return this.focusedItemId===this.getItemId(t)},isItemGroup:function(t){return zr(t.items)},onItemClick:function(t,n){this.getItemProp(n,"command",{originalEvent:t,item:n.item}),this.$emit("item-toggle",{processedItem:n,expanded:!this.isItemActive(n)})},onItemToggle:function(t){this.$emit("item-toggle",t)},onItemMouseMove:function(t,n){this.$emit("item-mousemove",{originalEvent:t,processedItem:n})},getAriaSetSize:function(){var t=this;return this.items.filter(function(n){return t.isItemVisible(n)&&!t.getItemProp(n,"separator")}).length},getAriaPosInset:function(t){var n=this;return t-this.items.slice(0,t).filter(function(i){return n.isItemVisible(i)&&n.getItemProp(i,"separator")}).length+1},getMenuItemProps:function(t,n){return{action:Cn({class:this.cx("itemLink"),tabindex:-1},this.getPTOptions("itemLink",t,n)),icon:Cn({class:[this.cx("itemIcon"),this.getItemProp(t,"icon")]},this.getPTOptions("itemIcon",t,n)),label:Cn({class:this.cx("itemLabel")},this.getPTOptions("itemLabel",t,n)),submenuicon:Cn({class:this.cx("submenuIcon")},this.getPTOptions("submenuicon",t,n))}}},components:{ChevronRightIcon:qte,ChevronDownIcon:Zte},directives:{ripple:_Ye}},CYe=["tabindex"],wYe=["id","aria-label","aria-expanded","aria-level","aria-setsize","aria-posinset","data-p-focused","data-p-disabled"],EYe=["onClick","onMousemove"],kYe=["href","target"];function xYe(e,t,n,i,a,l){var f=Xe("PanelMenuSub",!0),d=Hr("ripple");return L(),Q("ul",{class:Rn(e.cx("submenu")),tabindex:n.tabindex},[(L(!0),Q(bt,null,Sn(n.items,function(h,b){return L(),Q(bt,{key:l.getItemKey(h)},[l.isItemVisible(h)&&!l.getItemProp(h,"separator")?(L(),Q("li",Cn({key:0,id:l.getItemId(h),class:[e.cx("item",{processedItem:h}),l.getItemProp(h,"class")],style:l.getItemProp(h,"style"),role:"treeitem","aria-label":l.getItemLabel(h),"aria-expanded":l.isItemGroup(h)?l.isItemActive(h):void 0,"aria-level":n.level+1,"aria-setsize":l.getAriaSetSize(),"aria-posinset":l.getAriaPosInset(b),ref_for:!0},l.getPTOptions("item",h,b),{"data-p-focused":l.isItemFocused(h),"data-p-disabled":l.isItemDisabled(h)}),[H("div",Cn({class:e.cx("itemContent"),onClick:function(k){return l.onItemClick(k,h)},onMousemove:function(k){return l.onItemMouseMove(k,h)},ref_for:!0},l.getPTOptions("itemContent",h,b)),[n.templates.item?(L(),Ee(Io(n.templates.item),{key:1,item:h.item,root:!1,active:l.isItemActive(h),hasSubmenu:l.isItemGroup(h),label:l.getItemLabel(h),props:l.getMenuItemProps(h,b)},null,8,["item","active","hasSubmenu","label","props"])):Gn((L(),Q("a",Cn({key:0,href:l.getItemProp(h,"url"),class:e.cx("itemLink"),target:l.getItemProp(h,"target"),tabindex:"-1",ref_for:!0},l.getPTOptions("itemLink",h,b)),[l.isItemGroup(h)?(L(),Q(bt,{key:0},[n.templates.submenuicon?(L(),Ee(Io(n.templates.submenuicon),Cn({key:0,class:e.cx("submenuIcon"),active:l.isItemActive(h),ref_for:!0},l.getPTOptions("submenuIcon",h,b)),null,16,["class","active"])):(L(),Ee(Io(l.isItemActive(h)?"ChevronDownIcon":"ChevronRightIcon"),Cn({key:1,class:e.cx("submenuIcon"),ref_for:!0},l.getPTOptions("submenuIcon",h,b)),null,16,["class"]))],64)):we("",!0),n.templates.itemicon?(L(),Ee(Io(n.templates.itemicon),{key:1,item:h.item,class:Rn(e.cx("itemIcon"))},null,8,["item","class"])):l.getItemProp(h,"icon")?(L(),Q("span",Cn({key:2,class:[e.cx("itemIcon"),l.getItemProp(h,"icon")],ref_for:!0},l.getPTOptions("itemIcon",h,b)),null,16)):we("",!0),H("span",Cn({class:e.cx("itemLabel"),ref_for:!0},l.getPTOptions("itemLabel",h,b)),ee(l.getItemLabel(h)),17)],16,kYe)),[[d]])],16,EYe),pe(s5,Cn({name:"p-toggleable-content",ref_for:!0},e.ptm("transition")),{default:te(function(){return[Gn(H("div",Cn({class:e.cx("contentContainer"),ref_for:!0},e.ptm("contentContainer")),[l.isItemVisible(h)&&l.isItemGroup(h)?(L(),Ee(f,Cn({key:0,id:l.getItemId(h)+"_list",role:"group",panelId:n.panelId,focusedItemId:n.focusedItemId,items:h.items,level:n.level+1,templates:n.templates,activeItemPath:n.activeItemPath,onItemToggle:l.onItemToggle,onItemMousemove:t[0]||(t[0]=function(S){return e.$emit("item-mousemove",S)}),pt:e.pt,unstyled:e.unstyled,ref_for:!0},e.ptm("submenu")),null,16,["id","panelId","focusedItemId","items","level","templates","activeItemPath","onItemToggle","pt","unstyled"])):we("",!0)],16),[[bA,l.isItemActive(h)]])]}),_:2},1040)],16,wYe)):we("",!0),l.isItemVisible(h)&&l.getItemProp(h,"separator")?(L(),Q("li",Cn({key:1,style:l.getItemProp(h,"style"),class:[e.cx("separator"),l.getItemProp(h,"class")],role:"separator",ref_for:!0},e.ptm("separator")),null,16)):we("",!0)],64)}),128))],10,CYe)}t4e.render=xYe;function TYe(e,t){return RYe(e)||OYe(e,t)||AYe(e,t)||IYe()}function IYe(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function AYe(e,t){if(e){if(typeof e=="string")return n4e(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?n4e(e,t):void 0}}function n4e(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function OYe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i,a,l,f,d=[],h=!0,b=!1;try{if(l=(n=n.call(e)).next,t!==0)for(;!(h=(i=l.call(n)).done)&&(d.push(i.value),d.length!==t);h=!0);}catch(S){b=!0,a=S}finally{try{if(!h&&n.return!=null&&(f=n.return(),Object(f)!==f))return}finally{if(b)throw a}}return d}}function RYe(e){if(Array.isArray(e))return e}var s4e={name:"PanelMenuList",hostName:"PanelMenu",extends:FO,emits:["item-toggle","header-focus"],props:{panelId:{type:String,default:null},items:{type:Array,default:null},templates:{type:Object,default:null},expandedKeys:{type:Object,default:null}},searchTimeout:null,searchValue:null,data:function(){return{focused:!1,focusedItem:null,activeItemPath:[]}},watch:{expandedKeys:function(t){this.autoUpdateActiveItemPath(t)}},mounted:function(){this.autoUpdateActiveItemPath(this.expandedKeys)},methods:{getItemProp:function(t,n){return t&&t.item?Bp(t.item[n]):void 0},getItemLabel:function(t){return this.getItemProp(t,"label")},isItemVisible:function(t){return this.getItemProp(t,"visible")!==!1},isItemDisabled:function(t){return this.getItemProp(t,"disabled")},isItemActive:function(t){return this.activeItemPath.some(function(n){return n.key===t.parentKey})},isItemGroup:function(t){return zr(t.items)},onFocus:function(t){this.focused=!0,this.focusedItem=this.focusedItem||(this.isElementInPanel(t,t.relatedTarget)?this.findFirstItem():this.findLastItem())},onBlur:function(){this.focused=!1,this.focusedItem=null,this.searchValue=""},onKeyDown:function(t){var n=t.metaKey||t.ctrlKey;switch(t.code){case"ArrowDown":this.onArrowDownKey(t);break;case"ArrowUp":this.onArrowUpKey(t);break;case"ArrowLeft":this.onArrowLeftKey(t);break;case"ArrowRight":this.onArrowRightKey(t);break;case"Home":this.onHomeKey(t);break;case"End":this.onEndKey(t);break;case"Space":this.onSpaceKey(t);break;case"Enter":case"NumpadEnter":this.onEnterKey(t);break;case"Escape":case"Tab":case"PageDown":case"PageUp":case"Backspace":case"ShiftLeft":case"ShiftRight":break;default:!n&&PTe(t.key)&&this.searchItems(t,t.key);break}},onArrowDownKey:function(t){var n=zr(this.focusedItem)?this.findNextItem(this.focusedItem):this.findFirstItem();this.changeFocusedItem({originalEvent:t,processedItem:n,focusOnNext:!0}),t.preventDefault()},onArrowUpKey:function(t){var n=zr(this.focusedItem)?this.findPrevItem(this.focusedItem):this.findLastItem();this.changeFocusedItem({originalEvent:t,processedItem:n,selfCheck:!0}),t.preventDefault()},onArrowLeftKey:function(t){var n=this;if(zr(this.focusedItem)){var i=this.activeItemPath.some(function(a){return a.key===n.focusedItem.key});i?this.activeItemPath=this.activeItemPath.filter(function(a){return a.key!==n.focusedItem.key}):this.focusedItem=zr(this.focusedItem.parent)?this.focusedItem.parent:this.focusedItem,t.preventDefault()}},onArrowRightKey:function(t){var n=this;if(zr(this.focusedItem)){var i=this.isItemGroup(this.focusedItem);if(i){var a=this.activeItemPath.some(function(l){return l.key===n.focusedItem.key});a?this.onArrowDownKey(t):(this.activeItemPath=this.activeItemPath.filter(function(l){return l.parentKey!==n.focusedItem.parentKey}),this.activeItemPath.push(this.focusedItem))}t.preventDefault()}},onHomeKey:function(t){this.changeFocusedItem({originalEvent:t,processedItem:this.findFirstItem(),allowHeaderFocus:!1}),t.preventDefault()},onEndKey:function(t){this.changeFocusedItem({originalEvent:t,processedItem:this.findLastItem(),focusOnNext:!0,allowHeaderFocus:!1}),t.preventDefault()},onEnterKey:function(t){if(zr(this.focusedItem)){var n=t0(this.$el,'li[id="'.concat("".concat(this.focusedItemId),'"]')),i=n&&(t0(n,'[data-pc-section="itemlink"]')||t0(n,"a,button"));i?i.click():n&&n.click()}t.preventDefault()},onSpaceKey:function(t){this.onEnterKey(t)},onItemToggle:function(t){var n=t.processedItem,i=t.expanded;this.expandedKeys?this.$emit("item-toggle",{item:n.item,expanded:i}):(this.activeItemPath=this.activeItemPath.filter(function(a){return a.parentKey!==n.parentKey}),i&&this.activeItemPath.push(n)),this.focusedItem=n,eO(this.$el)},onItemMouseMove:function(t){this.focused&&(this.focusedItem=t.processedItem)},isElementInPanel:function(t,n){var i=t.currentTarget.closest('[data-pc-section="panel"]');return i&&i.contains(n)},isItemMatched:function(t){var n;return this.isValidItem(t)&&((n=this.getItemLabel(t))===null||n===void 0?void 0:n.toLocaleLowerCase(this.searchLocale).startsWith(this.searchValue.toLocaleLowerCase(this.searchLocale)))},isVisibleItem:function(t){return!!t&&(t.level===0||this.isItemActive(t))&&this.isItemVisible(t)},isValidItem:function(t){return!!t&&!this.isItemDisabled(t)&&!this.getItemProp(t,"separator")},findFirstItem:function(){var t=this;return this.visibleItems.find(function(n){return t.isValidItem(n)})},findLastItem:function(){var t=this;return B2e(this.visibleItems,function(n){return t.isValidItem(n)})},findNextItem:function(t){var n=this,i=this.visibleItems.findIndex(function(l){return l.key===t.key}),a=i<this.visibleItems.length-1?this.visibleItems.slice(i+1).find(function(l){return n.isValidItem(l)}):void 0;return a||t},findPrevItem:function(t){var n=this,i=this.visibleItems.findIndex(function(l){return l.key===t.key}),a=i>0?B2e(this.visibleItems.slice(0,i),function(l){return n.isValidItem(l)}):void 0;return a||t},searchItems:function(t,n){var i=this;this.searchValue=(this.searchValue||"")+n;var a=null,l=!1;if(zr(this.focusedItem)){var f=this.visibleItems.findIndex(function(d){return d.key===i.focusedItem.key});a=this.visibleItems.slice(f).find(function(d){return i.isItemMatched(d)}),a=_5(a)?this.visibleItems.slice(0,f).find(function(d){return i.isItemMatched(d)}):a}else a=this.visibleItems.find(function(d){return i.isItemMatched(d)});return zr(a)&&(l=!0),_5(a)&&_5(this.focusedItem)&&(a=this.findFirstItem()),zr(a)&&this.changeFocusedItem({originalEvent:t,processedItem:a,allowHeaderFocus:!1}),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(function(){i.searchValue="",i.searchTimeout=null},500),l},changeFocusedItem:function(t){var n=t.originalEvent,i=t.processedItem,a=t.focusOnNext,l=t.selfCheck,f=t.allowHeaderFocus,d=f===void 0?!0:f;zr(this.focusedItem)&&this.focusedItem.key!==i.key?(this.focusedItem=i,this.scrollInView()):d&&this.$emit("header-focus",{originalEvent:n,focusOnNext:a,selfCheck:l})},scrollInView:function(){var t=t0(this.$el,'li[id="'.concat("".concat(this.focusedItemId),'"]'));t&&t.scrollIntoView&&t.scrollIntoView({block:"nearest",inline:"start"})},autoUpdateActiveItemPath:function(t){var n=this;this.activeItemPath=Object.entries(t||{}).reduce(function(i,a){var l=TYe(a,2),f=l[0],d=l[1];if(d){var h=n.findProcessedItemByItemKey(f);h&&i.push(h)}return i},[])},findProcessedItemByItemKey:function(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;if(n=n||i===0&&this.processedItems,!n)return null;for(var a=0;a<n.length;a++){var l=n[a];if(this.getItemProp(l,"key")===t)return l;var f=this.findProcessedItemByItemKey(t,l.items,i+1);if(f)return f}},createProcessedItems:function(t){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"",f=[];return t&&t.forEach(function(d,h){var b=(l!==""?l+"_":"")+h,S={item:d,index:h,level:i,key:b,parent:a,parentKey:l};S.items=n.createProcessedItems(d.items,i+1,S,b),f.push(S)}),f},flatItems:function(t){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return t&&t.forEach(function(a){n.isVisibleItem(a)&&(i.push(a),n.flatItems(a.items,i))}),i}},computed:{processedItems:function(){return this.createProcessedItems(this.items||[])},visibleItems:function(){return this.flatItems(this.processedItems)},focusedItemId:function(){return zr(this.focusedItem)?"".concat(this.panelId,"_").concat(this.focusedItem.key):null}},components:{PanelMenuSub:t4e}};function DYe(e,t,n,i,a,l){var f=Xe("PanelMenuSub");return L(),Ee(f,Cn({id:n.panelId+"_list",class:e.cx("rootList"),role:"tree",tabindex:-1,"aria-activedescendant":a.focused?l.focusedItemId:void 0,panelId:n.panelId,focusedItemId:a.focused?l.focusedItemId:void 0,items:l.processedItems,templates:n.templates,activeItemPath:a.activeItemPath,onFocus:l.onFocus,onBlur:l.onBlur,onKeydown:l.onKeyDown,onItemToggle:l.onItemToggle,onItemMousemove:l.onItemMouseMove,pt:e.pt,unstyled:e.unstyled},e.ptm("rootList")),null,16,["id","class","aria-activedescendant","panelId","focusedItemId","items","templates","activeItemPath","onFocus","onBlur","onKeydown","onItemToggle","onItemMousemove","pt","unstyled"])}s4e.render=DYe;function HO(e){"@babel/helpers - typeof";return HO=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},HO(e)}function o4e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function LYe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?o4e(Object(n),!0).forEach(function(i){PYe(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o4e(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function PYe(e,t,n){return(t=MYe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function MYe(e){var t=NYe(e,"string");return HO(t)=="symbol"?t:t+""}function NYe(e,t){if(HO(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(HO(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var r4e={name:"PanelMenu",extends:SYe,inheritAttrs:!1,emits:["update:expandedKeys","panel-open","panel-close"],data:function(){return{activeItem:null,activeItems:[]}},methods:{getItemProp:function(t,n){return t?Bp(t[n]):void 0},getItemLabel:function(t){return this.getItemProp(t,"label")},getPTOptions:function(t,n,i){return this.ptm(t,{context:{index:i,active:this.isItemActive(n),focused:this.isItemFocused(n),disabled:this.isItemDisabled(n)}})},isItemActive:function(t){return this.expandedKeys?this.expandedKeys[this.getItemProp(t,"key")]:this.multiple?this.activeItems.some(function(n){return $w(t,n)}):$w(t,this.activeItem)},isItemVisible:function(t){return this.getItemProp(t,"visible")!==!1},isItemDisabled:function(t){return this.getItemProp(t,"disabled")},isItemFocused:function(t){return $w(t,this.activeItem)},isItemGroup:function(t){return zr(t.items)},getPanelId:function(t){return"".concat(this.$id,"_").concat(t)},getPanelKey:function(t){return this.getPanelId(t)},getHeaderId:function(t){return"".concat(this.getPanelId(t),"_header")},getContentId:function(t){return"".concat(this.getPanelId(t),"_content")},onHeaderClick:function(t,n){if(this.isItemDisabled(n)){t.preventDefault();return}n.command&&n.command({originalEvent:t,item:n}),this.changeActiveItem(t,n),eO(t.currentTarget)},onHeaderKeyDown:function(t,n){switch(t.code){case"ArrowDown":this.onHeaderArrowDownKey(t);break;case"ArrowUp":this.onHeaderArrowUpKey(t);break;case"Home":this.onHeaderHomeKey(t);break;case"End":this.onHeaderEndKey(t);break;case"Enter":case"NumpadEnter":case"Space":this.onHeaderEnterKey(t,n);break}},onHeaderArrowDownKey:function(t){var n=Bw(t.currentTarget,"data-p-active")===!0?t0(t.currentTarget.nextElementSibling,'[data-pc-section="rootlist"]'):null;n?eO(n):this.updateFocusedHeader({originalEvent:t,focusOnNext:!0}),t.preventDefault()},onHeaderArrowUpKey:function(t){var n=this.findPrevHeader(t.currentTarget.parentElement)||this.findLastHeader(),i=Bw(n,"data-p-active")===!0?t0(n.nextElementSibling,'[data-pc-section="rootlist"]'):null;i?eO(i):this.updateFocusedHeader({originalEvent:t,focusOnNext:!1}),t.preventDefault()},onHeaderHomeKey:function(t){this.changeFocusedHeader(t,this.findFirstHeader()),t.preventDefault()},onHeaderEndKey:function(t){this.changeFocusedHeader(t,this.findLastHeader()),t.preventDefault()},onHeaderEnterKey:function(t,n){var i=t0(t.currentTarget,'[data-pc-section="headerlink"]');i?i.click():this.onHeaderClick(t,n),t.preventDefault()},findNextHeader:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=n?t:t.nextElementSibling,a=t0(i,'[data-pc-section="header"]');return a?Bw(a,"data-p-disabled")?this.findNextHeader(a.parentElement):a:null},findPrevHeader:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=n?t:t.previousElementSibling,a=t0(i,'[data-pc-section="header"]');return a?Bw(a,"data-p-disabled")?this.findPrevHeader(a.parentElement):a:null},findFirstHeader:function(){return this.findNextHeader(this.$el.firstElementChild,!0)},findLastHeader:function(){return this.findPrevHeader(this.$el.lastElementChild,!0)},updateFocusedHeader:function(t){var n=t.originalEvent,i=t.focusOnNext,a=t.selfCheck,l=n.currentTarget.closest('[data-pc-section="panel"]'),f=a?t0(l,'[data-pc-section="header"]'):i?this.findNextHeader(l):this.findPrevHeader(l);f?this.changeFocusedHeader(n,f):i?this.onHeaderHomeKey(n):this.onHeaderEndKey(n)},changeActiveItem:function(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(!this.isItemDisabled(n)){var a=this.isItemActive(n),l=a?"panel-close":"panel-open";this.activeItem=i?n:this.activeItem&&$w(n,this.activeItem)?null:n,this.multiple&&(this.activeItems.some(function(f){return $w(n,f)})?this.activeItems=this.activeItems.filter(function(f){return!$w(n,f)}):this.activeItems.push(n)),this.changeExpandedKeys({item:n,expanded:!a}),this.$emit(l,{originalEvent:t,item:n})}},changeExpandedKeys:function(t){var n=t.item,i=t.expanded,a=i===void 0?!1:i;if(this.expandedKeys){var l=LYe({},this.expandedKeys);a?l[n.key]=!0:delete l[n.key],this.$emit("update:expandedKeys",l)}},changeFocusedHeader:function(t,n){n&&eO(n)},getMenuItemProps:function(t,n){return{icon:Cn({class:[this.cx("headerIcon"),this.getItemProp(t,"icon")]},this.getPTOptions("headerIcon",t,n)),label:Cn({class:this.cx("headerLabel")},this.getPTOptions("headerLabel",t,n))}}},components:{PanelMenuList:s4e,ChevronRightIcon:qte,ChevronDownIcon:Zte}},FYe=["id"],$Ye=["id","tabindex","aria-label","aria-expanded","aria-controls","aria-disabled","onClick","onKeydown","data-p-active","data-p-disabled"],BYe=["href"],VYe=["id","aria-labelledby"];function HYe(e,t,n,i,a,l){var f=Xe("PanelMenuList");return L(),Q("div",Cn({id:e.$id,class:e.cx("root")},e.ptmi("root")),[(L(!0),Q(bt,null,Sn(e.model,function(d,h){return L(),Q(bt,{key:l.getPanelKey(h)},[l.isItemVisible(d)?(L(),Q("div",Cn({key:0,style:l.getItemProp(d,"style"),class:[e.cx("panel"),l.getItemProp(d,"class")],ref_for:!0},e.ptm("panel")),[H("div",Cn({id:l.getHeaderId(h),class:[e.cx("header",{item:d}),l.getItemProp(d,"headerClass")],tabindex:l.isItemDisabled(d)?-1:e.tabindex,role:"button","aria-label":l.getItemLabel(d),"aria-expanded":l.isItemActive(d),"aria-controls":l.getContentId(h),"aria-disabled":l.isItemDisabled(d),onClick:function(S){return l.onHeaderClick(S,d)},onKeydown:function(S){return l.onHeaderKeyDown(S,d)},ref_for:!0},l.getPTOptions("header",d,h),{"data-p-active":l.isItemActive(d),"data-p-disabled":l.isItemDisabled(d)}),[H("div",Cn({class:e.cx("headerContent"),ref_for:!0},l.getPTOptions("headerContent",d,h)),[e.$slots.item?(L(),Ee(Io(e.$slots.item),{key:1,item:d,root:!0,active:l.isItemActive(d),hasSubmenu:l.isItemGroup(d),label:l.getItemLabel(d),props:l.getMenuItemProps(d,h)},null,8,["item","active","hasSubmenu","label","props"])):(L(),Q("a",Cn({key:0,href:l.getItemProp(d,"url"),class:e.cx("headerLink"),tabindex:-1,ref_for:!0},l.getPTOptions("headerLink",d,h)),[l.getItemProp(d,"items")?is(e.$slots,"submenuicon",{key:0,active:l.isItemActive(d)},function(){return[(L(),Ee(Io(l.isItemActive(d)?"ChevronDownIcon":"ChevronRightIcon"),Cn({class:e.cx("submenuIcon"),ref_for:!0},l.getPTOptions("submenuIcon",d,h)),null,16,["class"]))]}):we("",!0),e.$slots.headericon?(L(),Ee(Io(e.$slots.headericon),{key:1,item:d,class:Rn([e.cx("headerIcon"),l.getItemProp(d,"icon")])},null,8,["item","class"])):l.getItemProp(d,"icon")?(L(),Q("span",Cn({key:2,class:[e.cx("headerIcon"),l.getItemProp(d,"icon")],ref_for:!0},l.getPTOptions("headerIcon",d,h)),null,16)):we("",!0),H("span",Cn({class:e.cx("headerLabel"),ref_for:!0},l.getPTOptions("headerLabel",d,h)),ee(l.getItemLabel(d)),17)],16,BYe))],16)],16,$Ye),pe(s5,Cn({name:"p-toggleable-content",ref_for:!0},e.ptm("transition")),{default:te(function(){return[Gn(H("div",Cn({id:l.getContentId(h),class:e.cx("contentContainer"),role:"region","aria-labelledby":l.getHeaderId(h),ref_for:!0},e.ptm("contentContainer")),[l.getItemProp(d,"items")?(L(),Q("div",Cn({key:0,class:e.cx("content"),ref_for:!0},e.ptm("content")),[pe(f,{panelId:l.getPanelId(h),items:l.getItemProp(d,"items"),templates:e.$slots,expandedKeys:e.expandedKeys,onItemToggle:l.changeExpandedKeys,onHeaderFocus:l.updateFocusedHeader,pt:e.pt,unstyled:e.unstyled},null,8,["panelId","items","templates","expandedKeys","onItemToggle","onHeaderFocus","pt","unstyled"])],16)):we("",!0)],16,VYe),[[bA,l.isItemActive(d)]])]}),_:2},1040)],16)):we("",!0)],64)}),128))],16,FYe)}r4e.render=HYe;const UYe=["href"],i4e=wt({__name:"SideMenu",props:{items:{type:Array,required:!0,validator:e=>e.every(t=>{const n=typeof t.label=="string"&&t.label.trim()!=="",i=typeof t.key=="string"&&t.key.trim()!=="",a=t.link||t.action||t.items;return n&&i&&a})},expandedKeys:{type:Object,default:()=>{}},activeItemKey:{type:String,required:!1,default:null},backgroundVariant:{type:String,default:"bg-tertiary"},widthVariant:{required:!1,type:String,default:()=>"default",validator:e=>["default","compact"].includes(e)}},emits:["update:expandedKeys"],setup(e,{emit:t}){const n=e,i=t,a=Ge(()=>({default:"w-[21rem]",compact:"w-[16rem]"})[n.widthVariant]),l={header:{class:["focus-visible:outline-none focus-visible:bg-hover"]},headerContent:()=>({class:["transition duration-200 ease-in-out","transition-shadow duration-200"]}),rootlist:{class:["focus-visible:outline-none"]},itemLink:({context:h})=>({isFocused:h.focused}),itemContent:{class:["transition-shadow duration-200"]},transition:{enterFromClass:"max-h-0",enterActiveClass:"overflow-hidden transition-[max-height] duration-1000 ease-[cubic-bezier(0.42,0,0.58,1)]",enterToClass:"max-h-[1000px]",leaveFromClass:"max-h-[1000px]",leaveActiveClass:"overflow-hidden transition-[max-height] duration-[450ms] ease-[cubic-bezier(0,1,0,1)]",leaveToClass:"max-h-0"}};function f(h){const b=n.activeItemKey;return b&&b===(h==null?void 0:h.key)}function d(h,b){const S=f(h),k={"inline-flex relative items-center gap-x-1 text-lg-medium py-2 px-3 w-full cursor-pointer":!0,"text-primary hover:text-hover disabled:text-disabled hover:bg-hover hover:text-on-dark":!S,backgroundVariant:!S,"text-on-dark bg-selection-dark":S,"!px-7":h.level===2&&h.colorStripe,"!px-9":h.level===2&&!h.colorStripe,"!px-10":h.level===3&&h.colorStripe,"!px-12":h.level===3&&!h.colorStripe,"!px-14":h.level===4&&h.colorStripe,"!px-16":h.level===4&&!h.colorStripe,"border-b border-b-light":!0,"border-transparent":S&&!h.colorStripe,"border-t border-t-light":h.index===0&&h.level===1,"!border-s-8":!!h.colorStripe,"bg-hover !text-on-dark":b&&!S,"!text-lg-bold":h.level===1};return h.colorStripe&&(k[h.colorStripe]=!0),k}return(h,b)=>(L(),Ee(se(r4e),{"expanded-keys":e.expandedKeys,model:e.items,pt:l,class:Rn(["overflow-y-auto border-e border-s border-light",[e.backgroundVariant,a.value]]),"onUpdate:expandedKeys":b[0]||(b[0]=(...S)=>i("update:expandedKeys",...S))},{item:te(({item:S,active:k,hasSubmenu:T,props:O})=>{var P,B;return[H("a",Cn({class:d(S,(P=O.action)==null?void 0:P.isFocused)},O.action,{href:S.link||"#",tabindex:"-1",onClick:wl(()=>{},["prevent"])}),[((B=S.badge)==null?void 0:B.slot)!=null?(L(),Ee(kd,Cn({key:0,"color-variant":S.badge.colorVariant||"primary"},S.badge,{class:"me-1"}),{default:te(()=>[D(ee(S.badge.slot),1)]),_:2},1040,["color-variant"])):we("",!0),b[1]||(b[1]=D()),S.icon?(L(),Ee(Vs,{key:1,class:"h-5 w-5",icon:S.icon},null,8,["icon"])):we("",!0),b[2]||(b[2]=D()),H("span",null,ee(S.label),1),b[3]||(b[3]=D()),T?(L(),Ee(Vs,{key:2,class:"h-4 w-4 flex-shrink-0 ltr:ml-auto rtl:mr-auto",icon:k?"Dropup":"Dropdown"},null,8,["icon"])):we("",!0)],16,UYe)]}),_:1},8,["expanded-keys","model","class"]))}},[["__scopeId","data-v-255898bc"]]),zYe=["aria-label"],WYe={__name:"SideNav",props:{links:{type:Object,required:!0,validator:e=>Object.keys(e).every(t=>"name"in e[t])},ariaLabel:{type:String,default:"Site Navigation"}},setup(e){const t=e,n=jte();let i="";const a=kt(q(t.links)),{apiUrl:l}=to("_submissions/viewsCount"),{data:f,fetch:d}=fr(l,{query:{assignedWithRoles:[pkp.const.ROLE_ID_SITE_ADMIN,pkp.const.ROLE_ID_MANAGER,pkp.const.ROLE_ID_SUB_EDITOR,pkp.const.ROLE_ID_ASSISTANT]}});a.value.find(J=>J.key==="dashboards")&&(io(()=>n.shouldReloadViewCountsEditorDashboard,J=>{J&&d()}),n.triggerReloadViewsCount($f.EDITORIAL_DASHBOARD));const{apiUrl:b}=to("_submissions/viewsCount"),{data:S,fetch:k}=fr(b,{query:{assignedWithRoles:[pkp.const.ROLE_ID_AUTHOR]}});a.value.find(J=>J.key==="mySubmissions")&&(io(()=>n.shouldReloadViewCountsMySubmissions,J=>{J&&k()}),n.triggerReloadViewsCount($f.MY_SUBMISSIONS));const{apiUrl:O}=to("_submissions/viewsCount"),{data:P,fetch:B}=fr(O,{query:{assignedWithRoles:[pkp.const.ROLE_ID_REVIEWER]}});a.value.find(J=>J.key==="reviewAssignments")&&(io(()=>n.shouldReloadViewCountsReviewAssignments,J=>{J&&B()}),n.triggerReloadViewsCount($f.MY_REVIEW_ASSIGNMENTS));const Z=["reviewer-action-required","reviews-overdue"];function Y(J,ce,ge){if(ge.value){const de=J.find(he=>he.key===ce);if(de){const he=de.items.map(ie=>({...ie,badge:{slot:ge.value[ie.id],colorVariant:Z.includes(ie.id)?"attention-bg":"primary"}}));de.items=he}}return J}const z=Ge(()=>{const J=JSON.parse(JSON.stringify(a.value));return Y(J,"dashboards",f),Y(J,"mySubmissions",S),Y(J,"reviewAssignments",P),J});function q(J,ce=1,ge=""){const de=[];for(const he in J){const ie=J[he],Be={...ie,key:he,label:ie.name,link:ie.url};ie.submenu&&(Be.items=q(ie.submenu,ce+1,Be.key)),ge&&(Be.key="".concat(ge,"_").concat(Be.key)),ie.isCurrent&&(i=Be.key),de.push(Be)}return de}function ne(J){const ce={};function ge(de){let he=!1;for(const ie of de){ie.isCurrent&&(ce[ie.key]=!0,he=!0);const Be=ie.items&&ge(ie.items);ie.items&&Be&&(ce[ie.key]=!0,he=!0)}return he}return ge(J),ce}const{sideMenuProps:ue}=Aee(z,{activeItemKey:i,expandedKeys:ne(a.value)});return io(()=>t.links,J=>{a.value=q(J)}),(J,ce)=>Object.keys(e.links).length?(L(),Q("nav",{key:0,class:"sticky top-12 flex h-[calc(100vh-3rem)] flex-none","aria-label":e.ariaLabel},[pe(i4e,Cn(se(ue),{"background-variant":"bg-secondary"}),null,16)],8,zYe)):we("",!0)}},jYe={props:{canDismiss:{type:Boolean,default(){return!1}},type:{type:String,default(){return""}}},computed:{classes(){let e=[];return this.type&&e.push("pkpNotification--"+this.type),this.canDismiss&&e.push("pkpNotification--canDismiss"),e}}},ZYe={class:"-screenReader"};function qYe(e,t,n,i,a,l){return L(),Q("div",{class:Rn(["pkpNotification",l.classes])},[is(e.$slots,"default"),t[3]||(t[3]=D()),n.canDismiss?(L(),Q("button",{key:0,class:"pkpNotification__closeButton",onClick:t[0]||(t[0]=f=>e.$emit("dismiss"))},[t[1]||(t[1]=H("span",{"aria-hidden":!0},"×",-1)),t[2]||(t[2]=D()),H("span",ZYe,ee(e.t("common.close")),1)])):we("",!0)],2)}const yH=wt(jYe,[["render",qYe]]),GYe={name:"Panel",props:{stack:{type:Boolean,default(){return!1}}}};function KYe(e,t,n,i,a,l){return L(),Q("div",{class:Rn(["panel",n.stack?"panel--stack":"panel--wide"])},[is(e.$slots,"default")],2)}const _H=wt(GYe,[["render",KYe]]),YYe={name:"PanelSection"},XYe={class:"panelSection"},JYe={key:0,class:"panelSection__header"},QYe={class:"panelSection__content"};function eXe(e,t,n,i,a,l){return L(),Q("div",XYe,[e.$slots.header?(L(),Q("div",JYe,[is(e.$slots,"header")])):we("",!0),t[0]||(t[0]=D()),H("div",QYe,[is(e.$slots,"default")])])}const SH=wt(YYe,[["render",eXe]]),tXe={props:{isOneLine:{type:Boolean,default:!0}},computed:{hasActions(){return this.$slots.actions}}},nXe={class:"pkpHeader__title"},sXe={key:0,class:"pkpHeader__actions"};function oXe(e,t,n,i,a,l){return L(),Q("div",{class:Rn(["pkpHeader",{"-isOneLine":n.isOneLine,"-pkpClearfix":!n.isOneLine}])},[H("span",nXe,[is(e.$slots,"default")]),t[0]||(t[0]=D()),l.hasActions?(L(),Q("div",sXe,[is(e.$slots,"actions")])):we("",!0)],2)}const Bf=wt(tXe,[["render",oXe]]),rXe={key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-default bg-opacity-75"},iXe={__name:"SpinnerFullScreen",setup(e){const t=lO();return(n,i)=>se(t).isFullScreenSpinner?(L(),Q("div",rXe,[pe(zl,{"size-variant":"big"})])):we("",!0)}},aXe={class:"ms-auto flex h-full whitespace-nowrap"},lXe={key:0},cXe=["href"],uXe={class:"-screenReader"},dXe=["disabled"],fXe={class:"-screenReader"},pXe={key:0,class:"absolute right-3 top-2 rounded-[2px] bg-negative p-[2px] text-lg-normal leading-none text-on-dark shadow"},mXe={class:"-screenReader"},hXe={class:"-screenReader"},gXe=["aria-label"],vXe={key:0,class:"-ml-2 -mr-2 border-b border-b-light pb-2 pl-2 pr-2"},bXe=["href"],yXe={key:1,class:"-ml-2 -mr-2 text-wrap border-b border-b-light p-2"},_Xe={class:"mb-1 mt-1 pl-2 pr-2 text-base-normal leading-5 text-secondary"},SXe=["href"],CXe={class:"-ml-2 -mr-2 text-wrap px-2 pt-2"},wXe=["href"],EXe=["href"],Yte={__name:"TopNavActions",setup(e){const{t}=Jn(),{updateIsTasksModalOpened:n,isTasksModalOpened:i}=jte(),{getUnreadNotifications:a,setUnreadNotifications:l,isUserLoggedInAs:f,getCurrentUserName:d,getCurrentUserInitials:h,getUserLoggedInAsUserName:b,getUserLoggedInAsInitials:S}=Nh();let k;const T=kt(a()),O=f(),P={username:d(),initials:h()},B=O?{username:b(),initials:S()}:P,{getLogoutUrl:W}=B5e(),Z=W(),{pageUrl:Y}=to(Z),{pageUrl:z}=to("user/profile"),{getSupportedLocales:q,getCurrentLocale:ne,getHelpUrl:ue}=LV(),J=ne(),ce=ue(),ge=Be=>{const $e=Be!=="notif-button"||!i;return{"relative bg-transparent leading-8 outline-none":!0,"!text-on-dark":$e,"!text-disabled":!$e,"hover:-translate-y-1 hover:text-on-dark hover:shadow-[0_0.25rem_#fff]":$e,"focus:-translate-y-1 focus:text-on-dark focus:shadow-[0_0.25rem_#fff]":$e}},de=["max-w-full cursor-pointer overflow-hidden truncate whitespace-nowrap","rounded border border-transparent bg-transparent hover:!border-primary","leading-6 text-primary"];function he(){return Object.entries(q()||{}).map(([Be,$e])=>{const{pageUrl:Ue}=to("user/setLocale/".concat(Be));return{key:Be,value:$e,href:Ue.value+"?source="+document.URL}})}function ie(){const{openLegacyModal:Be}=Ar({component:"grid.notifications.taskNotificationsGridHandler",op:"fetchGrid"});Be({title:t("common.tasks")},()=>{n(!1)}),n(!0)}return Pr(()=>{k&&pkp.eventBus.$off("update:unread-tasks-count",k),k=Be=>{T.value=l(Be.count)},pkp.eventBus.$on("update:unread-tasks-count",k)}),$a(()=>{pkp.eventBus.$off("update:unread-tasks-count",k)}),(Be,$e)=>(L(),Q("div",aXe,[se(ce)?(L(),Q("div",lXe,[H("a",{href:se(ce),target:"_blank",class:Rn([ge(),"flex h-full items-center p-2"])},[pe(Vs,{icon:"HelpTopNav",class:"h-7 w-7"}),$e[0]||($e[0]=D()),H("span",uXe,ee(se(t)("common.help")),1)],10,cXe)])):we("",!0),$e[13]||($e[13]=D()),H("div",null,[H("button",{ref:"tasksButton",class:Rn([ge("notif-button"),"border-none p-2"]),disabled:se(i),onClick:ie},[pe(Vs,{icon:"Notifications",class:"h-7 w-7"}),$e[1]||($e[1]=D()),H("span",fXe,ee(se(t)("common.tasks")),1),$e[2]||($e[2]=D()),T.value&&!se(i)?(L(),Q("span",pXe,ee(T.value),1)):we("",!0)],10,dXe)]),$e[14]||($e[14]=D()),H("div",null,[pe(Ww,{class:"app-user-nav flex h-full","data-cy":"app-user-nav"},{button:te(()=>[pe(eH,{initials:se(B).initials,"is-secondary":!0,"is-disabled":se(O)},null,8,["initials","is-disabled"]),$e[3]||($e[3]=D()),H("span",mXe,ee(se(B).username),1),$e[4]||($e[4]=D()),se(O)?(L(),Ee(eH,{key:0,initials:P.initials,class:"absolute top-1 h-6 w-6 rounded-full shadow ltr:right-1 rtl:left-1","is-warnable":!0,shrink:!0},null,8,["initials"])):we("",!0),$e[5]||($e[5]=D()),H("span",hXe,ee(P.username),1)]),default:te(()=>[$e[12]||($e[12]=D()),H("nav",{"aria-label":se(t)("common.navigation.user"),class:"mb-2 min-w-52 max-w-[20em]"},[he().length>1?(L(),Q("div",vXe,[$e[6]||($e[6]=H("div",{class:"ps-2 text-base-bold leading-6 text-secondary"},"\n Change Language\n ",-1)),$e[7]||($e[7]=D()),H("ul",null,[(L(!0),Q(bt,null,Sn(he(),Ue=>(L(),Q("li",{key:Ue.key,class:Rn(de)},[H("a",{href:Ue.href,class:"block w-full px-2 py-1 no-underline"},[Ue.key===se(J)?(L(),Ee(Vs,{key:0,icon:"Complete",class:"h-5 w-5",inline:!0})):we("",!0),D(" "+ee(Ue.value),1)],8,bXe)]))),128))])])):we("",!0),$e[10]||($e[10]=D()),se(O)?(L(),Q("div",yXe,[H("div",_Xe,[D(ee(se(t)("manager.people.signedInAs",{username:P.username}))+" ",1),H("a",{href:se(Y)},ee(se(t)("user.logOutAs",{username:P.username})),9,SXe),$e[8]||($e[8]=D("\n .\n "))])])):we("",!0),$e[11]||($e[11]=D()),H("div",CXe,[H("ul",null,[H("li",{class:Rn(de)},[H("a",{href:se(z),class:"block px-2 py-1"},ee(se(t)("user.profile.editProfile")),9,wXe)]),$e[9]||($e[9]=D()),H("li",{class:Rn(de)},[H("a",{href:se(Y),class:"block px-2 py-1"},ee(se(O)?se(t)("user.logOutAs",{username:P.username}):se(t)("user.logOut")),9,EXe)])])])],8,gXe)]),_:1})])]))}},kXe=Object.freeze(Object.defineProperty({__proto__:null,default:Yte},Symbol.toStringTag,{value:"Module"})),xXe={inject:["registerStep"],props:{id:{type:String,required:!0},label:{type:String,default(){return""}}},data(){return{isActive:!1}},created(){this.unregister=this.registerStep({id:this.id,label:Ge(()=>this.label),isActive:e=>this.isActive=e})},beforeUnmount(){this.unregister&&this.unregister()}},TXe=["hidden"];function IXe(e,t,n,i,a,l){return L(),Q("div",{class:"pkpStep",hidden:!a.isActive},[is(e.$slots,"default")],8,TXe)}const CH=wt(xXe,[["render",IXe]]);var wH={exports:{}},a4e;function AXe(){if(a4e)return wH.exports;a4e=1;function e(n){var i=n.target||n.srcElement;i.__resizeRAF__&&cancelAnimationFrame(i.__resizeRAF__),i.__resizeRAF__=requestAnimationFrame(function(){var a=i.__resizeTrigger__,l=a&&a.__resizeListeners__;l&&l.forEach(function(f){f.call(a,n)})})}var t=function(i,a){var l=this,f=l.document,d,h=f.attachEvent;typeof navigator<"u"&&(d=navigator.userAgent.match(/Trident/)||navigator.userAgent.match(/Edge/));function b(){this.contentDocument.defaultView.__resizeTrigger__=this.__resizeElement__,this.contentDocument.defaultView.addEventListener("resize",e)}if(!i.__resizeListeners__)if(i.__resizeListeners__=[],h)i.__resizeTrigger__=i,i.attachEvent("onresize",e);else{getComputedStyle(i).position==="static"&&(i.style.position="relative");var S=i.__resizeTrigger__=f.createElement("object");S.setAttribute("style","position: absolute; top: 0; left: 0; height: 100%; width: 100%; pointer-events: none; z-index: -1; opacity: 0;"),S.setAttribute("class","resize-sensor"),S.setAttribute("tabindex","-1"),S.setAttribute("title",""),S.__resizeElement__=i,S.onload=b,S.type="text/html",d&&i.appendChild(S),S.data="about:blank",d||i.appendChild(S)}i.__resizeListeners__.push(a)};return wH.exports=typeof window>"u"?t:t.bind(window),wH.exports.unbind=function(n,i){var a=document.attachEvent,l=n.__resizeListeners__||[];if(i){var f=l.indexOf(i);f!==-1&&l.splice(f,1)}else l=n.__resizeListeners__=[];if(!l.length){if(a)n.detachEvent("onresize",e);else if(n.__resizeTrigger__){var d=n.__resizeTrigger__.contentDocument,h=d&&d.defaultView;h&&(h.removeEventListener("resize",e),delete h.__resizeTrigger__),n.__resizeTrigger__=!n.removeChild(n.__resizeTrigger__)}delete n.__resizeListeners__}},wH.exports}var OXe=AXe();const RXe=Uw(OXe),DXe={components:{PkpButton:ms,Icon:Vs},provide(){return{registerStep:e=>(this.steps.push(e),()=>{const t=this.steps.findIndex(n=>n.id===e.id);t>-1&&this.steps.splice(t,1)})}},props:{current:{type:String,required:!0},startedSteps:{type:Array,required:!0},label:{type:String,required:!0},progressLabel:{type:String,required:!0},scrollTo:{type:HTMLElement,default(){return null}},showStepsLabel:{type:String,required:!0}},emits:["step:open"],data(){return{collapsed:!1,steps:[],stepsVisible:!1}},computed:{completedSteps(){return this.startedSteps.slice(0,-1)},progress(){return this.progressLabel.replace("{$current}",1+this.steps.findIndex(e=>e.id===this.current)).replace("{$total}",this.steps.length)}},watch:{collapsed(e,t){e!==t&&e&&(this.stepsVisible=!1)},current(e,t){this.setChildStepsIsActive(e),this.$nextTick(()=>{this.setStartedLine(),this.setFocusIn(this.$el.querySelector(".pkpStep:not([hidden])")),this.scrollTo&&this.$scrollTo(this.scrollTo,500,{offset:-50})})}},mounted(){this.setChildStepsIsActive(this.current),this.maybeToggleCollapsedView(),RXe(this.$el,Uh(this.maybeToggleCollapsedView,100)),this.$nextTick(()=>this.setStartedLine())},methods:{maybeToggleCollapsedView(){const e=this.$refs.buttons.offsetWidth,t=this.$refs.buttons.querySelectorAll("li>span"),n=Array.prototype.slice.call(t).reduce((i,a)=>i+a.offsetWidth,0);this.collapsed=n>e},setChildStepsIsActive(e){this.steps.forEach(t=>t.isActive(t.id===e))},setCurrent(e){this.$emit("step:open",e)},setStartedLine(){if(this.startedSteps.length<2){this.$refs.line.style.right="auto";return}const e=this.steps.reduce((n,i)=>this.startedSteps.includes(i.id)?i:n,this.startedSteps[0]),t=this.$refs.buttons.offsetWidth-this.$refs["button"+e.id][0].offsetLeft;this.$refs.line.style.right=t+"px"}}},LXe={ref:"line",class:"pkpSteps__line pkpSteps__line__started","aria-hidden":"true"},PXe=["aria-label"],MXe={key:0},NXe=["onClick"],FXe={class:"pkpSteps__step__number"},$Xe={class:"pkpSteps__step__number"},BXe={key:0,class:"pkpSteps__controls","aria-hidden":"true"},VXe={class:"relative bottom-1 me-1 text-lg-normal"},HXe={class:"-screenReader"};function UXe(e,t,n,i,a,l){const f=Xe("Icon"),d=Xe("PkpButton");return L(),Q("div",{class:Rn(["pkpSteps",{"pkpSteps--collapsed":a.collapsed}])},[H("div",{ref:"buttons",class:Rn(["pkpSteps__buttonWrapper",{"-screenReader":a.steps.length===1}])},[t[3]||(t[3]=H("span",{class:"pkpSteps__line","aria-hidden":"true"},null,-1)),t[4]||(t[4]=D()),H("span",LXe,null,512),t[5]||(t[5]=D()),H("ol",{class:"pkpSteps__buttons","aria-label":n.label},[(L(!0),Q(bt,null,Sn(a.steps,(h,b)=>(L(),Q("li",{key:h.id,class:Rn(["pkpSteps__step",{"-screenReader":a.collapsed&&!a.stepsVisible&&n.current!==h.id}])},[n.startedSteps.includes(h.id)?(L(),Q("span",MXe,[H("button",{ref_for:!0,ref:"button"+h.id,class:Rn(["pkpSteps__step__label",n.current===h.id?"pkpSteps__step__label--current":l.completedSteps.includes(h.id)?"pkpSteps__step__label--completed":""]),onClick:S=>l.setCurrent(h.id)},[H("span",FXe,[n.current!==h.id&&l.completedSteps.includes(h.id)?(L(),Ee(f,{key:0,icon:"Complete",class:"h-4 w-4"})):(L(),Q(bt,{key:1},[D(ee(b+1),1)],64))]),D(" "+ee(h.label),1)],10,NXe)])):(L(),Q("span",{key:1,ref_for:!0,ref:"button"+h.id,class:"pkpSteps__step__label"},[H("span",$Xe,ee(b+1),1),D(" "+ee(h.label),1)],512))],2))),128))],8,PXe),t[6]||(t[6]=D()),a.collapsed?(L(),Q("div",BXe,[H("span",VXe,ee(l.progress),1),t[2]||(t[2]=D()),pe(d,{class:"!px-2 !py-1",onClick:t[0]||(t[0]=()=>a.stepsVisible=!a.stepsVisible)},{default:te(()=>[H("span",HXe,ee(n.showStepsLabel),1),t[1]||(t[1]=D()),pe(f,{icon:a.stepsVisible?"ChevronUp":"ChevronDown",class:"h-5 w-5"},null,8,["icon"])]),_:1})])):we("",!0)],2),t[7]||(t[7]=D()),is(e.$slots,"default")],2)}const EH=wt(DXe,[["render",UXe]]),zXe={inject:["registerTab"],props:{icon:{type:String,default(){return""}},id:{type:String,required:!0},label:{type:String,default(){return""}},badge:{type:[String,Number],default(){return""}},isDisabled:{type:Boolean,default(){return!1}}},data(){return{isActive:!1}},computed:{classes(){let e=[];return this.isActive&&e.push("pkpTab--isActive"),this.isDisabled&&e.push("pkpTab--isDisabled"),e}},created(){this.unregister=this.registerTab({id:this.id,icon:Ge(()=>this.icon),label:Ge(()=>this.label),badge:Ge(()=>this.badge),isActive:e=>this.isActive=e})},beforeUnmount(){this.unregister&&this.unregister()}},WXe=["id","aria-labelledby","hidden"];function jXe(e,t,n,i,a,l){return L(),Q("div",{id:n.id,class:Rn(["pkpTab min-w-0",l.classes]),role:"tabpanel","aria-labelledby":n.id+"-button",hidden:!a.isActive},[is(e.$slots,"default")],10,WXe)}const l4e=wt(zXe,[["render",jXe]]),ZXe={components:{Icon:Vs,Badge:kd},props:{defaultTab:{type:String,default(){return""}},isSideTabs:{type:Boolean,default(){return!1}},label:{type:String,default(){return""}},trackHistory:{type:Boolean,default(){return!1}}},data(){return{currentTab:"",tabs:[]}},methods:{setCurrentTab(e){this.currentTab=e,this.$nextTick(()=>{$(this.$refs["button"+e]).focus(),this.updateUrl()})},setFirstTab(){this.setCurrentTab(this.tabs[0].id)},setLastTab(){this.setCurrentTab(this.tabs[this.tabs.length-1].id)},setNextTab(){const e=this.tabs.findIndex(n=>n.id===this.currentTab),t=this.tabs[e+1]||this.tabs[0];this.setCurrentTab(t.id)},setPreviousTab(){const e=this.tabs.findIndex(n=>n.id===this.currentTab),t=this.tabs[e-1]||this.tabs[this.tabs.length-1];this.setCurrentTab(t.id)},updateUrl:Uh(function(){if(this.trackHistory){const e=this.$parent.$options.name==="Tab"?"#"+this.$parent.id+"/"+this.currentTab:"#"+this.currentTab;if(e!==window.location.hash){const t=this.tabs.find(n=>n.id===this.currentTab);window.history.pushState({},t.label,e)}}},100)},watch:{currentTab(e,t){this.tabs.forEach(n=>n.isActive(n.id===e))}},provide(){return{registerTab:e=>(this.tabs.push(e),()=>{const t=this.tabs.findIndex(n=>n.id===e.id);t>-1&&this.tabs.splice(t,1)})}},mounted(){this.currentTab=this.defaultTab||this.tabs[0].id,pkp.eventBus.$on("open-tab",e=>{this.tabs.forEach(t=>{t.id===e&&this.setCurrentTab(e)})})},unmounted(){pkp.eventBus.$off("open-tab")}},qXe=["aria-label"],GXe=["id","aria-selected","aria-controls","tabindex","onClick"],KXe={class:"-screenReader"};function YXe(e,t,n,i,a,l){const f=Xe("Icon"),d=Xe("Badge");return L(),Q("div",{class:Rn(["pkpTabs",{"pkpTabs--side":n.isSideTabs}])},[H("div",{class:"pkpTabs__buttons",role:"tablist","aria-label":n.label},[(L(!0),Q(bt,null,Sn(a.tabs,h=>(L(),Q("button",{id:h.id+"-button",key:h.id,ref_for:!0,ref:"button"+h.id,"aria-selected":a.currentTab===h.id,"aria-controls":h.id,class:"pkpTabs__button",role:"tab",tabindex:a.currentTab===h.id?"":-1,onClick:b=>l.setCurrentTab(h.id),onKeydown:[t[0]||(t[0]=MS(wl((...b)=>l.setLastTab&&l.setLastTab(...b),["prevent"]),["end"])),t[1]||(t[1]=MS(wl((...b)=>l.setFirstTab&&l.setFirstTab(...b),["prevent"]),["home"])),t[2]||(t[2]=MS(wl((...b)=>l.setPreviousTab&&l.setPreviousTab(...b),["exact","prevent"]),["left"])),t[3]||(t[3]=MS(wl((...b)=>l.setNextTab&&l.setNextTab(...b),["exact","prevent"]),["right"]))]},[h.icon?(L(),Q(bt,{key:0},[pe(f,{icon:h.icon,class:"h-4 w-4"},null,8,["icon"]),t[4]||(t[4]=D()),H("span",KXe,ee(h.label),1)],64)):(L(),Q(bt,{key:1},[D(ee(h.label),1)],64)),t[5]||(t[5]=D()),h.badge?(L(),Ee(d,{key:2},{default:te(()=>[D(ee(h.badge),1)]),_:2},1024)):we("",!0)],40,GXe))),128))],8,qXe),t[6]||(t[6]=D()),is(e.$slots,"default")],2)}const c4e=wt(ZXe,[["render",YXe]]),XXe={},JXe={class:"actionPanel"},QXe={class:"actionPanel__text"},eJe={class:"actionPanel__actions"};function tJe(e,t){return L(),Q("div",JXe,[H("div",QXe,[is(e.$slots,"default")]),t[0]||(t[0]=D()),H("div",eJe,[is(e.$slots,"actions")])])}const Z1=wt(XXe,[["render",tJe]]);/*! * @kurkle/color v0.3.4 * https://github.com/kurkle/color#readme * (c) 2024 Jukka Kurkela * Released under the MIT License */function UO(e){return e+.5|0}const D5=(e,t,n)=>Math.max(Math.min(e,n),t);function zO(e){return D5(UO(e*2.55),0,255)}function L5(e){return D5(UO(e*255),0,255)}function Vb(e){return D5(UO(e/2.55)/100,0,1)}function u4e(e){return D5(UO(e*100),0,100)}const q1={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Xte=[..."0123456789ABCDEF"],nJe=e=>Xte[e&15],sJe=e=>Xte[(e&240)>>4]+Xte[e&15],kH=e=>(e&240)>>4===(e&15),oJe=e=>kH(e.r)&&kH(e.g)&&kH(e.b)&&kH(e.a);function rJe(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&q1[e[1]]*17,g:255&q1[e[2]]*17,b:255&q1[e[3]]*17,a:t===5?q1[e[4]]*17:255}:(t===7||t===9)&&(n={r:q1[e[1]]<<4|q1[e[2]],g:q1[e[3]]<<4|q1[e[4]],b:q1[e[5]]<<4|q1[e[6]],a:t===9?q1[e[7]]<<4|q1[e[8]]:255})),n}const iJe=(e,t)=>e<255?t(e):"";function aJe(e){var t=oJe(e)?nJe:sJe;return e?"#"+t(e.r)+t(e.g)+t(e.b)+iJe(e.a,t):void 0}const lJe=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function d4e(e,t,n){const i=t*Math.min(n,1-n),a=(l,f=(l+e/30)%12)=>n-i*Math.max(Math.min(f-3,9-f,1),-1);return[a(0),a(8),a(4)]}function cJe(e,t,n){const i=(a,l=(a+e/60)%6)=>n-n*t*Math.max(Math.min(l,4-l,1),0);return[i(5),i(3),i(1)]}function uJe(e,t,n){const i=d4e(e,1,.5);let a;for(t+n>1&&(a=1/(t+n),t*=a,n*=a),a=0;a<3;a++)i[a]*=1-t-n,i[a]+=t;return i}function dJe(e,t,n,i,a){return e===a?(t-n)/i+(t<n?6:0):t===a?(n-e)/i+2:(e-t)/i+4}function Jte(e){const n=e.r/255,i=e.g/255,a=e.b/255,l=Math.max(n,i,a),f=Math.min(n,i,a),d=(l+f)/2;let h,b,S;return l!==f&&(S=l-f,b=d>.5?S/(2-l-f):S/(l+f),h=dJe(n,i,a,S,l),h=h*60+.5),[h|0,b||0,d]}function Qte(e,t,n,i){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,i)).map(L5)}function ene(e,t,n){return Qte(d4e,e,t,n)}function fJe(e,t,n){return Qte(uJe,e,t,n)}function pJe(e,t,n){return Qte(cJe,e,t,n)}function f4e(e){return(e%360+360)%360}function mJe(e){const t=lJe.exec(e);let n=255,i;if(!t)return;t[5]!==i&&(n=t[6]?zO(+t[5]):L5(+t[5]));const a=f4e(+t[2]),l=+t[3]/100,f=+t[4]/100;return t[1]==="hwb"?i=fJe(a,l,f):t[1]==="hsv"?i=pJe(a,l,f):i=ene(a,l,f),{r:i[0],g:i[1],b:i[2],a:n}}function hJe(e,t){var n=Jte(e);n[0]=f4e(n[0]+t),n=ene(n),e.r=n[0],e.g=n[1],e.b=n[2]}function gJe(e){if(!e)return;const t=Jte(e),n=t[0],i=u4e(t[1]),a=u4e(t[2]);return e.a<255?"hsla(".concat(n,", ").concat(i,"%, ").concat(a,"%, ").concat(Vb(e.a),")"):"hsl(".concat(n,", ").concat(i,"%, ").concat(a,"%)")}const p4e={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},m4e={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function vJe(){const e={},t=Object.keys(m4e),n=Object.keys(p4e);let i,a,l,f,d;for(i=0;i<t.length;i++){for(f=d=t[i],a=0;a<n.length;a++)l=n[a],d=d.replace(l,p4e[l]);l=parseInt(m4e[f],16),e[d]=[l>>16&255,l>>8&255,l&255]}return e}let xH;function bJe(e){xH||(xH=vJe(),xH.transparent=[0,0,0,0]);const t=xH[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const yJe=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function _Je(e){const t=yJe.exec(e);let n=255,i,a,l;if(t){if(t[7]!==i){const f=+t[7];n=t[8]?zO(f):D5(f*255,0,255)}return i=+t[1],a=+t[3],l=+t[5],i=255&(t[2]?zO(i):D5(i,0,255)),a=255&(t[4]?zO(a):D5(a,0,255)),l=255&(t[6]?zO(l):D5(l,0,255)),{r:i,g:a,b:l,a:n}}}function SJe(e){return e&&(e.a<255?"rgba(".concat(e.r,", ").concat(e.g,", ").concat(e.b,", ").concat(Vb(e.a),")"):"rgb(".concat(e.r,", ").concat(e.g,", ").concat(e.b,")"))}const tne=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,o9=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function CJe(e,t,n){const i=o9(Vb(e.r)),a=o9(Vb(e.g)),l=o9(Vb(e.b));return{r:L5(tne(i+n*(o9(Vb(t.r))-i))),g:L5(tne(a+n*(o9(Vb(t.g))-a))),b:L5(tne(l+n*(o9(Vb(t.b))-l))),a:e.a+n*(t.a-e.a)}}function TH(e,t,n){if(e){let i=Jte(e);i[t]=Math.max(0,Math.min(i[t]+i[t]*n,t===0?360:1)),i=ene(i),e.r=i[0],e.g=i[1],e.b=i[2]}}function h4e(e,t){return e&&Object.assign(t||{},e)}function g4e(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=L5(e[3]))):(t=h4e(e,{r:0,g:0,b:0,a:1}),t.a=L5(t.a)),t}function wJe(e){return e.charAt(0)==="r"?_Je(e):mJe(e)}class WO{constructor(t){if(t instanceof WO)return t;const n=typeof t;let i;n==="object"?i=g4e(t):n==="string"&&(i=rJe(t)||bJe(t)||wJe(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=h4e(this._rgb);return t&&(t.a=Vb(t.a)),t}set rgb(t){this._rgb=g4e(t)}rgbString(){return this._valid?SJe(this._rgb):void 0}hexString(){return this._valid?aJe(this._rgb):void 0}hslString(){return this._valid?gJe(this._rgb):void 0}mix(t,n){if(t){const i=this.rgb,a=t.rgb;let l;const f=n===l?.5:n,d=2*f-1,h=i.a-a.a,b=((d*h===-1?d:(d+h)/(1+d*h))+1)/2;l=1-b,i.r=255&b*i.r+l*a.r+.5,i.g=255&b*i.g+l*a.g+.5,i.b=255&b*i.b+l*a.b+.5,i.a=f*i.a+(1-f)*a.a,this.rgb=i}return this}interpolate(t,n){return t&&(this._rgb=CJe(this._rgb,t._rgb,n)),this}clone(){return new WO(this.rgb)}alpha(t){return this._rgb.a=L5(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=UO(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return TH(this._rgb,2,t),this}darken(t){return TH(this._rgb,2,-t),this}saturate(t){return TH(this._rgb,1,t),this}desaturate(t){return TH(this._rgb,1,-t),this}rotate(t){return hJe(this._rgb,t),this}}/*! * Chart.js v4.4.8 * https://www.chartjs.org * (c) 2025 Chart.js Contributors * Released under the MIT License */function Hb(){}const EJe=(()=>{let e=0;return()=>e++})();function El(e){return e==null}function Xd(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function ra(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function G1(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function $v(e,t){return G1(e)?e:t}function xi(e,t){return typeof e>"u"?t:e}const kJe=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,v4e=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function Wl(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function Ua(e,t,n,i){let a,l,f;if(Xd(e))for(l=e.length,a=0;a<l;a++)t.call(n,e[a],a);else if(ra(e))for(f=Object.keys(e),l=f.length,a=0;a<l;a++)t.call(n,e[f[a]],f[a])}function IH(e,t){let n,i,a,l;if(!e||!t||e.length!==t.length)return!1;for(n=0,i=e.length;n<i;++n)if(a=e[n],l=t[n],a.datasetIndex!==l.datasetIndex||a.index!==l.index)return!1;return!0}function AH(e){if(Xd(e))return e.map(AH);if(ra(e)){const t=Object.create(null),n=Object.keys(e),i=n.length;let a=0;for(;a<i;++a)t[n[a]]=AH(e[n[a]]);return t}return e}function b4e(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function xJe(e,t,n,i){if(!b4e(e))return;const a=t[e],l=n[e];ra(a)&&ra(l)?jO(a,l,i):t[e]=AH(l)}function jO(e,t,n){const i=Xd(t)?t:[t],a=i.length;if(!ra(e))return e;n=n||{};const l=n.merger||xJe;let f;for(let d=0;d<a;++d){if(f=i[d],!ra(f))continue;const h=Object.keys(f);for(let b=0,S=h.length;b<S;++b)l(h[b],e,f,n)}return e}function ZO(e,t){return jO(e,t,{merger:TJe})}function TJe(e,t,n){if(!b4e(e))return;const i=t[e],a=n[e];ra(i)&&ra(a)?ZO(i,a):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=AH(a))}const y4e={"":e=>e,x:e=>e.x,y:e=>e.y};function IJe(e){const t=e.split("."),n=[];let i="";for(const a of t)i+=a,i.endsWith("\\")?i=i.slice(0,-1)+".":(n.push(i),i="");return n}function AJe(e){const t=IJe(e);return n=>{for(const i of t){if(i==="")break;n=n&&n[i]}return n}}function qO(e,t){return(y4e[t]||(y4e[t]=AJe(t)))(e)}function nne(e){return e.charAt(0).toUpperCase()+e.slice(1)}const OH=e=>typeof e<"u",P5=e=>typeof e=="function",_4e=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function OJe(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const Pu=Math.PI,jc=2*Pu,RJe=jc+Pu,RH=Number.POSITIVE_INFINITY,DJe=Pu/180,rd=Pu/2,uC=Pu/4,S4e=Pu*2/3,C4e=Math.log10,r9=Math.sign;function GO(e,t,n){return Math.abs(e-t)<n}function w4e(e){const t=Math.round(e);e=GO(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(C4e(e))),i=e/n;return(i<=1?1:i<=2?2:i<=5?5:10)*n}function LJe(e){const t=[],n=Math.sqrt(e);let i;for(i=1;i<n;i++)e%i===0&&(t.push(i),t.push(e/i));return n===(n|0)&&t.push(n),t.sort((a,l)=>a-l).pop(),t}function PJe(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function KO(e){return!PJe(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function MJe(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function NJe(e,t,n){let i,a,l;for(i=0,a=e.length;i<a;i++)l=e[i][n],isNaN(l)||(t.min=Math.min(t.min,l),t.max=Math.max(t.max,l))}function Ub(e){return e*(Pu/180)}function FJe(e){return e*(180/Pu)}function E4e(e){if(!G1(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function k4e(e,t){const n=t.x-e.x,i=t.y-e.y,a=Math.sqrt(n*n+i*i);let l=Math.atan2(i,n);return l<-.5*Pu&&(l+=jc),{angle:l,distance:a}}function sne(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function $Je(e,t){return(e-t+RJe)%jc-Pu}function M5(e){return(e%jc+jc)%jc}function YO(e,t,n,i){const a=M5(e),l=M5(t),f=M5(n),d=M5(l-a),h=M5(f-a),b=M5(a-l),S=M5(a-f);return a===l||a===f||i&&l===f||d>h&&b<S}function jp(e,t,n){return Math.max(t,Math.min(n,e))}function BJe(e){return jp(e,-32768,32767)}function i9(e,t,n,i=1e-6){return e>=Math.min(t,n)-i&&e<=Math.max(t,n)+i}function one(e,t,n){n=n||(f=>e[f]<t);let i=e.length-1,a=0,l;for(;i-a>1;)l=a+i>>1,n(l)?a=l:i=l;return{lo:a,hi:i}}const dC=(e,t,n,i)=>one(e,n,i?a=>{const l=e[a][t];return l<n||l===n&&e[a+1][t]===n}:a=>e[a][t]<n),VJe=(e,t,n)=>one(e,n,i=>e[i][t]>=n);function HJe(e,t,n){let i=0,a=e.length;for(;i<a&&e[i]<t;)i++;for(;a>i&&e[a-1]>n;)a--;return i>0||a<e.length?e.slice(i,a):e}const x4e=["push","pop","shift","splice","unshift"];function UJe(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),x4e.forEach(n=>{const i="_onData"+nne(n),a=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...l){const f=a.apply(this,l);return e._chartjs.listeners.forEach(d=>{typeof d[i]=="function"&&d[i](...l)}),f}})})}function T4e(e,t){const n=e._chartjs;if(!n)return;const i=n.listeners,a=i.indexOf(t);a!==-1&&i.splice(a,1),!(i.length>0)&&(x4e.forEach(l=>{delete e[l]}),delete e._chartjs)}function zJe(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const I4e=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function A4e(e,t){let n=[],i=!1;return function(...a){n=a,i||(i=!0,I4e.call(window,()=>{i=!1,e.apply(t,n)}))}}function WJe(e,t){let n;return function(...i){return t?(clearTimeout(n),n=setTimeout(e,t,i)):e.apply(this,i),t}}const O4e=e=>e==="start"?"left":e==="end"?"right":"center",zh=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,jJe=(e,t,n,i)=>e===(i?"left":"right")?n:e==="center"?(t+n)/2:t;function ZJe(e,t,n){const i=t.length;let a=0,l=i;if(e._sorted){const{iScale:f,vScale:d,_parsed:h}=e,b=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,S=f.axis,{min:k,max:T,minDefined:O,maxDefined:P}=f.getUserBounds();if(O){if(a=Math.min(dC(h,S,k).lo,n?i:dC(t,S,f.getPixelForValue(k)).lo),b){const B=h.slice(0,a+1).reverse().findIndex(W=>!El(W[d.axis]));a-=Math.max(0,B)}a=jp(a,0,i-1)}if(P){let B=Math.max(dC(h,f.axis,T,!0).hi+1,n?0:dC(t,S,f.getPixelForValue(T),!0).hi+1);if(b){const W=h.slice(B-1).findIndex(Z=>!El(Z[d.axis]));B+=Math.max(0,W)}l=jp(B,a,i)-a}else l=i-a}return{start:a,count:l}}function qJe(e){const{xScale:t,yScale:n,_scaleRanges:i}=e,a={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!i)return e._scaleRanges=a,!0;const l=i.xmin!==t.min||i.xmax!==t.max||i.ymin!==n.min||i.ymax!==n.max;return Object.assign(i,a),l}const DH=e=>e===0||e===1,R4e=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*jc/n)),D4e=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*jc/n)+1,XO={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*rd)+1,easeOutSine:e=>Math.sin(e*rd),easeInOutSine:e=>-.5*(Math.cos(Pu*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>DH(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>DH(e)?e:R4e(e,.075,.3),easeOutElastic:e=>DH(e)?e:D4e(e,.075,.3),easeInOutElastic(e){return DH(e)?e:e<.5?.5*R4e(e*2,.1125,.45):.5+.5*D4e(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-XO.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?XO.easeInBounce(e*2)*.5:XO.easeOutBounce(e*2-1)*.5+.5};function rne(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function L4e(e){return rne(e)?e:new WO(e)}function ine(e){return rne(e)?e:new WO(e).saturate(.5).darken(.1).hexString()}const GJe=["x","y","borderWidth","radius","tension"],KJe=["color","borderColor","backgroundColor"];function YJe(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:KJe},numbers:{type:"number",properties:GJe}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function XJe(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const P4e=new Map;function JJe(e,t){t=t||{};const n=e+JSON.stringify(t);let i=P4e.get(n);return i||(i=new Intl.NumberFormat(e,t),P4e.set(n,i)),i}function ane(e,t,n){return JJe(t,n).format(e)}const QJe={values(e){return Xd(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const i=this.chart.options.locale;let a,l=e;if(n.length>1){const b=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(b<1e-4||b>1e15)&&(a="scientific"),l=eQe(e,n)}const f=C4e(Math.abs(l)),d=isNaN(f)?1:Math.max(Math.min(-1*Math.floor(f),20),0),h={notation:a,minimumFractionDigits:d,maximumFractionDigits:d};return Object.assign(h,this.options.ticks.format),ane(e,i,h)}};function eQe(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var M4e={formatters:QJe};function tQe(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:M4e.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const fC=Object.create(null),lne=Object.create(null);function JO(e,t){if(!t)return e;const n=t.split(".");for(let i=0,a=n.length;i<a;++i){const l=n[i];e=e[l]||(e[l]=Object.create(null))}return e}function cne(e,t,n){return typeof t=="string"?jO(JO(e,t),n):jO(JO(e,""),t)}class nQe{constructor(t,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=i=>i.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(i,a)=>ine(a.backgroundColor),this.hoverBorderColor=(i,a)=>ine(a.borderColor),this.hoverColor=(i,a)=>ine(a.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}set(t,n){return cne(this,t,n)}get(t){return JO(this,t)}describe(t,n){return cne(lne,t,n)}override(t,n){return cne(fC,t,n)}route(t,n,i,a){const l=JO(this,t),f=JO(this,i),d="_"+n;Object.defineProperties(l,{[d]:{value:l[n],writable:!0},[n]:{enumerable:!0,get(){const h=this[d],b=f[a];return ra(h)?Object.assign({},b,h):xi(h,b)},set(h){this[d]=h}}})}apply(t){t.forEach(n=>n(this))}}var fu=new nQe({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[YJe,XJe,tQe]);function sQe(e){return!e||El(e.size)||El(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function N4e(e,t,n,i,a){let l=t[a];return l||(l=t[a]=e.measureText(a).width,n.push(a)),l>i&&(i=l),i}function pC(e,t,n){const i=e.currentDevicePixelRatio,a=n!==0?Math.max(n/2,.5):0;return Math.round((t-a)*i)/i+a}function F4e(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function une(e,t,n,i){$4e(e,t,n,i,null)}function $4e(e,t,n,i,a){let l,f,d,h,b,S,k,T;const O=t.pointStyle,P=t.rotation,B=t.radius;let W=(P||0)*DJe;if(O&&typeof O=="object"&&(l=O.toString(),l==="[object HTMLImageElement]"||l==="[object HTMLCanvasElement]")){e.save(),e.translate(n,i),e.rotate(W),e.drawImage(O,-O.width/2,-O.height/2,O.width,O.height),e.restore();return}if(!(isNaN(B)||B<=0)){switch(e.beginPath(),O){default:a?e.ellipse(n,i,a/2,B,0,0,jc):e.arc(n,i,B,0,jc),e.closePath();break;case"triangle":S=a?a/2:B,e.moveTo(n+Math.sin(W)*S,i-Math.cos(W)*B),W+=S4e,e.lineTo(n+Math.sin(W)*S,i-Math.cos(W)*B),W+=S4e,e.lineTo(n+Math.sin(W)*S,i-Math.cos(W)*B),e.closePath();break;case"rectRounded":b=B*.516,h=B-b,f=Math.cos(W+uC)*h,k=Math.cos(W+uC)*(a?a/2-b:h),d=Math.sin(W+uC)*h,T=Math.sin(W+uC)*(a?a/2-b:h),e.arc(n-k,i-d,b,W-Pu,W-rd),e.arc(n+T,i-f,b,W-rd,W),e.arc(n+k,i+d,b,W,W+rd),e.arc(n-T,i+f,b,W+rd,W+Pu),e.closePath();break;case"rect":if(!P){h=Math.SQRT1_2*B,S=a?a/2:h,e.rect(n-S,i-h,2*S,2*h);break}W+=uC;case"rectRot":k=Math.cos(W)*(a?a/2:B),f=Math.cos(W)*B,d=Math.sin(W)*B,T=Math.sin(W)*(a?a/2:B),e.moveTo(n-k,i-d),e.lineTo(n+T,i-f),e.lineTo(n+k,i+d),e.lineTo(n-T,i+f),e.closePath();break;case"crossRot":W+=uC;case"cross":k=Math.cos(W)*(a?a/2:B),f=Math.cos(W)*B,d=Math.sin(W)*B,T=Math.sin(W)*(a?a/2:B),e.moveTo(n-k,i-d),e.lineTo(n+k,i+d),e.moveTo(n+T,i-f),e.lineTo(n-T,i+f);break;case"star":k=Math.cos(W)*(a?a/2:B),f=Math.cos(W)*B,d=Math.sin(W)*B,T=Math.sin(W)*(a?a/2:B),e.moveTo(n-k,i-d),e.lineTo(n+k,i+d),e.moveTo(n+T,i-f),e.lineTo(n-T,i+f),W+=uC,k=Math.cos(W)*(a?a/2:B),f=Math.cos(W)*B,d=Math.sin(W)*B,T=Math.sin(W)*(a?a/2:B),e.moveTo(n-k,i-d),e.lineTo(n+k,i+d),e.moveTo(n+T,i-f),e.lineTo(n-T,i+f);break;case"line":f=a?a/2:Math.cos(W)*B,d=Math.sin(W)*B,e.moveTo(n-f,i-d),e.lineTo(n+f,i+d);break;case"dash":e.moveTo(n,i),e.lineTo(n+Math.cos(W)*(a?a/2:B),i+Math.sin(W)*B);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function QO(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function dne(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function fne(e){e.restore()}function oQe(e,t,n,i,a){if(!t)return e.lineTo(n.x,n.y);if(a==="middle"){const l=(t.x+n.x)/2;e.lineTo(l,t.y),e.lineTo(l,n.y)}else a==="after"!=!!i?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}function rQe(e,t,n,i){if(!t)return e.lineTo(n.x,n.y);e.bezierCurveTo(i?t.cp1x:t.cp2x,i?t.cp1y:t.cp2y,i?n.cp2x:n.cp1x,i?n.cp2y:n.cp1y,n.x,n.y)}function iQe(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),El(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function aQe(e,t,n,i,a){if(a.strikethrough||a.underline){const l=e.measureText(i),f=t-l.actualBoundingBoxLeft,d=t+l.actualBoundingBoxRight,h=n-l.actualBoundingBoxAscent,b=n+l.actualBoundingBoxDescent,S=a.strikethrough?(h+b)/2:b;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=a.decorationWidth||2,e.moveTo(f,S),e.lineTo(d,S),e.stroke()}}function lQe(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function LH(e,t,n,i,a,l={}){const f=Xd(t)?t:[t],d=l.strokeWidth>0&&l.strokeColor!=="";let h,b;for(e.save(),e.font=a.string,iQe(e,l),h=0;h<f.length;++h)b=f[h],l.backdrop&&lQe(e,l.backdrop),d&&(l.strokeColor&&(e.strokeStyle=l.strokeColor),El(l.strokeWidth)||(e.lineWidth=l.strokeWidth),e.strokeText(b,n,i,l.maxWidth)),e.fillText(b,n,i,l.maxWidth),aQe(e,n,i,b,l),i+=Number(a.lineHeight);e.restore()}function pne(e,t){const{x:n,y:i,w:a,h:l,radius:f}=t;e.arc(n+f.topLeft,i+f.topLeft,f.topLeft,1.5*Pu,Pu,!0),e.lineTo(n,i+l-f.bottomLeft),e.arc(n+f.bottomLeft,i+l-f.bottomLeft,f.bottomLeft,Pu,rd,!0),e.lineTo(n+a-f.bottomRight,i+l),e.arc(n+a-f.bottomRight,i+l-f.bottomRight,f.bottomRight,rd,0,!0),e.lineTo(n+a,i+f.topRight),e.arc(n+a-f.topRight,i+f.topRight,f.topRight,0,-rd,!0),e.lineTo(n+f.topLeft,i)}const cQe=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,uQe=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function dQe(e,t){const n=(""+e).match(cQe);if(!n||n[1]==="normal")return t*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return t*e}const fQe=e=>+e||0;function mne(e,t){const n={},i=ra(t),a=i?Object.keys(t):t,l=ra(e)?i?f=>xi(e[f],e[t[f]]):f=>e[f]:()=>e;for(const f of a)n[f]=fQe(l(f));return n}function pQe(e){return mne(e,{top:"y",right:"x",bottom:"y",left:"x"})}function eR(e){return mne(e,["topLeft","topRight","bottomLeft","bottomRight"])}function u0(e){const t=pQe(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Mm(e,t){e=e||{},t=t||fu.font;let n=xi(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let i=xi(e.style,t.style);i&&!(""+i).match(uQe)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const a={family:xi(e.family,t.family),lineHeight:dQe(xi(e.lineHeight,t.lineHeight),n),size:n,style:i,weight:xi(e.weight,t.weight),string:""};return a.string=sQe(a),a}function PH(e,t,n,i){let a,l,f;for(a=0,l=e.length;a<l;++a)if(f=e[a],f!==void 0&&f!==void 0)return f}function mQe(e,t,n){const{min:i,max:a}=e,l=v4e(t,(a-i)/2),f=(d,h)=>n&&d===0?0:d+h;return{min:f(i,-Math.abs(l)),max:f(a,l)}}function mC(e,t){return Object.assign(Object.create(e),t)}function hne(e,t=[""],n,i,a=()=>e[0]){const l=n||e;typeof i>"u"&&(i=z4e("_fallback",e));const f={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:l,_fallback:i,_getTarget:a,override:d=>hne([d,...e],t,l,i)};return new Proxy(f,{deleteProperty(d,h){return delete d[h],delete d._keys,delete e[0][h],!0},get(d,h){return V4e(d,h,()=>CQe(h,t,e,d))},getOwnPropertyDescriptor(d,h){return Reflect.getOwnPropertyDescriptor(d._scopes[0],h)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(d,h){return W4e(d).includes(h)},ownKeys(d){return W4e(d)},set(d,h,b){const S=d._storage||(d._storage=a());return d[h]=S[h]=b,delete d._keys,!0}})}function a9(e,t,n,i){const a={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:B4e(e,i),setContext:l=>a9(e,l,n,i),override:l=>a9(e.override(l),t,n,i)};return new Proxy(a,{deleteProperty(l,f){return delete l[f],delete e[f],!0},get(l,f,d){return V4e(l,f,()=>gQe(l,f,d))},getOwnPropertyDescriptor(l,f){return l._descriptors.allKeys?Reflect.has(e,f)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,f)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(l,f){return Reflect.has(e,f)},ownKeys(){return Reflect.ownKeys(e)},set(l,f,d){return e[f]=d,delete l[f],!0}})}function B4e(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:i=t.indexable,_allKeys:a=t.allKeys}=e;return{allKeys:a,scriptable:n,indexable:i,isScriptable:P5(n)?n:()=>n,isIndexable:P5(i)?i:()=>i}}const hQe=(e,t)=>e?e+nne(t):t,gne=(e,t)=>ra(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function V4e(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const i=n();return e[t]=i,i}function gQe(e,t,n){const{_proxy:i,_context:a,_subProxy:l,_descriptors:f}=e;let d=i[t];return P5(d)&&f.isScriptable(t)&&(d=vQe(t,d,e,n)),Xd(d)&&d.length&&(d=bQe(t,d,e,f.isIndexable)),gne(t,d)&&(d=a9(d,a,l&&l[t],f)),d}function vQe(e,t,n,i){const{_proxy:a,_context:l,_subProxy:f,_stack:d}=n;if(d.has(e))throw new Error("Recursion detected: "+Array.from(d).join("->")+"->"+e);d.add(e);let h=t(l,f||i);return d.delete(e),gne(e,h)&&(h=vne(a._scopes,a,e,h)),h}function bQe(e,t,n,i){const{_proxy:a,_context:l,_subProxy:f,_descriptors:d}=n;if(typeof l.index<"u"&&i(e))return t[l.index%t.length];if(ra(t[0])){const h=t,b=a._scopes.filter(S=>S!==h);t=[];for(const S of h){const k=vne(b,a,e,S);t.push(a9(k,l,f&&f[e],d))}}return t}function H4e(e,t,n){return P5(e)?e(t,n):e}const yQe=(e,t)=>e===!0?t:typeof e=="string"?qO(t,e):void 0;function _Qe(e,t,n,i,a){for(const l of t){const f=yQe(n,l);if(f){e.add(f);const d=H4e(f._fallback,n,a);if(typeof d<"u"&&d!==n&&d!==i)return d}else if(f===!1&&typeof i<"u"&&n!==i)return null}return!1}function vne(e,t,n,i){const a=t._rootScopes,l=H4e(t._fallback,n,i),f=[...e,...a],d=new Set;d.add(i);let h=U4e(d,f,n,l||n,i);return h===null||typeof l<"u"&&l!==n&&(h=U4e(d,f,l,h,i),h===null)?!1:hne(Array.from(d),[""],a,l,()=>SQe(t,n,i))}function U4e(e,t,n,i,a){for(;n;)n=_Qe(e,t,n,i,a);return n}function SQe(e,t,n){const i=e._getTarget();t in i||(i[t]={});const a=i[t];return Xd(a)&&ra(n)?n:a||{}}function CQe(e,t,n,i){let a;for(const l of t)if(a=z4e(hQe(l,e),n),typeof a<"u")return gne(e,a)?vne(n,i,e,a):a}function z4e(e,t){for(const n of t){if(!n)continue;const i=n[e];if(typeof i<"u")return i}}function W4e(e){let t=e._keys;return t||(t=e._keys=wQe(e._scopes)),t}function wQe(e){const t=new Set;for(const n of e)for(const i of Object.keys(n).filter(a=>!a.startsWith("_")))t.add(i);return Array.from(t)}const EQe=Number.EPSILON||1e-14,l9=(e,t)=>t<e.length&&!e[t].skip&&e[t],j4e=e=>e==="x"?"y":"x";function kQe(e,t,n,i){const a=e.skip?t:e,l=t,f=n.skip?t:n,d=sne(l,a),h=sne(f,l);let b=d/(d+h),S=h/(d+h);b=isNaN(b)?0:b,S=isNaN(S)?0:S;const k=i*b,T=i*S;return{previous:{x:l.x-k*(f.x-a.x),y:l.y-k*(f.y-a.y)},next:{x:l.x+T*(f.x-a.x),y:l.y+T*(f.y-a.y)}}}function xQe(e,t,n){const i=e.length;let a,l,f,d,h,b=l9(e,0);for(let S=0;S<i-1;++S)if(h=b,b=l9(e,S+1),!(!h||!b)){if(GO(t[S],0,EQe)){n[S]=n[S+1]=0;continue}a=n[S]/t[S],l=n[S+1]/t[S],d=Math.pow(a,2)+Math.pow(l,2),!(d<=9)&&(f=3/Math.sqrt(d),n[S]=a*f*t[S],n[S+1]=l*f*t[S])}}function TQe(e,t,n="x"){const i=j4e(n),a=e.length;let l,f,d,h=l9(e,0);for(let b=0;b<a;++b){if(f=d,d=h,h=l9(e,b+1),!d)continue;const S=d[n],k=d[i];f&&(l=(S-f[n])/3,d["cp1".concat(n)]=S-l,d["cp1".concat(i)]=k-l*t[b]),h&&(l=(h[n]-S)/3,d["cp2".concat(n)]=S+l,d["cp2".concat(i)]=k+l*t[b])}}function IQe(e,t="x"){const n=j4e(t),i=e.length,a=Array(i).fill(0),l=Array(i);let f,d,h,b=l9(e,0);for(f=0;f<i;++f)if(d=h,h=b,b=l9(e,f+1),!!h){if(b){const S=b[t]-h[t];a[f]=S!==0?(b[n]-h[n])/S:0}l[f]=d?b?r9(a[f-1])!==r9(a[f])?0:(a[f-1]+a[f])/2:a[f-1]:a[f]}xQe(e,a,l),TQe(e,l,t)}function MH(e,t,n){return Math.max(Math.min(e,n),t)}function AQe(e,t){let n,i,a,l,f,d=QO(e[0],t);for(n=0,i=e.length;n<i;++n)f=l,l=d,d=n<i-1&&QO(e[n+1],t),l&&(a=e[n],f&&(a.cp1x=MH(a.cp1x,t.left,t.right),a.cp1y=MH(a.cp1y,t.top,t.bottom)),d&&(a.cp2x=MH(a.cp2x,t.left,t.right),a.cp2y=MH(a.cp2y,t.top,t.bottom)))}function OQe(e,t,n,i,a){let l,f,d,h;if(t.spanGaps&&(e=e.filter(b=>!b.skip)),t.cubicInterpolationMode==="monotone")IQe(e,a);else{let b=i?e[e.length-1]:e[0];for(l=0,f=e.length;l<f;++l)d=e[l],h=kQe(b,d,e[Math.min(l+1,f-(i?0:1))%f],t.tension),d.cp1x=h.previous.x,d.cp1y=h.previous.y,d.cp2x=h.next.x,d.cp2y=h.next.y,b=d}t.capBezierPoints&&AQe(e,n)}function bne(){return typeof window<"u"&&typeof document<"u"}function yne(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function NH(e,t,n){let i;return typeof e=="string"?(i=parseInt(e,10),e.indexOf("%")!==-1&&(i=i/100*t.parentNode[n])):i=e,i}const FH=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function RQe(e,t){return FH(e).getPropertyValue(t)}const DQe=["top","right","bottom","left"];function hC(e,t,n){const i={};n=n?"-"+n:"";for(let a=0;a<4;a++){const l=DQe[a];i[l]=parseFloat(e[t+"-"+l+n])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const LQe=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function PQe(e,t){const n=e.touches,i=n&&n.length?n[0]:e,{offsetX:a,offsetY:l}=i;let f=!1,d,h;if(LQe(a,l,e.target))d=a,h=l;else{const b=t.getBoundingClientRect();d=i.clientX-b.left,h=i.clientY-b.top,f=!0}return{x:d,y:h,box:f}}function gC(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:i}=t,a=FH(n),l=a.boxSizing==="border-box",f=hC(a,"padding"),d=hC(a,"border","width"),{x:h,y:b,box:S}=PQe(e,n),k=f.left+(S&&d.left),T=f.top+(S&&d.top);let{width:O,height:P}=t;return l&&(O-=f.width+d.width,P-=f.height+d.height),{x:Math.round((h-k)/O*n.width/i),y:Math.round((b-T)/P*n.height/i)}}function MQe(e,t,n){let i,a;if(t===void 0||n===void 0){const l=e&&yne(e);if(!l)t=e.clientWidth,n=e.clientHeight;else{const f=l.getBoundingClientRect(),d=FH(l),h=hC(d,"border","width"),b=hC(d,"padding");t=f.width-b.width-h.width,n=f.height-b.height-h.height,i=NH(d.maxWidth,l,"clientWidth"),a=NH(d.maxHeight,l,"clientHeight")}}return{width:t,height:n,maxWidth:i||RH,maxHeight:a||RH}}const $H=e=>Math.round(e*10)/10;function NQe(e,t,n,i){const a=FH(e),l=hC(a,"margin"),f=NH(a.maxWidth,e,"clientWidth")||RH,d=NH(a.maxHeight,e,"clientHeight")||RH,h=MQe(e,t,n);let{width:b,height:S}=h;if(a.boxSizing==="content-box"){const T=hC(a,"border","width"),O=hC(a,"padding");b-=O.width+T.width,S-=O.height+T.height}return b=Math.max(0,b-l.width),S=Math.max(0,i?b/i:S-l.height),b=$H(Math.min(b,f,h.maxWidth)),S=$H(Math.min(S,d,h.maxHeight)),b&&!S&&(S=$H(b/2)),(t!==void 0||n!==void 0)&&i&&h.height&&S>h.height&&(S=h.height,b=$H(Math.floor(S*i))),{width:b,height:S}}function Z4e(e,t,n){const i=t||1,a=Math.floor(e.height*i),l=Math.floor(e.width*i);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const f=e.canvas;return f.style&&(n||!f.style.height&&!f.style.width)&&(f.style.height="".concat(e.height,"px"),f.style.width="".concat(e.width,"px")),e.currentDevicePixelRatio!==i||f.height!==a||f.width!==l?(e.currentDevicePixelRatio=i,f.height=a,f.width=l,e.ctx.setTransform(i,0,0,i,0,0),!0):!1}const FQe=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};bne()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e}();function q4e(e,t){const n=RQe(e,t),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function vC(e,t,n,i){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function $Qe(e,t,n,i){return{x:e.x+n*(t.x-e.x),y:i==="middle"?n<.5?e.y:t.y:i==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function BQe(e,t,n,i){const a={x:e.cp2x,y:e.cp2y},l={x:t.cp1x,y:t.cp1y},f=vC(e,a,n),d=vC(a,l,n),h=vC(l,t,n),b=vC(f,d,n),S=vC(d,h,n);return vC(b,S,n)}const VQe=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,i){return n-i},leftForLtr(n,i){return n-i}}},HQe=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function c9(e,t,n){return e?VQe(t,n):HQe()}function G4e(e,t){let n,i;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,i=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=i)}function K4e(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function Y4e(e){return e==="angle"?{between:YO,compare:$Je,normalize:M5}:{between:i9,compare:(t,n)=>t-n,normalize:t=>t}}function X4e({start:e,end:t,count:n,loop:i,style:a}){return{start:e%n,end:t%n,loop:i&&(t-e+1)%n===0,style:a}}function UQe(e,t,n){const{property:i,start:a,end:l}=n,{between:f,normalize:d}=Y4e(i),h=t.length;let{start:b,end:S,loop:k}=e,T,O;if(k){for(b+=h,S+=h,T=0,O=h;T<O&&f(d(t[b%h][i]),a,l);++T)b--,S--;b%=h,S%=h}return S<b&&(S+=h),{start:b,end:S,loop:k,style:e.style}}function zQe(e,t,n){if(!n)return[e];const{property:i,start:a,end:l}=n,f=t.length,{compare:d,between:h,normalize:b}=Y4e(i),{start:S,end:k,loop:T,style:O}=UQe(e,t,n),P=[];let B=!1,W=null,Z,Y,z;const q=()=>h(a,z,Z)&&d(a,z)!==0,ne=()=>d(l,Z)===0||h(l,z,Z),ue=()=>B||q(),J=()=>!B||ne();for(let ce=S,ge=S;ce<=k;++ce)Y=t[ce%f],!Y.skip&&(Z=b(Y[i]),Z!==z&&(B=h(Z,a,l),W===null&&ue()&&(W=d(Z,a)===0?ce:ge),W!==null&&J()&&(P.push(X4e({start:W,end:ce,loop:T,count:f,style:O})),W=null),ge=ce,z=Z));return W!==null&&P.push(X4e({start:W,end:k,loop:T,count:f,style:O})),P}function WQe(e,t){const n=[],i=e.segments;for(let a=0;a<i.length;a++){const l=zQe(i[a],e.points,t);l.length&&n.push(...l)}return n}function jQe(e,t,n,i){let a=0,l=t-1;if(n&&!i)for(;a<t&&!e[a].skip;)a++;for(;a<t&&e[a].skip;)a++;for(a%=t,n&&(l+=a);l>a&&e[l%t].skip;)l--;return l%=t,{start:a,end:l}}function ZQe(e,t,n,i){const a=e.length,l=[];let f=t,d=e[t],h;for(h=t+1;h<=n;++h){const b=e[h%a];b.skip||b.stop?d.skip||(i=!1,l.push({start:t%a,end:(h-1)%a,loop:i}),t=f=b.stop?h:null):(f=h,d.skip&&(t=h)),d=b}return f!==null&&l.push({start:t%a,end:f%a,loop:i}),l}function qQe(e,t){const n=e.points,i=e.options.spanGaps,a=n.length;if(!a)return[];const l=!!e._loop,{start:f,end:d}=jQe(n,a,l,i);if(i===!0)return J4e(e,[{start:f,end:d,loop:l}],n,t);const h=d<f?d+a:d,b=!!e._fullLoop&&f===0&&d===a-1;return J4e(e,ZQe(n,f,h,b),n,t)}function J4e(e,t,n,i){return!i||!i.setContext||!n?t:GQe(e,t,n,i)}function GQe(e,t,n,i){const a=e._chart.getContext(),l=Q4e(e.options),{_datasetIndex:f,options:{spanGaps:d}}=e,h=n.length,b=[];let S=l,k=t[0].start,T=k;function O(P,B,W,Z){const Y=d?-1:1;if(P!==B){for(P+=h;n[P%h].skip;)P-=Y;for(;n[B%h].skip;)B+=Y;P%h!==B%h&&(b.push({start:P%h,end:B%h,loop:W,style:Z}),S=Z,k=B%h)}}for(const P of t){k=d?k:P.start;let B=n[k%h],W;for(T=k+1;T<=P.end;T++){const Z=n[T%h];W=Q4e(i.setContext(mC(a,{type:"segment",p0:B,p1:Z,p0DataIndex:(T-1)%h,p1DataIndex:T%h,datasetIndex:f}))),KQe(W,S)&&O(k,T-1,P.loop,S),B=Z,S=W}k<T-1&&O(k,T-1,P.loop,S)}return b}function Q4e(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function KQe(e,t){if(!t)return!1;const n=[],i=function(a,l){return rne(l)?(n.includes(l)||n.push(l),n.indexOf(l)):l};return JSON.stringify(e,i)!==JSON.stringify(t,i)}/*! * Chart.js v4.4.8 * https://www.chartjs.org * (c) 2025 Chart.js Contributors * Released under the MIT License */class YQe{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,i,a){const l=n.listeners[a],f=n.duration;l.forEach(d=>d({chart:t,initial:n.initial,numSteps:f,currentStep:Math.min(i-n.start,f)}))}_refresh(){this._request||(this._running=!0,this._request=I4e.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((i,a)=>{if(!i.running||!i.items.length)return;const l=i.items;let f=l.length-1,d=!1,h;for(;f>=0;--f)h=l[f],h._active?(h._total>i.duration&&(i.duration=h._total),h.tick(t),d=!0):(l[f]=l[l.length-1],l.pop());d&&(a.draw(),this._notify(a,i,t,"progress")),l.length||(i.running=!1,this._notify(a,i,t,"complete"),i.initial=!1),n+=l.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let i=n.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,i)),i}listen(t,n,i){this._getAnims(t).listeners[n].push(i)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((i,a)=>Math.max(i,a._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const i=n.items;let a=i.length-1;for(;a>=0;--a)i[a].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var zb=new YQe;const e_e="transparent",XQe={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const i=L4e(e||e_e),a=i.valid&&L4e(t||e_e);return a&&a.valid?a.mix(i,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class JQe{constructor(t,n,i,a){const l=n[i];a=PH([t.to,a,l,t.from]);const f=PH([t.from,l,a]);this._active=!0,this._fn=t.fn||XQe[t.type||typeof f],this._easing=XO[t.easing]||XO.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=i,this._from=f,this._to=a,this._promises=void 0}active(){return this._active}update(t,n,i){if(this._active){this._notify(!1);const a=this._target[this._prop],l=i-this._start,f=this._duration-l;this._start=i,this._duration=Math.floor(Math.max(f,t.duration)),this._total+=l,this._loop=!!t.loop,this._to=PH([t.to,n,a,t.from]),this._from=PH([t.from,a,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,i=this._duration,a=this._prop,l=this._from,f=this._loop,d=this._to;let h;if(this._active=l!==d&&(f||n<i),!this._active){this._target[a]=d,this._notify(!0);return}if(n<0){this._target[a]=l;return}h=n/i%2,h=f&&h>1?2-h:h,h=this._easing(Math.min(1,Math.max(0,h))),this._target[a]=this._fn(l,d,h)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,i)=>{t.push({res:n,rej:i})})}_notify(t){const n=t?"res":"rej",i=this._promises||[];for(let a=0;a<i.length;a++)i[a][n]()}}class t_e{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!ra(t))return;const n=Object.keys(fu.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach(a=>{const l=t[a];if(!ra(l))return;const f={};for(const d of n)f[d]=l[d];(Xd(l.properties)&&l.properties||[a]).forEach(d=>{(d===a||!i.has(d))&&i.set(d,f)})})}_animateOptions(t,n){const i=n.options,a=eet(t,i);if(!a)return[];const l=this._createAnimations(a,i);return i.$shared&&QQe(t.options.$animations,i).then(()=>{t.options=i},()=>{}),l}_createAnimations(t,n){const i=this._properties,a=[],l=t.$animations||(t.$animations={}),f=Object.keys(n),d=Date.now();let h;for(h=f.length-1;h>=0;--h){const b=f[h];if(b.charAt(0)==="$")continue;if(b==="options"){a.push(...this._animateOptions(t,n));continue}const S=n[b];let k=l[b];const T=i.get(b);if(k)if(T&&k.active()){k.update(T,S,d);continue}else k.cancel();if(!T||!T.duration){t[b]=S;continue}l[b]=k=new JQe(T,t,b,S),a.push(k)}return a}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const i=this._createAnimations(t,n);if(i.length)return zb.add(this._chart,i),!0}}function QQe(e,t){const n=[],i=Object.keys(t);for(let a=0;a<i.length;a++){const l=e[i[a]];l&&l.active()&&n.push(l.wait())}return Promise.all(n)}function eet(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function n_e(e,t){const n=e&&e.options||{},i=n.reverse,a=n.min===void 0?t:0,l=n.max===void 0?t:0;return{start:i?l:a,end:i?a:l}}function tet(e,t,n){if(n===!1)return!1;const i=n_e(e,n),a=n_e(t,n);return{top:a.end,right:i.end,bottom:a.start,left:i.start}}function net(e){let t,n,i,a;return ra(e)?(t=e.top,n=e.right,i=e.bottom,a=e.left):t=n=i=a=e,{top:t,right:n,bottom:i,left:a,disabled:e===!1}}function s_e(e,t){const n=[],i=e._getSortedDatasetMetas(t);let a,l;for(a=0,l=i.length;a<l;++a)n.push(i[a].index);return n}function o_e(e,t,n,i={}){const a=e.keys,l=i.mode==="single";let f,d,h,b;if(t===null)return;let S=!1;for(f=0,d=a.length;f<d;++f){if(h=+a[f],h===n){if(S=!0,i.all)continue;break}b=e.values[h],G1(b)&&(l||t===0||r9(t)===r9(b))&&(t+=b)}return!S&&!i.all?0:t}function set(e,t){const{iScale:n,vScale:i}=t,a=n.axis==="x"?"x":"y",l=i.axis==="x"?"x":"y",f=Object.keys(e),d=new Array(f.length);let h,b,S;for(h=0,b=f.length;h<b;++h)S=f[h],d[h]={[a]:S,[l]:e[S]};return d}function _ne(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function oet(e,t,n){return"".concat(e.id,".").concat(t.id,".").concat(n.stack||n.type)}function ret(e){const{min:t,max:n,minDefined:i,maxDefined:a}=e.getUserBounds();return{min:i?t:Number.NEGATIVE_INFINITY,max:a?n:Number.POSITIVE_INFINITY}}function iet(e,t,n){const i=e[t]||(e[t]={});return i[n]||(i[n]={})}function r_e(e,t,n,i){for(const a of t.getMatchingVisibleMetas(i).reverse()){const l=e[a.index];if(n&&l>0||!n&&l<0)return a.index}return null}function i_e(e,t){const{chart:n,_cachedMeta:i}=e,a=n._stacks||(n._stacks={}),{iScale:l,vScale:f,index:d}=i,h=l.axis,b=f.axis,S=oet(l,f,i),k=t.length;let T;for(let O=0;O<k;++O){const P=t[O],{[h]:B,[b]:W}=P,Z=P._stacks||(P._stacks={});T=Z[b]=iet(a,S,B),T[d]=W,T._top=r_e(T,f,!0,i.type),T._bottom=r_e(T,f,!1,i.type);const Y=T._visualValues||(T._visualValues={});Y[d]=W}}function Sne(e,t){const n=e.scales;return Object.keys(n).filter(i=>n[i].axis===t).shift()}function aet(e,t){return mC(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function cet(e,t,n){return mC(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function tR(e,t){const n=e.controller.index,i=e.vScale&&e.vScale.axis;if(i){t=t||e._parsed;for(const a of t){const l=a._stacks;if(!l||l[i]===void 0||l[i][n]===void 0)return;delete l[i][n],l[i]._visualValues!==void 0&&l[i]._visualValues[n]!==void 0&&delete l[i]._visualValues[n]}}}const Cne=e=>e==="reset"||e==="none",a_e=(e,t)=>t?e:Object.assign({},e),uet=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:s_e(n,!0),values:null};class u9{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=_ne(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&tR(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,i=this.getDataset(),a=(k,T,O,P)=>k==="x"?T:k==="r"?P:O,l=n.xAxisID=xi(i.xAxisID,Sne(t,"x")),f=n.yAxisID=xi(i.yAxisID,Sne(t,"y")),d=n.rAxisID=xi(i.rAxisID,Sne(t,"r")),h=n.indexAxis,b=n.iAxisID=a(h,l,f,d),S=n.vAxisID=a(h,f,l,d);n.xScale=this.getScaleForId(l),n.yScale=this.getScaleForId(f),n.rScale=this.getScaleForId(d),n.iScale=this.getScaleForId(b),n.vScale=this.getScaleForId(S)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&T4e(this._data,this),t._stacked&&tR(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),i=this._data;if(ra(n)){const a=this._cachedMeta;this._data=set(n,a)}else if(i!==n){if(i){T4e(i,this);const a=this._cachedMeta;tR(a),a._parsed=[]}n&&Object.isExtensible(n)&&UJe(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,i=this.getDataset();let a=!1;this._dataCheck();const l=n._stacked;n._stacked=_ne(n.vScale,n),n.stack!==i.stack&&(a=!0,tR(n),n.stack=i.stack),this._resyncElements(t),(a||l!==n._stacked)&&(i_e(this,n._parsed),n._stacked=_ne(n.vScale,n))}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:i,_data:a}=this,{iScale:l,_stacked:f}=i,d=l.axis;let h=t===0&&n===a.length?!0:i._sorted,b=t>0&&i._parsed[t-1],S,k,T;if(this._parsing===!1)i._parsed=a,i._sorted=!0,T=a;else{Xd(a[t])?T=this.parseArrayData(i,a,t,n):ra(a[t])?T=this.parseObjectData(i,a,t,n):T=this.parsePrimitiveData(i,a,t,n);const O=()=>k[d]===null||b&&k[d]<b[d];for(S=0;S<n;++S)i._parsed[S+t]=k=T[S],h&&(O()&&(h=!1),b=k);i._sorted=h}f&&i_e(this,T)}parsePrimitiveData(t,n,i,a){const{iScale:l,vScale:f}=t,d=l.axis,h=f.axis,b=l.getLabels(),S=l===f,k=new Array(a);let T,O,P;for(T=0,O=a;T<O;++T)P=T+i,k[T]={[d]:S||l.parse(b[P],P),[h]:f.parse(n[P],P)};return k}parseArrayData(t,n,i,a){const{xScale:l,yScale:f}=t,d=new Array(a);let h,b,S,k;for(h=0,b=a;h<b;++h)S=h+i,k=n[S],d[h]={x:l.parse(k[0],S),y:f.parse(k[1],S)};return d}parseObjectData(t,n,i,a){const{xScale:l,yScale:f}=t,{xAxisKey:d="x",yAxisKey:h="y"}=this._parsing,b=new Array(a);let S,k,T,O;for(S=0,k=a;S<k;++S)T=S+i,O=n[T],b[S]={x:l.parse(qO(O,d),T),y:f.parse(qO(O,h),T)};return b}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,i){const a=this.chart,l=this._cachedMeta,f=n[t.axis],d={keys:s_e(a,!0),values:n._stacks[t.axis]._visualValues};return o_e(d,f,l.index,{mode:i})}updateRangeFromParsed(t,n,i,a){const l=i[n.axis];let f=l===null?NaN:l;const d=a&&i._stacks[n.axis];a&&d&&(a.values=d,f=o_e(a,l,this._cachedMeta.index)),t.min=Math.min(t.min,f),t.max=Math.max(t.max,f)}getMinMax(t,n){const i=this._cachedMeta,a=i._parsed,l=i._sorted&&t===i.iScale,f=a.length,d=this._getOtherScale(t),h=uet(n,i,this.chart),b={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:S,max:k}=ret(d);let T,O;function P(){O=a[T];const B=O[d.axis];return!G1(O[t.axis])||S>B||k<B}for(T=0;T<f&&!(!P()&&(this.updateRangeFromParsed(b,t,O,h),l));++T);if(l){for(T=f-1;T>=0;--T)if(!P()){this.updateRangeFromParsed(b,t,O,h);break}}return b}getAllParsedValues(t){const n=this._cachedMeta._parsed,i=[];let a,l,f;for(a=0,l=n.length;a<l;++a)f=n[a][t.axis],G1(f)&&i.push(f);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,i=n.iScale,a=n.vScale,l=this.getParsed(t);return{label:i?""+i.getLabelForValue(l[i.axis]):"",value:a?""+a.getLabelForValue(l[a.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=net(xi(this.options.clip,tet(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,i=this._cachedMeta,a=i.data||[],l=n.chartArea,f=[],d=this._drawStart||0,h=this._drawCount||a.length-d,b=this.options.drawActiveElementsOnTop;let S;for(i.dataset&&i.dataset.draw(t,l,d,h),S=d;S<d+h;++S){const k=a[S];k.hidden||(k.active&&b?f.push(k):k.draw(t,l))}for(S=0;S<f.length;++S)f[S].draw(t,l)}getStyle(t,n){const i=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,n,i){const a=this.getDataset();let l;if(t>=0&&t<this._cachedMeta.data.length){const f=this._cachedMeta.data[t];l=f.$context||(f.$context=cet(this.getContext(),t,f)),l.parsed=this.getParsed(t),l.raw=a.data[t],l.index=l.dataIndex=t}else l=this.$context||(this.$context=aet(this.chart.getContext(),this.index)),l.dataset=a,l.index=l.datasetIndex=this.index;return l.active=!!n,l.mode=i,l}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",i){const a=n==="active",l=this._cachedDataOpts,f=t+"-"+n,d=l[f],h=this.enableOptionSharing&&OH(i);if(d)return a_e(d,h);const b=this.chart.config,S=b.datasetElementScopeKeys(this._type,t),k=a?["".concat(t,"Hover"),"hover",t,""]:[t,""],T=b.getOptionScopes(this.getDataset(),S),O=Object.keys(fu.elements[t]),P=()=>this.getContext(i,a,n),B=b.resolveNamedOptions(T,O,P,k);return B.$shared&&(B.$shared=h,l[f]=Object.freeze(a_e(B,h))),B}_resolveAnimations(t,n,i){const a=this.chart,l=this._cachedDataOpts,f="animation-".concat(n),d=l[f];if(d)return d;let h;if(a.options.animation!==!1){const S=this.chart.config,k=S.datasetAnimationScopeKeys(this._type,n),T=S.getOptionScopes(this.getDataset(),k);h=S.createResolver(T,this.getContext(t,i,n))}const b=new t_e(a,h&&h.animations);return h&&h._cacheable&&(l[f]=Object.freeze(b)),b}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||Cne(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const i=this.resolveDataElementOptions(t,n),a=this._sharedOptions,l=this.getSharedOptions(i),f=this.includeOptions(n,l)||l!==a;return this.updateSharedOptions(l,n,i),{sharedOptions:l,includeOptions:f}}updateElement(t,n,i,a){Cne(a)?Object.assign(t,i):this._resolveAnimations(n,a).update(t,i)}updateSharedOptions(t,n,i){t&&!Cne(n)&&this._resolveAnimations(void 0,n).update(t,i)}_setStyle(t,n,i,a){t.active=a;const l=this.getStyle(n,a);this._resolveAnimations(n,i,a).update(t,{options:!a&&this.getSharedOptions(l)||l})}removeHoverStyle(t,n,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,n,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,i=this._cachedMeta.data;for(const[d,h,b]of this._syncList)this[d](h,b);this._syncList=[];const a=i.length,l=n.length,f=Math.min(l,a);f&&this.parse(0,f),l>a?this._insertElements(a,l-a,t):l<a&&this._removeElements(l,a-l)}_insertElements(t,n,i=!0){const a=this._cachedMeta,l=a.data,f=t+n;let d;const h=b=>{for(b.length+=n,d=b.length-1;d>=f;d--)b[d]=b[d-n]};for(h(l),d=t;d<f;++d)l[d]=new this.dataElementType;this._parsing&&h(a._parsed),this.parse(t,n),i&&this.updateElements(l,t,n,"reset")}updateElements(t,n,i,a){}_removeElements(t,n){const i=this._cachedMeta;if(this._parsing){const a=i._parsed.splice(t,n);i._stacked&&tR(i,a)}i.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,i,a]=t;this[n](i,a)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}$o(u9,"defaults",{}),$o(u9,"datasetElementType",null),$o(u9,"dataElementType",null);function det(e,t,n){let i=1,a=1,l=0,f=0;if(t<jc){const d=e,h=d+t,b=Math.cos(d),S=Math.sin(d),k=Math.cos(h),T=Math.sin(h),O=(z,q,ne)=>YO(z,d,h,!0)?1:Math.max(q,q*n,ne,ne*n),P=(z,q,ne)=>YO(z,d,h,!0)?-1:Math.min(q,q*n,ne,ne*n),B=O(0,b,k),W=O(rd,S,T),Z=P(Pu,b,k),Y=P(Pu+rd,S,T);i=(B-Z)/2,a=(W-Y)/2,l=-(B+Z)/2,f=-(W+Y)/2}return{ratioX:i,ratioY:a,offsetX:l,offsetY:f}}class nR extends u9{constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const i=this.getDataset().data,a=this._cachedMeta;if(this._parsing===!1)a._parsed=i;else{let l=h=>+i[h];if(ra(i[t])){const{key:h="value"}=this._parsing;l=b=>+qO(i[b],h)}let f,d;for(f=t,d=t+n;f<d;++f)a._parsed[f]=l(f)}}_getRotation(){return Ub(this.options.rotation-90)}_getCircumference(){return Ub(this.options.circumference)}_getRotationExtents(){let t=jc,n=-jc;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const a=this.chart.getDatasetMeta(i).controller,l=a._getRotation(),f=a._getCircumference();t=Math.min(t,l),n=Math.max(n,l+f)}return{rotation:t,circumference:n-t}}update(t){const n=this.chart,{chartArea:i}=n,a=this._cachedMeta,l=a.data,f=this.getMaxBorderWidth()+this.getMaxOffset(l)+this.options.spacing,d=Math.max((Math.min(i.width,i.height)-f)/2,0),h=Math.min(kJe(this.options.cutout,d),1),b=this._getRingWeight(this.index),{circumference:S,rotation:k}=this._getRotationExtents(),{ratioX:T,ratioY:O,offsetX:P,offsetY:B}=det(k,S,h),W=(i.width-f)/T,Z=(i.height-f)/O,Y=Math.max(Math.min(W,Z)/2,0),z=v4e(this.options.radius,Y),q=Math.max(z*h,0),ne=(z-q)/this._getVisibleDatasetWeightTotal();this.offsetX=P*z,this.offsetY=B*z,a.total=this.calculateTotal(),this.outerRadius=z-ne*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-ne*b,0),this.updateElements(l,0,l.length,t)}_circumference(t,n){const i=this.options,a=this._cachedMeta,l=this._getCircumference();return n&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||a._parsed[t]===null||a.data[t].hidden?0:this.calculateCircumference(a._parsed[t]*l/jc)}updateElements(t,n,i,a){const l=a==="reset",f=this.chart,d=f.chartArea,b=f.options.animation,S=(d.left+d.right)/2,k=(d.top+d.bottom)/2,T=l&&b.animateScale,O=T?0:this.innerRadius,P=T?0:this.outerRadius,{sharedOptions:B,includeOptions:W}=this._getSharedOptions(n,a);let Z=this._getRotation(),Y;for(Y=0;Y<n;++Y)Z+=this._circumference(Y,l);for(Y=n;Y<n+i;++Y){const z=this._circumference(Y,l),q=t[Y],ne={x:S+this.offsetX,y:k+this.offsetY,startAngle:Z,endAngle:Z+z,circumference:z,outerRadius:P,innerRadius:O};W&&(ne.options=B||this.resolveDataElementOptions(Y,q.active?"active":a)),Z+=z,this.updateElement(q,Y,ne,a)}}calculateTotal(){const t=this._cachedMeta,n=t.data;let i=0,a;for(a=0;a<n.length;a++){const l=t._parsed[a];l!==null&&!isNaN(l)&&this.chart.getDataVisibility(a)&&!n[a].hidden&&(i+=Math.abs(l))}return i}calculateCircumference(t){const n=this._cachedMeta.total;return n>0&&!isNaN(t)?jc*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,i=this.chart,a=i.data.labels||[],l=ane(n._parsed[t],i.options.locale);return{label:a[t]||"",value:l}}getMaxBorderWidth(t){let n=0;const i=this.chart;let a,l,f,d,h;if(!t){for(a=0,l=i.data.datasets.length;a<l;++a)if(i.isDatasetVisible(a)){f=i.getDatasetMeta(a),t=f.data,d=f.controller;break}}if(!t)return 0;for(a=0,l=t.length;a<l;++a)h=d.resolveDataElementOptions(a),h.borderAlign!=="inner"&&(n=Math.max(n,h.borderWidth||0,h.hoverBorderWidth||0));return n}getMaxOffset(t){let n=0;for(let i=0,a=t.length;i<a;++i){const l=this.resolveDataElementOptions(i);n=Math.max(n,l.offset||0,l.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(n+=this._getRingWeight(i));return n}_getRingWeight(t){return Math.max(xi(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}$o(nR,"id","doughnut"),$o(nR,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),$o(nR,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),$o(nR,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:i,color:a}}=t.legend.options;return n.labels.map((l,f)=>{const h=t.getDatasetMeta(0).controller.getStyle(f);return{text:l,fillStyle:h.backgroundColor,strokeStyle:h.borderColor,fontColor:a,lineWidth:h.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(f),index:f}})}return[]}},onClick(t,n,i){i.chart.toggleDataVisibility(n.index),i.chart.update()}}}});class BH extends u9{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:i,data:a=[],_dataset:l}=n,f=this.chart._animationsDisabled;let{start:d,count:h}=ZJe(n,a,f);this._drawStart=d,this._drawCount=h,qJe(n)&&(d=0,h=a.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!l._decimated,i.points=a;const b=this.resolveDatasetElementOptions(t);this.options.showLine||(b.borderWidth=0),b.segment=this.options.segment,this.updateElement(i,void 0,{animated:!f,options:b},t),this.updateElements(a,d,h,t)}updateElements(t,n,i,a){const l=a==="reset",{iScale:f,vScale:d,_stacked:h,_dataset:b}=this._cachedMeta,{sharedOptions:S,includeOptions:k}=this._getSharedOptions(n,a),T=f.axis,O=d.axis,{spanGaps:P,segment:B}=this.options,W=KO(P)?P:Number.POSITIVE_INFINITY,Z=this.chart._animationsDisabled||l||a==="none",Y=n+i,z=t.length;let q=n>0&&this.getParsed(n-1);for(let ne=0;ne<z;++ne){const ue=t[ne],J=Z?ue:{};if(ne<n||ne>=Y){J.skip=!0;continue}const ce=this.getParsed(ne),ge=El(ce[O]),de=J[T]=f.getPixelForValue(ce[T],ne),he=J[O]=l||ge?d.getBasePixel():d.getPixelForValue(h?this.applyStack(d,ce,h):ce[O],ne);J.skip=isNaN(de)||isNaN(he)||ge,J.stop=ne>0&&Math.abs(ce[T]-q[T])>W,B&&(J.parsed=ce,J.raw=b.data[ne]),k&&(J.options=S||this.resolveDataElementOptions(ne,ue.active?"active":a)),Z||this.updateElement(ue,ne,J,a),q=ce}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,i=n.options&&n.options.borderWidth||0,a=t.data||[];if(!a.length)return i;const l=a[0].size(this.resolveDataElementOptions(0)),f=a[a.length-1].size(this.resolveDataElementOptions(a.length-1));return Math.max(i,l,f)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}$o(BH,"id","line"),$o(BH,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),$o(BH,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});function bC(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class wne{constructor(t){$o(this,"options");this.options=t||{}}static override(t){Object.assign(wne.prototype,t)}init(){}formats(){return bC()}parse(){return bC()}format(){return bC()}add(){return bC()}diff(){return bC()}startOf(){return bC()}endOf(){return bC()}}var fet={_date:wne};function pet(e,t,n,i){const{controller:a,data:l,_sorted:f}=e,d=a._cachedMeta.iScale,h=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(d&&t===d.axis&&t!=="r"&&f&&l.length){const b=d._reversePixels?VJe:dC;if(i){if(a._sharedOptions){const S=l[0],k=typeof S.getRange=="function"&&S.getRange(t);if(k){const T=b(l,t,n-k),O=b(l,t,n+k);return{lo:T.lo,hi:O.hi}}}}else{const S=b(l,t,n);if(h){const{vScale:k}=a._cachedMeta,{_parsed:T}=e,O=T.slice(0,S.lo+1).reverse().findIndex(B=>!El(B[k.axis]));S.lo-=Math.max(0,O);const P=T.slice(S.hi).findIndex(B=>!El(B[k.axis]));S.hi+=Math.max(0,P)}return S}}return{lo:0,hi:l.length-1}}function VH(e,t,n,i,a){const l=e.getSortedVisibleDatasetMetas(),f=n[t];for(let d=0,h=l.length;d<h;++d){const{index:b,data:S}=l[d],{lo:k,hi:T}=pet(l[d],t,f,a);for(let O=k;O<=T;++O){const P=S[O];P.skip||i(P,b,O)}}}function met(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(i,a){const l=t?Math.abs(i.x-a.x):0,f=n?Math.abs(i.y-a.y):0;return Math.sqrt(Math.pow(l,2)+Math.pow(f,2))}}function Ene(e,t,n,i,a){const l=[];return!a&&!e.isPointInArea(t)||VH(e,n,t,function(d,h,b){!a&&!QO(d,e.chartArea,0)||d.inRange(t.x,t.y,i)&&l.push({element:d,datasetIndex:h,index:b})},!0),l}function het(e,t,n,i){let a=[];function l(f,d,h){const{startAngle:b,endAngle:S}=f.getProps(["startAngle","endAngle"],i),{angle:k}=k4e(f,{x:t.x,y:t.y});YO(k,b,S)&&a.push({element:f,datasetIndex:d,index:h})}return VH(e,n,t,l),a}function get(e,t,n,i,a,l){let f=[];const d=met(n);let h=Number.POSITIVE_INFINITY;function b(S,k,T){const O=S.inRange(t.x,t.y,a);if(i&&!O)return;const P=S.getCenterPoint(a);if(!(!!l||e.isPointInArea(P))&&!O)return;const W=d(t,P);W<h?(f=[{element:S,datasetIndex:k,index:T}],h=W):W===h&&f.push({element:S,datasetIndex:k,index:T})}return VH(e,n,t,b),f}function kne(e,t,n,i,a,l){return!l&&!e.isPointInArea(t)?[]:n==="r"&&!i?het(e,t,n,a):get(e,t,n,i,a,l)}function l_e(e,t,n,i,a){const l=[],f=n==="x"?"inXRange":"inYRange";let d=!1;return VH(e,n,t,(h,b,S)=>{h[f]&&h[f](t[n],a)&&(l.push({element:h,datasetIndex:b,index:S}),d=d||h.inRange(t.x,t.y,a))}),i&&!d?[]:l}var vet={modes:{index(e,t,n,i){const a=gC(t,e),l=n.axis||"x",f=n.includeInvisible||!1,d=n.intersect?Ene(e,a,l,i,f):kne(e,a,l,!1,i,f),h=[];return d.length?(e.getSortedVisibleDatasetMetas().forEach(b=>{const S=d[0].index,k=b.data[S];k&&!k.skip&&h.push({element:k,datasetIndex:b.index,index:S})}),h):[]},dataset(e,t,n,i){const a=gC(t,e),l=n.axis||"xy",f=n.includeInvisible||!1;let d=n.intersect?Ene(e,a,l,i,f):kne(e,a,l,!1,i,f);if(d.length>0){const h=d[0].datasetIndex,b=e.getDatasetMeta(h).data;d=[];for(let S=0;S<b.length;++S)d.push({element:b[S],datasetIndex:h,index:S})}return d},point(e,t,n,i){const a=gC(t,e),l=n.axis||"xy",f=n.includeInvisible||!1;return Ene(e,a,l,i,f)},nearest(e,t,n,i){const a=gC(t,e),l=n.axis||"xy",f=n.includeInvisible||!1;return kne(e,a,l,n.intersect,i,f)},x(e,t,n,i){const a=gC(t,e);return l_e(e,a,"x",n.intersect,i)},y(e,t,n,i){const a=gC(t,e);return l_e(e,a,"y",n.intersect,i)}}};const c_e=["left","top","right","bottom"];function sR(e,t){return e.filter(n=>n.pos===t)}function u_e(e,t){return e.filter(n=>c_e.indexOf(n.pos)===-1&&n.box.axis===t)}function oR(e,t){return e.sort((n,i)=>{const a=t?i:n,l=t?n:i;return a.weight===l.weight?a.index-l.index:a.weight-l.weight})}function bet(e){const t=[];let n,i,a,l,f,d;for(n=0,i=(e||[]).length;n<i;++n)a=e[n],{position:l,options:{stack:f,stackWeight:d=1}}=a,t.push({index:n,box:a,pos:l,horizontal:a.isHorizontal(),weight:a.weight,stack:f&&l+f,stackWeight:d});return t}function yet(e){const t={};for(const n of e){const{stack:i,pos:a,stackWeight:l}=n;if(!i||!c_e.includes(a))continue;const f=t[i]||(t[i]={count:0,placed:0,weight:0,size:0});f.count++,f.weight+=l}return t}function _et(e,t){const n=yet(e),{vBoxMaxWidth:i,hBoxMaxHeight:a}=t;let l,f,d;for(l=0,f=e.length;l<f;++l){d=e[l];const{fullSize:h}=d.box,b=n[d.stack],S=b&&d.stackWeight/b.weight;d.horizontal?(d.width=S?S*i:h&&t.availableWidth,d.height=a):(d.width=i,d.height=S?S*a:h&&t.availableHeight)}return n}function Cet(e){const t=bet(e),n=oR(t.filter(b=>b.box.fullSize),!0),i=oR(sR(t,"left"),!0),a=oR(sR(t,"right")),l=oR(sR(t,"top"),!0),f=oR(sR(t,"bottom")),d=u_e(t,"x"),h=u_e(t,"y");return{fullSize:n,leftAndTop:i.concat(l),rightAndBottom:a.concat(h).concat(f).concat(d),chartArea:sR(t,"chartArea"),vertical:i.concat(a).concat(h),horizontal:l.concat(f).concat(d)}}function d_e(e,t,n,i){return Math.max(e[n],t[n])+Math.max(e[i],t[i])}function f_e(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function wet(e,t,n,i){const{pos:a,box:l}=n,f=e.maxPadding;if(!ra(a)){n.size&&(e[a]-=n.size);const k=i[n.stack]||{size:0,count:1};k.size=Math.max(k.size,n.horizontal?l.height:l.width),n.size=k.size/k.count,e[a]+=n.size}l.getPadding&&f_e(f,l.getPadding());const d=Math.max(0,t.outerWidth-d_e(f,e,"left","right")),h=Math.max(0,t.outerHeight-d_e(f,e,"top","bottom")),b=d!==e.w,S=h!==e.h;return e.w=d,e.h=h,n.horizontal?{same:b,other:S}:{same:S,other:b}}function Eet(e){const t=e.maxPadding;function n(i){const a=Math.max(t[i]-e[i],0);return e[i]+=a,a}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function ket(e,t){const n=t.maxPadding;function i(a){const l={left:0,top:0,right:0,bottom:0};return a.forEach(f=>{l[f]=Math.max(t[f],n[f])}),l}return i(e?["left","right"]:["top","bottom"])}function rR(e,t,n,i){const a=[];let l,f,d,h,b,S;for(l=0,f=e.length,b=0;l<f;++l){d=e[l],h=d.box,h.update(d.width||t.w,d.height||t.h,ket(d.horizontal,t));const{same:k,other:T}=wet(t,n,d,i);b|=k&&a.length,S=S||T,h.fullSize||a.push(d)}return b&&rR(a,t,n,i)||S}function HH(e,t,n,i,a){e.top=n,e.left=t,e.right=t+i,e.bottom=n+a,e.width=i,e.height=a}function p_e(e,t,n,i){const a=n.padding;let{x:l,y:f}=t;for(const d of e){const h=d.box,b=i[d.stack]||{placed:0,weight:1},S=d.stackWeight/b.weight||1;if(d.horizontal){const k=t.w*S,T=b.size||h.height;OH(b.start)&&(f=b.start),h.fullSize?HH(h,a.left,f,n.outerWidth-a.right-a.left,T):HH(h,t.left+b.placed,f,k,T),b.start=f,b.placed+=k,f=h.bottom}else{const k=t.h*S,T=b.size||h.width;OH(b.start)&&(l=b.start),h.fullSize?HH(h,l,a.top,T,n.outerHeight-a.bottom-a.top):HH(h,l,t.top+b.placed,T,k),b.start=l,b.placed+=k,l=h.right}}t.x=l,t.y=f}var N5={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,i){if(!e)return;const a=u0(e.options.layout.padding),l=Math.max(t-a.width,0),f=Math.max(n-a.height,0),d=Cet(e.boxes),h=d.vertical,b=d.horizontal;Ua(e.boxes,B=>{typeof B.beforeLayout=="function"&&B.beforeLayout()});const S=h.reduce((B,W)=>W.box.options&&W.box.options.display===!1?B:B+1,0)||1,k=Object.freeze({outerWidth:t,outerHeight:n,padding:a,availableWidth:l,availableHeight:f,vBoxMaxWidth:l/2/S,hBoxMaxHeight:f/2}),T=Object.assign({},a);f_e(T,u0(i));const O=Object.assign({maxPadding:T,w:l,h:f,x:a.left,y:a.top},a),P=_et(h.concat(b),k);rR(d.fullSize,O,k,P),rR(h,O,k,P),rR(b,O,k,P)&&rR(h,O,k,P),Eet(O),p_e(d.leftAndTop,O,k,P),O.x+=O.w,O.y+=O.h,p_e(d.rightAndBottom,O,k,P),e.chartArea={left:O.left,top:O.top,right:O.left+O.w,bottom:O.top+O.h,height:O.h,width:O.w},Ua(d.chartArea,B=>{const W=B.box;Object.assign(W,e.chartArea),W.update(O.w,O.h,{left:0,top:0,right:0,bottom:0})})}};class m_e{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,i){}removeEventListener(t,n,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,i,a){return n=Math.max(0,n||t.width),i=i||t.height,{width:n,height:Math.max(0,a?Math.floor(n/a):i)}}isAttached(t){return!0}updateConfig(t){}}class xet extends m_e{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const UH="$chartjs",Tet={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},h_e=e=>e===null||e==="";function Iet(e,t){const n=e.style,i=e.getAttribute("height"),a=e.getAttribute("width");if(e[UH]={initial:{height:i,width:a,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",h_e(a)){const l=q4e(e,"width");l!==void 0&&(e.width=l)}if(h_e(i))if(e.style.height==="")e.height=e.width/(t||2);else{const l=q4e(e,"height");l!==void 0&&(e.height=l)}return e}const g_e=FQe?{passive:!0}:!1;function Aet(e,t,n){e&&e.addEventListener(t,n,g_e)}function Oet(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,g_e)}function Ret(e,t){const n=Tet[e.type]||e.type,{x:i,y:a}=gC(e,t);return{type:n,chart:t,native:e,x:i!==void 0?i:null,y:a!==void 0?a:null}}function zH(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function Det(e,t,n){const i=e.canvas,a=new MutationObserver(l=>{let f=!1;for(const d of l)f=f||zH(d.addedNodes,i),f=f&&!zH(d.removedNodes,i);f&&n()});return a.observe(document,{childList:!0,subtree:!0}),a}function Let(e,t,n){const i=e.canvas,a=new MutationObserver(l=>{let f=!1;for(const d of l)f=f||zH(d.removedNodes,i),f=f&&!zH(d.addedNodes,i);f&&n()});return a.observe(document,{childList:!0,subtree:!0}),a}const iR=new Map;let v_e=0;function b_e(){const e=window.devicePixelRatio;e!==v_e&&(v_e=e,iR.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function Pet(e,t){iR.size||window.addEventListener("resize",b_e),iR.set(e,t)}function Met(e){iR.delete(e),iR.size||window.removeEventListener("resize",b_e)}function Net(e,t,n){const i=e.canvas,a=i&&yne(i);if(!a)return;const l=A4e((d,h)=>{const b=a.clientWidth;n(d,h),b<a.clientWidth&&n()},window),f=new ResizeObserver(d=>{const h=d[0],b=h.contentRect.width,S=h.contentRect.height;b===0&&S===0||l(b,S)});return f.observe(a),Pet(e,l),f}function xne(e,t,n){n&&n.disconnect(),t==="resize"&&Met(e)}function Fet(e,t,n){const i=e.canvas,a=A4e(l=>{e.ctx!==null&&n(Ret(l,e))},e);return Aet(i,t,a),a}class $et extends m_e{acquireContext(t,n){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(Iet(t,n),i):null}releaseContext(t){const n=t.canvas;if(!n[UH])return!1;const i=n[UH].initial;["height","width"].forEach(l=>{const f=i[l];El(f)?n.removeAttribute(l):n.setAttribute(l,f)});const a=i.style||{};return Object.keys(a).forEach(l=>{n.style[l]=a[l]}),n.width=n.width,delete n[UH],!0}addEventListener(t,n,i){this.removeEventListener(t,n);const a=t.$proxies||(t.$proxies={}),f={attach:Det,detach:Let,resize:Net}[n]||Fet;a[n]=f(t,n,i)}removeEventListener(t,n){const i=t.$proxies||(t.$proxies={}),a=i[n];if(!a)return;({attach:xne,detach:xne,resize:xne}[n]||Oet)(t,n,a),i[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,i,a){return NQe(t,n,i,a)}isAttached(t){const n=t&&yne(t);return!!(n&&n.isConnected)}}function Bet(e){return!bne()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?xet:$et}let yC=(fU=class{constructor(){$o(this,"x");$o(this,"y");$o(this,"active",!1);$o(this,"options");$o(this,"$animations")}tooltipPosition(t){const{x:n,y:i}=this.getProps(["x","y"],t);return{x:n,y:i}}hasValue(){return KO(this.x)&&KO(this.y)}getProps(t,n){const i=this.$animations;if(!n||!i)return this;const a={};return t.forEach(l=>{a[l]=i[l]&&i[l].active()?i[l]._to:this[l]}),a}},$o(fU,"defaults",{}),$o(fU,"defaultRoutes"),fU);function Vet(e,t){const n=e.options.ticks,i=Het(e),a=Math.min(n.maxTicksLimit||i,i),l=n.major.enabled?zet(t):[],f=l.length,d=l[0],h=l[f-1],b=[];if(f>a)return Wet(t,b,l,f/a),b;const S=Uet(l,t,a);if(f>0){let k,T;const O=f>1?Math.round((h-d)/(f-1)):null;for(WH(t,b,S,El(O)?0:d-O,d),k=0,T=f-1;k<T;k++)WH(t,b,S,l[k],l[k+1]);return WH(t,b,S,h,El(O)?t.length:h+O),b}return WH(t,b,S),b}function Het(e){const t=e.options.offset,n=e._tickSize(),i=e._length/n+(t?0:1),a=e._maxLength/n;return Math.floor(Math.min(i,a))}function Uet(e,t,n){const i=jet(e),a=t.length/n;if(!i)return Math.max(a,1);const l=LJe(i);for(let f=0,d=l.length-1;f<d;f++){const h=l[f];if(h>a)return h}return Math.max(a,1)}function zet(e){const t=[];let n,i;for(n=0,i=e.length;n<i;n++)e[n].major&&t.push(n);return t}function Wet(e,t,n,i){let a=0,l=n[0],f;for(i=Math.ceil(i),f=0;f<e.length;f++)f===l&&(t.push(e[f]),a++,l=n[a*i])}function WH(e,t,n,i,a){const l=xi(i,0),f=Math.min(xi(a,e.length),e.length);let d=0,h,b,S;for(n=Math.ceil(n),a&&(h=a-i,n=h/Math.floor(h/n)),S=l;S<0;)d++,S=Math.round(l+d*n);for(b=Math.max(l,0);b<f;b++)b===S&&(t.push(e[b]),d++,S=Math.round(l+d*n))}function jet(e){const t=e.length;let n,i;if(t<2)return!1;for(i=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==i)return!1;return i}const Zet=e=>e==="left"?"right":e==="right"?"left":e,y_e=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,__e=(e,t)=>Math.min(t||e,e);function S_e(e,t){const n=[],i=e.length/t,a=e.length;let l=0;for(;l<a;l+=i)n.push(e[Math.floor(l)]);return n}function qet(e,t,n){const i=e.ticks.length,a=Math.min(t,i-1),l=e._startPixel,f=e._endPixel,d=1e-6;let h=e.getPixelForTick(a),b;if(!(n&&(i===1?b=Math.max(h-l,f-h):t===0?b=(e.getPixelForTick(1)-h)/2:b=(h-e.getPixelForTick(a-1))/2,h+=a<t?b:-b,h<l-d||h>f+d)))return h}function Get(e,t){Ua(e,n=>{const i=n.gc,a=i.length/2;let l;if(a>t){for(l=0;l<a;++l)delete n.data[i[l]];i.splice(0,a)}})}function aR(e){return e.drawTicks?e.tickLength:0}function C_e(e,t){if(!e.display)return 0;const n=Mm(e.font,t),i=u0(e.padding);return(Xd(e.text)?e.text.length:1)*n.lineHeight+i.height}function Ket(e,t){return mC(e,{scale:t,type:"scale"})}function Yet(e,t,n){return mC(e,{tick:n,index:t,type:"tick"})}function Xet(e,t,n){let i=O4e(e);return(n&&t!=="right"||!n&&t==="right")&&(i=Zet(i)),i}function Jet(e,t,n,i){const{top:a,left:l,bottom:f,right:d,chart:h}=e,{chartArea:b,scales:S}=h;let k=0,T,O,P;const B=f-a,W=d-l;if(e.isHorizontal()){if(O=zh(i,l,d),ra(n)){const Z=Object.keys(n)[0],Y=n[Z];P=S[Z].getPixelForValue(Y)+B-t}else n==="center"?P=(b.bottom+b.top)/2+B-t:P=y_e(e,n,t);T=d-l}else{if(ra(n)){const Z=Object.keys(n)[0],Y=n[Z];O=S[Z].getPixelForValue(Y)-W+t}else n==="center"?O=(b.left+b.right)/2-W+t:O=y_e(e,n,t);P=zh(i,f,a),k=n==="left"?-rd:rd}return{titleX:O,titleY:P,maxWidth:T,rotation:k}}class d9 extends yC{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:i,_suggestedMax:a}=this;return t=$v(t,Number.POSITIVE_INFINITY),n=$v(n,Number.NEGATIVE_INFINITY),i=$v(i,Number.POSITIVE_INFINITY),a=$v(a,Number.NEGATIVE_INFINITY),{min:$v(t,i),max:$v(n,a),minDefined:G1(t),maxDefined:G1(n)}}getMinMax(t){let{min:n,max:i,minDefined:a,maxDefined:l}=this.getUserBounds(),f;if(a&&l)return{min:n,max:i};const d=this.getMatchingVisibleMetas();for(let h=0,b=d.length;h<b;++h)f=d[h].controller.getMinMax(this,t),a||(n=Math.min(n,f.min)),l||(i=Math.max(i,f.max));return n=l&&n>i?i:n,i=a&&n>i?n:i,{min:$v(n,$v(i,n)),max:$v(i,$v(n,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Wl(this.options.beforeUpdate,[this])}update(t,n,i){const{beginAtZero:a,grace:l,ticks:f}=this.options,d=f.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=mQe(this,l,a),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const h=d<this.ticks.length;this._convertTicksToLabels(h?S_e(this.ticks,d):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),f.display&&(f.autoSkip||f.source==="auto")&&(this.ticks=Vet(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),h&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,i;this.isHorizontal()?(n=this.left,i=this.right):(n=this.top,i=this.bottom,t=!t),this._startPixel=n,this._endPixel=i,this._reversePixels=t,this._length=i-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Wl(this.options.afterUpdate,[this])}beforeSetDimensions(){Wl(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){Wl(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Wl(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Wl(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let i,a,l;for(i=0,a=t.length;i<a;i++)l=t[i],l.label=Wl(n.callback,[l.value,i,t],this)}afterTickToLabelConversion(){Wl(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Wl(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,i=__e(this.ticks.length,t.ticks.maxTicksLimit),a=n.minRotation||0,l=n.maxRotation;let f=a,d,h,b;if(!this._isVisible()||!n.display||a>=l||i<=1||!this.isHorizontal()){this.labelRotation=a;return}const S=this._getLabelSizes(),k=S.widest.width,T=S.highest.height,O=jp(this.chart.width-k,0,this.maxWidth);d=t.offset?this.maxWidth/i:O/(i-1),k+6>d&&(d=O/(i-(t.offset?.5:1)),h=this.maxHeight-aR(t.grid)-n.padding-C_e(t.title,this.chart.options.font),b=Math.sqrt(k*k+T*T),f=FJe(Math.min(Math.asin(jp((S.highest.height+6)/d,-1,1)),Math.asin(jp(h/b,-1,1))-Math.asin(jp(T/b,-1,1)))),f=Math.max(a,Math.min(l,f))),this.labelRotation=f}afterCalculateLabelRotation(){Wl(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Wl(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:i,title:a,grid:l}}=this,f=this._isVisible(),d=this.isHorizontal();if(f){const h=C_e(a,n.options.font);if(d?(t.width=this.maxWidth,t.height=aR(l)+h):(t.height=this.maxHeight,t.width=aR(l)+h),i.display&&this.ticks.length){const{first:b,last:S,widest:k,highest:T}=this._getLabelSizes(),O=i.padding*2,P=Ub(this.labelRotation),B=Math.cos(P),W=Math.sin(P);if(d){const Z=i.mirror?0:W*k.width+B*T.height;t.height=Math.min(this.maxHeight,t.height+Z+O)}else{const Z=i.mirror?0:B*k.width+W*T.height;t.width=Math.min(this.maxWidth,t.width+Z+O)}this._calculatePadding(b,S,W,B)}}this._handleMargins(),d?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,i,a){const{ticks:{align:l,padding:f},position:d}=this.options,h=this.labelRotation!==0,b=d!=="top"&&this.axis==="x";if(this.isHorizontal()){const S=this.getPixelForTick(0)-this.left,k=this.right-this.getPixelForTick(this.ticks.length-1);let T=0,O=0;h?b?(T=a*t.width,O=i*n.height):(T=i*t.height,O=a*n.width):l==="start"?O=n.width:l==="end"?T=t.width:l!=="inner"&&(T=t.width/2,O=n.width/2),this.paddingLeft=Math.max((T-S+f)*this.width/(this.width-S),0),this.paddingRight=Math.max((O-k+f)*this.width/(this.width-k),0)}else{let S=n.height/2,k=t.height/2;l==="start"?(S=0,k=t.height):l==="end"&&(S=n.height,k=0),this.paddingTop=S+f,this.paddingBottom=k+f}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Wl(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,i;for(n=0,i=t.length;n<i;n++)El(t[n].label)&&(t.splice(n,1),i--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let i=this.ticks;n<i.length&&(i=S_e(i,n)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,i){const{ctx:a,_longestTextCache:l}=this,f=[],d=[],h=Math.floor(n/__e(n,i));let b=0,S=0,k,T,O,P,B,W,Z,Y,z,q,ne;for(k=0;k<n;k+=h){if(P=t[k].label,B=this._resolveTickFontOptions(k),a.font=W=B.string,Z=l[W]=l[W]||{data:{},gc:[]},Y=B.lineHeight,z=q=0,!El(P)&&!Xd(P))z=N4e(a,Z.data,Z.gc,z,P),q=Y;else if(Xd(P))for(T=0,O=P.length;T<O;++T)ne=P[T],!El(ne)&&!Xd(ne)&&(z=N4e(a,Z.data,Z.gc,z,ne),q+=Y);f.push(z),d.push(q),b=Math.max(z,b),S=Math.max(q,S)}Get(l,n);const ue=f.indexOf(b),J=d.indexOf(S),ce=ge=>({width:f[ge]||0,height:d[ge]||0});return{first:ce(0),last:ce(n-1),widest:ce(ue),highest:ce(J),widths:f,heights:d}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return BJe(this._alignToPixels?pC(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const i=n[t];return i.$context||(i.$context=Yet(this.getContext(),t,i))}return this.$context||(this.$context=Ket(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=Ub(this.labelRotation),i=Math.abs(Math.cos(n)),a=Math.abs(Math.sin(n)),l=this._getLabelSizes(),f=t.autoSkipPadding||0,d=l?l.widest.width+f:0,h=l?l.highest.height+f:0;return this.isHorizontal()?h*i>d*a?d/i:h/a:h*a<d*i?h/i:d/a}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,i=this.chart,a=this.options,{grid:l,position:f,border:d}=a,h=l.offset,b=this.isHorizontal(),k=this.ticks.length+(h?1:0),T=aR(l),O=[],P=d.setContext(this.getContext()),B=P.display?P.width:0,W=B/2,Z=function(V){return pC(i,V,B)};let Y,z,q,ne,ue,J,ce,ge,de,he,ie,Be;if(f==="top")Y=Z(this.bottom),J=this.bottom-T,ge=Y-W,he=Z(t.top)+W,Be=t.bottom;else if(f==="bottom")Y=Z(this.top),he=t.top,Be=Z(t.bottom)-W,J=Y+W,ge=this.top+T;else if(f==="left")Y=Z(this.right),ue=this.right-T,ce=Y-W,de=Z(t.left)+W,ie=t.right;else if(f==="right")Y=Z(this.left),de=t.left,ie=Z(t.right)-W,ue=Y+W,ce=this.left+T;else if(n==="x"){if(f==="center")Y=Z((t.top+t.bottom)/2+.5);else if(ra(f)){const V=Object.keys(f)[0],Ye=f[V];Y=Z(this.chart.scales[V].getPixelForValue(Ye))}he=t.top,Be=t.bottom,J=Y+W,ge=J+T}else if(n==="y"){if(f==="center")Y=Z((t.left+t.right)/2);else if(ra(f)){const V=Object.keys(f)[0],Ye=f[V];Y=Z(this.chart.scales[V].getPixelForValue(Ye))}ue=Y-W,ce=ue-T,de=t.left,ie=t.right}const $e=xi(a.ticks.maxTicksLimit,k),Ue=Math.max(1,Math.ceil(k/$e));for(z=0;z<k;z+=Ue){const V=this.getContext(z),Ye=l.setContext(V),Fe=d.setContext(V),St=Ye.lineWidth,Dt=Ye.color,He=Fe.dash||[],ft=Fe.dashOffset,ht=Ye.tickWidth,At=Ye.tickColor,hn=Ye.tickBorderDash||[],ct=Ye.tickBorderDashOffset;q=qet(this,z,h),q!==void 0&&(ne=pC(i,q,St),b?ue=ce=de=ie=ne:J=ge=he=Be=ne,O.push({tx1:ue,ty1:J,tx2:ce,ty2:ge,x1:de,y1:he,x2:ie,y2:Be,width:St,color:Dt,borderDash:He,borderDashOffset:ft,tickWidth:ht,tickColor:At,tickBorderDash:hn,tickBorderDashOffset:ct}))}return this._ticksLength=k,this._borderValue=Y,O}_computeLabelItems(t){const n=this.axis,i=this.options,{position:a,ticks:l}=i,f=this.isHorizontal(),d=this.ticks,{align:h,crossAlign:b,padding:S,mirror:k}=l,T=aR(i.grid),O=T+S,P=k?-S:O,B=-Ub(this.labelRotation),W=[];let Z,Y,z,q,ne,ue,J,ce,ge,de,he,ie,Be="middle";if(a==="top")ue=this.bottom-P,J=this._getXAxisLabelAlignment();else if(a==="bottom")ue=this.top+P,J=this._getXAxisLabelAlignment();else if(a==="left"){const Ue=this._getYAxisLabelAlignment(T);J=Ue.textAlign,ne=Ue.x}else if(a==="right"){const Ue=this._getYAxisLabelAlignment(T);J=Ue.textAlign,ne=Ue.x}else if(n==="x"){if(a==="center")ue=(t.top+t.bottom)/2+O;else if(ra(a)){const Ue=Object.keys(a)[0],V=a[Ue];ue=this.chart.scales[Ue].getPixelForValue(V)+O}J=this._getXAxisLabelAlignment()}else if(n==="y"){if(a==="center")ne=(t.left+t.right)/2-O;else if(ra(a)){const Ue=Object.keys(a)[0],V=a[Ue];ne=this.chart.scales[Ue].getPixelForValue(V)}J=this._getYAxisLabelAlignment(T).textAlign}n==="y"&&(h==="start"?Be="top":h==="end"&&(Be="bottom"));const $e=this._getLabelSizes();for(Z=0,Y=d.length;Z<Y;++Z){z=d[Z],q=z.label;const Ue=l.setContext(this.getContext(Z));ce=this.getPixelForTick(Z)+l.labelOffset,ge=this._resolveTickFontOptions(Z),de=ge.lineHeight,he=Xd(q)?q.length:1;const V=he/2,Ye=Ue.color,Fe=Ue.textStrokeColor,St=Ue.textStrokeWidth;let Dt=J;f?(ne=ce,J==="inner"&&(Z===Y-1?Dt=this.options.reverse?"left":"right":Z===0?Dt=this.options.reverse?"right":"left":Dt="center"),a==="top"?b==="near"||B!==0?ie=-he*de+de/2:b==="center"?ie=-$e.highest.height/2-V*de+de:ie=-$e.highest.height+de/2:b==="near"||B!==0?ie=de/2:b==="center"?ie=$e.highest.height/2-V*de:ie=$e.highest.height-he*de,k&&(ie*=-1),B!==0&&!Ue.showLabelBackdrop&&(ne+=de/2*Math.sin(B))):(ue=ce,ie=(1-he)*de/2);let He;if(Ue.showLabelBackdrop){const ft=u0(Ue.backdropPadding),ht=$e.heights[Z],At=$e.widths[Z];let hn=ie-ft.top,ct=0-ft.left;switch(Be){case"middle":hn-=ht/2;break;case"bottom":hn-=ht;break}switch(J){case"center":ct-=At/2;break;case"right":ct-=At;break;case"inner":Z===Y-1?ct-=At:Z>0&&(ct-=At/2);break}He={left:ct,top:hn,width:At+ft.width,height:ht+ft.height,color:Ue.backdropColor}}W.push({label:q,font:ge,textOffset:ie,options:{rotation:B,color:Ye,strokeColor:Fe,strokeWidth:St,textAlign:Dt,textBaseline:Be,translation:[ne,ue],backdrop:He}})}return W}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-Ub(this.labelRotation))return t==="top"?"left":"right";let a="center";return n.align==="start"?a="left":n.align==="end"?a="right":n.align==="inner"&&(a="inner"),a}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:i,mirror:a,padding:l}}=this.options,f=this._getLabelSizes(),d=t+l,h=f.widest.width;let b,S;return n==="left"?a?(S=this.right+l,i==="near"?b="left":i==="center"?(b="center",S+=h/2):(b="right",S+=h)):(S=this.right-d,i==="near"?b="right":i==="center"?(b="center",S-=h/2):(b="left",S=this.left)):n==="right"?a?(S=this.left+l,i==="near"?b="right":i==="center"?(b="center",S-=h/2):(b="left",S-=h)):(S=this.left+d,i==="near"?b="left":i==="center"?(b="center",S+=h/2):(b="right",S=this.right)):b="right",{textAlign:b,x:S}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:i,top:a,width:l,height:f}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(i,a,l,f),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const a=this.ticks.findIndex(l=>l.value===t);return a>=0?n.setContext(this.getContext(a)).lineWidth:0}drawGrid(t){const n=this.options.grid,i=this.ctx,a=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let l,f;const d=(h,b,S)=>{!S.width||!S.color||(i.save(),i.lineWidth=S.width,i.strokeStyle=S.color,i.setLineDash(S.borderDash||[]),i.lineDashOffset=S.borderDashOffset,i.beginPath(),i.moveTo(h.x,h.y),i.lineTo(b.x,b.y),i.stroke(),i.restore())};if(n.display)for(l=0,f=a.length;l<f;++l){const h=a[l];n.drawOnChartArea&&d({x:h.x1,y:h.y1},{x:h.x2,y:h.y2},h),n.drawTicks&&d({x:h.tx1,y:h.ty1},{x:h.tx2,y:h.ty2},{color:h.tickColor,width:h.tickWidth,borderDash:h.tickBorderDash,borderDashOffset:h.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{border:i,grid:a}}=this,l=i.setContext(this.getContext()),f=i.display?l.width:0;if(!f)return;const d=a.setContext(this.getContext(0)).lineWidth,h=this._borderValue;let b,S,k,T;this.isHorizontal()?(b=pC(t,this.left,f)-f/2,S=pC(t,this.right,d)+d/2,k=T=h):(k=pC(t,this.top,f)-f/2,T=pC(t,this.bottom,d)+d/2,b=S=h),n.save(),n.lineWidth=l.width,n.strokeStyle=l.color,n.beginPath(),n.moveTo(b,k),n.lineTo(S,T),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const i=this.ctx,a=this._computeLabelArea();a&&dne(i,a);const l=this.getLabelItems(t);for(const f of l){const d=f.options,h=f.font,b=f.label,S=f.textOffset;LH(i,b,0,S,h,d)}a&&fne(i)}drawTitle(){const{ctx:t,options:{position:n,title:i,reverse:a}}=this;if(!i.display)return;const l=Mm(i.font),f=u0(i.padding),d=i.align;let h=l.lineHeight/2;n==="bottom"||n==="center"||ra(n)?(h+=f.bottom,Xd(i.text)&&(h+=l.lineHeight*(i.text.length-1))):h+=f.top;const{titleX:b,titleY:S,maxWidth:k,rotation:T}=Jet(this,h,n,d);LH(t,i.text,0,0,l,{color:i.color,maxWidth:k,rotation:T,textAlign:Xet(d,n,a),textBaseline:"middle",translation:[b,S]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,i=xi(t.grid&&t.grid.z,-1),a=xi(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==d9.prototype.draw?[{z:n,draw:l=>{this.draw(l)}}]:[{z:i,draw:l=>{this.drawBackground(),this.drawGrid(l),this.drawTitle()}},{z:a,draw:()=>{this.drawBorder()}},{z:n,draw:l=>{this.drawLabels(l)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",a=[];let l,f;for(l=0,f=n.length;l<f;++l){const d=n[l];d[i]===this.id&&(!t||d.type===t)&&a.push(d)}return a}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return Mm(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class jH{constructor(t,n,i){this.type=t,this.scope=n,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let i;ttt(n)&&(i=this.register(n));const a=this.items,l=t.id,f=this.scope+"."+l;if(!l)throw new Error("class does not have id: "+t);return l in a||(a[l]=t,Qet(t,f,i),this.override&&fu.override(t.id,t.overrides)),f}get(t){return this.items[t]}unregister(t){const n=this.items,i=t.id,a=this.scope;i in n&&delete n[i],a&&i in fu[a]&&(delete fu[a][i],this.override&&delete fC[i])}}function Qet(e,t,n){const i=jO(Object.create(null),[n?fu.get(n):{},fu.get(t),e.defaults]);fu.set(t,i),e.defaultRoutes&&ett(t,e.defaultRoutes),e.descriptors&&fu.describe(t,e.descriptors)}function ett(e,t){Object.keys(t).forEach(n=>{const i=n.split("."),a=i.pop(),l=[e].concat(i).join("."),f=t[n].split("."),d=f.pop(),h=f.join(".");fu.route(l,a,h,d)})}function ttt(e){return"id"in e&&"defaults"in e}class ntt{constructor(){this.controllers=new jH(u9,"datasets",!0),this.elements=new jH(yC,"elements"),this.plugins=new jH(Object,"plugins"),this.scales=new jH(d9,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,i){[...n].forEach(a=>{const l=i||this._getRegistryForType(a);i||l.isForType(a)||l===this.plugins&&a.id?this._exec(t,l,a):Ua(a,f=>{const d=i||this._getRegistryForType(f);this._exec(t,d,f)})})}_exec(t,n,i){const a=nne(t);Wl(i["before"+a],[],i),n[t](i),Wl(i["after"+a],[],i)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const i=this._typedRegistries[n];if(i.isForType(t))return i}return this.plugins}_get(t,n,i){const a=n.get(t);if(a===void 0)throw new Error('"'+t+'" is not a registered '+i+".");return a}}var Bv=new ntt;class stt{constructor(){this._init=[]}notify(t,n,i,a){n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const l=a?this._descriptors(t).filter(a):this._descriptors(t),f=this._notify(l,t,n,i);return n==="afterDestroy"&&(this._notify(l,t,"stop"),this._notify(this._init,t,"uninstall")),f}_notify(t,n,i,a){a=a||{};for(const l of t){const f=l.plugin,d=f[i],h=[n,a,l.options];if(Wl(d,h,f)===!1&&a.cancelable)return!1}return!0}invalidate(){El(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const i=t&&t.config,a=xi(i.options&&i.options.plugins,{}),l=ott(i);return a===!1&&!n?[]:itt(t,l,a,n)}_notifyStateChanges(t){const n=this._oldCache||[],i=this._cache,a=(l,f)=>l.filter(d=>!f.some(h=>d.plugin.id===h.plugin.id));this._notify(a(n,i),t,"stop"),this._notify(a(i,n),t,"start")}}function ott(e){const t={},n=[],i=Object.keys(Bv.plugins.items);for(let l=0;l<i.length;l++)n.push(Bv.getPlugin(i[l]));const a=e.plugins||[];for(let l=0;l<a.length;l++){const f=a[l];n.indexOf(f)===-1&&(n.push(f),t[f.id]=!0)}return{plugins:n,localIds:t}}function rtt(e,t){return!t&&e===!1?null:e===!0?{}:e}function itt(e,{plugins:t,localIds:n},i,a){const l=[],f=e.getContext();for(const d of t){const h=d.id,b=rtt(i[h],a);b!==null&&l.push({plugin:d,options:att(e.config,{plugin:d,local:n[h]},b,f)})}return l}function att(e,{plugin:t,local:n},i,a){const l=e.pluginScopeKeys(t),f=e.getOptionScopes(i,l);return n&&t.defaults&&f.push(t.defaults),e.createResolver(f,a,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Tne(e,t){const n=fu.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function ltt(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function ctt(e,t){return e===t?"_index_":"_value_"}function w_e(e){if(e==="x"||e==="y"||e==="r")return e}function utt(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function Ine(e,...t){if(w_e(e))return e;for(const n of t){const i=n.axis||utt(n.position)||e.length>1&&w_e(e[0].toLowerCase());if(i)return i}throw new Error("Cannot determine type of '".concat(e,"' axis. Please provide 'axis' or 'position' option."))}function E_e(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function dtt(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(i=>i.xAxisID===e||i.yAxisID===e);if(n.length)return E_e(e,"x",n[0])||E_e(e,"y",n[0])}return{}}function ftt(e,t){const n=fC[e.type]||{scales:{}},i=t.scales||{},a=Tne(e.type,t),l=Object.create(null);return Object.keys(i).forEach(f=>{const d=i[f];if(!ra(d))return console.error("Invalid scale configuration for scale: ".concat(f));if(d._proxy)return console.warn("Ignoring resolver passed as options for scale: ".concat(f));const h=Ine(f,d,dtt(f,e),fu.scales[d.type]),b=ctt(h,a),S=n.scales||{};l[f]=ZO(Object.create(null),[{axis:h},d,S[h],S[b]])}),e.data.datasets.forEach(f=>{const d=f.type||e.type,h=f.indexAxis||Tne(d,t),S=(fC[d]||{}).scales||{};Object.keys(S).forEach(k=>{const T=ltt(k,h),O=f[T+"AxisID"]||T;l[O]=l[O]||Object.create(null),ZO(l[O],[{axis:T},i[O],S[k]])})}),Object.keys(l).forEach(f=>{const d=l[f];ZO(d,[fu.scales[d.type],fu.scale])}),l}function k_e(e){const t=e.options||(e.options={});t.plugins=xi(t.plugins,{}),t.scales=ftt(e,t)}function x_e(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function ptt(e){return e=e||{},e.data=x_e(e.data),k_e(e),e}const T_e=new Map,I_e=new Set;function ZH(e,t){let n=T_e.get(e);return n||(n=t(),T_e.set(e,n),I_e.add(n)),n}const lR=(e,t,n)=>{const i=qO(t,n);i!==void 0&&e.add(i)};class mtt{constructor(t){this._config=ptt(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=x_e(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),k_e(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return ZH(t,()=>[["datasets.".concat(t),""]])}datasetAnimationScopeKeys(t,n){return ZH("".concat(t,".transition.").concat(n),()=>[["datasets.".concat(t,".transitions.").concat(n),"transitions.".concat(n)],["datasets.".concat(t),""]])}datasetElementScopeKeys(t,n){return ZH("".concat(t,"-").concat(n),()=>[["datasets.".concat(t,".elements.").concat(n),"datasets.".concat(t),"elements.".concat(n),""]])}pluginScopeKeys(t){const n=t.id,i=this.type;return ZH("".concat(i,"-plugin-").concat(n),()=>[["plugins.".concat(n),...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const i=this._scopeCache;let a=i.get(t);return(!a||n)&&(a=new Map,i.set(t,a)),a}getOptionScopes(t,n,i){const{options:a,type:l}=this,f=this._cachedScopes(t,i),d=f.get(n);if(d)return d;const h=new Set;n.forEach(S=>{t&&(h.add(t),S.forEach(k=>lR(h,t,k))),S.forEach(k=>lR(h,a,k)),S.forEach(k=>lR(h,fC[l]||{},k)),S.forEach(k=>lR(h,fu,k)),S.forEach(k=>lR(h,lne,k))});const b=Array.from(h);return b.length===0&&b.push(Object.create(null)),I_e.has(n)&&f.set(n,b),b}chartOptionScopes(){const{options:t,type:n}=this;return[t,fC[n]||{},fu.datasets[n]||{},{type:n},fu,lne]}resolveNamedOptions(t,n,i,a=[""]){const l={$shared:!0},{resolver:f,subPrefixes:d}=A_e(this._resolverCache,t,a);let h=f;if(gtt(f,n)){l.$shared=!1,i=P5(i)?i():i;const b=this.createResolver(t,i,d);h=a9(f,i,b)}for(const b of n)l[b]=h[b];return l}createResolver(t,n,i=[""],a){const{resolver:l}=A_e(this._resolverCache,t,i);return ra(n)?a9(l,n,void 0,a):l}}function A_e(e,t,n){let i=e.get(t);i||(i=new Map,e.set(t,i));const a=n.join();let l=i.get(a);return l||(l={resolver:hne(t,n),subPrefixes:n.filter(d=>!d.toLowerCase().includes("hover"))},i.set(a,l)),l}const htt=e=>ra(e)&&Object.getOwnPropertyNames(e).some(t=>P5(e[t]));function gtt(e,t){const{isScriptable:n,isIndexable:i}=B4e(e);for(const a of t){const l=n(a),f=i(a),d=(f||l)&&e[a];if(l&&(P5(d)||htt(d))||f&&Xd(d))return!0}return!1}var vtt="4.4.8";const btt=["top","bottom","left","right","chartArea"];function O_e(e,t){return e==="top"||e==="bottom"||btt.indexOf(e)===-1&&t==="x"}function R_e(e,t){return function(n,i){return n[e]===i[e]?n[t]-i[t]:n[e]-i[e]}}function D_e(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),Wl(n&&n.onComplete,[e],t)}function ytt(e){const t=e.chart,n=t.options.animation;Wl(n&&n.onProgress,[e],t)}function L_e(e){return bne()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const qH={},P_e=e=>{const t=L_e(e);return Object.values(qH).filter(n=>n.canvas===t).pop()};function _tt(e,t,n){const i=Object.keys(e);for(const a of i){const l=+a;if(l>=t){const f=e[a];delete e[a],(n>0||l>t)&&(e[l+n]=f)}}}function Stt(e,t,n,i){return!n||e.type==="mouseout"?null:i?t:e}function GH(e,t,n){return e.options.clip?e[n]:t[n]}function Ctt(e,t){const{xScale:n,yScale:i}=e;return n&&i?{left:GH(n,t,"left"),right:GH(n,t,"right"),top:GH(i,t,"top"),bottom:GH(i,t,"bottom")}:t}let cR=(F5=class{static register(...t){Bv.add(...t),M_e()}static unregister(...t){Bv.remove(...t),M_e()}constructor(t,n){const i=this.config=new mtt(n),a=L_e(t),l=P_e(a);if(l)throw new Error("Canvas is already in use. Chart with ID '"+l.id+"' must be destroyed before the canvas with ID '"+l.canvas.id+"' can be reused.");const f=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||Bet(a)),this.platform.updateConfig(i);const d=this.platform.acquireContext(a,f.aspectRatio),h=d&&d.canvas,b=h&&h.height,S=h&&h.width;if(this.id=EJe(),this.ctx=d,this.canvas=h,this.width=S,this.height=b,this._options=f,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new stt,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=WJe(k=>this.update(k),f.resizeDelay||0),this._dataChanges=[],qH[this.id]=this,!d||!h){console.error("Failed to create chart: can't acquire context from the given item");return}zb.listen(this,"complete",D_e),zb.listen(this,"progress",ytt),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:i,height:a,_aspectRatio:l}=this;return El(t)?n&&l?l:a?i/a:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Bv}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Z4e(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return F4e(this.canvas,this.ctx),this}stop(){return zb.stop(this),this}resize(t,n){zb.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const i=this.options,a=this.canvas,l=i.maintainAspectRatio&&this.aspectRatio,f=this.platform.getMaximumSize(a,t,n,l),d=i.devicePixelRatio||this.platform.getDevicePixelRatio(),h=this.width?"resize":"attach";this.width=f.width,this.height=f.height,this._aspectRatio=this.aspectRatio,Z4e(this,d,!0)&&(this.notifyPlugins("resize",{size:f}),Wl(i.onResize,[this,f],this),this.attached&&this._doResize(h)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Ua(n,(i,a)=>{i.id=a})}buildOrUpdateScales(){const t=this.options,n=t.scales,i=this.scales,a=Object.keys(i).reduce((f,d)=>(f[d]=!1,f),{});let l=[];n&&(l=l.concat(Object.keys(n).map(f=>{const d=n[f],h=Ine(f,d),b=h==="r",S=h==="x";return{options:d,dposition:b?"chartArea":S?"bottom":"left",dtype:b?"radialLinear":S?"category":"linear"}}))),Ua(l,f=>{const d=f.options,h=d.id,b=Ine(h,d),S=xi(d.type,f.dtype);(d.position===void 0||O_e(d.position,b)!==O_e(f.dposition))&&(d.position=f.dposition),a[h]=!0;let k=null;if(h in i&&i[h].type===S)k=i[h];else{const T=Bv.getScale(S);k=new T({id:h,type:S,ctx:this.ctx,chart:this}),i[k.id]=k}k.init(d,t)}),Ua(a,(f,d)=>{f||delete i[d]}),Ua(i,f=>{N5.configure(this,f,f.options),N5.addBox(this,f)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,i=t.length;if(t.sort((a,l)=>a.index-l.index),i>n){for(let a=n;a<i;++a)this._destroyDatasetMeta(a);t.splice(n,i-n)}this._sortedMetasets=t.slice(0).sort(R_e("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((i,a)=>{n.filter(l=>l===i._dataset).length===0&&this._destroyDatasetMeta(a)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let i,a;for(this._removeUnreferencedMetasets(),i=0,a=n.length;i<a;i++){const l=n[i];let f=this.getDatasetMeta(i);const d=l.type||this.config.type;if(f.type&&f.type!==d&&(this._destroyDatasetMeta(i),f=this.getDatasetMeta(i)),f.type=d,f.indexAxis=l.indexAxis||Tne(d,this.options),f.order=l.order||0,f.index=i,f.label=""+l.label,f.visible=this.isDatasetVisible(i),f.controller)f.controller.updateIndex(i),f.controller.linkScales();else{const h=Bv.getController(d),{datasetElementType:b,dataElementType:S}=fu.datasets[d];Object.assign(h,{dataElementType:Bv.getElement(S),datasetElementType:b&&Bv.getElement(b)}),f.controller=new h(this,i),t.push(f.controller)}}return this._updateMetasets(),t}_resetElements(){Ua(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const i=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),a=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const l=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let f=0;for(let b=0,S=this.data.datasets.length;b<S;b++){const{controller:k}=this.getDatasetMeta(b),T=!a&&l.indexOf(k)===-1;k.buildOrUpdateElements(T),f=Math.max(+k.getMaxOverflow(),f)}f=this._minPadding=i.layout.autoPadding?f:0,this._updateLayout(f),a||Ua(l,b=>{b.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(R_e("z","_idx"));const{_active:d,_lastEvent:h}=this;h?this._eventHandler(h,!0):d.length&&this._updateHoverStyles(d,d,!0),this.render()}_updateScales(){Ua(this.scales,t=>{N5.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!_4e(n,i)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:i,start:a,count:l}of n){const f=i==="_removeElements"?-l:l;_tt(t,a,f)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,i=l=>new Set(t.filter(f=>f[0]===l).map((f,d)=>d+","+f.splice(1).join(","))),a=i(0);for(let l=1;l<n;l++)if(!_4e(a,i(l)))return;return Array.from(a).map(l=>l.split(",")).map(l=>({method:l[1],start:+l[2],count:+l[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;N5.update(this,this.width,this.height,t);const n=this.chartArea,i=n.width<=0||n.height<=0;this._layers=[],Ua(this.boxes,a=>{i&&a.position==="chartArea"||(a.configure&&a.configure(),this._layers.push(...a._layers()))},this),this._layers.forEach((a,l)=>{a._idx=l}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,i=this.data.datasets.length;n<i;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,i=this.data.datasets.length;n<i;++n)this._updateDataset(n,P5(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const i=this.getDatasetMeta(t),a={meta:i,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",a)!==!1&&(i.controller._update(n),a.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",a))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(zb.has(this)?this.attached&&!zb.running(this)&&zb.start(this):(this.draw(),D_e({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:i,height:a}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(i,a)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,i=[];let a,l;for(a=0,l=n.length;a<l;++a){const f=n[a];(!t||f.visible)&&i.push(f)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,i=t._clip,a=!i.disabled,l=Ctt(t,this.chartArea),f={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",f)!==!1&&(a&&dne(n,{left:i.left===!1?0:l.left-i.left,right:i.right===!1?this.width:l.right+i.right,top:i.top===!1?0:l.top-i.top,bottom:i.bottom===!1?this.height:l.bottom+i.bottom}),t.controller.draw(),a&&fne(n),f.cancelable=!1,this.notifyPlugins("afterDatasetDraw",f))}isPointInArea(t){return QO(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,i,a){const l=vet.modes[n];return typeof l=="function"?l(this,t,i,a):[]}getDatasetMeta(t){const n=this.data.datasets[t],i=this._metasets;let a=i.filter(l=>l&&l._dataset===n).pop();return a||(a={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},i.push(a)),a}getContext(){return this.$context||(this.$context=mC(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const i=this.getDatasetMeta(t);return typeof i.hidden=="boolean"?!i.hidden:!n.hidden}setDatasetVisibility(t,n){const i=this.getDatasetMeta(t);i.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,i){const a=i?"show":"hide",l=this.getDatasetMeta(t),f=l.controller._resolveAnimations(void 0,a);OH(n)?(l.data[n].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),f.update(l,{visible:i}),this.update(d=>d.datasetIndex===t?a:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),zb.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),F4e(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete qH[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,n=this.platform,i=(l,f)=>{n.addEventListener(this,l,f),t[l]=f},a=(l,f,d)=>{l.offsetX=f,l.offsetY=d,this._eventHandler(l)};Ua(this.options.events,l=>i(l,a))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,i=(h,b)=>{n.addEventListener(this,h,b),t[h]=b},a=(h,b)=>{t[h]&&(n.removeEventListener(this,h,b),delete t[h])},l=(h,b)=>{this.canvas&&this.resize(h,b)};let f;const d=()=>{a("attach",d),this.attached=!0,this.resize(),i("resize",l),i("detach",f)};f=()=>{this.attached=!1,a("resize",l),this._stop(),this._resize(0,0),i("attach",d)},n.isAttached(this.canvas)?d():f()}unbindEvents(){Ua(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},Ua(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,i){const a=i?"set":"remove";let l,f,d,h;for(n==="dataset"&&(l=this.getDatasetMeta(t[0].datasetIndex),l.controller["_"+a+"DatasetHoverStyle"]()),d=0,h=t.length;d<h;++d){f=t[d];const b=f&&this.getDatasetMeta(f.datasetIndex).controller;b&&b[a+"HoverStyle"](f.element,f.datasetIndex,f.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],i=t.map(({datasetIndex:l,index:f})=>{const d=this.getDatasetMeta(l);if(!d)throw new Error("No dataset found at index "+l);return{datasetIndex:l,element:d.data[f],index:f}});!IH(i,n)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,n))}notifyPlugins(t,n,i){return this._plugins.notify(this,t,n,i)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,i){const a=this.options.hover,l=(h,b)=>h.filter(S=>!b.some(k=>S.datasetIndex===k.datasetIndex&&S.index===k.index)),f=l(n,t),d=i?t:l(t,n);f.length&&this.updateHoverStyle(f,a.mode,!1),d.length&&a.mode&&this.updateHoverStyle(d,a.mode,!0)}_eventHandler(t,n){const i={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},a=f=>(f.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",i,a)===!1)return;const l=this._handleEvent(t,n,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,a),(l||i.changed)&&this.render(),this}_handleEvent(t,n,i){const{_active:a=[],options:l}=this,f=n,d=this._getActiveElements(t,a,i,f),h=OJe(t),b=Stt(t,this._lastEvent,i,h);i&&(this._lastEvent=null,Wl(l.onHover,[t,d,this],this),h&&Wl(l.onClick,[t,d,this],this));const S=!IH(d,a);return(S||n)&&(this._active=d,this._updateHoverStyles(d,a,n)),this._lastEvent=b,S}_getActiveElements(t,n,i,a){if(t.type==="mouseout")return[];if(!i)return n;const l=this.options.hover;return this.getElementsAtEventForMode(t,l.mode,l,a)}},$o(F5,"defaults",fu),$o(F5,"instances",qH),$o(F5,"overrides",fC),$o(F5,"registry",Bv),$o(F5,"version",vtt),$o(F5,"getChart",P_e),F5);function M_e(){return Ua(cR.instances,e=>e._plugins.invalidate())}function wtt(e,t,n){const{startAngle:i,pixelMargin:a,x:l,y:f,outerRadius:d,innerRadius:h}=t;let b=a/d;e.beginPath(),e.arc(l,f,d,i-b,n+b),h>a?(b=a/h,e.arc(l,f,h,n+b,i-b,!0)):e.arc(l,f,a,n+rd,i-rd),e.closePath(),e.clip()}function Ett(e){return mne(e,["outerStart","outerEnd","innerStart","innerEnd"])}function ktt(e,t,n,i){const a=Ett(e.options.borderRadius),l=(n-t)/2,f=Math.min(l,i*t/2),d=h=>{const b=(n-Math.min(l,h))*i/2;return jp(h,0,Math.min(l,b))};return{outerStart:d(a.outerStart),outerEnd:d(a.outerEnd),innerStart:jp(a.innerStart,0,f),innerEnd:jp(a.innerEnd,0,f)}}function f9(e,t,n,i){return{x:n+e*Math.cos(t),y:i+e*Math.sin(t)}}function KH(e,t,n,i,a,l){const{x:f,y:d,startAngle:h,pixelMargin:b,innerRadius:S}=t,k=Math.max(t.outerRadius+i+n-b,0),T=S>0?S+i+n+b:0;let O=0;const P=a-h;if(i){const Ue=S>0?S-i:0,V=k>0?k-i:0,Ye=(Ue+V)/2,Fe=Ye!==0?P*Ye/(Ye+i):P;O=(P-Fe)/2}const B=Math.max(.001,P*k-n/Pu)/k,W=(P-B)/2,Z=h+W+O,Y=a-W-O,{outerStart:z,outerEnd:q,innerStart:ne,innerEnd:ue}=ktt(t,T,k,Y-Z),J=k-z,ce=k-q,ge=Z+z/J,de=Y-q/ce,he=T+ne,ie=T+ue,Be=Z+ne/he,$e=Y-ue/ie;if(e.beginPath(),l){const Ue=(ge+de)/2;if(e.arc(f,d,k,ge,Ue),e.arc(f,d,k,Ue,de),q>0){const St=f9(ce,de,f,d);e.arc(St.x,St.y,q,de,Y+rd)}const V=f9(ie,Y,f,d);if(e.lineTo(V.x,V.y),ue>0){const St=f9(ie,$e,f,d);e.arc(St.x,St.y,ue,Y+rd,$e+Math.PI)}const Ye=(Y-ue/T+(Z+ne/T))/2;if(e.arc(f,d,T,Y-ue/T,Ye,!0),e.arc(f,d,T,Ye,Z+ne/T,!0),ne>0){const St=f9(he,Be,f,d);e.arc(St.x,St.y,ne,Be+Math.PI,Z-rd)}const Fe=f9(J,Z,f,d);if(e.lineTo(Fe.x,Fe.y),z>0){const St=f9(J,ge,f,d);e.arc(St.x,St.y,z,Z-rd,ge)}}else{e.moveTo(f,d);const Ue=Math.cos(ge)*k+f,V=Math.sin(ge)*k+d;e.lineTo(Ue,V);const Ye=Math.cos(de)*k+f,Fe=Math.sin(de)*k+d;e.lineTo(Ye,Fe)}e.closePath()}function xtt(e,t,n,i,a){const{fullCircles:l,startAngle:f,circumference:d}=t;let h=t.endAngle;if(l){KH(e,t,n,i,h,a);for(let b=0;b<l;++b)e.fill();isNaN(d)||(h=f+(d%jc||jc))}return KH(e,t,n,i,h,a),e.fill(),h}function Ttt(e,t,n,i,a){const{fullCircles:l,startAngle:f,circumference:d,options:h}=t,{borderWidth:b,borderJoinStyle:S,borderDash:k,borderDashOffset:T}=h,O=h.borderAlign==="inner";if(!b)return;e.setLineDash(k||[]),e.lineDashOffset=T,O?(e.lineWidth=b*2,e.lineJoin=S||"round"):(e.lineWidth=b,e.lineJoin=S||"bevel");let P=t.endAngle;if(l){KH(e,t,n,i,P,a);for(let B=0;B<l;++B)e.stroke();isNaN(d)||(P=f+(d%jc||jc))}O&&wtt(e,t,P),l||(KH(e,t,n,i,P,a),e.stroke())}class uR extends yC{constructor(n){super();$o(this,"circumference");$o(this,"endAngle");$o(this,"fullCircles");$o(this,"innerRadius");$o(this,"outerRadius");$o(this,"pixelMargin");$o(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,n&&Object.assign(this,n)}inRange(n,i,a){const l=this.getProps(["x","y"],a),{angle:f,distance:d}=k4e(l,{x:n,y:i}),{startAngle:h,endAngle:b,innerRadius:S,outerRadius:k,circumference:T}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],a),O=(this.options.spacing+this.options.borderWidth)/2,P=xi(T,b-h),B=YO(f,h,b)&&h!==b,W=P>=jc||B,Z=i9(d,S+O,k+O);return W&&Z}getCenterPoint(n){const{x:i,y:a,startAngle:l,endAngle:f,innerRadius:d,outerRadius:h}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:b,spacing:S}=this.options,k=(l+f)/2,T=(d+h+S+b)/2;return{x:i+Math.cos(k)*T,y:a+Math.sin(k)*T}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:i,circumference:a}=this,l=(i.offset||0)/4,f=(i.spacing||0)/2,d=i.circular;if(this.pixelMargin=i.borderAlign==="inner"?.33:0,this.fullCircles=a>jc?Math.floor(a/jc):0,a===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const h=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(h)*l,Math.sin(h)*l);const b=1-Math.sin(Math.min(Pu,a||0)),S=l*b;n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,xtt(n,this,S,f,d),Ttt(n,this,S,f,d),n.restore()}}$o(uR,"id","arc"),$o(uR,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),$o(uR,"defaultRoutes",{backgroundColor:"backgroundColor"}),$o(uR,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function N_e(e,t,n=t){e.lineCap=xi(n.borderCapStyle,t.borderCapStyle),e.setLineDash(xi(n.borderDash,t.borderDash)),e.lineDashOffset=xi(n.borderDashOffset,t.borderDashOffset),e.lineJoin=xi(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=xi(n.borderWidth,t.borderWidth),e.strokeStyle=xi(n.borderColor,t.borderColor)}function Itt(e,t,n){e.lineTo(n.x,n.y)}function Att(e){return e.stepped?oQe:e.tension||e.cubicInterpolationMode==="monotone"?rQe:Itt}function F_e(e,t,n={}){const i=e.length,{start:a=0,end:l=i-1}=n,{start:f,end:d}=t,h=Math.max(a,f),b=Math.min(l,d),S=a<f&&l<f||a>d&&l>d;return{count:i,start:h,loop:t.loop,ilen:b<h&&!S?i+b-h:b-h}}function Ott(e,t,n,i){const{points:a,options:l}=t,{count:f,start:d,loop:h,ilen:b}=F_e(a,n,i),S=Att(l);let{move:k=!0,reverse:T}=i||{},O,P,B;for(O=0;O<=b;++O)P=a[(d+(T?b-O:O))%f],!P.skip&&(k?(e.moveTo(P.x,P.y),k=!1):S(e,B,P,T,l.stepped),B=P);return h&&(P=a[(d+(T?b:0))%f],S(e,B,P,T,l.stepped)),!!h}function Rtt(e,t,n,i){const a=t.points,{count:l,start:f,ilen:d}=F_e(a,n,i),{move:h=!0,reverse:b}=i||{};let S=0,k=0,T,O,P,B,W,Z;const Y=q=>(f+(b?d-q:q))%l,z=()=>{B!==W&&(e.lineTo(S,W),e.lineTo(S,B),e.lineTo(S,Z))};for(h&&(O=a[Y(0)],e.moveTo(O.x,O.y)),T=0;T<=d;++T){if(O=a[Y(T)],O.skip)continue;const q=O.x,ne=O.y,ue=q|0;ue===P?(ne<B?B=ne:ne>W&&(W=ne),S=(k*S+q)/++k):(z(),e.lineTo(q,ne),P=ue,k=0,B=W=ne),Z=ne}z()}function Ane(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?Rtt:Ott}function Dtt(e){return e.stepped?$Qe:e.tension||e.cubicInterpolationMode==="monotone"?BQe:vC}function Ltt(e,t,n,i){let a=t._path;a||(a=t._path=new Path2D,t.path(a,n,i)&&a.closePath()),N_e(e,t.options),e.stroke(a)}function Ptt(e,t,n,i){const{segments:a,options:l}=t,f=Ane(t);for(const d of a)N_e(e,l,d.style),e.beginPath(),f(e,t,d,{start:n,end:n+i-1})&&e.closePath(),e.stroke()}const Mtt=typeof Path2D=="function";function Ntt(e,t,n,i){Mtt&&!t.options.segment?Ltt(e,t,n,i):Ptt(e,t,n,i)}class dR extends yC{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,n){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const a=i.spanGaps?this._loop:this._fullLoop;OQe(this._points,i,t,a,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=qQe(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,i=t.length;return i&&n[t[i-1].end]}interpolate(t,n){const i=this.options,a=t[n],l=this.points,f=WQe(this,{property:n,start:a,end:a});if(!f.length)return;const d=[],h=Dtt(i);let b,S;for(b=0,S=f.length;b<S;++b){const{start:k,end:T}=f[b],O=l[k],P=l[T];if(O===P){d.push(O);continue}const B=Math.abs((a-O[n])/(P[n]-O[n])),W=h(O,P,B,i.stepped);W[n]=t[n],d.push(W)}return d.length===1?d[0]:d}pathSegment(t,n,i){return Ane(this)(t,this,n,i)}path(t,n,i){const a=this.segments,l=Ane(this);let f=this._loop;n=n||0,i=i||this.points.length-n;for(const d of a)f&=l(t,this,d,{start:n,end:n+i-1});return!!f}draw(t,n,i,a){const l=this.options||{};(this.points||[]).length&&l.borderWidth&&(t.save(),Ntt(t,this,i,a),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}$o(dR,"id","line"),$o(dR,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),$o(dR,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),$o(dR,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function $_e(e,t,n,i){const a=e.options,{[n]:l}=e.getProps([n],i);return Math.abs(t-l)<a.radius+a.hitRadius}class YH extends yC{constructor(n){super();$o(this,"parsed");$o(this,"skip");$o(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,i,a){const l=this.options,{x:f,y:d}=this.getProps(["x","y"],a);return Math.pow(n-f,2)+Math.pow(i-d,2)<Math.pow(l.hitRadius+l.radius,2)}inXRange(n,i){return $_e(this,n,"x",i)}inYRange(n,i){return $_e(this,n,"y",i)}getCenterPoint(n){const{x:i,y:a}=this.getProps(["x","y"],n);return{x:i,y:a}}size(n){n=n||this.options||{};let i=n.radius||0;i=Math.max(i,i&&n.hoverRadius||0);const a=i&&n.borderWidth||0;return(i+a)*2}draw(n,i){const a=this.options;this.skip||a.radius<.1||!QO(this,i,this.size(a)/2)||(n.strokeStyle=a.borderColor,n.lineWidth=a.borderWidth,n.fillStyle=a.backgroundColor,une(n,a,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}$o(YH,"id","point"),$o(YH,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),$o(YH,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});const B_e=(e,t)=>{let{boxHeight:n=t,boxWidth:i=t}=e;return e.usePointStyle&&(n=Math.min(n,t),i=e.pointStyleWidth||Math.min(i,t)),{boxWidth:i,boxHeight:n,itemHeight:Math.max(t,n)}},Ftt=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class V_e extends yC{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n,i){this.maxWidth=t,this.maxHeight=n,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let n=Wl(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(i=>t.filter(i,this.chart.data))),t.sort&&(n=n.sort((i,a)=>t.sort(i,a,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const i=t.labels,a=Mm(i.font),l=a.size,f=this._computeTitleHeight(),{boxWidth:d,itemHeight:h}=B_e(i,l);let b,S;n.font=a.string,this.isHorizontal()?(b=this.maxWidth,S=this._fitRows(f,l,d,h)+10):(S=this.maxHeight,b=this._fitCols(f,a,d,h)+10),this.width=Math.min(b,t.maxWidth||this.maxWidth),this.height=Math.min(S,t.maxHeight||this.maxHeight)}_fitRows(t,n,i,a){const{ctx:l,maxWidth:f,options:{labels:{padding:d}}}=this,h=this.legendHitBoxes=[],b=this.lineWidths=[0],S=a+d;let k=t;l.textAlign="left",l.textBaseline="middle";let T=-1,O=-S;return this.legendItems.forEach((P,B)=>{const W=i+n/2+l.measureText(P.text).width;(B===0||b[b.length-1]+W+2*d>f)&&(k+=S,b[b.length-(B>0?0:1)]=0,O+=S,T++),h[B]={left:0,top:O,row:T,width:W,height:a},b[b.length-1]+=W+d}),k}_fitCols(t,n,i,a){const{ctx:l,maxHeight:f,options:{labels:{padding:d}}}=this,h=this.legendHitBoxes=[],b=this.columnSizes=[],S=f-t;let k=d,T=0,O=0,P=0,B=0;return this.legendItems.forEach((W,Z)=>{const{itemWidth:Y,itemHeight:z}=$tt(i,n,l,W,a);Z>0&&O+z+2*d>S&&(k+=T+d,b.push({width:T,height:O}),P+=T+d,B++,T=O=0),h[Z]={left:P,top:O,col:B,width:Y,height:z},T=Math.max(T,Y),O+=z+d}),k+=T,b.push({width:T,height:O}),k}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:i,labels:{padding:a},rtl:l}}=this,f=c9(l,this.left,this.width);if(this.isHorizontal()){let d=0,h=zh(i,this.left+a,this.right-this.lineWidths[d]);for(const b of n)d!==b.row&&(d=b.row,h=zh(i,this.left+a,this.right-this.lineWidths[d])),b.top+=this.top+t+a,b.left=f.leftForLtr(f.x(h),b.width),h+=b.width+a}else{let d=0,h=zh(i,this.top+t+a,this.bottom-this.columnSizes[d].height);for(const b of n)b.col!==d&&(d=b.col,h=zh(i,this.top+t+a,this.bottom-this.columnSizes[d].height)),b.top=h,b.left+=this.left+a,b.left=f.leftForLtr(f.x(b.left),b.width),h+=b.height+a}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;dne(t,this),this._draw(),fne(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:i,ctx:a}=this,{align:l,labels:f}=t,d=fu.color,h=c9(t.rtl,this.left,this.width),b=Mm(f.font),{padding:S}=f,k=b.size,T=k/2;let O;this.drawTitle(),a.textAlign=h.textAlign("left"),a.textBaseline="middle",a.lineWidth=.5,a.font=b.string;const{boxWidth:P,boxHeight:B,itemHeight:W}=B_e(f,k),Z=function(ue,J,ce){if(isNaN(P)||P<=0||isNaN(B)||B<0)return;a.save();const ge=xi(ce.lineWidth,1);if(a.fillStyle=xi(ce.fillStyle,d),a.lineCap=xi(ce.lineCap,"butt"),a.lineDashOffset=xi(ce.lineDashOffset,0),a.lineJoin=xi(ce.lineJoin,"miter"),a.lineWidth=ge,a.strokeStyle=xi(ce.strokeStyle,d),a.setLineDash(xi(ce.lineDash,[])),f.usePointStyle){const de={radius:B*Math.SQRT2/2,pointStyle:ce.pointStyle,rotation:ce.rotation,borderWidth:ge},he=h.xPlus(ue,P/2),ie=J+T;$4e(a,de,he,ie,f.pointStyleWidth&&P)}else{const de=J+Math.max((k-B)/2,0),he=h.leftForLtr(ue,P),ie=eR(ce.borderRadius);a.beginPath(),Object.values(ie).some(Be=>Be!==0)?pne(a,{x:he,y:de,w:P,h:B,radius:ie}):a.rect(he,de,P,B),a.fill(),ge!==0&&a.stroke()}a.restore()},Y=function(ue,J,ce){LH(a,ce.text,ue,J+W/2,b,{strikethrough:ce.hidden,textAlign:h.textAlign(ce.textAlign)})},z=this.isHorizontal(),q=this._computeTitleHeight();z?O={x:zh(l,this.left+S,this.right-i[0]),y:this.top+S+q,line:0}:O={x:this.left+S,y:zh(l,this.top+q+S,this.bottom-n[0].height),line:0},G4e(this.ctx,t.textDirection);const ne=W+S;this.legendItems.forEach((ue,J)=>{a.strokeStyle=ue.fontColor,a.fillStyle=ue.fontColor;const ce=a.measureText(ue.text).width,ge=h.textAlign(ue.textAlign||(ue.textAlign=f.textAlign)),de=P+T+ce;let he=O.x,ie=O.y;h.setWidth(this.width),z?J>0&&he+de+S>this.right&&(ie=O.y+=ne,O.line++,he=O.x=zh(l,this.left+S,this.right-i[O.line])):J>0&&ie+ne>this.bottom&&(he=O.x=he+n[O.line].width+S,O.line++,ie=O.y=zh(l,this.top+q+S,this.bottom-n[O.line].height));const Be=h.x(he);if(Z(Be,ie,ue),he=jJe(ge,he+P+T,z?he+de:this.right,t.rtl),Y(h.x(he),ie,ue),z)O.x+=de+S;else if(typeof ue.text!="string"){const $e=b.lineHeight;O.y+=H_e(ue,$e)+S}else O.y+=ne}),K4e(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,i=Mm(n.font),a=u0(n.padding);if(!n.display)return;const l=c9(t.rtl,this.left,this.width),f=this.ctx,d=n.position,h=i.size/2,b=a.top+h;let S,k=this.left,T=this.width;if(this.isHorizontal())T=Math.max(...this.lineWidths),S=this.top+b,k=zh(t.align,k,this.right-T);else{const P=this.columnSizes.reduce((B,W)=>Math.max(B,W.height),0);S=b+zh(t.align,this.top,this.bottom-P-t.labels.padding-this._computeTitleHeight())}const O=zh(d,k,k+T);f.textAlign=l.textAlign(O4e(d)),f.textBaseline="middle",f.strokeStyle=n.color,f.fillStyle=n.color,f.font=i.string,LH(f,n.text,O,S,i)}_computeTitleHeight(){const t=this.options.title,n=Mm(t.font),i=u0(t.padding);return t.display?n.lineHeight+i.height:0}_getLegendItemAt(t,n){let i,a,l;if(i9(t,this.left,this.right)&&i9(n,this.top,this.bottom)){for(l=this.legendHitBoxes,i=0;i<l.length;++i)if(a=l[i],i9(t,a.left,a.left+a.width)&&i9(n,a.top,a.top+a.height))return this.legendItems[i]}return null}handleEvent(t){const n=this.options;if(!Htt(t.type,n))return;const i=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const a=this._hoveredItem,l=Ftt(a,i);a&&!l&&Wl(n.onLeave,[t,a,this],this),this._hoveredItem=i,i&&!l&&Wl(n.onHover,[t,i,this],this)}else i&&Wl(n.onClick,[t,i,this],this)}}function $tt(e,t,n,i,a){const l=Btt(i,e,t,n),f=Vtt(a,i,t.lineHeight);return{itemWidth:l,itemHeight:f}}function Btt(e,t,n,i){let a=e.text;return a&&typeof a!="string"&&(a=a.reduce((l,f)=>l.length>f.length?l:f)),t+n.size/2+i.measureText(a).width}function Vtt(e,t,n){let i=e;return typeof t.text!="string"&&(i=H_e(t,n)),i}function H_e(e,t){const n=e.text?e.text.length:0;return t*n}function Htt(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var Utt={id:"legend",_element:V_e,start(e,t,n){const i=e.legend=new V_e({ctx:e.ctx,options:n,chart:e});N5.configure(e,i,n),N5.addBox(e,i)},stop(e){N5.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const i=e.legend;N5.configure(e,i,n),i.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const i=t.datasetIndex,a=n.chart;a.isDatasetVisible(i)?(a.hide(i),t.hidden=!0):(a.show(i),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:i,textAlign:a,color:l,useBorderRadius:f,borderRadius:d}}=e.legend.options;return e._getSortedDatasetMetas().map(h=>{const b=h.controller.getStyle(n?0:void 0),S=u0(b.borderWidth);return{text:t[h.index].label,fillStyle:b.backgroundColor,fontColor:l,hidden:!h.visible,lineCap:b.borderCapStyle,lineDash:b.borderDash,lineDashOffset:b.borderDashOffset,lineJoin:b.borderJoinStyle,lineWidth:(S.width+S.height)/4,strokeStyle:b.borderColor,pointStyle:i||b.pointStyle,rotation:b.rotation,textAlign:a||b.textAlign,borderRadius:f&&(d||b.borderRadius),datasetIndex:h.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};const fR={average(e){if(!e.length)return!1;let t,n,i=new Set,a=0,l=0;for(t=0,n=e.length;t<n;++t){const d=e[t].element;if(d&&d.hasValue()){const h=d.tooltipPosition();i.add(h.x),a+=h.y,++l}}return l===0||i.size===0?!1:{x:[...i].reduce((d,h)=>d+h)/i.size,y:a/l}},nearest(e,t){if(!e.length)return!1;let n=t.x,i=t.y,a=Number.POSITIVE_INFINITY,l,f,d;for(l=0,f=e.length;l<f;++l){const h=e[l].element;if(h&&h.hasValue()){const b=h.getCenterPoint(),S=sne(t,b);S<a&&(a=S,d=h)}}if(d){const h=d.tooltipPosition();n=h.x,i=h.y}return{x:n,y:i}}};function Vv(e,t){return t&&(Xd(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Wb(e){return(typeof e=="string"||e instanceof String)&&e.indexOf("\n")>-1?e.split("\n"):e}function ztt(e,t){const{element:n,datasetIndex:i,index:a}=t,l=e.getDatasetMeta(i).controller,{label:f,value:d}=l.getLabelAndValue(a);return{chart:e,label:f,parsed:l.getParsed(a),raw:e.data.datasets[i].data[a],formattedValue:d,dataset:l.getDataset(),dataIndex:a,datasetIndex:i,element:n}}function U_e(e,t){const n=e.chart.ctx,{body:i,footer:a,title:l}=e,{boxWidth:f,boxHeight:d}=t,h=Mm(t.bodyFont),b=Mm(t.titleFont),S=Mm(t.footerFont),k=l.length,T=a.length,O=i.length,P=u0(t.padding);let B=P.height,W=0,Z=i.reduce((q,ne)=>q+ne.before.length+ne.lines.length+ne.after.length,0);if(Z+=e.beforeBody.length+e.afterBody.length,k&&(B+=k*b.lineHeight+(k-1)*t.titleSpacing+t.titleMarginBottom),Z){const q=t.displayColors?Math.max(d,h.lineHeight):h.lineHeight;B+=O*q+(Z-O)*h.lineHeight+(Z-1)*t.bodySpacing}T&&(B+=t.footerMarginTop+T*S.lineHeight+(T-1)*t.footerSpacing);let Y=0;const z=function(q){W=Math.max(W,n.measureText(q).width+Y)};return n.save(),n.font=b.string,Ua(e.title,z),n.font=h.string,Ua(e.beforeBody.concat(e.afterBody),z),Y=t.displayColors?f+2+t.boxPadding:0,Ua(i,q=>{Ua(q.before,z),Ua(q.lines,z),Ua(q.after,z)}),Y=0,n.font=S.string,Ua(e.footer,z),n.restore(),W+=P.width,{width:W,height:B}}function Wtt(e,t){const{y:n,height:i}=t;return n<i/2?"top":n>e.height-i/2?"bottom":"center"}function jtt(e,t,n,i){const{x:a,width:l}=i,f=n.caretSize+n.caretPadding;if(e==="left"&&a+l+f>t.width||e==="right"&&a-l-f<0)return!0}function Ztt(e,t,n,i){const{x:a,width:l}=n,{width:f,chartArea:{left:d,right:h}}=e;let b="center";return i==="center"?b=a<=(d+h)/2?"left":"right":a<=l/2?b="left":a>=f-l/2&&(b="right"),jtt(b,e,t,n)&&(b="center"),b}function z_e(e,t,n){const i=n.yAlign||t.yAlign||Wtt(e,n);return{xAlign:n.xAlign||t.xAlign||Ztt(e,t,n,i),yAlign:i}}function qtt(e,t){let{x:n,width:i}=e;return t==="right"?n-=i:t==="center"&&(n-=i/2),n}function Gtt(e,t,n){let{y:i,height:a}=e;return t==="top"?i+=n:t==="bottom"?i-=a+n:i-=a/2,i}function W_e(e,t,n,i){const{caretSize:a,caretPadding:l,cornerRadius:f}=e,{xAlign:d,yAlign:h}=n,b=a+l,{topLeft:S,topRight:k,bottomLeft:T,bottomRight:O}=eR(f);let P=qtt(t,d);const B=Gtt(t,h,b);return h==="center"?d==="left"?P+=b:d==="right"&&(P-=b):d==="left"?P-=Math.max(S,T)+a:d==="right"&&(P+=Math.max(k,O)+a),{x:jp(P,0,i.width-t.width),y:jp(B,0,i.height-t.height)}}function XH(e,t,n){const i=u0(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-i.right:e.x+i.left}function j_e(e){return Vv([],Wb(e))}function Ktt(e,t,n){return mC(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function Z_e(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const q_e={beforeTitle:Hb,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,i=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(i>0&&t.dataIndex<i)return n[t.dataIndex]}return""},afterTitle:Hb,beforeBody:Hb,beforeLabel:Hb,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return El(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Hb,afterBody:Hb,beforeFooter:Hb,footer:Hb,afterFooter:Hb};function Nm(e,t,n,i){const a=e[t].call(n,i);return typeof a>"u"?q_e[t].call(n,i):a}class One extends yC{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,i=this.options.setContext(this.getContext()),a=i.enabled&&n.options.animation&&i.animations,l=new t_e(this.chart,a);return a._cacheable&&(this._cachedAnimations=Object.freeze(l)),l}getContext(){return this.$context||(this.$context=Ktt(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:i}=n,a=Nm(i,"beforeTitle",this,t),l=Nm(i,"title",this,t),f=Nm(i,"afterTitle",this,t);let d=[];return d=Vv(d,Wb(a)),d=Vv(d,Wb(l)),d=Vv(d,Wb(f)),d}getBeforeBody(t,n){return j_e(Nm(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:i}=n,a=[];return Ua(t,l=>{const f={before:[],lines:[],after:[]},d=Z_e(i,l);Vv(f.before,Wb(Nm(d,"beforeLabel",this,l))),Vv(f.lines,Nm(d,"label",this,l)),Vv(f.after,Wb(Nm(d,"afterLabel",this,l))),a.push(f)}),a}getAfterBody(t,n){return j_e(Nm(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:i}=n,a=Nm(i,"beforeFooter",this,t),l=Nm(i,"footer",this,t),f=Nm(i,"afterFooter",this,t);let d=[];return d=Vv(d,Wb(a)),d=Vv(d,Wb(l)),d=Vv(d,Wb(f)),d}_createItems(t){const n=this._active,i=this.chart.data,a=[],l=[],f=[];let d=[],h,b;for(h=0,b=n.length;h<b;++h)d.push(ztt(this.chart,n[h]));return t.filter&&(d=d.filter((S,k,T)=>t.filter(S,k,T,i))),t.itemSort&&(d=d.sort((S,k)=>t.itemSort(S,k,i))),Ua(d,S=>{const k=Z_e(t.callbacks,S);a.push(Nm(k,"labelColor",this,S)),l.push(Nm(k,"labelPointStyle",this,S)),f.push(Nm(k,"labelTextColor",this,S))}),this.labelColors=a,this.labelPointStyles=l,this.labelTextColors=f,this.dataPoints=d,d}update(t,n){const i=this.options.setContext(this.getContext()),a=this._active;let l,f=[];if(!a.length)this.opacity!==0&&(l={opacity:0});else{const d=fR[i.position].call(this,a,this._eventPosition);f=this._createItems(i),this.title=this.getTitle(f,i),this.beforeBody=this.getBeforeBody(f,i),this.body=this.getBody(f,i),this.afterBody=this.getAfterBody(f,i),this.footer=this.getFooter(f,i);const h=this._size=U_e(this,i),b=Object.assign({},d,h),S=z_e(this.chart,i,b),k=W_e(i,b,S,this.chart);this.xAlign=S.xAlign,this.yAlign=S.yAlign,l={opacity:1,x:k.x,y:k.y,width:h.width,height:h.height,caretX:d.x,caretY:d.y}}this._tooltipItems=f,this.$context=void 0,l&&this._resolveAnimations().update(this,l),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,i,a){const l=this.getCaretPosition(t,i,a);n.lineTo(l.x1,l.y1),n.lineTo(l.x2,l.y2),n.lineTo(l.x3,l.y3)}getCaretPosition(t,n,i){const{xAlign:a,yAlign:l}=this,{caretSize:f,cornerRadius:d}=i,{topLeft:h,topRight:b,bottomLeft:S,bottomRight:k}=eR(d),{x:T,y:O}=t,{width:P,height:B}=n;let W,Z,Y,z,q,ne;return l==="center"?(q=O+B/2,a==="left"?(W=T,Z=W-f,z=q+f,ne=q-f):(W=T+P,Z=W+f,z=q-f,ne=q+f),Y=W):(a==="left"?Z=T+Math.max(h,S)+f:a==="right"?Z=T+P-Math.max(b,k)-f:Z=this.caretX,l==="top"?(z=O,q=z-f,W=Z-f,Y=Z+f):(z=O+B,q=z+f,W=Z+f,Y=Z-f),ne=z),{x1:W,x2:Z,x3:Y,y1:z,y2:q,y3:ne}}drawTitle(t,n,i){const a=this.title,l=a.length;let f,d,h;if(l){const b=c9(i.rtl,this.x,this.width);for(t.x=XH(this,i.titleAlign,i),n.textAlign=b.textAlign(i.titleAlign),n.textBaseline="middle",f=Mm(i.titleFont),d=i.titleSpacing,n.fillStyle=i.titleColor,n.font=f.string,h=0;h<l;++h)n.fillText(a[h],b.x(t.x),t.y+f.lineHeight/2),t.y+=f.lineHeight+d,h+1===l&&(t.y+=i.titleMarginBottom-d)}}_drawColorBox(t,n,i,a,l){const f=this.labelColors[i],d=this.labelPointStyles[i],{boxHeight:h,boxWidth:b}=l,S=Mm(l.bodyFont),k=XH(this,"left",l),T=a.x(k),O=h<S.lineHeight?(S.lineHeight-h)/2:0,P=n.y+O;if(l.usePointStyle){const B={radius:Math.min(b,h)/2,pointStyle:d.pointStyle,rotation:d.rotation,borderWidth:1},W=a.leftForLtr(T,b)+b/2,Z=P+h/2;t.strokeStyle=l.multiKeyBackground,t.fillStyle=l.multiKeyBackground,une(t,B,W,Z),t.strokeStyle=f.borderColor,t.fillStyle=f.backgroundColor,une(t,B,W,Z)}else{t.lineWidth=ra(f.borderWidth)?Math.max(...Object.values(f.borderWidth)):f.borderWidth||1,t.strokeStyle=f.borderColor,t.setLineDash(f.borderDash||[]),t.lineDashOffset=f.borderDashOffset||0;const B=a.leftForLtr(T,b),W=a.leftForLtr(a.xPlus(T,1),b-2),Z=eR(f.borderRadius);Object.values(Z).some(Y=>Y!==0)?(t.beginPath(),t.fillStyle=l.multiKeyBackground,pne(t,{x:B,y:P,w:b,h,radius:Z}),t.fill(),t.stroke(),t.fillStyle=f.backgroundColor,t.beginPath(),pne(t,{x:W,y:P+1,w:b-2,h:h-2,radius:Z}),t.fill()):(t.fillStyle=l.multiKeyBackground,t.fillRect(B,P,b,h),t.strokeRect(B,P,b,h),t.fillStyle=f.backgroundColor,t.fillRect(W,P+1,b-2,h-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,n,i){const{body:a}=this,{bodySpacing:l,bodyAlign:f,displayColors:d,boxHeight:h,boxWidth:b,boxPadding:S}=i,k=Mm(i.bodyFont);let T=k.lineHeight,O=0;const P=c9(i.rtl,this.x,this.width),B=function(ce){n.fillText(ce,P.x(t.x+O),t.y+T/2),t.y+=T+l},W=P.textAlign(f);let Z,Y,z,q,ne,ue,J;for(n.textAlign=f,n.textBaseline="middle",n.font=k.string,t.x=XH(this,W,i),n.fillStyle=i.bodyColor,Ua(this.beforeBody,B),O=d&&W!=="right"?f==="center"?b/2+S:b+2+S:0,q=0,ue=a.length;q<ue;++q){for(Z=a[q],Y=this.labelTextColors[q],n.fillStyle=Y,Ua(Z.before,B),z=Z.lines,d&&z.length&&(this._drawColorBox(n,t,q,P,i),T=Math.max(k.lineHeight,h)),ne=0,J=z.length;ne<J;++ne)B(z[ne]),T=k.lineHeight;Ua(Z.after,B)}O=0,T=k.lineHeight,Ua(this.afterBody,B),t.y-=l}drawFooter(t,n,i){const a=this.footer,l=a.length;let f,d;if(l){const h=c9(i.rtl,this.x,this.width);for(t.x=XH(this,i.footerAlign,i),t.y+=i.footerMarginTop,n.textAlign=h.textAlign(i.footerAlign),n.textBaseline="middle",f=Mm(i.footerFont),n.fillStyle=i.footerColor,n.font=f.string,d=0;d<l;++d)n.fillText(a[d],h.x(t.x),t.y+f.lineHeight/2),t.y+=f.lineHeight+i.footerSpacing}}drawBackground(t,n,i,a){const{xAlign:l,yAlign:f}=this,{x:d,y:h}=t,{width:b,height:S}=i,{topLeft:k,topRight:T,bottomLeft:O,bottomRight:P}=eR(a.cornerRadius);n.fillStyle=a.backgroundColor,n.strokeStyle=a.borderColor,n.lineWidth=a.borderWidth,n.beginPath(),n.moveTo(d+k,h),f==="top"&&this.drawCaret(t,n,i,a),n.lineTo(d+b-T,h),n.quadraticCurveTo(d+b,h,d+b,h+T),f==="center"&&l==="right"&&this.drawCaret(t,n,i,a),n.lineTo(d+b,h+S-P),n.quadraticCurveTo(d+b,h+S,d+b-P,h+S),f==="bottom"&&this.drawCaret(t,n,i,a),n.lineTo(d+O,h+S),n.quadraticCurveTo(d,h+S,d,h+S-O),f==="center"&&l==="left"&&this.drawCaret(t,n,i,a),n.lineTo(d,h+k),n.quadraticCurveTo(d,h,d+k,h),n.closePath(),n.fill(),a.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,i=this.$animations,a=i&&i.x,l=i&&i.y;if(a||l){const f=fR[t.position].call(this,this._active,this._eventPosition);if(!f)return;const d=this._size=U_e(this,t),h=Object.assign({},f,this._size),b=z_e(n,t,h),S=W_e(t,h,b,n);(a._to!==S.x||l._to!==S.y)&&(this.xAlign=b.xAlign,this.yAlign=b.yAlign,this.width=d.width,this.height=d.height,this.caretX=f.x,this.caretY=f.y,this._resolveAnimations().update(this,S))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(n);const a={width:this.width,height:this.height},l={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const f=u0(n.padding),d=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&d&&(t.save(),t.globalAlpha=i,this.drawBackground(l,t,a,n),G4e(t,n.textDirection),l.y+=f.top,this.drawTitle(l,t,n),this.drawBody(l,t,n),this.drawFooter(l,t,n),K4e(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const i=this._active,a=t.map(({datasetIndex:d,index:h})=>{const b=this.chart.getDatasetMeta(d);if(!b)throw new Error("Cannot find a dataset at index "+d);return{datasetIndex:d,element:b.data[h],index:h}}),l=!IH(i,a),f=this._positionChanged(a,n);(l||f)&&(this._active=a,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,i=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const a=this.options,l=this._active||[],f=this._getActiveElements(t,l,n,i),d=this._positionChanged(f,t),h=n||!IH(f,l)||d;return h&&(this._active=f,(a.enabled||a.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),h}_getActiveElements(t,n,i,a){const l=this.options;if(t.type==="mouseout")return[];if(!a)return n.filter(d=>this.chart.data.datasets[d.datasetIndex]&&this.chart.getDatasetMeta(d.datasetIndex).controller.getParsed(d.index)!==void 0);const f=this.chart.getElementsAtEventForMode(t,l.mode,l,i);return l.reverse&&f.reverse(),f}_positionChanged(t,n){const{caretX:i,caretY:a,options:l}=this,f=fR[l.position].call(this,t,n);return f!==!1&&(i!==f.x||a!==f.y)}}$o(One,"positioners",fR);var G_e={id:"tooltip",_element:One,positioners:fR,afterInit(e,t,n){n&&(e.tooltip=new One({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:q_e},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const Ytt=(e,t,n,i)=>(typeof t=="string"?(n=e.push(t)-1,i.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function Xtt(e,t,n,i){const a=e.indexOf(t);if(a===-1)return Ytt(e,t,n,i);const l=e.lastIndexOf(t);return a!==l?n:a}const Jtt=(e,t)=>e===null?null:jp(Math.round(e),0,t);function K_e(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class Rne extends d9{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const i=this.getLabels();for(const{index:a,label:l}of n)i[a]===l&&i.splice(a,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(El(t))return null;const i=this.getLabels();return n=isFinite(n)&&i[n]===t?n:Xtt(i,t,xi(n,t),this._addedLabels),Jtt(n,i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:i,max:a}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(i=0),n||(a=this.getLabels().length-1)),this.min=i,this.max=a}buildTicks(){const t=this.min,n=this.max,i=this.options.offset,a=[];let l=this.getLabels();l=t===0&&n===l.length-1?l:l.slice(t,n+1),this._valueRange=Math.max(l.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let f=t;f<=n;f++)a.push({value:f});return a}getLabelForValue(t){return K_e.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}$o(Rne,"id","category"),$o(Rne,"defaults",{ticks:{callback:K_e}});function Qtt(e,t){const n=[],{bounds:a,step:l,min:f,max:d,precision:h,count:b,maxTicks:S,maxDigits:k,includeBounds:T}=e,O=l||1,P=S-1,{min:B,max:W}=t,Z=!El(f),Y=!El(d),z=!El(b),q=(W-B)/(k+1);let ne=w4e((W-B)/P/O)*O,ue,J,ce,ge;if(ne<1e-14&&!Z&&!Y)return[{value:B},{value:W}];ge=Math.ceil(W/ne)-Math.floor(B/ne),ge>P&&(ne=w4e(ge*ne/P/O)*O),El(h)||(ue=Math.pow(10,h),ne=Math.ceil(ne*ue)/ue),a==="ticks"?(J=Math.floor(B/ne)*ne,ce=Math.ceil(W/ne)*ne):(J=B,ce=W),Z&&Y&&l&&MJe((d-f)/l,ne/1e3)?(ge=Math.round(Math.min((d-f)/ne,S)),ne=(d-f)/ge,J=f,ce=d):z?(J=Z?f:J,ce=Y?d:ce,ge=b-1,ne=(ce-J)/ge):(ge=(ce-J)/ne,GO(ge,Math.round(ge),ne/1e3)?ge=Math.round(ge):ge=Math.ceil(ge));const de=Math.max(E4e(ne),E4e(J));ue=Math.pow(10,El(h)?de:h),J=Math.round(J*ue)/ue,ce=Math.round(ce*ue)/ue;let he=0;for(Z&&(T&&J!==f?(n.push({value:f}),J<f&&he++,GO(Math.round((J+he*ne)*ue)/ue,f,Y_e(f,q,e))&&he++):J<f&&he++);he<ge;++he){const ie=Math.round((J+he*ne)*ue)/ue;if(Y&&ie>d)break;n.push({value:ie})}return Y&&T&&ce!==d?n.length&&GO(n[n.length-1].value,d,Y_e(d,q,e))?n[n.length-1].value=d:n.push({value:d}):(!Y||ce===d)&&n.push({value:ce}),n}function Y_e(e,t,{horizontal:n,minRotation:i}){const a=Ub(i),l=(n?Math.sin(a):Math.cos(a))||.001,f=.75*t*(""+e).length;return Math.min(t/l,f)}class ent extends d9{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return El(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:i}=this.getUserBounds();let{min:a,max:l}=this;const f=h=>a=n?a:h,d=h=>l=i?l:h;if(t){const h=r9(a),b=r9(l);h<0&&b<0?d(0):h>0&&b>0&&f(0)}if(a===l){let h=l===0?1:Math.abs(l*.05);d(l+h),t||f(a-h)}this.min=a,this.max=l}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:i}=t,a;return i?(a=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,a>1e3&&(console.warn("scales.".concat(this.id,".ticks.stepSize: ").concat(i," would result generating up to ").concat(a," ticks. Limiting to 1000.")),a=1e3)):(a=this.computeTickLimit(),n=n||11),n&&(a=Math.min(n,a)),a}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const a={maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},l=this._range||this,f=Qtt(a,l);return t.bounds==="ticks"&&NJe(f,this,"value"),t.reverse?(f.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),f}configure(){const t=this.ticks;let n=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const a=(i-n)/Math.max(t.length-1,1)/2;n-=a,i+=a}this._startValue=n,this._endValue=i,this._valueRange=i-n}getLabelForValue(t){return ane(t,this.chart.options.locale,this.options.ticks.format)}}class Dne extends ent{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=G1(t)?t:0,this.max=G1(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,i=Ub(this.options.ticks.minRotation),a=(t?Math.sin(i):Math.cos(i))||.001,l=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,l.lineHeight/a))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}$o(Dne,"id","linear"),$o(Dne,"defaults",{ticks:{callback:M4e.formatters.numeric}});const JH={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Fm=Object.keys(JH);function X_e(e,t){return e-t}function J_e(e,t){if(El(t))return null;const n=e._adapter,{parser:i,round:a,isoWeekday:l}=e._parseOpts;let f=t;return typeof i=="function"&&(f=i(f)),G1(f)||(f=typeof i=="string"?n.parse(f,i):n.parse(f)),f===null?null:(a&&(f=a==="week"&&(KO(l)||l===!0)?n.startOf(f,"isoWeek",l):n.startOf(f,a)),+f)}function Q_e(e,t,n,i){const a=Fm.length;for(let l=Fm.indexOf(e);l<a-1;++l){const f=JH[Fm[l]],d=f.steps?f.steps:Number.MAX_SAFE_INTEGER;if(f.common&&Math.ceil((n-t)/(d*f.size))<=i)return Fm[l]}return Fm[a-1]}function tnt(e,t,n,i,a){for(let l=Fm.length-1;l>=Fm.indexOf(n);l--){const f=Fm[l];if(JH[f].common&&e._adapter.diff(a,i,f)>=t-1)return f}return Fm[n?Fm.indexOf(n):0]}function nnt(e){for(let t=Fm.indexOf(e)+1,n=Fm.length;t<n;++t)if(JH[Fm[t]].common)return Fm[t]}function eSe(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:i,hi:a}=one(n,t),l=n[i]>=t?n[i]:n[a];e[l]=!0}}function snt(e,t,n,i){const a=e._adapter,l=+a.startOf(t[0].value,i),f=t[t.length-1].value;let d,h;for(d=l;d<=f;d=+a.add(d,1,i))h=n[d],h>=0&&(t[h].major=!0);return t}function tSe(e,t,n){const i=[],a={},l=t.length;let f,d;for(f=0;f<l;++f)d=t[f],a[d]=f,i.push({value:d,major:!1});return l===0||!n?i:snt(e,i,a,n)}class QH extends d9{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const i=t.time||(t.time={}),a=this._adapter=new fet._date(t.adapters.date);a.init(n),ZO(i.displayFormats,a.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:J_e(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,i=t.time.unit||"day";let{min:a,max:l,minDefined:f,maxDefined:d}=this.getUserBounds();function h(b){!f&&!isNaN(b.min)&&(a=Math.min(a,b.min)),!d&&!isNaN(b.max)&&(l=Math.max(l,b.max))}(!f||!d)&&(h(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&h(this.getMinMax(!1))),a=G1(a)&&!isNaN(a)?a:+n.startOf(Date.now(),i),l=G1(l)&&!isNaN(l)?l:+n.endOf(Date.now(),i)+1,this.min=Math.min(a,l-1),this.max=Math.max(a+1,l)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],i=t[t.length-1]),{min:n,max:i}}buildTicks(){const t=this.options,n=t.time,i=t.ticks,a=i.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&a.length&&(this.min=this._userMin||a[0],this.max=this._userMax||a[a.length-1]);const l=this.min,f=this.max,d=HJe(a,l,f);return this._unit=n.unit||(i.autoSkip?Q_e(n.minUnit,this.min,this.max,this._getLabelCapacity(l)):tnt(this,d.length,n.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:nnt(this._unit),this.initOffsets(a),t.reverse&&d.reverse(),tSe(this,d,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,i=0,a,l;this.options.offset&&t.length&&(a=this.getDecimalForValue(t[0]),t.length===1?n=1-a:n=(this.getDecimalForValue(t[1])-a)/2,l=this.getDecimalForValue(t[t.length-1]),t.length===1?i=l:i=(l-this.getDecimalForValue(t[t.length-2]))/2);const f=t.length<3?.5:.25;n=jp(n,0,f),i=jp(i,0,f),this._offsets={start:n,end:i,factor:1/(n+1+i)}}_generate(){const t=this._adapter,n=this.min,i=this.max,a=this.options,l=a.time,f=l.unit||Q_e(l.minUnit,n,i,this._getLabelCapacity(n)),d=xi(a.ticks.stepSize,1),h=f==="week"?l.isoWeekday:!1,b=KO(h)||h===!0,S={};let k=n,T,O;if(b&&(k=+t.startOf(k,"isoWeek",h)),k=+t.startOf(k,b?"day":f),t.diff(i,n,f)>1e5*d)throw new Error(n+" and "+i+" are too far apart with stepSize of "+d+" "+f);const P=a.ticks.source==="data"&&this.getDataTimestamps();for(T=k,O=0;T<i;T=+t.add(T,d,f),O++)eSe(S,T,P);return(T===i||a.bounds==="ticks"||O===1)&&eSe(S,T,P),Object.keys(S).sort(X_e).map(B=>+B)}getLabelForValue(t){const n=this._adapter,i=this.options.time;return i.tooltipFormat?n.format(t,i.tooltipFormat):n.format(t,i.displayFormats.datetime)}format(t,n){const a=this.options.time.displayFormats,l=this._unit,f=n||a[l];return this._adapter.format(t,f)}_tickFormatFunction(t,n,i,a){const l=this.options,f=l.ticks.callback;if(f)return Wl(f,[t,n,i],this);const d=l.time.displayFormats,h=this._unit,b=this._majorUnit,S=h&&d[h],k=b&&d[b],T=i[n],O=b&&k&&T&&T.major;return this._adapter.format(t,a||(O?k:S))}generateTickLabels(t){let n,i,a;for(n=0,i=t.length;n<i;++n)a=t[n],a.label=this._tickFormatFunction(a.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+i)*n.factor)}getValueForPixel(t){const n=this._offsets,i=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,i=this.ctx.measureText(t).width,a=Ub(this.isHorizontal()?n.maxRotation:n.minRotation),l=Math.cos(a),f=Math.sin(a),d=this._resolveTickFontOptions(0).size;return{w:i*l+d*f,h:i*f+d*l}}_getLabelCapacity(t){const n=this.options.time,i=n.displayFormats,a=i[n.unit]||i.millisecond,l=this._tickFormatFunction(t,0,tSe(this,[t],this._majorUnit),a),f=this._getLabelSize(l),d=Math.floor(this.isHorizontal()?this.width/f.w:this.height/f.h)-1;return d>0?d:1}getDataTimestamps(){let t=this._cache.data||[],n,i;if(t.length)return t;const a=this.getMatchingVisibleMetas();if(this._normalized&&a.length)return this._cache.data=a[0].controller.getAllParsedValues(this);for(n=0,i=a.length;n<i;++n)t=t.concat(a[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,i;if(t.length)return t;const a=this.getLabels();for(n=0,i=a.length;n<i;++n)t.push(J_e(this,a[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return zJe(t.sort(X_e))}}$o(QH,"id","time"),$o(QH,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function eU(e,t,n){let i=0,a=e.length-1,l,f,d,h;n?(t>=e[i].pos&&t<=e[a].pos&&({lo:i,hi:a}=dC(e,"pos",t)),{pos:l,time:d}=e[i],{pos:f,time:h}=e[a]):(t>=e[i].time&&t<=e[a].time&&({lo:i,hi:a}=dC(e,"time",t)),{time:l,pos:d}=e[i],{time:f,pos:h}=e[a]);const b=f-l;return b?d+(h-d)*(t-l)/b:d}class nSe extends QH{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=eU(n,this.min),this._tableRange=eU(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:i}=this,a=[],l=[];let f,d,h,b,S;for(f=0,d=t.length;f<d;++f)b=t[f],b>=n&&b<=i&&a.push(b);if(a.length<2)return[{time:n,pos:0},{time:i,pos:1}];for(f=0,d=a.length;f<d;++f)S=a[f+1],h=a[f-1],b=a[f],Math.round((S+h)/2)!==b&&l.push({time:b,pos:f/(d-1)});return l}_generate(){const t=this.min,n=this.max;let i=super.getDataTimestamps();return(!i.includes(t)||!i.length)&&i.splice(0,0,t),(!i.includes(n)||i.length===1)&&i.push(n),i.sort((a,l)=>a-l)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),i=this.getLabelTimestamps();return n.length&&i.length?t=this.normalize(n.concat(i)):t=n.length?n:i,t=this._cache.all=t,t}getDecimalForValue(t){return(eU(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,i=this.getDecimalForPixel(t)/n.factor-n.end;return eU(this._table,i*this._tableRange+this._minPos,!0)}}$o(nSe,"id","timeseries"),$o(nSe,"defaults",QH.defaults);const sSe={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},ont={type:{type:String,required:!0},destroyDelay:{type:Number,default:0},...sSe,...{ariaLabel:{type:String},ariaDescribedby:{type:String}}},rnt=bB[0]==="2"?(e,t)=>Object.assign(e,{attrs:t}):(e,t)=>Object.assign(e,t);function p9(e){return ES(e)?Qo(e):e}function int(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e;return ES(t)?new Proxy(e,{}):e}function ant(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function oSe(e,t){e.labels=t}function rSe(e,t,n){const i=[];e.datasets=t.map(a=>{const l=e.datasets.find(f=>f[n]===a[n]);return!l||!a.data||i.includes(l)?{...a}:(i.push(l),Object.assign(l,a),l)})}function lnt(e,t){const n={labels:[],datasets:[]};return oSe(n,e.labels),rSe(n,e.datasets,t),n}const cnt=Gr({props:ont,setup(e,t){let{expose:n,slots:i}=t;const a=kt(null),l=kS(null);n({chart:l});const f=()=>{if(!a.value)return;const{type:b,data:S,options:k,plugins:T,datasetIdKey:O}=e,P=lnt(S,O),B=int(P,S);l.value=new cR(a.value,{type:b,data:B,options:{...k},plugins:T})},d=()=>{const b=Qo(l.value);b&&(e.destroyDelay>0?setTimeout(()=>{b.destroy(),l.value=null},e.destroyDelay):(b.destroy(),l.value=null))},h=b=>{b.update(e.updateMode)};return Pr(f),$a(d),io([()=>e.options,()=>e.data],(b,S)=>{let[k,T]=b,[O,P]=S;const B=Qo(l.value);if(!B)return;let W=!1;if(k){const Z=p9(k),Y=p9(O);Z&&Z!==Y&&(ant(B,Z),W=!0)}if(T){const Z=p9(T.labels),Y=p9(P.labels),z=p9(T.datasets),q=p9(P.datasets);Z!==Y&&(oSe(B.config.data,Z),W=!0),z&&z!==q&&(rSe(B.config.data,z,e.datasetIdKey),W=!0)}W&&kc(()=>{h(B)})},{deep:!0}),()=>oi("canvas",{role:"img",ariaLabel:e.ariaLabel,ariaDescribedby:e.ariaDescribedby,ref:a},[oi("p",{},[i.default?i.default():""])])}});function iSe(e,t){return cR.register(t),Gr({props:sSe,setup(n,i){let{expose:a}=i;const l=kS(null),f=d=>{l.value=d==null?void 0:d.chart};return a({chart:l}),()=>oi(cnt,rnt({ref:f},{type:e,...n}))}})}const unt=iSe("doughnut",nR),dnt=iSe("line",BH);cR.register(G_e,Utt,uR);const fnt={components:{Doughnut:unt},props:{chartData:{type:Object,required:!0},chartOptions:{type:Object,default:function(){return{}}}},computed:{options:function(){return{responsive:!0,maintainAspectRatio:!1,cutout:"80%",layout:{padding:{top:32,bottom:32,left:32,right:32}},plugins:{legend:{display:!1}},elements:{arc:{borderWidth:0}},...this.chartOptions}}}},pnt={class:"chartjs-render-monitor"};function mnt(e,t,n,i,a,l){const f=Xe("Doughnut");return L(),Q("div",pnt,[pe(f,{data:n.chartData,options:l.options},null,8,["data","options"])])}const aSe=wt(fnt,[["render",mnt],["__scopeId","data-v-add65fc9"]]);cR.register(G_e,dR,Rne,Dne,YH);const hnt={components:{LineChartJs:dnt},props:{chartData:{type:Object,required:!0},chartOptions:{type:Object,default(){return{}}}},computed:{options(){return{responsive:!0,maintainAspectRatio:!1,layout:{padding:{top:32,bottom:8,left:32,right:64}},plugins:{legend:{display:!1}},elements:{point:{borderWidth:0,backgroundColor:"#D00A6C"},line:{tension:.2,borderWidth:2,borderColor:"#D00A6C",backgroundColor:"transparent"}},scales:{x:{gridLines:{color:"transparent",zeroLineColor:"transparent"},ticks:{color:"rgba(255,255,255,0.85)",font:{family:'"Noto Sans", "Noto Kufi Arabic", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", sans-serif',weight:700},padding:8,maxTicksLimit:5,maxRotation:0,minRotation:0}},y:{grid:{color:"#006798",drawTicks:!1,tickBorderDash:[1,10]},border:{dash:e=>e.tick.value===0?null:[1,10]},ticks:{color:"rgba(255,255,255,0.85)",padding:7,beginAtZero:!0}}},...this.chartOptions}}}},gnt={class:"chartjs-render-monitor"};function vnt(e,t,n,i,a,l){const f=Xe("LineChartJs");return L(),Q("div",gnt,[pe(f,{data:n.chartData,options:l.options},null,8,["data","options"])])}const lSe=wt(hnt,[["render",vnt],["__scopeId","data-v-f6b32235"]]),bnt={name:"ListPanel",components:{Notification:yH,PkpHeader:Bf},props:{description:{type:String,default(){return""}},emptyLabel:{type:String,default(){return""}},expanded:{type:Array,default(){return[]}},headingLevel:{type:String,default(){return"h2"}},isSidebarVisible:{type:Boolean,default(){return!1}},items:{type:Array,required:!0},title:{type:String,default(){return""}}},computed:{currentEmptyLabel(){return this.emptyLabel?this.emptyLabel:this.t("common.noItemsFound")}},watch:{isSidebarVisible:function(e,t){e&&this.$nextTick(()=>{e&&Object.keys(this.$refs).includes("sidebar")&&this.setFocusIn(this.$refs.sidebar)})}}},ynt={class:"listPanel"},_nt={class:"listPanel__header"},Snt={key:0},Cnt={class:"listPanel__body"},wnt={key:0,ref:"sidebar",class:"listPanel__sidebar"},Ent={class:"listPanel__items"},knt={key:0,class:"listPanel__empty"},xnt={key:1,class:"listPanel__itemsList"},Tnt={class:"listPanel__itemSummary"},Int={class:"listPanel__itemIdentity"},Ant={class:"listPanel__itemTitle"},Ont={key:0,class:"listPanel__itemSubtitle"},Rnt={key:0,class:"listPanel__itemActions"},Dnt={key:0,class:"listPanel__itemExpanded"},Lnt={key:0,class:"listPanel__footer"};function Pnt(e,t,n,i,a,l){const f=Xe("PkpHeader");return L(),Q("div",ynt,[H("div",_nt,[is(e.$slots,"header",{},()=>[pe(f,null,{default:te(()=>[(L(),Ee(Io(n.headingLevel),null,{default:te(()=>[D(ee(n.title),1)]),_:1}))]),_:1}),t[0]||(t[0]=D()),n.description?(L(),Q("div",Snt,ee(n.description),1)):we("",!0)])]),t[5]||(t[5]=D()),H("div",Cnt,[pe(s5,{name:"listPanel__sidebar"},{default:te(()=>[e.$slots.sidebar&&n.isSidebarVisible?(L(),Q("div",wnt,[is(e.$slots,"sidebar")],512)):we("",!0)]),_:3}),t[4]||(t[4]=D()),H("div",Ent,[n.items.length?(L(),Q("ul",xnt,[(L(!0),Q(bt,null,Sn(n.items,d=>(L(),Q("li",{key:d.id,class:"listPanel__item"},[is(e.$slots,"item",{item:d},()=>[H("div",Tnt,[H("div",Int,[H("div",Ant,[is(e.$slots,"item-title",{item:d},()=>[D(ee(d.title),1)])]),t[1]||(t[1]=D()),e.$slots["item-subtitle"]||d.subtitle?(L(),Q("div",Ont,[is(e.$slots,"item-subtitle",{item:d},()=>[D(ee(d.subtitle),1)])])):we("",!0)]),t[2]||(t[2]=D()),e.$slots["item-actions"]?(L(),Q("div",Rnt,[is(e.$slots,"item-actions",{item:d})])):we("",!0)])]),t[3]||(t[3]=D()),n.expanded.includes(d.id)?(L(),Q("div",Dnt,[is(e.$slots,"item-expanded",{item:d})])):we("",!0)]))),128))])):(L(),Q("div",knt,[is(e.$slots,"itemsEmpty",{},()=>[D(ee(l.currentEmptyLabel),1)])]))])]),t[6]||(t[6]=D()),e.$slots.footer?(L(),Q("div",Lnt,[is(e.$slots,"footer")])):we("",!0)])}const Vf=wt(bnt,[["render",Pnt]]),Mnt={components:{Icon:Vs},props:{documentType:{type:String,default(){return""}},fileId:{type:Number,default(){return 0}},name:{type:String,required:!0},url:{type:String,required:!1,default(){return""}}},computed:{documentTypeIcon(){return pkp.documentTypeIcons&&pkp.documentTypeIcons[this.documentType]?pkp.documentTypeIcons[this.documentType]:"DocumentDefault"}}},Nnt={class:"flex items-center"},Fnt={key:0,class:"file__id"},$nt={class:"ms-2 truncate text-base-normal text-default"},Bnt=["href"];function Vnt(e,t,n,i,a,l){const f=Xe("Icon");return L(),Q("div",Nnt,[pe(f,{icon:l.documentTypeIcon,class:"h-6 w-6 flex-none text-heading"},null,8,["icon"]),t[0]||(t[0]=D()),n.fileId?(L(),Q("span",Fnt,ee(n.fileId),1)):we("",!0),t[1]||(t[1]=D()),H("span",$nt,[n.url?(L(),Q("a",{key:0,class:"hover:underline",href:n.url,target:"_blank"},ee(n.name),9,Bnt)):(L(),Q(bt,{key:1},[D(ee(n.name),1)],64))])])}const m9=wt(Mnt,[["render",Vnt]]),Hnt={components:{File:m9,Badge:kd,PkpButton:ms,Icon:Vs},props:{createdAt:{type:String,default(){return""}},documentType:{type:String,default(){return""}},downloadLabel:{type:String,required:!0},genreName:{type:String,default(){return""}},genreIsPrimary:{type:Boolean,default(){return!1}},fileId:{type:Number,default(){return 0}},name:{type:String,required:!0},uploadedBy:{type:String,default(){return""}},url:{type:String,default(){return""}}},data(){return{describedById:""}},computed:{uploadedDetails(){return this.uploadedBy?this.createdAt?this.t("common.uploadedByAndWhen",{name:this.uploadedBy,date:this.createdAt.substring(0,10)}):this.t("common.uploadedBy",{name:this.uploadedBy}):""}},created(){this.describedById=$.pkp.classes.Helper.uuid()}},Unt={class:"selectSubmissionFileListItem"},znt={class:"selectSubmissionFileListItem__label"},Wnt={class:"selectSubmissionFileListItem__selector"},jnt={key:0,class:"listPanel__itemActions"},Znt={key:0},qnt={class:"-screenReader"};function Gnt(e,t,n,i,a,l){const f=Xe("File"),d=Xe("Badge"),h=Xe("Icon"),b=Xe("PkpButton");return L(),Q("div",Unt,[H("label",znt,[H("div",Wnt,[is(e.$slots,"default")]),t[0]||(t[0]=D()),pe(f,{id:a.describedById,class:"selectSubmissionFileListItem__file","document-type":n.documentType,"file-id":n.fileId,name:n.name},null,8,["id","document-type","file-id","name"])]),t[4]||(t[4]=D()),l.uploadedDetails||n.genreName||n.url?(L(),Q("div",jnt,[l.uploadedDetails?(L(),Q("span",Znt,ee(l.uploadedDetails),1)):we("",!0),t[2]||(t[2]=D()),n.genreName?(L(),Ee(d,{key:1,"is-primary":n.genreIsPrimary},{default:te(()=>[D(ee(n.genreName),1)]),_:1},8,["is-primary"])):we("",!0),t[3]||(t[3]=D()),n.url?(L(),Ee(b,{key:2,class:"selectSubmissionFileListItem__download",element:"a",href:n.url,target:"_blank",rel:"noopener noreferrer","aria-describedby":a.describedById},{default:te(()=>[pe(h,{icon:"Download",class:"h-4 w-4"}),t[1]||(t[1]=D()),H("span",qnt,ee(n.downloadLabel),1)]),_:1},8,["href","aria-describedby"])):we("",!0)])):we("",!0)])}const tU=wt(Hnt,[["render",Gnt]]),Knt={name:"FileAttacherFileStage",components:{ButtonRow:r0,Dropdown:Ww,ListPanel:Vf,PkpHeader:Bf,SelectSubmissionFileListItem:tU,Spinner:zl,PkpButton:ms,Icon:Vs},mixins:[Od],props:{attachSelectedLabel:{type:String,required:!0},backLabel:{type:String,required:!0},component:{type:String,required:!0},downloadLabel:{type:String,required:!0},fileStages:{type:Array,required:!0},submissionFilesApiUrl:{type:String,required:!0}},data(){return{currentFileStage:{},isLoading:!1,files:[],selected:[]}},computed:{selectedFiles(){return this.files.filter(e=>this.selected.includes(e.id))}},watch:{currentFileStage(e,t){this.getFiles()}},created(){this.currentFileStage=this.fileStages[0]},methods:{getFiles(){this.isLoading=!0,this.files=[],$.ajax({url:this.submissionFilesApiUrl,type:"GET",context:this,data:this.currentFileStage.queryParams,success(e){this.files=e.items},error:this.ajaxErrorCallback,complete(e){this.isLoading=!1}})}}},Ynt={class:"fileAttacherFileStage","aria-live":"polite"},Xnt=["onClick"],Jnt={key:0},Qnt=["value"];function est(e,t,n,i,a,l){const f=Xe("Dropdown"),d=Xe("PkpHeader"),h=Xe("Spinner"),b=Xe("SelectSubmissionFileListItem"),S=Xe("ListPanel"),k=Xe("Icon"),T=Xe("PkpButton"),O=Xe("ButtonRow");return L(),Q("div",Ynt,[pe(S,{items:a.files,"is-loading":a.isLoading},{header:te(()=>[pe(d,null,{actions:te(()=>[n.fileStages.length>1?(L(),Ee(f,{key:0,label:"Other Files"},{default:te(()=>[H("ul",null,[(L(!0),Q(bt,null,Sn(n.fileStages,P=>(L(),Q("li",{key:P.label},[H("button",{class:"pkpDropdown__action",onClick:B=>a.currentFileStage=P},ee(P.label),9,Xnt)]))),128))])]),_:1})):we("",!0)]),default:te(()=>[H("h2",null,ee(a.currentFileStage.label),1),t[3]||(t[3]=D())]),_:1})]),itemsEmpty:te(()=>[a.isLoading?(L(),Q("div",Jnt,[pe(h),D(" "+ee(e.t("common.loading")),1)])):we("",!0)]),item:te(({item:P})=>[pe(b,{"document-type":P.documentType,"download-label":n.downloadLabel,"genre-name":e.localize(P.genreName),"genre-is-primary":!P.genreIsDependent&&!P.genreIsSupplementary,"file-id":P.id,name:e.localize(P.name),url:P.url},{default:te(()=>[Gn(H("input",{"onUpdate:modelValue":t[0]||(t[0]=B=>a.selected=B),type:"checkbox",value:P.id},null,8,Qnt),[[Iv,a.selected]])]),_:2},1032,["document-type","download-label","genre-name","genre-is-primary","file-id","name","url"])]),_:1},8,["items","is-loading"]),t[7]||(t[7]=D()),pe(O,{class:"fileAttacher__footer"},{end:te(()=>[pe(T,{"is-link":!0,onClick:t[1]||(t[1]=P=>e.$emit("cancel"))},{default:te(()=>[pe(k,{icon:"ArrowLeft",class:"h-4 w-4",inline:!0}),D(" "+ee(n.backLabel),1)]),_:1})]),default:te(()=>[t[6]||(t[6]=D()),pe(T,{"is-disabled":!a.selected.length,onClick:t[2]||(t[2]=P=>e.$emit("selected:files",l.selectedFiles))},{default:te(()=>[D(ee(n.attachSelectedLabel),1)]),_:1},8,["is-disabled"])]),_:1})])}const tst=wt(Knt,[["render",est]]),nst={name:"FileAttacherLibrary",components:{ButtonRow:r0,SelectSubmissionFileListItem:tU,Spinner:zl,PkpButton:ms,Icon:Vs},mixins:[Od],props:{attachSelectedLabel:{type:String,required:!0},backLabel:{type:String,required:!0},component:{type:String,required:!0},downloadLabel:{type:String,required:!0},includeSubmissionId:{type:Number,default(){return-1}},libraryApiUrl:{type:String,required:!0}},data(){return{isLoading:!1,files:[],selected:[]}},computed:{selectedFiles(){return this.files.filter(e=>this.selected.includes(e.id))}},created(){this.getFiles()},methods:{getFiles(){this.isLoading=!0,this.files=[],$.ajax({url:this.libraryApiUrl,type:"GET",context:this,data:this.includeSubmissionId?{includeSubmissionId:this.includeSubmissionId}:{},success(e){this.files=e.items},error:this.ajaxErrorCallback,complete(e){this.isLoading=!1}})}}},sst={class:"fileAttacherLibrary","aria-live":"polite"},ost={key:0,class:"fileAttacherLibrary__message"},rst={key:0},ist={key:1},ast={key:1},lst=["value"];function cst(e,t,n,i,a,l){const f=Xe("Spinner"),d=Xe("SelectSubmissionFileListItem"),h=Xe("Icon"),b=Xe("PkpButton"),S=Xe("ButtonRow");return L(),Q("div",sst,[a.files.length?(L(),Q("div",ast,[(L(!0),Q(bt,null,Sn(a.files,(k,T)=>(L(),Ee(d,{key:T,"document-type":k.documentType,"download-label":n.downloadLabel,"genre-name":k.typeName,"file-id":k.id,name:e.localize(k.name),url:k.url},{default:te(()=>[Gn(H("input",{"onUpdate:modelValue":t[0]||(t[0]=O=>a.selected=O),type:"checkbox",value:k.id},null,8,lst),[[Iv,a.selected]])]),_:2},1032,["document-type","download-label","genre-name","file-id","name","url"]))),128))])):(L(),Q("div",ost,[a.isLoading?(L(),Q("div",rst,[pe(f),D(" "+ee(e.t("common.loading")),1)])):(L(),Q("div",ist,ee(e.t("common.noItemsFound")),1))])),t[4]||(t[4]=D()),pe(S,{class:"fileAttacher__footer"},{end:te(()=>[pe(b,{"is-link":!0,onClick:t[1]||(t[1]=k=>e.$emit("cancel"))},{default:te(()=>[pe(h,{icon:"ArrowLeft",class:"h-4 w-4",inline:!0}),D(" "+ee(n.backLabel),1)]),_:1})]),default:te(()=>[t[3]||(t[3]=D()),pe(b,{"is-disabled":!a.selected.length,onClick:t[2]||(t[2]=k=>e.$emit("selected:files",l.selectedFiles))},{default:te(()=>[D(ee(n.attachSelectedLabel),1)]),_:1},8,["is-disabled"])]),_:1})])}const ust=wt(nst,[["render",cst]]),dst={name:"FileAttacherReviewFiles",components:{ButtonRow:r0,PkpButton:ms,Icon:Vs,SelectSubmissionFileListItem:tU},props:{attachSelectedLabel:{type:String,required:!0},backLabel:{type:String,required:!0},component:{type:String,required:!0},downloadLabel:{type:String,required:!0},files:{type:Array,required:!0}},data(){return{selected:[]}},computed:{selectedFiles(){return this.files.filter(e=>this.selected.includes(e.id))}}},fst={class:"fileAttacherReviewFiles"},pst={key:0,class:"fileAttacherReviewFiles__noFiles"},mst=["value"];function hst(e,t,n,i,a,l){const f=Xe("SelectSubmissionFileListItem"),d=Xe("Icon"),h=Xe("PkpButton"),b=Xe("ButtonRow");return L(),Q("div",fst,[n.files.length?(L(!0),Q(bt,{key:1},Sn(n.files,(S,k)=>(L(),Ee(f,{key:k,"document-type":S.documentType,"download-label":n.downloadLabel,"genre-name":S.typeName,"file-id":S.id,name:S.reviewerName+" — "+e.localize(S.name),url:S.url},{default:te(()=>[Gn(H("input",{"onUpdate:modelValue":t[0]||(t[0]=T=>a.selected=T),type:"checkbox",value:S.id},null,8,mst),[[Iv,a.selected]])]),_:2},1032,["document-type","download-label","genre-name","file-id","name","url"]))),128)):(L(),Q("div",pst,ee(e.t("common.noItemsFound")),1)),t[4]||(t[4]=D()),pe(b,{class:"fileAttacher__footer"},{end:te(()=>[pe(h,{"is-link":!0,onClick:t[1]||(t[1]=S=>e.$emit("cancel"))},{default:te(()=>[pe(d,{icon:"ArrowLeft",class:"h-4 w-4",inline:!0}),D(" "+ee(n.backLabel),1)]),_:1})]),default:te(()=>[t[3]||(t[3]=D()),pe(h,{"is-disabled":!a.selected.length,onClick:t[2]||(t[2]=S=>e.$emit("selected:files",l.selectedFiles))},{default:te(()=>[D(ee(n.attachSelectedLabel),1)]),_:1},8,["is-disabled"])]),_:1})])}const gst=wt(dst,[["render",hst]]),vst={components:{VueDropzone:Mte},props:{apiUrl:{type:String,required:!0},filenameLocale:{type:String,default(){return""}},files:{type:Array,required:!0},id:{type:String,required:!0},options:{type:Object,default(){return{}}},queryParams:{type:Object,default(){return{}}},uploadProgressLabel:{type:String,required:!0}},emits:["set","updated:files"],data(){return{dragEventCounter:0,isDragging:!1,status:""}},computed:{dropzoneId(){return this.id+"dropzone"},dropzoneOptions(){return{method:"POST",url:this.apiUrl,thumbnailWidth:240,hiddenInputContainer:"#"+this.id,addRemoveLinks:!0,previewTemplate:"<p></p>",headers:{"X-Csrf-Token":pkp.currentUser.csrfToken},params:(e,t)=>{const n=this.filenameLocale?"name["+this.filenameLocale+"]":"name";return{...this.queryParams,[n]:e[0].name}},...this.options}}},mounted(){document.addEventListener("dragenter",this.dragenter,!0),document.addEventListener("dragleave",this.dragleave,!0),document.addEventListener("dragover",this.drop,!0),document.addEventListener("drop",this.drop)},unmounted(){document.removeEventListener("dragenter",this.dragenter,!0),document.removeEventListener("dragleave",this.dragleave,!0),document.removeEventListener("dragover",this.drop,!0),document.removeEventListener("drop",this.drop)},methods:{cancelUpload(e){const t=this.$refs.dropzone.dropzone.files.find(n=>n.upload.uuid===e);t&&this.$refs.dropzone.removeFile(t)},dragenter(e){this.dragEventCounter=this.dragEventCounter+1,this.isDragging=e.dataTransfer.types.includes("Files")},dragleave(e){this.dragEventCounter=this.dragEventCounter-1,this.isDragging=this.dragEventCounter>0},drop(e){e.preventDefault(),e.type==="drop"&&(this.isDragging=!1,this.dragEventCounter=0)},dropzoneError(e,t){let n=[];typeof t=="string"?n=[t]:typeof t.errorMessage<"u"?n=[t.errorMessage]:typeof t=="object"&&t!==null&&(n=Object.keys(t).map(i=>t[i]).flat()),this.$nextTick(()=>{this.$nextTick(()=>{this.$nextTick(()=>{const i=this.files.map(a=>(a.id===e.upload.uuid&&(a.errors=n),a));this.$emit("updated:files",i)})})})},dropzoneFilesAdded(e){console.log("dropzone files added1"),this.$nextTick(()=>{console.log("dropzone files added2");const t=Array.from(e).map(n=>(console.log("dropzone files added3"),{id:n.upload.uuid,name:n.upload.filename,progress:n.upload.progress,errors:[]}));this.$emit("updated:files",this.files.concat(t))})},dropzoneRemovedFile(e){const t=this.files.filter(n=>!n.id||n.id!==e.upload.uuid);this.$emit("updated:files",t)},dropzoneSuccess(e,t){const n=this.files.map(i=>i.id===e.upload.uuid?t:i);this.$emit("updated:files",n)},dropzoneTotalUploadProgress(e){this.status=this.uploadProgressLabel.replace("{$percent}",e.toFixed(0))},dropzoneUploadProgress(e,t){const n=this.files.map(i=>(i.id===e.upload.uuid&&(i.progress=t),i));this.$emit("set",this.id,n)},openFileBrowser(){this.$refs.dropzone.dropzone.hiddenFileInput.click()}}},bst=["id"],yst={key:0,class:"-screenReader",role:"status"};function _st(e,t,n,i,a,l){const f=Xe("VueDropzone");return L(),Q("div",{id:n.id,class:Rn(["fileUploader",{"-isDragging":a.isDragging}])},[pe(f,{id:l.dropzoneId,ref:"dropzone",options:l.dropzoneOptions,onVdropzoneError:l.dropzoneError,onVdropzoneFilesAdded:l.dropzoneFilesAdded,onVdropzoneRemovedFile:l.dropzoneRemovedFile,onVdropzoneSuccess:l.dropzoneSuccess,onVdropzoneUploadProgress:l.dropzoneUploadProgress,onVdropzoneTotalUploadProgress:l.dropzoneTotalUploadProgress,onVdropzoneDrop:l.drop},null,8,["id","options","onVdropzoneError","onVdropzoneFilesAdded","onVdropzoneRemovedFile","onVdropzoneSuccess","onVdropzoneUploadProgress","onVdropzoneTotalUploadProgress","onVdropzoneDrop"]),t[0]||(t[0]=D()),a.status?(L(),Q("span",yst,ee(a.status),1)):we("",!0)],10,bst)}const nU=wt(vst,[["render",_st]]),Sst={props:{max:{type:Number,default(){return 100}},min:{type:Number,default(){return 0}},value:{type:Number,required:!0}},computed:{progress(){return(this.value/this.max*100).toFixed(0)}}},Cst={class:"progressBar"},wst=["aria-valuenow","aria-valuemin","aria-valuemax"];function Est(e,t,n,i,a,l){return L(),Q("div",Cst,[H("div",{class:"progressBar__progress",style:Ih({width:l.progress+"%"}),"aria-valuenow":n.value,"aria-valuemin":n.min,"aria-valuemax":n.max,role:"progressbar"},null,12,wst)])}const cSe=wt(Sst,[["render",Est]]),kst={components:{FieldError:Gd,ProgressBar:cSe,PkpButton:ms},props:{cancelUploadLabel:{type:String,required:!0},errors:{type:Array,required:!0},name:{type:String,required:!0},progress:{type:Number,required:!0}},emits:["cancel"],data(){return{uuid:""}},created(){this.uuid=$.pkp.classes.Helper.uuid()}},xst={class:"fileUploadProgress"},Tst={class:"fileUploadProgress__row"},Ist=["id"],Ast={class:"fileUploadProgress__actions"};function Ost(e,t,n,i,a,l){const f=Xe("PkpButton"),d=Xe("FieldError"),h=Xe("ProgressBar");return L(),Q("div",xst,[H("div",Tst,[H("div",{id:a.uuid,class:"fileUploadProgress__name"},ee(n.name),9,Ist),t[1]||(t[1]=D()),H("div",Ast,[pe(f,{"is-warnable":!0,"aria-describedby":a.uuid,onClick:t[0]||(t[0]=b=>e.$emit("cancel"))},{default:te(()=>[D(ee(n.cancelUploadLabel),1)]),_:1},8,["aria-describedby"])])]),t[2]||(t[2]=D()),n.errors.length?(L(),Ee(d,{key:0,messages:n.errors},null,8,["messages"])):(L(),Ee(h,{key:1,value:n.progress},null,8,["value"]))])}const Lne=wt(kst,[["render",Ost]]),Rst={name:"FileAttacherUpload",components:{PkpButton:ms,Icon:Vs,ButtonRow:r0,File:m9,FileUploader:nU,FileUploadProgress:Lne},props:{addFilesLabel:{type:String,required:!0},attachFilesLabel:{type:String,required:!0},backLabel:{type:String,required:!0},component:{type:String,required:!0},dragAndDropMessage:{type:String,required:!0},dragAndDropOrUploadMessage:{type:String,required:!0},dropzoneOptions:{type:Object,required:!0},removeItemLabel:{type:String,required:!0},temporaryFilesApiUrl:{type:String,required:!0}},data(){return{files:[]}},computed:{isUploading(){return this.files.filter(e=>"progress"in e).length>1}},methods:{removeFile(e){this.files=this.files.filter((t,n)=>n!==e)},selectFile(){this.$refs.uploader.openFileBrowser()},updateFiles(e){this.files=[...e]}}},Dst={class:"fileAttacherUpload"},Lst={class:"fileAttacherUpload__wrapper"},Pst={key:0,class:"fileAttacherUpload__prompt"},Mst={key:1,class:"fileAttacherUpload__files"},Nst={class:"aria-hidden"},Fst={class:"-screenReader"};function $st(e,t,n,i,a,l){const f=Xe("FileUploadProgress"),d=Xe("File"),h=Xe("PkpButton"),b=Xe("FileUploader"),S=Xe("Icon"),k=Xe("ButtonRow");return L(),Q("div",Dst,[H("div",Lst,[a.files.length?(L(),Q("div",Mst,[(L(!0),Q(bt,null,Sn(a.files,(T,O)=>(L(),Q(bt,null,["progress"in T?(L(),Ee(f,{key:O,"cancel-upload-label":"Cancel Upload",errors:T.errors,name:T.name,progress:T.progress,onCancel:P=>l.removeFile(O)},null,8,["errors","name","progress","onCancel"])):(L(),Q("div",{key:O,class:"fileAttacherUploader__uploadedFile"},[pe(d,{id:"FileAttacherUpload__UploadedFile__"+O,name:T.form?T.form.name:T.name,"document-type":T.documentType||"default"},null,8,["id","name","document-type"]),t[4]||(t[4]=D()),pe(h,{"aria-describedby":"FileAttacherUpload__UploadedFile__"+O,class:"fileAttacherUploader__uploadedFile__remove","is-warnable":!0,onClick:P=>l.removeFile(O)},{default:te(()=>[H("span",Nst,ee(e.t("common.remove")),1),t[3]||(t[3]=D()),H("span",Fst,ee(n.removeItemLabel.replace("{$item}",T.form?T.form.name:T.name)),1)]),_:2},1032,["aria-describedby","onClick"])]))],64))),256))])):(L(),Q("div",Pst,[H("p",null,[D(ee(n.dragAndDropMessage)+" ",1),H("button",{class:"-linkButton",onClick:t[0]||(t[0]=(...T)=>l.selectFile&&l.selectFile(...T))},ee(n.dragAndDropOrUploadMessage),1)])])),t[5]||(t[5]=D()),pe(b,{id:"previewFileUploader",ref:"uploader","api-url":n.temporaryFilesApiUrl,files:a.files,options:n.dropzoneOptions,"upload-progress-label":"Uploading {$percent}% complete","onUpdated:files":l.updateFiles},null,8,["api-url","files","options","onUpdated:files"])]),t[8]||(t[8]=D()),pe(k,{class:"fileAttacher__footer"},{end:te(()=>[pe(h,{"is-link":!0,onClick:t[1]||(t[1]=T=>e.$emit("cancel"))},{default:te(()=>[pe(S,{icon:"ArrowLeft",class:"h-4 w-4",inline:!0}),D(" "+ee(n.backLabel),1)]),_:1})]),default:te(()=>[t[6]||(t[6]=D()),pe(h,{onClick:l.selectFile},{default:te(()=>[D(ee(n.addFilesLabel),1)]),_:1},8,["onClick"]),t[7]||(t[7]=D()),pe(h,{"is-primary":!0,"is-disabled":!a.files.length||l.isUploading,onClick:t[2]||(t[2]=T=>e.$emit("selected:files",a.files))},{default:te(()=>[D(ee(n.attachFilesLabel),1)]),_:1},8,["is-disabled"])]),_:1})])}const Bst=wt(Rst,[["render",$st]]),Pne={__name:"AttacherModal",props:{title:{type:String,required:!0},currentAttacher:{type:Object,required:!0}},emits:["attachFiles","cancel"],setup(e,{emit:t}){const n={FileAttacherFileStage:tst,FileAttacherLibrary:ust,FileAttacherReviewFiles:gst,FileAttacherUpload:Bst},i=t;return(a,l)=>(L(),Ee(il,null,{title:te(()=>[D(ee(e.title),1)]),default:te(()=>[l[2]||(l[2]=D()),pe(Lu,null,{default:te(()=>[e.currentAttacher?(L(),Ee(Io(n[e.currentAttacher.component]||e.currentAttacher.component),Cn({key:0},e.currentAttacher,{"onSelected:files":l[0]||(l[0]=(...f)=>i("attachFiles",...f)),onCancel:l[1]||(l[1]=(...f)=>i("cancel",...f))}),null,16)):we("",!0)]),_:1})]),_:1}))}},Vst={name:"FileAttacher",components:{ActionPanel:Z1,PkpButton:ms},props:{attachers:{type:Array,required:!0}},emits:["attached:files"],data(){return{currentAttacher:null,resetFocusTo:null}},methods:{attachFiles(e){this.$emit("attached:files",this.currentAttacher.component,e);const{closeSideModal:t}=Ms();t(Pne)},cancel(){const{closeSideModal:e}=Ms();e(Pne),this.$nextTick(()=>this.currentAttacher=null)},setAttacher(e){this.currentAttacher=e;const{openSideModal:t}=Ms();t(Pne,{title:this.currentAttacher?this.currentAttacher.label:"",currentAttacher:this.currentAttacher,onAttachFiles:this.attachFiles,onCancel:this.cancel})}}},Hst={class:"fileAttacher"};function Ust(e,t,n,i,a,l){const f=Xe("PkpButton"),d=Xe("ActionPanel"),h=Hr("strip-unsafe-html");return L(),Q("div",Hst,[(L(!0),Q(bt,null,Sn(n.attachers,(b,S)=>(L(),Ee(d,{id:"attacher"+S,key:S},{actions:te(()=>[pe(f,{"aria-describedby":"attacher"+S,onClick:k=>l.setAttacher(b)},{default:te(()=>[D(ee(b.button),1)]),_:2},1032,["aria-describedby","onClick"])]),default:te(()=>[H("h2",null,ee(b.label),1),t[0]||(t[0]=D()),Gn(H("p",null,null,512),[[h,b.description]]),t[1]||(t[1]=D())]),_:2},1032,["id"]))),128))])}const uSe=wt(Vst,[["render",Ust]]),dSe={__name:"FileAttacherModal",props:{title:{type:String,required:!0},attachers:{type:Object,required:!0}},emits:["addAttachments"],setup(e,{emit:t}){const n=t;return(i,a)=>(L(),Ee(il,null,{title:te(()=>[D(ee(e.title),1)]),default:te(()=>[a[1]||(a[1]=D()),pe(Lu,null,{default:te(()=>[pe(uSe,{attachers:e.attachers,"onAttached:files":a[0]||(a[0]=(...l)=>n("addAttachments",...l))},null,8,["attachers"])]),_:1})]),_:1}))}},zst={name:"Composer",components:{FieldAutosuggestPreset:bH,FieldError:Gd,FieldPreparedContent:Dte,Search:j1,Panel:_H,PanelSection:SH,Spinner:zl,PkpButton:ms,Icon:Vs,Badge:kd},mixins:[Od,wd,p5e],props:{addCCLabel:{type:String,required:!0},attachers:{type:Array,default(){return[]}},attachments:{type:Array,default(){return[]}},attachFilesLabel:{type:String,required:!0},attachedFilesLabel:{type:String,required:!0},bcc:{type:String,default(){return""}},bccLabel:{type:String,required:!0},body:{type:String,default(){return""}},bodyLabel:{type:String,required:!0},canChangeRecipients:{type:Boolean,default(){return!0}},cc:{type:String,default(){return""}},ccLabel:{type:String,required:!0},confirmSwitchLocaleLabel:{type:String,required:!0},deselectLabel:{type:String,required:!0},emailTemplates:{type:Array,default(){return[]}},emailTemplatesApiUrl:{type:String,default(){return""}},errors:{type:Object,default(){return{}}},findTemplateLabel:{type:String,required:!0},id:{type:String,default(){return"composer"}},initialTemplateKey:{type:String,default(){return""}},insertLabel:{type:String,required:!0},insertModalLabel:{type:String,required:!0},insertContentLabel:{type:String,required:!0},insertSearchLabel:{type:String,default(){return""}},loadTemplateLabel:{type:String,required:!0},locale:{type:String,required:!0},locales:{type:Array,default(){return[]}},moreSearchResultsLabel:{type:String,required:!0},recipients:{type:Array,default(){return[]}},recipientsLabel:{type:String,required:!0},recipientOptions:{type:Array,required:!0},removeItemLabel:{type:String,required:!0},searchingLabel:{type:String,required:!0},searchResultsLabel:{type:String,required:!0},separateEmails:{type:Boolean,default(){return!1}},subject:{type:String,default(){return""}},subjectLabel:{type:String,required:!0},switchToLabel:{type:String,required:!0},switchToNamedLanguageLabel:{type:String,required:!0},variables:{type:Object,default(){return{}}}},emits:["set"],data(){return{ccIsEnabled:!1,isFocused:"",isLoadingTemplate:!1,isSearching:!1,latestSearchRequest:"",searchPhrase:"",searchResults:[],showSearchResultCount:10}},computed:{toolbar(){var t;let e="bold italic superscript subscript | link ";return(t=this.attachers)!=null&&t.length&&(e+="| pkpAttachFiles"),e},bccBinded:{get(){return this.bcc},set(e){this.emitChange({bcc:e})}},bodyInit(){if(!this.attachers.length)return{};let e=this;return{setup:function(t){t.ui.registry.addButton("pkpAttachFiles",{icon:"upload",text:e.t("common.attachFiles"),onAction(){const{openSideModal:n}=Ms();n(dSe,{title:e.attachFilesLabel,attachers:e.attachers,onAddAttachments:e.addAttachments})}})}}},ccBinded:{get(){return this.cc},set(e){this.emitChange({cc:e})}},compiledVariables(){const e=[...this.localizedVariables],t=e.find(n=>n.key==="recipientName");return t&&(this.separateEmails?t.value="{$recipientName}":this.canChangeRecipients&&(t.value=this.recipientVariable)),e},fileAttacherModalId(){return this.id+"fileAttacher"},limitedSearchResults(){return this.searchResults.slice(0,this.showSearchResultCount)},localizedRecipientOptions(){var t;const e=(t=this.locale)!=null?t:$.pkp.app.currentLocale;return this.recipientOptions.map(n=>({value:n.value,label:n.label[e]}))},localizedVariables(){return this.variables[this.locale]?this.variables[this.locale]:[]},otherLocales(){return this.locales.filter(e=>e.locale!==this.locale)},recipientVariable(){let e=this.recipientsSelected.map(t=>t.label).join(this.t("common.commaListSeparator"));return e||"{$recipientName}"},subjectBinded:{get(){return this.subject},set(e){this.emitChange({subject:e})}},recipientsSelected(){return this.localizedRecipientOptions.filter(e=>this.recipients.includes(e.value))}},watch:{searchPhrase(){this.$nextTick(()=>this.search())}},created(){this.initialTemplateKey&&this.loadTemplate(this.initialTemplateKey)},methods:{addAttachments(e,t){const n=[...this.attachments,...t.map(a=>{switch(e){case"FileAttacherUpload":return{name:a.name,temporaryFileId:a.id,documentType:a.documentType};case"FileAttacherFileStage":case"FileAttacherReviewFiles":{const l=this.localize(a.name,this.locale).trim();return{name:l===""?this.localize(a.name):l,submissionFileId:a.id,documentType:a.documentType}}case"FileAttacherLibrary":return{name:a.filename,libraryFileId:a.id,documentType:a.documentType}}})];this.emitChange({attachments:n});const{closeSideModal:i}=Ms();i(dSe)},changeRecipients(e,t,n){t==="value"&&this.emitChange({recipients:n})},getDocumentTypeIcon(e){return pkp.documentTypeIcons&&e.documentType&&pkp.documentTypeIcons[e.documentType]?pkp.documentTypeIcons[e.documentType]:"DefaultDocument"},emitChange(e){this.$emit("set",this.id,e)},enableCC(){this.ccIsEnabled=!0},getBodySnippet(e){let n=document.createElement("span");n.innerHTML=e;const i=n.textContent.trim();return i.length<67?i:i.substring(0,70).trim()+"..."},loadTemplate(e){this.isLoadingTemplate=!0;const t=this.emailTemplates.find(i=>i.key===e);if(t){setTimeout(()=>{this.setBody(t.body[this.locale]),this.setSubject(t.subject[this.locale]),this.isLoadingTemplate=!1},1e3);return}this.latestLoadRequest=$.pkp.classes.Helper.uuid();const n=this;$.ajax({url:this.emailTemplatesApiUrl+"/"+e,type:"GET",_uuid:this.latestLoadRequest,error(i){n.latestLoadRequest===this._uuid&&n.ajaxErrorCallback(i)},success(i){n.latestLoadRequest===this._uuid&&(n.setBody(i.body[n.locale]),n.setSubject(i.subject[n.locale]))},complete(){n.latestLoadRequest===this._uuid&&(n.isLoadingTemplate=!1)}})},openSwitchLocale(e){const t=this.locales.find(n=>n.locale===e).name;this.openDialog({name:"confirmLocaleSwitch",title:this.switchToNamedLanguageLabel.replace("{$name}",t),message:this.confirmSwitchLocaleLabel.replace("{$localeName}",t),actions:[{label:this.switchToNamedLanguageLabel.replace("{$name}",t),isPrimary:!0,callback:n=>{this.switchLocale(e),n()}},{label:this.t("common.cancel"),isWarnable:!0,callback:n=>n()}],modalStyle:"primary"})},removeAttachment(e){this.emitChange({attachments:this.attachments.filter((t,n)=>n!==e)})},search(){if(!this.emailTemplatesApiUrl)return;if(!this.searchPhrase){this.searchResults=[];return}this.isSearching=!0;const e=$.pkp.classes.Helper.uuid();this.latestSearchRequest=e,this.showSearchResultCount=10,$.ajax({url:this.emailTemplatesApiUrl,type:"GET",context:this,data:{searchPhrase:this.searchPhrase},_uuid:this.latestSearchRequest,error:function(t){this.latestSearchRequest===e&&this.ajaxErrorCallback(t)},success:function(t){this.latestSearchRequest===e&&(this.searchResults=t.items)},complete(){this.latestSearchRequest===e&&(this.isSearching=!1)}})},setBody(e){this.emitChange({body:e})},setSubject(e){this.emitChange({subject:this.renderPreparedContent(e,this.compiledVariables)})},switchLocale(e){this.emitChange({locale:e}),this.$nextTick(()=>this.loadTemplate(this.initialTemplateKey))}}},Wst={key:0,class:"composer__templates"},jst={class:"composer__templates__heading"},Zst=["aria-label"],qst=["onClick"],Gst={class:"composer__template__name -linkButton"},Kst={key:0,class:"composer__template__body"},Yst=["onClick"],Xst={class:"composer__template__name -linkButton"},Jst={key:0,class:"composer__template__body"},Qst={key:0},eot={key:1,class:"composer__templates__searching",role:"alert"},tot={key:2,class:"composer__locales"},not=["onClick"],sot={class:"composer__message"},oot={class:"composer__recipients__wrapper"},rot=["for"],iot=["id","aria-described-by","aria-invalid"],aot=["for"],lot=["id","aria-described-by","aria-invalid"],cot=["for"],uot=["id","aria-described-by","aria-invalid"],dot={key:0,ref:"attachedFiles",class:"composer__attachments"},fot={class:"-screenReader"},pot=["onClick"],mot={class:"-screenReader"},hot={key:6,class:"composer__loadingTemplateMask",role:"alert"},got={class:"-screenReader"};function vot(e,t,n,i,a,l){const f=Xe("Search"),d=Xe("Icon"),h=Xe("Spinner"),b=Xe("PkpButton"),S=Xe("FieldAutosuggestPreset"),k=Xe("FieldError"),T=Xe("Badge"),O=Xe("FieldPreparedContent"),P=Xe("PanelSection"),B=Xe("Panel");return L(),Ee(B,{class:"composer"},{default:te(()=>[pe(P,null,{header:te(()=>[is(e.$slots,"description"),t[23]||(t[23]=D()),n.emailTemplates.length||n.emailTemplatesApiUrl?(L(),Q("div",Wst,[H("div",jst,ee(n.loadTemplateLabel),1),t[19]||(t[19]=D()),n.emailTemplatesApiUrl?(L(),Ee(f,{key:0,"search-label":n.findTemplateLabel,class:"composer__templates__search","search-phrase":a.searchPhrase,onSearchPhraseChanged:t[0]||(t[0]=W=>a.searchPhrase=W)},null,8,["search-label","search-phrase"])):we("",!0),t[20]||(t[20]=D()),H("ul",{class:"composer__templates__list","aria-live":"true","aria-label":n.searchResultsLabel},[a.searchPhrase?(L(),Q(bt,{key:1},[(L(!0),Q(bt,null,Sn(l.limitedSearchResults,W=>(L(),Q("li",{key:W.key},[H("button",{class:"composer__template",onClick:Z=>l.loadTemplate(W.key)},[H("div",Xst,ee(e.localize(W.name)),1),t[16]||(t[16]=D()),e.localize(W.body)?(L(),Q("div",Jst,ee(l.getBodySnippet(e.localize(W.body))),1)):we("",!0)],8,Yst)]))),128)),t[17]||(t[17]=D()),a.searchResults.length>a.showSearchResultCount?(L(),Q("li",Qst,[H("button",{class:"-linkButton composer__templates__moreSearchResults",onClick:t[1]||(t[1]=W=>a.showSearchResultCount=a.searchResults.length)},[pe(d,{icon:"Add",class:"h-3 w-3",inline:!0}),D(" "+ee(n.moreSearchResultsLabel.replace("{$number}",a.searchResults.length-a.showSearchResultCount)),1)])])):we("",!0)],64)):(L(!0),Q(bt,{key:0},Sn(n.emailTemplates,W=>(L(),Q("li",{key:W.key},[H("button",{class:"composer__template",onClick:Z=>l.loadTemplate(W.key)},[H("div",Gst,ee(e.localize(W.name)),1),t[15]||(t[15]=D()),e.localize(W.body)?(L(),Q("div",Kst,ee(l.getBodySnippet(e.localize(W.body))),1)):we("",!0)],8,qst)]))),128))],8,Zst),t[21]||(t[21]=D()),a.isSearching?(L(),Q("div",eot,[pe(h),D(" "+ee(n.searchingLabel),1)])):we("",!0),t[22]||(t[22]=D()),l.otherLocales.length?(L(),Q("div",tot,[D(ee(n.switchToLabel)+" ",1),(L(!0),Q(bt,null,Sn(l.otherLocales,(W,Z)=>(L(),Q(bt,null,[n.locale!==W.locale?(L(),Q("button",{key:W.locale,class:"-linkButton",onClick:Y=>l.openSwitchLocale(W.locale)},ee(W.name),9,not)):we("",!0),t[18]||(t[18]=D()),Z<l.otherLocales.length-1?(L(),Q(bt,{key:1},[D(ee(e.t("common.commaListSeparator")),1)],64)):we("",!0)],64))),256))])):we("",!0)])):we("",!0)]),default:te(()=>[t[39]||(t[39]=D()),H("div",sot,[H("div",oot,[pe(S,{class:"composer__recipients",name:"to",label:n.recipientsLabel,"is-label-inline":!0,"deselect-label":n.deselectLabel,"all-errors":n.errors,"group-id":"composer","form-id":n.id,"selected-label":n.recipientsLabel,options:l.localizedRecipientOptions,selected:l.recipientsSelected,value:n.recipients,"is-disabled":!n.canChangeRecipients,onChange:l.changeRecipients},{end:te(()=>[a.ccIsEnabled?we("",!0):(L(),Ee(b,{key:0,"is-link":!0,onClick:l.enableCC},{default:te(()=>[D(ee(n.addCCLabel),1)]),_:1},8,["onClick"]))]),_:1},8,["label","deselect-label","all-errors","form-id","selected-label","options","selected","value","is-disabled","onChange"])]),t[30]||(t[30]=D()),a.ccIsEnabled?(L(),Q("div",{key:0,class:Rn(["composer__text",{"composer__text--focus":a.isFocused==="cc"}]),onClick:t[5]||(t[5]=W=>e.setFocusToRef("cc"))},[H("label",{for:n.id+"-cc"},ee(n.ccLabel),9,rot),t[24]||(t[24]=D()),Gn(H("input",{id:n.id+"-cc","onUpdate:modelValue":t[2]||(t[2]=W=>l.ccBinded=W),type:"text",name:"cc","aria-described-by":n.errors.cc?n.id+"-cc-error":"","aria-invalid":!!n.errors.cc,onFocus:t[3]||(t[3]=()=>a.isFocused="cc"),onBlur:t[4]||(t[4]=()=>a.isFocused="")},null,40,iot),[[lu,l.ccBinded]])],2)):we("",!0),t[31]||(t[31]=D()),n.errors.cc?(L(),Ee(k,{key:1,id:n.id+"-cc-error",messages:n.errors.cc},null,8,["id","messages"])):we("",!0),t[32]||(t[32]=D()),a.ccIsEnabled?(L(),Q("div",{key:2,class:Rn(["composer__text",{"composer__text--focus":a.isFocused==="bcc"}]),onClick:t[9]||(t[9]=W=>e.setFocusToRef("bcc"))},[H("label",{for:n.id+"-bcc"},ee(n.bccLabel),9,aot),t[25]||(t[25]=D()),Gn(H("input",{id:n.id+"-bcc","onUpdate:modelValue":t[6]||(t[6]=W=>l.bccBinded=W),type:"text",name:"bcc","aria-described-by":n.errors.bcc?n.id+"-bcc-error":"","aria-invalid":!!n.errors.bcc,onFocus:t[7]||(t[7]=()=>a.isFocused="bcc"),onBlur:t[8]||(t[8]=()=>a.isFocused="")},null,40,lot),[[lu,l.bccBinded]])],2)):we("",!0),t[33]||(t[33]=D()),n.errors.bcc?(L(),Ee(k,{key:3,id:n.id+"-bcc-error",messages:n.errors.bcc},null,8,["id","messages"])):we("",!0),t[34]||(t[34]=D()),H("div",{class:Rn(["composer__text",{"composer__text--focus":a.isFocused==="subject"}]),onClick:t[13]||(t[13]=W=>e.setFocusToRef("subject"))},[H("label",{for:n.id+"-subject"},ee(n.subjectLabel),9,cot),t[26]||(t[26]=D()),Gn(H("input",{id:n.id+"-subject","onUpdate:modelValue":t[10]||(t[10]=W=>l.subjectBinded=W),type:"text",name:"subject","aria-described-by":n.errors.subject?n.id+"-subject-error":"","aria-invalid":!!n.errors.subject,onFocus:t[11]||(t[11]=()=>a.isFocused="subject"),onBlur:t[12]||(t[12]=()=>a.isFocused="")},null,40,uot),[[lu,l.subjectBinded]])],2),t[35]||(t[35]=D()),n.errors.subject?(L(),Ee(k,{key:4,id:n.id+"-subject-error",messages:n.errors.subject},null,8,["id","messages"])):we("",!0),t[36]||(t[36]=D()),pe(O,{class:"composer__body",name:"body",label:n.bodyLabel,"group-id":"message","primary-locale":"en","all-errors":n.errors,init:l.bodyInit,"form-id":n.id,plugins:["link"],size:"large",toolbar:l.toolbar,value:n.body,"prepared-content":l.compiledVariables,"insert-label":n.insertLabel,"insert-modal-label":n.insertModalLabel,"prepared-content-label":n.insertContentLabel,"search-label":n.insertSearchLabel,onChange:t[14]||(t[14]=(W,Z,Y)=>l.emitChange({body:Y}))},{footer:te(()=>[n.attachments.length?(L(),Q("div",dot,[H("span",fot,ee(n.attachedFilesLabel),1),t[28]||(t[28]=D()),(L(!0),Q(bt,null,Sn(n.attachments,(W,Z)=>(L(),Ee(T,{key:Z,class:"composer__attachment"},{default:te(()=>[pe(d,{icon:l.getDocumentTypeIcon(W),inline:!0,class:"composer__attachment__documentType"},null,8,["icon"]),D(" "+ee(W.name)+" ",1),H("button",{class:"composer__attachment__remove text-negative hover:text-on-dark",onClick:Y=>l.removeAttachment(Z)},[pe(d,{icon:"Cancel",class:"h-3 w-3"}),t[27]||(t[27]=D()),H("span",mot,ee(n.removeItemLabel.replace("{$item}",W.name)),1)],8,pot)]),_:2},1024))),128))],512)):we("",!0)]),_:1},8,["label","all-errors","init","form-id","toolbar","value","prepared-content","insert-label","insert-modal-label","prepared-content-label","search-label"]),t[37]||(t[37]=D()),n.errors.attachments?(L(),Ee(k,{key:5,id:n.id+"-attachments-error",messages:n.errors.attachments},null,8,["id","messages"])):we("",!0),t[38]||(t[38]=D()),a.isLoadingTemplate?(L(),Q("div",hot,[pe(h),t[29]||(t[29]=D()),H("span",got,ee(e.t("common.loading")),1)])):we("",!0)])]),_:3})]),_:3})}const Mne=wt(zst,[["render",vot]]),bot={components:{PkpButton:ms,Icon:Vs},props:{uniqueId:{type:String,required:!0},dateStart:{type:String,default:""},dateStartMin:{type:String,default:""},dateEnd:{type:String,default:""},dateEndMax:{type:String,default:""},dateRangeLabel:{type:String,required:!0},dateFormatInstructionsLabel:{type:String,required:!0},changeDateRangeLabel:{type:String,required:!0},sinceDateLabel:{type:String,required:!0},untilDateLabel:{type:String,required:!0},allDatesLabel:{type:String,required:!0},customRangeLabel:{type:String,required:!0},fromDateLabel:{type:String,required:!0},toDateLabel:{type:String,required:!0},applyLabel:{type:String,required:!0},invalidDateLabel:{type:String,required:!0},dateDoesNotExistLabel:{type:String,required:!0},invalidDateRangeLabel:{type:String,required:!0},invalidStartDateMinLabel:{type:String,required:!0},invalidEndDateMaxLabel:{type:String,required:!0},options:Array},emits:["set-range","updated:current-range"],data(){return{isOpen:!1,localDateStart:"",localDateEnd:"",errorMessage:""}},computed:{currentRange(){return this.dateStart&&!this.dateEnd?this.replaceLocaleParams(this.sinceDateLabel,{date:this.dateStart}):!this.dateStart&&this.dateEnd?this.replaceLocaleParams(this.untilDateLabel,{date:this.dateEnd}):!this.dateStart&&!this.dateEnd?this.allDatesLabel:this.dateStart+" — "+this.dateEnd}},watch:{currentRange(e,t){e!==t&&this.$emit("updated:current-range",e)}},mounted(){this.localDateStart=this.dateStart,this.localDateEnd=this.dateEnd},methods:{toggle(){this.isOpen=!this.isOpen},focus(){this.isOpen=!0},set(e,t){this.$emit("set-range",e,t)},selectOption(e,t){this.set(e,t),this.$refs.toggleButton.focus(),this.isOpen=!1},applyCustomRange(){if(this.errorMessage="",this.localDateStart.length){if(!this.validateFormat(this.localDateStart)){this.errorMessage=this.invalidDateLabel;return}if(!this.validateDateExists(this.localDateStart)){this.errorMessage=this.dateDoesNotExistLabel;return}}if(this.localDateEnd.length){if(!this.validateFormat(this.localDateEnd)){this.errorMessage=this.invalidDateLabel;return}if(!this.validateDateExists(this.localDateEnd)){this.errorMessage=this.dateDoesNotExistLabel;return}}if(!this.validateRange(this.localDateStart,this.localDateEnd)){this.errorMessage=this.invalidDateRangeLabel;return}if(!this.validateDateStartMin(this.localDateStart)){this.errorMessage=this.replaceLocaleParams(this.invalidStartDateMinLabel,{date:this.dateStartMin});return}if(!this.validateDateEndMax(this.localDateEnd)){this.errorMessage=this.replaceLocaleParams(this.invalidEndDateMaxLabel,{date:this.dateEndMax});return}this.set(this.localDateStart,this.localDateEnd),this.$refs.toggleButton.focus(),this.isOpen=!1},closeOnBlur(){setTimeout(()=>{if(this.$el.contains(document.activeElement))var e=setInterval(()=>{this.$el.contains(document.activeElement)||(this.isOpen=!1,window.clearInterval(e))},1e3);else this.isOpen=!1},10)},validateFormat(e){return e.match(/^[\d]{4}-[\d]{2}-[\d]{2}$/)!==null},validateDateExists(e){const t=this.getBrowserSafeDate(e);return!isNaN(t.getTime())},validateRange(e,t){if(!e.length||!t.length)return!0;const n=parseInt(e.replace(/-/g,"")),i=parseInt(t.replace(/-/g,""));return!(n>i)},validateDateStartMin(e){return this.dateStartMin?parseInt(e.replace(/-/g,""))>=parseInt(this.dateStartMin.replace(/-/g,"")):!0},validateDateEndMax(e){return this.dateEndMax?parseInt(e.replace(/-/g,""))<=parseInt(this.dateEndMax.replace(/-/g,"")):!0}}},yot={class:"pkpDateRange"},_ot={class:"-screenReader"},Sot={class:"pkpDateRange__current"},Cot={class:"flex h-8 w-8 items-center justify-center border-e border-e-light border-opacity-40 text-primary"},wot={class:"-screenReader"},Eot={key:0,class:"pkpDateRange__options"},kot={class:"pkpDateRange__optionGroup"},xot=["onClick"],Tot={class:"pkpDateRange__inputGroup"},Iot=["id"],Aot={class:"-screenReader"},Oot=["aria-describedby","aria-invalid"],Rot={class:"-screenReader"},Dot=["aria-describedby","aria-invalid"],Lot={key:0,class:"pt-2 text-base-normal"},Pot={class:"align-middle"};function Mot(e,t,n,i,a,l){const f=Xe("Icon"),d=Xe("PkpButton"),h=Hr("strip-unsafe-html");return L(),Q("div",yot,[H("span",_ot,ee(n.dateRangeLabel),1),t[19]||(t[19]=D()),Gn(H("span",Sot,null,512),[[h,l.currentRange]]),t[20]||(t[20]=D()),H("button",{ref:"toggleButton",class:"pkpDateRange__button",onClick:t[0]||(t[0]=(...b)=>l.toggle&&l.toggle(...b)),onBlur:t[1]||(t[1]=(...b)=>l.closeOnBlur&&l.closeOnBlur(...b))},[H("div",Cot,[pe(f,{icon:"Calendar",class:"h-5 w-5",inline:!0})]),t[7]||(t[7]=D()),H("span",wot,ee(n.changeDateRangeLabel),1)],544),t[21]||(t[21]=D()),n.options&&a.isOpen?(L(),Q("div",Eot,[H("div",kot,[(L(!0),Q(bt,null,Sn(n.options,b=>(L(),Q("div",{key:b.value},[H("button",{ref_for:!0,ref:b.value,class:"pkpDateRange__option",onClick:S=>l.selectOption(b.dateStart,b.dateEnd)},ee(b.label),9,xot)]))),128))]),t[18]||(t[18]=D()),H("form",{class:"pkpDateRange__optionGroup pkpDateRange__form",onSubmit:t[6]||(t[6]=(...b)=>l.applyCustomRange&&l.applyCustomRange(...b))},[H("fieldset",Tot,[H("legend",null,ee(n.customRangeLabel),1),t[10]||(t[10]=D()),H("div",{id:n.uniqueId+"-describedBy",class:"-screenReader"},ee(n.dateFormatInstructionsLabel),9,Iot),t[11]||(t[11]=D()),H("label",null,[H("span",Aot,ee(n.fromDateLabel),1),t[8]||(t[8]=D()),Gn(H("input",{ref:"dateStart","onUpdate:modelValue":t[2]||(t[2]=b=>a.localDateStart=b),class:"pkpDateRange__input pkpDateRange__input--start",placeholder:"YYYY-MM-DD","aria-describedby":n.uniqueId+"-describedBy","aria-invalid":!!a.errorMessage,onFocus:t[3]||(t[3]=(...b)=>l.focus&&l.focus(...b))},null,40,Oot),[[lu,a.localDateStart]])]),t[12]||(t[12]=D()),t[13]||(t[13]=H("span",{class:"pkpDateRange__separator"},"—",-1)),t[14]||(t[14]=D()),H("label",null,[H("span",Rot,ee(n.toDateLabel),1),t[9]||(t[9]=D()),Gn(H("input",{ref:"dateEnd","onUpdate:modelValue":t[4]||(t[4]=b=>a.localDateEnd=b),class:"pkpDateRange__input pkpDateRange__input--end",placeholder:"YYYY-MM-DD","aria-describedby":n.uniqueId+"-describedBy","aria-invalid":!!a.errorMessage,onFocus:t[5]||(t[5]=(...b)=>l.focus&&l.focus(...b))},null,40,Dot),[[lu,a.localDateEnd]])])]),t[16]||(t[16]=D()),pe(d,{onClick:l.applyCustomRange},{default:te(()=>[D(ee(n.applyLabel),1)]),_:1},8,["onClick"]),t[17]||(t[17]=D()),a.errorMessage?(L(),Q("div",Lot,[pe(f,{icon:"Error",class:"me-1 h-5 w-5",inline:!0}),t[15]||(t[15]=D()),Gn(H("span",Pot,null,512),[[h,a.errorMessage]])])):we("",!0)],32)])):we("",!0)])}const fSe=wt(bot,[["render",Mot]]),pSe={__name:"GridWrapper",props:{gridComponent:{type:String,required:!0},params:{type:Object,required:!0}},setup(e){const t=e,{url:n}=Ar({component:t.gridComponent,op:"fetchGrid",params:t.params}),{data:i,fetch:a}=fr(n),l=kt(null);return Pr(async()=>{await a(),i.value&&$(l.value).html(i.value.content)}),(f,d)=>(L(),Q("div",{ref_key:"contentDiv",ref:l},null,512))}},Not={components:{Icon:Vs},props:{isFilterActive:{type:Boolean,default(){return!1}},param:{type:String,required:!0},title:{type:String,required:!0},value:{type:[String,Number,Boolean,Array,Object],required:!0}},emits:["add-filter","remove-filter"],computed:{classes(){let e=["pkpFilter"];return this.isFilterActive||e.push("pkpFilter--disabled"),e}},methods:{toggle(){this.isFilterActive?this.remove():this.$emit("add-filter",this.param,this.value)},remove(){this.$emit("remove-filter",this.param,this.value)}}},Fot={class:"-screenReader"};function $ot(e,t,n,i,a,l){const f=Xe("Icon");return L(),Q("div",{class:Rn(l.classes)},[H("button",{class:Rn(["pkpFilter__label",{"-isActive":n.isFilterActive}]),onClick:t[0]||(t[0]=wl(d=>l.toggle(n.param,n.value),["prevent","stop"]))},ee(n.title),3),t[3]||(t[3]=D()),n.isFilterActive?(L(),Q("button",{key:0,class:"pkpFilter__remove",onClick:t[1]||(t[1]=wl(d=>l.remove(n.param,n.value),["prevent","stop"]))},[pe(f,{icon:"Cancel",class:"h-4 w-4 text-negative"}),t[2]||(t[2]=D()),H("span",Fot,ee(e.t("common.filterRemove",{filterTitle:n.title})),1)])):we("",!0)],2)}const _C=wt(Not,[["render",$ot]]),Bot={components:{FieldAutosuggestPreset:bH,FieldSelectUsers:Pte,FieldSelectIssues:Lte},extends:_C,props:{component:{type:String,required:!0},autosuggestProps:{type:Object,required:!0}},emits:["add-filter","remove-filter"],data(){return{currentValue:this.value,currentSelected:this.autosuggestProps.selected}},computed:{autosuggest(){return{...this.autosuggestProps,value:this.currentValue,selected:this.currentSelected}}},watch:{currentValue(e,t){e.length?this.$emit("add-filter",this.param,e):this.$emit("remove-filter",this.param)}},methods:{changeSelection(e,t,n,i){t==="value"?this.currentValue=n:t==="selected"&&(this.currentSelected=n)}}};function Vot(e,t,n,i,a,l){return L(),Q("div",{class:Rn(["pkpFilter--autosuggest",e.classes])},[(L(),Ee(Io(n.component),Cn(l.autosuggest,{onChange:l.changeSelection}),null,16,["onChange"]))],2)}const Nne=wt(Bot,[["render",Vot]]),Hot={components:{Icon:Vs},extends:_C,props:{max:{type:Number,required:!0},min:{type:Number,required:!0},useStars:{type:Boolean,default(){return!1}},valueLabel:{type:String,default(){return"{$value}"}}},emits:["add-filter","remove-filter","update-filter"],data(){return{currentValue:this.value}},computed:{currentValueLabel(){return this.valueLabel.replace("{$value}",this.currentValue)},valueStyles(){if(this.isFilterActive){const e=Number((this.currentValue-this.min)*100/(this.max-this.min)),t=8+e/100*-17;return{left:"calc(".concat(e,"% + ").concat(t,"px)")}}return{}}},methods:{enable(){this.$emit("add-filter",this.param,this.currentValue)},updateCurrentValue:Uh(function(e){this.$emit("update-filter",this.param,e)},250),remove(){this.$emit("remove-filter",this.param)}},watch:{currentValue:function(e,t){this.updateCurrentValue(e)}}},Uot={class:"-screenReader"},zot={class:"-screenReader"},Wot={class:"pkpFilter__input pkpFilter__input--slider"},jot={class:"-screenReader",for:"slider"},Zot=["max","min","disabled"],qot={key:0,"aria-hidden":"true",class:"pkpFilter__value--stars"};function Got(e,t,n,i,a,l){const f=Xe("Icon");return L(),Q("div",{class:Rn(["pkpFilter pkpFilter--slider",e.classes])},[e.isFilterActive?(L(),Q("button",{key:0,class:"pkpFilter__remove",onClick:t[0]||(t[0]=(...d)=>l.remove&&l.remove(...d))},[pe(f,{icon:"Cancel",class:"h-4 w-4 text-negative"}),t[4]||(t[4]=D()),H("span",Uot,ee(e.t("common.filterRemove",{filterTitle:e.title})),1)])):(L(),Q("button",{key:1,class:"pkpFilter__add",onClick:t[1]||(t[1]=(...d)=>l.enable&&l.enable(...d))},[pe(f,{icon:"Add",class:"h-4 w-4"}),t[5]||(t[5]=D()),H("span",zot,ee(e.t("common.filterAdd",{filterTitle:e.title})),1)])),t[10]||(t[10]=D()),H("div",{class:"pkpFilter__inputTitle","aria-hidden":"true",onClick:t[2]||(t[2]=(...d)=>e.toggle&&e.toggle(...d))},ee(e.title),1),t[11]||(t[11]=D()),H("div",Wot,[H("label",jot,ee(e.title),1),t[8]||(t[8]=D()),Gn(H("input",{id:"slider","onUpdate:modelValue":t[3]||(t[3]=d=>a.currentValue=d),type:"range",max:n.max,min:n.min,disabled:!e.isFilterActive},null,8,Zot),[[lu,a.currentValue,void 0,{number:!0}]]),t[9]||(t[9]=D()),e.isFilterActive?(L(),Q("output",{key:0,ref:"output",for:"slider",class:"pkpFilter__value",style:Ih(l.valueStyles)},[t[6]||(t[6]=H("span",{class:"pkpFilter__valueCaret","aria-hidden":"true"},null,-1)),t[7]||(t[7]=D()),n.useStars?(L(),Q("span",qot,[(L(),Q(bt,null,Sn(5,d=>pe(f,{key:d,icon:d<=a.currentValue?"StarTicked":"Star",class:"h-4 w-4"},null,8,["icon"])),64))])):(L(),Q(bt,{key:1},[D(ee(l.currentValueLabel),1)],64))],4)):we("",!0)])],2)}const sU=wt(Hot,[["render",Got]]),Kot={components:{Icon:Vs},extends:sU,props:{lessThanLabel:{type:String,required:!0},moreThanLabel:{type:String,required:!0},valueLabel:{type:String,required:!0}},computed:{lessThanMin(){return Math.max(this.min,this.currentValue[0])},moreThanMax(){return Math.min(this.max,this.currentValue[1])},currentValueLabel(){return this.valueLabel.replace("{$min}",this.currentValue[0]).replace("{$max}",this.currentValue[1])}}},Yot={class:"-screenReader"},Xot={class:"-screenReader"},Jot=["tabindex"],Qot={class:"pkpFilter__input pkpFilter__input--slider pkpFilter__input--sliderMultirange"},ert={class:"-screenReader"},trt={class:"pkpFilter__multirangeInput"},nrt={class:"-screenReader",for:"sliderMore"},srt=["max","min","disabled"],ort={class:"pkpFilter__multirangeInput"},rrt={class:"-screenReader",for:"sliderLess"},irt=["max","min","disabled"],art={class:"pkpFilter__value pkpFilter__value--multirange","aria-hidden":"true"};function lrt(e,t,n,i,a,l){const f=Xe("Icon");return L(),Q("div",{class:Rn(["pkpFilter--slider pkpFilter--sliderMultirange",e.classes])},[e.isFilterActive?(L(),Q("button",{key:0,class:"pkpFilter__remove",onClick:t[0]||(t[0]=(...d)=>e.remove&&e.remove(...d))},[pe(f,{icon:"Cancel",class:"h-4 w-4 text-negative"}),t[5]||(t[5]=D()),H("span",Yot,ee(e.t("common.filterRemove",{filterTitle:e.title})),1)])):(L(),Q("button",{key:1,class:"pkpFilter__add",onClick:t[1]||(t[1]=(...d)=>e.enable&&e.enable(...d))},[pe(f,{icon:"Add",class:"h-4 w-4"}),t[6]||(t[6]=D()),H("span",Xot,ee(e.t("common.filterAdd",{filterTitle:e.title})),1)])),t[12]||(t[12]=D()),H("div",{class:"pkpFilter__inputTitle",tabindex:e.isFilterActive?!1:-1,"aria-hidden":"true",onClick:t[2]||(t[2]=(...d)=>e.toggle&&e.toggle(...d))},ee(e.title),9,Jot),t[13]||(t[13]=D()),H("fieldset",Qot,[H("legend",ert,ee(e.title),1),t[9]||(t[9]=D()),H("div",trt,[H("label",nrt,ee(n.moreThanLabel),1),t[7]||(t[7]=D()),Gn(H("input",{id:"sliderMore","onUpdate:modelValue":t[3]||(t[3]=d=>e.currentValue[0]=d),type:"range",max:l.moreThanMax,min:e.min,disabled:!e.isFilterActive},null,8,srt),[[lu,e.currentValue[0],void 0,{number:!0}]])]),t[10]||(t[10]=D()),H("div",ort,[H("label",rrt,ee(n.lessThanLabel),1),t[8]||(t[8]=D()),Gn(H("input",{id:"sliderLess","onUpdate:modelValue":t[4]||(t[4]=d=>e.currentValue[1]=d),type:"range",max:e.max,min:l.lessThanMin,disabled:!e.isFilterActive},null,8,irt),[[lu,e.currentValue[1],void 0,{number:!0}]])])]),t[14]||(t[14]=D()),H("div",art,[t[11]||(t[11]=H("span",{class:"pkpFilter__valueCaret","aria-hidden":"true"},null,-1)),D(" "+ee(l.currentValueLabel),1)])],2)}const mSe=wt(Kot,[["render",lrt]]),crt={name:"List"},urt={class:"list"};function drt(e,t,n,i,a,l){return L(),Q("ul",urt,[is(e.$slots,"default")])}const oU=wt(crt,[["render",drt]]),frt={name:"ListItem",computed:{classes(){let e=[];return this.hasValueSlot&&e.push("listItem--hasLabel"),e},hasValueSlot(){return this.$slots.value}}},prt={key:0,class:"listItem__value"},mrt={class:"listItem__label"};function hrt(e,t,n,i,a,l){return L(),Q("li",{class:Rn(["listItem",l.classes])},[l.hasValueSlot?(L(),Q("span",prt,[is(e.$slots,"value")])):we("",!0),t[0]||(t[0]=D()),H("span",mrt,[is(e.$slots,"default")])],2)}const rU=wt(frt,[["render",hrt]]),grt={components:{HLDialog:ete,DialogPanel:tte,DialogTitle:nte,TransitionRoot:QV,TransitionChild:Zw,Icon:Vs},props:{open:{type:Boolean,required:!0},closeLabel:{type:String,required:!0},title:{type:String,default(){return""}},type:{type:String,default(){return"popup"},validator(e){return["popup","side"].includes(e)}}},emits:["close"],data(){return{isOpen:!0,MODAL_PROPS:{height:"auto",scrollable:!0}}},methods:{}},vrt={class:"fixed inset-0 z-20 overflow-y-auto"},brt={class:"flex min-h-full items-end justify-center p-4 text-center sm:items-start sm:p-0"},yrt={class:"modal__header"},_rt={class:"modal__header__slot"},Srt={class:"-screenReader"},Crt={class:"modal__content"},wrt={key:0,class:"modal__footer"};function Ert(e,t,n,i,a,l){const f=Xe("TransitionChild"),d=Xe("DialogTitle"),h=Xe("Icon"),b=Xe("DialogPanel"),S=Xe("HLDialog"),k=Xe("TransitionRoot");return L(),Ee(k,{as:"template",show:n.open},{default:te(()=>[pe(S,{open:n.open,class:Rn(["modal","modal--"+n.type]),onClose:t[1]||(t[1]=T=>e.$emit("close"))},{default:te(()=>[pe(f,{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"ease-in duration-200","leave-from":"opacity-100","leave-to":"opacity-0"},{default:te(()=>t[2]||(t[2]=[H("div",{class:"bg-gray-500 fixed inset-0 z-10 bg-opacity-75 transition-opacity"},null,-1)])),_:1}),t[9]||(t[9]=D()),H("div",vrt,[H("div",brt,[pe(f,{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95","enter-to":"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200","leave-from":"opacity-100 translate-y-0 sm:scale-100","leave-to":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"},{default:te(()=>[pe(b,{class:"modal__panel relative mx-3 w-10/12 max-w-3xl transform overflow-hidden rounded bg-secondary text-left shadow transition-all sm:my-8"},{default:te(()=>[H("div",yrt,[H("div",_rt,[is(e.$slots,"header",{},()=>[n.title?(L(),Ee(d,{key:0,class:"modal__title"},{default:te(()=>[D(ee(n.title),1)]),_:1})):we("",!0)])]),t[6]||(t[6]=D()),H("button",{class:"modal__closeButton",onClick:t[0]||(t[0]=T=>e.$emit("close"))},[pe(h,{icon:"Cancel",class:Rn(["h-5 w-5 text-negative","modal__closeButton__x"]),"aria-hidden":!0}),t[3]||(t[3]=D()),pe(h,{icon:"ChevronLeft","aria-hidden":!0,class:"modal__closeButton__left h-5 w-5"}),t[4]||(t[4]=D()),pe(h,{icon:"ChevronRight","aria-hidden":!0,class:"modal__closeButton__right h-5 w-5"}),t[5]||(t[5]=D()),H("span",Srt,ee(n.closeLabel),1)])]),t[7]||(t[7]=D()),H("div",Crt,[is(e.$slots,"default")]),t[8]||(t[8]=D()),e.$slots.footer?(L(),Q("div",wrt,[is(e.$slots,"footer")])):we("",!0)]),_:3})]),_:3})])])]),_:3},8,["open","class"])]),_:3},8,["show"])}const h9=wt(grt,[["render",Ert]]),krt={components:{PkpButton:ms,Spinner:zl},props:{currentPage:{type:Number,required:!0},isLoading:{type:Boolean,default:!1},lastPage:{type:Number,required:!0},showAdjacentPages:{type:Number,default:1}},emits:["set-page"],computed:{items(){let e=[],t=Math.min(this.currentPage+this.showAdjacentPages,this.lastPage),n=Math.max(this.currentPage-this.showAdjacentPages,1);if(t-n<this.showAdjacentPages){const i=this.showAdjacentPages-(t-n);n===1?t=Math.min(t+i,this.lastPage):t===this.lastPage&&(n=Math.max(n-i,1))}n>1&&e.push({value:1,label:1,ariaLabel:this.getNumberAriaLabel(1)}),n>2&&e.push({isSeparator:!0});for(let i=n;i<=t;i++)e.push({value:i,isCurrent:this.currentPage===i,label:i,ariaLabel:this.getNumberAriaLabel(i)});return t<this.lastPage-1&&e.push({isSeparator:!0}),t<this.lastPage&&e.push({value:this.lastPage,label:this.lastPage,ariaLabel:this.getNumberAriaLabel(this.lastPage)}),e}},methods:{getNumberAriaLabel:function(e){const t=this.t("common.pageNumber",{pageNumber:e});return this.t("common.pagination.goToPage",{page:t})},setPage:function(e){e==="previous"?e=this.currentPage-1:e==="next"&&(e=this.currentPage+1),e>=1&&e<=this.lastPage&&this.$emit("set-page",e)}}},xrt=["aria-label"],Trt={key:0,class:"pkpPagination__separator","aria-hidden":!0};function Irt(e,t,n,i,a,l){const f=Xe("PkpButton"),d=Xe("Spinner");return L(),Q("nav",{class:"pkpPagination",role:"navigation","aria-label":e.t("common.pagination.label")},[H("ul",null,[H("li",null,[pe(f,{disabled:n.currentPage===1,"aria-label":e.t("common.pagination.goToPage",{page:e.t("common.pagination.previous")}),"is-link":!0,onClick:t[0]||(t[0]=h=>l.setPage("previous"))},{default:te(()=>[D(ee(e.t("common.pagination.previous")),1)]),_:1},8,["disabled","aria-label"])]),t[2]||(t[2]=D()),(L(!0),Q(bt,null,Sn(l.items,(h,b)=>(L(),Q("li",{key:b},[h.isSeparator?(L(),Q("span",Trt,"\n ···\n ")):n.isLoading&&h.isCurrent?(L(),Ee(d,{key:1,class:"pkpPagination__loading"})):(L(),Ee(f,{key:2,disabled:h.isDisabled,"aria-label":h.ariaLabel,"aria-current":h.isCurrent,class:"pkpPagination__page","is-link":!0,onClick:S=>l.setPage(h.value)},{default:te(()=>[D(ee(h.label),1)]),_:2},1032,["disabled","aria-label","aria-current","onClick"]))]))),128)),t[3]||(t[3]=D()),H("li",null,[pe(f,{disabled:n.currentPage===n.lastPage,"is-link":!0,onClick:t[1]||(t[1]=h=>l.setPage("next"))},{default:te(()=>[D(ee(e.t("common.pagination.next")),1)]),_:1},8,["disabled"])])])],8,xrt)}const d0=wt(krt,[["render",Irt]]),Art={class:"px-8"},Ort={role:"list",class:"list-disc"},Rrt={class:"text-xl-bold"},Drt={class:"text-xl-bold"},Lrt={class:"text-xl-bold"},Prt={class:"text-xl-bold"},Mrt={__name:"UserInvitationManagerCancelInvitationDialogBody",props:{message:{type:String,required:!0},email:{type:String,required:!0},roles:{type:String,required:!0},status:{type:String,required:!0},affiliation:{type:String,required:!0}},setup(e){const{t}=Jn();return(n,i)=>(L(),Q(bt,null,[H("p",null,ee(e.message),1),i[3]||(i[3]=D()),H("div",Art,[H("ul",Ort,[H("li",null,[H("span",Rrt,ee(se(t)("user.email"))+":",1),D(" "+ee(e.email),1)]),i[0]||(i[0]=D()),H("li",null,[H("span",Drt,ee(se(t)("userInvitation.roleTable.role"))+":\n ",1),D(" "+ee(e.roles),1)]),i[1]||(i[1]=D()),H("li",null,[H("span",Lrt,ee(se(t)("common.status"))+":",1),D(" "+ee(e.status),1)]),i[2]||(i[2]=D()),H("li",null,[H("span",Prt,ee(se(t)("user.affiliation"))+":",1),D(" "+ee(e.affiliation),1)])])])],64))}},Nrt=Nf("userInvitationsPage",()=>{const{openDialog:e}=Ms(),{localize:t,t:n}=Jn(),{formatShortDate:i}=Ed(),{announce:a}=iO(),{redirectToPage:l}=to("invitation/create/userRoleAssignment");function f(){l()}const d=kt(0),h=kt(5),b=kt(1);function S(q){b.value=q}const{apiUrl:k}=to("invitations/userRoleAssignment"),{items:T,pagination:O,isLoading:P,fetch:B}=BV(k,{currentPage:b,pageSize:h});io([b],async()=>{a(n("common.loading")),await B(),a(n("common.loaded"))},{immediate:!0});function W(q){let ne="";return q.forEach(ue=>{ne=ne+ue.userGroupName+n("common.commaListSeparator")}),ne.substring(0,ne.length-1)}function Z(q,ne){q==="editInvite"?Y(ne):z(ne)}function Y(q){const{redirectToPage:ne}=to("invitation/edit/".concat(q.id));e({title:n("userInvitation.edit.title"),message:n("userInvitation.edit.message"),actions:[{label:n("userInvitation.edit.title"),isPrimary:!0,callback:async ue=>{ne()}},{label:n("common.cancel"),isWarnable:!0,callback:ue=>{ue()}}],modalStyle:"primary"})}function z(q){e({title:n("invitation.cancelInvite.title"),bodyComponent:Mrt,bodyProps:{message:n("invitation.cancelInvite.message",{givenName:q.existingUser?q.existingUser.givenName:q.givenName,familyName:q.existingUser?q.existingUser.familyName:q.familyName}),email:q.existingUser?q.existingUser.email:q.email,roles:W(q.userGroupsToAdd),status:n("userInvitation.status.invited",{date:i(q.createdAt)}),affiliation:q.existingUser?t(q.existingUser.affiliation):t(q.affiliation)},actions:[{label:n("invitation.cancelInvite.title"),isWarnable:!0,callback:async ne=>{const{apiUrl:ue}=to("invitations/".concat(q.id,"/cancel")),{fetch:J}=fr(ue.value,{method:"PUT",body:{}});a(n("common.loading")),await J(),await B(),a(n("common.loaded")),ne()}},{label:n("common.cancel"),callback:ne=>{ne()}}],modalStyle:"negative"})}return{invitationCount:d,setCurrentPage:S,createNewInvitation:f,currentPage:b,invitationsPagination:O,invitations:T,isInvitationLoading:P,handleInvitationAction:Z}}),Frt={class:"text-3xl-bold"},$rt={class:"flex gap-x-2"},Brt={class:"sr-only"},Vrt={class:"gap-x-1"},Hrt={class:"align-middle text-lg-normal"},Urt={class:"text-lg-normal"},zrt={class:"text-lg-normal"},Wrt={class:"text-lg-normal"},jrt={class:"text-lg-normal"},Zrt={key:0,class:"flex justify-end"},qrt={__name:"UserInvitationManager",setup(e){const t=Nrt(),{t:n,localize:i}=Jn(),{formatShortDate:a}=Ed();return(l,f)=>(L(),Q(bt,null,[pe(du,null,{label:te(()=>[H("h3",Frt,ee(se(n)("invitation.header"))+" ("+ee(se(t).invitationsPagination.itemCount)+")\n ",1)]),"top-controls":te(()=>[H("div",$rt,[pe(ms,{onClick:se(t).createNewInvitation},{default:te(()=>[D(ee(se(n)("invitation.inviteToRole.btn")),1)]),_:1},8,["onClick"])])]),default:te(()=>[f[11]||(f[11]=D()),f[12]||(f[12]=D()),pe(Ad,null,{default:te(()=>[pe(Ei,null,{default:te(()=>[D(ee(se(n)("invitation.tableHeader.name")),1)]),_:1}),f[0]||(f[0]=D()),pe(Ei,null,{default:te(()=>[D(ee(se(n)("about.contact.email")),1)]),_:1}),f[1]||(f[1]=D()),pe(Ei,null,{default:te(()=>[D(ee(se(n)("invitation.header")),1)]),_:1}),f[2]||(f[2]=D()),pe(Ei,null,{default:te(()=>[D(ee(se(n)("common.status")),1)]),_:1}),f[3]||(f[3]=D()),pe(Ei,null,{default:te(()=>[D(ee(se(n)("user.affiliation")),1)]),_:1}),f[4]||(f[4]=D()),pe(Ei,null,{default:te(()=>[H("span",Brt,ee(se(n)("common.moreActions")),1)]),_:1})]),_:1}),f[13]||(f[13]=D()),pe(Kd,null,{default:te(()=>[(L(!0),Q(bt,null,Sn(se(t).invitations,(d,h)=>(L(),Ee(Bi,{key:h},{default:te(()=>[pe(as,null,{default:te(()=>{var b,S;return[H("span",Vrt,[H("span",Hrt,ee(d.userId?d.existingUser.fullName:d.newUser.fullName),1),f[5]||(f[5]=D()),(b=d.existingUser)!=null&&b.orcid||(S=d.newUser)!=null&&S.orcid?(L(),Ee(Vs,{key:0,icon:"Orcid",class:"h-4 w-4",inline:!0})):we("",!0)])]}),_:2},1024),f[6]||(f[6]=D()),pe(as,null,{default:te(()=>[H("span",Urt,ee(d.userId?d.existingUser.email:d.email),1)]),_:2},1024),f[7]||(f[7]=D()),pe(as,null,{default:te(()=>[H("span",zrt,[(L(!0),Q(bt,null,Sn(d.userGroupsToAdd,(b,S)=>(L(),Q("div",{key:S,class:"flex flex-col"},ee(b.userGroupName),1))),128))])]),_:2},1024),f[8]||(f[8]=D()),pe(as,null,{default:te(()=>[H("span",Wrt,ee(se(n)("userInvitation.status.invited",{date:se(a)(d.createdAt)})),1)]),_:2},1024),f[9]||(f[9]=D()),pe(as,null,{default:te(()=>[H("span",jrt,ee(d.userId?se(i)(d.existingUser.affiliation):se(i)(d.affiliation)),1)]),_:2},1024),f[10]||(f[10]=D()),pe(as,null,{default:te(()=>[pe(z1,{actions:[{label:se(n)("common.edit"),name:"editInvite",icon:"Edit"},{label:se(n)("invitation.cancelInvite.actionName"),icon:"Cancel",name:"cancelInvite",isWarnable:!0}],label:se(n)("invitation.management.options"),"button-variant":"ellipsis",direction:"left",onAction:b=>se(t).handleInvitationAction(b,d)},null,8,["actions","label","onAction"])]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1}),f[14]||(f[14]=D()),se(t).invitationsPagination.itemCount>0?(L(),Q("div",Zrt,[pe(d0,{"current-page":se(t).invitationsPagination.currentPage,"last-page":se(t).invitationsPagination.pageCount,"is-loading":se(t).isInvitationLoading,"show-adjacent-pages":3,onSetPage:se(t).setCurrentPage},null,8,["current-page","last-page","is-loading","onSetPage"])])):we("",!0)],64))}},g9={USER_ACCESS_EDIT:"editUser",USER_ACCESS_SEND_MAIL:"sendEmail",USER_ACCESS_LOGIN_AS:"loginAs",USER_ACCESS_REMOVE_USER:"removeUser",USER_ACCESS_DISABLE_USER:"disableUser",USER_ACCESS_MERGE_USER:"mergeUser"};function Grt(){const{t:e}=Jn();function t({user:h},b){const{openLegacyModal:S}=Ar({component:"grid.settings.user.UserGridHandler",op:"edit-email",params:{rowId:h.id}});S({title:e("grid.user.email")},b)}function n({user:h},b){const{openLegacyModal:S}=Ar({component:"grid.settings.user.UserGridHandler",op:"edit-disable-user",params:{rowId:h.id,enable:h.disabled?"1":""}}),k=h.groups.map(T=>T.name).join(", ");S({title:h.disabled?e("user.enabledModal.title",{fullName:h.fullName}):e("user.disabledModal.title",{fullName:h.fullName}),description:e("user.disabledModal.description",{roles:k})},T=>{b()})}const{openDialog:i,openDialogNetworkError:a}=Ms();function l({user:h},b){const{url:S}=Ar({component:"grid.settings.user.UserGridHandler",op:"remove-user",params:{rowId:h.id}});i({title:e("common.remove"),message:e("manager.people.confirmRemove"),actions:[{label:e("common.ok"),isPrimary:!0,callback:async k=>{const T=new FormData;T.append("csrfToken",Pv());const{fetch:O,data:P}=fr(S,{method:"POST",body:T});await O(),k(),b(),P.value.status!==!0&&a()}},{label:e("common.cancel"),isWarnable:!0,callback:k=>{k()}}]},b)}function f({user:h}){const{redirectToPage:b}=to("login/signInAsUser/".concat(h.id));i({title:e("grid.action.logInAs"),message:e("grid.user.confirmLogInAs"),actions:[{label:e("common.ok"),isPrimary:!0,callback:async S=>{b(),S()}},{label:e("common.cancel"),isWarnable:!0,callback:S=>{S()}}]})}function d({user:h},b){const{openLegacyModal:S}=Ar({component:"grid.settings.user.UserGridHandler",op:"merge-users",params:{oldUserId:h.id}});S({title:e("grid.action.mergeUser")},b)}return{disableUser:n,sendEmail:t,loginAs:f,removeUser:l,mergeUser:d}}function Krt(){const{t:e}=Jn(),{getCurrentUserId:t}=Nh();function n({user:l}){const f=[];return f.push({label:e("common.edit"),name:g9.USER_ACCESS_EDIT,icon:"Edit"}),f.push({label:e("email.email"),icon:"Email",name:g9.USER_ACCESS_SEND_MAIL}),t()!==l.id&&(l.canLoginAs&&f.push({label:e("grid.user.logInAs"),icon:"LoginAs",name:g9.USER_ACCESS_LOGIN_AS}),l.groups.find(d=>d.dateEnd===null)&&f.push({label:e("grid.user.remove"),icon:"Cancel",name:g9.USER_ACCESS_REMOVE_USER,isWarnable:!0}),f.push({label:l.disabled?e("grid.user.enable"):e("grid.user.disable"),icon:l.disabled?"User":"DisableUser",name:g9.USER_ACCESS_DISABLE_USER,isWarnable:!l.disabled}),l.canMergeUsers&&f.push({label:e("grid.action.mergeUser"),icon:"MergeUser",name:g9.USER_ACCESS_MERGE_USER})),f}function i(){const l=[];return l.push({header:e("userAccess.tableHeader.name"),component:"UserAccessManagerCellName",props:{}}),l.push({header:e("about.contact.email"),component:"UserAccessManagerCellEmail",props:{}}),l.push({header:e("user.roles"),component:"UserAccessManagerCellUserGroups",props:{}}),l.push({header:e("userAccess.tableHeader.startDate"),component:"UserAccessManagerCellStartDate",props:{}}),l.push({header:e("user.affiliation"),component:"UserAccessManagerCellAffiliation",props:{}}),l.push({header:e("common.moreActions"),component:"UserAccessManagerCellActions",props:{},headerSrOnly:!0}),l}function a(){const l=[];return l.push({component:"UserAccessManagerActionSearch",props:{}}),l}return{getColumns:i,getItemActions:n,getTopItems:a}}const Fne=Nf("userAccessManager",()=>{const e=C5(),{t}=Jn(),{announce:n}=iO(),i=kt(0),a=kt(25),l=kt(1);async function f(de){l.value=de}const d=kt("");async function h(de){d.value=de}const{apiUrl:b}=to("users"),{items:S,pagination:k,isLoading:T,fetch:O}=BV(b,{currentPage:l,pageSize:a,query:{searchPhrase:d,status:"all",includePermissions:!0}});io([l,d],async()=>{n(t("common.loading")),await O(),n(t("common.loaded"))},{immediate:!0});async function P(){await O()}const B=e.addFns(Krt()),W=Ge(()=>B.getColumns()),Z=Ge(()=>B.getTopItems());function Y({user:de}){return B.getItemActions({user:de})}function z({user:de}){const{redirectToPage:he}=to("management/settings/user/".concat(de.id));he()}const q=Grt();function ne({user:de}){q.sendEmail({user:de},P)}function ue({user:de}){q.disableUser({user:de},P)}function J({user:de}){q.removeUser({user:de},P)}function ce({user:de}){q.mergeUser({user:de},P)}function ge({user:de}){q.loginAs({user:de})}return{userAccessCount:i,userList:S,columns:W,topItems:Z,setCurrentPage:f,currentPage:l,userAccessPagination:k,isUserAccessLoading:T,setSearchPhrase:h,sendEmail:ne,disableUser:ue,removeUser:J,mergeUser:ce,loginAs:ge,getItemActions:Y,editUser:z,searchPhrase:d,extender:e}}),Yrt={class:"flex items-center justify-between border-x border-b border-light px-2 py-2"},Xrt={class:""},hSe={__name:"TablePagination",props:{pagination:{type:Object,required:!0}},emits:"set-page",setup(e,{emit:t}){const n=e,i=t,{t:a}=Jn(),l=Ge(()=>a("common.showingXofX",{start:n.pagination.firstItemIndex,finish:n.pagination.lastItemIndex,total:n.pagination.itemCount}));return(f,d)=>{const h=Hr("strip-unsafe-html");return L(),Q("div",Yrt,[Gn(H("span",Xrt,null,512),[[h,l.value]]),d[1]||(d[1]=D()),e.pagination.pageCount>1?(L(),Ee(d0,{key:0,"current-page":e.pagination.currentPage,"last-page":e.pagination.pageCount,"show-adjacent-pages":3,onSetPage:d[0]||(d[0]=(...b)=>i("setPage",...b))},null,8,["current-page","last-page"])):we("",!0)])}}},Jrt={__name:"UserAccessManagerCellStartDate",props:{user:{type:Object,required:!0}},setup(e){const{formatShortDate:t}=Ed();return(n,i)=>(L(),Ee(as,null,{default:te(()=>[(L(!0),Q(bt,null,Sn(e.user.groups,(a,l)=>(L(),Q("div",{key:l,class:"flex flex-col"},ee(a.dateEnd?"":(a==null?void 0:a.dateStart)&&se(t)(a==null?void 0:a.dateStart)),1))),128))]),_:1}))}},Qrt={__name:"UserAccessManagerCellUserGroups",props:{user:{type:Object,required:!0}},setup(e){return(t,n)=>(L(),Ee(as,null,{default:te(()=>[(L(!0),Q(bt,null,Sn(e.user.groups,(i,a)=>(L(),Q("div",{key:a,class:"flex flex-col"},ee(i.dateEnd?"":i.name),1))),128))]),_:1}))}},eit={__name:"UserAccessManagerCellActions",props:{user:{type:Object,required:!0}},setup(e){const t=Fne(),{t:n}=Jn();return(i,a)=>(L(),Ee(as,null,{default:te(()=>[pe(z1,{actions:se(t).getItemActions({user:e.user}),label:se(n)("userAccess.management.options"),"button-variant":"ellipsis",direction:"left",onAction:a[0]||(a[0]=l=>se(t)[l]({user:e.user}))},null,8,["actions","label"])]),_:1}))}},tit={class:"text-base-normal"},nit={__name:"UserAccessManagerCellName",props:{user:{type:Object,required:!0}},setup(e){return(t,n)=>(L(),Ee(as,null,{default:te(()=>[H("span",tit,ee(e.user.fullName),1),n[0]||(n[0]=D()),e.user.orcid?(L(),Ee(Vs,{key:0,icon:"Orcid",class:"h-4 w-4",inline:!0})):we("",!0),n[1]||(n[1]=D()),e.user.disabled?(L(),Ee(Vs,{key:1,icon:"DisableUser",class:"h-4 w-4 text-negative",inline:!0})):we("",!0)]),_:1}))}},sit={class:"text-base-normal"},oit={__name:"UserAccessManagerCellEmail",props:{user:{type:Object,required:!0}},setup(e){return(t,n)=>(L(),Ee(as,null,{default:te(()=>[H("span",sit,ee(e.user.email),1)]),_:1}))}},rit={class:"text-base-normal"},iit={__name:"UserAccessManagerCellAffiliation",props:{user:{type:Object,required:!0}},setup(e){return(t,n)=>(L(),Ee(as,null,{default:te(()=>[H("span",rit,ee(t.localize(e.user.affiliation)),1)]),_:1}))}},ait={__name:"UserAccessManagerActionSearch",setup(e){const t=Fne();return(n,i)=>(L(),Ee(j1,{"search-phrase":se(t).searchPhrase,"search-label":n.t("userAccess.search"),onSearchPhraseChanged:se(t).setSearchPhrase},null,8,["search-phrase","search-label","onSearchPhraseChanged"]))}},lit={class:"text-3xl-bold"},cit={class:"flex gap-x-2"},uit={__name:"UserAccessManager",setup(e){const t={UserAccessManagerCellStartDate:Jrt,UserAccessManagerCellUserGroups:Qrt,UserAccessManagerCellActions:eit,UserAccessManagerCellName:nit,UserAccessManagerCellEmail:oit,UserAccessManagerCellAffiliation:iit,UserAccessManagerActionSearch:ait},n=Fne(),{t:i}=Jn();return(a,l)=>(L(),Q(bt,null,[pe(du,{class:"mt-2"},{label:te(()=>[H("h3",lit,ee(se(i)("grid.user.currentUsers"))+" ("+ee(se(n).userAccessPagination.itemCount)+")\n ",1)]),"top-controls":te(()=>[H("div",cit,[(L(!0),Q(bt,null,Sn(se(n).topItems,(f,d)=>(L(),Ee(Io(t[f.component]||f.component),Cn({ref_for:!0},f.props||{},{key:d}),null,16))),128))])]),default:te(()=>[l[0]||(l[0]=D()),l[1]||(l[1]=D()),pe(Ad,null,{default:te(()=>[(L(!0),Q(bt,null,Sn(se(n).columns,(f,d)=>(L(),Ee(Ei,{key:d},{default:te(()=>[H("span",{class:Rn(f.headerSrOnly?"sr-only":"")},ee(f.header),3)]),_:2},1024))),128))]),_:1}),l[2]||(l[2]=D()),pe(Kd,null,{default:te(()=>[(L(!0),Q(bt,null,Sn(se(n).userList,f=>(L(),Ee(Bi,{key:f.id},{default:te(()=>[(L(!0),Q(bt,null,Sn(se(n).columns,(d,h)=>(L(),Ee(Io(t[d.component]||d.component),{key:h,user:f},null,8,["user"]))),128))]),_:2},1024))),128))]),_:1})]),_:1}),l[3]||(l[3]=D()),pe(hSe,{pagination:se(n).userAccessPagination,onSetPage:se(n).setCurrentPage},null,8,["pagination","onSetPage"])],64))}},os={_piniaInstance:null,_instances:{},_globalComponents:{},_globalDirectives:{},init:function(e,t,n){if(pkp.controllers[t]===void 0)return;var i={};typeof pkp.controllers[t].data=="function"&&(i=pkp.controllers[t].data());var a=$.extend(!0,{},pkp.controllers[t],{data:function(){return $.extend(!0,{},i,n,{id:e})}});pkp.registry._instances[e]=pkp.pkpCreateVueApp(a);const l=pkp.registry._instances[e].mount("#".concat(e));pkp.eventBus.$emit("root:mounted",e,l);var f=$(pkp.registry._instances[e].$el).parents();f.each(function(d){if($.pkp.classes.Handler.hasHandler($(f[d])))return $.pkp.classes.Handler.getHandler($(f[d])).handlerChildren_.push(pkp.registry._instances[e]),!1})},attachPiniaInstance(e){this._piniaInstance=e},registerComponent(e,t){this._globalComponents[e]=t},getComponent(e){return this._globalComponents[e]},getAllComponents(){return this._globalComponents},registerDirective(e,t){this._globalDirectives[e]=t},getAllDirectives(){return this._globalDirectives},getPiniaStore(e){return dbe(e)},storeExtend(e,t){this._piniaInstance.use(n=>{n.store.$id===e&&t(n)})},storeExtendFn(e,t,n){this._piniaInstance.use(i=>{i.store.$id===e&&i.store.extender.extendFn(t,n)})},getPiniaInstance(){this._piniaInstance},storeAddFn(e,t,n){this._piniaInstance.use(i=>{i.store.$id===e&&(i.store[t]=n)})},storeListExtendableFns(e){if(!e)throw new Error("missing storeName");const t=dbe(e);return t.extender?t.extender.listExtendableFns():!1}};os.registerDirective("strip-unsafe-html",JOe),os.registerComponent("Badge",kd),os.registerComponent("PkpBadge",kd),os.registerComponent("Dropdown",Ww),os.registerComponent("PkpDropdown",Ww),os.registerComponent("DropdownActions",z1),os.registerComponent("Icon",Vs),os.registerComponent("PkpIcon",Vs),os.registerComponent("InitialsAvatar",eH),os.registerComponent("PkpInitialsAvatar",eH),os.registerComponent("PkpSideNav",WYe),os.registerComponent("Notification",yH),os.registerComponent("PkpNotification",yH),os.registerComponent("Panel",_H),os.registerComponent("PkpPanel",_H),os.registerComponent("PanelSection",SH),os.registerComponent("PkpPanelSection",SH),os.registerComponent("PkpButton",ms),os.registerComponent("PkpHeader",Bf),os.registerComponent("Spinner",zl),os.registerComponent("PkpSpinner",zl),os.registerComponent("PkpSpinnerFullScreen",iXe),os.registerComponent("TopNavActions",Yte),os.registerComponent("PkpTopNavActions",Yte),os.registerComponent("Step",CH),os.registerComponent("PkpStep",CH),os.registerComponent("Steps",EH),os.registerComponent("PkpSteps",EH),os.registerComponent("Tab",l4e),os.registerComponent("PkpTab",l4e),os.registerComponent("Tabs",c4e),os.registerComponent("PkpTabs",c4e),os.registerComponent("PkpActionPanel",Z1),os.registerComponent("PkpButtonRow",r0),os.registerComponent("PkpDoughnutChart",aSe),os.registerComponent("PkpLineChart",lSe),os.registerComponent("PkpComposer",Mne),os.registerComponent("PkpDateRange",fSe),os.registerComponent("PkpFile",m9),os.registerComponent("PkpFileAttacher",uSe),os.registerComponent("PkpFileUploader",nU),os.registerComponent("PkpFileUploadProgress",Lne),os.registerComponent("PkpGridWrapper",pSe),os.registerComponent("PkpFilter",_C),os.registerComponent("PkpFilterAutosuggest",Nne),os.registerComponent("PkpFilterSlider",sU),os.registerComponent("PkpFilterSliderMultirange",mSe),os.registerComponent("PkpList",oU),os.registerComponent("PkpListItem",rU),os.registerComponent("PkpModal",h9),os.registerComponent("PkpMultilingualProgress",a0),os.registerComponent("PkpOrderer",vH),os.registerComponent("PkpPagination",d0),os.registerComponent("PkpProgressBar",cSe),os.registerComponent("PkpSearch",j1),os.registerComponent("PkpTable",du),os.registerComponent("PkpTableBody",Kd),os.registerComponent("PkpTableCell",as),os.registerComponent("PkpTableColumn",Ei),os.registerComponent("PkpTableHeader",Ad),os.registerComponent("PkpTableRow",Bi),os.registerComponent("PkpTooltip",Tc),os.registerComponent("PkpForm",oa),os.registerComponent("PkpFieldArchivingPn",k3e),os.registerComponent("PkpFieldAutosuggestPreset",bH),os.registerComponent("PkpFieldBase",Lm),os.registerComponent("PkpFieldBaseAutosuggest",lC),os.registerComponent("PkpFieldColor",I3e),os.registerComponent("PkpFieldControlledVocab",A3e),os.registerComponent("PkpFieldHtml",O3e),os.registerComponent("PkpFieldOrcid",D3e),os.registerComponent("PkpFieldMetadataSetting",R3e),os.registerComponent("PkpFieldOptions",aC),os.registerComponent("PkpFieldPreparedContent",Dte),os.registerComponent("PkpFieldPubId",Ate),os.registerComponent("PkpFieldRadioInput",m5e),os.registerComponent("PkpFieldRichText",h5e),os.registerComponent("PkpFieldRichTextarea",O5),os.registerComponent("PkpFieldSelect",e9),os.registerComponent("PkpFieldSelectIssue",g5e),os.registerComponent("PkpFieldSelectIssues",Lte),os.registerComponent("PkpFieldSelectSubmissions",v5e),os.registerComponent("PkpFieldSelectUsers",Pte),os.registerComponent("PkpFieldShowEnsuringLink",b5e),os.registerComponent("PkpFieldText",Nb),os.registerComponent("PkpFieldTextarea",y5e),os.registerComponent("PkpFieldUpload",Nte),os.registerComponent("PkpFieldUploadImage",P5e),os.registerComponent("PkpFieldSlider",L5e),os.registerComponent("field-text",Nb),os.registerComponent("field-pub-id",Ate),os.registerComponent("PkpListPanel",Vf),os.registerComponent("UserInvitationManager",qrt),os.registerComponent("UserAccessManager",uit);const $ne=cEe();os.attachPiniaInstance($ne);function gSe(e){const t=NS(e);t.use($ne),t.use(DIe,{unstyled:!0}),t.config.globalProperties.$store={},t.config.compilerOptions.whitespace="preserve",t.use(FIe),t.use(Cxe),t.use(xTe,{themes:{"pkp-tooltip":{$extend:"tooltip",triggers:["hover","focus"],delay:{show:0,hide:0}}}}),t.mixin(gxe);const n=os.getAllComponents();Object.keys(n).forEach(a=>{t.component(a,n[a])});const i=os.getAllDirectives();return Object.keys(i).forEach(a=>{t.directive(a,i[a])}),t}const dit={Vue:gSe({}),modules:{vue:o0e,piniaInstance:$ne,useAnnouncer:HIe,useApp:UIe,useContainerStateManager:WIe,useCurrentUser:YIe,useDataChanged:XIe,useDataChangedProvider:JIe,useDate:aAe,useExtender:lAe,useFetch:gOe,useFetchPaginated:vOe,useFiltersForm:_Oe,useForm:bOe,useLegacyGridUrl:COe,useLocalize:ZIe,useModal:SOe,useNotify:EOe,useQueryParams:xOe,useSideMenu:TOe,useSorting:IOe,useSubmission:KIe,useUrl:AOe},pkpCreateVueApp:gSe,createApp:NS,registry:os,eventBus:{$on:(...e)=>DV.on(...e),$once:(...e)=>DV.once(...e),$off:(...e)=>DV.off(...e),$emit:(...e)=>DV.emit(...e)},const:{},localeKeys:{},currentUser:null,vueMixins:{dialog:wd}},fit={components:{Icon:Vs},props:{isExpanded:{type:Boolean,default(){return!1}},itemName:{type:String,required:!0}}},pit={key:2,class:"-screenReader"},mit={key:3,class:"-screenReader"};function hit(e,t,n,i,a,l){const f=Xe("Icon");return L(),Q("button",{class:"expander",onClick:t[0]||(t[0]=d=>e.$emit("toggle"))},[n.isExpanded?(L(),Ee(f,{key:0,icon:"ChevronUp",class:"h-5 w-5",inline:!0})):(L(),Ee(f,{key:1,icon:"ChevronDown",class:"h-5 w-5",inline:!0})),t[1]||(t[1]=D()),n.isExpanded?(L(),Q("span",pit,ee(e.t("list.viewLess",{name:n.itemName})),1)):(L(),Q("span",mit,ee(e.t("list.viewMore",{name:n.itemName})),1))])}const Bne=wt(fit,[["render",hit]]),git={components:{Expander:Bne,List:oU,ListItem:rU,Badge:kd,PkpButton:ms,Icon:Vs},props:{activeReviewsCountLabel:{type:String,required:!0},activeReviewsLabel:{type:String,required:!0},assignedToLastRound:{type:Boolean,required:!0},assignedToLastRoundLabel:{type:String,required:!0},authorAffiliations:{type:Array,default(){return[]}},averageCompletionLabel:{type:String,required:!0},biographyLabel:{type:String,required:!0},cancelledReviewsLabel:{type:String,required:!0},completedReviewsLabel:{type:String,required:!0},currentlyAssigned:{type:Boolean,required:!0},currentlyAssignedLabel:{type:String,required:!0},daySinceLastAssignmentLabel:{type:String,required:!0},daysSinceLastAssignmentLabel:{type:String,required:!0},daysSinceLastAssignmentDescriptionLabel:{type:String,required:!0},declinedReviewsLabel:{type:String,required:!0},gossipLabel:{type:String,required:!0},item:{type:Object,required:!0},neverAssignedLabel:{type:String,required:!0},reassignLabel:{type:String,required:!0},reassignWithNameLabel:{type:String,required:!0},reviewerSameInstitutionLabel:{type:String,required:!0},reviewerRatingLabel:{type:String,required:!0},reviewInterestsLabel:{type:String,required:!0},selectReviewerLabel:{type:String,required:!0},warnOnAssignment:{type:Boolean,required:!0},warnOnAssignmentLabel:{type:String,required:!0},warnOnAssignmentUnlockLabel:{type:String,required:!0}},data(){return{isExpanded:!1,isWarningBypassed:!1}},computed:{canSelect(){return this.currentlyAssigned?!1:this.warnOnAssignment?this.isWarningBypassed:!0},daysSinceLastAssignment(){if(!this.item.dateLastReviewAssignment)return null;const e=t=>t.replace(/-/g,"/");return Math.floor((Date.parse(e(this.item.dateLastReviewAssignment))-Date.now())/864e5*-1)},daysSinceLastAssignmentLabelCompiled(){return this.daysSinceLastAssignment===null?this.neverAssignedLabel:this.daysSinceLastAssignment>1?this.daysSinceLastAssignmentLabel.replace("{$days}",this.daysSinceLastAssignment):this.daySinceLastAssignmentLabel},interestsString(){return!this.item.interests||!this.item.interests.length?"":this.item.interests.map(e=>e.interest).join(this.t("common.commaListSeparator"))},reassignWithName(){return this.reassignWithNameLabel.replace("{$name}",this.item.fullName)},stars(){let e=[];if(this.item.reviewerRating)for(let t=0;t<5;t++)e.push(t<this.item.reviewerRating);return e}},methods:{select(){this.$emit("select",this.item),pkp.eventBus.$emit("selected:reviewer",this.item)},unlockAssignment(){this.isWarningBypassed=!0},affiliationMatch(e){return this.authorAffiliations.some(t=>t&&t.toLowerCase()===this.localize(e).toLowerCase())}}},vit={class:"listPanel__itemSummary"},bit={class:"listPanel__itemIdentity"},yit={class:"listPanel__itemTitle"},_it={key:1,class:"listPanel__item--reviewer__rating"},Sit={class:"-screenReader"},Cit={class:"listPanel__itemSubtitle"},wit={key:0,class:"listPanel__item--reviewer__affiliation"},Eit=["href"],kit={key:0,class:"listPanel__item--reviewer__notice"},xit={class:"align-middle"},Tit={key:1,class:"listPanel__item--reviewer__notice"},Iit={class:"align-middle"},Ait={key:2,class:"listPanel__item--reviewer__notice space-x-1"},Oit={class:"align-middle"},Rit={key:3,class:"listPanel__item--reviewer__brief","aria-hidden":"true"},Dit={class:"listPanel__item--reviewer__complete"},Lit={class:"align-middle"},Pit={class:"listPanel__item--reviewer__last"},Mit={class:"align-middle"},Nit={key:0,class:"listPanel__item--reviewer__interests"},Fit={class:"align-middle"},$it={key:1,class:"pkpBadge pkp_helpers_text_warn"},Bit={class:"listPanel__itemActions"},Vit={"aria-hidden":"true"},Hit={class:"-screenReader"},Uit={"aria-hidden":"true"},zit={class:"-screenReader"},Wit={key:0,class:"listPanel__itemExpanded listPanel__itemExpanded--reviewer"},jit={class:"listPanel__item--reviewer__detailHeading"},Zit={class:"listPanel__item--reviewer__detailHeading"},qit={class:"listPanel__item--reviewer__detailHeading"},Git={class:"semantic-defaults"};function Kit(e,t,n,i,a,l){const f=Xe("Badge"),d=Xe("Icon"),h=Xe("PkpButton"),b=Xe("Expander"),S=Xe("ListItem"),k=Xe("List"),T=Hr("strip-unsafe-html");return L(),Q("div",{class:Rn(["listPanel__item--reviewer",n.currentlyAssigned?"-isAssigned":""])},[H("div",vit,[H("div",bit,[H("div",yit,[n.item.reviewsActive&&l.canSelect?(L(),Ee(f,{key:0,class:"listPanel__item--reviewer__active"},{default:te(()=>[D(ee(n.activeReviewsCountLabel.replace("{$count}",n.item.reviewsActive)),1)]),_:1})):we("",!0),D(" "+ee(n.item.fullName)+" ",1),n.item.reviewerRating!==null&&l.canSelect?(L(),Q("span",_it,[(L(!0),Q(bt,null,Sn(l.stars,(O,P)=>(L(),Ee(d,{key:P,icon:O?"StarTicked":"Star",class:"h-4 w-4 text-stage-in-review"},null,8,["icon"]))),128)),t[2]||(t[2]=D()),H("span",Sit,ee(n.reviewerRatingLabel.replace("{$rating}",n.item.reviewerRating)),1)])):we("",!0)]),t[13]||(t[13]=D()),H("div",Cit,[n.item.affiliation||n.item.orcid?(L(),Q("div",wit,[D(ee(e.localize(n.item.affiliation))+" ",1),n.item.orcid?(L(),Q("a",{key:0,href:n.item.orcid,class:"listPanel__item--reviewer__orcid",target:"_blank"},[pe(d,{icon:n.item.orcidIsVerified?"Orcid":"OrcidUnauthenticated",inline:!0,class:"me-1 w-6"},null,8,["icon"]),D(" "+ee(n.item.orcidDisplayValue),1)],8,Eit)):we("",!0)])):we("",!0)]),t[14]||(t[14]=D()),n.currentlyAssigned?(L(),Q("div",kit,[pe(d,{icon:"Error",class:"me-1 h-4 w-4",inline:!0}),t[3]||(t[3]=D()),H("span",xit,ee(n.currentlyAssignedLabel),1)])):n.assignedToLastRound?(L(),Q("div",Tit,[pe(d,{icon:"Pin",class:"me-1 h-3 w-3",inline:!0}),t[4]||(t[4]=D()),H("span",Iit,ee(n.assignedToLastRoundLabel),1)])):n.warnOnAssignment&&!a.isWarningBypassed?(L(),Q("div",Ait,[pe(d,{icon:"Lock",class:"me-1 h-3 w-3",inline:!0}),t[5]||(t[5]=D()),H("span",Oit,ee(n.warnOnAssignmentLabel),1),t[6]||(t[6]=D()),H("button",{class:"listPanel__item--reviewer__noticeAction",onClick:t[0]||(t[0]=wl((...O)=>l.unlockAssignment&&l.unlockAssignment(...O),["prevent"]))},ee(n.warnOnAssignmentUnlockLabel),1)])):l.canSelect?(L(),Q("div",Rit,[H("span",Dit,[pe(d,{icon:"Complete",class:"h-4 w-4 text-default",inline:!0}),t[7]||(t[7]=D()),H("span",Lit,ee(n.item.reviewsCompleted),1)]),t[10]||(t[10]=D()),H("span",Pit,[pe(d,{icon:"History",class:"h-4 w-4 text-default",inline:!0}),t[8]||(t[8]=D()),H("span",Mit,ee(l.daysSinceLastAssignmentLabelCompiled),1)]),t[11]||(t[11]=D()),n.item.interests.length?(L(),Q("span",Nit,[pe(d,{icon:"Book",class:"h-4 w-4 text-default",inline:!0}),t[9]||(t[9]=D()),H("span",Fit,ee(l.interestsString),1)])):we("",!0),t[12]||(t[12]=D()),l.affiliationMatch(n.item.affiliation)?(L(),Q("span",$it,ee(n.reviewerSameInstitutionLabel),1)):we("",!0)])):we("",!0)]),t[18]||(t[18]=D()),H("div",Bit,[l.canSelect?(L(),Ee(h,{key:0,onClick:l.select},{default:te(()=>[n.assignedToLastRound?(L(),Q(bt,{key:0},[H("span",Vit,ee(n.reassignLabel),1),t[15]||(t[15]=D()),H("span",Hit,ee(l.reassignWithName),1)],64)):(L(),Q(bt,{key:1},[H("span",Uit,ee(n.selectReviewerLabel),1),t[16]||(t[16]=D()),H("span",zit,ee(e.t("common.selectWithName",{name:n.item.fullName})),1)],64))]),_:1},8,["onClick"])):we("",!0),t[17]||(t[17]=D()),pe(b,{"is-expanded":a.isExpanded,"item-name":n.item.fullName,onToggle:t[1]||(t[1]=O=>a.isExpanded=!a.isExpanded)},null,8,["is-expanded","item-name"])])]),t[29]||(t[29]=D()),a.isExpanded?(L(),Q("div",Wit,[pe(k,null,{default:te(()=>[pe(S,null,{value:te(()=>[pe(d,{icon:"Clock",class:"me-1 h-4 w-4 text-default",inline:!0}),D(" "+ee(n.item.reviewsActive),1)]),default:te(()=>[D(" "+ee(n.activeReviewsLabel),1)]),_:1}),t[21]||(t[21]=D()),pe(S,null,{value:te(()=>[pe(d,{icon:"Complete",class:"me-1 h-4 w-4 text-default",inline:!0}),D(" "+ee(n.item.reviewsCompleted),1)]),default:te(()=>[D(" "+ee(n.completedReviewsLabel),1)]),_:1}),t[22]||(t[22]=D()),pe(S,null,{value:te(()=>[pe(d,{icon:"Cancel",class:"me-1 h-4 w-4 text-default",inline:!0}),D(" "+ee(n.item.reviewsDeclined),1)]),default:te(()=>[D(" "+ee(n.declinedReviewsLabel),1)]),_:1}),t[23]||(t[23]=D()),pe(S,null,{value:te(()=>[pe(d,{icon:"Declined",class:"me-1 h-4 w-4 text-default",inline:!0}),D(" "+ee(n.item.reviewsCancelled),1)]),default:te(()=>[D(" "+ee(n.cancelledReviewsLabel),1)]),_:1}),t[24]||(t[24]=D()),pe(S,null,{value:te(()=>[pe(d,{icon:"History",class:"me-1 h-4 w-4 text-default",inline:!0}),D(" "+ee(l.daysSinceLastAssignment),1)]),default:te(()=>[D(" "+ee(n.daysSinceLastAssignmentDescriptionLabel),1)]),_:1}),t[25]||(t[25]=D()),pe(S,null,{value:te(()=>[pe(d,{icon:"Calendar",class:"me-1 h-4 w-4 text-default",inline:!0}),D(" "+ee(n.item.averageReviewCompletionDays),1)]),default:te(()=>[D(" "+ee(n.averageCompletionLabel),1)]),_:1}),t[26]||(t[26]=D()),n.item.interests.length?(L(),Ee(S,{key:0},{default:te(()=>[H("div",jit,[pe(d,{icon:"Book",class:"me-1 h-4 w-4 text-default",inline:!0}),D(" "+ee(n.reviewInterestsLabel),1)]),D(" "+ee(l.interestsString),1)]),_:1})):we("",!0),t[27]||(t[27]=D()),n.item.gossip?(L(),Ee(S,{key:1},{default:te(()=>[H("div",Zit,ee(n.gossipLabel),1),t[19]||(t[19]=D()),Gn(H("div",null,null,512),[[T,n.item.gossip]])]),_:1})):we("",!0),t[28]||(t[28]=D()),e.localize(n.item.biography)?(L(),Ee(S,{key:2},{default:te(()=>[H("div",qit,ee(n.biographyLabel),1),t[20]||(t[20]=D()),Gn(H("div",Git,null,512),[[T,e.localize(n.item.biography)]])]),_:1})):we("",!0)]),_:1})])):we("",!0)],2)}const Yit=wt(git,[["render",Kit]]),Xit={components:{PkpButton:ms,Icon:Vs},mixins:[Od,wd],props:{item:{type:Object,required:!0},submissionId:{type:Number,required:!0},stageId:{type:Number,required:!0},reviewRoundId:{type:Number,required:!0},selectReviewerLabel:{type:String,required:!0},currentlyAssigned:{type:Boolean,required:!0},currentlyAssignedLabel:{type:String,required:!0}},emits:["update:suggestions"],data(){return{}},computed:{canSelect(){return this.currentlyAssigned?!1:this.approvedAt===null||this.approvedAt===void 0}},methods:{select(){if(this.item.existingUserId&&this.item.existingReviewerRole){pkp.eventBus.$emit("selected:reviewer",{id:this.item.existingUserId,fullName:this.localize(this.item.fullName)});return}const{t:e}=Jn(),{openLegacyModal:t}=Ar({component:"grid.users.reviewer.ReviewerGridHandler",op:"showReviewerForm",params:{submissionId:this.submissionId,stageId:this.stageId,reviewRoundId:this.reviewRoundId,selectionType:this.item.existingUserId?this.item.existingReviewerRole?pkp.const.REVIEWER_SELECT_ADVANCED_SEARCH:pkp.const.REVIEWER_SELECT_ENROLL_EXISTING:pkp.const.REVIEWER_SELECT_CREATE,reviewerSuggestionId:this.item.id}});t({title:e("editor.submission.addReviewer")},()=>this.$emit("update:suggestions",this.item.id))}}},Jit={class:"listPanel__item--reviewer"},Qit={class:"listPanel__itemSummary"},eat={class:"listPanel__itemIdentity"},tat={class:"listPanel__itemTitle"},nat={class:"listPanel__itemSubtitle"},sat={class:"listPanel__item--reviewer__affiliation"},oat={class:"reviewer_sugestion_reason_container semantic-defaults"},rat={key:0,class:"listPanel__item--reviewer__notice"},iat={class:"align-middle"},aat={class:"listPanel__itemActions"},lat={"aria-hidden":"true"},cat={class:"-screenReader"};function uat(e,t,n,i,a,l){const f=Xe("Icon"),d=Xe("PkpButton"),h=Hr("strip-unsafe-html");return L(),Q("div",Jit,[H("div",Qit,[H("div",eat,[H("div",tat,ee(e.localize(n.item.fullName)),1),t[2]||(t[2]=D()),H("div",nat,[H("div",sat,ee(e.localize(n.item.affiliation)),1),t[0]||(t[0]=D()),Gn(H("div",oat,null,512),[[h,e.localize(n.item.suggestionReason)]])]),t[3]||(t[3]=D()),n.currentlyAssigned?(L(),Q("div",rat,[pe(f,{icon:"Error",class:"me-1 h-4 w-4",inline:!0}),t[1]||(t[1]=D()),H("span",iat,ee(n.currentlyAssignedLabel),1)])):we("",!0)]),t[5]||(t[5]=D()),H("div",aat,[l.canSelect?(L(),Ee(d,{key:0,onClick:l.select},{default:te(()=>[H("span",lat,ee(n.selectReviewerLabel),1),t[4]||(t[4]=D()),H("span",cat,ee(e.t("common.selectWithName",{name:e.fullName})),1)]),_:1},8,["onClick"])):we("",!0)])])])}const dat=wt(Xit,[["render",uat]]),SC={mixins:[Od],props:{apiUrl:{type:String,required:!0},count:{type:Number,default(){return 30}},getParams:{type:Object,default(){return{}}},lazyLoad:{type:Boolean,default(){return!1}}},data(){return{activeFilters:{},isLoading:!1,itemsMax:0,latestGetRequest:"",offset:0,searchPhrase:""}},computed:{currentPage(){return Math.floor(this.offset/this.count)+1},lastPage(){return Math.ceil(this.itemsMax/this.count)}},methods:{get(){if(!this.apiUrl)return;this.isLoading=!0;const e=$.pkp.classes.Helper.uuid();this.latestGetRequest=e,$.ajax({url:this.apiUrl,type:"GET",context:this,data:{...this.getParams,...this.activeFilters,searchPhrase:this.searchPhrase,count:this.count,offset:this.offset},error:function(t){this.latestGetRequest===e&&this.ajaxErrorCallback(t)},success:function(t){this.latestGetRequest===e&&this.setItems(t.items,t.itemsMax)},complete(){this.latestGetRequest===e&&(this.isLoading=!1)}})},setItems(e,t){throw new Error("Missing function to set items after get request. This mixin requires that the component implements a `setItems` method which handles the items received from the get request.")},setPage(e){this.offset=e*this.count-this.count},setSearchPhrase(e){this.searchPhrase=e}},watch:{activeFilters(e,t){this.offset?this.offset=0:this.$nextTick(()=>this.get())},offset(e,t){e!==t&&this.$nextTick(()=>this.get())},searchPhrase(e,t){e!==t&&(this.offset?this.offset=0:this.$nextTick(()=>this.get()))}},mounted(){if(this.lazyLoad)if(document.readyState==="complete")this.get();else{var e=this;$(function(){e.get()})}}},fat={components:{FilterSlider:sU,FilterSliderMultirange:mSe,ListPanel:Vf,Pagination:d0,PkpHeader:Bf,Search:j1,SelectReviewerListItem:Yit,SelectReviewerSuggestionListItem:dat,Icon:Vs,Spinner:zl,PkpButton:ms},mixins:[SC],props:{activeReviewsCountLabel:{type:String,required:!0},activeReviewsLabel:{type:String,required:!0},assignedToLastRoundLabel:{type:String,required:!0},authorAffiliations:{type:Array,default(){return[]}},averageCompletionLabel:{type:String,required:!0},biographyLabel:{type:String,required:!0},cancelledReviewsLabel:{type:String,required:!0},completedReviewsLabel:{type:String,required:!0},currentlyAssigned:{type:Array,default(){return[]}},currentlyAssignedLabel:{type:String,required:!0},daySinceLastAssignmentLabel:{type:String,required:!0},daysSinceLastAssignmentLabel:{type:String,required:!0},daysSinceLastAssignmentDescriptionLabel:{type:String,required:!0},declinedReviewsLabel:{type:String,required:!0},emptyLabel:{type:String,required:!0},filters:{type:Array,default(){return[]}},gossipLabel:{type:String,required:!0},id:{type:String,required:!0},items:{type:Array,default(){return[]}},itemsMax:{type:Number,default(){return 0}},lastRoundReviewers:{type:Array,default(){return[]}},neverAssignedLabel:{type:String,required:!0},reassignLabel:{type:String,required:!0},reassignWithNameLabel:{type:String,required:!0},reviewerRatingLabel:{type:String,required:!0},reviewerSameInstitutionLabel:{type:String,required:!0},reviewInterestsLabel:{type:String,required:!0},selectorName:{type:String,required:!0},selectReviewerLabel:{type:String,required:!0},title:{type:String,required:!0},warnOnAssignment:{type:Array,default(){return[]}},warnOnAssignmentLabel:{type:String,required:!0},warnOnAssignmentUnlockLabel:{type:String,required:!0},suggestionTitle:{type:String,required:!1,default:null},suggestions:{type:Array,default(){return[]}},reviewerSuggestionsApiUrl:{type:String,required:!1,default:null}},emits:["set"],data(){return{isLoading:!1,isSidebarVisible:!1}},computed:{currentReviewers(){return Object.keys(this.activeFilters).length?this.items:[...this.lastRoundReviewers,...this.items.filter(e=>!this.lastRoundReviewerIds.includes(e.id))]},lastRoundReviewerIds(){return this.lastRoundReviewers.map(e=>e.id)}},watch:{activeFilters(e,t){this.offset=0,e&&Object.keys(e).length&&(this.isSidebarVisible=!0)}},methods:{addFilter(e,t){let n={...this.activeFilters};n[e]=t,this.activeFilters=n},isFilterActive(e,t){return Object.prototype.hasOwnProperty.call(this.activeFilters,e)},removeFilter(e,t){if(Object.prototype.hasOwnProperty.call(this.activeFilters,e)){let n={...this.activeFilters};delete n[e],this.activeFilters=n}},setItems(e,t){this.$emit("set",this.id,{items:e,itemsMax:t})},updateReviewerSuggestionList(e){this.isLoading=!0,$.ajax({url:this.reviewerSuggestionsApiUrl+"/"+e,type:"GET",context:this,headers:{"X-Csrf-Token":pkp.currentUser.csrfToken},data:{include_reviewer_data:!0},error:this.ajaxErrorCallback,success(t){if(t.approvedAt&&(this.suggestions.forEach(n=>{n.id==e&&(n.approvedAt=t.approvedAt)}),t.reviewer)){let n=this.items.map(i=>i);n.push(t.reviewer),this.setItems(n,this.itemsMax+1),this.currentlyAssigned.push(t.reviewer.id)}},complete(t){this.isLoading=!1}})}}},pat={class:"flex items-center"};function mat(e,t,n,i,a,l){const f=Xe("Spinner"),d=Xe("PkpHeader"),h=Xe("SelectReviewerSuggestionListItem"),b=Xe("ListPanel"),S=Xe("Search"),k=Xe("Icon"),T=Xe("PkpButton"),O=Xe("SelectReviewerListItem"),P=Xe("Pagination");return L(),Q("div",null,[is(e.$slots,"default",{},()=>[n.suggestions.length>0?(L(),Ee(b,{key:0,class:"listPanel--selectReviewer reviewer-sugestions-list",items:n.suggestions},If({header:te(()=>[pe(d,null,{default:te(()=>{var B;return[H("h2",null,ee((B=n.suggestionTitle)!=null?B:n.title),1),t[1]||(t[1]=D()),a.isLoading?(L(),Ee(f,{key:0})):we("",!0)]}),_:1})]),item:te(({item:B})=>[B.approvedAt?we("",!0):(L(),Ee(h,{key:B.id,item:B,"submission-id":e.getParams.submissionId,"stage-id":e.getParams.reviewStage,"review-round-id":e.getParams.reviewRoundId,"select-reviewer-label":n.selectReviewerLabel,"currently-assigned":n.currentlyAssigned.includes(B.existingUserId),"currently-assigned-label":n.currentlyAssignedLabel,"onUpdate:suggestions":l.updateReviewerSuggestionList},null,8,["item","submission-id","stage-id","review-round-id","select-reviewer-label","currently-assigned","currently-assigned-label","onUpdate:suggestions"]))]),_:2},[a.isLoading?{name:"itemsEmpty",fn:te(()=>[a.isLoading?(L(),Q(bt,{key:0},[pe(f),D(" "+ee(e.t("common.loading")),1)],64)):(L(),Q(bt,{key:1},[D(ee(n.emptyLabel),1)],64))]),key:"0"}:void 0]),1032,["items"])):we("",!0),t[12]||(t[12]=D()),pe(b,{class:"listPanel--selectReviewer","is-sidebar-visible":a.isSidebarVisible,items:l.currentReviewers},If({header:te(()=>[pe(d,null,{actions:te(()=>[pe(S,{"search-phrase":e.searchPhrase,onSearchPhraseChanged:e.setSearchPhrase},null,8,["search-phrase","onSearchPhraseChanged"]),t[4]||(t[4]=D()),pe(T,{"is-active":a.isSidebarVisible,onClick:t[0]||(t[0]=B=>a.isSidebarVisible=!a.isSidebarVisible)},{default:te(()=>[pe(k,{icon:"Filter",class:"h-4 w-4",inline:!0}),D(" "+ee(e.t("common.filter")),1)]),_:1},8,["is-active"])]),default:te(()=>[H("h2",null,ee(n.title),1),t[5]||(t[5]=D()),a.isLoading?(L(),Ee(f,{key:0})):we("",!0),t[6]||(t[6]=D())]),_:1})]),sidebar:te(()=>[pe(d,{"is-one-line":!1},{default:te(()=>[H("h2",pat,[pe(k,{icon:"Filter",class:"me-1 h-4 w-4",inline:!0}),D(" "+ee(e.t("common.filter")),1)])]),_:1}),t[7]||(t[7]=D()),(L(!0),Q(bt,null,Sn(n.filters,B=>(L(),Ee(Io(B.filterType||"filter-slider"),Cn({key:B.param,ref_for:!0},B,{"is-filter-active":l.isFilterActive(B.param,B.value),onAddFilter:l.addFilter,onUpdateFilter:l.addFilter,onRemoveFilter:l.removeFilter}),null,16,["is-filter-active","onAddFilter","onUpdateFilter","onRemoveFilter"]))),128))]),item:te(({item:B})=>[(L(),Ee(O,{key:B.id,"active-reviews-count-label":n.activeReviewsCountLabel,"active-reviews-label":n.activeReviewsLabel,"assigned-to-last-round":l.lastRoundReviewerIds.includes(B.id),"assigned-to-last-round-label":n.assignedToLastRoundLabel,"author-affiliations":n.authorAffiliations,"average-completion-label":n.averageCompletionLabel,"biography-label":n.biographyLabel,"cancelled-reviews-label":n.cancelledReviewsLabel,"completed-reviews-label":n.completedReviewsLabel,"currently-assigned":n.currentlyAssigned.includes(B.id),"currently-assigned-label":n.currentlyAssignedLabel,"day-since-last-assignment-label":n.daySinceLastAssignmentLabel,"days-since-last-assignment-label":n.daysSinceLastAssignmentLabel,"days-since-last-assignment-description-label":n.daysSinceLastAssignmentDescriptionLabel,"declined-reviews-label":n.declinedReviewsLabel,"gossip-label":n.gossipLabel,item:B,"never-assigned-label":n.neverAssignedLabel,"reassign-label":n.reassignLabel,"reassign-with-name-label":n.reassignWithNameLabel,"reviewer-same-institution-label":n.reviewerSameInstitutionLabel,"reviewer-rating-label":n.reviewerRatingLabel,"review-interests-label":n.reviewInterestsLabel,"select-reviewer-label":n.selectReviewerLabel,"selector-name":n.selectorName,"warn-on-assignment":n.warnOnAssignment.includes(B.id),"warn-on-assignment-label":n.warnOnAssignmentLabel,"warn-on-assignment-unlock-label":n.warnOnAssignmentUnlockLabel},null,8,["active-reviews-count-label","active-reviews-label","assigned-to-last-round","assigned-to-last-round-label","author-affiliations","average-completion-label","biography-label","cancelled-reviews-label","completed-reviews-label","currently-assigned","currently-assigned-label","day-since-last-assignment-label","days-since-last-assignment-label","days-since-last-assignment-description-label","declined-reviews-label","gossip-label","item","never-assigned-label","reassign-label","reassign-with-name-label","reviewer-same-institution-label","reviewer-rating-label","review-interests-label","select-reviewer-label","selector-name","warn-on-assignment","warn-on-assignment-label","warn-on-assignment-unlock-label"]))]),footer:te(()=>[e.lastPage>1?(L(),Ee(P,{key:0,"current-page":e.currentPage,"is-loading":a.isLoading,"last-page":e.lastPage,onSetPage:e.setPage},null,8,["current-page","is-loading","last-page","onSetPage"])):we("",!0)]),_:2},[a.isLoading?{name:"itemsEmpty",fn:te(()=>[a.isLoading?(L(),Q(bt,{key:0},[pe(f),D(" "+ee(e.t("common.loading")),1)],64)):(L(),Q(bt,{key:1},[D(ee(n.emptyLabel),1)],64))]),key:"0"}:void 0]),1032,["is-sidebar-visible","items"])])])}const vSe=wt(fat,[["render",mat]]),Vne={methods:{localizeSubmission:function(e,t){return Vve(e,t)}}},hat={name:"SubmissionsListItem",components:{Icon:Vs,PkpButton:ms,Badge:kd,Expander:Bne,List:oU,ListItem:rU},mixins:[Od,SC,Vne,wd],props:{apiUrl:{type:String,required:!0},assignParticipantUrl:{type:String,required:!0},infoUrl:{type:String,required:!0},item:{type:Object,required:!0}},data(){return{isExpanded:!1,mask:null,noticeActions:[],noticeActionLabels:[]}},computed:{currentPublication(){return this.item.publications.find(e=>e.id===this.item.currentPublicationId)},currentUserCanDelete(){return!this.userAssignedRole(pkp.const.ROLE_ID_AUTHOR)&&this.userAssignedRole([pkp.const.ROLE_ID_MANAGER,pkp.const.ROLE_ID_SITE_ADMIN])&&this.item.status===pkp.const.STATUS_DECLINED?!0:!!(this.userAssignedRole(pkp.const.ROLE_ID_AUTHOR)&&this.item.submissionProgress)},currentUserCanViewInfoCenter(){return this.userAssignedRole([pkp.const.ROLE_ID_SITE_ADMIN,pkp.const.ROLE_ID_MANAGER,pkp.const.ROLE_ID_SUB_EDITOR])},currentUserIsReviewer(){for(var e of this.item.reviewAssignments)if(e.isCurrentUserAssigned)return!0;return!1},activeStage(){return this.item.stages.find(e=>e.isActiveStage===!0)},notice(){var e="";if(this.item.submissionProgress)return e;if(this.shouldAssignEditor&&(e=this.activeStage.status),this.userAssignedRole([pkp.const.ROLE_ID_MANAGER,pkp.const.ROLE_ID_SUB_EDITOR])&&this.isReviewStage){switch(this.activeStage.statusId){case pkp.const.REVIEW_ROUND_STATUS_PENDING_REVIEWERS:case pkp.const.REVIEW_ROUND_STATUS_REVIEWS_READY:case pkp.const.REVIEW_ROUND_STATUS_REVIEWS_COMPLETED:case pkp.const.REVIEW_ROUND_STATUS_REVIEWS_OVERDUE:case pkp.const.REVIEW_ROUND_STATUS_REVISIONS_SUBMITTED:case pkp.const.REVIEW_ROUND_STATUS_RESUBMIT_FOR_REVIEW_SUBMITTED:e=this.activeStage.status;break}if(!this.activeStage.currentUserCanRecommendOnly)switch(this.activeStage.statusId){case pkp.const.REVIEW_ROUND_STATUS_RECOMMENDATIONS_READY:case pkp.const.REVIEW_ROUND_STATUS_RECOMMENDATIONS_COMPLETED:e=this.activeStage.status;break}}if(this.userAssignedRole(pkp.const.ROLE_ID_AUTHOR)&&this.isReviewStage)switch(this.activeStage.statusId){case pkp.const.REVIEW_ROUND_STATUS_REVISIONS_REQUESTED:case pkp.const.REVIEW_ROUND_STATUS_RESUBMIT_FOR_REVIEW:e=this.activeStage.status;break}if(this.currentUserIsReviewer)switch(this.currentUserLatestReviewAssignment.statusId){case pkp.const.REVIEW_ASSIGNMENT_STATUS_AWAITING_RESPONSE:case pkp.const.REVIEW_ASSIGNMENT_STATUS_RESPONSE_OVERDUE:case pkp.const.REVIEW_ASSIGNMENT_STATUS_REVIEW_OVERDUE:case pkp.const.REVIEW_ASSIGNMENT_STATUS_REQUEST_RESEND:e=this.currentUserLatestReviewAssignment.status;break}return e},shouldAssignEditor(){return this.userAssignedRole(pkp.const.ROLE_ID_MANAGER)&&this.activeStage.id===pkp.const.WORKFLOW_STAGE_ID_SUBMISSION&&this.activeStage.statusId===pkp.const.STAGE_STATUS_SUBMISSION_UNASSIGNED},currentStage(){switch(this.activeStage.id){case pkp.const.WORKFLOW_STAGE_ID_SUBMISSION:return"submission";case pkp.const.WORKFLOW_STAGE_ID_INTERNAL_REVIEW:case pkp.const.WORKFLOW_STAGE_ID_EXTERNAL_REVIEW:return"review";case pkp.const.WORKFLOW_STAGE_ID_EDITING:return"copyediting";case pkp.const.WORKFLOW_STAGE_ID_PRODUCTION:return"production"}return""},currentStageLabel(){return this.isArchived?this.item.statusLabel:this.item.submissionProgress?this.t("submissions.incomplete"):this.activeStage.label},currentStageDescription(){return this.t("submission.list.currentStage",{stage:this.currentStageLabel})},isArchived(){return this.item.status===pkp.const.STATUS_SCHEDULED||this.item.status===pkp.const.STATUS_PUBLISHED||this.item.status===pkp.const.STATUS_DECLINED},isDeclined(){return this.item.status===pkp.const.STATUS_DECLINED},isScheduled(){return this.item.status===pkp.const.STATUS_SCHEDULED},isPublished(){return this.item.status===pkp.const.STATUS_PUBLISHED},openQueryCount(){return this.activeStage.openQueryCount},activeStageFilesLabel(){switch(this.activeStage.id){case pkp.const.WORKFLOW_STAGE_ID_INTERNAL_REVIEW:case pkp.const.WORKFLOW_STAGE_ID_EXTERNAL_REVIEW:return this.t("submission.list.revisionsSubmitted");case pkp.const.WORKFLOW_STAGE_ID_EDITING:return this.t("submission.list.copyeditsSubmitted");case pkp.const.WORKFLOW_STAGE_ID_PRODUCTION:return this.t("submission.list.galleysCreated")}return""},isSubmissionStage(){return this.activeStage.id===pkp.const.WORKFLOW_STAGE_ID_SUBMISSION},isReviewStage(){return this.activeStage.id===pkp.const.WORKFLOW_STAGE_ID_INTERNAL_REVIEW||this.activeStage.id===pkp.const.WORKFLOW_STAGE_ID_EXTERNAL_REVIEW},currentRoleAssignments(){let e=[];return this.item.stages.forEach(t=>{t.currentUserAssignedRoles.forEach(n=>{e.indexOf(n)===-1&&e.push(n)})}),e},dualWorkflowLinks(){return!this.userAssignedRole(pkp.const.ROLE_ID_AUTHOR)||!this.userAssignedRole([pkp.const.ROLE_ID_MANAGER,pkp.const.ROLE_ID_SUB_EDITOR,pkp.const.ROLE_ID_ASSISTANT])?"":this.t("submission.list.dualWorkflowLinks",{urlAuthorWorkflow:this.item.urlAuthorWorkflow,urlEditorialWorkflow:this.item.urlEditorialWorkflow})},reviewerWorkflowLink(){return!this.currentUserIsReviewer||!this.userAssignedRole([pkp.const.ROLE_ID_MANAGER,pkp.const.ROLE_ID_SUB_EDITOR,pkp.const.ROLE_ID_ASSISTANT])?"":this.t("submission.list.reviewerWorkflowLink",{urlEditorialWorkflow:this.item.urlEditorialWorkflow})},currentReviewAssignments(){if(!this.item.reviewRounds.length||!this.item.reviewAssignments.length)return[];var e=this.item.reviewRounds[this.item.reviewRounds.length-1].id;return this.item.reviewAssignments.filter(t=>t.roundId===e)},currentUserLatestReviewAssignment(){if(!this.currentUserIsReviewer)return!1;var e=this.item.reviewAssignments.filter(n=>n.isCurrentUserAssigned===!0);if(!e.length)return!1;var t=e.reduce((n,i)=>n.round>i.round?n:i);switch(t.statusId){case pkp.const.REVIEW_ASSIGNMENT_STATUS_AWAITING_RESPONSE:case pkp.const.REVIEW_ASSIGNMENT_STATUS_RESPONSE_OVERDUE:case pkp.const.REVIEW_ASSIGNMENT_STATUS_REQUEST_RESEND:t.responsePending=!0,t.reviewPending=!0;break;case pkp.const.REVIEW_ASSIGNMENT_STATUS_ACCEPTED:case pkp.const.REVIEW_ASSIGNMENT_STATUS_REVIEW_OVERDUE:t.reviewPending=!0;break;case pkp.const.REVIEW_ASSIGNMENT_STATUS_RECEIVED:case pkp.const.REVIEW_ASSIGNMENT_STATUS_COMPLETE:case pkp.const.REVIEW_ASSIGNMENT_STATUS_THANKED:t.reviewComplete=!0;break}return t},completedReviewsCount(){return this.isReviewStage?this.currentReviewAssignments.filter(e=>e.statusId>=pkp.const.REVIEW_ASSIGNMENT_STATUS_RECEIVED).length:0}},methods:{userAssignedRole:function(e){if(Array.isArray(e)||(e=[e]),this.currentRoleAssignments.length)return e.some(n=>this.currentRoleAssignments.includes(n));var t=e.filter(n=>n===pkp.const.ROLE_ID_SITE_ADMIN||n===pkp.const.ROLE_ID_MANAGER);return t.length?this.userHasRole(t):!1},filterByStage:function(e){this.$emit("addFilter","stageIds",e)},openInfoCenter(){var e={textTitle:this.localizeSubmission(this.currentPublication.fullTitle,this.currentPublication.locale),url:this.infoUrl.replace("__id__",this.item.id),closeCallback:this.resetFocusInfoCenter};$('<div id="'+$.pkp.classes.Helper.uuid()+'" class="pkp_modal pkpModalWrapper" tabindex="-1"></div>').pkpHandler("$.pkp.controllers.modal.AjaxModalHandler",e)},resetFocusInfoCenter(){this.$el.querySelector(".listPanel__item__openInfoCenter").focus()},openAssignParticipant(){var e={title:this.t("submission.list.assignEditor"),url:this.assignParticipantUrl.replace("__id__",this.item.id).replace("__stageId__",this.activeStage.id),closeCallback:this.resetFocusAssignParticipant};$('<div id="'+$.pkp.classes.Helper.uuid()+'" class="pkp_modal pkpModalWrapper" tabIndex="-1"></div>').pkpHandler("$.pkp.controllers.modal.AjaxModalHandler",e)},resetFocusAssignParticipant(){this.$el.querySelector(".listPanel__item--submission__notice button").focus()},deleteSubmissionPrompt(){this.openDialog({name:"deleteSubmission",title:this.t("common.delete"),message:this.t("editor.submissionArchive.confirmDelete"),actions:[{label:this.t("common.yes"),isWarnable:!0,callback:this.deleteSubmission},{label:this.t("common.no"),callback:e=>e()}],modalStyle:"negative"})},deleteSubmission(e){var t=this;$.ajax({url:this.apiUrl+"/"+this.item.id,type:"POST",headers:{"X-Csrf-Token":pkp.currentUser.csrfToken,"X-Http-Method-Override":"DELETE"},error:this.ajaxErrorCallback,success(){pkp.eventBus.$emit("deleted:submission",{id:t.item.id})},complete(){e()}})},userHasRole(e){Array.isArray(e)||(e=[e]);var t=!1;return e.forEach(n=>{pkp.currentUser.roles.indexOf(n)>-1&&(t=!0)}),t}}},gat={class:"listPanel__item--submission"},vat={class:"listPanel__itemSummary"},bat={class:"listPanel__itemIdentity listPanel__itemIdentity--submission"},yat={class:"listPanel__item--submission__id"},_at={class:"listPanel__itemTitle"},Sat={key:0},Cat={key:1},wat={class:"listPanel__itemSubtitle"},Eat={key:0,class:"listPanel__item--submission__reviewDetails"},kat={key:0,class:"listPanel__item--submission__dueDate"},xat={key:1,class:"listPanel__item--submission__dueDate"},Tat={key:1,class:"listPanel__item--submission__notice"},Iat={key:2,class:"listPanel__item--submission__notice space-x-1"},Aat={class:"align-middle"},Oat={class:"listPanel__itemActions"},Rat={key:0,class:"listPanel__item--submission__itemSummaryDetails"},Dat={class:"listPanel__item--submission__itemSummaryDetailsRow"},Lat={class:"listPanel__item--submission__flags","aria-hidden":"true"},Pat={key:0},Mat={key:1},Nat={key:2},Fat={key:0,class:"listPanel__item--submission__reviewCancelled"},$at={class:"align-middle"},Bat={key:1},Vat={class:"align-middle"},Hat={"aria-hidden":"true"},Uat={key:0,class:"-screenReader"},zat={key:1,class:"-screenReader"},Wat={key:0,class:"listPanel__itemExpanded listPanel__itemExpanded--submission"},jat={class:"listPanel__itemExpandedActions"};function Zat(e,t,n,i,a,l){const f=Xe("Icon"),d=Xe("Badge"),h=Xe("PkpButton"),b=Xe("Expander"),S=Xe("ListItem"),k=Xe("List"),T=Hr("strip-unsafe-html");return L(),Q("div",gat,[H("div",vat,[H("div",bat,[H("div",yat,ee(n.item.id),1),t[6]||(t[6]=D()),H("div",_at,[l.currentUserIsReviewer?(L(),Q("span",Sat,ee(e.t("submission.list.reviewAssignment")),1)):l.currentPublication.authorsStringShort?(L(),Q("span",Cat,ee(l.currentPublication.authorsStringShort),1)):we("",!0)]),t[7]||(t[7]=D()),Gn(H("div",wat,null,512),[[T,e.localizeSubmission(l.currentPublication.fullTitle,l.currentPublication.locale)]]),t[8]||(t[8]=D()),l.currentUserIsReviewer?(L(),Q("div",Eat,[l.currentUserLatestReviewAssignment.responsePending?(L(),Q("span",kat,ee(e.t("submission.list.responseDue",{date:l.currentUserLatestReviewAssignment.responseDue})),1)):we("",!0),t[3]||(t[3]=D()),l.currentUserLatestReviewAssignment.reviewPending?(L(),Q("span",xat,ee(e.t("submission.list.reviewDue",{date:l.currentUserLatestReviewAssignment.due})),1)):we("",!0)])):we("",!0),t[9]||(t[9]=D()),l.reviewerWorkflowLink?(L(),Q("div",Tat,[Gn(H("span",null,null,512),[[T,l.reviewerWorkflowLink]])])):l.notice?(L(),Q("div",Iat,[pe(f,{icon:"Error",class:"h-4 w-4",inline:!0}),t[4]||(t[4]=D()),H("span",Aat,ee(l.notice),1),t[5]||(t[5]=D()),l.shouldAssignEditor?(L(),Q("button",{key:0,class:"-linkButton",onClick:t[0]||(t[0]=wl((...O)=>l.openAssignParticipant&&l.openAssignParticipant(...O),["stop","prevent"]))},ee(e.t("submission.list.assignEditor")),1)):we("",!0)])):we("",!0)]),t[19]||(t[19]=D()),H("div",Oat,[l.currentUserIsReviewer?(L(),Q(bt,{key:1},[l.currentUserLatestReviewAssignment.reviewCancelled?(L(),Q("div",Fat,[pe(f,{icon:"Error",class:"me-1 h-4 w-4",inline:!0}),t[13]||(t[13]=D()),H("span",$at,ee(e.t("submission.list.reviewCancelled")),1)])):we("",!0),t[15]||(t[15]=D()),l.currentUserLatestReviewAssignment.reviewComplete?(L(),Q("div",Bat,[pe(f,{icon:"Complete",class:"me-1 h-4 w-4 text-success",inline:!0}),t[14]||(t[14]=D()),H("span",Vat,ee(e.t("submission.list.reviewComplete")),1)])):we("",!0)],64)):(L(),Q("div",Rat,[H("div",Dat,[H("div",Lat,[l.isReviewStage?(L(),Q("span",Pat,[pe(f,{icon:"User",class:"me-1 h-4 w-4 text-secondary",inline:!0}),D(" "+ee(l.completedReviewsCount)+"/"+ee(l.currentReviewAssignments.length),1)])):we("",!0),t[10]||(t[10]=D()),l.activeStage.files.count?(L(),Q("span",Mat,[pe(f,{icon:"MySubmissions",class:"me-1 h-4 w-4 text-secondary",inline:!0}),D(" "+ee(l.activeStage.files.count),1)])):we("",!0),t[11]||(t[11]=D()),l.openQueryCount?(L(),Q("span",Nat,[pe(f,{icon:"Comment",class:"me-1 h-4 w-4 text-secondary",inline:!0}),D(" "+ee(l.openQueryCount),1)])):we("",!0)]),t[12]||(t[12]=D()),pe(d,{class:"listPanel__item--submission__stage","is-button":!l.isArchived,label:l.currentStageDescription,stage:l.isArchived?"":l.currentStage,"is-primary":l.isScheduled,"is-success":l.isPublished,"is-warnable":l.isDeclined,onClick:t[1]||(t[1]=O=>l.filterByStage(l.activeStage.id))},{default:te(()=>[D(ee(l.currentStageLabel),1)]),_:1},8,["is-button","label","stage","is-primary","is-success","is-warnable"])])])),t[17]||(t[17]=D()),pe(h,{element:"a",href:n.item.urlWorkflow},{default:te(()=>[H("span",Hat,ee(e.t("common.view")),1),t[16]||(t[16]=D()),l.currentUserIsReviewer?(L(),Q("span",Uat,ee(e.t("common.viewWithName",{name:e.localizeSubmission(l.currentPublication.fullTitle,l.currentPublication.locale)})),1)):(L(),Q("span",zat,ee(e.t("common.viewWithName",{name:l.currentPublication.authorsStringShort})),1))]),_:1},8,["href"]),t[18]||(t[18]=D()),l.currentUserIsReviewer?we("",!0):(L(),Ee(b,{key:2,"is-expanded":a.isExpanded,"item-name":l.currentPublication.authorsStringShort,onToggle:t[2]||(t[2]=O=>a.isExpanded=!a.isExpanded)},null,8,["is-expanded","item-name"]))])]),t[26]||(t[26]=D()),a.isExpanded?(L(),Q("div",Wat,[pe(k,null,{default:te(()=>[l.isReviewStage?(L(),Ee(S,{key:0},{value:te(()=>[pe(f,{icon:"User",class:"me-2 h-4 w-4",inline:!0}),D(" "+ee(l.completedReviewsCount)+"/"+ee(l.currentReviewAssignments.length),1)]),default:te(()=>[D(" "+ee(e.t("submission.list.reviewsCompleted")),1)]),_:1})):we("",!0),t[20]||(t[20]=D()),l.isSubmissionStage?we("",!0):(L(),Ee(S,{key:1},{value:te(()=>[pe(f,{icon:"MySubmissions",class:"me-2 h-4 w-4",inline:!0}),D(" "+ee(l.activeStage.files.count),1)]),default:te(()=>[D(" "+ee(l.activeStageFilesLabel),1)]),_:1})),t[21]||(t[21]=D()),n.item.submissionProgress?we("",!0):(L(),Ee(S,{key:2},{value:te(()=>[pe(f,{icon:"Comment",class:"me-2 h-4 w-4",inline:!0}),D(" "+ee(l.openQueryCount),1)]),default:te(()=>[D(" "+ee(e.t("submission.list.discussions")),1)]),_:1})),t[22]||(t[22]=D()),l.dualWorkflowLinks?(L(),Ee(S,{key:3},{default:te(()=>[Gn(H("span",null,null,512),[[T,l.dualWorkflowLinks]])]),_:1})):we("",!0),t[23]||(t[23]=D()),pe(S,null,{default:te(()=>[H("span",null,ee(e.t("common.lastActivity",{date:e.localizeDate(n.item.dateLastActivity)})),1)]),_:1})]),_:1}),t[25]||(t[25]=D()),H("div",jat,[l.currentUserCanViewInfoCenter?(L(),Ee(h,{key:0,onClick:l.openInfoCenter},{default:te(()=>[D(ee(e.t("submission.list.infoCenter")),1)]),_:1},8,["onClick"])):we("",!0),t[24]||(t[24]=D()),l.currentUserCanDelete?(L(),Ee(h,{key:1,"is-warnable":!0,onClick:l.deleteSubmissionPrompt},{default:te(()=>[D(ee(e.t("common.delete")),1)]),_:1},8,["onClick"])):we("",!0)])])):we("",!0)])}const qat={components:{PkpButton:ms,Spinner:zl,Icon:Vs,ListPanel:Vf,Pagination:d0,PkpFilter:_C,PkpFilterSlider:sU,PkpFilterAutosuggest:Nne,PkpHeader:Bf,Search:j1,SubmissionsListItem:wt(hat,[["render",Zat]])},mixins:[SC],props:{addUrl:{type:String,required:!0},allowSubmissions:{type:Boolean,default(){return!0}},assignParticipantUrl:{type:String,default(){return""}},filters:{type:Array,default(){return[]}},id:{type:String,required:!0},infoUrl:{type:String,required:!0},items:{type:Array,default(){return[]}},itemsMax:{type:Number,defaut(){return 0}},title:{type:String,required:!0}},emits:["set"],data(){return{isSidebarVisible:!1}},computed:{currentUserCanFilter(){return this.userHasRole([pkp.const.ROLE_ID_MANAGER,pkp.const.ROLE_ID_SUB_EDITOR,pkp.const.ROLE_ID_ASSISTANT])},currentUserCanAddSubmission(){return this.allowSubmissions&&this.userHasRole([pkp.const.ROLE_ID_MANAGER,pkp.const.ROLE_ID_SUB_EDITOR,pkp.const.ROLE_ID_ASSISTANT,pkp.const.ROLE_ID_AUTHOR,pkp.const.ROLE_ID_REVIEWER])}},mounted(){pkp.eventBus.$on("updated:submission",()=>this.get()),pkp.eventBus.$on("deleted:submission",e=>{!e.id||!this.items.find(t=>t.id===e.id)||this.setItems(this.items.filter(t=>e.id!==t.id),this.itemsMax-1)})},unmounted(){pkp.eventBus.$off("updated:submission"),pkp.eventBus.$off("deleted:submission")},methods:{addFilter(e,t){if(e==="isIncomplete")this.activeFilters={isIncomplete:t},this.get();else{let n={...this.activeFilters};Object.prototype.hasOwnProperty.call(n,"isIncomplete")&&delete n.isIncomplete,["isOverdue","daysInactive","assignedTo","issueIds","sectionIds","categoryIds","assignedTo"].includes(e)?n[e]=t:(n[e]||(n[e]=[]),n[e].push(t)),this.activeFilters=n}},isFilterActive(e,t){return Object.keys(this.activeFilters).includes(e)?Array.isArray(this.activeFilters[e])?this.activeFilters[e].includes(t):["isOverdue","daysInactive"].includes(e)?!0:this.activeFilters[e]===t:!1},removeFilter(e,t){let n={...this.activeFilters};["isIncomplete","isOverdue","daysInactive","issueIds","sectionIds","categoryIds","assignedTo"].includes(e)?delete n[e]:n[e]=n[e].filter(i=>i!==t),this.activeFilters=n},setItems(e,t){this.$emit("set",this.id,{items:e,itemsMax:t})},userHasRole(e){Array.isArray(e)||(e=[e]);var t=!1;return e.forEach(n=>{pkp.currentUser.roles.indexOf(n)>-1&&(t=!0)}),t}}},Gat={class:"submissionsListPanel"};function Kat(e,t,n,i,a,l){const f=Xe("Spinner"),d=Xe("Search"),h=Xe("Icon"),b=Xe("PkpButton"),S=Xe("PkpHeader"),k=Xe("SubmissionsListItem"),T=Xe("Pagination"),O=Xe("ListPanel");return L(),Q("div",Gat,[pe(O,{"is-sidebar-visible":a.isSidebarVisible,items:n.items,class:"listPanel--submissions"},{header:te(()=>[pe(S,null,{actions:te(()=>[pe(d,{"search-phrase":e.searchPhrase,onSearchPhraseChanged:e.setSearchPhrase},null,8,["search-phrase","onSearchPhraseChanged"]),t[1]||(t[1]=D()),pe(b,{"is-active":a.isSidebarVisible,onClick:t[0]||(t[0]=P=>a.isSidebarVisible=!a.isSidebarVisible)},{default:te(()=>[pe(h,{icon:"Filter",class:"h-4 w-4",inline:!0}),D(" "+ee(e.t("common.filter")),1)]),_:1},8,["is-active"]),t[2]||(t[2]=D()),n.addUrl&&l.currentUserCanAddSubmission?(L(),Ee(b,{key:0,element:"a",href:n.addUrl},{default:te(()=>[D(ee(e.t("submission.submit.newSubmissionSingle")),1)]),_:1},8,["href"])):we("",!0)]),default:te(()=>[H("h2",null,ee(n.title),1),t[3]||(t[3]=D()),e.isLoading?(L(),Ee(f,{key:0})):we("",!0),t[4]||(t[4]=D())]),_:1})]),sidebar:te(()=>[pe(S,{"is-one-line":!1},{default:te(()=>[H("h3",null,[pe(h,{icon:"Filter",class:"h-4 w-4",inline:!0}),D(" "+ee(e.t("common.filter")),1)])]),_:1}),t[6]||(t[6]=D()),(L(!0),Q(bt,null,Sn(n.filters,(P,B)=>(L(),Q("div",{key:B,class:"listPanel__block"},[P.heading?(L(),Ee(S,{key:0},{default:te(()=>[H("h4",null,ee(P.heading),1)]),_:2},1024)):we("",!0),t[5]||(t[5]=D()),(L(!0),Q(bt,null,Sn(P.filters,W=>(L(),Ee(Io(W.filterType||"pkp-filter"),Cn({key:W.param+W.value,ref_for:!0},W,{"is-filter-active":l.isFilterActive(W.param,W.value),onAddFilter:l.addFilter,onRemoveFilter:l.removeFilter,onUpdateFilter:l.addFilter}),null,16,["is-filter-active","onAddFilter","onRemoveFilter","onUpdateFilter"]))),128))]))),128))]),itemsEmpty:te(()=>[e.isLoading?(L(),Q(bt,{key:0},[pe(f),D(" "+ee(e.t("common.loading")),1)],64)):(L(),Q(bt,{key:1},[D(ee(e.t("submission.list.empty")),1)],64))]),item:te(({item:P})=>[is(e.$slots,"item",{item:P},()=>[(L(),Ee(k,{key:P.id,item:P,"api-url":e.apiUrl,"info-url":n.infoUrl,"assign-participant-url":n.assignParticipantUrl,onAddFilter:l.addFilter},null,8,["item","api-url","info-url","assign-participant-url","onAddFilter"]))])]),footer:te(()=>[e.lastPage>1?(L(),Ee(T,{key:0,"current-page":e.currentPage,"is-loading":e.isLoading,"last-page":e.lastPage,onSetPage:e.setPage},null,8,["current-page","is-loading","last-page","onSetPage"])):we("",!0)]),_:3},8,["is-sidebar-visible","items"])])}const Yat=wt(qat,[["render",Kat]]),Xat={class:"flex"},Jat={class:"flex-grow"},Qat={class:"flex-shrink-0"},iU={name:"Container",components:{ListPanel:Vf,PkpForm:oa,SelectReviewerListPanel:vSe,SubmissionsListPanel:Yat,ReviewerManagerReadReviewModal:{__name:"ReviewerManagerReadReviewModal",props:{title:{type:String,required:!0},submissionId:{type:String,required:!0},reviewRoundId:{type:String,required:!0},reviewAssignmentId:{type:String,required:!0},submissionStageId:{type:String,required:!0}},setup(e){const t=e,{t:n}=Jn(),i=[{label:"".concat(n("editor.review.authorOnly")," (PDF)"),name:"authorPdf"},{label:"".concat(n("editor.review.authorOnly")," (XML)"),name:"authorXml"},{label:"".concat(n("editor.review.allSections")," (PDF)"),name:"editorPdf"},{label:"".concat(n("editor.review.allSections")," (XML)"),name:"editorXml"}];async function a(l){let f,d;switch(l){case"authorPdf":f="export-pdf",d=1;break;case"authorXml":f="export-xml",d=1;break;case"editorPdf":f="export-pdf",d=0;break;case"editorXml":f="export-xml",d=0;break}const{apiUrl:h}=to("reviews/".concat(t.submissionId,"/").concat(t.reviewAssignmentId,"/").concat(f,"?authorFriendly=").concat(d)),{data:b,fetch:S,isSuccess:k,validationError:T}=fr(h,{method:"GET",expectValidationError:!0});if(await S(),T.value)pkp.eventBus.$emit("notify",T.value.error,"warning");else if(k.value){const O=document.createElement("a");O.href=to("reviews/".concat(t.submissionId,"/exports/").concat(b.value.temporaryFileId)).apiUrl.value,document.body.appendChild(O),O.click(),document.body.removeChild(O)}}return(l,f)=>(L(),Q("div",Xat,[H("div",Jat,[H("h2",null,ee(e.title),1)]),f[0]||(f[0]=D()),H("div",Qat,[pe(z1,{actions:i,label:se(n)("editor.review.download"),onAction:a},null,8,["label"])])]))}}},data(){return{components:{}}},mounted(){pkp.eventBus.$on("set-form-languages",e=>{let t;Array.isArray(e)?t=[...e]:(t={...e},t.isGlobalEvent&&delete t.isGlobalEvent,t.handler&&delete t.handler,t=Object.values(t)),Object.keys(this.components).forEach(n=>{typeof this.components[n].supportedFormLocales<"u"&&(this.components[n].supportedFormLocales=t)})})},unmounted(){pkp.eventBus.$off("set-form-languages")},methods:{get(e){return this.components[e]?this.components[e]:{}},set:function(e,t){let n={...this.get(e)};Object.keys(t).forEach(function(i){n[i]=t[i]}),this.components[e]=n}}},elt={name:"AdvancedSearchReviewerContainer",components:{SelectReviewerListPanel:vSe},extends:iU,data(){return{showAllAuthors:!1}},computed:{displayedItems(){return this.showAllAuthors?this.authors:Object.keys(this.authors).slice(0,4).reduce((t,n)=>(t[n]=this.authors[n],t),{})},authorCount(){return Object.keys(this.authors).length}},methods:{toggleShowAllAuthors(){this.showAllAuthors=!this.showAllAuthors}}},tlt={class:"section pkpAdvancedSearchReviewerContainer"},nlt={class:"list_outline"},slt={class:"list_box"},olt={key:0},rlt={key:0,class:"action_container"};function ilt(e,t,n,i,a,l){const f=Xe("SelectReviewerListPanel");return L(),Q("div",null,[H("div",tlt,[H("h3",null,ee(e.labels.submissionAuthorList),1),t[6]||(t[6]=D()),H("div",nlt,[H("ol",slt,[(L(!0),Q(bt,null,Sn(l.displayedItems,(d,h)=>(L(),Q("li",{key:h,class:"author_row"},[H("strong",null,ee(h),1),t[2]||(t[2]=D()),d?(L(),Q("span",olt,ee(" - "))):we("",!0),t[3]||(t[3]=D()),H("span",null,ee(d),1)]))),128))]),t[5]||(t[5]=D()),l.authorCount>4?(L(),Q("div",rlt,[a.showAllAuthors?we("",!0):(L(),Q("span",{key:0,class:"show_authors_action",onClick:t[0]||(t[0]=(...d)=>l.toggleShowAllAuthors&&l.toggleShowAllAuthors(...d))},ee("".concat(e.labels.showAll," ").concat(l.authorCount," ").concat(e.labels.authorsLabel)),1)),t[4]||(t[4]=D()),a.showAllAuthors?(L(),Q("span",{key:1,class:"show_authors_action",onClick:t[1]||(t[1]=(...d)=>l.toggleShowAllAuthors&&l.toggleShowAllAuthors(...d))},ee(e.labels.showLess),1)):we("",!0)])):we("",!0)])]),t[7]||(t[7]=D()),pe(f,Cn(e.components.selectReviewer,{onSet:e.set}),null,16,["onSet"])])}const alt=wt(elt,[["render",ilt]]),llt={class:"fixed inset-0 overflow-hidden"},clt={class:"absolute inset-0 overflow-hidden"},ult={class:"pointer-events-none fixed inset-y-0 flex max-w-full ltr:right-0 ltr:pl-10 rtl:left-0 rtl:pr-10"},aU={__name:"SideModal",props:{open:{type:Boolean,required:!0},modalLevel:{type:Number,required:!1,default:0}},emits:["close"],setup(e,{emit:t}){const n=e,i=t,a=kt(null),l=kt([]);function f(h){l.value.push(h)}function d(h){let b=!0;l.value.forEach(S=>b=S()),b&&i("close",h)}return Ba("closeModal",d),Ba("registerCloseCallback",f),Ba("modalLevel",kt(n.modalLevel)),Ba("closeModalButton",a),(h,b)=>(L(),Ee(se(QV),{as:"template",show:e.open},{default:te(()=>[pe(se(ete),{as:"div",class:"relative z-10","initial-focus":a.value,onClose:d},{default:te(()=>[pe(se(Zw),{as:"template",enter:"ease-in-out duration-500","enter-from":"opacity-0","enter-to":"opacity-100",leave:"ease-in-out duration-500","leave-from":"opacity-100","leave-to":"opacity-0"},{default:te(()=>b[0]||(b[0]=[H("div",{class:"fixed inset-0 bg-blur transition-opacity"},null,-1)])),_:1}),b[1]||(b[1]=D()),H("div",llt,[H("div",clt,[H("div",ult,[pe(se(Zw),{as:"template",enter:"transform transition ease-in-out duration-500","enter-from":"ltr:translate-x-full rtl:-translate-x-full","enter-to":"translate-x-0",leave:"transform transition ease-in-out duration-500","leave-from":"translate-x-0","leave-to":"ltr:translate-x-full rtl:-translate-x-full"},{default:te(()=>[H("div",null,[is(h.$slots,"default")])]),_:3})])])])]),_:3},8,["initial-focus"])]),_:3},8,["show"]))}},dlt={__name:"AjaxModalWrapper",props:{legacyOptions:{type:Object,default:()=>{}}},setup(e){const t=Mr("closeModal"),n=kt(null),i=window.pkp,a=[],{data:l,fetch:f}=fr(e.legacyOptions.url);Mr("registerCloseCallback")(()=>{const k=$(n.value).find("form").first();if(k.length==1){const T={closePermitted:!0};if(k.trigger("containerClose",[T]),!T.closePermitted)return!1}return!0});function h(k){var T,O;if((O=(T=k==null?void 0:k.target)==null?void 0:T.className)!=null&&O.includes("requestHelpPanel")){k.preventDefault();const P=$(k.target),B=$.extend({},P.data(),{caller:P});$("#pkpHelpPanel").trigger("pkp.HelpPanel.Open",B)}}function b(...k){var T;if(e.legacyOptions.modalHandler)e.legacyOptions.modalHandler.getHtmlElement().trigger(...k);else{const O=(T=k==null?void 0:k[0])==null?void 0:T.type;O==="dataChanged"&&(a.push(k==null?void 0:k[1]),$("body").trigger("notifyUser")),["formSubmitted","formCanceled","ajaxHtmlError","modalFinished","wizardClose","wizardCancel"].includes(O)&&t({dataChanged:a})}}function S(k,T){e.legacyOptions.closeOnFormSuccessId&&e.legacyOptions.closeOnFormSuccessId===k&&setTimeout(function(){e.legacyOptions.modalHandler?e.legacyOptions.modalHandler.modalClose():t({formId:k,data:T})},1e3)}return Pr(async()=>{await f(),l.value&&($(n.value).html(l.value.content),$(n.value).bind("formSubmitted",b),$(n.value).bind("wizardClose",b),$(n.value).bind("wizardCancel",b),$(n.value).bind("formCanceled",b),$(n.value).bind("ajaxHtmlError",b),$(n.value).bind("modalFinished",b),$(n.value).bind("redirectRequested",b),$(n.value).bind("dataChanged",b),$(n.value).bind("updateHeader",b),$(n.value).bind("gridRefreshRequested",b),i.eventBus.$on("form-success",S))}),wb(()=>{$(n.value).unbind("formSubmitted",b),$(n.value).unbind("wizardClose",b),$(n.value).unbind("wizardCancel",b),$(n.value).unbind("formCanceled",b),$(n.value).unbind("ajaxHtmlError",b),$(n.value).unbind("modalFinished",b),$(n.value).unbind("redirectRequested",b),$(n.value).unbind("dataChanged",b),$(n.value).unbind("updateHeader",b),$(n.value).unbind("gridRefreshRequested",b),i.eventBus.$off("form-success",S)}),(k,T)=>(L(),Q("div",{ref_key:"contentDiv",ref:n,onClick:h},null,512))}},flt={class:"mt-1 text-lg-normal"},plt={class:"p-4"},mlt={class:"bg-secondary p-4"},hlt={__name:"SideModalBodyLegacyAjax",props:{legacyOptions:{type:Object,default:null}},setup(e){return(t,n)=>(L(),Ee(il,null,{title:te(()=>[D(ee(e.legacyOptions.title),1)]),description:te(()=>[H("p",flt,ee(e.legacyOptions.description),1)]),default:te(()=>[n[0]||(n[0]=D()),n[1]||(n[1]=D()),H("div",plt,[H("div",mlt,[(L(),Ee(dlt,{key:e.legacyOptions.url,"legacy-options":e.legacyOptions},null,8,["legacy-options"]))])])]),_:1}))}},glt={class:"fixed inset-0 z-20 overflow-y-auto"},vlt={class:"flex min-h-full items-end justify-center p-4 text-center sm:items-start sm:p-0"},blt={class:"-screenReader"},ylt={class:"flex min-h-12 items-center"},_lt={class:"px-4"},Slt={class:"semantic-defaults"},pR={__name:"Dialog",props:{opened:{type:Boolean,default:!1},title:{type:String,required:!1,default:""},message:{type:String,default:null},bodyComponent:{type:Object,default:null},bodyProps:{type:Object,default:null},actions:{type:Array,default:()=>[]},close:{type:Function,default:null},modalStyle:{type:String,default:()=>"primary",validator:e=>["primary","negative","success","basic"].includes(e)},isDismissible:{type:Boolean,default:()=>!0}},emits:["close"],setup(e,{emit:t}){const n=e,i=Ge(()=>({"relative mx-3 w-10/12 max-w-3xl transform overflow-hidden rounded bg-secondary text-start shadow transition-all sm:my-8":!0,"border-none":n.modalStyle==="basic","border-s-[14px] border-primary":n.modalStyle==="primary","border-s-[14px] border-success":n.modalStyle==="success","border-s-[14px] border-negative":n.modalStyle==="negative"})),a=Ge(()=>{switch(n.modalStyle){case"negative":return"Cancel";case"success":return"Complete";default:return null}}),l=Ge(()=>({"flex h-12 w-12 items-center justify-center rounded-full":!0,"bg-success":n.modalStyle==="success","bg-negative":n.modalStyle==="negative"})),f=Ge(()=>{var k;return!((k=n.actions)!=null&&k.length)}),d=t,h=kt(!1);function b(k){!n.isDismissible&&k==="default"||(n.close&&n.close(),d("close"))}function S(k){h.value=!0,typeof k=="function"&&k(()=>{b()})}return(k,T)=>{const O=Hr("strip-unsafe-html");return L(),Ee(se(QV),{as:"template",show:e.opened},{default:te(()=>[pe(se(ete),{class:"modal",onClose:T[0]||(T[0]=P=>b("default"))},{default:te(()=>[pe(se(Zw),{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"ease-in duration-200","leave-from":"opacity-100","leave-to":"opacity-0"},{default:te(()=>T[1]||(T[1]=[H("div",{class:"fixed inset-0 z-10 bg-blur bg-opacity-75 transition-opacity"},null,-1)])),_:1}),T[9]||(T[9]=D()),H("div",glt,[H("div",vlt,[pe(se(Zw),{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95","enter-to":"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200","leave-from":"opacity-100 translate-y-0 sm:scale-100","leave-to":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"},{default:te(()=>[pe(se(tte),{"data-cy":"dialog",class:Rn(i.value)},{default:te(()=>[f.value?(L(),Q("button",{key:0,class:"absolute right-3 top-3 cursor-pointer bg-transparent",onClick:b},[pe(Vs,{class:"h-6 w-6 text-negative",icon:"Cancel","aria-hidden":!0}),T[2]||(T[2]=D()),H("span",blt,ee(k.t("common.close")),1)])):we("",!0),T[6]||(T[6]=D()),H("div",ylt,[e.title?(L(),Ee(se(nte),{key:0,class:Rn(["m-0 inline-flex min-w-[1px] items-center overflow-x-hidden overflow-ellipsis px-8 pt-12 text-4xl-bold",a.value?"pb-5":"pb-8"])},{default:te(()=>[a.value?(L(),Q("div",{key:0,class:Rn(l.value)},[pe(Vs,{icon:a.value,class:"h-11 w-11 text-on-dark"},null,8,["icon"])],2)):we("",!0),T[3]||(T[3]=D()),H("span",_lt,ee(e.title),1)]),_:1},8,["class"])):we("",!0)]),T[7]||(T[7]=D()),H("div",{class:Rn(["modal-content",a.value?"px-24":"pt- px-12"])},[Gn(H("div",Slt,null,512),[[O,e.message]]),T[4]||(T[4]=D()),e.bodyComponent?(L(),Ee(Io(e.bodyComponent),CS(Cn({key:0},e.bodyProps)),null,16)):we("",!0)],2),T[8]||(T[8]=D()),H("div",{class:Rn(["flex items-center gap-x-4",a.value?"p-10 ps-24":"p-12"])},[(L(!0),Q(bt,null,Sn(e.actions,P=>(L(),Ee(ms,{key:P.label,element:P.element||"button",href:P.href||null,"is-primary":P.isPrimary||null,"is-warnable":P.isWarnable||null,"is-disabled":h.value,onClick:B=>P.callback?S(P.callback):null},{default:te(()=>[D(ee(P.label),1)]),_:2},1032,["element","href","is-primary","is-warnable","is-disabled","onClick"]))),128)),T[5]||(T[5]=D()),h.value?(L(),Ee(zl,{key:0})):we("",!0)],2)]),_:1},8,["class"])]),_:1})])])]),_:1})]),_:1},8,["show"])}}},Clt={__name:"ModalManager",setup(e){const t={LegacyAjax:hlt,WorkflowLogResponseModal:F5e},n=rO(),{sideModal1:i,sideModal2:a,sideModal3:l,sideModal4:f,dialogProps:d,dialogOpened:h,dialogLevel:b}=c0e(rO()),S=Ge(()=>{var Z,Y,z,q;return(Z=f.value)!=null&&Z.opened?f.value.modalId:(Y=l.value)!=null&&Y.opened?l.value.modalId:(z=a.value)!=null&&z.opened?a.value.modalId:(q=i.value)!=null&&q.opened?i.value.modalId:null}),k=Ge(()=>{var Z;return(Z=i.value)!=null&&Z.component?t[i.value.component]||i.value.component:null}),T=Ge(()=>{var Z;return(Z=a.value)!=null&&Z.component?t[a.value.component]||a.value.component:null}),O=Ge(()=>{var Z;return(Z=l.value)!=null&&Z.component?t[l.value.component]||l.value.component:null}),P=Ge(()=>{var Z;return(Z=f.value)!=null&&Z.component?t[f.value.component]||f.value.component:null});function B(Z,Y){n.closeSideModalById(!0,Z,Y)}function W(){n.closeDialog()}return(Z,Y)=>{var z,q,ne;return L(),Q(bt,null,[(L(),Ee(aU,{key:(z=se(i))==null?void 0:z.modalId,"data-cy":S.value===((q=se(i))==null?void 0:q.modalId)?"active-modal":void 0,"close-label":"Close",open:((ne=se(i))==null?void 0:ne.opened)||!1,"modal-level":1,onClose:Y[3]||(Y[3]=ue=>{var J;return B((J=se(i))==null?void 0:J.modalId,ue)})},{default:te(()=>{var ue,J,ce,ge;return[(L(),Ee(Io(k.value),CS(RS((ue=se(i))==null?void 0:ue.props)),null,16)),Y[9]||(Y[9]=D()),(L(),Ee(pR,Cn({key:JSON.stringify(se(d)),opened:se(h)&&se(b)===1},se(d),{onClose:W}),null,16,["opened"])),Y[10]||(Y[10]=D()),(L(),Ee(aU,{key:(J=se(a))==null?void 0:J.modalId,"close-label":"Close","data-cy":S.value===((ce=se(a))==null?void 0:ce.modalId)?"active-modal":void 0,"modal-level":2,open:((ge=se(a))==null?void 0:ge.opened)||!1,onClose:Y[2]||(Y[2]=de=>{var he;return B((he=se(a))==null?void 0:he.modalId,de)})},{default:te(()=>{var de,he,ie,Be;return[(L(),Ee(Io(T.value),Cn({key:(de=se(a))==null?void 0:de.modalId},(he=se(a))==null?void 0:he.props),null,16)),Y[7]||(Y[7]=D()),(L(),Ee(pR,Cn({key:JSON.stringify(se(d)),opened:se(h)&&se(b)===2},se(d),{onClose:W}),null,16,["opened"])),Y[8]||(Y[8]=D()),pe(aU,{"data-cy":S.value===((ie=se(l))==null?void 0:ie.modalId)?"active-modal":void 0,"close-label":"Close","modal-level":3,open:((Be=se(l))==null?void 0:Be.opened)||!1,onClose:Y[1]||(Y[1]=$e=>{var Ue;return B((Ue=se(l))==null?void 0:Ue.modalId,$e)})},{default:te(()=>{var $e,Ue,V,Ye;return[(L(),Ee(Io(O.value),Cn({key:($e=se(l))==null?void 0:$e.modalId},(Ue=se(l))==null?void 0:Ue.props),null,16)),Y[5]||(Y[5]=D()),(L(),Ee(pR,Cn({key:JSON.stringify(se(d)),opened:se(h)&&se(b)===3},se(d),{onClose:W}),null,16,["opened"])),Y[6]||(Y[6]=D()),pe(aU,{"data-cy":S.value===((V=se(f))==null?void 0:V.modalId)?"active-modal":void 0,"close-label":"Close","modal-level":4,open:((Ye=se(f))==null?void 0:Ye.opened)||!1,onClose:Y[0]||(Y[0]=Fe=>{var St;return B((St=se(f))==null?void 0:St.modalId,Fe)})},{default:te(()=>{var Fe,St;return[(L(),Ee(Io(P.value),Cn({key:(Fe=se(f))==null?void 0:Fe.modalId},(St=se(f))==null?void 0:St.props),null,16)),Y[4]||(Y[4]=D()),(L(),Ee(pR,Cn({key:JSON.stringify(se(d)),opened:se(h)&&se(b)===4},se(d),{onClose:W}),null,16,["opened"]))]}),_:1},8,["data-cy","open"])]}),_:1},8,["data-cy","open"])]}),_:1},8,["data-cy","open"]))]}),_:1},8,["data-cy","open"])),Y[11]||(Y[11]=D()),(L(),Ee(pR,Cn({key:JSON.stringify(se(d)),opened:se(h)&&se(b)===0},se(d),{onClose:W}),null,16,["opened"]))],64)}}},wlt={key:0,class:"flex flex-wrap items-center gap-2"},Elt={class:"text-lg-normal"},klt={class:"text-lg-semibold"},xlt=["onClick"],Tlt={class:"sr-only"},Ilt={__name:"DashboardActiveFilters",props:{activeFiltersList:{type:Array,required:!0}},emits:["clearFilters","removeFilter"],setup(e,{emit:t}){const{t:n}=Jn(),i=t;return(a,l)=>e.activeFiltersList.length?(L(),Q("div",wlt,[(L(!0),Q(bt,null,Sn(e.activeFiltersList,f=>(L(),Q("div",{key:f.fieldLabel+f.label,class:"flex flex-none items-center gap-x-1 rounded bg-selection-light px-2 py-1.5"},[H("span",Elt,ee(f.fieldLabel)+":",1),l[2]||(l[2]=D()),H("span",klt,ee(f.label),1),l[3]||(l[3]=D()),H("button",{class:"flex items-center border-0 bg-transparent",onClick:(...d)=>i("removeFilter",f.name,f.value)},[pe(Vs,{class:"h-4 w-4 text-negative",icon:"Cancel","aria-hidden":!0}),l[1]||(l[1]=D()),H("span",Tlt,ee(se(n)("common.filterRemove",{filterTitle:"".concat(f.fieldLabel,": ").concat(f.label)})),1)],8,xlt)]))),128)),l[4]||(l[4]=D()),pe(ms,{"is-warnable":!0,"is-link":!0,onClick:l[0]||(l[0]=(...f)=>i("clearFilters",...f))},{default:te(()=>[D(ee(se(n)("common.filtersClear")),1)]),_:1})])):we("",!0)}},Alt=["checked","aria-describedby","disabled"],Olt={__name:"TableCellSelect",props:{checked:{type:Boolean,required:!0},describedBy:{type:String,required:!0},disabled:{type:Boolean,required:!1,default:!1}},emits:["change"],setup(e,{emit:t}){const n=e,i=t;return(a,l)=>(L(),Ee(as,null,{default:te(()=>[H("input",{class:Rn({"sr-only":e.disabled}),type:"checkbox",checked:n.checked,"aria-describedby":e.describedBy,disabled:e.disabled,onChange:l[0]||(l[0]=f=>i("change",f.target.checked))},null,42,Alt)]),_:1}))}},Rlt={__name:"DashboardCellBulkDelete",props:{item:{type:Object,required:!0}},setup(e){const t=e,n=Wp(),i=Ge(()=>n.bulkDeleteSelectedItems.includes(t.item.id)),a=Ge(()=>n.bulkDeleteSubmissionIdsCanBeDeleted.includes(t.item.id));function l(f){f?n.bulkDeleteSelectItem(t.item.id):n.bulkDeleteDeselectItem(t.item.id)}return(f,d)=>(L(),Ee(Olt,{disabled:!a.value,checked:i.value,"described-by":"submission-title-"+e.item.id,onChange:l},null,8,["disabled","checked","described-by"]))}},Dlt={__name:"DashboardCellSubmissionActions",props:{item:{type:Object,required:!0}},setup(e){const{hasCurrentUserAtLeastOneAssignedRoleInAnyStage:t,isCurrentUserAssignedAsReviewer:n}=Nh(),i=e,a=Ge(()=>!(i.item.submissionProgress||f.dashboardPage===$f.EDITORIAL_DASHBOARD&&(n(i.item)||t(i.item,[pkp.const.ROLE_ID_AUTHOR]))&&!t(i.item,[pkp.const.ROLE_ID_MANAGER,pkp.const.ROLE_ID_SUB_EDITOR,pkp.const.ROLE_ID_ASSISTANT])));function l(){f.openWorkflowModal(i.item.id)}const f=Wp();return(d,h)=>(L(),Ee(as,null,{default:te(()=>[a.value?(L(),Ee(ms,{key:0,class:"-ms-3","aria-describedby":"submission-title-"+e.item.id,"is-link":!0,onClick:l},{default:te(()=>[D(ee(d.t("common.view")),1)]),_:1},8,["aria-describedby"])):we("",!0)]),_:1}))}},Llt={class:"flex max-w-sm items-center gap-x-2 break-words"},Plt={key:0},Mlt={__name:"DashboardCellSubmissionActivityActionAlert",props:{alert:{type:String,required:!1,default:null},actionLabel:{type:String,required:!1,default:null},actionName:{type:String,required:!1,default:null},actionArgs:{type:Object,required:!1,default:()=>{}}},setup(e){const t=e,n=Wp();function i(){n[t.actionName](t.actionArgs)}return(a,l)=>(L(),Q("div",Llt,[e.alert?(L(),Q("div",Plt,ee(e.alert),1)):we("",!0),l[0]||(l[0]=D()),e.actionName?(L(),Ee(ms,{key:1,"size-variant":"compact",onClick:i},{default:te(()=>[D(ee(e.actionLabel),1)]),_:1})):we("",!0)]))}},Nlt={class:"p-4"},Hne={__name:"Popover",props:{sizeVariant:{required:!1,type:String,default:()=>"default",validator:e=>["default","content"].includes(e)}},setup(e){const t=e,n=Ge(()=>t.sizeVariant==="content"?"max-w-sm":"w-screen max-w-sm");return(i,a)=>(L(),Ee(se(Mye),{class:"relative inline-block"},{default:te(()=>[pe(se(JVe),{class:"text-sm text-gray-900 inline-flex items-center gap-x-1 font-semibold leading-6"},{default:te(()=>[is(i.$slots,"button")]),_:3}),a[2]||(a[2]=D()),pe(s5,{"enter-active-class":"transition ease-out duration-150","enter-from-class":"opacity-0 translate-y-1","enter-to-class":"opacity-100 translate-y-0","leave-active-class":"transition ease-in duration-100","leave-from-class":"opacity-100 translate-y-0","leave-to-class":"opacity-0 translate-y-1"},{default:te(()=>[pe(se(QVe),{class:"absolute left-1/2 z-10 mt-2 flex w-screen max-w-max -translate-x-1/2 px-4"},{default:te(()=>[a[0]||(a[0]=H("div",{class:"tooltip-arrow absolute left-1/2 z-20 h-4 w-4 origin-top-right -translate-x-1/2 rotate-45 bg-secondary shadow"},null,-1)),a[1]||(a[1]=D()),H("div",{class:Rn([n.value,"text-sm flex-auto rounded bg-secondary shadow"])},[H("div",Nlt,[is(i.$slots,"default")])],2)]),_:3})]),_:3})]),_:3}))}},Flt={class:"relative inline-flex items-center justify-center"},$lt=["stroke-width","r","cx","cy"],Blt=["stroke-dasharray","stroke-width","r","cx","cy"],Vlt=["r","cx","cy"],Hlt={class:"sr-only"},Ult={class:"sr-only"},mR=24,zlt=1.5,Wlt=1,jlt={__name:"ReviewActivityIndicator",props:{colorVariant:{required:!0,type:String,validator:e=>["primary","attention","negative","success","stage-in-review"].includes(e)},displayVariant:{required:!0,type:String,validator:e=>["progress","fill"].includes(e)},progress:{type:Number,required:!1,default:()=>null},icon:{type:String,required:!1,default:()=>null},text:{type:String,required:!1,default:()=>null},srLabel:{type:String,required:!0}},setup(e){function t(k,T){const O=(k-T)/2;return{radius:O,width:T,x:O+T/2,y:O+T/2}}const n=e,i=t(mR,zlt),a=t(mR,Wlt),l=t(mR,0),f=i.radius*2*Math.PI,d=Ge(()=>n.displayVariant==="fill"&&["attention","negative","stage-in-review","success"].includes(n.colorVariant)?"text-on-dark":"text-default"),h=Ge(()=>n.displayVariant==="progress"?{primary:"stroke-primary",attention:"stroke-attention",negative:"stroke-negative",success:"stroke-success","stage-in-review":"stroke-stage-in-review"}[n.colorVariant]:""),b=Ge(()=>n.displayVariant==="fill"?{primary:"fill-primary",attention:"fill-attention",negative:"fill-negative",success:"fill-success","stage-in-review":"fill-stage-in-review"}[n.colorVariant]:""),S=Ge(()=>{const k=n.progress/100*f,T=f-k,O=.75*f,P=O-k;let B;return n.progress<=75?B=[0,P,k,T]:B=[O,T],B.join(" ")});return(k,T)=>(L(),Q("span",Flt,[(L(),Q("svg",{height:mR,width:mR},[H("circle",{stroke:"#BBBBBB",fill:"transparent","stroke-width":se(a).width,r:se(a).radius,cx:se(a).x,cy:se(a).y},null,8,$lt),T[0]||(T[0]=D()),h.value?(L(),Q("circle",{key:0,class:Rn(h.value),fill:"transparent","stroke-dasharray":S.value,"stroke-width":se(i).width,r:se(i).radius,cx:se(i).x,cy:se(i).y},null,10,Blt)):we("",!0),T[1]||(T[1]=D()),b.value?(L(),Q("circle",{key:1,class:Rn(b.value),r:se(l).radius,cx:se(l).x,cy:se(l).y},null,10,Vlt)):we("",!0)])),T[2]||(T[2]=D()),H("span",Hlt,ee(e.srLabel),1),T[3]||(T[3]=D()),H("span",Ult,ee(k.t("common.viewMoreDetails")),1),T[4]||(T[4]=D()),e.text?(L(),Q("span",{key:0,"aria-hidden":"true",class:Rn([d.value,"absolute text-sm-normal"])},ee(e.text),3)):we("",!0),T[5]||(T[5]=D()),e.icon?(L(),Ee(Vs,{key:1,class:Rn([d.value,"absolute h-5 w-5"]),icon:e.icon},null,8,["class","icon"])):we("",!0)]))}},Zlt={class:"flex gap-x-1"},qlt={class:"sr-only"},Glt={class:"text-base-normal uppercase text-default"},bSe={__name:"ReviewMethodIcons",props:{reviewMethod:{type:Number,required:!0},sizeVariants:{required:!1,type:String,default:()=>"default",validator:e=>["default","large"].includes(e)}},setup(e){const t=e,{t:n}=Jn(),i=Ge(()=>{switch(t.reviewMethod){case pkp.const.SUBMISSION_REVIEW_METHOD_ANONYMOUS:return["OpenReview","AnonymousReview"];case pkp.const.SUBMISSION_REVIEW_METHOD_DOUBLEANONYMOUS:return["AnonymousReview","AnonymousReview"];case pkp.const.SUBMISSION_REVIEW_METHOD_OPEN:return["OpenReview","OpenReview"]}return["OpenReview","OpenReview"]}),a=Ge(()=>{switch(t.reviewMethod){case pkp.const.SUBMISSION_REVIEW_METHOD_ANONYMOUS:return n("editor.submissionReview.anonymous");case pkp.const.SUBMISSION_REVIEW_METHOD_DOUBLEANONYMOUS:return n("editor.submissionReview.doubleAnonymous");case pkp.const.SUBMISSION_REVIEW_METHOD_OPEN:return n("editor.submissionReview.open")}return n("editor.submissionReview.open")}),l=Ge(()=>t.sizeVariants==="large"?"h-6 w-6":"h-5 w-5");return(f,d)=>(L(),Q("span",null,[pe(Hne,{"size-variant":"content"},{button:te(()=>[H("span",Zlt,[(L(!0),Q(bt,null,Sn(i.value,h=>(L(),Ee(Vs,{key:h,class:Rn(l.value),icon:h,"aria-hidden":"true"},null,8,["class","icon"]))),128)),d[0]||(d[0]=D()),H("span",qlt,ee(a.value),1)])]),default:te(()=>[d[1]||(d[1]=D()),H("span",Glt,ee(a.value),1)]),_:1})]))}},Klt={key:0,class:"mb-5 flex"},Ylt={class:"flex items-center justify-between"},Xlt={class:"text-lg-bold"},Jlt={key:1,class:"mt-1 border-t border-light pt-4 text-start text-base-normal"},Qlt={key:2,class:"-ms-3 text-start"},ect={key:3,class:"mt-4 flex"},ySe=Object.assign({},{__name:"ReviewActivityIndicatorPopover",props:{title:{type:String,required:!1,default:null},description:{type:String,required:!1,default:null},reviewMethod:{type:Number,required:!0},reviewerName:{type:String,required:!0,default:""},primaryButton:{type:Object,required:!1,default:null},negativeButton:{type:Object,required:!1,default:null},textButton:{type:Object,required:!1,default:null},titleBadgeProps:{type:Object,required:!1,default:null}},emits:["action"],setup(e,{emit:t}){const n=t;function i(a){n("action",a,{})}return(a,l)=>{const f=Hr("strip-unsafe-html");return L(),Q(bt,null,[e.title?(L(),Q("div",Klt,[pe(kd,CS(RS(e.titleBadgeProps)),{default:te(()=>[D(ee(e.title),1)]),_:1},16)])):we("",!0),l[5]||(l[5]=D()),H("div",Ylt,[H("span",Xlt,ee(e.reviewerName),1),l[3]||(l[3]=D()),pe(bSe,{"size-variants":"large","review-method":e.reviewMethod},null,8,["review-method"])]),l[6]||(l[6]=D()),e.description?(L(),Q("div",Jlt,[Gn(H("p",null,null,512),[[f,e.description]])])):we("",!0),l[7]||(l[7]=D()),e.textButton?(L(),Q("div",Qlt,[e.textButton?(L(),Ee(ms,{key:0,"is-link":!0,onClick:l[0]||(l[0]=()=>i(e.textButton.action))},{default:te(()=>[D(ee(e.textButton.label),1)]),_:1})):we("",!0)])):we("",!0),l[8]||(l[8]=D()),e.primaryButton||e.negativeButton?(L(),Q("div",ect,[e.primaryButton?(L(),Ee(ms,{key:0,onClick:l[1]||(l[1]=()=>i(e.primaryButton.action))},{default:te(()=>[D(ee(e.primaryButton.label),1)]),_:1})):we("",!0),l[4]||(l[4]=D()),e.negativeButton?(L(),Ee(ms,{key:1,class:"ms-4","is-warnable":!0,onClick:l[2]||(l[2]=()=>i(e.negativeButton.action))},{default:te(()=>[D(ee(e.negativeButton.label),1)]),_:1})):we("",!0)])):we("",!0)],64)}}}),tct={__name:"DashboardCellSubmissionActivityReviewsItem",props:{reviewAssignment:{type:Object,required:!0}},emits:"action",setup(e,{emit:t}){const n=e,{getReviewActivityIndicatorProps:i,getReviewActivityIndicatorPopoverProps:a}=Wp(),l=t,f=Ge(()=>i({reviewAssignment:n.reviewAssignment})),d=Ge(()=>a({reviewAssignment:n.reviewAssignment}));return(h,b)=>(L(),Ee(Hne,null,{button:te(()=>[pe(jlt,CS(RS(f.value)),null,16)]),default:te(()=>[b[1]||(b[1]=D()),pe(ySe,Cn(d.value,{onAction:b[0]||(b[0]=S=>l("action",S,{reviewAssignment:e.reviewAssignment}))}),null,16)]),_:1}))}},nct={key:0},sct={class:"flex gap-x-1"},oct={__name:"DashboardCellSubmissionActivityReviews",props:{submissionId:{type:Number,required:!0},reviewAssignments:{type:Array,required:!0}},setup(e){const t=e,n=Wp();function i(a,{reviewAssignment:l}){n[a]({reviewAssignment:l,submissionId:t.submissionId})}return(a,l)=>e.reviewAssignments.length?(L(),Q("div",nct,[H("span",sct,[(L(!0),Q(bt,null,Sn(e.reviewAssignments,f=>(L(),Ee(tct,{key:f.id,"review-assignment":f,onAction:(d,{reviewAssignment:h})=>i(d,{reviewAssignment:h})},null,8,["review-assignment","onAction"]))),128))])])):we("",!0)}},rct={class:"flex"},ict={class:"ms-1 flex items-center"},act={__name:"DashboardCellSubmissionActivityReviewsUpdate",props:{reviewAssignments:{type:Array,required:!0}},setup(e){const{getActiveReviewAssignments:t,getCompletedReviewAssignments:n}=Va(),i=e,{t:a}=Jn(),l=Ge(()=>t(i.reviewAssignments).length),f=Ge(()=>n(i.reviewAssignments).length);return(d,h)=>(L(),Q("div",rct,[pe(Vs,{class:"h-6 w-6 text-primary",icon:"ReviewAssignments"}),h[0]||(h[0]=D()),H("div",ict,ee(se(a)("dashboard.reviewUpdateCounts",{reviewsCompletedCount:f.value,reviewsTotalCount:l.value})),1)]))}},Une={__name:"UserAvatar",props:{sizeVariant:{required:!1,type:String,default:()=>"large",validator:e=>["large","small"].includes(e)},initials:{type:String,required:!0},userId:{type:Number,required:!0}},setup(e){const t=e,n=["bg-profile-1","bg-profile-2","bg-profile-3","bg-profile-4","bg-profile-5","bg-profile-6"],i=Ge(()=>{const l=t.userId%n.length,f=n[l],d=t.sizeVariant==="large"?["h-11","w-11"]:["h-8","w-8"];return[f,...d]}),a=Ge(()=>[t.sizeVariant==="large"?"text-2xl-bold":"text-lg-bold"]);return(l,f)=>(L(),Q("div",{class:Rn(["inline-flex h-11 w-11 items-center justify-center rounded-full shadow",i.value])},[H("span",{class:Rn(["text-on-dark",a.value])},ee(e.initials),3)],2))}},lct={key:0},cct={class:"mt-1 flex gap-x-1"},uct={__name:"DashboardCellSubmissionActivityReviewsOpen",props:{reviewAssignments:{type:Array,required:!0}},setup(e){const{getOpenReviewAssignments:t,getCompletedReviewAssignments:n}=Va(),i=e,{t:a}=Jn(),l=Ge(()=>t(n(i.reviewAssignments)));return(f,d)=>l.value.length?(L(),Q("div",lct,[H("div",null,ee(se(a)("dashboard.reviewersAssigned"))+":",1),d[1]||(d[1]=D()),H("div",cct,[(L(!0),Q(bt,null,Sn(l.value,h=>(L(),Q("div",{key:h.id},[pe(Hne,null,{button:te(()=>[pe(Une,{"size-variant":"small","user-id":h.reviewerId,initials:String(h.reviewerDisplayInitials)},null,8,["user-id","initials"])]),default:te(()=>[d[0]||(d[0]=D()),pe(ySe,{"reviewer-name":h.reviewerFullName,"review-method":h.reviewMethod},null,8,["reviewer-name","review-method"])]),_:2},1024)]))),128))])])):we("",!0)}},dct={class:"flex flex-col justify-center gap-y-2"},fct={__name:"DashboardCellSubmissionActivity",props:{item:{type:Object,required:!0}},setup(e){const t={DashboardCellSubmissionActivityActionAlert:Mlt,DashboardCellSubmissionActivityReviews:oct,DashboardCellSubmissionActivityReviewsUpdate:act,DashboardCellSubmissionActivityReviewsOpen:uct},n=Wp(),i=e,a=Ge(()=>n.dashboardPage===$f.EDITORIAL_DASHBOARD?n.getEditorialActivityForEditorialDashboard({submission:i.item}):n.dashboardPage===$f.MY_SUBMISSIONS?n.getEditorialActivityForMySubmissions({submission:i.item}):[]);return(l,f)=>(L(),Ee(as,null,{default:te(()=>[H("div",dct,[(L(!0),Q(bt,null,Sn(a.value,(d,h)=>(L(),Ee(Io(t[d.component]||d.component),Cn({ref_for:!0},d.props,{key:h}),null,16))),128))])]),_:1}))}},pct={__name:"DashboardCellSubmissionDays",props:{item:{type:Object,required:!0}},setup(e){const t=e,{calculateDaysBetweenDates:n}=Ed(),i=Ge(()=>n(t.item.dateLastActivity,new Date));return(a,l)=>(L(),Ee(as,null,{default:te(()=>[D(ee(i.value),1)]),_:1}))}},mct={__name:"DashboardCellSubmissionId",props:{item:{type:Object,required:!0}},setup(e){return(t,n)=>(L(),Ee(as,null,{default:te(()=>[D(ee(e.item.id),1)]),_:1}))}},hct={class:"flex w-auto items-center gap-x-2"},gct={class:"whitespace-nowrap"},_Se={incomplete:"bg-stage-incomplete-submission",submission:"bg-stage-desk-review",internalReview:"bg-stage-in-internal-review",externalReview:"bg-stage-in-review",editing:"bg-stage-copyediting",productionQueued:"bg-stage-production",productionScheduled:"bg-stage-scheduled-for-publishing",productionPublished:"bg-stage-published",declined:"bg-stage-declined"},SSe={__name:"StageBubble",props:{extendedStage:{type:String,required:!0,validator:function(e){return Object.keys(_Se).includes(e)}}},setup(e){const t=e,n=Ge(()=>_Se[t.extendedStage]);return(i,a)=>(L(),Q("span",hct,[H("span",{class:Rn(["h-[1em] w-[1em] rounded-full",n.value]),"aria-hidden":"true"},null,2),a[0]||(a[0]=D()),H("span",gct,[is(i.$slots,"default")])]))}},vct={class:"text-base-normal"},bct={__name:"DashboardCellSubmissionStage",props:{item:{type:Object,required:!0}},setup(e){const t=e,{getExtendedStage:n,getExtendedStageLabel:i}=Va(),a=Ge(()=>n(t.item)),l=Ge(()=>i(t.item));return(f,d)=>(L(),Ee(as,null,{default:te(()=>[H("span",vct,[pe(SSe,{"extended-stage":a.value},{default:te(()=>[D(ee(l.value),1)]),_:1},8,["extended-stage"])])]),_:1}))}},yct={class:"text-base-bold"},_ct={class:"text-base-normal"},Sct={__name:"DashboardCellSubmissionTitle",props:{item:{type:Object,required:!0}},setup(e){const t=e,{getCurrentPublication:n}=Va(),{localizeSubmission:i}=Jn(),a=Ge(()=>n(t.item));return(l,f)=>{const d=Hr("strip-unsafe-html");return L(),Ee(as,{id:"submission-title-"+e.item.id,class:"max-w-[25em] truncate","is-row-header":!0},{default:te(()=>[H("span",yct,ee(a.value.authorsStringShort),1),f[0]||(f[0]=D()),a.value.authorsStringShort?(L(),Q(bt,{key:0},[D("—")],64)):we("",!0),f[1]||(f[1]=D()),Gn(H("span",_ct,null,512),[[d,se(i)(a.value.fullTitle,a.value.locale)]])]),_:1},8,["id"])}}},Cct={__name:"DashboardCellReviewAssignmentId",props:{item:{type:Object,required:!0}},setup(e){return(t,n)=>(L(),Ee(as,null,{default:te(()=>[D(ee(e.item.submissionId),1)]),_:1}))}},wct={class:"text-lg-semibold"},Ect={__name:"DashboardCellReviewAssignmentTitle",props:{item:{type:Object,required:!0}},setup(e){const{localizeSubmission:t}=Jn(),n=e,i=Ge(()=>t(n.item.publicationTitle,n.item.submissionLocale));return(a,l)=>{const f=Hr("strip-unsafe-html");return L(),Ee(as,{id:"submission-title-"+e.item.id,class:"max-w-[25em] truncate","is-row-header":!0},{default:te(()=>[Gn(H("span",wct,null,512),[[f,i.value]])]),_:1},8,["id"])}}},kct={class:"flex items-center gap-x-2"},xct={key:0},Tct={__name:"DashboardCellReviewAssignmentActivityAlert",props:{alert:{type:String,required:!1,default:null}},setup(e){return(t,n)=>(L(),Q("div",kct,[e.alert?(L(),Q("div",xct,ee(e.alert),1)):we("",!0)]))}},Ict={class:"flex flex-col justify-center gap-y-2"},Act={__name:"DashboardCellReviewAssignmentActivity",props:{item:{type:Object,required:!0}},setup(e){const t={DashboardCellReviewAssignmentActivityAlert:Tct},n=Wp(),i=e,a=Ge(()=>n.getEditorialActivityForMyReviewAssignments({reviewAssignment:i.item}));return(l,f)=>(L(),Ee(as,null,{default:te(()=>[H("div",Ict,[(L(!0),Q(bt,null,Sn(a.value,(d,h)=>(L(),Ee(Io(t[d.component]||d.component),Cn({ref_for:!0},d.props,{key:h}),null,16))),128))])]),_:1}))}},Oct={__name:"DashboardCellReviewAssignmentActions",props:{item:{type:Object,required:!0}},setup(e){const{t}=Jn(),n=e,i=Ge(()=>{if([pkp.const.WORKFLOW_STAGE_ID_EDITING,pkp.const.WORKFLOW_STAGE_ID_PRODUCTION].includes(n.item.submissionStageId)&&!aO.includes(n.item.status))return null;switch(n.item.status){case pkp.const.REVIEW_ASSIGNMENT_STATUS_AWAITING_RESPONSE:case pkp.const.REVIEW_ASSIGNMENT_STATUS_RESPONSE_OVERDUE:case pkp.const.REVIEW_ASSIGNMENT_STATUS_REQUEST_RESEND:return t("dashboard.actions.respondToRequest");case pkp.const.REVIEW_ASSIGNMENT_STATUS_ACCEPTED:case pkp.const.REVIEW_ASSIGNMENT_STATUS_REVIEW_OVERDUE:return t("dashboard.actions.finishReview");case pkp.const.REVIEW_ASSIGNMENT_STATUS_DECLINED:return null;default:return t("common.view")}}),a=Wp();return(l,f)=>(L(),Ee(as,null,{default:te(()=>[i.value?(L(),Ee(ms,{key:0,class:"-ms-3","aria-describedby":"submission-title-"+e.item.id,"is-link":!0,onClick:f[0]||(f[0]=d=>se(a).openReviewerForm({submissionId:e.item.submissionId}))},{default:te(()=>[D(ee(i.value),1)]),_:1},8,["aria-describedby"])):we("",!0)]),_:1}))}},Rct={class:"sr-only"},Dct={__name:"DashboardTable",props:{items:{type:Array,required:!0},columns:{type:Array,required:!0},sortDescriptor:{type:Object,required:!0},pagination:{type:Object,required:!0}},emits:["setPage","sortColumn"],setup(e,{emit:t}){const n=t,i={DashboardCellSubmissionActions:Dlt,DashboardCellSubmissionActivity:fct,DashboardCellSubmissionDays:pct,DashboardCellSubmissionId:mct,DashboardCellSubmissionStage:bct,DashboardCellSubmissionTitle:Sct,DashboardCellReviewAssignmentId:Cct,DashboardCellReviewAssignmentTitle:Ect,DashboardCellReviewAssignmentActivity:Act,DashboardCellReviewAssignmentActions:Oct},a=Wp();return(l,f)=>(L(),Q(bt,null,[pe(du,{"sort-descriptor":e.sortDescriptor,onSort:f[0]||(f[0]=d=>l.$emit("sortColumn",d))},{default:te(()=>[pe(Ad,null,{default:te(()=>[se(a).bulkDeleteSelectionEnabled?(L(),Ee(Ei,{key:0},{default:te(()=>[H("span",Rct,ee(l.t("dashboard.submissions.incomplete.bulkDelete.column.description")),1)]),_:1})):we("",!0),f[2]||(f[2]=D()),(L(!0),Q(bt,null,Sn(e.columns,d=>(L(),Ee(Ei,{id:d.id,key:d.id,"allows-sorting":d.sortable},{default:te(()=>[D(ee(d.header),1)]),_:2},1032,["id","allows-sorting"]))),128))]),_:1}),f[4]||(f[4]=D()),pe(Kd,{"empty-text":se(a).isSubmissionsLoading?l.t("common.loading"):l.t("grid.noItems")},{default:te(()=>[(L(!0),Q(bt,null,Sn(e.items,d=>(L(),Ee(Bi,{key:d.id},{default:te(()=>[se(a).bulkDeleteSelectionEnabled?(L(),Ee(Rlt,{key:0,item:d},null,8,["item"])):we("",!0),f[3]||(f[3]=D()),(L(!0),Q(bt,null,Sn(e.columns,h=>(L(),Ee(Io(i[h.component]||h.component),{key:h.id,item:d},null,8,["item"]))),128))]),_:2},1024))),128))]),_:1},8,["empty-text"])]),_:1},8,["sort-descriptor"]),f[5]||(f[5]=D()),pe(hSe,{pagination:e.pagination,onSetPage:f[1]||(f[1]=(...d)=>n("setPage",...d))},null,8,["pagination"])],64))}},Lct={__name:"DashboardControlBulkActions",setup(e){const{t}=Jn(),n=Ge(()=>{const l=[];return i.bulkDeleteIsAvailableForUser&&l.push({label:t("dashboard.submissions.incomplete.bulkDelete.button"),name:"bulkDeleteSelectionEnable",isWarnable:!0,icon:"Cancel",disabled:i.bulkDeleteSubmissionIdsCanBeDeleted.length===0}),l}),i=Wp();function a(l,f={}){i[l](f)}return(l,f)=>n.value.length?(L(),Ee(z1,{key:0,label:se(t)("common.moreActions"),"button-variant":"ellipsis",actions:n.value,direction:"right",onAction:a},null,8,["label","actions"])):we("",!0)}},Pct={__name:"DashboardControlBulkDeleteButton",setup(e){const t=Wp(),{t:n}=Jn();return(i,a)=>(L(),Q(bt,null,[se(t).bulkDeleteSelectionEnabled?(L(),Ee(ms,{key:0,"is-disabled":se(t).bulkDeleteSelectedItems.length===0,"is-warnable":!0,onClick:a[0]||(a[0]=()=>se(t).bulkDeleteActionDelete())},{default:te(()=>[D(ee(se(n)("dashboard.submissions.incomplete.bulkDelete.button")),1)]),_:1},8,["is-disabled"])):we("",!0),a[2]||(a[2]=D()),se(t).bulkDeleteSelectionEnabled?(L(),Ee(ms,{key:1,"is-warnable":!0,onClick:a[1]||(a[1]=()=>se(t).bulkDeleteSelectionDisable())},{default:te(()=>[D(ee(se(n)("common.cancel")),1)]),_:1})):we("",!0)],64))}},Mct={__name:"DashboardActionButton",props:{isPrimary:{type:Boolean,required:!1,default:!1},isSecondary:{type:Boolean,required:!1,default:!1},isWarnable:{type:Boolean,required:!1,default:!1},action:{type:String,required:!0},actionArgs:{type:Object,required:!1,default:()=>{}},isLink:{type:Boolean,default:!1},label:{type:String,required:!0}},setup(e){const t=Wp();return(n,i)=>(L(),Ee(ms,{"is-primary":e.isPrimary,"is-secondary":e.isSecondary,"is-warnable":e.isWarnable,"is-link":e.isLink,onClick:i[0]||(i[0]=()=>se(t)[e.action](e.actionArgs))},{default:te(()=>[D(ee(e.label),1)]),_:1},8,["is-primary","is-secondary","is-warnable","is-link"]))}},Nct={__name:"DashboardControlSearch",setup(e){const{t}=Jn(),n=Wp();return(i,a)=>(L(),Ee(j1,{"search-phrase":se(n).searchPhrase,"search-label":se(t)("editor.submission.search"),onSearchPhraseChanged:a[0]||(a[0]=(...l)=>se(n).setSearchPhrase(...l))},null,8,["search-phrase","search-label"]))}},Fct={class:"me-3 ms-5 min-h-screen text-base-normal"},$ct={class:""},Bct={class:"flex-inline items-center gap-4 py-6 text-5xl-bold"},Vct={class:"ms-3"},Hct={class:"mt-2"},Uct={class:"flex justify-between"},zct={class:"flex flex-row items-center gap-x-3"},Wct={class:"flex flex-row items-center gap-x-3"},jct={class:"mt-4"},Zct={class:"mt-4"},CSe={__name:"DashboardPage",props:{dashboardPage:{required:!0,type:String,validator:e=>["editorialDashboard","myReviewAssignments","mySubmissions"].includes(e)},selectRevisionDecisionForm:{type:Object,required:!0},selectRevisionRecommendationForm:{type:Object,required:!0},componentForms:{type:Object,required:!0},views:{type:Array,required:!0},contextMinReviewsPerSubmission:{type:Number,required:!0},filtersForm:{type:Object,required:!0},countPerPage:{type:Number,required:!0},publicationSettings:{type:Object,required:!0}},setup(e){const t={DashboardControlBulkActions:Lct,DashboardControlBulkDeleteButton:Pct,DashboardActionButton:Mct,DashboardControlSearch:Nct},i=Wp(e);return(a,l)=>(L(),Q("div",Fct,[H("div",$ct,[H("span",null,[H("h1",Bct,[D(ee("".concat(se(i).currentView.name," (").concat(se(i).submissionsPagination.itemCount,")"))+" ",1),H("span",Vct,[pe(zl,{"size-variant":"big",class:Rn(se(i).isSubmissionsLoading?"":"invisible")},null,8,["class"])])])]),l[1]||(l[1]=D()),H("div",Hct,[H("div",Uct,[H("div",zct,[(L(!0),Q(bt,null,Sn(se(i).leftControlItems,(f,d)=>(L(),Ee(Io(t[f.component]||f.component),Cn({ref_for:!0},f.props||{},{key:d}),null,16))),128))]),l[0]||(l[0]=D()),H("div",Wct,[(L(!0),Q(bt,null,Sn(se(i).rightControlItems,(f,d)=>(L(),Ee(Io(t[f.component]||f.component),Cn({ref_for:!0},f.props||{},{key:d}),null,16))),128))])])]),l[2]||(l[2]=D()),H("div",jct,[pe(Ilt,{"active-filters-list":se(i).filtersFormList,onClearFilters:se(i).clearFiltersForm,onRemoveFilter:se(i).clearFiltersFormField},null,8,["active-filters-list","onClearFilters","onRemoveFilter"])]),l[3]||(l[3]=D()),H("div",Zct,[pe(Dct,{items:se(i).submissions,columns:se(i).columns,"sort-descriptor":se(i).sortDescriptor,pagination:se(i).submissionsPagination,onSortColumn:se(i).applySort,onSetPage:se(i).setCurrentPage},null,8,["items","columns","sort-descriptor","pagination","onSortColumn","onSetPage"])])])]))}},qct=["aria-live","textContent"],Gct={__name:"Announcer",setup(e){const t=ibe();return(n,i)=>(L(),Q("div",{id:"announcer",class:"announcer","aria-live":se(t).politeness,textContent:ee(se(t).content)},null,8,qct))}},Kct={},Yct={class:"flex w-full border-t border-light"},Xct={class:"flex-grow border-e border-light p-4"},Jct={class:"bg-secondary p-5"},Qct={class:"w-96"},eut={class:"border-b border-light p-4"},tut={class:"p-4"};function nut(e,t){return L(),Q("div",Yct,[H("div",Xct,[H("div",Jct,[is(e.$slots,"left")])]),t[1]||(t[1]=D()),H("div",Qct,[H("div",eut,[is(e.$slots,"right1")]),t[0]||(t[0]=D()),H("div",tut,[is(e.$slots,"right2")])])])}const sut=wt(Kct,[["render",nut]]),out={class:"text-lg-bold text-heading"},rut={key:0,class:"text-base-normal"},iut={class:"flex items-center"},aut={class:"me-2 flex-grow truncate"},lut={class:"flex-shrink-0"},wSe={__name:"ListingFilesListPanel",props:{title:{type:String,default(){return""}},description:{type:String,default(){return""}},files:{type:Array,required:!1,default:()=>[]}},setup(e){return(t,n)=>(L(),Ee(Vf,{title:e.title,description:e.description,items:e.files},{header:te(()=>[H("h2",out,[H("span",null,ee(e.title),1)]),n[0]||(n[0]=D()),e.description?(L(),Q("div",rut,ee(e.description),1)):we("",!0)]),item:te(({item:i})=>[H("div",iut,[H("div",aut,[pe(m9,{name:t.localize(i.name),"document-type":i.documentType,url:i.url},null,8,["name","document-type","url"])]),n[1]||(n[1]=D()),H("div",lut,[i.genreName?(L(),Ee(kd,{key:0,"is-primary":!i.genreIsDependent&&!i.genreIsSupplementary},{default:te(()=>[D(ee(t.localize(i.genreName)),1)]),_:2},1032,["is-primary"])):we("",!0)])])]),_:1},8,["title","description","items"]))}},{formatShortDate:hR}=Ed(),cut=Nf("roundHistoryModal",e=>{const{t,localize:n}=Jn(),{apiUrl:i}=to("reviews/history/".concat(e.submissionId,"/").concat(e.reviewRoundId)),{fetch:a,data:l}=fr(i);a();const f=Ge(()=>{var S,k;return(k=(S=l.value)==null?void 0:S.reviewAssignment)==null?void 0:k.declined}),d=Ge(()=>{var S,k;return!((k=(S=l.value)==null?void 0:S.reviewAssignment)!=null&&k.dateCompleted)}),h=Ge(()=>{var k,T,O;const S=[];return(k=l.value)!=null&&k.publicationType&&S.push({heading:t("reviewer.submission.reviewRound.metadata.type"),body:n(l.value.publicationType)}),(T=l.value)!=null&&T.publicationAbstract&&S.push({heading:t("reviewer.submission.reviewRound.metadata.abstract"),bodyHtml:n(l.value.publicationAbstract)}),(O=l.value)!=null&&O.publicationKeywords&&S.push({heading:t("reviewer.submission.reviewRound.metadata.keywords"),body:n(l.value.publicationKeywords).join(", ")}),S}),b=Ge(()=>{var k,T,O,P,B,W,Z,Y,z,q,ne,ue;const S=[];return(T=(k=l.value)==null?void 0:k.reviewAssignment)!=null&&T.dateNotified&&S.push({heading:t("reviewer.submission.reviewRequestDate"),body:hR(l.value.reviewAssignment.dateNotified)}),(P=(O=l.value)==null?void 0:O.reviewAssignment)!=null&&P.dateResponseDue&&S.push({heading:t("reviewer.submission.responseDueDate"),body:hR(l.value.reviewAssignment.dateResponseDue)}),(W=(B=l.value)==null?void 0:B.reviewAssignment)!=null&&W.declined||((Y=(Z=l.value)==null?void 0:Z.reviewAssignment)!=null&&Y.dateConfirmed&&S.push({heading:t("reviewer.submission.acceptedOn"),body:hR(l.value.reviewAssignment.dateConfirmed)}),(q=(z=l.value)==null?void 0:z.reviewAssignment)!=null&&q.dateDue&&S.push({heading:t("reviewer.submission.reviewDueDate"),body:hR(l.value.reviewAssignment.dateDue)}),(ue=(ne=l.value)==null?void 0:ne.reviewAssignment)!=null&&ue.dateCompleted&&S.push({heading:t("reviewer.submission.submittedOn"),body:hR(l.value.reviewAssignment.dateCompleted)})),S});return{isDeclined:f,isIncomplete:d,reviewRoundHistory:l,articleMetadata:h,generalInformation:b,submissionId:e.submissionId,reviewRoundId:e.reviewRoundId,reviewRoundNumber:e.reviewRoundNumber}}),uut={class:"text-dark-accent underline"},dut={key:0},fut={class:"mb-5 border border-light p-4"},put={class:"mb-4 text-lg-bold text-heading"},mut={class:"border border-light"},hut={class:"border-b border-light p-4"},gut={class:"text-lg-bold text-heading"},vut={class:"p-4"},but={key:0},yut={class:"mb-4 text-lg-normal text-secondary"},_ut={class:"mt-4"},Sut={key:1},Cut={key:1},wut={class:"text-lg-bold text-heading"},Eut={key:2},kut={key:0,class:"mb-5 border border-light p-4"},xut={class:"mb-2 text-lg-bold text-heading"},Tut={key:1,class:"mb-5 border border-light"},Iut={class:"border-b border-light p-4"},Aut={class:"text-lg-bold text-heading"},Out={key:0,class:"border-b border-light p-4"},Rut={class:"text-lg-normal text-secondary"},Dut={class:"mt-3 text-base-bold"},Lut={key:1,class:"p-4"},Put={class:"text-lg-normal text-secondary"},Mut={class:"mt-3 text-base-bold"},Nut={class:"text-xl-bold text-heading"},Fut={class:"text-lg-bold text-heading"},$ut={key:0},But={key:1},Vut={class:"text-xl-bold text-heading"},Hut={class:"text-lg-bold text-heading"},Uut={__name:"RoundHistoryModal",props:{submissionId:{type:Number,required:!0},reviewRoundId:{type:Number,required:!0},reviewRoundNumber:{type:Number,required:!0}},setup(e){const{formatShortDate:t}=Ed(),n=e,{t:i,localize:a}=Jn(),l=cut(n);return(f,d)=>{const h=Hr("strip-unsafe-html");return se(l).reviewRoundHistory?(L(),Ee(il,{key:0,class:"text-base-normal"},If({title:te(()=>[H("h1",uut,ee(se(i)("reviewer.submission.reviewRound.info.modal.title",{round:se(l).reviewRoundNumber})),1)]),default:te(()=>[d[21]||(d[21]=D()),d[22]||(d[22]=D()),d[23]||(d[23]=D()),pe(sut,null,If({left:te(()=>[se(l).isDeclined?(L(),Q("div",dut,[H("div",fut,[H("h2",put,ee(se(i)("reviewer.submission.reviewRound.reviewDeclineDate")),1),d[0]||(d[0]=D()),H("p",null,ee(se(t)(se(l).reviewRoundHistory.reviewAssignment.dateConfirmed)),1)]),d[3]||(d[3]=D()),H("div",mut,[H("div",hut,[H("h2",gut,ee(se(i)("reviewer.submission.reviewRound.emailLog")),1)]),d[2]||(d[2]=D()),H("div",vut,[se(l).reviewRoundHistory.declineEmail?(L(),Q("div",but,[Gn(H("p",yut,null,512),[[h,se(l).reviewRoundHistory.declineEmail.subject]]),d[1]||(d[1]=D()),Gn(H("p",_ut,null,512),[[h,se(l).reviewRoundHistory.declineEmail.body]])])):(L(),Q("p",Sut,ee(se(i)("reviewer.submission.reviewRound.emailLog.defaultMessage")),1))])])])):se(l).isIncomplete?(L(),Q("div",Cut,[H("h2",wut,ee(se(i)("reviewer.submission.reviewRound.reviewNotCompleted")),1)])):(L(),Q("div",Eut,[se(l).reviewRoundHistory.recommendation?(L(),Q("div",kut,[H("h2",xut,ee(se(i)("reviewer.article.recommendation")),1),d[4]||(d[4]=D()),H("p",null,ee(se(l).reviewRoundHistory.recommendation),1)])):we("",!0),d[11]||(d[11]=D()),se(l).reviewRoundHistory.comments.length||se(l).reviewRoundHistory.privateComments.length?(L(),Q("div",Tut,[H("div",Iut,[H("h2",Aut,ee(se(i)("reviewer.submission.reviewRound.comments")),1)]),d[9]||(d[9]=D()),se(l).reviewRoundHistory.comments.length?(L(),Q("div",Out,[H("h3",Rut,ee(se(i)("reviewer.submission.reviewRound.comments.authorAndEditor")),1),d[6]||(d[6]=D()),H("dl",null,[(L(!0),Q(bt,null,Sn(se(l).reviewRoundHistory.comments,(b,S)=>(L(),Q(bt,{key:S},[H("dt",Dut,ee(se(i)("reviewer.submission.reviewRound.comments.prefix",{index:S+1})),1),d[5]||(d[5]=D()),Gn(H("dd",null,null,512),[[h,b]])],64))),128))])])):we("",!0),d[10]||(d[10]=D()),se(l).reviewRoundHistory.privateComments.length?(L(),Q("div",Lut,[H("h3",Put,ee(se(i)("reviewer.submission.reviewRound.comments.editorOnly")),1),d[8]||(d[8]=D()),H("dl",null,[(L(!0),Q(bt,null,Sn(se(l).reviewRoundHistory.privateComments,(b,S)=>(L(),Q(bt,{key:S},[H("dt",Mut,ee(se(i)("reviewer.submission.reviewRound.comments.prefix",{index:S+1})),1),d[7]||(d[7]=D()),Gn(H("dd",null,null,512),[[h,b]])],64))),128))])])):we("",!0)])):we("",!0),d[12]||(d[12]=D()),se(l).reviewRoundHistory.attachments.length?(L(),Ee(wSe,{key:2,class:"mb-5",title:se(i)("reviewer.submission.reviewRound.attachments"),description:se(i)("reviewer.submission.reviewRound.attachments.description"),files:se(l).reviewRoundHistory.attachments},null,8,["title","description","files"])):we("",!0),d[13]||(d[13]=D()),se(l).reviewRoundHistory.files.length?(L(),Ee(wSe,{key:3,title:se(i)("reviewer.submission.reviewRound.files"),description:se(i)("reviewer.submission.reviewRound.files.description"),files:se(l).reviewRoundHistory.files},null,8,["title","description","files"])):we("",!0)]))]),right1:te(()=>[H("h2",Nut,ee(se(i)("reviewer.submission.reviewRound.metadata")),1),d[16]||(d[16]=D()),(L(!0),Q(bt,null,Sn(se(l).articleMetadata,b=>(L(),Q("div",{key:b.heading,class:"mt-4"},[H("h3",Fut,ee(b.heading)+":",1),d[14]||(d[14]=D()),b.body?(L(),Q("p",$ut,ee(b.body),1)):we("",!0),d[15]||(d[15]=D()),b.bodyHtml?Gn((L(),Q("div",But,null,512)),[[h,b.bodyHtml]]):we("",!0)]))),128))]),_:2},[se(l).reviewRoundHistory.reviewAssignment?{name:"right2",fn:te(()=>[H("h2",Vut,ee(se(i)("reviewer.submission.reviewRound.general")),1),d[18]||(d[18]=D()),(L(!0),Q(bt,null,Sn(se(l).generalInformation,b=>(L(),Q("div",{key:b.heading,class:"mt-4"},[H("h3",Hut,ee(b.heading)+":",1),d[17]||(d[17]=D()),H("p",null,ee(b.body),1)]))),128))]),key:"0"}:void 0]),1024)]),_:2},[se(l).reviewRoundHistory.reviewAssignment?{name:"pre-title",fn:te(()=>[D(ee(se(l).reviewRoundHistory.reviewAssignment.submissionId),1)]),key:"0"}:void 0,se(l).reviewRoundHistory.publicationTitle?{name:"description",fn:te(()=>[D(ee(se(a)(se(l).reviewRoundHistory.publicationTitle)),1)]),key:"1"}:void 0]),1024)):we("",!0)}}},zut=Nf("reviewerSubmissionPage",e=>{const{openSideModal:t}=Ms();function n({submissionId:i,reviewRoundId:a,reviewRoundNumber:l}){t(Uut,{submissionId:i,reviewRoundId:a,reviewRoundNumber:l})}return{openRoundHistoryModal:n,reviewRoundHistories:e.reviewRoundHistories}}),Wut={class:"mb-4 border border-light bg-secondary p-6 text-base-normal"},jut={class:"text-lg-bold text-heading"},Zut={__name:"ReviewerSubmissionPage",props:{reviewRoundHistories:{type:Object,required:!0}},setup(e){const{formatShortDate:t}=Ed(),{t:n}=Jn(),a=zut(e);return(l,f)=>(L(),Q("div",Wut,[H("h2",jut,ee(se(n)("reviewer.submission.reviewRound.info")),1),f[1]||(f[1]=D()),(L(!0),Q(bt,null,Sn(se(a).reviewRoundHistories,d=>(L(),Q("p",{key:d.reviewRoundId},[H("span",null,ee(se(n)("reviewer.submission.reviewRound.info.submittedOn",{round:d.reviewRoundNumber,submittedOn:se(t)(d.submittedOn)})),1),f[0]||(f[0]=D()),pe(ms,{"is-link":"true",class:"ms-4",onClick:h=>se(a).openRoundHistoryModal(d)},{default:te(()=>[D(ee(se(n)("reviewer.submission.reviewRound.info.read",{round:d.reviewRoundNumber})),1)]),_:2},1032,["onClick"])]))),128))]))}},ESe={name:"JobsPageBase",mixins:[Od],props:{label:{type:String,default:""},i18nDescription:{type:String,default:""},columns:{type:Array,default:()=>[]},apiUrl:{type:String,default:null},apiUrlRedispatchAll:{type:String,default:null}},data(){return{rows:[],total:0,currentPage:1,lastPage:1,isLoadingItems:!1}},computed:{description(){return this.replaceLocaleParams(this.i18nDescription,{total:this.total})}},created(){this.loadList()},methods:{handlePagination(e){this.isLoadingItems=!0,this.loadList(e)},loadList(e){e=e||1,$.ajax({url:this.apiUrl,type:"GET",headers:{"X-Csrf-Token":pkp.currentUser.csrfToken},data:{page:e},error:this.ajaxErrorCallback,success:t=>{this.rows=t.data,this.total=t.total,this.currentPage=t.pagination.currentPage,this.lastPage=t.pagination.lastPage,this.isLoadingItems=!1}})}}},qut={name:"JobsPage",components:{PkpTable:du,TableHeader:Ad,TableColumn:Ei,TableBody:Kd,TableRow:Bi,TableCell:as,Pagination:d0},extends:ESe},Gut={class:"semantic-defaults"};function Kut(e,t,n,i,a,l){const f=Xe("TableColumn"),d=Xe("TableHeader"),h=Xe("TableCell"),b=Xe("TableRow"),S=Xe("TableBody"),k=Xe("PkpTable"),T=Xe("Pagination"),O=Hr("strip-unsafe-html");return L(),Q(bt,null,[pe(k,null,If({default:te(()=>[t[4]||(t[4]=D()),t[5]||(t[5]=D()),pe(d,null,{default:te(()=>[(L(!0),Q(bt,null,Sn(e.columns,P=>(L(),Ee(f,{id:P.name,key:P.name},{default:te(()=>[D(ee(P.label),1)]),_:2},1032,["id"]))),128))]),_:1}),t[6]||(t[6]=D()),pe(S,null,{default:te(()=>[(L(!0),Q(bt,null,Sn(e.rows,P=>(L(),Ee(b,{key:P.key},{default:te(()=>[pe(h,null,{default:te(()=>[D(ee(P.id),1)]),_:2},1024),t[0]||(t[0]=D()),pe(h,null,{default:te(()=>[D(ee(P.displayName),1)]),_:2},1024),t[1]||(t[1]=D()),pe(h,null,{default:te(()=>[D(ee(P.queue),1)]),_:2},1024),t[2]||(t[2]=D()),pe(h,null,{default:te(()=>[D(ee(P.attempts),1)]),_:2},1024),t[3]||(t[3]=D()),pe(h,null,{default:te(()=>[D(ee(P.created_at),1)]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:2},[e.label?{name:"label",fn:te(()=>[Gn(H("span",null,null,512),[[O,e.label]])]),key:"0"}:void 0,e.description?{name:"description",fn:te(()=>[Gn(H("span",Gut,null,512),[[O,e.description]])]),key:"1"}:void 0]),1024),t[7]||(t[7]=D()),e.lastPage>1?(L(),Ee(T,{key:0,"current-page":e.currentPage,"last-page":e.lastPage,"is-loading":e.isLoadingItems,onSetPage:e.handlePagination},null,8,["current-page","last-page","is-loading","onSetPage"])):we("",!0)],64)}const Yut=wt(qut,[["render",Kut]]),Xut={name:"FailedJobsPage",components:{PkpTable:du,TableHeader:Ad,TableColumn:Ei,TableBody:Kd,TableRow:Bi,TableCell:as,Pagination:d0,ButtonRow:r0,Spinner:zl,PkpButton:ms},extends:ESe,methods:{removeJob(e){this.rows=this.rows.filter(t=>t.id!==e.id),this.total=this.total-1},redispatch(e){$.ajax({url:e._hrefs._redispatch,type:"POST",headers:{"X-Csrf-Token":pkp.currentUser.csrfToken},error:this.ajaxErrorCallback,success:t=>{pkp.eventBus.$emit("notify",t.message,"success"),this.removeJob(e)}})},remove(e){$.ajax({url:e._hrefs._delete,type:"POST",headers:{"X-Csrf-Token":pkp.currentUser.csrfToken,"X-Http-Method-Override":"DELETE"},error:this.ajaxErrorCallback,success:t=>{pkp.eventBus.$emit("notify",t.message,"success"),this.removeJob(e)}})},requeueAll(){this.isLoadingItems=!0,$.ajax({url:this.apiUrlRedispatchAll,type:"POST",headers:{"X-Csrf-Token":pkp.currentUser.csrfToken},error:this.ajaxErrorCallback,success:e=>{pkp.eventBus.$emit("notify",e.message,"success"),this.loadList(1)}})}}},Jut={class:"semantic-defaults"};function Qut(e,t,n,i,a,l){const f=Xe("Spinner"),d=Xe("PkpButton"),h=Xe("TableColumn"),b=Xe("TableHeader"),S=Xe("TableCell"),k=Xe("ButtonRow"),T=Xe("TableRow"),O=Xe("TableBody"),P=Xe("PkpTable"),B=Xe("Pagination"),W=Hr("strip-unsafe-html");return L(),Q(bt,null,[pe(P,null,If({default:te(()=>[t[8]||(t[8]=D()),t[9]||(t[9]=D()),t[10]||(t[10]=D()),pe(b,null,{default:te(()=>[(L(!0),Q(bt,null,Sn(e.columns,Z=>(L(),Ee(h,{id:Z.name,key:Z.name},{default:te(()=>[D(ee(Z.label),1)]),_:2},1032,["id"]))),128))]),_:1}),t[11]||(t[11]=D()),pe(O,null,{default:te(()=>[(L(!0),Q(bt,null,Sn(e.rows,Z=>(L(),Ee(T,{key:Z.key},{default:te(()=>[pe(S,null,{default:te(()=>[D(ee(Z.id),1)]),_:2},1024),t[3]||(t[3]=D()),pe(S,null,{default:te(()=>[D(ee(Z.displayName),1)]),_:2},1024),t[4]||(t[4]=D()),pe(S,null,{default:te(()=>[D(ee(Z.queue),1)]),_:2},1024),t[5]||(t[5]=D()),pe(S,null,{default:te(()=>[D(ee(Z.connection),1)]),_:2},1024),t[6]||(t[6]=D()),pe(S,null,{default:te(()=>[D(ee(Z.failed_at),1)]),_:2},1024),t[7]||(t[7]=D()),pe(S,null,{default:te(()=>[pe(k,null,{default:te(()=>[pe(d,{onClick:Y=>l.redispatch(Z)},{default:te(()=>[D(ee(e.t("admin.jobs.failed.action.redispatch")),1)]),_:2},1032,["onClick"]),t[1]||(t[1]=D()),pe(d,{"is-warnable":"",onClick:Y=>l.remove(Z)},{default:te(()=>[D(ee(e.t("common.delete")),1)]),_:2},1032,["onClick"]),t[2]||(t[2]=D()),pe(d,{element:"a","is-link":"",href:Z._hrefs._details},{default:te(()=>[D(ee(e.t("common.details")),1)]),_:2},1032,["href"])]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:2},[e.label?{name:"label",fn:te(()=>[Gn(H("span",null,null,512),[[W,e.label]])]),key:"0"}:void 0,e.description?{name:"description",fn:te(()=>[Gn(H("span",Jut,null,512),[[W,e.description]])]),key:"1"}:void 0,e.total>0?{name:"top-controls",fn:te(()=>[e.isLoadingItems?(L(),Ee(f,{key:0})):we("",!0),t[0]||(t[0]=D()),pe(d,{onClick:l.requeueAll},{default:te(()=>[D(ee(e.t("admin.jobs.failed.action.redispatch.all")),1)]),_:1},8,["onClick"])]),key:"2"}:void 0]),1024),t[12]||(t[12]=D()),e.lastPage>1?(L(),Ee(B,{key:0,"current-page":e.currentPage,"last-page":e.lastPage,"is-loading":e.isLoadingItems,onSetPage:e.handlePagination},null,8,["current-page","last-page","is-loading","onSetPage"])):we("",!0)],64)}const edt=wt(Xut,[["render",Qut]]),tdt={name:"FailedJobDetailsPage",components:{PkpTable:du,TableCell:as,TableColumn:Ei,TableHeader:Ad,TableBody:Kd,TableRow:Bi},props:{label:{type:String,default:""},columns:{type:Array,default:()=>[]},rows:{type:Array,default:()=>[]}}};function ndt(e,t,n,i,a,l){const f=Xe("TableColumn"),d=Xe("TableHeader"),h=Xe("TableCell"),b=Xe("TableRow"),S=Xe("TableBody"),k=Xe("PkpTable"),T=Hr("strip-unsafe-html");return L(),Ee(k,null,If({default:te(()=>[t[1]||(t[1]=D()),pe(d,null,{default:te(()=>[(L(!0),Q(bt,null,Sn(n.columns,O=>(L(),Ee(f,{id:O.name,key:O.name},{default:te(()=>[D(ee(O.label),1)]),_:2},1032,["id"]))),128))]),_:1}),t[2]||(t[2]=D()),pe(S,null,{default:te(()=>[(L(!0),Q(bt,null,Sn(n.rows,O=>(L(),Ee(b,{key:O.key},{default:te(()=>[pe(h,null,{default:te(()=>[D(ee(O.attribute),1)]),_:2},1024),t[0]||(t[0]=D()),pe(h,null,{default:te(()=>[H("span",null,[H("pre",null,ee(O.value),1)])]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:2},[n.label?{name:"label",fn:te(()=>[Gn(H("span",null,null,512),[[T,n.label]])]),key:"0"}:void 0]),1024)}const sdt=wt(tdt,[["render",ndt]]);var zne,kSe;function xSe(){if(kSe)return zne;kSe=1;var e=Object.prototype.toString;zne=function(k){if(k===void 0)return"undefined";if(k===null)return"null";var T=typeof k;if(T==="boolean")return"boolean";if(T==="string")return"string";if(T==="number")return"number";if(T==="symbol")return"symbol";if(T==="function")return f(k)?"generatorfunction":"function";if(n(k))return"array";if(b(k))return"buffer";if(h(k))return"arguments";if(a(k))return"date";if(i(k))return"error";if(l(k))return"regexp";switch(t(k)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(d(k))return"generator";switch(T=e.call(k),T){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return T.slice(8,-1).toLowerCase().replace(/\s/g,"")};function t(S){return typeof S.constructor=="function"?S.constructor.name:null}function n(S){return Array.isArray?Array.isArray(S):S instanceof Array}function i(S){return S instanceof Error||typeof S.message=="string"&&S.constructor&&typeof S.constructor.stackTraceLimit=="number"}function a(S){return S instanceof Date?!0:typeof S.toDateString=="function"&&typeof S.getDate=="function"&&typeof S.setDate=="function"}function l(S){return S instanceof RegExp?!0:typeof S.flags=="string"&&typeof S.ignoreCase=="boolean"&&typeof S.multiline=="boolean"&&typeof S.global=="boolean"}function f(S,k){return t(S)==="GeneratorFunction"}function d(S){return typeof S.throw=="function"&&typeof S.return=="function"&&typeof S.next=="function"}function h(S){try{if(typeof S.length=="number"&&typeof S.callee=="function")return!0}catch(k){if(k.message.indexOf("callee")!==-1)return!0}return!1}function b(S){return S.constructor&&typeof S.constructor.isBuffer=="function"?S.constructor.isBuffer(S):!1}return zne}/*! * shallow-clone <https://github.com/jonschlinkert/shallow-clone> * * Copyright (c) 2015-present, Jon Schlinkert. * Released under the MIT License. */var Wne,TSe;function odt(){if(TSe)return Wne;TSe=1;const e=Symbol.prototype.valueOf,t=xSe();function n(h,b){switch(t(h)){case"array":return h.slice();case"object":return Object.assign({},h);case"date":return new h.constructor(Number(h));case"map":return new Map(h);case"set":return new Set(h);case"buffer":return f(h);case"symbol":return d(h);case"arraybuffer":return a(h);case"float32array":case"float64array":case"int16array":case"int32array":case"int8array":case"uint16array":case"uint32array":case"uint8clampedarray":case"uint8array":return l(h);case"regexp":return i(h);case"error":return Object.create(h);default:return h}}function i(h){const b=h.flags!==void 0?h.flags:/\w+$/.exec(h)||void 0,S=new h.constructor(h.source,b);return S.lastIndex=h.lastIndex,S}function a(h){const b=new h.constructor(h.byteLength);return new Uint8Array(b).set(new Uint8Array(h)),b}function l(h,b){return new h.constructor(h.buffer,h.byteOffset,h.length)}function f(h){const b=h.length,S=Buffer.allocUnsafe?Buffer.allocUnsafe(b):Buffer.from(b);return h.copy(S),S}function d(h){return e?Object(e.call(h)):{}}return Wne=n,Wne}/*! * isobject <https://github.com/jonschlinkert/isobject> * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. */var jne,ISe;function rdt(){return ISe||(ISe=1,jne=function(t){return t!=null&&typeof t=="object"&&Array.isArray(t)===!1}),jne}/*! * is-plain-object <https://github.com/jonschlinkert/is-plain-object> * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. */var Zne,ASe;function idt(){if(ASe)return Zne;ASe=1;var e=rdt();function t(n){return e(n)===!0&&Object.prototype.toString.call(n)==="[object Object]"}return Zne=function(i){var a,l;return!(t(i)===!1||(a=i.constructor,typeof a!="function")||(l=a.prototype,t(l)===!1)||l.hasOwnProperty("isPrototypeOf")===!1)},Zne}var qne,OSe;function adt(){if(OSe)return qne;OSe=1;const e=odt(),t=xSe(),n=idt();function i(f,d){switch(t(f)){case"object":return a(f,d);case"array":return l(f,d);default:return e(f)}}function a(f,d){if(typeof d=="function")return d(f);if(d||n(f)){const h=new f.constructor;for(let b in f)h[b]=i(f[b],d);return h}return f}function l(f,d){const h=new f.constructor(f.length);for(let b=0;b<f.length;b++)h[b]=i(f[b],d);return h}return qne=i,qne}var ldt=adt();const K1=Uw(ldt),cdt={__name:"CounterReportsEditModal",props:{title:{type:String,required:!0},submitAction:{type:String,required:!0},activeForm:{type:Object,required:!0}},setup(e){const t=e,n=Mr("closeModal");function i(f){let d={};for(const[h,b]of Object.entries(f))switch(h){case"customer_id":parseInt(b,10)>=0&&(d[h]=b);break;case"begin_date":case"end_date":case"yop":case"item_id":b!=null&&b.length>0&&(d[h]=b);break;case"metric_type":case"attributes_to_show":b!=null&&b.length>0&&(d[h]=b.join("|"));break;case"include_parent_details":b==!0&&(d.include_parent_details="True");break;case"granularity":b==!0&&(d.granularity="Totals");break}return d}const{form:a,set:l}=B1(t.activeForm,{customSubmit:async f=>{const{validationError:d,data:h,fetch:b}=fr(t.submitAction,{expectValidationError:!0,headers:{Accept:"text/tab-separated-values; charset=utf-8"},query:i(f)});if(await b(),d.value&&Object.prototype.hasOwnProperty.call(d.value,"Code"))pkp.eventBus.$emit("notify",d.value.Code+": "+d.value.Message+" ("+d.value.Data+")","warning"),d.value=null,h.value=null;else if(h.value){var S=new Blob([h.value]),k=document.createElement("a");k.href=window.URL.createObjectURL(S),k.download="counterReport.tsv",k.click()}return{data:h.value,validationError:d.value}}});return(f,d)=>(L(),Ee(il,null,{title:te(()=>[D(ee(e.title),1)]),default:te(()=>[d[0]||(d[0]=D()),pe(Lu,null,{default:te(()=>[pe(oa,Cn(se(a),{onSet:se(l),onSuccess:se(n)}),null,16,["onSet","onSuccess"])]),_:1})]),_:1}))}},udt={class:"counterReportsListPanel"},ddt=["id"],fdt={__name:"CounterReportsListPanel",props:{form:{type:Object,required:!0},id:{type:String,required:!0},title:{type:String,required:!0}},setup(e){const{t}=Jn(),n=e,i=Ge(()=>d.value||[]),a=kt(null),l=kt(""),{apiUrl:f}=to("stats/sushi/reports"),{data:d,fetch:h,isLoading:b}=fr(f,{method:"GET"});h();function S(k){const T=i.value.find(B=>B.Report_ID===k);a.value=K1(n.form),a.value.method="GET",a.value.fields=a.value.reportFields[k],l.value=t("manager.statistics.counterR5Report.settings");const{openSideModal:O}=Ms(),{apiUrl:P}=to("stats/sushi/".concat(T.Path));O(cdt,{title:t("manager.statistics.counterR5Report.settings"),submitAction:P,activeForm:a})}return(k,T)=>(L(),Q("div",udt,[is(k.$slots,"default",{},()=>[pe(Vf,{items:i.value},{header:te(()=>[pe(Bf,null,{default:te(()=>[H("h2",null,ee(e.title),1),T[0]||(T[0]=D()),se(b)?(L(),Ee(zl,{key:0})):we("",!0)]),_:1})]),"item-title":te(({item:O})=>[H("span",{id:O.Report_ID,class:"text-lg-normal"},ee(O.Report_Name)+" ("+ee(O.Report_ID)+")\n ",9,ddt)]),"item-actions":te(({item:O})=>[pe(ms,{onClick:P=>S(O.Report_ID)},{default:te(()=>[D(ee(se(t)("common.edit")),1)]),_:2},1032,["onClick"])]),_:1},8,["items"])])]))}},pdt={class:"app__pageHeading"},mdt={class:"mb-4"},hdt={__name:"CounterReportsPage",props:{counterReportsListPanel:{type:Object,required:!0},usageNotPossible:{type:Boolean,required:!0}},setup(e){const{t}=Jn();return(n,i)=>{const a=Xe("Notification"),l=Hr("strip-unsafe-html");return L(),Q(bt,null,[H("h1",pdt,ee(se(t)("manager.statistics.counterR5Reports")),1),i[0]||(i[0]=D()),Gn(H("p",null,null,512),[[l,se(t)("manager.statistics.counterR5Reports.description")]]),i[1]||(i[1]=D()),H("div",mdt,[e.usageNotPossible?(L(),Ee(a,{key:0,type:"warning"},{default:te(()=>[D(ee(se(t)("manager.statistics.counterR5Reports.usageNotPossible")),1)]),_:1})):we("",!0)]),i[2]||(i[2]=D()),pe(_H,null,{default:te(()=>[pe(SH,null,{default:te(()=>[pe(fdt,Cn(e.counterReportsListPanel,{onSet:n.set}),null,16,["onSet"])]),_:1})]),_:1})],64)}}},v9=Nf("userInvitationPage",e=>{const{openDialog:t}=Ms(),{t:n}=Jn(),i=kt(e.emailTemplatesApiUrl),a=kt({...e.invitationPayload}),l=kt({}),f=kt(e.invitationType),d=kt(e.invitationMode),h=kt(e.invitationUserData),b=kt(!1);function S(At,hn,ct=!0){a.value[At]=hn,ct||(l.value[At]=hn,hn!==null&&typeof hn=="object"&&Object.keys(hn).length===0&&(delete a.value[At],delete l.value[At]))}const k=kt(e.steps[0].id),T=kt(e.steps),O=kt([]),P=Ge(()=>T.value.find(At=>At.id===k.value)),B=Ge(()=>T.value.findIndex(At=>At.id===k.value)),W=Ge(()=>!B.value),Z=Ge(()=>B.value===T.value.length-1);function Y(At){window.history.pushState({},At.name,"#"+At.id)}async function z(){var At;if(ft[P.value.id]){let hn=!0;if(hn=await ft[P.value.id](),!hn)return}Z.value?Dt():(At=P.value)!=null&&At.skipInvitationUpdate?q(T.value[1+B.value].id):(await Ye(),ie.value&&q(T.value[1+B.value].id))}function q(At){O.value=[...new Set([...O.value,At])],T.value.find(ct=>ct.id===At)&&(de.value=[],k.value=At)}function ne(){const At=B.value-1;At>=0&&(At===0&&(a.value={...e.invitationPayload},l.value={}),q(T.value[At].id),he.value={message:"",class:""})}io(B,async(At,hn)=>{if(At===hn)return;T.value.forEach((Ht,ye)=>{!O.value.includes(Ht.id)&&ye<=B.value&&O.value.push(Ht.id)});const ct=T.value[At];ct.id!==window.location.hash.replace("#","")&&Y(ct)}),io(a,async(At,hn)=>{At.inviteeEmail!==Be.value.inviteeEmail&&(Ue.value=null)},{deep:!0});const ue=kt(e.pageTitleDescription),J=kt(e.primaryLocale),ce=Ge(()=>e.pageTitle),ge=Ge(()=>P.value?P.value.stepLabel.replace("{$step}",n("invitation.step")+" "+(1+B.value)):""),de=kt({}),he=kt({message:"",class:""}),ie=Ge(()=>!Object.keys(de.value).length),Be=Ge(()=>a.value.userId?{invitationData:{userId:a.value.userId}}:{invitationData:{inviteeEmail:a.value.inviteeEmail}}),$e=Ge(()=>({invitationData:{...l.value,userGroupsToAdd:a.value.userGroupsToAdd}})),Ue=kt(null);async function V(){const{apiUrl:At}=to("invitations/add/".concat(f.value)),{data:hn,fetch:ct,validationError:Ht}=fr(At,{method:"POST",body:Be.value,expectValidationError:!0});await ct(),Ht.value?(delete Ht.value.errors.userId,de.value=Ht.value.errors):(de.value=[],Ue.value=hn.value.invitationId)}async function Ye(){if(de.value=[],he.value={},Ue.value||await V(),ie.value){const{apiUrl:At}=to("invitations/".concat(Ue.value,"/populate")),{fetch:hn,validationError:ct}=fr(At,{method:"PUT",body:$e.value,expectValidationError:!0});await hn(),ct.value?de.value=ct.value.errors:de.value=[]}}const{redirectToPage:Fe}=to("management/settings/access"),St=kt(d.value==="editUser"?!0:a.value.disabled);io(a,async(At,hn)=>{St.value=a.value.disabled,a.value.userGroupsToAdd.length===0&&(St.value=!0),b.value=!0},{deep:!0});async function Dt(){if(await Ye(),ie.value){St.value=!0;const{apiUrl:At}=to("invitations/".concat(Ue.value,"/invite")),{data:hn,fetch:ct}=fr(At,{method:"PUT",body:{}});await ct(),hn.value?t({title:n("userInvitation.modal.title"),message:n("userInvitation.modal.message",{email:a.value.inviteeEmail}),actions:[{label:n("userInvitation.modal.button"),callback:Ht=>{Fe()}}],modalStyle:"success"}):St.value=!1}}function He(){b.value?d.value==="editUser"?confirm(n("form.dataHasChanged"))&&Fe():t({name:"cancel",title:n("invitation.cancelInvite.title"),message:n("userInvitation.cancel.message"),actions:[{label:n("invitation.cancelInvite.actionName"),isWarnable:!0,callback:At=>{Fe()}},{label:n("userInvitation.cancel.goBack"),callback:At=>{At()}}],modalStyle:"negative"}):Fe()}const ft={};function ht(At,hn){At==="searchUser"&&(Ue.value=null),ft[At]=hn}return Pr(()=>{window.location.hash||q(T.value[0].id)}),{invitationPayload:a,updatePayload:S,registerActionForStepId:ht,emailTemplatesApiUrl:i,invitationUserData:h,currentStep:P,currentStepIndex:B,isOnFirstStep:W,isOnLastStep:Z,isValid:ie,pageTitle:ce,startedSteps:O,stepTitle:ge,openStep:q,isSubmitting:St,invitationMode:d,steps:T,pageTitleDescription:ue,errors:de,userSearch:he,primaryLocale:J,nextStep:z,previousStep:ne,cancel:He}}),gdt={class:"pb-8"},vdt={class:"mt-1 text-lg-normal"},bdt={__name:"UserInvitationHeader",props:{pageTitle:{type:String,required:!0},pageTitleDescription:{type:String,required:!0}},setup(e){return(t,n)=>(L(),Q("div",gdt,[H("h1",{ref:"wrapper",class:"mb-1 mt-8 flex text-3xl-bold"},ee(e.pageTitle),513),n[0]||(n[0]=D()),H("p",vdt,ee(e.pageTitleDescription),1)]))}},ydt={class:"flex items-center"},_dt={key:0,class:"pt-1 text-lg-normal"},Sdt={key:1,class:"pt-1 text-lg-normal"},id={__name:"FormDisplayItemBasic",props:{headingElement:{required:!0,type:String},heading:{type:String,required:!0},value:{type:String,required:!1,default:"-"},htmlValue:{type:String,required:!1,default:null}},setup(e){return(t,n)=>{const i=Hr("strip-unsafe-html");return L(),Q(bt,null,[(L(),Ee(Io(e.headingElement),{class:"text-base-normal text-secondary"},{default:te(()=>[D(ee(e.heading),1)]),_:1})),n[1]||(n[1]=D()),H("div",ydt,[e.htmlValue?Gn((L(),Q("p",Sdt,null,512)),[[i,e.htmlValue]]):(L(),Q("p",_dt,ee(e.value),1)),n[0]||(n[0]=D()),is(t.$slots,"valueSuffix")])],64)}}},Cdt={class:"rounded border-light bg-[#fbe7f1] px-2 py-2 text-center text-lg-semibold leading-5"},wdt={__name:"UserInvitationUserGroupsTable",props:{userGroups:{type:Array,required:!0}},setup(e){const t=e,{localize:n}=Jn(),{t:i}=Jn(),{formatShortDate:a}=Ed(),l=Ge(()=>t.userGroups.filter(ne=>ne.roleId===pkp.const.ROLE_ID_REVIEWER).map(ne=>ne.userGroupId)),f=Ge(()=>t.userGroups.map(ne=>({value:ne.userGroupId,label:n(ne.name),disabled:!1}))),d=v9(),h=Ge(()=>d.invitationPayload.userGroupsToAdd);Y(f);function b(ne,ue,J){delete d.errors["userGroupsToAdd."+ne+".".concat(ue)];const ce=[...d.invitationPayload.userGroupsToAdd];ce[ne][ue]=J,d.updatePayload("userGroupsToAdd",ce,!1),Y(f)}const S=Ge(()=>f.value.filter(ne=>!d.invitationPayload.currentUserGroups.find(ue=>ue.id===ne.value&&!ue.dateEnd)));function k(ne){return l.value.includes(ne.userGroupId)?[{label:i("invitation.masthead.show"),value:!0}]:[{label:i("invitation.masthead.show"),value:!0},{label:i("invitation.masthead.hidden"),value:!1}]}function T(){return d.invitationPayload.userGroupsToAdd[0]?Object.values(d.invitationPayload.userGroupsToAdd[0]).some(ne=>ne!==null):!1}function O(){const ne=[...d.invitationPayload.userGroupsToAdd];ne.push({userGroupId:null,dateStart:null,masthead:null}),d.updatePayload("userGroupsToAdd",ne,!1)}const{openDialog:P}=Ms();function B(ne,ue){z.value<=1?P({name:"oneRoleRemain",title:i("invitation.role.removeRole.button"),message:i("user.removeRole.roleRemainMessage"),actions:[{label:i("common.close"),callback:J=>{J()}}],modalStyle:"negative"}):P({name:"removeRole",title:i("invitation.role.removeRole.button"),message:i("user.removeRole.message"),actions:[{label:i("common.yes"),isWarnable:!0,callback:J=>{d.invitationPayload.currentUserGroups.find((ce,ge)=>ge===ue).dateEnd=new Date,q(d.invitationPayload.userId,ne.id),J()}},{label:i("common.no"),callback:J=>{J()}}],modalStyle:"negative"})}function W(ne){const ue=[...d.invitationPayload.userGroupsToAdd];T&&ue.length===1&&ue.push({userGroupId:null,dateStart:null,masthead:null}),ue.splice(ne,1),d.updatePayload("userGroupsToAdd",ue,!1),Y(f)}const Z=Ge(()=>d.errors||[]);function Y(ne){ne.value.filter(ue=>{d.invitationPayload.userGroupsToAdd.find(J=>J.userGroupId===ue.value)?ue.disabled=!0:ue.disabled=!1})}const z=Ge(()=>d.invitationPayload.currentUserGroups.filter(ne=>ne.dateEnd===null).length);async function q(ne,ue){const{apiUrl:J}=to("users/".concat(ne,"/endRole/").concat(ue)),{fetch:ce}=fr(J,{method:"PUT"});await ce()}return(ne,ue)=>(L(),Ee(du,null,{"bottom-controls":te(()=>[pe(ms,{"is-disabled":se(d).invitationPayload.disabled,onClick:ue[0]||(ue[0]=J=>O())},{default:te(()=>[D(ee(se(i)("invitation.role.addRole.button")),1)]),_:1},8,["is-disabled"])]),default:te(()=>[pe(Ad,null,{default:te(()=>[pe(Ei,null,{default:te(()=>[D(ee(se(i)("userInvitation.roleTable.role")),1)]),_:1}),ue[1]||(ue[1]=D()),pe(Ei,null,{default:te(()=>[D(ee(se(i)("userInvitation.roleTable.startDate")),1)]),_:1}),ue[2]||(ue[2]=D()),pe(Ei,null,{default:te(()=>[D(ee(se(i)("userInvitation.roleTable.endDate")),1)]),_:1}),ue[3]||(ue[3]=D()),pe(Ei,null,{default:te(()=>[D(ee(se(i)("userInvitation.roleTable.journalMasthead")),1)]),_:1}),ue[4]||(ue[4]=D()),pe(Ei)]),_:1}),ue[15]||(ue[15]=D()),pe(Kd,null,{default:te(()=>[(L(!0),Q(bt,null,Sn(se(d).invitationPayload.currentUserGroups,(J,ce)=>(L(),Ee(Bi,{key:ce,class:"h-[3.25rem]"},{default:te(()=>[pe(as,null,{default:te(()=>[D(ee(J.name),1)]),_:2},1024),ue[5]||(ue[5]=D()),pe(as,null,{default:te(()=>[D(ee(J.dateStart?se(a)(J.dateStart):"---"),1)]),_:2},1024),ue[6]||(ue[6]=D()),pe(as,null,{default:te(()=>[D(ee(J.dateEnd?se(a)(J.dateEnd):"---"),1)]),_:2},1024),ue[7]||(ue[7]=D()),pe(as,null,{default:te(()=>[D(ee(l.value.includes(J.id)||J.masthead?se(i)("invitation.masthead.show"):se(i)("invitation.masthead.hidden")),1)]),_:2},1024),ue[8]||(ue[8]=D()),J.dateEnd?(L(),Ee(as,{key:1},{default:te(()=>[H("div",Cdt,ee(se(i)("invitation.removeRoles")),1)]),_:1})):(L(),Ee(as,{key:0},{default:te(()=>[pe(ms,{"is-warnable":!0,onClick:ge=>B(J,ce)},{default:te(()=>[D(ee(se(i)("invitation.role.removeRole.button")),1)]),_:2},1032,["onClick"])]),_:2},1024))]),_:2},1024))),128)),ue[14]||(ue[14]=D()),se(d).invitationPayload.disabled?we("",!0):(L(!0),Q(bt,{key:0},Sn(h.value,(J,ce)=>(L(),Ee(Bi,{key:ce},{default:te(()=>[pe(as,null,{default:te(()=>[pe(e9,{name:"userGroupId",label:se(i)("invitation.role.selectRole"),"is-required":!0,value:J.userGroupId,options:S.value,"all-errors":{userGroupId:Z.value["userGroupsToAdd."+ce+".userGroupId"]},class:"userInvitation__roleSelect",onChange:(ge,de,he,ie)=>b(ce,ge,he)},null,8,["label","value","options","all-errors","onChange"])]),_:2},1024),ue[10]||(ue[10]=D()),pe(as,null,{default:te(()=>[pe(Nb,{name:"dateStart",label:se(i)("invitation.role.dateStart"),"input-type":"date","is-required":!0,value:J.dateStart,"all-errors":{dateStart:Z.value["userGroupsToAdd."+ce+".dateStart"]},onChange:(ge,de,he,ie)=>b(ce,ge,he)},null,8,["label","value","all-errors","onChange"])]),_:2},1024),ue[11]||(ue[11]=D()),pe(as,null,{default:te(()=>ue[9]||(ue[9]=[D("---")])),_:1}),ue[12]||(ue[12]=D()),pe(as,null,{default:te(()=>[pe(e9,{name:"masthead",label:se(i)("invitation.role.masthead"),"is-required":!0,value:J.masthead,options:k(J),"all-errors":{masthead:Z.value["userGroupsToAdd."+ce+".masthead"]},onChange:(ge,de,he,ie)=>b(ce,ge,he)},null,8,["label","value","options","all-errors","onChange"])]),_:2},1024),ue[13]||(ue[13]=D()),pe(as,null,{default:te(()=>[se(d).invitationPayload.userGroupsToAdd.length>1||T()?(L(),Ee(ms,{key:0,"is-warnable":!0,onClick:ge=>W(ce)},{default:te(()=>[D(ee(se(i)("invitation.role.removeRole.button")),1)]),_:2},1032,["onClick"])):we("",!0)]),_:2},1024)]),_:2},1024))),128))]),_:1}),ue[16]||(ue[16]=D())]),_:1}))}},Edt={key:0,class:"inline-flex w-full gap-x-1 rounded border border-s-4 border-attention p-2"},kdt={class:"leading-none"},xdt={class:"text-lg-normal"},Tdt={__name:"FormErrorSummary",props:{errors:{type:Object,default:()=>{}}},setup(e){const{t}=Jn(),n=e,i=Ge(()=>Object.keys(n.errors).length),a=Ge(()=>{const l=i.value;return l>1?t("form.errorSummaryMany",{count:l}):t("form.errorSummaryOne")});return(l,f)=>i.value?(L(),Q("div",Edt,[H("div",kdt,[pe(Vs,{icon:"Error",class:"h-5 w-5",inline:!0})]),f[0]||(f[0]=D()),H("span",xdt,ee(a.value),1)])):we("",!0)}},Idt={class:"mt-8 flex flex-col gap-y-2"},Adt={__name:"UserInvitationExtendedMetaData",setup(e){const{t}=Jn(),n=v9();return(i,a)=>(L(),Q("div",Idt,[pe(id,{"heading-element":"h4",heading:se(t)("user.url"),value:se(n).invitationUserData.homePageUrl?se(n).invitationUserData.homePageUrl:"--"},null,8,["heading","value"]),a[0]||(a[0]=D()),pe(id,{"heading-element":"h4",heading:se(t)("user.phone"),value:se(n).invitationUserData.phone?se(n).invitationUserData.phone:"--"},null,8,["heading","value"]),a[1]||(a[1]=D()),pe(id,{"heading-element":"h4",heading:se(t)("user.workingLanguages"),value:se(n).invitationUserData.locales?se(n).invitationUserData.locales:"--"},null,8,["heading","value"]),a[2]||(a[2]=D()),pe(id,{"heading-element":"h4",heading:se(t)("user.interests"),value:se(n).invitationUserData.reviewInterests?se(n).invitationUserData.reviewInterests:"--"},null,8,["heading","value"]),a[3]||(a[3]=D()),pe(id,{"heading-element":"h4",heading:se(t)("user.bioStatement"),"html-value":i.localize(se(n).invitationUserData.biography)?i.localize(se(n).invitationUserData.biography):"--"},null,8,["heading","html-value"]),a[4]||(a[4]=D()),pe(id,{"heading-element":"h4",heading:se(t)("user.mailingAddress"),"html-value":se(n).invitationUserData.mailingAddress?se(n).invitationUserData.mailingAddress:"--"},null,8,["heading","html-value"]),a[5]||(a[5]=D()),pe(id,{"heading-element":"h4",heading:se(t)("user.signature"),"html-value":i.localize(se(n).invitationUserData.signature)?i.localize(se(n).invitationUserData.signature):"--"},null,8,["heading","html-value"])]))}},Odt={__name:"ShowMore",props:{label:{type:String,required:!0}},setup(e){return(t,n)=>(L(),Ee(se(FVe),null,{default:te(()=>[pe(se($Ve),{as:"template",class:""},{default:te(({open:i})=>[pe(ms,{"is-active":"",icon:i?"Dropup":"Dropdown"},{default:te(()=>[D(ee(e.label),1)]),_:2},1032,["icon"])]),_:1}),n[0]||(n[0]=D()),pe(se(BVe),{class:""},{default:te(()=>[is(t.$slots,"default")]),_:3})]),_:3}))}},Rdt={key:0,class:"m-8 border-x border-b border-t border-light bg-secondary p-4"},Ddt={class:"text-xl-bold text-heading"},Ldt={class:"text-base-normal text-secondary"},Pdt={key:1},Mdt={key:0,class:"p-4"},Ndt={key:2,class:"p-8"},Fdt={class:"mb-8 flex flex-col gap-y-2"},$dt={key:0},Bdt={class:"p-8"},Vdt={__name:"UserInvitationDetailsFormStep",props:{form:{type:Object,required:!0},userGroups:{type:Array,required:!0},validateFields:{type:Array,required:!0}},setup(e){function t(k,T,O,P){h(k,T,O,P),T.fields&&T.fields.forEach(B=>{B.isMultilingual&&Object.keys(B.value).forEach(W=>{(B.value[W]===null||B.value[W]==="")&&delete B.value[W]}),i.updatePayload(B.name,B.value,!1)})}const{t:n}=Jn(),i=v9(),a=e,{form:l,connectWithPayload:f,connectWithErrors:d,set:h,structuredErrors:b}=B1(a.form);i.invitationPayload.userId||(l.value.fields.forEach(k=>{k.isMultilingual?i.updatePayload(k.name,i.invitationPayload[k.name]?i.invitationPayload[k.name]:k.value,!i.invitationPayload[k.name]):i.invitationPayload[k.name]===null?i.updatePayload(k.name,k.value,!0):i.updatePayload(k.name,i.invitationPayload[k.name],!0)}),f(i.invitationPayload));const S=Ge(()=>b(i.errors));return d(S),(k,T)=>(L(),Q(bt,null,[se(i).invitationPayload.disabled?(L(),Q("div",Rdt,[H("h2",Ddt,ee(se(n)("userInvitation.user.disableTitle")),1),T[0]||(T[0]=D()),H("p",Ldt,ee(se(n)("userInvitation.user.disableMessage")),1)])):we("",!0),T[7]||(T[7]=D()),se(i).invitationPayload.userId===null?(L(),Q("div",Pdt,[Object.keys(se(i).errors).length?(L(),Q("div",Mdt,[pe(Tdt,{errors:se(i).errors},null,8,["errors"])])):we("",!0),T[1]||(T[1]=D()),pe(oa,Cn(se(l),{class:"userInvitation__stepForm","show-error-footer":!1,onSet:t}),null,16)])):we("",!0),T[8]||(T[8]=D()),se(i).invitationPayload.userId!==null?(L(),Q("div",Ndt,[H("div",Fdt,[pe(id,{"heading-element":"h4",heading:se(n)("user.email"),value:se(i).invitationPayload.inviteeEmail},null,8,["heading","value"]),T[2]||(T[2]=D()),pe(id,{"heading-element":"h4",heading:se(n)("user.orcid"),value:se(i).invitationPayload.orcid},{valueSuffix:te(()=>[se(i).invitationPayload.orcidIsVerified?(L(),Ee(Vs,{key:0,icon:"Orcid",class:"ml-1 h-4 w-4",inline:!0})):we("",!0)]),_:1},8,["heading","value"]),T[3]||(T[3]=D()),pe(id,{"heading-element":"h4",heading:se(n)("user.givenName"),value:k.localize(se(i).invitationPayload.givenName)},null,8,["heading","value"]),T[4]||(T[4]=D()),pe(id,{"heading-element":"h4",heading:se(n)("user.familyName"),value:k.localize(se(i).invitationPayload.familyName)},null,8,["heading","value"]),T[5]||(T[5]=D()),pe(id,{"heading-element":"h4",heading:se(n)("user.affiliation"),value:k.localize(se(i).invitationPayload.affiliation)},null,8,["heading","value"])]),T[6]||(T[6]=D()),se(i).invitationMode!="create"?(L(),Q("div",$dt,[pe(Odt,{label:se(n)("common.viewMoreDetails")},{default:te(()=>[pe(Adt)]),_:1},8,["label"])])):we("",!0)])):we("",!0),T[9]||(T[9]=D()),H("div",Bdt,[pe(wdt,{"user-groups":e.userGroups},null,8,["user-groups"])])],64))}},Hdt={class:"space-y-4 p-8"},Udt={__name:"UserInvitationSearchFormStep",props:{validateFields:{type:Array,default(){return null}}},setup(e){const t=v9(),{t:n}=Jn();t.registerActionForStepId("searchUser",f);const i=kt({search:""});function a(d,h,b){i.value[d]=b}const l=Ge(()=>i.value.search.trim());async function f(){if(l.value!==""){const{apiUrl:b}=to("users"),{data:S,fetch:k}=fr(b,{query:{searchPhrase:l.value,status:"all"}});if(await k(),S.value.items.length>0){let T={};T=S.value.items.find(O=>O.email===i.value.search.trim()),T||(T=S.value.items.find(O=>O.userName===i.value.search.trim())),T||(T=h(S)),T?(t.updatePayload("inviteeEmail",T.email),t.updatePayload("userId",T.id),t.updatePayload("givenName",T.givenName),t.updatePayload("familyName",T.familyName),t.updatePayload("orcid",T.orcid),t.updatePayload("currentUserGroups",T.groups),t.updatePayload("affiliation",T.affiliation),t.updatePayload("country",T.country),t.updatePayload("disabled",T.disabled),t.userSearch.message=n("userInvitation.search.userFound"),t.userSearch.class="font-bold text-success"):(d(i.value.search.trim())&&t.updatePayload("inviteeEmail",i.value.search.trim()),t.userSearch.message=n("userInvitation.search.userNotFound"),t.userSearch.class="font-bold text-negative")}else d(i.value.search.trim())&&t.updatePayload("inviteeEmail",i.value.search.trim()),t.userSearch.message=n("userInvitation.search.userNotFound"),t.userSearch.class="font-bold text-negative";return!0}else return t.errors.error=n("invitation.searchForm.emptyError"),!1;function d(b){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(b)}function h(b){const S=/.*orcid.org\//,k=i.value.search.trim().replace(S,"");return b.value.items.find(T=>{var P;return((P=T.orcid)==null?void 0:P.replace(S,""))===k})}}return(d,h)=>(L(),Q("div",Hdt,[pe(Nb,{label:se(n)("userInvitation.searchField"),value:i.value.search,description:se(n)("userInvitation.searchField.description"),name:"search",size:"large",onChange:a},null,8,["label","value","description"])]))}},zdt={__name:"UserInvitationEmailComposerStep",props:{email:{type:Object,required:!0},validateFields:{type:Array,default(){return null}}},setup(e){const t=e,{t:n}=Jn(),i=v9(),a=Ge(()=>i.invitationPayload.emailComposer);function l(h){const b={...i.invitationPayload.emailComposer,...h};i.updatePayload("emailComposer",b,!1)}i.invitationPayload.body||l({subject:t.email.subject,body:t.email.body});const f=Ge(()=>i.invitationPayload.inviteeEmail),d=Ge(()=>{let h={value:i.invitationPayload.inviteeEmail,label:{}};return t.email.locales.forEach(b=>{h.label={...h.label,[b.locale]:i.invitationPayload.inviteeEmail}}),[h]});return(h,b)=>(L(),Ee(Mne,Cn({id:se(i).currentStep.id,"add-c-c-label":se(n)("common.addCCBCC"),bcc:t.email.bcc,"bcc-label":se(n)("email.bcc"),"body-label":se(n)("stageParticipants.notify.message"),"can-change-recipients":t.email.canChangeRecipients,cc:t.email.cc,"cc-label":se(n)("email.cc"),"confirm-switch-locale-label":se(n)("email.confirmSwitchLocale"),"deselect-label":se(n)("common.deselect"),"email-templates":t.email.emailTemplates,"email-templates-api-url":se(i).emailTemplatesApiUrl,errors:se(i).errors.emailComposer,"find-template-label":se(n)("common.findTemplate"),"initial-template-key":t.email.initialTemplateKey,"insert-label":se(n)("common.insert"),"insert-modal-label":se(n)("common.insertContent"),"insert-content-label":se(n)("common.content"),"insert-search-label":se(n)("common.insertContentSearch"),"load-template-label":se(n)("common.emailTemplates"),locale:t.email.locale,locales:t.email.locales,"more-search-results-label":se(n)("common.numberedMore"),"recipient-options":d.value,recipients:f.value,"recipients-label":se(n)("email.to"),"remove-item-label":se(n)("common.removeItem"),"searching-label":se(n)("common.searching"),"search-results-label":se(n)("search.searchResults"),"subject-label":se(n)("email.subject"),"switch-to-label":se(n)("common.switchTo"),"switch-to-named-language-label":se(n)("common.switchToNamedItem"),variables:t.email.variables},a.value,{onSet:b[0]||(b[0]=(S,k)=>l(k))}),null,16,["id","add-c-c-label","bcc","bcc-label","body-label","can-change-recipients","cc","cc-label","confirm-switch-locale-label","deselect-label","email-templates","email-templates-api-url","errors","find-template-label","initial-template-key","insert-label","insert-modal-label","insert-content-label","insert-search-label","load-template-label","locale","locales","more-search-results-label","recipient-options","recipients","recipients-label","remove-item-label","searching-label","search-results-label","subject-label","switch-to-label","switch-to-named-language-label","variables"]))}},Wdt={key:0,class:"border-b border-light"},jdt={class:"flex border-b border-light p-4"},Zdt={class:"flex-1"},qdt={class:"text-xl-bold text-heading"},Gdt={class:"font-bold text-negative"},Kdt={class:"mt-1 text-lg-normal"},Ydt={class:"flex-1"},Xdt={class:"border-x border-b border-light bg-secondary p-8"},Jdt={__name:"UserInvitationPage",props:{steps:{type:Array,required:!0},primaryLocale:{type:String,required:!0},emailTemplatesApiUrl:{type:String,required:!0},pageTitle:{type:String,required:!0},pageTitleDescription:{type:String,required:!0},invitationPayload:{type:Object,required:!0},invitationType:{type:String,required:!0},invitationMode:{type:String,required:!0},invitationUserData:{type:Array,required:!0}},setup(e){const t=e,{t:n}=Jn(),i=kt(null),a=v9(t),l={UserInvitationDetailsFormStep:Vdt,UserInvitationSearchFormStep:Udt,UserInvitationEmailComposerStep:zdt};return(f,d)=>{const h=Xe("notification");return L(),Q("div",null,[pe(bdt,{"page-title":se(a).pageTitle,"page-title-description":se(a).pageTitleDescription},null,8,["page-title","page-title-description"]),d[7]||(d[7]=D()),se(a).steps.length?(L(),Ee(EH,{key:0,class:"border-x border-t border-light bg-secondary",current:se(a).currentStep.id,"started-steps":se(a).startedSteps,label:se(n)("invitation.wizard.completeSteps"),"progress-label":se(n)("common.showingSteps"),"show-steps-label":se(n)("common.showingSteps"),"scroll-to":i.value,"onStep:open":se(a).openStep},{default:te(()=>[(L(!0),Q(bt,null,Sn(se(a).steps,b=>(L(),Ee(CH,{id:b.id,key:b.id,label:b.name},{default:te(()=>[se(a).currentStep.id===b.id?(L(),Q("div",Wdt,[H("div",jdt,[H("div",Zdt,[H("h2",qdt,ee(se(a).stepTitle),1),d[0]||(d[0]=D()),H("p",{class:Rn(se(a).userSearch.class)},ee(se(a).userSearch.message),3),d[1]||(d[1]=D()),H("p",Gdt,ee(se(a).errors.error),1),d[2]||(d[2]=D()),H("p",Kdt,ee(b.description),1)])]),d[4]||(d[4]=D()),(L(!0),Q(bt,null,Sn(b.sections,S=>(L(),Q("div",{key:S.id,class:"flex"},[H("div",Ydt,[b.type==="review"?(L(),Q(bt,{key:0},[Object.keys(se(a).errors).length>0?(L(),Ee(h,{key:0,type:"warning"},{default:te(()=>[D(ee(se(n)("invitation.wizard.errors")),1)]),_:1})):we("",!0)],64)):we("",!0),d[3]||(d[3]=D()),(L(),Ee(Io(l[S.sectionComponent]),Cn({key:S.sectionComponent,ref_for:!0},S.props),null,16))])]))),128))])):we("",!0)]),_:2},1032,["id","label"]))),128))]),_:1},8,["current","started-steps","label","progress-label","show-steps-label","scroll-to","onStep:open"])):we("",!0),d[8]||(d[8]=D()),H("div",Xdt,[pe(r0,null,{default:te(()=>[pe(ms,{"is-warnable":!0,onClick:se(a).cancel},{default:te(()=>[D(ee(se(n)("common.cancel")),1)]),_:1},8,["onClick"]),d[5]||(d[5]=D()),se(a).isOnFirstStep?we("",!0):(L(),Ee(ms,{key:0,onClick:se(a).previousStep},{default:te(()=>[D(ee(se(n)("common.back")),1)]),_:1},8,["onClick"])),d[6]||(d[6]=D()),pe(ms,{"is-primary":!0,"is-disabled":se(a).isSubmitting,onClick:se(a).nextStep},{default:te(()=>[D(ee(se(a).currentStep.nextButtonLabel),1)]),_:1},8,["is-disabled","onClick"])]),_:1})])])}}},gR=Nf("userInvitationPage",e=>{const{openDialog:t}=Ms(),{t:n}=Jn(),{announce:i}=iO(),a=kt({}),l=kt(null),f=kt(null),d=kt(null),h=kt({}),b=Ge(()=>{const{apiUrl:ht}=to("invitations");return ht.value+"/"+e.invitationId+"/key/"+e.invitationKey});async function S(){const{data:ht,fetch:At}=fr(b,{expectValidationError:!0,method:"GET"});await At(),ht.value?(l.value=ht.value.email,f.value=ht.value.userId,d.value=ht.value.existingUser,ht.value.familyName&&k("familyName",ht.value.familyName),ht.value.givenName&&k("givenName",ht.value.givenName),ht.value.affiliation&&k("affiliation",ht.value.affiliation),k("userCountry",ht.value.country),k("orcid",ht.value.orcid),k("orcidIsVerified",ht.value.orcidIsVerified),k("orcidAccessDenied",ht.value.orcidAccessDenied),k("orcidAccessToken",ht.value.orcidAccessToken),k("orcidAccessScope",ht.value.orcidAccessScope),k("orcidRefreshToken",ht.value.orcidRefreshToken),k("orcidAccessExpiresOn",ht.value.orcidAccessExpiresOn),k("userGroupsToAdd",ht.value.userGroupsToAdd),k("privacyStatement",!!f.value),k("username",ht.value.username),k("password",null),h.value=[],W.value.length===0&&await He()):t({title:n("acceptInvitation.authorization.shouldBeAnonymous"),message:n("acceptInvitation.authorization.message"),actions:[{label:n("user.logOut"),callback:()=>{const{redirectToPage:hn}=to("login/signOut");hn()}}],close:()=>{const{redirectToPage:hn}=to("submissions");hn()},modalStyle:"negative"})}function k(ht,At){a.value[ht]=At}function T(ht){const At=["orcid","orcidIsVerified","orcidAccessDenied","orcidAccessToken","orcidAccessScope","orcidRefreshToken","orcidAccessExpiresOn"],hn=ht===null;At.forEach(ct=>{a.value[ct]=hn?null:ht[ct]})}const O=Ge(()=>a.value.orcidIsVerified?!0:!!d.value.orcidIsVerified),P=Ge(()=>{const ht=a.value.orcid;if(ht)return ht;const At=d.value.orcid;return At||null}),B=kt(e.steps[0]?e.steps[0].id:""),W=kt(e.steps),Z=kt([]),Y=Ge(()=>W.value.find(ht=>ht.id===B.value)),z=Ge(()=>W.value.findIndex(ht=>ht.id===B.value)),q=Ge(()=>!z.value),ne=Ge(()=>z.value===W.value.length-1),ue=Ge(()=>W.value.filter(ht=>ht.type==="form"));function J(ht){window.history.pushState({},ht.name,"#"+ht.id)}async function ce(){ne.value?He():(await Fe(),he.value&&ge(W.value[1+z.value].id))}function ge(ht){Z.value=[...new Set([...Z.value,ht])],W.value.find(hn=>hn.id===ht)&&(h.value=[],B.value=ht)}function de(){const ht=z.value-1;ht>=0&&ge(W.value[ht].id)}const he=Ge(()=>Object.keys(h.value).length===0),ie=kt(e.pageTitleDescription),Be=Ge(()=>Y.value?Y.value.name.replace("{$step}",e.pageTitle):""),$e=Ge(()=>Y.value?Y.value.stepLabel.replace("{$step}",n("invitation.step")+" "+(1+z.value)):""),Ue=Ge(()=>Y.value?Y.value.nextButtonLabel:"");io(z,async(ht,At)=>{if(ht===At)return;W.value.forEach((ct,Ht)=>{!Z.value.includes(ct.id)&&Ht<=z.value&&Z.value.push(ct.id)});const hn=W.value[ht];hn.id!==window.location.hash.replace("#","")&&J(hn)});const V=Ge(()=>{const{apiUrl:ht}=to("invitations");return ht.value+"/"+e.invitationId+"/key/"+e.invitationKey+"/refine"}),Ye=Ge(()=>{let ht={};return Y.value&&(Y.value.id==="verifyOrcid"||!f.value)&&Y.value.sections.forEach(At=>{let hn={};At.props.validateFields.forEach(ct=>{Object.keys(a.value).includes(ct)&&(hn[ct]=a.value[ct])}),ht={...ht,...hn}}),ht});async function Fe(){const{validationError:ht,fetch:At}=fr(V,{expectValidationError:!0,method:"PUT",body:{invitationData:Ye.value}});!a.value.privacyStatement&&Y.value.id!=="verifyOrcid"?h.value={privacyStatement:[n("acceptInvitation.privacyStatement.validation")]}:(await At(),ht.value?h.value=ht.value.errors:h.value=[])}const St=Ge(()=>{const{apiUrl:ht}=to("invitations");return ht.value+"/"+e.invitationId+"/key/"+e.invitationKey+"/finalize"}),{redirectToPage:Dt}=to("submissions");async function He(){if(Object.keys(Ye.value).length>0&&await Fe(),he.value){const{data:ht,fetch:At}=fr(St,{expectValidationError:!0,method:"PUT",body:{}});await At(),ht.value&&t({title:n("acceptInvitation.modal.title"),message:n("acceptInvitation.modal.message"),actions:[{label:n("acceptInvitation.modal.button"),callback:hn=>{Dt()}}],modalStyle:"success"})}}function ft(){t({name:"cancel",title:n("acceptInvitation.cancelInvite.title"),message:n("acceptInvitation.cancel.message"),actions:[{label:n("acceptInvitation.cancelInvite.button"),isWarnable:!0,callback:ht=>{Dt()}},{label:n("userInvitation.cancel.goBack"),callback:ht=>{ht()}}],modalStyle:"negative"})}return Pr(async()=>{i(n("common.loading")),await S(),W.value[0]&&ge(W.value[0].id),i(n("common.loaded"))}),{currentStep:Y,currentStepIndex:z,hasValidOrcid:O,isOnFirstStep:q,isOnLastStep:ne,isValid:he,pageTitle:Be,startedSteps:Z,stepTitle:$e,openStep:ge,orcidUri:P,steps:W,pageTitleDescription:ie,errors:h,stepButtonTitle:Ue,formSteps:ue,nextStep:ce,previousStep:de,setOrcidData:T,updateAcceptInvitationPayload:k,cancel:ft,acceptInvitationPayload:a,email:l,userId:f,existingUser:d}}),Qdt={class:"p-8 pb-0"},eft={class:"p-1"},tft={class:"p-1"},nft={__name:"AcceptInvitationUserDetailsForms",props:{form:{type:Object,required:!0},validateFields:{type:Array,required:!0}},setup(e){const t=e,n=gR();function i(S,k,T,O){d(S,k,T,O),k.fields&&k.fields.forEach(P=>{P.isMultilingual&&Object.values(P.value).every(B=>B===null||B===""),n.updateAcceptInvitationPayload(P.name,P.value)})}const{form:a,connectWithPayload:l,connectWithErrors:f,set:d,structuredErrors:h}=B1(t.form);n.userId||a.value.fields.forEach(S=>{S.isMultilingual?n.updateAcceptInvitationPayload(S.name,n.acceptInvitationPayload[S.name]?n.acceptInvitationPayload[S.name]:S.value):n.acceptInvitationPayload[S.name]===null?n.updateAcceptInvitationPayload(S.name,S.value):n.updateAcceptInvitationPayload(S.name,n.acceptInvitationPayload[S.name])}),l(n.acceptInvitationPayload);const b=Ge(()=>h(n.errors));return f(b),(S,k)=>(L(),Q(bt,null,[H("div",Qdt,[H("div",null,[H("div",eft,[pe(id,{"heading-element":"h4",heading:S.t("user.email"),value:se(n).email},null,8,["heading","value"])])]),k[0]||(k[0]=D()),H("div",null,[H("div",tft,[pe(id,{"heading-element":"h4",heading:S.t("user.orcid"),value:se(n).acceptInvitationPayload.orcid?se(n).acceptInvitationPayload.orcid:S.t("invitation.orcid.acceptInvitation.message")},{valueSuffix:te(()=>[se(n).acceptInvitationPayload.orcid?(L(),Ee(Vs,{key:0,icon:"Orcid",class:"ml-1 h-4 w-4",inline:!0})):we("",!0)]),_:1},8,["heading","value"])])])]),k[1]||(k[1]=D()),pe(oa,Cn(se(a),{class:"acceptInvitation__stepForm",onSet:i}),null,16)],64))}},sft={class:"p-8"},oft={class:"py-1"},rft={class:"my-4"},ift={class:"my-4"},aft={class:"flex"},lft={__name:"AcceptInvitationUserAccountDetails",props:{validateFields:{type:Array,required:!0}},setup(e){const t=e,{t:n}=Jn(),i=kt({password:"",privacyStatement:!1}),{pageUrl:a}=to("about/privacy"),l=[{value:!0,label:n("acceptInvitation.privacyStatement.label",{url:"<a href='".concat(a.value,"'>").concat(n("acceptInvitation.privacyStatement.btn"),"</a>")})}],f=gR();function d(b,S,k){i.value[b]=k,f.updateAcceptInvitationPayload(b,k)}const h=Ge(()=>t.validateFields.reduce((b,S)=>(f.errors[S]&&(b[S]=f.errors[S]),b),{}));return(b,S)=>(L(),Q("div",sft,[H("div",oft,[pe(id,{"heading-element":"h4",heading:se(n)("user.email"),value:se(f).email},null,8,["heading","value"])]),S[0]||(S[0]=D()),H("div",rft,[pe(Nb,{label:se(n)("user.username"),value:se(f).acceptInvitationPayload.username,description:se(n)("acceptInvitation.usernameField.description"),"is-required":!0,name:"username",size:"large","all-errors":h.value,onChange:d},null,8,["label","value","description","all-errors"])]),S[1]||(S[1]=D()),H("div",ift,[pe(Nb,{label:se(n)("user.password"),value:i.value.password,description:se(n)("acceptInvitation.passwordField.description"),"is-required":!0,name:"password","input-type":"password",size:"large","all-errors":h.value,onChange:d},null,8,["label","value","description","all-errors"])]),S[2]||(S[2]=D()),H("div",aft,[pe(aC,{label:se(n)("acceptInvitation.privacyConsent"),"is-required":!0,component:"field-options",value:i.value.privacyStatement,name:"privacyStatement",type:"checkbox",options:l,"all-errors":h.value,onChange:d},null,8,["label","value","all-errors"])])]))}},cft={__name:"AcceptInvitationUserRoles",props:{userGroupsToAdd:{type:Array,required:!0}},setup(e){const{t}=Jn(),{formatShortDate:n}=Ed();return(i,a)=>(L(),Ee(du,{"aria-label":se(t)("manager.roles")},{default:te(()=>[pe(Ad,null,{default:te(()=>[pe(Ei,null,{default:te(()=>[D(ee(se(t)("userInvitation.roleTable.role")),1)]),_:1}),a[0]||(a[0]=D()),pe(Ei,null,{default:te(()=>[D(ee(se(t)("userInvitation.roleTable.startDate")),1)]),_:1}),a[1]||(a[1]=D()),pe(Ei,null,{default:te(()=>[D(ee(se(t)("userInvitation.roleTable.endDate")),1)]),_:1}),a[2]||(a[2]=D()),pe(Ei,null,{default:te(()=>[D(ee(se(t)("userInvitation.roleTable.journalMasthead")),1)]),_:1}),a[3]||(a[3]=D()),pe(Ei)]),_:1}),a[8]||(a[8]=D()),pe(Kd,null,{default:te(()=>[(L(!0),Q(bt,null,Sn(e.userGroupsToAdd,(l,f)=>(L(),Ee(Bi,{key:f},{default:te(()=>[pe(as,{"is-row-header":!0},{default:te(()=>[D(ee(l.userGroupName),1)]),_:2},1024),a[4]||(a[4]=D()),pe(as,null,{default:te(()=>[D(ee(se(n)(l.dateStart)),1)]),_:2},1024),a[5]||(a[5]=D()),pe(as,null,{default:te(()=>[D(ee(l.dateEnd?se(n)(l.dateEnd):"---"),1)]),_:2},1024),a[6]||(a[6]=D()),pe(as,null,{default:te(()=>[D(ee(l.masthead?se(t)("invitation.masthead.show"):se(t)("invitation.masthead.hidden")),1)]),_:2},1024),a[7]||(a[7]=D()),pe(as)]),_:2},1024))),128))]),_:1})]),_:1},8,["aria-label"]))}},uft={__name:"FieldTextDisplay",props:{field:{type:Object,required:!0},headingElement:{required:!0,type:String},displayLocale:{required:!0,type:String,default:""}},setup(e){return(t,n)=>(L(),Ee(id,{"heading-element":e.headingElement,heading:e.field.label,value:e.displayLocale?e.field.value[e.displayLocale]:e.field.value},null,8,["heading-element","heading","value"]))}},dft={__name:"FieldSelectDisplay",props:{field:{type:Object,required:!0},headingElement:{required:!0,type:String}},setup(e){const t=e,n=Ge(()=>{if(t.field.value){const i=t.field.options.find(a=>a.value===t.field.value);if(i)return i.label}return"-"});return(i,a)=>(L(),Ee(id,{"heading-element":e.headingElement,heading:e.field.label,value:n.value},null,8,["heading-element","heading","value"]))}},fft={key:0},pft={class:"flex flex-col gap-y-4"},mft={__name:"FormDisplay",props:{fields:{type:Array,required:!0},supportedFormLocales:{type:Array,required:!0,default:()=>[]},localeHeadingElement:{required:!1,default:"h3",type:String},fieldHeadingElement:{required:!1,default:"h4",type:String}},setup(e){const t={"field-text":uft,"field-select":dft},n=e,i=Ge(()=>a.value?n.supportedFormLocales:[]),a=Ge(()=>!!n.fields.find(l=>l.isMultilingual));return(l,f)=>(L(),Q("div",null,[a.value?(L(),Q("div",fft,[(L(!0),Q(bt,null,Sn(i.value,d=>(L(),Q("div",{key:d.key,class:"mt-8 first:mt-0"},[(L(),Ee(Io(e.localeHeadingElement),{class:"xl-bold mb-3 text-heading"},{default:te(()=>[D(ee(d.label),1)]),_:2},1024)),f[0]||(f[0]=D()),H("div",pft,[(L(!0),Q(bt,null,Sn(e.fields,h=>(L(),Q("div",{key:h.name},[(L(),Ee(Io(t[h.component]||"".concat(h.component,"-display")),{field:h,"heading-element":e.fieldHeadingElement,"display-locale":h.isMultilingual?d.key:""},null,8,["field","heading-element","display-locale"]))]))),128))])]))),128))])):(L(!0),Q(bt,{key:1},Sn(e.fields,d=>(L(),Q("div",{key:d.name,class:"flex flex-col gap-y-10"},[(L(),Ee(Io(t[d.component]||"".concat(d.component,"-display")),{field:d,"heading-element":e.fieldHeadingElement},null,8,["field","heading-element"]))]))),128))]))}},hft={key:0,class:"p-8"},gft={class:"flex items-center p-4"},vft={class:"p-4"},bft={key:1,class:"border-t border-light p-8"},yft={class:"flex items-center justify-between p-4"},_ft={class:"p-4"},Sft={key:2},Cft={class:"flex items-center justify-between border-t border-light pl-12 pt-12"},wft={class:"p-8"},Eft={class:"p-4 pb-8"},kft={class:"border-t border-light p-8"},xft={class:"flex items-center p-4"},Tft={class:"p-4"},Ift={__name:"AcceptInvitationReview",props:{form:{type:Object,required:!0}},setup(e){const t=e,n=gR(),{t:i}=Jn(),{form:a,connectWithPayload:l}=B1(t.form);l(n.acceptInvitationPayload);const f=Ge(()=>{let d="",h=!1;return n.acceptInvitationPayload.orcid?d=n.acceptInvitationPayload.orcid:n.existingUser.orcid&&(d=n.existingUser.orcid),n.acceptInvitationPayload.orcidIsVerified?h=n.acceptInvitationPayload.orcidIsVerified:n.existingUser.orcidIsVerified&&(h=n.existingUser.orcidIsVerified),{orcid:d,orcidIsVerified:h}});return(d,h)=>(L(),Q("div",null,[se(n).userId===null?(L(),Q("div",hft,[H("div",gft,[H("h3",null,ee(se(i)("acceptInvitation.review.accountDetails")),1)]),h[1]||(h[1]=D()),H("div",vft,[pe(id,{"heading-element":"h4",heading:se(i)("user.username"),value:se(n).acceptInvitationPayload.username},null,8,["heading","value"])])])):we("",!0),h[6]||(h[6]=D()),se(n).userId!=null?(L(),Q("div",bft,[H("div",yft,[H("h3",null,ee(se(i)("acceptInvitation.review.userDetails")),1)]),h[2]||(h[2]=D()),H("div",_ft,[pe(id,{"heading-element":"h4",heading:se(i)("user.orcid"),value:f.value.orcid?f.value.orcid:se(i)("invitation.orcid.acceptInvitation.message")},{valueSuffix:te(()=>[f.value.orcid&&f.value.orcidIsVerified?(L(),Ee(Vs,{key:0,icon:"Orcid",class:"ml-1 h-4 w-4",inline:!0})):we("",!0)]),_:1},8,["heading","value"])])])):(L(),Q("div",Sft,[H("div",Cft,[H("h3",null,ee(se(i)("acceptInvitation.review.userDetails")),1),h[3]||(h[3]=D()),pe(ms,{class:"border-0",onClick:h[0]||(h[0]=b=>se(n).openStep("userDetails"))},{default:te(()=>[D(ee(se(i)("common.edit")),1)]),_:1})]),h[4]||(h[4]=D()),H("div",wft,[H("div",Eft,[se(n).userId===null?(L(),Ee(mft,{key:0,fields:se(a).fields,"supported-form-locales":se(a).supportedFormLocales,"heading-element":"h4"},null,8,["fields","supported-form-locales"])):we("",!0)])])])),h[7]||(h[7]=D()),H("div",kft,[H("div",xft,[H("h3",null,ee(se(i)("manager.roles")),1)]),h[5]||(h[5]=D()),H("div",Tft,[pe(cft,{"user-groups-to-add":se(n).acceptInvitationPayload.userGroupsToAdd},null,8,["user-groups-to-add"])])])]))}},Aft={class:"p-8"},Oft={class:"m-4"},Rft={class:"m-4"},Dft={__name:"AcceptInvitationVerifyOrcid",props:{orcidUrl:{type:String,required:!0},orcidOAuthUrl:{type:String,required:!0}},setup(e){const t=e,n=gR(),{t:i}=Jn();Pr(()=>{pkp.eventBus.$on("addOrcidInvitationData",d=>a(d))});async function a(d){n.setOrcidData(d),await n.nextStep()}function l(){n.openStep(n.steps[1+n.currentStepIndex].id)}function f(){const d=window.open(t.orcidOAuthUrl,"_blank","toolbar=no, scrollbars=yes, width=540, height=700, top=500, left=500");d.opener=self}return(d,h)=>(L(),Q("div",Aft,[H("div",Oft,[pe(ms,{onClick:f},{default:te(()=>[D(ee(se(i)("acceptInvitation.verifyOrcid")),1)]),_:1})]),h[0]||(h[0]=D()),H("div",Rft,[pe(ms,{onClick:l},{default:te(()=>[D(ee(se(i)("acceptInvitation.skipVerifyOrcid")),1)]),_:1})])]))}},Lft={key:0},Pft={class:"border-b border-light"},Mft={class:"flex border-b border-light p-4"},Nft={class:"min-w-px flex-1"},Fft={class:"text-xl-bold text-heading"},$ft={class:"font-bold text-negative"},Bft={class:"mt-1 text-lg-normal"},Vft={class:"flex-1"},Hft={class:"border-x border-b border-light bg-secondary p-8"},f0={name:"Page",components:{PkpAnnouncer:Gct,ModalManager:Clt,ReviewerSubmissionPage:Zut,JobsPage:Yut,FailedJobsPage:edt,FailedJobDetailsPage:sdt,CounterReportsPage:hdt,DashboardPage:CSe,UserInvitationPage:Jdt,AcceptInvitationPage:{__name:"AcceptInvitationPage",props:{steps:{type:Array,required:!0},primaryLocale:{type:String,required:!0},pageTitle:{type:String,required:!0},pageTitleDescription:{type:String,required:!0},invitationId:{type:Number,required:!0},invitationKey:{type:String,required:!0}},setup(e){const t=e,{t:n}=Jn(),i=kt(null),a=gR(t),l={AcceptInvitationUserDetailsForms:nft,AcceptInvitationUserAccountDetails:lft,AcceptInvitationVerifyOrcid:Dft,AcceptInvitationReview:Ift};return(f,d)=>{const h=Xe("notification");return se(a).steps.length?(L(),Q("div",Lft,[pe(EH,{class:"border-x border-t border-light bg-secondary",current:se(a).currentStep.id,"started-steps":se(a).startedSteps,label:se(n)("invitation.wizard.completeSteps"),"progress-label":se(n)("common.showingSteps"),"show-steps-label":se(n)("common.showingSteps"),"scroll-to":i.value,"onStep:open":se(a).openStep},{default:te(()=>[(L(!0),Q(bt,null,Sn(se(a).steps,b=>(L(),Ee(CH,{id:b.id,key:b.id,label:b.name},{default:te(()=>[H("div",Pft,[H("div",Mft,[H("div",Nft,[H("h2",Fft,ee(se(a).stepTitle),1),d[0]||(d[0]=D()),H("p",$ft,ee(se(a).errors.error),1),d[1]||(d[1]=D()),H("p",Bft,ee(b.description),1)])]),d[3]||(d[3]=D()),(L(!0),Q(bt,null,Sn(b.sections,S=>(L(),Q("div",{key:S.id,class:"flex"},[H("div",Vft,[b.type==="review"?(L(),Q(bt,{key:0},[Object.keys(se(a).errors).length>0?(L(),Ee(h,{key:0,type:"warning"},{default:te(()=>[D(ee(se(n)("invitation.wizard.errors")),1)]),_:1})):we("",!0)],64)):we("",!0),d[2]||(d[2]=D()),(L(),Ee(Io(l[S.sectionComponent]),Cn({key:S.sectionComponent,ref_for:!0},S.props),null,16))])]))),128))])]),_:2},1032,["id","label"]))),128))]),_:1},8,["current","started-steps","label","progress-label","show-steps-label","scroll-to","onStep:open"]),d[6]||(d[6]=D()),H("div",Hft,[pe(r0,null,{default:te(()=>[pe(ms,{"is-warnable":!0,onClick:se(a).cancel},{default:te(()=>[D(ee(se(n)("common.cancel")),1)]),_:1},8,["onClick"]),d[4]||(d[4]=D()),se(a).isOnFirstStep?we("",!0):(L(),Ee(ms,{key:0,onClick:se(a).previousStep},{default:te(()=>[D(ee(se(n)("common.back")),1)]),_:1},8,["onClick"])),d[5]||(d[5]=D()),se(a).currentStep.id!=="verifyOrcid"?(L(),Ee(ms,{key:1,"is-primary":!0,onClick:se(a).nextStep},{default:te(()=>[D(ee(se(a).stepButtonTitle),1)]),_:1},8,["onClick"])):we("",!0)]),_:1})])])):we("",!0)}}}},extends:iU,data(){return{breadcrumbs:[],isLoading:!1,menu:[],notifications:[],notificationInterval:null}},computed:{},mounted(){window.location.hash&&this.openUrlHash(),window.onhashchange=this.openUrlHash;let e=0;pkp.eventBus.$on("notify",(t,n)=>{this.notifications.push({key:e,message:t,type:n!=null?n:"notice",expire:Date.now()+5e3}),e++}),this.notificationInterval=setInterval(()=>{this.notifications.length&&(this.$refs.notifications.matches(":hover")||(this.notifications=this.notifications.filter(t=>t.expire>Date.now())))},250),pkp.eventBus.$on("clear-all-notify",()=>this.notifications=[])},unmounted(){pkp.eventBus.$off("notify"),pkp.eventBus.$off("clear-all-notify"),clearInterval(this.notificationInterval)},methods:{dismissNotification(e){this.notifications=this.notifications.filter(t=>t.key!==e)},openUrlHash(){let e=window.location.hash.slice(1).split("/");for(;e.length;)pkp.eventBus.$emit("open-tab",e.shift())}}},Uft=Nf("workflowChangeSubmissionLanguageModal",e=>{const{t,tk:n}=Jn(),i={title:n("submission.list.changeSubmissionLanguage.metadataDescription.title"),abstract:n("submission.list.changeSubmissionLanguage.metadataDescription.abstract")},{apiUrl:{value:a}}=to("submissions/".concat(e.submissionId,"/publications/").concat(e.publicationId)),l=Ge(()=>"submissions/".concat(e.submissionId,"/publications/").concat(e.publicationId,"/_components/changeLanguageMetadata")),{apiUrl:f}=to(l),{data:d,fetch:h}=fr(f);io(f,(ne,ue)=>{ne!==ue&&h()},{immediate:!0});const{form:b,getValue:S,set:k,setValue:T}=B1(d);b.action=a+"/changeLocale";const O=kt(""),P={};z();const B=JS("closeModal");function W(){B()}return{closeSideModal:W,setCustom:(ne,ue)=>{k(ne,ue);const J=b.value.primaryLocale,ce=S("locale");ce!==J&&(b.value.primaryLocale=ce,b.value.fields.forEach(ge=>{var de;P[ge.name]&&(T(ge.name,(de=P[ge.name][ce])!=null?de:P[ge.name]),ge.description=t(i[ge.name],{language:q(ce)}))}))},success:()=>{window.location.reload()},form:b,publicationTitle:O};async function z(){var J;const{data:ne,fetch:ue}=fr(a,{method:"GET"});await ue(),Object.assign(P,(J=ne.value)!=null?J:{}),delete P.locale,O.value=ne.value.fullTitle[ne.value.locale]}function q(ne){return b.value.fields.find(({name:ue})=>ue==="locale").options.find(({value:ue})=>ue===ne).label}}),zft={class:"p-4"},Wft={class:"bg-secondary p-4"},jft={id:"changeSubmissionLanguage"},Zft={__name:"WorkflowChangeSubmissionLanguageModal",props:{publicationId:{type:Number,required:!0},submissionId:{type:Number,required:!0}},setup(e){const t=e,n=Uft({form:t.form,publicationId:t.publicationId,submissionId:t.submissionId});return(i,a)=>(L(),Ee(il,null,{"pre-title":te(()=>[D(ee(t.submissionId),1)]),title:te(()=>[D(ee(i.t("submission.list.changeSubmissionLanguage.title")),1)]),description:te(()=>[D(ee(se(n).publicationTitle),1)]),default:te(()=>[a[0]||(a[0]=D()),a[1]||(a[1]=D()),a[2]||(a[2]=D()),H("div",zft,[H("div",Wft,[H("div",jft,[se(n).form?(L(),Ee(oa,Cn({key:0},se(n).form,{onSet:se(n).setCustom,onSuccess:se(n).success,onCancel:se(n).closeSideModal}),null,16,["onSet","onSuccess","onCancel"])):we("",!0)])])])]),_:1}))}},$m={WORKFLOW_VIEW_PUBLISHED_SUBMISSION:"workflowViewPublishedSubmission",WORKFLOW_ASSIGN_TO_ISSUE:"workflowAssignToIssue",WORKFLOW_VIEW_ACTIVITY_LOG:"workflowViewActivityLog",WORKFLOW_VIEW_LIBRARY:"workflowViewLibrary",WORKFLOW_ASSIGN_TO_ISSUE_AND_SCHEDULE_FOR_PUBLICATION:"workflowAssignToIssueAndScheduleForPublication",WORKFLOW_SCHEDULE_FOR_PUBLICATION:"workflowScheduleForPublication",WORKFLOW_PREVIEW_PUBLICATION:"workflowPreviewPublication",WORKFLOW_UNSCHEDULE_PUBLICATION:"workflowUnschedulePublication",WORKFLOW_UNPUBLISH_PUBLICATION:"workflowUnpublishPublication",WORKFLOW_CREATE_NEW_VERSION:"workflowCreateNewVersion",WORKFLOW_CHANGE_SUBMISSION_LANGUAGE:"workflowChangeSubmissionLanguage",WORKFLOW_DELETE_SUBMISSION:"workflowDeleteSubmission",WORKFLOW_CHANGE_WORKTYPE:"workflowChangeWorktype"};function qft(){const{t:e}=Jn();function t({submission:P},B){const{redirectToPage:W}=to(P.urlPublished);W()}function n({submission:P,selectedPublication:B},W){const{openLegacyModal:Z}=Ar({component:"modals.publish.AssignToIssueHandler",op:"assign",params:{submissionId:P.id,publicationId:B.id}});Z({title:e("publication.selectIssue"),closeOnFormSuccessId:pkp.const.FORM_ASSIGN_TO_ISSUE},W)}function i({submission:P},B){const{openLegacyModal:W}=Ar({component:"informationCenter.SubmissionInformationCenterHandler",op:"viewInformationCenter",params:{submissionId:P.id}});W({title:e("submission.list.infoCenter")},B)}function a({submission:P},B){const{openLegacyModal:W}=Ar({component:"modals.documentLibrary.documentLibraryHandler",op:"documentLibrary",params:{submissionId:P.id}});W({title:e("grid.libraryFiles.submission.title")},B)}function l({selectedPublication:P,submission:B},W){if(P.issueId===null){const{url:Z}=Ar({component:"modals.publish.AssignToIssueHandler",op:"assign",params:{submissionId:B.id,publicationId:P.id}}),{openSideModal:Y}=Ms();Y("LegacyAjax",{legacyOptions:{title:e("publication.selectIssue"),url:Z,closeOnFormSuccessId:pkp.const.FORM_ASSIGN_TO_ISSUE}},{onClose:async({formId:z,data:q})=>{q!=null&&q.issueId?f({submission:B,selectedPublication:P},W):W()}})}else f({submission:B,selectedPublication:P},W)}function f({submission:P,selectedPublication:B},W){const{openLegacyModal:Z}=Ar({component:"modals.publish.PublishHandler",op:"publish",params:{submissionId:P.id,publicationId:B.id}});Z({title:e("editor.submission.schedulePublication"),closeOnFormSuccessId:pkp.const.FORM_PUBLISH},W)}function d({submission:P,selectedPublication:B},W){const{openDialog:Z}=Ms();Z({title:e("publication.unschedule"),message:e("publication.unschedule.confirm"),actions:[{label:e("publication.unschedule"),isWarnable:!0,callback:async Y=>{const{apiUrl:z}=to("submissions/".concat(P.id,"/publications/").concat(B.id,"/unpublish")),{fetch:q}=fr(z,{method:"PUT"});await q(),Y(),W()}},{label:e("common.cancel"),callback:Y=>Y()}],modalStyle:"negative"})}function h({submission:P,selectedPublication:B},W){const{openDialog:Z}=Ms();Z({title:e("publication.unpublish"),message:e("publication.unpublish.confirm"),actions:[{label:e("publication.unpublish"),isWarnable:!0,callback:async Y=>{const{apiUrl:z}=to("submissions/".concat(P.id,"/publications/").concat(B.id,"/unpublish")),{fetch:q}=fr(z,{method:"PUT"});await q(),Y(),W()}},{label:e("common.cancel"),callback:Y=>Y()}],modalStyle:"negative"})}function b({submission:P,store:B},W){const{openDialog:Z}=Ms(),{getLatestPublication:Y}=Va();Z({title:e("publication.createVersion"),message:e("publication.version.confirm"),actions:[{label:e("common.yes"),isPrimary:!0,callback:async z=>{const q=Y(P),{apiUrl:ne}=to("submissions/".concat(P.id,"/publications/").concat(q.id,"/version")),{fetch:ue,data:J}=fr(ne,{method:"POST"});await ue(),B.selectPublicationId(J.value.id),z(),W()}},{label:e("common.no"),callback:z=>z()}],modalStyle:"primary"})}function S({selectedPublication:P}){const{redirectToPage:B}=to(P.urlPublished);B()}function k({submission:P}){const{openSideModal:B}=Ms();B(Zft,{publicationId:P.currentPublicationId,submissionId:P.id})}function T({submission:P,store:B}){const{apiUrl:W}=to("_submissions/".concat(P.id)),{fetch:Z}=fr(W,{method:"DELETE"}),{openDialog:Y}=Ms();Y({title:e("common.delete"),message:e("editor.submissionArchive.confirmDelete"),actions:[{label:e("common.confirm"),isPrimary:!0,callback:async z=>{await Z(),z(),B.closeWorkflowModal()}},{label:e("common.cancel"),isWarnable:!0,callback:z=>z()}],modalStyle:"negative"})}async function O({submission:P,workType:B},W){const{apiUrl:Z}=to("submissions/".concat(P.id)),{fetch:Y}=fr(Z,{method:"PUT",body:{workType:B}});await Y(),W()}return{workflowViewPublishedSubmission:t,workflowAssignToIssue:n,workflowViewActivityLog:i,workflowViewLibrary:a,workflowAssignToIssueAndScheduleForPublication:l,workflowScheduleForPublication:f,workflowUnschedulePublication:d,workflowUnpublishPublication:h,workflowCreateNewVersion:b,workflowPreviewPublication:S,workflowChangeSubmissionLanguage:k,workflowDeleteSubmission:T,workflowChangeWorktype:O}}const Gft={class:"p-4"},Kft={class:"bg-secondary p-4"},RSe={__name:"WorkflowSelectRevisionFormModal",props:{formProps:{type:Object,required:!0}},emits:["set","success"],setup(e,{emit:t}){const n=t,{t:i}=Jn(),a=Mr("closeModal");return(l,f)=>(L(),Ee(il,null,{title:te(()=>[D(ee(se(i)("editor.submission.decision.requestRevisions")),1)]),default:te(()=>[f[2]||(f[2]=D()),H("div",Gft,[H("div",Kft,[pe(oa,Cn(e.formProps,{onSet:f[0]||(f[0]=(...d)=>n("set",...d)),onSuccess:f[1]||(f[1]=(...d)=>{se(a)(),n("success",...d)})}),null,16)])])]),_:1}))}},pu={DECISION_ACCEPT:"decisionAccept",DECISION_CANCEL_REVIEW_ROUND:"decisionCancelReviewRound",DECISION_DECLINE:"decisionDecline",DECISION_EXTERNAL_REVIEW:"decisionExternalReview",DECISION_SKIP_EXTERNAL_REVIEW:"decisionSkipExternalReview",DECISION_INITIAL_DECLINE:"decisionInitialDecline",DECISION_REVERT_DECLINE:"decisionRevertDecline",DECISION_REVERT_INITIAL_DECLINE:"decisionRevertInitialDecline",DECISION_SEND_TO_PRODUCTION:"decisionSendToProduction",DECISION_BACK_FROM_COPYEDITING:"decisionBackFromCopyediting",DECISION_NEW_EXTERNAL_ROUND:"decisionNewExternalRound",DECISION_BACK_FROM_PRODUCTION:"decisionBackFromProduction",DECISION_RECOMMEND_ACCEPT:"decisionRecommendAccept",DECISION_RECOMMEND_DECLINE:"decisionRecommendDecline",DECISION_INTERNAL_REVIEW:"decisionInternalReview",DECISION_RECOMMEND_EXTERNAL_REVIEW:"decisionRecommendExternalReview",DECISION_SKIP_INTERNAL_REVIEW:"decisionSkipInternalReview",DECISION_ACCEPT_INTERNAL:"decisionAcceptInternal",DECISION_PENDING_REVISIONS_INTERNAL:"decisionPendingRevisionsInternal",DECISION_RESUBMIT_INTERNAL:"decisionResubmitInternal",DECISION_DECLINE_INTERNAL:"decisionDeclineInternal",DECISION_RECOMMEND_ACCEPT_INTERNAL:"decisionRecommendAcceptInternal",DECISION_RECOMMEND_PENDING_REVISIONS_INTERNAL:"decisionRecommendPendingRevisionsInternal",DECISION_RECOMMEND_RESUBMIT_INTERNAL:"decisionRecommendResubmitInternal",DECISION_RECOMMEND_DECLINE_INTERNAL:"decisionRecommendDeclineInternal",DECISION_REVERT_INTERNAL_DECLINE:"decisionRevertInternalDecline",DECISION_NEW_INTERNAL_ROUND:"decisionNewInternalRound",DECISION_CANCEL_INTERNAL_REVIEW_ROUND:"decisionCancelInternalReviewRound",DECISION_REQUEST_REVISION:"decisionRequestRevision",DECISION_RECOMMEND_REVISION:"decisionRecommendRevision"};function va(e,t,n={}){const i=Cbe(),a=new URLSearchParams({...i,workflowSubmissionId:e.id});a.delete("workflowMenuKey");const l="dashboard/editorial?".concat(a.toString()),f={decision:t,ret:l};n!=null&&n.reviewRoundId&&(f.reviewRoundId=n==null?void 0:n.reviewRoundId),n!=null&&n.stageId&&(f.stageId=n==null?void 0:n.stageId);const{redirectToPage:d}=to("decision/record/".concat(encodeURIComponent(e.id)),f);d()}function b9({submission:e,reviewRoundId:t,stageId:n,contextMinReviewsPerSubmission:i},a){const{checkMinimumConsideredReviews:l}=Va(),{shouldMinimumReviewsBeConsidered:f,hasMinimumReviewsCount:d}=l(e,n,t,i);if(f&&!d){const{openDialog:h}=Ms(),{t:b}=Jn();h({title:b("dashboard.proceedWithoutMinimumReviews"),message:b("dashboard.minimumConfirmedReviewsNotMet"),actions:[{label:b("common.yesContinue"),callback:S=>{S(),a()},isWarnable:!0},{label:b("common.cancel"),callback:S=>S()}],modalStyle:"negative"})}else a()}function Yft({selectRevisionDecisionForm:e,selectRevisionRecommendationForm:t}){function n({submission:V,reviewRoundId:Ye,contextMinReviewsPerSubmission:Fe}){b9({submission:V,reviewRoundId:Ye,contextMinReviewsPerSubmission:Fe,stageId:pkp.const.WORKFLOW_STAGE_ID_EXTERNAL_REVIEW},()=>{va(V,pkp.const.DECISION_ACCEPT,{reviewRoundId:Ye})})}function i({submission:V,reviewRoundId:Ye}){va(V,pkp.const.DECISION_CANCEL_REVIEW_ROUND,{reviewRoundId:Ye})}function a({submission:V,reviewRoundId:Ye}){va(V,pkp.const.DECISION_DECLINE,{reviewRoundId:Ye})}function l({submission:V,reviewRoundId:Ye}){va(V,pkp.const.DECISION_REVERT_DECLINE,{reviewRoundId:Ye})}function f({submission:V,reviewRoundId:Ye}){va(V,pkp.const.DECISION_EXTERNAL_REVIEW,{reviewRoundId:Ye})}function d({submission:V}){va(V,pkp.const.DECISION_SKIP_EXTERNAL_REVIEW)}function h({submission:V}){va(V,pkp.const.DECISION_INITIAL_DECLINE)}function b({submission:V}){va(V,pkp.const.DECISION_REVERT_INITIAL_DECLINE)}function S({submission:V}){va(V,pkp.const.DECISION_SEND_TO_PRODUCTION)}function k({submission:V}){va(V,pkp.const.DECISION_BACK_FROM_COPYEDITING)}function T({submission:V,reviewRoundId:Ye,contextMinReviewsPerSubmission:Fe}){b9({submission:V,reviewRoundId:Ye,contextMinReviewsPerSubmission:Fe,stageId:pkp.const.WORKFLOW_STAGE_ID_EXTERNAL_REVIEW},()=>{va(V,pkp.const.DECISION_NEW_EXTERNAL_ROUND,{reviewRoundId:Ye})})}function O({submission:V}){va(V,pkp.const.DECISION_BACK_FROM_PRODUCTION)}function P({submission:V,reviewRoundId:Ye}){va(V,pkp.const.DECISION_RECOMMEND_ACCEPT,{reviewRoundId:Ye})}function B({submission:V,reviewRoundId:Ye}){va(V,pkp.const.DECISION_RECOMMEND_DECLINE,{reviewRoundId:Ye})}function W({submission:V}){va(V,pkp.const.DECISION_INTERNAL_REVIEW)}function Z({submission:V,reviewRoundId:Ye}){va(V,pkp.const.DECISION_RECOMMEND_EXTERNAL_REVIEW,{reviewRoundId:Ye})}function Y({submission:V}){va(V,pkp.const.DECISION_SKIP_INTERNAL_REVIEW)}function z({submission:V,reviewRoundId:Ye,contextMinReviewsPerSubmission:Fe}){b9({submission:V,reviewRoundId:Ye,contextMinReviewsPerSubmission:Fe,stageId:pkp.const.WORKFLOW_STAGE_ID_INTERNAL_REVIEW},()=>{va(V,pkp.const.DECISION_ACCEPT_INTERNAL,{reviewRoundId:Ye})})}function q({submission:V,reviewRoundId:Ye,contextMinReviewsPerSubmission:Fe}){b9({submission:V,reviewRoundId:Ye,contextMinReviewsPerSubmission:Fe,stageId:pkp.const.WORKFLOW_STAGE_ID_INTERNAL_REVIEW},()=>{va(V,pkp.const.DECISION_PENDING_REVISIONS_INTERNAL,{reviewRoundId:Ye})})}function ne({submission:V,reviewRoundId:Ye}){va(V,pkp.const.DECISION_RESUBMIT_INTERNAL,{reviewRoundId:Ye})}function ue({submission:V,reviewRoundId:Ye}){va(V,pkp.const.DECISION_DECLINE_INTERNAL,{reviewRoundId:Ye})}function J({submission:V,reviewRoundId:Ye}){va(V,pkp.const.DECISION_RECOMMEND_ACCEPT_INTERNAL,{reviewRoundId:Ye})}function ce({submission:V,reviewRoundId:Ye}){va(V,pkp.const.DECISION_RECOMMEND_PENDING_REVISIONS_INTERNAL,{reviewRoundId:Ye})}function ge({submission:V,reviewRoundId:Ye}){va(V,pkp.const.DECISION_RECOMMEND_RESUBMIT_INTERNAL,{reviewRoundId:Ye})}function de({submission:V,reviewRoundId:Ye}){va(V,pkp.const.DECISION_RECOMMEND_DECLINE_INTERNAL,{reviewRoundId:Ye})}function he({submission:V,reviewRoundId:Ye}){va(V,pkp.const.DECISION_REVERT_INTERNAL_DECLINE,{reviewRoundId:Ye})}function ie({submission:V,reviewRoundId:Ye,contextMinReviewsPerSubmission:Fe}){b9({submission:V,reviewRoundId:Ye,contextMinReviewsPerSubmission:Fe,stageId:pkp.const.WORKFLOW_STAGE_ID_INTERNAL_REVIEW},()=>{va(V,pkp.const.DECISION_NEW_INTERNAL_ROUND,{reviewRoundId:Ye})})}function Be({submission:V,reviewRoundId:Ye}){va(V,pkp.const.DECISION_CANCEL_INTERNAL_REVIEW_ROUND,{reviewRoundId:Ye})}function $e({submission:V,reviewRoundId:Ye,contextMinReviewsPerSubmission:Fe},St){b9({submission:V,reviewRoundId:Ye,contextMinReviewsPerSubmission:Fe,stageId:pkp.const.WORKFLOW_STAGE_ID_EXTERNAL_REVIEW},()=>{const{openSideModal:Dt}=Ms(),{set:He,form:ft,getValue:ht}=B1(e);Dt(RSe,{formProps:ft,onSet:He,onSuccess:()=>{const At=ht("decision");va(V,At,{reviewRoundId:Ye})}})})}function Ue({submission:V,reviewRoundId:Ye},Fe){const{openSideModal:St}=Ms(),{set:Dt,form:He,getValue:ft}=B1(t);St(RSe,{formProps:He,onSet:Dt,onSuccess:()=>{const ht=ft("decision");va(V,ht,{reviewRoundId:Ye})}})}return{openDecisionPage:va,decisionAccept:n,decisionCancelReviewRound:i,decisionDecline:a,decisionRevertDecline:l,decisionExternalReview:f,decisionSkipExternalReview:d,decisionInitialDecline:h,decisionRevertInitialDecline:b,decisionSendToProduction:S,decisionBackFromCopyediting:k,decisionNewExternalRound:T,decisionBackFromProduction:O,decisionRecommendAccept:P,decisionRecommendDecline:B,decisionInternalReview:W,decisionRecommendExternalReview:Z,decisionSkipInternalReview:Y,decisionAcceptInternal:z,decisionPendingRevisionsInternal:q,decisionResubmitInternal:ne,decisionDeclineInternal:ue,decisionRecommendAcceptInternal:J,decisionRecommendPendingRevisionsInternal:ce,decisionRecommendResubmitInternal:ge,decisionRecommendDeclineInternal:de,decisionRevertInternalDecline:he,decisionNewInternalRound:ie,decisionCancelInternalReviewRound:Be,decisionRequestRevision:$e,decisionRecommendRevision:Ue}}function DSe(e,t,n){return Object.values(e).reduce((i,a)=>(i[a]=(l,f)=>n(t[a],l,f),i),{})}function Xft({submissionId:e}){const{apiUrl:t}=to("submissions/".concat(encodeURIComponent(e))),{data:n,fetch:i}=fr(t);i();const a=kt(null);function l(k){var T,O;a.value!==k&&(a.value=k,h.value=null,(O=(T=n.value)==null?void 0:T.publications)!=null&&O.find(B=>B.id===k)||(n.value=null,i()),b())}const f=Ge(()=>"submissions/".concat(encodeURIComponent(e),"/publications/").concat(a.value)),{apiUrl:d}=to(f),{data:h,fetch:b}=fr(d);io(n,(k,T)=>{!T&&k&&(a.value=k.publications[k.publications.length-1].id,b())});async function S(){return Promise.all([i(),b()])}return{submission:n,submissionId:e,selectedPublication:h,selectedPublicationId:a,selectPublicationId:l,refetchSubmissionPublication:S}}function vR(e,t){const n=new Set(e);return t.some(i=>n.has(i))}function Jft({submission:e,selectedPublication:t}){const{getActiveStage:n,getStageById:i}=Va();return{permissions:Ge(()=>{let l=!1,f=!1,d=!1,h=!1,b=!1,S=!1,k=[];if(!e.value)return{canAccessPublication:l,canAccessProduction:d,canEditPublication:f,canPublish:h,canAccessEditorialHistory:b,accessibleStages:k};const T=n(e.value),O=i(e.value,pkp.const.WORKFLOW_STAGE_ID_PRODUCTION);e.value.stages.forEach(W=>{W.currentUserAssignedRoles.length&&k.push(W.id)}),f=e.value.canCurrentUserChangeMetadata;const P=vR(T.currentUserAssignedRoles,[pkp.const.ROLE_ID_AUTHOR]),B=e.value.publications.some(W=>[pkp.const.STATUS_PUBLISHED,pkp.const.STATUS_SCHEDULED].includes(W.status));return P&&B&&(f=!1),vR(T.currentUserAssignedRoles,[...bee])&&(l=!0,vR(O.currentUserAssignedRoles,[...bee])&&(d=!0),!O.currentUserCanRecommendOnly&&vR(O.currentUserAssignedRoles,[pkp.const.ROLE_ID_SITE_ADMIN,pkp.const.ROLE_ID_MANAGER])&&(h=!0)),vR(T.currentUserAssignedRoles,[pkp.const.ROLE_ID_MANAGER,pkp.const.ROLE_ID_SITE_ADMIN,pkp.const.ROLE_ID_SUB_EDITOR])&&(b=!0),(h||f)&&(S=!0),{canAccessPublication:l,canAccessProduction:d,canEditPublication:f,canPublish:h,canAccessEditorialHistory:b,canChangeSubmissionLanguage:S,accessibleStages:k}})}}function Qft({menuItems:e,submission:t,workflowNavigationConfig:n,dashboardPage:i}){const{sideMenuProps:a,setExpandedKeys:l,setActiveItemKey:f,selectedItem:d}=Aee(e),h=HV(),b=Ge(()=>{var P;return{...((P=d.value)==null?void 0:P.state)||{}}}),S=Ge(()=>{var O;return((O=d.value)==null?void 0:O.key)||null}),k=Ge(()=>{var O;return((O=b.value)==null?void 0:O.title)||""});function T(O){return f(O)}return io(t,(O,P)=>{var B;if(!P&&O){if((B=h==null?void 0:h.workflowMenuKey)!=null&&B.length&&T(h==null?void 0:h.workflowMenuKey))return;T(n.getInitialSelectionItemKey({submission:O,dashboardPage:i}))}}),io(S,O=>{h.workflowMenuKey=O}),{menuTitle:k,navigateToMenu:T,selectedMenuKey:S,selectedMenuState:b,setExpandedKeys:l,sideMenuProps:a}}function ept(e,t){const n=Ge(()=>e.getHeaderItems(t())),i=Ge(()=>e.getPrimaryItems(t())),a=Ge(()=>e.getSecondaryItems(t())),l=Ge(()=>e.getActionItems(t())),f=Ge(()=>e.getPrimaryControlsLeft(t())),d=Ge(()=>e.getPrimaryControlsRight(t()));return{headerItems:n,primaryItems:i,secondaryItems:a,actionItems:l,primaryControlsLeft:f,primaryControlsRight:d}}const CC=Nf("workflow",({props:e,Components:t,useWorkflowConfig:n,useWorkflowNavigationConfig:i})=>{const a=e.pageInitConfig.dashboardPage,l=e.pageInitConfig.contextMinReviewsPerSubmission,f=C5(),d=JS("closeModal"),{submission:h,submissionId:b,selectPublicationId:S,selectedPublication:k,selectedPublicationId:T,refetchSubmissionPublication:O}=Xft({submissionId:e.submissionId}),P=Ge(()=>de.value.reviewRoundId?Z(h.value,de.value.reviewRoundId):null),{getExtendedStage:B,getExtendedStageLabel:W,getReviewRound:Z}=Va(),Y=Ge(()=>h.value&&B(h.value)),z=Ge(()=>h.value&&W(h.value)),{triggerDataChange:q}=fbe(()=>O()),{permissions:ne}=Jft({submission:h,selectedPublication:k}),ue=f.addFns(i(e.pageInitConfig)),J=Ge(()=>ue.getMenuItems({submission:h.value,permissions:ne.value,dashboardPage:a})),{menuTitle:ce,navigateToMenu:ge,selectedMenuState:de,setExpandedKeys:he,sideMenuProps:ie}=Qft({menuItems:J,submission:h,workflowNavigationConfig:ue,dashboardPage:a}),Be=qft(e.pageInitConfig),$e=DSe($m,Be,(Ht,ye,lo=null)=>{var jn;return Ht({...ye,submission:h.value,selectedPublication:k.value,reviewRoundId:(jn=P.value)==null?void 0:jn.id,store:ct},so=>{q(),lo&&lo(so)})}),Ue=Yft(e.pageInitConfig),V=DSe(pu,Ue,(Ht,ye)=>{var lo;return Ht({...ye,submission:h.value,selectedPublication:k.value,reviewRoundId:(lo=P.value)==null?void 0:lo.id,contextMinReviewsPerSubmission:l})}),Ye=$te();function Fe(Ht){var ye;Ye.fileUpload({submission:h.value,selectedPublication:k.value,reviewRoundId:(ye=P.value)==null?void 0:ye.id,...Ht},()=>q())}const St=f.addFns(n({dashboardPage:a})),{headerItems:Dt,primaryItems:He,secondaryItems:ft,actionItems:ht,primaryControlsLeft:At,primaryControlsRight:hn}=ept(St,()=>({selectedMenuState:de.value,submission:h.value,pageInitConfig:e.pageInitConfig,selectedPublication:k.value,selectedPublicationId:T.value,selectedReviewRound:P.value,permissions:ne.value,publicationSettings:e.pageInitConfig.publicationSettings,contextMinReviewsPerSubmission:l})),ct={dashboardPage:a,closeWorkflowModal:d,submission:h,submissionId:b,selectedPublication:k,selectPublicationId:S,extendedStage:Y,stageLabel:z,menuTitle:ce,headerItems:Dt,primaryItems:He,secondaryItems:ft,actionItems:ht,primaryControlsLeft:At,primaryControlsRight:hn,sideMenuProps:ie,selectedMenuState:de,navigateToMenu:ge,setExpandedKeys:he,...$e,...V,fileUpload:Fe,Components:t,extender:f,props:e};return ct}),tpt=Object.freeze(Object.defineProperty({__proto__:null,useWorkflowStore:CC},Symbol.toStringTag,{value:"Module"})),npt={},spt={class:"min-w-fit p-4"},opt={class:"flex w-full bg-secondary"},rpt={class:"flex flex-col border-t border-light"},ipt={class:"flex w-full flex-col border-y border-e border-s border-light"},apt={class:"border-b border-light p-5 text-3xl-bold uppercase text-heading"},lpt={class:"flex-grow"},cpt={class:"flex h-full"},upt={class:"flex-grow border-e border-light"},dpt={key:0,class:"flex justify-between border-b border-light p-4"},fpt={class:""},ppt={key:0,class:"w-96 border-s border-light"},mpt={class:"border-b border-light"};function hpt(e,t){return L(),Q("div",spt,[H("div",opt,[H("div",rpt,[is(e.$slots,"menu"),t[0]||(t[0]=D()),t[1]||(t[1]=H("div",{class:"flex-grow border-x border-b border-light bg-tertiary"},null,-1))]),t[7]||(t[7]=D()),H("div",ipt,[H("div",apt,[is(e.$slots,"heading")]),t[6]||(t[6]=D()),H("div",lpt,[H("div",cpt,[H("div",upt,[e.$slots["publication-controls-left"]||e.$slots["publication-controls-right"]?(L(),Q("div",dpt,[H("div",fpt,[is(e.$slots,"publication-controls-left")]),t[2]||(t[2]=D()),H("div",null,[is(e.$slots,"publication-controls-right")])])):we("",!0),t[3]||(t[3]=D()),is(e.$slots,"primary")]),t[5]||(t[5]=D()),e.$slots.secondary||e.$slots.actions?(L(),Q("div",ppt,[H("div",mpt,[is(e.$slots,"actions")]),t[4]||(t[4]=D()),H("div",null,[is(e.$slots,"secondary")])])):we("",!0)])])])])])}const gpt=wt(npt,[["render",hpt]]),vpt={class:"ms-3"},bpt={key:0,class:"underline"},ypt={class:"text-lg-normal"},_pt={class:"flex gap-x-4"},Spt={class:"flex flex-col gap-y-2","data-cy":"workflow-controls-left"},Cpt={class:"flex gap-x-2"},wpt={class:"flex gap-x-3","data-cy":"workflow-controls-right"},Ept={class:"flex flex-col gap-y-5 bg-secondary p-5","data-cy":"workflow-primary-items"},kpt={class:"flex flex-col items-start space-y-3 p-4","data-cy":"workflow-action-items"},xpt={class:"flex flex-col space-y-4 p-4","data-cy":"workflow-secondary-items"},Tpt={__name:"WorkflowPage",setup(e){const{localizeSubmission:t}=Jn(),n=CC(),i=lO(),{submission:a,selectedPublication:l}=c0e(n);return(f,d)=>{const h=Hr("strip-unsafe-html");return L(),Ee(il,null,If({"pre-title":te(()=>[D(ee(se(n).submissionId)+" ",1),H("span",vpt,[pe(zl,{"size-variant":"big",message:f.t("common.refreshingData"),class:Rn(se(i).screensInProgress.includes("modal_1")?"":"invisible")},null,8,["message","class"])])]),title:te(()=>[se(l)?(L(),Q("span",bpt,ee(se(l).authorsStringShort),1)):we("",!0)]),default:te(()=>{var b,S,k,T;return[d[6]||(d[6]=D()),d[7]||(d[7]=D()),d[8]||(d[8]=D()),d[9]||(d[9]=D()),d[10]||(d[10]=D()),pe(gpt,null,If({menu:te(()=>[H("nav",null,[pe(i4e,Cn(se(n).sideMenuProps,{"width-variant":"compact"}),null,16)])]),heading:te(()=>[H("h2",null,ee(se(n).menuTitle),1)]),primary:te(()=>[H("div",Ept,[(L(!0),Q(bt,null,Sn(se(n).primaryItems,(O,P)=>{var B;return L(),Ee(Io(se(n).Components[O.component]||O.component),Cn({ref_for:!0},O.props,{key:"".concat(P," - ").concat(O.component," - ").concat((B=O==null?void 0:O.props)==null?void 0:B.namespace)}),null,16)}),128))])]),_:2},[(b=se(n).primaryControlsLeft)!=null&&b.length?{name:"publication-controls-left",fn:te(()=>[H("div",Spt,[(L(!0),Q(bt,null,Sn(se(n).primaryControlsLeft,(O,P)=>{var B;return L(),Q(bt,null,[Array.isArray(O)?(L(),Q("div",{key:"".concat(P)},[H("div",Cpt,[(L(!0),Q(bt,null,Sn(O,(W,Z)=>{var Y;return L(),Ee(Io(se(n).Components[W.component]||W.component),Cn({ref_for:!0},W.props,{key:"".concat(Z," - ").concat(W.component," - ").concat((Y=W==null?void 0:W.props)==null?void 0:Y.namespace)}),null,16)}),128))])])):(L(),Ee(Io(se(n).Components[O.component]||O.component),Cn({key:1,ref_for:!0},O.props,{key:"else ".concat(P," - ").concat(O.component," - ").concat((B=O==null?void 0:O.props)==null?void 0:B.namespace)}),null,16))],64)}),256))])]),key:"0"}:void 0,(S=se(n).primaryControlsRight)!=null&&S.length?{name:"publication-controls-right",fn:te(()=>[H("div",wpt,[(L(!0),Q(bt,null,Sn(se(n).primaryControlsRight,(O,P)=>{var B;return L(),Ee(Io(se(n).Components[O.component]||O.component),Cn({ref_for:!0},O.props,{key:"".concat(P," - ").concat(O.component," - ").concat((B=O==null?void 0:O.props)==null?void 0:B.namespace)}),null,16)}),128))])]),key:"1"}:void 0,(k=se(n).actionItems)!=null&&k.length?{name:"actions",fn:te(()=>[H("div",kpt,[(L(!0),Q(bt,null,Sn(se(n).actionItems,(O,P)=>{var B;return L(),Ee(Io(se(n).Components[O.component]||O.component),Cn({ref_for:!0},O.props,{key:"".concat(P," - ").concat(O.component," - ").concat((B=O==null?void 0:O.props)==null?void 0:B.namespace)}),null,16)}),128))])]),key:"2"}:void 0,(T=se(n).secondaryItems)!=null&&T.length?{name:"secondary",fn:te(()=>[H("div",xpt,[(L(!0),Q(bt,null,Sn(se(n).secondaryItems,(O,P)=>{var B;return L(),Ee(Io(se(n).Components[O.component]||O.component),Cn({ref_for:!0},O.props,{key:"".concat(P," - ").concat(O.component," - ").concat((B=O==null?void 0:O.props)==null?void 0:B.namespace)}),null,16)}),128))])]),key:"3"}:void 0]),1024)]}),_:2},[se(l)?{name:"description",fn:te(()=>[Gn(H("span",null,null,512),[[h,se(t)(se(l).fullTitle,se(l).locale)]])]),key:"0"}:void 0,se(a)?{name:"post-description",fn:te(()=>[pe(SSe,{"extended-stage":se(n).extendedStage},{default:te(()=>[H("span",ypt,ee(se(n).stageLabel),1)]),_:1},8,["extended-stage"])]),key:"1"}:void 0,se(a)?{name:"actions",fn:te(()=>[H("div",_pt,[(L(!0),Q(bt,null,Sn(se(n).headerItems,(b,S)=>{var k;return L(),Ee(Io(se(n).Components[b.component]||b.component),Cn({ref_for:!0},b.props,{key:"".concat(S," - ").concat(b.component," - ").concat((k=b==null?void 0:b.props)==null?void 0:k.namespace)}),null,16)}),128))])]),key:"2"}:void 0]),1024)}}},{tk:Rd}=Jn(),LSe={SUBMISSION_FILES:({stageId:e})=>({permissions:[{roles:[pkp.const.ROLE_ID_AUTHOR],actions:[xs.FILE_LIST,xs.FILE_EDIT,xs.FILE_DOWNLOAD_ALL]},{roles:[pkp.const.ROLE_ID_SUB_EDITOR,pkp.const.ROLE_ID_MANAGER,pkp.const.ROLE_ID_SITE_ADMIN,pkp.const.ROLE_ID_ASSISTANT],actions:[xs.FILE_LIST,xs.FILE_UPLOAD,xs.FILE_DOWNLOAD_ALL,xs.FILE_EDIT,xs.FILE_DELETE,xs.FILE_SEE_NOTES]}],actions:[xs.FILE_UPLOAD,xs.FILE_DOWNLOAD_ALL,xs.FILE_EDIT,xs.FILE_DELETE,xs.FILE_SEE_NOTES],fileStage:pkp.const.SUBMISSION_FILE_SUBMISSION,titleKey:Rd("submission.submit.submissionFiles"),descriptionKey:Rd("fileManager.submissionFilesDescription"),wizardTitleKey:Rd("submission.submit.uploadSubmissionFile")}),EDITOR_REVIEW_FILES:({stageId:e})=>({permissions:[{roles:[pkp.const.ROLE_ID_SUB_EDITOR,pkp.const.ROLE_ID_MANAGER,pkp.const.ROLE_ID_SITE_ADMIN,pkp.const.ROLE_ID_ASSISTANT],actions:[xs.FILE_LIST,xs.FILE_SELECT_UPLOAD,xs.FILE_EDIT,xs.FILE_DELETE,xs.FILE_SEE_NOTES]}],actions:[xs.FILE_SELECT_UPLOAD,xs.FILE_EDIT,xs.FILE_DELETE,xs.FILE_SEE_NOTES],fileStage:e===pkp.const.WORKFLOW_STAGE_ID_INTERNAL_REVIEW?pkp.const.SUBMISSION_FILE_INTERNAL_REVIEW_FILE:pkp.const.SUBMISSION_FILE_REVIEW_FILE,gridComponent:"grid.files.review.EditorReviewFilesGridHandler",titleKey:Rd("fileManager.filesForReview"),descriptionKey:Rd("fileManager.filesForReviewDescription"),uploadSelectTitleKey:Rd("editor.submission.review.currentFiles")}),WORKFLOW_REVIEW_REVISIONS:({stageId:e})=>({permissions:[{roles:[pkp.const.ROLE_ID_AUTHOR],actions:[xs.FILE_LIST,xs.FILE_UPLOAD,xs.FILE_EDIT,xs.FILE_DELETE]},{roles:[pkp.const.ROLE_ID_SUB_EDITOR,pkp.const.ROLE_ID_MANAGER,pkp.const.ROLE_ID_SITE_ADMIN,pkp.const.ROLE_ID_ASSISTANT],actions:[xs.FILE_LIST,xs.FILE_UPLOAD,xs.FILE_EDIT,xs.FILE_DELETE,xs.FILE_SEE_NOTES]}],actions:[xs.FILE_UPLOAD,xs.FILE_EDIT,xs.FILE_DELETE,xs.FILE_SEE_NOTES],fileStage:e===pkp.const.WORKFLOW_STAGE_ID_INTERNAL_REVIEW?pkp.const.SUBMISSION_FILE_INTERNAL_REVIEW_REVISION:pkp.const.SUBMISSION_FILE_REVIEW_REVISION,titleKey:Rd("fileManager.revisionsUploaded"),descriptionKey:Rd("fileManager.revisionsUploadedDescription"),wizardTitleKey:Rd("editor.submissionReview.uploadFile")}),COPYEDITED_FILES:({stageId:e})=>({permissions:[{roles:[pkp.const.ROLE_ID_AUTHOR],actions:[xs.FILE_LIST]},{roles:[pkp.const.ROLE_ID_SUB_EDITOR,pkp.const.ROLE_ID_MANAGER,pkp.const.ROLE_ID_SITE_ADMIN,pkp.const.ROLE_ID_ASSISTANT],actions:[xs.FILE_LIST,xs.FILE_SELECT_UPLOAD,xs.FILE_EDIT,xs.FILE_DELETE,xs.FILE_SEE_NOTES]}],actions:[xs.FILE_LIST,xs.FILE_SELECT_UPLOAD,xs.FILE_EDIT,xs.FILE_DELETE,xs.FILE_SEE_NOTES],fileStage:pkp.const.SUBMISSION_FILE_COPYEDIT,titleKey:Rd("fileManager.copyeditedFiles"),descriptionKey:Rd("fileManager.copyeditedFilesDescription"),gridComponent:"grid.files.copyedit.CopyeditFilesGridHandler",uploadSelectTitleKey:Rd("editor.submissionReview.uploadFile")}),FINAL_DRAFT_FILES:({stageId:e})=>({permissions:[{roles:[pkp.const.ROLE_ID_SUB_EDITOR,pkp.const.ROLE_ID_MANAGER,pkp.const.ROLE_ID_SITE_ADMIN,pkp.const.ROLE_ID_ASSISTANT],actions:[xs.FILE_LIST,xs.FILE_SELECT_UPLOAD,xs.FILE_EDIT,xs.FILE_DELETE,xs.FILE_SEE_NOTES]}],actions:[xs.FILE_LIST,xs.FILE_SELECT_UPLOAD,xs.FILE_EDIT,xs.FILE_DELETE,xs.FILE_SEE_NOTES],fileStage:pkp.const.SUBMISSION_FILE_FINAL,titleKey:Rd("submission.finalDraft"),descriptionKey:Rd("fileManager.draftFilesDescription"),gridComponent:"grid.files.final.FinalDraftFilesGridHandler",uploadSelectTitleKey:Rd("editor.submission.uploadSelectFiles")}),PRODUCTION_READY_FILES:({stageId:e})=>({permissions:[{roles:[pkp.const.ROLE_ID_SUB_EDITOR,pkp.const.ROLE_ID_MANAGER,pkp.const.ROLE_ID_SITE_ADMIN,pkp.const.ROLE_ID_ASSISTANT],actions:[xs.FILE_LIST,xs.FILE_UPLOAD,xs.FILE_EDIT,xs.FILE_DELETE,xs.FILE_SEE_NOTES,xs.FILE_DOWNLOAD_ALL]}],actions:[xs.FILE_LIST,xs.FILE_UPLOAD,xs.FILE_EDIT,xs.FILE_DELETE,xs.FILE_SEE_NOTES,xs.FILE_DOWNLOAD_ALL],fileStage:pkp.const.SUBMISSION_FILE_PRODUCTION_READY,titleKey:Rd("editor.submission.production.productionReadyFiles"),descriptionKey:Rd("fileManager.productionReadyFilesDescription"),wizardTitleKey:Rd("submission.upload.productionReady")})};function Ipt(){const{t:e}=Jn(),{hasCurrentUserAtLeastOneAssignedRoleInStage:t}=Nh();function n({namespace:d,submissionStageId:h,submission:b}){const S=LSe[d.value]({stageId:h.value}),k=S.actions.filter(T=>S.permissions.some(O=>O.actions.includes(T)&&t(b.value,h.value,O.roles)));return{fileStage:S.fileStage,permittedActions:k,title:e(S.titleKey),titleKey:S.titleKey,description:e(S.descriptionKey),wizardTitleKey:S.wizardTitleKey,uploadSelectTitleKey:S.uploadSelectTitleKey,gridComponent:S.gridComponent}}function i(){const d=[];return d.push({header:e("common.numero"),component:"FileManagerCellNumero",props:{}}),d.push({header:e("common.fileName"),component:"FileManagerCellFileName",props:{}}),d.push({header:e("common.dateUploaded"),component:"FileManagerCellDateUploaded",props:{}}),d.push({header:e("common.type"),component:"FileManagerCellType",props:{}}),d.push({headerSrOnly:!0,header:e("common.moreActions"),component:"FileManagerCellMoreActions",props:{}}),d}function a({managerConfig:d}){const h=[],b=d.permittedActions;return b.includes(xs.FILE_UPLOAD)&&h.push({component:"FileManagerActionButton",props:{label:e("common.upload"),action:xs.FILE_UPLOAD}}),b.includes(xs.FILE_SELECT_UPLOAD)&&h.push({component:"FileManagerActionButton",props:{label:e("editor.submission.uploadSelectFiles"),action:xs.FILE_SELECT_UPLOAD}}),h}function l({managerConfig:d,filesCount:h}){const b=[];return d.permittedActions.includes(xs.FILE_DOWNLOAD_ALL)&&h&&b.push({component:"FileManagerActionButton",props:{label:e("submission.files.downloadAll"),action:xs.FILE_DOWNLOAD_ALL,isLink:!0}}),b}function f({item:d,managerConfig:h}){const b=[],S=h.permittedActions;return S.includes(xs.FILE_EDIT)&&b.push({label:e("grid.action.edit"),name:xs.FILE_EDIT,icon:"Edit"}),S.includes(xs.FILE_SEE_NOTES)&&b.push({label:e("grid.action.moreInformation"),name:xs.FILE_SEE_NOTES,icon:"View"}),S.includes(xs.FILE_DELETE)&&b.push({label:e("grid.action.delete"),name:xs.FILE_DELETE,isWarnable:!0,icon:"Cancel"}),b}return{getManagerConfig:n,getColumns:i,getBottomItems:l,getTopItems:a,getItemActions:f}}const Gne=Nf("fileManager",e=>{const t=C5(),{namespace:n,submissionStageId:i,submission:a}=q3(e),l=t.addFns(Ipt()),f=Ge(()=>l.getManagerConfig({namespace:n,submissionStageId:i,submission:a})),d=Ge(()=>l.getColumns()),h=Ge(()=>l.getTopItems({managerConfig:f.value})),b=Ge(()=>{var de;return l.getBottomItems({managerConfig:f.value,filesCount:(de=B.value)==null?void 0:de.length})});function S({file:de}){return l.getItemActions({file:de,managerConfig:f.value})}const{apiUrl:k}=to("submissions/".concat(a.value.id,"/files")),T=Ge(()=>({fileStages:f.value.fileStage,reviewRoundIds:e.reviewRoundId?e.reviewRoundId:void 0})),{data:O,fetch:P}=fr(k,{query:T}),B=Ge(()=>{var de;return((de=O.value)==null?void 0:de.items)||[]});io([k,T],([de,he],[ie,Be])=>{(de!==ie||JSON.stringify(he)!==JSON.stringify(Be))&&(O.value=null,P())},{immediate:!0});const{triggerDataChange:W}=Pb(()=>P()),Z=$te();function Y(){W()}function z(de={}){return{...de,submissionStageId:e.submissionStageId,reviewRoundId:e.reviewRoundId,submission:e.submission,fileStage:f.value.fileStage,wizardTitleKey:f.value.wizardTitleKey,uploadSelectTitleKey:f.value.uploadSelectTitleKey,gridComponent:f.value.gridComponent,titleKey:f.value.titleKey}}function q(){Z.fileUpload(z(),Y)}function ne(){Z.fileSelectUpload(z(),Y)}function ue(){Z.fileDownloadAll(z(),Y)}function J({file:de}){Z.fileEdit(z({file:de}),Y)}function ce({file:de}){Z.fileDelete(z({file:de}),()=>{Y(),$("body").trigger("notifyUser")})}function ge({file:de}){Z.fileSeeNotes(z({file:de}),Y)}return{title:e.title,files:B,fetchFiles:P,managerConfig:f,columns:d,topItems:h,bottomItems:b,getItemActions:S,fileUpload:q,fileSelectUpload:ne,fileDownloadAll:ue,fileEdit:J,fileDelete:ce,fileSeeNotes:ge,extender:t,props:e}},{requireNamespace:!0}),Apt={class:"flex items-center"},Opt={class:"text-base-normal text-default"},Rpt={__name:"FileManagerCellNumero",props:{file:{type:Object,required:!0}},setup(e){const t=e,n=Ge(()=>{var i,a;return pkp.documentTypeIcons&&pkp.documentTypeIcons[(i=t.file)==null?void 0:i.documentType]?pkp.documentTypeIcons[(a=t.file)==null?void 0:a.documentType]:"DocumentDefault"});return(i,a)=>(L(),Ee(as,{class:""},{default:te(()=>[H("div",Apt,[pe(Vs,{icon:n.value,class:"h-6 w-6 flex-none text-heading"},null,8,["icon"]),a[0]||(a[0]=D()),H("span",Opt,ee(e.file.id),1)])]),_:1}))}},Dpt={class:"ms-2 truncate text-lg-normal text-default"},Lpt=["href"],Ppt={__name:"FileManagerCellFileName",props:{file:{type:Object,required:!0}},setup(e){const{localize:t}=Jn();return(n,i)=>(L(),Ee(as,{"is-row-header":!0,"full-width-truncated":""},{default:te(()=>[H("span",Dpt,[e.file.url?(L(),Q("a",{key:0,class:"hover:underline",href:e.file.url,target:"_blank"},ee(se(t)(e.file.name)),9,Lpt)):(L(),Q(bt,{key:1},[D(ee(se(t)(e.file.name)),1)],64))])]),_:1}))}},Mpt={class:"text-base-normal text-default"},Npt={__name:"FileManagerCellDateUploaded",props:{file:{type:Object,required:!0}},setup(e){const{formatShortDate:t}=Ed();return(n,i)=>(L(),Ee(as,{"no-wrap":""},{default:te(()=>[H("span",Mpt,ee(se(t)(e.file.createdAt)),1)]),_:1}))}},Fpt={__name:"FileManagerCellType",props:{file:{type:Object,required:!0}},setup(e){const{localize:t}=Jn();return(n,i)=>(L(),Ee(as,{"no-wrap":""},{default:te(()=>[e.file.genreName?(L(),Ee(kd,{key:0,"is-primary":!e.file.genreIsDependent&&!e.file.genreIsSupplementary},{default:te(()=>[D(ee(se(t)(e.file.genreName)),1)]),_:1},8,["is-primary"])):we("",!0)]),_:1}))}},$pt={__name:"FileManagerCellMoreActions",props:{file:{type:Object,required:!0}},setup(e){const t=e,n=Gne(),i=Ge(()=>n.getItemActions({file:t.file}));return(a,l)=>(L(),Ee(as,null,{default:te(()=>{var f;return[(f=i.value)!=null&&f.length?(L(),Ee(z1,{key:0,label:a.t("common.moreActions"),"button-variant":"ellipsis",actions:i.value,"action-args":{file:e.file},onAction:l[0]||(l[0]=(d,h)=>se(n)[d](h))},null,8,["label","actions","action-args"])):we("",!0)]}),_:1}))}},Bpt={__name:"FileManagerActionButton",props:{isPrimary:{type:Boolean,required:!1,default:!1},isSecondary:{type:Boolean,required:!1,default:!1},isWarnable:{type:Boolean,required:!1,default:!1},action:{type:String,required:!0},actionArgs:{type:Object,required:!1,default:()=>{}},isLink:{type:Boolean,default:!1},label:{type:String,required:!0}},setup(e){const t=Gne();return(n,i)=>(L(),Ee(ms,{"is-primary":e.isPrimary,"is-secondary":e.isSecondary,"is-warnable":e.isWarnable,"is-link":e.isLink,onClick:i[0]||(i[0]=()=>se(t)[e.action](e.actionArgs))},{default:te(()=>[D(ee(e.label),1)]),_:1},8,["is-primary","is-secondary","is-warnable","is-link"]))}},Vpt={class:""},Hpt={class:"flex gap-x-2"},Upt={__name:"FileManager",props:{namespace:{type:String,required:!0,validator:e=>Object.keys(LSe).includes(e)},submission:{type:Object,required:!0},submissionStageId:{type:Number,required:!0},reviewRoundId:{type:Number,required:!1,default:null}},setup(e){const t={FileManagerCellNumero:Rpt,FileManagerCellFileName:Ppt,FileManagerCellDateUploaded:Npt,FileManagerCellType:Fpt,FileManagerCellMoreActions:$pt,FileManagerActionButton:Bpt},n=e,i=Gne(n,n.namespace);return(a,l)=>(L(),Q("div",null,[pe(du,null,If({label:te(()=>[H("h3",Vpt,ee(se(i).managerConfig.title),1)]),description:te(()=>[H("p",null,ee(se(i).managerConfig.description),1)]),"top-controls":te(()=>[H("div",Hpt,[(L(!0),Q(bt,null,Sn(se(i).topItems,(f,d)=>(L(),Ee(Io(t[f.component]||f.component),Cn({ref_for:!0},f.props||{},{key:d}),null,16))),128))])]),default:te(()=>[l[0]||(l[0]=D()),l[1]||(l[1]=D()),l[2]||(l[2]=D()),pe(Ad,null,{default:te(()=>[(L(!0),Q(bt,null,Sn(se(i).columns,(f,d)=>(L(),Ee(Ei,{key:d},{default:te(()=>[H("span",{class:Rn(f.headerSrOnly?"sr-only":"")},ee(f.header),3)]),_:2},1024))),128))]),_:1}),l[3]||(l[3]=D()),pe(Kd,null,{default:te(()=>[(L(!0),Q(bt,null,Sn(se(i).files,f=>(L(),Ee(Bi,{key:f.id},{default:te(()=>[(L(!0),Q(bt,null,Sn(se(i).columns,(d,h)=>(L(),Ee(Io(t[d.component]||d.component),Cn({key:h,file:f,ref_for:!0},d.props),null,16,["file"]))),128))]),_:2},1024))),128))]),_:1}),l[4]||(l[4]=D())]),_:2},[se(i).bottomItems.length?{name:"bottom-controls",fn:te(()=>[(L(!0),Q(bt,null,Sn(se(i).bottomItems,(f,d)=>(L(),Ee(Io(t[f.component]||f.component),Cn({ref_for:!0},f.props||{},{key:d}),null,16))),128))]),key:"0"}:void 0]),1024)]))}},zpt={class:"text-base-normal"},Wpt={__name:"ReviewerManagerCellReviewer",props:{reviewAssignment:{type:Object,required:!0}},setup(e){return(t,n)=>(L(),Ee(as,{"is-row-header":!0},{default:te(()=>[H("span",zpt,ee(e.reviewAssignment.reviewerFullName),1)]),_:1}))}};function jpt(){const{t:e}=Jn(),{formatShortDate:t}=Ed();function n({reviewAssignment:d}){const h=[];function b(k){const T=k.recommendation?e(PV[k.recommendation]):null;return T?e("submission.recommendation",{recommendation:T}):null}function S(k){var T;if((T=k.competingInterests)!=null&&T.length)return e("reviewer.competingInterests")}switch(d.statusId){case pkp.const.REVIEW_ASSIGNMENT_STATUS_AWAITING_RESPONSE:h.push({component:"ReviewerManagerCellStatusInfo",props:{title:e("editor.review.requestSent"),message:e("editor.review.responseDue",{date:t(d.dateResponseDue)}),competingInterests:S(d)}});break;case pkp.const.REVIEW_ASSIGNMENT_STATUS_ACCEPTED:h.push({component:"ReviewerManagerCellStatusInfo",props:{title:e("editor.review.requestAccepted"),description:e("editor.review.reviewDue",{date:t(d.dateDue)}),competingInterests:S(d)}});break;case pkp.const.REVIEW_ASSIGNMENT_STATUS_COMPLETE:h.push({component:"ReviewerManagerCellStatusInfo",props:{title:e("common.complete"),recommendation:b(d),competingInterests:S(d)}});break;case pkp.const.REVIEW_ASSIGNMENT_STATUS_REVIEW_OVERDUE:h.push({component:"ReviewerManagerCellStatusInfo",props:{title:e("common.overdue"),isNegative:!0,description:e("editor.review.reviewDue",{date:t(d.dateDue)}),competingInterests:S(d)}});break;case pkp.const.REVIEW_ASSIGNMENT_STATUS_RESPONSE_OVERDUE:h.push({component:"ReviewerManagerCellStatusInfo",props:{title:e("common.overdue"),isNegative:!0,description:e("editor.review.responseDue",{date:t(d.dateResponseDue)}),competingInterests:S(d)}});break;case pkp.const.REVIEW_ASSIGNMENT_STATUS_DECLINED:h.push({component:"ReviewerManagerCellStatusInfo",props:{title:e("editor.review.requestDeclined"),tooltip:e("editor.review.requestDeclined.tooltip"),competingInterests:S(d)}});break;case pkp.const.REVIEW_ASSIGNMENT_STATUS_CANCELLED:h.push({component:"ReviewerManagerCellStatusInfo",props:{title:e("editor.review.requestCancelled"),tooltip:e("editor.review.requestCancelled.tooltip"),competingInterests:S(d)}});break;case pkp.const.REVIEW_ASSIGNMENT_STATUS_RECEIVED:h.push({component:"ReviewerManagerCellStatusInfo",props:{title:e("editor.review.reviewSubmitted"),recommendation:b(d),competingInterests:S(d)}});break;case pkp.const.REVIEW_ASSIGNMENT_STATUS_THANKED:h.push({component:"ReviewerManagerCellStatusInfo",props:{title:e("editor.review.reviewerThanked"),recommendation:b(d),competingInterests:S(d)}});break;case pkp.const.REVIEW_ASSIGNMENT_STATUS_REQUEST_RESEND:h.push({component:"ReviewerManagerCellStatusInfo",props:{title:e("editor.review.ReviewerResendRequest"),description:e("editor.review.responseDue",{date:t(d.dateDue)}),competingInterests:S(d)}});break;case pkp.const.REVIEW_ASSIGNMENT_STATUS_VIEWED:h.push({component:"ReviewerManagerCellStatusInfo",props:{title:e("editor.review.reviewViewed"),recommendation:b(d),competingInterests:S(d)}});break}return h}function i({submission:d,redactedForAuthors:h}){const b=[],S={submission:d,redactedForAuthors:h};return b.push({header:e("user.role.reviewer"),component:"ReviewerManagerCellReviewer",props:S}),h||b.push({header:e("reviewerManager.reviewerStatus"),component:"ReviewerManagerCellStatus",props:S}),b.push({header:e("common.type"),component:"ReviewerManagerCellReviewType",props:S}),b.push({header:e("grid.columns.actions"),component:"ReviewerManagerCellPrimaryActions",props:S}),h||b.push({header:e("common.moreActions"),headerSrOnly:!0,component:"ReviewerManagerCellActions",props:S}),b}function a({redactedForAuthors:d}){const h=[];return d?[]:(h.push({component:"ReviewerManagerActionButton",props:{label:e("editor.submission.addReviewer"),action:al.REVIEWER_ADD_REVIEWER}}),h)}function l({reviewAssignment:d,redactedForAuthors:h}){const b=d.statusId,S=[];return h?[pkp.const.REVIEW_ASSIGNMENT_STATUS_COMPLETE,pkp.const.REVIEW_ASSIGNMENT_STATUS_THANKED,pkp.const.REVIEW_ASSIGNMENT_STATUS_RECEIVED,pkp.const.REVIEW_ASSIGNMENT_STATUS_VIEWED].includes(b)?[{label:e("editor.review.readReview"),name:al.REVIEWER_READ_REVIEW_BY_AUTHOR}]:[]:([pkp.const.REVIEW_ASSIGNMENT_STATUS_RESPONSE_OVERDUE,pkp.const.REVIEW_ASSIGNMENT_STATUS_REVIEW_OVERDUE].includes(b)?S.push({label:e("editor.review.sendReminder"),name:al.REVIEWER_SEND_REMINDER}):b===pkp.const.REVIEW_ASSIGNMENT_STATUS_COMPLETE?(S.push({label:e("editor.review.thankReviewer"),name:al.REVIEWER_THANK_REVIEWER}),S.push({label:e("editor.review.revertDecision"),name:al.REVIEWER_REVERT_CONSIDER})):b===pkp.const.REVIEW_ASSIGNMENT_STATUS_THANKED?S.push({label:e("editor.review.revertDecision"),name:al.REVIEWER_REVERT_CONSIDER}):[pkp.const.REVIEW_ASSIGNMENT_STATUS_RECEIVED,pkp.const.REVIEW_ASSIGNMENT_STATUS_VIEWED].includes(b)&&S.push({label:e("editor.review.readReview"),name:al.REVIEWER_READ_REVIEW}),S)}function f({reviewAssignment:d}){const h=[],b=d.statusId;return b!==pkp.const.REVIEW_ASSIGNMENT_STATUS_CANCELLED&&h.push({label:e("editor.review.reviewDetails"),name:al.REVIEWER_REVIEW_DETAILS,icon:"View"}),h.push({label:e("editor.review.emailReviewer"),name:al.REVIEWER_EMAIL_REVIEWER,icon:"Email"}),b===pkp.const.REVIEW_ASSIGNMENT_STATUS_DECLINED&&h.push({label:e("editor.review.resendRequestReviewer"),name:al.REVIEWER_RESEND_REQUEST,icon:"ReviewSent"}),b!==pkp.const.REVIEW_ASSIGNMENT_STATUS_CANCELLED?(h.push({label:e("common.edit"),name:al.REVIEWER_EDIT_REVIEW,icon:"Edit"}),h.push({label:d.dateConfirmed?e("editor.review.cancelReviewer"):e("editor.review.unassignReviewer"),name:d.dateConfirmed?al.REVIEWER_CANCEL_REVIEWER:al.REVIEWER_UNASSIGN_REVIEWER,icon:"Cancel",isWarnable:!0})):h.push({label:e("editor.review.reinstateReviewer"),name:al.REVIEWER_REINSTATE_REVIEWER,icon:"ReinstateReviewer"}),h.push({label:e("submission.history"),name:al.REVIEWER_REVIEW_HISTORY,icon:"History"}),d.canLoginAs&&h.push({label:e("grid.action.logInAs"),name:al.REVIEWER_LOGIN_AS,icon:"LoginAs"}),d.canGossip&&h.push({label:e("user.gossip"),name:al.REVIEWER_EDITORIAL_NOTES,icon:"DefaultDocument"}),d.dateConfirmed||h.push({label:e("editor.review.logResponse"),name:al.REVIEWER_LOG_RESPONSE,icon:"ReviewAssignments"}),d.reviewerHasOrcid&&pkp.const.REVIEW_ASSIGNMENT_STATUS_COMPLETE&&h.push({label:e("dashboard.reviewAssignment.action.sendReviewToOrcid"),name:al.REVIEWER_SEND_TO_ORCID,icon:"Orcid"}),h}return{getTopItems:a,getItemActions:f,getItemPrimaryActions:l,getCellStatusItems:n,getColumns:i}}const bR=Nf("reviewerManager",e=>{const{getOpenAndCompletedReviewAssignmentsForRound:t,getReviewAssignmentsForRound:n}=Va(),i=C5(),a=Ge(()=>{const Ye=n(e.submission.reviewAssignments,e.reviewRoundId);return e.redactedForAuthors?t(e.submission.reviewAssignments,e.reviewRoundId):Ye}),{triggerDataChange:l}=Pb(),f=i.addFns(jpt()),d=Ge(()=>f.getColumns({submission:e.submission,redactedForAuthors:e.redactedForAuthors}));function h(Ye){return f.getCellStatusItems(Ye)}function b(Ye){return f.getItemActions(Ye)}function S(Ye){return f.getItemPrimaryActions(Ye)}const k=Ge(()=>f.getTopItems({submission:e.submission,redactedForAuthors:e.redactedForAuthors})),T=$5e();function O(){l()}function P(Ye={}){return{submission:e.submission,submissionStageId:e.submissionStageId,reviewRoundId:e.reviewRoundId,componentForms:e.componentForms,...Ye}}function B(){T.reviewerAddReviewer(P(),O)}function W({reviewAssignment:Ye}){T.reviewerReadReview(P({reviewAssignment:Ye}),O)}function Z({reviewAssignment:Ye}){T.reviewerReadReviewByAuthor(P({reviewAssignment:Ye}),O)}function Y({reviewAssignment:Ye}){T.reviewerReviewDetails(P({reviewAssignment:Ye}),O)}function z({reviewAssignment:Ye}){T.reviewerEmailReviewer(P({reviewAssignment:Ye}),O)}function q({reviewAssignment:Ye}){T.reviewerResendRequest(P({reviewAssignment:Ye}),O)}function ne({reviewAssignment:Ye}){T.reviewerEditReview(P({reviewAssignment:Ye}),O)}function ue({reviewAssignment:Ye}){T.reviewerUnassignReviewer(P({reviewAssignment:Ye}),O)}function J({reviewAssignment:Ye}){T.reviewerReinstateReviewer(P({reviewAssignment:Ye}),O)}function ce({reviewAssignment:Ye}){T.reviewerCancelReviewer(P({reviewAssignment:Ye}),O)}function ge({reviewAssignment:Ye}){T.reviewerReviewHistory(P({reviewAssignment:Ye}),O)}function de({reviewAssignment:Ye}){T.reviewerLoginAs(P({reviewAssignment:Ye}),O)}function he({reviewAssignment:Ye}){T.reviewerEditorialNotes(P({reviewAssignment:Ye}),O)}function ie({reviewAssignment:Ye}){T.reviewerThankReviewer(P({reviewAssignment:Ye}),O)}function Be({reviewAssignment:Ye}){T.reviewerRevertConsider(P({reviewAssignment:Ye}),O)}function $e({reviewAssignment:Ye}){T.reviewerSendReminder(P({reviewAssignment:Ye}),O)}function Ue({reviewAssignment:Ye}){T.reviewerLogResponse(P({reviewAssignment:Ye}),O)}function V({reviewAssignment:Ye}){return T.reviewerSendToOrcid(P({reviewAssignment:Ye}))}return{reviewAssignments:a,getCellStatusItems:h,columns:d,getItemActions:b,getItemPrimaryActions:S,topItems:k,reviewerAddReviewer:B,reviewerReadReview:W,reviewerReadReviewByAuthor:Z,reviewerReviewDetails:Y,reviewerEmailReviewer:z,reviewerResendRequest:q,reviewerEditReview:ne,reviewerUnassignReviewer:ue,reviewerReinstateReviewer:J,reviewerCancelReviewer:ce,reviewerReviewHistory:ge,reviewerLoginAs:de,reviewerEditorialNotes:he,reviewerThankReviewer:ie,reviewerRevertConsider:Be,reviewerSendReminder:$e,reviewerLogResponse:Ue,reviewerSendToOrcid:V,extender:i,props:e}}),Zpt={class:"-ms-3 flex flex-col"},qpt={__name:"ReviewerManagerCellPrimaryActions",props:{reviewAssignment:{type:Object,required:!0},submission:{type:Object,required:!0},redactedForAuthors:{type:Boolean,required:!0}},setup(e){const t=e,n=bR(),i=Ge(()=>n.getItemPrimaryActions({reviewAssignment:t.reviewAssignment,redactedForAuthors:t.redactedForAuthors}));function a(l){n[l]({reviewAssignment:t.reviewAssignment})}return(l,f)=>(L(),Ee(as,null,{default:te(()=>[H("div",Zpt,[(L(!0),Q(bt,null,Sn(i.value,d=>(L(),Ee(ms,{key:d.name,"is-link":"",onClick:h=>a(d.name)},{default:te(()=>[D(ee(d.label),1)]),_:2},1032,["onClick"]))),128))])]),_:1}))}},Gpt={__name:"ReviewerManagerCellActions",props:{reviewAssignment:{type:Object,required:!0},submission:{type:Object,required:!0},redactedForAuthors:{type:Boolean,required:!0}},setup(e){const t=e,n=bR(),i=Ge(()=>n.getItemActions({reviewAssignment:t.reviewAssignment,redactedForAuthors:t.redactedForAuthors}));function a(l){n[l]({reviewAssignment:t.reviewAssignment})}return(l,f)=>(L(),Ee(as,null,{default:te(()=>[pe(z1,{label:l.t("common.moreActions"),"button-variant":"ellipsis",actions:i.value,onAction:a},null,8,["label","actions"])]),_:1}))}},Kpt={class:"flex flex-col"},Ypt=["title"],Xpt={key:1,class:"text-sm-normal text-secondary"},Jpt={key:2,class:"text-sm-normal text-secondary"},Qpt={key:3,class:"pt-0.5 text-sm-normal text-secondary"},emt={__name:"ReviewerManagerCellStatusInfo",props:{title:{type:String,required:!1,default:null},description:{type:String,required:!1,default:null},isNegative:{type:Boolean,required:!1,default:!1},tooltip:{type:String,required:!1,default:null},recommendation:{type:String,required:!1,default:null},competingInterests:{type:String,required:!1,default:null}},setup(e){return(t,n)=>(L(),Q("div",Kpt,[e.title?(L(),Q("span",{key:0,class:Rn({"text-base-bold":!0,"text-default":!e.isNegative,"text-negative":e.isNegative}),title:e.tooltip?e.tooltip:void 0},ee(e.title),11,Ypt)):we("",!0),n[0]||(n[0]=D()),e.description?(L(),Q("span",Xpt,ee(e.description),1)):we("",!0),n[1]||(n[1]=D()),e.recommendation?(L(),Q("span",Jpt,ee(e.recommendation),1)):we("",!0),n[2]||(n[2]=D()),e.competingInterests?(L(),Q("span",Qpt,[pe(kd,{"size-variant":"compact","color-variant":"attention"},{default:te(()=>[D(ee(e.competingInterests),1)]),_:1})])):we("",!0)]))}},tmt={class:"flex flex-col"},nmt={__name:"ReviewerManagerCellStatus",props:{reviewAssignment:{type:Object,required:!0},submission:{type:Object,required:!0},redactedForAuthors:{type:Boolean,required:!0}},setup(e){const t={ReviewerManagerCellStatusInfo:emt},n=e,i=Ge(()=>a.getCellStatusItems({reviewAssignment:n.reviewAssignment})),a=bR();return(l,f)=>(L(),Ee(as,null,{default:te(()=>[H("div",tmt,[(L(!0),Q(bt,null,Sn(i.value,(d,h)=>(L(),Ee(Io(t[d.component]||d.component),Cn({key:h,ref_for:!0},(d==null?void 0:d.props)||{}),null,16))),128))])]),_:1}))}},smt={__name:"ReviewerManagerCellReviewType",props:{reviewAssignment:{type:Object,required:!0}},setup(e){return(t,n)=>(L(),Ee(as,null,{default:te(()=>[pe(bSe,{"review-method":e.reviewAssignment.reviewMethod},null,8,["review-method"])]),_:1}))}},omt={__name:"ReviewerManagerActionButton",props:{isPrimary:{type:Boolean,required:!1,default:!1},isSecondary:{type:Boolean,required:!1,default:!1},isWarnable:{type:Boolean,required:!1,default:!1},action:{type:String,required:!0},actionArgs:{type:Object,required:!1,default:()=>{}},isLink:{type:Boolean,default:!1},label:{type:String,required:!0}},setup(e){const t=bR();return(n,i)=>(L(),Ee(ms,{"is-primary":e.isPrimary,"is-secondary":e.isSecondary,"is-warnable":e.isWarnable,"is-link":e.isLink,onClick:i[0]||(i[0]=()=>se(t)[e.action](e.actionArgs))},{default:te(()=>[D(ee(e.label),1)]),_:1},8,["is-primary","is-secondary","is-warnable","is-link"]))}},rmt={"data-cy":"reviewer-manager"},imt={class:""},amt={class:"flex gap-x-2"},lmt={__name:"ReviewerManager",props:{submission:{type:Object,required:!0},submissionStageId:{type:Number,required:!0},reviewRoundId:{type:Number,required:!0},redactedForAuthors:{type:Boolean,required:!1,default:!1},componentForms:{type:Object,required:!0}},setup(e){const{t}=Jn(),n={ReviewerManagerCellReviewer:Wpt,ReviewerManagerCellStatus:nmt,ReviewerManagerCellReviewType:smt,ReviewerManagerCellPrimaryActions:qpt,ReviewerManagerCellActions:Gpt,ReviewerManagerActionButton:omt},a=bR(e);return(l,f)=>(L(),Q("div",rmt,[pe(du,null,{label:te(()=>[H("h3",imt,ee(se(t)("user.role.reviewers")),1)]),"top-controls":te(()=>[H("div",amt,[(L(!0),Q(bt,null,Sn(se(a).topItems,(d,h)=>(L(),Ee(Io(n[d.component]||d.component),Cn({ref_for:!0},d.props||{},{key:h}),null,16))),128))])]),default:te(()=>[f[0]||(f[0]=D()),f[1]||(f[1]=D()),pe(Ad,null,{default:te(()=>[(L(!0),Q(bt,null,Sn(se(a).columns,(d,h)=>(L(),Ee(Ei,{key:h},{default:te(()=>[H("span",{class:Rn(d.headerSrOnly?"sr-only":"")},ee(d.header),3)]),_:2},1024))),128))]),_:1}),f[2]||(f[2]=D()),pe(Kd,null,{default:te(()=>[(L(!0),Q(bt,null,Sn(se(a).reviewAssignments,d=>(L(),Ee(Bi,{key:d.id},{default:te(()=>[(L(!0),Q(bt,null,Sn(se(a).columns,(h,b)=>(L(),Ee(Io(n[h.component]||h.component),Cn({key:b,ref_for:!0},h.props,{"review-assignment":d}),null,16,["review-assignment"]))),128))]),_:2},1024))),128))]),_:1})]),_:1})]))}},cmt={__name:"DiscussionManager",props:{submissionId:{type:Number,required:!0},stageId:{type:Number,required:!0}},setup(e){const t=e,n=Ge(()=>({submissionId:t.submissionId,stageId:t.stageId}));return(i,a)=>(L(),Ee(pSe,{key:"".concat(e.submissionId," - ").concat(e.stageId),"grid-component":"grid.queries.QueriesGridHandler",params:n.value},null,8,["params"]))}},umt=Nf("contributorManager",e=>{const{t}=Jn(),{apiUrl:n}=to("submissions/".concat(e.submission.id,"/publications/__publicationId__")),i=Wp(),{form:a,setLocalesForSubmission:l}=B1(i.componentForms.contributorForm);l(e.submission);const{triggerDataChange:f}=Pb(),d=Ge(()=>({canEditPublication:e.canEdit,form:a.value,id:"contributors",items:e.publication.authors,title:t("publication.contributors"),publicationApiUrlFormat:n.value,publication:e.publication,"onUpdated:publication":h=>{Object.keys(h).forEach(b=>{e.publication[b]=h[b]}),f()},"onUpdated:contributors":h=>{e.publication.authors=h}}));return{title:e.title,contributorsListPanelProps:d}}),dmt={__name:"ContributorsPreviewModal",props:{publication:{type:Object,required:!0}},setup(e){const{t}=Jn();return(n,i)=>(L(),Ee(il,null,{title:te(()=>[D(ee(se(t)("submission.contributors")),1)]),default:te(()=>[i[8]||(i[8]=D()),pe(Lu,null,{default:te(()=>[H("p",null,ee(se(t)("contributor.listPanel.preview.description")),1),i[7]||(i[7]=D()),pe(du,null,{default:te(()=>[pe(Ad,null,{default:te(()=>[pe(Ei,null,{default:te(()=>[D(ee(se(t)("contributor.listPanel.preview.format")),1)]),_:1}),i[0]||(i[0]=D()),pe(Ei,null,{default:te(()=>[D(ee(se(t)("contributor.listPanel.preview.display")),1)]),_:1})]),_:1}),i[6]||(i[6]=D()),pe(Kd,null,{default:te(()=>[pe(Bi,null,{default:te(()=>[pe(as,null,{default:te(()=>[D(ee(se(t)("contributor.listPanel.preview.abbreviated")),1)]),_:1}),i[1]||(i[1]=D()),pe(as,null,{default:te(()=>[D(ee(e.publication.authorsStringShort),1)]),_:1})]),_:1}),i[4]||(i[4]=D()),pe(Bi,null,{default:te(()=>[pe(as,null,{default:te(()=>[D(ee(se(t)("contributor.listPanel.preview.publicationLists")),1)]),_:1}),i[2]||(i[2]=D()),pe(as,null,{default:te(()=>[D(ee(e.publication.authorsStringIncludeInBrowse),1)]),_:1})]),_:1}),i[5]||(i[5]=D()),pe(Bi,null,{default:te(()=>[pe(as,null,{default:te(()=>[D(ee(se(t)("contributor.listPanel.preview.full")),1)]),_:1}),i[3]||(i[3]=D()),pe(as,null,{default:te(()=>[D(ee(e.publication.authorsString),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))}},Kne={__name:"ContributorsEditModal",props:{title:{type:String,required:!0},activeForm:{type:Object,required:!0}},emits:["updateForm","formSuccess"],setup(e,{emit:t}){const n=t;return(i,a)=>(L(),Ee(il,null,{title:te(()=>[D(ee(e.title),1)]),default:te(()=>[a[2]||(a[2]=D()),pe(Lu,null,{default:te(()=>[pe(oa,Cn(e.activeForm,{onSet:a[0]||(a[0]=(...l)=>n("updateForm",...l)),onSuccess:a[1]||(a[1]=(...l)=>n("formSuccess",...l))}),null,16)]),_:1})]),_:1}))}},fmt={components:{Spinner:zl,PkpButton:ms,Badge:kd,ListPanel:Vf,Orderer:vH,PkpHeader:Bf},mixins:[Od,wd],props:{canEditPublication:{type:Boolean,required:!0},form:{type:Object,required:!0},id:{type:String,required:!0},items:{type:Array,default(){return[]}},title:{type:String,required:!0},publicationApiUrlFormat:{type:String,required:!0},publication:{type:Object,required:!0}},data(){return{activeForm:null,activeFormTitle:"",isOrdering:!1,isLoading:!1,itemsBeforeReordering:null}},computed:{contributorsApiUrl(){return this.publicationApiUrlFormat.replace("__publicationId__",this.publication.id+"/contributors")},formModal(){return this.id+"form"},previewModal(){return this.id+"preview"},publicationApiUrl(){return this.publicationApiUrlFormat.replace("__publicationId__",this.publication.id)},orderingLabel(){return this.isOrdering?this.t("grid.action.saveOrdering"):this.t("common.order")}},methods:{getConstant(e){return pkp.const[e]},closeFormModal(e){const{closeSideModal:t}=Ms();t(Kne),this.activeForm=null,this.activeFormTitle=""},formSuccess(e){if(this.activeForm.method==="POST"){this.offset=0;const t=[...this.publication.authors];t.push(e),this.$emit("updated:contributors",t)}else{const t=this.publication.authors.map(n=>n.id===e.id?e:n);this.$emit("updated:contributors",t)}this.closeFormModal(),this.getAndUpdatePublication()},openPreviewModal(){this.isLoading=!0,this.getAndUpdatePublication(()=>{const{openSideModal:e}=Ms();e(dmt,{publication:this.publication})})},openAddModal(){let e=K1(this.form);e.action=this.contributorsApiUrl,e.method="POST",this.activeForm=e,this.activeFormTitle=this.t("grid.action.addContributor");const{openSideModal:t}=Ms();t(Kne,{title:this.activeFormTitle,activeForm:this.activeForm,onUpdateForm:this.updateForm,onFormSuccess:this.formSuccess})},openDeleteModal(e){const t=this.items.find(n=>n.id===e);this.openDialog({name:"delete",title:this.t("grid.action.deleteContributor"),message:this.t("grid.action.deleteContributor.confirmationMessage",{name:t.fullName}),actions:[{label:this.t("grid.action.deleteContributor"),isWarnable:!0,callback:n=>{this.isLoading=!0,$.ajax({url:this.contributorsApiUrl.replace("/contributors","/contributors/"+e),type:"POST",context:this,headers:{"X-Csrf-Token":pkp.currentUser.csrfToken,"X-Http-Method-Override":"DELETE"},error:this.ajaxErrorCallback,success(i){n(),this.setFocusIn(this.$el);const a=this.publication.authors.filter(l=>l.id!==e);this.$emit("updated:contributors",a),this.getAndUpdatePublication()},complete(i){this.isLoading=!1}})}},{label:this.t("common.cancel"),callback:n=>n()}],modalStyle:"negative"})},openEditModal(e){this.isLoading=!0;const t=this.contributorsApiUrl.replace("/contributors","/contributors/"+e);$.ajax({url:t,type:"GET",error:this.ajaxErrorCallback,context:this,success(n){let i=K1(this.form);i.action=t,i.method="PUT",i.fields=i.fields.map(l=>{var f,d;return l.name==="orcid"?(l.orcid=(f=n.orcid)!=null?f:"",l.authorId=n.id,l.orcidDisplayValue=n.orcidDisplayValue,l.isVerified=(d=n.orcidIsVerified)!=null?d:!1,l.orcidVerificationRequested=n.orcidVerificationRequested):l.name==="affiliations"?(l.authorId=n.id,l.value=n[l.name]):Object.keys(n).includes(l.name)&&(l.value=n[l.name]),l}),this.activeForm=i,this.activeFormTitle=this.t("grid.action.edit");const{openSideModal:a}=Ms();a(Kne,{title:this.activeFormTitle,activeForm:this.activeForm,onUpdateForm:this.updateForm,onFormSuccess:this.formSuccess})},complete(n){this.isLoading=!1}})},updateForm(e,t){if(!this.activeForm)return;let n=this.activeForm;Object.keys(t).forEach(function(i){n[i]=t[i]}),this.activeForm=n},toggleOrdering(){this.isOrdering?this.setItemOrderSequence():(this.itemsBeforeReordering=this.items,this.isOrdering=!this.isOrdering)},cancelOrdering(){this.$emit("updated:contributors",this.itemsBeforeReordering),this.itemsBeforeReordering=null,this.isOrdering=!1,this.getAndUpdatePublication()},setItemOrderSequence(){let e=0;for(const t of this.items)t.seq=e,e++;this.isLoading=!0,$.ajax({url:this.contributorsApiUrl.replace("/contributors","/contributors/saveOrder"),context:this,type:"POST",headers:{"X-Csrf-Token":pkp.currentUser.csrfToken,"X-Http-Method-Override":"PUT"},data:{sortedAuthors:this.items},success(t){this.$emit("updated:contributors",t),this.getAndUpdatePublication()},error:this.ajaxErrorCallback,complete(){this.isLoading=!1,this.isOrdering=!1}})},setPrimaryContact(e){let t=this;t.isLoading=!0,$.ajax({url:this.publicationApiUrl,type:"POST",headers:{"X-Csrf-Token":pkp.currentUser.csrfToken,"X-Http-Method-Override":"PUT"},data:{primaryContactId:e},success(n){t.$emit("updated:publication",n),t.setFocusIn(t.$el)},error:this.ajaxErrorCallback,complete(){t.isLoading=!1}})},contributorItemOrderDown(e){var t=this.items.findIndex(i=>e.id==i.id);if(t===this.items.length-1)return;let n=[...this.items];n.splice(t+1,0,n.splice(t,1)[0]),this.$emit("updated:contributors",n)},contributorItemOrderUp(e){var t=this.items.findIndex(i=>e.id==i.id);if(t===0)return;let n=[...this.items];n.splice(t-1,0,n.splice(t,1)[0]),this.$emit("updated:contributors",n)},getAndUpdatePublication(e=()=>{}){$.ajax({url:this.publicationApiUrl,context:this,type:"GET",success(t){this.$emit("updated:publication",t),e()},complete(){this.isLoading=!1,this.isOrdering=!1}})}}},pmt={class:"contributorsListPanel"},mmt={class:"whitespace-normal text-justify"},hmt={class:"whitespace-normal text-justify"};function gmt(e,t,n,i,a,l){const f=Xe("Spinner"),d=Xe("PkpButton"),h=Xe("PkpHeader"),b=Xe("Badge"),S=Xe("Orderer"),k=Xe("ListPanel");return L(),Q("div",pmt,[is(e.$slots,"default",{},()=>[pe(k,{items:n.items,class:Rn(["listPanel--contributor",a.isOrdering?"-isOrdering":""])},If({header:te(()=>[pe(h,null,{actions:te(()=>[n.canEditPublication?(L(),Ee(d,{key:0,icon:"Sort","is-active":a.isOrdering,disabled:a.isLoading,onClick:l.toggleOrdering},{default:te(()=>[D(ee(l.orderingLabel),1)]),_:1},8,["is-active","disabled","onClick"])):we("",!0),t[0]||(t[0]=D()),a.isOrdering?(L(),Ee(d,{key:1,"is-warnable":!0,disabled:a.isLoading,onClick:l.cancelOrdering},{default:te(()=>[D(ee(e.t("common.cancel")),1)]),_:1},8,["disabled","onClick"])):we("",!0),t[1]||(t[1]=D()),a.isOrdering?we("",!0):(L(),Ee(d,{key:2,disabled:a.isLoading,onClick:l.openPreviewModal},{default:te(()=>[D(ee(e.t("contributor.listPanel.preview")),1)]),_:1},8,["disabled","onClick"])),t[2]||(t[2]=D()),!a.isOrdering&&n.canEditPublication?(L(),Ee(d,{key:3,disabled:a.isLoading,onClick:l.openAddModal},{default:te(()=>[D(ee(e.t("grid.action.addContributor")),1)]),_:1},8,["disabled","onClick"])):we("",!0)]),default:te(()=>[H("h2",null,ee(n.title),1),t[3]||(t[3]=D()),a.isLoading?(L(),Ee(f,{key:0})):we("",!0),t[4]||(t[4]=D())]),_:1})]),"item-title":te(({item:T})=>[H("div",mmt,[D(ee(T.fullName)+" ",1),T.userGroupName?(L(),Ee(b,{key:0},{default:te(()=>[D(ee(e.localize(T.userGroupName)),1)]),_:2},1024)):we("",!0)])]),"item-subtitle":te(({item:T})=>[H("div",hmt,ee(e.localize(T.affiliation)),1)]),_:2},[n.canEditPublication?{name:"item-actions",fn:te(({item:T})=>[a.isOrdering?(L(),Ee(S,{key:0,"item-id":T.id,"item-title":T.fullName,onUp:O=>l.contributorItemOrderUp(T),onDown:O=>l.contributorItemOrderDown(T)},null,8,["item-id","item-title","onUp","onDown"])):(L(),Q(bt,{key:1},[n.publication.primaryContactId==T.id?(L(),Ee(b,{key:0,"is-primary":!0},{default:te(()=>[D(ee(e.t("author.users.contributor.principalContact")),1)]),_:1})):(L(),Ee(d,{key:1,disabled:a.isLoading,onClick:O=>l.setPrimaryContact(T.id)},{default:te(()=>[D(ee(e.t("author.users.contributor.setPrincipalContact")),1)]),_:2},1032,["disabled","onClick"])),t[5]||(t[5]=D()),pe(d,{disabled:a.isLoading,onClick:O=>l.openEditModal(T.id)},{default:te(()=>[D(ee(e.t("common.edit")),1)]),_:2},1032,["disabled","onClick"]),t[6]||(t[6]=D()),pe(d,{disabled:a.isLoading,"is-warnable":!0,onClick:O=>l.openDeleteModal(T.id)},{default:te(()=>[D(ee(e.t("common.delete")),1)]),_:2},1032,["disabled","onClick"])],64))]),key:"0"}:void 0]),1032,["items","class"])])])}const PSe=wt(fmt,[["render",gmt]]),vmt={__name:"ContributorManager",props:{submission:{type:Object,required:!0},publication:{type:Object,required:!0},canEdit:{type:Boolean,required:!0}},setup(e){const n=umt(e);return(i,a)=>(L(),Ee(PSe,Cn({"data-cy":"contributor-manager"},se(n).contributorsListPanelProps,{class:"pkpWorkflow__contributors"}),null,16))}};function bmt(){function e({submission:i,submissionStageId:a}){const{t:l}=Jn(),f=[],{hasCurrentUserAtLeastOneAssignedRoleInStage:d}=Nh();return d(i,a,[pkp.const.ROLE_ID_MANAGER,pkp.const.ROLE_ID_SITE_ADMIN,pkp.const.ROLE_ID_SUB_EDITOR])&&f.push({component:"ParticipantManagerActionButton",props:{label:l("common.assign"),action:t9.PARTICIPANT_ASSIGN}}),f}function t({submission:i,submissionStageId:a,participant:l}){const{t:f}=Jn(),d=[],{hasCurrentUserAtLeastOneAssignedRoleInStage:h}=Nh(),b=h(i,a,[pkp.const.ROLE_ID_MANAGER,pkp.const.ROLE_ID_SITE_ADMIN,pkp.const.ROLE_ID_SUB_EDITOR]);return b&&d.push({label:f("common.edit"),name:t9.PARTICIPANT_EDIT,icon:"Edit"}),d.push({label:f("submission.stageParticipants.notify"),name:t9.PARTICIPANT_NOTIFY,icon:"Email"}),l.canLoginAs&&d.push({label:f("grid.action.logInAs"),name:t9.PARTICIPANT_LOGIN_AS,icon:"LoginAs"}),b&&d.push({label:f("common.remove"),name:t9.PARTICIPANT_REMOVE,icon:"Cancel",isWarnable:!0}),d}function n({participant:i}){const a=[];return a.push({component:"ParticipantManagerItemInfoName",props:{}}),a.push({component:"ParticipantManagerItemInfoRole",props:{}}),i.recommendOnly&&a.push({component:"ParticipantManagerItemInfoRecommendOnly",props:{}}),a}return{getTopItems:e,getItemActions:t,getItemInfoItems:n}}const MSe=Nf("participantManager",e=>{const t=C5(),n=kt(e.submission.id),i=Ge(()=>"submissions/".concat(encodeURIComponent(n.value),"/participants/").concat(e.submissionStageId)),{apiUrl:a}=to(i),{data:l,fetch:f}=fr(a);io(i,()=>{l.value=null,f()}),f();const{triggerDataChange:d}=Pb(()=>f());function h(){d()}const b=Ge(()=>{if(!l.value)return[];const ge=[];return l.value.forEach(de=>{de.stageAssignments.forEach(he=>{ge.push({id:de.id,fullName:de.fullName,stageAssignmentId:he.stageAssignmentId,roleName:he.stageAssignmentUserGroup.name,roleId:he.stageAssignmentUserGroup.roleId,userGroupId:he.stageAssignmentUserGroup.id,recommendOnly:he.recommendOnly,displayInitials:de.displayInitials,canLoginAs:de.canLoginAs,_participantFull:de})})}),ge.sort((de,he)=>de.roleId!==he.roleId?de.roleId-he.roleId:de.userGroupId-he.userGroupId),ge}),{isUserLoggedInAs:S,getCurrentUserFullName:k}=Nh(),T=k(),O=t.addFns(bmt()),P=Ge(()=>O.getTopItems({submission:e.submission,submissionStageId:e.submissionStageId}));function B({participant:ge}){return O.getItemActions({submission:e.submission,submissionStageId:e.submissionStageId,participant:ge})}function W({participant:ge}){return O.getItemInfoItems({submission:e.submission,submissionStageId:e.submissionStageId,participant:ge})}const Z=V5e();function Y(ge){return{submissionStageId:e.submissionStageId,submission:e.submission,...ge}}function z(){Z.participantAssign(Y({}),h)}function q({participant:ge}){Z.participantRemove(Y({participant:ge}),h)}function ne({participant:ge}){Z.participantNotify(Y({participant:ge}),h)}function ue({participant:ge}){Z.participantEdit(Y({participant:ge}),h)}function J({participant:ge}){Z.participantLoginAs(Y({participant:ge}),h)}function ce(){Z.participantLogoutAs()}return{participantsList:b,currentUserFullName:T,isUserLoggedInAs:S(),topItems:P,getItemActions:B,getItemInfoItems:W,participantAssign:z,participantRemove:q,participantNotify:ne,participantEdit:ue,participantLoginAs:J,participantLogoutAs:ce,extender:t,props:e}}),ymt={__name:"ParticipantManagerActionButton",props:{isPrimary:{type:Boolean,required:!1,default:!1},isSecondary:{type:Boolean,required:!1,default:!1},isWarnable:{type:Boolean,required:!1,default:!1},action:{type:String,required:!0},actionArgs:{type:Object,required:!1,default:()=>{}},isLink:{type:Boolean,default:!1},label:{type:String,required:!0}},setup(e){const t=MSe();return(n,i)=>(L(),Ee(ms,{"is-primary":e.isPrimary,"is-secondary":e.isSecondary,"is-warnable":e.isWarnable,"is-link":e.isLink,onClick:i[0]||(i[0]=()=>se(t)[e.action](e.actionArgs))},{default:te(()=>[D(ee(e.label),1)]),_:1},8,["is-primary","is-secondary","is-warnable","is-link"]))}},_mt={class:"break-words text-base-bold"},Smt={__name:"ParticipantManagerItemInfoName",props:{participant:{type:Object,required:!0}},setup(e){return(t,n)=>(L(),Q("div",_mt,ee(e.participant.fullName),1))}},Cmt={class:"text-sm-normal text-secondary"},wmt={__name:"ParticipantManagerItemInfoRole",props:{participant:{type:Object,required:!0}},setup(e){return(t,n)=>(L(),Q("div",Cmt,ee(e.participant.roleName),1))}},Emt={class:"mt-0.5 text-xs-normal text-heading"},kmt={__name:"ParticipantManagerItemInfoRecommendOnly",props:{participant:{type:Object,required:!0}},setup(e){return(t,n)=>(L(),Q("div",Emt,ee(t.t("participantManager.onlyAllowedToRecommend")),1))}},xmt={class:"border border-light","data-cy":"participant-manager"},Tmt={class:"flex items-center justify-between bg-default p-5"},Imt={class:"text-2xl-bold uppercase text-heading"},Amt={class:"flex gap-x-2"},Omt={key:0,class:"flex flex-col",role:"list"},Rmt={key:0,class:"border-t border-light p-4 text-base-normal even:bg-tertiary"},Dmt={class:"flex items-center justify-between"},Lmt={class:"flex w-full min-w-0 flex-1"},Pmt={class:"ms-2 flex min-w-0 flex-1 flex-col justify-center"},Mmt={class:"ms-2"},Nmt={__name:"ParticipantManager",props:{submission:{type:Object,required:!0},submissionStageId:{type:Number,required:!0}},setup(e){const t=e,n={ParticipantManagerActionButton:ymt,ParticipantManagerItemInfoName:Smt,ParticipantManagerItemInfoRole:wmt,ParticipantManagerItemInfoRecommendOnly:kmt},i=MSe(t),{t:a}=Jn();return(l,f)=>{var d;return L(),Q("div",xmt,[H("div",Tmt,[H("h3",Imt,ee(se(a)("editor.submission.stageParticipants")),1),f[1]||(f[1]=D()),H("div",Amt,[(L(!0),Q(bt,null,Sn(se(i).topItems,(h,b)=>(L(),Ee(Io(n[h.component]||h.component),Cn({ref_for:!0},h.props||{},{key:b}),null,16))),128))])]),f[5]||(f[5]=D()),(d=se(i).participantsList)!=null&&d.length?(L(),Q("ul",Omt,[se(i).isUserLoggedInAs?(L(),Q("li",Rmt,[pe(ms,{"is-link":!0,"is-warnable":!0,onClick:f[0]||(f[0]=h=>se(i).participantLogoutAs())},{default:te(()=>[D(ee(se(a)("user.logOutAs",{username:se(i).currentUserFullName})),1)]),_:1})])):we("",!0),f[4]||(f[4]=D()),(L(!0),Q(bt,null,Sn(se(i).participantsList,h=>(L(),Q("li",{key:h.id,class:"border-t border-light p-4 text-base-normal even:bg-tertiary"},[H("div",Dmt,[H("div",Lmt,[H("div",null,[pe(Une,{"user-id":h.id,initials:h.displayInitials},null,8,["user-id","initials"])]),f[2]||(f[2]=D()),H("div",Pmt,[(L(!0),Q(bt,null,Sn(se(i).getItemInfoItems({participant:h}),(b,S)=>(L(),Ee(Io(n[b.component]||b.component),Cn({ref_for:!0},b.props||{},{key:S,participant:h}),null,16,["participant"]))),128))])]),f[3]||(f[3]=D()),H("div",Mmt,[pe(z1,{actions:se(i).getItemActions({participant:h}),label:"".concat(h.fullName," ").concat(se(a)("common.moreActions")),"button-variant":"ellipsis",onAction:b=>se(i)[b]({participant:h})},null,8,["actions","label","onAction"])])])]))),128))])):we("",!0)])}}},Fmt={REVIEWER_SUGGESTION_APPROVE:"reviewerSuggestionApprove"};function $mt(){const{t:e}=Jn();function t({submissionStageId:i,submission:a,reviewRoundId:l,reviewerSuggestion:f},d){const{openLegacyModal:h}=Ar({component:"grid.users.reviewer.ReviewerGridHandler",op:"showReviewerForm",params:{submissionId:a.id,stageId:i,reviewRoundId:l,selectionType:f.existingUserId?f.existingReviewerRole?pkp.const.REVIEWER_SELECT_ADVANCED_SEARCH:pkp.const.REVIEWER_SELECT_ENROLL_EXISTING:pkp.const.REVIEWER_SELECT_CREATE,reviewerSuggestionId:f.id}});h({title:e("editor.submission.addReviewer")},d)}function n(){const{t:i}=Jn(),a=[];return a.push({label:i("editor.submission.addReviewer"),name:Fmt.REVIEWER_SUGGESTION_APPROVE,icon:"Add"}),a}return{getItemActions:n,reviewerSuggestionApprove:t}}const Bmt=Nf("reviewerSuggestionManager",e=>{const{localize:t}=Jn(),n=kt(e.submission.id),i=Ge(()=>e.reviewRoundId?"submissions/".concat(encodeURIComponent(n.value),"/reviewers/suggestions?approved=false"):"submissions/".concat(encodeURIComponent(n.value),"/reviewers/suggestions")),{apiUrl:a}=to(i),{data:l,fetch:f}=fr(a);io(i,()=>{l.value=null,f()}),f();const{triggerDataChange:d}=Pb(()=>f());function h(){d()}const b=Ge(()=>{if(!l.value)return[];const B=[];return l.value.items.filter(W=>e.reviewRoundId?!W.reviewerId:!0).forEach(W=>{B.push({id:W.id,fullName:t(W.fullName),displayInitial:t(W.displayInitial),affiliation:t(W.affiliation),suggestionReason:t(W.suggestionReason),existingReviewerRole:W.existingReviewerRole,existingUserId:W.existingUserId})}),B}),S=$mt(),k=Ge(()=>S.getItemActions({}));function T(){return e.reviewRoundId&&e.submissionStageId===pkp.const.WORKFLOW_STAGE_ID_EXTERNAL_REVIEW&&e.submissionStageId===e.submission.stageId}function O(B){return{submissionStageId:e.submissionStageId,submission:e.submission,reviewRoundId:e.reviewRoundId,...B}}function P({reviewerSuggestion:B}){S.reviewerSuggestionApprove(O({reviewerSuggestion:B}),h)}return{reviewerSuggestionsList:b,_actionFns:S,itemActions:k,reviewerSuggestionApprove:P,atActiveReviewStage:T}}),Vmt={key:0,class:"border border-light","data-cy":"reviewer-suggestion-manager"},Hmt={class:"flex items-center justify-between bg-default p-5"},Umt={class:"text-2xl-bold uppercase text-heading"},zmt={class:"flex flex-col",role:"list"},Wmt={class:"flex items-center justify-between"},jmt={class:"flex"},Zmt={class:"ms-2 flex flex-col justify-center"},qmt={class:"text-base-bold"},Gmt={class:"text-sm-normal text-secondary"},Kmt={class:"text-sm-normal text-secondary"},Ymt={key:0},Xmt={__name:"ReviewerSuggestionManager",props:{submission:{type:Object,required:!0},submissionStageId:{type:Number,required:!0},reviewRoundId:{type:Number,required:!1,default:null}},setup(e){const n=Bmt(e),{t:i}=Jn();return(a,l)=>{const f=Hr("strip-unsafe-html");return se(n).reviewerSuggestionsList.length>0?(L(),Q("div",Vmt,[H("div",Hmt,[H("h3",Umt,ee(se(i)("editor.submission.reviewerSuggestions")),1)]),l[4]||(l[4]=D()),H("ul",zmt,[(L(!0),Q(bt,null,Sn(se(n).reviewerSuggestionsList,d=>(L(),Q("li",{key:d.id,class:"border-t border-light p-4 text-base-normal even:bg-tertiary"},[H("div",Wmt,[H("div",jmt,[H("div",null,[pe(Une,{"user-id":d.id,initials:d.displayInitial},null,8,["user-id","initials"])]),l[2]||(l[2]=D()),H("div",Zmt,[H("div",qmt,ee(d.fullName),1),l[0]||(l[0]=D()),H("div",Gmt,ee(d.affiliation),1),l[1]||(l[1]=D()),Gn(H("div",Kmt,null,512),[[f,d.suggestionReason]])])]),l[3]||(l[3]=D()),se(n).atActiveReviewStage()?(L(),Q("div",Ymt,[pe(z1,{actions:se(n).itemActions,label:"".concat(d.fullName," ").concat(se(i)("common.moreActions")),"button-variant":"ellipsis",onAction:h=>se(n)[h]({reviewerSuggestion:d,stageAssignment:a.stageAssignment})},null,8,["actions","label","onAction"])])):we("",!0)])]))),128))])])):we("",!0)}}},Zc={GALLEY_LIST:"galleyList",GALLEY_ADD:"galleyAdd",GALLEY_EDIT:"galleyEdit",GALLEY_CHANGE_FILE:"galleyChangeFile",GALLEY_DELETE:"galleyDelete",GALLEY_SORT:"galleySort"};function Jmt({galleyGridComponent:e}){const{t}=Jn();function n({submission:f,publication:d},h){const{openLegacyModal:b}=Ar({component:e,op:"addGalley",params:{submissionId:f.id,publicationId:d.id}});b({title:t("submission.layout.newGalley")},S=>{S.dataChanged[0]?i({submission:f,galley:{id:S.dataChanged[0]}},h):h()})}function i({galley:f,submission:d},h){const{openLegacyModal:b}=Ar({component:"wizard.fileUpload.FileUploadWizardHandler",op:"startWizard",params:{fileStage:pkp.const.SUBMISSION_FILE_PROOF,assocType:pkp.const.ASSOC_TYPE_REPRESENTATION,assocId:f.id,submissionId:d.id,stageId:pkp.const.WORKFLOW_STAGE_ID_PRODUCTION,uploaderRoles:pkp.const.ROLE_ID_REVIEWER}});b({title:t("submission.upload.proof")},h)}function a({submission:f,publication:d,galley:h},b){const{openLegacyModal:S}=Ar({component:e,op:"editGalley",params:{submissionId:f.id,publicationId:d.id,representationId:h.id}});S({title:t("submission.upload.proof")},b)}function l({submission:f,publication:d,galley:h},b){const{openDialog:S,openDialogNetworkError:k}=Ms();S({actions:[{label:t("common.ok"),isWarnable:!0,callback:async T=>{const{url:O}=Ar({component:e,op:"deleteGalley",params:{submissionId:f.id,publicationId:d.id,representationId:h.id}}),P=new FormData;P.append("csrfToken",Pv());const{fetch:B,data:W}=fr(O,{method:"POST",body:P});await B(),T(),b(),W.value.status!==!0&&k()}},{label:t("common.cancel"),callback:T=>{T(),b()}}],title:t("common.delete"),message:t("common.confirmDelete"),modalStyle:"negative"})}return{galleyChangeFile:i,galleyAdd:n,galleyEdit:a,galleyDelete:l}}const NSe={permissions:[{roles:[pkp.const.ROLE_ID_AUTHOR],actions:[Zc.GALLEY_LIST]},{roles:[pkp.const.ROLE_ID_SUB_EDITOR,pkp.const.ROLE_ID_MANAGER,pkp.const.ROLE_ID_SITE_ADMIN,pkp.const.ROLE_ID_ASSISTANT],actions:[Zc.GALLEY_LIST,Zc.GALLEY_ADD,Zc.GALLEY_CHANGE_FILE,Zc.GALLEY_DELETE,Zc.GALLEY_EDIT,Zc.GALLEY_SORT]}],actions:[Zc.GALLEY_LIST,Zc.GALLEY_ADD,Zc.GALLEY_CHANGE_FILE,Zc.GALLEY_DELETE,Zc.GALLEY_EDIT,Zc.GALLEY_SORT]};function Qmt(){const{t:e}=Jn(),{hasCurrentUserAtLeastOneAssignedRoleInStage:t}=Nh(),{isOPS:n}=LV();function i(){return n()?"grid.preprintGalleys.PreprintGalleyGridHandler":"grid.articleGalleys.ArticleGalleyGridHandler"}function a(){const b=[];return b.push({header:e("common.name"),component:"GalleyManagerCellName",props:{}}),b.push({header:e("common.language"),component:"GalleyManagerCellLanguage",props:{}}),b.push({header:e("common.moreActions"),headerSrOnly:!0,component:"GalleyManagerCellActions",props:{}}),b}function l({submission:b,publication:S}){return{permittedActions:NSe.actions.filter(T=>!0).filter(T=>NSe.permissions.some(O=>O.actions.includes(T)&&t(b.value,pkp.const.WORKFLOW_STAGE_ID_PRODUCTION,O.roles)))}}function f({config:b}){const S=[];return b.permittedActions.includes(Zc.GALLEY_ADD)&&S.push({component:"GalleyManagerActionButton",props:{label:e("grid.action.addGalley"),action:Zc.GALLEY_ADD},isLink:!0}),S}function d({config:b,galleys:S}){const k=[];return b.permittedActions.includes(Zc.GALLEY_SORT)&&S.value.length&&k.push({component:"GalleyManagerSortButton"}),k}function h({config:b,publication:S}){const k=[];if(b.permittedActions.includes(Zc.GALLEY_EDIT)){const T=S.status===pkp.const.STATUS_PUBLISHED?e("common.view"):e("common.edit"),O=S.status===pkp.const.STATUS_PUBLISHED?"View":"Edit";k.push({label:T,name:Zc.GALLEY_EDIT,icon:O})}return b.permittedActions.includes(Zc.GALLEY_CHANGE_FILE)&&k.push({label:e("submission.changeFile"),name:Zc.GALLEY_CHANGE_FILE,icon:"New"}),b.permittedActions.includes(Zc.GALLEY_DELETE)&&k.push({label:e("common.delete"),name:Zc.GALLEY_DELETE,icon:"Cancel",isWarnable:!0}),k}return{getColumns:a,getItemActions:h,getBottomItems:f,getTopItems:d,getGalleyGridComponent:i,getManagerConfig:l}}const yR=Nf("galleyManager",e=>{const t=C5(),{submission:n,publication:i}=q3(e),a=Ge(()=>{var ge;return T.value?k.value:((ge=e==null?void 0:e.publication)==null?void 0:ge.galleys)||[]}),l=t.addFns(Qmt()),f=Ge(()=>l.getColumns()),d=Ge(()=>l.getManagerConfig({submission:n,publication:i}));function h({galley:ge}){return l.getItemActions({galley:ge,...Y()})}const b=Ge(()=>l.getBottomItems(Y())),S=Ge(()=>l.getTopItems(Y())),k=kt([]),T=kt(!1);function O(){k.value=[...e.publication.galleys],T.value=!0}async function P(){const{openDialogNetworkError:ge}=Ms(),{url:de}=Ar({component:"grid.articleGalleys.ArticleGalleyGridHandler",op:"saveSequence",params:{submissionId:e.submission.id,publicationId:e.publication.id}}),he=k.value.map(Ye=>Ye.id),ie=new FormData;ie.append("csrfToken",Pv()),ie.append("data",he);const Be={csrfToken:Pv(),data:JSON.stringify(he)},$e=new URLSearchParams(Be),{fetch:Ue,data:V}=fr(de,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:$e});await Ue(),V.value.status!==!0&&ge(),await z(),T.value=!1}function B(ge){const de=k.value.findIndex(Be=>Be.id===ge);if(de===k.value.length-1)return;const he=[...k.value],ie=he[de];he[de]=he[de+1],he[de+1]=ie,k.value=he}function W(ge){const de=k.value.findIndex(ie=>ie.id===ge);if(de===0)return;const he=k.value[de];k.value[de]=k.value[de-1],k.value[de-1]=he}const Z=Jmt({galleyGridComponent:l.getGalleyGridComponent()});function Y(){return{config:d.value,galleys:a,publication:i.value}}const{triggerDataChange:z}=Pb();function q(){z()}function ne(){Z.galleyAdd({publication:e.publication,submission:e.submission},q)}function ue({galley:ge}){Z.galleyChangeFile({galley:ge,submission:e.submission},q)}function J({galley:ge}){Z.galleyEdit({galley:ge,publication:e.publication,submission:e.submission},q)}function ce({galley:ge}){Z.galleyDelete({galley:ge,publication:e.publication,submission:e.submission},q)}return{submission:e.submission,publication:e.publication,galleys:a,columns:f,getItemActions:h,topItems:S,bottomItems:b,sortingEnabled:T,startSorting:O,saveSorting:P,sortMoveDown:B,sortMoveUp:W,galleyAdd:ne,galleyEdit:J,galleyChangeFile:ue,galleyDelete:ce,extender:t,props:e}}),eht={__name:"GalleyManagerActionButton",props:{isPrimary:{type:Boolean,required:!1,default:!1},isSecondary:{type:Boolean,required:!1,default:!1},isWarnable:{type:Boolean,required:!1,default:!1},action:{type:String,required:!0},actionArgs:{type:Object,required:!1,default:()=>{}},isLink:{type:Boolean,default:!1},label:{type:String,required:!0}},setup(e){const t=yR();return(n,i)=>(L(),Ee(ms,{"is-primary":e.isPrimary,"is-secondary":e.isSecondary,"is-warnable":e.isWarnable,"is-link":e.isLink,onClick:i[0]||(i[0]=()=>se(t)[e.action](e.actionArgs))},{default:te(()=>[D(ee(e.label),1)]),_:1},8,["is-primary","is-secondary","is-warnable","is-link"]))}},tht={class:"flex items-center"},nht={class:"ms-2 text-base-normal"},sht=["href"],oht={__name:"GalleyManagerCellName",props:{galley:{type:Object,required:!0}},setup(e){const t=e,n=Ge(()=>{var i,a,l,f;return pkp.documentTypeIcons&&pkp.documentTypeIcons[(a=(i=t.galley)==null?void 0:i.file)==null?void 0:a.documentType]?pkp.documentTypeIcons[(f=(l=t.galley)==null?void 0:l.file)==null?void 0:f.documentType]:"DocumentDefault"});return(i,a)=>(L(),Ee(as,null,{default:te(()=>{var l,f;return[H("div",tht,[pe(Vs,{icon:n.value,class:"h-6 w-6 flex-none text-heading"},null,8,["icon"]),a[0]||(a[0]=D()),H("span",nht,[(f=(l=e.galley)==null?void 0:l.file)!=null&&f.url?(L(),Q("a",{key:0,class:"hover:underline",target:"_blank",href:e.galley.file.url},ee(e.galley.label),9,sht)):(L(),Q(bt,{key:1},[D(ee(e.galley.label),1)],64))])])]}),_:1}))}},rht={class:"text-base-normal"},iht={__name:"GalleyManagerCellLanguage",props:{galley:{type:Object,required:!0}},setup(e){const t=e,n=yR(),i=Ge(()=>n.submission.metadataLocales[t.galley.locale]);return(a,l)=>(L(),Ee(as,null,{default:te(()=>[H("span",rht,ee(i.value),1)]),_:1}))}},aht={class:"flex items-center justify-center"},lht={__name:"TableRowSortControls",emits:["up","down"],setup(e,{emit:t}){const n=t;return(i,a)=>(L(),Q("div",aht,[H("button",{class:"inline-flex items-center justify-center rounded text-primary hover:bg-primary hover:text-on-dark",onClick:a[0]||(a[0]=l=>n("up"))},[pe(Vs,{class:"h-6 w-6",icon:"ChevronUp"})]),a[2]||(a[2]=D()),H("button",{class:"inline-flex items-center justify-center rounded text-primary hover:bg-primary hover:text-on-dark",onClick:a[1]||(a[1]=l=>n("down"))},[pe(Vs,{class:"h-6 w-6",icon:"ChevronDown"})])]))}},cht={__name:"GalleyManagerCellActions",props:{galley:{type:Object,required:!0}},setup(e){const t=e,n=yR(),i=Ge(()=>n.getItemActions({galley:t.galley}));return(a,l)=>(L(),Ee(as,{class:"w-28"},{default:te(()=>[se(n).sortingEnabled?(L(),Ee(lht,{key:0,onUp:l[0]||(l[0]=f=>se(n).sortMoveUp(e.galley.id)),onDown:l[1]||(l[1]=f=>se(n).sortMoveDown(e.galley.id))})):we("",!0),l[3]||(l[3]=D()),!se(n).sortingEnabled&&i.value.length?(L(),Ee(z1,{key:1,label:a.t("common.moreActions"),"button-variant":"ellipsis",actions:i.value,onAction:l[2]||(l[2]=f=>se(n)[f]({galley:e.galley}))},null,8,["label","actions"])):we("",!0)]),_:1}))}},uht={__name:"GalleyManagerSortButton",setup(e){const{t}=Jn(),n=yR(),i=Ge(()=>n.sortingEnabled?t("grid.action.saveOrdering"):t("grid.action.order"));function a(){n.sortingEnabled?n.saveSorting():n.startSorting()}return(l,f)=>(L(),Ee(ms,{onClick:a},{default:te(()=>[D(ee(i.value),1)]),_:1}))}},dht={class:"flex gap-x-2"},fht={class:"flex gap-x-2"},pht={__name:"GalleyManager",props:{publication:{type:Object,required:!0},submission:{type:Object,required:!0}},setup(e){const t={GalleyManagerCellName:oht,GalleyManagerCellLanguage:iht,GalleyManagerCellActions:cht,GalleyManagerSortButton:uht,GalleyManagerActionButton:eht},n=e,{t:i}=Jn(),a=yR(n);return(l,f)=>(L(),Ee(du,{"data-cy":"galley-manager"},If({label:te(()=>[D(ee(se(i)("submission.layout.galleys")),1)]),"top-controls":te(()=>[H("div",dht,[(L(!0),Q(bt,null,Sn(se(a).topItems,(d,h)=>(L(),Ee(Io(t[d.component]||d.component),Cn({ref_for:!0},d.props||{},{key:h}),null,16))),128))])]),default:te(()=>[f[0]||(f[0]=D()),f[1]||(f[1]=D()),pe(Ad,null,{default:te(()=>[(L(!0),Q(bt,null,Sn(se(a).columns,(d,h)=>(L(),Ee(Ei,{key:h},{default:te(()=>[H("span",{class:Rn(d.headerSrOnly?"sr-only":"")},ee(d.header),3)]),_:2},1024))),128))]),_:1}),f[2]||(f[2]=D()),pe(Kd,null,{default:te(()=>[(L(!0),Q(bt,null,Sn(se(a).galleys,d=>(L(),Ee(Bi,{key:d.id},{default:te(()=>[(L(!0),Q(bt,null,Sn(se(a).columns,(h,b)=>(L(),Ee(Io(t[h.component]||h.component),{key:b,galley:d},null,8,["galley"]))),128))]),_:2},1024))),128))]),_:1}),f[3]||(f[3]=D())]),_:2},[se(a).bottomItems.length?{name:"bottom-controls",fn:te(()=>[H("div",fht,[(L(!0),Q(bt,null,Sn(se(a).bottomItems,(d,h)=>(L(),Ee(Io(t[d.component]||d.component),Cn({ref_for:!0},d.props||{},{key:h}),null,16))),128))])]),key:"0"}:void 0]),1024))}},mht={__name:"WorkflowActionButton",props:{isPrimary:{type:Boolean,required:!1,default:!1},isSecondary:{type:Boolean,required:!1,default:!1},isWarnable:{type:Boolean,required:!1,default:!1},action:{type:String,required:!0},actionArgs:{type:[Object,String,Number],required:!1,default:()=>{}},label:{type:String,required:!0}},setup(e){const t=CC();return(n,i)=>(L(),Ee(ms,{"is-primary":e.isPrimary,"is-secondary":e.isSecondary,"is-warnable":e.isWarnable,onClick:i[0]||(i[0]=()=>se(t)[e.action](e.actionArgs))},{default:te(()=>[D(ee(e.label),1)]),_:1},8,["is-primary","is-secondary","is-warnable"]))}},hht={key:0,class:"w-full border border-light"},ght={class:"p-4"},vht={class:"uppercase text-heading"},bht={key:0,class:"flex flex-col border-t border-light p-4"},yht={class:"text-lg-normal text-default"},_ht={key:0,class:"-ms-4 mt-2"},Sht={key:1,class:"p-4"},Cht={class:"text-lg-normal text-default"},wht={key:1,class:"flex flex-col gap-y-2"},Eht={__name:"WorkflowRecommendOnlyControls",props:{submission:{type:Object,required:!0},reviewRoundId:{type:Number,required:!0},stageId:{type:Number,required:!0},userId:{type:Number,required:!0}},setup(e){const{t}=Jn(),n=e,i=kt(!1),a=Ge(()=>{var O;return(O=n.submission)==null?void 0:O.editorAssigned}),l=Ge(()=>a.value?!!(i.value||!S.value):!1);function f(){i.value=!0}function d(){const O=[];return n.stageId===pkp.const.WORKFLOW_STAGE_ID_EXTERNAL_REVIEW?(O.push({label:t("editor.submission.recommend.revisions"),action:pu.DECISION_RECOMMEND_REVISION}),O.push({label:t("editor.submission.recommend.accept"),action:pu.DECISION_RECOMMEND_ACCEPT}),O.push({label:t("editor.submission.recommend.decline"),action:pu.DECISION_RECOMMEND_DECLINE})):n.stageId===pkp.const.WORKFLOW_STAGE_ID_INTERNAL_REVIEW&&(O.push({label:t("editor.submission.recommend.revisions"),action:pu.DECISION_RECOMMEND_PENDING_REVISIONS_INTERNAL}),O.push({label:t("editor.submission.recommend.accept"),action:pu.DECISION_RECOMMEND_ACCEPT_INTERNAL}),O.push({label:t("editor.submission.recommend.decline"),action:pu.DECISION_RECOMMEND_DECLINE_INTERNAL}),O.push({label:t("editor.submission.recommend.sendExternalReview"),action:pu.DECISION_RECOMMEND_EXTERNAL_REVIEW})),O}const h=Ge(()=>d()),{getStageById:b}=Va(),S=Ge(()=>{const O=b(n.submission,n.stageId);return O!=null&&O.currentUserRecommendation?O.currentUserRecommendation.label:null}),k=CC();function T(O){k[O]({reviewRoundId:n.reviewRoundId,stageId:n.stageId})}return(O,P)=>(L(),Q(bt,null,[!a.value||!O.isLoading&&S.value?(L(),Q("div",hht,[H("div",ght,[H("h2",vht,ee(se(t)("editor.submission.recommendation")),1)]),P[1]||(P[1]=D()),a.value?(L(),Q("div",bht,[H("p",yht,ee(S.value),1),P[0]||(P[0]=D()),l.value?we("",!0):(L(),Q("span",_ht,[pe(ms,{class:"","is-link":"",onClick:f},{default:te(()=>[D(ee(se(t)("editor.submission.workflowDecision.changeDecision")),1)]),_:1})]))])):(L(),Q("div",Sht,[H("p",Cht,ee(se(t)("editor.submission.recommendation.noDecidingEditors")),1)]))])):we("",!0),P[2]||(P[2]=D()),l.value?(L(),Q("div",wht,[(L(!0),Q(bt,null,Sn(h.value,B=>(L(),Ee(ms,{key:B.action,"is-secondary":!0,onClick:()=>T(B.action)},{default:te(()=>[D(ee(B.label),1)]),_:2},1032,["onClick"]))),128))])):we("",!0)],64))}},kht={key:0,class:"w-full border border-light"},xht={class:"p-4"},Tht={class:"uppercase text-heading"},Iht={class:"flex flex-col border-t border-light p-4"},Aht={class:"text-lg-normal text-default"},Oht={__name:"WorkflowRecommendOnlyListingRecommendations",props:{submission:{type:Object,required:!0},reviewRoundId:{type:Number,required:!0},stageId:{type:Number,required:!0}},setup(e){const{t}=Jn(),n=e,{getStageById:i}=Va(),a=Ge(()=>{var f;const l=i(n.submission,n.stageId);return(f=l==null?void 0:l.recommendations)!=null&&f.length?l.recommendations.map(d=>d.label).join(t("common.commaListSeparator")):""});return(l,f)=>a.value?(L(),Q("div",kht,[H("div",xht,[H("h2",Tht,ee(se(t)("editor.submission.recommendation")),1)]),f[0]||(f[0]=D()),H("div",Iht,[H("p",Aht,ee(a.value),1)])])):we("",!0)}},Rht={key:0,class:"flex flex-row space-y-3"},Dht={class:"text-lg-bold text-heading"},Lht={class:"pt-2 text-base-normal"},Pht={__name:"WorkflowNotificationDisplay",props:{submission:{type:Object,required:!0},selectedStageId:{type:Number,required:!0}},setup(e){const t=e,{pageUrl:n}=to("notification/fetchNotification"),{isOJS:i,isOMP:a}=LV();function l(k){switch(k){case pkp.const.WORKFLOW_STAGE_ID_EDITING:return{[pkp.const.NOTIFICATION_LEVEL_NORMAL]:{[pkp.const.NOTIFICATION_TYPE_ASSIGN_COPYEDITOR]:{assocType:pkp.const.ASSOC_TYPE_SUBMISSION,assocId:t.submission.id},[pkp.const.NOTIFICATION_TYPE_AWAITING_COPYEDITS]:{assocType:pkp.const.ASSOC_TYPE_SUBMISSION,assocId:t.submission.id}},[pkp.const.NOTIFICATION_LEVEL_TRIVIAL]:0};case pkp.const.WORKFLOW_STAGE_ID_PRODUCTION:return i()?{[pkp.const.NOTIFICATION_LEVEL_NORMAL]:{[pkp.const.NOTIFICATION_TYPE_ASSIGN_PRODUCTIONUSER]:{assocType:pkp.const.ASSOC_TYPE_SUBMISSION,assocId:t.submission.id},[pkp.const.NOTIFICATION_TYPE_AWAITING_REPRESENTATIONS]:{assocType:pkp.const.ASSOC_TYPE_SUBMISSION,assocId:t.submission.id}},[pkp.const.NOTIFICATION_LEVEL_TRIVIAL]:0}:a()?{[pkp.const.NOTIFICATION_LEVEL_NORMAL]:{[pkp.const.NOTIFICATION_TYPE_VISIT_CATALOG]:{assocType:pkp.const.ASSOC_TYPE_SUBMISSION,assocId:t.submission.id},[pkp.const.NOTIFICATION_TYPE_FORMAT_NEEDS_APPROVED_SUBMISSION]:{assocType:pkp.const.ASSOC_TYPE_SUBMISSION,assocId:t.submission.id}},[pkp.const.NOTIFICATION_LEVEL_TRIVIAL]:0}:null;default:return null}}function f(k,T=new FormData,O=""){for(const P in k)if(Object.prototype.hasOwnProperty.call(k,P)){const B=k[P],W=O?"".concat(O,"[").concat(P,"]"):P;typeof B=="object"&&B!==null?f(B,T,W):T.append(W,B)}return T}const d=Ge(()=>{const k=l(t.selectedStageId);return k?f({requestOptions:k}):null}),{data:h,fetch:b}=fr(n,{method:"POST",body:d});io(d,k=>{h.value=null,k&&b()},{immediate:!0}),Pb(()=>b());const S=Ge(()=>{var O,P;const k=[],T=(P=(O=h==null?void 0:h.value)==null?void 0:O.content)==null?void 0:P.general;return T?(Object.values(T).forEach(B=>{Object.values(B).forEach(W=>{k.push(W)})}),k):[]});return(k,T)=>{var O;return(O=S.value)!=null&&O.length?(L(),Q("div",Rht,[(L(!0),Q(bt,null,Sn(S.value,(P,B)=>(L(),Q("div",{key:B,class:"w-full border border-light p-3"},[H("h3",Dht,ee(P.title),1),T[0]||(T[0]=D()),H("p",Lht,ee(P.text),1)]))),128))])):we("",!0)}}},Mht={key:0,class:"border border-light"},Nht={class:"lg-bold m-3 text-heading"},Fht={class:"flex-1 truncate"},$ht=["onClick"],Bht={class:"ms-4 shrink-0 text-base-normal text-secondary"},Vht={__name:"WorkflowListingEmails",props:{submission:{type:Object,required:!0},selectedStageId:{type:Number,required:!0}},setup(e){const t=e,{t:n}=Jn(),{formatShortDateTime:i}=Ed(),{apiUrl:a}=to("emails/authorEmails"),l=Ge(()=>t.selectedStageId===pkp.const.WORKFLOW_STAGE_ID_EXTERNAL_REVIEW?{submissionId:t.submission.id,eventType:pkp.const.EMAIL_LOG_EVENT_TYPE_EDITOR_NOTIFY_AUTHOR}:null),{data:f,fetch:d}=fr(a,{query:{submissionId:t.submission.id,eventType:pkp.const.EMAIL_LOG_EVENT_TYPE_EDITOR_NOTIFY_AUTHOR}});io(l,b=>{b&&d()},{immediate:!0});function h(b){const{openSideModal:S}=Ms(),{pageUrl:k}=to("authorDashboard/readSubmissionEmail?submissionId=".concat(t.submission.id,"&submissionEmailId=").concat(b));S("LegacyAjax",{legacyOptions:{title:n("notification.notifications"),url:k}})}return(b,S)=>{var k;return(k=se(f))!=null&&k.length?(L(),Q("div",Mht,[H("h3",Nht,ee(se(n)("notification.notifications")),1),S[1]||(S[1]=D()),H("ul",null,[(L(!0),Q(bt,null,Sn(se(f),T=>(L(),Q("li",{key:T.id,class:"flex items-center border-t border-light px-3 py-1"},[H("span",Fht,[H("a",{class:"text cursor-pointer text-base-normal hover:underline",onClick:wl(O=>h(T.id),["prevent"])},ee(T.subject),9,$ht)]),S[0]||(S[0]=D()),H("span",Bht,ee(se(i)(T.dateSent)),1)]))),128))])])):we("",!0)}}},Hht={__name:"WorkflowPaymentDropdown",props:{submission:{type:Object,required:!0}},setup(e){const{t}=Jn(),n=e,i=Ge(()=>"submissions/".concat(n.submission.id,"/publications/").concat(n.submission.publications[0].id,"/_components/submissionPayment")),{apiUrl:a}=to(i),{data:l,fetch:f}=fr(a);return io(a,(d,h)=>{d!==h&&f()},{immediate:!0}),(d,h)=>(L(),Ee(Ww,{class:"pkpWorkflow__submissionPayments","has-dropdown-icon":"",label:se(t)("common.payments")},{default:te(()=>[se(l)?(L(),Ee(oa,Cn({key:0},se(l),{onSet:d.set}),null,16,["onSet"])):we("",!0)]),_:1},8,["label"]))}},Uht={key:0,class:"text-lg-normal"},zht={key:1,class:"-m-5"},Wht={__name:"WorkflowPublicationForm",props:{canEdit:{type:Boolean,required:!0},formName:{type:String,required:!0},noFieldsMessage:{type:String,required:!1,default:null},submission:{type:Object,required:!0},publication:{type:Object,required:!0}},setup(e){const t=e,n=Ge(()=>"submissions/".concat(t.submission.id,"/publications/").concat(t.publication.id,"/_components/").concat(t.formName)),{apiUrl:i}=to(n),{data:a,fetch:l}=fr(i);io(n,()=>{l()},{immediate:!0}),io(a,T=>{T.canSubmit=t.canEdit});const f=Ge(()=>!!(a.value&&a.value.fields.length===0)),d={metadata:k},{triggerDataChange:h}=Pb(d[t.formName]),{set:b,form:S}=B1(a);async function k(){await l()}return(T,O)=>f.value?(L(),Q("div",Uht,ee(e.noFieldsMessage),1)):(L(),Q("div",zht,[se(S)?(L(),Ee(oa,Cn({key:0},se(S),{onSet:se(b),onSuccess:se(h)}),null,16,["onSet","onSuccess"])):we("",!0)]))}};function FSe(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),i=/[\p{L}0-9._:-]+/u,a={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},l={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},f=e.inherit(l,{begin:/\(/,end:/\)/}),d=e.inherit(e.APOS_STRING_MODE,{className:"string"}),h=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),b={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:i,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[a]},{begin:/'/,end:/'/,contains:[a]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[l,h,d,f,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[l,f,h,d]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},a,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[h]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[b],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[b],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:b}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}var Yne,$Se;function jht(){if($Se)return Yne;$Se=1;function e(lt){return lt instanceof Map?lt.clear=lt.delete=lt.set=function(){throw new Error("map is read-only")}:lt instanceof Set&&(lt.add=lt.clear=lt.delete=function(){throw new Error("set is read-only")}),Object.freeze(lt),Object.getOwnPropertyNames(lt).forEach(yt=>{const _n=lt[yt],us=typeof _n;(us==="object"||us==="function")&&!Object.isFrozen(_n)&&e(_n)}),lt}class t{constructor(yt){yt.data===void 0&&(yt.data={}),this.data=yt.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(lt){return lt.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function i(lt,...yt){const _n=Object.create(null);for(const us in lt)_n[us]=lt[us];return yt.forEach(function(us){for(const Zo in us)_n[Zo]=us[Zo]}),_n}const a="</span>",l=lt=>!!lt.scope,f=(lt,{prefix:yt})=>{if(lt.startsWith("language:"))return lt.replace("language:","language-");if(lt.includes(".")){const _n=lt.split(".");return["".concat(yt).concat(_n.shift()),..._n.map((us,Zo)=>"".concat(us).concat("_".repeat(Zo+1)))].join(" ")}return"".concat(yt).concat(lt)};class d{constructor(yt,_n){this.buffer="",this.classPrefix=_n.classPrefix,yt.walk(this)}addText(yt){this.buffer+=n(yt)}openNode(yt){if(!l(yt))return;const _n=f(yt.scope,{prefix:this.classPrefix});this.span(_n)}closeNode(yt){l(yt)&&(this.buffer+=a)}value(){return this.buffer}span(yt){this.buffer+='<span class="'.concat(yt,'">')}}const h=(lt={})=>{const yt={children:[]};return Object.assign(yt,lt),yt};class b{constructor(){this.rootNode=h(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(yt){this.top.children.push(yt)}openNode(yt){const _n=h({scope:yt});this.add(_n),this.stack.push(_n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(yt){return this.constructor._walk(yt,this.rootNode)}static _walk(yt,_n){return typeof _n=="string"?yt.addText(_n):_n.children&&(yt.openNode(_n),_n.children.forEach(us=>this._walk(yt,us)),yt.closeNode(_n)),yt}static _collapse(yt){typeof yt!="string"&&yt.children&&(yt.children.every(_n=>typeof _n=="string")?yt.children=[yt.children.join("")]:yt.children.forEach(_n=>{b._collapse(_n)}))}}class S extends b{constructor(yt){super(),this.options=yt}addText(yt){yt!==""&&this.add(yt)}startScope(yt){this.openNode(yt)}endScope(){this.closeNode()}__addSublanguage(yt,_n){const us=yt.root;_n&&(us.scope="language:".concat(_n)),this.add(us)}toHTML(){return new d(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function k(lt){return lt?typeof lt=="string"?lt:lt.source:null}function T(lt){return B("(?=",lt,")")}function O(lt){return B("(?:",lt,")*")}function P(lt){return B("(?:",lt,")?")}function B(...lt){return lt.map(_n=>k(_n)).join("")}function W(lt){const yt=lt[lt.length-1];return typeof yt=="object"&&yt.constructor===Object?(lt.splice(lt.length-1,1),yt):{}}function Z(...lt){return"("+(W(lt).capture?"":"?:")+lt.map(us=>k(us)).join("|")+")"}function Y(lt){return new RegExp(lt.toString()+"|").exec("").length-1}function z(lt,yt){const _n=lt&<.exec(yt);return _n&&_n.index===0}const q=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function ne(lt,{joinWith:yt}){let _n=0;return lt.map(us=>{_n+=1;const Zo=_n;let br=k(us),Vn="";for(;br.length>0;){const Kt=q.exec(br);if(!Kt){Vn+=br;break}Vn+=br.substring(0,Kt.index),br=br.substring(Kt.index+Kt[0].length),Kt[0][0]==="\\"&&Kt[1]?Vn+="\\"+String(Number(Kt[1])+Zo):(Vn+=Kt[0],Kt[0]==="("&&_n++)}return Vn}).map(us=>"(".concat(us,")")).join(yt)}const ue=/\b\B/,J="[a-zA-Z]\\w*",ce="[a-zA-Z_]\\w*",ge="\\b\\d+(\\.\\d+)?",de="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",he="\\b(0b[01]+)",ie="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Be=(lt={})=>{const yt=/^#![ ]*\//;return lt.binary&&(lt.begin=B(yt,/.*\b/,lt.binary,/\b.*/)),i({scope:"meta",begin:yt,end:/$/,relevance:0,"on:begin":(_n,us)=>{_n.index!==0&&us.ignoreMatch()}},lt)},$e={begin:"\\\\[\\s\\S]",relevance:0},Ue={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[$e]},V={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[$e]},Ye={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Fe=function(lt,yt,_n={}){const us=i({scope:"comment",begin:lt,end:yt,contains:[]},_n);us.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const Zo=Z("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return us.contains.push({begin:B(/[ ]+/,"(",Zo,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),us},St=Fe("//","$"),Dt=Fe("/\\*","\\*/"),He=Fe("#","$"),ft={scope:"number",begin:ge,relevance:0},ht={scope:"number",begin:de,relevance:0},At={scope:"number",begin:he,relevance:0},hn={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[$e,{begin:/\[/,end:/\]/,relevance:0,contains:[$e]}]},ct={scope:"title",begin:J,relevance:0},Ht={scope:"title",begin:ce,relevance:0},ye={begin:"\\.\\s*"+ce,relevance:0};var jn=Object.freeze({__proto__:null,APOS_STRING_MODE:Ue,BACKSLASH_ESCAPE:$e,BINARY_NUMBER_MODE:At,BINARY_NUMBER_RE:he,COMMENT:Fe,C_BLOCK_COMMENT_MODE:Dt,C_LINE_COMMENT_MODE:St,C_NUMBER_MODE:ht,C_NUMBER_RE:de,END_SAME_AS_BEGIN:function(lt){return Object.assign(lt,{"on:begin":(yt,_n)=>{_n.data._beginMatch=yt[1]},"on:end":(yt,_n)=>{_n.data._beginMatch!==yt[1]&&_n.ignoreMatch()}})},HASH_COMMENT_MODE:He,IDENT_RE:J,MATCH_NOTHING_RE:ue,METHOD_GUARD:ye,NUMBER_MODE:ft,NUMBER_RE:ge,PHRASAL_WORDS_MODE:Ye,QUOTE_STRING_MODE:V,REGEXP_MODE:hn,RE_STARTERS_RE:ie,SHEBANG:Be,TITLE_MODE:ct,UNDERSCORE_IDENT_RE:ce,UNDERSCORE_TITLE_MODE:Ht});function so(lt,yt){lt.input[lt.index-1]==="."&&yt.ignoreMatch()}function Xs(lt,yt){lt.className!==void 0&&(lt.scope=lt.className,delete lt.className)}function ot(lt,yt){yt&<.beginKeywords&&(lt.begin="\\b("+lt.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",lt.__beforeBegin=so,lt.keywords=lt.keywords||lt.beginKeywords,delete lt.beginKeywords,lt.relevance===void 0&&(lt.relevance=0))}function Qe(lt,yt){Array.isArray(lt.illegal)&&(lt.illegal=Z(...lt.illegal))}function Ot(lt,yt){if(lt.match){if(lt.begin||lt.end)throw new Error("begin & end are not supported with match");lt.begin=lt.match,delete lt.match}}function Nt(lt,yt){lt.relevance===void 0&&(lt.relevance=1)}const Ve=(lt,yt)=>{if(!lt.beforeMatch)return;if(lt.starts)throw new Error("beforeMatch cannot be used with starts");const _n=Object.assign({},lt);Object.keys(lt).forEach(us=>{delete lt[us]}),lt.keywords=_n.keywords,lt.begin=B(_n.beforeMatch,T(_n.begin)),lt.starts={relevance:0,contains:[Object.assign(_n,{endsParent:!0})]},lt.relevance=0,delete _n.beforeMatch},dn=["of","and","for","in","not","or","if","then","parent","list","value"],kn="keyword";function Bt(lt,yt,_n=kn){const us=Object.create(null);return typeof lt=="string"?Zo(_n,lt.split(" ")):Array.isArray(lt)?Zo(_n,lt):Object.keys(lt).forEach(function(br){Object.assign(us,Bt(lt[br],yt,br))}),us;function Zo(br,Vn){yt&&(Vn=Vn.map(Kt=>Kt.toLowerCase())),Vn.forEach(function(Kt){const Ps=Kt.split("|");us[Ps[0]]=[br,Le(Ps[0],Ps[1])]})}}function Le(lt,yt){return yt?Number(yt):je(lt)?0:1}function je(lt){return dn.includes(lt.toLowerCase())}const Ze={},pt=lt=>{console.error(lt)},Vt=(lt,...yt)=>{console.log("WARN: ".concat(lt),...yt)},sn=(lt,yt)=>{Ze["".concat(lt,"/").concat(yt)]||(console.log("Deprecated as of ".concat(lt,". ").concat(yt)),Ze["".concat(lt,"/").concat(yt)]=!0)},Wn=new Error;function ts(lt,yt,{key:_n}){let us=0;const Zo=lt[_n],br={},Vn={};for(let Kt=1;Kt<=yt.length;Kt++)Vn[Kt+us]=Zo[Kt],br[Kt+us]=!0,us+=Y(yt[Kt-1]);lt[_n]=Vn,lt[_n]._emit=br,lt[_n]._multi=!0}function Zn(lt){if(Array.isArray(lt.begin)){if(lt.skip||lt.excludeBegin||lt.returnBegin)throw pt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Wn;if(typeof lt.beginScope!="object"||lt.beginScope===null)throw pt("beginScope must be object"),Wn;ts(lt,lt.begin,{key:"beginScope"}),lt.begin=ne(lt.begin,{joinWith:""})}}function yo(lt){if(Array.isArray(lt.end)){if(lt.skip||lt.excludeEnd||lt.returnEnd)throw pt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Wn;if(typeof lt.endScope!="object"||lt.endScope===null)throw pt("endScope must be object"),Wn;ts(lt,lt.end,{key:"endScope"}),lt.end=ne(lt.end,{joinWith:""})}}function Qs(lt){lt.scope&&typeof lt.scope=="object"&<.scope!==null&&(lt.beginScope=lt.scope,delete lt.scope)}function Rs(lt){Qs(lt),typeof lt.beginScope=="string"&&(lt.beginScope={_wrap:lt.beginScope}),typeof lt.endScope=="string"&&(lt.endScope={_wrap:lt.endScope}),Zn(lt),yo(lt)}function xr(lt){function yt(Vn,Kt){return new RegExp(k(Vn),"m"+(lt.case_insensitive?"i":"")+(lt.unicodeRegex?"u":"")+(Kt?"g":""))}class _n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(Kt,Ps){Ps.position=this.position++,this.matchIndexes[this.matchAt]=Ps,this.regexes.push([Ps,Kt]),this.matchAt+=Y(Kt)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const Kt=this.regexes.map(Ps=>Ps[1]);this.matcherRe=yt(ne(Kt,{joinWith:"|"}),!0),this.lastIndex=0}exec(Kt){this.matcherRe.lastIndex=this.lastIndex;const Ps=this.matcherRe.exec(Kt);if(!Ps)return null;const Bo=Ps.findIndex((uc,Hi)=>Hi>0&&uc!==void 0),Nr=this.matchIndexes[Bo];return Ps.splice(0,Bo),Object.assign(Ps,Nr)}}class us{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(Kt){if(this.multiRegexes[Kt])return this.multiRegexes[Kt];const Ps=new _n;return this.rules.slice(Kt).forEach(([Bo,Nr])=>Ps.addRule(Bo,Nr)),Ps.compile(),this.multiRegexes[Kt]=Ps,Ps}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(Kt,Ps){this.rules.push([Kt,Ps]),Ps.type==="begin"&&this.count++}exec(Kt){const Ps=this.getMatcher(this.regexIndex);Ps.lastIndex=this.lastIndex;let Bo=Ps.exec(Kt);if(this.resumingScanAtSamePosition()&&!(Bo&&Bo.index===this.lastIndex)){const Nr=this.getMatcher(0);Nr.lastIndex=this.lastIndex+1,Bo=Nr.exec(Kt)}return Bo&&(this.regexIndex+=Bo.position+1,this.regexIndex===this.count&&this.considerAll()),Bo}}function Zo(Vn){const Kt=new us;return Vn.contains.forEach(Ps=>Kt.addRule(Ps.begin,{rule:Ps,type:"begin"})),Vn.terminatorEnd&&Kt.addRule(Vn.terminatorEnd,{type:"end"}),Vn.illegal&&Kt.addRule(Vn.illegal,{type:"illegal"}),Kt}function br(Vn,Kt){const Ps=Vn;if(Vn.isCompiled)return Ps;[Xs,Ot,Rs,Ve].forEach(Nr=>Nr(Vn,Kt)),lt.compilerExtensions.forEach(Nr=>Nr(Vn,Kt)),Vn.__beforeBegin=null,[ot,Qe,Nt].forEach(Nr=>Nr(Vn,Kt)),Vn.isCompiled=!0;let Bo=null;return typeof Vn.keywords=="object"&&Vn.keywords.$pattern&&(Vn.keywords=Object.assign({},Vn.keywords),Bo=Vn.keywords.$pattern,delete Vn.keywords.$pattern),Bo=Bo||/\w+/,Vn.keywords&&(Vn.keywords=Bt(Vn.keywords,lt.case_insensitive)),Ps.keywordPatternRe=yt(Bo,!0),Kt&&(Vn.begin||(Vn.begin=/\B|\b/),Ps.beginRe=yt(Ps.begin),!Vn.end&&!Vn.endsWithParent&&(Vn.end=/\B|\b/),Vn.end&&(Ps.endRe=yt(Ps.end)),Ps.terminatorEnd=k(Ps.end)||"",Vn.endsWithParent&&Kt.terminatorEnd&&(Ps.terminatorEnd+=(Vn.end?"|":"")+Kt.terminatorEnd)),Vn.illegal&&(Ps.illegalRe=yt(Vn.illegal)),Vn.contains||(Vn.contains=[]),Vn.contains=[].concat(...Vn.contains.map(function(Nr){return jo(Nr==="self"?Vn:Nr)})),Vn.contains.forEach(function(Nr){br(Nr,Ps)}),Vn.starts&&br(Vn.starts,Kt),Ps.matcher=Zo(Ps),Ps}if(lt.compilerExtensions||(lt.compilerExtensions=[]),lt.contains&<.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return lt.classNameAliases=i(lt.classNameAliases||{}),br(lt)}function Po(lt){return lt?lt.endsWithParent||Po(lt.starts):!1}function jo(lt){return lt.variants&&!lt.cachedVariants&&(lt.cachedVariants=lt.variants.map(function(yt){return i(lt,{variants:null},yt)})),lt.cachedVariants?lt.cachedVariants:Po(lt)?i(lt,{starts:lt.starts?i(lt.starts):null}):Object.isFrozen(lt)?i(lt):lt}var Mo="11.11.1";class Do extends Error{constructor(yt,_n){super(yt),this.name="HTMLInjectionError",this.html=_n}}const er=n,Zs=i,Xa=Symbol("nomatch"),bn=7,qs=function(lt){const yt=Object.create(null),_n=Object.create(null),us=[];let Zo=!0;const br="Could not find the language '{}', did you forget to load/include a language module?",Vn={disableAutodetect:!0,name:"Plain text",contains:[]};let Kt={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:S};function Ps(Qn){return Kt.noHighlightRe.test(Qn)}function Bo(Qn){let js=Qn.className+" ";js+=Qn.parentNode?Qn.parentNode.className:"";const Ao=Kt.languageDetectRe.exec(js);if(Ao){const Tr=Cs(Ao[1]);return Tr||(Vt(br.replace("{}",Ao[1])),Vt("Falling back to no-highlight mode for this block.",Qn)),Tr?Ao[1]:"no-highlight"}return js.split(/\s+/).find(Tr=>Ps(Tr)||Cs(Tr))}function Nr(Qn,js,Ao){let Tr="",Go="";typeof js=="object"?(Tr=Qn,Ao=js.ignoreIllegals,Go=js.language):(sn("10.7.0","highlight(lang, code, ...args) has been deprecated."),sn("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),Go=Qn,Tr=js),Ao===void 0&&(Ao=!0);const hr={code:Tr,language:Go};ll("before:highlight",hr);const Ai=hr.result?hr.result:uc(hr.language,hr.code,Ao);return Ai.code=hr.code,ll("after:highlight",Ai),Ai}function uc(Qn,js,Ao,Tr){const Go=Object.create(null);function hr(bs,Hs){return bs.keywords[Hs]}function Ai(){if(!uo.keywords){zi.addText(lr);return}let bs=0;uo.keywordPatternRe.lastIndex=0;let Hs=uo.keywordPatternRe.exec(lr),No="";for(;Hs;){No+=lr.substring(bs,Hs.index);const So=ya.case_insensitive?Hs[0].toLowerCase():Hs[0],Si=hr(uo,So);if(Si){const[Ja,ad]=Si;if(zi.addText(No),No="",Go[So]=(Go[So]||0)+1,Go[So]<=bn&&(pc+=ad),Ja.startsWith("_"))No+=Hs[0];else{const Wf=ya.classNameAliases[Ja]||Ja;xl(Hs[0],Wf)}}else No+=Hs[0];bs=uo.keywordPatternRe.lastIndex,Hs=uo.keywordPatternRe.exec(lr)}No+=lr.substring(bs),zi.addText(No)}function fc(){if(lr==="")return;let bs=null;if(typeof uo.subLanguage=="string"){if(!yt[uo.subLanguage]){zi.addText(lr);return}bs=uc(uo.subLanguage,lr,!0,Fr[uo.subLanguage]),Fr[uo.subLanguage]=bs._top}else bs=ir(lr,uo.subLanguage.length?uo.subLanguage:null);uo.relevance>0&&(pc+=bs.relevance),zi.__addSublanguage(bs._emitter,bs.language)}function tr(){uo.subLanguage!=null?fc():Ai(),lr=""}function xl(bs,Hs){bs!==""&&(zi.startScope(Hs),zi.addText(bs),zi.endScope())}function cl(bs,Hs){let No=1;const So=Hs.length-1;for(;No<=So;){if(!bs._emit[No]){No++;continue}const Si=ya.classNameAliases[bs[No]]||bs[No],Ja=Hs[No];Si?xl(Ja,Si):(lr=Ja,Ai(),lr=""),No++}}function gr(bs,Hs){return bs.scope&&typeof bs.scope=="string"&&zi.openNode(ya.classNameAliases[bs.scope]||bs.scope),bs.beginScope&&(bs.beginScope._wrap?(xl(lr,ya.classNameAliases[bs.beginScope._wrap]||bs.beginScope._wrap),lr=""):bs.beginScope._multi&&(cl(bs.beginScope,Hs),lr="")),uo=Object.create(bs,{parent:{value:uo}}),uo}function hi(bs,Hs,No){let So=z(bs.endRe,No);if(So){if(bs["on:end"]){const Si=new t(bs);bs["on:end"](Hs,Si),Si.isMatchIgnored&&(So=!1)}if(So){for(;bs.endsParent&&bs.parent;)bs=bs.parent;return bs}}if(bs.endsWithParent)return hi(bs.parent,Hs,No)}function ii(bs){return uo.matcher.regexIndex===0?(lr+=bs[0],1):(jl=!0,0)}function Mu(bs){const Hs=bs[0],No=bs.rule,So=new t(No),Si=[No.__beforeBegin,No["on:begin"]];for(const Ja of Si)if(Ja&&(Ja(bs,So),So.isMatchIgnored))return ii(Hs);return No.skip?lr+=Hs:(No.excludeBegin&&(lr+=Hs),tr(),!No.returnBegin&&!No.excludeBegin&&(lr=Hs)),gr(No,bs),No.returnBegin?0:Hs.length}function Ac(bs){const Hs=bs[0],No=js.substring(bs.index),So=hi(uo,bs,No);if(!So)return Xa;const Si=uo;uo.endScope&&uo.endScope._wrap?(tr(),xl(Hs,uo.endScope._wrap)):uo.endScope&&uo.endScope._multi?(tr(),cl(uo.endScope,bs)):Si.skip?lr+=Hs:(Si.returnEnd||Si.excludeEnd||(lr+=Hs),tr(),Si.excludeEnd&&(lr=Hs));do uo.scope&&zi.closeNode(),!uo.skip&&!uo.subLanguage&&(pc+=uo.relevance),uo=uo.parent;while(uo!==So.parent);return So.starts&&gr(So.starts,bs),Si.returnEnd?0:Hs.length}function ba(){const bs=[];for(let Hs=uo;Hs!==ya;Hs=Hs.parent)Hs.scope&&bs.unshift(Hs.scope);bs.forEach(Hs=>zi.openNode(Hs))}let ar={};function zf(bs,Hs){const No=Hs&&Hs[0];if(lr+=bs,No==null)return tr(),0;if(ar.type==="begin"&&Hs.type==="end"&&ar.index===Hs.index&&No===""){if(lr+=js.slice(Hs.index,Hs.index+1),!Zo){const So=new Error("0 width match regex (".concat(Qn,")"));throw So.languageName=Qn,So.badRule=ar.rule,So}return 1}if(ar=Hs,Hs.type==="begin")return Mu(Hs);if(Hs.type==="illegal"&&!Ao){const So=new Error('Illegal lexeme "'+No+'" for mode "'+(uo.scope||"<unnamed>")+'"');throw So.mode=uo,So}else if(Hs.type==="end"){const So=Ac(Hs);if(So!==Xa)return So}if(Hs.type==="illegal"&&No==="")return lr+="\n",1;if(mu>1e5&&mu>Hs.index*3)throw new Error("potential infinite loop, way more iterations than matches");return lr+=No,No.length}const ya=Cs(Qn);if(!ya)throw pt(br.replace("{}",Qn)),new Error('Unknown language: "'+Qn+'"');const Nu=xr(ya);let co="",uo=Tr||Nu;const Fr={},zi=new Kt.__emitter(Kt);ba();let lr="",pc=0,ai=0,mu=0,jl=!1;try{if(ya.__emitTokens)ya.__emitTokens(js,zi);else{for(uo.matcher.considerAll();;){mu++,jl?jl=!1:uo.matcher.considerAll(),uo.matcher.lastIndex=ai;const bs=uo.matcher.exec(js);if(!bs)break;const Hs=js.substring(ai,bs.index),No=zf(Hs,bs);ai=bs.index+No}zf(js.substring(ai))}return zi.finalize(),co=zi.toHTML(),{language:Qn,value:co,relevance:pc,illegal:!1,_emitter:zi,_top:uo}}catch(bs){if(bs.message&&bs.message.includes("Illegal"))return{language:Qn,value:er(js),illegal:!0,relevance:0,_illegalBy:{message:bs.message,index:ai,context:js.slice(ai-100,ai+100),mode:bs.mode,resultSoFar:co},_emitter:zi};if(Zo)return{language:Qn,value:er(js),illegal:!1,relevance:0,errorRaised:bs,_emitter:zi,_top:uo};throw bs}}function Hi(Qn){const js={value:er(Qn),illegal:!1,relevance:0,_top:Vn,_emitter:new Kt.__emitter(Kt)};return js._emitter.addText(Qn),js}function ir(Qn,js){js=js||Kt.languages||Object.keys(yt);const Ao=Hi(Qn),Tr=js.filter(Cs).filter(fn).map(tr=>uc(tr,Qn,!1));Tr.unshift(Ao);const Go=Tr.sort((tr,xl)=>{if(tr.relevance!==xl.relevance)return xl.relevance-tr.relevance;if(tr.language&&xl.language){if(Cs(tr.language).supersetOf===xl.language)return 1;if(Cs(xl.language).supersetOf===tr.language)return-1}return 0}),[hr,Ai]=Go,fc=hr;return fc.secondBest=Ai,fc}function Wr(Qn,js,Ao){const Tr=js&&_n[js]||Ao;Qn.classList.add("hljs"),Qn.classList.add("language-".concat(Tr))}function mi(Qn){let js=null;const Ao=Bo(Qn);if(Ps(Ao))return;if(ll("before:highlightElement",{el:Qn,language:Ao}),Qn.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",Qn);return}if(Qn.children.length>0&&(Kt.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(Qn)),Kt.throwUnescapedHTML))throw new Do("One of your code blocks includes unescaped HTML.",Qn.innerHTML);js=Qn;const Tr=js.textContent,Go=Ao?Nr(Tr,{language:Ao,ignoreIllegals:!0}):ir(Tr);Qn.innerHTML=Go.value,Qn.dataset.highlighted="yes",Wr(Qn,Ao,Go.language),Qn.result={language:Go.language,re:Go.relevance,relevance:Go.relevance},Go.secondBest&&(Qn.secondBest={language:Go.secondBest.language,relevance:Go.secondBest.relevance}),ll("after:highlightElement",{el:Qn,result:Go,text:Tr})}function dc(Qn){Kt=Zs(Kt,Qn)}const Ti=()=>{Ui(),sn("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function _i(){Ui(),sn("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let yr=!1;function Ui(){function Qn(){Ui()}if(document.readyState==="loading"){yr||window.addEventListener("DOMContentLoaded",Qn,!1),yr=!0;return}document.querySelectorAll(Kt.cssSelector).forEach(mi)}function Es(Qn,js){let Ao=null;try{Ao=js(lt)}catch(Tr){if(pt("Language definition for '{}' could not be registered.".replace("{}",Qn)),Zo)pt(Tr);else throw Tr;Ao=Vn}Ao.name||(Ao.name=Qn),yt[Qn]=Ao,Ao.rawDefinition=js.bind(null,lt),Ao.aliases&&_r(Ao.aliases,{languageName:Qn})}function _t(Qn){delete yt[Qn];for(const js of Object.keys(_n))_n[js]===Qn&&delete _n[js]}function Hn(){return Object.keys(yt)}function Cs(Qn){return Qn=(Qn||"").toLowerCase(),yt[Qn]||yt[_n[Qn]]}function _r(Qn,{languageName:js}){typeof Qn=="string"&&(Qn=[Qn]),Qn.forEach(Ao=>{_n[Ao.toLowerCase()]=js})}function fn(Qn){const js=Cs(Qn);return js&&!js.disableAutodetect}function Xt(Qn){Qn["before:highlightBlock"]&&!Qn["before:highlightElement"]&&(Qn["before:highlightElement"]=js=>{Qn["before:highlightBlock"](Object.assign({block:js.el},js))}),Qn["after:highlightBlock"]&&!Qn["after:highlightElement"]&&(Qn["after:highlightElement"]=js=>{Qn["after:highlightBlock"](Object.assign({block:js.el},js))})}function Ii(Qn){Xt(Qn),us.push(Qn)}function kl(Qn){const js=us.indexOf(Qn);js!==-1&&us.splice(js,1)}function ll(Qn,js){const Ao=Qn;us.forEach(function(Tr){Tr[Ao]&&Tr[Ao](js)})}function _o(Qn){return sn("10.7.0","highlightBlock will be removed entirely in v12.0"),sn("10.7.0","Please use highlightElement now."),mi(Qn)}Object.assign(lt,{highlight:Nr,highlightAuto:ir,highlightAll:Ui,highlightElement:mi,highlightBlock:_o,configure:dc,initHighlighting:Ti,initHighlightingOnLoad:_i,registerLanguage:Es,unregisterLanguage:_t,listLanguages:Hn,getLanguage:Cs,registerAliases:_r,autoDetection:fn,inherit:Zs,addPlugin:Ii,removePlugin:kl}),lt.debugMode=function(){Zo=!1},lt.safeMode=function(){Zo=!0},lt.versionString=Mo,lt.regex={concat:B,lookahead:T,either:Z,optional:P,anyNumberOfTimes:O};for(const Qn in jn)typeof jn[Qn]=="object"&&e(jn[Qn]);return Object.assign(lt,jn),lt},Qr=qs({});return Qr.newInstance=()=>qs({}),Yne=Qr,Qr.HighlightJS=Qr,Qr.default=Qr,Yne}var Zht=jht();const lU=Uw(Zht);var qht=Gr({props:{code:{type:String,required:!0},language:{type:String,default:""},autodetect:{type:Boolean,default:!0},ignoreIllegals:{type:Boolean,default:!0}},setup:function(e){var t=kt(e.language);io(function(){return e.language},function(a){t.value=a});var n=Ge(function(){return e.autodetect||!t.value}),i=Ge(function(){return!n.value&&!lU.getLanguage(t.value)});return{className:Ge(function(){return i.value?"":"hljs "+t.value}),highlightedCode:Ge(function(){var a;if(i.value)return console.warn('The language "'+t.value+'" you specified could not be found.'),e.code.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'");if(n.value){var l=lU.highlightAuto(e.code);return t.value=(a=l.language)!==null&&a!==void 0?a:"",l.value}return(l=lU.highlight(e.code,{language:t.value,ignoreIllegals:e.ignoreIllegals})).value})}},render:function(){return oi("pre",{},[oi("code",{class:this.className,innerHTML:this.highlightedCode,tabindex:"0"})])}}),Ght={component:qht};lU.registerLanguage("xml",FSe);const Kht=Object.keys({xml:FSe}),Yht={components:{PkpButton:ms,FileUploader:nU,PkpHeader:Bf,CodeHighlighter:{__name:"CodeHighlighter",props:{code:{type:String,required:!0},language:{type:String,required:!0,validator:e=>Kht.includes(e)?!0:(console.warn("Invalid language prop: ".concat(e)),!1)}},setup(e){const t=Ght.component;return(n,i)=>(L(),Ee(se(t),{language:e.language,code:e.code},null,8,["language","code"]))}}},mixins:[Od,wd],props:{canEdit:{type:Boolean,required:!0},submission:{type:Object,required:!0},publication:{type:Object,required:!0}},data(){return{isLoading:!1,isModalOpenedForm:!1,workingJatsProps:[],hasLoadedContent:!1,newJatsFiles:[],id:Oh()}},computed:{isDefaultContent(){return this.workingJatsProps.isDefaultContent},workingJatsContent(){return this.workingJatsProps.jatsContent},publicationApiUrl(){const{apiUrl:e}=to(this.publicationApiUrlRelative);return e.value},publicationApiUrlRelative(){return"submissions/".concat(this.submission.id,"/publications/").concat(this.publication.id,"/jats")},fileStage(){return pkp.const.SUBMISSION_FILE_JATS},downloadDefaultJatsFileName(){const e=new Date,t=e.getFullYear()+String(e.getMonth()+1).padStart(2,"0")+String(e.getDate()).padStart(2,"0")+"-"+String(e.getHours()).padStart(2,"0")+String(e.getMinutes()).padStart(2,"0")+String(e.getSeconds()).padStart(2,"0");return"jats-".concat(this.publication.id,"-").concat(t,".xml")}},watch:{newJatsFiles(e,t){t!=null&&t[0]==null&&(this.hasLoadedContent=!1),e!=null&&e[0]!=null&&Object.prototype.hasOwnProperty.call(e[0],"isDefaultContent")&&(this.workingJatsProps=e[0],this.hasLoadedContent=!0)},publication(e,t){e!=null&&this.fetchWorkingJatsFile()}},created(){this.fetchWorkingJatsFile()},methods:{fetchWorkingJatsFile(){this.hasLoadedContent=!1,$.ajax({url:this.publicationApiUrl,type:"GET",context:this,headers:{"X-Csrf-Token":pkp.currentUser.csrfToken},error:this.ajaxErrorCallback,success(e){this.workingJatsProps=e},complete(e){this.hasLoadedContent=!0}})},getConstant(e){return pkp.const[e]},openFileBrowser(){this.$refs.uploader.openFileBrowser()},openDeleteModal(){this.openDialog({name:"delete",title:this.t("publication.jats.confirmDeleteFileTitle"),message:this.t("publication.jats.confirmDeleteFileMessage"),actions:[{label:this.t("publication.jats.confirmDeleteFileButton"),isWarnable:!0,callback:e=>{this.isLoading=!0,this.hasLoadedContent=!1,$.ajax({url:this.publicationApiUrl,type:"DELETE",context:this,headers:{"X-Csrf-Token":pkp.currentUser.csrfToken,"X-Http-Method-Override":"DELETE"},error:this.ajaxErrorCallback,success(t){e(),this.setFocusIn(this.$el),this.workingJatsProps=t},complete(t){this.isLoading=!1,this.hasLoadedContent=!0}})}},{label:this.t("common.cancel"),callback:e=>e()}],modalStyle:"negative"})},setJatsFile(e){this.newJatsFiles=e},downloadJatsXML(){if(this.workingJatsProps.isDefaultContent){const e=this.workingJatsProps.jatsContent,t=new Blob([e],{type:"application/xml"}),n=URL.createObjectURL(t),i=document.createElement("a");i.href=n,i.setAttribute("download",this.downloadDefaultJatsFileName),i.style.display="none",document.body.appendChild(i),i.click(),URL.revokeObjectURL(n),document.body.removeChild(i)}else{const e=this.workingJatsProps.url,t=document.createElement("a");t.href=e,t.setAttribute("download",""),t.style.display="none",document.body.appendChild(t),t.click(),document.body.removeChild(t)}}}},Xht={class:"jatsPanel"},Jht={key:0,class:"filePanel__ready"},Qht={class:"filePanel__header"},e1t={key:0},t1t={key:1},n1t={class:"filePanel__items"},s1t={class:"filePanel__fileContent"},o1t={key:0},r1t={key:1},i1t={key:0},a1t={key:0,class:"filePanel__hasData"},l1t={class:"filePanel__defaultContentFooter"},c1t={key:1},u1t={class:"filePanel__fileContentFooter"},d1t={key:1,class:"filePanel__loading"};function f1t(e,t,n,i,a,l){const f=Xe("PkpButton"),d=Xe("PkpHeader"),h=Xe("CodeHighlighter"),b=Xe("FileUploader");return L(),Q("div",Xht,[is(e.$slots,"default",{},()=>[a.hasLoadedContent?(L(),Q("div",Jht,[H("div",Qht,[pe(d,null,{actions:te(()=>[l.isDefaultContent?(L(),Q("div",e1t,[n.publication.status!==l.getConstant("STATUS_PUBLISHED")&&n.canEdit?(L(),Ee(f,{key:0,ref:"uploadXMLButton",onClick:l.openFileBrowser},{default:te(()=>[D(ee(e.t("common.upload")),1)]),_:1},8,["onClick"])):we("",!0)])):(L(),Q("div",t1t,[n.publication.status!==l.getConstant("STATUS_PUBLISHED")&&n.canEdit?(L(),Ee(f,{key:0,disabled:a.isLoading,"is-warnable":!0,onClick:l.openDeleteModal},{default:te(()=>[D(ee(e.t("common.delete")),1)]),_:1},8,["disabled","onClick"])):we("",!0)])),t[0]||(t[0]=D()),a.workingJatsProps.loadingContentError==null?(L(),Ee(f,{key:2,ref:"downloadJatsXMLButton",onClick:l.downloadJatsXML},{default:te(()=>[D(ee(e.t("common.download")),1)]),_:1},8,["onClick"])):we("",!0)]),default:te(()=>[H("h2",null,ee(e.t("publication.jats")),1),t[1]||(t[1]=D())]),_:1})]),t[3]||(t[3]=D()),H("div",n1t,[H("div",s1t,[a.workingJatsProps.loadingContentError?(L(),Q("div",o1t,ee(a.workingJatsProps.loadingContentError),1)):(L(),Q("div",r1t,[pe(h,{code:l.workingJatsContent,language:"xml"},null,8,["code"])]))]),t[2]||(t[2]=D()),a.workingJatsProps.loadingContentError==null?(L(),Q("div",i1t,[l.isDefaultContent?(L(),Q("div",a1t,[H("div",l1t,[H("span",null,ee(e.t("publication.jats.autoCreatedMessage")),1)])])):(L(),Q("div",c1t,[H("div",u1t,[H("span",null,ee(e.t("publication.jats.lastModified",{modificationDate:a.workingJatsProps.updatedAt,username:a.workingJatsProps.uploaderUserName})),1)])]))])):we("",!0)])])):(L(),Q("div",d1t,t[4]||(t[4]=[H("span",{class:"pkpSpinner","aria-hidden":"true"},null,-1)]))),t[5]||(t[5]=D()),pe(b,{id:a.id+"-uploader",ref:"uploader","api-url":l.publicationApiUrl,files:a.newJatsFiles,"query-params":{fileStage:l.fileStage},"upload-progress-label":e.t("submission.upload.percentComplete"),"onUpdated:files":l.setJatsFile},null,8,["id","api-url","files","query-params","upload-progress-label","onUpdated:files"])])])}const p1t=wt(Yht,[["render",f1t]]),m1t={class:"flex items-center"},h1t={class:"text-lg-bold"},g1t={class:"ms-1 text-base-normal"},v1t={class:"ms-6 text-lg-bold"},b1t={class:"ms-2 text-base-normal"},y1t={class:"ms-2"},_1t={__name:"WorkflowPublicationVersionControl",props:{submission:{type:Object,required:!0},selectedPublicationId:{type:Number,required:!0}},setup(e){const t=e,{t:n}=Jn(),i=Ge(()=>t.submission.publications.find(b=>b.id===t.selectedPublicationId)),a=Ge(()=>{const b=i.value;return b.status===pkp.const.STATUS_QUEUED&&b.id===t.submission.currentPublicationId?{label:n("publication.status.unscheduled"),color:"bg-stage-declined"}:b.status===pkp.const.STATUS_SCHEDULED?{label:n("publication.status.scheduled"),color:"bg-stage-scheduled-for-publishing"}:b.status===pkp.const.STATUS_PUBLISHED?{label:n("publication.status.published"),color:"bg-stage-published"}:{label:n("publication.status.unpublished"),color:"bg-stage-declined"}});function l(b){const S=n("publication.version",{version:b.version});let k="";return b.status===pkp.const.STATUS_QUEUED&&t.submission.currentPublicationId===b.id?k=n("publication.status.unscheduled"):b.status===pkp.const.STATUS_SCHEDULED?k=n("publication.status.scheduled"):b.status===pkp.const.STATUS_PUBLISHED?k=b.datePublished:k=n("publication.status.unpublished"),"".concat(n("semicolon",{label:S})," ").concat(k)}const f=Ge(()=>{const b=t.submission.publications.map(S=>({label:l(S),name:S.id}));return{label:n("publication.version.all"),actions:b}}),d=CC();function h(b){d.selectPublicationId(b)}return(b,S)=>(L(),Q("div",m1t,[H("span",h1t,ee(se(n)("semicolon",{label:se(n)("common.status")})),1),S[0]||(S[0]=D()),H("span",{class:Rn(["ms-2 h-[1em] w-[1em] rounded-full",a.value.color]),"aria-hidden":"true"},null,2),S[1]||(S[1]=D()),H("span",g1t,ee(a.value.label),1),S[2]||(S[2]=D()),H("span",v1t,ee(se(n)("semicolon",{label:se(n)("admin.version")})),1),S[3]||(S[3]=D()),H("span",b1t,ee(i.value.version),1),S[4]||(S[4]=D()),H("span",y1t,[pe(z1,Cn(f.value,{onAction:h}),null,16)])]))}},S1t={class:"text-lg-normal"},C1t={class:"text-lg-bold text-heading"},w1t={__name:"WorkflowChangeSubmissionLanguage",props:{submission:{type:Object,required:!0},canChangeSubmissionLanguage:{type:Boolean,required:!0}},setup(e){const{t}=Jn(),n=e,i=Ge(()=>n.submission.metadataLocales[n.submission.locale]),a=CC();function l(){a.workflowChangeSubmissionLanguage()}return(f,d)=>(L(),Q("div",null,[H("span",S1t,ee(se(t)("submission.list.changeSubmissionLanguage.currentLanguage")),1),d[0]||(d[0]=D()),H("span",C1t,ee(i.value),1),d[1]||(d[1]=D()),e.canChangeSubmissionLanguage?(L(),Ee(ms,{key:0,"is-link":"",onClick:l},{default:te(()=>[D(ee(se(t)("submission.list.changeSubmissionLanguage.buttonLabel")),1)]),_:1})):we("",!0)]))}},E1t={class:"border border-light p-4"},k1t={key:0,class:"mb-2 text-lg-bold text-heading"},x1t={key:1,class:"text-sm-normal"},T1t={__name:"WorkflowPrimaryBasicMetadata",props:{heading:{type:String,required:!0},body:{type:String,required:!0}},setup(e){return(t,n)=>(L(),Q("div",E1t,[e.heading?(L(),Q("h3",k1t,ee(e.heading),1)):we("",!0),n[0]||(n[0]=D()),e.body?(L(),Q("p",x1t,ee(e.body),1)):we("",!0)]))}},I1t={key:0,class:"border border-light p-4"},A1t={key:0,class:"mb-2 text-lg-bold text-heading"},O1t={key:1,class:"mb-2 text-sm-normal"},R1t={key:2,class:"text-sm-normal"},D1t={__name:"WorkflowSubmissionStatus",props:{submission:{type:Object,required:!0},selectedStageId:{type:Number,required:!0},selectedReviewRoundId:{type:Number,required:!1,default:null},contextMinReviewsPerSubmission:{type:Number,required:!0}},setup(e){const t=e,{t:n,tk:i}=Jn(),{getActiveStage:a,hasNotSubmissionStartedStage:l,hasSubmissionPassedStage:f,getCurrentReviewRound:d,checkMinimumConsideredReviews:h}=Va(),b={[pkp.const.WORKFLOW_STAGE_ID_INTERNAL_REVIEW]:i("workflow.review.internalReview"),[pkp.const.WORKFLOW_STAGE_ID_EXTERNAL_REVIEW]:i("workflow.review.externalReview"),[pkp.const.WORKFLOW_STAGE_ID_EDITING]:i("submission.copyediting"),[pkp.const.WORKFLOW_STAGE_ID_PRODUCTION]:i("submission.production")},S=Ge(()=>{if(l(t.submission,t.selectedStageId))return{heading:n("common.status"),body:n("workflow.stageNotStarted",{stage:n(b[t.selectedStageId])})};if(f(t.submission,t.selectedStageId)){const k=a(t.submission);if(t.selectedStageId===pkp.const.WORKFLOW_STAGE_ID_EXTERNAL_REVIEW||t.selectedStageId===pkp.const.WORKFLOW_STAGE_ID_INTERNAL_REVIEW){const T=d(t.submission,t.selectedStageId);if(t.selectedReviewRoundId<T.id)return{heading:n("common.status"),body:n("workflow.submissionNextReviewRoundInFutureStage",{stage:n(b[k.id])})}}return{heading:n("common.status"),body:n("workflow.submissionInFutureStage",{stage:n(b[k.id])})}}else if(t.selectedStageId===pkp.const.WORKFLOW_STAGE_ID_EXTERNAL_REVIEW||t.selectedStageId===pkp.const.WORKFLOW_STAGE_ID_INTERNAL_REVIEW){const k=d(t.submission,t.selectedStageId);if(t.selectedReviewRoundId<k.id)return{heading:n("common.status"),body:n("workflow.submissionInNextReviewRound")};const{shouldMinimumReviewsBeConsidered:T,hasMinimumReviewsCount:O}=h(t.submission,t.selectedStageId,t.selectedReviewRoundId,t.contextMinReviewsPerSubmission);return T&&O&&[pkp.const.REVIEW_ROUND_STATUS_PENDING_REVIEWERS,pkp.const.REVIEW_ROUND_STATUS_PENDING_REVIEWS,pkp.const.REVIEW_ROUND_STATUS_REVIEWS_READY,pkp.const.REVIEW_ROUND_STATUS_REVIEWS_COMPLETED,pkp.const.REVIEW_ROUND_STATUS_REVIEWS_OVERDUE].includes(k.statusId)?{heading:n("notification.type.roundStatusTitle",{round:k.round}),body1:n("dashboard.minimumConfirmedReviewsRequired",{number:t.contextMinReviewsPerSubmission}),body:n("dashboard.minimumReviewsConfirmedDecisionNeeded")}:T&&[pkp.const.REVIEW_ROUND_STATUS_REVIEWS_COMPLETED].includes(k.statusId)?{heading:n("notification.type.roundStatusTitle",{round:k.round}),body1:n("dashboard.minimumConfirmedReviewsRequired",{number:t.contextMinReviewsPerSubmission})}:{heading:n("notification.type.roundStatusTitle",{round:k.round}),body1:T?n("dashboard.minimumConfirmedReviewsRequired",{number:t.contextMinReviewsPerSubmission}):null,body:k.status}}else if(t.selectedStageId===pkp.const.WORKFLOW_STAGE_ID_PRODUCTION&&t.submission.status===pkp.const.STATUS_PUBLISHED)return{heading:n("common.status"),body:n("editor.submission.workflowDecision.submission.published")};return null});return(k,T)=>S.value?(L(),Q("div",I1t,[S.value.heading?(L(),Q("h3",A1t,ee(S.value.heading),1)):we("",!0),T[0]||(T[0]=D()),S.value.body1?(L(),Q("p",O1t,ee(S.value.body1),1)):we("",!0),T[1]||(T[1]=D()),S.value.body?(L(),Q("p",R1t,ee(S.value.body),1)):we("",!0)])):we("",!0)}},L1t={class:"bg -mx-5 -mt-5 bg-attention p-5 text-center text-base-normal text-on-dark"},P1t={__name:"WorkflowPublicationEditWarning",setup(e){const{t}=Jn();return(n,i)=>(L(),Q("div",L1t,ee(se(t)("publication.editorEditWarning")),1))}},M1t={class:"bg -mx-5 -mt-5 bg-attention p-5 text-center text-base-normal text-on-dark"},N1t={__name:"WorkflowPublicationEditDisabled",setup(e){const{t}=Jn();return(n,i)=>(L(),Q("div",M1t,ee(se(t)("publication.editDisabled")),1))}},{hasSubmissionPassedStage:F1t,getOpenAndCompletedReviewAssignmentsForRound:$1t,hasNotSubmissionStartedStage:B1t}=Va(),{t:BSe}=Jn();function V1t({submission:e,selectedPublication:t,publicationSettings:n}){if(!e)return[];const{t:i}=Jn(),a=[];return a.push({component:"WorkflowActionButton",props:{label:i("editor.submissionLibrary"),action:$m.WORKFLOW_VIEW_LIBRARY}}),a}const H1t={common:{getPrimaryItems:({submission:e,permissions:t,selectedStageId:n,selectedReviewRound:i,contextMinReviewsPerSubmission:a})=>{if(!t.accessibleStages.includes(n))return{shouldContinue:!1,items:[{component:"WorkflowPrimaryBasicMetadata",props:{body:BSe("user.authorization.accessibleWorkflowStage")}}]};const l=[];l.push({component:"WorkflowChangeSubmissionLanguage",props:{submission:e,canChangeSubmissionLanguage:!1}});const f=!B1t(e,n);return l.push({component:"WorkflowSubmissionStatus",props:{submission:e,selectedStageId:n,selectedReviewRoundId:i==null?void 0:i.id,contextMinReviewsPerSubmission:a}}),{shouldContinue:f,items:l}},getSecondaryItems:({submission:e,selectedReviewRound:t,selectedStageId:n,permissions:i})=>{if(!i.accessibleStages.includes(n))return{shouldContinue:!1,items:[]}},getActionItems:({submission:e,selectedStageId:t,selectedReviewRound:n,permissions:i})=>{if(!i.accessibleStages.includes(t))return{shouldContinue:!1,items:[]}}},[pkp.const.WORKFLOW_STAGE_ID_SUBMISSION]:{getPrimaryItems:({submission:e,selectedStageId:t,selectedReviewRound:n})=>{const i=[];return F1t(e,pkp.const.WORKFLOW_STAGE_ID_SUBMISSION)&&i.push({component:"SubmissionStatus",props:{submission:e}}),i.push({component:"FileManager",props:{namespace:"SUBMISSION_FILES",submission:e,submissionStageId:t}}),i.push({component:"DiscussionManager",props:{submissionId:e.id,stageId:t}}),i}},[pkp.const.WORKFLOW_STAGE_ID_EXTERNAL_REVIEW]:{getPrimaryItems:({submission:e,selectedStageId:t,selectedReviewRound:n,pageInitConfig:i})=>{const a=[];return a.push({component:"WorkflowListingEmails",props:{submission:e,selectedStageId:t}}),$1t(e.reviewAssignments,n.id).length&&a.push({component:"ReviewerManager",props:{submission:e,submissionStageId:t,reviewRoundId:n==null?void 0:n.id,redactedForAuthors:!0,componentForms:i.componentForms}}),a.push({component:"FileManager",props:{namespace:"WORKFLOW_REVIEW_REVISIONS",submission:e,submissionStageId:t,reviewRoundId:n==null?void 0:n.id}}),a.push({component:"DiscussionManager",props:{submissionId:e.id,stageId:t}}),a},getActionItems:({submission:e,selectedReviewRound:t})=>{const n=[];return t&&[pkp.const.REVIEW_ROUND_STATUS_REVISIONS_REQUESTED,pkp.const.REVIEW_ROUND_STATUS_RESUBMIT_FOR_REVIEW,pkp.const.REVIEW_ROUND_STATUS_REVISIONS_SUBMITTED,pkp.const.REVIEW_ROUND_STATUS_REVISIONS_SUBMITTED].includes(t.statusId)&&n.push({component:"WorkflowActionButton",props:{action:xs.FILE_UPLOAD,label:BSe("workflow.uploadRevisions"),actionArgs:{submissionId:e.id,fileStage:pkp.const.SUBMISSION_FILE_REVIEW_REVISION,reviewRoundId:t.id,wizardTitleKey:"editor.submissionReview.uploadFile",submissionStageId:pkp.const.WORKFLOW_STAGE_ID_EXTERNAL_REVIEW}}}),n}},[pkp.const.WORKFLOW_STAGE_ID_EDITING]:{getPrimaryItems:({submission:e,selectedStageId:t})=>{const n=[];return n.push({component:"DiscussionManager",props:{submissionId:e.id,stageId:t}}),n.push({component:"FileManager",props:{namespace:"COPYEDITED_FILES",submission:e,submissionStageId:t}}),n}},[pkp.const.WORKFLOW_STAGE_ID_PRODUCTION]:{getPrimaryItems:({submission:e,selectedStageId:t,selectedReviewRound:n})=>{const i=[];return i.push({component:"DiscussionManager",props:{submissionId:e.id,stageId:t}}),i}}},U1t=Object.freeze(Object.defineProperty({__proto__:null,PublicationConfig:{common:{getPrimaryItems:({submission:e,selectedPublicationId:t,selectedPublication:n})=>{const i=[];return n.status===pkp.const.STATUS_PUBLISHED&&i.push({component:"WorkflowPublicationEditDisabled",props:{}}),{items:i,shouldContinue:!0}},getPrimaryControlsLeft:({submission:e,selectedPublicationId:t,selectedPublication:n})=>{const i=[];return i.push({component:"WorkflowPublicationVersionControl",props:{submission:e,selectedPublicationId:t}}),{items:i,shouldContinue:!0}}},titleAbstract:{getPrimaryItems:({submission:e,selectedPublication:t,pageInitConfig:n,permissions:i})=>[{component:"WorkflowPublicationForm",props:{formName:"titleAbstract",submission:e,publication:t,canEdit:i.canEditPublication}}]},contributors:{getPrimaryItems:({submission:e,selectedPublication:t,pageInitConfig:n,permissions:i})=>[{component:"ContributorManager",props:{submission:e,publication:t}}]},metadata:{getPrimaryItems:({submission:e,selectedPublication:t,pageInitConfig:n,permissions:i})=>[{component:"WorkflowPublicationForm",props:{formName:"metadata",submission:e,publication:t,noFieldsMessage:"No metadata fields are currently enabled.",canEdit:i.canEditPublication}}]},citations:{getPrimaryItems:({submission:e,selectedPublication:t,pageInitConfig:n,permissions:i})=>[{component:"WorkflowPublicationForm",props:{formName:"reference",submission:e,publication:t,canEdit:i.canEditPublication}}]},galleys:{getPrimaryItems:({submission:e,selectedPublication:t,permissions:n})=>[{component:"GalleyManager",props:{submission:e,publication:t}}]}},WorkflowConfig:H1t,getHeaderItems:V1t},Symbol.toStringTag,{value:"Module"}));function VSe(e,t,n,i){var l,f,d,h;const a=(f=(l=e==null?void 0:e.common)==null?void 0:l[n])==null?void 0:f.call(l,i);return(a==null?void 0:a.shouldContinue)===!1?(a==null?void 0:a.items)||[]:[...(a==null?void 0:a.items)||[],...((h=(d=e==null?void 0:e[t])==null?void 0:d[n])==null?void 0:h.call(d,i))||[]]}function Hf(e,t,n){n&&e.push(t)}const{hasSubmissionPassedStage:z1t,getActiveStage:W1t,getStageById:HSe,isDecisionAvailable:Uf,hasNotSubmissionStartedStage:j1t}=Va(),{hasCurrentUserAtLeastOneAssignedRoleInAnyStage:USe}=Nh(),{t:Jd}=Jn();function Z1t({submission:e,selectedPublication:t,publicationSettings:n,permissions:i}){if(!e)return[];const{t:a}=Jn(),l=[];return n.submissionPaymentsEnabled&&l.push({component:"WorkflowPaymentDropdown",props:{submission:e,selectedPublication:t}}),e.status===pkp.const.STATUS_PUBLISHED&&l.push({component:"WorkflowActionButton",props:{label:a("common.view"),action:$m.WORKFLOW_VIEW_PUBLISHED_SUBMISSION}}),e.status!==pkp.const.STATUS_PUBLISHED&&(e.stageId===pkp.const.WORKFLOW_STAGE_ID_EDITING||e.stageId===pkp.const.WORKFLOW_STAGE_ID_PRODUCTION)&&l.push({component:"WorkflowActionButton",props:{label:a("common.preview"),action:$m.WORKFLOW_VIEW_PUBLISHED_SUBMISSION}}),i.canAccessEditorialHistory&&l.push({component:"WorkflowActionButton",props:{label:a("editor.activityLog"),action:$m.WORKFLOW_VIEW_ACTIVITY_LOG}}),l.push({component:"WorkflowActionButton",props:{label:a("editor.submissionLibrary"),action:$m.WORKFLOW_VIEW_LIBRARY}}),l}const q1t={common:{getPrimaryItems:({submission:e,permissions:t,selectedStageId:n,selectedReviewRound:i,contextMinReviewsPerSubmission:a})=>{if(!t.accessibleStages.includes(n))return{shouldContinue:!1,items:[{component:"WorkflowPrimaryBasicMetadata",props:{body:Jd("user.authorization.accessibleWorkflowStage")}}]};const l=[];l.push({component:"WorkflowChangeSubmissionLanguage",props:{submission:e,canChangeSubmissionLanguage:!1}});const f=!j1t(e,n);return l.push({component:"WorkflowSubmissionStatus",props:{submission:e,selectedStageId:n,selectedReviewRoundId:i==null?void 0:i.id,contextMinReviewsPerSubmission:a}}),{shouldContinue:f,items:l}},getSecondaryItems:({submission:e,selectedReviewRound:t,selectedStageId:n,permissions:i})=>{if(!i.accessibleStages.includes(n))return{shouldContinue:!1,items:[]}},getActionItems:({submission:e,selectedStageId:t,selectedReviewRound:n,permissions:i})=>{if(!i.accessibleStages.includes(t))return{shouldContinue:!1,items:[]}}},[pkp.const.WORKFLOW_STAGE_ID_SUBMISSION]:{getPrimaryItems:({submission:e,selectedStageId:t,selectedReviewRound:n})=>{const i=[];return i.push({component:"FileManager",props:{namespace:"SUBMISSION_FILES",submission:e,submissionStageId:t}}),i.push({component:"DiscussionManager",props:{submissionId:e.id,stageId:t}}),i},getSecondaryItems:({submission:e,selectedReviewRound:t,selectedStageId:n,pageInitConfig:i})=>{const a=[];return a.push({component:"ParticipantManager",props:{submission:e,submissionStageId:n}}),i.publicationSettings.isReviewerSuggestionEnabled&&a.push({component:"ReviewerSuggestionManager",props:{submission:e,submissionStageId:n,reviewRoundId:t==null?void 0:t.id}}),a},getActionItems:({submission:e,selectedStageId:t,selectedReviewRound:n})=>{let i=[];return Hf(i,{component:"WorkflowActionButton",props:{label:Jd("editor.submission.decision.sendExternalReview"),isPrimary:!0,action:pu.DECISION_EXTERNAL_REVIEW}},Uf(e,pkp.const.DECISION_EXTERNAL_REVIEW)),Hf(i,{component:"WorkflowActionButton",props:{label:Jd("editor.submission.decision.skipReview"),isSecondary:!0,action:pu.DECISION_SKIP_EXTERNAL_REVIEW}},Uf(e,pkp.const.DECISION_SKIP_EXTERNAL_REVIEW)),Hf(i,{component:"WorkflowActionButton",props:{label:Jd("editor.submission.decision.decline"),isWarnable:!0,action:pu.DECISION_INITIAL_DECLINE}},Uf(e,pkp.const.DECISION_INITIAL_DECLINE)),Hf(i,{component:"WorkflowActionButton",props:{label:Jd("editor.submission.decision.revertDecline"),isSecondary:!0,action:pu.DECISION_REVERT_INITIAL_DECLINE}},Uf(e,pkp.const.DECISION_REVERT_INITIAL_DECLINE)),Hf(i,{component:"WorkflowActionButton",props:{label:Jd("common.delete"),isWarnable:!0,action:$m.WORKFLOW_DELETE_SUBMISSION}},Uf(e,pkp.const.DECISION_REVERT_INITIAL_DECLINE)&&USe(e,[pkp.const.ROLE_ID_MANAGER,pkp.const.ROLE_ID_SITE_ADMIN])),i}},[pkp.const.WORKFLOW_STAGE_ID_EXTERNAL_REVIEW]:{getPrimaryItems:({submission:e,selectedStageId:t,selectedReviewRound:n,pageInitConfig:i})=>{const a=[];return a.push({component:"FileManager",props:{namespace:"WORKFLOW_REVIEW_REVISIONS",submission:e,submissionStageId:t,reviewRoundId:n==null?void 0:n.id}}),a.push({component:"FileManager",props:{namespace:"EDITOR_REVIEW_FILES",submission:e,submissionStageId:t,reviewRoundId:n==null?void 0:n.id}}),a.push({component:"ReviewerManager",props:{submission:e,submissionStageId:t,reviewRoundId:n==null?void 0:n.id,componentForms:i.componentForms}}),a.push({component:"DiscussionManager",props:{submissionId:e.id,stageId:t}}),a},getSecondaryItems:({submission:e,selectedReviewRound:t,selectedStageId:n,pageInitConfig:i})=>{const a=[];if(t){const l=HSe(e,n);l!=null&&l.isCurrentUserDecidingEditor&&a.push({component:"WorkflowRecommendOnlyListingRecommendations",props:{submission:e,stageId:pkp.const.WORKFLOW_STAGE_ID_EXTERNAL_REVIEW,reviewRoundId:t.id}})}return a.push({component:"ParticipantManager",props:{submission:e,submissionStageId:n}}),t&&i.publicationSettings.isReviewerSuggestionEnabled&&a.push({component:"ReviewerSuggestionManager",props:{submission:e,submissionStageId:n,reviewRoundId:t.id}}),a},getActionItems:({submission:e,selectedStageId:t,selectedReviewRound:n})=>{let i=[];if(!n)return[];const{getCurrentReviewRound:a}=Va(),l=a(e,t);if(n.round<l.round)return[];if(HSe(e,t).currentUserCanRecommendOnly)i.push({component:"WorkflowRecommendOnlyControls",props:{submission:e,userId:pkp.currentUser.id,stageId:pkp.const.WORKFLOW_STAGE_ID_EXTERNAL_REVIEW,reviewRoundId:n.id}});else{const h={stageId:pkp.const.WORKFLOW_STAGE_ID_EXTERNAL_REVIEW,reviewRoundId:n.id};Hf(i,{component:"WorkflowActionButton",props:{label:Jd("editor.submission.decision.requestRevisions"),isSecondary:!0,action:pu.DECISION_REQUEST_REVISION,actionArgs:h}},Uf(e,pkp.const.DECISION_RESUBMIT)||Uf(e,pkp.const.DECISION_PENDING_REVISIONS)),Hf(i,{component:"WorkflowActionButton",props:{label:Jd("editor.submission.decision.accept"),action:pu.DECISION_ACCEPT,isPrimary:!0,actionArgs:h}},Uf(e,pkp.const.DECISION_ACCEPT)),Hf(i,{component:"WorkflowActionButton",props:{label:Jd("editor.submission.createNewRound"),action:pu.DECISION_NEW_EXTERNAL_ROUND,actionArgs:h}},Uf(e,pkp.const.DECISION_NEW_EXTERNAL_ROUND)),Hf(i,{component:"WorkflowActionButton",props:{label:Jd("editor.submission.decision.cancelReviewRound"),isWarnable:!0,action:pu.DECISION_CANCEL_REVIEW_ROUND}},Uf(e,pkp.const.DECISION_CANCEL_REVIEW_ROUND)),Hf(i,{component:"WorkflowActionButton",props:{label:Jd("editor.submission.decision.decline"),isWarnable:!0,action:pu.DECISION_DECLINE}},Uf(e,pkp.const.DECISION_DECLINE)),Hf(i,{component:"WorkflowActionButton",props:{label:Jd("editor.submission.decision.revertDecline"),isSecondary:!0,action:pu.DECISION_REVERT_DECLINE}},Uf(e,pkp.const.DECISION_REVERT_DECLINE)),Hf(i,{component:"WorkflowActionButton",props:{label:Jd("common.delete"),isWarnable:!0,action:$m.WORKFLOW_DELETE_SUBMISSION}},Uf(e,pkp.const.DECISION_REVERT_DECLINE)&&USe(e,[pkp.const.ROLE_ID_MANAGER,pkp.const.ROLE_ID_SITE_ADMIN]))}return i}},[pkp.const.WORKFLOW_STAGE_ID_EDITING]:{getPrimaryItems:({submission:e,selectedStageId:t,selectedReviewRound:n})=>{const i=[];return i.push({component:"WorkflowNotificationDisplay",props:{submission:e,selectedStageId:t}}),i.push({component:"FileManager",props:{namespace:"FINAL_DRAFT_FILES",submission:e,submissionStageId:t}}),i.push({component:"DiscussionManager",props:{submissionId:e.id,stageId:t}}),i.push({component:"FileManager",props:{namespace:"COPYEDITED_FILES",submission:e,submissionStageId:t}}),i},getSecondaryItems:({submission:e,selectedReviewRound:t,selectedStageId:n})=>{const i=[];return i.push({component:"ParticipantManager",props:{submission:e,submissionStageId:n}}),i},getActionItems:({submission:e,selectedStageId:t,selectedReviewRound:n})=>{const i=[];return Hf(i,{component:"WorkflowActionButton",props:{label:Jd("editor.submission.decision.sendToProduction"),isPrimary:!0,action:pu.DECISION_SEND_TO_PRODUCTION}},Uf(e,pkp.const.DECISION_SEND_TO_PRODUCTION)),Hf(i,{component:"WorkflowActionButton",props:{label:Jd("editor.submission.decision.backFromCopyediting"),isWarnable:!0,action:pu.DECISION_BACK_FROM_COPYEDITING}},Uf(e,pkp.const.DECISION_BACK_FROM_COPYEDITING)),i}},[pkp.const.WORKFLOW_STAGE_ID_PRODUCTION]:{getPrimaryItems:({submission:e,selectedStageId:t,selectedReviewRound:n})=>{const i=[];return i.push({component:"WorkflowNotificationDisplay",props:{submission:e,selectedStageId:t}}),i.push({component:"FileManager",props:{namespace:"PRODUCTION_READY_FILES",submission:e,submissionStageId:t}}),i.push({component:"DiscussionManager",props:{submissionId:e.id,stageId:t}}),i},getSecondaryItems:({submission:e,selectedReviewRound:t,selectedStageId:n})=>{const i=[];return i.push({component:"ParticipantManager",props:{submission:e,submissionStageId:n}}),i},getActionItems:({submission:e,selectedStageId:t,selectedReviewRound:n})=>{const i=[];return Hf(i,{component:"WorkflowActionButton",props:{label:Jd("editor.submission.schedulePublication"),isPrimary:!0,action:"navigateToMenu",actionArgs:"publication_titleAbstract"}},W1t(e).id===pkp.const.WORKFLOW_STAGE_ID_PRODUCTION),Hf(i,{component:"WorkflowActionButton",props:{label:Jd("editor.submission.decision.backToCopyediting"),isWarnable:!0,action:pu.DECISION_BACK_FROM_PRODUCTION}},Uf(e,pkp.const.DECISION_BACK_FROM_PRODUCTION)),i}}},G1t=Object.freeze(Object.defineProperty({__proto__:null,PublicationConfig:{common:{getPrimaryItems:({submission:e,selectedPublicationId:t,selectedPublication:n})=>{const i=[];return n.status===pkp.const.STATUS_PUBLISHED&&i.push({component:"WorkflowPublicationEditWarning",props:{}}),{items:i,shouldContinue:!0}},getPrimaryControlsLeft:({submission:e,selectedPublicationId:t,selectedPublication:n,permissions:i})=>{const a=[];return e.status!==pkp.const.STATUS_PUBLISHED&&e.publications.length<2&&a.push({component:"WorkflowChangeSubmissionLanguage",props:{submission:e,canChangeSubmissionLanguage:i.canChangeSubmissionLanguage}}),a.push({component:"WorkflowPublicationVersionControl",props:{submission:e,selectedPublicationId:t}}),{items:a,shouldContinue:!0}},getPrimaryControlsRight:({submission:e,selectedPublicationId:t,selectedPublication:n,permissions:i})=>{const a=[],{t:l}=Jn();if(!i.canPublish)return[];if(n.status===pkp.const.STATUS_QUEUED)z1t(e,pkp.const.WORKFLOW_STAGE_ID_EXTERNAL_REVIEW)&&a.push({component:"WorkflowActionButton",props:{label:l("common.preview"),isSecondary:!0,action:$m.WORKFLOW_PREVIEW_PUBLICATION}}),a.push({component:"WorkflowActionButton",props:{label:e.status===pkp.const.STATUS_PUBLISHED?l("publication.publish"):l("editor.submission.schedulePublication"),isSecondary:!0,action:$m.WORKFLOW_ASSIGN_TO_ISSUE_AND_SCHEDULE_FOR_PUBLICATION}});else if(n.status===pkp.const.STATUS_SCHEDULED)a.push({component:"WorkflowActionButton",props:{label:l("common.preview"),isSecondary:!0,action:$m.WORKFLOW_PREVIEW_PUBLICATION}}),a.push({component:"WorkflowActionButton",props:{label:l("publication.unschedule"),isWarnable:!0,action:$m.WORKFLOW_UNSCHEDULE_PUBLICATION}});else if(n.status===pkp.const.STATUS_PUBLISHED){a.push({component:"WorkflowActionButton",props:{label:l("publication.unpublish"),isWarnable:!0,action:$m.WORKFLOW_UNPUBLISH_PUBLICATION}});const{getLatestPublication:f}=Va();f(e).id===n.id&&a.push({component:"WorkflowActionButton",props:{label:l("publication.createVersion"),isSecondary:!0,action:$m.WORKFLOW_CREATE_NEW_VERSION}})}return{items:a,shouldContinue:!0}}},titleAbstract:{getPrimaryItems:({submission:e,selectedPublication:t,pageInitConfig:n,permissions:i})=>[{component:"WorkflowPublicationForm",props:{formName:"titleAbstract",submission:e,publication:t,canEdit:i.canEditPublication}}]},contributors:{getPrimaryItems:({submission:e,selectedPublication:t,pageInitConfig:n,permissions:i})=>[{component:"ContributorManager",props:{submission:e,publication:t,canEdit:i.canEditPublication}}]},metadata:{getPrimaryItems:({submission:e,selectedPublication:t,pageInitConfig:n,permissions:i})=>[{component:"WorkflowPublicationForm",props:{formName:"metadata",submission:e,publication:t,noFieldsMessage:"No metadata fields are currently enabled.",canEdit:i.canEditPublication}}]},citations:{getPrimaryItems:({submission:e,selectedPublication:t,pageInitConfig:n,permissions:i})=>[{component:"WorkflowPublicationForm",props:{formName:"reference",submission:e,publication:t,canEdit:i.canEditPublication}}]},identifiers:{getPrimaryItems:({submission:e,selectedPublication:t,pageInitConfig:n,permissions:i})=>[{component:"WorkflowPublicationForm",props:{formName:"identifier",submission:e,publication:t,canEdit:i.canEditPublication}}]},jats:{getPrimaryItems:({submission:e,selectedPublication:t,pageInitConfig:n,permissions:i})=>[{component:"WorkflowPublicationJats",props:{canEdit:i.canEditPublication,submission:e,publication:t}}]},galleys:{getPrimaryItems:({submission:e,selectedPublication:t,permissions:n})=>[{component:"GalleyManager",props:{submission:e,publication:t,canEdit:n.canEditPublication}}]},license:{getPrimaryItems:({submission:e,selectedPublication:t,pageInitConfig:n,permissions:i})=>[{component:"WorkflowPublicationForm",props:{formName:"permissionDisclosure",submission:e,publication:t,canEdit:i.canEditPublication}}]},issue:{getPrimaryItems:({submission:e,selectedPublication:t,pageInitConfig:n,permissions:i})=>[{component:"WorkflowPublicationForm",props:{formName:"issue",submission:e,publication:t,canEdit:i.canEditPublication}}]}},WorkflowConfig:q1t,getHeaderItems:Z1t},Symbol.toStringTag,{value:"Module"}));function K1t({dashboardPage:e}){let t=null;e===$f.EDITORIAL_DASHBOARD?t=G1t:t=U1t;function n(b,{selectedMenuState:S,submission:k,pageInitConfig:T,selectedPublication:O,selectedPublicationId:P,selectedReviewRound:B,permissions:W,dashboardPage:Z,contextMinReviewsPerSubmission:Y}){if(S.stageId){const z={submission:k,pageInitConfig:T,selectedPublication:O,selectedPublicationId:P,selectedStageId:S.stageId,selectedReviewRound:B,permissions:W,contextMinReviewsPerSubmission:Y};return k?VSe(t.WorkflowConfig,S.stageId,b,z):[]}else if(S.primaryMenuItem==="publication"){const z={submission:k,pageInitConfig:T,selectedPublication:O,selectedPublicationId:P,permissions:W,dashboardPage:Z};return!k||!O?[]:VSe(t.PublicationConfig,S.secondaryMenuItem,b,z)}return[]}function i(b){return t.getHeaderItems(b)}function a(b){return n("getPrimaryItems",b)}function l(b){return n("getSecondaryItems",b)}function f(b){return n("getActionItems",b)}function d(b){return n("getPrimaryControlsLeft",b)}function h(b){return n("getPrimaryControlsRight",b)}return{getHeaderItems:i,getPrimaryItems:a,getSecondaryItems:l,getActionItems:f,getPrimaryControlsLeft:d,getPrimaryControlsRight:h}}const{getCurrentReviewRound:Y1t}=Va(),{t:y9}=Jn(),zSe={[pkp.const.WORKFLOW_STAGE_ID_SUBMISSION]:"border-stage-desk-review",[pkp.const.WORKFLOW_STAGE_ID_INTERNAL_REVIEW]:"border-stage-in-internal-review",[pkp.const.WORKFLOW_STAGE_ID_EXTERNAL_REVIEW]:"border-stage-in-review",[pkp.const.WORKFLOW_STAGE_ID_EDITING]:"border-stage-copyediting",[pkp.const.WORKFLOW_STAGE_ID_PRODUCTION]:"border-stage-production"};function Bm({label:e,name:t}){return{key:"publication_".concat(t),label:e,state:{primaryMenuItem:"publication",secondaryMenuItem:t,title:X1t(e)}}}function cU({stageId:e,label:t,isActive:n,items:i}){return{key:"workflow_".concat(e),label:t,colorStripe:n?zSe[e]:null,state:{primaryMenuItem:"workflow",stageId:e,title:WSe(t)},items:i}}function WSe(e){return"".concat(y9("semicolon",{label:y9("manager.workflow")})," ").concat(e," ")}function X1t(e){return"".concat(y9("semicolon",{label:y9("submission.publication")})," ").concat(e)}function J1t({submission:e,stageId:t}){const{getActiveStage:n,getCurrentReviewRound:i}=Va(),a=n(e),l=i(e,t),f=[],{getReviewRoundsForStage:d}=Va(),h=d(e,t),b={[pkp.const.WORKFLOW_STAGE_ID_EXTERNAL_REVIEW]:"submission.stage.externalReviewWithRound",[pkp.const.WORKFLOW_STAGE_ID_INTERNAL_REVIEW]:"submission.stage.internalReviewWithRound"};return h.forEach(S=>{f.push(Q1t({stageId:t,reviewRound:S,isActive:a.id===t&&l.id===S.id,title:WSe(y9(b[t],{round:S.round}))}))}),f}function Q1t({stageId:e,reviewRound:t,isActive:n,title:i}){return{key:"workflow_".concat(e,"_").concat(t.id),label:y9("workflow.reviewRoundN",{number:t.round}),colorStripe:n?zSe[e]:null,state:{primaryMenuItem:"workflow",stageId:e,reviewRoundId:t.id,title:i}}}function egt(e){const{publicationSettings:t}=e,{t:n}=Jn();function i({submission:h}){const{getActiveStage:b}=Va(),S=b(h),k=J1t({submission:h,stageId:pkp.const.WORKFLOW_STAGE_ID_EXTERNAL_REVIEW,title:n("manager.publication.reviewStage")}),T=[];return T.push(cU({stageId:pkp.const.WORKFLOW_STAGE_ID_SUBMISSION,label:n("manager.publication.submissionStage"),isActive:S.id===pkp.const.WORKFLOW_STAGE_ID_SUBMISSION})),T.push(cU({stageId:pkp.const.WORKFLOW_STAGE_ID_EXTERNAL_REVIEW,label:n("manager.publication.reviewStage"),isActive:S.id===pkp.const.WORKFLOW_STAGE_ID_EXTERNAL_REVIEW,items:k})),T.push(cU({stageId:pkp.const.WORKFLOW_STAGE_ID_EDITING,label:n("submission.copyediting"),isActive:S.id===pkp.const.WORKFLOW_STAGE_ID_EDITING})),T.push(cU({stageId:pkp.const.WORKFLOW_STAGE_ID_PRODUCTION,label:n("manager.publication.productionStage"),isActive:S.id===pkp.const.WORKFLOW_STAGE_ID_PRODUCTION})),T}function a({submission:h,permissions:b}){const S=[];return S.push(Bm({name:"titleAbstract",label:n("publication.titleAbstract")})),S.push(Bm({name:"contributors",label:n("publication.contributors")})),S.push(Bm({name:"metadata",label:n("article.metadata")})),t.supportsCitations&&S.push(Bm({name:"citations",label:n("submission.citations")})),S.push(Bm({name:"galleys",label:n("submission.layout.galleys")})),S}function l({submission:h,permissions:b}){const S=[];return S.push(Bm({name:"titleAbstract",label:n("publication.titleAbstract")})),S.push(Bm({name:"contributors",label:n("publication.contributors")})),S.push(Bm({name:"metadata",label:n("article.metadata")})),t.supportsCitations&&S.push(Bm({name:"citations",label:n("submission.citations")})),t.identifiersEnabled&&S.push(Bm({name:"identifiers",label:n("submission.identifiers")})),S.push(Bm({name:"jats",label:n("publication.jats")})),b.canAccessProduction&&(S.push(Bm({name:"galleys",label:n("submission.layout.galleys")})),S.push(Bm({name:"license",label:n("publication.publicationLicense")})),S.push(Bm({name:"issue",label:n("issue.issue")}))),S}function f({submission:h,permissions:b}){if(!h)return[];let S=[];return S.push({key:"workflow",label:n("manager.workflow"),icon:"Dashboard",items:i({submission:h})}),e.dashboardPage===$f.EDITORIAL_DASHBOARD&&b.canAccessPublication?S.push({key:"publication",label:n("submission.publication"),icon:"MySubmissions",items:l({submission:h,permissions:b})}):e.dashboardPage===$f.MY_SUBMISSIONS&&S.push({key:"publication",label:n("submission.publication"),icon:"MySubmissions",items:a({submission:h,permissions:b})}),S}function d({submission:h}){var b;return h.stageId===pkp.const.WORKFLOW_STAGE_ID_EXTERNAL_REVIEW||h.stageId===pkp.const.WORKFLOW_STAGE_ID_INTERNAL_REVIEW?"workflow_".concat(h.stageId,"_").concat((b=Y1t(h,h.stageId))==null?void 0:b.id):h.stageId===pkp.const.WORKFLOW_STAGE_ID_PRODUCTION&&h.status!==pkp.const.STATUS_QUEUED?"publication_titleAbstract":"workflow_".concat(h.stageId)}return{getMenuItems:f,getInitialSelectionItemKey:d}}const tgt={__name:"WorkflowPageOJS",props:{submissionId:{type:Number,required:!0},pageInitConfig:{type:Object,required:!0}},setup(e){const t=e,n=Z3({FileManager:Upt,ReviewerManager:lmt,DiscussionManager:cmt,ContributorManager:vmt,ParticipantManager:Nmt,ReviewerSuggestionManager:Xmt,GalleyManager:pht,WorkflowActionButton:mht,WorkflowRecommendOnlyControls:Eht,WorkflowRecommendOnlyListingRecommendations:Oht,WorkflowNotificationDisplay:Pht,WorkflowListingEmails:Vht,WorkflowPaymentDropdown:Hht,WorkflowPrimaryBasicMetadata:T1t,WorkflowPublicationForm:Wht,WorkflowPublicationJats:p1t,WorkflowPublicationVersionControl:_1t,WorkflowChangeSubmissionLanguage:w1t,WorkflowSubmissionStatus:D1t,WorkflowPublicationEditWarning:P1t,WorkflowPublicationEditDisabled:N1t});return CC({props:t,Components:n,useWorkflowConfig:K1t,useWorkflowNavigationConfig:egt}).setExpandedKeys(["workflow","publication","marketing","workflow_".concat(pkp.const.WORKFLOW_STAGE_ID_EXTERNAL_REVIEW)]),(a,l)=>(L(),Ee(Tpt))}},ngt={name:"AccessPage",components:{NotifyUsersForm:{name:"NotifyUsersForm",extends:oa,mixins:[wd],props:{confirmLabel:{type:String,required:!0},userGroupCounts:{type:Object,required:!0},sendLabel:{type:String,required:!0}},methods:{nextPage:function(e){let t=0;this.submitValues.userGroupIds&&(t=this.submitValues.userGroupIds.reduce((n,i)=>n+this.userGroupCounts[i],0)),this.openDialog({name:"confirmNotify",title:this.sendLabel,message:this.confirmLabel.replace("{$total}",t),actions:[{label:this.sendLabel,isPrimary:!0,callback:n=>{this.submit(),n()}},{label:this.t("common.cancel"),isWarnable:!0,callback:n=>n()}],modalStyle:"primary"})}}}},extends:f0,data(){return{totalBulkJobs:0}},mounted(){pkp.eventBus.$on("form-success",(e,t)=>{e===pkp.const.FORM_NOTIFY_USERS&&(this.totalBulkJobs=t.totalBulkJobs)})},unmounted(){pkp.eventBus.$off("form-success")},methods:{reload(){window.location.reload()}}},sgt={name:"AddContextContainer",components:{AddContextForm:{name:"AddContextForm",extends:oa,props:{editContextUrl:{type:String,required:!0}},watch:{submitValues(e,t){if(e.supportedLocales.includes(e.primaryLocale)){let n={...this.errors};delete n.primaryLocale,this.$emit("set",this.id,{errors:n})}}},methods:{success:function(e){pkp.eventBus.$emit("form-success",this.id,e),e.id&&(window.location.href=this.editContextUrl.replace("__id__",e.id))}}}},extends:iU},uU={__name:"HighlightsEditModal",props:{title:{type:String,required:!0},activeForm:{type:Object,required:!0}},emits:["updateForm","formSuccess"],setup(e,{emit:t}){const n=t;return(i,a)=>(L(),Ee(il,null,{title:te(()=>[D(ee(e.title),1)]),default:te(()=>[a[2]||(a[2]=D()),pe(Lu,null,{default:te(()=>[pe(oa,Cn(e.activeForm,{onSet:a[0]||(a[0]=(...l)=>n("updateForm",...l)),onSuccess:a[1]||(a[1]=(...l)=>n("formSuccess",...l))}),null,16)]),_:1})]),_:1}))}},ogt={components:{ListPanel:Vf,PkpHeader:Bf,Orderer:vH,PkpButton:ms,Spinner:zl},mixins:[wd,SC,Od],props:{apiUrl:{type:String,required:!0},form:{type:Object,required:!0},i18nAdd:{type:String,required:!0},i18nConfirmDelete:{type:String,required:!0},i18nDelete:{type:String,required:!0},i18nEdit:{type:String,required:!0},i18nSaveOrder:{type:String,required:!0},id:{type:String,required:!0},items:{type:Array,default(){return[]}},itemsMax:{type:Number,required:!0},title:{type:String,required:!0}},emits:["add:highligh","set","update:highlight"],data(){return{activeForm:null,activeFormTitle:"",isLoading:!1,isOrdering:!1}},methods:{closeFormModal(e){this.activeForm=null,this.activeFormTitle="";const{closeSideModal:t}=Ms();t(uU)},formSuccess(e){this.activeForm.method==="POST"?(this.offset=0,this.get(),pkp.eventBus.$emit("add:highlight",e)):(this.setItems(this.items.map(n=>n.id===e.id?e:n),this.itemsMax),pkp.eventBus.$emit("update:highlight",e));const{closeSideModal:t}=Ms();t(uU)},openAddModal(){let e=K1(this.form);e.action=this.apiUrl,e.method="POST",this.activeForm=e,this.activeFormTitle=this.i18nAdd;const{openSideModal:t}=Ms();t(uU,{title:this.activeFormTitle,activeForm:this.activeForm,onUpdateForm:this.updateForm,onFormSuccess:this.formSuccess})},openDeleteModal(e){const t=this.items.find(n=>n.id===e);if(typeof t>"u"){this.ajaxErrorCallback({});return}this.openDialog({name:"delete",title:this.i18nDelete,message:this.replaceLocaleParams(this.i18nConfirmDelete,{title:this.localize(t.title)}),actions:[{label:this.t("common.yes"),isWarnable:!0,callback:n=>{$.ajax({url:this.apiUrl+"/"+e,type:"POST",headers:{"X-Csrf-Token":pkp.currentUser.csrfToken,"X-Http-Method-Override":"DELETE"},error:this.ajaxErrorCallback,success:i=>{this.setItems(this.items.filter(a=>a.id!==e),this.itemsMax),n(),this.setFocusIn(this.$el)}})}},{label:this.t("common.no"),callback:n=>n()}],modalStyle:"negative"})},openEditModal(e){const t=this.items.find(a=>a.id===e);if(!t){this.ajaxErrorCallback({});return}let n=K1(this.form);n.action=this.apiUrl+"/"+e,n.method="PUT",n.fields=n.fields.map(a=>(Object.keys(t).includes(a.name)&&(a.value=t[a.name]),a)),this.activeForm=n,this.activeFormTitle=this.i18nEdit;const{openSideModal:i}=Ms();i(uU,{title:this.activeFormTitle,activeForm:this.activeForm,onUpdateForm:this.updateForm,onFormSuccess:this.formSuccess})},orderDown(e){var t=this.items.findIndex(i=>e.id==i.id);if(t===this.items.length-1)return;let n=[...this.items];n.splice(t+1,0,n.splice(t,1)[0]),this.setItems(n,n.length)},orderUp(e){var t=this.items.findIndex(i=>e.id==i.id);if(t===0)return;let n=[...this.items];n.splice(t-1,0,n.splice(t,1)[0]),this.setItems(n,n.length)},saveOrder(){this.isLoading=!0;let e=0;for(const t of this.items)t.sequence=e,e++;$.ajax({url:this.apiUrl+"/order",type:"POST",context:this,data:{sequence:this.items.map(({id:t,sequence:n})=>({id:t,sequence:n}))},headers:{"X-Csrf-Token":pkp.currentUser.csrfToken,"X-Http-Method-Override":"PUT"},error:this.ajaxErrorCallback,success:t=>{this.setItems(t.items,t.itemsMax)},complete:()=>{this.isLoading=!1,this.isOrdering=!1}})},setItems(e,t){this.$emit("set",this.id,{items:e,itemsMax:t})},updateForm(e,t){if(!this.activeForm)return;let n=this.activeForm;Object.keys(t).forEach(function(i){n[i]=t[i]}),this.activeForm=n}}};function rgt(e,t,n,i,a,l){const f=Xe("Spinner"),d=Xe("PkpButton"),h=Xe("PkpHeader"),b=Xe("Orderer"),S=Xe("ListPanel");return L(),Q("div",{class:Rn(["highlightsListPanel",{"-isOrdering":a.isOrdering}])},[is(e.$slots,"default",{},()=>[pe(S,{items:n.items},{header:te(()=>[pe(h,null,{actions:te(()=>[a.isOrdering?(L(),Q(bt,{key:1},[pe(d,{"is-active":!0,disabled:a.isLoading,onClick:l.saveOrder},{default:te(()=>[D(ee(n.i18nSaveOrder),1)]),_:1},8,["disabled","onClick"]),t[2]||(t[2]=D()),pe(d,{"is-warnable":!0,disabled:a.isLoading,onClick:t[1]||(t[1]=k=>a.isOrdering=!1)},{default:te(()=>[D(ee(e.t("common.cancel")),1)]),_:1},8,["disabled"])],64)):(L(),Ee(d,{key:0,"is-active":a.isOrdering,disabled:a.isLoading,onClick:t[0]||(t[0]=k=>a.isOrdering=!0)},{default:te(()=>[D(ee(e.t("common.order")),1)]),_:1},8,["is-active","disabled"])),t[3]||(t[3]=D()),pe(d,{disabled:a.isOrdering,onClick:l.openAddModal},{default:te(()=>[D(ee(n.i18nAdd),1)]),_:1},8,["disabled","onClick"])]),default:te(()=>[H("h2",null,ee(n.title),1),t[4]||(t[4]=D()),a.isLoading?(L(),Ee(f,{key:0})):we("",!0),t[5]||(t[5]=D())]),_:1})]),"item-title":te(({item:k})=>[D(ee(e.localize(k.title)),1)]),"item-actions":te(({item:k})=>[a.isOrdering?(L(),Ee(b,{key:0,"item-id":k.id,"item-title":e.localize(k.title),onUp:T=>l.orderUp(k),onDown:T=>l.orderDown(k)},null,8,["item-id","item-title","onUp","onDown"])):we("",!0),t[6]||(t[6]=D()),a.isOrdering?we("",!0):(L(),Ee(d,{key:1,onClick:T=>l.openEditModal(k.id)},{default:te(()=>[D(ee(e.t("common.edit")),1)]),_:2},1032,["onClick"])),t[7]||(t[7]=D()),a.isOrdering?we("",!0):(L(),Ee(d,{key:2,"is-warnable":!0,onClick:T=>l.openDeleteModal(k.id)},{default:te(()=>[D(ee(e.t("common.delete")),1)]),_:2},1032,["onClick"]))]),_:1},8,["items"])])],2)}const jSe=wt(ogt,[["render",rgt]]),ZSe={name:"ThemeForm",extends:oa,props:{themeFields:Object},methods:{fieldChanged:function(e,t,n,i){if(e==="themePluginPath")this.changeTheme(n);else{let a=this.fields.map(l=>(l.name===e&&(i?l[t][i]=n:l[t]=n),l));this.$emit("set",this.id,{fields:a})}this.removeError(e,i)},changeTheme:function(e){this.$emit("set",this.id,{fields:this.fields.slice(0,1)}),this.$nextTick(()=>{const t=this.themeFields[e]||[];this.$emit("set",this.id,{fields:[{...this.fields[0],value:e},...t]})})}}},Xne={__name:"AnnouncementsEditModal",props:{title:{type:String,required:!0},activeForm:{type:Object,required:!0}},emits:["updateForm","formSuccess"],setup(e,{emit:t}){const n=t;return(i,a)=>(L(),Ee(il,null,{title:te(()=>[D(ee(e.title),1)]),default:te(()=>[a[2]||(a[2]=D()),pe(Lu,null,{default:te(()=>[pe(oa,Cn(e.activeForm,{onSet:a[0]||(a[0]=(...l)=>n("updateForm",...l)),onSuccess:a[1]||(a[1]=(...l)=>n("formSuccess",...l))}),null,16)]),_:1})]),_:1}))}},{formatShortDate:igt}=Ed(),agt={components:{PkpButton:ms,Spinner:zl,ListPanel:Vf,Pagination:d0,PkpHeader:Bf,Search:j1},mixins:[wd,SC,Od],props:{addAnnouncementLabel:{type:String,required:!0},confirmDeleteMessage:{type:String,required:!0},deleteAnnouncementLabel:{type:String,required:!0},editAnnouncementLabel:{type:String,required:!0},form:{type:Object,required:!0},id:{type:String,required:!0},items:{type:Array,default(){return[]}},itemsMax:{type:Number,default(){return 0}},title:{type:String,required:!0}},emits:["add:announcement","set","update:announcement"],data(){return{activeForm:null,activeFormTitle:""}},methods:{closeFormModal(e){this.activeForm=null,this.activeFormTitle="";const{closeSideModal:t}=Ms();t(Xne)},formSuccess(e){this.activeForm.method==="POST"?(this.offset=0,this.get(),pkp.eventBus.$emit("add:announcement",e)):(this.setItems(this.items.map(t=>t.id===e.id?e:t),this.itemsMax),pkp.eventBus.$emit("update:announcement",e)),this.closeFormModal()},openAddModal(){let e=K1(this.form);e.action=this.apiUrl,e.method="POST",this.activeForm=e,this.activeFormTitle=this.addAnnouncementLabel;const{openSideModal:t}=Ms();t(Xne,{title:this.activeFormTitle,activeForm:e,onUpdateForm:this.updateForm,onFormSuccess:this.formSuccess})},openDeleteModal(e){const t=this.items.find(n=>n.id===e);if(typeof t>"u"){this.ajaxErrorCallback({});return}this.openDialog({name:"delete",title:this.deleteAnnouncementLabel,message:this.replaceLocaleParams(this.confirmDeleteMessage,{title:this.localize(t.title)}),actions:[{label:this.t("common.yes"),isWarnable:!0,callback:n=>{var i=this;$.ajax({url:this.apiUrl+"/"+e,type:"POST",headers:{"X-Csrf-Token":pkp.currentUser.csrfToken,"X-Http-Method-Override":"DELETE"},error:i.ajaxErrorCallback,success:function(a){i.setItems(i.items.filter(l=>l.id!==e),i.itemsMax),n(),i.setFocusIn(i.$el)}})}},{label:this.t("common.no"),callback:n=>n()}],modalStyle:"negative"})},openEditModal(e){const t=this.items.find(a=>a.id===e);if(!t){this.ajaxErrorCallback({});return}let n=K1(this.form);n.action=this.apiUrl+"/"+e,n.method="PUT",n.fields=n.fields.map(a=>{if(Object.keys(t).includes(a.name)){let l=t[a.name];a.name=="dateExpire"&&(l=igt(l)),a.value=l}return a}),this.activeForm=n,this.activeFormTitle=this.editAnnouncementLabel;const{openSideModal:i}=Ms();i(Xne,{title:this.editAnnouncementLabel,activeForm:n,onUpdateForm:this.updateForm,onFormSuccess:this.formSuccess})},setItems(e,t){this.$emit("set",this.id,{items:e,itemsMax:t})},updateForm(e,t){if(!this.activeForm)return;let n=this.activeForm;Object.keys(t).forEach(function(i){n[i]=t[i]}),this.activeForm=n}}},lgt={class:"announcementsListPanel"};function cgt(e,t,n,i,a,l){const f=Xe("Spinner"),d=Xe("Search"),h=Xe("PkpButton"),b=Xe("PkpHeader"),S=Xe("Pagination"),k=Xe("ListPanel");return L(),Q("div",lgt,[is(e.$slots,"default",{},()=>[pe(k,{items:n.items},{header:te(()=>[pe(b,null,{actions:te(()=>[pe(d,{"search-phrase":e.searchPhrase,onSearchPhraseChanged:e.setSearchPhrase},null,8,["search-phrase","onSearchPhraseChanged"]),t[0]||(t[0]=D()),pe(h,{onClick:l.openAddModal},{default:te(()=>[D(ee(n.addAnnouncementLabel),1)]),_:1},8,["onClick"])]),default:te(()=>[H("h2",null,ee(n.title),1),t[1]||(t[1]=D()),e.isLoading?(L(),Ee(f,{key:0})):we("",!0),t[2]||(t[2]=D())]),_:1})]),"item-title":te(({item:T})=>[D(ee(e.localize(T.title)),1)]),"item-actions":te(({item:T})=>[pe(h,{element:"a",href:T.url},{default:te(()=>[D(ee(e.t("common.view")),1)]),_:2},1032,["href"]),t[3]||(t[3]=D()),pe(h,{onClick:O=>l.openEditModal(T.id)},{default:te(()=>[D(ee(e.t("common.edit")),1)]),_:2},1032,["onClick"]),t[4]||(t[4]=D()),pe(h,{"is-warnable":!0,onClick:O=>l.openDeleteModal(T.id)},{default:te(()=>[D(ee(e.t("common.delete")),1)]),_:2},1032,["onClick"])]),footer:te(()=>[e.lastPage>1?(L(),Ee(S,{key:0,"current-page":e.currentPage,"is-loading":e.isLoading,"last-page":e.lastPage,onSetPage:e.setPage},null,8,["current-page","is-loading","last-page","onSetPage"])):we("",!0)]),_:1},8,["items"])])])}const qSe=wt(agt,[["render",cgt]]),ugt={name:"AdminPage",components:{ActionPanel:Z1,HighlightsListPanel:jSe,AnnouncementsListPanel:qSe,ThemeForm:ZSe},extends:f0,data(){return{announcementsEnabled:!1}},mounted(){pkp.eventBus.$on("form-success",(e,t)=>{e===pkp.const.FORM_ANNOUNCEMENT_SETTINGS&&(this.announcementsEnabled=!!t.enableAnnouncements)})}},dgt={class:"depositErrorMessage"},fgt={__name:"DoiItemViewErrorDialogBody",props:{errorMessageAgencyPreamble:{type:String,required:!0},errorMessage:{type:String,required:!0}},setup(e){return(t,n)=>(L(),Q(bt,null,[H("p",null,ee(e.errorMessageAgencyPreamble),1),n[0]||(n[0]=D()),H("div",dgt,[H("pre",null,ee(e.errorMessage),1)])],64))}},pgt={__name:"DoiItemViewRegisteredMessageDialogBody",props:{registeredMessageAgencyPreamble:{type:String,required:!0},registeredMessage:{type:String,required:!0}},setup(e){return(t,n)=>(L(),Q(bt,null,[H("p",null,ee(e.registeredMessageAgencyPreamble),1),n[0]||(n[0]=D()),H("p",null,ee(e.registeredMessage),1)],64))}},mgt=["id","href"],hgt=["for"],ggt=["id","onUpdate:modelValue","readonly","disabled"],vgt={key:0},bgt={class:"doiListItem__versionContainer--actionsBar"},ygt={__name:"DoiItemVersionModal",props:{isSaving:{type:Boolean,required:!1,default:!1},isDeposited:{type:Boolean,required:!1,default:!1},item:{type:Object,required:!0},doiListColumns:{type:Array,required:!0},isEditingDois:{type:Boolean,required:!0},mutableDois:{type:Array,required:!0}},emits:["saveDois","editDois"],setup(e,{emit:t}){const{t:n}=Jn(),i=Oh(),a=t;function l(f){const d=f.datePublished!==null?"(".concat(f.datePublished,")"):n("publication.status.unpublished");return"".concat(n("publication.version",{version:f.versionNumber})," ").concat(d)}return(f,d)=>(L(),Ee(il,null,{title:te(()=>[D(ee(se(n)("doi.manager.versions.modalTitle")),1)]),default:te(()=>[d[7]||(d[7]=D()),pe(Lu,null,{default:te(()=>[(L(!0),Q(bt,null,Sn(e.item.versions,h=>(L(),Q("div",{key:h.id,class:"doiListItem__versionContainer"},[H("a",{id:se(i),href:h.urlPublished,target:"_blank",rel:"noopener noreferrer"},ee(l(h)),9,mgt),d[3]||(d[3]=D()),pe(du,{"labelled-by":se(i)},{default:te(()=>[pe(Ad,null,{default:te(()=>[(L(!0),Q(bt,null,Sn(e.doiListColumns,b=>(L(),Ee(Ei,{id:b.name,key:b.name},{default:te(()=>[D(ee(b.label),1)]),_:2},1032,["id"]))),128))]),_:1}),d[2]||(d[2]=D()),pe(Kd,null,{default:te(()=>[(L(!0),Q(bt,null,Sn(e.item.doiObjects.filter(b=>b.versionNumber===h.versionNumber),b=>(L(),Ee(Bi,{key:b.column},{default:te(()=>[pe(as,null,{default:te(()=>[H("label",{for:b.uid,class:Rn({labelDisabled:b.disabled})},ee(b.displayType),11,hgt)]),_:2},1024),d[1]||(d[1]=D()),pe(as,null,{default:te(()=>[Gn(H("input",{id:b.uid,"onUpdate:modelValue":S=>e.mutableDois.find(k=>k.uid===b.uid).identifier=S,class:"pkpFormField__input pkpFormField--text__input",type:"text",readonly:!(e.isEditingDois&&!e.isSaving),disabled:e.isEditingDois&&b.disabled},null,8,ggt),[[lu,e.mutableDois.find(S=>S.uid===b.uid).identifier]])]),_:2},1024)]),_:2},1024))),128))]),_:2},1024)]),_:2},1032,["labelled-by"]),d[4]||(d[4]=D()),e.item.hasDisabled?(L(),Q("span",vgt,ee(e.item.hasDisabledMsg),1)):we("",!0)]))),128)),d[6]||(d[6]=D()),H("div",bgt,[e.isSaving?(L(),Ee(zl,{key:0})):we("",!0),d[5]||(d[5]=D()),pe(ms,{"is-disabled":e.isDeposited||e.isSaving,onClick:d[0]||(d[0]=(...h)=>e.isEditingDois?a("saveDois",...h):a("editDois",...h))},{default:te(()=>[D(ee(e.isEditingDois?se(n)("common.save"):se(n)("common.edit")),1)]),_:1},8,["is-disabled"])])]),_:1})]),_:1}))}},_gt={name:"DoiListItem",components:{Badge:kd,Spinner:zl,PkpButton:ms,Expander:Bne,PkpTable:du,TableCell:as,TableColumn:Ei,TableHeader:Ad,TableBody:Kd,TableRow:Bi},props:{apiUrl:{type:String,required:!0},doiApiUrl:{type:String,required:!0},doiPrefix:{type:String,default(){return""}},item:{type:Object,required:!0},isExpanded:{type:Boolean},isSelected:{type:Boolean},enabledDoiTypes:{type:Array,default(){return[]}},versionDois:{type:Boolean,required:!0},registrationAgencyInfo:{type:Object,required:!0},registrationAgencyNames:{type:Object,default(){return{}}}},emits:["update:isSelected","select-item","expand-item","update-successful-doi-edits","deposit-triggered"],data(){return{doiListColumns:[{name:"type",label:this.t("common.type"),value(e){return e.displayType}},{name:"doi",label:this.t("manager.dois.title"),value:"value"}],isEditingDois:!1,isEditingDoisEnabled:!1,isSaving:!1,mutableDois:[],itemsToUpdate:{}}},computed:{currentVersionDoiObjects(){return this.item.doiObjects.filter(e=>e.isCurrentVersion)},depositStatusString(){switch(this.itemDepositStatus){case pkp.const.DOI_STATUS_UNREGISTERED:return this.needsDoi?this.t("manager.dois.status.needsDoi"):this.t("manager.dois.status.unregistered");case pkp.const.DOI_STATUS_SUBMITTED:return this.t("manager.dois.status.submitted");case pkp.const.DOI_STATUS_REGISTERED:return this.t("manager.dois.status.registered");case pkp.const.DOI_STATUS_ERROR:return this.t("manager.dois.status.error");case pkp.const.DOI_STATUS_STALE:return this.t("manager.dois.status.stale");default:return""}},isDeposited(){return[pkp.const.DOI_STATUS_SUBMITTED,pkp.const.DOI_STATUS_REGISTERED].includes(this.itemDepositStatus)},isRegistrationPluginConfigured(){return this.registrationAgencyInfo.isConfigured},isStale(){return this.itemDepositStatus===pkp.const.DOI_STATUS_STALE},itemDepositStatus(){return this.currentVersionDoiObjects.length!==0?this.currentVersionDoiObjects[0].depositStatus:pkp.const.DOI_STATUS_UNREGISTERED},itemRegistrationAgency:function(){return this.item.doiObjects.length!==0?this.item.doiObjects[0].registrationAgency:null},itemRegistrationAgencyName:function(){const e=this.itemRegistrationAgency;return Object.prototype.hasOwnProperty.call(this.registrationAgencyNames,e)?this.registrationAgencyNames[e]:"[".concat(e,"]")},hasErrors(){return this.itemDepositStatus===pkp.const.DOI_STATUS_ERROR},hasErrorMessage(){const e=this.currentVersionDoiObjects[0].errorMessage;return e!=null&&e!==""},hasRegisteredMessage(){const e=this.currentVersionDoiObjects[0].registeredMessage;return e!=null&&e!==""},needsDoi(){return!this.item.doiObjects.some(t=>t.doiId!==null)},publicationStatusLabel(){return this.item.isPublished?this.t("publication.status.published"):this.t("publication.status.unpublished")},versionModalName(){return this.item.type+"-versionsModal-"+this.item.id}},watch:{item:function(){this.updateMutableDois(this.item.doiObjects)}},mounted(){this.updateMutableDois(this.item.doiObjects)},methods:{openViewErrorModal(){const{openDialog:e}=Ms();e({title:this.t("manager.dois.registration.viewError.title"),bodyComponent:fgt,bodyProps:{errorMessageAgencyPreamble:this.registrationAgencyInfo.errorMessagePreamble,errorMessage:this.currentVersionDoiObjects[0].errorMessage},actions:[{label:this.t("common.ok"),callback:t=>{t()}}],modalStyle:"negative"})},openVersionModal(){const{openSideModal:e}=Ms();e(ygt,{isSaving:Ge(()=>this.isSaving),isDeposited:Ge(()=>this.isDeposited),item:this.item,doiListColumns:this.doiListColumns,mutableDois:Ge(()=>this.mutableDois),isEditingDois:Ge(()=>this.isEditingDois),onSaveDois:this.saveDois,onEditDois:this.editDois})},updateMutableDois(e){let t=[];e.forEach(n=>{t.push({uid:n.uid,doiId:n.doiId,identifier:n.identifier,pubObjectType:n.type,pubObjectId:n.id})}),this.mutableDois=t},editDois(){this.isEditingDois=!0},saveDois(){this.mutableDois.forEach(e=>{if(this.item.doiObjects.find(n=>n.uid===e.uid).identifier!==e.identifier){let n={...this.itemsToUpdate};n[e.uid]={isFinished:!1,isSuccess:!1,...e},this.itemsToUpdate=n}}),this.isSaving=!0,Object.keys(this.itemsToUpdate).length!==0?Object.keys(this.itemsToUpdate).forEach(e=>{this.postUpdatedDoi(this.itemsToUpdate[e])}):(this.isSaving=!1,this.isEditingDois=!1)},postUpdatedDoi(e){e.doiId===null?$.when(this.addNewDoi(e)).then(()=>{this.addDoiToPubObject(e)}).catch(t=>{this.postUpdatedDoiComplete(t,e.uid)}):e.identifier===""?this.deleteDoi(e):this.editDoi(e)},addNewDoi(e){return $.ajax({url:"".concat(this.doiApiUrl),type:"POST",headers:{"X-Csrf-Token":pkp.currentUser.csrfToken,contentType:"application/x-www-form-urlencoded"},data:{contextId:this.item.contextId,doi:"".concat(e.identifier)},success(t){e.doiId=t.id},error:t=>this.postUpdatedDoiError(t,e.uid)})},addDoiToPubObject(e){return $.ajax({url:this.item.doiObjects.find(t=>t.uid===e.uid).updateWithNewDoiEndpoint,type:"POST",headers:{"X-Csrf-Token":pkp.currentUser.csrfToken,"X-Http-Method-Override":"PUT",contentType:"application/x-www-form-urlencoded"},data:{doiId:e.doiId},success:t=>this.postUpdatedDoiSuccess(t,e.uid),error:t=>this.postUpdatedDoiError(t,e.uid),complete:t=>this.postUpdatedDoiComplete(t,e.uid)})},editDoi(e){let t={doi:e.identifier};return this.versionDois&&(t.pubObjectType=e.pubObjectType,t.pubObjectId=e.pubObjectId),$.ajax({url:"".concat(this.doiApiUrl,"/").concat(e.doiId),type:"POST",headers:{"X-Csrf-Token":pkp.currentUser.csrfToken,"X-Http-Method-Override":"PUT",contentType:"application/x-www-form-urlencoded"},data:t,success:n=>this.postUpdatedDoiSuccess(n,e.uid),error:n=>this.postUpdatedDoiError(n,e.uid),complete:n=>this.postUpdatedDoiComplete(n,e.uid)})},deleteDoi(e){let t={};return this.versionDois&&(t.pubObjectType=e.pubObjectType,t.pubObjectId=e.pubObjectId),$.ajax({url:"".concat(this.doiApiUrl,"/").concat(e.doiId),type:"POST",headers:{"X-Csrf-Token":pkp.currentUser.csrfToken,"X-Http-Method-Override":"DELETE"},data:t,success:n=>this.postUpdatedDoiSuccess(n,e.uid),error:n=>this.postUpdatedDoiError(n,e.uid),complete:n=>this.postUpdatedDoiComplete(n,e.uid)})},postUpdatedDoiSuccess(e,t){let n={...this.itemsToUpdate};n[t].isSuccess=!0,this.itemsToUpdate=n},postUpdatedDoiError(e,t){let n={...this.itemsToUpdate};n[t].isSuccess=!1,this.itemsToUpdate=n},postUpdatedDoiComplete(e,t){let n={...this.itemsToUpdate};if(n[t].isFinished=!0,this.itemsToUpdate=n,Object.keys(this.itemsToUpdate).every(a=>this.itemsToUpdate[a].isFinished===!0)){let a={...this.itemsToUpdate},l=!1;if(Object.keys(a).forEach(f=>{a[f].isSuccess||(l=!0,delete a[f])}),this.itemsToUpdate=a,l&&pkp.eventBus.$emit("notify",this.t("manager.dois.update.partialFailure"),"warning"),Object.keys(this.itemsToUpdate).length!==0){let f=this;$.ajax({url:"".concat(this.apiUrl,"/").concat(this.item.id),type:"GET",success(d){f.$emit("update-successful-doi-edits",d)},error(d){f.ajaxErrorCallback(d)},complete(d){f.itemsToUpdate={}}})}else this.updateMutableDois(this.item.doiObjects);this.isSaving=!1,this.isEditingDois=!1}},handleDepositorActions(){return this.isDeposited?this.viewRecord():this.triggerDeposit()},viewRecord(){const{openDialog:e}=Ms();e({title:this.t("manager.dois.registration.viewRecord.title"),bodyComponent:pgt,bodyProps:{registeredMessageAgencyPreamble:this.registrationAgencyInfo.registeredMessagePreamble,registeredMessage:this.currentVersionDoiObjects[0].registeredMessage},actions:[{label:this.t("common.ok"),isPrimary:!0,callback:t=>{t()}}],modalStyle:"primary"})},triggerDeposit(){this.$emit("deposit-triggered",[this.item.id],"deposit")},toggleSelected(){this.$emit("select-item",this.item.id)},toggleExpanded(){this.$emit("expand-item",this.item.id)}}},Sgt=["id"],Cgt={class:"listPanel__itemSummary"},wgt={class:"doiListItem__selectWrapper"},Egt={class:"doiListItem__selector"},kgt=["name","value","checked"],xgt={class:"listPanel__itemIdentity"},Tgt={class:"listPanel__itemTitle doiListItem__itemTitle"},Igt={class:"listPanel__itemSubtitle"},Agt=["href"],Ogt={class:"listPanel__itemActions"},Rgt={class:"doiListItem__itemMetadata"},Dgt={key:0,class:"listPanel__itemExpanded listPanel__itemExpanded--doi mt-2"},Lgt=["for"],Pgt=["id","onUpdate:modelValue","readonly","disabled"],Mgt={key:0},Ngt={class:"listPanel__itemExpandedActions doiListPanel__itemExpandedActions"},Fgt={key:0,class:"doiListPanel__itemExpandedActions--actionsBar"},$gt={key:1,class:"doiListItem__depositorDetails"},Bgt={class:"doiListItem__depositorName"},Vgt={key:0,class:"doiListItem__depositorDescription"},Hgt={key:1,class:"doiListItem__depositorDescription"},Ugt={class:"doiListItem__depositorActions"};function zgt(e,t,n,i,a,l){const f=Xe("Badge"),d=Xe("Expander"),h=Xe("TableColumn"),b=Xe("TableHeader"),S=Xe("TableCell"),k=Xe("TableRow"),T=Xe("TableBody"),O=Xe("PkpTable"),P=Xe("Spinner"),B=Xe("PkpButton");return L(),Q("div",{id:"list-item-".concat(n.item.type,"-").concat(n.item.id),class:"listPanel__item--doi"},[H("div",Cgt,[H("label",wgt,[H("div",Egt,[H("input",{type:"checkbox",name:"".concat(n.item.type,"[]"),value:n.item.id,checked:n.isSelected,onChange:t[0]||(t[0]=W=>e.$emit("update:isSelected",W.target.checked)),onClick:t[1]||(t[1]=(...W)=>l.toggleSelected&&l.toggleSelected(...W))},null,40,kgt)])]),t[5]||(t[5]=D()),H("div",xgt,[H("div",Tgt,[H("span",Igt,[H("a",{href:n.item.urlPublished,target:"_blank",rel:"noopener noreferrer"},ee(n.item.title),9,Agt)])])]),t[6]||(t[6]=D()),H("div",Ogt,[D(ee(n.item.id)+" ",1),H("div",Rgt,[pe(f,{class:"doiListItem__itemMetadata--badge","is-warnable":n.item.isPublished&&(!l.isDeposited&&l.isRegistrationPluginConfigured||l.isDeposited&&l.isRegistrationPluginConfigured&&l.isStale||l.hasErrors),"is-primary":n.item.isPublished&&l.isDeposited},{default:te(()=>[D(ee(n.item.isPublished?l.depositStatusString:l.publicationStatusLabel),1)]),_:1},8,["is-warnable","is-primary"])]),t[4]||(t[4]=D()),pe(d,{"is-expanded":n.isExpanded,"item-name":n.item.id.toString(),onToggle:l.toggleExpanded},null,8,["is-expanded","item-name","onToggle"])])]),t[17]||(t[17]=D()),n.isExpanded?(L(),Q("div",Dgt,[pe(O,null,{default:te(()=>[pe(b,null,{default:te(()=>[(L(!0),Q(bt,null,Sn(a.doiListColumns,W=>(L(),Ee(h,{id:W.name,key:W.name},{default:te(()=>[D(ee(W.label),1)]),_:2},1032,["id"]))),128))]),_:1}),t[8]||(t[8]=D()),pe(T,null,{default:te(()=>[(L(!0),Q(bt,null,Sn(l.currentVersionDoiObjects,W=>(L(),Ee(k,{key:W.column},{default:te(()=>[pe(S,null,{default:te(()=>[H("label",{for:W.uid,class:Rn({labelDisabled:W.disabled})},ee(W.displayType),11,Lgt)]),_:2},1024),t[7]||(t[7]=D()),pe(S,null,{default:te(()=>[Gn(H("input",{id:W.uid,"onUpdate:modelValue":Z=>a.mutableDois.find(Y=>Y.uid===W.uid).identifier=Z,class:"pkpFormField__input pkpFormField--text__input",type:"text",readonly:!(a.isEditingDois&&!a.isSaving),disabled:a.isEditingDois&&W.disabled},null,8,Pgt),[[lu,a.mutableDois.find(Z=>Z.uid===W.uid).identifier]])]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1}),t[14]||(t[14]=D()),n.item.hasDisabled?(L(),Q("span",Mgt,ee(n.item.hasDisabledMsg),1)):we("",!0),t[15]||(t[15]=D()),H("div",Ngt,[n.item.versions.length>1&&!a.isEditingDois&&!a.isSaving&&n.versionDois?(L(),Q("div",Fgt,[D(ee(e.t("doi.manager.versions.countStatement",{count:n.item.versions.length}))+" ",1),H("button",{ref:l.versionModalName,class:Rn("-linkButton"),onClick:t[2]||(t[2]=(...W)=>l.openVersionModal&&l.openVersionModal(...W))},ee(e.t("doi.manager.versions.view")),513)])):we("",!0),t[9]||(t[9]=D()),a.isSaving?(L(),Ee(P,{key:1})):we("",!0),t[10]||(t[10]=D()),pe(B,{"is-disabled":l.isDeposited||a.isSaving,onClick:t[3]||(t[3]=W=>a.isEditingDois?l.saveDois():l.editDois())},{default:te(()=>[D(ee(a.isEditingDois?e.t("common.save"):e.t("common.edit")),1)]),_:1},8,["is-disabled"])]),t[16]||(t[16]=D()),l.isRegistrationPluginConfigured?(L(),Q("div",$gt,[H("div",Bgt,ee(n.registrationAgencyInfo.displayName),1),t[12]||(t[12]=D()),n.item.isPublished?(L(),Q("span",Vgt,ee(l.isDeposited?l.itemRegistrationAgency===null?e.t("manager.dois.registration.manuallyMarkedRegistered"):e.t("manager.dois.registration.submittedDescription",{registrationAgency:l.itemRegistrationAgencyName}):e.t("manager.dois.registration.notSubmittedDescription",{registrationAgency:n.registrationAgencyInfo.displayName})),1)):(L(),Q("span",Hgt,ee(e.t("manager.dois.registration.notPublishedDescription")),1)),t[13]||(t[13]=D()),H("div",Ugt,[l.isDeposited&&l.hasRegisteredMessage?(L(),Ee(B,{key:0,ref:"recordedMessageModalButton","is-disabled":a.isEditingDois,onClick:l.viewRecord},{default:te(()=>[D(ee(e.t("manager.dois.registration.viewRecord")),1)]),_:1},8,["is-disabled","onClick"])):!l.isDeposited&&n.item.isPublished?(L(),Ee(B,{key:1,"is-disabled":a.isEditingDois,onClick:l.handleDepositorActions},{default:te(()=>[D(ee(e.t("manager.dois.registration.depositDois")),1)]),_:1},8,["is-disabled","onClick"])):we("",!0),t[11]||(t[11]=D()),l.hasErrors&&l.hasErrorMessage?(L(),Ee(B,{key:2,ref:"errorMessageModalButton","is-disabled":a.isEditingDois,onClick:l.openViewErrorModal},{default:te(()=>[D(ee(e.t("manager.dois.registration.viewError")),1)]),_:1},8,["is-disabled","onClick"])):we("",!0)])])):we("",!0)])):we("",!0)],8,Sgt)}const Wgt=wt(_gt,[["render",zgt]]),jgt={__name:"DoiStatusInfoModal",setup(e){const{t}=Jn();return(n,i)=>(L(),Ee(il,null,{title:te(()=>[D(ee(se(t)("manager.dois.help.statuses.title")),1)]),default:te(()=>[i[15]||(i[15]=D()),pe(Lu,null,{default:te(()=>[pe(du,null,{default:te(()=>[pe(Ad,null,{default:te(()=>[pe(Ei,null,{default:te(()=>[D(ee(se(t)("common.status")),1)]),_:1}),i[0]||(i[0]=D()),pe(Ei,null,{default:te(()=>[D(ee(se(t)("common.description")),1)]),_:1})]),_:1}),i[8]||(i[8]=D()),pe(Bi,null,{default:te(()=>[pe(as,{"is-row-header":!0},{default:te(()=>[D(ee(se(t)("manager.dois.status.needsDoi")),1)]),_:1}),i[1]||(i[1]=D()),pe(as,null,{default:te(()=>[D(ee(se(t)("manager.dois.status.needsDoi.description")),1)]),_:1})]),_:1}),i[9]||(i[9]=D()),pe(Bi,null,{default:te(()=>[pe(as,{"is-row-header":!0},{default:te(()=>[D(ee(se(t)("manager.dois.filters.doiAssigned")),1)]),_:1}),i[2]||(i[2]=D()),pe(as,null,{default:te(()=>[D(ee(se(t)("manager.dois.filters.doiAssigned.description")),1)]),_:1})]),_:1}),i[10]||(i[10]=D()),pe(Bi,null,{default:te(()=>[pe(as,{"is-row-header":!0},{default:te(()=>[D(ee(se(t)("manager.dois.status.unregistered")),1)]),_:1}),i[3]||(i[3]=D()),pe(as,null,{default:te(()=>[D(ee(se(t)("manager.dois.status.unregistered.description")),1)]),_:1})]),_:1}),i[11]||(i[11]=D()),pe(Bi,null,{default:te(()=>[pe(as,{"is-row-header":!0},{default:te(()=>[D(ee(se(t)("manager.dois.status.submitted")),1)]),_:1}),i[4]||(i[4]=D()),pe(as,null,{default:te(()=>[D(ee(se(t)("manager.dois.status.submitted.description")),1)]),_:1})]),_:1}),i[12]||(i[12]=D()),pe(Bi,null,{default:te(()=>[pe(as,{"is-row-header":!0},{default:te(()=>[D(ee(se(t)("manager.dois.status.registered")),1)]),_:1}),i[5]||(i[5]=D()),pe(as,null,{default:te(()=>[D(ee(se(t)("manager.dois.status.registered.description")),1)]),_:1})]),_:1}),i[13]||(i[13]=D()),pe(Bi,null,{default:te(()=>[pe(as,{"is-row-header":!0},{default:te(()=>[D(ee(se(t)("manager.dois.status.error.filterTitle")),1)]),_:1}),i[6]||(i[6]=D()),pe(as,null,{default:te(()=>[D(ee(se(t)("manager.dois.status.error.description")),1)]),_:1})]),_:1}),i[14]||(i[14]=D()),pe(Bi,null,{default:te(()=>[pe(as,{"is-row-header":!0},{default:te(()=>[D(ee(se(t)("manager.dois.status.stale")),1)]),_:1}),i[7]||(i[7]=D()),pe(as,null,{default:te(()=>[D(ee(se(t)("manager.dois.status.stale.description")),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))}},Zgt={class:"list-inside list-disc"},qgt={__name:"DoiFailedActionDialogBody",props:{failedDoiActions:{type:Array,required:!0}},setup(e){const{t}=Jn();return(n,i)=>(L(),Q(bt,null,[H("p",null,ee(se(t)("manager.dois.update.partialFailure")),1),i[0]||(i[0]=D()),H("ul",Zgt,[(L(!0),Q(bt,null,Sn(e.failedDoiActions,(a,l)=>(L(),Q("li",{key:l},ee(a),1))),128))])],64))}},Ggt={components:{PkpButton:ms,Icon:Vs,Spinner:zl,Notification:yH,DoiListItem:Wgt,Dropdown:Ww,FieldSelect:e9,ListPanel:Vf,Pagination:d0,PkpFilter:_C,PkpFilterAutosuggest:Nne,PkpHeader:Bf,Search:j1,Modal:h9},mixins:[Od,SC],props:{id:{type:String,required:!0},items:{type:Array,default(){return[]}},itemsMax:{type:Number,default(){return 0}},itemType:{type:String,required:!0},filters:{type:Array,default(){return[]}},title:{type:String,required:!0},doiPrefix:{type:String,default(){return""}},enabledDoiTypes:{type:Array,default(){return[]}},versionDois:{type:Boolean,required:!0},doiApiUrl:{type:String,required:!0},executeActionApiUrl:{type:String,required:!0},registrationAgencyInfo:{type:Object,required:!0},registrationAgencyNames:{type:Object,default(){return{}}},publishedStatuses:{type:Object,required:!0}},data(){return{activeFilters:{},selected:[],expanded:[],failedDoiActions:[]}},computed:{canAssignDois(){var e;return this.doiPrefix&&((e=this.doiPrefix)==null?void 0:e.length)>0&&this.enabledDoiTypes.length>0},isAllSelected(){return this.selected.length&&this.selected.length===this.items.length},isAllExpanded(){return this.expanded.length&&this.expanded.length===this.items.length},mappedItems(){return this.items.map(e=>{let t={id:e.id,type:this.itemType,title:this.getItemTitle(e),urlPublished:this.getUrlPublished(e),isPublished:this.getIsPublished(e),versions:this.getVersions(e),doiObjects:[]};return t=this.addDoiObjects(t),t})},isRegistrationPluginConfigured(){return this.registrationAgencyInfo.isConfigured}},watch:{failedDoiActions(e,t){const{openDialog:n}=Ms();e.length!==0&&n({title:this.t("manager.dois.update.failedCreation"),actions:[{label:this.t("common.ok"),callback:i=>{this.failedDoiActions=[],i()}}],modalStyle:"negative",bodyComponent:qgt,bodyProps:{failedDoiActions:this.failedDoiActions},close:()=>{this.failedDoiActions=[]}})}},methods:{openStatusInfoModal(){const{openSideModal:e}=Ms();e(jgt)},setItems(e,t){this.$emit("set",this.id,{items:e,itemsMax:t})},selectItem(e){this.selected.includes(e)?this.selected=this.selected.filter(t=>t!==e):this.selected.push(e)},expandItem(e){this.expanded.includes(e)?this.expanded=this.expanded.filter(t=>t!==e):this.expanded.push(e)},toggleExpandAll(){this.isAllExpanded?this.expanded=[]:this.expanded=this.items.map(e=>e.id)},toggleSelectAll(){this.isAllSelected?this.selected=[]:this.selected=this.items.map(e=>e.id)},addFilter(e,t){let n={...this.activeFilters};e==="unregistered"&&(n.doiStatus=pkp.const.DOI_STATUS_UNREGISTERED,n[this.publishedStatuses.name]=this.publishedStatuses.published),e==="doiStatus"&&t!==pkp.const.DOI_STATUS_UNREGISTERED&&delete n.unregistered,n[e]=t,this.activeFilters=n},isFilterActive:function(e,t){return Object.keys(this.activeFilters).includes(e)?Array.isArray(this.activeFilters[e])?this.activeFilters[e].includes(t):this.activeFilters[e]===t:!1},removeFilter(e,t){let n={...this.activeFilters};e==="unregistered"&&(delete n[this.publishedStatuses.name],delete n.doiStatus),delete n[e],this.activeFilters=n},openBulkDeposit(e=[]){const t=e.length>0?e:this.selected,n=this.t("manager.dois.actions.deposit.label"),i=this.t("manager.dois.actions.deposit.prompt",{count:t.length,registrationAgency:this.registrationAgencyInfo.displayName});this.openBulkActionDialog(n,i,a=>{let l=this;l.loading=!0,$.ajax({...this.getBulkActionAjaxProps("deposit","PUT"),data:{ids:t},success:()=>{pkp.eventBus.$emit("notify",this.t("manager.dois.notification.depositQueuedSuccess"),"success")},error:f=>this.ajaxErrorCallback(f),complete:()=>(l.isloading=!1,this.onBulkActionComplete(a))})})},openBulkExport(){const e=this.t("manager.dois.actions.export.label"),t=this.t("manager.dois.actions.export.prompt",{count:this.selected.length,registrationAgency:this.registrationAgencyInfo.displayName});this.openBulkActionDialog(e,t,n=>{$.ajax({...this.getBulkActionAjaxProps("export","PUT"),data:{ids:this.selected},success:i=>{const a=document.createElement("a");a.href="".concat(this.doiApiUrl,"/exports/").concat(i.temporaryFileId),document.body.appendChild(a),a.click(),document.body.removeChild(a),pkp.eventBus.$emit("notify",this.t("manager.dois.notification.exportSuccess"),"success")},error:i=>this.ajaxErrorCallback(i),complete:()=>this.onBulkActionComplete(n)})})},openBulkMarkRegistered(){const e=this.t("manager.dois.actions.markRegistered.label"),t=this.t("manager.dois.actions.markRegistered.prompt",{count:this.selected.length});this.openBulkActionDialog(e,t,n=>{$.ajax({...this.getBulkActionAjaxProps("markRegistered","PUT"),data:{ids:this.selected},success:()=>{pkp.eventBus.$emit("notify",this.t("manager.dois.notification.markRegisteredSuccess"),"success")},error:i=>{if(Object.prototype.hasOwnProperty.call(i.responseJSON,"failedDoiActions")){this.failedDoiActions=i.responseJSON.failedDoiActions;return}return this.ajaxErrorCallback(i)},complete:()=>this.onBulkActionComplete(n)})})},openBulkMarkUnregistered(){const e=this.t("manager.dois.actions.markUnregistered.label"),t=this.t("manager.dois.actions.markUnregistered.prompt",{count:this.selected.length});this.openBulkActionDialog(e,t,n=>{$.ajax({...this.getBulkActionAjaxProps("markUnregistered","PUT"),data:{ids:this.selected},success:()=>{pkp.eventBus.$emit("notify",this.t("manager.dois.notification.markUnregisteredSuccess"),"success")},error:i=>this.ajaxErrorCallback(i),complete:()=>this.onBulkActionComplete(n)})})},openBulkMarkStale(){const e=this.t("manager.dois.actions.markStale.label"),t=this.t("manager.dois.actions.markStale.prompt",{count:this.selected.length});this.openBulkActionDialog(e,t,n=>{$.ajax({...this.getBulkActionAjaxProps("markStale","PUT"),data:{ids:this.selected},success:()=>{pkp.eventBus.$emit("notify",this.t("manager.dois.notification.markStaleSuccess"),"success")},error:i=>{if(Object.prototype.hasOwnProperty.call(i.responseJSON,"failedDoiActions")){this.failedDoiActions=i.responseJSON.failedDoiActions;return}return this.ajaxErrorCallback(i)},complete:()=>this.onBulkActionComplete(n)})})},openBulkAssign(){const e=this.t("manager.dois.actions.assign.label"),t=this.t("manager.dois.actions.assign.prompt",{count:this.selected.length});this.openBulkActionDialog(e,t,n=>{$.ajax({...this.getBulkActionAjaxProps("assignDois"),data:{ids:this.selected},success:()=>{pkp.eventBus.$emit("notify",this.t("manager.dois.notification.assignDoisSuccess"),"success")},error:i=>{if(Object.prototype.hasOwnProperty.call(i.responseJSON,"failedDoiActions")){this.failedDoiActions=i.responseJSON.failedDoiActions;return}return this.ajaxErrorCallback(i)},complete:()=>this.onBulkActionComplete(n)})})},openBulkDepositAll(){const e=this.t("manager.dois.actions.depositAll.label"),t=this.t("manager.dois.actions.depositAll.prompt",{registrationAgency:this.registrationAgencyInfo.displayName});this.openBulkActionDialog(e,t,n=>{$.ajax({url:"".concat(this.doiApiUrl,"/depositAll"),type:"POST",headers:{"X-Csrf-Token":pkp.currentUser.csrfToken,"X-Http-Method-Override":"PUT"},success:()=>{pkp.eventBus.$emit("notify",this.t("manager.dois.notification.depositQueuedSuccess"),"success")},error:i=>this.ajaxErrorCallback(i),complete:()=>this.onBulkActionComplete(n)})})},openBulkActionDialog(e,t,n){this.openDialog({name:"bulkActions",title:e,message:t,actions:[{label:e,isPrimary:!0,callback:n},{label:this.t("common.cancel"),isWarnable:!0,callback:i=>i()}],modalStyle:"primary"})},getBulkActionAjaxProps(e,t="POST"){let n={"X-Csrf-Token":pkp.currentUser.csrfToken};return t!=="POST"&&(n["X-Http-Method-Override"]=t),{url:"".concat(this.executeActionApiUrl,"/").concat(e),type:"POST",headers:n}},onBulkActionComplete(e){e(),this.get(),this.selected=[]},updateSuccessfulDoiEdits(e){let t=this.items.map(n=>n.id===e.id?e:n);pkp.eventBus.$emit("notify",this.t("manager.dois.update.success"),"success"),this.setItems(t,this.itemsMax)},getCurrentPublication(e){return e.publications.find(t=>t.id===e.currentPublicationId)},addDoiObjects(e){return e},getItemTitle(e){return this.getItemTitleBase(e)},getItemTitleBase(e){const t=this.getCurrentPublication(e),n=t.authorsStringShort,i=this.localize(t.fullTitle);return"".concat(n," — ").concat(i)},getUrlPublished(e){return this.getUrlPublishedBase(e)},getUrlPublishedBase(e){return this.getCurrentPublication(e).urlPublished},getIsPublished(e){return this.getIsPublishedBase(e)},getIsPublishedBase(e){return e.status===pkp.const.STATUS_PUBLISHED},getVersions(e){var t;return((t=e.publications)==null?void 0:t.map(n=>({id:n.id,isCurrentVersion:e.currentPublicationId===n.id,versionNumber:n.version,urlPublished:n.urlPublished,datePublished:n.datePublished})))||[]},mapDoiObject(e,t){return{doiId:e===null?null:e.id,identifier:e===null?"":e.doi,depositStatus:e===null?pkp.const.DOI_STATUS_UNREGISTERED:e.status,errorMessage:e===null?null:e[this.registrationAgencyInfo.errorMessageKey],registeredMessage:e===null?null:e[this.registrationAgencyInfo.registeredMessageKey],registrationAgency:e===null?null:e.registrationAgency,...t}}}},Kgt={class:"doiListPanel"},Ygt={class:"pkpDropdown__section"},Xgt={class:"pkpDropdown__section"},Jgt={class:"mb-1 mt-1 pl-2 pr-2 text-base-normal leading-5"},Qgt={key:0},e0t={key:1},t0t={key:2};function n0t(e,t,n,i,a,l){const f=Xe("Spinner"),d=Xe("Search"),h=Xe("Dropdown"),b=Xe("PkpButton"),S=Xe("PkpHeader"),k=Xe("Icon"),T=Xe("DoiListItem"),O=Xe("Pagination"),P=Xe("ListPanel");return L(),Q("div",Kgt,[is(e.$slots,"default",{},()=>[pe(P,{items:l.mappedItems,"is-sidebar-visible":!0},{header:te(()=>[pe(S,null,{actions:te(()=>[pe(d,{"search-phrase":e.searchPhrase,onSearchPhraseChanged:e.setSearchPhrase},null,8,["search-phrase","onSearchPhraseChanged"]),t[17]||(t[17]=D()),pe(h,{label:e.t("manager.dois.actions.bulkActions"),class:"doiListPanel__bulkActions"},{default:te(()=>[H("div",Ygt,[H("ul",null,[H("li",null,[H("button",{class:"pkpDropdown__action",onClick:t[0]||(t[0]=(...B)=>l.toggleSelectAll&&l.toggleSelectAll(...B))},ee(l.isAllSelected?e.t("common.selectNone"):e.t("common.selectAll")),1)]),t[9]||(t[9]=D()),H("li",null,[H("button",{class:"pkpDropdown__action",onClick:t[1]||(t[1]=(...B)=>l.toggleExpandAll&&l.toggleExpandAll(...B))},ee(l.isAllExpanded?e.t("list.collapseAll"):e.t("list.expandAll")),1)])])]),t[16]||(t[16]=D()),H("div",Xgt,[H("div",Jgt,ee(e.t("manager.dois.actions.description",{count:a.selected.length})),1),t[15]||(t[15]=D()),H("ul",null,[l.isRegistrationPluginConfigured?(L(),Q("li",Qgt,[H("button",{class:"pkpDropdown__action",onClick:t[2]||(t[2]=(...B)=>l.openBulkExport&&l.openBulkExport(...B))},ee(e.t("manager.dois.actions.export.label")),1)])):we("",!0),t[10]||(t[10]=D()),H("li",null,[H("button",{class:"pkpDropdown__action",onClick:t[3]||(t[3]=(...B)=>l.openBulkMarkRegistered&&l.openBulkMarkRegistered(...B))},ee(e.t("manager.dois.actions.markRegistered.label")),1)]),t[11]||(t[11]=D()),H("li",null,[H("button",{class:"pkpDropdown__action",onClick:t[4]||(t[4]=(...B)=>l.openBulkMarkUnregistered&&l.openBulkMarkUnregistered(...B))},ee(e.t("manager.dois.actions.markUnregistered.label")),1)]),t[12]||(t[12]=D()),H("li",null,[H("button",{class:"pkpDropdown__action",onClick:t[5]||(t[5]=(...B)=>l.openBulkMarkStale&&l.openBulkMarkStale(...B))},ee(e.t("manager.dois.actions.markStale.label")),1)]),t[13]||(t[13]=D()),l.canAssignDois?(L(),Q("li",e0t,[H("button",{class:"pkpDropdown__action",onClick:t[6]||(t[6]=(...B)=>l.openBulkAssign&&l.openBulkAssign(...B))},ee(e.t("manager.dois.actions.assign.label")),1)])):we("",!0),t[14]||(t[14]=D()),l.isRegistrationPluginConfigured?(L(),Q("li",t0t,[H("button",{class:"pkpDropdown__action",onClick:t[7]||(t[7]=(...B)=>l.openBulkDeposit&&l.openBulkDeposit(...B))},ee(e.t("manager.dois.actions.deposit.label")),1)])):we("",!0)])])]),_:1},8,["label"]),t[18]||(t[18]=D()),l.isRegistrationPluginConfigured?(L(),Ee(b,{key:0,"is-primary":!0,onClick:l.openBulkDepositAll},{default:te(()=>[D(ee(e.t("manager.dois.actions.deposit.all")),1)]),_:1},8,["onClick"])):we("",!0)]),default:te(()=>[H("h2",null,ee(n.title),1),t[19]||(t[19]=D()),e.isLoading?(L(),Ee(f,{key:0})):we("",!0),t[20]||(t[20]=D())]),_:1})]),sidebar:te(()=>[pe(S,{"is-one-line":!1},{actions:te(()=>[H("button",{class:"doiListPanel__statusInfoButton",onClick:t[8]||(t[8]=(...B)=>l.openStatusInfoModal&&l.openStatusInfoModal(...B))},[pe(k,{icon:"AnonymousReview",class:"mt-1 h-4 w-4"})])]),default:te(()=>[H("h3",null,[pe(k,{icon:"Filter",class:"h-4 w-4",inline:!0}),D(" "+ee(e.t("common.filter")),1)]),t[21]||(t[21]=D())]),_:1}),t[23]||(t[23]=D()),(L(!0),Q(bt,null,Sn(n.filters,(B,W)=>(L(),Q("div",{key:W,class:"listPanel__block"},[B.heading?(L(),Ee(S,{key:0},{default:te(()=>[H("h4",null,ee(B.heading),1)]),_:2},1024)):we("",!0),t[22]||(t[22]=D()),(L(!0),Q(bt,null,Sn(B.filters,Z=>(L(),Ee(Io(Z.filterType||"pkp-filter"),Cn({key:Z.param+Z.value,ref_for:!0},Z,{"is-filter-active":l.isFilterActive(Z.param,Z.value),onAddFilter:l.addFilter,onRemoveFilter:l.removeFilter,onUpdateFilter:l.addFilter}),null,16,["is-filter-active","onAddFilter","onRemoveFilter","onUpdateFilter"]))),128))]))),128))]),itemsEmpty:te(()=>[e.isLoading?(L(),Q(bt,{key:0},[pe(f),D(" "+ee(e.t("common.loading")),1)],64)):(L(),Q(bt,{key:1},[D(ee(e.t("common.noItemsFound")),1)],64))]),item:te(({item:B})=>[is(e.$slots,"item",{item:B},()=>[(L(),Ee(T,{key:B.id,item:B,"api-url":e.apiUrl,"doi-api-url":n.doiApiUrl,"doi-prefix":n.doiPrefix,"is-selected":a.selected.includes(B.id),"is-expanded":a.expanded.includes(B.id),"enabled-doi-types":n.enabledDoiTypes,"version-dois":n.versionDois,"registration-agency-info":n.registrationAgencyInfo,"registration-agency-names":n.registrationAgencyNames,onSelectItem:l.selectItem,onExpandItem:l.expandItem,onDepositTriggered:l.openBulkDeposit,onUpdateSuccessfulDoiEdits:l.updateSuccessfulDoiEdits},null,8,["item","api-url","doi-api-url","doi-prefix","is-selected","is-expanded","enabled-doi-types","version-dois","registration-agency-info","registration-agency-names","onSelectItem","onExpandItem","onDepositTriggered","onUpdateSuccessfulDoiEdits"]))])]),footer:te(()=>[e.lastPage>1?(L(),Ee(O,{key:0,"current-page":e.currentPage,"is-loading":e.isLoading,"last-page":e.lastPage,onSetPage:e.setPage},null,8,["current-page","is-loading","last-page","onSetPage"])):we("",!0)]),_:3},8,["items"])])])}const s0t={name:"DoiPageOJS",components:{DoiListPanel:{name:"DoiListPanelOJS",extends:wt(Ggt,[["render",n0t]]),methods:{addDoiObjects(e){let t=e;const n=this.items.find(i=>i.id===e.id);if(this.itemType==="submission")n.publications.forEach(i=>{const a=i.id===this.getCurrentPublication(n).id,l=i.version;if(this.enabledDoiTypes.includes("publication")){let f=i.doiObject,d="".concat(this.doiApiUrl,"/publications/").concat(n.currentPublicationId);d=d.replace(/dois/g,"_dois"),t.doiObjects.push(this.mapDoiObject(f,{id:i.id,uid:"".concat(n.id,"-article-").concat(i.id),displayType:this.t("article.article"),type:"publication",isCurrentVersion:a,versionNumber:l,updateWithNewDoiEndpoint:d}))}this.enabledDoiTypes.includes("representation")&&i.galleys.forEach(f=>{const d=f.doiObject;let h="".concat(this.doiApiUrl,"/galleys/").concat(f.id);h=h.replace(/dois/g,"_dois"),t.doiObjects.push(this.mapDoiObject(d,{id:f.id,uid:"".concat(n.id,"-representation-").concat(f.id),displayType:f.label,type:"representation",isCurrentVersion:a,versionNumber:l,updateWithNewDoiEndpoint:h}))})});else if(this.itemType==="issue"&&this.enabledDoiTypes.includes("issue")){let i=n.doiObject,a="".concat(this.doiApiUrl,"/issues/").concat(n.id);a=a.replace(/dois/g,"_dois"),t.doiObjects.push(this.mapDoiObject(i,{id:n.id,uid:"".concat(n.id,"-issue"),displayType:this.t("issue.issue"),type:"issue",isCurrentVersion:!0,versionNumber:1,updateWithNewDoiEndpoint:a}))}return t},getItemTitle(e){return this.itemType==="submission"?this.getItemTitleBase(e):e.identification},getUrlPublished(e){return this.itemType==="submission"?this.getUrlPublishedBase(e):e.publishedUrl},getIsPublished(e){return this.itemType==="submission"?this.getIsPublishedBase(e):e.published}}}},extends:f0},jb={email:"email",form:"form",promoteFiles:"promoteFiles"},o0t={components:{ButtonRow:r0,Composer:Mne,ListPanel:Vf,PkpForm:oa,SelectSubmissionFileListItem:tU,Tooltip:Tc},extends:f0,mixins:[Od,wd,Vne],data(){return{abandonDecisionLabel:"",cancelConfirmationPrompt:"",currentStep:{},decision:0,decisionCompleteLabel:"",decisionCompleteDescription:"",emailTemplatesApiUrl:"",startedSteps:[],isSubmitting:!1,keepWorkingLabel:"",reviewRoundId:0,skippedSteps:[],stageId:0,steps:[],submissionUrl:"",submissionSummaryUrl:"",submissionApiUrl:"",submissionListUrl:"",viewAllSubmissionsLabel:"",viewSubmissionLabel:""}},computed:{currentStepIndex(){return this.steps.findIndex(e=>e.id===this.currentStep.id)},errors(){return this.steps.filter(e=>Object.keys(e.errors).length||e.type===jb.form&&Object.keys(e.form.errors).length).reduce((e,t)=>(e[t.id]=this.replaceLocaleParams(this.stepErrorMessage,{stepName:t.name}),e),{})},isOnFirstStep(){return this.currentStepIndex===0},isOnLastStep(){return this.currentStepIndex===this.steps.length-1},returnUrlToSubmissionSummary(){var i;const e=window.location.search,n=new URLSearchParams(e).get("ret");if(n){let a=decodeURIComponent(n);return"".concat((i=pkp==null?void 0:pkp.context)==null?void 0:i.pageBaseUrl).concat(a)}return null}},created(){this.steps.length&&(this.openStep(this.steps[0].id),this.steps=this.steps.map(e=>e.type!==jb.email?e:{...e,attachments:[],subject:"",body:"",cc:"",bcc:"",recipients:e.recipientOptions.map(t=>t.value)}))},methods:{cancel(){const e=this.returnUrlToSubmissionSummary?this.returnUrlToSubmissionSummary:this.submissionUrl;this.openDialog({name:"cancel",title:this.abandonDecisionLabel,message:this.cancelConfirmationPrompt,actions:[{label:this.abandonDecisionLabel,isWarnable:!0,callback:()=>{window.location=e}},{label:this.keepWorkingLabel,callback:t=>t()}],modalStyle:"negative"})},copyFile(e,t,n){$.ajax({url:this.submissionApiUrl+"/files/"+e+"/copy?"+$.param({stageId:this.stageId}),type:"POST",data:{toFileStage:t},headers:{"X-Csrf-Token":pkp.currentUser.csrfToken,"X-Http-Method-Override":"PUT"},error:this.ajaxErrorCallback,complete:n})},nextStep(){const e=1+this.currentStepIndex;this.steps.length<=e?this.submit():this.openStep(this.steps[e].id)},openCompletedDialog(){let e,t;this.returnUrlToSubmissionSummary?(e=[{label:this.viewSubmissionSummaryLabel,element:"a",href:this.returnUrlToSubmissionSummary}],t=()=>{window.location=this.returnUrlToSubmissionSummary}):(e=[{label:this.viewSubmissionLabel,element:"a",href:this.submissionUrl},{label:this.viewAllSubmissionsLabel,element:"a",href:this.submissionListUrl}],t=()=>{window.location=this.submissionUrl}),this.openDialog({name:"completed",title:this.decisionCompleteLabel,message:this.decisionCompleteDescription,actions:e,close:t,modalStyle:"success"})},openStep(e){this.startedSteps=[...new Set([...this.startedSteps,e])],this.currentStep=this.steps.find(t=>t.id===e)},previousStep(){const e=this.currentStepIndex-1;e>=0&&this.openStep(this.steps[e].id)},setStepErrors(e){this.steps.forEach((t,n)=>{n in e&&(t.type===jb.form?t.form.errors=e[n]:t.errors=e[n])})},toggleSkippedStep(e){this.skippedSteps.includes(e)?this.skippedSteps=this.skippedSteps.filter(t=>t!==e):(this.skippedSteps.push(e),this.steps=this.steps.map(t=>(t.id===e&&(t.errors={}),t)),this.steps.findIndex(t=>t.id===e)<this.steps.length-1&&this.nextStep())},submit(){this.isSubmitting=!0;const e=this.steps.filter(i=>!this.skippedSteps.includes(i.id)),t={decision:this.decision,actions:e.filter(i=>[jb.form,jb.email].includes(i.type)).map(i=>{let a={id:i.id};if(i.type===jb.form)return i.form.fields.forEach(l=>{a[l.name]=l.value}),a;if(i.type===jb.email){const l=i.bcc.trim(),f=i.cc.trim();return{...a,attachments:i.attachments,bcc:l?l.split(",").map(d=>d.trim()):[],cc:f?f.split(",").map(d=>d.trim()):[],locale:i.locale,recipients:i.canChangeRecipients?i.recipients:[],subject:i.subject,body:i.body}}})};this.reviewRoundId&&(t.reviewRoundId=this.reviewRoundId);const n=e.filter(i=>i.type===jb.promoteFiles&&i.selected.length).reduce((i,a)=>(a.selected.forEach(l=>{i.push({id:l,toFileStage:a.to})}),i),[]);$.ajax({url:this.submissionApiUrl+"/decisions",type:"POST",context:this,data:t,headers:{"X-Csrf-Token":pkp.currentUser.csrfToken},error(i){i.status&&i.status===400?i.responseJSON.decision?this.ajaxErrorCallback({responseJSON:{errorMessage:i.responseJSON.decision[0]}}):i.responseJSON.actions?this.setStepErrors(i.responseJSON.actions):this.ajaxErrorCallback(i):this.ajaxErrorCallback(i),this.isSubmitting=!1},success(){n.length||(this.isSubmitting=!1,this.openCompletedDialog());let i=0;const a=()=>{i++,i>=n.length&&(this.openCompletedDialog(),clearInterval(a))};n.forEach(l=>this.copyFile(l.id,l.toFileStage,a))}})},updateStep(e,t){this.steps=this.steps.map(n=>{if(n.id!==e)return n;if(n.type===jb.form){let a={...n.form.errors};return Object.keys(t).forEach(l=>delete a[l]),{...n,form:{...n.form,...t,errors:a}}}let i={...n.errors};return Object.keys(t).forEach(a=>delete i[a]),{...n,...t,errors:i}})}}},r0t={name:"ImportExportPage",extends:f0,data(){return{selectedSubmissions:[]}},methods:{submit(e){$(e).submit()},toggleSelectAll(){this.selectedSubmissions.length>=this.components.submissions.itemsMax?this.selectedSubmissions=[]:this.selectedSubmissions=this.components.submissions.items.map(e=>e.id)}}},GSe={__name:"EditMailableModal",props:{title:{type:String,required:!0},mailable:{type:Object,required:!0}},emits:["openTemplate","confirmResetTemplate","confirmRemoveTemplate"],setup(e,{emit:t}){const{t:n,localize:i}=Jn(),a=t;return(l,f)=>(L(),Ee(il,null,{title:te(()=>[D(ee(e.title),1)]),default:te(()=>[f[8]||(f[8]=D()),pe(Lu,null,{default:te(()=>[H("p",null,ee(e.mailable.description),1),f[6]||(f[6]=D()),H("p",null,ee(se(n)("manager.mailables.addTemplates")),1),f[7]||(f[7]=D()),pe(Vf,{items:e.mailable.emailTemplates},{header:te(()=>[pe(Bf,null,{actions:te(()=>[pe(ms,{onClick:f[0]||(f[0]=()=>a("openTemplate",null))},{default:te(()=>[D(ee(se(n)("manager.emails.addEmail")),1)]),_:1})]),default:te(()=>[H("h3",null,ee(se(n)("manager.mailables.templates")),1),f[1]||(f[1]=D())]),_:1})]),"item-subtitle":te(({item:d})=>[D(ee(se(i)(d.name)),1)]),"item-actions":te(({item:d})=>[d.key===e.mailable.emailTemplateKey?(L(),Ee(kd,{key:0},{default:te(()=>[D(ee(se(n)("common.default")),1)]),_:1})):we("",!0),f[2]||(f[2]=D()),pe(ms,{onClick:()=>a("openTemplate",d)},{default:te(()=>[D(ee(se(n)("common.edit")),1)]),_:2},1032,["onClick"]),f[3]||(f[3]=D()),d.key===e.mailable.emailTemplateKey&&d.id?(L(),Ee(ms,{key:1,"is-warnable":!0,onClick:()=>a("confirmResetTemplate",d)},{default:te(()=>[D(ee(se(n)("common.reset")),1)]),_:2},1032,["onClick"])):d.id?(L(),Ee(ms,{key:2,"is-warnable":!0,onClick:h=>a("confirmRemoveTemplate",d)},{default:te(()=>[D(ee(se(n)("common.remove")),1)]),_:2},1032,["onClick"])):we("",!0)]),_:1},8,["items"])]),_:1})]),_:1}))}},Jne={__name:"EditTemplateModal",props:{title:{type:String,required:!0},currentTemplateForm:{required:!0,type:Object}},emits:["updateCurrentTemplateForm","templateSaved"],setup(e,{emit:t}){const n=t;return(i,a)=>(L(),Ee(il,null,{title:te(()=>[D(ee(e.title),1)]),default:te(()=>[a[2]||(a[2]=D()),pe(Lu,null,{default:te(()=>[pe(oa,Cn({ref:"templateForm",class:"manageEmails__templateForm"},e.currentTemplateForm,{onSet:a[0]||(a[0]=(...l)=>n("updateCurrentTemplateForm",...l)),onSuccess:a[1]||(a[1]=(...l)=>n("templateSaved",...l))}),null,16)]),_:1})]),_:1}))}},{t:KSe}=Jn(),i0t={name:"ManageEmailsPage",components:{Modal:h9,PkpFilter:_C,Search:j1},extends:f0,mixins:[wd],data(){return{activeFilters:{},currentMailable:{},currentTemplate:{},currentTemplateForm:{},i18nRemoveTemplate:"",i18nRemoveTemplateMessage:"",i18nResetAll:"",i18nResetAllMessage:"",mailables:[],mailablesApiUrl:"",searchPhrase:"",templateForm:{},templatesApiUrl:"",isModalOpenedMailable:!1,isModalOpenedTemplate:!1}},computed:{currentMailables(){let e=[...this.mailables];if(!this.searchPhrase.length&&!Object.keys(this.activeFilters).length)return e;if(this.searchPhrase.length){const t=this.searchPhrase.toLowerCase();e=e.filter(n=>n.name.toLowerCase().includes(t)||n.description.toLowerCase().includes(t))}return Object.keys(this.activeFilters).forEach(t=>{this.activeFilters[t].forEach(n=>{e=e.filter(i=>i[t].includes(n))})}),e}},watch:{currentTemplate(e){this.setCurrentTemplateForm(e)}},methods:{addFilter(e,t){let n={...this.activeFilters};n[e]?n[e].push(t):n[e]=[t],this.activeFilters=n},confirmRemoveTemplate(e){this.openDialog({name:"removeTemplate",title:this.i18nRemoveTemplate,message:this.i18nRemoveTemplateMessage.replace("{$template}",this.localize(e.subject)),actions:[{label:this.i18nRemoveTemplate,isWarnable:!0,callback:t=>{this.deleteTemplate(e,()=>{this.currentMailable.emailTemplates=this.currentMailable.emailTemplates.filter(n=>n.key!==e.key)},()=>{t()})}},{label:this.t("common.cancel"),callback:t=>t()}],modalStyle:"negative"})},confirmResetAll(){this.openDialog({name:"resetAll",title:this.i18nResetAll,message:this.i18nResetAllMessage,actions:[{label:this.i18nResetAll,isWarnable:!0,callback:()=>{$.ajax({url:this.templatesApiUrl+"/restoreDefaults",type:"POST",context:this,headers:{"X-Csrf-Token":pkp.currentUser.csrfToken,"X-Http-Method-Override":"DELETE"},error:this.ajaxErrorCallback,success(e){window.location.reload()}})}},{label:this.t("common.cancel"),callback:e=>e()}],modalStyle:"negative"})},confirmResetTemplate(e){this.openDialog({name:"resetTemplate",title:this.i18nResetTemplate,message:this.i18nResetTemplateMessage.replace("{$template}",this.currentMailable.name),actions:[{label:this.i18nResetTemplate,isWarnable:!0,callback:t=>{this.deleteTemplate(e,()=>{this.getTemplate(e.key,n=>{this.currentMailable.emailTemplates=this.currentMailable.emailTemplates.map(i=>i.key===e.key?n:i),t()})})}},{label:this.t("common.cancel"),callback:t=>t()}],modalStyle:"negative"})},deleteTemplate(e,t,n){$.ajax({url:this.templatesApiUrl+"/"+e.key,type:"POST",context:this,headers:{"X-Csrf-Token":pkp.currentUser.csrfToken,"X-Http-Method-Override":"DELETE"},error:this.ajaxErrorCallback,success:t,complete:n})},getMailable(e,t){$.ajax({url:this.mailablesApiUrl+"/"+encodeURIComponent(e.emailTemplateKey),type:"GET",context:this,error:this.ajaxErrorCallback,success:t})},getTemplate(e,t){$.ajax({url:this.templatesApiUrl+"/"+encodeURIComponent(e),type:"GET",context:this,error:this.ajaxErrorCallback,success:t})},isFilterActive(e,t){return this.activeFilters[e]&&this.activeFilters[e].includes(t)},closeMailableModal(){const{closeSideModal:e}=Ms();e(GSe),setTimeout(()=>{this.currentMailable={},this.currentTemplate={}},300)},openMailable(e){if(e.supportsTemplates){const t=lO();t.startFullScreenSpinner(),this.getMailable(e,n=>{t.stopFullScreenSpinner(),this.currentMailable=n;const{openSideModal:i}=Ms();i(GSe,{title:n?n.name:"",mailable:this.currentMailable,onOpenTemplate:this.openTemplate,onConfirmResetTemplate:this.confirmResetTemplate,onConfirmRemoveTemplate:this.confirmRemoveTemplate})})}else{const t=lO();t.startFullScreenSpinner(),this.getTemplate(e.emailTemplateKey,n=>{this.currentMailable=e,t.stopFullScreenSpinner(),this.openTemplate(n)})}},openTemplate(e){e=e||{},this.currentTemplate=e;const{openSideModal:t}=Ms();this.$nextTick(()=>t(Jne,{title:this.currentTemplate?KSe("manager.mailables.editTemplate"):KSe("manager.emails.addEmail"),currentTemplateForm:this.currentTemplateForm,onUpdateCurrentTemplateForm:this.updateCurrentTemplateForm,onTemplateSaved:this.templateSaved}))},removeFilter(e,t){if(!this.activeFilters[e])return;let n={...this.activeFilters};n[e]=n[e].filter(i=>i!==t),this.activeFilters=n},setCurrentTemplateForm(e){let t=JSON.parse(JSON.stringify(this.templateForm));if(!Object.entries(this.currentMailable).length){this.currentTemplateForm=t;return}if(Object.entries(e).length){t.action=e._href,t.method="PUT";const n=Object.keys(e);t.fields=t.fields.map(i=>(n.includes(i.name)&&(i.value=i.isMultilingual?{...e[i.name]}:e[i.name]),i))}t.fields=t.fields.map(n=>(n.name==="body"&&(n.preparedContent=Object.keys(this.currentMailable.dataDescriptions).map(i=>({key:i,value:"{$"+i+"}",description:this.currentMailable.dataDescriptions[i]}))),n)),(!e||e&&this.currentMailable.emailTemplateKey!==e.key)&&(t.hiddenFields.alternateTo=this.currentMailable.emailTemplateKey),this.currentTemplateForm=t},templateSaved(e){const{closeSideModal:t}=Ms();if(setTimeout(()=>t(Jne),1e3),!this.currentMailable.supportsTemplates)return;this.currentMailable.emailTemplates.findIndex(i=>i.key===e.key)>-1?this.currentMailable.emailTemplates=this.currentMailable.emailTemplates.map(i=>i.key===e.key?e:i):this.currentMailable.emailTemplates.push(e)},closeTemplateModal(){const{closeSideModal:e}=Ms();e(Jne),this.currentMailable.supportsTemplates?setTimeout(()=>{this.currentTemplate={}},300):this.closeMailableModal()},updateCurrentTemplateForm(e,t){Object.assign(this.currentTemplateForm,t)}}},Qne={__name:"InstitutionsEditModal",props:{title:{type:String,required:!0},activeForm:{type:Object,required:!0}},emits:["updateForm","formSuccess"],setup(e,{emit:t}){const n=t;return(i,a)=>(L(),Ee(il,null,{title:te(()=>[D(ee(e.title),1)]),default:te(()=>[a[2]||(a[2]=D()),pe(Lu,null,{default:te(()=>[pe(oa,Cn(e.activeForm,{onSet:a[0]||(a[0]=(...l)=>n("updateForm",...l)),onSuccess:a[1]||(a[1]=(...l)=>n("formSuccess",...l))}),null,16)]),_:1})]),_:1}))}},a0t={components:{ListPanel:Vf,Pagination:d0,PkpHeader:Bf,Search:j1,Spinner:zl,PkpButton:ms},mixins:[wd,SC,Od],props:{addInstitutionLabel:{type:String,required:!0},confirmDeleteMessage:{type:String,required:!0},deleteInstitutionLabel:{type:String,required:!0},editInstitutionLabel:{type:String,required:!0},form:{type:Object,required:!0},id:{type:String,required:!0},items:{type:Array,default(){return[]}},itemsMax:{type:Number,default(){return 0}},title:{type:String,required:!0}},emits:["add:institution","set","update:institution"],data(){return{activeForm:null,activeFormTitle:""}},methods:{closeFormModal(){this.activeForm=null,this.activeFormTitle="";const{closeSideModal:e}=Ms();e(Qne)},formSuccess(e){this.activeForm.method==="POST"?(this.offset=0,this.get(),pkp.eventBus.$emit("add:institution",e)):(this.setItems(this.items.map(t=>t.id===e.id?e:t),this.itemsMax),pkp.eventBus.$emit("update:institution",e)),this.closeFormModal()},openAddModal(){let e=K1(this.form);e.action=this.apiUrl,e.method="POST",this.activeForm=e,this.activeFormTitle=this.addInstitutionLabel;const{openSideModal:t}=Ms();t(Qne,{title:this.activeFormTitle,activeForm:this.activeForm,onUpdateForm:this.updateForm,onFormSuccess:this.formSuccess})},openDeleteModal(e){const t=this.items.find(n=>n.id===e);if(typeof t>"u"){this.ajaxErrorCallback({});return}this.openDialog({name:"delete",title:this.deleteInstitutionLabel,message:this.replaceLocaleParams(this.confirmDeleteMessage,{title:this.localize(t.title)}),actions:[{label:this.t("common.yes"),isWarnable:!0,callback:n=>{var i=this;$.ajax({url:this.apiUrl+"/"+e,type:"POST",headers:{"X-Csrf-Token":pkp.currentUser.csrfToken,"X-Http-Method-Override":"DELETE"},error:i.ajaxErrorCallback,success:function(a){i.setItems(i.items.filter(l=>l.id!==e),i.itemsMax),n(),i.setFocusIn(i.$el)}})}},{label:this.t("common.no"),callback:n=>n()}],modalStyle:"negative"})},openEditModal(e){const t=this.items.find(a=>a.id===e);if(!t){this.ajaxErrorCallback({});return}let n=K1(this.form);n.action=this.apiUrl+"/"+e,n.method="PUT",n.fields=n.fields.map(a=>(Object.keys(t).includes(a.name)&&(a.name==="ipRanges"?a.value=t[a.name].join("\r\n"):a.value=t[a.name]),a)),this.activeForm=n,this.activeFormTitle=this.editInstitutionLabel;const{openSideModal:i}=Ms();i(Qne,{title:this.activeFormTitle,activeForm:this.activeForm,onUpdateForm:this.updateForm,onFormSuccess:this.formSuccess})},setItems(e,t){this.$emit("set",this.id,{items:e,itemsMax:t})},updateForm(e,t){if(!this.activeForm)return;let n=this.activeForm;Object.keys(t).forEach(function(i){n[i]=t[i]}),this.activeForm=n}}},l0t={class:"institutionsListPanel"},c0t=["id"];function u0t(e,t,n,i,a,l){const f=Xe("Spinner"),d=Xe("Search"),h=Xe("PkpButton"),b=Xe("PkpHeader"),S=Xe("Pagination"),k=Xe("ListPanel");return L(),Q("div",l0t,[is(e.$slots,"default",{},()=>[pe(k,{items:n.items},{header:te(()=>[pe(b,null,{actions:te(()=>[pe(d,{"search-phrase":e.searchPhrase,onSearchPhraseChanged:e.setSearchPhrase},null,8,["search-phrase","onSearchPhraseChanged"]),t[0]||(t[0]=D()),pe(h,{onClick:l.openAddModal},{default:te(()=>[D(ee(n.addInstitutionLabel),1)]),_:1},8,["onClick"])]),default:te(()=>[H("h2",null,ee(n.title),1),t[1]||(t[1]=D()),e.isLoading?(L(),Ee(f,{key:0})):we("",!0),t[2]||(t[2]=D())]),_:1})]),"item-title":te(({item:T})=>[H("span",{id:"institution-"+T.id},ee(e.localize(T.name)),9,c0t)]),"item-actions":te(({item:T})=>[pe(h,{"aria-describedby":"institution-"+T.id,onClick:O=>l.openEditModal(T.id)},{default:te(()=>[D(ee(e.t("common.edit")),1)]),_:2},1032,["aria-describedby","onClick"]),t[3]||(t[3]=D()),pe(h,{"is-warnable":!0,"aria-describedby":"institution-"+T.id,onClick:O=>l.openDeleteModal(T.id)},{default:te(()=>[D(ee(e.t("common.delete")),1)]),_:2},1032,["aria-describedby","onClick"])]),footer:te(()=>[e.lastPage>1?(L(),Ee(S,{key:0,"current-page":e.currentPage,"is-loading":e.isLoading,"last-page":e.lastPage,onSetPage:e.setPage},null,8,["current-page","is-loading","last-page","onSetPage"])):we("",!0)]),_:1},8,["items"])])])}const d0t={name:"SettingsPage",components:{AnnouncementsListPanel:qSe,HighlightsListPanel:jSe,InstitutionsListPanel:wt(a0t,[["render",u0t]]),PkpForm:oa,ThemeForm:ZSe,DateTimeForm:{name:"DateTimeForm",extends:oa,data(){return{fieldBeforeSetEvent:{name:null,value:null}}},mounted(){this.$nextTick(function(){const e=Wo.now();this.fields.forEach(t=>{this.availableLocales.forEach(n=>{e.setLocale(yee(n.key)),t.options[n.key].forEach(i=>{if(i.isInput)return;const a=_ee(e,i.label,n.key);a&&(i.label=a)})})})})},methods:{fieldChanged:function(e,t,n,i){let a=this.fields.map(B=>(B.name===e&&(this.fieldBeforeSetEvent.name=e,this.fieldBeforeSetEvent.value=B[t][i],B[t][i]=n),B));if(!["dateFormatShort","dateFormatLong","timeFormat"].find(B=>B===e)){this.$emit("set",this.id,{fields:a});return}const l=this.fields.find(B=>B.name==="dateFormatShort"),f=this.fields.find(B=>B.name==="dateFormatLong"),d=this.fields.find(B=>B.name==="timeFormat");let h={date:l.value[i],time:d.value[i]},b={date:f.value[i],time:d.value[i]};e==="dateFormatShort"?h.date=n:e==="dateFormatLong"?b.date=n:e==="timeFormat"&&(h.time=n,b.time=n);const S=l.options[i].find(B=>B.value===l.value[i]),k=f.options[i].find(B=>B.value===f.value[i]),T=d.options[i].find(B=>B.value===d.value[i]);let O=S&&T?{date:S.label,time:T.label}:h,P=k&&T?{date:k.label,time:T.label}:b;a=this.updateFields(a,e,i,{value:h,label:O},{value:b,label:P}),this.$emit("set",this.id,{fields:a})},updateFields:function(e,t,n,i,a){return e.map(l=>((t==="dateFormatShort"||t==="timeFormat")&&l.name==="datetimeFormatShort"&&((t==="dateFormatShort"?this.fieldBeforeSetEvent.value+" "+i.value.time:i.value.date+" "+this.fieldBeforeSetEvent.value)===l.value[n]&&(l.value[n]=i.value.date+" "+i.value.time),l.options[n][0].label=i.label.date+" "+i.label.time),(t==="dateFormatLong"||t==="timeFormat")&&l.name==="datetimeFormatLong"&&((t==="dateFormatLong"?this.fieldBeforeSetEvent.value+" - "+a.value.time:a.value.date+" - "+this.fieldBeforeSetEvent.value)===l.value[n]&&(l.value[n]=a.value.date+" - "+a.value.time),l.options[n][0].label=a.label.date+" - "+a.label.time),l))}}},DoiSetupSettingsForm:{name:"DoiSetupSettingsForm",extends:oa,props:{enabledRegistrationAgency:{type:String},objectTypeOptions:{type:Array}},methods:{fieldChanged:function(e,t,n,i){e==="enableDois"&&this.removeError("doiPrefix",i),oa.methods.fieldChanged.apply(this,[e,t,n,i])}}},DoiRegistrationSettingsForm:{name:"DoiRegistrationSettingsForm",extends:oa,props:{agencyFields:Object},methods:{fieldChanged:function(e,t,n,i){e==="registrationAgency"?this.changeAgencyFields(n):oa.methods.fieldChanged.apply(this,[e,t,n,i])},changeAgencyFields:function(e){this.$emit("set",this.id,{fields:this.fields.filter(t=>t.groupId==="generalSettings")}),this.$nextTick(()=>{const t=this.agencyFields[e]||[],n=this.fields.map(i=>(i.name==="registrationAgency"&&(i.value=e),i));this.setErrors({}),this.$emit("set",this.id,{fields:[...n,...t]})})}}}},extends:f0,data(){return{announcementsNavLink:{},institutionsNavLink:{},paymentsNavLink:null}},mounted(){pkp.eventBus.$on("form-success",(e,t)=>{if(e===pkp.const.FORM_PAYMENT_SETTINGS&&this.paymentsNavLink){if(!t.paymentsEnabled&&this.menu.payments){let n={...this.menu};delete n.payments,this.menu=n}else if(t.paymentsEnabled&&!Object.keys(this.menu).includes("payments")){let n={};Object.keys(this.menu).forEach(i=>{i==="settings"&&(n.institutions=this.institutionsNavLink,n.payments=this.paymentsNavLink),n[i]=this.menu[i]}),this.menu=n}}if(e===pkp.const.FORM_CONTEXT_STATISTICS){if(!t.enableInstitutionUsageStats&&!this.menu.payments&&this.menu.institutions){let n={...this.menu};delete n.institutions,this.menu=n}else if(t.enableInstitutionUsageStats&&!Object.keys(this.menu).includes("institutions")){let n={};Object.keys(this.menu).forEach(i=>{(i==="settings"||i==="payments")&&(n.institutions=this.institutionsNavLink),n[i]=this.menu[i]}),this.menu=n}}if(e===pkp.const.FORM_ANNOUNCEMENT_SETTINGS){if(!t.enableAnnouncements&&this.menu.announcements){let n={...this.menu};delete n.announcements,this.menu=n}else if(t.enableAnnouncements&&!Object.keys(this.menu).includes("announcements")){let n={};Object.keys(this.menu).forEach(i=>{(i==="settings"||i==="payments"||i==="institutions")&&(n.announcements=this.announcementsNavLink),n[i]=this.menu[i]}),this.menu=n}}if(e===pkp.const.FORM_DOI_REGISTRATION_SETTINGS){const n=t.registrationAgency,i=this.components.doiSetupSettings.enabledRegistrationAgency;n!==i&&(this.components.doiSetupSettings.enabledRegistrationAgency=n,this.components.doiSetupSettings.fields=this.components.doiSetupSettings.fields.map(a=>{if(a.name==="enabledDoiTypes"){a.options=this.components.doiSetupSettings.objectTypeOptions.filter(f=>n===null?!0:f.allowedBy.includes(n));let l=a.value;a.value=l.filter(f=>a.options.some(d=>d.value===f))}return a}))}})},unmounted(){pkp.eventBus.$off("form-success")}},f0t={components:{StartSubmissionForm:{name:"StartSubmissionForm",extends:oa,computed:{submitValues(){let e=oa.computed.submitValues.apply(this);return delete e.title,e}},methods:{success(e){this.isSaving=!0;const t=this.fields.find(i=>i.name==="title");if(!t||!t.value){window.location=e.urlSubmissionWizard;return}let n={title:{}};n.title[e.locale]=t.value,$.ajax({url:e.publications[0]._href,method:"POST",context:this,headers:{"X-Csrf-Token":pkp.currentUser.csrfToken,"X-Http-Method-Override":"PUT"},data:n,complete(){window.location=e.urlSubmissionWizard}})},complete(e,t){this.isSaving=t==="success"}}}},extends:f0,data(){return{form:{}}},methods:{updateForm(e,t){let n={...this.form};Object.keys(t).forEach(i=>n[i]=t[i]),this.form=n}}},ese={name:"StatsPage",components:{DateRange:fSe,PkpFilter:_C,Pagination:d0,PkpHeader:Bf,PkpTable:du,TableCell:as,TableColumn:Ei,TableHeader:Ad,TableBody:Kd,TableRow:Bi},extends:f0,mixins:[Od],data(){return{apiUrl:"",tableColumns:[],dateStart:"",dateEnd:"",dateEndMax:"",dateRangeOptions:[],filters:[],activeFilters:{},isSidebarVisible:!1,isLoadingItems:!1,itemsOfTotalLabel:"",latestItemsGetRequest:""}},computed:{sidebarClasses(){let e=[];return this.isSidebarVisible&&e.push("-isVisible"),e}},watch:{activeFilters(e,t){e!==t&&(this.offset=0,this.get())},dateEnd(e,t){e!==t&&(this.offset=0,this.get())},dateStart(e,t){e!==t&&(this.offset=0,this.get())},isSidebarVisible(e,t){e!==t&&(this.setSidebarFocus(),e&&this.$nextTick(()=>{e&&Object.keys(this.$refs).includes("sidebar")&&this.setFocusIn(this.$refs.sidebar)}))}},mounted(){this.setSidebarFocus()},methods:{isFilterActive:function(e,t){return Object.keys(this.activeFilters).includes(e)?Array.isArray(this.activeFilters[e])?this.activeFilters[e].includes(t):this.activeFilters[e]===t:!1},setDateRange(e,t){this.dateStart=e,this.dateEnd=t},toggleSidebar(){this.isSidebarVisible=!this.isSidebarVisible,this.isSidebarVisible||(this.activeFilters={},this.get())},addFilter:function(e,t){if(this.isFilterActive(e,t))return;let n={...this.activeFilters};n[e]===void 0&&(n[e]=[]),n[e].push(t),this.activeFilters=n,this.get()},removeFilter:function(e,t){if(this.activeFilters[e]===void 0)return;let n={...this.activeFilters};n[e]=n[e].filter(i=>i!==t),this.activeFilters=n,this.get()},getDaysBetween(e,t){return e.setMinutes(e.getMinutes()-e.getTimezoneOffset()),t.setMinutes(t.getMinutes()-t.getTimezoneOffset()),(t-e)/864e5},setSidebarFocus(){if(!this.$refs.sidebar)return;const e=this.isSidebarVisible?0:-1;this.$refs.sidebar.querySelectorAll("button, [href], input, select, textarea").forEach(t=>t.tabIndex=e)}}},p0t={name:"StatsEditorialPage",components:{DoughnutChart:aSe,Tooltip:Tc},extends:ese,data(){return{activeByStage:[],averages:{},averagesApiUrl:"",isLoading:!1,percentageStats:[],tableRows:[]}},computed:{chartData(){return this.activeByStage.length?{labels:this.activeByStage.map(e=>e.name),datasets:[{data:this.activeByStage.map(e=>e.count),backgroundColor:this.activeByStage.map(e=>e.color)}]}:null},getParams(){let e={...this.activeFilters};return this.dateStart&&(e.dateStart=this.dateStart),this.dateEnd&&(e.dateEnd=this.dateEnd),e},totalActive(){return this.activeByStage.reduce((e,t)=>e+t.count,0)}},methods:{get:Uh(async function(){let e=this,t=$.pkp.classes.Helper.uuid(),n=$.pkp.classes.Helper.uuid(),i=$.pkp.classes.Helper.uuid();this.isLoading=!0;let a=[],l=[],f={};const d=function(T){this.response=T},h=new Promise((T,O)=>$.ajax({url:this.apiUrl,type:"GET",data:this.getParams,_uuid:t,error(P){t===this._uuid&&(e.ajaxErrorCallback(P),O(new d(P)))},success(P){t===this._uuid&&(a=P,T(P))}}));let b={...this.getParams};delete b.dateStart,delete b.dateEnd;const S=new Promise((T,O)=>$.ajax({url:this.apiUrl,type:"GET",data:b,_uuid:n,error(P){n===this._uuid&&(e.ajaxErrorCallback(P),O(new d(P)))},success(P){n===this._uuid&&(l=P,T(P))}})),k=new Promise((T,O)=>$.ajax({url:this.averagesApiUrl,type:"GET",data:this.getParams,_uuid:i,error(P){i===this._uuid&&(e.ajaxErrorCallback(P),O(new d(P)))},success(P){i===this._uuid&&(f=P,T(P))}}));try{await Promise.all([h,S,k]);let T=this.tableRows.map(O=>{const P=a.find(W=>W.key===O.key),B=l.find(W=>W.key===O.key);return this.percentageStats.includes(O.key)?(O.dateRange=Number(P.value*100).toFixed(0)+"%",O.total=Number(B.value*100).toFixed(0)+"%"):(O.dateRange=P.value,O.total=B.value),Object.prototype.hasOwnProperty.call(f,O.key)&&f[O.key]>-1&&B.value>0&&(O.total=this.t("stats.countWithYearlyAverage",{count:O.total,average:f[O.key]})),O});this.tableRows=[],this.tableRows=T,this.isLoading=!1}catch(T){if(!(T instanceof d))throw T}finally{this.isLoading=!1}},0),setCurrentDateRange(e){this.tableColumns[1].label=e}}},m0t={class:"align-middle"},YSe={__name:"PublicationsDownloadReportModal",props:{searchPhrase:{type:String,required:!1,default:""},dateRangeDescription:{type:String,required:!0},timelineDescription:{type:String,required:!0},geoReportType:{type:String,required:!1,default:null},getFilterDescription:{type:Function,required:!0},filters:{type:Array,required:!0}},emits:["downloadReport"],setup(e,{emit:t}){const{t:n}=Jn(),i=t;return(a,l)=>(L(),Ee(il,null,{title:te(()=>[D(ee(se(n)("common.download")),1)]),default:te(()=>[l[23]||(l[23]=D()),pe(Lu,null,{default:te(()=>[H("p",null,ee(se(n)("stats.publications.downloadReport.description")),1),l[18]||(l[18]=D()),pe(du,null,{default:te(()=>[pe(Bi,null,{default:te(()=>[pe(as,{"is-row-header":!0},{default:te(()=>[D(ee(se(n)("stats.dateRange")),1)]),_:1}),l[4]||(l[4]=D()),pe(as,null,{default:te(()=>[D(ee(e.dateRangeDescription),1)]),_:1})]),_:1}),l[7]||(l[7]=D()),(L(!0),Q(bt,null,Sn(e.filters,(f,d)=>(L(),Ee(Bi,{key:d},{default:te(()=>[pe(as,{"is-row-header":!0},{default:te(()=>[D(ee(f.heading),1)]),_:2},1024),l[5]||(l[5]=D()),pe(as,null,{default:te(()=>[D(ee(e.getFilterDescription(f)),1)]),_:2},1024)]),_:2},1024))),128)),l[8]||(l[8]=D()),e.searchPhrase?(L(),Ee(Bi,{key:0},{default:te(()=>[pe(as,{"is-row-header":!0},{default:te(()=>[D(ee(se(n)("common.searchPhrase")),1)]),_:1}),l[6]||(l[6]=D()),pe(as,null,{default:te(()=>[D(ee(e.searchPhrase),1)]),_:1})]),_:1})):we("",!0)]),_:1}),l[19]||(l[19]=D()),pe(Z1,{class:"pkpStats__reportAction"},{actions:te(()=>[pe(ms,{onClick:l[0]||(l[0]=()=>i("downloadReport",null))},{default:te(()=>[D(ee(se(n)("stats.publications.downloadReport.downloadSubmissions")),1)]),_:1})]),default:te(()=>[H("h2",null,ee(se(n)("common.publications")),1),l[9]||(l[9]=D()),H("p",null,ee(se(n)("stats.publications.downloadReport.downloadSubmissions.description")),1),l[10]||(l[10]=D())]),_:1}),l[20]||(l[20]=D()),pe(Z1,{class:"pkpStats__reportAction"},{actions:te(()=>[pe(ms,{onClick:l[1]||(l[1]=()=>i("downloadReport","files"))},{default:te(()=>[D(ee(se(n)("stats.publications.downloadReport.downloadFiles")),1)]),_:1})]),default:te(()=>[H("h2",null,ee(se(n)("submission.files")),1),l[11]||(l[11]=D()),H("p",null,ee(se(n)("stats.publications.downloadReport.downloadFiles.description")),1),l[12]||(l[12]=D())]),_:1}),l[21]||(l[21]=D()),pe(Z1,{class:"pkpStats__reportAction"},{actions:te(()=>[pe(ms,{onClick:l[2]||(l[2]=()=>i("downloadReport","timeline"))},{default:te(()=>[D(ee(se(n)("stats.timeline.downloadReport.downloadTimeline")),1)]),_:1})]),default:te(()=>[H("h2",null,ee(se(n)("stats.timeline")),1),l[13]||(l[13]=D()),H("p",null,ee(e.timelineDescription),1),l[14]||(l[14]=D())]),_:1}),l[22]||(l[22]=D()),e.geoReportType?(L(),Ee(Z1,{key:0,class:"pkpStats__reportAction"},{actions:te(()=>[pe(ms,{onClick:l[3]||(l[3]=()=>i("downloadReport",e.geoReportType))},{default:te(()=>[D(ee(se(n)("stats.publications.downloadReport.downloadGeographic")),1)]),_:1})]),default:te(()=>[H("h2",null,[H("span",m0t,ee(se(n)("common.geographic")),1),l[15]||(l[15]=D()),pe(Tc,{tooltip:se(n)("stats.geographic.ccAttribution"),label:se(n)("stats.geographic.tooltip.label")},null,8,["tooltip","label"])]),l[16]||(l[16]=D()),H("p",null,ee(se(n)("stats.publications.downloadReport.downloadGeographic.description")),1),l[17]||(l[17]=D())]),_:1})):we("",!0)]),_:1})]),_:1}))}},tse={name:"StatsPublicationsPage",components:{ActionPanel:Z1,LineChart:lSe,Search:j1,List:oU,ListItem:rU,Modal:h9,Tooltip:Tc},extends:ese,data(){return{count:30,items:[],itemsMax:0,offset:0,searchPhrase:"",timeline:[],timelineInterval:"",timelineType:"",orderBy:"",orderDirection:!1,isLoadingTimeline:!1,latestTimelineGetRequest:"",isDownloadingReport:!1,geoReportType:null}},computed:{chartData(){return this.timeline.length?{labels:this.timeline.map(e=>e.label),datasets:[{data:this.timeline.map(e=>e.value)}]}:null},currentPage(){return Math.floor(this.offset/this.count)+1},lastPage(){return Math.ceil(this.itemsMax/this.count)},isDailyIntervalEnabled(){return!this.dateStart||!this.dateEnd?!1:this.getDaysBetween(this.getBrowserSafeDate(this.dateStart),this.getBrowserSafeDate(this.dateEnd))<91},isMonthlyIntervalEnabled(){return!this.dateStart||!this.dateEnd||!this.isDailyIntervalEnabled?!0:this.getDaysBetween(this.getBrowserSafeDate(this.dateStart),this.getBrowserSafeDate(this.dateEndMax))>31}},methods:{openDownloadReportModal(){const{openSideModal:e}=Ms();e(YSe,{searchPhrase:this.searchPhrase,timelineDescription:this.getTimelineDescription(),dateRangeDescription:this.getDateRangeDescription(),onDownloadReport:this.downloadReport,getFilterDescription:this.getFilterDescription,geoReportType:this.geoReportType,filters:this.filters})},closeDownloadReportModal(){const{closeSideModal:e}=Ms();e(YSe)},getParams(e){let t={...this.activeFilters};return e!="timeline"&&(t.count=this.count,t.offset=this.offset),this.dateStart&&(t.dateStart=this.dateStart),this.dateEnd&&(t.dateEnd=this.dateEnd),this.searchPhrase&&(t.searchPhrase=this.searchPhrase),e=="timeline"&&(this.timelineInterval&&(t.timelineInterval=this.timelineInterval),this.timelineType=="files"&&(t.type=this.timelineType)),e!="timeline"&&this.orderBy&&(t.orderBy=this.orderBy,t.orderDirection=this.orderDirection?"DESC":"ASC"),t},getFilterDescription(e){let t=[];Object.values(e.filters).forEach(i=>{i.param in this.activeFilters&&this.activeFilters[i.param].includes(i.value)&&t.push(i.title.trim())});let n=this.replaceLocaleParams(this.allFiltersLabel,{filter:e.heading});return t.length!=0&&(n=t.join(this.t("common.commaListSeparator"))),n},getTimelineTypeLabel(){let e=this.viewsLabel;return this.timelineType=="files"&&(e=this.downloadsLabel),e},getTimelineIntervalLabel(){let e=this.monthLabel;return this.timelineInterval=="day"&&(e=this.dayLabel),e},getTimelineDescription(){return this.replaceLocaleParams(this.timelineDescriptionLabel,{type:this.getTimelineTypeLabel().toLowerCase(),interval:this.getTimelineIntervalLabel().toLowerCase()})},getDateRangeDescription(){return!this.dateStart&&!this.dateEnd?this.allDatesLabel:this.replaceLocaleParams(this.betweenDatesLabel,{startDate:this.dateStart,endDate:this.dateEnd})},getReportParams(e){let t={...this.activeFilters};return this.dateStart&&(t.dateStart=this.dateStart),this.dateEnd&&(t.dateEnd=this.dateEnd),this.searchPhrase&&(t.searchPhrase=this.searchPhrase),e=="timeline"&&this.timelineInterval&&(t.timelineInterval=this.timelineInterval),e!="timeline"&&this.orderBy&&(t.orderBy=this.orderBy,t.orderDirection=this.orderDirection?"DESC":"ASC"),t},getReportFileNamePart(e){return e?e=="timeline"?"submissions_timeline":e:"submissions"},downloadReport(e){this.isDownloadingReport=!0;let t=["stats",this.getReportFileNamePart(e),new Date().toISOString().slice(0,-5).replace(":","-")].join("_")+".csv",n='"'+this.dateRangeLabel+'","'+this.getDateRangeDescription()+'"\n',i=[];Object.values(this.filters).forEach(d=>{i.push('"'+d.heading+'","'+this.getFilterDescription(d)+'"')});let a=this.searchPhrase?'"'+this.searchPhraseLabel+'","'+this.searchPhrase+'"\n':"",l='"'+this.timelineTypeLabel+'","'+this.getTimelineTypeLabel()+'"\n',f='"'+this.timelineIntervalLabel+'","'+this.getTimelineIntervalLabel()+'"\n';$.ajax({url:this.apiUrl+(e?"/"+e:"")+(e=="timeline"&&this.timelineType=="files"?"?type=files":""),type:"GET",context:this,headers:{Accept:"text/csv; charset=utf-8","Content-Type":"text/csv;·charset_utf-8"},data:this.getReportParams(e),error:this.ajaxErrorCallback,success(d){d=n+(i.length>0?i.join("\n")+"\n":"")+a+(e=="timeline"?l+f:"")+d;var h=new Blob([d]),b=document.createElement("a");b.href=window.URL.createObjectURL(h),b.download=t,b.click()},complete(d){this.isDownloadingReport=!1,this.closeDownloadReportModal()}})},get:Uh(function(){this.getItems(),this.getTimeline()},0),setItems(e){let t=this;t.items=e.items.map(n=>(n.total=n.abstractViews+n.galleyViews,n)),t.itemsMax=e.itemsMax},getItems(){let e=this;this.isLoadingItems=!0,this.latestItemsGetRequest=$.pkp.classes.Helper.uuid(),$.ajax({url:this.apiUrl,type:"GET",data:this.getParams(),_uuid:this.latestItemsGetRequest,error(t){e.latestItemsGetRequest===this._uuid&&e.ajaxErrorCallback(t)},success(t){e.latestItemsGetRequest===this._uuid&&e.setItems(t)},complete(t){e.latestItemsGetRequest===this._uuid&&(e.isLoadingItems=!1)}})},getTimeline(){let e=this;this.isLoadingTimeline=!0,this.latestTimelineGetRequest=$.pkp.classes.Helper.uuid(),$.ajax({url:this.apiUrl+"/timeline",type:"GET",data:this.getParams("timeline"),_uuid:this.latestTimelineGetRequest,error(t){e.latestTimelineGetRequest===this._uuid&&e.ajaxErrorCallback(t)},success(t){e.latestTimelineGetRequest===this._uuid&&(e.timeline=t)},complete(t){e.latestTimelineGetRequest===this._uuid&&(e.isLoadingTimeline=!1)}})},setOrderBy(e){this.orderBy=e,this.orderDirection=!this.orderDirection},setPage(e){this.offset=(e-1)*this.count},setSearchPhrase(e){this.searchPhrase=e},setTimelineType(e){this.timelineType=e},setTimelineInterval(e){this.timelineInterval=e}},watch:{count(e,t){e!==t&&this.getItems()},isDailyIntervalEnabled(e,t){e!==t&&(e||(this.timelineInterval="month"))},isMonthlyIntervalEnabled(e,t){e!==t&&(e||(this.timelineInterval="day"))},orderBy(e,t){e!==t&&(this.offset=0,this.getItems())},orderDirection(e,t){e!==t&&(this.offset=0,this.getItems())},offset(e,t){e!==t&&this.getItems()},searchPhrase(e,t){e!==t&&(this.offset=0,Uh(this.get(),250))},timelineInterval(e,t){e!==t&&this.getTimeline()},timelineType(e,t){e!==t&&this.getTimeline()}},mounted(){this.getItems()}},XSe={__name:"ContextDownloadReportModal",props:{dateRangeDescription:{type:String,required:!0},timelineDescription:{type:String,required:!0}},emits:["downloadReport"],setup(e,{emit:t}){const{t:n}=Jn(),i=t;return(a,l)=>(L(),Ee(il,null,{title:te(()=>[D(ee(se(n)("common.download")),1)]),default:te(()=>[l[10]||(l[10]=D()),pe(Lu,null,{default:te(()=>[H("p",null,ee(se(n)("stats.context.downloadReport.description")),1),l[7]||(l[7]=D()),pe(du,null,{default:te(()=>[pe(Bi,null,{default:te(()=>[pe(as,{"is-row-header":!0},{default:te(()=>[D(ee(se(n)("stats.dateRange")),1)]),_:1}),l[2]||(l[2]=D()),pe(as,null,{default:te(()=>[D(ee(e.dateRangeDescription),1)]),_:1})]),_:1})]),_:1}),l[8]||(l[8]=D()),pe(Z1,{class:"pkpStats__reportAction"},{actions:te(()=>[pe(ms,{onClick:l[0]||(l[0]=()=>i("downloadReport",null))},{default:te(()=>[D(ee(se(n)("stats.context.downloadReport.downloadContext")),1)]),_:1})]),default:te(()=>[H("h2",null,ee(se(n)("context.context")),1),l[3]||(l[3]=D()),H("p",null,ee(se(n)("stats.context.downloadReport.downloadContext.description")),1),l[4]||(l[4]=D())]),_:1}),l[9]||(l[9]=D()),pe(Z1,{class:"pkpStats__reportAction"},{actions:te(()=>[pe(ms,{onClick:l[1]||(l[1]=()=>i("downloadReport","timeline"))},{default:te(()=>[D(ee(se(n)("stats.timeline.downloadReport.downloadTimeline")),1)]),_:1})]),default:te(()=>[H("h2",null,ee(se(n)("stats.timeline")),1),l[5]||(l[5]=D()),H("p",null,ee(e.timelineDescription),1),l[6]||(l[6]=D())]),_:1})]),_:1})]),_:1}))}},h0t={name:"StatsContextPage",extends:tse,data(){return{isModalOpenedDownloadReport:!1}},methods:{openDownloadReportModal(){const{openSideModal:e}=Ms();e(XSe,{timelineDescription:this.getTimelineDescription(),dateRangeDescription:this.getDateRangeDescription(),onDownloadReport:this.downloadReport})},closeDownloadReportModal(){const{closeSideModal:e}=Ms();e(XSe)},getParams(e){let t={};return this.dateStart&&(t.dateStart=this.dateStart),this.dateEnd&&(t.dateEnd=this.dateEnd),e=="timeline"&&this.timelineInterval&&(t.timelineInterval=this.timelineInterval),t},setItems(e){let t=this;e.context.total=e.total,t.items=[e.context],t.itemsMax=1},getReportFileNamePart(e){return e=="timeline"?"context_timeline":"context"}}},JSe={__name:"IssueDownloadReportModal",props:{searchPhrase:{type:String,required:!1,default:""},timelineDescription:{type:String,required:!0},dateRangeDescription:{type:String,required:!0}},emits:["downloadReport"],setup(e,{emit:t}){const{t:n}=Jn(),i=t;return(a,l)=>(L(),Ee(il,null,{title:te(()=>[D(ee(se(n)("common.download")),1)]),default:te(()=>[l[12]||(l[12]=D()),pe(Lu,null,{default:te(()=>[H("p",null,ee(se(n)("stats.issues.downloadReport.description")),1),l[9]||(l[9]=D()),pe(du,null,{default:te(()=>[pe(Bi,null,{default:te(()=>[pe(as,{"is-row-header":!0},{default:te(()=>[D(ee(se(n)("stats.dateRange")),1)]),_:1}),l[2]||(l[2]=D()),pe(as,null,{default:te(()=>[D(ee(e.dateRangeDescription),1)]),_:1})]),_:1}),l[4]||(l[4]=D()),e.searchPhrase?(L(),Ee(Bi,{key:0},{default:te(()=>[pe(as,{"is-row-header":!0},{default:te(()=>[D(ee(se(n)("common.searchPhrase")),1)]),_:1}),l[3]||(l[3]=D()),pe(as,null,{default:te(()=>[D(ee(e.searchPhrase),1)]),_:1})]),_:1})):we("",!0)]),_:1}),l[10]||(l[10]=D()),pe(Z1,{class:"pkpStats__reportAction"},{actions:te(()=>[pe(ms,{onClick:l[0]||(l[0]=()=>i("downloadReport",null))},{default:te(()=>[D(ee(se(n)("stats.issues.downloadReport.downloadIssues")),1)]),_:1})]),default:te(()=>[H("h2",null,ee(se(n)("issue.issues")),1),l[5]||(l[5]=D()),H("p",null,ee(se(n)("stats.issues.downloadReport.downloadIssues.description")),1),l[6]||(l[6]=D())]),_:1}),l[11]||(l[11]=D()),pe(Z1,{class:"pkpStats__reportAction"},{actions:te(()=>[pe(ms,{onClick:l[1]||(l[1]=()=>i("downloadReport","timeline"))},{default:te(()=>[D(ee(se(n)("stats.timeline.downloadReport.downloadTimeline")),1)]),_:1})]),default:te(()=>[H("h2",null,ee(se(n)("stats.timeline")),1),l[7]||(l[7]=D()),H("p",null,ee(e.timelineDescription),1),l[8]||(l[8]=D())]),_:1})]),_:1})]),_:1}))}},g0t={name:"StatsIssuesPage",extends:tse,data(){return{isModalOpenedDownloadReport:!1}},methods:{openDownloadReportModal(){const{openSideModal:e}=Ms();e(JSe,{searchPhrase:this.searchPhrase,timelineDescription:this.getTimelineDescription(),dateRangeDescription:this.getDateRangeDescription(),onDownloadReport:this.downloadReport})},closeDownloadReportModal(){const{closeSideModal:e}=Ms();e(JSe)},setItems(e){let t=this;t.items=e.items,t.itemsMax=e.itemsMax},getReportFileNamePart(e){return e=="timeline"?"issues_timeline":"issues"}}},QSe={__name:"UserExportModal",props:{usersReportForm:{type:Object,required:!0}},emits:["set","loadExport"],setup(e,{emit:t}){const{t:n}=Jn(),i=t;return(a,l)=>(L(),Ee(il,null,{title:te(()=>[D(ee(se(n)("manager.export.usersToCsv.label")),1)]),default:te(()=>[l[2]||(l[2]=D()),pe(Lu,null,{default:te(()=>[pe(oa,Cn(e.usersReportForm,{onSet:l[0]||(l[0]=(...f)=>i("set",...f)),onSuccess:l[1]||(l[1]=(...f)=>i("loadExport",...f))}),null,16)]),_:1})]),_:1}))}},v0t={name:"StatsUsersPage",components:{Modal:h9},extends:ese,methods:{openExportModal(){const{openSideModal:e}=Ms();e(QSe,{usersReportForm:this.components.usersReportForm,onSet:this.set,onLoadExport:this.loadExport})},loadExport(e){window.location=e;const{closeSideModal:t}=Ms();t(QSe)}}},nse={__name:"ReviewerSuggestionsEditModal",props:{title:{type:String,required:!0},activeForm:{type:Object,required:!0}},emits:["updateForm","formSuccess"],setup(e,{emit:t}){const n=t;return(i,a)=>(L(),Ee(il,null,{title:te(()=>[D(ee(e.title),1)]),default:te(()=>[a[2]||(a[2]=D()),pe(Lu,null,{default:te(()=>[pe(oa,Cn(e.activeForm,{onSet:a[0]||(a[0]=(...l)=>n("updateForm",...l)),onSuccess:a[1]||(a[1]=(...l)=>n("formSuccess",...l))}),null,16)]),_:1})]),_:1}))}},b0t={components:{Spinner:zl,PkpButton:ms,Badge:kd,ListPanel:Vf,PkpHeader:Bf},mixins:[Od,wd],props:{canEditPublication:{type:Boolean,required:!0},form:{type:Object,required:!0},id:{type:String,required:!0},items:{type:Array,default(){return[]}},title:{type:String,required:!0},reviewerSuggestionsApiUrl:{type:String,required:!0},submission:{type:Object,required:!0},publication:{type:Object,required:!0}},emits:["updated:reviewerSuggestions"],data(){return{activeForm:null,activeFormTitle:"",isLoading:!1}},computed:{formModal(){return this.id+"form"}},methods:{getConstant(e){return pkp.const[e]},closeFormModal(e){const{closeSideModal:t}=Ms();t(nse),this.activeForm=null,this.activeFormTitle=""},formSuccess(e){if(this.activeForm.method==="POST"){this.offset=0;const t=[...this.submission.reviewerSuggestions];t.push(e),this.$emit("updated:reviewerSuggestions",t)}else{const t=this.submission.reviewerSuggestions.map(n=>n.id===e.id?e:n);this.$emit("updated:reviewerSuggestions",t)}this.closeFormModal()},openAddModal(){let e=K1(this.form);e.action=this.reviewerSuggestionsApiUrl,e.method="POST",this.activeForm=e,this.activeFormTitle=this.t("grid.action.addReviewerSuggestion");const{openSideModal:t}=Ms();t(nse,{title:this.activeFormTitle,activeForm:this.activeForm,onUpdateForm:this.updateForm,onFormSuccess:this.formSuccess})},openDeleteModal(e){const t=this.items.find(n=>n.id===e);this.openDialog({name:"delete",title:this.t("grid.action.deleteReviewerSuggestion"),message:this.t("grid.action.deleteReviewerSuggestion.confirmationMessage",{name:t.familyName}),actions:[{label:this.t("grid.action.deleteReviewerSuggestion"),isWarnable:!0,callback:n=>{this.isLoading=!0,$.ajax({url:this.reviewerSuggestionsApiUrl+"/"+e,type:"POST",context:this,headers:{"X-Csrf-Token":pkp.currentUser.csrfToken,"X-Http-Method-Override":"DELETE"},error:this.ajaxErrorCallback,success(i){n(),this.setFocusIn(this.$el);const a=this.submission.reviewerSuggestions.filter(l=>l.id!==e);this.$emit("updated:reviewerSuggestions",a)},complete(i){this.isLoading=!1}})}},{label:this.t("common.cancel"),callback:n=>n()}]})},openEditModal(e){this.isLoading=!0;const t=this.reviewerSuggestionsApiUrl+"/"+e;$.ajax({url:t,type:"GET",error:this.ajaxErrorCallback,context:this,success(n){let i=K1(this.form);i.action=t,i.method="PUT",i.fields=i.fields.map(l=>(Object.keys(n).includes(l.name)&&(l.value=n[l.name]),l)),this.activeForm=i,this.activeFormTitle=this.t("grid.action.edit");const{openSideModal:a}=Ms();a(nse,{title:this.activeFormTitle,activeForm:this.activeForm,onUpdateForm:this.updateForm,onFormSuccess:this.formSuccess})},complete(n){this.isLoading=!1}})},updateForm(e,t){if(!this.activeForm)return;let n=this.activeForm;Object.keys(t).forEach(function(i){n[i]=t[i]}),this.activeForm=n}}},y0t={class:"reviewerSuggestionsListPanel"};function _0t(e,t,n,i,a,l){const f=Xe("Spinner"),d=Xe("PkpButton"),h=Xe("PkpHeader"),b=Xe("Badge"),S=Xe("ListPanel");return L(),Q("div",y0t,[is(e.$slots,"default",{},()=>[pe(S,{items:n.items,class:"listPanel--reviewerSuggestions"},If({header:te(()=>[pe(h,null,{actions:te(()=>[n.publication.status!==l.getConstant("STATUS_PUBLISHED")&&n.canEditPublication?(L(),Ee(d,{key:0,disabled:a.isLoading,onClick:l.openAddModal},{default:te(()=>[D(ee(e.t("grid.action.addReviewerSuggestion")),1)]),_:1},8,["disabled","onClick"])):we("",!0)]),default:te(()=>[H("h2",null,ee(n.title),1),t[0]||(t[0]=D()),a.isLoading?(L(),Ee(f,{key:0})):we("",!0),t[1]||(t[1]=D())]),_:1})]),"item-title":te(({item:k})=>[D(ee(e.localize(k.fullName))+" ",1),pe(b,null,{default:te(()=>[D(ee(e.localize(k.affiliation)),1)]),_:2},1024)]),"item-subtitle":te(({item:k})=>[D(ee(k.email),1)]),_:2},[n.publication.status!==l.getConstant("STATUS_PUBLISHED")&&n.canEditPublication?{name:"item-actions",fn:te(({item:k})=>[pe(d,{disabled:a.isLoading,onClick:T=>l.openEditModal(k.id)},{default:te(()=>[D(ee(e.t("common.edit")),1)]),_:2},1032,["disabled","onClick"]),t[2]||(t[2]=D()),pe(d,{disabled:a.isLoading,"is-warnable":!0,onClick:T=>l.openDeleteModal(k.id)},{default:te(()=>[D(ee(e.t("common.delete")),1)]),_:2},1032,["disabled","onClick"])]),key:"0"}:void 0]),1032,["items"])])])}const S0t=wt(b0t,[["render",_0t]]),C0t={__name:"ReconfigureSubmissionModal",props:{reconfigureSubmissionForm:{type:Object,required:!0}},emits:["set","reconfigureSubmission"],setup(e,{emit:t}){const{t:n}=Jn(),i=t;return(a,l)=>(L(),Ee(il,null,{title:te(()=>[D(ee(se(n)("submission.wizard.changeSubmission")),1)]),default:te(()=>[l[2]||(l[2]=D()),pe(Lu,null,{default:te(()=>[pe(oa,Cn(e.reconfigureSubmissionForm,{onSet:l[0]||(l[0]=(...f)=>i("set",...f)),onSuccess:l[1]||(l[1]=(...f)=>i("reconfigureSubmission",...f))}),null,16)]),_:1})]),_:1}))}},w0t={components:{PkpButton:ms,Icon:Vs,Spinner:zl,Badge:kd,FileUploadProgress:Lne,SubmissionFilesFile:m9},props:{apiUrl:{type:String,required:!0},cancelUploadLabel:{type:String,required:!0},genrePromptLabel:{type:String,required:!0},genres:{type:Array,required:!0},item:{type:Object,required:!0},otherLabel:{type:String,required:!0},stageId:{type:Number,required:!0}},data(){return{isSavingGenreId:!1,status:""}},computed:{editId(){return this.compileId("edit")},isPrimaryGenre(){return!this.item.genreIsDependent&&!this.item.genreIsSupplementary},genrePromptId(){return this.compileId("setGenre")},nameId(){return this.compileId("name")},primaryGenres(){return this.genres.filter(e=>!!e.isPrimary)}},methods:{compileId(e){const t=this.item.id||this.item.uuid;return[e,t].join("-")},setGenre(e){this.isSavingGenreId=!0,this.status=this.t("common.saving");var t=this;$.ajax({url:this.apiUrl+"/"+this.item.id+"?stageId="+this.stageId,type:"POST",data:{genreId:e},headers:{"X-Csrf-Token":pkp.currentUser.csrfToken,"X-Http-Method-Override":"PUT"},error:this.ajaxErrorCallback,success(n){t.status=t.t("form.saved"),setTimeout(()=>{t.$emit("update",n),t.$el.querySelector("#"+t.editId).focus()},500)},complete(n){setTimeout(()=>t.isSavingGenreId=!1,500)}})}}},E0t={class:"listPanel__item--submissionFile"},k0t={class:"listPanel__itemSummary"},x0t={class:"listPanel__itemIdentity"},T0t={class:"listPanel__itemSubtitle"},I0t=["id","href"],A0t={class:"listPanel__itemActions"},O0t={key:0,class:"listPanel--submissionFiles__setGenre"},R0t={role:"alert"},D0t=["id"],L0t=["aria-describedby","onClick"],P0t=["aria-describedby"],M0t={class:"-screenReader",role:"status","aria-live":"polite","aria-atomic":"true"};function N0t(e,t,n,i,a,l){const f=Xe("SubmissionFilesFile"),d=Xe("Badge"),h=Xe("PkpButton"),b=Xe("Icon"),S=Xe("Spinner"),k=Xe("FileUploadProgress");return L(),Q("div",E0t,[n.item.fileId?(L(),Q(bt,{key:0},[H("div",k0t,[H("div",x0t,[H("div",T0t,[H("a",{id:l.nameId,class:"listPanel__item--submissionFile__link",href:n.item.url},[pe(f,{"document-type":n.item.documentType,name:e.localize(n.item.name)},null,8,["document-type","name"])],8,I0t)])]),t[6]||(t[6]=D()),H("div",A0t,[n.item.genreId?(L(),Ee(d,{key:0,"is-primary":l.isPrimaryGenre,class:"listPanel--submissionFiles__itemGenre"},{default:te(()=>[D(ee(e.localize(n.item.genreName)),1)]),_:1},8,["is-primary"])):we("",!0),t[4]||(t[4]=D()),pe(h,{id:l.editId,"aria-describedby":l.nameId,onClick:t[0]||(t[0]=T=>e.$emit("edit",n.item))},{default:te(()=>[D(ee(e.t("common.edit")),1)]),_:1},8,["id","aria-describedby"]),t[5]||(t[5]=D()),pe(h,{"is-warnable":!0,"aria-describedby":l.nameId,onClick:t[1]||(t[1]=T=>e.$emit("remove",n.item))},{default:te(()=>[D(ee(e.t("common.remove")),1)]),_:1},8,["aria-describedby"])])]),t[12]||(t[12]=D()),n.item.genreId?we("",!0):(L(),Q("div",O0t,[H("span",R0t,[pe(b,{icon:"Error",class:"me-1 h-4 w-4",inline:!0}),t[7]||(t[7]=D()),H("span",{id:l.genrePromptId,class:"listPanel--submissionFiles__setGenreLabel align-middle"},ee(n.genrePromptLabel),9,D0t),t[8]||(t[8]=D()),(L(!0),Q(bt,null,Sn(l.primaryGenres,T=>(L(),Q("button",{key:T.id,class:"-linkButton listPanel--submissionFiles__setGenreButton","aria-describedby":l.genrePromptId+" "+l.nameId,onClick:O=>l.setGenre(T.id)},ee(T.name),9,L0t))),128)),t[9]||(t[9]=D()),H("button",{class:"-linkButton listPanel--submissionFiles__setGenreButton","aria-describedby":l.genrePromptId+" "+l.nameId,onClick:t[2]||(t[2]=T=>e.$emit("edit",n.item))},ee(n.otherLabel),9,P0t)]),t[11]||(t[11]=D()),a.isSavingGenreId?(L(),Q(bt,{key:0},[pe(S,{class:"listPanel--submissionFiles__genreSpinner"}),t[10]||(t[10]=D()),H("span",M0t,ee(a.status),1)],64)):we("",!0)]))],64)):(L(),Ee(k,{key:1,"cancel-upload-label":n.cancelUploadLabel,errors:n.item.errors||[],name:n.item.name,progress:n.item.progress,onCancel:t[3]||(t[3]=T=>e.$emit("cancel",n.item.id))},null,8,["cancel-upload-label","errors","name","progress"]))])}const F0t=wt(w0t,[["render",N0t]]),eCe={__name:"SubmissionFilesEditModal",props:{title:{type:String,required:!0},activeForm:{type:Object,required:!0}},emits:["setForm","formSuccess"],setup(e,{emit:t}){const n=t;return(i,a)=>(L(),Ee(il,null,{title:te(()=>[D(ee(e.title),1)]),default:te(()=>[a[2]||(a[2]=D()),pe(Lu,null,{default:te(()=>[pe(oa,Cn(e.activeForm,{onSet:a[0]||(a[0]=(...l)=>n("setForm",...l)),onSuccess:a[1]||(a[1]=(...l)=>n("formSuccess",...l))}),null,16)]),_:1})]),_:1}))}},$0t={components:{PkpButton:ms,FileUploader:nU,ListPanel:Vf,PkpHeader:Bf,SubmissionFilesListItem:F0t},mixins:[wd],props:{addFileLabel:{type:String,required:!0},apiUrl:{type:String,required:!0},cancelUploadLabel:{type:String,required:!0},emptyLabel:{type:String,required:!0},emptyAddLabel:{type:String,required:!0},fileStage:{type:Number,required:!0},form:{type:Object},genrePromptLabel:{type:String,required:!0},genres:{type:Array,required:!0},id:{type:String,required:!0},items:{type:Array,default(){return[]}},options:{type:Object,default(){return{}}},otherLabel:{type:String,required:!0},primaryLocale:{type:String,required:!0},removeConfirmLabel:{type:String,required:!0},stageId:{type:Number,required:!0},title:{type:String,required:!0},uploadProgressLabel:{type:String,required:!0}},emits:["set"],data(){return{activeForm:{},dragEventCounter:0,editingLabel:"",isDragging:!1,status:""}},computed:{formModal(){return this.id+"form"}},methods:{cancelUpload(e){this.$refs.uploader.cancelUpload(e)},edit(e){let t={...K1(this.form)};t.action=t.action+"/"+e.id+"?stageId="+this.stageId,t.fields=t.fields.map(i=>(e[i.name]!=null&&(i.value=e[i.name]),i)),this.activeForm=t,this.editingLabel=this.t("common.editItem",{name:this.localize(e.name)});const{openSideModal:n}=Ms();n(eCe,{title:this.editingLabel,activeForm:this.activeForm,onSetForm:this.setForm,onFormSuccess:this.formSuccess})},formSuccess(e){this.updateItem(e);const{closeSideModal:t}=Ms();t(eCe),this.activeForm={},this.$el.querySelector("#edit-"+e.id).focus()},openFileBrowser(){this.$refs.uploader.openFileBrowser()},remove(e){this.openDialog({name:"remove",title:this.t("common.remove"),message:this.removeConfirmLabel,actions:[{label:this.t("common.yes"),isWarnable:!0,callback:t=>{$.ajax({url:this.apiUrl+"/"+e.id+"?stageId="+this.stageId,type:"POST",context:this,headers:{"X-Csrf-Token":pkp.currentUser.csrfToken,"X-Http-Method-Override":"DELETE"},error:this.ajaxErrorCallback,success(n){const i=this.items.filter(a=>a.id!==n.id);this.$emit("set",this.id,{items:i}),t(),this.$refs.addFileButton.$el.focus()}})}},{label:this.t("common.no"),callback:t=>t()}],modalStyle:"negative"})},setFiles(e){this.$emit("set",this.id,{items:e})},setForm(e,t){if(!this.activeForm)return;let n=this.activeForm;Object.keys(t).forEach(function(i){n[i]=t[i]}),this.activeForm=n},updateItem(e){const t=this.items.map(n=>n.id===e.id?e:n);this.$emit("set",this.id,{items:t})}}},B0t={class:"submissionFilesListPanel"};function V0t(e,t,n,i,a,l){const f=Xe("PkpButton"),d=Xe("PkpHeader"),h=Xe("SubmissionFilesListItem"),b=Xe("ListPanel"),S=Xe("FileUploader");return L(),Q("div",B0t,[pe(b,{items:n.items,class:"listPanel--submissionFiles"},{header:te(()=>[pe(d,null,{actions:te(()=>[pe(f,{ref:"addFileButton",onClick:l.openFileBrowser},{default:te(()=>[D(ee(n.addFileLabel),1)]),_:1},8,["onClick"])]),default:te(()=>[H("h2",null,ee(n.title),1),t[1]||(t[1]=D())]),_:1})]),itemsEmpty:te(()=>[D(ee(n.emptyLabel)+" ",1),H("button",{class:"-linkButton",onClick:t[0]||(t[0]=(...k)=>l.openFileBrowser&&l.openFileBrowser(...k))},ee(n.emptyAddLabel),1)]),item:te(({item:k})=>[is(e.$slots,"item",{item:k},()=>[pe(h,{"api-url":n.apiUrl,"cancel-upload-label":n.cancelUploadLabel,"genre-prompt-label":n.genrePromptLabel,"file-stage":n.fileStage,genres:n.genres,item:k,"other-label":n.otherLabel,"stage-id":n.stageId,onCancel:l.cancelUpload,onEdit:l.edit,onRemove:l.remove,onUpdate:l.updateItem},null,8,["api-url","cancel-upload-label","genre-prompt-label","file-stage","genres","item","other-label","stage-id","onCancel","onEdit","onRemove","onUpdate"])])]),_:3},8,["items"]),t[4]||(t[4]=D()),pe(S,{id:n.id+"-uploader",ref:"uploader","api-url":n.apiUrl,"filename-locale":n.primaryLocale,files:n.items,options:n.options,"query-params":{fileStage:n.fileStage},"upload-progress-label":n.uploadProgressLabel,"onUpdated:files":l.setFiles},null,8,["id","api-url","filename-locale","files","options","query-params","upload-progress-label","onUpdated:files"])])}const H0t=wt($0t,[["render",V0t]]);let dU;const U0t=new Uint8Array(16);function z0t(){if(!dU&&(dU=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!dU))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return dU(U0t)}const Qd=[];for(let e=0;e<256;++e)Qd.push((e+256).toString(16).slice(1));function W0t(e,t=0){return Qd[e[t+0]]+Qd[e[t+1]]+Qd[e[t+2]]+Qd[e[t+3]]+"-"+Qd[e[t+4]]+Qd[e[t+5]]+"-"+Qd[e[t+6]]+Qd[e[t+7]]+"-"+Qd[e[t+8]]+Qd[e[t+9]]+"-"+Qd[e[t+10]]+Qd[e[t+11]]+Qd[e[t+12]]+Qd[e[t+13]]+Qd[e[t+14]]+Qd[e[t+15]]}const tCe={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function nCe(e,t,n){if(tCe.randomUUID&&!e)return tCe.randomUUID();e=e||{};const i=e.random||(e.rng||z0t)();return i[6]=i[6]&15|64,i[8]=i[8]&63|128,W0t(i)}const sCe={data(){return{clientId:null,isLocalStorageEnabled:!1}},methods:{setLocalStorage(e,t){localStorage.setItem(e,JSON.stringify(t))},getLocalStorage(e){const t=localStorage.getItem(e);if(t!==null)return JSON.parse(t)},removeLocaleStorage(e){localStorage.removeItem(e)},_setClientId(){const e=localStorage.getItem("clientId");this.clientId=e!=null?e:nCe(),e||localStorage.setItem("clientId",this.clientId)},_test(){try{const e=window.localStorage,t="__storage_test__";return e.setItem(t,t),e.removeItem(t),!0}catch{return!1}}},created(){this.isLocalStorageEnabled=this._test(),this.isLocalStorageEnabled&&this._setClientId()}};let oCe=null,_R=4e3,sse=!1;const j0t={components:{ButtonRow:r0,ContributorsListPanel:PSe,ReviewerSuggestionsListPanel:S0t,File:m9,Modal:h9,SubmissionFilesListPanel:H0t},extends:f0,mixins:[Od,{mixins:[wd,sCe],data(){return{isAutosaving:!1,isDisconnected:!1,lastSavedTimestamp:Date.now(),pendingAutosaves:[]}},methods:{addAutosave(e,t,n){this.pendingAutosaves.push({id:e,url:t,timestamp:Date.now(),data:n})},startAutosaveTimer(){oCe=setInterval(this._runAutosaveJobs,500)},stopAutosaveTimer(){clearTimeout(oCe)},_getNextAutosave(){var e;if(this.isLocalStorageEnabled){let t=(e=this.getLocalStorage(this.autosavesKey))!=null?e:[];if(t.length){const n=t.splice(0,1)[0];return this.setLocalStorage(this.autosavesKey,t),n}}if(this.pendingAutosaves.length)return this.pendingAutosaves.splice(0,1)[0]},_initAutosave(){var t;const e=(t=this.getLocalStorage(this.autosavesKey))!=null?t:[];if(!e.length){this.startAutosaveTimer();return}this.$nextTick(()=>{const{relativeStringTimeFromNow:n}=Ed();this.openDialog({name:"loadAutosave",title:this.i18nUnsavedChanges,message:this.i18nUnsavedChangesMessage.replace("{$when}",n(e[0].timestamp)),actions:[{label:this.t("common.yes"),isPrimary:!0,callback:i=>{e.forEach(this.restoreStoredAutosave),this.removeLocaleStorage(this.autosavesKey),this.$nextTick(()=>{this.addAutosaves(),this.startAutosaveTimer();const a=setInterval(()=>{this.isAutosaving||(clearInterval(a),i())},2e3)})}},{label:this.i18nDiscardChanges,isWarnable:!0,callback:i=>{this.removeLocaleStorage(this.autosavesKey),this.startAutosaveTimer(),i()}}],modalStyle:"primary"})})},_runAutosaveJobs(){if(this.isDisconnected&&this._storePendingAutosaves(),this.isDisconnected||sse)return;const e=this._getNextAutosave();if(!e){Date.now()-this.lastSavedTimestamp>6e4&&this.addAutosaves();return}this._sendAutosave(e,{})},_runReconnect(){this.isDisconnected&&setTimeout(()=>{this._sendAutosave(this._getNextAutosave(),{success:e=>{_R=4e3,this.isDisconnected=!1},error:()=>{_R<3e4&&(_R=_R*2),this._runReconnect()}})},_R)},_sendAutosave(e,t){sse=!0,this.isAutosaving=!0;const n=l=>{typeof this.autosaveSucceeded=="function"&&this.autosaveSucceeded(e,l),this.lastSavedTimestamp=e.timestamp},i=(l,f)=>{var h;this.isDisconnected=!0,this.isAutosaving=!1;let d=(h=this.getLocalStorage(this.autosavesKey))!=null?h:[];d.length?d.unshift(e):d=[e],this.setLocalStorage(this.autosavesKey,d),typeof this.autosaveErrored=="function"&&this.autosaveErrored(e,l,f)},a=l=>{var d;sse=!1,!((d=this.getLocalStorage(this.autosavesKey))!=null?d:[]).length&&!this.pendingAutosaves.length&&(this.isAutosaving=!1)};t.success=t.success?[n,t.success]:n,t.error=t.error?[i,t.error]:i,t.complete=t.complete?[a,t.complete]:a,$.ajax({context:this,url:e.url,method:"POST",headers:{"X-Csrf-Token":pkp.currentUser.csrfToken,"X-Http-Method-Override":"PUT"},data:e.data,...t})},_storePendingAutosaves(){var t;if(!this.isLocalStorageEnabled||!this.pendingAutosaves.length)return;let e=(t=this.getLocalStorage(this.autosavesKey))!=null?t:[];this.setLocalStorage(this.autosavesKey,[...e,...this.pendingAutosaves]),this.pendingAutosaves=[]}},watch:{isDisconnected(e,t){e&&e!==t&&this._runReconnect()}},created(){const e="Missing required `{$prop}` property or callback function. See docs for autosave.js";["autosavesKey","i18nDiscardChanges","i18nUnsavedChanges","i18nUnsavedChangesMessage"].forEach(t=>{if(typeof this[t]>"u")throw new Error(e.replace("{$prop}",t))}),["addAutosaves","restoreStoredAutosave"].forEach(t=>{if(typeof this[t]!="function")throw new Error(e.replace("{$prop}",t))}),this.isLocalStorageEnabled||(this.clientId=nCe()),this._initAutosave()},destroyed(){this.stopAutosaveTimer()}},wd,Vne,sCe],data(){return{autosavesKeyBase:"submitAutosaves",categories:{},currentStepId:"",errors:{},isValidating:!1,lastAutosavedMessage:"",publication:{},publicationApiUrl:"",reconfigurePublicationProps:[],reconfigureSubmissionProps:[],staleForms:[],startedSteps:[],steps:[],submission:{},submissionApiUrl:"",submissionSavedUrl:"",submissionWizardUrl:"",submitApiUrl:"",i18nConfirmSubmit:"",i18nDiscardChanges:"",i18nDisconnected:"",i18nLastAutosaved:"",i18nPageTitle:"",i18nSubmit:"",i18nTitleSeparator:"",i18nUnableToSave:"",i18nUnsavedChanges:"",i18nUnsavedChangesMessage:"",submissionCancelApiUrl:"",submissionCancelledUrl:""}},computed:{autosavesKey(){return this.autosavesKeyBase+this.submission.id},canSubmit(){return!this.isAutosaving&&!this.isDisconnected&&this.isValid&&this.isConfirmed},currentCategoryTitles(){return this.publication.categoryIds.filter(e=>!!this.categories[e]).map(e=>this.categories[e])},currentStep(){return this.steps.find(e=>e.id===this.currentStepId)},currentStepIndex(){return this.steps.findIndex(e=>e.id===this.currentStepId)},isConfirmed(){var t,n;return!((n=(t=this.steps.find(i=>i.id==="review"))==null?void 0:t.sections.find(i=>i.id==="confirmSubmission"))==null?void 0:n.form.fields.map(i=>i.component!=="field-options"||i.value).includes(!1))},isOnFirstStep(){return!this.currentStepIndex},isOnLastStep(){return this.currentStepIndex===this.steps.length-1},isValid(){return Object.keys(this.errors).length===0},pageTitle(){return this.currentStep?this.i18nPageTitle.replace("{$step}",this.currentStep.name):""}},watch:{currentStepIndex(e,t){if(e===t)return;this.addAutosaves(),this.steps.forEach((i,a)=>{!this.startedSteps.includes(i.id)&&a<=this.currentStepIndex&&this.startedSteps.push(i.id)});const n=this.steps[e];document.title=this.getPageTitle(n),n.id!==window.location.hash.replace("#","")&&this.addHistory(n),e===this.steps.length-1&&this.validate()},errors(e,t){const n=Object.keys(e);this.steps.forEach((i,a)=>{i.sections.forEach((l,f)=>{l.type==="form"&&l.form.fields.forEach(d=>{n.includes(d.name)&&(this.steps[a].sections[f].form.errors={...this.steps[a].sections[f].form.errors,[d.name]:e[d.name]})})})}),pkp.eventBus.$emit("submission:submit:errors",e,this)},isAutosaving(e,t){!e&&t&&this.setLastAutosaveMessage()}},created(){if(window.location.hash)this.openStep(this.steps[0].id);else{const e=this.steps.find(t=>t.id===this.submission.submissionProgress);this.openStep(e?e.id:this.steps[0].id)}setInterval(this.setLastAutosaveMessage,3e3)},methods:{openReconfigureModal(){const{openSideModal:e}=Ms();e(C0t,{reconfigureSubmissionForm:this.components.reconfigureSubmission,onSet:this.set,onReconfigureSubmission:this.reconfigureSubmission})},addAutosaves(){if(this.staleForms.length)for(;this.staleForms.length;){const e=this.staleForms.splice(0,1)[0],t=this.$refs.autosaveForms.find(n=>n.id===e);if(!t)return;this.addAutosave(t.id,t.action,{...t.submitValues})}},addHistory(e){window.history.pushState({},e.name,"#"+e.id)},autosaveErrored(e,t,n){if(![0,500].includes(t.status)){if(t.status!==403){let i=this.getLocalStorage(this.autosavesKey);i.length&&this.setLocalStorage(this.autosavesKey,i.filter(a=>a.id!==e.id))}this.isDisconnected=!0,this.ajaxErrorCallback({})}},autosaveSucceeded(e,t){t.submissionId?this.publication=t:t.dateSubmitted&&(this.submission=t)},getAuthorName(e){let t=this.localize(e.affiliation);return t?[e.fullName,t].join(pkp.localeKeys["common.commaListSeparator"]):e.fullName},getPageTitle(e){return document.title.split(this.i18nTitleSeparator).map((t,n)=>n?t:this.i18nPageTitle.replace("{$step}",e.name)).join(this.i18nTitleSeparator)},nextStep(){this.isOnLastStep?this.submit():this.openStep(this.steps[1+this.currentStepIndex].id)},openSaveForLaterFailed(){this.openDialog({name:"saveForLaterFailed",title:this.i18nDisconnected,message:this.i18nUnableToSave,actions:[{label:this.t("common.ok"),callback:e=>e()}],modalStyle:"negative"})},openStep(e){this.steps.find(n=>n.id===e)&&(this.currentStepId=e)},openUrlHash(){const e=window.location.hash.replace("#",""),t=this.steps.find(n=>n.id===e);this.openStep(t?t.id:this.steps[0].id)},previousStep(){const e=this.currentStepIndex-1;e>=0&&this.openStep(this.steps[e].id)},reconfigureSubmission(e){const t=(a,l)=>(typeof e[l]<"u"&&(a[l]=e[l]),a),n=this.reconfigureSubmissionProps.reduce(t,{}),i=this.reconfigurePublicationProps.reduce(t,{});$.ajax({url:this.submissionApiUrl,method:"POST",context:this,headers:{"X-Csrf-Token":pkp.currentUser.csrfToken,"X-Http-Method-Override":"PUT"},data:n,error:this.ajaxErrorCallback,success(a){if(!Object.keys(i).length){window.location.reload();return}$.ajax({url:this.publicationApiUrl,method:"POST",context:this,headers:{"X-Csrf-Token":pkp.currentUser.csrfToken,"X-Http-Method-Override":"PUT"},data:i,error:this.ajaxErrorCallback,success(l){window.location.reload()}})}})},saveForLater(){this.isLoading=!0,this.addAutosaves();const e=setInterval(()=>{if(!this.isAutosaving){if(this.isDisconnected){clearInterval(e),this.isLoading=!1,this.openSaveForLaterFailed();return}$.ajax({url:this.submissionApiUrl+"/saveForLater",method:"POST",context:this,headers:{"X-Csrf-Token":pkp.currentUser.csrfToken,"X-Http-Method-Override":"PUT"},data:{step:this.startedSteps[this.startedSteps.length-1]},error(){this.isLoading=!1,this.openSaveForLaterFailed()},success(){window.location=this.submissionSavedUrl}}),clearInterval(e)}},1e3)},setLastAutosaveMessage(){if(!this.lastSavedTimestamp){this.lastAutosavedMessage="";return}const{relativeStringTimeFromNow:e}=Ed();this.lastAutosavedMessage=this.i18nLastAutosaved.replace("{$when}",e(this.lastSavedTimestamp))},setContributors(e){this.publication.authors=e},setReviewerSuggestion(e){this.submission.reviewerSuggestions=e},setPublication(e){this.publication=e},submit(){this.openDialog({name:"submitConfirmation",title:this.i18nSubmit,message:this.i18nConfirmSubmit.replace("{$title}",this.localize(this.publication.title)),actions:[{label:this.i18nSubmit,isPrimary:!0,callback:e=>{var n,i;const t=(i=(n=this.steps.find(a=>a.id==="review"))==null?void 0:n.sections.find(a=>a.type==="confirm"))==null?void 0:i.form.fields.filter(a=>a.component==="field-options"&&a.value).reduce((a,l)=>({...a,[l.name]:l.value}),{});$.ajax({url:this.submitApiUrl,context:this,method:"POST",data:t,headers:{"X-Csrf-Token":pkp.currentUser.csrfToken,"X-Http-Method-Override":"PUT"},error(a){e(),a.responseJSON?this.errors=a.responseJSON:this.ajaxErrorCallback({})},success(){window.location=this.submissionWizardUrl}})}},{label:this.t("common.cancel"),isWarnable:!0,callback:e=>e()}],modalStyle:"primary"})},restoreStoredAutosave(e){let t;const n=Object.keys(e.data);this.steps.forEach(i=>{i.sections.forEach(a=>{a.type!=="form"||a.form.id!==e.id||(t=a.form)})}),t&&this.updateForm(e.id,{fields:t.fields.map(i=>n.includes(i.name)?{...i,value:e.data[i.name]}:i)})},updateAutosaveForm(e,t){this.updateForm(e,t),this.staleForms.indexOf(e)===-1&&this.staleForms.push(e)},updateForm(e,t){this.steps.forEach((n,i)=>{n.sections.forEach((a,l)=>{a.type!=="form"||a.form.id!==e||(this.steps[i].sections[l].form={...this.steps[i].sections[l].form,...t})})})},validate(){this.isValidating=!0,this.errors={};const e=setInterval(()=>{this.isAutosaving||this.isDisconnected||(clearInterval(e),$.ajax({url:this.submitApiUrl,method:"POST",context:this,headers:{"X-Csrf-Token":pkp.currentUser.csrfToken,"X-Http-Method-Override":"PUT"},data:{_validateOnly:!0},error(t){t.responseJSON?this.errors=t.responseJSON:this.ajaxErrorCallback({})},success(t){this.errors={}},complete(){this.isValidating=!1}}))},500)},cancelSubmission(){this.openDialog({name:"SubmissionCancel",title:this.t("submission.wizard.submissionCancel"),message:this.t("submission.wizard.cancel.confirmation"),actions:[{label:this.t("common.ok"),isPrimary:!0,callback:e=>{$.ajax({url:this.submissionCancelApiUrl,context:this,method:"POST",headers:{"X-Csrf-Token":pkp.currentUser.csrfToken,"X-Http-Method-Override":"DELETE"},error(t){e(),t.responseJSON?this.errors=t.responseJSON:this.ajaxErrorCallback({})},success(){window.location=this.submissionCancelledUrl}})}},{label:this.t("common.cancel"),isWarnable:!0,callback:e=>e()}],modalStyle:"negative"})}}};os.registerComponent("WorkflowPage",tgt),window.pkp=Object.assign(dit,window.pkp||{},{controllers:{AccessPage:ngt,AddContextContainer:sgt,AdminPage:ugt,AdvancedSearchReviewerContainer:alt,Container:iU,DoiPage:s0t,DecisionPage:o0t,ImportExportPage:r0t,ManageEmailsPage:i0t,Page:f0,SettingsPage:d0t,StartSubmissionPage:f0t,StatsEditorialPage:p0t,StatsPublicationsPage:tse,StatsContextPage:h0t,StatsIssuesPage:g0t,StatsUsersPage:v0t,SubmissionWizardPage:j0t,DashboardPage:CSe}})})();
Simpan